pxt-arcade 1.12.18 → 1.12.20
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 +1 -3
- package/built/sim.js +17 -16
- package/built/target.js +153 -148
- package/built/target.json +153 -148
- package/built/targetlight.json +5 -5
- package/package.json +4 -4
package/built/common-sim.js
CHANGED
|
@@ -2669,9 +2669,7 @@ var pxsim;
|
|
|
2669
2669
|
}
|
|
2670
2670
|
}
|
|
2671
2671
|
else if (isConnectionMessage(msg)) {
|
|
2672
|
-
|
|
2673
|
-
this.registerConnectionState(msg.slot, msg.connected);
|
|
2674
|
-
}
|
|
2672
|
+
this.registerConnectionState(msg.slot, msg.connected);
|
|
2675
2673
|
}
|
|
2676
2674
|
}
|
|
2677
2675
|
}
|
package/built/sim.js
CHANGED
|
@@ -171,6 +171,8 @@ var pxsim;
|
|
|
171
171
|
registerPointerEvents();
|
|
172
172
|
if (!!searchParams.get("hideSimButtons"))
|
|
173
173
|
hideSimButtons();
|
|
174
|
+
if (!!searchParams.get("noExtraPadding"))
|
|
175
|
+
noExtraPadding();
|
|
174
176
|
});
|
|
175
177
|
function hideSimButtons() {
|
|
176
178
|
const gamePlayer = document.getElementsByClassName("game-player");
|
|
@@ -178,6 +180,12 @@ var pxsim;
|
|
|
178
180
|
gamePlayer[0].classList.add("just-screen");
|
|
179
181
|
}
|
|
180
182
|
}
|
|
183
|
+
function noExtraPadding() {
|
|
184
|
+
const gamePlayer = document.getElementsByClassName("game-player");
|
|
185
|
+
if (gamePlayer && gamePlayer.length) {
|
|
186
|
+
gamePlayer[0].classList.add("no-padding");
|
|
187
|
+
}
|
|
188
|
+
}
|
|
181
189
|
function registerPointerEvents() {
|
|
182
190
|
const canvas = document.getElementById("game-screen");
|
|
183
191
|
const encoder = new TextEncoder();
|
|
@@ -563,26 +571,21 @@ var pxsim;
|
|
|
563
571
|
}
|
|
564
572
|
resize() { }
|
|
565
573
|
async initAsync(msg) {
|
|
566
|
-
if (msg.options.mpRole) {
|
|
567
|
-
this.multiplayerState.origin = msg.options.mpRole;
|
|
568
|
-
}
|
|
569
|
-
this.setActivePlayer(msg.activePlayer);
|
|
570
574
|
this.runOptions = msg;
|
|
571
575
|
this.stats = document.getElementById("debug-stats");
|
|
572
576
|
this.stats.className = "stats no-select";
|
|
573
577
|
this.id = msg.id;
|
|
574
578
|
indicateFocus(document.hasFocus());
|
|
575
579
|
this.accelerometerState.attachEvents(document.body);
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
}
|
|
584
|
-
}
|
|
580
|
+
const mpRole = this.runOptions
|
|
581
|
+
&& this.runOptions.options
|
|
582
|
+
&& this.runOptions.options.mpRole;
|
|
583
|
+
this.multiplayerState.init(mpRole);
|
|
584
|
+
if (mpRole === "client") {
|
|
585
|
+
const wrapper = document.getElementById("wrap");
|
|
586
|
+
wrapper && wrapper.classList.add("mp-client");
|
|
585
587
|
}
|
|
588
|
+
this.setActivePlayer(msg.activePlayer);
|
|
586
589
|
this.updateStats();
|
|
587
590
|
let safariEnablePromise;
|
|
588
591
|
if (isFirstRunSafari && !safariEnablePromise) {
|
|
@@ -2983,9 +2986,7 @@ var pxsim;
|
|
|
2983
2986
|
}
|
|
2984
2987
|
}
|
|
2985
2988
|
else if (isConnectionMessage(msg)) {
|
|
2986
|
-
|
|
2987
|
-
this.registerConnectionState(msg.slot, msg.connected);
|
|
2988
|
-
}
|
|
2989
|
+
this.registerConnectionState(msg.slot, msg.connected);
|
|
2989
2990
|
}
|
|
2990
2991
|
}
|
|
2991
2992
|
}
|