Files
yinx-cli/lib/plugins/ktx2/ui.js
2025-12-22 12:07:12 +08:00

21 lines
532 B
JavaScript

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;