All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.offset.es.js Maven / Gradle / Ivy

There is a newer version: 10.17.0
Show newest version
import { mix } from './mix.es.js';
import { progress } from './progress.es.js';

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));
    }
}
function defaultOffset(length) {
    const offset = [0];
    fillOffset(offset, length - 1);
    return offset;
}

export { defaultOffset, fillOffset };




© 2015 - 2025 Weber Informatics LLC | Privacy Policy