Object3D

SpotLightHelper

This displays a cone shaped helper object for a SpotLight.

Example

View in Examples

Other Examples

lights / spotlights

Code Example

var spotLight = new v3d.SpotLight(0xffffff); spotLight.position.set(10, 10, 10); scene.add(spotLight); var spotLightHelper = new v3d.SpotLightHelper(spotLight); scene.add(spotLightHelper);

Constructor

SpotLightHelper(light : SpotLight, color : Hex)

light -- The SpotLight to be visualized.

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.

.cone : LineSegments

LineSegments used to visualize the light.

.light : SpotLight

Reference to the SpotLight being visualized.

.matrix : object

Reference to the spotLight's matrixWorld.

.matrixAutoUpdate : object

See Object3D.matrixAutoUpdate. Set to false here as the helper is using the spotLight'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 methods.

.dispose () : null

Disposes of the light helper.

.update () : null

Updates the light helper.

Source

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