修复材质导出问题,添加库打包模式

This commit is contained in:
2025-04-15 09:35:54 +08:00
parent 0929d5b80c
commit cfbfda520d
11 changed files with 26706 additions and 116 deletions

View File

@@ -95,19 +95,10 @@ export const useScene = defineStore('scene', () => {
materialName: string;
}
async function UploadMaterialAsync(request: UploadMaterialRequest) {
const logoPath = await HandleUpdateLogo();
// TODO: Warn: 是否要生成logo路径
// const logoPath = await HandleUpdateLogo();
const matJson = MaterialOut(Material.value as PhysicalMaterialRecord);
const data = await PostJson(MaterialUrls.create, {
dir_id: request,
name: request.materialName,
logo: logoPath,
// jsonString -> Deflate -> BinaryString -> Base64
file: btoa(String.fromCharCode(...await DeflateAsync(matJson))),
zip_type: 'gzip',
});
if (data.err_code !== RequestStatus.Ok) {
throw new Error(data.err_msg);
}
console.log(matJson);
}
async function HandleUpdateLogo() {