PointLight.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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">
  13. Affects objects using [page:MeshLambertMaterial] or [page:MeshPhongMaterial].
  14. </div>
  15. <h2>Example</h2>
  16. <code>var light = new THREE.PointLight( 0xff0000, 1, 100 );
  17. light.position.set( 50, 50, 50 );
  18. scene.add( light );</code>
  19. <h2>Constructor</h2>
  20. <h3>[name]([page:Integer hex], [page:Float intensity], [page:Number distance])</h3>
  21. <div>
  22. [page:Integer hex] — Numeric value of the RGB component of the color. <br />
  23. [page:Float intensity] — Numeric value of the light's strength/intensity. <br />
  24. [page:Number distance] -- The distance of the light where the intensity is 0. When distance is 0, then the distance is endless.
  25. </div>
  26. <div>
  27. Creates a light at a specific position in the scene. The light shines in all directions (roughly similar to a light bulb.)
  28. </div>
  29. <h2>Properties</h2>
  30. <h3>.[page:Float intensity]</h3>
  31. <div>
  32. Light's intensity.<br />
  33. Default - *1.0*.
  34. </div>
  35. <h3>.[page:Float distance]</h3>
  36. <div>
  37. If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
  38. Default — *0.0*.
  39. </div>
  40. <h2>Methods</h2>
  41. <h2>Source</h2>
  42. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  43. </body>
  44. </html>