API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceReadonlyRectangle
Read-only view of a Rectangle: every accessor and non-mutating query a rectangle offers, with none of its writers. Returned by APIs that hand out a LIVE internal rectangle for zero allocation cost - SceneNode.getLocalBounds being the canonical one. Those rectangles are read on hot per-frame paths, so cloning them defensively would add a per-frame allocation; the view costs nothing at runtime and removes the write at the type level instead. Owners keep a real Rectangle and expose a dedicated writer that also runs whatever invalidation the write implies. Same idea as a `readonly T[]`: the object underneath is still the mutable one, the view just does not offer a way to change it.
import { ReadonlyRectangle } from '@codexo/exojs'Read-only view of a Rectangle: every accessor and non-mutating query a rectangle offers, with none of its writers.
Returned by APIs that hand out a LIVE internal rectangle for zero allocation cost - SceneNode.getLocalBounds being the canonical one. Those rectangles are read on hot per-frame paths, so cloning them defensively would add a per-frame allocation; the view costs nothing at runtime and removes the write at the type level instead. Owners keep a real Rectangle and expose a dedicated writer that also runs whatever invalidation the write implies.
Same idea as a `readonly T[]`: the object underneath is still the mutable one, the view just does not offer a way to change it.
collidesWith(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): booleanequals(rectangle?: Partial<RectangleLikeStructural type for any object that describes an axis-aligned rectangle via a top-left origin and dimensions.>): booleangetBounds(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…transform(matrix: MatrixMutable 3×3 row-major affine transformation matrix used throughout the rendering and physics pipeline. Layout (row, column): ``` | a b x | | c d y | | e f z |…, result: 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…bottom: numberheight: numberleft: numberright: numbertop: numberwidth: numberx: numbery: number