mirror of
https://github.com/storytold/spark.git
synced 2026-10-22 08:16:06 +00:00
fix sticky fps keys when blurring (#19)
This commit is contained in:
committed by
GitHub
parent
8b5f854848
commit
9eb37b9677
@@ -186,6 +186,10 @@ export class FpsMovement {
|
|||||||
this.keydown[event.key] = false;
|
this.keydown[event.key] = false;
|
||||||
this.keycode[event.code] = 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
|
// Call this method in your render loop with `control` set to the object to control
|
||||||
|
|||||||
Reference in New Issue
Block a user