API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classBoxShape
@codexo/exojs-physics / physics / stable
Axis-aligned box of `width × height` centred on the collider's local origin - a convenience over PolygonShape. The result is a regular polygon, so it participates in the polygon narrow phase like any other convex shape.
8
props
0
methods
0
events
Import
import { BoxShape } from '@codexo/exojs-physics'Axis-aligned box of `width × height` centred on the collider's local origin - a convenience over PolygonShape. The result is a regular polygon, so it participates in the polygon narrow phase like any other convex shape.
Constructors1
new(width: number, height: number): BoxShapeProperties8
boundingRadius: numberRadius of the smallest circle about the local origin enclosing the shape.
count: numberheight: numberArea-based mass properties, or null for boundary geometry with no interior.
normals: readonly number[]Outward unit edge normals (edge i spans vertex i → i+1), flattened.
type: "polygon"vertices: readonly number[]Local-space vertices, CCW, flattened.
width: numberSource