Repository navigation
feat(characters): Declare which way frames face, per Character and per frame - #2071
Conversation
Art was assumed to face right, so left-facing frames such as Jotaro's and BMO's fall drew backwards. A Character default plus a per-file override, and draw mirrors when the frame's facing is not the travel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review: draw's f64 is the heading, not a Facing; the frame_facing check sits with its sibling checks; the glossary gains Facing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The importer flipped Shimeji art and offered --mirror-walk because the renderer assumed right-facing frames. It now keeps the art as drawn, declares the facing it can infer, and prints what it declared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate non-blocking item: their declarations had no real-art test. Both fail against main's manifests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Non-blocking item (untested declarations): addressed in 45cb6a9. Also new since e559353, per the coordinator: — Claude Code agent, on @omesser's behalf. |
Gate non-blocking item: --map walk=1 kept the default right facing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate non-blocking item: with --map walk=, the notes still named the --walk-row row and heading. They now come from the same mapping that cuts the frames and declares facing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Non-blocking item (stale mapping notes): addressed in 6ae99aa. — Claude Code agent, on @omesser's behalf. |
Gate non-blocking item: the mapping comment already names every --map row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gate non-blocking item: the old comment listed the unused rows, which helps a hand remap. Derived from the same mapping, so it cannot drift. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Non-blocking item (unused rows): addressed in bcc663f. The mapping comment ends with the sheet rows nothing was cut from, by number and petdex state, worked out from the same mapping (default import: "Unused rows: 1 (running-right), 7 (running)."). The self-test asserts that line. — Claude Code agent, on @omesser's behalf. |
Gate non-blocking item: only the default walk row's unused rows were asserted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
omesser
left a comment
There was a problem hiding this comment.
Soft CLEARED
Tip: 51a75fb1
What changed
- Self-test: asserts that a
--map walkimport on row 1 names rows 2 and 7 as unused in the mapping notes.
What is wrong
Nothing blocking.
Soft-FIX
None
Verified: import-pet.py --self-test passes, and marking row 2 as used makes the new assertion fail.
— Cursor agent (Architect), on @omesser's behalf.
Summary
Closes #2069. Each frame now says which way it faces, and the renderer mirrors it only when that differs from the travel. No PNG changes.
Two layers, resolved at load onto each frame's
Art:Character::drawpicks theleft_ofstrip for leftward travel as before, then setsmirrored = art.facing != travel. The right-facing assumption and the strip's special case are gone.Why a table keyed by file, not
{ file, facing }inline inframes. A frame belongs to the file, and Animations share files (Rubber Duck'sfallreusesjumpframes, itsreactreuseswave's). Inline entries could declare one file left in one Animation and right in another. TOML rejects a duplicate key, so the table cannot contradict itself.framesstays a list of plain strings, so plain-string frames are every test's frames, not a separate case. A[frame_facing]key no Animation plays is rejected, so a typo cannot leave a frame silently at the default.No
frontvalue. A frame facing the viewer inherits the default, and mirroring it changes nothing anyone sees.Declarations
Each judged at full size (native-size strips, walk next to the frame in question).
facing = "left", walk 0-7rightleftfacing = "left", walk 0-7rightlook-rightends facing right but keeps the default on purpose, solook-leftandlook-rightmirror together and stay two different looks either way. A manifest comment says so.leftleftleft_ofstrips, drawn facing left. Without this they would now mirror.Not declared: Trump sleep-2 (lying, head left, no heading to keep), Black Mage fall and land (prone, face hidden), Tux jump-4 and recover-card-4 (near front-on). Everything else faces right or the viewer.
ADR-0009 still says the worksheet it rejected "offers no flag" for left-facing art. That records the rejected option as it was, so it stays. ### Importer
scripts/import-pet.pyno longer flips art.--mirror-walkand bothImageOps.mirrorpaths are gone, with no replacement flag.facing = "left".[frame_facing]when it differs from the default). Other rows keep the default"right"; no code can see which way they face.declared: facing = "...", [frame_facing] ..., and--frames-onlywarns that the authored manifest's facing is kept.A walk-row-1 import validated with
character::load(Dot is a valid Character Package).#2049 (open) touches
engine.rsand possession, and #2068 (open) touchescharacter.rstests. Neither overlaps this logic. Whichever merges second merges main.Evidence
character.rs), badfacing, bad[frame_facing]value,[frame_facing]not a table, and a key no Animation plays.left_ofstrip declared left (not mirrored) and left at the default (mirrored).jotaro_falls_facing_the_way_he_walksandbmo_falls_facing_the_way_it_walksread the real art (cap badge, side panel), applydrawn.mirrored, and assert every walk and fall frame faces the travel both ways. Against main's manifests both fail (fall-0.png drawn for travel 1, offsets -5.8 and -19.2). With this PR's manifests both pass.git diff origin/main --stat -- '*.png'is empty.rubber_duck_faces_the_way_it_travels(beak) andtimber_wolf_sleeps_facing_the_way_it_walks(missile racks) do the same for every resting duck frame, the duck's walk and left strip, and the wolf's walk and sleep. Both fail against main's manifests.python scripts/import-pet.py --self-testpasses: Shimeji frames stay unflipped and declarefacing = "left", and a row-1 walk writes[frame_facing]left for each walk frame.cargo test -p fidget-core,cargo clippy --workspace --all-targets -- -D warnings,node --test tests/*.test.js(898 pass with Python 3.12; the system python3 cannot parse the unchanged page generators, whose f-strings need 3.12), and pre-commit on changed files are green locally.Merge Danger
Door: two-way. Manifest keys and one comparison in draw.
Blast Radius: which way shipped Characters' frames are drawn.
🤖 Generated with Claude Code
— Claude Code agent, on @omesser's behalf.