every-frame-is-code

agent
Guvenlik Denetimi
Basarisiz
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 7 GitHub stars
Code Basarisiz
  • process.env — Environment variable access in render/analyze.mjs
  • fs.rmSync — Destructive file system operation in render/render.mjs
  • process.env — Environment variable access in render/render.mjs
  • process.env — Environment variable access in render/still.mjs
  • exec() — Shell command execution in runtime/film.js
  • network request — Outbound network request in runtime/film.js
  • exec() — Shell command execution in runtime/inline.mjs
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Every frame is code: an Agent Skill for Claude Code, Codex and ChatGPT that makes motion graphics, 3D scenes and games in HTML/JS and renders them to MP4 frame by frame. Canvas 2D, WebGL, Three.js, GLSL, Web Audio.

README.md

motion-kit

Every frame is code. A knowledge kit that lets an AI agent make graphics with code:

videos, explainers, kinetic typography, 3D scenes and games, and then render them to MP4 on its own.

Demo film teaser: fire, engraving, 3D sphere, palette montage, pixel game, transition catalog, contact sheet, final title

Not a single generated pixel: the whole film is one HTML file that draws every frame.

▶ Watch it live in your browser · source: examples/demo/demo.html · script: examples/demo/SCRIPT.md

License: MIT
Agent Skill: Claude · Codex · ChatGPT
Canvas 2D · WebGL · Three.js · Web Audio

Why

Models can write graphics code, but without rules they produce the same screensaver every time: a dark navy background, a neon gradient, particles "for atmosphere", everything moving linearly and all at once, text on top of objects, and crossfades as the only transition.

motion-kit is a set of rules and recipes that closes those gaps. The core architectural idea: a frame is a pure function of time, draw(ctx, t). Everything else follows from it:

  • seek to any second: a frame does not depend on the previous ones;
  • frame-by-frame rendering without stutter: headless Chrome waits for every frame, however long it takes to draw;
  • one-line edits: change an easing curve or a color, re-render, and get the same film with exactly one difference;
  • sound in sync with the picture: the Web Audio score reads the same event list as the drawing code.

What's in the demo film

The one-minute film was made strictly by this kit. Each scene shows one capability in its own style:

Terminal
Typing and particles
Text types itself out, then scatters into particles. 08 · 07
Fire
Stateless fire
650 particles, sprites, additive blending, film grain. 07
Engraving
Determinism
A line draws an astrolabe, the frame rewinds and replays exactly. 01 · 04
3D sphere
3D when you need it
Three.js, bloom, ACES, 20,000 shader particles. 11
Palettes
12 styles, one composition
Cuts on the beat, accelerating toward the peak. 03 · 06
Pixel game
Game feel
Hitstop, screen shake, squash & stretch, speed ramp. 10
Transition catalog
Transitions are data
Iris, push, luma, wave, burn, whip pan. 05
Contact sheet
Checked like a director
A contact sheet and fixes by timecode. 12 · 09
Finale
CRT finale
Shader post-processing: distortion, scanlines, aberration. 07

Watch it live at kiselas.github.io/every-frame-is-code: the page draws every frame in your browser as you watch. Or open examples/demo/demo.html locally in Chrome. Click to turn on sound, space pauses, arrow keys seek.

Films of 1-3 minutes

Long films need more than good frames: a question, a through-line, chapters, callbacks, and a way to make 20-70 shots feel like one film. 14-long-form.md is the method; runtime/film.js is the machinery every long film needs (a tempo map, shots measured in bars, transitions, a HUD that carries state, statement text, counters, themes, line art and a globe, a score on the same clock, a live preview). The worked example, examples/gps/, is a 90-second explainer on how GPS finds you, in five chapters, with the error of your position as the through-line.

▶ Watch Four Clocks live in your browser · source: examples/gps/film.html · script and sources: examples/gps/SCRIPT.md

To learn from someone else's film: node render/analyze.mjs reference.mp4 out/ writes a report on its shots, pace, tempo and cuts, with contact sheets.

Quick start

motion-kit is packaged as a skill in the open Agent Skills format: a folder with a SKILL.md. The same skill works in Claude and in ChatGPT; only the install location differs.

Where How to install
Claude Code git clone https://github.com/kiselas/every-frame-is-code ~/.claude/skills/motion-kit
Codex (CLI, IDE, app) git clone https://github.com/kiselas/every-frame-is-code ~/.agents/skills/motion-kit
ChatGPT download motion-kit.zip, then Plugins → Skills → Create → Upload from computer
Claude.ai / Claude Desktop the same motion-kit.zip, then Customize → Skills → Upload

For a single project, clone into .claude/skills/motion-kit or .agents/skills/motion-kit inside the repository. The agent picks up the skill on its own when the task is about graphics or animation. To call it explicitly: /motion-kit in Claude Code, $motion-kit in Codex, @motion-kit in ChatGPT. Try:

Make a 20-second film about the history of clocks in an engraving style, 1080p, with music.
Show the plan as data first, then the code, then render it and review the contact sheet.

Rendering to MP4 needs Node, Chrome and ffmpeg, so it works where the agent has a terminal: Claude Code and Codex. In ChatGPT and Claude.ai the skill helps plan and write the film, and you render it locally with the command below.

Without skill support. Copy the folder to docs/motion/ and add this to CLAUDE.md or AGENTS.md:

Before any work on graphics, animation or games, read docs/motion/00-agent-brief.md,
then the files relevant to the task.

In a plain chat, attach 00-agent-brief.md and one or two topic files.

Rendering

cd render && npm install
node render.mjs ../film.html ../film.mp4              # the whole film with sound
node render.mjs ../film.html ../part.mp4 --from 20 --to 35 --draft   # quick preview of a fragment
node render.mjs ../film.html ../film.mp4 --profile    # where the time goes, by timecode
./contact-sheet.sh ../film.mp4 ../sheet.png           # 2 frames per second on one image

Frames are captured over CDP and rendered by several browsers in parallel: the 60 s demo renders in about 3 minutes on a laptop, and a draft of a fragment in seconds. What makes a page fast or slow to render is measured in 13-performance.md.

Requires Node 18+, Google Chrome and ffmpeg. The page must expose window.__meta, window.__draw(t) and window.__ready; details in 01-pipeline.md and render/README.md.

The full demo film (1080p, 60 fps, with sound):

node render.mjs ../examples/demo/demo.html ../examples/demo/demo.mp4

Contents

File About
00-agent-brief.md Condensed rules for the agent. The main file
01-pipeline.md Architecture: draw(t), scene timeline, determinism, buffers
02-prompting.md How to brief a task, prompt templates, phrases for revisions
03-visual-style.md Palettes, light, composition, texture, color grading
04-motion-easing.md Curves, springs, timing, animation principles, camera
05-transitions.md Transition catalog: Canvas 2D and GLSL
06-montage.md Editing: cuts, rhythm, structure, speed ramp
07-effects-cookbook.md Noise, particles, fire, smoke, glow, grain, shaders
08-kinetic-typography.md Animated text and captions for voice-over
09-audio-sync.md Music with Web Audio, offline rendering, voice-over, mixing
10-games-juice.md Game feel: controls, hitstop, screen shake, camera
11-threejs.md 3D: lighting, post-processing, shader particles
12-render-qa.md Rendering, contact sheets, review checklist
13-performance.md Fast pages and fast renders: measured costs of canvas operations, render pipeline, profiling
14-long-form.md Films of 1-3 minutes: thesis, spine, through-line, statements, chapters, callbacks, script as data
runtime/ film.js: the runtime for long films, and inline.mjs to fold a film into one file
render/ Render, contact sheets, stills, reference breakdown, beat maps (Node + Playwright + ffmpeg)
examples/demo/ Demo film: script and source
examples/gps/ Four Clocks: a 90 s explainer built on the runtime, with its script and sources
scripts/pack-skill.sh Builds motion-kit.zip for ChatGPT and Claude.ai. Releases build it automatically: just push a vX.Y.Z tag
sources.md Sources and further reading

Contributing

Pull requests are welcome: new effect recipes, transitions, prompts that worked for you (with the result), fixes to the code. When you submit a prompt, include a link to the video or its contact sheet.

License

MIT

Yorumlar (0)

Sonuc bulunamadi