diff --git a/eaglermobile-ef.js b/eaglermobile-ef.js index 286f3bf..dc553c4 100644 --- a/eaglermobile-ef.js +++ b/eaglermobile-ef.js @@ -1,6 +1,5 @@ // eaglermobile for eaglerforge - function isMobile() { try { document.createEvent("TouchEvent"); @@ -145,4 +144,219 @@ customStyle.textContent = ` text-shadow: 0.35vh 0.35vh #000000; box-sizing: content-box; image-rendering: pixelated; - background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAUCAYAAACnOeyiAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUGVYSWZNTQAqAAAACAACARIAAwAAAAEAAQAAh2kABAAAAAEAAAAmAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAACoAMABAAAAAEAAAAUAAAAABBl8JYAAAIvaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yMDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4yPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KICAgICAgICAgPGV4aWY6Q29sb3JTcGFjZT4xPC9leGlmOkNvbG9yU3BhY2U+CiAgICAgICAgIDx0aWZmOk9yaWVudGF0aW9uPjE8L3RpZmY6T3JpZW50YXRpb24+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgp+x0mNAAAAWUlEQVQIHV2OUQrAMAhDNaX01vverXYPL1IES9ca1o99GB8moioic5Xgup/dBWZGKKUQ5syIoNbKyRiDkLoEB9ydVmuNANBF7/1nnS1VpXWORgQnH+xA/vECGrAYeIZg8CAAAAAASUVORK5CYII=) no-repeat right center, url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAAUCAYAAADIpHLKAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUGVYSWZNTQAqAAAACAACARIAAwAAAAEAAQAAh2kABAAAAAEAAAAmAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAADIoAMABAAAAAEAAAAUAAAAAMWDgdMAAAIxaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yMDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4y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OEbLYWg2s6YiHbH7AITHJilzgpAj12mgO/+Cby/1r/+FiiiXIXyIbFb/SdB6tc+U9OdPCVeO/fXQy7bJDsvADIxgWL2pJTTK7hlS87vuXqPPmlj2LvCF/q5VqfGVOzU57Yyxc3/hpP6MIP4/Qxiy4+9RH/PvDITa1dtxx/ZXEYGHbZgL/6seI/fvl59uuvvw49q2xfP9Jbnec9dxdWwuRxu51drOvvFHm9MEb//z/5Tcvd3d2wiZ04T36vUY \ No newline at end of file + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAIAAAAUCAYAAACnOeyiAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAUGVYSWZNTQAqAAAACAACARIAAwAAAAEAAQAAh2kABAAAAAEAAAAmAAAAAAADoAEAAwAAAAEAAQAAoAIABAAAAAEAAAACoAMABAAAAAEAAAAUAAAAABBl8JYAAAIvaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIgogICAgICAgICAgICB4bWxuczp0aWZmPSJodHRwOi8vbnMuYWRvYmUuY29tL3RpZmYvMS4wLyI+CiAgICAgICAgIDxleGlmOlBpeGVsWURpbWVuc2lvbj4yMDwvZXhpZjpQaXhlbFlEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOlBpeGVsWERpbWVuc2lvbj4yPC9leGlmOlBpeGVsWERpbWVuc2lvbj4KIC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Ldi7d/7W0nHoW4xiIie7l/lImr13/V5oaQbk4YDgoxd2k5sGSyOEbLYWg2s6YiHbH7AITHJilzgpAj12mgO/+Cby/1r/+FiiiXIXyIbFb/SdB6tc+U9OdPCVeO/fXQy7bJDsvADIxgWL2pJTTK7hlS87vuXqPPmlj2LvCF/q5VqfGVOzU57Yyxc3/hpP6MIP4/Qxiy4+9RH/PvDITa1dtxx/ZXEYGHbZgL/6seI/fvl59uuvvw49q2xfP9Jbnec9dxdWwuRxu51drOvvFHm9MEb//z/5Tcvd3d2wiZ04T36vUYKQZS22zeXlaOhd/U8Kz37/chA24vduYffu5s38HzUH8+KA6XQ+PxtI7L6TFGkVX55n9eV1URj8OFEcHzow8ZvcxQsO89HZ1TvzcV7xxQqH7G0icN3d3MzmZTOu+a4xNonJTqz1ZvOGIfnlSJ/wD4e3jGRd9ZBD+BT35XDbiE5yZydnW4COoBd+DPGdIxufVf3g80lNCp+PHPh4LV21CyfsnKcWbDeXm2ELR/TkwU4sdYaXGE98tvEdfHTlae5UprbmEotueINZvnJI/FM/p9cDmb/ARnw5WV5dzRQd2AR2FPSy5og5wY1FJz4cU3B6fJ4XOAm+HsgZtpWs8ZCC8Nubh5EAHxaXREKQsSTrPAJDKY6iIWBc1yTb2AcncryhEBfZ8uRf0ekorkZmB69jv/3pxk/eWTx0TjG5nh+wP9zfjzg2FXGCDw4cBN+uFuumFke4kNspr+b4YDeavLANnzVu44IdrtfCRJc93alM83KeeM7xMWp0qGmwbevRhx/+8HRe9RQrnI4N4jA/1QteGAl/5kes8pNGNc+v+Phhx7cFT1c8Qse1eGoEq3yNnYqx5J44T4dNmi7/kSnPOWdDeD5qjqHv/3xn4DsDYeB/zW/ARYhb8IkAAAAASUVORK5CYII=) no-repeat left center; + background-size: contain, cover; + outline:none; + box-shadow: none; + border: none; + + } + html, body { + height: -webkit-fill-available !important; + touch-action: pan-x pan-y; + } + `; +document.documentElement.appendChild(customStyle); + +// Lazy way to hide touch controls through CSS. +let hideButtonStyle = document.createElement("style"); +hideButtonStyle.id = "hideButtonStyle"; +hideButtonStyle.textContent = ` + #hideButton { + display: none; + }`; +document.documentElement.appendChild(hideButtonStyle); +let hideInventoryStyle = document.createElement("style"); +hideInventoryStyle.id = "hideInventoryStyle"; +hideInventoryStyle.textContent = ` + #hideInventory { + display: none; + }`; +document.documentElement.appendChild(hideInventoryStyle); + +// The canvas is created by the client after it finishes unzipping and loading. When the canvas is created, this applies any necessary event listeners +function waitForElm(selector) { + return new Promise(resolve => { + if (document.querySelector(selector)) { + return resolve(document.querySelector(selector)); + } + const observer = new MutationObserver(mutations => { + if (document.querySelector(selector)) { + observer.disconnect(); + resolve(document.querySelector(selector)); + } + }); + observer.observe(document.documentElement, { + childList: true, + subtree: true + }); + }); +} + +waitForElm('canvas').then(() => {insertCanvasElements()}); +function insertCanvasElements() { + // Translates touchmove events to mousemove events + var canvas = document.querySelector('canvas'); + canvas.addEventListener("touchmove", (e) => { + const touch = e.targetTouches[0]; // We can get away with this because every other touch event will be on different elements + + if (!previousX) { + previousX = touch.pageX; + previousY = touch.pageY; + } + e.movementX = touch.pageX - previousX; + e.movementY = touch.pageY - previousY; + var evt = window.fakelock ? new MouseEvent("mousemove", {movementX: e.movementX, movementY: e.movementY}) : new WheelEvent("wheel", {"wheelDeltaY": e.movementY}); + canvas.dispatchEvent(evt); + previousX = touch.pageX; + previousY = touch.pageY; + event.preventDefault(); + }, false); + + canvas.addEventListener("touchend", (e) => { + previousX = null; + previousY = null; + }, false) + // Adds all of the touch screen controls + // Theres probably a better way to do this but this works for now + var forwardButton = document.createElement('button'); + forwardButton.id = "hideButton" + forwardButton.textContent = "▲"; + forwardButton.style.cssText = "left:10vh;bottom:20vh;" + forwardButton.addEventListener("touchstart", function(e){keyEvent("w", "keydown")}, false); + forwardButton.addEventListener("touchend", function(e){keyEvent("w", "keyup")}, false); + forwardButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(forwardButton); + var rightButton = document.createElement('button'); + rightButton.id = "hideButton" + rightButton.textContent = "▶"; + rightButton.style.cssText = "left:20vh;bottom:10vh;" + rightButton.addEventListener("touchstart", function(e){keyEvent("d", "keydown")}, false); + rightButton.addEventListener("touchend", function(e){keyEvent("d", "keyup")}, false); + rightButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(rightButton); + var leftButton = document.createElement('button'); + leftButton.id = "hideButton" + leftButton.textContent = "◀"; + leftButton.style.cssText = "left: 0vh; bottom:10vh;" + leftButton.addEventListener("touchstart", function(e){keyEvent("a", "keydown")}, false); + leftButton.addEventListener("touchend", function(e){keyEvent("a", "keyup")}, false); + leftButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(leftButton); + var backButton = document.createElement('button'); + backButton.id = "hideButton" + backButton.textContent = "▼"; + backButton.style.cssText = "left:10vh;bottom:0vh;" + backButton.addEventListener("touchstart", function(e){keyEvent("s", "keydown")}, false); + backButton.addEventListener("touchend", function(e){keyEvent("s", "keyup")}, false); + backButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(backButton); + var jumpButton = document.createElement('button'); + jumpButton.id = "hideButton" + jumpButton.textContent = "⇧"; + jumpButton.style.cssText = "right:10vh;bottom:10vh;" + jumpButton.addEventListener("touchstart", function(e){keyEvent(" ", "keydown")}, false); + jumpButton.addEventListener("touchend", function(e){keyEvent(" ", "keyup")}, false); + jumpButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(jumpButton); + var crouchButton = document.createElement('button'); + crouchButton.id = "hideButton" + crouchButton.textContent = "⇩"; + crouchButton.style.cssText = "left:10vh;bottom:10vh;" + crouchButton.addEventListener("touchstart", function(e){shiftKey("keydown")}, false); + crouchButton.addEventListener("touchend", function(e){shiftKey("keyup")}, false); + crouchButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(crouchButton); + var inventoryButton = document.createElement('button'); + inventoryButton.id = "hideInventory" + inventoryButton.textContent = "🎒"; + inventoryButton.style.cssText = "right:0vh;bottom:0vh;" + inventoryButton.addEventListener("touchstart", function(e){ + window.inInventory = (window.fakelock != null) + keyEvent("e", "keydown"); + }, false); + inventoryButton.addEventListener("touchend", function(e){keyEvent("e", "keyup")}, false); + inventoryButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(inventoryButton); + var chatButton = document.createElement('button'); + chatButton.id = "hideButton" + chatButton.textContent = "💬"; + chatButton.style.cssText = "right:0vh;top:0vh;" + chatButton.addEventListener("touchstart", function(e){keyEvent("¿", "keydown")}, false); + chatButton.addEventListener("touchend", function(e){keyEvent("¿", "keydown")}, false); + chatButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(chatButton); + var exitButton = document.createElement('button'); + exitButton.id = "exitButton" + exitButton.textContent = "⮐"; + exitButton.style.cssText = "left:0vh;top:0vh;" + exitButton.addEventListener("touchstart", function(e){keyEvent("À", "keydown")}, false); + exitButton.addEventListener("touchend", function(e){keyEvent("À", "keyup")}, false); + exitButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(exitButton); + var hiddenInput = document.createElement('input'); + hiddenInput.id = "hiddenInput" + hiddenInput.style.cssText = "opacity:0;z-index:-99999"; + document.body.appendChild(hiddenInput); + var keyboardButton = document.createElement('button'); + keyboardButton.id = "keyboardButton" + keyboardButton.textContent = "⌨️"; + keyboardButton.style.cssText = "left:10vh;top:0vh;" + keyboardButton.addEventListener("touchstart", function(e){e.preventDefault();hiddenInput.blur()}, false); + keyboardButton.addEventListener("touchend", function(e){hiddenInput.select()}, false); + keyboardButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(keyboardButton); + var placeButton = document.createElement('button'); + placeButton.id = "hideButton" + placeButton.textContent = "⊹"; + placeButton.style.cssText = "right:0vh;bottom:20vh;" + placeButton.addEventListener("touchstart", function(e){mouseEvent(2, "mousedown", canvas)}, false); + placeButton.addEventListener("touchend", function(e){mouseEvent(2, "mouseup", canvas)}, false); + placeButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(placeButton); + var breakButton = document.createElement('button'); + breakButton.id = "hideButton" + breakButton.textContent = "🗡"; + breakButton.style.cssText = "right:10vh;bottom:20vh;" + breakButton.addEventListener("touchstart", function(e){mouseEvent(0, "mousedown", canvas)}, false); + breakButton.addEventListener("touchend", function(e){mouseEvent(0, "mouseup", canvas)}, false); + breakButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(breakButton); + var selectButton = document.createElement('button'); + selectButton.id = "hideButton" + selectButton.textContent = "⬚"; + selectButton.style.cssText = "right:20vh;bottom:20vh;" + selectButton.addEventListener("touchstart", function(e){mouseEvent(1, "mousedown", canvas)}, false); + selectButton.addEventListener("touchend", function(e){mouseEvent(1, "mouseup", canvas)}, false); + selectButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(selectButton); + var scrollUpButton = document.createElement('button'); + scrollUpButton.id = "hideButton" + scrollUpButton.textContent = "⇨"; + scrollUpButton.style.cssText = "right:0vh;bottom:30vh;" + scrollUpButton.addEventListener("touchstart", function(e){ + canvas.dispatchEvent(new WheelEvent("wheel", {"wheelDeltaY": -10})) + }, false); + scrollUpButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(scrollUpButton); + var scrollDownButton = document.createElement('button'); + scrollDownButton.id = "hideButton" + scrollDownButton.textContent = "⇦"; + scrollDownButton.style.cssText = "right:10vh;bottom:30vh;" + scrollDownButton.addEventListener("touchstart", function(e){ + canvas.dispatchEvent(new WheelEvent("wheel", {"wheelDeltaY": 10})) + }, false); + scrollDownButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(scrollDownButton); + var throwButton = document.createElement('button'); + throwButton.id = "hideButton" + throwButton.textContent = "Q"; + throwButton.style.cssText = "right:0vh;bottom:10vh;" + throwButton.addEventListener("touchstart", function(e){ + window.inInventory = (window.fakelock != null) + keyEvent("q", "keydown"); + }, false); + throwButton.addEventListener("touchend", function(e){keyEvent("q", "keyup")}, false); + throwButton.addEventListener("touchmove", function(e){e.preventDefault()}, false); + document.body.appendChild(throwButton); +}