From bf199ccd7b45a77f021d3b414a5c380bd4c790e4 Mon Sep 17 00:00:00 2001 From: sanine Date: Sat, 6 Jul 2024 23:27:32 -0500 Subject: preload sfx --- index.html | 12 ++++++------ main.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index 20d07b9..ccd16f1 100644 --- a/index.html +++ b/index.html @@ -18,13 +18,13 @@ - - - - - - + + + + + +
diff --git a/main.js b/main.js index 4ec64dc..44a0fe3 100644 --- a/main.js +++ b/main.js @@ -76,7 +76,7 @@ window.onload = () => setTimeout(() => { Promise.all([...Object.values(sfx)].map(x => new Promise(resolve => { x.load(); - x.addEventListener('canplaythrough', resolve); + x.addEventListener('canplaythrough', resolve, false); }))).then( () => setupLevelSelectUi(root, sfx) ); -- cgit v1.2.1