actuate
Version:
Actuate is a flexible, fast "tween" library for animations
51 lines (33 loc) • 1.17 kB
JavaScript
// Class: motion.easing._Quad.QuadEaseInOut
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../../hxClasses_stub").default;
function motion_easing_IEasing() {return require("./../../../motion/easing/IEasing");}
// Constructor
var QuadEaseInOut = function() {
}
// Meta
QuadEaseInOut.__name__ = ["motion","easing","_Quad","QuadEaseInOut"];
QuadEaseInOut.__isInterface__ = false;
QuadEaseInOut.__interfaces__ = [(motion_easing_IEasing().default)];
QuadEaseInOut.prototype = {
calculate: function(k) {
if((k *= 2) < 1) {
return 0.5 * k * k;
}
return -0.5 * ((k - 1) * (k - 3) - 1);
},
ease: function(t,b,c,d) {
if((t /= d / 2) < 1) {
return c / 2 * t * t + b;
}
return -c / 2 * ((t - 1) * (t - 3) - 1) + b;
}
};
QuadEaseInOut.prototype.__class__ = QuadEaseInOut.prototype.constructor = $hxClasses["motion.easing._Quad.QuadEaseInOut"] = QuadEaseInOut;
// Init
// Statics
// Export
exports.default = QuadEaseInOut;