LightProbeGridHelper.html 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LightProbeGridHelper - Three.js Docs</title>
  6. <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
  7. <script src="../scripts/highlight.min.js"></script>
  8. <link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
  9. <link type="text/css" rel="stylesheet" href="../styles/page.css">
  10. </head>
  11. <body>
  12. <p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → <a href="InstancedMesh.html">InstancedMesh</a> → </p>
  13. <h1 translate="no">LightProbeGridHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Visualizes an <a href="LightProbeGrid.html">LightProbeGrid</a> by rendering a sphere at each
  17. probe position, shaded with the probe's L1 spherical harmonics.</p>
  18. <p>Uses a single <code>InstancedMesh</code> draw call for all probes.</p></div>
  19. <h2>Code Example</h2>
  20. <div translate="no"><pre><code class="language-js">const helper = new LightProbeGridHelper( probes );
  21. scene.add( helper );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <h2 class="subsection-title">Import</h2>
  26. <p><span translate="no">LightProbeGridHelper</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
  27. <pre><code class="language-js">import { LightProbeGridHelper } from 'three/addons/helpers/LightProbeGridHelper.js';</code></pre>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="LightProbeGridHelper" translate="no">new <a href="#LightProbeGridHelper">LightProbeGridHelper</a><span class="signature">( probes : <span class="param-type"><a href="LightProbeGrid.html">LightProbeGrid</a></span>, sphereSize : <span class="param-type">number</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new irradiance probe grid helper.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong translate="no">probes</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The probe grid to visualize.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong translate="no">sphereSize</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The radius of each probe sphere.</p>
  51. <p>Default is <code>0.12</code>.</p>
  52. </td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. <h2 class="subsection-title">Properties</h2>
  59. <div class="member">
  60. <h3 class="name" id="probes" translate="no">.<a href="#probes">probes</a><span class="type-signature"> : <a href="LightProbeGrid.html">LightProbeGrid</a></span> </h3>
  61. <div class="description">
  62. <p>The probe grid to visualize.</p>
  63. </div>
  64. </div>
  65. <h2 class="subsection-title">Methods</h2>
  66. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  67. <div class="method">
  68. <div class="description">
  69. <p>Frees the GPU-related resources allocated by this instance. Call this
  70. method whenever this instance is no longer used in your app.</p>
  71. </div>
  72. <dl class="details">
  73. <dt class="tag-overrides"><strong>Overrides:</strong> <a href="InstancedMesh.html#dispose">InstancedMesh#dispose</a></dt>
  74. </dl>
  75. </div>
  76. <h3 class="name name-method" id="update" translate="no">.<a href="#update">update</a><span class="signature">()</span> </h3>
  77. <div class="method">
  78. <div class="description">
  79. <p>Rebuilds instance matrices and UVW attributes from the current probe grid.
  80. Call this after changing <code>probes</code> or after re-baking.</p>
  81. </div>
  82. </div>
  83. <h2 class="subsection-title">Source</h2>
  84. <p>
  85. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/LightProbeGridHelper.js" translate="no" target="_blank" rel="noopener">examples/jsm/helpers/LightProbeGridHelper.js</a>
  86. </p>
  87. </article>
  88. </section>
  89. <script src="../scripts/linenumber.js"></script>
  90. <script src="../scripts/page.js"></script>
  91. </body>
  92. </html>
粤ICP备19079148号