我正在使用以下版本的aframe和aframe-react
"aframe": "^1.0.3",
"aframe-react": "^4.4.0",
我正在尝试渲染gltf模型-
<Scene embedded>
<a-assets>
<a-asset-item id="earth" src="https://cdn.glitch.com/36cb8393-65c6-408d-a538-055ada20431b/Astronaut.glb?1542147958948"></a-asset-item>
</a-assets>
<a-box color="red" depth="2" height="4" width="0.5" position="0 0 -2"></a-box>
<Entity gltf-model={{src:'#earth'}}></Entity>
</Scene>
但是在渲染框时,不会渲染gltf模型。您能帮忙吗?
这里是重新创建此问题的沙箱-
https://codesandbox.io/s/aframe-react-porh5
也添加了一个故障项目-
您的模型在this example中加载正常。 A-Frame react捆绑了早于glTF 2.0的旧A-Frame 0.5.0,后者是模型的格式。仅供参考,由于对3D应用程序的性能影响,A帧反应为no longer maintained and not recommended