Repeating an animation at changing speeds