Jump to content
Search Community

Recommended Posts

Posted (edited)

I'm making an animation that pulses and has a circle that grow. I got the pulse and growing, but I can't seem to make it loop nicely. Anyone got any ideas?

I have a reference video, but it is to big to upload unfortunately.

 

Thanks in advance

 

Edit: codepen is changed to the finished animation

See the Pen VwLEobq by Triable (@Triable) on CodePen.

Edited by Triable
codepen has changed
ZachSaucier
Posted

Hey Triable, welcome to the GreenSock forums!

 

A video would be incredibly helpful. Maybe you could host it on YouTube unlisted and share the link with us? It's not clear what you want to happen, especially with the red ring.

  • Like 1
Posted

Great idea!

 

here is the link: 

 

 

ZachSaucier
Posted

Doing rings like that is actually not a very trivial thing in the DOM. Since outside clip paths don't exist with DOM elements, to do that with DOM elements properly you should use a clever clip path trick. That's what I used in this pen. However, animating clip paths is not very performant. Other hacky ways may exist depending on your exact use case.

 

I'd recommend doing this in Canvas. With Canvas it's much more trivial to create rings using the arc command. It's probably best to make a more abstract ring object whose values you can then animate. 

  • Like 1
Posted

If you want to make it work with SVG you could do something like this:

 

See the Pen XWbyrOv by PointC (@PointC) on CodePen.

 

Hopefully that helps. Happy tweening.

:)

 

  • Like 5
ZachSaucier
Posted
13 minutes ago, PointC said:

If you want to make it work with SVG you could do something like this

Doh, I forgot about strokes :) Good work.

  • Haha 1
Posted

Thank you all for your help! I was able to get exaclty what I wanted. Thanks again for your help!

  • Like 1

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...