UNPKG

actuate

Version:

Actuate is a flexible, fast "tween" library for animations

56 lines (38 loc) 1.42 kB
// Class: motion.easing._Back.BackEaseInOut 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 BackEaseInOut = function(s) { this.s = s; } // Meta BackEaseInOut.__name__ = ["motion","easing","_Back","BackEaseInOut"]; BackEaseInOut.__isInterface__ = false; BackEaseInOut.__interfaces__ = [(motion_easing_IEasing().default)]; BackEaseInOut.prototype = { calculate: function(k) { if((k /= 0.5) < 1) { var tmp = this; return 0.5 * (k * k * (((tmp.s *= 1.525) + 1) * k - this.s)); } var tmp1 = this; return 0.5 * ((k -= 2) * k * (((tmp1.s *= 1.525) + 1) * k + this.s) + 2); }, ease: function(t,b,c,d) { if((t /= d / 2) < 1) { var tmp = this; return c / 2 * (t * t * (((tmp.s *= 1.525) + 1) * t - this.s)) + b; } var tmp1 = this; return c / 2 * ((t -= 2) * t * (((tmp1.s *= 1.525) + 1) * t + this.s) + 2) + b; } }; BackEaseInOut.prototype.__class__ = BackEaseInOut.prototype.constructor = $hxClasses["motion.easing._Back.BackEaseInOut"] = BackEaseInOut; // Init // Statics // Export exports.default = BackEaseInOut;