Files
yinx-cli/lib/gltf/config.js
2025-12-20 11:51:35 +08:00

28 lines
961 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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];
}