Allow a custom timing function to be specified for the animation.