feat: add hidden wt animate easter eggs (duck pond, crab, hatching egg) - #37
Merged
Conversation
8-bit-style pixel animations rendered with 256-color half-blocks, two pixel rows per terminal line. Each animation is a pure frame(tick, cols) function returning a grid of palette keys, so frames are deterministic and unit-testable; the player redraws in place and restores the cursor on exit or Ctrl-C, with a plain-character fallback for non-tty/NO_COLOR. - wt animate: duck paddling across a pond with parallax water layers, wave crests, wake, bob, blink, lily pad, sun and cloud - wt animate crab: a nod to the Claude crab, scuttling on the beach - wt animate2: an egg that wobbles, cracks, and hatches into a duckling that waddles off (also wt animate egg) Both commands are deliberately absent from --help. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two hidden commands — deliberately absent from
--help:wt animate— 8-bit-style pixel animations in the terminal. The default is a duck paddling across a pond: four depth-shaded water layers with wave crests and highlight streaks drifting at different parallax speeds, a trailing wake, a vertical bob, an occasional blink, a lily pad riding the drift, sun and a cloud.wt animate crabplays a red crab scuttling along the beach (a nod to the Claude crab).wt animate2— the prequel: an egg on a grassy meadow wobbles, cracks, pops its top, and hatches into a duckling that waddles off flapping. Also reachable aswt animate egg.How
Each animation is a pure
frame(tick, cols)returning a pixel grid of palette keys. Rendering uses the half-block trick: every pair of pixel rows becomes one line of▀with 256-color foreground (top pixel) and background (bottom pixel), doubling vertical resolution. The player hides the cursor, redraws in place with erase-to-EOL, and restores the cursor on exit or Ctrl-C; non-tty/NO_COLORfalls back to one plain character per pixel pair.Purity keeps every frame deterministic and unit-testable.
docs/animations.mddocuments the technique plus ideas for future scenes.Tests
49 new assertions-heavy tests in
tests/animate.test.ts: grid purity/shape/width, duck visibility and leftward motion, water layering and movement, hatch-story phases, both renderers, player escape-code behavior, and e2e runs of the compiled binary (--list,--colorvsNO_COLOR, unknown names, bad flags, and both commands staying out of--help). Full suite: 94 pass.🤖 Generated with Claude Code