Hello,

I'm programming a game loop and I'm trying to find a way to make it work 
normally on browser tab switch, getting the actual delta every frame.

This is the behavior when the browser tab is unselected:

JS *setInterval(loop, 0)* behavior is calling the interval every second 
instead every frame. That returns a delta of ~1000ms.

Then I try to do it with emscripten and I noticed 
*emscripten_request_animation_frame_loop 
*stops working when I unselect the browser tab. So the delta of my main 
loop returns to the amount of time the tab was unselected. The main loop is 
never called while the tab is unselected.

Is there a way to prevent this and let wasm call the loop function every 
frame even if the browser tab is unselected?


-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/d0704b19-1a60-4c45-b0b2-027aa69bd3b9n%40googlegroups.com.

Reply via email to