From e991e996aa2ddd7f8e693bbe407df6cdce91c64f Mon Sep 17 00:00:00 2001 From: Tonyyu-1 <128781638+Tonyyu-1@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:35:28 +0800 Subject: [PATCH] Add files via upload --- src/main.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main.js b/src/main.js index 9d108af..2c4ee97 100644 --- a/src/main.js +++ b/src/main.js @@ -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) => {