mirror of
https://github.com/flame-engine/flame.git
synced 2026-03-13 09:43:03 +08:00
This PR updates the flame_rive bridge package to support Rive 0.14.x.
This version of Rive introduces a new C++ native runtime and significant
changes to the rendering and loading APIs.
**Key Changes**
flame_rive Package
- Dependency Update: Bumped rive constraint to ^0.14.0.
- Rendering API Migration:
- Rewrote RiveArtboardRenderer to use the new Renderer class instead of
direct Canvas drawing.
- Integrated new Rive types: AABB for bounds management and Fit for
artboard scaling.
- Replaced the manual Mat2D transformation logic with the native
renderer.align() method.
- `RiveComponent` Enhancements:
- Added clipToBounds support.
- Ensured antialiasing parameter is respected using canvas.saveLayer
with isAntiAlias = false when disabled (aligning with Rive's default
behavior of having antialiasing enabled).
- Loading Logic: Updated loadArtboard to use the new File class
(formerly RiveFile) and the defaultArtboard() getter.
**Example & Documentation**
- Mandatory Initialization: Updated the example main.dart and
documentation to include RiveNative.init(), which is now required by
Rive 0.14.x.
- API Modernization: Updated the example to reflect current state
machine management (advanceAndApply) and asset loading patterns.
**Maintenance**
- Tests: Updated flame_rive_test.dart to compile with the new Rive API
(tests remain skipped as per existing project configuration).
- Changelog: Added a breaking change notice for Rive 0.14.x support.
---------
Co-authored-by: DevKage <33748002+ufrshubham@users.noreply.github.com>