Render a single frame to PNG
riv_render_frameRenders one frame from a .riv animation or state machine to PNG, returns it inline, and saves it to disk. Specify path, time, size, artboard, animation, or state machine.
Instructions
Render one frame of a .riv animation or state machine to PNG. Returns the image inline and saves it to disk.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "riv_render_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the .riv file | |
| time | No | Seconds to advance before capturing (default 0) | |
| width | No | Output width in px (default: artboard width) | |
| height | No | Output height in px (default: keeps the artboard aspect ratio) | |
| outPath | No | Output PNG path (default: alongside the .riv) | |
| artboard | No | Artboard name (default: first) | |
| animation | No | Linear animation name | |
| background | No | CSS background color (default: transparent) | |
| stateMachine | No | State machine name (takes precedence) |