From 1a08dd2bd6839f0be4b12dc5317ab0b00ca23ae1 Mon Sep 17 00:00:00 2001 From: Matthew Kosarek Date: Tue, 16 Mar 2021 22:03:10 -0400 Subject: Proper update loop for a WebAssembly scene running --- frontend/_wasm/wasm.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'frontend/_wasm/wasm.js') 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 +})() -- cgit v1.2.1