1
0

RectAreaLightHelper.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="page.js"></script>
  7. <link type="text/css" rel="stylesheet" href="page.css" />
  8. </head>
  9. <body>
  10. [page:Object3D] &rarr; [page:Line] &rarr;
  11. <h1>[name]</h1>
  12. <p class="desc">
  13. Creates a visual aid for a [page:RectAreaLight].
  14. </p>
  15. <h2>Import</h2>
  16. <p>
  17. [name] is an add-on, and must be imported explicitly.
  18. See [link:#manual/introduction/Installation Installation / Addons].
  19. </p>
  20. <code>
  21. import { RectAreaLightHelper } from 'three/addons/helpers/RectAreaLightHelper.js';
  22. </code>
  23. <h2>Code Example</h2>
  24. <code>
  25. const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 );
  26. const helper = new RectAreaLightHelper( light );
  27. light.add( helper ); // helper must be added as a child of the light
  28. </code>
  29. <h2>Constructor</h2>
  30. <h3>[name]( [param:RectAreaLight light], [param:Hex color] )</h3>
  31. <p>
  32. [page:RectAreaLight light] -- The light being visualized.<br /><br />
  33. [page:Hex color] -- (optional) if this is not the set the helper will take the color of the light.
  34. </p>
  35. <h2>Properties</h2>
  36. <p>See the base [page:Object3D] class for common properties.</p>
  37. <h3>[property:RectAreaLight light]</h3>
  38. <p>Reference to the RectAreaLight being visualized.</p>
  39. <h3>[property:hex color]</h3>
  40. <p>
  41. The color parameter passed in the constructor. Default is `undefined`. If this is changed, the helper's color will update
  42. the next time [page:.update update] is called.
  43. </p>
  44. <h2>Methods</h2>
  45. <p>See the base [page:Line] class for common methods.</p>
  46. <h3>[method:undefined dispose]()</h3>
  47. <p>
  48. Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
  49. </p>
  50. <h2>Source</h2>
  51. <p>
  52. [link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/helpers/RectAreaLightHelper.js examples/jsm/helpers/RectAreaLightHelper.js]
  53. </p>
  54. </body>
  55. </html>