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德州有挂吗(AApoker ai插件)一贯真的有辅助脚本(哔哩哔哩)hhpo...
此事引发网友热议!微乐小程序黑... 此事引发网友热议!微乐小程序黑科技免费,微信小程序游戏破解微乐辅助(透视)都是是真的辅助教程(哔哩哔...
透视积累!哈糖大菠萝能开挂吗(... 透视积累!哈糖大菠萝能开挂吗(WePoKer官方)一直真的有辅助脚本(哔哩哔哩)哈糖大菠萝能开挂吗脚...
做出回应!微乐小程序免费黑科技... 做出回应!微乐小程序免费黑科技,微乐自建房免费黑科技下载(透视)其实是有辅助插件(哔哩哔哩)1、进入...
事发当天!微乐小程序免费黑科技... 事发当天!微乐小程序免费黑科技,微乐辅助靠谱麻(透视)总是存在有辅助器(哔哩哔哩)脚本下载中分为三种...
透视积累!wepokerplu... 透视积累!wepokerplus辅助(WePoKer国外版)果然是真的有辅助脚本(哔哩哔哩)透视积累...
透视了解!微乐小程序黑科技免费... 透视了解!微乐小程序黑科技免费,淘宝的微乐辅助是真的吗(透视)好像存在有辅助脚本(哔哩哔哩)1、上手...
透视办法!we-poker辅助... 透视办法!we-poker辅助器(HHpoker脚本)其实有辅助教程(哔哩哔哩)1、首先打开we-p...
透视美元局!微信微乐游戏辅助脚... 透视美元局!微信微乐游戏辅助脚本,微乐小程序辅助器代理(透视)竟然是真的辅助工具(哔哩哔哩);脚本下...
透视策略!pokemmo辅助器... 透视策略!pokemmo辅助器手机版下载(WPK控制牌)好像真的有辅助神器(哔哩哔哩)小薇(辅助器软...