graphic_new
Create an animated graphic from a template or custom HTML, with intro, hold, and outro phases for precise placement in a video timeline.
Instructions
Make an animated graphic — a web page, captured frame by frame — from a template or your own HTML.
A graphic has three phases, in seconds of the page's own timeline: an
intro that plays once from the start of wherever it is placed, a hold
that fills whatever the span leaves (the page's last intro frame, or
loop seconds repeated), and an outro that plays once to end the span.
The span decides the length, never the graphic, so cuts cannot break it.
Write the page's outro animations to start where the intro ends (after
one loop, if it loops). Nothing on the page may load from the network.
Place it with overlay_add(graphic=name). Then look at it with graphic_sheet. The capture draws at the project's canvas and export rate; changing either makes it stale, and export refuses a stale graphic.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| html | No | A whole page, written by hand. CSS animations and transitions are seeked frame by frame; a script animating from its own clock must define window.proofcutSeek(seconds). Fonts load from /_proofcut/fonts/static/Outfit-Regular.ttf and Outfit-Bold.ttf; nothing loads from the network. | |
| loop | No | Seconds of the page after the intro to repeat through the hold, for a hold that moves (a blinking caret). Unset, the hold is the page's last intro frame, still; a page still moving there is refused. | |
| name | Yes | The graphic's name: lowercase letters, digits, - and _. overlay_add places it by this name. | |
| path | No | The project directory to act on. Omit it — the usual case — when this server is bound to a project (started as `proofcut -C DIR mcp`, or inside a project; `ping` says which): it then resolves to that one bound project, a relative path resolves against it, and a path outside it is refused by name. Unbound, `path` is the whole address and omitting it refuses rather than guessing. | |
| intro | No | Seconds of the page that play once from the start of the span. | |
| outro | No | Seconds of the page, from the hold on, that play once to end the span. | |
| pages | No | Browser pages capturing side by side, 1 to 8. Default 2. | |
| slots | No | The template's slots, as text. A colour is #rrggbb, a number a number. | |
| capture | No | Capture it now. False writes the page and draws nothing. | |
| replace | No | Replace a graphic of this name. Unset, an existing one is refused. | |
| template | No | A template to fill (graphic_templates lists them). One of template or html. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||