API reference

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

I

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: number
Surface area in px². mass = density × area.
centroidX: number
X of the area centroid in local space.
centroidY: number
Y of the area centroid in local space.
unitInertia: number
Second moment of area about the centroid (∫ r² dA). Multiplying by density yields the shape's rotational inertia contribution about its centroid.
Source