Capítulo 125 de 859

Chapter 125: LightProbeGridHelper

Core Idea

Visualizes an LightProbeGrid by rendering a sphere at each probe position, shaded with the probe's L2 spherical harmonics.

Uses a single InstancedMesh draw call for all probes.

Key Concepts

  • probes : LightProbeGrid: The probe grid to visualize.

Code Examples

const helper = new LightProbeGridHelper( probes );
scene.add( helper );
  • What it demonstrates: Typical usage of LightProbeGridHelper.

Reference Tables

Constructor

Signature
new LightProbeGridHelper( probes : LightProbeGrid, sphereSize : number )

Properties

PropertyDescription
.probes : LightProbeGridThe probe grid 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.
.update()Rebuilds instance matrices and UVW attributes from the current probe grid. Call this after changing probes or after re-baking.

Key Takeaways

  1. LightProbeGridHelper extends: EventDispatcher → Object3D → Mesh → InstancedMesh
  2. Most relevant properties: probes.
  3. Key methods: dispose, update.

Connects To