Reputation: 373
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
Upvotes: 3
Views: 835
Reputation: 1
Try using
<a-entity
gltf-model="YOUR_GLTF_LINK"
scale="5 5 5"
position="100 100 0"
>
</a-entity>
Upvotes: 0
Reputation: 4585
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
Upvotes: 1