Jump to content

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

drawSVG start from the other end

Go to solution Solved by PointC,

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

Hello GS,


I have an stroke arc from 12o'clock to 6o'clock, when i tried animating it on using drawSVG plugin, it runs from 12o'clock to 6'oclock (ccw). Is there a way to reverse it to run from 6o'clock to 12o'clock? 




Link to comment
Share on other sites

  • Solution

Hi kakarlus :)


Please give this a try:

// forward
TweenMax.fromTo(yourElement, 1, {drawSVG:"0% 100%"}, {drawSVG:"100% 100% "});
// reverse
TweenMax.fromTo(yourElement, 1, {drawSVG:"100% 100%"}, {drawSVG:"0% 100% "});

Happy tweening.


  • Like 5
Link to comment
Share on other sites

You could also reverse the path in a graphics editor, or flip the path like this...

TweenLite.set(myPath, { scaleX: -1, transformOrigin: "center center" });

Depending on the orientation, you might have to use scaleY instead of scaleX, and/or adding "+=180" to the rotation.

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