fix: add frame factor calculations
Deploy to GitHub Pages / deploy (push) Failing after 1m2s

This commit is contained in:
2026-06-26 22:23:47 +05:00
parent 0928eba0e3
commit ec01e1ce56
7 changed files with 42 additions and 26 deletions
+3 -3
View File
@@ -10,9 +10,9 @@ class Particle {
this.size = S.particleSizeMin + Math.random() * (S.particleSizeMax - S.particleSizeMin);
}
update() {
this.x += this.vx;
this.y += this.vy;
this.life -= this.decay;
this.x += this.vx * frameFactor;
this.y += this.vy * frameFactor;
this.life -= this.decay * frameFactor;
this.vx *= S.particleDamping;
this.vy *= S.particleDamping;
}