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.
- package/libs/accelerometer/built/debug/binary.js +8 -8
- package/libs/azureiot/built/debug/binary.js +461 -461
- package/libs/base/fixed.ts +6 -0
- 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 +7636 -7598
- package/libs/controller---none/built/debug/binary.js +7617 -7579
- package/libs/core/built/debug/binary.js +2 -2
- package/libs/core---samd/built/debug/binary.js +8 -8
- package/libs/datalogger/built/debug/binary.js +63 -63
- package/libs/edge-connector/built/debug/binary.js +8 -8
- package/libs/esp32/built/debug/binary.js +462 -462
- package/libs/game/built/debug/binary.js +7530 -7492
- package/libs/game/hitbox.ts +5 -5
- package/libs/game/sprite.ts +5 -5
- package/libs/gamepad/built/debug/binary.js +8 -8
- package/libs/keyboard/built/debug/binary.js +8 -8
- package/libs/lcd/built/debug/binary.js +8 -8
- package/libs/light/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/microphone/built/debug/binary.js +8 -8
- package/libs/mouse/built/debug/binary.js +8 -8
- package/libs/mqtt/built/debug/binary.js +176 -176
- package/libs/music/built/debug/binary.js +8 -8
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net/controller.ts +6 -1
- package/libs/net-game/built/debug/binary.js +9286 -9248
- package/libs/palette/built/debug/binary.js +7529 -7491
- 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/pulse/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/_locales/sprite-scaling-strings.json +6 -7
- package/libs/sprite-scaling/built/debug/binary.js +7529 -7491
- package/libs/sprite-scaling/scaling.ts +4 -12
- package/libs/storyboard/built/debug/binary.js +7529 -7491
- package/libs/tests/built/debug/binary.js +15 -15
- package/libs/thermometer/built/debug/binary.js +8 -8
- package/libs/wifi---esp32/README.md +12 -0
- package/libs/wifi---esp32/controller.ts +8 -0
- package/libs/wifi---esp32/enums.d.ts +2 -0
- package/libs/wifi---esp32/httpserver.cpp +2 -0
- package/libs/wifi---esp32/login.full.html +2 -2
- package/libs/wifi---esp32/login.html +1 -1
- package/libs/wifi---esp32/shims.d.ts +4 -0
- package/libs/wifi---esp32/wifi.cpp +13 -3
- package/libs/wifi---esp32/wifi.h +3 -1
- package/package.json +1 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
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=
|
|
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
|
}
|