C# Class Sttz.Tweener.Easing

Collection of easing methods.

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

Easing.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 halfpoint (InOut).

The regular easing methods, sorted by strength: QuadraticOut CubicOut QuarticOut QuinticOut SinusoidalOut ExponentialOut CircularOut

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.

Mostrar archivo Open project: sttz/Animate

Public Properties

Property Type Description
BackIn EasingMethod
BackInOut EasingMethod
BackOut EasingMethod
BounceIn EasingMethod
BounceInOut EasingMethod
BounceOut EasingMethod
CircularIn EasingMethod
CircularInOut EasingMethod
CircularOut EasingMethod
CubicIn EasingMethod
CubicInOut EasingMethod
CubicOut EasingMethod
ElasticIn EasingMethod
ElasticInOut EasingMethod
ElasticOut EasingMethod
ExponentialIn EasingMethod
ExponentialInOut EasingMethod
ExponentialOut EasingMethod
Linear EasingMethod
QuadraticIn EasingMethod
QuadraticInOut EasingMethod
QuadraticOut EasingMethod
QuarticIn EasingMethod
QuarticInOut EasingMethod
QuarticOut EasingMethod
QuinticIn EasingMethod
QuinticInOut EasingMethod
QuinticOut EasingMethod
SinusoidalIn EasingMethod
SinusoidalInOut EasingMethod
SinusoidalOut EasingMethod

Public Methods

Method Description
BackInCustom ( float swing = BackDefaultSwing ) : EasingMethod

Back easing with custom swing amount, in direction.

BackInOutCustom ( float swing = BackDefaultSwing ) : EasingMethod

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

BackOutCustom ( float swing = BackDefaultSwing ) : EasingMethod

Back easing with custom swing amount, out direction.

EasingForType ( EasingType type, EasingDirection direction ) : EasingMethod

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.

ElasticInCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod

Elastic easing with custom amplitude and period, in direction.

ElasticInOutCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod

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

ElasticOutCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod

Elastic easing with custom amplitude and period, out direction.

Method Details

BackInCustom() public static method

Back easing with custom swing amount, in direction.
public static BackInCustom ( float swing = BackDefaultSwing ) : EasingMethod
swing float /// Swing amount. ///
return EasingMethod

BackInOutCustom() public static method

Back easing with custom swing amount, in-out direction.
public static BackInOutCustom ( float swing = BackDefaultSwing ) : EasingMethod
swing float /// Swing amount. ///
return EasingMethod

BackOutCustom() public static method

Back easing with custom swing amount, out direction.
public static BackOutCustom ( float swing = BackDefaultSwing ) : EasingMethod
swing float /// Swing amount. ///
return EasingMethod

EasingForType() public static method

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.
public static EasingForType ( EasingType type, EasingDirection direction ) : EasingMethod
type EasingType /// Easing type. ///
direction EasingDirection /// Easing direction. ///
return EasingMethod

ElasticInCustom() public static method

Elastic easing with custom amplitude and period, in direction.
public static ElasticInCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod
amplitude float /// Amplitude of the elasticity (1 = full target value, < 1 never reaches target). ///
period float /// Period of the elasticity (1 / period = number of swings). ///
return EasingMethod

ElasticInOutCustom() public static method

Elastic easing with custom amplitude and period, in-out direction.
public static ElasticInOutCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod
amplitude float /// Amplitude of the elasticity (1 = full target value, < 1 never reaches target). ///
period float /// Period of the elasticity (1 / period = number of swings). ///
return EasingMethod

ElasticOutCustom() public static method

Elastic easing with custom amplitude and period, out direction.
public static ElasticOutCustom ( float amplitude = ElasticDefaultAmplitude, float period = ElasticDefaultPeriod ) : EasingMethod
amplitude float /// Amplitude of the elasticity (1 = full target value, < 1 never reaches target). ///
period float /// Period of the elasticity (1 / period = number of swings). ///
return EasingMethod

Property Details

BackIn public_oe static_oe property

Back easing, in direction.
public static EasingMethod BackIn
return EasingMethod

BackInOut public_oe static_oe property

Back easing, in-out direction.
public static EasingMethod BackInOut
return EasingMethod

BackOut public_oe static_oe property

Back easing, out direction.
public static EasingMethod BackOut
return EasingMethod

BounceIn public_oe static_oe property

Bounce easing, in direction.
public static EasingMethod BounceIn
return EasingMethod

BounceInOut public_oe static_oe property

Bounce easing, in-out direction.
public static EasingMethod BounceInOut
return EasingMethod

BounceOut public_oe static_oe property

Bounce easing, out direction.
public static EasingMethod BounceOut
return EasingMethod

CircularIn public_oe static_oe property

Circular easing, in direction.
public static EasingMethod CircularIn
return EasingMethod

CircularInOut public_oe static_oe property

Circular easing, in-out direction.
public static EasingMethod CircularInOut
return EasingMethod

CircularOut public_oe static_oe property

Circular easing, out direction.
public static EasingMethod CircularOut
return EasingMethod

CubicIn public_oe static_oe property

Cubic easing, in direction.
public static EasingMethod CubicIn
return EasingMethod

CubicInOut public_oe static_oe property

Cubic easing, in-out direction.
public static EasingMethod CubicInOut
return EasingMethod

CubicOut public_oe static_oe property

Cubic easing, out direction.
public static EasingMethod CubicOut
return EasingMethod

ElasticIn public_oe static_oe property

Elastic easing, in direction.
public static EasingMethod ElasticIn
return EasingMethod

ElasticInOut public_oe static_oe property

Elastic easing, in-out direction.
public static EasingMethod ElasticInOut
return EasingMethod

ElasticOut public_oe static_oe property

Elastic easing, out direction.
public static EasingMethod ElasticOut
return EasingMethod

ExponentialIn public_oe static_oe property

Exponential easing, in direction.
public static EasingMethod ExponentialIn
return EasingMethod

ExponentialInOut public_oe static_oe property

Exponential easing, in-out direction.
public static EasingMethod ExponentialInOut
return EasingMethod

ExponentialOut public_oe static_oe property

Exponential easing, out direction.
public static EasingMethod ExponentialOut
return EasingMethod

Linear public_oe static_oe property

Linear easing (no easing).
public static EasingMethod Linear
return EasingMethod

QuadraticIn public_oe static_oe property

Quadratic easing, in direction.
public static EasingMethod QuadraticIn
return EasingMethod

QuadraticInOut public_oe static_oe property

Quadratic easing, in-out direction.
public static EasingMethod QuadraticInOut
return EasingMethod

QuadraticOut public_oe static_oe property

Quadratic easing, out direction.
public static EasingMethod QuadraticOut
return EasingMethod

QuarticIn public_oe static_oe property

Quartic easing, in direction.
public static EasingMethod QuarticIn
return EasingMethod

QuarticInOut public_oe static_oe property

Quartic easing, in-out direction.
public static EasingMethod QuarticInOut
return EasingMethod

QuarticOut public_oe static_oe property

Quartic easing, out direction.
public static EasingMethod QuarticOut
return EasingMethod

QuinticIn public_oe static_oe property

Quintic easing, in direction.
public static EasingMethod QuinticIn
return EasingMethod

QuinticInOut public_oe static_oe property

Quintic easing, in-out direction.
public static EasingMethod QuinticInOut
return EasingMethod

QuinticOut public_oe static_oe property

Quintic easing, out direction.
public static EasingMethod QuinticOut
return EasingMethod

SinusoidalIn public_oe static_oe property

Sinusoidal easing, in direction.
public static EasingMethod SinusoidalIn
return EasingMethod

SinusoidalInOut public_oe static_oe property

Sinusoidal easing, in-out direction.
public static EasingMethod SinusoidalInOut
return EasingMethod

SinusoidalOut public_oe static_oe property

Sinusoidal easing, out direction.
public static EasingMethod SinusoidalOut
return EasingMethod