diff --git a/index.js b/index.js index d313922..5a3a790 100644 --- a/index.js +++ b/index.js @@ -60,7 +60,7 @@ function demoGrid(grid, renderer, number = 10) { bounceoff(canvasBound, velocity, bounds) grid.update(clients, bounds) const collided = grid.getCollisionPairs(checker, clients) - .flatMap(e => [bounds[e.b], bounds[e.b]]) + .flatMap(e => [bounds[e.a], bounds[e.b]]) grid.draw(ctx) ctx.strokeStyle = "white"