Physics · interface
SkinnedClothSetup
Everything a skinned cloth is made from.
Explained in Your first game, Rigid bodies.
interface SkinnedClothSetupimport type { SkinnedClothSetup } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
positionsreadonly | Float32Array | Rest positions, three floats a particle, in the space the skinning starts from. |
inverseMassreadonly | Float32Array | One a particle: zero is kinematic, following its skinned position exactly. |
distancereadonly | DistanceConstraints | |
bendingreadonlyoptional | BendingConstraints | |
tethersreadonlyoptional | TetherConstraints | |
parametersreadonly | SkinnedClothParameters | |
normalsreadonlyoptional | Float32Array | Rest normals, three floats a particle: what a backstop and a frontstop are measured along. |
jointsreadonlyoptional | Float32Array | Up to eight joint influences a particle, as MeshData carries them. Absent: not skinned. |
weightsreadonlyoptional | Float32Array | |
joints2readonlyoptional | Float32Array | |
weights2readonlyoptional | Float32Array | |
inverseBindreadonlyoptional | Float32Array | Sixteen floats a joint: each joint's inverse bind matrix, column-major. |
limitsreadonlyoptional | ClothLimits | |
collidersreadonlyoptional | readonly ClothCollider[] | |
pullWeightsreadonlyoptional | Float32Array | One a particle, 0 to 1: how much of the garment's pull draws it toward its skinned place,
each substep keeping 1 / (1 + w · pull · h²) of its offset. Absent, every particle takes the
whole pull. For a garment held unevenly: a strap held at its root and free at its tip, a
styled fringe held nearly whole while the body of a coat swings free. A weight of 0 is no pull
at all, which is a free particle, not a kinematic one: inverseMass is what pins. |