ParticleEmitter constructor
ParticleEmitter({
- int maxParticles = 1024,
- double rate = 0,
- List<
EmitterBurst> bursts = const [], - double? duration,
- bool loop = false,
- ParticleRange lifespan = (1, 1),
- EmitterShape shape = const PointEmitterShape(),
- ParticleRange speed = (0, 0),
- double direction = 0,
- double spread = tau,
- Vector2? gravity,
- double drag = 0,
- ParticleRange size = (8, 8),
- ParticleRange rotation = (0, 0),
- ParticleRange spin = (0, 0),
- bool rotateToVelocity = false,
- ParticleCurve? scaleOverLife,
- ParticleCurve? opacityOverLife,
- ColorRamp? colorOverLife,
Creates an emitter preset.
Emission is continuous through rate (particles per second) and/or discrete through bursts. An emitter with only bursts finishes after the last burst has fired; an emitter with a positive rate keeps emitting until duration has passed, or forever when duration is null. With loop enabled the emission timeline restarts after duration, which must then be set.