pixelkiln 0.114.0 → 0.115.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 +840 -514
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +696 -435
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +49 -1
- package/dist/index.d.ts +49 -1
- package/dist/index.js +690 -432
- package/dist/index.js.map +1 -1
- package/docs/CLI.md +2 -0
- package/docs/TILES.md +53 -3
- package/package.json +1 -1
package/docs/CLI.md
CHANGED
|
@@ -1276,6 +1276,7 @@ project metadata and a provenance companion.
|
|
|
1276
1276
|
|
|
1277
1277
|
```bash
|
|
1278
1278
|
pixelkiln export --style ground --only terrain --format tiled --columns 8
|
|
1279
|
+
pixelkiln export --style ground --format godot --merge-connected
|
|
1279
1280
|
```
|
|
1280
1281
|
|
|
1281
1282
|
See [derived artifacts](./ARTIFACTS.md) and [tiles](./TILES.md).
|
|
@@ -2147,6 +2148,7 @@ Print the package version. `-v` is an alias.
|
|
|
2147
2148
|
| `--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
2149
|
| `--inputs <path>` | pack/quality snapshot | JSON input array; requires `--out`. Quality cases use `{ id, path, record?, tolerances? }`. |
|
|
2149
2150
|
| `--columns <n>` | pack/export | Grid columns, 1–1024; default is near-square. |
|
|
2151
|
+
| `--merge-connected` | export | Write each group of connected terrain sets (`connect` in the manifest) as one tileset with every terrain, instead of one tileset per set. Naming any set in the group exports the group. See [connected sets](./TILES.md#connected-sets). |
|
|
2150
2152
|
| `--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
2153
|
| `--output-role <role>` | pack | Include named structural roles; repeatable. |
|
|
2152
2154
|
| `--primary-only` | pack | Include only unambiguous primary/single outputs. |
|
package/docs/TILES.md
CHANGED
|
@@ -125,6 +125,7 @@ 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
127
|
pixelkiln export --style ground --only terrain --format ldtk
|
|
128
|
+
pixelkiln export --style ground --format tiled --merge-connected
|
|
128
129
|
```
|
|
129
130
|
|
|
130
131
|
`export` selects downloaded `tiles` and `terrain` generator entries; anything
|
|
@@ -282,6 +283,53 @@ owns: layer and tileset names get a capital first letter (the project asks for
|
|
|
282
283
|
that style), `cachedPixelData` is filled in, and the build id. Only corner sets
|
|
283
284
|
were opened; edge sets are covered by the matcher tests alone.
|
|
284
285
|
|
|
286
|
+
## Connected sets
|
|
287
|
+
|
|
288
|
+
A coast is built from sets that share a terrain: one draws ocean against sand,
|
|
289
|
+
the next draws that same sand against grass, a third grass against forest
|
|
290
|
+
floor. Each set is 16 or 25 tiles with two terrains, but the map has four.
|
|
291
|
+
`--merge-connected` writes the whole group as one tileset with all four.
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
pixelkiln export --style ground --format tiled --merge-connected
|
|
295
|
+
pixelkiln export --style ground --only meadow --format godot --merge-connected
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Naming any set in the group exports the group, so `--only meadow` also pulls
|
|
299
|
+
in the coast and forest sets it connects to. Every set in the group has to be
|
|
300
|
+
generated; a missing one stops the export and is named in the error.
|
|
301
|
+
|
|
302
|
+
- **Which terrain is which.** The manifest's `connect` says it: the meadow's
|
|
303
|
+
lower terrain *is* the coast's upper one, so they are one terrain in the
|
|
304
|
+
result. Terrains are numbered in the order the group meets them, starting
|
|
305
|
+
from the set that connects to nothing: ocean 0, sand 1, grass 2, forest floor 3.
|
|
306
|
+
- **Names.** Each terrain is named from the first clause of the description
|
|
307
|
+
in the set that defines it (`1). deep ocean water, small waves` becomes
|
|
308
|
+
`deep ocean water`), lowercased and cut to 32 characters. A set with no
|
|
309
|
+
description text falls back to `<asset>_lower` or `<asset>_upper`, and a
|
|
310
|
+
repeated name gets a number.
|
|
311
|
+
- **Tiles.** Every set's tiles go into one atlas, role-prefixed with their set
|
|
312
|
+
(`coast/tile-03-...`), in the group's order. A tile's four corners are
|
|
313
|
+
recorded as terrain numbers, in place of the two-terrain bitmask. Two sets
|
|
314
|
+
that draw the same pair of corners (sand all round, from the coast and from
|
|
315
|
+
the meadow) both stay in the atlas.
|
|
316
|
+
- **Generic JSON.** `sets` lists the group, `rules.terrains` the names, and
|
|
317
|
+
each tile has `corners: [NW, NE, SW, SE]` where a single set has `bitmask`.
|
|
318
|
+
- **Tiled.** One Wang set with a color per terrain; each tile's id carries its
|
|
319
|
+
four corner colors.
|
|
320
|
+
- **Godot.** One terrain set with a terrain per name and a peering bit on every
|
|
321
|
+
corner of every tile.
|
|
322
|
+
- **LDtk.** One IntGrid layer with a value per terrain and one rule per
|
|
323
|
+
distinct set of four corners; tiles that share one are alternatives in that
|
|
324
|
+
rule. The Preview level is larger (16 by 12) and painted so that only
|
|
325
|
+
terrains a set joins ever meet, and the level's outside counts as the first
|
|
326
|
+
terrain. The preview uses every rule.
|
|
327
|
+
- **Files.** The default name joins the sets: `coast-meadow-forest-tileset`.
|
|
328
|
+
`--out` names the one result. The record beside it lists the sets.
|
|
329
|
+
|
|
330
|
+
Sets in a group must share a tile size and shape. A group containing a
|
|
331
|
+
sidescroller set is refused.
|
|
332
|
+
|
|
285
333
|
## Deliberate limits
|
|
286
334
|
|
|
287
335
|
- Tiled, Godot and LDtk exports require every image to match the atlas cell size.
|
|
@@ -295,14 +343,16 @@ were opened; edge sets are covered by the matcher tests alone.
|
|
|
295
343
|
(see above); the cliff-tier 25-tile set exports, but its middle transition
|
|
296
344
|
ring is not distinguished from the two named terrains in Tiled/Godot, and
|
|
297
345
|
its four wall-continuation twins export with duplicate masks.
|
|
298
|
-
- A `terrain` set exports alone
|
|
346
|
+
- A `terrain` set exports alone unless you ask for `--merge-connected`; see
|
|
347
|
+
[Connected sets](#connected-sets). A connected set (`connect` in the
|
|
299
348
|
manifest, `lower_base_tile_id`/`upper_base_tile_id` in the API) shares a
|
|
300
349
|
terrain with another set, the way PixelLab's
|
|
301
350
|
[Pro tilesets guide](https://www.youtube.com/watch?v=MbkqpDUFkEg) paints
|
|
302
|
-
ocean, sand, grass, path, and cliffs on one map
|
|
351
|
+
ocean, sand, grass, path, and cliffs on one map. Without the flag each set
|
|
303
352
|
exports as its own two-terrain Tiled Wang set, Godot terrain set or LDtk
|
|
304
353
|
layer pair.
|
|
305
|
-
|
|
354
|
+
- Merging works on `terrain` sets only. A sidescroller set connects just its
|
|
355
|
+
platform, and `tiles` sets have no `connect`, so neither merges.
|
|
306
356
|
- Godot edge/side masks on an isometric or oblique tile remain generic- or
|
|
307
357
|
Tiled-only; see Godot 4 above.
|
|
308
358
|
- Export never changes source PNGs or the lockfile.
|