Skip to content

Commit

Permalink
deploy: faa9c57
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Dec 2, 2024
1 parent bd5c435 commit 2e6c8d5
Show file tree
Hide file tree
Showing 76 changed files with 1,351 additions and 126 deletions.
Binary file modified latest/.doctrees/client_handles.doctree
Binary file not shown.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified latest/.doctrees/gui_api.doctree
Binary file not shown.
Binary file modified latest/.doctrees/gui_handles.doctree
Binary file not shown.
Binary file modified latest/.doctrees/index.doctree
Binary file not shown.
Binary file modified latest/.doctrees/scene_handles.doctree
Binary file not shown.
3 changes: 2 additions & 1 deletion latest/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@
<li class="toctree-l1"><a class="reference internal" href="../examples/21_set_up_direction/">Set up direction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/22_games/">Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/23_plotly/">Plotly</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/24_notification/">Notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/24_plots_as_images/">Plots as Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/25_smpl_visualizer_skinned/">SMPL visualizer (Skinned Mesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/26_lighting/">Lights</a></li>
<li class="toctree-l1"><a class="reference internal" href="../examples/27_notifications/">Notifications</a></li>
</ul>

</div>
Expand Down
43 changes: 42 additions & 1 deletion latest/_modules/viser/_gui_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@
<li class="toctree-l1"><a class="reference internal" href="../../../examples/21_set_up_direction/">Set up direction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/22_games/">Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/23_plotly/">Plotly</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_notification/">Notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_plots_as_images/">Plots as Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/25_smpl_visualizer_skinned/">SMPL visualizer (Skinned Mesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/26_lighting/">Lights</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/27_notifications/">Notifications</a></li>
</ul>

</div>
Expand Down Expand Up @@ -425,6 +426,7 @@ <h1>Source code for viser._gui_api</h1><div class="highlight"><pre>
<span class="n">GuiDropdownHandle</span><span class="p">,</span>
<span class="n">GuiEvent</span><span class="p">,</span>
<span class="n">GuiFolderHandle</span><span class="p">,</span>
<span class="n">GuiImageHandle</span><span class="p">,</span>
<span class="n">GuiMarkdownHandle</span><span class="p">,</span>
<span class="n">GuiModalHandle</span><span class="p">,</span>
<span class="n">GuiMultiSliderHandle</span><span class="p">,</span>
Expand Down Expand Up @@ -1027,6 +1029,45 @@ <h1>Source code for viser._gui_api</h1><div class="highlight"><pre>
<span class="k">return</span> <span class="n">handle</span></div>


<div class="viewcode-block" id="GuiApi.add_image">
<a class="viewcode-back" href="../../../gui_api/#viser.GuiApi.add_image">[docs]</a>
<span class="k">def</span> <span class="nf">add_image</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">image</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span>
<span class="n">label</span><span class="p">:</span> <span class="nb">str</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="nb">format</span><span class="p">:</span> <span class="n">Literal</span><span class="p">[</span><span class="s2">&quot;png&quot;</span><span class="p">,</span> <span class="s2">&quot;jpeg&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="s2">&quot;jpeg&quot;</span><span class="p">,</span>
<span class="n">jpeg_quality</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">order</span><span class="p">:</span> <span class="nb">float</span> <span class="o">|</span> <span class="kc">None</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span>
<span class="n">visible</span><span class="p">:</span> <span class="nb">bool</span> <span class="o">=</span> <span class="kc">True</span><span class="p">,</span>
<span class="p">)</span> <span class="o">-&gt;</span> <span class="n">GuiImageHandle</span><span class="p">:</span>
<span class="n">message</span> <span class="o">=</span> <span class="n">_messages</span><span class="o">.</span><span class="n">GuiImageMessage</span><span class="p">(</span>
<span class="n">uuid</span><span class="o">=</span><span class="n">_make_uuid</span><span class="p">(),</span>
<span class="n">container_uuid</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_get_container_uuid</span><span class="p">(),</span>
<span class="n">props</span><span class="o">=</span><span class="n">_messages</span><span class="o">.</span><span class="n">GuiImageProps</span><span class="p">(</span>
<span class="n">_data</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="c1"># Sent in prop update later.</span>
<span class="n">label</span><span class="o">=</span><span class="n">label</span><span class="p">,</span>
<span class="n">media_type</span><span class="o">=</span><span class="s2">&quot;image/png&quot;</span> <span class="k">if</span> <span class="nb">format</span> <span class="o">==</span> <span class="s2">&quot;png&quot;</span> <span class="k">else</span> <span class="s2">&quot;image/jpeg&quot;</span><span class="p">,</span>
<span class="n">order</span><span class="o">=</span><span class="n">_apply_default_order</span><span class="p">(</span><span class="n">order</span><span class="p">),</span>
<span class="n">visible</span><span class="o">=</span><span class="n">visible</span><span class="p">,</span>
<span class="p">),</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><span class="n">message</span><span class="p">)</span>

<span class="n">handle</span> <span class="o">=</span> <span class="n">GuiImageHandle</span><span class="p">(</span>
<span class="n">_GuiHandleState</span><span class="p">(</span>
<span class="n">message</span><span class="o">.</span><span class="n">uuid</span><span class="p">,</span>
<span class="bp">self</span><span class="p">,</span>
<span class="kc">None</span><span class="p">,</span>
<span class="n">props</span><span class="o">=</span><span class="n">message</span><span class="o">.</span><span class="n">props</span><span class="p">,</span>
<span class="n">parent_container_id</span><span class="o">=</span><span class="n">message</span><span class="o">.</span><span class="n">container_uuid</span><span class="p">,</span>
<span class="p">),</span>
<span class="n">_image</span><span class="o">=</span><span class="n">image</span><span class="p">,</span>
<span class="n">_jpeg_quality</span><span class="o">=</span><span class="n">jpeg_quality</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">handle</span><span class="o">.</span><span class="n">image</span> <span class="o">=</span> <span class="n">image</span>
<span class="k">return</span> <span class="n">handle</span></div>


<div class="viewcode-block" id="GuiApi.add_plotly">
<a class="viewcode-back" href="../../../gui_api/#viser.GuiApi.add_plotly">[docs]</a>
<span class="k">def</span> <span class="nf">add_plotly</span><span class="p">(</span>
Expand Down
33 changes: 32 additions & 1 deletion latest/_modules/viser/_gui_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@
<li class="toctree-l1"><a class="reference internal" href="../../../examples/21_set_up_direction/">Set up direction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/22_games/">Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/23_plotly/">Plotly</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_notification/">Notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_plots_as_images/">Plots as Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/25_smpl_visualizer_skinned/">SMPL visualizer (Skinned Mesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/26_lighting/">Lights</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/27_notifications/">Notifications</a></li>
</ul>

</div>
Expand Down Expand Up @@ -421,6 +422,7 @@ <h1>Source code for viser._gui_handles</h1><div class="highlight"><pre>
<span class="n">GuiCloseModalMessage</span><span class="p">,</span>
<span class="n">GuiDropdownProps</span><span class="p">,</span>
<span class="n">GuiFolderProps</span><span class="p">,</span>
<span class="n">GuiImageProps</span><span class="p">,</span>
<span class="n">GuiMarkdownProps</span><span class="p">,</span>
<span class="n">GuiMultiSliderProps</span><span class="p">,</span>
<span class="n">GuiNumberProps</span><span class="p">,</span>
Expand Down Expand Up @@ -1287,6 +1289,35 @@ <h1>Source code for viser._gui_handles</h1><div class="highlight"><pre>
<span class="k">assert</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">json_str</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_plotly_json_str</span> <span class="o">=</span> <span class="n">json_str</span></div>



<span class="k">class</span> <span class="nc">GuiImageHandle</span><span class="p">(</span><span class="n">_GuiHandle</span><span class="p">[</span><span class="kc">None</span><span class="p">],</span> <span class="n">GuiImageProps</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Handle for updating and removing images.&quot;&quot;&quot;</span>

<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">_impl</span><span class="p">:</span> <span class="n">_GuiHandleState</span><span class="p">,</span>
<span class="n">_image</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">,</span>
<span class="n">_jpeg_quality</span><span class="p">:</span> <span class="nb">int</span> <span class="o">|</span> <span class="kc">None</span><span class="p">,</span>
<span class="p">):</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">_impl</span><span class="o">=</span><span class="n">_impl</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_image</span> <span class="o">=</span> <span class="n">_image</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_jpeg_quality</span> <span class="o">=</span> <span class="n">_jpeg_quality</span>

<span class="nd">@property</span>
<span class="k">def</span> <span class="nf">image</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">:</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Current content of this image element. Synchronized automatically when assigned.&quot;&quot;&quot;</span>
<span class="k">assert</span> <span class="bp">self</span><span class="o">.</span><span class="n">_image</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_image</span>

<span class="nd">@image</span><span class="o">.</span><span class="n">setter</span>
<span class="k">def</span> <span class="nf">image</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">image</span><span class="p">:</span> <span class="n">np</span><span class="o">.</span><span class="n">ndarray</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_image</span> <span class="o">=</span> <span class="n">image</span>
<span class="n">media_type</span><span class="p">,</span> <span class="n">data</span> <span class="o">=</span> <span class="n">_encode_image_binary</span><span class="p">(</span>
<span class="n">image</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">media_type</span><span class="p">,</span> <span class="n">jpeg_quality</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">_jpeg_quality</span>
<span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_data</span> <span class="o">=</span> <span class="n">data</span>
<span class="k">del</span> <span class="n">media_type</span>
</pre></div>
</article>
</div>
Expand Down
3 changes: 2 additions & 1 deletion latest/_modules/viser/_icons_enum/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@
<li class="toctree-l1"><a class="reference internal" href="../../../examples/21_set_up_direction/">Set up direction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/22_games/">Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/23_plotly/">Plotly</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_notification/">Notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_plots_as_images/">Plots as Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/25_smpl_visualizer_skinned/">SMPL visualizer (Skinned Mesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/26_lighting/">Lights</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/27_notifications/">Notifications</a></li>
</ul>

</div>
Expand Down
3 changes: 2 additions & 1 deletion latest/_modules/viser/_notification_handle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,10 @@
<li class="toctree-l1"><a class="reference internal" href="../../../examples/21_set_up_direction/">Set up direction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/22_games/">Games</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/23_plotly/">Plotly</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_notification/">Notifications</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/24_plots_as_images/">Plots as Images</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/25_smpl_visualizer_skinned/">SMPL visualizer (Skinned Mesh)</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/26_lighting/">Lights</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../examples/27_notifications/">Notifications</a></li>
</ul>

</div>
Expand Down
Loading

0 comments on commit 2e6c8d5

Please sign in to comment.