Stop generating frames when the animation is complete