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 ShapeLike 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 ShapeLike 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): Circle clone(): this collidesWith(target: Collidable): CollisionResponse | null contains(x: number, y: number): boolean copy(circle: Circle): this destroy(): void equals(__namedParameters: Partial<Circle>): boolean getBounds(): Rectangle getNormals(): Vector[] intersectsWith(target: Collidable): boolean project(axis: Vector, result: Interval): Interval set(x: number, y: number, radius: number): this setPosition(x: number, y: number): this setRadius(radius: number): this collisionType: CollisionType collisionSegments: number position: Vector radius: number x: number y: number