🚧」 test(src/front): wip of the front

This commit is contained in:
yosyo
2025-09-24 13:00:31 +02:00
parent f0c764cc0c
commit a93d295789
8 changed files with 172 additions and 35 deletions

View File

@ -7,7 +7,7 @@ export default class extends Aview {
constructor()
{
super();
this.setTitle("pog or pong ? :3");
this.setTitle("pong (local match)");
this.running = true;
}
@ -67,7 +67,7 @@ export default class extends Aview {
rightPaddleY -= paddleSpeed * elapsed;
if (keys["ArrowDown"] && rightPaddleY < canvas.height - paddleHeight)
rightPaddleY += paddleSpeed * elapsed;
}
}
function getBounceVelocity(paddleY) {
const speed = ballSpeed;
@ -209,6 +209,7 @@ export default class extends Aview {
countdown = 3;
countdownTimer = performance.now();
});
requestAnimationFrame(gameLoop);
}
}