Android 12 Developer Preview is here! Try it out, and give us your feedback!

VectorizedFloatAnimationSpec

class VectorizedFloatAnimationSpec<V : AnimationVector> : VectorizedFiniteAnimationSpec<V>
kotlin.Any
   ↳ androidx.compose.animation.core.VectorizedFloatAnimationSpec

A convenient implementation of VectorizedFloatAnimationSpec that turns a FloatAnimationSpec into a multi-dimensional VectorizedFloatAnimationSpec, by using the same FloatAnimationSpec on each dimension of the AnimationVector that is being animated.

Summary

Public constructors

Creates a VectorizedAnimationSpec from a FloatAnimationSpec.

Public methods
Long
getDurationNanos(initialValue: V, targetValue: V, initialVelocity: V)

Calculates the duration of an animation.

V
getEndVelocity(initialValue: V, targetValue: V, initialVelocity: V)

Calculates the end velocity of the animation with the provided start/end values, and start velocity.

V
getValueFromNanos(playTimeNanos: Long, initialValue: V, targetValue: V, initialVelocity: V)

Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity.

V
getVelocityFromNanos(playTimeNanos: Long, initialValue: V, targetValue: V, initialVelocity: V)

Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity.

Inherited functions
Inherited properties