[page:Object3D] → [page:Light] →

[name]

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:

Code Example

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 ); rectLight.add( rectLightHelper );

Examples

[example:webgl_lights_rectarealight WebGL / rectarealight ]

Constructor

[name]( [param:Integer color], [param:Float intensity], [param:Float width], [param:Float height] )

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

Creates a new [name].

Properties

See the base [page:Light Light] class for common properties.

[property:Float height]

The height of the light.

[property:Float intensity]

The light's intensity. Default is `1`.
In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, intensity is the luminance (brightness) of the light measured in nits (cd/m^2).

Changing the intensity will also change the light's power.

[property:Boolean isRectAreaLight]

Read-only flag to check if a given object is of type [name].

[property:Float power]

The light's power.
In [page:WebGLRenderer.physicallyCorrectLights physically correct] mode, power is the luminous power of the light measured in lumens (lm).

Changing the power will also change the light's intensity.

[property:Float width]

The width of the light.

Methods

See the base [page:Light Light] class for common methods.

[method:this copy]( [param:RectAreaLight source] )

Copies value of all the properties from the [page:RectAreaLight source] to this RectAreaLight.

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]