From 0fad07d341ada34666cf711407b9f76616879b8f Mon Sep 17 00:00:00 2001 From: Catalin Constantin Mititiuc Date: Sat, 17 Jan 2026 10:01:13 -0800 Subject: [PATCH] Remove unused function --- html/images/space.svg | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/html/images/space.svg b/html/images/space.svg index 1a714e3..076833e 100644 --- a/html/images/space.svg +++ b/html/images/space.svg @@ -523,26 +523,6 @@ function fireBullet(position, degrees) { setTimeout(() => appended.classList.add('fade'), 1000); } -function updateBullets(elapsed) { - const deleteCount = 1; - - [...bullets].forEach((bullet, index) => { - bullet.time -= elapsed; - const x = bullet.x + 0.001 * elapsed * bullet.vx; - const y = bullet.y + 0.001 * elapsed * bullet.vy; - bulletPt.x = x; - bulletPt.y = y; - - if (bullet.time > 0 && ![...wallElements].some(w => w.isPointInFill(bulletPt))) { - [bullet.x, bullet.y] = wrapPos(x, y); - bullet.node.style.transform = `translate(${bullet.x}px, ${bullet.y}px)`; - } else { - bullet.node.remove(); - bullets.splice(index, deleteCount); - } - }); -} - function perpIntxn(baseSlope, xa, ya, xc, yc) { let isx, isy; @@ -962,16 +942,6 @@ function animate(timestamp) { } updateShip(s, elapsed); - // updateBullets(elapsed); - // console.log(bulletsContainer.children) - // console.log([...bulletsContainer.children].filter(b => !b.classList.contains('fade'))); - // const a = [...bulletsContainer.children].filter(b => !b.classList.contains('fade')).forEach(b => b.classList.add('fade')); - // console.log(bulletsContainer.children); - // console.log('before', bulletsContainer.children); - // const a = [...bulletsContainer.children].filter(b => !b.classList.contains('fade')); - // const a = [...bulletsContainer.children].filter(b => !b.classList.contains('fade')); - // a.forEach(b => b.classList.add('fade')) - // console.log('after', bulletsContainer.children); // updateEdges(position); if (drawCollisionLines) updateTriangles(position);