Improve moviment !

This commit is contained in:
2026-09-27 15:37:09 -03:00
parent 5298ff7cf3
commit 9f47c709f1
10 changed files with 285 additions and 37 deletions
+6
View File
@@ -122,6 +122,12 @@ export class InputManager {
}
});
// keys let go while the window isn't focused never send keyup, so they'd stay held
self.addEventListener("blur", () => {
this.keys_down.clear();
this.mouse_buttons_down.clear();
});
self.addEventListener("keyup", (e) => {
e.preventDefault();
e.stopPropagation();