fix(map-editor): v0.2.0b.1 — bind blob_rect_stone material so Auto-Tile renders

work.map.json was still schema-v2 with the legacy fa_terrain_v1
atlas — neither has a `material` field on its layers, so the
renderer's vertex/blob path never fired and Auto-Tile painting had
no visible effect (the set_vertex writes landed but the renderer
fell back to the cell-tile path that doesn't consume them).

Migration:
 - schema_version 2 -> 3
 - size 4x4 -> 16x16 (room to paint)
 - atlases: fa_terrain_v1 -> blob_rect_stone (S-V2E2-RM-Blob 14-slot
   atlas from lib-asset.prototype-blob-geom)
 - layers: surface + wall, both with "material": "blob_rect_stone";
   vertices+overrides start empty (lib-core.maps lazy-allocates on
   first set_vertex)

Manifest:
 - asset_aliases: fa_terrain_v1 -> blob_rect_stone (lib-asset.
   prototype-blob-geom)
 - deps: drop prototype-fa-starter, add prototype-blob-geom 0.1.0
This commit is contained in:
calic
2026-05-29 00:34:12 +02:00
parent 25e838c54f
commit 497c139727
3 changed files with 19 additions and 16 deletions

View File

@@ -1,11 +1,15 @@
-- sporel-module-map-editor v0.2.0b
-- sporel-module-map-editor v0.2.0b.1
-- Interactive map editor — Rev 4 UX architecture (see design paper
-- 2026-05-28-autotile-blob-styles-design.md §11 + plan stub
-- 2026-05-28-map-editor-blob-v2.md). v0.2.0b adds the bottom palette
-- 2026-05-28-map-editor-blob-v2.md). 0.2.0b adds the bottom palette
-- strip (14 numbered swatches, no real tile thumbnails yet — that
-- needs a lib-core.maps tile-UV getter) + Auto-Tile vertex painting
-- via maps.set_vertex + a vertex-grid overlay. Direct-mode painting
-- still uses the v0.1 cell-paint path.
-- via maps.set_vertex + a vertex-grid overlay. 0.2.0b.1 migrates
-- work.map.json to schema-v3 + binds surface/wall layers to the
-- blob_rect_stone material so Auto-Tile painting actually renders;
-- before that the legacy fa_terrain_v1 atlas was loaded which has no
-- blob-14 slot layout, so paint had no visible effect.
-- Direct-mode painting still uses the v0.1 cell-paint path.
-- Transform controls + Direct-Override + Decal/Entity sub-selectors
-- land in 0.2.0c/d.
--
@@ -766,7 +770,7 @@ input.bind("save_map", { "s" })
input.bind("toggle_mode", { "tab" }) -- 0.2.0a
input.bind("toggle_cheatsheet", { "i" }) -- 0.2.0a — `i` for Info/help (no shifted-key support in input lib)
engine.print("map-editor v0.2.0b: ready. Tab=mode, I=help, S=save, E=erase, R=rotate, ESC=quit")
engine.print("map-editor v0.2.0b.1: ready. Tab=mode, I=help, S=save, E=erase, R=rotate, ESC=quit")
-- =====================================================================
-- Frame hooks

View File

@@ -1,18 +1,18 @@
{
"id": "map-editor",
"version": "0.2.0b",
"version": "0.2.0b.1",
"kind": "module",
"api": "^0.1",
"ci_frames": 30,
"entry_point": "init.lua",
"asset_aliases": {
"fa_terrain_v1": "lib-asset.prototype-fa-starter"
"blob_rect_stone": "lib-asset.prototype-blob-geom"
},
"deps": [
{"id":"lib-core.maps","version":"0.5.2"},
{"id":"lib-core.render","version":"0.1.0"},
{"id":"lib-core.camera","version":"0.3.0"},
{"id":"lib-core.input","version":"0.4.0"},
{"id":"lib-asset.prototype-fa-starter","version":"0.2.0"}
{"id":"lib-asset.prototype-blob-geom","version":"0.1.0"}
]
}

View File

@@ -1,11 +1,10 @@
{
"schema_version": 2,
"schema_version": 3,
"id": "work",
"size": { "w": 4, "h": 4 },
"atlases": ["fa_terrain_v1"],
"size": { "w": 16, "h": 16 },
"atlases": [ "blob_rect_stone" ],
"layers": {
"surface": {
"tiles": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
}
"surface": { "material": "blob_rect_stone" },
"wall": { "material": "blob_rect_stone" }
}
}