Files
NapCatQQ/.pnpm-store/v3/files/22/95eafd80659aaa4741f6ac81430b974c54d6d115d36aefdd182e3b3cd3e3cc9bdbe6e8ca58f2ad61c0c247e1dae9720bae6d50a6c6ec21dd7623d8a1b46df2
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

14 lines
415 B
Plaintext

/**
* Take an array of times that represent repeated keyframes. For instance
* if we have original times of [0, 0.5, 1] then our repeated times will
* be [0, 0.5, 1, 1, 1.5, 2]. Loop over the times and scale them back
* down to a 0-1 scale.
*/
function normalizeTimes(times, repeat) {
for (let i = 0; i < times.length; i++) {
times[i] = times[i] / (repeat + 1);
}
}
export { normalizeTimes };