Importing model into three.js - performance

后端 未结 3 2009
南笙
南笙 2020-12-30 17:01

Is there a good/recommended approach regarding performance to load a 3D model from file to be used in a three.js JavaScript application (especially where the model is genera

3条回答
  •  醉梦人生
    2020-12-30 17:34

    With the current Blender Three.js exporter (as of writing this I am referring to the r71 dev version) there are a few things you can do:

    • dial down the precision values, the short the float value precision the smaller the file
    • uncheck Indent, this is huge on animation files as it removes white spaces and \n characters
    • experiment with using msgpack compression (requires the mspack package be installed) msgpack loading example

    at some point, tho, the JSON format may not be the most ideal and maybe other formats will work better for you. As previous posts stated; model optimization goes a long ways too.

提交回复
热议问题