Render an animation to GIF
riv_render_gifRender .riv animations or state machine playback to animated GIF previews with configurable FPS, size, duration, and background for quick visual review.
Instructions
Render a .riv animation (or state machine idle playback) to an animated GIF file for preview.
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_gif"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second (default 20) | |
| path | Yes | Path to the .riv file | |
| width | No | Output width in px (default 480) | |
| outPath | No | Output GIF path (default: alongside the .riv) | |
| artboard | No | Artboard name (default: first artboard) | |
| duration | No | Seconds to render (default 2) | |
| animation | No | Animation name (default: first state machine or animation) | |
| background | No | CSS background color (default white — GIF has no alpha) | |
| stateMachine | No | State machine name (takes precedence over animation) |