Jump to content
GreenSock

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

Janky MorphSVG shape transition

Recommended Posts

I've been experimenting with the morphsvg plugin on codepen (also new to gsap). In the pen, if you click on the plus the shape morphs from a cirlce path to a rounded rectangle shape. The transition looks a little wonky and I'm not sure why. I'd like it to transition from the bottom center of the circle into the rounded rectangle shape, is there a way to achieve this, or is there a better approach to this?

See the Pen NWxBmwx by jdillon (@jdillon) on CodePen

Share this post


Link to post
Share on other sites

Hi @jdillon :)

 

Welcome to the forum.

 

I'm not sure a morph is really needed here. I'd probably just animate the height of the rectangle. Maybe something like this.

See the Pen 4e3584624979c40c5351536d8aeb62fc by PointC (@PointC) on CodePen

 

Happy tweening and welcome aboard.

:)

 

  • Like 4

Share this post


Link to post
Share on other sites

Nice and simple - I look forward to gaining more experience with gsap - thank you sir! :)

  • Like 2

Share this post


Link to post
Share on other sites

Happy to help. That's how we roll in the GreenSock neighborhood. Let us know if you have more GSAP related questions. If you haven't yet, check out the learning section. Lots of good stuff in there. https://greensock.com/learning/

 

  • Like 3

Share this post


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.

×