Skip to content

Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.

release: v2.2.1 — gait half-period guard, drift-only --anchor feet, wide raised-limb canvas, gen --trim-alpha

Soohong Kimac2f96f56fa3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5d5c16..538992f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,12 +2,11 @@
All notable public changes to `sprite-gen` are recorded here. Versions track the `version:` field in `SKILL.md` and `pyproject.toml`.
-## Unreleased
+## v2.2.1
-- `video-loop --anchor feet` no longer sways a walk. It pinned every cell on that frame's own foot line, which in an in-place gait jumps to the planted foot each step, so a body that stood still lurched back and forth by the stride. It now fits a straight line to the body's centre across the cycle and removes only that drift, keeping the step as performed; every cell stands on the mean foot line. `drift_px` now means the drift removed, and the strip meta adds `foot_sway_px` (the planted foot's in-gait movement, reported but not erased). Default `none` is unchanged.
- `video-loop` gait half-period guard: a `walk`/`run` period shorter than the state's floor (`LoopProfile.min_seconds`: 0.6 s / 0.35 s) is treated as one step of a two-step gait and doubled when the doubled period repeats within 25 % of it — the case where a costume hides the legs and the half period dips as deep as the full one, which the depth rule alone returned as a one-legged loop. The report carries `cycle.half_period_guard` (`applied`, `from`, `to`, depth ratio, or `below_floor` + why it was left alone). `--min-len` still overrides.
- `video-loop` one-shot detection no longer refuses an excursion shorter than the periodic window's lower edge; only a cut under 4 frames or longer than the clip is refused. Short performed actions (a set-down, a nod) come back as the frames they are.
-- `video-loop --anchor feet` (also `video-set --anchor`): re-centre every strip cell on that frame's own foot line so a subject the model walked across an "in-place" canvas stops sliding once per cycle. Strip meta gains `foot_anchor`, `drift_px` and `foot_x`, and declares the spec loader's `anchor` as `[foot_x, h]` so scenes stand the sprite on its feet; the video-set table row carries `drift_px`. Default `none` keeps existing output byte-identical.
+- `video-loop --anchor feet` (also `video-set --anchor`): remove the slow in-canvas drift of a subject the model walked across an "in-place" canvas, so the strip stops sliding once per cycle. A straight line fitted to the body's centre across the cycle carries the drift and not the step; only that line is removed and every cell stands on the mean foot line. Strip meta gains `foot_anchor`, `drift_px` (drift removed), `foot_sway_px` (the planted foot's in-gait movement, kept and reported) and `foot_x`, and declares the spec loader's `anchor` as `[foot_x, h]` so scenes stand the sprite on its feet; the video-set table row carries `drift_px`. Default `none` keeps existing output byte-identical. The first implementation pinned each frame's own foot line instead; in an in-place walk that line jumps to the planted foot every step, so a body that stood still lurched back and forth by the stride. That version never shipped.
- `video-canvas` / `video-set`: `cheer`, `wave` and `celebrate` now take the wide canvas (raised limbs leave a 1:1 frame at the top corners), `video-set --shape` forces one shape for a whole batch (wide costumes), and `video-set` carries `cheer` / `wave` motion templates that name no limbs.
- `gen --trim-alpha` (with `--transparent`): crop the published PNG to its opaque bbox so the bottom edge is the foot line; the report records `extra.trim_alpha` (`bbox`, `before`, `after`, `margin_px`). The `.raw.png` is untouched.
diff --git a/SKILL.md b/SKILL.md
index 28f321f..c12060e 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -1,6 +1,6 @@
---
name: sprite-gen
-version: 2.2.0
+version: 2.2.1
description: "Generates images and game sprites through GPT or Grok with guided provider choices, separate saved defaults, automatic cleanup and optional curation. Handles sprite requests, ordinary image generation/editing, standalone image-to-video clips (i2v, animate this still, 그록 영상, 이매진 비디오, 스틸 움직여줘), chroma removal, animation atlases, video loops, 큐레이션뷰, image candidates, 팔레트 스왑, palette swap, recolor, rig layers, engine exports, repeating backgrounds, projected shadows, motion/contact inspection and optional scene composition from existing assets."
license: Apache-2.0
depends_on:
diff --git a/pyproject.toml b/pyproject.toml
index 027734b..f579e7c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -12,7 +12,7 @@ build-backend = "setuptools.build_meta"
name = "sprite-gen"
# Release discipline: keep this package metadata version synchronized with
# SKILL.md's `version:` field in the same release commit.
-version = "2.2.0"
+version = "2.2.1"
description = "Component-row pipeline for clean 2D game sprites and animation atlases"
readme = "README.md"
license = "Apache-2.0"