From 1ae1729728f0907ddb17e9303edad19aa2ff143c Mon Sep 17 00:00:00 2001 From: elioat Date: Fri, 27 Dec 2024 07:25:05 -0500 Subject: * --- html/rogue/js/input.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 html/rogue/js/input.js (limited to 'html/rogue/js/input.js') diff --git a/html/rogue/js/input.js b/html/rogue/js/input.js deleted file mode 100644 index 047321c..0000000 --- a/html/rogue/js/input.js +++ /dev/null @@ -1,19 +0,0 @@ -const setupInputHandlers = (canvas, gameState) => { - let mouseMoveThrottle; - - canvas.addEventListener('mousemove', (e) => { - if (!mouseMoveThrottle) { - mouseMoveThrottle = setTimeout(() => { - gameState.debug.mouseX = e.clientX + gameState.camera.x; - gameState.debug.mouseY = e.clientY + gameState.camera.y; - mouseMoveThrottle = null; - }, 16); - } - }); - - window.addEventListener('keydown', (e) => { - if (e.key === 'd') { - gameState.debug.enabled = !gameState.debug.enabled; - } - }); -}; \ No newline at end of file -- cgit 1.4.1-2-gfad0