Repeats for a specified duration.
Duration in milliseconds for how long the animation repeats.
Whether to display the final state after completing the duration.