[page:Object3D] →


Helper object to assist with visualizing a [page:DirectionalLight]'s effect on the scene. This consists of plane and a line representing the light's position and direction.

Code Example

const light = new THREE.DirectionalLight( 0xFFFFFF ); const helper = new THREE.DirectionalLightHelper( light, 5 ); scene.add( helper );


[name]( [param:DirectionalLight light], [param:Number size], [param:Hex color] )

[page:DirectionalLight light]-- The light to be visualized.

[page:Number size] -- (optional) dimensions of the plane. Default is *1*.

[page:Hex color] -- (optional) if this is not the set the helper will take the color of the light.


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]

Reference to the [page:DirectionalLight directionalLight] being visualized.

[property:Object matrix]

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

[property:Object matrixAutoUpdate]

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

[property:hex color]

The color parameter passed in the constructor. Default is *undefined*. If this is changed, the helper's color will update the next time [page:.update update] is called.


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

[method:undefined dispose]()

Dispose of the directionalLightHelper.

[method:undefined update]()

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


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