Skip to content

Turn forms with a head on one side round as a whole where they go - #142

Merged
mLampir merged 2 commits into
mainfrom
claude/project-thread-00lcrd
Oct 26, 2026
Merged

mLampir merged 2 commits into
mainfrom
claude/project-thread-00lcrd

Conversation

@mLampir

@mLampir mLampir commented Oct 25, 2026

Copy link
Copy Markdown
Owner

Requested by Michael · project thread

What

Until now only the face turned when a pet went the other way, so a chameleon walked right with its tail in front. Forms whose head is on one side and whose tail, shell or ball is on the other are now drawn fully mirrored when they face the other way. HEADING in core/src/scene.ts lists them: 7 babies, 12 children and 19 adults. This applies at home, on trips, in a scuffle, as a visitor and in the yard. Their light then comes from the top right.

Round forms, and forms whose only asymmetry is something held in one hand (tray, lance, plan, teapot spout), only turn their face, as before. Their "the body isn't drawn mirrored" effects stay as they are.

Effects checked form by form

  • A part that moves by itself, cropped from the frame (Lionkite's head, Solroll's sun ball), is mirrored along with the body.
  • reach() knows the facing, which fixes the backpack position, where thrown food lands and the fishing spot.
  • Effects tied to a spot of the body now go through a new art() / column() helper: Cogsqueak's key ticks, Snorbear's yawn, Origrane's paper planes, Lionkite's fireworks and pompoms, Mossolotl's moss, Mirrorleon's prism and Solroll's ball vault.
  • Palettino and Axodrake used to turn round by hand (turn) for their special move. That turn is removed, because facing the opponent they are already turned.
  • Fountaingle's water and Rapierre's beak flash already assumed a mirrored body, so they are now correct in both directions.

Tests

  • New scene test: a turned form facing right is exactly the mirror of the same form facing left, and round forms are unchanged.
  • npm run check passes. npm test: 456 pass, 1 fail. The one failure is api.test.ts (festival fields in the contract), and it fails the same way on main without this change.
  • docs/images/pets and docs/pet_preview.png are unchanged: icons are drawn without a facing, and blob and Angloop are not in the list.

Generated by Claude Code

So far only the face turned when a pet went right, and a chameleon walked
with its tail in front. Forms with a head on one side and a tail, shell or
ball on the other (HEADING in the scene: 7 babies, 12 children, 19 adults)
are now drawn mirrored when they face the other way, at home, on trips, in
a scuffle, as a visitor and in the yard. Round forms and those with
something held in one hand (tray, lance, plan) only turn their face, as
before.

Effects tied to a spot of the body follow the turned body: the part that
moves by itself (a lion's head, a sun ball), the backpack and where food
lands, the key's ticks, the yawn, the paper planes, the fireworks, the moss
and the pompoms. Palettino and Axodrake no longer turn round by hand for
their special move: facing the opponent, they already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01329FGaZ2R2yreSBvZMdcz4
@mLampir mLampir self-assigned this Oct 25, 2026
The contract test read the pet's answers on today's date, so the festival
fields came and went with the poster and the test failed on main. Same
change as in #141; it no-ops once that is merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01329FGaZ2R2yreSBvZMdcz4

mLampir commented Oct 25, 2026

Copy link
Copy Markdown
Owner Author

The test check failed in core/test/api.test.ts ("a change to the API raises its version"). This change didn't cause it: the test reads the pet's answers on today's date, so the festival fields come and go with the poster, and main fails the same way. #141 already fixes it by pinning the test to a festival day. I copied that same change into this PR (5b48aa0), and it will do nothing extra once #141 is merged. Locally, all 457 tests pass and npm run check is clean.


Generated by Claude Code

@mLampir
mLampir merged commit eef7cbd into main Oct 26, 2026
5 checks passed
@mLampir
mLampir deleted the claude/project-thread-00lcrd branch October 26, 2026 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants