import type { DeepReadonly } from "vue" import type { MaterialRequest } from "../components/MaterialAdjuster.vue" let _libOutputConfig = { host:'https://tapi.cfcad.cn:7779', textureSrc: [], file: undefined, submitCallback: undefined, cancelCallback: undefined, envTextureSrc: ['./right.webp', './left.webp', './top.webp', './bottom.webp', './front.webp', './back.webp'], grayEnvTextureSrc: ['./right-gray.webp', './left-gray.webp', './top-gray.webp', './bottom-gray.webp', './front-gray.webp', './back-gray.webp'], } as LibOutputConfig export function ConfigureLibOutput(config: Partial) { Object.assign(_libOutputConfig, { ...config }); // _libOutputConfig = config; } export type LibOutputConfig = { /** * 材质文件域名 */ host: string, /** 材质贴图链接列表,场景会只会载入第一个链接作为纹理预览,但是导出提交时会为所有链接创建材质 */ textureSrc: Array, /** 材质预设数据,base64编码 */ file?: string, /** 环境贴图链接(立方体贴图,按照顺序输入[右左上下前后]) */ envTextureSrc: string[], /** 灰度环境贴图链接,输入格式与环境贴图一致 */ grayEnvTextureSrc: string[], /** 提交材质时的回调 */ submitCallback?: (data: Array) => void, /** * 取消材质编辑时的回调 * @deprecated 不需要使用 */ cancelCallback?: () => void } export function GetConfig(): DeepReadonly { return _libOutputConfig; }