RectAreaLight 平面光光源

—> Light —> Object3D

function RectAreaLight( color, intensity, width, height ) { } var light = new THREE.RectAreaLight(0xffff00, 1, 20, 20); light.position.set(0,0,-10); scene.add(light); var rectLightMesh = new THREE.Mesh( new THREE.PlaneBufferGeometry(), new THREE.MeshBasicMaterial() ); rectLightMesh.scale.x = light.width; rectLightMesh.scale.y = light.height; light.add( rectLightMesh ); var rectLightMeshBack = new THREE.Mesh( new THREE.PlaneBufferGeometry(), new THREE.MeshBasicMaterial( { color: 0x080808 } ) ); rectLightMeshBack.rotation.y = Math.PI; rectLightMesh.add( rectLightMeshBack );

Attributes

type : String

Default value : 'RectAreaLight'
Description : 类型.

isRectAreaLight : Boolean

Default value : true (只读)
Description : 类型是否为RectAreaLight.

width : Float

Default value : 10
Description : 宽度.

height : Float

Default value : 10
Description : 高度.