pixelkiln 0.111.0 → 0.113.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/cli.js +382 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +389 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +384 -7
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +4 -4
- package/docs/TILES.md +47 -3
- package/package.json +1 -1
package/docs/CLI.md
CHANGED
|
@@ -42,7 +42,7 @@ Which command:
|
|
|
42
42
|
| stop tracking a hand edit | `pixelkiln edit detach --only anvil` |
|
|
43
43
|
| build a sprite sheet | `pixelkiln pack --style base` |
|
|
44
44
|
| place sprites on a sheet at declared cells | `pixelkiln mount --style base` |
|
|
45
|
-
| export a tileset for Tiled or
|
|
45
|
+
| export a tileset for Tiled, Godot or LDtk | `pixelkiln export --style ground --format tiled` |
|
|
46
46
|
| get a sheet Phaser, Unity, or Godot loads as animations | `pixelkiln pack --style hero --format aseprite` or `--format godot` |
|
|
47
47
|
| check the art against the style's palette and grid | `pixelkiln audit --style base` |
|
|
48
48
|
| produce the palette-clean, grid-true final art | `pixelkiln refine` then `pixelkiln refine approve --from <record> --reviewer "Name"` |
|
|
@@ -1271,8 +1271,8 @@ is a single frame.
|
|
|
1271
1271
|
|
|
1272
1272
|
### `export`
|
|
1273
1273
|
|
|
1274
|
-
Build a structural tile atlas plus generic JSON, Tiled TSJ,
|
|
1275
|
-
metadata and a provenance companion.
|
|
1274
|
+
Build a structural tile atlas plus generic JSON, Tiled TSJ, Godot TRES, or LDtk
|
|
1275
|
+
project metadata and a provenance companion.
|
|
1276
1276
|
|
|
1277
1277
|
```bash
|
|
1278
1278
|
pixelkiln export --style ground --only terrain --format tiled --columns 8
|
|
@@ -2147,7 +2147,7 @@ Print the package version. `-v` is an alias.
|
|
|
2147
2147
|
| `--out <path>` | pack/export/refine/recipe install/quality snapshot/unzoom/pixelate/normal-map/vfx/font | Output base override, final native PNG for path-mode refine, exact recipe destination, quality baseline path, the unzoomed, pixelated, or normal-map PNG, the effect's `<base>.png`/`.gif`/`.json`/`.vfx.json`, or the font's `<base>.ttf`/`<base>.png`. Export requires one selected tileset. |
|
|
2148
2148
|
| `--inputs <path>` | pack/quality snapshot | JSON input array; requires `--out`. Quality cases use `{ id, path, record?, tolerances? }`. |
|
|
2149
2149
|
| `--columns <n>` | pack/export | Grid columns, 1–1024; default is near-square. |
|
|
2150
|
-
| `--format <name>` | export, pack, mount | `export`: `generic` (default), `tiled`,
|
|
2150
|
+
| `--format <name>` | export, pack, mount | `export`: `generic` (default), `tiled`, `godot` (TileSet), or `ldtk` (project with auto-rules). `pack` and `mount`: `generic` (default), `aseprite` (sheet JSON), or `godot` (SpriteFrames). |
|
|
2151
2151
|
| `--output-role <role>` | pack | Include named structural roles; repeatable. |
|
|
2152
2152
|
| `--primary-only` | pack | Include only unambiguous primary/single outputs. |
|
|
2153
2153
|
| `--max-distance <n>` | audit | Absolute palette-distance ceiling. |
|
package/docs/TILES.md
CHANGED
|
@@ -124,6 +124,7 @@ twin pair gets the same mask.
|
|
|
124
124
|
pixelkiln export --style ground --only terrain --format generic
|
|
125
125
|
pixelkiln export --style ground --only terrain --format tiled
|
|
126
126
|
pixelkiln export --style ground --only terrain --format godot
|
|
127
|
+
pixelkiln export --style ground --only terrain --format ldtk
|
|
127
128
|
```
|
|
128
129
|
|
|
129
130
|
`export` selects downloaded `tiles` and `terrain` generator entries; anything
|
|
@@ -239,10 +240,52 @@ through Godot's own `get_terrain_peering_bit()` rather than only checking
|
|
|
239
240
|
tile/terrain-set counts. That last check is what would have caught the
|
|
240
241
|
isometric-corner-names bug; the counts alone did not.
|
|
241
242
|
|
|
243
|
+
## LDtk
|
|
244
|
+
|
|
245
|
+
The `.ldtk` export is a whole project file: open it in LDtk 1.5 and the set is
|
|
246
|
+
already a tileset, a pair of layers with auto-tiling rules, and a small
|
|
247
|
+
"Preview" level painted to show every tile.
|
|
248
|
+
|
|
249
|
+
LDtk has no terrain concept. It paints a cell value on an IntGrid layer, and an
|
|
250
|
+
AutoLayer picks tiles by matching rules against the values around each cell.
|
|
251
|
+
The export turns each mask into one rule, so painting two values gives the same
|
|
252
|
+
borders the other formats give.
|
|
253
|
+
|
|
254
|
+
- **Corner sets (`terrain`, corner-ruled `tiles`).** Corners belong to the
|
|
255
|
+
vertices between cells, so the export uses a dual grid. The IntGrid layer
|
|
256
|
+
(`<asset>_corners`) holds one value per vertex and is shifted half a tile up
|
|
257
|
+
and left; the AutoLayer (`<asset>`) reads each tile's own cell plus the cell to
|
|
258
|
+
the right, below and below-right, which are its NW, NE, SW and SE corners
|
|
259
|
+
(mask bits 3/2/1/0). The first terrain is value 1, the second value 2.
|
|
260
|
+
- **Edge sets.** The IntGrid layer (`<asset>_cells`) is not shifted. A rule
|
|
261
|
+
reads the cell and its four neighbours; the cell takes the terrain most of its
|
|
262
|
+
edges have (the first terrain on a tie).
|
|
263
|
+
- **Tiles that share a mask** (the 25-tile cliff set's wall twins) sit in one
|
|
264
|
+
rule as alternatives, so LDtk picks among them at random.
|
|
265
|
+
- The tileset carries each tile's mask as custom data (`mask=<n>`).
|
|
266
|
+
- Outside the level the rules read the second terrain.
|
|
267
|
+
- The file has no timestamp and fixed ids, so an unchanged set exports the same
|
|
268
|
+
bytes.
|
|
269
|
+
|
|
270
|
+
Only square tiles on an orthogonal grid export. Hex, isometric and oblique
|
|
271
|
+
tiles, `outline` rules, non-square tiles and sets with no mask map are refused
|
|
272
|
+
with the format to use instead (`generic` or `tiled`).
|
|
273
|
+
|
|
274
|
+
**What was checked in LDtk.** LDtk has no headless mode, so CI cannot load the
|
|
275
|
+
file; the tests instead compare the key sets with the sample projects shipped
|
|
276
|
+
with LDtk 1.5 and run the written rules through a port of LDtk's own matcher.
|
|
277
|
+
Once, by hand, a 16-tile lake and grass set was opened in LDtk 1.5.3: the
|
|
278
|
+
Preview level drew continuous shorelines, LDtk re-evaluated the rules and
|
|
279
|
+
produced exactly the 108 tiles stored in the file, and painting a grass cell on
|
|
280
|
+
the corners layer redrew the right tiles around it. LDtk changed only things it
|
|
281
|
+
owns: layer and tileset names get a capital first letter (the project asks for
|
|
282
|
+
that style), `cachedPixelData` is filled in, and the build id. Only corner sets
|
|
283
|
+
were opened; edge sets are covered by the matcher tests alone.
|
|
284
|
+
|
|
242
285
|
## Deliberate limits
|
|
243
286
|
|
|
244
|
-
- Tiled and
|
|
245
|
-
- Six-edge hex masks remain generic-only. Their engine layouts depend on hex
|
|
287
|
+
- Tiled, Godot and LDtk exports require every image to match the atlas cell size.
|
|
288
|
+
- Six-edge hex masks remain generic-only (LDtk does not support hex tiles). Their engine layouts depend on hex
|
|
246
289
|
orientation and offset conventions that the current manifest does not yet
|
|
247
290
|
declare.
|
|
248
291
|
- `outline` and building-kit images absent from the rule map are stamp-only.
|
|
@@ -257,7 +300,8 @@ isometric-corner-names bug; the counts alone did not.
|
|
|
257
300
|
terrain with another set, the way PixelLab's
|
|
258
301
|
[Pro tilesets guide](https://www.youtube.com/watch?v=MbkqpDUFkEg) paints
|
|
259
302
|
ocean, sand, grass, path, and cliffs on one map, but each set still
|
|
260
|
-
exports as its own two-terrain Tiled Wang set
|
|
303
|
+
exports as its own two-terrain Tiled Wang set, Godot terrain set or LDtk
|
|
304
|
+
layer pair.
|
|
261
305
|
PixelKiln does not merge connected sets into one engine terrain set yet.
|
|
262
306
|
- Godot edge/side masks on an isometric or oblique tile remain generic- or
|
|
263
307
|
Tiled-only; see Godot 4 above.
|