three.js源码翻译-RectAreaLight.js
说明
PointLight平面光光源从一个矩形平面上均匀地发射光线。这种光源可以用来模拟像明亮的窗户或者条状灯光光源。
接受四个参数分别为光的颜色,强度,光的宽和高。这是一个新出的光源,需要用到pbr渲染的材质,否则没有灯光效果。
源码位置及翻译
源码位置
src/light/RectAreaLight.js
源码翻译
/**
* 平面光光源从一个矩形平面上均匀地发射光线。这种光源可以用来模拟像明亮的窗户或者条状灯光光源。
* 接受四个参数分别为光的颜色,强度,光的宽和高
* 不支持阴影。 只支持 MeshStandardMaterial 和 MeshPhysicalMaterial 两种材质。
* 你必须在你的场景中加入 RectAreaLightUniformsLib ,并调用init()。
* @param {Color} color 光源颜色
* @param {Number} intensity 光源强度
* @param {Number} width 光源的宽
* @param {Number} height 光源的高
*/
function RectAreaLight( color, intensity, width, height ) {
Light.call( this, color, intensity );
this.type