kyrie / com.github.alexjlockwood.kyrie / Keyframe / of

of

@JvmStatic fun <T> of(fraction: Float): Keyframe<T>

Constructs a Keyframe object with the given time. The value at this time will be derived from the target object when the animation first starts. The time defines the time, as a proportion of an overall animation's duration, at which the value will hold true for the animation. The value for the animation between keyframes will be calculated as an interpolation between the values at those keyframes.

Parameters

T - The keyframe value type.

fraction - The time, expressed as a value between 0 and 1, representing the fraction of time elapsed of the overall animation duration.

Return
The constructed Keyframe object.

@JvmStatic fun <T> of(fraction: Float, value: T?): Keyframe<T>

Constructs a Keyframe object with the given time and value. The time defines the time, as a proportion of an overall animation's duration, at which the value will hold true for the animation. The value for the animation between keyframes will be calculated as an interpolation between the values at those keyframes.

Parameters

T - The keyframe value type.

fraction - The time, expressed as a value between 0 and 1, representing the fraction of time elapsed of the overall animation duration.

value - The value that the object will animate to as the animation time approaches the time in this Keyframe, and the the value animated from as the time passes the time in this Keyframe. May be null.

Return
The constructed Keyframe object.