Jump to content
Search Community

How can i make the circle loop nicely?

Triable test
Moderator Tag

Recommended Posts

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
Link to comment
Share on other sites

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