🌈 Create new beautiful Compose Gradients with our new wesite ->
Class

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.

Source set: Common
public class VectorizedFloatAnimationSpec<V : AnimationVector> internal constructor(private val anims: Animations) : VectorizedFiniteAnimationSpec<V>

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.

Functions

getValueFromNanos

Source set: Common
override fun getValueFromNanos(
        playTimeNanos: Long,
        initialValue: V,
        targetValue: V,
        initialVelocity: V,
    ): V

Creates a VectorizedAnimationSpec from a FloatAnimationSpec. The given FloatAnimationSpec will be used to animate every dimension of the AnimationVector.

Parameters

anim the animation spec for animating each dimension of the AnimationVector

getVelocityFromNanos

Source set: Common
override fun getVelocityFromNanos(
        playTimeNanos: Long,
        initialValue: V,
        targetValue: V,
        initialVelocity: V,
    ): V

getEndVelocity

Source set: Common
override fun getEndVelocity(initialValue: V, targetValue: V, initialVelocity: V): V

getDurationNanos

Source set: Common
override fun getDurationNanos(initialValue: V, targetValue: V, initialVelocity: V): Long