![JAR search and dependency download from the Maven repository](/logo.png)
package.lib.offset.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utils Show documentation
Show all versions of utils Show documentation
A collection of utility functions for animations.
import { mix } from "./mix";
import { progress } from "./progress";
export 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(mix(min, 1, offsetProgress));
}
}
export function defaultOffset(length) {
const offset = [0];
fillOffset(offset, length - 1);
return offset;
}
//# sourceMappingURL=offset.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy