AreaLight.html 2.5 KB

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