Renderer · function
castingRange
The range a rectangle will actually cast over, or 0 for one that will not.
Explained in Hello world.
function castingRange(light: AreaLightSource | undefined): numberimport { castingRange } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
light | AreaLightSource | undefined |
In depth
A declared castsShadow with no shadowRange counts as not casting, because there is no
honest far plane to invent for it — see the field. The renderer says so once by name; this
function is only the predicate, and it is shared so the layer count and the map assignment
cannot answer it differently.