Jump to content
GreenSock

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

DrawSVG animation delay on every subsequent 'path'

Recommended Posts

Hi everyone,

 

I am trying to perform an animation with a delay on every subsequent SVG 'path'. In this Codepen link you can see that every letter of the SVG logo is separated by a 'path'. How do I perform a DrawSVG animation delay for each path, similar to how it looks like in here. This was animated using Anime.js, but sadly it couldn't control the animation using events as good as DrawSVG, but the delay of each letter was what I'm looking for. Is there a quick way to do this? Or would I have to manually delay every path by giving it IDs?

 

Thanks

See the Pen PQEWYy by aahlfeeyann (@aahlfeeyann) on CodePen

Link to post
Share on other sites

You can do that by using stagger tweens but when you use stagger tweens, it returns an array of all tweens. So to work around that you need to include your tween in timeline as container so you can access the play reverse methods. 

You can read more about stagger tweens in the docs, also there are some great video tutorials on GreenSock channel on YouTube 

 

 

 

See the Pen GQyrde?editors=0010 by Sahil89 (@Sahil89) on CodePen

 

  • Like 5
Link to post
Share on other sites

Hi Sahil,

 

That's an amazing solution. Apologies for not looking up the Youtube channel. I'm very new to GSAP and this is my first project trying out. Your solution is amazing, + with easings it makes the animation look really cool!

 

Thanks!

  • Like 3
Link to post
Share on other sites

No it's ok, everybody starts from somewhere. Don't hesitate to post any questions.

  • Like 1
Link to post
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.

×