actuate
Version:
Actuate is a flexible, fast "tween" library for animations
64 lines (46 loc) • 1.47 kB
JavaScript
// Class: motion.easing._Expo.ExpoEaseInOut
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;
var $import = require("./../../../import_stub").default;
function motion_easing_IEasing() {return require("./../../../motion/easing/IEasing");}
// Constructor
var ExpoEaseInOut = function() {
}
// Meta
ExpoEaseInOut.__name__ = ["motion","easing","_Expo","ExpoEaseInOut"];
ExpoEaseInOut.__isInterface__ = false;
ExpoEaseInOut.__interfaces__ = [(motion_easing_IEasing().default)];
ExpoEaseInOut.prototype = {
calculate: function(k) {
if(k == 0) {
return 0;
}
if(k == 1) {
return 1;
}
if((k /= 0.5) < 1.0) {
return 0.5 * Math.exp(6.931471805599453 * (k - 1));
}
return 0.5 * (2 - Math.exp(-6.931471805599453 * --k));
},
ease: function(t,b,c,d) {
if(t == 0) {
return b;
}
if(t == d) {
return b + c;
}
if((t /= d / 2.0) < 1.0) {
return c / 2 * Math.exp(6.931471805599453 * (t - 1)) + b;
}
return c / 2 * (2 - Math.exp(-6.931471805599453 * --t)) + b;
}
};
ExpoEaseInOut.prototype.__class__ = ExpoEaseInOut.prototype.constructor = $hxClasses["motion.easing._Expo.ExpoEaseInOut"] = ExpoEaseInOut;
// Init
// Statics
// Export
exports.default = ExpoEaseInOut;