Refined a bit more and now use requestAnimationFrame instead of
setInterval.