Uncaught TypeError: Cannot read property 'extractUrlBase' of undefined at GLTFLoader.load


I’m working with this example from Potree, here’s the link: [http://potree.org/potree/examples/features_sorvilier.html]
I’m trying to add this new GLTF file called “DamagedHelmet.gltf” instead of the object file called “stanford_bunny_reduced.obj” from the original the example, but I’m getting this error:

“Uncaught TypeError: Cannot read property ‘extractUrlBase’ of undefined
at GLTFLoader.load”

The added the gltf file where the object file was and I also imported the GLTFLoader.js file where the OBJLoder.js. I’m not sure how to solve this bug. Please, help!!


features_sorvilier_gltf_test.html (9.7 KB)

Cross-post: https://stackoverflow.com/questions/50531538/uncaught-typeerror-cannot-read-property-extracturlbase-of-undefined-at-gltflo

This demo doesn’t reproduce the problem, but only shows your (working) OBJ version - a demo reproducing the GLTF issue would be helpful. But most likely, you’ve used a version of GLTFLoader that does not match your version of three.js.

Loaders from r85 are here, in that version the glTF 2.0 loader was called GLTF2Loader instead of GLTFLoader.