diff --git a/html/images/space.svg b/html/images/space.svg
index 9c0ca19..fdcacac 100644
--- a/html/images/space.svg
+++ b/html/images/space.svg
@@ -215,7 +215,6 @@
const det = (+xb - +xa) * (+yc - +ya) - (+xc - +xa) * (+yb - +ya);
const pos = `${positionX},${positionY}`;
- const cwOrientation = det < 0;
const isClockwise = det < 0;
let isAcute = false;
@@ -494,25 +493,8 @@
let rotateCWPressed = false;
let rotateCCWPressed = false;
- const pressed = [
- spacePressed,
- upPressed,
- downPressed,
- leftPressed,
- rightPressed,
- rotateCWPressed,
- rotateCCWPressed,
- ];
-
-
document.addEventListener("keydown", function(e) {
- // console.log(isReadingKeys, pressed.every(k => k));
-
- if (!isReadingKeys && pressed.some(k => k)) {
- return;
- } else {
- isReadingKeys = true;
- }
+ if (!isReadingKeys) return;
if (!started && !restart) {
started = true;
@@ -575,6 +557,8 @@
});
document.addEventListener("keyup", function(e) {
+ isReadingKeys = true;
+
switch (e.code) {
case "Space":
spacePressed = false;