rememberAnimationState
fun rememberAnimationState(animationIndex: Int? = 0, speed: Float = 1.0f, crossFadeDuration: Float = 0.3f, loop: Boolean = true): AnimationState
Creates and remembers an AnimationState. Initial values seed the state on first composition; afterwards mutate the returned object's fields to drive playback.
Parameters
animationIndex
Animation to start playing. Null to start paused.
speed
Playback rate multiplier.
crossFadeDuration
Seconds to blend over when AnimationState.animationIndex changes.
loop
Whether the active animation loops.