API reference

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

C

classMeshOccluder

@codexo/exojs-lighting / lighting / stable

Shadows from a triangle mesh's own silhouette. ```ts lighting.occludeFrom(new MeshOccluder(platform)); ``` Only edges one triangle owns are kept: an edge two triangles share is interior and casts no shadow anybody can see, and a tessellated shape has far more of those than of the other kind. Holes come back as outlines of their own, so a ring shadows like a ring. The outline is extracted once. The mesh places it, so moving or rotating it moves its shadow; deforming its vertices afterwards does not, and wants a fresh occluder.

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

Shadows from a triangle mesh's own silhouette.

```ts lighting.occludeFrom(new MeshOccluder(platform)); ```

Only edges one triangle owns are kept: an edge two triangles share is interior and casts no shadow anybody can see, and a tessellated shape has far more of those than of the other kind. Holes come back as outlines of their own, so a ring shadows like a ring.

The outline is extracted once. The mesh places it, so moving or rotating it moves its shadow; deforming its vertices afterwards does not, and wants a fresh occluder.

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