resetSingleParticle = (particles, i) => {
let x = Math.floor(Math.random() * width);
let y = Math.floor(Math.random() * height);
while (field[y * width + x]) {
x = Math.floor(Math.random() * width);
y = Math.floor(Math.random() * height);
}
particles.x[i] = x;
particles.y[i] = y;
}