增加转格式

This commit is contained in:
yinsx
2025-12-20 11:51:35 +08:00
parent 5315a97613
commit d9abc57b0b
32 changed files with 4339 additions and 229 deletions

27
lib/gltf/config.js Normal file
View File

@ -0,0 +1,27 @@
import { listGltfFiles } from "../utils/gltf.js";
const extensionStep = {
name: "扩展选项",
type: "multiselect",
message: "请选择要添加的glTF扩展",
options: [
{ value: "textureBasisu", label: "KHR_texture_basisu纹理自动扩展", hint: "自动添加KTX2纹理扩展支持" },
{ value: "placeholder1", label: "预留选项1", hint: "功能开发中..." },
{ value: "placeholder2", label: "预留选项2", hint: "功能开发中..." },
{ value: "placeholder3", label: "预留选项3", hint: "功能开发中..." }
],
default: ["textureBasisu"]
};
export function getSteps() {
const files = listGltfFiles();
const fileStep = {
name: "文件选择",
type: "multiselect",
message: files.length ? "请选择要处理的glTF文件" : "当前目录未找到glTF文件",
options: files.map(file => ({ value: file, label: file })),
default: [...files]
};
return [fileStep, extensionStep];
}