final class UITween
package smidr
Minimal pooled tween used for UI motion (dropdown pops, button dips, toasts).
One driver (UIRoot) calls step(dtMs) per frame; starting a tween reuses a pooled
instance, so steady-state UI motion performs zero allocations. Values are plain floats
delivered through a setter — no reflection, no Dynamic. Easing curves are UIEase values.
Static methods
staticstep(dtMs:Float):Void
Advances all running tweens; called once per frame by UIRoot.
Parameters:
dtMs | elapsed time since the last step, in milliseconds |
|---|
staticto(setter:Float ‑> Void, from:Float, to:Float, durationMs:Float, ease:UIEase = OUT_QUAD, ?onComplete:() ‑> Void):UITween
Starts a tween from a pooled instance (the setter is called immediately with from).
Parameters:
setter | receives the interpolated value each step |
|---|---|
from | the start value |
to | the end value |
durationMs | total duration in milliseconds (clamped to >= 1) |
ease | the easing curve ( |
onComplete | fired once after the final value is delivered |
Returns:
the running tween (hold it only if you may cancel())