Skip to content

Commit

Permalink
add modified easing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
meodai committed Dec 17, 2023
1 parent 656b09b commit b9585d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ export type easingFunctionsType = {
CurveMethod: (x: number, accentuation?: number) => number;
};

/*
* Easing functions modified to work with an accentuation parameter that exaggerates the curve
* the accentuation parameter is a number between 0 and 1 but was not tested very thoroughly
* can probably be improved by chaning how the accentuation is applied in each type of easing function
* https://gist.github.com/gre/1650294
*/
export const easingFunctions = {
linear: (x: number): number => x,
easeInSine: (x: number, accentuation = 0): number =>
Expand Down

0 comments on commit b9585d1

Please sign in to comment.