This is a feature idea.
The concept is simple: load the whole Three.js library inside a worker, make a scene as normal, then instead of rendering to a
WebGLRenderer, one just renders to a
This renderer will do the usual stuff that WebGLRenderer does: calculate world matrices and other CPU-blocking stuff, then send over a binary representation of the scene graph (SharedArrayBuffer) to the main thread. Maybe JSON would work too, especially for big scenes where
stringify is small compared to the otherwise large amount of main-thread calculations.
On the main thread, a runner is responsible for querying the worker for data every frame, and on the main thread it will use something similar to a
WebGLRenderer but with the computation parts removed, and it will render using the DOM canvas.
Of course, this is a simplified description to get thoughts going…