API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceShapeLike
Conformance contract shared by the concrete math shape values (Circle, Rectangle, Polygon, Ellipse, Line, Vector): a Collidable that can also be cloned, destroyed and queried for its axis-aligned bounding box. Two implementers (Vector, Line) satisfy Collidable structurally but produce no SAT collision response, so an API that needs a resolvable overlap should take Collidable and check the response it gets back rather than accepting any `ShapeLike`.
import { ShapeLike } from '@codexo/exojs'Conformance contract shared by the concrete math shape values (Circle, Rectangle, Polygon, Ellipse, Line, Vector): a Collidable that can also be cloned, destroyed and queried for its axis-aligned bounding box.
Two implementers (Vector, Line) satisfy Collidable structurally but produce no SAT collision response, so an API that needs a resolvable overlap should take Collidable and check the response it gets back rather than accepting any `ShapeLike`.
clone(): ShapeLikecollidesWith(target: CollidableContract for objects that participate in collision detection. Implemented by all concrete shape classes as well as `SceneNode`.): CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | nullcontains(x: number, y: number): booleancopy(source: ShapeLike): thisdestroy(): voidgetBounds(out?: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…): RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…project(axis: VectorConcrete mutable 2D vector with full AbstractVector arithmetic and Collidable collision support (treated as a point collider). `Vector.temp` provides a shared…, interval?: IntervalA closed scalar interval `[min, max]` used by the SAT collision solver to represent the projection of a shape onto a separating axis. `Interval.temp` provides…): IntervalA closed scalar interval `[min, max]` used by the SAT collision solver to represent the projection of a shape onto a separating axis. `Interval.temp` provides…