tween
tween<
C>(game,e,component,to,options?): () =>void
Animates numeric fields of one entity’s component to target values:
tween(game, e, Position, { y: 100 }, { duration: 0.5, ease: ease.out }). Starts from the current values,
stops by itself when done or when the entity loses the component, and returns a function that cancels it.
Inside a scene it ends with the scene. Fields are interpolated as plain numbers, so use mixColor for Sprite.tint.
Type Parameters
Section titled “Type Parameters”C extends Component
Parameters
Section titled “Parameters”number
component
Section titled “component”C
Values<C>
options?
Section titled “options?”Returns
Section titled “Returns”() => void
