Examples
const flipSystem = generateTweenFlipSystem(Position2DTween)
flipSystem(world) // swaps endpoints on matching completed tweensFunction
generateTweenFlipSystem<T>(tween: typeof Tween): SystemFuncCreates a system that swaps the endpoints of concrete tweens marked with
TweenFlip.
The returned system queries for the supplied concrete Tween
constructor and the flip marker. When a matching tween has
timeTaken >= duration, it swaps the from and to references. It leaves
timeTaken unchanged and does not inspect the tween’s flip boolean. If
the value remains at or beyond the duration, the endpoints are swapped again
the next time the system runs; combine it with TweenRepeat when
each new direction should start at time 0.
const flipSystem = generateTweenFlipSystem(Position2DTween)
flipSystem(world) // swaps endpoints on matching completed tweens