From df192c6bfe28fd00132c23d89e4f03d64d78a6e7 Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Thu, 31 Oct 2024 15:32:05 -0400 Subject: Avoid leaking the event queue --- .gitignore | 4 +++- src/index.js | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index b0a5c34..2ae5c56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -/node_modules/ /dist/ +/node_modules/ + +/.vscode/ diff --git a/src/index.js b/src/index.js index 21d2af9..059ba68 100644 --- a/src/index.js +++ b/src/index.js @@ -119,6 +119,8 @@ RAPIER.init().then(() => { objElement.style.width = `${objSize.x}px`; objElement.style.height = `${objSize.y}px`; + eventQueue.free(); + setTimeout(mainLoop, STEP_MS); }; -- cgit v1.2.3-57-g22cb