Added api function to specify speed factor of an animation