Skip to content

Commit

Permalink
- set mouseinfluence to false on touchend for mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lmears committed Jun 29, 2024
1 parent 493c3ac commit 2022b69
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/js/boid-simulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ function setupEventListeners() {
}
});

document.addEventListener('touchend', () => {
mouseInfluence = false;
});

window.addEventListener('resize', () => {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
Expand Down

0 comments on commit 2022b69

Please sign in to comment.