Changes export syntax of easing function to address build error
This commit is contained in:
parent
c193929bdd
commit
aa0acaaa01
|
@ -26,18 +26,18 @@ export const fadeIn = animation(
|
||||||
{ params: { time: '1000ms', start: 1, end: 0, zIndex: 0 } }
|
{ params: { time: '1000ms', start: 1, end: 0, zIndex: 0 } }
|
||||||
);
|
);
|
||||||
|
|
||||||
export const easingFn: EasingLogic = (
|
export function easingFn (
|
||||||
t: number,
|
t: number,
|
||||||
b: number,
|
b: number,
|
||||||
c: number,
|
c: number,
|
||||||
d: number
|
d: number
|
||||||
): number => {
|
): number {
|
||||||
if ((t /= d / 2) < 1) {
|
if ((t /= d / 2) < 1) {
|
||||||
return (c / 2) * t * t * t * t + b;
|
return (c / 2) * t * t * t * t + b;
|
||||||
} else {
|
} else {
|
||||||
return (-c / 2) * ((t -= 2) * t * t * t - 2) + b;
|
return (-c / 2) * ((t -= 2) * t * t * t - 2) + b;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
export const animations = [
|
export const animations = [
|
||||||
trigger('fadeInOut', [
|
trigger('fadeInOut', [
|
||||||
|
|
Loading…
Reference in New Issue