Depiction Engine For Unity 2023.0 (Alpha)
Loading...
Searching...
No Matches
DepictionEngine.Easing Class Reference

Animates the value of a float property between two target values using Robert Penner's easing equations for interpolation over a specified Duration. More...

Static Public Member Functions

static float Ease (EasingType type, float t, float b, float c, float d)
 
static float Linear (float t, float b, float c, float d)
 Easing equation function for a simple linear tweening, with no easing.
 
static float ExpoEaseOut (float t, float b, float c, float d)
 Easing equation function for an exponential (2^t) easing out: decelerating from zero velocity.
 
static float ExpoEaseIn (float t, float b, float c, float d)
 Easing equation function for an exponential (2^t) easing in: accelerating from zero velocity.
 
static float ExpoEaseInOut (float t, float b, float c, float d)
 Easing equation function for an exponential (2^t) easing in/out: acceleration until halfway, then deceleration.
 
static float ExpoEaseOutIn (float t, float b, float c, float d)
 Easing equation function for an exponential (2^t) easing out/in: deceleration until halfway, then acceleration.
 
static float CircEaseOut (float t, float b, float c, float d)
 Easing equation function for a circular (sqrt(1-t^2)) easing out: decelerating from zero velocity.
 
static float CircEaseIn (float t, float b, float c, float d)
 Easing equation function for a circular (sqrt(1-t^2)) easing in: accelerating from zero velocity.
 
static float CircEaseInOut (float t, float b, float c, float d)
 Easing equation function for a circular (sqrt(1-t^2)) easing in/out: acceleration until halfway, then deceleration.
 
static float CircEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a circular (sqrt(1-t^2)) easing in/out: acceleration until halfway, then deceleration.
 
static float QuadEaseOut (float t, float b, float c, float d)
 Easing equation function for a quadratic (t^2) easing out: decelerating from zero velocity.
 
static float QuadEaseIn (float t, float b, float c, float d)
 Easing equation function for a quadratic (t^2) easing in: accelerating from zero velocity.
 
static float QuadEaseInOut (float t, float b, float c, float d)
 Easing equation function for a quadratic (t^2) easing in/out: acceleration until halfway, then deceleration.
 
static float QuadEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a quadratic (t^2) easing out/in: deceleration until halfway, then acceleration.
 
static float SineEaseOut (float t, float b, float c, float d)
 Easing equation function for a sinusoidal (sin(t)) easing out: decelerating from zero velocity.
 
static float SineEaseIn (float t, float b, float c, float d)
 Easing equation function for a sinusoidal (sin(t)) easing in: accelerating from zero velocity.
 
static float SineEaseInOut (float t, float b, float c, float d)
 Easing equation function for a sinusoidal (sin(t)) easing in/out: acceleration until halfway, then deceleration.
 
static float SineEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a sinusoidal (sin(t)) easing in/out: deceleration until halfway, then acceleration.
 
static float CubicEaseOut (float t, float b, float c, float d)
 Easing equation function for a cubic (t^3) easing out: decelerating from zero velocity.
 
static float CubicEaseIn (float t, float b, float c, float d)
 Easing equation function for a cubic (t^3) easing in: accelerating from zero velocity.
 
static float CubicEaseInOut (float t, float b, float c, float d)
 Easing equation function for a cubic (t^3) easing in/out: acceleration until halfway, then deceleration.
 
static float CubicEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a cubic (t^3) easing out/in: deceleration until halfway, then acceleration.
 
static float QuartEaseOut (float t, float b, float c, float d)
 Easing equation function for a quartic (t^4) easing out: decelerating from zero velocity.
 
static float QuartEaseIn (float t, float b, float c, float d)
 Easing equation function for a quartic (t^4) easing in: accelerating from zero velocity.
 
static float QuartEaseInOut (float t, float b, float c, float d)
 Easing equation function for a quartic (t^4) easing in/out: acceleration until halfway, then deceleration.
 
static float QuartEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a quartic (t^4) easing out/in: deceleration until halfway, then acceleration.
 
static float QuintEaseOut (float t, float b, float c, float d)
 Easing equation function for a quintic (t^5) easing out: decelerating from zero velocity.
 
static float QuintEaseIn (float t, float b, float c, float d)
 Easing equation function for a quintic (t^5) easing in: accelerating from zero velocity.
 
static float QuintEaseInOut (float t, float b, float c, float d)
 Easing equation function for a quintic (t^5) easing in/out: acceleration until halfway, then deceleration.
 
static float QuintEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a quintic (t^5) easing in/out: acceleration until halfway, then deceleration.
 
static float ElasticEaseOut (float t, float b, float c, float d)
 Easing equation function for an elastic (exponentially decaying sine wave) easing out: decelerating from zero velocity.
 
static float ElasticEaseIn (float t, float b, float c, float d)
 Easing equation function for an elastic (exponentially decaying sine wave) easing in: accelerating from zero velocity.
 
static float ElasticEaseInOut (float t, float b, float c, float d)
 Easing equation function for an elastic (exponentially decaying sine wave) easing in/out: acceleration until halfway, then deceleration.
 
static float ElasticEaseOutIn (float t, float b, float c, float d)
 Easing equation function for an elastic (exponentially decaying sine wave) easing out/in: deceleration until halfway, then acceleration.
 
static float BounceEaseOut (float t, float b, float c, float d)
 Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity.
 
static float BounceEaseIn (float t, float b, float c, float d)
 Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity.
 
static float BounceEaseInOut (float t, float b, float c, float d)
 Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration.
 
static float BounceEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out/in: deceleration until halfway, then acceleration.
 
static float BackEaseOut (float t, float b, float c, float d)
 Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out: decelerating from zero velocity.
 
static float BackEaseIn (float t, float b, float c, float d)
 Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.
 
static float BackEaseInOut (float t, float b, float c, float d)
 Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.
 
static float BackEaseOutIn (float t, float b, float c, float d)
 Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.
 

Detailed Description

Animates the value of a float property between two target values using Robert Penner's easing equations for interpolation over a specified Duration.

Easing Animates the value of a float property between two target values using Robert Penner's easing equations for interpolation over a specified Duration.

Original Author: Darren David darre.nosp@m.n-co.nosp@m.de@lo.nosp@m.okor.nosp@m.feel..nosp@m.com

Ported to be easily used in Unity by Marco Mastropaolo

Credit/Thanks: Robert Penner - The easing equations we all know and love (http://robertpenner.com/easing/) [See License.txt for license info]

Lee Brimelow - initial port of Penner's equations to WPF (http://thewpfblog.com/?p=12)

Zeh Fernando - additional equations (out/in) from caurina.transitions.Tweener (http://code.google.com/p/tweener/) [See License.txt for license info]

// C#
PennerDoubleAnimation anim = new PennerDoubleAnimation();
anim.Type = PennerDoubleAnimation.Equations.Linear;
anim.From = 1;
anim.To = 0;
myControl.BeginAnimation( OpacityProperty, anim );
// XAML
<Storyboard x:Key="AnimateXamlRect">
@anchor myControl
</Storyboard>
<Control.Triggers>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard Storyboard="{StaticResource AnimateXamlRect}"/>
</EventTrigger>
</Control.Triggers>

Member Function Documentation

◆ BackEaseIn()

static float DepictionEngine.Easing.BackEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BackEaseInOut()

static float DepictionEngine.Easing.BackEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BackEaseOut()

static float DepictionEngine.Easing.BackEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BackEaseOutIn()

static float DepictionEngine.Easing.BackEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a back (overshooting cubic easing: (s+1)*t^3 - s*t^2) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BounceEaseIn()

static float DepictionEngine.Easing.BounceEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BounceEaseInOut()

static float DepictionEngine.Easing.BounceEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a bounce (exponentially decaying parabolic bounce) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BounceEaseOut()

static float DepictionEngine.Easing.BounceEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ BounceEaseOutIn()

static float DepictionEngine.Easing.BounceEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a bounce (exponentially decaying parabolic bounce) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CircEaseIn()

static float DepictionEngine.Easing.CircEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a circular (sqrt(1-t^2)) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CircEaseInOut()

static float DepictionEngine.Easing.CircEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a circular (sqrt(1-t^2)) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CircEaseOut()

static float DepictionEngine.Easing.CircEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a circular (sqrt(1-t^2)) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CircEaseOutIn()

static float DepictionEngine.Easing.CircEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a circular (sqrt(1-t^2)) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CubicEaseIn()

static float DepictionEngine.Easing.CubicEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a cubic (t^3) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CubicEaseInOut()

static float DepictionEngine.Easing.CubicEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a cubic (t^3) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CubicEaseOut()

static float DepictionEngine.Easing.CubicEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a cubic (t^3) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ CubicEaseOutIn()

static float DepictionEngine.Easing.CubicEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a cubic (t^3) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ElasticEaseIn()

static float DepictionEngine.Easing.ElasticEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an elastic (exponentially decaying sine wave) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ElasticEaseInOut()

static float DepictionEngine.Easing.ElasticEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an elastic (exponentially decaying sine wave) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ElasticEaseOut()

static float DepictionEngine.Easing.ElasticEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an elastic (exponentially decaying sine wave) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ElasticEaseOutIn()

static float DepictionEngine.Easing.ElasticEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an elastic (exponentially decaying sine wave) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ExpoEaseIn()

static float DepictionEngine.Easing.ExpoEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an exponential (2^t) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ExpoEaseInOut()

static float DepictionEngine.Easing.ExpoEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an exponential (2^t) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ExpoEaseOut()

static float DepictionEngine.Easing.ExpoEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an exponential (2^t) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ ExpoEaseOutIn()

static float DepictionEngine.Easing.ExpoEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for an exponential (2^t) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ Linear()

static float DepictionEngine.Easing.Linear ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a simple linear tweening, with no easing.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuadEaseIn()

static float DepictionEngine.Easing.QuadEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quadratic (t^2) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuadEaseInOut()

static float DepictionEngine.Easing.QuadEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quadratic (t^2) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuadEaseOut()

static float DepictionEngine.Easing.QuadEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quadratic (t^2) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuadEaseOutIn()

static float DepictionEngine.Easing.QuadEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quadratic (t^2) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuartEaseIn()

static float DepictionEngine.Easing.QuartEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quartic (t^4) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuartEaseInOut()

static float DepictionEngine.Easing.QuartEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quartic (t^4) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuartEaseOut()

static float DepictionEngine.Easing.QuartEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quartic (t^4) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuartEaseOutIn()

static float DepictionEngine.Easing.QuartEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quartic (t^4) easing out/in: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuintEaseIn()

static float DepictionEngine.Easing.QuintEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quintic (t^5) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuintEaseInOut()

static float DepictionEngine.Easing.QuintEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quintic (t^5) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuintEaseOut()

static float DepictionEngine.Easing.QuintEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quintic (t^5) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ QuintEaseOutIn()

static float DepictionEngine.Easing.QuintEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a quintic (t^5) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ SineEaseIn()

static float DepictionEngine.Easing.SineEaseIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a sinusoidal (sin(t)) easing in: accelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ SineEaseInOut()

static float DepictionEngine.Easing.SineEaseInOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a sinusoidal (sin(t)) easing in/out: acceleration until halfway, then deceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ SineEaseOut()

static float DepictionEngine.Easing.SineEaseOut ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a sinusoidal (sin(t)) easing out: decelerating from zero velocity.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

◆ SineEaseOutIn()

static float DepictionEngine.Easing.SineEaseOutIn ( float  t,
float  b,
float  c,
float  d 
)
static

Easing equation function for a sinusoidal (sin(t)) easing in/out: deceleration until halfway, then acceleration.

Parameters
tCurrent time in seconds.
bStarting value.
cFinal value.
dDuration of animation.
Returns
The correct value.

The documentation for this class was generated from the following file: