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
@@ -36,12 +36,12 @@ class Projectile {
if (this.trail.length > S.projectileTrailLength) this.trail.shift();
for (let t of this.trail) {
t.life -= S.projectileTrailDecay;
t.life -= S.projectileTrailDecay * frameFactor;
}
this.trail = this.trail.filter((t) => t.life > 0);
this.x += this.vx;
this.y += this.vy;
this.x += this.vx * frameFactor;
this.y += this.vy * frameFactor;
if (this.isHit && this.target && !this.hit) {
const dx = this.target.x - this.x;