phaser/Phaser/system/easing/Quintic.js

30 lines
885 B
JavaScript
Raw Normal View History

2013-08-11 23:52:35 +00:00
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 = {}));