A userscript that allows EaglerCraft to run on mobile browsers. As of June 15, 2023, the Eagler Mobile script is directly integrated with the main EaglerCraft website!
APACHE-2.0 License
Eagler Mobile brings new functionality and benefits for the EaglerCraft web client by providing mobile-friendly touch controls, keyboard access, and other settings configurable through the EaglerCraft client.
[!IMPORTANT] Currently all developement is focusing on the 1.8.8 client, however functionality will be brought to previous versions soon.
The easiest way to use Eagler Mobile is to use a userscript application such as Greasemonkey, however since Eagler Mobile is plain JavaScript you can easily deploy it in other ways as well. As an example we've included eaglermobile.ef.js
which can be run as a mod on EaglerForge.
If you are hosting the EaglerCraft client on your own server, you can include the mobile script in the index.html
folder as a script.
<script type="text/javascript" src="yourDirectory/eaglermobile.user.js"></script>
Non-mobile browsers:
iOS:
Android:
If you want to download the source, no building is required. The best way to download the source is with Git:
git clone https://github.com/FlamedDogo99/EaglerMobile.git
Eagler Mobile provides a variety of mobile controls and gestures to navigate the EaglerCraft client. While many controls mimic Minecraft Pocket Edition's controls, other controls have been added to interact with Minecraft Java Edition features.
Input / Gesture | Result | Additional Details |
---|---|---|
Walk forwards | On Press: Shows strafe buttons | |
Strafe left | Hidden without walking forward | |
Strafe right | Hidden without walking forward | |
Walk left | ||
Walk right | ||
Walk backwords | ||
Jump | Double Tap: Fly | |
Crouch | On Hold: Locks button | |
Sprint | On Hold: Locks button | |
Break block | ||
Place block | ||
Select block | ||
Open inventory | ||
Drop item | ||
Scroll left | ||
Scroll Right | ||
Pause | ||
Open chat | ||
Change perspective | ||
Take screenshot | ||
Toggle coordinates | ||
Go back | ||
Toggle keyboard | ||
Short touch | Primary click | On Drag: Mouse movement |
Long touch | Secondary click | On Drag: Mouse movement |
Two finger touch | Scroll |
[!WARNING] Because Eagler Mobile does not directly inject code into the EaglerCraft client, Eagler Mobile's touch controls only work for the standard control scheme that the EaglerCraft client is set to start with. Editing the controls in the EaglerCraft client could create unintended behavior.
If you found a bug or have a suggestion create an issue after checking for duplicates.
Before contributing code, please read our contributing guidelines.
Element.prototype.requestPointerLock
, document.pointerLockElement
, and document.exitPointerLock
are replaced with vanilla JavaScript that mimics pointerlock functionality. This allows the EaglerCraft client to load.Element.prototype.requestFullscreen
, document.fullscreenElement
, and document.exitFullscreen
are replaced with vanilla JavaScript that mimics fullscreen functionality. This fixes a crash due with viewport dimensions.keydown
event listener. Because Android devices currently have an issue with keydown
and keyup
events, Eagler Mobile dynamically toggles between capturing keydown
and input
events. The state is saved in window.keyboardFix, and is toggled if a faulty keyboard event is detected.keyEvent
function, in order to maintain functionality for input
event listeners. For example, typing an uppercase h
in the chat is as simple as:
keyEvent("shift", "keydown");
keyEvent("h", "keydown");
inGame
or inMenu
class.Eagler Mobile is licensed under the terms of the Apache License, Version 2.0.
keyEvent
, wheelEvent
and mouseEvent
functions, and implenting a controllable fake cursor for menus.