AmbientLight.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!DOCTYPE html>
  2. <html lang="zh">
  3. <head>
  4. <meta charset="utf-8" />
  5. <base href="../../../" />
  6. <script src="list.js"></script>
  7. <script src="page.js"></script>
  8. <link type="text/css" rel="stylesheet" href="page.css" />
  9. </head>
  10. <body>
  11. [page:Object3D] &rarr; [page:Light] &rarr;
  12. <h1>[name]</h1>
  13. <p class="desc">
  14. 环境光会均匀的照亮场景中的所有物体。<br /><br />
  15. 环境光不能用来投射阴影,因为它没有方向。
  16. </p>
  17. <h2>代码示例</h2>
  18. <code>
  19. var light = new THREE.AmbientLight( 0x404040 ); // soft white light
  20. scene.add( light );
  21. </code>
  22. <h2>例子</h2>
  23. <p>
  24. [example:webgl_animation_cloth animation / cloth ]<br />
  25. [example:webgl_animation_skinning_blending animation / skinning / blending ]
  26. </p>
  27. <h2>构造函数</h2>
  28. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  29. <p>
  30. [page:Integer color] - (参数可选)颜色的rgb数值。缺省值为 0xffffff。<br />
  31. [page:Float intensity] - (参数可选)光照的强度。缺省值为 1。<br /><br />
  32. 创建一个环境光对象。
  33. </p>
  34. <h2>属性</h2>
  35. <p>
  36. 公共属性请查看基类 [page:Light Light]。
  37. </p>
  38. <h3>[property:Boolean castShadow]</h3>
  39. <p>
  40. 这个参数在对象构造的时候就被设置成了 *undefined* 。因为环境光不能投射阴影。
  41. </p>
  42. <h2>方法</h2>
  43. <p>
  44. 公共方法请查看基类[page:Light Light]。
  45. </p>
  46. <h2>源码</h2>
  47. <p>
  48. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  49. </p>
  50. </body>
  51. </html>