whiskers-art
The cat's drawing as data, with no drawing code. A mood becomes a scene: rectangles on the
15 by 16 pixel grid, in groups, each group with the motion it has (motion.rs: breathing, a tail
wag, a blink, juggling paws, rising hearts). grey.rs is the grey cat in all eleven moods and the
five mouth shapes; decor.rs is what hangs round any cat (sound waves, a thought bubble, stars,
z's, hearts, balls, a cloud with a cross).
One drawing serves two shells. The website writes a scene as SVG and plays the motions as CSS. The
app plays it in Compose from Kotlin that bin/gen-kotlin writes from this data
(src/kotlin.rs), so a drawing changed here changes there at the next build.
fixtures/frames.txt is the cat flattened at three instants in every mood; the Rust test and the
app's FramesTest both hold to it.
| Path | What |
|---|---|
src/node.rs, src/motion.rs | The drawing and its motions as data. |
src/grey.rs, src/decor.rs, src/scene.rs | The grey cat, what is round it, and a mood as a whole picture. |
src/flatten.rs | A scene at an instant as the quads it covers: the reference the app is tested against. |
src/kotlin.rs, src/bin/gen-kotlin.rs | The Kotlin writer. |
fixtures/frames.txt | The reference frames. |