FloatDecayAnimationSpec

This animation interface is intended to be stateless, just like Animation. But unlike Animation, DecayAnimation does not have an end value defined. The end value is a result of the animation rather than an input.

Inheritors

Properties

Link copied to clipboard

This is the absolute value of a velocity threshold, below which the animation is considered finished.

Functions

Link copied to clipboard
abstract fun getDurationNanos(initialValue: Float, initialVelocity: Float): Long

Returns the duration of the decay animation, in nanoseconds.

Link copied to clipboard
abstract fun getTargetValue(initialValue: Float, initialVelocity: Float): Float

Returns the target value of the animation based on the starting condition of the animation ( i.e. start value and start velocity).

Link copied to clipboard
abstract fun getValueFromNanos(playTimeNanos: Long, initialValue: Float, initialVelocity: Float): Float

Returns the value of the animation at the given time.

Link copied to clipboard
abstract fun getVelocityFromNanos(playTimeNanos: Long, initialValue: Float, initialVelocity: Float): Float

Returns the velocity of the animation at the given time.