API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classEllipse
Mutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements ShapeLike for use in the intersection pipeline. `collidesWith` supports: SceneNode (AABB), Rectangle, Circle, Polygon, and Ellipse. Ellipse-vs-Line always returns `null` — use `intersectsWith`.
import { Ellipse } from '@codexo/exojs' Mutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements ShapeLike for use in the intersection pipeline.
`collidesWith` supports: SceneNode (AABB), Rectangle, Circle, Polygon, and Ellipse. Ellipse-vs-Line always returns `null` — use `intersectsWith`.
new(x: number, y: number, halfWidth: number, halfHeight: number): Ellipse clone(): this collidesWith(target: Collidable): CollisionResponse | null contains(x: number, y: number): boolean copy(ellipse: Ellipse): this destroy(): void equals(__namedParameters: Partial<Ellipse>): boolean getBounds(): Rectangle getNormals(): Vector[] intersectsWith(target: Collidable): boolean project(axis: Vector, result: Interval): Interval set(x: number, y: number, radiusX: number, radiusY: number): this setPosition(x: number, y: number): this setRadius(radiusX: number, radiusY: number): this collisionType: CollisionType position: Vector radius: Vector rx: number ry: number x: number y: number