You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Angular应用中导入网格仅在Inspector激活时生效的问题求助

Angular应用中导入网格仅在Inspector激活时生效的问题求助

我在自己的Angular应用里碰到个特别棘手的奇怪问题,琢磨了好半天都没找到原因,想来求助各位大佬!

我是通过下面这段代码导入模型网格的:

SceneLoader.ImportMesh("", "assets/models/", "model.gltf", this.scene, function(model) {});

但每次执行这段代码都会抛出错误:

Unable to load from assets/models/model.gltf: importMesh of unknown

可奇怪的是,只要我用Inspector启动场景,代码改成这样:

Inspector.Show(this.scene, {});

模型就能正常加载出来了,完全没问题。

对了,这个模型是我用Blender导出的glTF Embedded格式,而且在Three.js项目里测试过,是可以正常加载使用的。

备注:内容来源于stack exchange,提问作者madmax

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 11:22:59