fix sticky fps keys when blurring (#19)

This commit is contained in:
Alexander R. Mcneilly
2025-05-30 11:03:27 -07:00
committed by GitHub
parent 8b5f854848
commit 9eb37b9677
+4
View File
@@ -186,6 +186,10 @@ export class FpsMovement {
this.keydown[event.key] = false;
this.keycode[event.code] = false;
});
window.addEventListener("blur", () => {
this.keydown = {};
this.keycode = {};
});
}
// Call this method in your render loop with `control` set to the object to control