API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

N

namespaceCollision

@codexo/exojs / math / stable

Shape-vs-shape collision queries, grouped as a namespace so the public API carries no loose `intersection*`/`getCollision*` functions: `intersects.*` are boolean overlap tests, `resolve.*` return a minimum-translation-vector response. The underlying functions stay module exports for internal use; only this facade is in the public barrel (the low-level `*Sat` primitives stay internal-only).

2
props
0
methods
0
events
Import
import { Collision } from '@codexo/exojs'

Shape-vs-shape collision queries, grouped as a namespace so the public API carries no loose `intersection*`/`getCollision*` functions: `intersects.*` are boolean overlap tests, `resolve.*` return a minimum-translation-vector response. The underlying functions stay module exports for internal use; only this facade is in the public barrel (the low-level `*Sat` primitives stay internal-only).

Properties2
intersects: { circleCircle: (__namedParameters: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, __namedParameters: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…) => boolean; circleEllipse: (circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => boolean; circlePoly: (__namedParameters: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, __namedParameters: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; ellipseEllipse: (ellipseA: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…, ellipseB: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => boolean; ellipsePoly: (ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…, polygon: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; lineCircle: (line: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…) => boolean; lineEllipse: (line: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => boolean; lineLine: (lineA: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, lineB: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…) => boolean; linePoly: (line: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, polygon: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; lineRect: (line: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, rectangle: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…) => boolean; pointCircle: (point: PointLikeStructural type for any object with a 2D `x`/`y` position., circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…) => boolean; pointEllipse: (point: PointLikeStructural type for any object with a 2D `x`/`y` position., ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => boolean; pointLine: (point: PointLikeStructural type for any object with a 2D `x`/`y` position., line: LineMutable line segment defined by two endpoint positions. Implements Collidable for intersection tests against all shape types. Note: `collidesWith` always retur…, threshold: number) => boolean; pointPoint: (pointA: PointLikeStructural type for any object with a 2D `x`/`y` position., pointB: PointLikeStructural type for any object with a 2D `x`/`y` position., threshold: number) => boolean; pointPoly: (point: PointLikeStructural type for any object with a 2D `x`/`y` position., polygon: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; pointRect: (point: PointLikeStructural type for any object with a 2D `x`/`y` position., rectangle: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…) => boolean; polyPoly: (polygonA: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…, polygonB: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; rectCircle: (__namedParameters: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, __namedParameters: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…) => boolean; rectEllipse: (rectangle: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => boolean; rectPoly: (rectangle: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, polygon: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…) => boolean; rectRect: (rectA: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, rectB: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…) => boolean }
resolve: { circleCircle: (circleA: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, circleB: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; circleRectangle: (circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, rect: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, swap: boolean) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; ellipseCircle: (ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…, circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, swap: boolean) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; ellipseEllipse: (ellipseA: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…, ellipseB: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; ellipseRectangle: (ellipse: EllipseMutable axis-aligned ellipse shape defined by a centre position and separate horizontal (`rx`) and vertical (`ry`) half-radii. Implements Collidable for use in…, rect: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, swap: boolean) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; polygonCircle: (polygon: PolygonMutable convex polygon defined by a world-space offset `(x, y)` and an array of local-space vertex Vectors. Implements Collidable with full SAT collision respo…, circle: CircleMutable circle shape defined by a centre position and radius. Implements Collidable for use in the collision pipeline. For SAT-based collision the circle is ap…, swap: boolean) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null; rectangleRectangle: (rectA: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…, rectB: RectangleMutable axis-aligned rectangle defined by a top-left origin `(x, y)` and dimensions `(width, height)`. Implements Collidable with full SAT collision response f…) => CollisionResponseResult of a successful Collidable.collidesWith call. Contains the two participating shapes, the penetration depth, containment flags, and the minimum-translati… | null }
Source