repeat(duration:)
Repeats an animation for the specified amount of time.
Declaration
@MainActor @preconcurrency func `repeat`(duration: TimeInterval = .infinity) -> AnimationResourceParameters
- duration:
The amount of time that the animation should play. If you omit this parameter, the animation loops indefinitely.
Return Value
A new animation resource that you play on an entity by calling the entity’s playAnimation(_:transitionDuration:startsPaused:) method.