Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use THREE.JSONLoader after R99?

Tags:

three.js

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

like image 610
Luoede Avatar asked Dec 26 '18 09:12

Luoede


1 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

like image 163
Mugen87 Avatar answered Nov 06 '22 18:11

Mugen87