Neygem Posted February 17, 2021 Share Posted February 17, 2021 Hello, I am making a simple game using pixijs and have problem that animation stops when I hide the browser window and after showing the window the animation continutes from where it stopped. I simply need to keep animation going even in background. I use "app.ticker.add(loop);" and "loop" is a function where all the animation happens. Thank you Quote Link to comment Share on other sites More sharing options...
themoonrat Posted February 19, 2021 Share Posted February 19, 2021 The ticker class within pixi is based upon request animation frame, and that gets paused automatically by the browser when on another tab for efficiency reasons (why have a background tab eating up resources). There's nothing you can do to get around this... you could try animating based off your own version of a ticker that's say, based on setTimeout, but bear in mind it'll still get throttled in the background by most browsers, but at least it'll still run Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.