Files
SnowLuma/.pnpm-store/v11/files/e5/c1f6d7369f300b3208f5141c2e77d5fc32ca3471de4f142b1eaa96a613b6fcda722e4004f3870645ff5a87b0482ea4bbd1977db3e8c079531a5eafa0edfc30
T
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

11 lines
354 B
Plaintext

import { velocityPerSecond } from 'motion-utils';
const velocitySampleDuration = 5; // ms
function getGeneratorVelocity(resolveValue, t, current) {
const prevT = Math.max(t - velocitySampleDuration, 0);
return velocityPerSecond(current - resolveValue(prevT), t - prevT);
}
export { getGeneratorVelocity };
//# sourceMappingURL=velocity.mjs.map