Jump to content
Search Community

Creating a cascade effect.

Euden 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 trying to create a cascade effect on a number of sprites using staggerTo.

 

The idea is to have all sprites on the press of a button, drop off the screen (staggered) and stagger back in (after changing their textures) from the top to their original positions, giving the illusion of a 'refresh'. I'd also like the icons to shift downward after one disappears but first I'd like to get the refresh working.

 

Does anyone have any advice on the best way to do it? My initial thought was to add a reset function that onComplete, somehow give it the sprite who's original position is statically recorded inside, then ask the sprite to tween normally to it's initial position, given that each tween is delayed this should do it before the previous tween is finished.

 

Your help is greatly appreciated :)

 

Euden

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