Contents

repeat(duration:)

Repeats an animation for the specified amount of time.

Declaration

@MainActor @preconcurrency func `repeat`(duration: TimeInterval = .infinity) -> AnimationResource

Parameters

  • 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.

See Also

Creating an animation resource