AmbientLight.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <!DOCTYPE html>
  2. <html lang="zh">
  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. 环境光会均匀的照亮场景中的所有物体。<br /><br />
  14. 环境光不能用来投射阴影,因为它没有方向。
  15. </p>
  16. <h2>代码示例</h2>
  17. <code>
  18. const light = new THREE.AmbientLight( 0x404040 ); // soft white light
  19. scene.add( light );
  20. </code>
  21. <h2>构造函数</h2>
  22. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  23. <p>
  24. [page:Integer color] - (参数可选)颜色的rgb数值。缺省值为 0xffffff。<br />
  25. [page:Float intensity] - (参数可选)光照的强度。缺省值为 1。<br /><br />
  26. 创建一个环境光对象。
  27. </p>
  28. <h2>属性</h2>
  29. <p>
  30. 公共属性请查看基类 [page:Light Light]。
  31. </p>
  32. <h3>[property:Boolean castShadow]</h3>
  33. <p>
  34. 这个参数在对象构造的时候就被设置成了 *undefined* 。因为环境光不能投射阴影。
  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>方法</h2>
  41. <p>
  42. 公共方法请查看基类[page:Light Light]。
  43. </p>
  44. <h2>源码</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>