Share Posted May 1, 2020 Just started using GSAP and am a bit stumped on my next steps for this SVG morph...I like what i have going so far but is there a way to know continue the animation so the middle two paths morph into an "x"??? See the Pen ZEbXoLm by MarkDonatelli (@MarkDonatelli) on CodePen Link to comment Share on other sites More sharing options...
Share Posted May 1, 2020 Hi and welcome to the forum. You'd just need a morph target for each of those paths. In this case, I'd think actual line elements would be much easier to use rather than paths. You could then easily animate the x1, x2/y1, y2 attributes of the line and/or rotate it into position with no morph requirement. Not that morphing this is bad or wrong. Just a general observation and my two cents worth. YMMV. Happy tweening. 3 Link to comment Share on other sites More sharing options...
Share Posted May 1, 2020 Hey Mark and welcome. There are other threads that ask about animating hamburger icons that you could take a look at as well: And one from @elegantseagulls See the Pen QyyzVX by ryan_labar (@ryan_labar) on CodePen 2 Link to comment Share on other sites More sharing options...
Share Posted May 1, 2020 Here's an oldie but a goodie I made a couple years ago. (Featuring DrawSVG) Freshly updated to GSAP 3. See the Pen zLbxzO by PointC (@PointC) on CodePen 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now