feat(map-editor): v0.2.0c.2 — palette uses real tile thumbnails

Replaces the placeholder colour swatches with actual atlas sub-tex
draws via the new lib-core.maps 0.5.4 getters:
 - atlas_diffuse_handle(atlas_idx) -> raylib Texture2D handle
 - atlas_tile_uv(atlas_idx, slot)  -> {x, y, w, h} or nil

Renders each slot 1..14 (lib slot 0..13) scaled to fit the swatch
rect with draw_sprite_transform. Falls back to the legacy colour
square + slot-number label when the atlas isn't loaded (headless,
material missing, etc.).

Drives off state.get_active_atlas() (defaults to 0 — fine for the
single-atlas work map; multi-atlas selector is a future slice).

Also bumps lib-core.maps dep 0.5.3 -> 0.5.4.
This commit is contained in:
calic
2026-05-29 01:37:45 +02:00
parent c0a1bcf162
commit 70b841c8d6
2 changed files with 34 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{
"id": "map-editor",
"version": "0.2.0c.1",
"version": "0.2.0c.2",
"kind": "module",
"api": "^0.1",
"ci_frames": 30,
@@ -9,7 +9,7 @@
"blob_rect_stone": "lib-asset.prototype-blob-geom"
},
"deps": [
{"id":"lib-core.maps","version":"0.5.3"},
{"id":"lib-core.maps","version":"0.5.4"},
{"id":"lib-core.render","version":"0.1.0"},
{"id":"lib-core.camera","version":"0.3.0"},
{"id":"lib-core.input","version":"0.4.0"},