RectAreaLightHelper.html 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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" rel="noopener">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"><a href="RectAreaLight.html">RectAreaLight</a></span>, color : <span class="param-type">number | <a href="Color.html">Color</a> | 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">
  39. <strong>light</strong>
  40. </td>
  41. <td class="description last">
  42. <p>The light to visualize.</p>
  43. </td>
  44. </tr>
  45. <tr>
  46. <td class="name">
  47. <strong>color</strong>
  48. </td>
  49. <td class="description last">
  50. <p>The helper's color.
  51. If this is not the set, the helper will take the color of the light.</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="color" translate="no">.<a href="#color">color</a><span class="type-signature"> : number | <a href="Color.html">Color</a> | string | undefined</span> </h3>
  61. <div class="description">
  62. <p>The helper's color. If <code>undefined</code>, the helper will take the color of the light.</p>
  63. </div>
  64. </div>
  65. <div class="member">
  66. <h3 class="name" id="light" translate="no">.<a href="#light">light</a><span class="type-signature"> : <a href="RectAreaLight.html">RectAreaLight</a></span> </h3>
  67. <div class="description">
  68. <p>The light to visualize.</p>
  69. </div>
  70. </div>
  71. <h2 class="subsection-title">Methods</h2>
  72. <h3 class="name name-method" id="dispose" translate="no">.<a href="#dispose">dispose</a><span class="signature">()</span> </h3>
  73. <div class="method">
  74. <div class="description">
  75. <p>Frees the GPU-related resources allocated by this instance. Call this
  76. method whenever this instance is no longer used in your app.</p>
  77. </div>
  78. </div>
  79. <h2 class="subsection-title">Source</h2>
  80. <p>
  81. <a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/RectAreaLightHelper.js" translate="no" target="_blank" rel="noopener">examples/jsm/helpers/RectAreaLightHelper.js</a>
  82. </p>
  83. </article>
  84. </section>
  85. <script src="../scripts/linenumber.js"></script>
  86. <script src="../scripts/page.js"></script>
  87. </body>
  88. </html>
粤ICP备19079148号