A sinusoidal vertical offset of amplitude. With cycles it plays that many periods and
ends; without, it loops until cancelled (breathing, a floating item). Under reduced motion
a looping bob holds still.
cancels every effect and puts the object back in its rest pose, flips included
Mirrors along axis ('x' turns left to right). A state, not an animation: it composes
with whatever is running and is undone by destroy. Pass mirrored to set it outright
rather than toggle; returns the new state.
Optionalmirrored: booleanup height world units and back down (the rest pose is the ground)
leans by amount radians of skew and back, a hit-recoil or a lean into a step
turns full turns about the origin, eased, ending exactly where it started
scale x and y in opposition and back: amount 0.2 is 20% wider and 20% shorter at the peak
advances the effects; call from the game loop (the tweener part is skipped for a shared one)
swings angle radians either side and settles, a jiggle that dies away
Squash, hop, bob, wobble, spin, shear and flip over a display object's transform, each running through a
Tweenerso reduced motion is honoured once, here, instead of by every game's ownscale/Math.sinwrite.The object's transform at construction is its rest pose. Every running effect keeps its own contribution and the transform is recomputed from the rest pose and all contributions, so effects compose (a hop with a squash) and never accumulate drift: when one ends, is cancelled, or the whole motion is destroyed, its share simply disappears. Rotation and shear turn about the object's origin, so give a sprite a centred anchor (or pivot) first. Sequence effects behind a game event by awaiting a handle's
done.Which effect plays on which event, and how much, is the game's business; this only moves.
Example