Jump to content
Search Community

How to play a part of TimelineLite?

trsh test
Moderator Tag

Go to solution Solved by OSUblake,

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 want to play a Portion of my timeline - by seconds, progress or frames (whatever). For example:

 

1) Timeline is 10 secs

2) I want to play from 5 sec to 7 sec.

3) Add pause I think will not serve very well, as those portions change dynamically :/

 

Can't figure out from documentation, how to do this. 

Link to comment
Share on other sites

True, but CDNs are faster, and there's a good chance that GSAP is already cached. Last time I checked, GSAP was in the top 20 most used libraries, so it's not obscure. I would worry about optimizing assets like images, fonts, and css, over libraries that can served over a CDN, but to each their own.

  • Like 1
Link to comment
Share on other sites

I'd echo Blake's sentiments. And really, the difference between TimelineLite and TimelineMax is very minor, especially in the context of all the other assets you're loading. It might make your page load 20ms faster for the typical user (totally guessing) which is imperceptible. Also keep in mind that you may have to write more custom code to achieve the effects you want, like instead of .tweenFromTo(), you have to write a whole tween (or more), so it may end up costing you just as much in terms of kb (or more) to go with TimelineLite instead of TimelineMax. But it's totally up to you, of course. I just see a lot of people myopically focus on file size instead of actual performance. Please read http://greensock.com/kilobyte-conundrum/ 

 

Again, I don't mean to criticize or be argumentative at all. 

 

Happy tweening!

  • Like 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.
×
×
  • Create New...