adds requestAnimationFrame for animation-loop