ParticleEmitterComponent Class
Definition¶
Namespace: Brine2D.Systems.Rendering
Component for particle emission and rendering. Lives in Brine2D.Rendering.ECS because it's rendering-specific.
public class ParticleEmitterComponent : Brine2D.ECS.Component
Inheritance System.Object → Component → ParticleEmitterComponent
| Properties | |
|---|---|
| ActiveParticles | Gets a read-only view of the active particles. Use this to query particle state for gameplay logic. |
| BlendMode | Blend mode for rendering particles. Use Additive for fire/explosions/lights. |
| ConeAngle | For Cone shape: cone angle in degrees. |
| EmissionRate | Particle emission rate (particles per second). |
| EmissionTimer | Emission timer (managed by ParticleSystem). |
| EnableTrails | Whether to enable particle trails (default: false). Trails create a "motion blur" effect by drawing fading copies behind the particle. |
| EndColor | End color of particles (lerps over lifetime). |
| EndSize | End size of particles. |
| Gravity | Gravity applied to particles (pixels/sec²). |
| InitialRotation | Initial rotation of particles in radians (default: 0). |
| InitialRotationVariation | Random variation in initial rotation (0-1, adds randomness). Value of 1.0 means full 360° random rotation. |
| InitialVelocity | Initial velocity direction and magnitude. |
| IsEmitting | Whether the emitter is currently active. |
| LifetimeVariation | Lifetime variation (0-1, adds randomness). |
| MaxParticles | Maximum number of particles. |
| ParticleAtlasRegion | Optional atlas region for particles. Takes precedence over ParticleTexture if set. Allows particles to use textures from an atlas for better batching. |
| ParticleCount | Gets the current number of active particles. |
| ParticleLifetime | Particle lifetime in seconds. |
| Particles | Active particles (managed by ParticleSystem). |
| ParticleTexture | Optional texture for particles. If null, particles render as colored circles. |
| RotationSpeed | Rotation speed in radians per second (default: 0 = no rotation). |
| RotationSpeedVariation | Random variation in rotation speed (0-1, adds randomness). |
| Shape | Shape of the emitter spawn area. |
| ShapeSize | For Box shape: width and height. For Line shape: line length (X = length). |
| SpawnOffset | Spawn offset from emitter position. |
| SpawnRadius | Spawn area radius (0 = point emitter). |
| SpeedVariation | Speed randomness multiplier (0-1). |
| StartColor | Start color of particles. |
| StartSize | Start size of particles. |
| TrailEndAlpha | Color multiplier for trail end (furthest from particle). |
| TrailLength | Number of trail segments to render behind each particle (default: 5). Higher values create longer trails but use more memory. |
| TrailStartAlpha | Color multiplier for trail start (at particle position). |
| VelocitySpread | Velocity randomness (angle in degrees). |