API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceTileColliderOptions
@codexo/exojs-tilemap-physics / tilemap-physics / stable
Options for a TileColliderStreamer. All optional.
10
props
0
methods
0
events
Import
import { TileColliderOptions } from '@codexo/exojs-tilemap-physics'Options for a TileColliderStreamer. All optional.
Properties10
accept?: (object: TileMapObjectA format-independent map object. The geometry kind is the discriminant; narrow on `kind` to read shape-specific fields. Template objects are not yet represente…, tx: number, ty: number) => booleanDrop a source shape before any collider is built for it.
Per-cell collision classification, for layers whose collision is authored per cell rather than per tile. On a bounded layer this makes the bridge cover the whole layer, including partitions that hold no tiles at all. Sampled while a partition is built and expected to answer identically for the lifetime of this bridge: changing what it returns does not invalidate colliders that already exist. Rebuild by recreating the bridge.
density?: numberDensity; irrelevant while the bodies are static. Default 1.
Category/mask/group filter; partials merge over the physics defaults.
friction?: numberCoulomb friction. Default 0.6.
isSensor?: booleanGenerate overlap events instead of contact response. Default false.
Per-object override of any of the above.
merge?: booleanMerge adjacent whole-cell boxes sharing a type into larger rectangles. Default true. Merging never crosses a chunk boundary.
How solid whole-cell regions are represented. Default 'boxes'.
restitution?: numberRestitution / bounciness in [0, 1]. Default 0.
Source