API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classRadianceLighting
Lighting as radiance that propagates, filled by a chain of cascades traced over this frame's geometry. ```ts const lighting = new RadianceLighting(app, { probeSpacing: 2, interval: 1, bounce: 0.5 }); scene.systems.add(lighting); lighting.occludeFrom(new PhysicsOccluder(world)); ``` Light propagates from what emits rather than falling off inside each light's radius, so a lamp fills the room it stands in, a wall between two rooms leaves the second one dark, a source with a size casts a penumbra that widens with distance, and a lit surface gives part of that light off again in its own colour (see RadianceLightingOptions.bounce). A `SpotLight` emits across its cone and a `SunLight` is the sky every unblocked ray ends in. It does NOT make a scene look the way LightmapLighting makes it look, and it is the only renderer whose cost is per probe rather than per light. Registered normal surfaces are recorded and ignored: the gather averages a probe's rays into one arriving colour, which leaves no incident direction for a normal to be measured against. The host is required and is the first argument. Float render targets are required too - a field of radiance has no ceiling to clamp at - and a device without them is refused at construction rather than shaded differently under the same name.
import { RadianceLighting } from '@codexo/exojs-lighting'Lighting as radiance that propagates, filled by a chain of cascades traced over this frame's geometry.
```ts const lighting = new RadianceLighting(app, { probeSpacing: 2, interval: 1, bounce: 0.5 });
scene.systems.add(lighting); lighting.occludeFrom(new PhysicsOccluder(world)); ```
Light propagates from what emits rather than falling off inside each light's radius, so a lamp fills the room it stands in, a wall between two rooms leaves the second one dark, a source with a size casts a penumbra that widens with distance, and a lit surface gives part of that light off again in its own colour (see RadianceLightingOptions.bounce). A `SpotLight` emits across its cone and a `SunLight` is the sky every unblocked ray ends in.
It does NOT make a scene look the way LightmapLighting makes it look, and it is the only renderer whose cost is per probe rather than per light. Registered normal surfaces are recorded and ignored: the gather averages a probe's rays into one arriving colour, which leaves no incident direction for a normal to be measured against.
The host is required and is the first argument. Float render targets are required too - a field of radiance has no ceiling to clamp at - and a device without them is refused at construction rather than shaded differently under the same name.
add(light: T): Tclear(): thisclearOccluders(): thisclearSurfaces(): thisdestroy(): voidoccludeFrom(source: T): Tupdate(): voidactiveLightCount: numberactiveSurfaceCount: numberdebugExposure: numberhdr: booleansurfaces: readonly NormalSurfaceA registered drawable and the normals it contributes.[]