SpringSpec
-
Cmn
class SpringSpec<T : Any?> : FiniteAnimationSpec
Creates a SpringSpec that uses the given spring constants (i.e. dampingRatio and stiffness. The optional visibilityThreshold defines when the animation should be considered to be visually close enough to round off to its target.
Summary
Public constructors |
|
|---|---|
<T : Any?> SpringSpec( |
Cmn
|
Public functions |
||
|---|---|---|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
open VectorizedSpringSpec<V> |
<V : AnimationVector> vectorize(converter: TwoWayConverter<T, V>)Creates a |
Cmn
|
Public properties |
||
|---|---|---|
Float |
damping ratio of the spring. |
Cmn
|
Float |
stiffness of the spring. |
Cmn
|
T? |
specifies the visibility threshold |
Cmn
|
Public constructors
SpringSpec
<T : Any?> SpringSpec(
dampingRatio: Float = Spring.DampingRatioNoBouncy,
stiffness: Float = Spring.StiffnessMedium,
visibilityThreshold: T? = null
)
| Parameters | |
|---|---|
dampingRatio: Float = Spring.DampingRatioNoBouncy |
damping ratio of the spring. |
stiffness: Float = Spring.StiffnessMedium |
stiffness of the spring. |
visibilityThreshold: T? = null |
specifies the visibility threshold |
Public functions
vectorize
open fun <V : AnimationVector> vectorize(converter: TwoWayConverter<T, V>): VectorizedSpringSpec<V>
Creates a VectorizedAnimationSpec with the given TwoWayConverter.
The underlying animation system operates on AnimationVectors. T will be converted to AnimationVector to animate. VectorizedAnimationSpec describes how the converted AnimationVector should be animated. E.g. The animation could simply interpolate between the start and end values (i.e.TweenSpec), or apply spring physics to produce the motion (i.e. SpringSpec), etc)
| Parameters | |
|---|---|
converter: TwoWayConverter<T, V> |
converts the type |
Public properties
dampingRatio
val dampingRatio: Float
damping ratio of the spring. Spring.DampingRatioNoBouncy by default.