Jump to content
Search Community

Stagger by columns

marko krstic 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

I'm not sure I understand the question - are you asking us to read through all the source code and show you how to rebuild it with GSAP? Or you just asking if it's possible? 

 

As far as I know, GSAP can do everything anime.js can do plus a whole lot more (though I don't mean that as an insult to anime.js at all which I have lots of respect for). So yes, I'm sure it's entirely possible to do virtually any animation using GSAP. 

 

Is there a particular GSAP-related question we can help with? I'd love to help, I'm just not totally sure what you're asking here. 

  • Like 1
Link to comment
Share on other sites

Ah, if I understand your goal correctly, that's a perfect use case for advanced staggers and the "distributeByPosition()" helper function. 

 

Here's a fork: 

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

 

That helper function allows you to distribute the stagger based on the position of elements. Notice I set axis:"x" so that it only factors in the x-coordinate of the elements (by default it's both x and y coordinates). 

 

Is that what you were looking for? 

 

Here's more info on advanced staggers: 

See the Pen jdawKx by GreenSock (@GreenSock) on CodePen

  • Like 4
Link to comment
Share on other sites

  • 2 years later...

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