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: ColliderOptionsConstruction options for a collider.): Collidersynchronize(bodyTransform: Transform): voiddensity: numberfriction: numberisSensor: booleanlocalRotation: numberoffsetX: numberoffsetY: numberrestitution: numberdestroyed: booleanid: numberlocalTransform: Readonly<Transform>worldCenter: Readonly<PointLikeStructural type for any object with a 2D `x`/`y` position.>worldNormals: readonly number[]worldTransform: Readonly<Transform>worldVertices: readonly number[]