[page:Object3D] →


This displays a cone shaped helper object for a [page:SpotLight].

Code Example

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


[example:webgl_lights_spotlights WebGL/ lights / spotlights ]


[name]( [param:SpotLight light], [param:Hex color] )

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

[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:LineSegments cone]

[page:LineSegments] used to visualize the light.

[property:SpotLight light]

Reference to the [page:SpotLight] being visualized.

[property:Object matrix]

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

[property:Object matrixAutoUpdate]

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

[method:undefined dispose]()

Disposes of the light helper.

[method:undefined update]()

Updates the light helper.


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