Getting started
A makinist video is two small files: a scene, which says what is drawn and how it moves, and a data row, which fills it in for one customer. The viewer's browser draws it live, on their own device, and they can answer it with a tap. Where no player can run, the same scene exports to MP4 or GIF.
In a page
One script and one tag. The player loads the scene, sets the row at the first frame, and plays. A tap, a click or space answers it.
<script type="module" src="https://makini.st/player.js"></script>
<makinist-player scene="https://makini.st/scenes/demo.json" data='{"name": "Zeynep", "greeting": "Merhaba"}'></makinist-player>
It draws with WebGPU where the browser has it and with Canvas 2D where it does not; the frames are the same. Images load only from images/ beside the scene, or from the directory the page names in the player's images attribute (never one the scene names), each checked against its hash; fonts come with the player. A scene can never reach the network or your files.
When a tap means something, name it in the scene (an action) and give the player a link for it; {key} in the link is that state value:
<makinist-player scene="https://makini.st/scenes/ask.json" actions='{"claim": "https://example.com/claim?code={code}"}'></makinist-player>
The player also sends a makinist-action event, with the action and the frame, for anything else.
On the command line
Install makinist with cargo install makinist, on macOS, Linux or anywhere else Rust builds. It draws with Metal on macOS and Vulkan on Linux (Mesa's lavapipe on a server); exporting needs ffmpeg.
Or, for Linux on x86_64, download it from the latest release, with its .sha256 to check it.
Then check a scene with a customer's row, and make a file of it:
makinist check renewal.json --data rows/renewal/ada.json
makinist render renewal.json --data rows/renewal/ada.json --frame 380 --out ada.png
Every command is in the CLI.
In Rust
The format, the evaluator, the renderer and both players are crates:
[dependencies]
makinist-eval = { git = "https://tangled.org/borag.tngl.sh/makinist" }
makinist-schema = { git = "https://tangled.org/borag.tngl.sh/makinist" }
makinist-schema reads and checks scenes, rows and event logs; makinist-eval turns a scene, its log and a frame number into a draw list. Both run without the standard library, so they build for any target, the browser's included.
Next
Write your own scene with the scene format, or start from a piece: every piece shows its scene and its rows, ready to copy.