diff options
author | natrixaeria <janng@gmx.de> | 2019-06-12 16:59:09 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-06-12 16:59:09 +0200 |
commit | 1b6a2835e57a7d399f43ecf493060e68042f9af8 (patch) | |
tree | e9f71720f03064c10876a9afa5ab406c00838d10 /webhogg/wasm/pkg/worker.js | |
parent | 3a3d0fc3d4733f8908e23a03f860d76340479ec4 (diff) |
Clone the colored logging from old commit
Diffstat (limited to 'webhogg/wasm/pkg/worker.js')
-rw-r--r-- | webhogg/wasm/pkg/worker.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/webhogg/wasm/pkg/worker.js b/webhogg/wasm/pkg/worker.js new file mode 100644 index 0000000..bd11676 --- /dev/null +++ b/webhogg/wasm/pkg/worker.js @@ -0,0 +1,9 @@ +onmessage = async function (e) { + importScripts('../bin/webhogg-wasm.js'); + let ctx = await wasm_bindgen(e.data[1]); + + if (e.data[0] === 'graphics') + ctx.start_graphics(); + else if (e.data[0] === 'logic') + ctx.start_logic(); +} |