API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceShapeMassProperties
@codexo/exojs-physics / physics / stable
Area-based mass properties of a solid shape, from which a Collider's density derives the owning body's mass and rotational inertia. Computed once at shape construction and frozen.
4
props
0
methods
0
events
Import
import { ShapeMassProperties } from '@codexo/exojs-physics'Area-based mass properties of a solid shape, from which a Collider's density derives the owning body's mass and rotational inertia. Computed once at shape construction and frozen.
Properties4
area: numberSurface area in px². mass = density × area.
centroidX: numberX of the area centroid in local space.
centroidY: numberY of the area centroid in local space.
unitInertia: numberSecond moment of area about the centroid (∫ r² dA). Multiplying by density yields the shape's rotational inertia contribution about its centroid.
Source