AutodeskForge查看带有参考模型浏览器的ZIP文件未显示加载的模型名称。
创始人
2024-11-12 10:00:22
0

这个问题可能是由于缺少metadata.json文件导致的。metadata.json文件应该包含有关模型名称、ID和其他重要信息的元数据。在代码中,我们可以使用以下代码来创建metadata.json文件并将其添加到ZIP文件中:

// Create the metadata object with your model information
var metadata = {
  name: 'Model Name',
  guid: 'Model ID'
}

// Convert the metadata object to a string
var metadataString = JSON.stringify(metadata);

// Create a new metadata.json file with the metadata string
var metadataFile = new File([metadataString], { type: 'application/json' });

// Create a new ZIP file with the metadata.json file and your model files
var zipFile = new JSZip();
zipFile.file('metadata.json', metadataFile);
zipFile.folder('models').file('model.obj', modelData);

// Export the ZIP file
zipFile.generateAsync({ type: 'blob' }).then(function(content) {
  saveAs(content, 'model.zip');
});

然后,将生成的ZIP文件上传到Forge Viewer中时,您应该能够看到模型文件的名称显示在参考模型浏览器中。

相关内容

热门资讯

详细透视!hhpoker底牌透... 详细透视!hhpoker底牌透视脚本,wepoker辅助器下载,法子教程(有挂详情)-哔哩哔哩1、在...
总结透视!pokerworld... 总结透视!pokerworld修改器,hhpoker的辅助是真的吗,手册教程(有挂方法)-哔哩哔哩1...
专业透视!pokemmo手机辅... 专业透视!pokemmo手机辅助软件!好像存在有辅助软件(有挂讲解)-哔哩哔哩1、下载好pokemm...
分享透视!拱趴大菠萝有挂吗,w... 分享透视!拱趴大菠萝有挂吗,wepoker可以开透视吗,举措教程(有挂头条)-哔哩哔哩;1、wepo...
辅助透视!福建大菠萝万能辅助器... 辅助透视!福建大菠萝万能辅助器!原来是有辅助app(有挂透视)-哔哩哔哩1、福建大菠萝万能辅助器辅助...
详细透视!德州局透视脚本下载安... 详细透视!德州局透视脚本下载安装最新版本,德普之星app安卓版破解版,绝活教程(有挂秘籍)-哔哩哔哩...
曝光透视!拱趴大菠萝挂!确实一... 曝光透视!拱趴大菠萝挂!确实一直都是有辅助技巧(有人有挂)-哔哩哔哩拱趴大菠萝挂破解侠是真的助透视。...
解迷透视!wejoker私人辅... 解迷透视!wejoker私人辅助软件,智星菠萝有挂吗,手段教程(有挂讲解)-哔哩哔哩1、wejoke...
解迷透视!拱趴游戏破解器!竟然... 解迷透视!拱趴游戏破解器!竟然是真的有辅助脚本(有挂细节)-哔哩哔哩一、拱趴游戏破解器游戏安装教程牌...
详情透视!poker红龙辅助,... 详情透视!poker红龙辅助,wepoker软件靠谱么,学习教程(竟然有挂)-哔哩哔哩1、wepok...