https://github.com/brachy84/rive_canvas
https://github.com/brachy84/rive_canvas
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/brachy84/rive_canvas
- Owner: brachy84
- License: gpl-3.0
- Created: 2021-02-09T09:42:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-02-10T17:47:02.000Z (over 4 years ago)
- Last Synced: 2025-01-27T21:32:50.505Z (4 months ago)
- Language: Dart
- Size: 77.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Rive Canvas
A package to make [rive](https://pub.dev/packages/rive) even more great
This package helps rendering Rives on a canvas directly.
It also comes with a RiveComponent for the [Flame game engine](https://pub.dev/packages/flame).## You can use rive_canvas to:
* draw (currently non animatable) rives directly on a canvas:
```dart
canvas.drawStaticRiveRect(riveFile.mainArtboard, Rect.fromLTWH(20, 150, 50, 50));
```
* draw rives as a Component in a [Flame](https://pub.dev/packages/flame) game:
```dart
class RiveGame extends BaseGame {
RiveGame() {
add(Background());
add(RiveComponent.fromPath(
'assets/rive/test.riv',
animationController: SimpleAnimation('drip')
));
}
}
```
For a more detailed example got to examples or [Github](https://github.com/brachy84/rive_canvas/blob/master/example/lib/rive_component_example.dart)
If you have issues or need help, come to [Github](https://github.com/brachy84/rive_canvas)