# VectorizedSpringSpec

Artifact: [androidx.compose.animation:animation-core](https://developer.android.com/jetpack/androidx/releases/compose-animation) [View Source](https://cs.android.com/search?q=file:androidx/compose/animation/core/VectorizedAnimationSpec.kt+class:androidx.compose.animation.core.VectorizedSpringSpec) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0) Common/All
- Cmn

  ```
  class VectorizedSpringSpec<V : AnimationVector> : VectorizedFiniteAnimationSpec<V>
  ```

*** ** * ** ***

`https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec` uses spring animations to animate (each dimension of) `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector`s.

## Summary

| ### Public constructors |
|---|---|
| `<V : https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector> https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#VectorizedSpringSpec(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)( dampingRatio: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, stiffness: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, visibilityThreshold: V? )` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec` that uses the same spring constants (i.e. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)` and `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)` on all dimensions. | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#dampingRatio()` | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#stiffness()` | Cmn |

### Inherited functions

From [androidx.compose.animation.core.VectorizedAnimationSpec](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec#getDurationNanos(androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(initialValue: V, targetValue: V, initialVelocity: V)`

Calculates the duration of an animation.
Cmn `open V` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec#getEndVelocity(androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(initialValue: V, targetValue: V, initialVelocity: V)`

Calculates the end velocity of the animation with the provided start/end values, and start velocity.
Cmn `open V` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec#getValueFromNanos(kotlin.Long,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(
playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html,
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.
Cmn `open V` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec#getVelocityFromNanos(kotlin.Long,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector,androidx.compose.animation.core.AnimationVector)(
playTimeNanos: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html,
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.
Cmn

### Inherited properties

From [androidx.compose.animation.core.VectorizedFiniteAnimationSpec](https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedFiniteAnimationSpec) `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedFiniteAnimationSpec#isInfinite()`

Whether or not the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec` specifies an infinite animation.
Cmn

## Public constructors

### VectorizedSpringSpec

Cmn

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

Creates a `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec` that uses the same spring constants (i.e. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)` and `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)` on all dimensions. The optional `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/VectorizedSpringSpec#(kotlin.Float,kotlin.Float,androidx.compose.animation.core.AnimationVector)` defines when the animation should be considered to be visually close enough to target to stop. By default, `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DefaultDisplacementThreshold()` is used on all dimensions of the `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationVector`.

| Parameters |
|---|---|
| `dampingRatio: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Spring.DampingRatioNoBouncy` | damping ratio of the spring. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#DampingRatioNoBouncy()` by default. |
| `stiffness: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = Spring.StiffnessMedium` | stiffness of the spring. `https://developer.android.com/reference/kotlin/androidx/compose/animation/core/Spring#StiffnessMedium()` by default. |
| `visibilityThreshold: V? = null` | specifies the visibility threshold for each dimension. |

## Public properties

### dampingRatio

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
val dampingRatio: Float
```

### stiffness

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-animation#1.0.0)

```
val stiffness: Float
```