i develop a game with Three.js which loads obj models from server depending on a stream from server sent event, all models are very simple and very low poly, the code runs well but with about 50 models loaded the event source makes it very very slow, i make the event source code inside a web worker which increased the performance but still not acceptable at all. what should i do to enhance the performance?
我开发了一个带有Three.js的游戏,根据来自服务器发送事件的流加载来自服务器的obj模型,所有模型都非常简单且非常低聚,代码运行良好但是加载了大约50个模型,事件源非常非常慢,我在Web工作者中制作事件源代码,这提高了性能,但仍然不能接受。我该怎么做才能提高性能?
1 个解决方案
#1
I would suggest you to take a look at JSON 3D exporter project. It basically converts 3D objects into plain JSON files, it becomes really lightweight and so usefull in order to improve the time response. In order to do so, you will need Blender.
我建议你看一下JSON 3D导出器项目。它基本上将3D对象转换为普通的JSON文件,它变得非常轻量级,因此非常有用,以便改善时间响应。为此,您需要Blender。
https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender
#1
I would suggest you to take a look at JSON 3D exporter project. It basically converts 3D objects into plain JSON files, it becomes really lightweight and so usefull in order to improve the time response. In order to do so, you will need Blender.
我建议你看一下JSON 3D导出器项目。它基本上将3D对象转换为普通的JSON文件,它变得非常轻量级,因此非常有用,以便改善时间响应。为此,您需要Blender。
https://github.com/mrdoob/three.js/tree/master/utils/exporters/blender