Files
SnowLuma/.pnpm-store/v11/files/24/bb6e4fc28851009f341972576e99689578b2485f286e1d543aed3f3a52c75f76174cfe0d5168945505497d11e91e9162cb832f62c20cf1a724fff428226e8e
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

14 lines
467 B
Plaintext

const generateLinearEasing = (easing, duration, // as milliseconds
resolution = 10 // as milliseconds
) => {
let points = "";
const numPoints = Math.max(Math.round(duration / resolution), 2);
for (let i = 0; i < numPoints; i++) {
points += Math.round(easing(i / (numPoints - 1)) * 10000) / 10000 + ", ";
}
return `linear(${points.substring(0, points.length - 2)})`;
};
export { generateLinearEasing };
//# sourceMappingURL=linear.mjs.map