Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
docs: what `sprite-gen breathe` refuses and never touches — overlapping folders by real location, the untouched source, the run's own staging folder, an output link — in docs/breathing.md and the CHANGELOG
Soohong Kimf724761bf22f
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex e7a4355..adddcf3 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -59,7 +59,10 @@ Moving the written names to `sway` is a later change made together with the toolIt also takes the smooth shape flags: `--chest-y`, `--chest-rx`, `--chest-ry`, `--shoulder`, `--shoulder-lag`, `--chest-tilt`, `--chest-bias`, `--chest-bias-y`, `--chest-dir`, `--chest-x`, and `--chest-flat`.The same values give the same bytes as a curation bake.It writes the frames under their names and `breathe.json` (config, phases, the anatomy used) into a new folder all at once.- It refuses the source folder or a folder that is not empty.+ Before creating or deleting anything, it refuses if `<out>` and `<frames>` are the same folder, if either lies inside the other based on real disk location (following symbolic links and treating two spellings on a case-insensitive disk as the same folder), or if `<out>` already exists and is not empty, while an existing empty folder is accepted.+ It never writes anything into `<frames>`, and it never changes or deletes any frames or other files there.+ It builds the result in a temporary folder of its own next to `<out>`, with a name no other folder has, and moves it into place in one step, deleting only that temporary folder if a run cannot finish while leaving alone folders it did not make, such as a leftover temporary folder of an earlier run.+ When `<out>` is a symbolic link to an empty folder, the result is placed in the folder the link points to, and the link stays.- **Output change: The curation webview does not preview a smooth row.**The live preview mirrors the pixel warp only.It shows the original frame with a notice.diff --git a/docs/breathing.md b/docs/breathing.mdindex 593ea7c..46387e9 100644--- a/docs/breathing.md+++ b/docs/breathing.md@@ -61,7 +61,7 @@ smooth 모드의 고정 영역과 동작 방식은 다음과 같다.sprite-gen breathe <frames> <out> [--mode pixel|smooth] [--depth D] [--depth-x D] [--breaths N] [--breath-peaks ...] [--lag L] [--rigid-row R] [--chest-y ...] [--chest-rx ...] [--chest-ry ...] [--shoulder ...] [--shoulder-lag ...] [--chest-tilt ...] [--chest-bias ...] [--chest-bias-y ...] [--chest-dir ...] [--chest-x ...] [--chest-flat ...]```-`<frames>`는 파일 이름 순서대로 재생되는 PNG 프레임 폴더다. 사이드카와 동일한 검증과 베이크 처리를 거치므로 같은 값이면 동일한 바이트를 출력한다. 변환된 프레임들을 원본과 동일한 이름으로 저장하고, 적용된 설정과 위상 및 해부학 측정값을 담은 `breathe.json`을 새 폴더에 한 번에 작성한다. 원본 폴더를 덮어쓰거나 비어 있지 않은 폴더를 지정하면 쓰기를 거부한다.+`<frames>`는 파일 이름 순서대로 재생되는 PNG 프레임 폴더다. 사이드카와 동일한 검증과 베이크 처리를 거치므로 같은 값이면 동일한 바이트를 출력한다. 변환된 프레임들을 원본과 동일한 이름으로 저장하고, 적용된 설정과 위상 및 해부학 측정값을 담은 `breathe.json`을 새 폴더에 한 번에 작성한다. 심볼릭 링크를 추적하고 대소문자를 구분하지 않는 디스크의 서로 다른 표기를 동일하게 취급하는 실제 위치를 기준으로, `<out>`과 `<frames>`가 같은 폴더이거나 어느 한쪽이 다른 쪽 내부에 있는 경우 및 이미 존재하면서 비어 있지 않은 폴더는 아무것도 생성하거나 삭제하지 않고 거부하되 기존의 빈 폴더는 허용한다. `<frames>` 폴더에는 어떤 파일도 새로 쓰지 않으며, 프레임을 비롯한 기존 파일을 변경하거나 삭제하지 않는다. 결과물은 `<out>` 옆에 다른 폴더와 겹치지 않는 고유한 이름의 자체 임시 폴더에서 빌드한 뒤 한 번에 제자리로 이동하며, 작업을 완료하지 못했을 때도 오직 직접 만든 임시 폴더만 삭제하고 이전 작업의 잔여 폴더처럼 직접 만들지 않은 폴더는 그대로 둔다.비디오 루프 셀 처리 예시는 다음과 같다.