Jump to content
Search Community

Newbie Confusion ...

Kodertian test
Moderator Tag

Recommended Posts

Hi. I'm new to GSAP and after doing some exercises and watching some videos I'm actually getting lost in regards of which library to use. For example, you can use the stagger functionality from both gsap.to and TweenMax. By checking the Docs portion of the Greensock website, the left menu is divided in : gsap, tween and timeline... Can someone please give me an overview of how GSAP is structured?

Link to comment
Share on other sites

Ah, you must be watching a mix of old and new videos. 

 

Forget about TweenMax, TweenLite, TimelineLite, and TimelineMax - in version 3, those were basically all combined into one central "gsap" object. Much simpler. We shaved off file size too.

 

For example...

// OLD
TweenMax.to(".class", 2, {x: 100});

// NEW
gsap.to(".class", {duration: 2, x: 100});

You can see all the details in the migration guide at

 

 

Staggering is much easier in v3 too. ANY tween can have a stagger applied. In the old GSAP, you had to use a specific method like TweenMax.staggerTo(). 

// OLD
TweenMax.staggerTo(".class", 2, {x: 100}, 0.5);

// NEW
gsap.to(".class", {duration: 2, x: 100, stagger: 0.5});

I hope that helps. 

 

I'd strongly recommend going through our "getting started" post/video at

 

You might also want to check out @Carl's video course at https://courses.snorkl.tv/courses/gsap-3-express?ref=44f484

 

And there's a brand new tutorial site that covers a lot of GSAP stuff at https://motiontricks.com from one of our outstanding moderators, @PointC - that site covers only v3, so you don't need to worry about old syntax. Same with Carl's stuff. 

 

Happy tweening!

 

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