重构成功
This commit is contained in:
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user