Skip to content

Commit

Permalink
deploy: dcd992b
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Jun 7, 2024
1 parent 3db4b63 commit 33a7912
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 16 deletions.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/gui_handles.doctree
Binary file not shown.
Binary file modified latest/.doctrees/scene_api.doctree
Binary file not shown.
4 changes: 3 additions & 1 deletion latest/_modules/viser/_gui_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ <h1>Source code for viser._gui_handles</h1><div class="highlight"><pre>
<a class="viewcode-back" href="../../../gui_handles/#viser.GuiTabGroupHandle">[docs]</a>
<span class="nd">@dataclasses</span><span class="o">.</span><span class="n">dataclass</span><span class="p">(</span><span class="n">frozen</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="k">class</span> <span class="nc">GuiTabGroupHandle</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Handle for a tab group. Call :meth:`add_tab()` to add a tab.&quot;&quot;&quot;</span>

<span class="n">_tab_group_id</span><span class="p">:</span> <span class="nb">str</span>
<span class="n">_labels</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span><span class="p">]</span>
<span class="n">_icons_html</span><span class="p">:</span> <span class="nb">list</span><span class="p">[</span><span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span><span class="p">]</span>
Expand Down Expand Up @@ -987,7 +989,7 @@ <h1>Source code for viser._gui_handles</h1><div class="highlight"><pre>

<span class="nd">@dataclasses</span><span class="o">.</span><span class="n">dataclass</span>
<span class="k">class</span> <span class="nc">GuiPlotlyHandle</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Use to remove markdown.&quot;&quot;&quot;</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Use to update or remove markdown elements.&quot;&quot;&quot;</span>

<span class="n">_gui_api</span><span class="p">:</span> <span class="n">GuiApi</span>
<span class="n">_id</span><span class="p">:</span> <span class="nb">str</span>
Expand Down
14 changes: 7 additions & 7 deletions latest/_modules/viser/_scene_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1586,8 +1586,9 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">Callable</span><span class="p">[[],</span> <span class="kc">None</span><span class="p">]:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Add a callback to run automatically when the callback for a scene</span>
<span class="sd"> pointer event is removed. This will be triggered exactly once, either</span>
<span class="sd"> manually (via `remove_scene_pointer()`) or automatically (if the scene</span>
<span class="sd"> pointer event is overridden with another call to `on_scene_pointer()`).</span>
<span class="sd"> manually (via :meth:`remove_pointer_callback()`) or automatically (if</span>
<span class="sd"> the scene pointer event is overridden with another call to</span>
<span class="sd"> :meth:`on_pointer_event()`).</span>

<span class="sd"> Args:</span>
<span class="sd"> func: Callback for when scene pointer events are removed.</span>
Expand Down Expand Up @@ -1653,17 +1654,16 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="c1"># Avoids circular import.</span>
<span class="kn">from</span> <span class="nn">._gui_api</span> <span class="kn">import</span> <span class="n">GuiApi</span><span class="p">,</span> <span class="n">_make_unique_id</span>
<span class="kn">from</span> <span class="nn">._gui_api</span> <span class="kn">import</span> <span class="n">_make_unique_id</span>

<span class="c1"># New name to make the type checker happy; ViserServer and ClientHandle inherit</span>
<span class="c1"># from both GuiApi and MessageApi. The pattern below is unideal.</span>
<span class="n">gui_api</span> <span class="o">=</span> <span class="bp">self</span>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">gui_api</span><span class="p">,</span> <span class="n">GuiApi</span><span class="p">)</span>
<span class="n">gui_api</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_owner</span><span class="o">.</span><span class="n">gui</span>

<span class="c1"># Remove the 3D GUI container if it already exists. This will make sure</span>
<span class="c1"># contained GUI elements are removed, preventing potential memory leaks.</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">gui_api</span><span class="o">.</span><span class="n">_handle_from_node_name</span><span class="p">:</span>
<span class="n">gui_api</span><span class="o">.</span><span class="n">_handle_from_node_name</span><span class="p">[</span><span class="n">name</span><span class="p">]</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>
<span class="k">if</span> <span class="n">name</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_handle_from_node_name</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_handle_from_node_name</span><span class="p">[</span><span class="n">name</span><span class="p">]</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>

<span class="n">container_id</span> <span class="o">=</span> <span class="n">_make_unique_id</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_websock_interface</span><span class="o">.</span><span class="n">queue_message</span><span class="p">(</span>
Expand Down
6 changes: 3 additions & 3 deletions latest/_modules/viser/_scene_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -630,9 +630,9 @@ <h1>Source code for viser._scene_handles</h1><div class="highlight"><pre>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>

<span class="c1"># Clean up contained GUI elements.</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_gui_api</span><span class="o">.</span><span class="n">_container_handle_from_id</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_container_id</span><span class="p">)</span>
<span class="k">for</span> <span class="n">child</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">_children</span><span class="o">.</span><span class="n">values</span><span class="p">():</span>
<span class="n">child</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span></div>
<span class="k">for</span> <span class="n">child</span> <span class="ow">in</span> <span class="nb">tuple</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_children</span><span class="o">.</span><span class="n">values</span><span class="p">()):</span>
<span class="n">child</span><span class="o">.</span><span class="n">remove</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_gui_api</span><span class="o">.</span><span class="n">_container_handle_from_id</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_container_id</span><span class="p">)</span></div>
</div>

</pre></div>
Expand Down
4 changes: 3 additions & 1 deletion latest/_modules/viser/_viser/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -353,14 +353,16 @@ <h1>Source code for viser._viser</h1><div class="highlight"><pre>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">scene</span><span class="p">,</span> <span class="n">fixed_name</span><span class="p">):</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> has been deprecated, use </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.scene.</span><span class="si">{</span><span class="n">fixed_name</span><span class="si">}</span><span class="s2"> instead. Alternatively, pin to `viser&lt;0.2.0`.&quot;</span><span class="p">,</span>
<span class="n">category</span><span class="o">=</span><span class="ne">DeprecationWarning</span><span class="p">,</span>
<span class="n">stacklevel</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">return</span> <span class="nb">object</span><span class="o">.</span><span class="fm">__getattribute__</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">scene</span><span class="p">,</span> <span class="n">fixed_name</span><span class="p">)</span>

<span class="n">fixed_name</span> <span class="o">=</span> <span class="n">name</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;add_gui_&quot;</span><span class="p">,</span> <span class="s2">&quot;add_&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;set_gui_&quot;</span><span class="p">,</span> <span class="s2">&quot;set_&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">hasattr</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">gui</span><span class="p">,</span> <span class="n">fixed_name</span><span class="p">):</span>
<span class="n">warnings</span><span class="o">.</span><span class="n">warn</span><span class="p">(</span>
<span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> has been deprecated, use </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.gui.</span><span class="si">{</span><span class="n">fixed_name</span><span class="si">}</span><span class="s2"> instead. Alternatively, pin to `viser&lt;=0.1.30`.&quot;</span><span class="p">,</span>
<span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> has been deprecated, use </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="vm">__name__</span><span class="si">}</span><span class="s2">.gui.</span><span class="si">{</span><span class="n">fixed_name</span><span class="si">}</span><span class="s2"> instead. Alternatively, pin to `viser&lt;0.2.0`.&quot;</span><span class="p">,</span>
<span class="n">category</span><span class="o">=</span><span class="ne">DeprecationWarning</span><span class="p">,</span>
<span class="n">stacklevel</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
<span class="p">)</span>
<span class="k">return</span> <span class="nb">object</span><span class="o">.</span><span class="fm">__getattribute__</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">gui</span><span class="p">,</span> <span class="n">fixed_name</span><span class="p">)</span>
Expand Down
2 changes: 1 addition & 1 deletion latest/gui_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ <h1>GUI Handles<a class="headerlink" href="#gui-handles" title="Link to this hea
<dl class="py class">
<dt class="sig sig-object py" id="viser.GuiTabGroupHandle">
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">viser.</span></span><span class="sig-name descname"><span class="pre">GuiTabGroupHandle</span></span><a class="reference internal" href="../_modules/viser/_gui_handles/#GuiTabGroupHandle"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#viser.GuiTabGroupHandle" title="Link to this definition">#</a></dt>
<dd><p>GuiTabGroupHandle(_tab_group_id: ‘str’, _labels: ‘list[str]’, _icons_html: ‘list[str | None]’, _tabs: ‘list[GuiTabHandle]’, _gui_api: ‘GuiApi’, _parent_container_id: ‘str’, _order: ‘float’)</p>
<dd><p>Handle for a tab group. Call <a class="reference internal" href="#viser.GuiTabGroupHandle.add_tab" title="viser.GuiTabGroupHandle.add_tab"><code class="xref py py-meth docutils literal notranslate"><span class="pre">add_tab()</span></code></a> to add a tab.</p>
<dl class="py property">
<dt class="sig sig-object py" id="viser.GuiTabGroupHandle.order">
<em class="property"><span class="pre">property</span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">order</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">float</span></em><a class="headerlink" href="#viser.GuiTabGroupHandle.order" title="Link to this definition">#</a></dt>
Expand Down
5 changes: 3 additions & 2 deletions latest/scene_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,9 @@ <h1>Scene API<a class="headerlink" href="#scene-api" title="Link to this heading
<span class="sig-name descname"><span class="pre">on_pointer_callback_removed</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">func</span></span><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="n"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">None</span><span class="p"><span class="pre">]</span></span></span></em><span class="sig-paren">)</span> <span class="sig-return"><span class="sig-return-icon">&#x2192;</span> <span class="sig-return-typehint"><span class="pre">Callable</span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">[</span></span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">None</span><span class="p"><span class="pre">]</span></span></span></span><a class="reference internal" href="../_modules/viser/_scene_api/#SceneApi.on_pointer_callback_removed"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#viser.SceneApi.on_pointer_callback_removed" title="Link to this definition">#</a></dt>
<dd><p>Add a callback to run automatically when the callback for a scene
pointer event is removed. This will be triggered exactly once, either
manually (via <code class="docutils literal notranslate"><span class="pre">remove_scene_pointer()</span></code>) or automatically (if the scene
pointer event is overridden with another call to <code class="docutils literal notranslate"><span class="pre">on_scene_pointer()</span></code>).</p>
manually (via <a class="reference internal" href="#viser.SceneApi.remove_pointer_callback" title="viser.SceneApi.remove_pointer_callback"><code class="xref py py-meth docutils literal notranslate"><span class="pre">remove_pointer_callback()</span></code></a>) or automatically (if
the scene pointer event is overridden with another call to
<a class="reference internal" href="#viser.SceneApi.on_pointer_event" title="viser.SceneApi.on_pointer_event"><code class="xref py py-meth docutils literal notranslate"><span class="pre">on_pointer_event()</span></code></a>).</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
<dd class="field-odd"><p><strong>func</strong> (<em>Callable</em><em>[</em><em>[</em><em>]</em><em>, </em><em>None</em><em>]</em>) – Callback for when scene pointer events are removed.</p>
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit 33a7912

Please sign in to comment.