Skip to content

Commit

Permalink
deploy: b3c9c53
Browse files Browse the repository at this point in the history
  • Loading branch information
brentyi committed Sep 11, 2024
1 parent 9467350 commit c682f56
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 22 deletions.
Binary file modified latest/.doctrees/environment.pickle
Binary file not shown.
Binary file modified latest/.doctrees/examples/26_lighting.doctree
Binary file not shown.
11 changes: 6 additions & 5 deletions latest/_sources/examples/26_lighting.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Visualize a mesh under different lighting conditions. To get the demo data, see
)
# adding controls to custom lights in the scene
server.scene.add_transform_controls("/control0")
server.scene.add_transform_controls("/control0", position=(0.0, 10.0, 5.0))
server.scene.add_label("/control0/label", "Directional")
server.scene.add_transform_controls("/control1")
server.scene.add_transform_controls("/control1", position=(0.0, -5.0, 5.0))
server.scene.add_label("/control1/label", "Point")
directional_light = server.scene.add_light_directional(
Expand All @@ -62,7 +62,7 @@ Visualize a mesh under different lighting conditions. To get the demo data, see
point_light = server.scene.add_light_point(
name="/control1/point_light",
color=(192, 255, 238),
intensity=3.0,
intensity=30.0,
)
# Create default light toggle.
Expand Down Expand Up @@ -97,7 +97,7 @@ Visualize a mesh under different lighting conditions. To get the demo data, see
gui_point_intensity = server.gui.add_slider(
"Intensity",
min=0.0,
max=20.0,
max=200.0,
step=0.01,
initial_value=point_light.intensity,
)
Expand Down Expand Up @@ -149,7 +149,7 @@ Visualize a mesh under different lighting conditions. To get the demo data, see
min=0.0,
max=1.0,
step=0.01,
initial_value=1.0,
initial_value=0.1,
)
def update_environment_map(_) -> None:
Expand All @@ -161,6 +161,7 @@ Visualize a mesh under different lighting conditions. To get the demo data, see
environment_intensity=gui_env_intensity.value,
)
update_environment_map(None)
gui_env_preset.on_update(update_environment_map)
gui_background.on_update(update_environment_map)
gui_bg_blurriness.on_update(update_environment_map)
Expand Down
33 changes: 17 additions & 16 deletions latest/examples/26_lighting/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,9 @@ <h1>Lights<a class="headerlink" href="#lights" title="Link to this heading">#</a
<span class="linenos"> 35</span> <span class="p">)</span>
<span class="linenos"> 36</span>
<span class="linenos"> 37</span> <span class="c1"># adding controls to custom lights in the scene</span>
<span class="linenos"> 38</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_transform_controls</span><span class="p">(</span><span class="s2">&quot;/control0&quot;</span><span class="p">)</span>
<span class="linenos"> 38</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_transform_controls</span><span class="p">(</span><span class="s2">&quot;/control0&quot;</span><span class="p">,</span> <span class="n">position</span><span class="o">=</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="mf">10.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">))</span>
<span class="linenos"> 39</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_label</span><span class="p">(</span><span class="s2">&quot;/control0/label&quot;</span><span class="p">,</span> <span class="s2">&quot;Directional&quot;</span><span class="p">)</span>
<span class="linenos"> 40</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_transform_controls</span><span class="p">(</span><span class="s2">&quot;/control1&quot;</span><span class="p">)</span>
<span class="linenos"> 40</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_transform_controls</span><span class="p">(</span><span class="s2">&quot;/control1&quot;</span><span class="p">,</span> <span class="n">position</span><span class="o">=</span><span class="p">(</span><span class="mf">0.0</span><span class="p">,</span> <span class="o">-</span><span class="mf">5.0</span><span class="p">,</span> <span class="mf">5.0</span><span class="p">))</span>
<span class="linenos"> 41</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_label</span><span class="p">(</span><span class="s2">&quot;/control1/label&quot;</span><span class="p">,</span> <span class="s2">&quot;Point&quot;</span><span class="p">)</span>
<span class="linenos"> 42</span>
<span class="linenos"> 43</span> <span class="n">directional_light</span> <span class="o">=</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_light_directional</span><span class="p">(</span>
Expand All @@ -390,7 +390,7 @@ <h1>Lights<a class="headerlink" href="#lights" title="Link to this heading">#</a
<span class="linenos"> 47</span> <span class="n">point_light</span> <span class="o">=</span> <span class="n">server</span><span class="o">.</span><span class="n">scene</span><span class="o">.</span><span class="n">add_light_point</span><span class="p">(</span>
<span class="linenos"> 48</span> <span class="n">name</span><span class="o">=</span><span class="s2">&quot;/control1/point_light&quot;</span><span class="p">,</span>
<span class="linenos"> 49</span> <span class="n">color</span><span class="o">=</span><span class="p">(</span><span class="mi">192</span><span class="p">,</span> <span class="mi">255</span><span class="p">,</span> <span class="mi">238</span><span class="p">),</span>
<span class="linenos"> 50</span> <span class="n">intensity</span><span class="o">=</span><span class="mf">3.0</span><span class="p">,</span>
<span class="linenos"> 50</span> <span class="n">intensity</span><span class="o">=</span><span class="mf">30.0</span><span class="p">,</span>
<span class="linenos"> 51</span> <span class="p">)</span>
<span class="linenos"> 52</span>
<span class="linenos"> 53</span> <span class="c1"># Create default light toggle.</span>
Expand Down Expand Up @@ -425,7 +425,7 @@ <h1>Lights<a class="headerlink" href="#lights" title="Link to this heading">#</a
<span class="linenos"> 82</span> <span class="n">gui_point_intensity</span> <span class="o">=</span> <span class="n">server</span><span class="o">.</span><span class="n">gui</span><span class="o">.</span><span class="n">add_slider</span><span class="p">(</span>
<span class="linenos"> 83</span> <span class="s2">&quot;Intensity&quot;</span><span class="p">,</span>
<span class="linenos"> 84</span> <span class="nb">min</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
<span class="linenos"> 85</span> <span class="nb">max</span><span class="o">=</span><span class="mf">20.0</span><span class="p">,</span>
<span class="linenos"> 85</span> <span class="nb">max</span><span class="o">=</span><span class="mf">200.0</span><span class="p">,</span>
<span class="linenos"> 86</span> <span class="n">step</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span>
<span class="linenos"> 87</span> <span class="n">initial_value</span><span class="o">=</span><span class="n">point_light</span><span class="o">.</span><span class="n">intensity</span><span class="p">,</span>
<span class="linenos"> 88</span> <span class="p">)</span>
Expand Down Expand Up @@ -477,7 +477,7 @@ <h1>Lights<a class="headerlink" href="#lights" title="Link to this heading">#</a
<span class="linenos">134</span> <span class="nb">min</span><span class="o">=</span><span class="mf">0.0</span><span class="p">,</span>
<span class="linenos">135</span> <span class="nb">max</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span>
<span class="linenos">136</span> <span class="n">step</span><span class="o">=</span><span class="mf">0.01</span><span class="p">,</span>
<span class="linenos">137</span> <span class="n">initial_value</span><span class="o">=</span><span class="mf">1.0</span><span class="p">,</span>
<span class="linenos">137</span> <span class="n">initial_value</span><span class="o">=</span><span class="mf">0.1</span><span class="p">,</span>
<span class="linenos">138</span> <span class="p">)</span>
<span class="linenos">139</span>
<span class="linenos">140</span> <span class="k">def</span> <span class="nf">update_environment_map</span><span class="p">(</span><span class="n">_</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kc">None</span><span class="p">:</span>
Expand All @@ -489,18 +489,19 @@ <h1>Lights<a class="headerlink" href="#lights" title="Link to this heading">#</a
<span class="linenos">146</span> <span class="n">environment_intensity</span><span class="o">=</span><span class="n">gui_env_intensity</span><span class="o">.</span><span class="n">value</span><span class="p">,</span>
<span class="linenos">147</span> <span class="p">)</span>
<span class="linenos">148</span>
<span class="linenos">149</span> <span class="n">gui_env_preset</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">150</span> <span class="n">gui_background</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">151</span> <span class="n">gui_bg_blurriness</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">152</span> <span class="n">gui_bg_intensity</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">153</span> <span class="n">gui_env_intensity</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">154</span>
<span class="linenos">155</span> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="linenos">156</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">10.0</span><span class="p">)</span>
<span class="linenos">157</span>
<span class="linenos">149</span> <span class="n">update_environment_map</span><span class="p">(</span><span class="kc">None</span><span class="p">)</span>
<span class="linenos">150</span> <span class="n">gui_env_preset</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">151</span> <span class="n">gui_background</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">152</span> <span class="n">gui_bg_blurriness</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">153</span> <span class="n">gui_bg_intensity</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">154</span> <span class="n">gui_env_intensity</span><span class="o">.</span><span class="n">on_update</span><span class="p">(</span><span class="n">update_environment_map</span><span class="p">)</span>
<span class="linenos">155</span>
<span class="linenos">156</span> <span class="k">while</span> <span class="kc">True</span><span class="p">:</span>
<span class="linenos">157</span> <span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="mf">10.0</span><span class="p">)</span>
<span class="linenos">158</span>
<span class="linenos">159</span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="linenos">160</span> <span class="n">main</span><span class="p">()</span>
<span class="linenos">159</span>
<span class="linenos">160</span><span class="k">if</span> <span class="vm">__name__</span> <span class="o">==</span> <span class="s2">&quot;__main__&quot;</span><span class="p">:</span>
<span class="linenos">161</span> <span class="n">main</span><span class="p">()</span>
</pre></div>
</div>
</section>
Expand Down
2 changes: 1 addition & 1 deletion latest/searchindex.js

Large diffs are not rendered by default.

0 comments on commit c682f56

Please sign in to comment.