Render an animation to APNG
riv_render_apngRender .riv animations to animated PNG (APNG) with 24-bit color and transparent backgrounds, enabling alpha transparency for GitHub READMEs and web pages.
Instructions
Render a .riv animation (or state machine playback) to an animated PNG (APNG). Unlike GIF this supports 24-bit color plus full alpha transparency, and GitHub READMEs animate it like a regular image. Frames are rendered with a transparent background by default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fps | No | Frames per second (default 20) | |
| out | No | Output path, .apng or .png (default: <name>.apng alongside the .riv) | |
| path | Yes | Path to the .riv file | |
| loops | No | Loop count (0 = infinite, default 0) | |
| width | No | Output width (default 480) | |
| height | No | ||
| artboard | No | ||
| duration | No | Seconds to render (default 2) | |
| animation | No | Animation name (default: first state machine or animation) | |
| background | No | CSS background color when transparent=false (default #ffffff) | |
| transparent | No | Render on a transparent background to keep APNG alpha (default true). Set false to composite onto 'background' | |
| stateMachine | No |