Inheritance: Lighting →
A custom lighting implementation that batches supported analytic lights into uniform arrays so light count changes do not recompile materials.
const lighting = new DynamicLighting( { maxPointLights: 64 } );
renderer.lighting = lighting;
DynamicLighting is an addon, and must be imported explicitly, see Installation#Addons.
import { DynamicLighting } from 'three/addons/lighting/DynamicLighting.js';
Constructs a new dynamic lighting system.
options
Dynamic lighting configuration.
Default is {}.
maxDirectionalLights
Maximum number of batched directional lights.
Default is 8.
maxPointLights
Maximum number of batched point lights.
Default is 16.
maxSpotLights
Maximum number of batched spot lights.
Default is 16.
maxHemisphereLights
Maximum number of batched hemisphere lights.
Default is 4.
Creates a new dynamic lights node for the given array of lights.
lights
The lights to bind to the node.
Overrides: Lighting#createNode
Returns: The dynamic lights node.
Returns a lights node for the given scene.
scene
The scene.
Overrides: Lighting#getNode
Returns: The lights node.