VectorizedInfiniteRepeatableSpec

Class

Common
public class VectorizedInfiniteRepeatableSpec<V : AnimationVector>(
    private val animation: VectorizedDurationBasedAnimationSpec<V>,
    private val repeatMode: RepeatMode = RepeatMode.Restart,
    initialStartOffset: StartOffset = StartOffset(0),
) : VectorizedAnimationSpec<V>

This animation takes another VectorizedDurationBasedAnimationSpec and plays it infinite times.

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

animationthe VectorizedAnimationSpec describing each repetition iteration.
repeatModewhether animation should repeat by starting from the beginning (i.e. RepeatMode.Restart) or from the end (i.e. RepeatMode.Reverse)
initialStartOffsetoffsets the start of the animation

Secondary Constructors

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