RectAreaLightHelper.html 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>RectAreaLightHelper - 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="Line.html">Line</a> → </p>
  13. <h1 translate="no">RectAreaLightHelper</h1>
  14. <section>
  15. <header>
  16. <div class="class-description"><p>Creates a visual aid for rect area lights.</p>
  17. <p><code>RectAreaLightHelper</code> must be added as a child of the light.</p></div>
  18. <h2>Code Example</h2>
  19. <div translate="no"><pre><code class="language-js">const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 );
  20. const helper = new RectAreaLightHelper( light );
  21. light.add( helper );
  22. </code></pre></div>
  23. </header>
  24. <article>
  25. <h2 class="subsection-title">Import</h2>
  26. <p><span translate="no">RectAreaLightHelper</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank">Installation#Addons</a>.</p>
  27. <pre><code class="language-js">import { RectAreaLightHelper } from 'three/addons/helpers/RectAreaLightHelper.js';</code></pre>
  28. <div class="container-overview">
  29. <h2>Constructor</h2>
  30. <h3 class="name name-method" id="RectAreaLightHelper" translate="no">new <a href="#RectAreaLightHelper">RectAreaLightHelper</a><span class="signature">( light : <span class="param-type">RectAreaLight</span>, color : <span class="param-type">number | Color | string</span> )</span> </h3>
  31. <div class="method">
  32. <div class="description">
  33. <p>Constructs a new rect area light helper.</p>
  34. </div>
  35. <table class="params">
  36. <tbody>
  37. <tr>
  38. <td class="name"><code>light</code></td>
  39. <td class="description last"><p>The light to visualize.</p></td>
  40. </tr>
  41. <tr>
  42. <td class="name"><code>color</code></td>
  43. <td class="description last"><p>The helper's color.
  44. If this is not the set, the helper will take the color of the light.</p></td>
  45. </tr>
  46. </tbody>
  47. </table>
  48. </div>
  49. </div>
  50. <h2 class="subsection-title">Properties</h2>
  51. <div class="member">
  52. <h3 class="name" id="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string | undefined</span> </h3>
  53. <div class="description">
  54. <p>The helper's color. If <code>undefined</code>, the helper will take the color of the light.</p>
  55. </div>
  56. </div>
  57. <div class="member">
  58. <h3 class="name" id="light" translate="no">.<a href="#light">light</a><span class="type-signature"> : <a href="RectAreaLight.html">RectAreaLight</a></span> </h3>
  59. <div class="description">
  60. <p>The light to visualize.</p>
  61. </div>
  62. </div>
  63. <h2 class="subsection-title">Methods</h2>
  64. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  65. <div class="method">
  66. <div class="description">
  67. <p>Frees the GPU-related resources allocated by this instance. Call this
  68. method whenever this instance is no longer used in your app.</p>
  69. </div>
  70. </div>
  71. <h2 class="subsection-title">Source</h2>
  72. <p>
  73. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/RectAreaLightHelper.js" target="_blank" rel="noopener" translate="no">examples/jsm/helpers/RectAreaLightHelper.js</a>
  74. </p>
  75. </article>
  76. </section>
  77. <script src="../scripts/linenumber.js"></script>
  78. <script src="../scripts/page.js"></script>
  79. </body>
  80. </html>
粤ICP备19079148号