AmbientLight.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  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. <p class="desc">
  13. This light globally illuminates all objects in the scene equally.<br /><br />
  14. This light cannot be used to cast shadows as it does not have a direction.
  15. </p>
  16. <h2>Code Example</h2>
  17. <code>
  18. const light = new THREE.AmbientLight( 0x404040 ); // soft white light
  19. scene.add( light );
  20. </code>
  21. <h2>Examples</h2>
  22. <p>
  23. [example:webgl_animation_cloth animation / cloth ]<br />
  24. [example:webgl_animation_skinning_blending animation / skinning / blending ]
  25. </p>
  26. <h2>Constructor</h2>
  27. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  28. <p>
  29. [page:Integer color] - (optional) Numeric value of the RGB component of the color. Default is 0xffffff.<br />
  30. [page:Float intensity] - (optional) Numeric value of the light's strength/intensity. Default is 1.<br /><br />
  31. Creates a new [name].
  32. </p>
  33. <h2>Properties</h2>
  34. <p>
  35. See the base [page:Light Light] class for common properties.
  36. </p>
  37. <h2>Methods</h2>
  38. <p>
  39. See the base [page:Light Light] class for common methods.
  40. </p>
  41. <h2>Source</h2>
  42. <p>
  43. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  44. </p>
  45. </body>
  46. </html>