Commit Graph

7 Commits

Author SHA1 Message Date
calic
497c139727 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
2026-05-29 00:34:12 +02:00
calic
25e838c54f feat(map-editor): v0.2.0b — bottom palette + Auto-Tile vertex paint
UI:
 - Bottom palette strip (above status, left of side-panel): 14
   coloured swatches numbered 1-14. Click selects state.active_tile.
 - World-space overlay (Auto-Tile mode only): cell grid + vertex
   dots + snapped-vertex highlight ring.
 - Side-panel + status repositioned to clear the palette band.
 - Cheatsheet updated with the new LMB/RMB canvas + palette rows.

Paint:
 - Auto-Tile mode: LMB on canvas -> maps.set_vertex(active_layer,
   snap.vx, snap.vy, true); RMB -> set_vertex(..., false). Snap is
   computed in update() by rounding world coords to the nearest
   (W+1)x(H+1) vertex; off-map cursor publishes nil.
 - Direct mode: unchanged from 0.2.0a (paint_cell_at with active
   slot + rotation).

Notes:
 - Palette swatches are placeholder solid colours, not real tile
   thumbnails — that needs a tile-UV getter on lib-core.maps, which
   is out of scope for this sub-slice.
 - Transform controls, Direct-Override transform writes, and the
   Decal/Entity sub-selectors land in 0.2.0c/d.
2026-05-29 00:03:42 +02:00
calic
35d9940d63 feat(map-editor): v0.2.0a — Rev 4 layout reorg + mode switch + cheatsheet
Layout (per design paper §11):
 - Top toolbar with Mode buttons (Auto-Tile / Direct), Save, Erase,
   Rotate, Help.
 - Right Layers side-panel (8 rows, top-down draw order) as single
   source of truth for visibility + active layer — replaces the old
   left-edge layer chips.
 - Bottom status bar.

State + actions:
 - mode = "auto-tile" | "direct" (Tab toggles).
 - cheatsheet_open modal toggle (I key, dimmed overlay + key/action
   table).
 - SPOREL_CI=1 auto-exits after 30 frames (matches vagrant pattern;
   ci_frames in manifest is not engine-enforced for kind:"module").

Paint behaviour itself is unchanged from 0.1.0 — bottom palette + the
real Auto-Tile / Direct paint loops land in 0.2.0b/c/d.

deps: lib-core.maps 0.5.1 -> 0.5.2 (consumes set_vertex / get_vertex).
2026-05-28 23:56:02 +02:00
calic
8dbb5b9d9c deps: bump lib-core.maps 0.5.0 -> 0.5.1
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 23:11:09 +02:00
calic
34f8b85d57 deps: bump lib-core.maps 0.4.0 -> 0.5.0
Required by the schema-v3 work in lib-core.maps. The map-editor
v0.1 stays on the legacy tiles[] path and continues to function
unchanged through the auto-upgrade v1->v2->v3 chain on load.

Full migration to v3's vertex-painting + override-UI lands in the
map-editor v0.2 slice
(sporel-meta/docs/superpowers/plans/2026-05-28-map-editor-blob-v2.md).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 20:50:21 +02:00
Calic
b5fee40406 Match module id to directory name convention
Other module manifests (spine-prototype, vagrant-skeleton, etc.) use
the short directory name as the id, not the long 'sporel-module-X'
form which is reserved for the Gitea slug. The mismatch caused the
launcher script (which exports SPOREL_MODULE=map-editor) to fail
with ENGINE_ERR_MODULE_NOT_FOUND.
2026-05-24 03:08:31 +02:00
Calic
9d41ba8890 Scaffold sporel-module-map-editor package
Empty launchable module with deps on lib-core.maps 0.4.0, render,
camera, input, and the fa_terrain_v1 asset alias. Renders the
default 4x4 empty work-map; interactive editing wired in
subsequent commits.
2026-05-24 01:04:44 +02:00