Render an animation to a sprite sheet PNG
riv_render_spritesGenerate a sprite sheet PNG from a Rive animation, capturing evenly spaced frames and JSON metadata for web or game integration.
Instructions
Render N evenly-spaced frames of a .riv animation/state machine into a single grid sprite sheet PNG (columns = ceil(sqrt(N))). Writes the PNG plus a JSON metadata file (cellW/cellH/cols/rows/count/fps) alongside.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Metadata playback fps (default: count/duration) | |
| out | No | Output PNG path (default: alongside the .riv); metadata is written next to it with a .json extension | |
| path | Yes | Path to the .riv file | |
| count | No | Number of frames (default 16) | |
| width | No | ||
| height | No | ||
| artboard | No | ||
| duration | No | Seconds spanned by the frames (default: one animation loop, or 2s) | |
| animation | No | ||
| background | No | ||
| stateMachine | No |