Jump to content
Search Community

Manually calling GSAPs ticker

rag 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,

I'm exporting a canvas animation with CCapture. In that animation I have a repeating tween. As soon as I start capturing, the canvas framerate is dropping to about 30fps, but the Tweens FPS is still at 60, so in the exported video, the animation runs much faster. Is there a way to disable the requestAnimationFrame inside GSAP and manually call it's tick function? I could set the FPS to 30 but it's not really constant 30fps so I would end up with a tween with uneven timing. Or do you guys have any other ideas?

Link to comment
Share on other sites

I think need it the other way around - this allows me to hook into GSAPs ticker, but I need GSAP to hook into my ticker. This is because CCapture runs some magic that makes requestAnimationFrame run slower while rendering the video.

Link to comment
Share on other sites

You can disable GSAP's use of RaF and set a fps with the .ticker - I mean, do you know for a fact that is is running dead on 30fps?

 

Otherwise, the only way I can think of is if CCapture has a way to trigger a callback on each frame. Then, you could pause your animation and write a helper function to make it step one frame each time CCapture calls.

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