easings.js 349 B

123456789101112131415
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.easeInOutCubic = easeInOutCubic;
  6. function easeInOutCubic(t, b, c, d) {
  7. const cc = c - b;
  8. t /= d / 2;
  9. if (t < 1) {
  10. return cc / 2 * t * t * t + b;
  11. }
  12. // biome-ignore lint: it is a common easing function
  13. return cc / 2 * ((t -= 2) * t * t + 2) + b;
  14. }