[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-110861":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":10,"pushedAt":35,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":15,"starSnapshotCount":15,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},110861,"mografy","zz41354899\u002Fmografy","zz41354899","Create, preview, and export Canvas motion graphics with Claude Code or Codex. Local-first and open source, with MP4, Lottie, and SVGA export.","https:\u002F\u002Fwww.mografy.app\u002Fzh-TW",null,"TypeScript",77,3,1,0,14,19,24,46,73.71,"MIT License",false,"main",true,[26,27,28,29,30,31,32,33,34],"animation","canvas","canvas2d","claude-code","codex","lottie","lottie-animation","motion-graphics","svga","2026-11-21 14:05:24","2026-11-22 12:46:43","\u003Cp align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"docs\u002Fbrand\u002Fmografy-logo-inverse.svg\">\n    \u003Cimg src=\"docs\u002Fbrand\u002Fmografy-logo.svg\" alt=\"Mografy\" width=\"460\">\n  \u003C\u002Fpicture>\n\u003C\u002Fp>\n\n# Mografy\n\n[English](README.md) | [繁體中文](README.zh-TW.md)\n\nMografy is a local Canvas animation tool for Claude Code and Codex. One shared `mografy` Skill helps the agent plan storyboards, adapt working examples, write scenes, review frames, and export the result. The browser player provides playback, scrubbing, subtitles, colors, effects, and audio controls.\n\nDescribe the animation in your agent, then watch it in `mografy dev`. The agent edits scene files; Mografy compiles and trial-renders them in Chromium before updating the player at the same time position.\n\n[![Watch the twelve-second Mografy intro](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fdocs\u002Fmedia\u002Fmografy-intro.gif)](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fraw\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fmedia\u002Fmografy-intro.mp4)\n\n[Watch the intro with audio (MP4)](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fraw\u002Frefs\u002Fheads\u002Fmain\u002Fdocs\u002Fmedia\u002Fmografy-intro.mp4).\n\n## Latest updates\n\n**2026-10-27** — [Mografy Templates](#mografy-templates): 43 free, ready-made templates for product videos, 22 native 9:16 in an editorial look and 21 16:9 in the montage look. `mografy add \u003Ctemplate...> projects\u002F\u003Cname>` starts a project from them.\n\n**2026-10-21** — Contextual music: the agent describes what each part of the film needs and an optional generator composes a score that lands on its moments; 3D layers with Three.js; a project style file (`style.md`) that fixes a project's design and motion decisions; and the shared Skill now keeps itself up to date after every install, build or update.\n\n**2026-10-20** — Edits no longer get stuck behind a stalled scene or a long review; the `mografy` command keeps working when the folder it was installed from is moved or deleted. See the [changelog](CHANGELOG.md).\n\n## Get started\n\nYou need [Node.js](https:\u002F\u002Fnodejs.org\u002F) 22.12 or later. Then run:\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy.git\ncd mografy\nnpm install -g pnpm\npnpm install\nmografy dev\n```\n\n`pnpm install` installs dependencies and then, automatically, builds Mografy, downloads the Chromium it uses for checks and exports, and puts the `mografy` command on your PATH. It ends by suggesting a few `mografy add` commands: templates to start a film from, a reference film to copy and helpers for a project. `mografy dev` opens the player with the sixteen built-in animations. If you see them, the installation works.\n\nTo check for updates, run `mografy update --check`. To install the latest commit from your branch's tracked upstream, run `mografy update` from the Mografy folder. The command checks for local changes, waits for an active export to finish, stops the active player, fast-forwards the source, runs `pnpm install` (including build, Chromium setup and launcher refresh), synchronizes the shared Skill, then restarts the same project on the same port. Refresh the browser after it restarts. Without an active player, it updates the installation without opening a project.\n\nIf your installation predates the update command, stop the player with Ctrl+C and run this once in the original Mografy checkout:\n\n```sh\ngit pull --ff-only\npnpm install\nmografy dev\n```\n\n`--check` fetches Git metadata but does not change working files, install dependencies or restart the player. Updates stop for local changes (including untracked files), missing upstreams, detached HEADs or diverged history. User projects ignored by Git stay in place. If dependency setup fails after the source update, the player stays stopped and the error lists recovery commands. Separate checkouts update independently; outside a checkout, the PATH launcher selects its installed copy.\n\n`npm install -g pnpm` installs the pnpm package manager; skip it if you already have pnpm. pnpm switches to the version Mografy pins in `package.json` by itself. If npm reports a permission error, run `sudo npm install -g pnpm`. Contributors changing Mografy itself also need `pnpm check` and `pnpm test:browser`; see [Development and architecture](#development-and-architecture).\n\n### More setup options\n\nOpen the bundled intro, or a project you already have:\n\n```sh\nmografy dev .\u002Fexamples\u002Fmografy-intro\nmografy dev .\u002Fprojects\u002Fmy-animation\n```\n\nNew animations are created in the `projects\u002F` folder. To keep them somewhere else, set `MOGRAFY_HOME` before starting the player:\n\n```sh\nexport MOGRAFY_HOME=\"$HOME\u002FAnimations\"\n```\n\nOther settings, such as the default project and the FFmpeg path, are in [configuration](docs\u002Fconfiguration.md).\n\n## Create your first animation\n\n1. Run `mografy dev` to open the player. No starter project is needed; after `pnpm install` it opens with the built-in animations.\n2. Open the repository in Codex or Claude Code and describe the animation, naming the project folder. The agent creates the project and the player switches to it. The shared Skill guides scene authoring and review.\n3. Watch the player update after each successful compile and Chromium trial render. Scrub to check timing and adjust the exposed scene controls.\n4. Run `mografy check .\u002Fprojects\u002Fmy-animation` and `mografy review .\u002Fprojects\u002Fmy-animation`, then inspect the generated images. Export from the player or CLI when ready.\n\nFor example:\n\n> Create an eight-second 9:16 animation in `projects\u002Fmy-animation`, with a native 1080 × 1920 canvas. Use the Typewriter and Logo reveal components as references. Show “Hello, Mografy.”, then reveal the logo with a teal accent. Review the actual frames and export an MP4.\n\nFor a longer sequence, ask for a storyboard first. Scene code determines the composition; the player exposes the parameters declared by that scene.\n\n## One Skill for Codex and Claude\n\nBased on the maintainer's current experience, the Claude workflow is more fully calibrated. Codex can adapt its approach to the brief and rendered results while following the shared scene contract.\n\nThe Skill lives at [`.agents\u002Fskills\u002Fmografy\u002FSKILL.md`](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002FSKILL.md), outside animation subprojects. Claude's `.claude\u002Fskills\u002Fmografy` entry links to that same folder, and [CLAUDE.md](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002FCLAUDE.md) imports it. Both hosts read one maintained copy.\n\nIts English references cover:\n\n| Reference | Use |\n| --- | --- |\n| [Project](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fproject.md) | Repository sources, architecture, and development checks |\n| [Scene authoring](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fscene-authoring.md) | Scene contract, drawing API, validation, review, and export |\n| [Built-in components](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fbuilt-in-components.md) | All sixteen working component scenes and how to adapt them |\n| [Intro](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fintro.md) | The existing twelve-second film, its source, assets, timing, and review points |\n| [Storyboards](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fstoryboard.md) | Shot planning and host-specific visual boards |\n| [Animation principles](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fanimation-principles.md) | The twelve principles applied to deterministic Canvas motion |\n| [Film architecture](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Ffilm-architecture.md) | One world, one camera and one shot table: continuity rules, shared-geometry handoffs, storyboard as code |\n| [Performance](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fperformance.md) | Slow frames versus choppy motion, what each Canvas operation costs, coordinates and units, and how `mografy check` measures both |\n| [Motion design](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fmotion-design.md) | Visual concepts, choreography, continuity, rhythm, default taste, and design review |\n| [Output](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Foutput.md) | Aspect ratios, 9:16 portrait work, export sizes and formats |\n| [Reference films](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fexamples.md) | The finished films in `examples\u002F`, what each one teaches, and how to copy one |\n| [Camera and transitions](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fcamera-transitions.md) | `cinema.ts` camera moves, transitions including sakura particle wipes, and atmosphere |\n| [CJK typography](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fcjk-typography.md) | Vertical Japanese \u002F Chinese text, CJK line breaking, and the bundled OFL fonts |\n| [Video compression](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fvideo-compression.md) | Python helper for smaller exported MP4s, quality controls, and upload-size budgets |\n\n[packages\u002Fcore\u002Fskill\u002F](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Ftree\u002Fmain\u002Fpackages\u002Fcore\u002Fskill) holds the entrypoint and references as Markdown, and `packages\u002Fcore\u002Fsrc\u002Fguide.ts` assembles them. After editing them, run `pnpm build`: it ends with `pnpm sync:skills`, which regenerates the Skill. `pnpm install` and `mografy update` build too, and `mografy dev` regenerates the Skill on start when its sources changed since the last sync (for example after a `git pull`). Animation projects receive `AGENTS.md` and `CLAUDE.md` pointers to the shared Skill.\n\n## Reference films\n\nMografy installs two kinds of reference film. The twelve-second [intro](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Ftree\u002Fmain\u002Fexamples\u002Fmografy-intro) and ten [Stage](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Ftree\u002Fmain\u002Fexamples) product UI loops (`stage-*`) are in `examples\u002F`; the player lists them under Examples. Longer films live on the website's [showcase](https:\u002F\u002Fwww.mografy.app\u002Fshowcase) instead of in the installation: the 60 s montage, the 42 s Triangulum teaser, the 71 s story film, the paper theatre explainers and character films, and [film-starter](https:\u002F\u002Fwww.mografy.app\u002Fshowcase), the twenty-second model for every multi-shot film. `mografy add` lists both; `mografy add \u003Cname> [folder]` copies an installed film or downloads a showcase film into your library to build on (`mografy add film-starter \u003Cfolder>` to start a new film). The agent reads the showcase list at [mografy.app\u002Fshowcase\u002Ffilms.json](https:\u002F\u002Fwww.mografy.app\u002Fshowcase\u002Ffilms.json) when it needs one.\n\n## Mografy Templates\n\n[Mografy Templates](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Ftree\u002Fmain\u002Ftemplates) is a free library of ready-made templates for product demo videos: opening hooks, captions, phone, desktop and laptop screens, callouts, before\u002Fafter, steps, numbers, reviews, logos, slides, end cards and transitions, all in English. Twenty-two are designed natively for 9:16 (Threads, Reels, Shorts) in an editorial look: a white printed page, black Anton headlines that rise letter by letter and one orange accent. Twenty-one are for 16:9 (landing pages, YouTube, decks; their ids end in `-wide`) in the look of the [montage](https:\u002F\u002Fwww.mografy.app\u002Fshowcase) film: night grounds, light trails and kinetic type in the Mografy spectrum. Every template plays live, with its copy editable, at [mografy.app\u002Flibrary\u002Ftemplates](https:\u002F\u002Fwww.mografy.app\u002Fen\u002Flibrary\u002Ftemplates).\n\n```sh\nmografy add hook-impact three-steps cta-endcard projects\u002Fmy-film\n```\n\nA folder that is not a project yet becomes one: `mografy add` creates it with the templates' aspect ratio and a scene that plays them in order, so `mografy dev projects\u002Fmy-film` opens a working film. Each template is a complete scene module copied to `scenes\u002Ftemplates\u002F\u003Cid>.ts` with the shared `kit.ts`, `editorial.ts` and `montage.ts`, and Inter and Anton are registered in `mografy.json`. Play one inside a film with `play(ctx, time, start, template, { ...params })`; overlay templates take `backdrop: false` to draw over the film's picture. `mografy add` lists them all, and the Skill's [templates reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Ftemplates.md) tells the agent when to use which. Maintainers: see [templates\u002FREADME.md](templates\u002FREADME.md).\n\n## Working examples\n\nThe sixteen built-in animations are authoring references as well as playable examples:\n\n- **Text and numbers:** Stagger text, Typewriter, Lower third, Count up.\n- **Brand and layout:** Pop card, Logo reveal, Social card, Follow badge.\n- **Interactions:** YouTube subscribe, AI chat, Like burst, Notification toast, Toggle switch.\n- **Indicators:** Progress bar, Pulse dots, Audio wave.\n\nReusable functions live in [components.ts](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fpackages\u002Fserver\u002Ftemplate\u002Fscenes\u002Fcomponents.ts) and [social-components.ts](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fpackages\u002Fserver\u002Ftemplate\u002Fscenes\u002Fsocial-components.ts). Each example has its own scene entry, controls, preview, and export. Source copies live under `packages\u002Fserver\u002Ftemplate\u002Fscenes\u002F`; editable installed projects live under the library's `.components\u002F{id}\u002F` directory. New projects include the reusable modules and scene entries.\n\nAll sixteen built-in component projects default to centered **9:16 portrait** previews. Their bundled thumbnails also show the full portrait canvas, so a new installation can show all sixteen previews before opening their projects. Scene edits refresh the opened project's thumbnail automatically. After changing built-in source scenes or assets, maintainers regenerate the bundled previews with `pnpm thumbnails:generate`.\n\nOptional [extras](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Ftree\u002Fmain\u002Fextras) are not installed; installation contains only the sixteen built-in components. The agent copies an extra into a project when the brief needs it: [cinema.ts](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fextras\u002Fcinema\u002Fcinema.ts) for camera moves on image plates, transitions (crossfade, dip, flash, iris, slash, whip, sakura-style particle wipes) and atmosphere, and [cjk.ts](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fextras\u002Fcjk\u002Fcjk.ts) with OFL Noto Sans \u002F Serif CJK TC subsets for vertical Japanese \u002F Chinese text and CJK line breaking. See the [camera and transition](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fcamera-transitions.md) and [CJK typography](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fcjk-typography.md) references. Add one yourself with `mografy add \u003Cextra...> [project]` (one or several at once; `mografy add` lists them with the reference films: cinema, cjk, three, music, walkthrough, stage). [stage.ts](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fextras\u002Fstage\u002Fstage.ts) makes short product UI loops — a script over state, windows and phones cropped by the frame, placeholder lines, rolling numbers and four looks; see the [UI stage reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fui-stage.md) and the `stage-*` reference films. Everyday motion helpers are built into `@mografy\u002Fruntime`: easing curves, springs, eased time windows, monotone `keys`, one film camera (`cameraPath`, `withCamera`), a shot table (`beats`), pooled layers (`layer`, `blurLayer`, `bloom`, `buffer`), shadow-based text blur (`blurText`, `blurWords`), a tempo grid, rounded surfaces and gradients.\n\nThe [component reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fbuilt-in-components.md) links every entry and explains layout, timing, local imports, and review. Ask the agent to adapt the relevant component to your project's own assets and style.\n\nThe [Mografy intro](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fexamples\u002Fmografy-intro\u002Fscenes\u002Fmain.ts) is a 1920 × 1080, twelve-second, 30fps example: code introduces the idea, a preview plays and scrubs, an external edit updates the picture, and the original logo completes the sequence. Its [reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fintro.md) documents the four beats, fonts, music, captions, and transition sampling.\n\n## Storyboards and motion direction\n\nFor example:\n\n> Create an English storyboard for a twelve-second product intro. Use the Mografy intro as a sequence reference and adapt the logo reveal and lower third components to this project's assets.\n\nThe agent writes `storyboards\u002Fstoryboard.md`, with each shot's time range, purpose, composition, assets, key poses, camera, copy\u002Faudio, transition, animation principles, and review times.\n\nCodex invokes image generation for visual panels. Claude uses Artifacts when available, otherwise saves a standalone `storyboards\u002Fstoryboard.html` preview. Plans and prompts are in English. When implementation is requested, the agent continues into scene modules and validates the actual frames.\n\nThe animation reference covers squash and stretch, anticipation, staging, straight ahead action and pose to pose, follow through and overlapping action, slow in and slow out, arcs, secondary action, timing, exaggeration, solid drawing, and appeal. Apply the principles that support each shot and its reading holds.\n\n### Project style\n\nA project can fix its own design and motion decisions in `style.md` at the project root, so every shot and later session follows them: do and don't rules, motion character, palette, type and tempo choices, composition habits and reference stills. The values themselves stay in the scene code, defined once and changed there.\n\nTell the agent when a decision should last (\"always use this teal\", \"titles always rise from below with a little overshoot\") and it records it in `style.md`, updating the value in the scene code when the decision is a value. The style takes precedence over the Skill's default design guidance, never over the scene contract, and your current request still wins. Copy `style.md` to reuse a style in another project.\n\n## Scene model\n\nA scene draws the complete picture from absolute `time`, resolved params, and prepared assets. `mografy.json` stores project settings; animation code lives in scene modules.\n\n```ts\nimport { ease, lerp, pr } from '@mografy\u002Fruntime';\nimport type { FrameContext } from '@mografy\u002Fruntime';\n\nexport const meta = { width: 1920, height: 1080, duration: 4, fps: 30, background: '#17191d' };\nexport const params = {\n  accent: { name: 'Accent', type: 'color' as const, default: '#12b5a5' },\n};\n\nexport function renderFrame(ctx: FrameContext, time: number, params: Readonly\u003CRecord\u003Cstring, unknown>>) {\n  const mografy = ctx.draw;\n  mografy.fill(String(params.accent));\n  mografy.circle(ctx.width \u002F 2, ctx.height \u002F 2, lerp(20, 160, ease.outCubic(pr(time, 0, 0.8))));\n}\n```\n\nUse `ctx.draw` for common drawing, `ctx.canvas` for native Canvas operations, and `ctx.withCanvas` or `ctx.clip` for isolated scopes. Scenes run only in the browser and must render deterministically when seeking in any order. The player and exports share the same runtime and post-processing. See the [scene-authoring reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fscene-authoring.md) for the full contract.\n\nAfter editing a scene:\n\n```sh\nmografy check .\u002Fprojects\u002Fmy-animation\nmografy review .\u002Fprojects\u002Fmy-animation\n```\n\n`check` compiles and trial-renders in real Chromium. While a player is open for that project, `check` asks the player to rebuild from disk, so the terminal and the player report the same result. `review` creates raw stills, output frames, and transition sheets under `renders\u002F`. Inspect those images for clipping, overlap, legibility, hierarchy, safe margins, reading time, and transition continuity. Review compares against a video only when you pass `--video file.mp4` or the player's last finished MP4\u002FWebM export is of the current version; an older export under `renders\u002F` is ignored.\n\nScene setup must finish within 30 seconds and the trial render within 20 seconds; each export, still or review frame has a 120-second limit. A scene that exceeds a limit (for example, an `await` in `setup` that never resolves or a loop in `renderFrame` that never ends) is reported as a scene error and the last working version keeps playing, so later edits are not blocked.\n\n## Player and exports\n\nThe Scene inspector groups Subtitles, Colors, and Controls. Only strings marked `role: 'subtitle'` appear as editable subtitles; the agent edits other copy in source. The Effects inspector provides Glow and Grain with percentage inputs, reset, and an Original\u002FWith effects comparison. Audio supports a track, volume, and beat-grid settings.\n\nThe main preview follows the authored scene's dimensions and has no orientation switch. For a new **9:16 portrait** video, ask the agent to create a native 1080 × 1920 scene with vertical layout, wrapped text, and social safe margins. The shared Skill records this requirement. An optional saved `aspectRatio` is also read by agents and the Runtime. Portrait Guides reserve conservative space for social overlays.\n\nPlayback supports Space, frame stepping with arrows, beat stepping with Shift+arrows when audio is present, Loop (`L`), Guides (`G`), and Projects (`P`).\n\nExport from the player or CLI:\n\n```sh\nmografy export .\u002Fprojects\u002Fmy-animation --format mp4\nmografy export .\u002Fprojects\u002Fmy-animation --format mp4 --codec h264\nmografy export .\u002Fprojects\u002Fmy-animation --preset fast\nmografy export .\u002Fprojects\u002Fmy-animation --preset master\nmografy export .\u002Fprojects\u002Fmy-animation --format webm\nmografy export .\u002Fprojects\u002Fmy-animation --format mp4 --orientation portrait --resolution 1080p\nmografy export .\u002Fprojects\u002Fmy-animation --format lottie -o preview.lottie.json\nmografy export .\u002Fprojects\u002Fmy-animation --format svga -o preview.svga\nmografy export .\u002Fprojects\u002Fintro .\u002Fprojects\u002Flaunch --preset share   # batch: one after another\nmografy export --all                                             # batch: every project in projects\u002F\n```\n\n**Batch export.** Name several projects, or `--all [folder]` for every project in a folder (default: your projects folder; folders starting with `_` are skipped). They export one after another with the same options, share one Chromium, and a project that fails is reported while the rest go on; Ctrl+C stops the batch and prints a summary. In the player, **Batch** next to **Export** opens the batch export dialog: tick films, choose format, encoder, resolution and frame rate (*Use less memory* is a switch), and they queue in the background; a card in the corner follows the queue while the dialog is closed, and switching projects does not stop it.\n\nFour export presets cover most needs (Encoder in the Export dialog, `--preset` on the CLI):\n\n| Preset | Output | Use it for |\n| --- | --- | --- |\n| `share` | MP4, H.264 8-bit | Any browser, Windows PCs, chat apps and social uploads |\n| `high` (default) | MP4, H.265 10-bit | Smallest file at the same look; Apple devices, Chrome and Edge with hardware decoding |\n| `fast` | MP4, hardware H.265 10-bit, GPU-drawn | Quick exports: VideoToolbox on macOS, NVIDIA NVENC, Intel Quick Sync or AMD AMF on Windows; software fallback elsewhere |\n| `master` | MOV, ProRes 422 HQ 10-bit, PCM audio | Editing in Final Cut, Premiere or DaVinci Resolve |\n\nConstant quality encodes while frames are captured, so there is no separate encoding wait; two-pass target bitrate is under Advanced settings. Audio is 48 kHz. Advanced settings also offer the shutter angle (360° by default, 180° for a film look) and ordered dithering for soft gradients. Exports work the same on macOS, Windows and Linux; the finished file names the encoder that wrote it.\n\nMP4 uses 10-bit H.265 (HEVC) video and 48 kHz AAC audio by default. In tests on a 3D paper-texture film and a 2D motion film, H.265 at the same CRF matched H.264's quality at 50–58 % of the file size and took the same time to encode (Encoder speed Slow uses x265's medium preset, which is as fast as x264's slow). The file is tagged `hvc1`, so it plays in QuickTime, Safari, iOS and Android, Chrome and Edge, and uploads to YouTube, Instagram and TikTok. Firefox and some Windows PCs play HEVC only with hardware support or the HEVC Video Extensions, so for a website `\u003Cvideo>` or files sent to unknown players choose **Encoder → Share · H.264** in the Export dialog, pass `--preset share` (or `--codec h264`), or set `\"codec\": \"h264\"` under `render` in `mografy.json`. MP4 CRF and bitrate are on the H.264 scale for both codecs. WebM uses VP9 video and Opus audio at 128 kbps, defaulting to constant quality at CRF 32 rather than the MP4 target bitrate. Both support audio, motion sampling, glow, grain, and encoding controls. Finished files are written under `renders\u002F`.\n\nWebM quality presets:\n\n| Quality | VP9 CRF | Motion samples | Encoder speed |\n| --- | --- | --- | --- |\n| Draft | 38 | 1 | Very fast |\n| Standard | 32 | 4 | Medium |\n| High | 26 | 8 | Slow |\n\nThe initial WebM draft inherits the project's motion samples and output effects; choosing a quality preset applies the values above. Draft also disables glow and grain. Lower CRF keeps more detail and usually produces larger files; higher CRF favors smaller files. Constant quality varies bitrate with scene complexity and does not guarantee a fixed size. VP9 may encode more slowly than H.264, and size savings depend on the scene and settings. CRF values are codec-specific, so compare actual outputs rather than matching MP4 and WebM numbers. Advanced settings also offer two-pass target bitrate. At equal average bitrate and duration, MP4 and WebM have similar file sizes.\n\nA local comparison of the twelve-second intro at 640 × 360, 30 fps and one motion sample produced an 852,445-byte MP4 and a 300,321-byte WebM (64.77% smaller). Total export times were 15.89 and 17.28 seconds. This compares the formats' default encoding settings, including different audio bitrates; it is not a matched-quality benchmark or a prediction for other scenes. See the [measured comparison](artifacts\u002Fwebm-export\u002Fcomparison.json).\n\nLottie and SVGA package embedded PNG frames, preserving Canvas artwork and effects without editable vector layers or audio. Lottie output is `.lottie.json`; SVGA output is compressed SVGA 2 protobuf.\n\nIf a finished video is too large, ask the shared `mografy` Skill to compress it, or run the Python helper directly (Python 3.10+, FFmpeg and ffprobe on PATH):\n\n```sh\npython3 .agents\u002Fskills\u002Fmografy\u002Fscripts\u002Fcompress-video.py .\u002Fprojects\u002Fmy-animation\u002Frenders\u002Ffilm.mp4\npython3 .agents\u002Fskills\u002Fmografy\u002Fscripts\u002Fcompress-video.py .\u002Fprojects\u002Fmy-animation\u002Frenders\u002Ffilm.mp4 --target-mb 10 -o .\u002Fprojects\u002Fmy-animation\u002Frenders\u002Ffilm-share.mp4\n```\n\nThe default writes a separate H.265 `film-compressed.mp4` using CRF 23 (H.264 scale) and retains audio; `--codec h264` writes H.264. `--target-mb` uses two passes and checks the actual decimal MB limit. Existing files are never overwritten; candidates that do not reduce size are discarded. See the [compression reference](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fmografy\u002Freferences\u002Fvideo-compression.md) for quality, resolution, dependency overrides, and result verification. The maintained script is `scripts\u002Fcompress-video.py`; `pnpm sync:skills` copies it into the shared Skill for both Codex and Claude.\n\nThe player's Export dialog offers these output sizes:\n\n| Format | Sizes |\n| --- | --- |\n| Lottie | 256 × 256 — Square; 640 × 360 — Landscape |\n| SVGA | 375 × 375 — Square; 375 × 750 — Portrait |\n| MP4 \u002F WebM landscape (16:9) | 1280 × 720 — 720p; 1920 × 1080 — 1080p |\n| MP4 \u002F WebM portrait (9:16) | 720 × 1280 — 720p; 1080 × 1920 — 1080p |\n\nMP4 and WebM start in the authored canvas orientation, with icons to switch the output orientation while retaining 720p\u002F1080p quality. A paused-frame preview shows the selected output. Each format remembers its size and Fit selection while the dialog stays open.\n\nWhen the output aspect differs from the scene, **Fit** appears for all four formats:\n\n| Fit option | Result |\n| --- | --- |\n| **Fit entire scene** (default) | Center the full artwork, filling extra space with the scene background |\n| **Fill and crop** | Fill the output, cropping the centered artwork at the edges |\n| **Adapt layout** | Give responsive scene code the output canvas dimensions so it can rearrange the composition |\n\nAll sixteen built-in components support landscape and portrait layouts. Choose **Adapt layout** when exporting a component in the other orientation. Custom scenes must use `ctx.width` and `ctx.height` to implement their own responsive layout; selecting this option alone does not rearrange fixed-coordinate artwork.\n\nOutput choices leave the main preview and saved project settings intact. Portrait video files default to `name-portrait.mp4` or `name-portrait.webm`. CLI `--orientation` and `--resolution` presets use **Fit entire scene**; `--orientation` alone defaults to 720p, and `--resolution` alone selects landscape. CLI exports without these flags use the project's render scale. Output names supplied with `-o` must be filenames or relative paths inside the project's `renders\u002F` directory.\n\nMografy exports allow up to **60 fps for MP4 and WebM** and **30 fps for Lottie and SVGA**. SVGA uses its supported rates within this limit. The player, API, CLI, and direct render functions enforce the same limits. The export dialog caps inherited video frame rates at 60 fps without changing saved settings.\n\nAfter starting a player export, the same dialog shows an animated robot, actual frame-capture progress, and elapsed time. Encoding and packaging use an indeterminate indicator. **Hide** keeps the export running and moves progress into a toast with **View** and **Cancel**; the top **Exporting** button also reopens it.\n\nCompleted MP4 and WebM videos can be played and downloaded in the dialog. **Done** dismisses the result, and **Last export** reopens it while the player retains that job. **Export** opens fresh settings. Failed or cancelled jobs offer **Settings** and, for exports started in this dialog, **Retry**.\n\nProgress also appears in the CLI. Cancel a direct CLI export with Ctrl+C, or cancel a player export through the interface or `mografy export [project] --cancel`. Cancellation cleans up temporary data before finishing.\n\n## Commands and project structure\n\n| Command | Purpose |\n| --- | --- |\n| `mografy dev [project]` | Open the player for an existing project |\n| `mografy check [project]` | Compile and trial-render |\n| `mografy check --motion [project]` | Also find jumps, hard starts and hard stops |\n| `mografy review [project] [--video file.mp4]` | Generate review images and optional video comparisons |\n| `mografy export [project] --format mp4\\|webm\\|mov\\|lottie\\|svga` or `--preset share\\|high\\|fast\\|master` | Export the animation |\n| `mografy update [--check]` | Update this source installation, or check for a newer revision |\n| `mografy stop [project]` | Stop the project's player server |\n| `mografy --help` | Show commands and supported options |\n\n`--yes` is deprecated and ignored: `mografy dev` no longer creates missing projects; ask Claude or Codex for a new animation. Use `--no-open` to start the player without opening a browser, and `--port \u003Cport>` to choose its port (default: 4173, then the next free port). For `dev`, `check`, `review`, `export`, and `stop`, omitted project paths use `MOGRAFY_PROJECT` when set, otherwise the current project or the source checkout's default project. `mografy init` without a path creates a project in the current folder.\n\n**Open only projects you trust.** A project's scene code runs in the player page with the same access as the editor, so it can edit project files and open your other projects. Opening a project from someone else is like running their script. The player listens only on `127.0.0.1` and refuses requests from other sites. The `mografy` command uses a checkout around the current folder only when `pnpm install` was run there, so a downloaded folder that imitates one cannot run its code.\n\n```text\nmografy\u002F\n  .agents\u002Fskills\u002Fmografy\u002F       Shared Skill, references, and video-compression helper\n  .claude\u002Fskills\u002Fmografy       Link to the same Skill\n  packages\u002Fserver\u002Ftemplate\u002F   Source component library and project template\n  templates\u002F                  Mografy Templates: 43 ready-made scenes for product videos\n  examples\u002Fmografy-intro\u002F      Twelve-second reference animation\n  examples\u002Fstage-*\u002F            Ten Mografy Stage product UI loops\n                               (longer reference films: mografy.app\u002Fshowcase, `mografy add \u003Cname>`)\n  projects\u002F                   Editable animation projects and installed components\n  docs\u002F                       Architecture and development status\n\nanimation-project\u002F\n  mografy.json                 Scene entry, aspectRatio, params, fonts, audio, render, review\n  scenes\u002F                     Animation code and local reusable components\n  style.md                    Optional project style rules\n  assets\u002F                     Images, fonts, and audio\n  AGENTS.md \u002F CLAUDE.md        Shared Skill pointers\n  storyboards\u002F                Written and visual planning outputs\n  renders\u002F                    Exports and review images\n  .mografy\u002F                   Managed builds and server state\n```\n\n## Development and architecture\n\n| Package | Responsibility |\n| --- | --- |\n| `core` | Settings schema, shared contracts, generated Skill guidance |\n| `runtime` | Browser scene execution, drawing, sampling, effects |\n| `render` | Compilation, Chromium hosting, exports, frame review |\n| `server` | Project write queue, atomic writes, watching, HTTP\u002FWebSocket |\n| `web` | Player and inspector |\n| `cli` | Development, validation, review, export, project creation |\n\n```sh\npnpm check\npnpm test:browser\npnpm --filter @mografy\u002Fweb dev\n```\n\nRead [architecture](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fdocs\u002Farchitecture.md) for the data flow and invariants, [status](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fdocs\u002FSTATUS.md) for completed work and remaining tasks, and [AGENTS.md](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002FAGENTS.md) before repository changes.\n\n## License\n\nMografy source code and documentation use the [MIT License](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002FLICENSE), following the [standard MIT text](https:\u002F\u002Fopensource.org\u002Flicense\u002Fmit). Package manifests declare `MIT`. Third-party dependencies and bundled assets retain their original terms; the bundled ABeeZee font uses the [SIL Open Font License](https:\u002F\u002Fgithub.com\u002Fzz41354899\u002Fmografy\u002Fblob\u002Fmain\u002Fpackages\u002Fserver\u002Ftemplate\u002Fassets\u002FOFL.txt).\n","Mografy 是一款本地优先、开源的 Canvas 动画创作工具，支持通过 Claude Code 或 Codex 等 AI 编程助手生成、预览和导出动态图形。其核心功能包括实时开发预览（基于 Chromium 渲染）、多格式导出（MP4\u002FLottie\u002FSVGA）、模板化项目启动、3D 图层（Three.js）、上下文配乐生成及统一技能（Skill）驱动的工作流。技术上采用 TypeScript 构建，强调离线可用性与开发者协作友好性。适用于快速制作产品宣传视频、社交媒体竖屏内容（9:16）、信息图动画等轻量级 motion graphics 场景，尤其适合熟悉 AI 辅助编程的前端或创意技术从业者。",2,"2026-11-24 04:39:48","CREATED_QUERY"]