RectAreaLight.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr; [page:Light] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. RectAreaLight emits light uniformly across the face a rectangular plane. This light type can be
  15. used to simulate light sources such as bright windows or strip lighting.<br /><br />
  16. Important Notes:
  17. <ul>
  18. <li>There is no shadow support.</li>
  19. <li>Only [page:MeshStandardMaterial MeshStandardMaterial] and [page:MeshPhysicalMaterial MeshPhysicalMaterial] are supported.</li>
  20. <li>You have to include [link:https://threejs.org/examples/js/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene.</li>
  21. </ul>
  22. </p>
  23. <h2>Examples</h2>
  24. <p>
  25. [example:webgl_lights_rectarealight WebGL / rectarealight ]
  26. <code>
  27. var width = 10;
  28. var height = 10;
  29. var intensity = 1;
  30. var rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
  31. rectLight.position.set( 5, 5, 0 );
  32. rectLight.lookAt( 0, 0, 0 );
  33. scene.add( rectLight )
  34. rectLightHelper = new THREE.RectAreaLightHelper( rectLight );
  35. scene.add( rectLightHelper );
  36. </code>
  37. </p>
  38. <h2>Constructor</h2>
  39. <h3>[name]( [param:Integer color], [param:Float intensity], [param:Float width], [param:Float height] )</h3>
  40. <p>
  41. [page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
  42. [page:Float intensity] - (optional) the light's intensity, or brightness. Default is 1.<br />
  43. [page:Float width] - (optional) width of the light. Default is 10.<br />
  44. [page:Float height] - (optional) height of the light. Default is 10.<br /><br />
  45. Creates a new [name].
  46. </p>
  47. <h2>Properties</h2>
  48. <p>
  49. See the base [page:Light Light] class for common properties.
  50. </p>
  51. <h3>[property:Boolean isRectAreaLight]</h3>
  52. <p>
  53. Used to check whether this or derived classes are RectAreaLights. Default is *true*.<br /><br />
  54. You should not change this, as it used internally for optimisation.
  55. </p>
  56. <h2>Methods</h2>
  57. <p>
  58. See the base [page:Light Light] class for common methods.
  59. </p>
  60. <h3>[method:RectAreaLight copy]( [param:RectAreaLight source] )</h3>
  61. <p>
  62. Copies value of all the properties from the [page:RectAreaLight source] to this
  63. RectAreaLight.
  64. </p>
  65. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  66. </body>
  67. </html>