Jump to content
Search Community

Keep three animations in sync

alint
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

Posted

Hello,

 

I have three animations running in the same time. The top part of a Law Balance Scale, the left weighting platform and the left weighting platform.

 

All three animaitons have the same duration and they are in sync when the page loads. After I scroll up/down on the page the three animations are out of sync. The top is moving fine but the left/right weighting platforms are out of wack.

 

Is there a way to keep the three animations in sync all the time?

 

Thank you.

 

Alin

Posted

Hello alint,

 

Do you have a code example of the behavior you describe.

 

Here is a nice video tut by GreenSock on how to create a codepen example demo.

 

This way by seeing your code in a live editable environment to better help you. We are glad to help, but it will be better to see code we can test and edit live!

 

Thanks! :)

Posted

Like Jonathan said, it'd be super helpful to see sample code because I can assure you that the entire GSAP system is completely synchronized across the board, so I'm really curious to see what you're doing. As far as I know, it's literally impossible to get things out of sync unless you have your own code that's not creating/starting the animations in sync.

 

Are you using TimelineLite or TimelineMax? Or are you just using TweenLite/TweenMax?

Posted

Here is a pen:

 

See the Pen qykJL by alinticlea (@alinticlea) on CodePen.

 

The problem is that I can not replicate the behaviour on codepen. The issue is related to something else on the page that I am building. The animation container comes in and goes out on scroll down/up. To animate the container move on scroll I am using ScrollScene from ScrollMagic.

 

I think I should stop the animation when scroll is detected. Is this possible?

 

Thank you.

 

Alin

Posted

Ok, I found the problem. As I suspected it was related to the ScrollScene.

 

TweenMax is rock solid, it works perfect.

 

Thank you.

 

Alin

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