API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classPhysicsOccluder

@codexo/exojs-lighting / lighting / stable

Shadows from physics colliders. ```ts lighting.occludeFrom(new PhysicsOccluder(world)); ``` Static colliders only by default, and never sensors. The world is queried per frame for the region the lights reach, so a body that moves casts a shadow that moves with it, at the cost of rebuilding the field. Circles and capsules are approximated by their outline; polygons, segments and chains are exact.

0
props
1
methods
0
events
Import
import { PhysicsOccluder } from '@codexo/exojs-lighting'

Shadows from physics colliders.

```ts lighting.occludeFrom(new PhysicsOccluder(world)); ```

Static colliders only by default, and never sensors. The world is queried per frame for the region the lights reach, so a body that moves casts a shadow that moves with it, at the cost of rebuilding the field.

Circles and capsules are approximated by their outline; polygons, segments and chains are exact.

Constructors1
Methods1
Append the segments overlapping bounds to out. Called once per frame with the region the visible lights actually reach, so a source that can narrow its search by region should. Reporting more than bounds covers is allowed and only costs work; reporting less than it covers leaks light. bounds is valid for the duration of the call and is reused afterwards.
Source