MCPcopy
hub / github.com/julianshapiro/velocity / registerBackInOut

Function registerBackInOut

velocity.js:3482–3494  ·  view source on GitHub ↗
(name, amount)

Source from the content-addressed store, hash-verified

3480 }]);
3481 }
3482 function registerBackInOut(name, amount) {
3483 amount *= 1.525;
3484 registerEasing([name, function (percentComplete, startValue, endValue) {
3485 if (percentComplete === 0) {
3486 return startValue;
3487 }
3488 if (percentComplete === 1) {
3489 return endValue;
3490 }
3491 percentComplete *= 2;
3492 return (percentComplete < 1 ? Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount) : Math.pow(percentComplete - 2, 2) * ((amount + 1) * (percentComplete - 2) + amount) + 2) * 0.5 * (endValue - startValue);
3493 }]);
3494 }
3495 registerBackIn("easeInBack", 1.7);
3496 registerBackOut("easeOutBack", 1.7);
3497 registerBackInOut("easeInOutBack", 1.7);

Callers 1

velocity.jsFile · 0.70

Calls 1

registerEasingFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…