Skip to content

What happens if I start tweening an property that is already being tweened #29

Answered by KyryloKuzyk
dzitsiuk asked this question in FAQ
Discussion options

You must be logged in to vote

Great question, thank you! I have internal documentation for this behavior, but decided not to overwhelm users in the public docs.

The latest alive tween will overwrite all the previous tweens on the same target. So in the case of your example, for the first second, the image's color will be animated from white to black, then the color will change abruptly to somewhat reddish, and for the next 9f seconds, it will be animated towards blue. So in this particular case, you should stop the previous long tween before starting a new one to prevent this, I assume, undesirable behavior.

A similar conflict may happen if duplicated tweens have startDelay or endDelay: while one tween is waiting, the…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@KyryloKuzyk
Comment options

@KyryloKuzyk
Comment options

Answer selected by dzitsiuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
FAQ
Labels
None yet
2 participants