public class KeyframesSpecConfig<T> : KeyframesSpecBaseConfig<T, KeyframeEntity<T>>()
KeyframesSpecConfig stores a mutable configuration of the key frames, including durationMillis, delayMillis, and all the key frames. Each key frame defines what the animation value should be at a particular time. Once the key frames are fully configured, the KeyframesSpecConfig can be used to create a KeyframesSpec.
Functions
with
public infix fun KeyframeEntity<T>.with(easing: Easing)
Adds an Easing for the interval started with the just provided timestamp. For example: 0f at 50 with LinearEasing
Parameters
| easing | Easing to be used for the next interval. |
Returns
| the same KeyframeEntity instance so that other implementations can expand on the builder pattern |
using
public infix fun KeyframeEntity<T>.using(arcMode: ArcMode): KeyframeEntity<T>
ArcMode applied from this keyframe to the next.
Note that arc modes are meant for objects with even dimensions (such as Offset and its variants). Where each value pair is animated as an arc. So, if the object has odd dimensions the last value will always animate linearly.
The order of each value in an object with multiple dimensions is given by the applied vector converter in KeyframesSpec.vectorize.
E.g.: RectToVector assigns its values as [left, top, right, bottom] so the pairs of dimensions animated as arcs are: [left, top] and [right, bottom].