Three.js running in a worker via OffscreenCanvas

(7/25/2017 - requires Firefox with gfx.offscreencanvas.enabled set to true)

(9/5/2017 - Chrome has now added support for OffscreenCanvas, which can be enabled by enabling chrome://flags/#enable-experimental-canvas-features

This animated gif stops animating while the main thread is blocked, but the renderer continues unhindered as long as we run our own setTimeout() loop in the worker.

However, if we try to proxy rAF from the main thread, rendering still locks.

Ideally, browsers would implement rAF in WebWorkers, in addition to WebVR, Audio, and Gamepad APIs