Mission Control Dashboard - Initial implementation
This commit is contained in:
16
node_modules/motion-utils/dist/es/easing/steps.mjs
generated
vendored
Normal file
16
node_modules/motion-utils/dist/es/easing/steps.mjs
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { clamp } from '../clamp.mjs';
|
||||
|
||||
function steps(numSteps, direction = "end") {
|
||||
return (progress) => {
|
||||
progress =
|
||||
direction === "end"
|
||||
? Math.min(progress, 0.999)
|
||||
: Math.max(progress, 0.001);
|
||||
const expanded = progress * numSteps;
|
||||
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
||||
return clamp(0, 1, rounded / numSteps);
|
||||
};
|
||||
}
|
||||
|
||||
export { steps };
|
||||
//# sourceMappingURL=steps.mjs.map
|
||||
Reference in New Issue
Block a user