method
Tween.stop
Tween.stop(handle)
Stops a tween handle immediately and frees its slot back to the pool. Its value is frozen where it was, and Tween.done then reports it finished. Use it to cancel a motion early — an interrupted animation, an entity that despawned mid-tween — so long-lived games recycle handles instead of exhausting the pool.
Parameters
handlethe tween handle to stopExample
program Demo {
property Marker { n: int = 0 }
model M { Marker }
entry {
let h = Tween.to(0, 100, 60, 0)
Tween.stop(h) # cancel it now
quit()
}
}