ArcAnimationSpec

Class

Common
@ExperimentalAnimationSpecApi
public class ArcAnimationSpec<T>(
    public val mode: ArcMode = ArcBelow,
    public val durationMillis: Int = DefaultDurationMillis,
    public val delayMillis: Int = 0,
    public val easing: Easing = FastOutSlowInEasing, // Same default as tween()
) : DurationBasedAnimationSpec<T>

DurationBasedAnimationSpec that interpolates 2-dimensional values using arcs of quarter of an Ellipse.

To interpolate with keyframes use KeyframesSpecConfig.using with an ArcMode.

 

As such, it's recommended that ArcAnimationSpec is only used for positional values such as: Offset, IntOffset or androidx.compose.ui.unit.DpOffset.

 

The orientation of the arc is indicated by the given mode.

Do note, that if the target value being animated only changes in one dimension, you'll only be able to get a linear curve.

Similarly, one-dimensional values will always only interpolate on a linear curve.

Parameters

modeOrientation of the arc.
durationMillisDuration of the animation. DefaultDurationMillis by default.
delayMillisTime the animation waits before starting. 0 by default.
easingEasing applied on the animation curve. FastOutSlowInEasing by default.