RectAreaLight.html 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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/jsm/lights/RectAreaLightUniformsLib.js RectAreaLightUniformsLib] into your scene and call *init()*.</li>
  21. </ul>
  22. </p>
  23. <h2>Code Example</h2>
  24. <code>
  25. var width = 10;
  26. var height = 10;
  27. var intensity = 1;
  28. var rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
  29. rectLight.position.set( 5, 5, 0 );
  30. rectLight.lookAt( 0, 0, 0 );
  31. scene.add( rectLight )
  32. rectLightHelper = new THREE.RectAreaLightHelper( rectLight );
  33. rectLight.add( rectLightHelper );
  34. </code>
  35. <h2>Examples</h2>
  36. <p>
  37. [example:webgl_lights_rectarealight WebGL / rectarealight ]
  38. </p>
  39. <h2>Constructor</h2>
  40. <h3>[name]( [param:Integer color], [param:Float intensity], [param:Float width], [param:Float height] )</h3>
  41. <p>
  42. [page:Integer color] - (optional) hexadecimal color of the light. Default is 0xffffff (white).<br />
  43. [page:Float intensity] - (optional) the light's intensity, or brightness. Default is 1.<br />
  44. [page:Float width] - (optional) width of the light. Default is 10.<br />
  45. [page:Float height] - (optional) height of the light. Default is 10.<br /><br />
  46. Creates a new [name].
  47. </p>
  48. <h2>Properties</h2>
  49. <p>
  50. See the base [page:Light Light] class for common properties.
  51. </p>
  52. <h2>Methods</h2>
  53. <p>
  54. See the base [page:Light Light] class for common methods.
  55. </p>
  56. <h3>[method:RectAreaLight copy]( [param:RectAreaLight source] )</h3>
  57. <p>
  58. Copies value of all the properties from the [page:RectAreaLight source] to this
  59. RectAreaLight.
  60. </p>
  61. <p>
  62. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  63. </p>
  64. </body>
  65. </html>