I’d like to know how to make particles with an indefinite lifespan. I tried the following config:
{
x: 0,
y: 0,
scaleX: 0.8,
scaleY: 0.8,
blendMode: 'ADD',
lifespan: false,
maxParticles: 10,
speed: {
min: 60,
max: 90
},
bounce: 0.5,
bounds: new Phaser.Geom.Rectangle(-60, -60, GAME_WIDTH+120, GAME_HEIGHT+120),
emitZone: {
type: 'random',
source: {
getRandomPoint: (vec) => {
vec.x = Math.random() * GAME_WIDTH
vec.y = Math.random() * GAME_HEIGHT
return vec
}
}
}
}
with the lifespan set to false (not documented from what i can tell). It worked, but the speed seemed to be slowing down over time. I left it running and fell asleep, and when I woke up the particles were stationary.
My desired effect is either 10 indefinite lifespan particles, but any information on how to keep a fixed number of particles could solve it sufficiently