# Infinite particles

**URL:** https://phaser.discourse.group/t/infinite-particles/3065
**Category:** Phaser 3
**Created:** [July 10, 2019, 8:15pm UTC](https://phaser.discourse.group/t/infinite-particles/3065 "2019-07-10T20:15:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Navka](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/navka/32/1018_2.png) [@Navka](https://phaser.discourse.group/u/Navka)
#### Post date: [July 10, 2019, 8:15pm UTC](https://phaser.discourse.group/t/infinite-particles/3065/1 "2019-07-10T20:15:23Z")

</div>

Hello again! I’m creating particles next way:

```
	var emitZone = new Phaser.Geom.Rectangle(0, 0, gameOptions.GAME_W, gameOptions.GAME_H);
		var particles = this.add.particles('emiter');
		var config = {
			speed: {min: -20, max: 20},
			lifespan: {max: 2000, min: 1000},
			quantity: 2,
			scale: {min: 0.1, max: 0.4},
			alpha: {start: 0.8, end: 0},
			blendMode: 'ADD',
			emitZone: {source: emitZone},
			maxParticles: 100
		};
		var emitter = particles.createEmitter(config);

```

I need to have max particles count in the same time, but `maxParticles` works for all particles at all.  
Another variant: make the particles live forever, but I can’t find infinite value in docs or examples.  
So I try get event onParticleDeath and want to re-launch dead particles, but i can’t find, how to bring them back to life.  
`emitter.onParticleDeath(function (particle, emitter) {particle.life += particle.life; particle.alpha = 0.8;}, emitter);`  
Any ideas how to have a constant number of particles on the screen or make them never die?

---

<div class="post-metadata">

### Author: ![Jake.Caron](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jake.caron/32/1841_2.png) [@Jake.Caron](https://phaser.discourse.group/u/Jake.Caron)
#### Post date: [July 11, 2019, 11:35am UTC](https://phaser.discourse.group/t/infinite-particles/3065/2 "2019-07-11T11:35:56Z")

</div>

Hey Navka, you can sort of achieve this effect by setting lifespan equal to `Number.MAX_VALUE`. Eventually your particle will die, but only after many days of your program running.

Then you can do `particles.explode(amount);`

---

<div class="post-metadata">

### Author: ![Navka](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/navka/32/1018_2.png) [@Navka](https://phaser.discourse.group/u/Navka)
#### Post date: [July 12, 2019, 7:28am UTC](https://phaser.discourse.group/t/infinite-particles/3065/3 "2019-07-12T07:28:47Z")

</div>

Oh, it’s brilliant, thanks! And tell me, what can you think of to shake particles a little from side to side?
