API reference

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

I

interfaceAttachOptions

@codexo/exojs-physics / physics / stable

PhysicsWorld.attach convenience options: a body type plus a single collider, attached to a scene node in one call.

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

PhysicsWorld.attach convenience options: a body type plus a single collider, attached to a scene node in one call.

Properties13
angle?: number
Initial rotation (radians) of the body. Default the node's current WORLD rotation at attach time.
density?: number
Collider density (mass per px²). Default 1.
fixedRotation?: boolean
When true, the body never rotates under contacts. Default false.
friction?: number
Coulomb friction coefficient. Default 0.2.
gravityScale?: number
Per-body multiplier on world gravity. Default 1.
isSensor?: boolean
When true, the collider generates overlap events but no contact response. Default false.
Body-local offset of the collider. Default (0, 0).
Initial world position of the body. Default the node's current WORLD position (SceneNode.getWorldTransform) at attach time.
restitution?: number
Restitution / bounciness in [0, 1]. Default 0.
rotation?: number
Body-local rotation of the collider (radians). Default 0.
Source