pxt-common-packages 10.2.2 → 10.2.4
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.d.ts +1 -1
- package/built/common-sim.js +7 -3
- package/libs/azureiot/built/debug/binary.js +461 -461
- package/libs/color/built/debug/binary.js +8 -8
- package/libs/color-sensor/built/debug/binary.js +8 -8
- package/libs/controller/built/debug/binary.js +6956 -6956
- package/libs/controller---none/built/debug/binary.js +6936 -6936
- package/libs/datalogger/built/debug/binary.js +63 -63
- package/libs/edge-connector/built/debug/binary.js +9 -9
- package/libs/esp32/built/debug/binary.js +462 -462
- package/libs/game/assetTemplates.ts +10 -0
- package/libs/game/built/debug/binary.js +6875 -6875
- package/libs/game/sim/keymap.ts +1 -1
- package/libs/game/sim/multiplayer.ts +8 -3
- package/libs/lcd/built/debug/binary.js +8 -8
- package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
- package/libs/lora/built/debug/binary.js +8 -8
- package/libs/matrix-keypad/built/debug/binary.js +8 -8
- package/libs/mixer/instrument.ts +776 -0
- package/libs/mixer/melody.h +1 -1
- package/libs/mixer/melody.ts +29 -1
- package/libs/mixer/pxt.json +2 -0
- package/libs/mixer/sequencer.ts +88 -0
- package/libs/mqtt/built/debug/binary.js +176 -176
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net-game/built/debug/binary.js +8464 -8464
- package/libs/palette/built/debug/binary.js +6874 -6874
- package/libs/pixel/built/debug/binary.js +8 -8
- package/libs/power/built/debug/binary.js +8 -8
- package/libs/proximity/built/debug/binary.js +8 -8
- package/libs/radio/built/debug/binary.js +8 -8
- package/libs/radio-broadcast/built/debug/binary.js +8 -8
- package/libs/rotary-encoder/built/debug/binary.js +8 -8
- package/libs/screen/built/debug/binary.js +50 -50
- package/libs/servo/built/debug/binary.js +8 -8
- package/libs/sprite-scaling/built/debug/binary.js +6874 -6874
- package/libs/storyboard/built/debug/binary.js +6874 -6874
- package/package.json +1 -1
package/built/common-sim.d.ts
CHANGED
|
@@ -794,7 +794,7 @@ declare namespace pxsim {
|
|
|
794
794
|
interface MultiplayerImageMessage extends SimulatorMultiplayerMessage {
|
|
795
795
|
content: "Image";
|
|
796
796
|
goal: string;
|
|
797
|
-
image:
|
|
797
|
+
image: RefBuffer;
|
|
798
798
|
}
|
|
799
799
|
interface MultiplayerButtonEvent extends SimulatorMultiplayerMessage {
|
|
800
800
|
content: "Button";
|
package/built/common-sim.js
CHANGED
|
@@ -2527,7 +2527,7 @@ var pxsim;
|
|
|
2527
2527
|
}
|
|
2528
2528
|
clearMap(name) {
|
|
2529
2529
|
const keyCodes = this.mappings[name];
|
|
2530
|
-
keyCodes
|
|
2530
|
+
keyCodes && keyCodes.forEach(keyCode => delete this.keymap[keyCode]);
|
|
2531
2531
|
delete this.mappings[name];
|
|
2532
2532
|
}
|
|
2533
2533
|
}
|
|
@@ -2565,6 +2565,7 @@ var pxsim;
|
|
|
2565
2565
|
return pxsim.board().multiplayerState;
|
|
2566
2566
|
}
|
|
2567
2567
|
pxsim.getMultiplayerState = getMultiplayerState;
|
|
2568
|
+
let postScreenInterval;
|
|
2568
2569
|
class MultiplayerState {
|
|
2569
2570
|
constructor() {
|
|
2570
2571
|
this.lastMessageId = 0;
|
|
@@ -2575,7 +2576,10 @@ var pxsim;
|
|
|
2575
2576
|
init(origin) {
|
|
2576
2577
|
this.origin = origin;
|
|
2577
2578
|
pxsim.runtime.board.addMessageListener(msg => this.messageHandler(msg));
|
|
2578
|
-
|
|
2579
|
+
if (postScreenInterval) {
|
|
2580
|
+
clearInterval(postScreenInterval);
|
|
2581
|
+
}
|
|
2582
|
+
postScreenInterval = setInterval(() => {
|
|
2579
2583
|
if (this.origin === "server") {
|
|
2580
2584
|
const b = pxsim.board();
|
|
2581
2585
|
const screenState = b && b.screenState;
|
|
@@ -2608,7 +2612,7 @@ var pxsim;
|
|
|
2608
2612
|
}
|
|
2609
2613
|
else if (isButtonMessage(msg)) {
|
|
2610
2614
|
if (this.origin === "server") {
|
|
2611
|
-
pxsim.board().
|
|
2615
|
+
pxsim.board().handleKeyEvent(msg.button + (7 * (msg.clientNumber || 1)), // + 7 to make it player 2 controls,
|
|
2612
2616
|
msg.state === "Pressed" || msg.state === "Held");
|
|
2613
2617
|
}
|
|
2614
2618
|
}
|