An AI skill that turns books into animated, narrated, interactive web experiences
JavaScript ai-agentsai-educationanimationclaudeclaude-codeclaude-skillsedtecheducationinteractive-textbookscormtext-to-video
fix(skill): brow sign in the puppet kit's notes; let bake_puppets.py manage a series' pieces
yzrd89bd9b6c566
diff --git a/.claude/skills/papermorph/assets/templates/picture-book/lib/cast.js b/.claude/skills/papermorph/assets/templates/picture-book/lib/cast.jsindex 12b4592..91a375c 100644--- a/.claude/skills/papermorph/assets/templates/picture-book/lib/cast.js+++ b/.claude/skills/papermorph/assets/templates/picture-book/lib/cast.js@@ -2,7 +2,7 @@touching eyes, a mouth low on the face, mitten hands. Built at the feet (0, 0) facing us. They turn by sliding theface to one side (look -1 … 1), as that show does; the paper pieces never deform.pose(o, f): x, y, s; look (face slide), eyeX/eyeY (pupils, -1 … 1), lids (0 open … 1 shut; .55 is deadpan), shut- (blink), mouth (a Rhubarb shape or an expression below), brow (0 none, >0 angry, <0 worried), headR, bob, squash,+ (blink), mouth (a Rhubarb shape or an expression below), brow (0 none, <0 angry, >0 worried), headR, bob, squash,armL/armR (degrees, + raises outward; 0 hangs at the side), legL/legR (degrees), sit (hide legs), hold (prop key).To add a character: write another entry in SHAPES (copy `kid` and change the numbers: sx/sy the shoulder, hipX thediff --git a/.claude/skills/papermorph/references/puppets.md b/.claude/skills/papermorph/references/puppets.mdindex 7ff9acf..304ff22 100644--- a/.claude/skills/papermorph/references/puppets.md+++ b/.claude/skills/papermorph/references/puppets.md@@ -25,7 +25,7 @@ Two cast styles are on the shelf, both from the same kit: jointed storybook figu## Performance-Paper filters are expensive live. Every finished piece is baked to a bitmap: sets with `bake_sets.py` (SVG sketches) or `painted.py` (painted pictures), puppet and prop pieces with `bake_puppets.py`, which seeks every episode to its end so each piece is asked for once and writes `img/puppets/<hash>.webp` with `baked.js`. The parts that change every frame (eyes, mouths, brows, fingers) stay live. Rebake after changing any piece; a piece missing from `baked.js` is baked in the browser and costs a stall. Full-frame effects that change every frame (the flicker) live outside the SVG so the picture isn't redrawn each frame.+Paper filters are expensive live. Every finished piece is baked to a bitmap: sets with `bake_sets.py` (SVG sketches) or `painted.py` (painted pictures), puppet and prop pieces with `bake_puppets.py`, which seeks every episode to its end so each piece is asked for once and writes `img/puppets/<hash>.webp` with `baked.js`. The parts that change every frame (eyes, mouths, brows, fingers) stay live. In a series every episode's pieces share one folder: `bake_puppets.py` adds new pieces and keeps the others, and `--clean` rebakes every episode before replacing them, so leave the folder to it (a hand-written prune once deleted a published episode's pieces; git brought them back). Rebake after changing any piece; a piece missing from `baked.js` is baked in the browser and costs a stall. Full-frame effects that change every frame (the flicker) live outside the SVG so the picture isn't redrawn each frame.## Seeing your own workdiff --git a/site/joke-collection/lib/cast.js b/site/joke-collection/lib/cast.jsindex dae19be..87d0972 100644--- a/site/joke-collection/lib/cast.js+++ b/site/joke-collection/lib/cast.js@@ -2,7 +2,7 @@eyes, a mouth low on the face, mitten hands. Built at the feet (0, 0) facing us. They turn by sliding the face toone side (look -1 … 1), as that show does; the paper pieces never deform.pose(o, f): x, y, s; look (face slide), eyeX/eyeY (pupils, -1 … 1), lids (0 open … 1 shut; .55 is deadpan), shut- (blink), mouth (a Rhubarb shape or an expression below), brow (0 none, >0 angry, <0 worried), headR, bob, squash,+ (blink), mouth (a Rhubarb shape or an expression below), brow (0 none, <0 angry, >0 worried), headR, bob, squash,armL/armR (degrees, + raises outward; 0 hangs at the side), legL/legR (degrees), sit (hide legs), hold (prop key). */'use strict';// Mouths, centred on the mouth point: Rhubarb shapes A–H and X, plus expressions. They open downward, like the show's.