File: DirectionalLightHelper.md | Updated: 11/15/2025
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 THREE.DirectionalLight( 0xFFFFFF );
scene.add( light );
const helper = new THREE.DirectionalLightHelper( light, 5 );
scene.add( helper );
Constructs a new directional light helper.
light | The light to be visualized.
---|---
size | The dimensions of the plane. Default is 1.
color | The helper's color. If not set, the helper will take the color of the light.
The color parameter passed in the constructor. If not set, the helper will take the color of the light.
The light being visualized.
Contains the line showing the location of the directional light.
Represents the target line of the directional light.
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 light being visualized.