Three.js颗粒装入出奇的慢?什么是导致FPS缓慢和庞大的切? (从60 + FPS 1-2 FPS)出奇、颗粒、缓慢、庞大

2023-09-08 10:51:24 作者:梦想无所畏惧

我无法弄清楚什么是放慢我的可视化。理想情况下,我想60 fps的。不是1 fps或2 fps的。

I can't figure out what's slowing down my visualization. Ideally, I would like 60 fps. Not 1 fps or 2 fps.

下面是仓库。对于第一个,里面LeapVis1.2,如果你开的index.html用Firefox您下载相应加载的文件夹后。 非颗粒

Here are the repositories. For the first one, inside LeapVis1.2, if you open index.html with Firefox after you download the folder the vis should load. Non-Particles

有关使用颗粒,开放canvas_particles_random.html在Firefox仓库。 颗粒(更慢)

For the repository that uses particles, open canvas_particles_random.html in Firefox. Particles (Even slower)

推荐答案

首先,这是延续了这个question.其缓慢的原因是因为你使用的是CanvasRenderer代替WebGLRenderer。我想你误解了我。在three.js有两个对象:粒子 - 帆布和粒子系统 - 对WebGL的。我从来没有彪用帆布,因为它是非常缓慢与WebGL的比较。

First of all this is continuation of this question. The reason of its slowness is because your are using CanvasRenderer instead of WebGLRenderer. I guess you've misunderstood me. In three.js there are two objects: Particle - for canvas and ParticleSystem - for webgl. I've never ment to use canvas, because it is very slow in comparison with webgl.