Capítulo 118 de 859

Chapter 118: Light

Core Idea

Abstract base class for lights - all other light types inherit the properties and methods described here.

Key Concepts

  • color : Color: The light's color.
  • intensity : number: The light's intensity.
  • isLight : boolean (readonly): This flag can be used for type testing.

Reference Tables

Constructor

Signature
`new Light( color : number

Properties

PropertyDescription
.color : ColorThe light's color.
.intensity : numberThe light's intensity.
.isLight : boolean (readonly)This flag can be used for type testing.

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. Light extends: EventDispatcher → Object3D
  2. Most relevant properties: color, intensity, isLight.
  3. Key methods: dispose.

Connects To