Files
SnowLuma/.pnpm-store/v11/files/72/8ae2b3f2b088f3eb968979f2a8ba304feca3e81326c42fbaedfcce8d704e843c1e19454ac4436a1b789d8c59176aead009f47331c0f0f23fc23dd11da164fb
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

13 lines
550 B
Plaintext

const isNotNull = (value) => value !== null;
function getFinalKeyframe(keyframes, { repeat, repeatType = "loop" }, finalKeyframe, speed = 1) {
const resolvedKeyframes = keyframes.filter(isNotNull);
const useFirstKeyframe = speed < 0 || (repeat && repeatType !== "loop" && repeat % 2 === 1);
const index = useFirstKeyframe ? 0 : resolvedKeyframes.length - 1;
return !index || finalKeyframe === undefined
? resolvedKeyframes[index]
: finalKeyframe;
}
export { getFinalKeyframe };
//# sourceMappingURL=get-final.mjs.map