Renderer · function
areaShadowLayerCount
How many layers of the shared array a world's rectangles will take.
Explained in Hello world.
function areaShadowLayerCount(lights: readonly AreaLightSource[]): numberimport { areaShadowLayerCount } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
lights | readonly AreaLightSource[] |
In depth
Two per rectangle that declares it casts and names a range, and none for one that does not. A
rectangle past MAX_AREA_LIGHTS is not shaded, so it gets no layer either — a layer for a light
the loop never reaches is storage nothing can read.