Jump to content
Search Community

SVG with greensock, animating lines

celli 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've been experimenting with drawing paths with GSAP and SVG objects.

I noticed a few things, and wondering if there is a better way to accomplish these:


1. My codePen is using code that is great for multiple paths, even though I only have one circle-path on this one

2. I notice the transform X doesn't quite center the element (using xPercent:-50), maybe because it starts from the left center. Is there a good way to center these elements ?

3. It looks like any path I try always starts from the left center position, is there a way to start it from the top, or bottom or an other position I can set? I accomplished it starting from the top on this one, because it is a circle rotated by 90 degrees, but what if it wasn't a circle ? Is there another way to start the path drawing from another position ?

4. I found another codePen by Carl here 

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

, Is this a more efficient way to animate SVGs paths with GSAP ?

See the Pen kByDf by celli (@celli) on CodePen

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