MEDIA & DESIGN · MIT CANVAS MOTION SKILL

Stick Scene

nilbuild/stick-scene by Kamran Ahmed (MIT, commit ca84311, 334 GitHub stars / 36 forks) teaches coding agents how to author crisp, expressive stick-figure explainer animations using <stick-scene>, a zero-dependency HTML <canvas> web component (runtime/stick.js). The package bundles SKILL.md, references/craft.md choreography rules, Node preview/keyframe scripts (scripts/frames.mjs, scripts/motion.mjs), starter templates, and 64 showcase scenes.

Explore web component & motion workflow ↓

1. <stick-scene> web component, craft choreography & Node helpers

Pinned at commit ca84311, nilbuild/stick-scene splits visual direction from low-level canvas boilerplate:

  • Zero-dependency runtime (runtime/stick.js): Registers <stick-scene> as a native Web Component rendering rigged stick figures, props, speech cues, and camera pans onto <canvas>. Supports trigger modes play="view|click|hover|loop|idle", prefers-reduced-motion, and accessible label text.
  • Choreography reference (references/craft.md): Guides agents on anticipation frames, overlapping action, pacing beats, squash-and-stretch proportions, and visual clarity.
  • Authoring scripts & templates: scripts/frames.mjs and scripts/motion.mjs help validate keyframe timing and inspect motion frames, paired with templates/preview.html, templates/scene.js, examples/, and 64 showcase scenes across site/scenes/ and examples/.

For SVG/Remotion or broader visual explainer recipes, compare with Huashu Art Motion.

2. Install with npx skills & embed a scene in HTML

1. Install the skill into Claude Code, Codex, or Cursor:

npx skills add nilbuild/stick-scene

2. Drop <stick-scene> onto any static HTML or docs page:

<script type="module" src="./runtime/stick.js"></script>
<stick-scene src="./scene.js" play="view" label="Agent request lifecycle diagram"></stick-scene>

Use templates/preview.html during agent iteration so you can scrub or screenshot individual frames via scripts/frames.mjs before deploying.

3. Runtime scope & accessibility guarantees

  • Client-side only, zero network dependencies: runtime/stick.js needs no React wrapper, bundler, or external CDN calls once served alongside your page.
  • Reduced-motion & ARIA compliance: Always set a descriptive label="..." on <stick-scene> and preserve runtime/stick.js's prefers-reduced-motion handling when customizing templates/scene.js.
  • Static-export compatibility: Because the web component loads standard JS modules (scene.js), it drops cleanly into Next.js static exports, Astro, Mintlify, or plain HTML blogs.

Frequently asked questions

Does nilbuild/stick-scene require React, GSAP, or a bundler?

No. runtime/stick.js is a zero-dependency ES-module Web Component (<stick-scene>) that renders straight onto HTML <canvas> and works in plain HTML as well as static site generators.

Which playback triggers and accessibility options does <stick-scene> support?

At commit ca84311, <stick-scene> supports play="view|click|hover|loop|idle", honors prefers-reduced-motion, and accepts an ARIA label attribute for screen-reader descriptions.

How do coding agents preview and verify generated stick-figure scenes?

Agents can start from templates/preview.html and templates/scene.js and run scripts/frames.mjs and scripts/motion.mjs to check keyframe progression alongside the 64 bundled showcase scenes.

Primary sources