diff options
author | elioat <elioat@tilde.institute> | 2024-12-27 07:25:05 -0500 |
---|---|---|
committer | elioat <elioat@tilde.institute> | 2024-12-27 07:25:05 -0500 |
commit | 1ae1729728f0907ddb17e9303edad19aa2ff143c (patch) | |
tree | b7bb5082e9099890156d9e9c36866a9dc2b8ee99 /html/rogue/js/input.js | |
parent | f1268ab00394de6f751c58f825efbc905680b161 (diff) | |
download | tour-1ae1729728f0907ddb17e9303edad19aa2ff143c.tar.gz |
*
Diffstat (limited to 'html/rogue/js/input.js')
-rw-r--r-- | html/rogue/js/input.js | 19 |
1 files changed, 0 insertions, 19 deletions
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 |