Object3D

DirectionalLightHelper

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

Example

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

Constructor

DirectionalLightHelper(light : DirectionalLight, size : Number, color : Hex)

light-- The light to be visualized.

size -- (optional) dimensions of the plane. Default is 1.

color -- (optional) if this is not the set the helper will take the color of the light.

Properties

See the base Object3D class for common properties.

.lightPlane : Line

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

.light : DirectionalLight

Reference to the directionalLight being visualized.

.matrix : object

Reference to the light's matrixWorld.

.matrixAutoUpdate : object

See Object3D.matrixAutoUpdate. Set to false here as the helper is using the light's matrixWorld.

.color : hex

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

Methods

See the base Object3D class for common properties.

.dispose () : null

Dispose of the directionalLightHelper.

.update () : null

Updates the helper to match the position and direction of the directionalLight being visualized.

Source

For more info on how to obtain the source code of this module see this page.