ObjectLoader not loading JSON file

Hi everyone,

I am using Object Loader to load JSON file exported from blender. I am sourcing the latest build of three.js in all of my codes. But since the last 5 days the loader seems to throw an error which I never encountered. And if I use an older build it works perfectly.

Below is the screen shot of the error.

I tried using the legacy JSON loader but it seems to be deprecated in the recent builds. Can somebody please help me with this.

Thanks a lot in advance :slight_smile:

THREE.JSONLoader was removed with the latest release R99. Hence, it’s not possible to use THREE.ObjectLoader in order to load geometry data of type THREE.Geoemtry anymore.

There is a fallback solution. If you include the following file, it should be possible to use THREE.ObjectLoader as before:

However, you should not use the Blender JSON exporter anymore. It’s very important that you switch to better solutions. three.js recommends to use the glTF 3D format. There are glTF exporters for Blender and a respective GLTFLoader. More information right here:

https://threejs.org/docs/index.html#manual/en/introduction/Loading-3D-models

1 Like

@Mugen87 Thanks a lot for the quick reply. Yeah it worked like a charm :slight_smile:

As you suggested we will be switching to GLTF model format soon. Thanks for shedding light on the issue. Ciao. :slight_smile:

1 Like

That’s the spirit! :raised_hands:

1 Like

Hi, I am having the same issue where my json file cannot be loaded. I tried including the file above but it still not working. Any help would be appreciated. Thanks

38%20PM

Link is now a 404 error. File can be downloaded. - three.js/LegacyJSONLoader.js at 94894c124660b53da6518ce0f43efc36d6990e60 · mrdoob/three.js · GitHub