Capítulo 110 de 859

Chapter 110: DynamicLighting

Core Idea

A custom lighting implementation that batches supported analytic lights into uniform arrays so light count changes do not recompile materials.

Code Examples

const lighting = new DynamicLighting( { maxPointLights: 64 } );
renderer.lighting = lighting;
  • What it demonstrates: Typical usage of DynamicLighting.

Reference Tables

Constructor

Signature
new DynamicLighting( options : Object )

Methods

MethodDescription
.createNode( lights : Array.<Light> ) : DynamicLightsNodeCreates a new dynamic lights node for the given array of lights.
.getNode( scene : Scene ) : LightsNodeReturns a lights node for the given scene.

Key Takeaways

  1. DynamicLighting extends: Lighting
  2. Key methods: createNode, getNode.

Connects To