diff options
author | natrixaeria <janng@gmx.de> | 2019-05-22 22:00:23 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-22 22:00:23 +0200 |
commit | 28c16ac6e6955b98f6485564d2c15f639bef5802 (patch) | |
tree | df9d59be376d7d482c95b5be4bc01d010a8d00e4 /WebInterface/wasm/asm-paint/loader.js | |
parent | 9cc2841cf49a6180dc9426892d11e957142e88ea (diff) |
Load wasm into the browser and execute it
Diffstat (limited to 'WebInterface/wasm/asm-paint/loader.js')
-rw-r--r-- | WebInterface/wasm/asm-paint/loader.js | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/WebInterface/wasm/asm-paint/loader.js b/WebInterface/wasm/asm-paint/loader.js deleted file mode 100644 index 7313fa0..0000000 --- a/WebInterface/wasm/asm-paint/loader.js +++ /dev/null @@ -1,18 +0,0 @@ -console.log('js> create import object'); -let importObject = { imports: { my_alert: arg => alert(arg) } }; -//let importObject = {}; - -console.log('js> create fetch object'); - -let asm_paint_bg = fetch('asm_paint_bg.wasm'); - -console.log('js> instantiate streaming'); - -function and_then(obj) { - console.log('js> reached instantiate streaming\'s then'); - return obj.instance.exports.greet(); -} - -WebAssembly.instantiateStreaming(asm_paint_bg, importObject) - .then(and_then); - |