mirror of
https://github.com/rive-app/rive-ios.git
synced 2026-01-18 17:11:28 +01:00
First steps towards supporting artboard resizing in our runtimes. This PR includes: - New Fit type `autoResizeArtboard`. After a bit of back and forth, I think this keeps the API simple. - ScaleFactor which represents a scale value to scale the artboard by in addition to resizing (only applies with `autoResizeArtboard`). This may be useful because an artboard is created at a specific width/height, but it may be deployed to platforms where it is rendered to a much smaller or larger surface/texture. Currently the default is 1.0 (no scale), however, an alternative is to have it default to something like textureSize / artboardSize so we sort of auto normalize it. - Implemented on iOS. Once this is finalzed, we can work with DevRels to implement across all runtimes. - TODO : Bubble up an event when the artboard size is changed internally by the .riv https://github.com/user-attachments/assets/20e9fdda-5c3e-4f3f-b2f5-104ff0291fbe Diffs= e71b4cc081 feat: add runtime layout fit type for ios, android, web (#8341) Co-authored-by: CI <pggordonhayes@gmail.com> Co-authored-by: David Skuza <david@rive.app> Co-authored-by: Philip Chung <philterdesign@gmail.com>
790 KiB
790 KiB