Skip to main content
5d ago

Is there a tool or some other way to track differences between .riv files?

If designers rename or remove events/state machines etc. The devs are relying on magic strings to hook up those events/state machines. As the project grows it becomes difficult to rely purely on communication between the teams.

Is there a tool or API we can use to get an exhaustive list of events/state machines in the file? This also applies to event property names, artboards, etc.

I took a look at the Web (JS) API and low-level API but couldn't see anything.

If it turns out I need to parse the rive file manually and build something, could someone point me to some docs I could look at?

1 reply
4d ago

It's still WiP, but we're working on an open-source tool that does this. It basically takes a .riv and outputs a JSON with all the artboards, text runs, etc. Here's the code if you want to give it a test: https://github.com/rive-app/rive-code-generator-wip/

If you want to do it in JS, you may want to wait until we release data binding (no date yet, but soon!). Data binding allows the developers to see all events, inputs, and text in one place.