Pixel-diff two .riv files
riv_visual_diffCompare two Rive files by rendering the same frame under identical conditions and generate a visual diff showing changed pixels.
Instructions
Render the same artboard/animation/time from two .riv files under identical conditions (forced to the same output size) and compute a thresholded per-pixel visual diff. Returns match rate, differing pixel count, and a diff visualization PNG (differing pixels in red, matching pixels dimmed).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out | No | Output diff PNG path (default: alongside pathA) | |
| time | No | Seconds to advance before capturing (default 0) | |
| pathA | Yes | Path to the first .riv file | |
| pathB | Yes | Path to the second .riv file | |
| width | No | ||
| height | No | ||
| artboard | No | ||
| animation | No | ||
| threshold | No | Max per-channel diff (0-255) still counted as a match (default 16) | |
| background | No | ||
| stateMachine | No |