Function createClusteredSpotLight
-
createClusteredSpotLight(
container: ClusteredLightContainer,
options: ClusteredSpotLightOptions,
): ClusteredSpotLightParameters
- container: ClusteredLightContainer
The container to add the light to.
- options: ClusteredSpotLightOptions
The light's position, direction, colour and optional cone/range/intensity.
Returns ClusteredSpotLight
The created light (also pushed onto
container.spotLights); mutate it in place and call markClusteredLightContainerDirty to animate it. - container: ClusteredLightContainer
Add a spot light to a clustered light container. Spot lights are culled as spheres of radius
range(matching Babylon.js) and shaded with a glTF-style smooth cone falloff.All lights must be created before addClusteredLightContainer: the GPU state bakes both the light capacity and the point/spot data layout.