平面光光源从一个矩形平面上均匀地发射光线。这种光源可以用来模拟像明亮的窗户或者条状灯光光源。
注意事项:
const width = 10;
const height = 10;
const intensity = 1;
const rectLight = new THREE.RectAreaLight( 0xffffff, intensity, width, height );
rectLight.position.set( 5, 5, 0 );
rectLight.lookAt( 0, 0, 0 );
scene.add( rectLight )
const rectLightHelper = new RectAreaLightHelper( rectLight );
scene.add( rectLightHelper );
[example:webgl_lights_rectarealight WebGL / rectarealight ]
[page:Color color] -(可选)一个表示颜色的 Color 的实例、字符串或数字,默认为一个白色(0xffffff)的 [page:Color Color] 对象。
[page:Float intensity] -(可选)光源强度/亮度 。默认值为 1。
[page:Float width] -(可选)光源宽度。默认值为 10。
[page:Float height] -(可选)光源高度。默认值为 10。
创建一个新的平面光。
公共属性请查看基类[page:Light Light]。
光源高度。
光源的强度。默认值为 `1`。
单位是尼特(cd/m^2)。
改变该值会影响到 `power` 的值。
只读,用于检查对象的类型是否为 [name]。
光源的功率。
单位为流明(lm)。
改变该值会影响到 `intensity` 的值。
光源宽度。
公共方法请查看基类 [page:Light Light]。
将所有属性的值从源 [page:RectAreaLight source] 复制到此平面光光源对象。
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]