[page:Object3D] →

[name]

Helper object to assist with visualizing a [page:DirectionalLight]'s effect on the scene.

Example

var light = new THREE.DirectionalLight( 0xFFFFFF ); var helper = new THREE.DirectionalLightHelper( light ); scene.add( helper );

Constructor

[name]( [page:DirectionalLight light], [page:Number size] )

[page:DirectionalLight light]-- Light to visualize.
[page:Number size] -- (optional) dimensions of the plane. Default is *1*.

Creates a line and plane to visualize the light's position and direction.

Properties

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

[property:Line lightPlane]

Contains the line mesh showing the location of the directional light.

[property:DirectionalLight light]

Contains the directionalLight.

[property:object matrix]

Reference to the [page:Object3D.matrixWorld light.matrixWorld].

[property:object matrixAutoUpdate]

See [page:Object3D.matrixAutoUpdate]. Set to *false* here as the helper is using the light's [page:Object3D.matrixWorld matrixWorld].

Methods

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

.[method:null dispose]()

Dispose of the directionalLightHelper.

.[method:null update]()

Updates the helper to match the position and direction of the [page:.light].

Source

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