API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classForwardLighting
Lighting shaded inside the sprite fragment stage, against one packed light texture. ```ts const lighting = new ForwardLighting(app, { maxLights: 16, ambient: new Color(20, 20, 24) }); scene.systems.add(lighting); ``` One draw and no extra render targets, which is what makes it the floor renderer. It is also the only one that does normal mapping, through LitMaterial - the other two multiply a finished frame, which has no surface normals left to shade against. The price is the cap: every lit fragment walks every light, so ForwardLightingOptions.maxLights bounds how many there may be, and it casts no shadows at all. It is the one system that can be built without a host, because its light data is a texture a material samples rather than anything the frame slot runs: ```ts const lighting = new ForwardLighting({ maxLights: 16 }); ``` A filter chain is a frame pass, so `post` needs the host.
import { ForwardLighting } from '@codexo/exojs-lighting'Lighting shaded inside the sprite fragment stage, against one packed light texture.
```ts const lighting = new ForwardLighting(app, { maxLights: 16, ambient: new Color(20, 20, 24) });
scene.systems.add(lighting); ```
One draw and no extra render targets, which is what makes it the floor renderer. It is also the only one that does normal mapping, through LitMaterial - the other two multiply a finished frame, which has no surface normals left to shade against. The price is the cap: every lit fragment walks every light, so ForwardLightingOptions.maxLights bounds how many there may be, and it casts no shadows at all.
It is the one system that can be built without a host, because its light data is a texture a material samples rather than anything the frame slot runs:
```ts const lighting = new ForwardLighting({ maxLights: 16 }); ```
A filter chain is a frame pass, so `post` needs the host.
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.[]