API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classCircle
Mutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is approximated as a regular polygon with Circle.collisionSegments sides; normals and vertices are cached and regenerated lazily when the shape mutates. `Circle.temp` is a shared scratch instance for intermediate calculations.
import { Circle } from '@codexo/exojs'Mutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline.
For SAT-based collision the circle is approximated as a regular polygon with Circle.collisionSegments sides; normals and vertices are cached and regenerated lazily when the shape mutates.
`Circle.temp` is a shared scratch instance for intermediate calculations.
new(x: number, y: number, radius: number): Circleclone(): thiscollidesWith(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(circle: Circle): thisdestroy(): voidequals(__namedParameters: Partial<Circle>): 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…, result: 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…set(x: number, y: number, radius: number): thissetPosition(x: number, y: number): thissetRadius(radius: number): thiscollisionSegments: numberradius: numberx: numbery: number