summaryrefslogtreecommitdiff
path: root/frontend/_wasm/wasm.js
diff options
context:
space:
mode:
authorMatthew Kosarek <mattkae@protonmail.com>2021-03-16 22:03:10 -0400
committerMatthew Kosarek <mattkae@protonmail.com>2021-03-16 22:03:10 -0400
commit1a08dd2bd6839f0be4b12dc5317ab0b00ca23ae1 (patch)
treef204817e3dd98358016006d04c39f6ff84c52754 /frontend/_wasm/wasm.js
parent98d7d6cb702af2708f20e7cf16ee10a9f71b578a (diff)
Proper update loop for a WebAssembly scene running
Diffstat (limited to 'frontend/_wasm/wasm.js')
-rw-r--r--frontend/_wasm/wasm.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/frontend/_wasm/wasm.js b/frontend/_wasm/wasm.js
index 6a3bfae..37d5faf 100644
--- a/frontend/_wasm/wasm.js
+++ b/frontend/_wasm/wasm.js
@@ -3,8 +3,17 @@
(function() {
function main() {
+ $('#wasm_canvas_play_button').on('click', function() {
+ $(this).hide();
+ $("#wasm_canvas_stop_button").show();
+ });
+
+ $('#wasm_canvas_stop_button').on('click', function() {
+ $(this).hide();
+ $("#wasm_canvas_play_button").show();
+ });
}
$(document).ready(main);
-})() \ No newline at end of file
+})()