优化第一阶段
This commit is contained in:
20
lib/plugins/ktx2/ui.js
Normal file
20
lib/plugins/ktx2/ui.js
Normal 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;
|
||||
Reference in New Issue
Block a user