Firefox has made a great step and now support Offscreen Canvas DOM API which is great for us as babylonjs support that feature out of the box!
oh! That’s a fantastic news!
by the way, do people use that feature? I feel like the cost of communication with main thread is still a problem
I’ve been using it in Chrome. I think it depends on your use-case whether or not it’s worth while. It does add some complications, but it also lets you multitask much better.
I tested out Firefox Nightly a few weeks ago, and performance was terrible. I’ll have to try out the 105.
Offscreen canvas is very useful for some tasks, especially when you don’t need much communication (like textures preparing, see this thread).
I’ve been using it for some time and it’s performance critical for my project as I can offload the engine into a separate web worker. I have found some limitations, and made work-around for these for my project.
My project uses 4 web workers.
- Main thread for DOM related stuff and communications.
- “Babylonjs” web worker for rendering.
- 2x data-processing web workers that is preparing data for babylonjs.
Ooooh great news!
OffscreenCanvas in Firefox still seems about twice as slow as regular canvas.
Yes, there are some issues with Firefox using OffscreenCanvas, most notably for my project was animation timings on avatars in my game.
The animations seems to be running just slower and some glitches with rendering overall performance was “ok”.