Warning This package is deprecated and no longer supported. Please use flame_rive instead.
Adds support for Flare animations to your Flame games.
Integrate awesome Flare animations to your Flame game.
⚠️ Flare is deprecated and no longer supported. Please consider upgrading to Rive.
Add flame_flare
as a dependency in your pubspec.yaml
file (what?).
Import the package:
import 'package:flame_flare/flame_flare.dart';
This lib exposes a set of tools to integrate a flare animation into a flame game, they are:
FlareActorAnimation
: A simple animation object that wraps aFlareActorRenderBox
.FlareActorComponent
: A Flame'sPositionComponent
sub class that receives and render aFlareActorAnimation
.FlareParticle
: A Flame'sParticle
sub class that receives and renders aFlareActorAnimation
as a particle.
class MyAnimationController extends FlareControls {
void playSomeAnimation() {
play('Some animation');
}
}
class MyAnimationComponent extends FlareActorComponent {
final MyAnimationController animationController;
MyAnimationComponent(this.animationController)
: super(
FlareActorAnimation(
'assets/my_animation.flr',
controller: animationController,
fit: BoxFit.contain,
alignment: Alignment.bottomCenter,
size: Vector2(306, 500),
),
);
}
See the example app for a slightly more complex usage.
The simplest way to show us your support is by giving the project a star.