Preferences

Ah, someone reported this to me today, but I must admit I have no idea how to address the issue. Currently the canvas animations are stopped when out of context, but yeah they have to be loaded.

The code on the blog is pretty simple and naive (I'm not a webdev): https://github.com/ubitux/scripts/blob/main/share/blog/shade...

Any suggestion on how to address the issue is welcome.

Note: I don't have any Windows machine to test with


If you just want it to work, stick this script on your page

https://github.com/greggman/virtual-webgl

If you want to make your own solution there's one listed here about 1/2 way down the page

https://webglfundamentals.org/webgl/lessons/webgl-multiple-v...

As an aside, WebGPU doesn't have this issue or at least has it less. For one, WebGPU can use a single device to render to multiple canvases, something WebGL can't. Another is that WebGPU is mostly stateless making it easier for both the user and the browser.

Incredible, thank you very much. I've included the script for a quick fix, I'll see how to make to cook something myself at some point!
Similar issue on iOS Safari: all examples work except for the very first one.
It loaded fine for me. iOS 26.0, iPhone 16 Pro.

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal