Physics · interface
SkinnedClothParameters
What the solver runs at. Every field has a default; the defaults are a garment's, not a sheet's.
Explained in Your first game, Rigid bodies.
interface SkinnedClothParametersimport type { SkinnedClothParameters } from '@driftengine/physics';Properties
| Name | Type | Description |
|---|---|---|
stepreadonlyoptional | number | The fixed step, in seconds. The solver runs whole steps whatever the frame. Default 1/60. |
maxStepsreadonlyoptional | number | The most whole steps one advance runs; the time past them is dropped, not owed to the next
frame. Default none, so advance(1) is a second of cloth. A caller handing it each frame's time
wants two to four: unbounded, a slow frame's steps make the next frame slower, which hands it
more time again. What it gives up: past the cap the cloth runs slower than the clock. |
substepsreadonlyoptional | number | Substeps a step. Default 1. |
iterationsreadonlyoptional | number | Constraint passes a substep. Default 4. |
gravityreadonlyoptional | readonly [number, number, number] | Metres a second squared, world space. Default [0, −9.81, 0]. |
dampingreadonlyoptional | number | The log of the velocity kept after a second: ln 0.25 keeps a quarter. Zero is none; it is
applied as exp(damping · h) a substep, so it means one thing at every step length. |
dragreadonlyoptional | number | The same, of the velocity relative to the wind: how fast the air takes the cloth with it. |
windreadonlyoptional | readonly [number, number, number] | Metres a second, world space: the air the cloth starts in. Default still air. A garment in a
scene follows the scene's wind a frame at a time, through setWind. |
linearInertiareadonlyoptional | number | How much of the character's own movement and turning the cloth keeps as its own, 0 to 1: 1 is simulated wholly in the world, so a dash leaves the hem behind; 0 moves it with the character. Default 1. |
angularInertiareadonlyoptional | number | |
maxDistanceScalereadonlyoptional | number | Scales every max distance, for a garment worn looser or tighter than cooked. Default 1. |
marginreadonlyoptional | number | Metres added to every collider's radius, beyond a particle's own thickness. Default 0. |
teleportDistancereadonlyoptional | number | A move of the character's origin past this, between two poses, resets the cloth. Default none. |
teleportAnglereadonlyoptional | number | A turn past this many radians between two poses resets it too. Default none. |
settleStepsreadonlyoptional | number | Steps run at once when the cloth is reset, so it starts hanging rather than falling. |
blendStepsreadonlyoptional | number | Steps over which a reset cloth blends from its skinned pose into its simulation. |