This displays a cone shaped helper object for a SpotLight.
const spotLight = new v3d.SpotLight(0xffffff);
spotLight.position.set(10, 10, 10);
app.scene.add(spotLight);
const spotLightHelper = new v3d.SpotLightHelper(spotLight);
app.scene.add(spotLightHelper);
See the base Object3D class for common properties.
LineSegments used to visualize the light.
Reference to the SpotLight being visualized.
Reference to the spotLight's matrixWorld.
See Object3D.matrixAutoUpdate. Set to false here as the helper is using the spotLight's matrixWorld.
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.
See the base Object3D class for common methods.
Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.
Updates the light helper.
For more info on how to obtain the source code of this module see this page.