diff --git a/html/images/tanks.svg b/html/images/tanks.svg
index 8e1e65d..b281632 100644
--- a/html/images/tanks.svg
+++ b/html/images/tanks.svg
@@ -71,7 +71,8 @@
let velocity = [0, 0]; // meters per second
let acceleration = [0, 0]; // meters per second per second
let previous, zero, frameCount = 0;
- let friction = 7.5;
+ // let friction = 7.5;
+ let friction = 0;
let rotate = 0;
let rotationSpeed = 0.25;
@@ -230,7 +231,7 @@
requestAnimationFrame(t => animate(t));
}
- let force = 10;
+ let force = 1;
let spacePressed = false;
let upPressed = false;
@@ -250,36 +251,42 @@
}
break;
case "KeyW":
+ case "ArrowUp":
if (!upPressed) {
upPressed = true;
acceleration[1] += -force;
}
break;
case "KeyS":
+ case "ArrowDown":
if (!downPressed) {
downPressed = true;
acceleration[1] += force;
}
break;
case "KeyA":
+ case "ArrowLeft":
if (!leftPressed) {
leftPressed = true;
acceleration[0] += -force;
}
break;
case "KeyD":
+ case "ArrowRight":
if (!rightPressed) {
rightPressed = true;
acceleration[0] += force;
}
break;
case "KeyQ":
+ case "Comma":
if (!rotateCCWPressed) {
rotateCCWPressed = true;
rotate += -1;
}
break;
case "KeyE":
+ case "Period":
if (!rotateCWPressed) {
rotateCWPressed = true;
rotate += 1;
@@ -294,36 +301,42 @@
spacePressed = false;
break;
case "KeyW":
+ case "ArrowUp":
if (upPressed) {
upPressed = false;
acceleration[1] -= -force;
}
break;
case "KeyS":
+ case "ArrowDown":
if (downPressed) {
downPressed = false;
acceleration[1] -= force;
}
break;
case "KeyA":
+ case "ArrowLeft":
if (leftPressed) {
leftPressed = false;
acceleration[0] -= -force;
}
break;
case "KeyD":
+ case "ArrowRight":
if (rightPressed) {
rightPressed = false;
acceleration[0] -= force;
}
break;
case "KeyQ":
+ case "Comma":
if (rotateCCWPressed) {
rotateCCWPressed = false;
rotate -= -1;
}
break;
case "KeyE":
+ case "Period":
if (rotateCWPressed) {
rotateCWPressed = false;
rotate -= 1;