Do you want smooth JavaScript animation?

Creating animation in the JavaScript is simple. Most devs likely have used either setInterval() or setTimeout() functions.

function draw() {
// Drawing code goes here
}
setInterval(draw, 100);
function draw() {
setTimeout(draw, 100);
// Drawing code goes here
}
draw();

Both are actually a great choice. It will execute every millisecond. You can perform a repainting on each execution.


Hello, please ignore this blog. You will get an intresting blogs from next post. :)

Ramesh Murukesan

I am a techie guy born in India, developing products to fulfil gaps in technology.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store