Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
refactor: game-pack reads the ui-kit report kind and stretch names from ui_kit
Soohong Kimec201cebeabe
diff --git a/sprite_gen/compose/game_pack.py b/sprite_gen/compose/game_pack.pyindex e2eb6e4..5921059 100644--- a/sprite_gen/compose/game_pack.py+++ b/sprite_gen/compose/game_pack.py@@ -21,7 +21,7 @@ from PIL import Imagefrom sprite_gen.audio.manifest import load as load_soundfrom sprite_gen.audio.playback import player as audio_player-from sprite_gen.frames.ui_kit import measure_insets+from sprite_gen.frames.ui_kit import REPORT_KIND as UI_KIT_KIND, STRETCHES, measure_insetsfrom sprite_gen._deps import npfrom sprite_gen.spec.assets import finite, load_asset, load_asset_statesfrom sprite_gen.util.resample import resize_cell@@ -29,8 +29,6 @@ from sprite_gen.util.resample import resize_cellMAX_PAGE_SIZE = 4096MAX_BYTES = 50_000_000SCENE_SECTIONS = ("images", "tiles", "ui")-UI_KIT_KIND = "sprite-gen-ui-kit"-STRETCHES = ("xy", "x", "none")SIDES = ("left", "right", "top", "bottom")# A "base" footprint counts pixels at least this opaque (docs/game-pack.md "Version 2 request").FOOTPRINT_ALPHA = 128diff --git a/sprite_gen/frames/ui_kit.py b/sprite_gen/frames/ui_kit.pyindex 64416a4..6c979ab 100644--- a/sprite_gen/frames/ui_kit.py+++ b/sprite_gen/frames/ui_kit.py@@ -33,6 +33,7 @@ PADDING_SPAN = 96GUIDE_BACKGROUND = (0xF6, 0xF6, 0xF6)GUIDE_BOX = (0x2F, 0x80, 0xED)STRETCHES = ("xy", "x", "none")+REPORT_KIND = "sprite-gen-ui-kit"@dataclass(frozen=True)@@ -306,7 +307,7 @@ def split_ui_kit(image: Image.Image, *, alpha_floor: int = 64,"parts": len(parts),}report = {- "kind": "sprite-gen-ui-kit",+ "kind": REPORT_KIND,"version": 1,"sheet_size": [width, height],"status": "needs-review" if reasons else "pass",