This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/vuetify/lib/services/goto/easing-patterns.js
2019-08-11 20:48:02 +02:00

27 lines
No EOL
1.2 KiB
JavaScript

// linear
export const linear = t => t; // accelerating from zero velocity
export const easeInQuad = t => t ** 2; // decelerating to zero velocity
export const easeOutQuad = t => t * (2 - t); // acceleration until halfway, then deceleration
export const easeInOutQuad = t => t < 0.5 ? 2 * t ** 2 : -1 + (4 - 2 * t) * t; // accelerating from zero velocity
export const easeInCubic = t => t ** 3; // decelerating to zero velocity
export const easeOutCubic = t => --t ** 3 + 1; // acceleration until halfway, then deceleration
export const easeInOutCubic = t => t < 0.5 ? 4 * t ** 3 : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1; // accelerating from zero velocity
export const easeInQuart = t => t ** 4; // decelerating to zero velocity
export const easeOutQuart = t => 1 - --t ** 4; // acceleration until halfway, then deceleration
export const easeInOutQuart = t => t < 0.5 ? 8 * t * t * t * t : 1 - 8 * --t * t * t * t; // accelerating from zero velocity
export const easeInQuint = t => t ** 5; // decelerating to zero velocity
export const easeOutQuint = t => 1 + --t ** 5; // acceleration until halfway, then deceleration
export const easeInOutQuint = t => t < 0.5 ? 16 * t ** 5 : 1 + 16 * --t ** 5;
//# sourceMappingURL=easing-patterns.js.map