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