pixelkiln 0.53.0 → 0.53.2

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/docs/TILES.md CHANGED
@@ -35,6 +35,44 @@ Provider keys can contain gaps when a set includes stamp-only images. Output
35
35
  roles therefore retain the original numeric key (`tile-07`) rather than being
36
36
  renumbered by array position.
37
37
 
38
+ ### The `terrain` generator's shape
39
+
40
+ `terrain` (`/create-tileset`, [`docs/GENERATORS.md`](GENERATORS.md)) is a
41
+ different PixelLab endpoint from `tiles`' `tileFeature: "tileset"` above, and
42
+ its response carries no `tile_rules` bitmask at all. Instead each tile names
43
+ which terrain occupies its four corners directly:
44
+
45
+ ```jsonc
46
+ {
47
+ "providerMetadata": {
48
+ "pixellab": {
49
+ "terrainTypes": ["lower", "upper"],
50
+ "terrainTiles": [
51
+ { "role": "tile-00-none", "corners": { "NW": "upper", "NE": "upper", "SW": "upper", "SE": "upper" } },
52
+ { "role": "tile-01-nw-ne-sw-se", "corners": { "NW": "lower", "NE": "lower", "SW": "lower", "SE": "lower" } }
53
+ ]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ `normalizeTerrainTiles()` (`src/pipeline/tileset-export.ts`) turns this into
60
+ the same `NormalizedTileRules` shape `tileRules` would have produced directly:
61
+ `ruleType: "corner"`, `arity: 4`, `terrains` from `terrainTypes`, and a mask
62
+ per tile built from its corners with the same NW/NE/SW/SE = 3/2/1/0 bit order
63
+ described under Tiled below (a corner matching `terrains[0]` sets its bit).
64
+ `exportTileset()` tries `tileRules` first and falls back to this shape, so
65
+ Tiled and Godot export a terrain asset's real Wang placement data rather than
66
+ a plain, rule-less atlas. A tile's role carries a name slug rather than a
67
+ parseable numeric suffix (`tile-01-nw-ne-sw-se`, not `tile-01`), so its
68
+ `sourceIndex` falls back to array position instead of being parsed from the
69
+ role — correct here because `terrainTiles` and the output list are pushed in
70
+ the same loop, but worth knowing if either is ever reordered independently.
71
+
72
+ A tile whose corner is `"transition"` (the extra ring PixelLab adds at
73
+ `terrainTransitionSize: 1`) has no bit of its own in a two-terrain corner
74
+ mask; it is folded into whichever of `terrains[0]`/`terrains[1]` it isn't.
75
+
38
76
  ## Command
39
77
 
40
78
  ```bash
@@ -43,6 +81,14 @@ pixelkiln export --style ground --only terrain --format tiled
43
81
  pixelkiln export --style ground --only terrain --format godot
44
82
  ```
45
83
 
84
+ `export` selects downloaded `tiles` and `terrain` generator entries; anything
85
+ else is not a tileset and does not match `--style`/`--only`. (Selecting only
86
+ `tiles` was itself a bug once `terrain` shipped: `runExport()`'s own generator
87
+ filter rejected every `terrain` asset before it ever reached `exportTileset()`,
88
+ so the normalization above ran and was tested but nothing in the CLI could
89
+ invoke it. Fixed in `src/cli/commands/pack.ts`; `test/export-cli.test.ts`
90
+ exercises `runExport()` itself so this can't regress silently again.)
91
+
46
92
  `--format` defaults to `generic`. `--out dist/terrain` overrides the output
47
93
  base when exactly one entry is selected. `--columns` controls atlas columns.
48
94
  Without `--out`, files land in the style's `outDir` as
@@ -122,4 +168,7 @@ counts, speeds, and loop flags it sees.
122
168
  - `outline` and building-kit images absent from the rule map are stamp-only.
123
169
  Generic export retains them; engine exporters reject a rule family whose
124
170
  placement semantics would have to be invented.
171
+ - A `terrain` asset's `"transition"` corners collapse into a two-color mask
172
+ (see above); the cliff-tier 25-tile set exports, but its middle transition
173
+ ring is not distinguished from the two named terrains in Tiled/Godot.
125
174
  - Export never changes source PNGs or the lockfile.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelkiln",
3
- "version": "0.53.0",
3
+ "version": "0.53.2",
4
4
  "description": "Manifest-driven pixel-art generation, review, recovery, and packaging with deterministic provenance.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -177,10 +177,10 @@ anything PixelLab publishes — use these as the actual target, not a vibe:
177
177
 
178
178
  ## What this adapter still has no fidelity lever for
179
179
 
180
- Pro-tier full-bleed background generation at custom aspect ratios
181
- (`generate-image-v2`, PixelLab's "Pro" image tier beyond `pixflux`), a
182
- dedicated post-generation "pixel correction" cleanup pass (strength-slider
180
+ A dedicated post-generation "pixel correction" cleanup pass (strength-slider
183
181
  noise/detail reduction, distinct from `image-to-pixelart`), and
184
182
  `reduce-colors` (arbitrary post-hoc palette quantization with dithering) are
185
- real PixelLab capabilities with no equivalent in this adapter today. See
183
+ real PixelLab capabilities with no equivalent in this adapter today. Pro-tier
184
+ full-bleed background generation at custom aspect ratios (`generate-image-v2`)
185
+ is closed as the `imagePro` generator (`pixellab.md`). See
186
186
  [pixellab-roadmap.md](./pixellab-roadmap.md).