How aldegad/sprite-gen works
sprite-gen is a Python CLI and optional webview for turning still images into transparent game sprites. Its primary atlas workflow prepares a run, generates state rows, extracts clean frames, and composes an atlas with frame-layout metadata; optional curation adjusts the bake without rewriting source frames. A separate still-to-video workflow produces transparent motion loops. The README also documents independent image utilities, deterministic post-processing, asset tools, and optional scene rendering. The graph follows the documented pipeline map; unsampled command internals are represented only where that map supports them.
Main entry points: cli.py Command router · compose_atlas.py Compose atlas · gen_set.py Generate rows · video.py Animate still
Components 21
CLI and workflow
- Command router
sprite_gen/cli.py
Atlas pipeline
- Prepare run
sprite_gen/gen/prepare.py - Generate rows
sprite_gen/gen/gen_set.py - Extract frames
sprite_gen/frames/extract.py - Compose atlas
sprite_gen/compose/compose_atlas.py - Atlas and manifest
Curation and QA
- Curation webview
sprite_gen/serve/serve_curation.py - Curation sidecar
sprite_gen/curate/curation.py - Idle breathing
sprite_gen/effects/breathe.py - Motion QA
sprite_gen/qa/preview.py
Video pipeline
- Video canvas
sprite_gen/video/canvas.py - Animate still
sprite_gen/gen/video.py - Extract video frames
sprite_gen/video/frames.py - Cut seamless loop
sprite_gen/video/loop.py - Transparent loop outputs
Asset tools and scenes
- Recolor and exports
sprite_gen/compose - Independent asset tools
sprite_gen/background - Scene composition
sprite_gen/scene
Other components
- Sprite creator
- Image model
- Video model
Connections 26
- Sprite creator → Command router: runs commands
- Command router → Prepare run: dispatches prepare
- Command router → Generate rows: dispatches gen-set
- Command router → Extract frames: dispatches extract
- Command router → Compose atlas: dispatches compose
- Prepare run → Generate rows: provides run recipe
- Generate rows → Image model: requests row images
- Generate rows → Extract frames: provides generated rows
- Extract frames → Compose atlas: provides transparent frames
- Compose atlas → Atlas and manifest: writes atlas and layout
- Sprite creator → Curation webview: opens optional editor
- Curation webview → Curation sidecar: reads and saves choices
- Curation sidecar → Compose atlas: supplies frame edits
- Compose atlas → Idle breathing: applies idle motion
- Command router → Motion QA: dispatches preview
- Motion QA → Atlas and manifest: reads extracted frames
- Command router → Video canvas: dispatches video-canvas
- Video canvas → Animate still: prepares canvas
- Animate still → Video model: requests animation
- Animate still → Extract video frames: provides source clip
- Extract video frames → Cut seamless loop: provides keyed frames
- Cut seamless loop → Transparent loop outputs: writes loop assets
- Command router → Recolor and exports: dispatches post-processing
- Command router → Independent asset tools: dispatches asset tools
- Command router → Scene composition: dispatches scene tools
- Atlas and manifest → Scene composition: consumes finished assets