I know, this question has been on this forum, but i dont found any solutions.
I know, when browser tab lost focus - requestAnimationFrame function doest called.
Im not asking that Phaser 3 do any rendering or calculations in the background.
I just want, when browser tab has been focused back - delta calculated taking into account the lost time and my “object” has been in real place, not like a paused move. I dont need any moves in background.
Follow the example:
The red circle is move by Phaser tween.
The green circle is move “manually”.
When browser loses focus, and after some time get focus back, we can see:
- red circle continue moving from “paused” positiion.
- green circle also stop moving in background, but after focus we calculate “real” time passed from start animation and calculate the “real” progress for moving animation.
My question is, how i can configure Phaser 3 to do the same calculations or if i handle focus/blur events, how i can tell to phaser how much time passed in the background, and then pass the “real” delta to update all objects/tweens etc ?