Enum EasingFunction
- Namespace
- Stride.CommunityToolkit.Mathematics
- Assembly
- Stride.CommunityToolkit.dll
The easing curves Easing implements, selectable by value so an animation can be configured with a name instead of a method.
public enum EasingFunction
- Extension Methods
Fields
BackEaseIn = 27Pulls back below 0 before setting off.
y = x³ - x sin(xπ).BackEaseInOut = 29Pulls back at the start and overshoots at the end.
BackEaseOut = 28Overshoots past 1 and settles back.
y = 1 - ((1 - x)³ - (1 - x) sin((1 - x)π)).BounceEaseIn = 30Bounces off the start, as a ball dropped in reverse.
BounceEaseInOut = 32Bounces off the start and lands with bounces.
BounceEaseOut = 31Lands with diminishing bounces, as a dropped ball.
CircularEaseIn = 18A quarter circle: barely moves, then rushes the end.
y = 1 - √(1 - x²).CircularEaseInOut = 20Two quarter circles meeting in the middle.
CircularEaseOut = 19A quarter circle: rushes the start, then barely moves.
y = √((2 - x)x).CubicEaseIn = 6Starts slowly, accelerates harder than quadratic.
y = x³.CubicEaseInOut = 8Slow, fast, slow, on a cubic each side of the middle.
CubicEaseOut = 7Starts fast, decelerates harder than quadratic.
y = (x - 1)³ + 1.ElasticEaseIn = 24Winds up with growing wobbles, then snaps to the end. Overshoots below 0.
ElasticEaseInOut = 26Wobbles out of the start and into the end.
ElasticEaseOut = 25Snaps past the end and wobbles back onto it. Overshoots above 1.
ExponentialEaseIn = 21Almost still, then explosive.
y = 2^(10(x - 1)).ExponentialEaseInOut = 23Still, explosive through the middle, still.
ExponentialEaseOut = 22Explosive, then almost still.
y = 1 - 2^(-10x).Linear = 0No easing: progress equals time.
y = x.QuadraticEaseIn = 3Starts slowly, accelerates.
y = x².QuadraticEaseInOut = 5Slow, fast, slow, on a parabola each side of the middle.
QuadraticEaseOut = 4Starts fast, decelerates.
y = -x² + 2x.QuarticEaseIn = 9Starts very slowly, accelerates.
y = x⁴.QuarticEaseInOut = 11Slow, fast, slow, on a quartic each side of the middle.
QuarticEaseOut = 10Starts fast, decelerates to a long tail.
y = 1 - (x - 1)⁴.QuinticEaseIn = 12The slowest start of the polynomial family.
y = x⁵.QuinticEaseInOut = 14Slow, fast, slow, on a quintic each side of the middle.
QuinticEaseOut = 13The longest tail of the polynomial family.
y = (x - 1)⁵ + 1.SineEaseIn = 15A quarter of a sine wave: the softest ease-in.
y = sin((x - 1)π/2) + 1.SineEaseInOut = 17Half a sine wave: soft at both ends.
y = (1 - cos(xπ)) / 2.SineEaseOut = 16A quarter of a sine wave: the softest ease-out.
y = sin(xπ/2).SmoothStep = 1Hermite blend, gentle at both ends.
y = x²(3 - 2x).SmootherStep = 2Ken Perlin's smoother blend, flat at both ends.
y = x³(x(6x - 15) + 10).
Remarks
Every curve maps a normalised time in [0, 1] to a progress in [0, 1], starting at 0 and ending
at 1. EaseIn starts slowly and accelerates, EaseOut starts fast and decelerates,
EaseInOut does both. The Elastic and Back families overshoot the ends on
the way, which is what gives a bounce or a wobble; every other curve stays inside [0, 1].
Evaluate one with Ease<T>(T, EasingFunction) or the extension
Ease<T>(EasingFunction, T).