Limiting framerate in Three.js to increase performance, requestAnimationFrame?

后端 未结 5 2008
终归单人心
终归单人心 2020-12-24 03:26

I was thinking that for some projects I do 60fps is not totally needed. I figured I could have more objects and things that ran at 30fps if I could get it to run smoothly at

5条回答
  •  囚心锁ツ
    2020-12-24 04:02

    The amount of work your CPU and GPU needs to do depend on the workload and they set the upper limit of smooth framerate.

    • GPU works mostly linearly and can always push out the same count of polygons to screen.

    • However, if you have doubled the number of objects CPU must work harder to animate these all objects (matrix transformationsn and such). It depends on your world model and other work Javascript does how much extra overhead is given. Also the conditions like the number of visible objects is important.

    For simple models where all polygons are on the screen always then it should pretty much follow the rule "half the framerate, double the objects". For 3D shooter like scenes this is definitely not the case.

提交回复
热议问题