Class Easings
This class contains a set of easing functions, adapted from https://easings.net. These can be used for ui elements or any other kind of animations. By default, each function takes an input that ranges between 0 and 1, and produces an output that roughly ranges between 0 and 1. To change this behavior, you can use ScaleInput(Easing, float, float) and ScaleOutput(Easing, float, float).
public static class Easings
- Inheritance
-
Easings
- Inherited Members
Fields
InBack
public static readonly Easings.Easing InBack
Field Value
InBounce
public static readonly Easings.Easing InBounce
Field Value
InCirc
public static readonly Easings.Easing InCirc
Field Value
InCubic
public static readonly Easings.Easing InCubic
Field Value
InElastic
public static readonly Easings.Easing InElastic
Field Value
InExpo
public static readonly Easings.Easing InExpo
Field Value
InOutBack
public static readonly Easings.Easing InOutBack
Field Value
InOutBounce
public static readonly Easings.Easing InOutBounce
Field Value
InOutCirc
public static readonly Easings.Easing InOutCirc
Field Value
InOutCubic
public static readonly Easings.Easing InOutCubic
Field Value
InOutElastic
public static readonly Easings.Easing InOutElastic
Field Value
InOutExpo
public static readonly Easings.Easing InOutExpo
Field Value
InOutQuad
public static readonly Easings.Easing InOutQuad
Field Value
InOutQuart
public static readonly Easings.Easing InOutQuart
Field Value
InOutQuint
public static readonly Easings.Easing InOutQuint
Field Value
InOutSine
public static readonly Easings.Easing InOutSine
Field Value
InQuad
public static readonly Easings.Easing InQuad
Field Value
InQuart
public static readonly Easings.Easing InQuart
Field Value
InQuint
public static readonly Easings.Easing InQuint
Field Value
InSine
public static readonly Easings.Easing InSine
Field Value
Linear
A linear easing function that returns the input percentage without modifying it.
public static readonly Easings.Easing Linear
Field Value
One
An easing function that constantly returns 1, regardless of the input percentage. This is useful for chaining using AndThen(Easing, Easing).
public static readonly Easings.Easing One
Field Value
OutBack
public static readonly Easings.Easing OutBack
Field Value
OutBounce
public static readonly Easings.Easing OutBounce
Field Value
OutCirc
public static readonly Easings.Easing OutCirc
Field Value
OutCubic
public static readonly Easings.Easing OutCubic
Field Value
OutElastic
public static readonly Easings.Easing OutElastic
Field Value
OutExpo
public static readonly Easings.Easing OutExpo
Field Value
OutQuad
public static readonly Easings.Easing OutQuad
Field Value
OutQuart
public static readonly Easings.Easing OutQuart
Field Value
OutQuint
public static readonly Easings.Easing OutQuint
Field Value
OutSine
public static readonly Easings.Easing OutSine
Field Value
Zero
An easing function that constantly returns 0, regardless of the input percentage. This is useful for chaining using AndThen(Easing, Easing).
public static readonly Easings.Easing Zero
Field Value
Methods
AndReverse(Easing)
Causes the easing functino to play fully, and then play fully in reverse, in the span between an input of 0 and 1. In some places, this behavior is also called "auto-reversing".
public static Easings.Easing AndReverse(this Easings.Easing easing)
Parameters
Returns
AndThen(Easing, Easing)
Causes the easing function to play fully, followed by other
playing fully, in the span between an input of 0 and 1.
Note that AndThen(Easing, params Easing[]) provides a version of this method for any amount of follow-up easing functions.
public static Easings.Easing AndThen(this Easings.Easing easing, Easings.Easing other)
Parameters
easing
Easings.EasingThe first easing function to play.
other
Easings.EasingThe second easing function to play.
Returns
AndThen(Easing, params Easing[])
Causes the easing function to play fully, followed by all elements of others
playing fully, in the span between an input of 0 and 1.
This is an any-amount version of AndThen(Easing, Easing).
public static Easings.Easing AndThen(this Easings.Easing easing, params Easings.Easing[] others)
Parameters
easing
Easings.EasingThe first easing function to play.
others
Easing[]The next easing functions to play.
Returns
Clamp(Easing, float, float)
Causes output from the easing function to be clamped between the min
and max
values passed.
public static Easings.Easing Clamp(this Easings.Easing easing, float min = 0, float max = 1)
Parameters
easing
Easings.EasingThe easing function to clamp.
min
floatThe minimum output value to clamp to, defaults to 0.
max
floatThe maximum output value to clamp to, defaults to 1.
Returns
ReverseInput(Easing)
Reverses the input of an easing function, which is usually between 0 and 1, to be passed into the easing function as if it were between 1 and 0.
public static Easings.Easing ReverseInput(this Easings.Easing easing)
Parameters
Returns
ReverseOutput(Easing)
Reverses the output of an easing function, which is usually between 0 and 1, to return as if it were between 1 and 0.
public static Easings.Easing ReverseOutput(this Easings.Easing easing)
Parameters
Returns
ScaleInput(Easing, float, float)
Scales the input of an easing function, which is usually between 0 and 1, to a given minimum and maximum. Note that the minimum needs to be smaller than the maximum.
public static Easings.Easing ScaleInput(this Easings.Easing easing, float min, float max)
Parameters
easing
Easings.EasingThe easing function to scale
min
floatThe minimum input value
max
floatThe maximum input value
Returns
ScaleOutput(Easing, float, float)
Scales the output of an easing function, which is usually between 0 and 1, to a given minimum and maximum. Note that the minimum needs to be smaller than the maximum.
public static Easings.Easing ScaleOutput(this Easings.Easing easing, float min, float max)
Parameters
easing
Easings.EasingThe easing function to scale
min
floatThe minimum output value
max
floatThe maximum output value