Jump to content
Search Community

Callback when GSAP clock changes

Kishin Karra 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

Hi, 

Newbie here.

I know that when the app performance goes low, gsap automatically slows down the internal gsap clock and brings back to normal when the performance is back to normal.

 

I just want to know is there a direct way to find out wether the clock has changed or not?

 

One way is i can animate a dummy element from my timeline start to timeline end and check the time in onupdate.

But is there some direct callback/event which i can use?

 

Sorry if the question is absurd or doesnt make sense at all.

Link to comment
Share on other sites

I'm a bit confused about the "why" behind all this - if your goal is to synchronize your audio with a particular timeline, wouldn't it be much easier to just use an onUpdate on that timeline and check the time(), compared to your audio's time and if it drifts beyond a certain threshold, make your adjustment to the audio? 

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