AmbientLight.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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>Constructor</h2>
  22. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  23. <p>
  24. [page:Integer color] - (optional) Numeric value of the RGB component of
  25. the color. Default is 0xffffff.<br />
  26. [page:Float intensity] - (optional) Numeric value of the light's
  27. strength/intensity. Default is `1`.<br /><br />
  28. Creates a new [name].
  29. </p>
  30. <h2>Properties</h2>
  31. <p>See the base [page:Light Light] class for common properties.</p>
  32. <h3>[property:Boolean isAmbientLight]</h3>
  33. <p>Read-only flag to check if a given object is of type [name].</p>
  34. <h2>Methods</h2>
  35. <p>See the base [page:Light Light] class for common methods.</p>
  36. <h2>Source</h2>
  37. <p>
  38. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  39. </p>
  40. </body>
  41. </html>