mirror of
https://github.com/photonstorm/phaser
synced 2024-12-25 20:43:26 +00:00
29 lines
885 B
JavaScript
29 lines
885 B
JavaScript
var Phaser;
|
|
(function (Phaser) {
|
|
/// <reference path="../../Game.ts" />
|
|
/**
|
|
* Phaser - Easing - Quintic
|
|
*
|
|
* For use with Phaser.Tween
|
|
*/
|
|
(function (Easing) {
|
|
var Quintic = (function () {
|
|
function Quintic() { }
|
|
Quintic.In = function In(k) {
|
|
return k * k * k * k * k;
|
|
};
|
|
Quintic.Out = function Out(k) {
|
|
return --k * k * k * k * k + 1;
|
|
};
|
|
Quintic.InOut = function InOut(k) {
|
|
if((k *= 2) < 1) {
|
|
return 0.5 * k * k * k * k * k;
|
|
}
|
|
return 0.5 * ((k -= 2) * k * k * k * k + 2);
|
|
};
|
|
return Quintic;
|
|
})();
|
|
Easing.Quintic = Quintic;
|
|
})(Phaser.Easing || (Phaser.Easing = {}));
|
|
var Easing = Phaser.Easing;
|
|
})(Phaser || (Phaser = {}));
|