Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Changing TweenMax for TimelineMax makes animation slooooow

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 forked a pen from an the original by Nate Wiley. It works, using Tweenmax:

See the Pen jKGPvr by fvila (@fvila) on CodePen


I then changed TweenMax for a TimelineMax variable, in view of integrating into a larger project. It still works, but is much much slower

See the Pen oyGXWq by fvila (@fvila) on CodePen

Link to comment
Share on other sites

Thanks for the demos. There were 2 issues.


When you add tweens to a timeline, they naturally play one after the other. Your timeline tweens were set to repeat infinitely so technically the first tween never ended and the second tween never would play.


Those demos were using a VERY old version of TimelineMax. In recent versions TimelineMax detects infinitely repeating tweens and will put the NEXT tween after the first iteration of the previous tween. 


By using a position parameter instead of delay, I can tell each tween exactly when to start regardless of other repeating tweens:


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





  • Like 4
  • Thanks 1
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.