pixelkiln 0.53.2 → 0.53.4
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 +24 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +24 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/docs/TILES.md +38 -1
- package/package.json +1 -1
package/docs/TILES.md
CHANGED
|
@@ -151,13 +151,48 @@ Four-corner masks use `TERRAIN_MODE_MATCH_CORNERS`; four-edge masks use
|
|
|
151
151
|
bits on its atlas tile. Isometric and hex tile shapes are carried from the
|
|
152
152
|
resolved manifest spec.
|
|
153
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
|
+
|
|
154
172
|
The texture path is relative to the `.tres`, so the generated PNG and resource
|
|
155
173
|
can move together inside a Godot project.
|
|
156
174
|
|
|
175
|
+
**`terrain`-generator tiles are always square, never isometric.**
|
|
176
|
+
`/create-tileset` places tiles on a rectangular vertex grid (its own docs: "a
|
|
177
|
+
map of W×H cells has (W+1)×(H+1) vertices" — standard square Wang-tiling
|
|
178
|
+
math, with no shape parameter at all, unlike `create-tiles-pro`'s `tile_type`
|
|
179
|
+
enum), and its raw output is fully opaque with no diamond alpha mask,
|
|
180
|
+
confirmed against a downstream consumer's real generated tiles. `terrain`'s
|
|
181
|
+
resolved spec always carries `tileType: "square_topdown"` for exactly this
|
|
182
|
+
reason, so the exporter never falls back to `tiles`' own "isometric" default
|
|
183
|
+
(the real API default for that generator, not terrain's) for a terrain
|
|
184
|
+
asset. The isometric corner-name mapping above is real and does apply — to
|
|
185
|
+
an isometric `tiles`-generator tileset (`tileFeature: "tileset"` with
|
|
186
|
+
`tileType: "isometric"`), not to `terrain`.
|
|
187
|
+
|
|
157
188
|
Both this `TileSet` and the `SpriteFrames` that `pack --format godot` writes
|
|
158
189
|
are loaded by a headless Godot 4.7.2 in CI (`npm run test:godot`), which
|
|
159
190
|
reports the atlas tiles, terrain sets and names, animation names, frame
|
|
160
|
-
counts, speeds, and loop flags it sees
|
|
191
|
+
counts, speeds, and loop flags it sees, and — for both a square terrain
|
|
192
|
+
tileset and an isometric `tiles` tileset — round-trips an actual peering bit
|
|
193
|
+
through Godot's own `get_terrain_peering_bit()` rather than only checking
|
|
194
|
+
tile/terrain-set counts. That last check is what would have caught the
|
|
195
|
+
isometric-corner-names bug; the counts alone did not.
|
|
161
196
|
|
|
162
197
|
## Deliberate limits
|
|
163
198
|
|
|
@@ -171,4 +206,6 @@ counts, speeds, and loop flags it sees.
|
|
|
171
206
|
- A `terrain` asset's `"transition"` corners collapse into a two-color mask
|
|
172
207
|
(see above); the cliff-tier 25-tile set exports, but its middle transition
|
|
173
208
|
ring is not distinguished from the two named terrains in Tiled/Godot.
|
|
209
|
+
- Godot edge/side masks on an isometric or oblique tile remain generic- or
|
|
210
|
+
Tiled-only; see Godot 4 above.
|
|
174
211
|
- Export never changes source PNGs or the lockfile.
|