@ignifx/2d 0.13.0 → 0.15.0
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/dist/index.js +1 -1
- package/package.json +3 -3
- package/skills/2d/SKILL.md +13 -2
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ignifx/2d",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "ignifx 2D toolkit: Camera2D, sprites, sprite animation, atlases, tilemaps, sorting layers, pixel-perfect, parallax.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ignifx",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"typedoc-plugin-markdown": "^4.13.0",
|
|
44
44
|
"typescript-native": "npm:typescript@7.0.2",
|
|
45
45
|
"vitest": "^5.0.0",
|
|
46
|
-
"@ignifx/core": "0.
|
|
46
|
+
"@ignifx/core": "0.15.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@babylonjs/lite": "1.34.0",
|
|
50
|
-
"@ignifx/core": "0.
|
|
50
|
+
"@ignifx/core": "0.15.0"
|
|
51
51
|
},
|
|
52
52
|
"ignifx": {
|
|
53
53
|
"extension": true,
|
package/skills/2d/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: 2d
|
|
|
3
3
|
description: Builds 2D games in ignifx with @ignifx/2d: Camera2D, SpriteRenderer, SpriteAnimator, texture atlases, Tilemap rendering and import, sorting layers and Y-sort, pixel-perfect cameras, parallax layers, sprite batches, and 2D picking. Use when adding or editing sprites, sprite animation, tilemaps, atlases, sorting layers, sprite batches, or a 2D camera in an ignifx project, or when the user mentions @ignifx/2d, Camera2D, SpriteRenderer, SpriteBatch, or Tilemap.
|
|
4
4
|
license: Apache-2.0
|
|
5
5
|
metadata:
|
|
6
|
-
ignifx-version: "0.
|
|
6
|
+
ignifx-version: "0.15.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# @ignifx/2d
|
|
@@ -21,7 +21,7 @@ parse, `SpriteAnimator` advances on the stepped clock. Only the pixels need a GP
|
|
|
21
21
|
|
|
22
22
|
## Environment
|
|
23
23
|
|
|
24
|
-
- Engine: ignifx `0.
|
|
24
|
+
- Engine: ignifx `0.15.0`; this package targets `@ignifx/core` `>=0.0.0 <1.0.0`.
|
|
25
25
|
- WebGPU only, browser and Electron. Babylon Lite `1.34.0` is a peer dependency.
|
|
26
26
|
- Register it like any extension; nothing happens at import time.
|
|
27
27
|
|
|
@@ -232,6 +232,17 @@ every object's size and properties for that.
|
|
|
232
232
|
ignifx import tilemap assets/level.tilemap.json assets/scenes/main.scene.json --parent Level
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
+
A map made in Tiled (`.tmj`) or LDtk (`.ldtk`) converts from the command line. A Tiled map becomes
|
|
236
|
+
one `.tilemap.json` beside it, an LDtk project one `<level>.tilemap.json` per level. Each tileset
|
|
237
|
+
gets an `.atlas.json` beside its image when it has none, with frames named `<tileset>_<index>`.
|
|
238
|
+
Pass the game's pixels per unit so `cellSize` and the objects' metres match `twoD.pixelsPerUnit`.
|
|
239
|
+
Flipped tiles fail the command (a cell has no flip) unless `--drop-flips` imports them unflipped.
|
|
240
|
+
|
|
241
|
+
```sh
|
|
242
|
+
ignifx import tilemap assets/maps/cave.tmj --pixels-per-unit 16
|
|
243
|
+
ignifx import tilemap assets/maps/world.ldtk assets/levels --pixels-per-unit 16
|
|
244
|
+
```
|
|
245
|
+
|
|
235
246
|
### Picking a sprite under the pointer
|
|
236
247
|
|
|
237
248
|
```ts run
|