Runs an animation. If no duration is provided, the animation will run indefinitely, and call callback with the time since start as first argument. If a duration is provided, the first callback argument is instead the proportion of the duration passed (between 0 and 1). The second callback argument is the time difference since the last animation frame, and the third callback argument is a cancel() function to stop the animation.
Applies an easing function to a number t between 0 and 1. Options include quad, cubic, quart, quint, circ, sine, exp, back, elastic, swing, spring and bounce, optionally followed by -in or -out. The s parameter is only used by back and elastic easing.