Open spite opened 3 years ago
@spite, I think this is a good use case and might generalize beyond creative coding. I'm eager to hear if this triggers folks to submit more use cases from other domain that may struggle similarly with throttling. #5 is a long-running compute-intensive task that relies on the tab being active and visible similarly to this use case.
Thanks for the submission!
I know it's a fringe use case of the web, but some of us do creative coding in the browser. Some of the algorithms are iterative in nature, and take some time to stabilise, accumulate, resolve, etc., besides the rendering: physics simulations, flow fields tracing, growth algorithms and more.
It's usually left to a .
step()
or.simulate()
function that gets called withrequestAnimationFrame
until all works is done. It may or may not render to screen.With throttling now applied to Chrome, for instance, it becomes a dedicated task to keep the tab active and visible so the process goes on, even if running on a computer not running on battery.