Run function as animation using requestAnimationFrame
Function to be run as animation
If animation should start right away or just return callbacks
Callbacks to start animation (startAnimation) and stop animation (stopAnimation)
Run function as animation using requestAnimationFrame