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

staticcancelAll():Void

Cancels every running tween (state teardown).

staticstep(dtMs:Float):Void

Advances all running tweens; called once per frame by UIRoot.

Parameters:

dtMs

elapsed time since the last step, in milliseconds

@:value({ ease : OUT_QUAD })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 (LINEAR/OUT_QUAD/OUT_BACK/IN_QUAD)

onComplete

fired once after the final value is delivered

Returns:

the running tween (hold it only if you may cancel())

Methods

cancel():Void

Stops the tween without completing it.