Spaces:
Running
Running
antimatter15
commited on
Commit
·
fa60b05
1
Parent(s):
e7bc5f9
shift-up/down to move up/down for issue #4
Browse files
main.js
CHANGED
|
@@ -1089,14 +1089,22 @@ async function main() {
|
|
| 1089 |
let inv = invert4(viewMatrix);
|
| 1090 |
|
| 1091 |
if (activeKeys.includes("ArrowUp")) {
|
| 1092 |
-
|
| 1093 |
-
|
| 1094 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1095 |
}
|
| 1096 |
if (activeKeys.includes("ArrowDown")) {
|
| 1097 |
-
|
| 1098 |
-
|
| 1099 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1100 |
}
|
| 1101 |
if (activeKeys.includes("ArrowLeft"))
|
| 1102 |
inv = translate4(inv, -0.03, 0, 0);
|
|
|
|
| 1089 |
let inv = invert4(viewMatrix);
|
| 1090 |
|
| 1091 |
if (activeKeys.includes("ArrowUp")) {
|
| 1092 |
+
if(activeKeys.includes("Shift")){
|
| 1093 |
+
inv = translate4(inv, 0, -0.03, 0);
|
| 1094 |
+
}else{
|
| 1095 |
+
let preY = inv[13];
|
| 1096 |
+
inv = translate4(inv, 0, 0, 0.1);
|
| 1097 |
+
inv[13] = preY;
|
| 1098 |
+
}
|
| 1099 |
}
|
| 1100 |
if (activeKeys.includes("ArrowDown")) {
|
| 1101 |
+
if(activeKeys.includes("Shift")){
|
| 1102 |
+
inv = translate4(inv, 0, 0.03, 0);
|
| 1103 |
+
}else{
|
| 1104 |
+
let preY = inv[13];
|
| 1105 |
+
inv = translate4(inv, 0, 0, -0.1);
|
| 1106 |
+
inv[13] = preY;
|
| 1107 |
+
}
|
| 1108 |
}
|
| 1109 |
if (activeKeys.includes("ArrowLeft"))
|
| 1110 |
inv = translate4(inv, -0.03, 0, 0);
|