Fixed an error when stopping previewing while particles are hidden (#17381)

This commit is contained in:
even
2024-07-18 10:36:50 +08:00
committed by GitHub
parent 4c61824d28
commit ccc5d49938
+1 -1
View File
@@ -140,7 +140,7 @@ export class Simulator {
const particles = this.particles;
for (let id = 0; id < particles.length; ++id) pool.put(particles[id]);
particles.length = 0;
this.renderData.resize(0, 0);
if (this.renderData) this.renderData.resize(0, 0);
}
public emitParticle (pos): void {