Jump to content
Search Community

Counter - animation not following timeline

harp30 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I read your code a few times, and your question, but I don't really understand what the desired behavior is or what you mean by "and the tween prior doesn't finish". Can you please clarify?

 

What looked very odd to me is that you've got an onComplete in a staggerTo() call...which means that onComplete will get called once for every element in the array/NodeList, and then inside that onComplete you're adding a new tween to that parent timeline at a relative time of "-=2". So you're stacking up a bunch of those that overlap and are fighting for control of the same element/value. And you can't even see the effect because by the time those animations are running, you've already faded out the element that's meant to display it. So I'm quite confused :)

Link to comment
Share on other sites

Yes I’m also beyond confused. I think I need to take a proper GSAP course. I love it but I always make it complicated than it is.

 

the effect I was trying to create was this one:

https://kalpa.parmigiani.com/en/

 

but my effect disappears right when the counter starts. I was following a gsap counter demo on code pen.io.

 

Im not sure how to fix it. Is there any course or ebook that can help me write proper gsap code?

Link to comment
Share on other sites

Ah, maybe you were looking for something like this?: 

See the Pen c302e65496bfb04c09cab3a88231cd54?editors=0010 by GreenSock (@GreenSock) on CodePen

 

As for learning, yeah, there are a bunch of resources at https://greensock.com/learning/. The "official" book and video training is described at https://greensock.com/video-training, but there are plenty of other resources, some of which are totally free. 

 

And don't worry - a lot of people tend to over-complicate things initially. Once you get some practice in and familiarize yourself with the API/Docs, you'll feel a lot more confident and capable. Hanging around these forums can be a huge help too, as you watch how other people do things. It can spur a lot of growth in you as a developer and animator. 

 

Enjoy the ride!

  • 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...