2
0

AmbientLight.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. <p>
  19. [example:canvas_camera_orthographic camera / orthographic ]<br />
  20. [example:canvas_interactive_voxelpainter interactive / voxelpainter ]<br />
  21. [example:canvas_materials materials ]<br />
  22. [example:canvas_sandbox sandbox ]<br />
  23. [example:webgl_animation_cloth animation / cloth ]<br />
  24. [example:webgl_animation_skinning_blending animation / skinning / blending ]
  25. </p>
  26. <code>var light = new THREE.AmbientLight( 0x404040 ); // soft white light
  27. scene.add( light );</code>
  28. <h2>构造函数</h2>
  29. <h3>[name]( [param:Integer color], [param:Float intensity] )</h3>
  30. <p>
  31. [page:Integer color] - (参数可选)颜色的rgb数值。缺省值为 0xffffff。<br />
  32. [page:Float intensity] - (参数可选)光照的强度。缺省值为 1。<br /><br />
  33. 创建一个环境光对象。
  34. </p>
  35. <h2>属性</h2>
  36. <p>
  37. 公共属性请查看基类 [page:Light Light]。
  38. </p>
  39. <h3>[property:Boolean castShadow]</h3>
  40. <p>
  41. 这个参数在对象构造的时候就被设置成了 *undefined* 。因为环境光不能投射阴影。
  42. </p>
  43. <h3>[property:Boolean isAmbientLight]</h3>
  44. <p>
  45. 用来校验这个类或者派生类是不是环境光.默认是 *true*。<br /><br />
  46. 不应该去改变这个变量,因为内部使用这个变量做了些优化的工作。
  47. </p>
  48. <h2>方法</h2>
  49. <p>
  50. 公共方法请查看基类[page:Light Light]。
  51. </p>
  52. <h2>源码</h2>
  53. [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
  54. </body>
  55. </html>