Files
flame/lib/particles/curved_particle.dart
Ivan Cherepanov 0f98a8542d chore: format
fix: doc/example/particles/readme, attempt to embed webm preview
fix: doc/example/particles better sample for chaining
refactor: Particle, dropped duration support
2019-11-28 23:02:28 +03:00

20 lines
438 B
Dart

import 'package:flutter/animation.dart';
import '../particle.dart';
/// A [Particle] which applies certain [Curve] for
/// easing or other purposes to its [progress] getter.
class CurvedParticle extends Particle {
final Curve curve;
CurvedParticle({
this.curve = Curves.linear,
double lifespan,
}) : super(
lifespan: lifespan,
);
@override
double get progress => curve.transform(super.progress);
}