OffscreenCanvas

The OffscreenCanvas allows to create a canvas that can be rendered off screen. It can also be used in web workers.
Your browser does not support OffscreenCanvas.

OffscreenCanvas can be used as a progressive enhancement, also with some of the leading graphic libraries on the market like three.js.

When you click "make busy" button, the animation on window canvas is blocked, while OffscreenCanvas, running on a worker, still plays smoothly.

 

Canvas on main thread

Canvas on worker