You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.
When loading assets, a parcel will pause the process when switching to another browser tab. That means I need to stay on the tab while the game loads to see any progress.
This isn't intentional but it's how the main loop works on the browser, it is using requestAnimationFrame which potentially gets slowed or suspended entirely when backgrounded.
Currently the Promises are stepped by the main loop, which is what the loading would use which is why they're paused that way.
I'll look into it using setImmediate/setTimeout - but I will be careful with this causing state problems. For example, if you do actually pause the loop manually when backgrounded or losing focus, you wouldn't want the promises controlled by the browser - and just arriving when things aren't supposed to be happening.
The text was updated successfully, but these errors were encountered: