优化第一阶段

This commit is contained in:
yinsx
2025-12-22 12:07:12 +08:00
parent dd99e932b4
commit 1df41ac4ab
38 changed files with 340 additions and 300 deletions

20
lib/plugins/ktx2/ui.js Normal file
View File

@ -0,0 +1,20 @@
import { createStepUI } from "../../utils/stepui.js";
import { steps } from "./config.js";
import { hasGltfFile } from "./gltf.js";
function getFilteredSteps() {
const hasGltf = hasGltfFile();
return steps.map(step => {
if (step.name === "输出选项") {
return { ...step, options: step.options.filter(opt => !opt.dynamic || hasGltf) };
}
return step;
});
}
const ui = createStepUI({
title: "KTX2 纹理压缩工具",
getSteps: getFilteredSteps
});
export const { runInteractive, showSummary } = ui;