actuate
Version:
Actuate is a flexible, fast "tween" library for animations
53 lines (35 loc) • 1.22 kB
JavaScript
// Class: motion.easing._Cubic.CubicEaseInOut
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 CubicEaseInOut = function() {
}
// Meta
CubicEaseInOut.__name__ = ["motion","easing","_Cubic","CubicEaseInOut"];
CubicEaseInOut.__isInterface__ = false;
CubicEaseInOut.__interfaces__ = [(motion_easing_IEasing().default)];
CubicEaseInOut.prototype = {
calculate: function(k) {
if((k /= 0.5) < 1) {
return 0.5 * k * k * k;
} else {
return 0.5 * ((k -= 2) * k * k + 2);
}
},
ease: function(t,b,c,d) {
if((t /= d / 2) < 1) {
return c / 2 * t * t * t + b;
} else {
return c / 2 * ((t -= 2) * t * t + 2) + b;
}
}
};
CubicEaseInOut.prototype.__class__ = CubicEaseInOut.prototype.constructor = $hxClasses["motion.easing._Cubic.CubicEaseInOut"] = CubicEaseInOut;
// Init
// Statics
// Export
exports.default = CubicEaseInOut;