This displays a helper object consisting of a spherical Mesh for visualizing a PointLight.
const pointLight = new v3d.PointLight(0xff0000, 1, 100); pointLight.position.set(10, 10, 10); scene.add(pointLight); const sphereSize = 1; const pointLightHelper = new v3d.PointLightHelper(pointLight, sphereSize); scene.add(pointLightHelper);
WebGL / helpers
light — The light to be visualized.
sphereSize — (optional) The size of the sphere helper. Default is
color — (optional) if this is not the set the helper will take the color of the light.
See the base Mesh class for common properties.
The PointLight that is being visualized.
Reference to the pointLight's matrixWorld.
See Object3D.matrixAutoUpdate. Set to
false here as the helper is using the
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 Mesh 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 helper to match the position of the .light.
For more info on how to obtain the source code of this module see this page.