pxt-common-packages 10.3.12 → 10.3.14

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.
Files changed (37) hide show
  1. package/built/common-sim.js +4 -2
  2. package/libs/azureiot/built/debug/binary.js +461 -461
  3. package/libs/color/built/debug/binary.js +8 -8
  4. package/libs/color-sensor/built/debug/binary.js +8 -8
  5. package/libs/controller/built/debug/binary.js +8417 -8204
  6. package/libs/controller---none/built/debug/binary.js +8396 -8183
  7. package/libs/datalogger/built/debug/binary.js +63 -63
  8. package/libs/edge-connector/built/debug/binary.js +8 -8
  9. package/libs/esp32/built/debug/binary.js +462 -462
  10. package/libs/game/_locales/game-jsdoc-strings.json +2 -2
  11. package/libs/game/_locales/game-strings.json +1 -1
  12. package/libs/game/built/debug/binary.js +8303 -8090
  13. package/libs/game/controller.ts +24 -0
  14. package/libs/game/game.ts +9 -2
  15. package/libs/game/scene.ts +1 -0
  16. package/libs/game/sim/multiplayer.ts +5 -2
  17. package/libs/lcd/built/debug/binary.js +8 -8
  18. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  19. package/libs/lora/built/debug/binary.js +8 -8
  20. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  21. package/libs/mixer/instrument.ts +7 -0
  22. package/libs/mixer/melody.ts +1 -0
  23. package/libs/mqtt/built/debug/binary.js +176 -176
  24. package/libs/net/built/debug/binary.js +176 -176
  25. package/libs/net-game/built/debug/binary.js +10110 -9897
  26. package/libs/palette/built/debug/binary.js +8302 -8089
  27. package/libs/pixel/built/debug/binary.js +8 -8
  28. package/libs/power/built/debug/binary.js +8 -8
  29. package/libs/proximity/built/debug/binary.js +8 -8
  30. package/libs/radio/built/debug/binary.js +8 -8
  31. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  32. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  33. package/libs/screen/built/debug/binary.js +50 -50
  34. package/libs/servo/built/debug/binary.js +8 -8
  35. package/libs/sprite-scaling/built/debug/binary.js +8302 -8089
  36. package/libs/storyboard/built/debug/binary.js +8302 -8089
  37. package/package.json +1 -1
@@ -2554,11 +2554,13 @@ var pxsim;
2554
2554
  }
2555
2555
  multiplayer.postImage = postImage;
2556
2556
  function postIcon(iconType, slot, im) {
2557
- if (im._width * im._height > 64 * 64) {
2557
+ if (im && (im._width * im._height > 64 * 64)) {
2558
2558
  // setting 64x64 as max size for icon for now
2559
2559
  return;
2560
2560
  }
2561
- const asBuf = pxsim.image.toBuffer(im);
2561
+ // treat empty icon as undefined
2562
+ const asBuf = (im && im.data.some(pixel => pixel != 0))
2563
+ ? pxsim.image.toBuffer(im) : undefined;
2562
2564
  const sb = pxsim.board();
2563
2565
  const screenState = sb && sb.screenState;
2564
2566
  pxsim.getMultiplayerState().send({