LockerGnomeTech news and nostalgia for today's technology professionals
Subscribe

Search

SoftwareFlipbook Foundrystick figuresweb fontsanimationnpmSvelteReact

Flipbook Foundry Animates Stick Figures by Swapping One Font Character for the Next 24 Times a Second

A one-star GitHub project from a maker called arbourtrary ships 93 actions, 2,614 hand-timed drawings and an MIT license, plus a font that gives any letter arms and legs.

Chris, drawn in graphite on a flip-book page, crouches beside a line of abstract text marks as a stick figure walks along it
Illustration: LockerGnome

The page’s pitch fits in one line: “An animation library where every frame is a glyph.” Install it with npm i flipbook-foundry and you get a framer-motion-style API for Svelte, React and plain JavaScript. The code is MIT and the fonts are under the SIL Open Font License.

A walk cycle shows how it works. The walk is 24 drawings, stored as 24 characters in a row, U+E000 through U+E017. To make a figure walk, the library shows the next character 24 times a second. That’s the whole animation engine: a flipbook where the pages are Unicode.

The collection is large for a font. It holds 93 actions, from locomotion and backflips to pratfalls and gestures, drawn as 2,614 hand-timed frames. Each drawing is a private-use character starting at U+E000, and every one has the same advance width, 560 units of a 1000-unit em, so swapping frames never shoves the surrounding text sideways. The skeleton behind the poses exists only at build time. The repo says the figures are “drawn on a skeleton at build time and baked into fonts.”

Walking is where figures usually slide around like they’re on ice. The repo’s answer: “Each frame ships with how far the planted foot travelled, so figures cover ground without sliding.” The baker finds which foot is bearing weight in each frame pair and locks it, and the distance that foot slid becomes that frame’s forward motion, called dx. The walk cycle carries 24 of those values, from about 15.7 to 37.1 font units, about 606 units in all. A repo script, scripts/skate.ts, reports whatever drift is left in each frame.

The second font is the strange one. Flipbook Stick Limbs, in Regular and Bold, leaves out the head and torso, and the repo says any letter in any font can be the body. That’s the page’s “Letters with legs” section: limbs attached to a letter of your choosing. The page also advertises text that “makes room” for the figures as they move.

The catch list in the repo is honest. There is one stick-figure style, and changing proportions or adding actions means editing action files and rebaking. Motion is stepped, and the docs call that both the look and the ceiling. Inline figures are hidden from screen readers, and the Page and Stage components don’t yet respect prefers-reduced-motion, though the Figure component does. Copied figures paste as empty boxes anywhere the family’s font isn’t installed. Fonts load from jsDelivr by default unless you host them yourself.

The project looks young: one star, no forks, 35 commits on main, and no releases or version number on the page. The “thousands of figures” line in an example has no benchmark behind it.

The page’s last word is a stray “Swarm!”, and nobody has yet shown the thousand-figure version.

More Software

Every Software story →