In one sentence: Mografy can now turn data into charts with D3 and draw generative art with p5.js, and everything you need comes with the install.
This is the biggest update since we moved Mografy to npm. Two new extras, a workspace that no longer needs the internet after init, and a check that now really renders your film. Your projects and commands stay the same.
d3: charts that draw themselves
When a film needs to show a trend, a ranking, shares of a whole, a map or a network, add the d3 extra to it:
npx mografy add d3 projects/my-filmD3 does the maths it is best at: scales, chart shapes, layouts, map projections, colours and number formats. Mografy draws the result on the frame’s canvas from time, so a chart can grow, change its data and hold, and look exactly the same in the player and in the MP4.
- A ten-second tour comes with it: bars on an axis, a line that draws itself and changes data, a donut, a force network and a turning globe.
- Helpers for motion:
axisdraws axes on the canvas,trimPointsgrows a line,sweepArcsopens a pie,tweenDatamoves a chart from one set of numbers to another, andpositionsAtshows any moment of a force layout. - Your data stays in the project: put CSV, TSV or JSON in
assets/data/and read it withloadData. Change the numbers and the film updates. - Numbers in Traditional Chinese:
zhNumberwrites 12,345 as 1.2 萬.
D3 7.9.2 comes bundled at about 0.23 MB, with only the modules that compute. The ones that build web pages or run their own clock are left out on purpose, because a Mografy frame is drawn from time.
p5: sketches you can scrub
For flow fields, particles, noise landscapes and other generative art, add the p5 extra:
npx mografy add p5 projects/my-filmA normal p5.js sketch runs its own draw loop, so each frame depends on the one before. In Mografy that loop never runs. sketch() reseeds random() and calls your draw(p, t, frame) for exactly the moment Mografy asks for, so you can jump to any frame, play backwards or export with motion blur and get the same picture.
- An eight-second tour shows a flow field, ridgelines, a recursive tree and twinkling stars.
- It ships the official, unmodified p5.js 2.4.0 with its LGPL-2.1 licence.
- The Mografy Skill explains how to port an existing sketch, so you can hand your agent one you like and ask for a film.
Why “the same every time” matters
Chart libraries and sketches like randomness and clocks. Exports don’t: Mografy renders frames in parallel, out of order and in several samples for motion blur. If a frame depended on the one before it, the MP4 would flicker or differ from what you saw in the player.
Both extras are built around this, and the tests check it: each tour is drawn in order, backwards, jumping around and on a fresh page, and the pixels must match exactly.
Everything in your workspace, offline
npx mografy@latest init now fills your workspace from the npm package, with no download:
- All 43 templates go into
templates/and the 11 reference films (the intro and ten Stage loops) intoexamples/. Folders you changed are left alone. - Every extra is in the package.
npx mografy add <extra> projects/<film>copies only what that film needs and lists each file it writes, a little likeshadcn add. - If a scene imports an extra the project doesn’t have yet, the error now tells you the exact command to run.
- Films from the showcase download into a new
showcase/folder.addalso takes the folder first:npx mografy add examples/ <film>. - The player opens on your workspace, with
projects/,showcase/,examples/andtemplates/on the left, instead of opening a built-in component.
The package is about 11 MB. Showcase films are the only thing that still download, and only when you add one.
The Skill installs on its own
init no longer writes the Mografy Skill into your workspace. It prints the command instead, and the Skill installs in that folder:
- The Skill now covers d3 and p5 too: when to use a chart, how to build it in reading order, and how to keep a sketch the same on every frame.
npx skills add mografy/mografyFixes
npx mografy checknow really renders your film when the player isn’t running. Before, it could report success without drawing a frame and miss aMath.randomor an error inrenderFrame.- 3D films no longer time out on their trial render. The limit is now 60 seconds, because a Three.js film can spend about 20 seconds compiling shaders in the headless browser.
How to update
Run this in your Mografy folder. It updates Mografy and adds anything new to templates/ and examples/; your projects stay as they are.
npx mografy@latest initThen ask your agent for a chart or a sketch. The full list of changes is on the changelog.
Bring your numbers. Mografy will make them move.
Make motion with us
Join the Mografy Discord to share what you make, ask questions and help shape what we build next.