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.
const light = new v3d.DirectionalLight(0xFFFFFF);
const helper = new v3d.DirectionalLightHelper(light, 5);
app.scene.add(helper);
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.
See the base Object3D class for common properties.
Contains the line mesh showing the location of the directional light.
Reference to the directionalLight being visualized.
Reference to the light's matrixWorld.
See Object3D.matrixAutoUpdate. Set to false
here as the helper is using the
light'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 properties.
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 and direction of the directionalLight being visualized.
For more info on how to obtain the source code of this module see this page.