DecayAnimation
DecayAnimation is an animation that slows down from initialVelocityVector as time goes on. DecayAnimation is stateless, and it does not have any concept of lifecycle. It serves as an animation calculation engine that supports convenient query of value/velocity given a play time. To achieve that, DecayAnimation stores all the animation related information: initialValue, initialVelocityVector, decay animation spec, typeConverter.
Note: Unless there's a need to control the timing manually, it's generally recommended to use higher level animation APIs that build on top DecayAnimation, such as com.jakewharton.mosaic.animation.Animatable.animateDecay, com.jakewharton.mosaic.animation.animateDecay, etc.
See also
Constructors
DecayAnimation is an animation that slows down from initialVelocityVector as time goes on. DecayAnimation is stateless, and it does not have any concept of lifecycle. It serves as an animation calculation engine that supports convenient query of value/velocity given a play time. To achieve that, DecayAnimation stores all the animation related information: initialValue, initialVelocityVector, decay animation spec, typeConverter.
DecayAnimation is an animation that slows down from initialVelocity as time goes on. DecayAnimation is stateless, and it does not have any concept of lifecycle. It serves as an animation calculation engine that supports convenient query of value/velocity given a play time. To achieve that, DecayAnimation stores all the animation related information: initialValue, initialVelocity, animationSpec, typeConverter.
Properties
This amount of time in nanoseconds that the animation will run before it finishes
Whether or not the Animation represents an infinite animation. That is, one that will not finish by itself, one that needs an external action to stop. For examples, an indeterminate progress bar, which will only stop when it is removed from the composition.
This is the value that the Animation will reach when it finishes uninterrupted.
The com.jakewharton.mosaic.animation.TwoWayConverter that will be used to convert value/velocity from any arbitrary data type to AnimationVector. This makes it possible to animate different dimensions of the data object independently (e.g. x/y dimensions of the position data).
Functions
Returns the value of the animation at the given play time.
Returns the velocity of the animation at the given play time.
Returns the velocity (in AnimationVector form) of the animation at the given play time.
Returns whether the animation is finished at the given play time.