API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
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?: numberInitial rotation in radians. Default 0.
angularDamping?: numberAngular damping applied to the angular velocity each sub-step. Default 0.
Colliders to attach up-front. Each may be a Collider instance or its ColliderOptions.
fixedRotation?: booleanWhen true, the body never rotates under contacts (infinite rotational inertia). Default false.
gravityScale?: numberPer-body multiplier on world gravity (e.g. 0 to ignore gravity). Default 1.
isBullet?: booleanWhen true, the body's colliders are shape-cast along each step's motion (CCD) so it cannot tunnel through thin geometry. Default false.
linearDamping?: numberLinear damping applied to the velocity each sub-step. Default 0.
position?: Readonly<PointLikeStructural type for any object with a 2D `x`/`y` position.>Initial world position. Default (0, 0).
Simulation role. Default 'dynamic'.
Source