AmbientLight.html 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. This light globally illuminates all objects in the scene equally.<br /><br />
  15. This light cannot be used to cast shadows as it does not have a direction.
  16. </p>
  17. <h2>Code Example</h2>
  18. <code>
  19. var light = new THREE.AmbientLight( 0x404040 ); // soft white light
  20. scene.add( light );
  21. </code>
  22. <h2>Examples</h2>
  23. <p>
  24. [example:webgl_animation_cloth animation / cloth ]<br />
  25. [example:webgl_animation_skinning_blending animation / skinning / blending ]
  26. </p>
  27. <h2>Constructor</h2>
  28. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  29. <p>
  30. [page:Integer color] - (optional) Numeric value of the RGB component of the color. Default is 0xffffff.<br />
  31. [page:Float intensity] - (optional) Numeric value of the light's strength/intensity. Default is 1.<br /><br />
  32. Creates a new [name].
  33. </p>
  34. <h2>Properties</h2>
  35. <p>
  36. See the base [page:Light Light] class for common properties.
  37. </p>
  38. <h3>[property:Boolean castShadow]</h3>
  39. <p>
  40. This is set to *undefined* in the constructor as ambient lights cannot cast shadows.
  41. </p>
  42. <h2>Methods</h2>
  43. <p>
  44. See the base [page:Light Light] class for common methods.
  45. </p>
  46. <h2>Source</h2>
  47. <p>
  48. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  49. </p>
  50. </body>
  51. </html>