API reference

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

C

classPolygonOccluder

@codexo/exojs-lighting / lighting / stable

Shadows from an outline of your own, in world space or local to a node. ```ts lighting.occludeFrom(new PolygonOccluder(trunk, { node: tree })); ``` The escape hatch, and the right answer whenever the shadow silhouette is not the drawn one. The points are read once. The node places them, so moving or rotating it moves the shadow with it.

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

Shadows from an outline of your own, in world space or local to a node.

```ts lighting.occludeFrom(new PolygonOccluder(trunk, { node: tree })); ```

The escape hatch, and the right answer whenever the shadow silhouette is not the drawn one.

The points are read once. The node places them, so moving or rotating it moves the shadow with it.

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