API reference

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

N

namespacePhysics Functions

@codexo/exojs-physics / physics / stable

Free functions and constants exported from @codexo/exojs-physics.

2
props
2
methods
0
events
Overview

Free functions and constants exported from @codexo/exojs-physics. Import any of them directly, for example `import { shouldCollide } from '@codexo/exojs-physics'`.

Functions2
Turn one possibly-concave outline into the convex solver shapes that represent it. Attach all of them to a single body: together they are the original area, and a PolygonShape stays exactly one convex shape rather than secretly standing for several. The number of shapes and their order follow from the current decomposition and are not a stable contract; the preserved properties are the area, the centre of mass and the rotational inertia of the compound. An already-convex outline yields exactly one shape, so a caller that does not know whether its input is convex can route everything through here.
Constants2