changed proxy, added eaglercraft launcher, fixed #90
@@ -310,13 +310,8 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Eaglercraft 1.5.2": {
|
||||
"path": "eaglercraft",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Eaglercraft 1.8.8 (Multiplayer Only)": {
|
||||
"path": "eaglercraftx/",
|
||||
"Eaglercraft Ampler Launcher": {
|
||||
"path": "ampler-launcher",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
@@ -566,11 +561,6 @@
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Precision Client (Eaglercraft 1.5.2)": {
|
||||
"path": "precision-client/",
|
||||
"aliases": [],
|
||||
"categories": []
|
||||
},
|
||||
"Progress Knight Quest": {
|
||||
"path": "progress-knight-quest",
|
||||
"aliases": [],
|
||||
@@ -932,7 +922,7 @@
|
||||
},
|
||||
"config": {
|
||||
"proxy": true, // proxy only works when self-hosted
|
||||
"proxyPath": "https://monkey.spfv.ro" // absolute or relative path to proxy; proxy must be set to true for this setting to have any effect.
|
||||
"proxyPath": "https://monkey.nordparrot.ro" // absolute or relative path to proxy; proxy must be set to true for this setting to have any effect.
|
||||
// if you are using VioletGG2, all you need to do set proxy to true
|
||||
// proxyPath is already set for you if you are using VioletGG2
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 59 KiB |
@@ -0,0 +1,41 @@
|
||||
# <img src=".github/assets/logo.png" alt="Ampler Logo" align="right" width="175px"> Ampler Launcher v1.2.00
|
||||
A minecraft themed launcher for Eaglercraft!<br>
|
||||
Containing some of the best clients all in one place!
|
||||
|
||||
|
||||
<img src=".github/assets/launcher.png" alt="Launcher Photo"><br>
|
||||
|
||||
<hr>
|
||||
|
||||
## Versions
|
||||
__v1.2.00__ - Updated games.<br>
|
||||
__v1.1.00__ - Updated code and optimized!<br>
|
||||
__v1.0.00__ - Main code with future updates planned!
|
||||
|
||||
<hr>
|
||||
|
||||
## Installation
|
||||
Currently just download the repository for the source code!<br>
|
||||
Future plans for an offline file may be possible!
|
||||
|
||||
<hr>
|
||||
|
||||
## Features Planned
|
||||
|
||||
<details>
|
||||
<summary>Click here to expand feature list</summary>
|
||||
|
||||
- [ ] Add Credits screen
|
||||
- [ ] Add Settings screen
|
||||
- [x] Rewrite some of the css and js
|
||||
- [ ] Organize code, and add comments
|
||||
- [ ] Add a customizable launcher selector
|
||||
- [ ] Add the servers screen
|
||||
- [ ] Fix display errors
|
||||
- [ ] Offline launcher download?
|
||||
- [ ] Implement top bar options
|
||||
</details>
|
||||
|
||||
<hr>
|
||||
|
||||
>__Finally [here](https://irv77.github.io/AmplerLauncher/) is the live version of the code!__
|
||||
@@ -0,0 +1,76 @@
|
||||
.gTabsText {
|
||||
visibility: hidden;
|
||||
}
|
||||
.sidebar {
|
||||
width: 5.5vw;
|
||||
}
|
||||
.launcherVersion {
|
||||
font-size: 1.1vw;
|
||||
}
|
||||
.sidebarOptions {
|
||||
height: 11vw;
|
||||
margin-bottom: 1.3vw;
|
||||
padding-left: 1.3vw;
|
||||
}
|
||||
.sidebarOptions.sidebarBottom {
|
||||
height: 7vw;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
#gtabs2 img, #gtabs3 img, #gtabs4 img { width: 2.8vw; }
|
||||
#gtabs5 { bottom: 10.5vw; }
|
||||
#gtabs5 img, #gtabs6 img { width: 2.2vw; padding-left: 0.4vw; }
|
||||
.username {
|
||||
right: 10vw;
|
||||
}
|
||||
.usernameText {
|
||||
font-size: 1.5vw;
|
||||
}
|
||||
.currentGame {
|
||||
font-size: 1.4vw;
|
||||
}
|
||||
.headerButtons {
|
||||
font-size: 1.2vw;
|
||||
}
|
||||
.headerButtonSelected {
|
||||
font-size: 1.2vw;
|
||||
}
|
||||
.gameHeader {
|
||||
padding: 2vw 2.5vw 1vw;
|
||||
}
|
||||
.gameLogo {
|
||||
top: 35%;
|
||||
left: 26%;
|
||||
}
|
||||
.dropdownSelector {
|
||||
width: 25vw;
|
||||
margin-left: 3vw;
|
||||
}
|
||||
.versionText {
|
||||
font-size: 1.4vw;
|
||||
}
|
||||
.dropdownOptions {
|
||||
font-size: 1.4vw;
|
||||
width: 25.5vw;
|
||||
margin-left: 3vw;
|
||||
}
|
||||
.playButton {
|
||||
width: 24.8vw;
|
||||
height: 5.6vw;
|
||||
left: 36%;
|
||||
}
|
||||
|
||||
#naerror {
|
||||
padding: 0.5rem;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
@media only screen and (max-height: 400px) {
|
||||
#screenerror {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@media only screen and (max-width: 900px) {
|
||||
#screenerror {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
*, ::after, ::before {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
display: block;
|
||||
line-height: 1.5;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
background-color: #303030;
|
||||
margin: 0;
|
||||
line-height: inherit;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
menu, ol, ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
blockquote, dd, dl, figure, h1, h2, h3, h4, h5, h6, hr, p, pre {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.bolded {
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.error {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
padding: 0.5vw 1vw;
|
||||
margin: 1vw 0.5vw;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
border-radius: 2.5vw;
|
||||
font-style: italic;
|
||||
transition: 0.3s;
|
||||
animation: drop .5s linear forwards;
|
||||
font-size: 1.5vw;
|
||||
}
|
||||
|
||||
#naerror {
|
||||
display: none;
|
||||
color: gold;
|
||||
border: gold solid 0.2vw;
|
||||
}
|
||||
|
||||
#screenerror {
|
||||
right: 35%;
|
||||
padding: 0.25vw 4vw;
|
||||
display: none;
|
||||
color: darkred;
|
||||
font-size: 1vw;
|
||||
border: red solid 0.1vw;
|
||||
}
|
||||
|
||||
.gameTabs {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mainPage {
|
||||
width: 100%;
|
||||
color: white;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.headerButtons {
|
||||
padding: 0.6vw 1.1vw;
|
||||
color: #cccccc;
|
||||
font-size: 0.95vw;
|
||||
line-height: 1.7vw;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.headerButtons:hover {
|
||||
cursor: pointer;
|
||||
color: white
|
||||
}
|
||||
|
||||
.headerButtonSelected {
|
||||
cursor: default;
|
||||
padding: 0.6vw 1.1vw;
|
||||
color: white;
|
||||
font-weight: 800;
|
||||
border-bottom: #008542 solid 0.21vw;
|
||||
font-size: 0.95vw;
|
||||
line-height: 1.7vw;
|
||||
}
|
||||
|
||||
.gameBg {
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.gameLogo {
|
||||
position: absolute;
|
||||
left: 23%;
|
||||
width: 100%;
|
||||
top: 6%;
|
||||
animation: drop .5s linear forwards;
|
||||
color: purple;
|
||||
}
|
||||
|
||||
.gameSelection {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 4.5vw;
|
||||
justify-content: space-around;
|
||||
display: flex;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.versionSelector {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
left: 1vw;
|
||||
bottom: 0;
|
||||
top: 0;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dropdownSelector {
|
||||
position: relative;
|
||||
display: flex;
|
||||
height: 4.5vw;
|
||||
width: 27vw;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
color: white;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.dropdownSelector:hover {
|
||||
cursor: pointer;
|
||||
background-color: #353535;
|
||||
}
|
||||
|
||||
.dropdownIcon {
|
||||
color: white;
|
||||
width: 1.75vw;
|
||||
}
|
||||
|
||||
.dropdownMenu {
|
||||
position: absolute;
|
||||
left: 1vw;
|
||||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
.dropdownOptions {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
height: 5vw;
|
||||
width: 27vw;
|
||||
align-items: center;
|
||||
color: white;
|
||||
background-color: #131313;
|
||||
z-index: 999;
|
||||
font-size: 1.1vw;
|
||||
}
|
||||
|
||||
.dropdownOptions:hover {
|
||||
background-color: #008542;
|
||||
}
|
||||
|
||||
.dropdownOption {
|
||||
position: absolute;
|
||||
left: 2vw;
|
||||
display: flex;
|
||||
gap: 1vw;
|
||||
}
|
||||
|
||||
.dropdownOptionText {
|
||||
display: grid;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.centeredIcon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.versionText {
|
||||
margin-right: 4.25vw;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
font-size: 1.1vw;
|
||||
}
|
||||
|
||||
.playButton {
|
||||
position: absolute;
|
||||
left: 33%;
|
||||
bottom: 0.5vw;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 21.5vw;
|
||||
height: 5vw;
|
||||
background-image: url(../images/play.png);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
||||
.playButton:hover {
|
||||
cursor: pointer;
|
||||
background-image: url(../images/play-hover.png);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.username {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 17vw;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.usernameText {
|
||||
font-size: 1.35vw;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
position: relative;
|
||||
float: left;
|
||||
height: 100vh;
|
||||
width: 18vw;
|
||||
color: white;
|
||||
background-color: #1e1e1e;
|
||||
}
|
||||
|
||||
.eaglercraftText {
|
||||
font-size: 1.1vw;
|
||||
}
|
||||
|
||||
.sidebarOptions {
|
||||
display: flex;
|
||||
height: 5vw;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 1.5vw;
|
||||
padding-left: 1.5vw;
|
||||
font-size: 1vw;
|
||||
line-height: 1.5vw;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.sidebarOptions:hover {
|
||||
cursor: pointer;
|
||||
background-color: #353535;
|
||||
}
|
||||
|
||||
.sidebarOptions.sidebarBottom {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.launcherVersion {
|
||||
position: absolute;
|
||||
bottom: 0.25vw;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding-left: 1.25vw;
|
||||
z-index: 1;
|
||||
font-size: 1.1vw;
|
||||
color: #cccccc;
|
||||
}
|
||||
.gameHeader { padding: 1.8vw 1.8vw 0;}
|
||||
|
||||
.dropdown1 {bottom: 0;}
|
||||
.dropdown2 {bottom: 5vw;}
|
||||
.dropdown3 {bottom: 0vw;}
|
||||
.dropdown4 {bottom: 5vw; }
|
||||
.dropdown5 {bottom: 10vw;}
|
||||
.dropdown6 {bottom: 15vw;}
|
||||
.dropdown7 {bottom: 20vw;}
|
||||
.dropdown8 {bottom: 0;}
|
||||
.dropdown9 {bottom: 5vw;}
|
||||
.dropdown10 {bottom: 10vw;}
|
||||
.dropdown11 {bottom: 10vw;}
|
||||
.dropdown12 {bottom: 15vw;}
|
||||
.dropdown13 {bottom: 20vw;}
|
||||
|
||||
.zoom-out {
|
||||
animation: zoomed 0.2s linear forwards;
|
||||
}
|
||||
|
||||
.currentGame {
|
||||
font-size: 1.2vw;
|
||||
}
|
||||
|
||||
#gtabs1 img {width: 3vw;}
|
||||
#gtabs2 img, #gtabs3 img, #gtabs4 img {width: 2.5vw;}
|
||||
#gtabs5 {bottom: 7.5vw;}
|
||||
#gtabs6 {bottom: 2.5vw;}
|
||||
#gtabs5 img, #gtabs6 img {width: 2vw;}
|
||||
|
||||
@keyframes drop {
|
||||
0% {
|
||||
transform: translateY(-300px) scaleY(0.9);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
5% {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
50% {
|
||||
transform: translateY(0) scaleY(1);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
65% {
|
||||
transform: translateY(-17px) scaleY(.9);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
75% {
|
||||
transform: translateY(-22px) scaleY(.9);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: translateY(0) scaleY(1);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes zoomed {
|
||||
100% {
|
||||
transform: translateY(10px) scale(0);
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 59 KiB |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 582 B |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 450 B |
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 1017 KiB |
|
After Width: | Height: | Size: 54 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 710 KiB |
|
After Width: | Height: | Size: 46 KiB |
@@ -0,0 +1,273 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ampler Launcher</title>
|
||||
<link rel="stylesheet" href="./css/style.css">
|
||||
<link rel="stylesheet" media="screen and (max-width: 1100px)" href="css/screensize.css">
|
||||
<link rel="stylesheet" media="screen and (max-height: 550px)" href="css/screensize.css">
|
||||
<link rel="shortcut icon" href="./images/logo.png" type="image/x-icon">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
|
||||
<!-- Discord-->
|
||||
<meta content="Ampler Launcher" property="og:title">
|
||||
<meta content="A minecraft themed launcher for Eaglercraft!" property="og:description">
|
||||
<meta content="https://irv77.github.io/AmplerLauncher/" property="og:url">
|
||||
<meta content="https://irv77.github.io/AmplerLauncher/images/logo.png" property="og:image">
|
||||
<meta content="#786d81" data-react-helmet="true" name="theme-color">
|
||||
</head>
|
||||
|
||||
<body style="font-family: 'Roboto', sans-serif;">
|
||||
<div id="naerror" class="error">
|
||||
<div>
|
||||
<p style="margin-left: 1vw;" class="bolded">SORRY!</p>
|
||||
<p style="color: goldenrod;">This feature hasn't been made yet.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="screenerror" class="error">
|
||||
<div>
|
||||
<p style="margin-left: 1vw;" class="bolded">ERROR!</p>
|
||||
<p>Currently this screen resolution is buggy.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sidebar" id="sidebar">
|
||||
<div id="gtabs1" class="sidebarOptions" style="gap: 1vw;" onclick="location.href='https://discord.gg/xuu8TnSY4b'">
|
||||
<img src="./images/m-discord.png"
|
||||
alt><div class="gTabsText"><p>Discord</p></div>
|
||||
</div>
|
||||
<div onclick="webedition()" id="gtabs2" style="font-weight: 700; border-left: #008542 solid 0.4vw;"
|
||||
class="sidebarOptions">
|
||||
<img src="./images/i-web.png" alt>
|
||||
<div class="gTabsText">
|
||||
<p class="eaglercraftText"> EAGLERCRAFT : </p>
|
||||
<p>Web Edition </p>
|
||||
</div>
|
||||
</div>
|
||||
<div onclick="moddededition()" id="gtabs3" class="sidebarOptions">
|
||||
<img src="./images/i-modded.png"
|
||||
alt>
|
||||
<div class="gTabsText">
|
||||
<p class="eaglercraftText"> EAGLERCRAFT : </p>
|
||||
<p>Modded Editions </p>
|
||||
</div>
|
||||
</div>
|
||||
<div onclick="eaglercontrols()" id="gtabs4" class="sidebarOptions">
|
||||
<img src="./images/i-controls.png"
|
||||
alt>
|
||||
<div class="gTabsText">
|
||||
<p class="eaglercraftText"> EAGLERCRAFT : </p>
|
||||
<p>Mobile/Controller </p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="gtabs5" class="sidebarOptions sidebarBottom" onclick="errorNA()">
|
||||
<img src="./images/m-credits.png" alt><div class="gTabsText"><p> Credits</p></div>
|
||||
</div>
|
||||
<div id="gtabs6" class="sidebarOptions sidebarBottom" onclick="errorNA()">
|
||||
<img src="./images/m-settings.png" alt><div class="gTabsText"><p> Settings</p></div>
|
||||
</div>
|
||||
<div id="gtabs9" class="launcherVersion">
|
||||
<p>v1.2.00</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainPage">
|
||||
<div id="gameheader" class="gameHeader">
|
||||
<p id="gameedition" class="currentGame bolded">EAGLERCRAFT WEB EDITION</p>
|
||||
<div id="javatabs">
|
||||
<ul class="gameTabs">
|
||||
<li id="header1" class="headerButtonSelected">Play</li>
|
||||
<li id="header2" style="display: none;" class="headerButtons" onclick="errorNA()">Mods</li>
|
||||
<li id="header3" class="headerButtons" onclick="errorNA()">FAQ</li>
|
||||
<li id="header4" class="headerButtons" onclick="errorNA()">Installations</li>
|
||||
<li id="header5" class="headerButtons" onclick="errorNA()">Skins</li>
|
||||
<li id="header6" class="headerButtons" onclick="errorNA()">Patch Notes</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="game-bg" class="gameBg" style="background-image: url(./images/web-edition.jpg);">
|
||||
<div class="gameLogo">
|
||||
<img id="game-header" src="./images/web-title.png" style="width: 40vw;"
|
||||
alt="eaglercraft">
|
||||
</div>
|
||||
</div>
|
||||
<div id="gameselection" class="gameSelection">
|
||||
<div class="versionSelector">
|
||||
<div id="drop" class="dropdownSelector" onclick="dropdowntoggle()">
|
||||
<div style="display: flex; gap: 1vw;">
|
||||
<div class="centeredIcon">
|
||||
<img id="gameicon" src="./images/m-logo1.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="versionText">
|
||||
<p id="gametitle" class="bolded">Latest release</p>
|
||||
<p id="gameversion">1.12.2-u2</p>
|
||||
</div>
|
||||
<div class="centeredIcon">
|
||||
<span id="dropdownuparrow">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24"
|
||||
viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2"
|
||||
stroke-linecap="round" stroke-linejoin="round" class="dropdownIcon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M6 9l6 6l6 -6" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdn" class="dropdownMenu" style="visibility: hidden;">
|
||||
<div id="dropdown13" class="dropdownOptions dropdown13" onclick="latestrelease(); dropdowntoggle();">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo1.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Latest release</p>
|
||||
<p>1.12.2-u2</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown12" class="dropdownOptions dropdown12" onclick="latestreleasewasm(); dropdowntoggle();">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo1.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Latest release WASM</p>
|
||||
<p>1.12.2-u2-wasm</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown11" class="dropdownOptions dropdown11" onclick="previousrelease(); dropdowntoggle();">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo2.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Previous release</p>
|
||||
<p>1.8.8-u50</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown10" class="dropdownOptions dropdown10" onclick="dogomobile(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo10.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">FlamedDogo's Mobile UI</p>
|
||||
<p>1.8.8-v3.0.5b</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown9" class="dropdownOptions dropdown9" onclick="redmobile(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo9.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Red's Mobile UI</p>
|
||||
<p>1.8.8-v1.40</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown8" class="dropdownOptions dropdown8" onclick="redcontroller(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo8.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Red's Controller Support</p>
|
||||
<p>1.8.8-v1.1</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown7" class="dropdownOptions dropdown7" onclick="astraclient(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo7.png" style="width: 2.5vw;">
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Astra Client</p>
|
||||
<p>1.8.8-v1.5</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown6" class="dropdownOptions dropdown6" onclick="starlike(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo6.png" style="width: 2.5vw;">
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Starlike</p>
|
||||
<p>1.8.8-v0.3.1</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown5" class="dropdownOptions dropdown5" onclick="eaglerforge(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo5.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Eaglerforge</p>
|
||||
<p>1.8.8-v1.3.2</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown4" class="dropdownOptions dropdown4" onclick="resentclient(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo4.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Resent Client</p>
|
||||
<p>1.8.8-v4.0.p4</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown3" class="dropdownOptions dropdown3" onclick="shadowclient(); dropdowntoggle();" style="display: none;">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo3.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Shadow Client</p>
|
||||
<p>1.8.8-v4.5-u34</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown2" class="dropdownOptions dropdown2" onclick="previousreleasewasm(); dropdowntoggle();">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo2.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Previous release WASM</p>
|
||||
<p>1.8.8-u50-wasm</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="dropdown1" class="dropdownOptions dropdown1" onclick="olderrelease(); dropdowntoggle();">
|
||||
<div class="dropdownOption">
|
||||
<div class="centeredIcon">
|
||||
<img src="./images/m-logo11.png" style="width: 2.5vw;" />
|
||||
</div>
|
||||
<div class="dropdownOptionText">
|
||||
<p class="bolded">Older release</p>
|
||||
<p>1.5.2-sp2.01</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="playbutton" href="mc/1.12.2"><div id="mainbutton" class="playButton"></div></a>
|
||||
<div class="username centeredIcon bolded">
|
||||
<p class="usernameText">Generic User</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="./js/index.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,219 @@
|
||||
function errorNA() {
|
||||
clearTimeout()
|
||||
document.getElementById('naerror').style.display = 'block';
|
||||
setTimeout(function(){
|
||||
document.getElementById('naerror').classList.add('zoom-out');
|
||||
}, 3000);
|
||||
setTimeout(function(){
|
||||
document.getElementById('naerror').classList.remove('zoom-out');
|
||||
document.getElementById('naerror').style.display = 'none';
|
||||
}, 3200);
|
||||
}
|
||||
|
||||
function webedition(){
|
||||
resetSelected();
|
||||
resetDefault()
|
||||
document.getElementById('game-bg').style.backgroundImage = 'url(./images/web-edition.jpg)';
|
||||
document.getElementById('game-header').src = './images/web-title.png';
|
||||
document.getElementById('gameedition').innerHTML = 'EAGLERCRAFT WEB EDITION';
|
||||
document.getElementById('header2').style.display = 'none';
|
||||
document.getElementById('header3').style.display = 'block';
|
||||
document.getElementById('header4').style.display = 'block';
|
||||
document.getElementById('header5').style.display = 'block';
|
||||
document.getElementById('header6').style.display = 'block';
|
||||
document.getElementById('gtabs2').style.fontWeight = '700';
|
||||
document.getElementById('gtabs2').style.borderLeft = '#008542 solid 4px';
|
||||
document.getElementById('dropdown1').style.display = 'flex';
|
||||
document.getElementById('dropdown2').style.display = 'flex';
|
||||
document.getElementById('dropdown11').style.display = 'flex';
|
||||
document.getElementById('dropdown12').style.display = 'flex';
|
||||
document.getElementById('dropdown13').style.display = 'flex';
|
||||
latestrelease()
|
||||
}
|
||||
function moddededition(){
|
||||
resetSelected();
|
||||
resetDefault()
|
||||
document.getElementById('game-bg').style.backgroundImage = 'url(./images/modded-edition.jpg)';
|
||||
document.getElementById('game-header').src = './images/modded-title.png';
|
||||
document.getElementById('gameedition').innerHTML = 'EAGLERCRAFT MODDED';
|
||||
document.getElementById('header2').style.display = 'block';
|
||||
document.getElementById('header3').style.display = 'block';
|
||||
document.getElementById('header4').style.display = 'block';
|
||||
document.getElementById('header5').style.display = 'none';
|
||||
document.getElementById('header6').style.display = 'block';
|
||||
document.getElementById('gtabs3').style.fontWeight = '700';
|
||||
document.getElementById('gtabs3').style.borderLeft = '#008542 solid 4px';
|
||||
document.getElementById('dropdown3').style.display = 'flex';
|
||||
document.getElementById('dropdown4').style.display = 'flex';
|
||||
document.getElementById('dropdown5').style.display = 'flex';
|
||||
document.getElementById('dropdown6').style.display = 'flex';
|
||||
document.getElementById('dropdown7').style.display = 'flex';
|
||||
eaglerforge()
|
||||
}
|
||||
|
||||
function eaglercontrols(){
|
||||
resetSelected();
|
||||
resetDefault()
|
||||
document.getElementById('game-bg').style.backgroundImage = 'url(./images/controls-edition.jpg)';
|
||||
document.getElementById('game-header').src = './images/controls-title.png';
|
||||
document.getElementById('gameedition').innerHTML = 'EAGLERCRAFT MOBILE/CONTROLLER';
|
||||
document.getElementById('header2').style.display = 'none';
|
||||
document.getElementById('header3').style.display = 'block';
|
||||
document.getElementById('header4').style.display = 'block';
|
||||
document.getElementById('header5').style.display = 'none';
|
||||
document.getElementById('header6').style.display = 'block';
|
||||
document.getElementById('gtabs4').style.fontWeight = '700';
|
||||
document.getElementById('gtabs4').style.borderLeft = '#008542 solid 4px';
|
||||
document.getElementById('dropdown8').style.display = 'flex';
|
||||
document.getElementById('dropdown9').style.display = 'flex';
|
||||
document.getElementById('dropdown10').style.display = 'flex';
|
||||
dogomobile()
|
||||
}
|
||||
|
||||
function dogomobile() {
|
||||
document.getElementById('gametitle').innerHTML = "FlamedDogo's Mobile UI";
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v3.0.5b';
|
||||
document.getElementById('gameicon').src = './images/m-logo10.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.8.8/?userscript=flameddogo99-eaglermobile.js';
|
||||
}
|
||||
|
||||
function redmobile() {
|
||||
document.getElementById('gametitle').innerHTML = "Red's Mobile UI";
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v1.40';
|
||||
document.getElementById('gameicon').src = './images/m-logo9.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.8.8/?userscript=irv77-eaglercraft-mobile.js';
|
||||
}
|
||||
|
||||
function redcontroller() {
|
||||
document.getElementById('gametitle').innerHTML = "Red's Controller Support";
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v1.1';
|
||||
document.getElementById('gameicon').src = './images/m-logo8.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.8.8/?userscript=irv77-eaglerconsole.js';
|
||||
}
|
||||
|
||||
function astraclient() {
|
||||
document.getElementById('gametitle').innerHTML = 'Astra Client';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v1.5';
|
||||
document.getElementById('gameicon').src = './images/m-logo7.png';
|
||||
document.getElementById('playbutton').href = 'mc/astraclient/';
|
||||
}
|
||||
|
||||
function starlike() {
|
||||
document.getElementById('gametitle').innerHTML = 'Starlike';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v0.3.1';
|
||||
document.getElementById('gameicon').src = './images/m-logo6.png';
|
||||
document.getElementById('playbutton').href = 'mc/starlikeclient/';
|
||||
}
|
||||
|
||||
function eaglerforge() {
|
||||
document.getElementById('gametitle').innerHTML = 'Eaglerforge';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v1.3.2';
|
||||
document.getElementById('gameicon').src = './images/m-logo5.png';
|
||||
document.getElementById('playbutton').href = 'mc/eaglerforge/';
|
||||
}
|
||||
|
||||
function resentclient() {
|
||||
document.getElementById('gametitle').innerHTML = 'Resent Client';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v4.0.p4';
|
||||
document.getElementById('gameicon').src = './images/m-logo4.png';
|
||||
document.getElementById('playbutton').href = 'mc/resentclient/';
|
||||
}
|
||||
|
||||
function shadowclient() {
|
||||
document.getElementById('gametitle').innerHTML = 'Shadow Client';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-v4.5-u34';
|
||||
document.getElementById('gameicon').src = './images/m-logo3.png';
|
||||
document.getElementById('playbutton').href = 'mc/shadowclient';
|
||||
}
|
||||
|
||||
function latestrelease() {
|
||||
document.getElementById('gametitle').innerHTML = 'Latest release';
|
||||
document.getElementById('gameversion').innerHTML = '1.12.2-u2';
|
||||
document.getElementById('gameicon').src = './images/m-logo1.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.12.2/';
|
||||
}
|
||||
|
||||
function latestreleasewasm() {
|
||||
document.getElementById('gametitle').innerHTML = 'Latest release WASM';
|
||||
document.getElementById('gameversion').innerHTML = '1.12.2-u2-wasm';
|
||||
document.getElementById('gameicon').src = './images/m-logo1.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.12.2-wasm/';
|
||||
}
|
||||
|
||||
function previousrelease() {
|
||||
document.getElementById('gametitle').innerHTML = 'Previous release';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-u50';
|
||||
document.getElementById('gameicon').src = './images/m-logo2.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.8.8/';
|
||||
}
|
||||
|
||||
function previousreleasewasm() {
|
||||
document.getElementById('gametitle').innerHTML = 'Previous release WASM';
|
||||
document.getElementById('gameversion').innerHTML = '1.8.8-u50-wasm';
|
||||
document.getElementById('gameicon').src = './images/m-logo2.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.8.8-wasm/';
|
||||
}
|
||||
|
||||
function olderrelease() {
|
||||
document.getElementById('gametitle').innerHTML = 'Older release';
|
||||
document.getElementById('gameversion').innerHTML = '1.5.2-sp2.01';
|
||||
document.getElementById('gameicon').src = './images/m-logo11.png';
|
||||
document.getElementById('playbutton').href = 'mc/1.5.2/';
|
||||
}
|
||||
|
||||
function dropdowntoggle(){
|
||||
if (document.getElementById('dropdn').style.visibility === 'hidden') {
|
||||
document.getElementById('dropdn').style.visibility = 'visible';
|
||||
document.getElementById('dropdownuparrow').innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="dropdownIcon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 15l6 -6l6 6" /></svg>';
|
||||
} else {
|
||||
document.getElementById('dropdn').style.visibility = 'hidden';
|
||||
document.getElementById('dropdownuparrow').innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="dropdownIcon"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6 9l6 6l6 -6" /></svg>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function resetSelected() {
|
||||
document.getElementById('gtabs1').style.fontWeight = '';
|
||||
document.getElementById('gtabs1').style.borderLeft = '';
|
||||
document.getElementById('gtabs2').style.fontWeight = '';
|
||||
document.getElementById('gtabs2').style.borderLeft = '';
|
||||
document.getElementById('gtabs3').style.fontWeight = '';
|
||||
document.getElementById('gtabs3').style.borderLeft = '';
|
||||
document.getElementById('gtabs4').style.fontWeight = '';
|
||||
document.getElementById('gtabs4').style.borderLeft = '';
|
||||
document.getElementById('gtabs5').style.fontWeight = '';
|
||||
document.getElementById('gtabs5').style.borderLeft = '';
|
||||
document.getElementById('gtabs6').style.fontWeight = '';
|
||||
document.getElementById('gtabs6').style.borderLeft = '';
|
||||
document.getElementById('dropdown1').style.display = 'none';
|
||||
document.getElementById('dropdown2').style.display = 'none';
|
||||
document.getElementById('dropdown3').style.display = 'none';
|
||||
document.getElementById('dropdown4').style.display = 'none';
|
||||
document.getElementById('dropdown5').style.display = 'none';
|
||||
document.getElementById('dropdown6').style.display = 'none';
|
||||
document.getElementById('dropdown7').style.display = 'none';
|
||||
document.getElementById('dropdown8').style.display = 'none';
|
||||
document.getElementById('dropdown9').style.display = 'none';
|
||||
document.getElementById('dropdown10').style.display = 'none';
|
||||
document.getElementById('dropdown11').style.display = 'none';
|
||||
document.getElementById('dropdown12').style.display = 'none';
|
||||
document.getElementById('dropdown13').style.display = 'none';
|
||||
}
|
||||
|
||||
function resetDefault() {
|
||||
document.getElementById('drop').style.display = 'flex';
|
||||
document.getElementById('mainbutton').classList.remove('playButton2');
|
||||
document.getElementById('mainbutton').classList.add('playButton');
|
||||
}
|
||||
|
||||
window.addEventListener("scroll", preventMotion, false);
|
||||
window.addEventListener("touchmove", preventMotion, false);
|
||||
|
||||
function preventMotion(event)
|
||||
{
|
||||
window.scrollTo(0, 0);
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
console.clear()
|
||||
@@ -0,0 +1,13 @@
|
||||
(function(){'use strict';function g(a){console.log("LoaderBootstrap: [INFO] "+a)}function n(a){console.log("LoaderBootstrap: [WARN] "+a)}function q(a){console.error("LoaderBootstrap: [ERROR] "+a)}var r=null;
|
||||
function u(){const a=[];for(var c=0;64>c;++c)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(c)]=c;a[45]=62;a[95]=63;return function(b,d){var e=b.length-d;if(0<e%4)throw Error("Invalid string. Length must be a multiple of 4");var f=b.indexOf("=",d);f=-1===f?e:f-d;e=[f,f===e?0:4-f%4];var l=e[0];e=e[1];f=new Uint8Array(3*(l+e)/4-e);var h=0;l=(0<e?l-4:l)+d;var k;for(k=d;k<l;k+=4)d=a[b.charCodeAt(k)]<<18|a[b.charCodeAt(k+1)]<<12|a[b.charCodeAt(k+2)]<<6|a[b.charCodeAt(k+
|
||||
3)],f[h++]=d>>16&255,f[h++]=d>>8&255,f[h++]=d&255;2===e?(d=a[b.charCodeAt(k)]<<2|a[b.charCodeAt(k+1)]>>4,f[h++]=d&255):1===e&&(d=a[b.charCodeAt(k)]<<10|a[b.charCodeAt(k+1)]<<4|a[b.charCodeAt(k+2)]>>2,f[h++]=d>>8&255,f[h++]=d&255);return f.buffer}}function v(){return new Promise(function(a){setTimeout(a,20)})}
|
||||
function w(a){return new Promise(function(c){const b=new Image;b.addEventListener("load",c);b.addEventListener("error",function(){n("Failed to preload image: "+a);c()});b.src=a;setTimeout(c,50)})}function x(a){return new Promise(function(c){fetch(a,{cache:"force-cache"}).then(function(b){return b.arrayBuffer()}).then(c).catch(function(b){q("Failed to fetch URL! "+b);c(null)})})}
|
||||
function y(a){return a.startsWith("data:application/octet-stream;base64,")?new Promise(function(c){x(a).then(function(b){if(b)c(b);else{n("Failed to decode base64 via fetch, doing it the slow way instead...");try{r||=u();var d=r(a,37);c(d)}catch(e){q("Failed to decode base64! "+e),c(null)}}})}):x(a)}
|
||||
function z(a,c){const b=document.createElement("h2");b.style.color="#AA0000";b.style.padding="25px";b.style.fontFamily="sans-serif";b.style.marginBlock="0px";b.appendChild(document.createTextNode(c));a.appendChild(b);c=document.createElement("h4");c.style.color="#AA0000";c.style.padding="25px";c.style.fontFamily="sans-serif";c.style.marginBlock="0px";c.appendChild(document.createTextNode("Try again later"));a.style.backgroundColor="white";a.appendChild(c)}
|
||||
window.main=async function(){if("undefined"===typeof window.eaglercraftXOpts)q("window.eaglercraftXOpts is not defined!"),alert("window.eaglercraftXOpts is not defined!");else{var a=window.eaglercraftXOpts.container;if("string"!==typeof a)q("window.eaglercraftXOpts.container is not a string!"),alert("window.eaglercraftXOpts.container is not a string!");else{var c=window.eaglercraftXOpts.assetsURI;if("string"!==typeof c)if("object"===typeof c&&"object"===typeof c[0]&&"string"===typeof c[0].url)c=c[0].url;
|
||||
else{q("window.eaglercraftXOpts.assetsURI is not a string!");alert("window.eaglercraftXOpts.assetsURI is not a string!");return}c.startsWith("data:")&&delete window.eaglercraftXOpts.assetsURI;var b=document.getElementById(a);if(b){for(;a=b.lastChild;)b.removeChild(a);a=document.createElement("div");a.style.width="100%";a.style.height="100%";a.style.setProperty("image-rendering","pixelated");a.style.background='center / contain no-repeat url("data:image/png;base64,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") white';
|
||||
b.appendChild(a);await v();c.startsWith("data:")?(g('Downloading EPW file "<data: '+c.length+' chars>"...'),c=await y(c)):(g('Downloading EPW file "'+c+'"...'),c=await x(c));var d=!1;c?384>c.byteLength&&(q("The EPW file is too short"),d=!0):d=!0;if(d)b.removeChild(a),z(b,"Failed to download EPW file!"),q("Failed to download EPW file!");else{var e=new DataView(c);if(608649541!==e.getUint32(0,!0)||1297301847!==e.getUint32(4,!0))q("The file is not an EPW file"),d=!0;var f=c.byteLength;e.getUint32(8,
|
||||
!0)!==f&&(q("The EPW file is the wrong length"),d=!0);if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{var l=new TextDecoder("utf-8"),h=e.getUint32(100,!0),k=e.getUint32(104,!0),m=e.getUint32(108,!0),p=e.getUint32(112,!0);if(0>h||h+k>f||0>m||m+p>f)q("The EPW file contains an invalid offset (component: splash)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{h=new Uint8Array(c,h,k);m=new Uint8Array(c,m,p);l=URL.createObjectURL(new Blob([h],
|
||||
{type:l.decode(m)}));await w(l);g("Loaded splash img: "+l);a.style.background='center / contain no-repeat url("'+l+'"), 0px 0px / 1000000% 1000000% no-repeat url("'+l+'") white';await v();p=e.getUint32(164,!0);h=e.getUint32(168,!0);m=e.getUint32(180,!0);e=e.getUint32(184,!0);if(0>p||p+h>f||0>m||m+e>f)q("The EPW file contains an invalid offset (component: loader)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{a=new Uint8Array(c,p,h);a=URL.createObjectURL(new Blob([a],
|
||||
{type:"text/javascript;charset=utf-8"}));g("Loaded loader.js: "+l);d=new Uint8Array(c,m,e);d=URL.createObjectURL(new Blob([d],{type:"application/wasm"}));g("Loaded loader.wasm: "+d);f={};for(const [t,A]of Object.entries(window.eaglercraftXOpts))"container"!==t&&"assetsURI"!==t&&(f[t]=A);window.__eaglercraftXLoaderContextPre={rootElement:b,eaglercraftXOpts:f,theEPWFileBuffer:c,loaderWASMURL:d,splashURL:l};g("Appending loader.js to document...");b=document.createElement("script");b.type="text/javascript";
|
||||
b.src=a;document.head.appendChild(b)}}}}}else b='window.eaglercraftXOpts.container "'+a+'" is not a known element id!',q(b),alert(b)}}};}).call(this);
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,54 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="description" content="Play minecraft 1.12 in your browser" />
|
||||
<meta name="keywords" content="eaglercraft, minecraft, 1.12, 1.12.2" />
|
||||
<title>EaglercraftX 1.12 WASM-GC</title>
|
||||
<meta property="og:locale" content="en-US" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="Eaglercraft 1.12 WASM" />
|
||||
<meta property="og:description" content="Play minecraft 1.12 in your browser" />
|
||||
<meta property="og:image" content="favicon.png" />
|
||||
<link type="image/png" rel="shortcut icon" href="favicon.png" />
|
||||
<script type="text/javascript" src="bootstrap.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
|
||||
// %%%%%%%%% launch options %%%%%%%%%%%%
|
||||
|
||||
var relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
demoMode: false,
|
||||
container: "game_frame",
|
||||
assetsURI: "assets.epw",
|
||||
worldsDB: "worlds",
|
||||
servers: [
|
||||
{ addr: "wss://play.zelz.net", name: "ZelzNet" },
|
||||
{ addr: "wss://mc.arch.lol", name: "ArchMC" },
|
||||
{ addr: "wss://beta.arch.lol", name: "§r §r §r §r §4§lArchMC Beta" }
|
||||
]
|
||||
};
|
||||
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
var q = window.location.search;
|
||||
if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
|
||||
q = new window.URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.eaglercraftXOpts.joinServer = s;
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame"></body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="und" style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0">
|
||||
<meta name="description" content="Eaglercraft 1.12 test directory HTML page">
|
||||
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.12, 1.12.2">
|
||||
<title>Eaglercraft 1.12.2</title>
|
||||
<meta property="og:locale" content="en-US">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:title" content="Eaglercraft 1.12.2">
|
||||
<meta property="og:description" content="test directory HTML page">
|
||||
<link type="image/png" rel="shortcut icon" href="favicon.png">
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
var relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
demoMode: false,
|
||||
container: "game_frame",
|
||||
assetsURI: "assets.epk",
|
||||
localesURI: "lang/",
|
||||
worldsDB: "worlds",
|
||||
servers: [
|
||||
{ addr: "wss://play.zelz.net", name: "ZelzNet" },
|
||||
{ addr: "wss://mc.arch.lol", name: "ArchMC" },
|
||||
{ addr: "wss://beta.arch.lol", name: "§r §r §r §r §4§lArchMC Beta" }
|
||||
]
|
||||
};
|
||||
main();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,26 @@
|
||||
window.initializeVoiceClient=()=>{class k{constructor(a,b,c,e){this.client=a;this.peerId=b;this.peerConnection=c;this.stream=null;this.peerConnection.addEventListener("icecandidate",f=>{f.candidate&&this.client.iceCandidateHandler(this.peerId,JSON.stringify({sdpMLineIndex:f.candidate.sdpMLineIndex,candidate:f.candidate.candidate}))});this.peerConnection.addEventListener("track",f=>{this.rawStream=f.streams[0];const g=new Audio;g.autoplay=!0;g.muted=!0;g.onended=function(){g.remove()};g.srcObject=
|
||||
this.rawStream;this.client.peerTrackHandler(this.peerId,this.rawStream)});this.peerConnection.addStream(this.client.localMediaStream.stream);e&&this.peerConnection.createOffer(f=>{this.peerConnection.setLocalDescription(f,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(f))},g=>{console.error('Failed to set local description for "'+this.peerId+'"! '+g);this.client.signalDisconnect(this.peerId)})},f=>{console.error('Failed to set create offer for "'+this.peerId+'"! '+f);this.client.signalDisconnect(this.peerId)});
|
||||
this.peerConnection.addEventListener("connectionstatechange",f=>{"disconnected"!==this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalDisconnect(this.peerId)})}disconnect(){this.peerConnection.close()}mute(a){this.rawStream.getAudioTracks()[0].enabled=!a}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,
|
||||
()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+
|
||||
'"! '+b),this.client.signalDisconnect(this.peerId)}}addICECandidate(a){try{this.peerConnection.addIceCandidate(new RTCIceCandidate(JSON.parse(a)))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.readyState=0;this.microphoneVolumeAudioContext=this.peerDisconnectHandler=this.peerTrackHandler=this.descriptionHandler=this.iceCandidateHandler=
|
||||
null}voiceClientSupported(){return"undefined"!==typeof window.RTCPeerConnection&&"undefined"!==typeof navigator.mediaDevices&&"undefined"!==typeof navigator.mediaDevices.getUserMedia}setICEServers(a){for(var b=this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=
|
||||
a}setPeerTrackHandler(a){this.peerTrackHandler=a}setPeerDisconnectHandler(a){this.peerDisconnectHandler=a}activateVoice(a){this.hasInit&&(this.localRawMediaStream.getAudioTracks()[0].enabled=a)}initializeDevices(){this.hasInit?this.readyState=1:navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(a=>{this.microphoneVolumeAudioContext=new AudioContext;this.localRawMediaStream=a;this.localRawMediaStream.getAudioTracks()[0].enabled=!1;this.localMediaStream=this.microphoneVolumeAudioContext.createMediaStreamDestination();
|
||||
this.localMediaStreamGain=this.microphoneVolumeAudioContext.createGain();this.microphoneVolumeAudioContext.createMediaStreamSource(a).connect(this.localMediaStreamGain);this.localMediaStreamGain.connect(this.localMediaStream);this.readyState=this.localMediaStreamGain.gain.value=1;this.hasInit=!0}).catch(a=>{this.readyState=-1})}setMicVolume(a){this.hasInit&&(.5<a&&(a=.5+2*(a-.5)),1.5<a&&(a=1.5),0>a&&(a=0),this.localMediaStreamGain.gain.value=2*a)}getReadyState(){return this.readyState}signalConnect(a,
|
||||
b){try{const c=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),e=new k(this,a,c,b);this.peerList.set(a,e)}catch(c){}}signalDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalDisconnect(a,b){var c=this.peerList.get(a);if("undefined"!==typeof c&&null!==c){this.peerList.delete(c);try{c.disconnect()}catch(e){}this.peerDisconnectHandler(a,b)}}mutePeer(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==
|
||||
a&&a.mute(b)}signalICECandidate(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}}window.constructVoiceClient=()=>new d};window.startVoiceClient=()=>{"function"!==typeof window.constructVoiceClient&&window.initializeVoiceClient();return window.constructVoiceClient()};
|
||||
window.initializeLANClient=()=>{class k{constructor(){this.ICEServers=[];this.dataChannel=this.peerConnection=null;this.readyState=1;this.remotePacketHandler=this.remoteDisconnectHandler=this.remoteDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANClientSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeClient(){try{null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null),null!==this.peerConnection&&this.peerConnection.close(),this.peerConnection=
|
||||
new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),this.readyState=1}catch(d){this.readyState=-2}}setICEServers(d){for(var a=this.ICEServers.length=0;a<d.length;++a){var b=d[a].split(";");1===b.length?this.ICEServers.push({urls:b[0]}):3===b.length&&this.ICEServers.push({urls:b[0],username:b[1],credential:b[2]})}}setICECandidateHandler(d){this.iceCandidateHandler=d}setDescriptionHandler(d){this.descriptionHandler=d}setRemoteDataChannelHandler(d){this.remoteDataChannelHandler=
|
||||
d}setRemoteDisconnectHandler(d){this.remoteDisconnectHandler=d}setRemotePacketHandler(d){this.remotePacketHandler=d}getReadyState(){return this.readyState}sendPacketToServer(d){null!==this.dataChannel&&"open"===this.dataChannel.readyState?this.dataChannel.send(d):this.signalRemoteDisconnect(!1)}signalRemoteConnect(){const d=[];this.peerConnection.addEventListener("icecandidate",a=>{if(a.candidate){if(0===d.length){let b=[0,0],c;setTimeout(c=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const e=
|
||||
++b[1];b[0]!==d.length&&3>e?(b[0]=d.length,setTimeout(c,2E3)):(this.iceCandidateHandler(JSON.stringify(d)),d.length=0)}},2E3)}d.push({sdpMLineIndex:a.candidate.sdpMLineIndex,candidate:a.candidate.candidate})}});this.dataChannel=this.peerConnection.createDataChannel("lan");this.dataChannel.binaryType="arraybuffer";this.dataChannel.addEventListener("open",async a=>{for(;0<d.length;)await new Promise(b=>setTimeout(b,10));this.remoteDataChannelHandler(this.dataChannel)});this.dataChannel.addEventListener("message",
|
||||
a=>{this.remotePacketHandler(a.data)},!1);this.peerConnection.createOffer(a=>{this.peerConnection.setLocalDescription(a,()=>{this.descriptionHandler(JSON.stringify(a))},b=>{console.error("Failed to set local description! "+b);this.readyState=-1;this.signalRemoteDisconnect(!1)})},a=>{console.error("Failed to set create offer! "+a);this.readyState=-1;this.signalRemoteDisconnect(!1)});this.peerConnection.addEventListener("connectionstatechange",a=>{"disconnected"===this.peerConnection.connectionState?
|
||||
this.signalRemoteDisconnect(!1):"connected"===this.peerConnection.connectionState?this.readyState=2:"failed"===this.peerConnection.connectionState&&(this.readyState=-1,this.signalRemoteDisconnect(!1))})}signalRemoteDescription(d){try{this.peerConnection.setRemoteDescription(JSON.parse(d))}catch(a){console.error(a),this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteICECandidate(d){try{const a=JSON.parse(d);for(let b of a)this.peerConnection.addIceCandidate(b)}catch(a){console.error(a),
|
||||
this.readyState=-1,this.signalRemoteDisconnect(!1)}}signalRemoteDisconnect(d){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);null!==this.peerConnection&&this.peerConnection.close();d||this.remoteDisconnectHandler();this.readyState=0}}window.constructLANClient=()=>new k};window.startLANClient=()=>{"function"!==typeof window.constructLANClient&&window.initializeLANClient();return window.constructLANClient()};
|
||||
window.initializeLANServer=()=>{class k{constructor(a,b,c){this.client=a;this.peerId=b;this.peerConnection=c;this.dataChannel=null;const e=[];let f=!1;this.peerConnection.addEventListener("icecandidate",g=>{if(g.candidate){if(0===e.length){let h=[0,0],l;setTimeout(l=()=>{if(null!==this.peerConnection&&"disconnected"!==this.peerConnection.connectionState){const m=++h[1];h[0]!==e.length&&3>m?(h[0]=e.length,setTimeout(l,2E3)):(this.client.iceCandidateHandler(this.peerId,JSON.stringify(e)),e.length=0,
|
||||
f=!0)}},2E3)}e.push({sdpMLineIndex:g.candidate.sdpMLineIndex,candidate:g.candidate.candidate})}});this.peerConnection.addEventListener("datachannel",async g=>{for(;!f;)await new Promise(h=>setTimeout(h,10));this.dataChannel=g.channel;this.client.remoteClientDataChannelHandler(this.peerId,this.dataChannel);this.dataChannel.addEventListener("message",h=>{this.client.remoteClientPacketHandler(this.peerId,h.data)},!1)},!1);this.peerConnection.addEventListener("connectionstatechange",g=>{"disconnected"!==
|
||||
this.peerConnection.connectionState&&"failed"!==this.peerConnection.connectionState||this.client.signalRemoteDisconnect(this.peerId)})}disconnect(){null!==this.dataChannel&&(this.dataChannel.close(),this.dataChannel=null);this.peerConnection.close()}setRemoteDescription(a){try{const b=JSON.parse(a);this.peerConnection.setRemoteDescription(b,()=>{"offer"===b.type&&this.peerConnection.createAnswer(c=>{this.peerConnection.setLocalDescription(c,()=>{this.client.descriptionHandler(this.peerId,JSON.stringify(c))},
|
||||
e=>{console.error('Failed to set local description for "'+this.peerId+'"! '+e);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to create answer for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})},c=>{console.error('Failed to set remote description for "'+this.peerId+'"! '+c);this.client.signalRemoteDisconnect(this.peerId)})}catch(b){console.error('Failed to parse remote description for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}addICECandidate(a){try{const b=
|
||||
JSON.parse(a);for(let c of b)this.peerConnection.addIceCandidate(new RTCIceCandidate(c))}catch(b){console.error('Failed to parse ice candidate for "'+this.peerId+'"! '+b),this.client.signalRemoteDisconnect(this.peerId)}}}class d{constructor(){this.ICEServers=[];this.hasInit=!1;this.peerList=new Map;this.remoteClientPacketHandler=this.remoteClientDisconnectHandler=this.remoteClientDataChannelHandler=this.descriptionHandler=this.iceCandidateHandler=null}LANServerSupported(){return"undefined"!==typeof window.RTCPeerConnection}initializeServer(){}setICEServers(a){for(var b=
|
||||
this.ICEServers.length=0;b<a.length;++b){var c=a[b].split(";");1===c.length?this.ICEServers.push({urls:c[0]}):3===c.length&&this.ICEServers.push({urls:c[0],username:c[1],credential:c[2]})}}setICECandidateHandler(a){this.iceCandidateHandler=a}setDescriptionHandler(a){this.descriptionHandler=a}setRemoteClientDataChannelHandler(a){this.remoteClientDataChannelHandler=a}setRemoteClientDisconnectHandler(a){this.remoteClientDisconnectHandler=a}setRemoteClientPacketHandler(a){this.remoteClientPacketHandler=
|
||||
a}sendPacketToRemoteClient(a,b){var c=this.peerList.get(a);"undefined"!==typeof c&&null!==c&&(null!=c.dataChannel&&"open"===c.dataChannel.readyState?c.dataChannel.send(b):this.signalRemoteDisconnect(a))}signalRemoteConnect(a){try{const b=new RTCPeerConnection({iceServers:this.ICEServers,optional:[{DtlsSrtpKeyAgreement:!0}]}),c=new k(this,a,b);this.peerList.set(a,c)}catch(b){}}signalRemoteDescription(a,b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.setRemoteDescription(b)}signalRemoteICECandidate(a,
|
||||
b){a=this.peerList.get(a);"undefined"!==typeof a&&null!==a&&a.addICECandidate(b)}signalRemoteDisconnect(a){if(0===a.length){for(var b of this.peerList.values())if("undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}this.peerList.clear()}else if(b=this.peerList.get(a),"undefined"!==typeof b&&null!==b){this.peerList.delete(a);try{b.disconnect()}catch(c){}this.remoteClientDisconnectHandler(a)}}countPeers(){return this.peerList.size}}
|
||||
window.constructLANServer=()=>new d};window.startLANServer=()=>{"function"!==typeof window.constructLANServer&&window.initializeLANServer();return window.constructLANServer()};
|
||||
@@ -0,0 +1,52 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>eagler</title>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="description" content="Eaglercraft is real Minecraft 1.5.2 that you can play in any regular web browser. That includes school chromebooks, it works on all chromebooks. It supports both singleplayer and multiplayer with no extensions." />
|
||||
<meta name="keywords" content="minecraft, eaglercraft, singleplayer, applet, replit, browser, html5, javascript, chromebook, lax1dude, games, eagler" />
|
||||
<meta name="author" content="lax1dude" />
|
||||
<meta property="og:title" content="Eaglercraft" />
|
||||
<meta property="og:locale" content="en-US" />
|
||||
<meta property="og:type" content="website" />
|
||||
<!-- Change this: <meta property="og:image" content="https://media.discordapp.net/attachments/378764518081429506/932053915061587978/thumbnail2.png" /> -->
|
||||
<meta property="og:description" content="Eaglercraft is real Minecraft 1.5.2 that you can play in any regular web browser. That includes school chromebooks, it works on all chromebooks. It supports both singleplayer and multiplayer with no extensions." />
|
||||
<!-- Change this: <meta property="og:url" content="https://g.eags.us/eaglercraft/" /> -->
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript" src="eagswebrtc.js"></script>
|
||||
<script type="text/javascript">
|
||||
if(document.location.href.startsWith("file:")) {
|
||||
alert("You cannot 'open' this file in your browser, the code doesn't work. Upload this folder to your HTTP(s) server and access it via the internet to launch the stable-download game. This is not a bug, please read the documentation");
|
||||
}else {
|
||||
window.addEventListener("load", function(){
|
||||
const relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftOpts = {
|
||||
container: "game_frame", assetsURI: "assets.epk", serverWorkerURI: "worker_bootstrap.js", worldsFolder: "MAIN",
|
||||
servers: [
|
||||
{ serverName: "placeholder", serverAddress: "address here", hideAddress: false }
|
||||
],
|
||||
relays: [
|
||||
{ addr: "wss://relay.deev.is/", name: "lax1dude relay #1", primary: relayId == 0 },
|
||||
{ addr: "wss://relay.lax1dude.net/", name: "lax1dude relay #2", primary: relayId == 1 },
|
||||
{ addr: "wss://relay.shhnowisnottheti.me/", name: "ayunami relay #1", primary: relayId == 2 }
|
||||
],
|
||||
mainMenu: { splashes: [
|
||||
"Darviglet!", "eaglerenophile!", "You Eagler!", "Yeeeeeee!", "yeee",
|
||||
"EEEEEEEEE!", "You Darvig!", "You Vigg!", ":>", "|>", "You Yumpster!"
|
||||
], eaglerLogo: false }};
|
||||
(function(){
|
||||
var q = window.location.search;
|
||||
if(typeof q === 'string' && q.startsWith("?")) {
|
||||
q = new URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.eaglercraftOpts.joinServer = s;
|
||||
}
|
||||
})();
|
||||
main();
|
||||
});}
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,5 @@
|
||||
onmessage = function(o) {
|
||||
importScripts("classes_server.js");
|
||||
eaglercraftServerOpts = o.data;
|
||||
main();
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
(function(){'use strict';function g(a){console.log("LoaderBootstrap: [INFO] "+a)}function n(a){console.log("LoaderBootstrap: [WARN] "+a)}function q(a){console.error("LoaderBootstrap: [ERROR] "+a)}var r=null;
|
||||
function u(){const a=[];for(var c=0;64>c;++c)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(c)]=c;a[45]=62;a[95]=63;return function(b,d){var e=b.length-d;if(0<e%4)throw Error("Invalid string. Length must be a multiple of 4");var f=b.indexOf("=",d);f=-1===f?e:f-d;e=[f,f===e?0:4-f%4];var l=e[0];e=e[1];f=new Uint8Array(3*(l+e)/4-e);var h=0;l=(0<e?l-4:l)+d;var k;for(k=d;k<l;k+=4)d=a[b.charCodeAt(k)]<<18|a[b.charCodeAt(k+1)]<<12|a[b.charCodeAt(k+2)]<<6|a[b.charCodeAt(k+
|
||||
3)],f[h++]=d>>16&255,f[h++]=d>>8&255,f[h++]=d&255;2===e?(d=a[b.charCodeAt(k)]<<2|a[b.charCodeAt(k+1)]>>4,f[h++]=d&255):1===e&&(d=a[b.charCodeAt(k)]<<10|a[b.charCodeAt(k+1)]<<4|a[b.charCodeAt(k+2)]>>2,f[h++]=d>>8&255,f[h++]=d&255);return f.buffer}}function v(){return new Promise(function(a){setTimeout(a,20)})}
|
||||
function w(a){return new Promise(function(c){const b=new Image;b.addEventListener("load",c);b.addEventListener("error",function(){n("Failed to preload image: "+a);c()});b.src=a;setTimeout(c,50)})}function x(a){return new Promise(function(c){fetch(a,{cache:"force-cache"}).then(function(b){return b.arrayBuffer()}).then(c).catch(function(b){q("Failed to fetch URL! "+b);c(null)})})}
|
||||
function y(a){return a.startsWith("data:application/octet-stream;base64,")?new Promise(function(c){x(a).then(function(b){if(b)c(b);else{n("Failed to decode base64 via fetch, doing it the slow way instead...");try{r||=u();var d=r(a,37);c(d)}catch(e){q("Failed to decode base64! "+e),c(null)}}})}):x(a)}
|
||||
function z(a,c){const b=document.createElement("h2");b.style.color="#AA0000";b.style.padding="25px";b.style.fontFamily="sans-serif";b.style.marginBlock="0px";b.appendChild(document.createTextNode(c));a.appendChild(b);c=document.createElement("h4");c.style.color="#AA0000";c.style.padding="25px";c.style.fontFamily="sans-serif";c.style.marginBlock="0px";c.appendChild(document.createTextNode("Try again later"));a.style.backgroundColor="white";a.appendChild(c)}
|
||||
window.main=async function(){if("undefined"===typeof window.eaglercraftXOpts)q("window.eaglercraftXOpts is not defined!"),alert("window.eaglercraftXOpts is not defined!");else{var a=window.eaglercraftXOpts.container;if("string"!==typeof a)q("window.eaglercraftXOpts.container is not a string!"),alert("window.eaglercraftXOpts.container is not a string!");else{var c=window.eaglercraftXOpts.assetsURI;if("string"!==typeof c)if("object"===typeof c&&"object"===typeof c[0]&&"string"===typeof c[0].url)c=c[0].url;
|
||||
else{q("window.eaglercraftXOpts.assetsURI is not a string!");alert("window.eaglercraftXOpts.assetsURI is not a string!");return}c.startsWith("data:")&&delete window.eaglercraftXOpts.assetsURI;var b=document.getElementById(a);if(b){for(;a=b.lastChild;)b.removeChild(a);a=document.createElement("div");a.style.width="100%";a.style.height="100%";a.style.setProperty("image-rendering","pixelated");a.style.background='center / contain no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAAAAAB3tzPbAAAACXBIWXMAAC4jAAAuIwF4pT92AAAG+UlEQVR42u2cy23jOhRATwbTwGwFvAJoF6BFGjColcGkASNuIPA6C68DN+BADZiCVxLSQBYqIGYBAbSdEvwWkvUzZWfymwlwCQwQUZeXPOT9URPkYs/3bj8QAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAH4x9vPvzFpAhAzM98UILmqfjDf1YT0N/cBk+71v+wDSczHmDeJ6TqO+SIfyD7IvC9g33Yc7dP6CQDxB+q62Hc2xnyJD2Sf5vuzL3Hi5MM0WbCN51u/Y/30ryEGmDVHlhwsY9Y7xlq0CuzVc4lh2n7NkGsnQ1nB7IefmrY/araJcbrq6Ryk9YqW4l3J/dHww1jdej+8kte042EW0Nba1hyWdl+9irq/FNXaD6BbQoexuvf+tQC2vX1+AFvP0kxiuyidfWwEbOtQtK0n0r6xbYCKsLcM21+pLZX3u4984Kq2xlnWDimllRudAXEpkGSHfqMzsmxfWnLWNf9aQznW4wMZWOMJxvGs/Ff5X+yPcD0g3dqZesdsI2f7Z2/73W2JSok9Gqu7P1q/I2qtj0qn/ZkTaCPWO2a0VyjrxY7sNUG1LxRlaE90MpDpGVeAxpaGobN2XPWH0aQVE1stfXPAj0+XzUmcob3aTRdVZ2+tRv+gMNBDaTkZ4k6uhtYPaK7iUkUcx9lgij92gZ6aXmxoDeK8D1hPfm18oBvTfPGwXoVG+4VfXcwl8dEOtCJS7De9M0VTqTA2p081O3kJ+uk5cU/RVN8C262Ms9HMlLHSmhNFTcc9u1uQRX4jMhqyNIk1GRk69a6hb0IDZ3pITnbfNqFuJWE9gbYrfmSqen/SiKy27G0VS20VWc+UEn59/YDPkc+0EunrAXQ/JXucYL+3VutyAqvP5wFvtEoyQPsMJMpKc3v7/Su9ALLkhAJDPCObGTDmonfNHAij3sg5866fmTHGnFt/crroh6vEv/Rq6vhEoP7hWWb2ylSQZP5zOVrDqVxSZnm/xL6OFnZwF3/4JoyGjyXu1X3n0rEFyE5Jzc5KEDfT7s2ZYs52s5e1HU88hB17nKTqAroXWPpXiHbN7R3Q8fVDbjzU6vb8hUbX67FWN8Xo4U5SIWjbukr1knY9XrcwS30aOuTatqa0vkA6cI05dyPrzWBbj7ZZrPUT2O7pdpKFtp4rph0E0AxtfN0u9kNVg25d4BPiDF0+R83dPol7/l4m4yQmQzdX+ISewqTnc8ngp94yaCan4vT+Hc228q8/T35+e8+XueSqCaPmEz9ofdbX6eSqE5iN/m4A8Qd9w/1bAEl2fPmafT3Axdv/ytlFeXUwTZyyf+NA3hWDGPrm+HXtHSdQ7nrz7fvv+MPFe/9Q3nAS+iYA3zcKCYAACIAACIAACIAACIAACIAACIAA1C2Komh++r9cogdv90M0+GoZAVHkSiGSaFmOmJdTRdESiKJ5Je4eovnSldoGNJ44gTBNbx+XH7tDYxwOniAPgEdygGWxTm/jBCAHV0u7xa90PV64IW0uOWdCapK7t600vfF2j4Ad5FCE4IopCSWMSg0Q4NgRVNKrwIBJ1ZDGxXO/5+fxhDvFQ87EsHxZMy9Sli/raMbjf9eqMpiciQG3yYOJwW1eQoBoesNBzG3yKdvqNwie1HMwiXFcwo7L7aMBtlSrC7c79RzyUm5w0f66Gk1vcJs8vFYHxUvy/u8leJz4N8t8vX5ccl04Chz5BOLR+mVVWXX5lsU4ncSOFevL7WFsJbYiPfQpcvJwhNsBxKiwcHDPNnoojzp8Jh8PnusiSMcLd1B8R5i+Igq5/BZKU3IEO8cIpoqw6L5NR8kjuOIaFR6GlmKdvmnhuFTsfqNwTBnzBOo+ZFua+jh3jAZtnksMu/b850wIfh1sVwVPhMEzKK9lz/+7Hi3Kx8CjOajVbVCEz3kIT1wyYnsD6s5t8tUaGLFpTfC7q2TH4rjzHMCoGgqTOJiMFi/TY5kduOJWHfzdtzdFrS4PYBwzhi0LAKcAdTcvKhur+VWQ3/TWcq/+LJG5VahUsILHUDGiGCmKy26cOrxlxwZUsMHlvVDW7lMQwghGOGZpmt6zcdFD47EhtQVyWySQRHUgVDzhmkeClyZFlGmiA5BH0WpyB+twPp/cgQpQBH0Lqt6qaTwfs+OW6Kl/RrdET/WqQi5BgWLDqNxmdV/Mo1X1QX5Ms0Pq/jmaP7d2/b6IVq3HW+a9qT7v6/TDNv2+tVA0hzz8klroc07AbXKmN98YQMppARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARCAD2//A2iD9ZsgY5XpAAAAAElFTkSuQmCC") white';
|
||||
b.appendChild(a);await v();c.startsWith("data:")?(g('Downloading EPW file "<data: '+c.length+' chars>"...'),c=await y(c)):(g('Downloading EPW file "'+c+'"...'),c=await x(c));var d=!1;c?384>c.byteLength&&(q("The EPW file is too short"),d=!0):d=!0;if(d)b.removeChild(a),z(b,"Failed to download EPW file!"),q("Failed to download EPW file!");else{var e=new DataView(c);if(608649541!==e.getUint32(0,!0)||1297301847!==e.getUint32(4,!0))q("The file is not an EPW file"),d=!0;var f=c.byteLength;e.getUint32(8,
|
||||
!0)!==f&&(q("The EPW file is the wrong length"),d=!0);if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{var l=new TextDecoder("utf-8"),h=e.getUint32(100,!0),k=e.getUint32(104,!0),m=e.getUint32(108,!0),p=e.getUint32(112,!0);if(0>h||h+k>f||0>m||m+p>f)q("The EPW file contains an invalid offset (component: splash)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{h=new Uint8Array(c,h,k);m=new Uint8Array(c,m,p);l=URL.createObjectURL(new Blob([h],
|
||||
{type:l.decode(m)}));await w(l);g("Loaded splash img: "+l);a.style.background='center / contain no-repeat url("'+l+'"), 0px 0px / 1000000% 1000000% no-repeat url("'+l+'") white';await v();p=e.getUint32(164,!0);h=e.getUint32(168,!0);m=e.getUint32(180,!0);e=e.getUint32(184,!0);if(0>p||p+h>f||0>m||m+e>f)q("The EPW file contains an invalid offset (component: loader)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{a=new Uint8Array(c,p,h);a=URL.createObjectURL(new Blob([a],
|
||||
{type:"text/javascript;charset=utf-8"}));g("Loaded loader.js: "+l);d=new Uint8Array(c,m,e);d=URL.createObjectURL(new Blob([d],{type:"application/wasm"}));g("Loaded loader.wasm: "+d);f={};for(const [t,A]of Object.entries(window.eaglercraftXOpts))"container"!==t&&"assetsURI"!==t&&(f[t]=A);window.__eaglercraftXLoaderContextPre={rootElement:b,eaglercraftXOpts:f,theEPWFileBuffer:c,loaderWASMURL:d,splashURL:l};g("Appending loader.js to document...");b=document.createElement("script");b.type="text/javascript";
|
||||
b.src=a;document.head.appendChild(b)}}}}}else b='window.eaglercraftXOpts.container "'+a+'" is not a known element id!',q(b),alert(b)}}};}).call(this);
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
|
||||
<title>EaglercraftX 1.8 WASM-GC</title>
|
||||
<meta property="og:locale" content="en-US" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="EaglercraftX 1.8 WASM-GC" />
|
||||
<meta property="og:description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta property="og:image" content="favicon.png" />
|
||||
<link type="image/png" rel="shortcut icon" href="favicon.png" />
|
||||
<script type="text/javascript" src="bootstrap.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
|
||||
// %%%%%%%%% launch options %%%%%%%%%%%%
|
||||
|
||||
var relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
demoMode: false,
|
||||
container: "game_frame",
|
||||
assetsURI: "assets.epw",
|
||||
worldsDB: "worlds",
|
||||
servers: [
|
||||
/* example: { addr: "ws://localhost:8081/", name: "Local test server" } */
|
||||
],
|
||||
relays: [
|
||||
{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId == 0 },
|
||||
{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId == 1 },
|
||||
{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId == 2 }
|
||||
]
|
||||
};
|
||||
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
var q = window.location.search;
|
||||
if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
|
||||
q = new window.URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.eaglercraftXOpts.joinServer = s;
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame"></body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 2.6 KiB |
@@ -0,0 +1,59 @@
|
||||
<!DOCTYPE html>
|
||||
<html style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
|
||||
<title>EaglercraftX 1.8</title>
|
||||
<meta property="og:locale" content="en-US" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:title" content="EaglercraftX 1.8" />
|
||||
<meta property="og:description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta property="og:image" content="favicon.png" />
|
||||
<link type="image/png" rel="shortcut icon" href="favicon.png" />
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
|
||||
// %%%%%%%%% launch options %%%%%%%%%%%%
|
||||
|
||||
var relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
demoMode: false,
|
||||
container: "game_frame",
|
||||
assetsURI: "assets.epk",
|
||||
localesURI: "lang/",
|
||||
worldsDB: "worlds",
|
||||
servers: [
|
||||
/* example: { addr: "ws://localhost:8081/", name: "Local test server" } */
|
||||
],
|
||||
relays: [
|
||||
{ addr: "wss://relay.deev.is/", comment: "lax1dude relay #1", primary: relayId == 0 },
|
||||
{ addr: "wss://relay.lax1dude.net/", comment: "lax1dude relay #2", primary: relayId == 1 },
|
||||
{ addr: "wss://relay.shhnowisnottheti.me/", comment: "ayunami relay #1", primary: relayId == 2 }
|
||||
]
|
||||
};
|
||||
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
var q = window.location.search;
|
||||
if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
|
||||
q = new window.URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.eaglercraftXOpts.joinServer = s;
|
||||
}
|
||||
|
||||
main();
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
||||