Added the bricks (and improve the bouncing)

This commit is contained in:
2021-11-14 23:49:49 +01:00
parent 0f4a403edb
commit 7493713529
12 changed files with 303 additions and 111 deletions

View File

@ -29,13 +29,17 @@ class Board {
}
next(nextStage) {
this.loopStop();
this.resolve(nextStage);
}
loopStop() {
this.stop = true;
if (this.requestID) {
cancelAnimationFrame(this.requestID);
this.requestID = null;
}
this.ctx.clearRect(0, 0, this.w, this.h);
this.resolve(nextStage);
}
loop() {