UNPKG

@opensig/opendesign

Version:

13 lines (12 loc) 303 B
function easeInOutCubic(current, start, end, duration) { const elapsed = end - start; let time = current / (duration / 2); if (time < 1) { return elapsed / 2 * time * time * time + start; } time -= 2; return elapsed / 2 * (time * time * time + 2) + start; } export { easeInOutCubic };