pixelkiln 0.53.1 → 0.53.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/dist/cli.js +18 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +16 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -3
- package/dist/index.js.map +1 -1
- package/docs/TILES.md +33 -1
- package/package.json +1 -1
package/docs/TILES.md
CHANGED
|
@@ -81,6 +81,14 @@ pixelkiln export --style ground --only terrain --format tiled
|
|
|
81
81
|
pixelkiln export --style ground --only terrain --format godot
|
|
82
82
|
```
|
|
83
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
|
+
|
|
84
92
|
`--format` defaults to `generic`. `--out dist/terrain` overrides the output
|
|
85
93
|
base when exactly one entry is selected. `--columns` controls atlas columns.
|
|
86
94
|
Without `--out`, files land in the style's `outDir` as
|
|
@@ -143,13 +151,35 @@ Four-corner masks use `TERRAIN_MODE_MATCH_CORNERS`; four-edge masks use
|
|
|
143
151
|
bits on its atlas tile. Isometric and hex tile shapes are carried from the
|
|
144
152
|
resolved manifest spec.
|
|
145
153
|
|
|
154
|
+
**The peering-bit property names depend on tile shape, and Godot enforces
|
|
155
|
+
it.** A square tile's corners are `top_left_corner`/`top_right_corner`/
|
|
156
|
+
`bottom_left_corner`/`bottom_right_corner`; an isometric or oblique
|
|
157
|
+
(diamond) tile's are the diamond-point names `top_corner`/`right_corner`/
|
|
158
|
+
`bottom_corner`/`left_corner` — the square names are invalid on a diamond
|
|
159
|
+
tile and Godot's own `is_valid_terrain_peering_bit()` rejects them outright,
|
|
160
|
+
so writing the wrong set produces a `.tres` that looks plausible but carries
|
|
161
|
+
no usable terrain data at all once loaded. The corner-mask → isometric-name
|
|
162
|
+
mapping (mask bit 3/2/1/0 = NW/NE/SW/SE → `top_corner`/`right_corner`/
|
|
163
|
+
`left_corner`/`bottom_corner`) is confirmed against a production, hand-verified
|
|
164
|
+
isometric Wang set (a downstream consumer's `docs/terrain-tiles.md` §5: every
|
|
165
|
+
tile rendered, its corners sampled, checked against its mask). Edge/side
|
|
166
|
+
masks on an isometric or oblique tile are refused rather than guessed — the
|
|
167
|
+
diagonal peering-bit direction for that case hasn't been verified the same
|
|
168
|
+
way — so `--format godot` on an edge-ruled isometric tileset asks for
|
|
169
|
+
`--format generic` or `--format tiled` instead, neither of which has this
|
|
170
|
+
shape dependency.
|
|
171
|
+
|
|
146
172
|
The texture path is relative to the `.tres`, so the generated PNG and resource
|
|
147
173
|
can move together inside a Godot project.
|
|
148
174
|
|
|
149
175
|
Both this `TileSet` and the `SpriteFrames` that `pack --format godot` writes
|
|
150
176
|
are loaded by a headless Godot 4.7.2 in CI (`npm run test:godot`), which
|
|
151
177
|
reports the atlas tiles, terrain sets and names, animation names, frame
|
|
152
|
-
counts, speeds, and loop flags it sees
|
|
178
|
+
counts, speeds, and loop flags it sees, and — for both a square and an
|
|
179
|
+
isometric terrain set — round-trips an actual peering bit through Godot's
|
|
180
|
+
own `get_terrain_peering_bit()` rather than only checking tile/terrain-set
|
|
181
|
+
counts. That last check is what would have caught this bug; the counts alone
|
|
182
|
+
did not.
|
|
153
183
|
|
|
154
184
|
## Deliberate limits
|
|
155
185
|
|
|
@@ -163,4 +193,6 @@ counts, speeds, and loop flags it sees.
|
|
|
163
193
|
- A `terrain` asset's `"transition"` corners collapse into a two-color mask
|
|
164
194
|
(see above); the cliff-tier 25-tile set exports, but its middle transition
|
|
165
195
|
ring is not distinguished from the two named terrains in Tiled/Godot.
|
|
196
|
+
- Godot edge/side masks on an isometric or oblique tile remain generic- or
|
|
197
|
+
Tiled-only; see Godot 4 above.
|
|
166
198
|
- Export never changes source PNGs or the lockfile.
|