0

i'm loading a gltf2 model in Aframe-react app, in inspector the model looks loaded but shows empty.

This happens for .gltf 1.0, .gltf 2.0, and .glb format. They look good in online model viewers but empty in Aframe React app.

loading model

<Entity id="mod" gltf-model= "/test_asset/1/scene.gltf" />

and

  "dependencies": {
    "aframe": "^0.8.2",
    "aframe-react": "^4.4.0",
    "axios": "^0.18.0",
    "bootstrap": "*",
    "react": "^16.6.3",
    "react-dom": "^16.6.3",
    "react-scripts": "2.1.1"
  }

rendering happens inside a react component that than renders in main app.js

i also triple checked scale aposition and other parmeters, it just looks empty,

someone had similar problem in loading gltf?

Thank You!

LouFoo
  • 3
  • 6

2 Answers2

0

Try:

<Scene>
  <a-assets>        
    <a-asset-item id="mod" src="test_asset/1/scene.gltf"></a-asset-item>
  </a-assets>
  <Entity
    id="myMod"
    gltf-model="#mod"
    scale="0.01 0.01 0.01"
    position={{ x: 0, y: 0.368, z: -3.100 }}
  />
 </Scene>       
Kai Hotz
  • 1
  • 1
0

Use .glb models and in inspector window increase its scale and rotation

Shantesh Sindgi
  • 265
  • 3
  • 4