Skip to main content
S
1y ago

How to scale all assets when exporting runtime(.riv)?

We hope to perform overall scaling at a ratio of 0.3x when exporting (mainly scaling the size of image resources). Does rive now have a similar feature?

2 replies
J
J
1y ago

I was wondering the exact same thing. I drew all my characters 3X the size but most of the time I want them displayed much smaller. This would be a useful feature!

1y ago

Hi , we have a way to compress images within the editor (once you select an asset you will see the option in the inspector). This doesn't scale the image, but compresses it (scaling is not something we support at this stage, see below for context)). The compression also needs to be set on each asset manually but having some global setting for this sounds interesting. Feel free to add this to the channel.

Regarding scaling, you could make use of referenced assets, which means the image will not be exported as part of the .riv binary, and instead you can load in the image and provide it to Rive at runtime. This would allow you to pass in any image as a resource, however, if the scale/size does not match the one used at design time then it might have unexpected results in how the image is positioned/scaled compared to the original. We've chatted about exposing additional controls in the editor to fit/align an image, but no work is currently planned for this feature. However, we are working on a feature called Layout Constraints which will allow you to do a lot of this already for any component and will likely solve part of this.