๐ OffscreenCanvas
The OffscreenCanvas API lets you offload the rendering of a canvas to a web worker. This is useful if you want to avoid blocking the main thread and causing jank in your canvas when performing heavy computations (demo).
Here is a repository showing how to set it up with Three.js and React Three Fiber (demo).
OffscreenCanvas is supported by Chrome and Firefox, and will be supported in Safari 16.4 (Can I Use).
react-three-offscreen (repo) โ Offscreen worker canvas for R3F