pxt-common-packages 9.3.12 → 9.4.3
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 +8 -6
- package/libs/azureiot/built/debug/binary.js +469 -464
- 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 +7126 -6975
- package/libs/controller---none/built/debug/binary.js +7105 -6954
- package/libs/core---esp32/pins.cpp +30 -4
- package/libs/core---esp32/shims.d.ts +15 -0
- package/libs/core---esp32s2/shims.d.ts +15 -0
- 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 +470 -465
- package/libs/game/_locales/game-jsdoc-strings.json +10 -1
- package/libs/game/_locales/game-strings.json +18 -2
- package/libs/game/assetTemplates.ts +2 -0
- package/libs/game/built/debug/binary.js +7018 -6867
- package/libs/game/docs/reference/scene/get-tile-location.md +96 -0
- package/libs/game/docs/reference/scene/get-tiles-by-type.md +64 -43
- package/libs/game/docs/reference/scene/is-hitting-tile.md +87 -0
- package/libs/game/docs/reference/scene/on-hit-wall.md +88 -0
- package/libs/game/docs/reference/scene/on-overlap-tile.md +88 -0
- package/libs/game/docs/reference/scene/place-on-random-tile.md +95 -41
- package/libs/game/docs/reference/scene/place-on-tile.md +88 -0
- package/libs/game/docs/reference/scene/set-tile-at.md +45 -41
- package/libs/game/docs/reference/scene/set-tilemap.md +89 -0
- package/libs/game/docs/reference/scene/set-wall-at.md +86 -0
- package/libs/game/docs/reference/scene/tile-at-location-equals.md +97 -0
- package/libs/game/docs/reference/scene/tile-kind-at.md +118 -0
- package/libs/game/docs/reference/scene.md +20 -16
- package/libs/game/physics.ts +1 -1
- package/libs/game/scenes.ts +5 -1
- package/libs/game/sprite.ts +23 -6
- package/libs/game/spriteevents.ts +7 -7
- package/libs/game/sprites.ts +16 -0
- package/libs/game/tilemap.ts +173 -27
- 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/mqtt/built/debug/binary.js +176 -176
- package/libs/net/built/debug/binary.js +176 -176
- package/libs/net/controller.ts +15 -1
- package/libs/net-game/built/debug/binary.js +8896 -8680
- package/libs/palette/built/debug/binary.js +7017 -6866
- 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/screen/image.cpp +9 -7
- package/libs/screen/sim/image.ts +9 -7
- package/libs/servo/built/debug/binary.js +8 -8
- package/libs/storyboard/built/debug/binary.js +7017 -6866
- package/package.json +1 -1
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"Sprite.startEffect|param|effect": "the type of effect to create",
|
|
58
58
|
"Sprite.tileHitFrom": "Get the obstacle sprite in a given direction if any",
|
|
59
59
|
"Sprite.tileKindAt": "Get the tile kind in a given direction if any",
|
|
60
|
+
"Sprite.tilemapLocation": "Gets the tilemap location at the center of a sprite",
|
|
60
61
|
"animation.animationPresets": "Generates a path string for preset animation",
|
|
61
62
|
"animation.animationPresets|param|animationPath": "The preset path",
|
|
62
63
|
"animation.runImageAnimation": "Create and run an image animation on a sprite",
|
|
@@ -272,6 +273,7 @@
|
|
|
272
273
|
"sprites.createProjectileFromSide": "Create a new sprite with a given speed, and place it at the edge of the screen so it moves towards the middle.\nThe sprite auto-destroys when it leaves the screen. You can modify position after it's created.",
|
|
273
274
|
"sprites.createProjectileFromSprite": "Create a new sprite with a given speed that starts from the location of another sprite.\nThe sprite auto-destroys when it leaves the screen. You can modify position after it's created.",
|
|
274
275
|
"sprites.create|param|img": "the image",
|
|
276
|
+
"sprites.destroyAllSpritesOfKind": "Destroys all sprites of the given kind.",
|
|
275
277
|
"sprites.onCreated": "Run code when a certain kind of sprite is created",
|
|
276
278
|
"sprites.onCreated|param|kind": "@param sprite",
|
|
277
279
|
"sprites.onDestroyed": "Run code when a certain kind of sprite is destroyed",
|
|
@@ -279,9 +281,12 @@
|
|
|
279
281
|
"sprites.onOverlap": "Run code when two kinds of sprites overlap",
|
|
280
282
|
"texteffects.TextSprite": "A text sprite on the screen",
|
|
281
283
|
"tiles.Location": "A (col, row) location in the tilemap",
|
|
284
|
+
"tiles.Location.getNeighboringLocation": "Returns the neighboring location in a specifc direction from a location in a tilemap",
|
|
285
|
+
"tiles.Location.getNeighboringLocation|param|direction": "The direction to fetch the location in",
|
|
282
286
|
"tiles.Location.place": "Center the given sprite on this tile",
|
|
283
287
|
"tiles.Tile": "DEPRECATED: a tile in the tilemap",
|
|
284
288
|
"tiles.Tile.place": "Center the given sprite on this tile",
|
|
289
|
+
"tiles._tilemapEditor": "A tilemap",
|
|
285
290
|
"tiles.getRandomTileByType": "Get a random tile of the given type",
|
|
286
291
|
"tiles.getRandomTileByType|param|tile": "the type of tile to get a random selection of",
|
|
287
292
|
"tiles.getTileAt": "Get the image of a tile, given a (column, row) in the tilemap",
|
|
@@ -293,10 +298,14 @@
|
|
|
293
298
|
"tiles.placeOnRandomTile|param|sprite": "@param tile",
|
|
294
299
|
"tiles.placeOnTile": "Center the given sprite on a given location",
|
|
295
300
|
"tiles.placeOnTile|param|sprite": "@param loc",
|
|
301
|
+
"tiles.setCurrentTilemap": "Sets the given tilemap to be the current active tilemap in the game\n* @param tilemap The tilemap to set as the current tilemap",
|
|
296
302
|
"tiles.setTileAt": "Set a location in the map (column, row) to a tile",
|
|
297
303
|
"tiles.setTileAt|param|loc": "@param tile",
|
|
298
304
|
"tiles.setWallAt": "Set or unset a wall at a location in the map (column, row)",
|
|
299
305
|
"tiles.setWallAt|param|loc": "@param on",
|
|
300
306
|
"tiles.tileAtLocationEquals": "Returns true if the tile at the given location is the same as the given tile;\notherwise returns false",
|
|
301
|
-
"tiles.tileAtLocationEquals|param|location": "@param tile"
|
|
307
|
+
"tiles.tileAtLocationEquals|param|location": "@param tile",
|
|
308
|
+
"tiles.tileAtLocationIsWall": "Returns true if the tile at the given location is a wall in the current tilemap;\notherwise returns false",
|
|
309
|
+
"tiles.tileAtLocationIsWall|param|location": "The location to check for a wall",
|
|
310
|
+
"tiles.tileImageAtLocation": "Returns the image of the tile at the given location in the current tilemap\n* @param location The location of the image to fetch"
|
|
302
311
|
}
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"Sprite.startEffect|block": "%sprite(mySprite) start %effect effect || for %duration=timePicker|ms",
|
|
72
72
|
"Sprite.tileHitFrom|block": "%sprite(mySprite) wall hit on %direction",
|
|
73
73
|
"Sprite.tileKindAt|block": "tile to $direction of $this(mySprite) is $tile",
|
|
74
|
+
"Sprite.tilemapLocation|block": "tilemap location of $this",
|
|
74
75
|
"Sprite.top@set|block": "top",
|
|
75
76
|
"Sprite.top|block": "top",
|
|
76
77
|
"Sprite.vx@set|block": "vx (velocity x)",
|
|
@@ -236,6 +237,7 @@
|
|
|
236
237
|
"sprites.createProjectileFromSprite|block": "projectile %img=screen_image_picker from %sprite=variables_get(mySprite) with vx %vx vy %vy",
|
|
237
238
|
"sprites.createProjectile|block": "projectile %img=screen_image_picker vx %vx vy %vy of kind %kind=spritekind||from sprite %sprite=variables_get(mySprite)",
|
|
238
239
|
"sprites.create|block": "sprite %img=screen_image_picker of kind %kind=spritekind",
|
|
240
|
+
"sprites.destroyAllSpritesOfKind|block": "destroy all sprites of kind $kind || with $effect effect for $duration ms",
|
|
239
241
|
"sprites.onCreated|block": "on created $sprite of kind $kind=spritekind",
|
|
240
242
|
"sprites.onDestroyed|block": "on destroyed $sprite of kind $kind=spritekind ",
|
|
241
243
|
"sprites.onOverlap|block": "on $sprite of kind $kind=spritekind overlaps $otherSprite of kind $otherKind=spritekind",
|
|
@@ -244,15 +246,28 @@
|
|
|
244
246
|
"texteffects.TextEffectKind.Shake|block": "shake",
|
|
245
247
|
"texteffects.TextEffectKind.Wave|block": "wave",
|
|
246
248
|
"texteffects|block": "texteffects",
|
|
249
|
+
"tiles.Location.bottom|block": "bottom",
|
|
250
|
+
"tiles.Location.column|block": "column",
|
|
251
|
+
"tiles.Location.getNeighboringLocation|block": "tilemap location $direction of $this",
|
|
252
|
+
"tiles.Location.left|block": "left",
|
|
253
|
+
"tiles.Location.right|block": "right",
|
|
254
|
+
"tiles.Location.row|block": "row",
|
|
255
|
+
"tiles.Location.top|block": "top",
|
|
256
|
+
"tiles.Location.x|block": "x",
|
|
257
|
+
"tiles.Location.y|block": "y",
|
|
247
258
|
"tiles.Tile.place|block": "on top of %tile(myTile) place %sprite=variables_get(mySprite)",
|
|
259
|
+
"tiles._tilemapEditor|block": "tilemap $tilemap",
|
|
248
260
|
"tiles.getTileLocation|block": "tilemap col $col row $row",
|
|
249
261
|
"tiles.getTilesByType|block": "array of all $tile locations",
|
|
250
262
|
"tiles.placeOnRandomTile|block": "place $sprite=variables_get(mySprite) on top of random $tile",
|
|
251
263
|
"tiles.placeOnTile|block": "place $sprite=variables_get(mySprite) on top of $loc",
|
|
264
|
+
"tiles.setCurrentTilemap|block": "set tilemap to $tilemap",
|
|
252
265
|
"tiles.setTileAt|block": "set $tile at $loc=mapgettile",
|
|
253
266
|
"tiles.setTilemap|block": "set tilemap to $tilemap",
|
|
254
267
|
"tiles.setWallAt|block": "set wall $on at $loc",
|
|
255
268
|
"tiles.tileAtLocationEquals|block": "tile at $location is $tile",
|
|
269
|
+
"tiles.tileAtLocationIsWall|block": "tile at $location is wall",
|
|
270
|
+
"tiles.tileImageAtLocation|block": "tile image at $location",
|
|
256
271
|
"tiles|block": "tiles",
|
|
257
272
|
"{id:category}Animation": "Animation",
|
|
258
273
|
"{id:category}ArcadePhysicsEngine": "ArcadePhysicsEngine",
|
|
@@ -274,7 +289,6 @@
|
|
|
274
289
|
"{id:category}Tiles": "Tiles",
|
|
275
290
|
"{id:group}Animate": "Animate",
|
|
276
291
|
"{id:group}Camera": "Camera",
|
|
277
|
-
"{id:group}Collisions": "Collisions",
|
|
278
292
|
"{id:group}Countdown": "Countdown",
|
|
279
293
|
"{id:group}Create": "Create",
|
|
280
294
|
"{id:group}Dialogs": "Dialogs",
|
|
@@ -283,6 +297,7 @@
|
|
|
283
297
|
"{id:group}Image": "Image",
|
|
284
298
|
"{id:group}Life": "Life",
|
|
285
299
|
"{id:group}Lifecycle": "Lifecycle",
|
|
300
|
+
"{id:group}Locations": "Locations",
|
|
286
301
|
"{id:group}Multiplayer": "Multiplayer",
|
|
287
302
|
"{id:group}Overlaps": "Overlaps",
|
|
288
303
|
"{id:group}Physics": "Physics",
|
|
@@ -292,5 +307,6 @@
|
|
|
292
307
|
"{id:group}Screen": "Screen",
|
|
293
308
|
"{id:group}Single Player": "Single Player",
|
|
294
309
|
"{id:group}Theme": "Theme",
|
|
295
|
-
"{id:group}
|
|
310
|
+
"{id:group}Tilemap Operations": "Tilemap Operations",
|
|
311
|
+
"{id:group}Tilemaps": "Tilemaps"
|
|
296
312
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//% helper=getTilemapByName
|
|
2
2
|
//% pyConvertToTaggedTemplate
|
|
3
|
+
//% blockIdentity="tiles._tilemapEditor"
|
|
3
4
|
function tilemap(lits: any, ...args: any[]): tiles.TileMapData { return null }
|
|
4
5
|
|
|
5
6
|
//% helper=getTilemapByName
|
|
@@ -17,6 +18,7 @@ function tilemap32(lits: any, ...args: any[]): tiles.TileMapData { return null }
|
|
|
17
18
|
namespace assets {
|
|
18
19
|
//% helper=getTilemapByName
|
|
19
20
|
//% pyConvertToTaggedTemplate
|
|
21
|
+
//% blockIdentity="tiles._tilemapEditor"
|
|
20
22
|
export function tilemap(lits: any, ...args: any[]): tiles.TileMapData { return null }
|
|
21
23
|
|
|
22
24
|
//% helper=getImageByName
|