[art] #9-2: extend sprite atlas + ui.js SPR + sprite_atlas.gd REGIONS for 11 portraits #19
Labels
No labels
blocked:needs-attention
blocked:needs-decision
blocked:needs-decompose
blocked:needs-design
blocked:needs-triage
blocked:unclassified
bug
documentation
enhancement
gsd-spec
in-progress
needs-decompose
priority:high
priority:low
priority:medium
quickfix
test
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/cybertactics#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent-Issue: #9
Depends on: #9-1 (portraits must exist first).
Extend the sprite atlas wiring to register 11 portrait regions. The portraits live at
web/assets/portraits/<id>.png— NOT insideweb/assets/sprites.png(separate file, separate layout).Acceptance:
web/js/ui.jsSPR map gains aPORTRAITregistry (or extend SPR with portrait-prefixed keys) pointing each unit id →{ src: "assets/portraits/<id>.png", size: 96 }. (If a single atlas is preferred over per-file loads, extendweb/assets/sprites.pngwith a portraits row and document the index.)godot/scripts/sprite_atlas.gdREGIONS gains matching portrait entries (mirror the web side; the contract is "Identical numbering to web/js/ui.js SPR — single source of visual truth" persprite_atlas.gdline 4)make cipasses (lint, smoke tests)Reference: existing SPR map at
web/js/ui.jsline 13, REGIONS atgodot/scripts/sprite_atlas.gdline 10. Pick ONE layout decision (per-file PNG vs single-atlas extension) and write that decision into BOTH registries so the two stay in sync.Closed by commit
a49b9a0(cybertactics#19: register 11 portrait PNGs in PORTRAIT + SpriteAtlas.PORTRAIT_PATHS).All four acceptance criteria met:
web/js/ui.jshasPORTRAITregistry with all 11 ids,{ src: assets/portraits/<id>.png, size: 96 }shape, plus aportraitFor(id)lazy loadergodot/scripts/sprite_atlas.gdhas matchingPORTRAIT_PATHSDictionary +has_portrait()/load_portrait()helpers (parallel to existingREGIONS/load_texture()contract — same 11 ids, same per-file layout decision)make ciPASS: 7 Node smokes + gdlint + Playwright UI smoke + Godot headless import all green; Godot successfully re-imported the 11 mirrored PNGs atgodot/assets/portraits/<id>.pngduring the import gateLayout decision written into both registries: per-file PNGs (NOT single-atlas extension). 11 PNGs mirrored from
web/assets/portraits/togodot/assets/portraits/so Godot can resolve them viares://assets/portraits/<id>.png.