Viewing File: /home/ubuntu/route-and-root-frontend-base/node_modules/@motionone/generators/lib/utils/velocity.js

import { velocityPerSecond } from "@motionone/utils";
const sampleT = 5; // ms
export function calcGeneratorVelocity(resolveValue, t, current) {
    const prevT = Math.max(t - sampleT, 0);
    return velocityPerSecond(current - resolveValue(prevT), t - prevT);
}
//# sourceMappingURL=velocity.js.map
Back to Directory File Manager