Examples
const timerSystem = generateTweenTimerSystem(Position2DTween)
app.registerSystem({ schedule: AppSchedule.Update, system: timerSystem })Function
generateTweenTimerSystem<T>(tween: typeof Tween): SystemFuncCreates a system that advances the elapsed time of a concrete tween type.
Each time the returned system runs, it reads the current delta from the
world’s VirtualClock once, then updates every entity containing the
supplied Tween constructor with Math.min(timeTaken + delta, duration). It does not require repeat or flip markers, reset time, update
finish, or apply easing. The assignment is an upper cap only; negative
deltas are not clamped to zero.
The returned system requires a VirtualClock resource; a missing
clock makes its resource lookup fail.
const timerSystem = generateTweenTimerSystem(Position2DTween)
app.registerSystem({ schedule: AppSchedule.Update, system: timerSystem })