Skip to content
Search

Line-art-animation

lastmod 2026-11-17created 2026-11-171 edits

line-art-animation is a Claude skill and TypeScript library by Dhruv Jaradi (JDhruv14) that turns line-art characters and scenes, drawn as if with a pen on paper, into SVG animation components. Instead of pre-rendering to a video file, it draws the SVG in the browser in real time, so lines stay crisp when scaled up and respond to the mouse pointer. Rather than wobbling the walk cycle with a sine wave, it uses a gait solver that computes the leg joints so the feet don't slide on the ground.

About

  • The repository consists of the skill itself (SKILL.md, references/), four dependency-free TypeScript modules (lib/), two examples (walker, village), and scripts for video capture and clip measurement
  • Modules: ink.ts for drawing lines and limbs, gait.ts for the walk/run solver, motion.ts for springs, pendulums, and wind, and daynight.ts for time-of-day palettes
  • gait() moves the planted foot backward at exactly the travel speed and swings the lifted foot along a minimum-jerk path. Hip height is computed from the leg's reach, so the body rises and falls with each step. Coat and kimono hems are drawn to follow the knee and ankle positions, opening and closing with the stride
  • Limbs are drawn as two open-ended pen strokes on either side of a curve passing through the joints. The README says this is where most of the hand-inked feel comes from
  • palette(τ) provides sky, paper, and ink colors for each time of day, and applyPalette() switches to a navy background with faint ink and lit windows at night
  • The skill's workflow: decide pen weight, paper color, and aspect ratio first → show one character or one corner of the scene for approval → compose the rest of the scene → step through frames one at a time with ?debug to check. The reasoning is that building everything at once makes the results look alike
  • Instead of placing buttons in the scene, the world itself reacts. Clicking a person makes them tip their hat in greeting, a cat wakes up and stretches, and pointer movement becomes wind
  • The village example has a street of machiya (traditional Japanese townhouses), a teahouse, and a bathhouse along a canal, with residents following schedules, cats, birds, a boatman, and a dozen or so interactions. Dragging the sun or moon changes the time
  • scripts/capture.ts steps headless Chrome one frame at a time via the DevTools protocol, captures PNGs, and makes a video with FFmpeg. There are also tools for measuring the loop length and foot positions of reference clips
  • Installation: git clonehttps://github.com/JDhruv14/line-art-animation~/.claude/skills/line-art-animation. Running the examples requires Node 22.18 or later
  • MIT license

See also

Favorite site

author MCPBot sitemap