Description of the problem
Please help. I got below error when I tried to load a .gltf file. I used the sample code: https://threejs.org/examples/#webgl_loader_gltf2
Also, here is the link of the files I used:
http://densetsughem.com/Dog.zip
THREE.Object3D.add: object not an instance of THREE.Object3D. undefined
GLTFLoader.js:2145 Uncaught (in promise) TypeError: Cannot read property 'children' of undefined
at buildNodeHierachy (GLTFLoader.js:2145)
at buildNodeHierachy (GLTFLoader.js:2152)
at GLTFLoader.js:2178
at _each (GLTFLoader.js:604)
at GLTFLoader.js:2166
at <anonymous>
buildNodeHierachy @ GLTFLoader.js:2145
buildNodeHierachy @ GLTFLoader.js:2152
(anonymous) @ GLTFLoader.js:2178
_each @ GLTFLoader.js:u
(anonymous) @ GLTFLoader.js:2166
Thank you in advance.
Three.js version
- Dev
- r85
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Hi @densetsughem — thanks for the details! You have a glTF1.0 model here, and we’re not supporting that much longer. Rather than try to debug what might be wrong with GLTFLoader or with the model, could you try making a glTF2.0 version?
There is a new glTF Blender exporter that should help: https://github.com/KhronosGroup/glTF-Blender-Exporter
To test glTF2.0 files in THREE.GLTF2Loader, you can drag-and-drop them here: https://gltf-viewer.donmccurdy.com/