Skip to content

Commit

Permalink
refactor controls to use contro-max!
Browse files Browse the repository at this point in the history
it allows to use between mobile keyboard & gamepad consistently!
fixed double jump!
  • Loading branch information
zardoy committed Sep 19, 2023
1 parent 734ecdf commit 54d6598
Show file tree
Hide file tree
Showing 11 changed files with 291 additions and 287 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
node_modules/
package-lock.json
.vscode
public
**/public
*.log
.env.local
Thumbs.db
Expand All @@ -13,3 +13,4 @@ dist
world
out
*.iml
.vercel
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"configurations": [
// UPDATED: all configs below are misconfigured and will crash vscode, open dist/index.html and use live preview debug instead
// recommended as much faster
{
// to launch "C:\Program Files\Google\Chrome Beta\Application\chrome.exe" --remote-debugging-port=9222
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
"buffer": "^6.0.3",
"clean-webpack-plugin": "^4.0.0",
"constants-browserify": "^1.0.0",
"contro-max": "^0.1.0",
"copy-webpack-plugin": "^11.0.0",
"crypto-browserify": "^3.12.0",
"css-loader": "^6.8.1",
Expand Down
193 changes: 0 additions & 193 deletions src/botControls.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,24 +228,8 @@ class ChatBox extends LitElement {
}
})

const keyBindScrn = document.getElementById('keybinds-screen')

document.addEventListener('keypress', e => {
if (!this.inChat && activeModalStack.length === 0) {
keyBindScrn.keymaps.forEach(km => {
if (e.code === km.key) {
switch (km.defaultKey) {
case 'KeyT':
setTimeout(() => this.enableChat(), 0)
break
case 'Slash':
setTimeout(() => this.enableChat('/'), 0)
e.preventDefault()
break
}
}
})

return false
}

Expand Down
Loading

0 comments on commit 54d6598

Please sign in to comment.