UNPKG

@ifed/hook

Version:
25 lines (24 loc) 567 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; const easing = { easeInOutCubic: x => { if (x >= 1) return 1; return x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2; }, easeOutCirc: x => { if (x >= 1) return 1; return Math.sqrt(1 - Math.pow(x - 1, 2)); }, easeOutQuint: x => { if (x >= 1) return 1; return 1 - Math.pow(1 - x, 5); }, easeOutExpo: x => { return x === 1 ? 1 : 1 - Math.pow(2, -10 * x); } }; var _default = easing; exports.default = _default;