API reference

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

I

interfaceBodyOptions

@codexo/exojs-physics / physics / stable

Construction options for a body.

9
props
0
methods
0
events
Import
import { BodyOptions } from '@codexo/exojs-physics'

Construction options for a body.

Properties9
angle?: number
Initial rotation in radians. Default 0.
angularDamping?: number
Angular damping applied to the angular velocity each sub-step. Default 0.
fixedRotation?: boolean
When true, the body never rotates under contacts (infinite rotational inertia). Default false.
gravityScale?: number
Per-body multiplier on world gravity (e.g. 0 to ignore gravity). Default 1.
isBullet?: boolean
When true, the body's colliders are shape-cast along each step's motion (CCD) so it cannot tunnel through thin geometry. Default false.
linearDamping?: number
Linear damping applied to the velocity each sub-step. Default 0.
Initial world position. Default (0, 0).
Source