Show / Hide Table of Contents

Class Easing

Collection of easing methods.

Inheritance
System.Object
Easing
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ToString()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Sttz.Tweener
Assembly: cs.temp.dll.dll
Syntax
public static class Easing
Remarks

Easing methods change the speed of the tween over its duration.

Linear is the same as applying no easing: the speed of the tween will stay constant over its duration.

The regular set of easing methods will start slow and speed up (In) until reaching full speed at the end, start at full speed and slow down towards the end (Out) or start and end slow and reach full speed at their half-point (InOut).

The regular easing methods, sorted by strength:

There are also three special easing methods: BackOut, BounceOut and ElasticOut. Back first moves away from the target before starting to move towards it, Bounce bounces off the start or end, reaching the start/end value multiple times and Elastic is similar to bounce but moves beyond the start/end values.

These easing methods are based on Robert Penner's easing equations, first published in his Flash programming book in 2002. See http://www.robertpenner.com/easing/ for more information as well as an interactive visualization of these methods.

Fields

BackDefaultSwing

Default back swing amount.

Declaration
public const float BackDefaultSwing = 1.70158F
Field Value
Type Description
System.Single

BackIn

Back easing, in direction.

Declaration
public static readonly EasingMethod BackIn
Field Value
Type Description
EasingMethod

BackInOut

Back easing, in-out direction.

Declaration
public static readonly EasingMethod BackInOut
Field Value
Type Description
EasingMethod

BackOut

Back easing, out direction.

Declaration
public static readonly EasingMethod BackOut
Field Value
Type Description
EasingMethod

BounceIn

Bounce easing, in direction.

Declaration
public static readonly EasingMethod BounceIn
Field Value
Type Description
EasingMethod

BounceInOut

Bounce easing, in-out direction.

Declaration
public static readonly EasingMethod BounceInOut
Field Value
Type Description
EasingMethod

BounceOut

Bounce easing, out direction.

Declaration
public static readonly EasingMethod BounceOut
Field Value
Type Description
EasingMethod

CircularIn

Circular easing, in direction.

Declaration
public static readonly EasingMethod CircularIn
Field Value
Type Description
EasingMethod

CircularInOut

Circular easing, in-out direction.

Declaration
public static readonly EasingMethod CircularInOut
Field Value
Type Description
EasingMethod

CircularOut

Circular easing, out direction.

Declaration
public static readonly EasingMethod CircularOut
Field Value
Type Description
EasingMethod

CubicIn

Cubic easing, in direction.

Declaration
public static readonly EasingMethod CubicIn
Field Value
Type Description
EasingMethod

CubicInOut

Cubic easing, in-out direction.

Declaration
public static readonly EasingMethod CubicInOut
Field Value
Type Description
EasingMethod

CubicOut

Cubic easing, out direction.

Declaration
public static readonly EasingMethod CubicOut
Field Value
Type Description
EasingMethod

ElasticDefaultAmplitude

Default elastic amplitude (1 = full target value, < 1 never reaches target).

Declaration
public const float ElasticDefaultAmplitude = 1F
Field Value
Type Description
System.Single

ElasticDefaultPeriod

Default elastic period (number of swings = 1 / p).

Declaration
public const float ElasticDefaultPeriod = 0.3F
Field Value
Type Description
System.Single

ElasticIn

Elastic easing, in direction.

Declaration
public static readonly EasingMethod ElasticIn
Field Value
Type Description
EasingMethod

ElasticInOut

Elastic easing, in-out direction.

Declaration
public static readonly EasingMethod ElasticInOut
Field Value
Type Description
EasingMethod

ElasticOut

Elastic easing, out direction.

Declaration
public static readonly EasingMethod ElasticOut
Field Value
Type Description
EasingMethod

ExponentialIn

Exponential easing, in direction.

Declaration
public static readonly EasingMethod ExponentialIn
Field Value
Type Description
EasingMethod

ExponentialInOut

Exponential easing, in-out direction.

Declaration
public static readonly EasingMethod ExponentialInOut
Field Value
Type Description
EasingMethod

ExponentialOut

Exponential easing, out direction.

Declaration
public static readonly EasingMethod ExponentialOut
Field Value
Type Description
EasingMethod

Linear

Linear easing (no easing).

Declaration
public static readonly EasingMethod Linear
Field Value
Type Description
EasingMethod

QuadraticIn

Quadratic easing, in direction.

Declaration
public static readonly EasingMethod QuadraticIn
Field Value
Type Description
EasingMethod

QuadraticInOut

Quadratic easing, in-out direction.

Declaration
public static readonly EasingMethod QuadraticInOut
Field Value
Type Description
EasingMethod

QuadraticOut

Quadratic easing, out direction.

Declaration
public static readonly EasingMethod QuadraticOut
Field Value
Type Description
EasingMethod

QuarticIn

Quartic easing, in direction.

Declaration
public static readonly EasingMethod QuarticIn
Field Value
Type Description
EasingMethod

QuarticInOut

Quartic easing, in-out direction.

Declaration
public static readonly EasingMethod QuarticInOut
Field Value
Type Description
EasingMethod

QuarticOut

Quartic easing, out direction.

Declaration
public static readonly EasingMethod QuarticOut
Field Value
Type Description
EasingMethod

QuinticIn

Quintic easing, in direction.

Declaration
public static readonly EasingMethod QuinticIn
Field Value
Type Description
EasingMethod

QuinticInOut

Quintic easing, in-out direction.

Declaration
public static readonly EasingMethod QuinticInOut
Field Value
Type Description
EasingMethod

QuinticOut

Quintic easing, out direction.

Declaration
public static readonly EasingMethod QuinticOut
Field Value
Type Description
EasingMethod

SinusoidalIn

Sinusoidal easing, in direction.

Declaration
public static readonly EasingMethod SinusoidalIn
Field Value
Type Description
EasingMethod

SinusoidalInOut

Sinusoidal easing, in-out direction.

Declaration
public static readonly EasingMethod SinusoidalInOut
Field Value
Type Description
EasingMethod

SinusoidalOut

Sinusoidal easing, out direction.

Declaration
public static readonly EasingMethod SinusoidalOut
Field Value
Type Description
EasingMethod

Methods

BackInCustom(Single)

Back easing with custom swing amount, in direction.

Declaration
public static EasingMethod BackInCustom(float swing = 1.70158F)
Parameters
Type Name Description
System.Single swing

Swing amount.

Returns
Type Description
EasingMethod

BackInOutCustom(Single)

Back easing with custom swing amount, in-out direction.

Declaration
public static EasingMethod BackInOutCustom(float swing = 1.70158F)
Parameters
Type Name Description
System.Single swing

Swing amount.

Returns
Type Description
EasingMethod

BackOutCustom(Single)

Back easing with custom swing amount, out direction.

Declaration
public static EasingMethod BackOutCustom(float swing = 1.70158F)
Parameters
Type Name Description
System.Single swing

Swing amount.

Returns
Type Description
EasingMethod

EasingForType(EasingType, EasingDirection)

Return the easing method for the given enum values. This allows to e.g. choose the easing in the Unity editor using the provided enums.

Declaration
public static EasingMethod EasingForType(EasingType type, EasingDirection direction)
Parameters
Type Name Description
EasingType type

Easing type.

EasingDirection direction

Easing direction.

Returns
Type Description
EasingMethod

ElasticInCustom(Single, Single)

Elastic easing with custom amplitude and period, in direction.

Declaration
public static EasingMethod ElasticInCustom(float amplitude = 1F, float period = 0.3F)
Parameters
Type Name Description
System.Single amplitude

Amplitude of the elasticity (1 = full target value, < 1 never reaches target).

System.Single period

Period of the elasticity (1 / period = number of swings).

Returns
Type Description
EasingMethod

ElasticInOutCustom(Single, Single)

Elastic easing with custom amplitude and period, in-out direction.

Declaration
public static EasingMethod ElasticInOutCustom(float amplitude = 1F, float period = 0.3F)
Parameters
Type Name Description
System.Single amplitude

Amplitude of the elasticity (1 = full target value, < 1 never reaches target).

System.Single period

Period of the elasticity (1 / period = number of swings).

Returns
Type Description
EasingMethod

ElasticOutCustom(Single, Single)

Elastic easing with custom amplitude and period, out direction.

Declaration
public static EasingMethod ElasticOutCustom(float amplitude = 1F, float period = 0.3F)
Parameters
Type Name Description
System.Single amplitude

Amplitude of the elasticity (1 = full target value, < 1 never reaches target).

System.Single period

Period of the elasticity (1 / period = number of swings).

Returns
Type Description
EasingMethod

See Also

Easing
Ease<TContainer>(TContainer, EasingMethod)
EasingMethod
Back to top © 2018 Adrian Stutz