重构成功

This commit is contained in:
yinsx
2025-12-22 15:01:10 +08:00
parent 1df41ac4ab
commit 1de2ac8491
25 changed files with 349 additions and 377 deletions

View File

@ -1,5 +1,9 @@
import { hasGltfFile } from "../../utils/gltf.js";
export const title = "KTX2 纹理压缩工具";
// 步骤配置
export const steps = [
const steps = [
{
name: "文件格式",
type: "multiselect",
@ -61,3 +65,13 @@ export const steps = [
default: ["overwrite", "keepOriginal"]
}
];
export function getSteps() {
const hasGltf = hasGltfFile();
return steps.map(step => {
if (step.name === "输出选项") {
return { ...step, options: step.options.filter(opt => !opt.dynamic || hasGltf) };
}
return step;
});
}