Capítulo 134 de 859
This displays a helper object consisting of a spherical mesh for visualizing an instance of PointLight.
const pointLight = new THREE.PointLight( 0xff0000, 1, 100 );
pointLight.position.set( 10, 10, 10 );
scene.add( pointLight );
const sphereSize = 1;
const pointLightHelper = new THREE.PointLightHelper( pointLight, sphereSize );
scene.add( pointLightHelper );
Constructor
| Signature |
|---|
| `new PointLightHelper( light : PointLight, sphereSize : number, color : number |
Properties
| Property | Description |
|---|---|
| `.color : number | Color |
.light : PointLight | The light being visualized. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever this instance is no longer used in your app. |
.update() | Updates the helper to match the position of the light being visualized. |