API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
namespaceTilemap-physics Functions
@codexo/exojs-tilemap-physics / tilemap-physics / stable
Free functions and constants exported from @codexo/exojs-tilemap-physics.
0
props
1
methods
0
events
Overview
Free functions and constants exported from @codexo/exojs-tilemap-physics. Import any of them directly, for example `import { buildObjectLayerColliders } from '@codexo/exojs-tilemap-physics'`.
Functions1
buildObjectLayerColliders(world: PhysicsWorldThe collision/query world: owns bodies, colliders, the detection backend, bindings, the query engine and the fixed-step accumulator. Stepped by the caller (com…, layer: ObjectLayerA data-only layer of TileMapObjects - spawn points, trigger zones, collision regions, markers. Object layers are not rendered by the tile renderer; they are pa…, options: ObjectColliderOptionsOptions for buildObjectLayerColliders.): ObjectColliderOne static body built from one object, paired with its source.[]Build one static body per collision object in an object layer and add them to world. An object layer is static data with no residency, so this is a one-shot build with no lifecycle: the caller owns the returned bodies and destroys them through the world. Use import('./TileColliderStreamer').TileColliderStreamer for tile layers, whose chunks come and go. The layer's pixel offset is applied, so the colliders land where the layer is drawn. Objects with no collision geometry (points, tile and text objects) are skipped, as is any object the decomposition rejects - with a warning, not an exception.