Skip to main content

Object3D

HemisphereLightHelper

Creates a visual aid consisting of a spherical Mesh for a HemisphereLight.

Code Example

const light = new THREE.HemisphereLight( 0xffffbb, 0x080820, 1 ); const helper
= new THREE.HemisphereLightHelper( light, 5 ); scene.add( helper );

Constructor

HemisphereLightHelper

function HemisphereLightHelper( light: HemisphereLight, sphereSize: Number,
color: Hex ): void;

light -- The light being visualized.

size -- The size of the mesh used to visualize the light.

color -- (optional) if this is not the set the helper will take the color of the light.

Properties

See the base Object3D class for common properties.

light

light: HemisphereLight;  

Reference to the HemisphereLight being visualized.

matrix

matrix: Object;  

Reference to the hemisphereLight's matrixWorld.

matrixAutoUpdate

matrixAutoUpdate: Object;  

See Object3D.matrixAutoUpdate. Set to false here as the helper is using the hemisphereLight's matrixWorld.

color

color: hex;  

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.

Methods

See the base Object3D class for common methods.

dispose

function dispose( ): undefined;  

Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app.

update

function update( ): undefined;  

Updates the helper to match the position and direction of the .light.

Source

src/helpers/HemisphereLightHelper.js