Allow driving the renderer from a web worker

The build generates a new output set called `render-webgl-worker`, meant
to be imported from a web worker. This exposes the `RenderWebGLRemote`
class to facilitate communication with the renderer using `postMessage`
and `onmessage`.
Only a few messages are implemented so far, but it's enough to run the
demo page.
This commit is contained in:
Christopher Willis-Ford
2016-06-14 11:40:48 -07:00
parent f0dae7aa48
commit fc10df7e41
11 changed files with 262 additions and 45 deletions

View File

@@ -4,7 +4,9 @@ var webpack = require('webpack');
module.exports = {
entry: {
'render-webgl': './src/index.js',
'render-webgl.min': './src/index.js'
'render-webgl.min': './src/index.js',
'render-webgl-worker': './src/worker.js',
'render-webgl-worker.min': './src/worker.js'
},
devtool: 'source-map',
output: {