Move easings into global file

This commit is contained in:
2022-08-13 23:38:59 +02:00
parent 222db0c478
commit 8524a83199
3 changed files with 16 additions and 10 deletions

15
src/animations/easings.ts Normal file
View File

@@ -0,0 +1,15 @@
/**
* Ease: Quart Out Array
*/
export const quartOut = [.165, .84, .44, 1]
/**
* Ease: Quart In Out function
*/
export const quartInOutFunc = (t: number, b: number, c: number, d: number) => {
t /= d/2
if (t < 1) return c/2 * t * t * t * t + b
t -= 2
return -c / 2 * (t * t * t * t - 2) + b
}