Document the smallest useful API
Every public control needs a name, type, default, valid range and owner. Decide which properties the application supplies and which transitions the file manages internally. Do not expose every rig control to application code.
Make ranges explicit
Normalize values at the boundary. If progress is 0–100 in the application and 0–1 in the animation, record the conversion once. Define what happens for missing or invalid data rather than letting a character freeze unpredictably.
Version the contract
Record changes to property names and state behavior alongside the export. A renamed control can break an integration even when the artwork appears unchanged. Include a short test sequence with expected visual states.
A small starting point
export function normalizedProgress(value) {
if (!Number.isFinite(value)) return 0;
return Math.min(1, Math.max(0, value / 100));
}Before calling it done
- Record the exact runtime version and exported asset used in validation.
- Test the normal sequence, an interruption, a failed load and screen re-entry.
- Confirm the same information remains readable with reduced motion or no animation.
Use the official Rive runtime documentation for current APIs and feature support.