LightProbeHelper.html 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>LightProbeHelper - 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> → </p>
  13. <h1 translate="no">LightProbeHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Renders a sphere to visualize a light probe in the scene.</p>
  17. <p>This helper can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>.
  18. When using <a href="WebGPURenderer.html">WebGPURenderer</a>, import from <code>LightProbeHelperGPU.js</code>.</p></div>
  19. <h2>Code Example</h2>
  20. <div translate="no"><pre><code class="language-js">const helper = new LightProbeHelper( lightProbe );
  21. scene.add( helper );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <h2 class="subsection-title">Import</h2>
  26. <p><span translate="no">LightProbeHelper</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 { LightProbeHelper } from 'three/addons/helpers/LightProbeHelper.js';</code></pre>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="LightProbeHelper" translate="no">new <a href="#LightProbeHelper">LightProbeHelper</a><span class="signature">( lightProbe : <span class="param-type"><a href="LightProbe.html">LightProbe</a></span>, size : <span class="param-type">number</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new light probe helper.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name">
  39. <strong>lightProbe</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The light probe to visualize.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong>size</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The size of the helper.</p>
  51. <p>Default is <code>1</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="lightProbe" translate="no">.<a href="#lightProbe">lightProbe</a><span class="type-signature"> : <a href="LightProbe.html">LightProbe</a></span> </h3>
  61. <div class="description">
  62. <p>The light probe to visualize.</p>
  63. </div>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="size" translate="no">.<a href="#size">size</a><span class="type-signature"> : number</span> </h3>
  67. <div class="description">
  68. <p>The size of the helper.</p>
  69. <p>Default is <code>1</code>.</p>
  70. </div>
  71. </div>
  72. <h2 class="subsection-title">Methods</h2>
  73. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  74. <div class="method">
  75. <div class="description">
  76. <p>Frees the GPU-related resources allocated by this instance. Call this
  77. method whenever this instance is no longer used in your app.</p>
  78. </div>
  79. </div>
  80. <h2 class="subsection-title">Source</h2>
  81. <p>
  82. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/LightProbeHelper.js" translate="no" target="_blank" rel="noopener">examples/jsm/helpers/LightProbeHelper.js</a>
  83. </p>
  84. </article>
  85. </section>
  86. <script src="../scripts/linenumber.js"></script>
  87. <script src="../scripts/page.js"></script>
  88. </body>
  89. </html>
粤ICP备19079148号