---
title: "VectorizedRepeatableSpec"
description: "This animation takes another [VectorizedDurationBasedAnimationSpec] and plays it [iterations]
times. For infinitely repeating animation spec, [VectorizedInfiniteRepeatableSpec] is
recommended.

__Note__: When repeating in the [RepeatMode.Reverse] mode, it's highly recommended to have an
__odd__ number of iterations. Otherwise, the animation may jump to the end value when it finishes
the last iteration.

initialStartOffset can be used to either delay the start of the animation or to fast forward the
animation to a given play time. This start offset will **not** be repeated, whereas the delay in
the [animation] (if any) will be repeated. By default, the amount of offset is 0."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
public class VectorizedRepeatableSpec<V : AnimationVector>(
    private val iterations: Int,
    private val animation: VectorizedDurationBasedAnimationSpec<V>,
    private val repeatMode: RepeatMode = RepeatMode.Restart,
    initialStartOffset: StartOffset = StartOffset(0),
) : VectorizedFiniteAnimationSpec<V>
```


This animation takes another `VectorizedDurationBasedAnimationSpec` and plays it `iterations`
times. For infinitely repeating animation spec, `VectorizedInfiniteRepeatableSpec` is
recommended.

__Note__: When repeating in the `RepeatMode.Reverse` mode, it's highly recommended to have an
__odd__ number of iterations. Otherwise, the animation may jump to the end value when it finishes
the last iteration.

initialStartOffset can be used to either delay the start of the animation or to fast forward the
animation to a given play time. This start offset will **not** be repeated, whereas the delay in
the `animation` (if any) will be repeated. By default, the amount of offset is 0.

#### Parameters

| | |
| --- | --- |
| iterations | the count of iterations. Should be at least 1. |
| animation | the `VectorizedAnimationSpec` describing each repetition iteration. |
| repeatMode | whether animation should repeat by starting from the beginning (i.e. `RepeatMode.Restart`) or from the end (i.e. `RepeatMode.Reverse`) |
| initialStartOffset | offsets the start of the animation |



## Secondary Constructors

```kotlin
public constructor(
    iterations: Int,
    animation: VectorizedDurationBasedAnimationSpec<V>,
    repeatMode: RepeatMode = RepeatMode.Restart,
) : this(iterations, animation, repeatMode, StartOffset(0))
```


