How to use THREE.JSONLoader after R99?

前端 未结 1 1528
抹茶落季
抹茶落季 2021-01-20 01:44

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

1条回答
  •  清酒与你
    2021-01-20 02:04

    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

    0 讨论(0)
提交回复
热议问题