Object3DLight

RectAreaLight

RectAreaLight emits light uniformly across the face a rectangular plane. This light type can be used to simulate light sources such as bright windows or strip lighting.

Important Notes:

Examples

WebGL / rectarealight var width = 10; var height = 10; var intensity = 1; var rectLight = new v3d.RectAreaLight(0xffffff, intensity, width, height); rectLight.position.set(5, 5, 0); rectLight.lookAt(0, 0, 0); scene.add(rectLight) rectLightHelper = new v3d.RectAreaLightHelper(rectLight); rectLight.add(rectLightHelper);

Constructor

RectAreaLight(color : Integer, intensity : Float, width : Float, height : Float)

color - (optional) hexadecimal color of the light. Default is 0xffffff (white).
intensity - (optional) the light's intensity, or brightness. Default is 1.
width - (optional) width of the light. Default is 10.
height - (optional) height of the light. Default is 10.

Creates a new RectAreaLight.

Properties

See the base Light class for common properties.

Methods

See the base Light class for common methods.

.copy (source : RectAreaLight) : RectAreaLight

Copies value of all the properties from the source to this RectAreaLight.

src/lights/RectAreaLight.js