pxt-common-packages 9.4.8 → 9.4.9

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 (55) hide show
  1. package/libs/accelerometer/built/debug/binary.js +8 -8
  2. package/libs/azureiot/built/debug/binary.js +461 -461
  3. package/libs/base/fixed.ts +6 -0
  4. package/libs/color/built/debug/binary.js +8 -8
  5. package/libs/color-sensor/built/debug/binary.js +8 -8
  6. package/libs/controller/built/debug/binary.js +7636 -7598
  7. package/libs/controller---none/built/debug/binary.js +7617 -7579
  8. package/libs/core/built/debug/binary.js +2 -2
  9. package/libs/core---samd/built/debug/binary.js +8 -8
  10. package/libs/datalogger/built/debug/binary.js +63 -63
  11. package/libs/edge-connector/built/debug/binary.js +8 -8
  12. package/libs/esp32/built/debug/binary.js +462 -462
  13. package/libs/game/built/debug/binary.js +7530 -7492
  14. package/libs/game/hitbox.ts +5 -5
  15. package/libs/game/sprite.ts +5 -5
  16. package/libs/gamepad/built/debug/binary.js +8 -8
  17. package/libs/keyboard/built/debug/binary.js +8 -8
  18. package/libs/lcd/built/debug/binary.js +8 -8
  19. package/libs/light/built/debug/binary.js +8 -8
  20. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  21. package/libs/lora/built/debug/binary.js +8 -8
  22. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  23. package/libs/microphone/built/debug/binary.js +8 -8
  24. package/libs/mouse/built/debug/binary.js +8 -8
  25. package/libs/mqtt/built/debug/binary.js +176 -176
  26. package/libs/music/built/debug/binary.js +8 -8
  27. package/libs/net/built/debug/binary.js +176 -176
  28. package/libs/net/controller.ts +6 -1
  29. package/libs/net-game/built/debug/binary.js +9286 -9248
  30. package/libs/palette/built/debug/binary.js +7529 -7491
  31. package/libs/pixel/built/debug/binary.js +8 -8
  32. package/libs/power/built/debug/binary.js +8 -8
  33. package/libs/proximity/built/debug/binary.js +8 -8
  34. package/libs/pulse/built/debug/binary.js +8 -8
  35. package/libs/radio/built/debug/binary.js +8 -8
  36. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  37. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  38. package/libs/screen/built/debug/binary.js +50 -50
  39. package/libs/servo/built/debug/binary.js +8 -8
  40. package/libs/sprite-scaling/_locales/sprite-scaling-strings.json +6 -7
  41. package/libs/sprite-scaling/built/debug/binary.js +7529 -7491
  42. package/libs/sprite-scaling/scaling.ts +4 -12
  43. package/libs/storyboard/built/debug/binary.js +7529 -7491
  44. package/libs/tests/built/debug/binary.js +15 -15
  45. package/libs/thermometer/built/debug/binary.js +8 -8
  46. package/libs/wifi---esp32/README.md +12 -0
  47. package/libs/wifi---esp32/controller.ts +8 -0
  48. package/libs/wifi---esp32/enums.d.ts +2 -0
  49. package/libs/wifi---esp32/httpserver.cpp +2 -0
  50. package/libs/wifi---esp32/login.full.html +2 -2
  51. package/libs/wifi---esp32/login.html +1 -1
  52. package/libs/wifi---esp32/shims.d.ts +4 -0
  53. package/libs/wifi---esp32/wifi.cpp +13 -3
  54. package/libs/wifi---esp32/wifi.h +3 -1
  55. package/package.json +1 -1
@@ -1,14 +1,14 @@
1
- namespace sprites {
1
+ //% color="#7B2CBF" weight=100 icon="\uf021" block="Sprite Scaling"
2
+ //% advanced=true
3
+ namespace scaling {
2
4
  //% blockId=sprite_set_scale_ex
3
5
  //% block="set $sprite=variables_get(mySprite) scale to $value || $direction anchor $anchor"
4
- //% advanced=true
5
6
  //% expandableArgumentMode=enabled
6
7
  //% inlineInputMode=inline
7
8
  //% value.defl=1
8
9
  //% direction.defl=ScaleDirection.Uniformly
9
10
  //% anchor.defl=ScaleAnchor.Middle
10
11
  //% help=sprites/sprite-scaling/set-scale
11
- //% group="Scale" weight=90
12
12
  export function setScale(sprite: Sprite, value: number, direction?: ScaleDirection, anchor?: ScaleAnchor): void {
13
13
  direction = direction || ScaleDirection.Uniformly;
14
14
  anchor = anchor || ScaleAnchor.Middle;
@@ -24,14 +24,12 @@ namespace sprites {
24
24
 
25
25
  //% blockId=sprite_grow_by_percent_ex
26
26
  //% block="grow $sprite=variables_get(mySprite) by $amount percent || $direction anchor $anchor"
27
- //% advanced=true
28
27
  //% expandableArgumentMode=enabled
29
28
  //% inlineInputMode=inline
30
29
  //% amount.defl=10
31
30
  //% direction.defl=ScaleDirection.Uniformly
32
31
  //% anchor.defl=ScaleAnchor.Middle
33
32
  //% help=sprites/sprite-scaling/grow-by-amount
34
- //% group="Scale" weight=80
35
33
  export function growByPercent(sprite: Sprite, amount: number, direction?: ScaleDirection, anchor?: ScaleAnchor): void {
36
34
  amount /= 100;
37
35
  direction = direction || ScaleDirection.Uniformly;
@@ -48,21 +46,18 @@ namespace sprites {
48
46
 
49
47
  //% blockId=sprite_shrink_by_percent_ex
50
48
  //% block="shrink $sprite=variables_get(mySprite) by $amount percent || $direction anchor $anchor"
51
- //% advanced=true
52
49
  //% expandableArgumentMode=enabled
53
50
  //% inlineInputMode=inline
54
51
  //% amount.defl=10
55
52
  //% direction.defl=ScaleDirection.Uniformly
56
53
  //% anchor.defl=ScaleAnchor.Middle
57
54
  //% help=sprites/sprite-scaling/shrink-by-percent
58
- //% group="Scale" weight=70
59
55
  export function shrinkByPercent(sprite: Sprite, amount: number, direction?: ScaleDirection, anchor?: ScaleAnchor): void {
60
56
  growByPercent(sprite, -amount, direction, anchor);
61
57
  }
62
58
 
63
59
  //% blockId=sprite_grow_by_pixels_ex
64
60
  //% block="grow $sprite=variables_get(mySprite) by $amount pixels $direction || anchor $anchor proportional $proportional"
65
- //% advanced=true
66
61
  //% expandableArgumentMode=enabled
67
62
  //% inlineInputMode=inline
68
63
  //% amount.defl=10
@@ -70,7 +65,6 @@ namespace sprites {
70
65
  //% anchor.defl=ScaleAnchor.Middle
71
66
  //% proportional.defl=0
72
67
  //% help=sprites/sprite-scaling/grow-by-pixels
73
- //% group="Scale" weight=60
74
68
  export function growByPixels(sprite: Sprite, amount: number, direction?: ScaleDirection, anchor?: ScaleAnchor, proportional?: boolean): void {
75
69
  direction = direction || ScaleDirection.Horizontally;
76
70
  anchor = anchor || ScaleAnchor.Middle;
@@ -94,9 +88,8 @@ namespace sprites {
94
88
  sprite.setScaleCore(sx, sy, anchor, proportional);
95
89
  }
96
90
 
97
- //% blockId=sprite_shrink_by_pixels
91
+ //% blockId=sprite_shrink_by_pixels_ex
98
92
  //% block="shrink $sprite=variables_get(mySprite) by $amount pixels $direction || anchor $anchor proportional $proportional"
99
- //% advanced=true
100
93
  //% expandableArgumentMode=enabled
101
94
  //% inlineInputMode=inline
102
95
  //% amount.defl=10
@@ -104,7 +97,6 @@ namespace sprites {
104
97
  //% anchor.defl=ScaleAnchor.Middle
105
98
  //% proportional.defl=0
106
99
  //% help=sprites/sprite-scaling/grow-by-pixels
107
- //% group="Scale" weight=50
108
100
  export function shrinkByPixels(sprite: Sprite, amount: number, direction?: ScaleDirection, anchor?: ScaleAnchor, proportional?: boolean): void {
109
101
  growByPixels(sprite, -amount, direction, anchor, proportional);
110
102
  }