Jump to content
Search Community

MorphSVG beginner struggles

maldo test
Moderator Tag

Recommended Posts

Hey maldo and welcome to the GreenSock forums.

 

I'm a little confused. There isn't any reversing going on in terms of GSAP. Do you mean it looks like it's visually reversing? Think of it in terms of the program: it tries to animate the position of each point to the closest point in the next path. For your animations of paths 1->2->3->4, those points are further to the left which makes the line look like it's morphing to the left. However, for the animations of paths 4->5->6 are further to the right, so it looks like it's going that direction. 

 

To fix it, you should make the points go to the left each time. I would guess that the easiest way to do that would be to extend your path further to the left outside of the SVG's viewbox. Perhaps @PointC has some pointers for how to set this sort of thing up in a vector editor.

 

Side notes:

  • We highly recommend using GSAP 3 formatting. Upgrading is easy!
  • I think using defaults would save you time and make your code easier to maintain.
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...