PointLight.html 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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:Float color], [page:Float intensity], [page:Float distance] )</h3>
  21. <h2>Properties</h2>
  22. <h3>.[page:Vector3 position]</h3>
  23. <div>
  24. Light's position.<br />
  25. Default — *new THREE.Vector3()*.
  26. </div>
  27. <h3>.[page:Float intensity]</h3>
  28. <div>
  29. Light's intensity.<br />
  30. Default - *1.0*.
  31. </div>
  32. <h3>.[page:Float distance]</h3>
  33. <div>
  34. If non-zero, light will attenuate linearly from maximum intensity at light *position* down to zero at *distance*.<br />
  35. Default — *0.0*.
  36. </div>
  37. <h2>Source</h2>
  38. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  39. </body>
  40. </html>