Improve moviment !
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user