Bizorke / Gear3Engine-Issues

For bugs and features.
1 stars 0 forks source link

Framerate in chrome sometimes drops when browser has focus. #1030

Open JSideris opened 4 years ago

JSideris commented 4 years ago

Getting 60fps draw when chrome doesn't have focus, and 30fps when it does. Something is wrong.

JSideris commented 4 years ago

Bug was discovered during modularization update, but was in production before the update was rolled out.

Modularization uses the Pixi.js v5 ticker for draw updates. The old method used RequestAnimationFrame.

Others have experienced this problem as well: https://stackoverflow.com/q/49700526/720238

One option is to switch back to requestanimationframe, and just use timeouts to fill the in-between frames if this starts happening. Edit: probably won't work because rendering is probably happening at 30fps...