Hello,
I have a situation here, I’m using Threejs with react and I’m unable to load all the gltf or glb models into my project. I get parse errors when loading from local or from url on some 3d models.
I’m using gltf loader from here.
git repository of my code is here GitHub - abnormalcoder/gltfReact
for some models the error is:
The Gltf model url is here
TypeError: Cannot read property ‘URL’ of undefined
at GLTFParser.loadTexture (gltfLoader.js:1896)
at GLTFParser.getDependency (gltfLoader.js:1636)
at GLTFParser.assignTexture (gltfLoader.js:1998)
at GLTFParser.loadMaterial (gltfLoader.js:2214)
at GLTFParser.getDependency (gltfLoader.js:1632)
at GLTFParser.loadMesh (gltfLoader.js:2672)
at GLTFParser.getDependency (gltfLoader.js:1616)
at gltfLoader.js:3067
at GLTFParser.loadNode (gltfLoader.js:3123)
at GLTFParser.getDependency (gltfLoader.js:1612)
at buildNodeHierachy (gltfLoader.js:3214)
at gltfLoader.js:3294
at async Promise.all (:3000/index 7)
at async Promise.all (:3000/index 0)
at async Promise.all (:3000/index 0)
at async Promise.all (:3000/index 0)
at async Promise.all (:3000/index 0)
at async Promise.all (:3000/index 0)
at async Promise.all (:3000/index 0)
Can anyone help me with the solution on how to load gltf or glb models to load correctly.
l also wanted to know if it would help my project any better if I’m using threejs with react. Thanks in advance.