AmbientLight.html 1.4 KB

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