Skip to content

Commit

Permalink
deploy: d72e85b
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Sep 25, 2024
1 parent 56356de commit f2e1d52
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 20 deletions.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/scene_handles.doctree
Binary file not shown.
15 changes: 2 additions & 13 deletions latest/_modules/viser/_scene_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1510,19 +1510,8 @@ <h1>Source code for viser._scene_api</h1><div class="highlight"><pre>
<span class="n">flat_shading</span><span class="o">=</span><span class="n">flat_shading</span><span class="p">,</span>
<span class="n">side</span><span class="o">=</span><span class="n">side</span><span class="p">,</span>
<span class="n">material</span><span class="o">=</span><span class="n">material</span><span class="p">,</span>
<span class="n">bone_wxyzs</span><span class="o">=</span><span class="nb">tuple</span><span class="p">(</span>
<span class="p">(</span>
<span class="nb">float</span><span class="p">(</span><span class="n">wxyz</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span>
<span class="nb">float</span><span class="p">(</span><span class="n">wxyz</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span>
<span class="nb">float</span><span class="p">(</span><span class="n">wxyz</span><span class="p">[</span><span class="mi">2</span><span class="p">]),</span>
<span class="nb">float</span><span class="p">(</span><span class="n">wxyz</span><span class="p">[</span><span class="mi">3</span><span class="p">]),</span>
<span class="p">)</span>
<span class="k">for</span> <span class="n">wxyz</span> <span class="ow">in</span> <span class="n">bone_wxyzs</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">bone_positions</span><span class="o">=</span><span class="nb">tuple</span><span class="p">(</span>
<span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">xyz</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="nb">float</span><span class="p">(</span><span class="n">xyz</span><span class="p">[</span><span class="mi">1</span><span class="p">]),</span> <span class="nb">float</span><span class="p">(</span><span class="n">xyz</span><span class="p">[</span><span class="mi">2</span><span class="p">]))</span>
<span class="k">for</span> <span class="n">xyz</span> <span class="ow">in</span> <span class="n">bone_positions</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
<span class="p">),</span>
<span class="n">bone_wxyzs</span><span class="o">=</span><span class="n">bone_wxyzs</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">),</span>
<span class="n">bone_positions</span><span class="o">=</span><span class="n">bone_positions</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">),</span>
<span class="n">skin_indices</span><span class="o">=</span><span class="n">top4_skin_indices</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">uint16</span><span class="p">),</span>
<span class="n">skin_weights</span><span class="o">=</span><span class="n">top4_skin_weights</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">),</span>
<span class="p">),</span>
Expand Down
9 changes: 7 additions & 2 deletions latest/_modules/viser/_scene_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,13 @@ <h1>Source code for viser._scene_handles</h1><div class="highlight"><pre>
<span class="k">elif</span> <span class="n">hint</span> <span class="o">==</span> <span class="n">onpt</span><span class="o">.</span><span class="n">NDArray</span><span class="p">[</span><span class="n">np</span><span class="o">.</span><span class="n">uint8</span><span class="p">]</span> <span class="ow">and</span> <span class="s2">&quot;color&quot;</span> <span class="ow">in</span> <span class="n">name</span><span class="p">:</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">colors_to_uint8</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>

<span class="k">if</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">handle</span><span class="o">.</span><span class="n">_impl</span><span class="o">.</span><span class="n">props</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span> <span class="o">==</span> <span class="n">value</span><span class="p">:</span>
<span class="c1"># Do nothing. Assumes equality is defined for the prop value.</span>
<span class="n">current_value</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">handle</span><span class="o">.</span><span class="n">_impl</span><span class="o">.</span><span class="n">props</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span>

<span class="c1"># Do nothing if the value hasn&#39;t changed.</span>
<span class="k">if</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">current_value</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="k">if</span> <span class="n">current_value</span><span class="o">.</span><span class="n">data</span> <span class="o">==</span> <span class="n">value</span><span class="o">.</span><span class="n">data</span><span class="p">:</span>
<span class="k">return</span>
<span class="k">elif</span> <span class="n">current_value</span> <span class="o">==</span> <span class="n">value</span><span class="p">:</span>
<span class="k">return</span>

<span class="nb">setattr</span><span class="p">(</span><span class="n">handle</span><span class="o">.</span><span class="n">_impl</span><span class="o">.</span><span class="n">props</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span>
Expand Down
8 changes: 4 additions & 4 deletions latest/scene_handles/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1235,14 +1235,14 @@ <h1>Scene Handles<a class="headerlink" href="#scene-handles" title="Link to this

<dl class="py attribute">
<dt class="sig sig-object py" id="viser.MeshSkinnedHandle.bone_wxyzs">
<span class="sig-name descname"><span class="pre">bone_wxyzs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#viser.MeshSkinnedHandle.bone_wxyzs" title="Link to this definition"></a></dt>
<dd><p>Tuple of quaternions representing bone orientations. Synchronized automatically when assigned.</p>
<span class="sig-name descname"><span class="pre">bone_wxyzs</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">npt.NDArray</span><span class="p"><span class="pre">[</span></span><span class="pre">np.float32</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#viser.MeshSkinnedHandle.bone_wxyzs" title="Link to this definition"></a></dt>
<dd><p>Array of quaternions representing bone orientations (B, 4). Synchronized automatically when assigned.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="viser.MeshSkinnedHandle.bone_positions">
<span class="sig-name descname"><span class="pre">bone_positions</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">Tuple</span><span class="p"><span class="pre">[</span></span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="pre">float</span><span class="p"><span class="pre">]</span></span><span class="p"><span class="pre">,</span></span><span class="w"> </span><span class="p"><span class="pre">...</span></span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#viser.MeshSkinnedHandle.bone_positions" title="Link to this definition"></a></dt>
<dd><p>Tuple of positions representing bone positions. Synchronized automatically when assigned.</p>
<span class="sig-name descname"><span class="pre">bone_positions</span></span><em class="property"><span class="p"><span class="pre">:</span></span><span class="w"> </span><span class="pre">npt.NDArray</span><span class="p"><span class="pre">[</span></span><span class="pre">np.float32</span><span class="p"><span class="pre">]</span></span></em><a class="headerlink" href="#viser.MeshSkinnedHandle.bone_positions" title="Link to this definition"></a></dt>
<dd><p>Array of positions representing bone positions (B, 3). Synchronized automatically when assigned.</p>
</dd></dl>

<dl class="py attribute">
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit f2e1d52

Please sign in to comment.