Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Tonyyu-1 authored Jul 9, 2024
1 parent e2e5509 commit e991e99
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1291,18 +1291,18 @@ async function main() {
};
}
// Event listeners for the buttons
document.getElementById('moveForward').addEventListener('touchstart', () => handleTouchStart('forward'));
document.getElementById('moveForward').addEventListener('touchend', () => handleTouchEnd('forward'));
document.getElementById('moveBackward').addEventListener('touchstart', () => handleTouchStart('backward'));
document.getElementById('moveBackward').addEventListener('touchend', () => handleTouchEnd('backward'));
document.getElementById('moveLeft').addEventListener('touchstart', () => handleTouchStart('left'));
document.getElementById('moveLeft').addEventListener('touchend', () => handleTouchEnd('left'));
document.getElementById('moveRight').addEventListener('touchstart', () => handleTouchStart('right'));
document.getElementById('moveRight').addEventListener('touchend', () => handleTouchEnd('right'));
document.getElementById('moveUp').addEventListener('touchstart', () => handleTouchStart('up'));
document.getElementById('moveUp').addEventListener('touchend', () => handleTouchEnd('up'));
document.getElementById('moveDown').addEventListener('touchstart', () => handleTouchStart('down'));
document.getElementById('moveDown').addEventListener('touchend', () => handleTouchEnd('down'));
document.getElementById('moveForward').addEventListener('touchstart', handleTouchStart('forward'));
document.getElementById('moveForward').addEventListener('touchend', handleTouchEnd('forward'));
document.getElementById('moveBackward').addEventListener('touchstart', handleTouchStart('backward'));
document.getElementById('moveBackward').addEventListener('touchend', handleTouchEnd('backward'));
document.getElementById('moveLeft').addEventListener('touchstart', handleTouchStart('left'));
document.getElementById('moveLeft').addEventListener('touchend', handleTouchEnd('left'));
document.getElementById('moveRight').addEventListener('touchstart', handleTouchStart('right'));
document.getElementById('moveRight').addEventListener('touchend', handleTouchEnd('right'));
document.getElementById('moveUp').addEventListener('touchstart', handleTouchStart('up'));
document.getElementById('moveUp').addEventListener('touchend', handleTouchEnd('up'));
document.getElementById('moveDown').addEventListener('touchstart', handleTouchStart('down'));
document.getElementById('moveDown').addEventListener('touchend', handleTouchEnd('down'));


const frame = async (now) => {
Expand Down

0 comments on commit e991e99

Please sign in to comment.