API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCollider
Geometry attached to a PhysicsBody: a Shape plus a body-local offset/rotation, material (friction/restitution/density) and a collision filter. A body may own several colliders (compound). The collider also caches its world-space geometry — refreshed by synchronize — which the broad phase, narrow phase and queries read directly. Material fields and the filter are mutable; the shape and local placement are immutable (rebuild the collider to change geometry).
import { Collider } from '@codexo/exojs-physics' Geometry attached to a PhysicsBody: a Shape plus a body-local offset/rotation, material (friction/restitution/density) and a collision filter. A body may own several colliders (compound). The collider also caches its world-space geometry — refreshed by synchronize — which the broad phase, narrow phase and queries read directly.
Material fields and the filter are mutable; the shape and local placement are immutable (rebuild the collider to change geometry).
new(options: ColliderOptions): Collider _markDestroyed(): void synchronize(bodyTransform: Transform): void density: number filter: CollisionFilter friction: number isSensor: boolean localRotation: number offsetX: number offsetY: number restitution: number shape: AnyShape aabb: Readonly<Aabb> body: PhysicsBody destroyed: boolean id: number localTransform: Readonly<Transform> worldCenter: Readonly<Mutable2D> worldNormals: readonly number[] worldTransform: Readonly<Transform> worldVertices: readonly number[]