#Run Sketch when browser window is occluded
7 messages · Page 1 of 1 (latest)
found this page which might have a solution
https://developer.chrome.com/blog/timer-throttling-in-chrome-88/#state-polling
hopefully there is a way to make it work with p5js
i dont know if its possible to disable the throttling itself for the whole page using just javascript, but another solution might be to change some browser flags
What I usually do is pull out the tab into its own browser window, I find it keeps running as long as it's a stand along window (even if other apps go in front). Maybe that's not exactly right though?
paperjs has a keepalive="true" setting. Might be worth looking at how they are doing that - just JS and canvas so there should be a way of replicating this in p5js - http://paperjs.org/tutorials/getting-started/working-with-paper-js/