AreaLight.html 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="../../list.js"></script>
  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:Light] &rarr;
  11. <h1>[name]</h1>
  12. <div class="desc">This illuminates the scene from a complete surface. This light only works in the [page:WebGLDeferredRenderer deferredrenderer]. </div>
  13. <h2>Example</h2>
  14. <h2>Example</h2>
  15. <div>[example:webgldeferred_arealights arealights ]</div>
  16. <code>areaLight1 = new THREE.AreaLight( 0xffffff, 1 );
  17. areaLight1.position.set( 0.0001, 10.0001, -18.5001 );
  18. areaLight1.rotation.set( -0.74719, 0.0001, 0.0001 );
  19. areaLight1.width = 10;
  20. areaLight1.height = 1;
  21. scene.add( areaLight1 );</code>
  22. <h2>Constructor</h2>
  23. <h3>[name]( [page:Integer hex], [page:Float intensity])</h3>
  24. <div>
  25. [page:Integer hex] — Numeric value of the RGB component of the color.<br />
  26. [page:Float intensity] — Numeric value of the light's strength/intensity.
  27. </div>
  28. <div>
  29. This creates a arealight with color.
  30. </div>
  31. <h2>Properties</h2>
  32. <h3>[property:Vector3 right]</h3>
  33. <div>
  34. Sets or gets an unit vector that indicates the right side of the light. This is calculated in local space.
  35. </div>
  36. <h3>[property:Vector3 normal]</h3>
  37. <div>
  38. Sets or gets an unit vectorSets or gets an unit vector that indicates the right side of the light. This is calculated in local space.
  39. </div>
  40. <h3>[property:number height]</h3>
  41. <div>
  42. Sets or gets the height of the illuminating plane.
  43. </div>
  44. <h3>[property:number width]</h3>
  45. <div>
  46. Sets or gets the width of the illuminating plane.
  47. </div>
  48. <h3>[property:Float intensity]</h3>
  49. <div>
  50. Light's intensity.<br />
  51. Default — *1.0*.
  52. </div>
  53. <h3>[property:number constantAttenuation]</h3>
  54. <div>
  55. Sets or gets the attention of the light in constant space. This is independant of the distance of the light.
  56. </div>
  57. <h3>[property:number linearAttenuation]</h3>
  58. <div>
  59. Sets or gets the attention of the light in linear space. This increases the attenuation linearly with the distance from the light.
  60. </div>
  61. <h3>[property:number quadraticAttenuation]</h3>
  62. <div>
  63. Sets or gets the attention of the light in linear space. This increases the attenuation quadratic with the distance from the light.
  64. </div>
  65. <h2>Source</h2>
  66. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  67. </body>
  68. </html>