From a866adc90a71b5d4dee1814bcf1243fac6a3d11b Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 18 Jan 2023 15:57:53 +0900 Subject: [PATCH] Attempt to fix first-load bug (again) --- wasm_build/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wasm_build/client.js b/wasm_build/client.js index 51a74f6..5182843 100644 --- a/wasm_build/client.js +++ b/wasm_build/client.js @@ -1,3 +1,5 @@ +// Use setTimeout to give the .wasm binary to load first. +setTimeout(() => { Rune.initClient({ visualUpdate: ({ newGame, yourPlayerId}) => { const { player1, player2, first_choices, second_choices, ready, matchup_done, pos, prev_pos, gameover, gameover_called, matchup_started } = newGame; @@ -54,3 +56,4 @@ Rune.initClient({ } }, }); +}, 500); -- 2.49.0