Google is committed to advancing racial equity for Black communities. See how.

VectorizedSpringSpec

class VectorizedSpringSpec<V : AnimationVector> : VectorizedAnimationSpec<V>
kotlin.Any
   ↳ androidx.compose.animation.core.VectorizedSpringSpec

VectorizedSpringSpec uses spring animations to animate (each dimension of) AnimationVectors.

Summary

Public constructors
<init>(dampingRatio: Float = Spring.DampingRatioNoBouncy, stiffness: Float = Spring.StiffnessMedium, visibilityThreshold: V? = null)

Creates a VectorizedSpringSpec that uses the same spring constants (i.

Properties
Float

Float

Public constructors

<init>

VectorizedSpringSpec(
    dampingRatio: Float = Spring.DampingRatioNoBouncy,
    stiffness: Float = Spring.StiffnessMedium,
    visibilityThreshold: V? = null)

Creates a VectorizedSpringSpec that uses the same spring constants (i.e. dampingRatio and stiffness on all dimensions. The optional visibilityThreshold defines when the animation should be considered to be visually close enough to target to stop. By default, Spring.DefaultDisplacementThreshold is used on all dimensions of the AnimationVector.

Parameters
dampingRatio: Float = Spring.DampingRatioNoBouncy damping ratio of the spring. Spring.DampingRatioNoBouncy by default.
stiffness: Float = Spring.StiffnessMedium stiffness of the spring. Spring.StiffnessMedium by default.
visibilityThreshold: V? = null specifies the visibility threshold for each dimension.

Properties

dampingRatio

val dampingRatio: Float

stiffness

val stiffness: Float