ArcAnimationSpec

@Immutable
class ArcAnimationSpec<T>(val mode: ArcMode = ArcBelow, val durationMillis: Int = AnimationConstants.DefaultDurationMillis, val delayMillis: Int = 0, val easing: Easing = FastOutSlowInEasing) : DurationBasedAnimationSpec<T>

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

To interpolate with keyframes use KeyframesSpecConfig.using with an com.jakewharton.mosaic.animation.ArcMode.

 

As such, it's recommended that ArcAnimationSpec is only used for positional values such as: IntOffset.

 

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

mode

Orientation of the arc.

durationMillis

Duration of the animation. AnimationConstants.DefaultDurationMillis by default.

delayMillis

Time the animation waits before starting. 0 by default.

easing

Easing applied on the animation curve. FastOutSlowInEasing by default.

See also

Constructors

Link copied to clipboard
constructor(mode: ArcMode = ArcBelow, durationMillis: Int = AnimationConstants.DefaultDurationMillis, delayMillis: Int = 0, easing: Easing = FastOutSlowInEasing)

Properties

Link copied to clipboard
val delayMillis: Int = 0
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int