summaryrefslogtreecommitdiff
path: root/WebInterface/wasm/asm-paint/loader.js
diff options
context:
space:
mode:
authornatrixaeria <janng@gmx.de>2019-05-22 22:00:23 +0200
committernatrixaeria <janng@gmx.de>2019-05-22 22:00:23 +0200
commit28c16ac6e6955b98f6485564d2c15f639bef5802 (patch)
treedf9d59be376d7d482c95b5be4bc01d010a8d00e4 /WebInterface/wasm/asm-paint/loader.js
parent9cc2841cf49a6180dc9426892d11e957142e88ea (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.js18
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);
-