phaser/Phaser/system/easing/Sinusoidal.js
Richard Davey e74114f384 Docs
2013-08-12 00:52:35 +01:00

26 lines
818 B
JavaScript

var Phaser;
(function (Phaser) {
/// <reference path="../../Game.ts" />
/**
* Phaser - Easing - Sinusoidal
*
* For use with Phaser.Tween
*/
(function (Easing) {
var Sinusoidal = (function () {
function Sinusoidal() { }
Sinusoidal.In = function In(k) {
return 1 - Math.cos(k * Math.PI / 2);
};
Sinusoidal.Out = function Out(k) {
return Math.sin(k * Math.PI / 2);
};
Sinusoidal.InOut = function InOut(k) {
return 0.5 * (1 - Math.cos(Math.PI * k));
};
return Sinusoidal;
})();
Easing.Sinusoidal = Sinusoidal;
})(Phaser.Easing || (Phaser.Easing = {}));
var Easing = Phaser.Easing;
})(Phaser || (Phaser = {}));