How to use THREE.JSONLoader after R99

Viewed 5532

Now the JSONLoader had been removed, how could I load the models that loaded by JSONLoader before?

2 Answers

Yes, JSONLoader was removed from three.js with R99. But the loader is still available as LegacyJSONLoader. If you include the file into your project, you can create an instance of LegacyJSONLoader and load your JSON model as before.

Keep in mind that you are using an obsolete JSON format. You might want to consider to export your models to glTF via GLTFExporter in order to use a future-proof 3D format. The following example demonstrates the usage of the mentioned exporter:

https://threejs.org/examples/misc_exporter_gltf.html

ObjectLoader is available and it works as JSONLoader

Related