[page:Object3D] → [page:Light] →

[name]

环境光会均匀的照亮场景中的所有物体。

环境光不能用来投射阴影,因为它没有方向。

代码示例

const light = new THREE.AmbientLight( 0x404040 ); // soft white light scene.add( light );

例子

[example:webgl_animation_cloth animation / cloth ]
[example:webgl_animation_skinning_blending animation / skinning / blending ]

构造函数

[name]( [param:Integer color], [param:Float intensity] )

[page:Integer color] - (参数可选)颜色的rgb数值。缺省值为 0xffffff。
[page:Float intensity] - (参数可选)光照的强度。缺省值为 1。

创建一个环境光对象。

属性

公共属性请查看基类 [page:Light Light]。

[property:Boolean castShadow]

这个参数在对象构造的时候就被设置成了 *undefined* 。因为环境光不能投射阴影。

方法

公共方法请查看基类[page:Light Light]。

源码

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]