Physics · class
JointSet
Explained in Your first game, Rigid bodies.
class JointSetimport { JointSet } from '@driftengine/physics';Constructor
new
constructor(capacity?: number)| Parameter | Type | Description |
|---|---|---|
capacity? | number |
Properties
| Name | Type | Description |
|---|---|---|
count | number | |
type | Uint8Array | |
bodyA | Int32Array | |
bodyB | Int32Array | |
localA | Float32Array | |
localB | Float32Array | |
axis | Float32Array | |
restRel | Float32Array | The relative rotation held at rest, captured when the joint is made. |
length | Float32Array | |
lower | Float32Array | |
upper | Float32Array | |
swingCos | Float32Array | |
twistSin | Float32Array | |
motorSpeed | Float32Array | |
motorMaxForce | Float32Array | |
breakImpulse | Float32Array | |
broken | Uint8Array | |
impulse | Float32Array | Six accumulated impulses per joint: three linear, three angular or scalar rows. |
motorImpulse | Float32Array | |
dofMode | Uint8Array | Six-DOF only: a mode per degree, and the bounds the limited ones are held between. |
dofLower | Float32Array | |
dofUpper | Float32Array |
Methods
add
add(bodies: BodySet, d: JointDesc): number| Parameter | Type | Description |
|---|---|---|
bodies | BodySet | |
d | JointDesc |