API reference

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

C

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): BoxShape
Properties8
boundingRadius: number
Radius of the smallest circle about the local origin enclosing the shape.
count: number
height: number
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: number
Source