VectorizedTweenSpec
-
Cmn
class VectorizedTweenSpec<V : AnimationVector> : VectorizedDurationBasedAnimationSpec
VectorizedTweenSpec
animates a AnimationVector
value by interpolating the start and end value, in the given durationMillis
using the given easing
curve.
Summary
Public constructors |
|
---|---|
<V : AnimationVector> VectorizedTweenSpec( |
Cmn
|
Public functions |
||
---|---|---|
open V |
getValueFromNanos( Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity. |
Cmn
|
open V |
getVelocityFromNanos( Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity. |
Cmn
|
Public properties |
||
---|---|---|
open Int |
the amount of time the animation should wait before it starts running, 0 by default. |
Cmn
|
open Int |
duration of the |
Cmn
|
Easing |
the easing curve used by the animation. |
Cmn
|
Inherited functions |
|||
---|---|---|---|
|
|||
|
Inherited properties |
|||
---|---|---|---|
|
Public constructors
VectorizedTweenSpec
<V : AnimationVector> VectorizedTweenSpec(
durationMillis: Int = DefaultDurationMillis,
delayMillis: Int = 0,
easing: Easing = FastOutSlowInEasing
)
Parameters | |
---|---|
durationMillis: Int = DefaultDurationMillis |
duration of the |
delayMillis: Int = 0 |
the amount of time the animation should wait before it starts running, 0 by default. |
easing: Easing = FastOutSlowInEasing |
the easing curve used by the animation. |
Public functions
getValueFromNanos
open fun getValueFromNanos(
playTimeNanos: Long,
initialValue: V,
targetValue: V,
initialVelocity: V
): V
Calculates the value of the animation at given the playtime, with the provided start/end values, and start velocity.
Parameters | |
---|---|
playTimeNanos: Long |
time since the start of the animation |
initialValue: V |
start value of the animation |
targetValue: V |
end value of the animation |
initialVelocity: V |
start velocity of the animation |
getVelocityFromNanos
open fun getVelocityFromNanos(
playTimeNanos: Long,
initialValue: V,
targetValue: V,
initialVelocity: V
): V
Calculates the velocity of the animation at given the playtime, with the provided start/end values, and start velocity.
Parameters | |
---|---|
playTimeNanos: Long |
time since the start of the animation |
initialValue: V |
start value of the animation |
targetValue: V |
end value of the animation |
initialVelocity: V |
start velocity of the animation |
Public properties
delayMillis
open val delayMillis: Int
the amount of time the animation should wait before it starts running, 0 by default.
durationMillis
open val durationMillis: Int
duration of the VectorizedTweenSpec
animation. Defaults to DefaultDurationMillis
.