Jump to content
Search Community

Why is animation added before label not playing when seek label and pause?

Peach2tm test
Moderator Tag

Recommended Posts

That's because by default, .seek() has suppressEvents set to true. Think of it like a record player where you'd pick up the needle, move it, and drop it in the new place rather than dragging it across the record. The needle is the playhead. No callbacks between the old position and the new position are triggered (they're suppressed). If you want to trigger them, just set the suppressEvents parameter to false: 

tl.seek("runwayStarted", false);

 

Happy tweening!

  • Like 2
Link to comment
Share on other sites

3 hours ago, GreenSock said:

That's because by default, .seek() has suppressEvents set to true. Think of it like a record player where you'd pick up the needle, move it, and drop it in the new place rather than dragging it across the record. The needle is the playhead. No callbacks between the old position and the new position are triggered (they're suppressed). If you want to trigger them, just set the suppressEvents parameter to false: 


tl.seek("runwayStarted", false);

 

Happy tweening!

TIL 🧠

In terms of the tweens being 'observed' - they kind of are and they kind of aren't. The timeline skips to a certain point and the state of the elements at that particular point is observed - but they don't 'play'

I've updated this pen to rotate and scale the plane so that it's easier to see the difference between the first two tweens and the last two.

At the label the plane's been scaled up and rotated, and it's ready to continue on with the rest of the animation - but as Jack said - it's like lifting a record needle up and popping it down at that point in the animation. We don't see the plane move to that position. 

See the Pen abWZNqm by svganimationworkshop (@svganimationworkshop) on CodePen

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...