Animation using the requestAnimationFrame