mirror of
https://github.com/motion-canvas/motion-canvas.git
synced 2026-01-11 23:07:57 -05:00
fix: bug with createEaseInOutBack in interpolationFunctions.ts (#69)
The second half of easeInOutBack was sampling the wrong parts of the easeOutBack formula, these two changes fix that
This commit is contained in:
@@ -82,11 +82,11 @@ export function createEaseInOutBack(s = 1.70158): InterpolationFunction {
|
||||
if (value < 1) {
|
||||
return map(from, to, (value * value * ((s + 1) * value - s)) / 2);
|
||||
}
|
||||
value -= 2;
|
||||
value -= 1;
|
||||
return map(
|
||||
from,
|
||||
to,
|
||||
(1 + (value - 1) * (value - 1) * ((s + 1) * (value - 1) + s)) / 2,
|
||||
(1 + (value - 1) * (value - 1) * ((s + 1) * (value - 1) + s)) / 2 + 0.5,
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user