framer-motion
Version:
A simple and powerful JavaScript animation library
13 lines (10 loc) • 365 B
JavaScript
import { mixNumber } from '../mix/number.mjs';
import { progress } from '../progress.mjs';
function fillOffset(offset, remaining) {
const min = offset[offset.length - 1];
for (let i = 1; i <= remaining; i++) {
const offsetProgress = progress(0, remaining, i);
offset.push(mixNumber(min, 1, offsetProgress));
}
}
export { fillOffset };