ParticleEmitterComponent constructor

ParticleEmitterComponent({
  1. required ParticleSystem system,
  2. SpriteMaterial? material,
})

Creates an emitter that drives system. When material is omitted a default SpriteMaterial (untextured, alpha-blended) is used; configure its texture, tint, and blend mode for the effect.

Implementation

factory ParticleEmitterComponent({
  required ParticleSystem system,
  SpriteMaterial? material,
}) {
  final geometry = BillboardGeometry(capacity: system.storage.capacity);
  final spriteMaterial = material ?? SpriteMaterial();
  return ParticleEmitterComponent._(system, geometry, spriteMaterial);
}