Physics · class

JointSet

Explained in Your first game, Rigid bodies.

class JointSet
import { JointSet } from '@driftengine/physics';

Constructor

new

constructor(capacity?: number)
ParameterTypeDescription
capacity?number

Properties

NameTypeDescription
countnumber
typeUint8Array
bodyAInt32Array
bodyBInt32Array
localAFloat32Array
localBFloat32Array
axisFloat32Array
restRelFloat32ArrayThe relative rotation held at rest, captured when the joint is made.
lengthFloat32Array
lowerFloat32Array
upperFloat32Array
swingCosFloat32Array
twistSinFloat32Array
motorSpeedFloat32Array
motorMaxForceFloat32Array
breakImpulseFloat32Array
brokenUint8Array
impulseFloat32ArraySix accumulated impulses per joint: three linear, three angular or scalar rows.
motorImpulseFloat32Array
dofModeUint8ArraySix-DOF only: a mode per degree, and the bounds the limited ones are held between.
dofLowerFloat32Array
dofUpperFloat32Array

Methods

add

add(bodies: BodySet, d: JointDesc): number
ParameterTypeDescription
bodiesBodySet
dJointDesc