1
votes

I am using following versions of aframe and aframe-react

"aframe": "^1.0.3",
"aframe-react": "^4.4.0",

I am trying to render a gltf model -

<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>

but while the box is rendered, the gltf model does not get rendered. Could you please help?

Here is a sandbox to recreate this issue -

https://codesandbox.io/s/aframe-react-porh5

added a glitch project too -

https://glitch.com/~sturdy-fibre-qzojw9k2ki

1
Help people to help you. Provide link to example to reproduce.Diego Marcos
Page doesn't load, there are console errors. Glitch is probably a better avenue.Diego Marcos
Hi Diego, I created a glitch - glitch.com/~sturdy-fibre-qzojw9k2kiNiraj

1 Answers

1
votes

Your model loads fine in this example using A-Frame 1.0.3. A-Frame React bundles an old A-Frame version (0.5.0) that predates glTF 2.0 that is the format of your model. FYI, A-Frame React is no longer maintained and not recommended due to performance implications for 3D applications