Triable Posted March 25, 2020 Share Posted March 25, 2020 (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 March 25, 2020 by Triable codepen has changed Link to comment Share on other sites More sharing options...
ZachSaucier Posted March 25, 2020 Share Posted March 25, 2020 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. 1 Link to comment Share on other sites More sharing options...
Triable Posted March 25, 2020 Author Share Posted March 25, 2020 Great idea! here is the link: Link to comment Share on other sites More sharing options...
ZachSaucier Posted March 25, 2020 Share Posted March 25, 2020 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. 1 Link to comment Share on other sites More sharing options...
Shrug ¯\_(ツ)_/¯ Posted March 25, 2020 Share Posted March 25, 2020 Hi @Triable, indeed welcome to GreenSock and the forums. Here is an older thread with pulsing circles Or many others which are relative can be found also in the link below, maybe something will help you. https://www.google.com/search?q=tweenmax+pulse+site%3Acodepen.io 4 Link to comment Share on other sites More sharing options...
PointC Posted March 25, 2020 Share Posted March 25, 2020 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. 5 Link to comment Share on other sites More sharing options...
ZachSaucier Posted March 25, 2020 Share Posted March 25, 2020 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. 1 Link to comment Share on other sites More sharing options...
mikel Posted March 25, 2020 Share Posted March 25, 2020 just a variation of the concept of @PointC: with 'special ease' See the Pen bGdQNrV by mikeK (@mikeK) on CodePen Happy tweening ... Mikel 1 Link to comment Share on other sites More sharing options...
Triable Posted March 25, 2020 Author Share Posted March 25, 2020 Thank you all for your help! I was able to get exaclty what I wanted. Thanks again for your help! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now