use bounding boxes to optimize collision detection

This commit is contained in:
2025-01-19 14:24:19 +09:00
parent 0a4853aff9
commit e75c0d2944
10 changed files with 275 additions and 94 deletions
+5 -1
View File
@@ -81,7 +81,7 @@ export default class Game {
}
start() {
setInterval(() => this.#gameLoop(), 1)
setInterval(this.#gameLoopCall.bind(this), 1)
}
update() {
@@ -128,4 +128,8 @@ export default class Game {
}
}
}
#gameLoopCall() {
this.#gameLoop()
}
}