Skip to content

Commit

Permalink
Fix error caused by particle spawning during long frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewstart committed Mar 10, 2022
1 parent c031d64 commit 005760c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Emitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ export class Emitter
particle.position.y += emitPosY;

// also, just update the particle's age properties while we are looping through
particle.age += delta;
particle.age += -this._spawnTimer;
// determine our interpolation value
let lerp = particle.age * particle.oneOverLife;// lifetime / maxLife;

Expand Down

0 comments on commit 005760c

Please sign in to comment.