TEA-compatible tween primitive.
A Tween tracks animation progress (0→1) over a given duration. Drive it by dispatching a Tick({ deltaTime }) message on each animation frame and calling tweenStep in the update function.
Tick({ deltaTime })
tweenStep
Wire the tick via foldkit's Subscription.animationFrameEntry:
Subscription.animationFrameEntry
Subscription.animationFrameEntry({ isActive: (model) => !allTweensDone(model.tweens), toMessage: (dt) => Ticked({ dt }),}) Copy
Subscription.animationFrameEntry({ isActive: (model) => !allTweensDone(model.tweens), toMessage: (dt) => Ticked({ dt }),})
TEA-compatible tween primitive.
A Tween tracks animation progress (0→1) over a given duration. Drive it by dispatching a
Tick({ deltaTime })message on each animation frame and callingtweenStepin the update function.Wire the tick via foldkit's
Subscription.animationFrameEntry: