FlapConfig
pixi-wheels
pixi-wheels / index / FlapConfig
Interface: FlapConfig
Defined in: config/types.ts:403
The pointer flap: how the tongue behaves against the pegs.
The tongue tip is a point tipWidth wide at the peg ring. A peg coming
toward it pushes it aside along the peg’s rim (the geometric push, scaled
by elasticity), carries it on its crown until the peg is through plus
friction of the contact width, then lets go; a spring (stiffness, damping) brings it back.
At speed a peg passes within one frame and the tongue is flicked to the
crown deflection instead, so a fast wheel keeps it pinned and jittering
and a crawling one bends it slowly over every peg.
Properties#
| Property | Type | Description | Defined in |
|---|
damping? | number | Spring damping (1/s). Default 14; lower rings longer after a release. | config/types.ts:409 |
elasticity? | number | How far the tongue yields to a peg, as a fraction of the geometric push. Default 1. Under 1 a stiff short tongue, over 1 a floppy one. | config/types.ts:411 |
friction? | number | Extra carry after a peg has passed under the tip, as a fraction of the contact width. Default 0.35; 0 lets go as soon as the peg is through, 1 drags a whole width more. | config/types.ts:413 |
invert? | boolean | Flip the deflection direction if your art is mirrored. Default false. | config/types.ts:417 |
maxAngle? | number | Largest deflection, degrees. Default 28. | config/types.ts:405 |
stiffness? | number | Spring stiffness pulling the tongue back to rest (1/s^2). Default 420. | config/types.ts:407 |
tipWidth? | number | Width of the tongue tip where it meets the pegs, px. Default 14. | config/types.ts:415 |