Luoede
Luoede

Reputation: 75

How to use THREE.JSONLoader after R99

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

Upvotes: 6

Views: 7049

Answers (2)

mariko
mariko

Reputation: 216

ObjectLoader is available and it works as JSONLoader

Upvotes: 0

Mugen87
Mugen87

Reputation: 31066

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

Upvotes: 8

Related Questions