pxt-arcade 1.9.15 → 1.9.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/built/common-sim.js +5 -5
- package/built/sim.js +34 -5
- package/built/target.js +273 -140
- package/built/target.json +273 -140
- package/built/targetlight.json +5 -5
- package/docs/courses/csintro1/loops/intro.md +1 -1
- package/docs/courses/csintro1/loops/projectiles.md +2 -2
- package/docs/courses/csintro1/motion/overlap2.md +2 -2
- package/docs/courses/csintro1.md +1 -1
- package/docs/courses/csintro2/logic/intro.md +6 -6
- package/docs/hardware/dbg.md +1 -1
- package/docs/kiosk.html +1 -1
- package/docs/skillmap/peachtree/peach0.md +2 -2
- package/docs/skillmap/peachtree/peach1.md +5 -5
- package/docs/skillmap/peachtree/peach2.md +4 -4
- package/docs/skillmap/peachtree/peach3.md +2 -44
- package/docs/skillmap/peachtree.md +6 -6
- package/docs/skillmap/turkey/turkey1a.md +4 -3
- package/docs/skillmap/turkey/turkey2a.md +277 -0
- package/docs/skillmap/turkey/turkey3a.md +219 -0
- package/docs/skillmap/turkey-0.md +6 -6
- package/docs/static/kiosk/asset-manifest.json +3 -3
- package/docs/static/kiosk/static/js/{main.f07b0de0.js → main.c2dcb2a1.js} +3 -3
- package/docs/static/kiosk/static/js/{main.f07b0de0.js.LICENSE.txt → main.c2dcb2a1.js.LICENSE.txt} +0 -0
- package/docs/static/kiosk/static/js/main.c2dcb2a1.js.map +1 -0
- package/docs/static/skillmap/peachtree/peach-cert.pdf +0 -0
- package/package.json +4 -4
- package/docs/static/kiosk/static/js/main.f07b0de0.js.map +0 -1
package/built/common-sim.js
CHANGED
|
@@ -2448,9 +2448,9 @@ var pxsim;
|
|
|
2448
2448
|
// Player 1 keymap
|
|
2449
2449
|
this.setPlayerKeys(1, // Player 1
|
|
2450
2450
|
87, // W - Up
|
|
2451
|
-
83, //
|
|
2451
|
+
83, // S - Down
|
|
2452
2452
|
65, // A - Left
|
|
2453
|
-
|
|
2453
|
+
68, // D - Right
|
|
2454
2454
|
32, // Space - A
|
|
2455
2455
|
13 // Enter - B
|
|
2456
2456
|
);
|
|
@@ -2459,7 +2459,7 @@ var pxsim;
|
|
|
2459
2459
|
73, // I - Up
|
|
2460
2460
|
75, // K - Down
|
|
2461
2461
|
74, // J - Left
|
|
2462
|
-
|
|
2462
|
+
76, // L - Right
|
|
2463
2463
|
85, // U - A
|
|
2464
2464
|
79 // O - B
|
|
2465
2465
|
);
|
|
@@ -2467,8 +2467,8 @@ var pxsim;
|
|
|
2467
2467
|
// System keymap
|
|
2468
2468
|
this.setSystemKeys(80, // P - Screenshot
|
|
2469
2469
|
82, // R - Gif
|
|
2470
|
-
|
|
2471
|
-
|
|
2470
|
+
192, // Menu - '`' (backtick) button
|
|
2471
|
+
50 // Reset - Backspace button
|
|
2472
2472
|
);
|
|
2473
2473
|
// Player 1 alternate mapping. This is cleared when the game sets any player keys explicitly
|
|
2474
2474
|
this.altmap[38] = Key.Up; // UpArrow
|
package/built/sim.js
CHANGED
|
@@ -179,6 +179,12 @@ var pxsim;
|
|
|
179
179
|
const key = (typeof e.which == "number") ? e.which : e.keyCode;
|
|
180
180
|
b.setKey(key, true, e);
|
|
181
181
|
}
|
|
182
|
+
pxsim.Runtime.postMessage({
|
|
183
|
+
type: "messagepacket",
|
|
184
|
+
broadcast: false,
|
|
185
|
+
channel: "keydown-" + e.key,
|
|
186
|
+
data: new Uint8Array()
|
|
187
|
+
});
|
|
182
188
|
};
|
|
183
189
|
window.onkeyup = function (e) {
|
|
184
190
|
const b = board();
|
|
@@ -186,6 +192,12 @@ var pxsim;
|
|
|
186
192
|
const key = (typeof e.which == "number") ? e.which : e.keyCode;
|
|
187
193
|
b.setKey(key, false, e);
|
|
188
194
|
}
|
|
195
|
+
pxsim.Runtime.postMessage({
|
|
196
|
+
type: "messagepacket",
|
|
197
|
+
broadcast: false,
|
|
198
|
+
channel: "keyup-" + e.key,
|
|
199
|
+
data: new Uint8Array()
|
|
200
|
+
});
|
|
189
201
|
};
|
|
190
202
|
window.oncontextmenu = function (e) {
|
|
191
203
|
e.preventDefault();
|
|
@@ -433,6 +445,10 @@ var pxsim;
|
|
|
433
445
|
pxsim.Board = Board;
|
|
434
446
|
function indicateFocus(hasFocus) {
|
|
435
447
|
document.getElementById("root").setAttribute("class", hasFocus ? "" : "blur");
|
|
448
|
+
const b = board();
|
|
449
|
+
if (b) {
|
|
450
|
+
b.gameplayer.indicateFocus(hasFocus);
|
|
451
|
+
}
|
|
436
452
|
}
|
|
437
453
|
pxsim.indicateFocus = indicateFocus;
|
|
438
454
|
function throttleAnimation(event, handler) {
|
|
@@ -704,6 +720,9 @@ var pxsim;
|
|
|
704
720
|
this.screen = document.getElementById("game-screen");
|
|
705
721
|
this.menu = document.getElementsByClassName("game-menu-button")[0];
|
|
706
722
|
this.reset = document.getElementsByClassName("game-reset-button")[0];
|
|
723
|
+
// TODO: localize; currently can't use lf in this repo
|
|
724
|
+
this.menu.setAttribute("aria-label", "Menu");
|
|
725
|
+
this.reset.setAttribute("aria-label", "Reset Game");
|
|
707
726
|
if (this.menu) {
|
|
708
727
|
this.menu.onclick = () => {
|
|
709
728
|
visuals.pressButton(pxsim.Key.Menu);
|
|
@@ -778,6 +797,16 @@ var pxsim;
|
|
|
778
797
|
}
|
|
779
798
|
return false;
|
|
780
799
|
}
|
|
800
|
+
indicateFocus(focused) {
|
|
801
|
+
if (focused) {
|
|
802
|
+
this.menu.setAttribute("aria-disabled", "false");
|
|
803
|
+
this.reset.setAttribute("aria-disabled", "false");
|
|
804
|
+
}
|
|
805
|
+
else {
|
|
806
|
+
this.menu.setAttribute("aria-disabled", "true");
|
|
807
|
+
this.reset.setAttribute("aria-disabled", "true");
|
|
808
|
+
}
|
|
809
|
+
}
|
|
781
810
|
}
|
|
782
811
|
visuals.GamePlayer = GamePlayer;
|
|
783
812
|
})(visuals = pxsim.visuals || (pxsim.visuals = {}));
|
|
@@ -2520,9 +2549,9 @@ var pxsim;
|
|
|
2520
2549
|
// Player 1 keymap
|
|
2521
2550
|
this.setPlayerKeys(1, // Player 1
|
|
2522
2551
|
87, // W - Up
|
|
2523
|
-
83, //
|
|
2552
|
+
83, // S - Down
|
|
2524
2553
|
65, // A - Left
|
|
2525
|
-
|
|
2554
|
+
68, // D - Right
|
|
2526
2555
|
32, // Space - A
|
|
2527
2556
|
13 // Enter - B
|
|
2528
2557
|
);
|
|
@@ -2531,7 +2560,7 @@ var pxsim;
|
|
|
2531
2560
|
73, // I - Up
|
|
2532
2561
|
75, // K - Down
|
|
2533
2562
|
74, // J - Left
|
|
2534
|
-
|
|
2563
|
+
76, // L - Right
|
|
2535
2564
|
85, // U - A
|
|
2536
2565
|
79 // O - B
|
|
2537
2566
|
);
|
|
@@ -2539,8 +2568,8 @@ var pxsim;
|
|
|
2539
2568
|
// System keymap
|
|
2540
2569
|
this.setSystemKeys(80, // P - Screenshot
|
|
2541
2570
|
82, // R - Gif
|
|
2542
|
-
|
|
2543
|
-
|
|
2571
|
+
192, // Menu - '`' (backtick) button
|
|
2572
|
+
50 // Reset - Backspace button
|
|
2544
2573
|
);
|
|
2545
2574
|
// Player 1 alternate mapping. This is cleared when the game sets any player keys explicitly
|
|
2546
2575
|
this.altmap[38] = Key.Up; // UpArrow
|