Jump to content
Search Community

How can I make this path squiggle after morph?

H0BB5 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

Hey everyone! 

I have this button I am trying to make here. It is morphing between two svg's on the hover states.

What I am trying to achieve is allow the squiggly paths to continuously appear to wave when the hover is active. 

Rotating the circle doesn't quite achieve the affect, it's almost like I would need each path/curve to invert? 
The line-path I thought would be easier to achieve the waving effect but i'm having difficulty.

 

Thanks in advance :)

See the Pen rgYpVa by H0BB5 (@H0BB5) on CodePen

Link to comment
Share on other sites

If you play around with the parameters some you can get an effect closer to what I imagine you're looking for. Try this:

 

waveSVG(path, {taperStart:0, loose:true, invertFlow:true, length:120, angle:10, magnitude:1, phase:1, duration:2, start:0, repeat:-1});

 

  • Like 3
Link to comment
Share on other sites

3 hours ago, mikel said:

Hi @H0BB5,

 

If you draw two wave circles, correspondingly offset and morph, it can look like (like 'inverting the wave') this:

 

 

 

 

Happy morphing ...

Mikel

 

 

Very cool. This is a great approach. Thanks a lot @mikel

 

Question – why is it rotating. Is this because each svg is a little offset from the other? It looks like it is kind of 'stepping' each time it morphs

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