ParticleEmitter constructor

ParticleEmitter({
  1. int maxParticles = 1024,
  2. double rate = 0,
  3. List<EmitterBurst> bursts = const [],
  4. double? duration,
  5. bool loop = false,
  6. ParticleRange lifespan = (1, 1),
  7. EmitterShape shape = const PointEmitterShape(),
  8. ParticleRange speed = (0, 0),
  9. double direction = 0,
  10. double spread = tau,
  11. Vector2? gravity,
  12. double drag = 0,
  13. ParticleRange size = (8, 8),
  14. ParticleRange rotation = (0, 0),
  15. ParticleRange spin = (0, 0),
  16. bool rotateToVelocity = false,
  17. ParticleCurve? scaleOverLife,
  18. ParticleCurve? opacityOverLife,
  19. 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.