29 Jun 2016

This article will take about 1 minute to read.
No comments

For a current project I’m on, we needed both circular timer, and progress bar. Again, I wasn’t able to find small library to do that. But I found awesome answer on Stack Overflow, decided SVG is way to go, and wrote Sektor.

Sektor is a plain JavaScript library that draws circle sector (or an arc). Once it is drawn, you can change it’s angle and animate the change.

Sektor - draw and animate SVG circle

It works in every browser with SVG and requestAnimationFrane support (IE10+ and modern browsers). Check demo and docs.

I may use this for example how much better is to use requestAnimationFrame than setInterval. If you are bored, try it yourself, and you’ll see that animating using requestAnimationFrame is way smoother.

React component is coming soon as well. Cheers!


No comments, be the first to comment

Sending failed, please try again.
Thank you! Your comment is sent. Please note that all of the comments go through moderation.