# Particle System 2D

> Aego 0.12.5 · development; docs build `4a32b816933e02930662f6a443cb25abe6050d090c55e237cbff5c44ae9b25f8`. [Build manifest](/docs-build.json).

```
component particles.ParticleSystem2D
```

Emits visual sprites from a bounded CPU pool. World-space particles stay at their birth location when the emitter moves.

## Fields

| Name | Script name | Type | Default | Description |
|---|---|---|---|---|
| Prewarm | `Prewarm` | `float` | `0` | Seconds of bounded preparation for a looping effect, up to two. |
| Edge A | `EdgeA` | `Vec2` | `(0, 0)` | First endpoint in emitter coordinates. |
| Edge B | `EdgeB` | `Vec2` | `(1, 0)` | Second endpoint in emitter coordinates. |
| Mask | `Mask` | `Texture` | `none` | Source sprite frame. Its prepared alpha mask is independent of atlas packing. |
| Mask Threshold | `MaskThreshold` | `float` | `0.5` | Minimum source alpha used by the sprite mask, from zero to one. |
| Frames | `Frames` | `[]assetRef` | `[]` | Ordered sprite frame references for a flipbook. Missing frames are diagnosed. |
| Frame FPS | `FrameFPS` | `float` | `12` | Flipbook playback speed in frames per second. |
| Frame Loop | `FrameLoop` | `bool` | `true` | Repeat the flipbook; otherwise hold its last frame. |
| Sort Mode | `SortMode` | `enum` | `age` | Oldest first, youngest first or farthest first for each camera. |
| Reduced Motion | `ReducedMotion` | `enum` | `keep` | Keep, reduce or hide this effect when Reduce Motion is enabled. |
| Reduced Rate | `ReducedRate` | `float` | `0.3` | Fraction of births kept under the Reduce policy. |
| Drag | `Drag` | `float` | `0` | Nonnegative damping coefficient per second. |
| Noise Strength | `NoiseStrength` | `float` | `0` | Magnitude of deterministic presentation noise. |
| Noise Frequency | `NoiseFrequency` | `float` | `1` | How fast the noise field changes. |
| Kill Y Enabled | `KillYEnabled` | `bool` | `false` | Remove particles on the side of increasing Y past Kill Y. |
| Kill Y | `KillY` | `float` | `0` | Threshold in simulation space, in world units. |
| Plane Enabled | `PlaneEnabled` | `bool` | `false` | Remove particles past the configured clipping plane. |
| Plane Normal | `PlaneNormal` | `Vec2` | `(0, 1)` | Outward normal of the clipping plane in simulation space. |
| Plane Distance | `PlaneDistance` | `float` | `0` | Plane offset along its normalized normal. |
| Color Over Life | `ColorOverLife` | `[]particles.ColorKey` | `[]` | Ordered keys for the straight color multiplier at normalized ages. |
| Velocity Over Life | `VelocityOverLife` | `Curve` | `curve` | Speed multiplier by normalized age, applied without compounding. |
| Play On Start | `PlayOnStart` | `bool` | `true` | Starts the emission schedule when this emitter becomes active. |
| Loop | `Loop` | `bool` | `true` | Repeats the schedule at the end of each cycle. |
| Duration | `Duration` | `float` | `1` | Length of one emission cycle in seconds. |
| Time Domain | `TimeDomain` | `enum` | `game` | Game pauses with the world; unscaled uses real presentation time. |
| Seed | `Seed` | `int` | `0` | Nonzero locks the seed. Zero derives it from the session, stable node ID and activation. |
| Max Particles | `MaxParticles` | `int` | `64` | Maximum live particles. When full, keep living particles and drop excess births. |
| Rate | `Rate` | `float` | `8` | Continuous births per second. Zero allows manual bursts without a continuous stream. |
| Bursts | `Bursts` | `[]Vec2` | `[]` | Cycle keys as (time in seconds, birth count). Times must be in [0, duration). |
| Shape | `Shape` | `enum` | `point` | Birth positions come from a point, disk, rectangle, line segment or sprite alpha mask. |
| Offset | `Offset` | `Vec2` | `(0, 0)` | Local offset of the emitter shape. |
| Rect Size | `RectSize` | `Vec2` | `(1, 1)` | Full rectangle dimensions in world units. |
| Radius | `Radius` | `float` | `0.5` | Circle radius in world units. |
| Lifetime | `Lifetime` | `Vec2` | `(0.4, 0.7)` | Minimum and maximum particle lifetime in seconds. |
| Speed | `Speed` | `Vec2` | `(0.5, 1.5)` | Minimum and maximum initial speed in units per second. |
| Size | `Size` | `Vec2` | `(0.08, 0.16)` | Minimum and maximum starting side length in world units. |
| Rotation | `Rotation` | `Vec2` | `(0, 0)` | Minimum and maximum initial rotation in radians. |
| Direction | `Direction` | `float` | `-1.5708` | Central angle of launch in radians. |
| Spread | `Spread` | `float` | `1.5708` | Full angular width around direction, in radians. |
| Color | `Color` | `Color` | `rgba(1, 1, 1, 1)` | Straight linear tint and opacity at birth. |
| Gravity | `Gravity` | `Vec2` | `(0, 0)` | Acceleration in units per second squared. |
| Size Over Life | `SizeOverLife` | `Curve` | `curve` | Size multiplier sampled at normalized particle age. |
| Alpha Over Life | `AlphaOverLife` | `Curve` | `curve` | Opacity multiplier sampled at normalized particle age. |
| Rotation Speed | `RotationSpeed` | `float` | `0` | Angular speed in radians per second. |
| Space | `Space` | `enum` | `local` | Local particles follow the emitter; world particles keep their birth transform. |
| Sprite | `Sprite` | `Texture` | `none` | Texture region to draw. Empty uses the built-in white texture. |
| Material | `Material` | `AssetRef<material>` | `none` | Optional unlit sprite-domain material. Its shader controls the blend mode. |
| Layer | `Layer` | `int` | `0` | Painter layer shared with SpriteRenderer and Mesh2D. |
| Order | `Order` | `int` | `0` | Painter order within the layer. |

## Burst

```
func (ParticleSystem2D) Burst(count int)
```

Requests count births at the emitter. Does not start automatic emission.

## Clear

```
func (ParticleSystem2D) Clear()
```

Removes live particles without changing the emission schedule.

## Count

```
func (ParticleSystem2D) Count() int
```

Returns the current number of living particles on the emitter.

## Emitting

```
func (ParticleSystem2D) Emitting() bool
```

Reports whether automatic emission is running.

## Play

```
func (ParticleSystem2D) Play()
```

Starts automatic emission. Repeating Play while emitting does nothing.

## Playing

```
func (ParticleSystem2D) Playing() bool
```

Reports whether the schedule is running or particles remain.

## Restart

```
func (ParticleSystem2D) Restart()
```

Clears live particles and starts a new emission schedule.

## Stop

```
func (ParticleSystem2D) Stop()
```

Stops new emissions and lets live particles drain.

## StopAndClear

```
func (ParticleSystem2D) StopAndClear()
```

Stops automatic emission and immediately removes living particles.

## Completed

```
signal Completed()
```

A finite emission schedule has ended and its last particle expired. A presentation signal, not a gameplay timer.
