Jump to content

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

SVG wave animation

Recommended Posts

I added an option to show the points in case it's not clear what's going on. Each point is animated between the minRadius and maxRadius at a certain angle. And on every update, the catmull-rom/cardinal function creates a smooth path between all the points in a blob.


See the Pen vdzjyg by osublake (@osublake) on CodePen



  • Like 3
Link to comment
Share on other sites

12 hours ago, OSUblake said:

And don't be afraid to experiment. Everybody writes bad code, and everybody starts out at the same level. I was a total n00b at one point in time.


Appreciate the insight & advice, very interesting to hear. Also just checked the pen again & saw show points ... very cool!

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
On 2/24/2018 at 11:46 PM, OSUblake said:

How's this @smallio


Create your blob like so. The options should be easy enough to understand.


var blob1 = createBlob({
  element: document.querySelector("#path1"),
  numPoints: 20,
  centerX: 500,
  centerY: 500,
  minRadius: 300,
  maxRadius: 325,
  minDuration: 1,
  maxDuration: 2



See the Pen vdzjyg by osublake (@osublake) on CodePen



@OSUblake How we can change width and height of this blob?

Link to comment
Share on other sites

Hi matthee,


Welcome to the forums.


An easy approach would be to put your paths in a group and scale the group like


TweenMax.to("#blobs", 3, {scale:4, repeat:-1, yoyo:true, transformOrigin:"center"})


See the Pen OBVdNN?editors=0010 by GreenSock (@GreenSock) on CodePen


if you don't want to animate the scaling, use set() – which is a tween with no duration.


TweenMax.set("#blobs",  {scale:4, repeat:-1, yoyo:true, transformOrigin:"center"});


edit: updated with proper pen


Link to comment
Share on other sites

@Carl thanks for your reply!

But is this possible to change width and height like that?Screenshot_at_18-03-41.png 


Link to comment
Share on other sites

Hi @matthee,


Here are some additional comments on CARL's great example.

With '.fromTo' the range of scaling can be defined. With separate tweens per axis, the axes can be animated offset (different durations). Depending on the scaling the SVG should be set with 'overflow: visible'.

And: Try out the options that @OSUblake offers: for example 'centerY' or 'numPoints' ...


See the Pen jePRLb by mikeK (@mikeK) on CodePen


happy tweening and a unique blob ...




  • Like 1
Link to comment
Share on other sites

  • 4 months later...
On 3/17/2017 at 12:49 PM, peacepostman said:



I've adapted an existant codepen to a jquery plugin in order to animate a svg into a random wave effect. I managed to use tweenMax in order to smooth the animation but i dont know if i've done that properly or if something can be improved or re-writed in a more clever way.


Feel free to copy the jquery plugin if you need it :)


Best regards,

See the Pen jBavvN by peacepostman (@peacepostman) on CodePen


How to remove the resize effect on windows resize, and keep it always at 100% in width?


Link to comment
Share on other sites



I am not sure I understand what you are asking for here, can you rephrase it please?

Link to comment
Share on other sites

  • 5 months later...

Can any one help me to animate the sea waves hitting wall and rebounding back?

Link to comment
Share on other sites

Hey @ABS,


Welcome to the GreenSock Forum.


It would be great to create a new topic for such a question.


AND: Where's the wall? What kind of wave?
Please provide a reduced CodePen to imagine what you want to animate.


Kind regards


Link to comment
Share on other sites

Hello sir,


I have attached HTML file with this message.


Thank you



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.