Capítulo 141 de 859

Chapter 141: RectAreaLightHelper

Core Idea

Creates a visual aid for rect area lights.

RectAreaLightHelper must be added as a child of the light.

Key Concepts

  • color : number | Color | string | undefined: The helper's color. If undefined, the helper will take the color of the light.
  • light : RectAreaLight: The light to visualize.

Code Examples

const light = new THREE.RectAreaLight( 0xffffbb, 1.0, 5, 5 );
const helper = new RectAreaLightHelper( light );
light.add( helper );
  • What it demonstrates: Typical usage of RectAreaLightHelper.

Reference Tables

Constructor

Signature
`new RectAreaLightHelper( light : RectAreaLight, color : number

Properties

PropertyDescription
`.color : numberColor
.light : RectAreaLightThe light to visualize.

Methods

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

Key Takeaways

  1. RectAreaLightHelper extends: EventDispatcher → Object3D → Line
  2. Most relevant properties: color, light.
  3. Key methods: dispose.

Connects To