AmbientLight.html 1.5 KB

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