File tree Expand file tree Collapse file tree 1 file changed +23
-25
lines changed Expand file tree Collapse file tree 1 file changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -2213,31 +2213,29 @@ class Camera {
2213
2213
*
2214
2214
* // Move the camera along its "local" axes
2215
2215
* // when the user presses certain keys.
2216
- * if (keyIsPressed === true) {
2217
- *
2218
- * // Move horizontally.
2219
- * if (keyCode === LEFT_ARROW) {
2220
- * cam.move(-1, 0, 0);
2221
- * }
2222
- * if (keyCode === RIGHT_ARROW) {
2223
- * cam.move(1, 0, 0);
2224
- * }
2225
- *
2226
- * // Move vertically.
2227
- * if (keyCode === UP_ARROW) {
2228
- * cam.move(0, -1, 0);
2229
- * }
2230
- * if (keyCode === DOWN_ARROW) {
2231
- * cam.move(0, 1, 0);
2232
- * }
2233
- *
2234
- * // Move in/out of the screen.
2235
- * if (key === 'i') {
2236
- * cam.move(0, 0, -1);
2237
- * }
2238
- * if (key === 'o') {
2239
- * cam.move(0, 0, 1);
2240
- * }
2216
+ *
2217
+ * // Move horizontally.
2218
+ * if (keyIsDown(LEFT_ARROW)) {
2219
+ * cam.move(-1, 0, 0);
2220
+ * }
2221
+ * if (keyIsDown(RIGHT_ARROW)) {
2222
+ * cam.move(1, 0, 0);
2223
+ * }
2224
+ *
2225
+ * // Move vertically.
2226
+ * if (keyIsDown(UP_ARROW)) {
2227
+ * cam.move(0, -1, 0);
2228
+ * }
2229
+ * if (keyIsDown(DOWN_ARROW)) {
2230
+ * cam.move(0, 1, 0);
2231
+ * }
2232
+ *
2233
+ * // Move in/out of the screen.
2234
+ * if (keyIsDown('i')) {
2235
+ * cam.move(0, 0, -1);
2236
+ * }
2237
+ * if (keyIsDown('o')) {
2238
+ * cam.move(0, 0, 1);
2241
2239
* }
2242
2240
*
2243
2241
* // Draw the box.
You can’t perform that action at this time.
0 commit comments