Ease
Introduction¶
Ease functions, built-in method of phaser.
- Author: Richard Davey
Usage¶
Ease functions¶
- Linear :
Phaser.Math.Easing.Linear
- Quadratic, Power1
- Quadratic ease-out :
Phaser.Math.Easing.Quadratic.Out
- Quadratic ease-in :
Phaser.Math.Easing.Quadratic.In
- Quadratic ease-in/out :
Phaser.Math.Easing.Quadratic.InOut
- Quadratic ease-out :
- Cubic, Power2
- Cubic ease-out :
Phaser.Math.Easing.Cubic.Out
- Cubic ease-in :
Phaser.Math.Easing.Cubic.In
- Cubic ease-in/out :
Phaser.Math.Easing.Cubic.InOut
- Cubic ease-out :
- Quartic, Power3
- Quartic ease-out :
Phaser.Math.Easing.Quartic.Out
- Quartic ease-in :
Phaser.Math.Easing.Quartic.In
- Quartic ease-in/out :
Phaser.Math.Easing.Quartic.InOut
- Quartic ease-out :
- Quintic, Power4
- Quintic ease-out :
Phaser.Math.Easing.Quintic.Out
- Quintic ease-in :
Phaser.Math.Easing.Quintic.In
- Quintic ease-in/out :
Phaser.Math.Easing.Quintic.InOut
- Quintic ease-out :
- Sinusoidal
- Sinusoidal ease-out :
Phaser.Math.Easing.Sine.Out
- Sinusoidal ease-in :
Phaser.Math.Easing.Sine.In
- Sinusoidal ease-in/out :
Phaser.Math.Easing.Sine.InOut
- Sinusoidal ease-out :
- Exponential
- Exponential ease-out :
Phaser.Math.Easing.Expo.Out
- Exponential ease-in :
Phaser.Math.Easing.Expo.In
- Exponential ease-in/out :
Phaser.Math.Easing.Expo.InOut
- Exponential ease-out :
- Circular
- Circular ease-out :
Phaser.Math.Easing.Circular.Out
- Circular ease-in :
Phaser.Math.Easing.Circular.In
- Circular ease-in/out :
Phaser.Math.Easing.Circular.InOut
- Circular ease-out :
- Elastic
- Elastic ease-out :
Phaser.Math.Easing.Elastic.Out
- Elastic ease-in :
Phaser.Math.Easing.Elastic.In
- Elastic ease-in/out :
Phaser.Math.Easing.Elastic.InOut
- Elastic ease-out :
- Bounce
- Bounce ease-out :
Phaser.Math.Easing.Bounce.Out
- Bounce ease-in :
Phaser.Math.Easing.Bounce.In
- Bounce ease-in/out :
Phaser.Math.Easing.Bounce.InOut
- Bounce ease-out :
- Back
- Back ease-out :
Phaser.Math.Easing.Back.Out
- Back ease-in :
Phaser.Math.Easing.Back.In
- Back ease-in/out :
Phaser.Math.Easing.Back.InOut
- Back ease-out :
- Stepped :
Phaser.Math.Easing.Stepped(v, step)
Get ease function via string¶
var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease);
// var easeFunction = Phaser.Tweens.Builders.GetEaseFunction(ease, easeParams);
ease
:- A string :
Power0
: LinearPower1
: Quadratic.OutPower2
: Cubic.OutPower3
: Quartic.OutPower4
: Quintic.OutLinear
Quad
: Quadratic.OutCubic
: Cubic.OutQuart
: Quartic.OutQuint
: Quintic.OutSine
: Sine.OutExpo
: Expo.OutCirc
: Circular.OutElastic
: Elastic.OutBack
: Back.OutBounce
: Bounce.OutStepped
Quad.easeIn
Cubic.easeIn
Quart.easeIn
Quint.easeIn
Sine.easeIn
Expo.easeIn
Circ.easeIn
Back.easeIn
Bounce.easeIn
Quad.easeOut
Cubic.easeOut
Quart.easeOut
Quint.easeOut
Sine.easeOut
Expo.easeOut
Circ.easeOut
Back.easeOut
Bounce.easeOut
Quad.easeInOut
Cubic.easeInOut
Quart.easeInOut
Quint.easeInOut
Sine.easeInOut
Expo.easeInOut
Circ.easeInOut
Back.easeInOut
Bounce.easeInOut
- A custom function
function(v) { return v; }
function(v, param0, param1, ...) { return v; }
v
:0
~1
- A string :
Get result¶
var result = easeFunction(t);
t
:0
~1