forked from PrismarineJS/prismarine-web-client
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cbab538
Showing
874 changed files
with
1,953,161 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"version":1,"defaultHost":"<from-proxy>","defaultProxy":"proxy.mcraft.fun","mapsProvider":"https://maps.mcraft.fun/","promoteServers":[{"ip":"kaboom.pw","version":"1.18.2","description":"Chaos and destruction server. Free for everyone."},{"ip":"go.mineberry.org","version":"1.18.2","description":"One of the best servers here. Join now!"},{"ip":"sus.shhnowisnottheti.me","version":"1.18.2","description":"Creative, your own 'boxes' (islands)"}]} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<script> | ||
window.startLoad = Date.now() | ||
</script> | ||
<!-- // #region initial loader --> | ||
<script async> | ||
const loadingDiv = /* html */ ` | ||
<div class="initial-loader" style="position: fixed;transition:opacity 0.2s;inset: 0;background:black;display: flex;justify-content: center;align-items: center;font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', Arial, Helvetica, sans-serif;gap: 15px;" ontransitionend="this.remove()"> | ||
<div> | ||
<img src="./loading-bg.jpg" alt="Prismarine Web Client" style="position:fixed;inset:0;width:100%;height:100%;z-index: -2;object-fit: cover;filter: blur(3px);"> | ||
<div style="position: fixed;inset: 0;z-index: -1;background-color: rgba(0, 0, 0, 0.8);"></div> | ||
</div> | ||
<div> | ||
<div style="font-size: calc(var(--font-size) * 1.8);color: lightgray;" class="title">Loading...</div> | ||
<div style="font-size: var(--font-size);color: rgb(176, 176, 176);margin-top: 3px;text-align: center" class="subtitle">A true Minecraft client in your browser!</div> | ||
</div> | ||
</div> | ||
` | ||
const insertLoadingDiv = () => { | ||
const loadingDivElem = document.createElement('div') | ||
loadingDivElem.innerHTML = loadingDiv | ||
if (!window.pageLoaded) { | ||
document.documentElement.appendChild(loadingDivElem) | ||
} | ||
// load error handling | ||
const onError = (message) => { | ||
console.log(message) | ||
if (document.querySelector('.initial-loader') && document.querySelector('.initial-loader').querySelector('.title').textContent !== 'Error') { | ||
document.querySelector('.initial-loader').querySelector('.title').textContent = 'Error' | ||
document.querySelector('.initial-loader').querySelector('.subtitle').textContent = message | ||
if (window.navigator.maxTouchPoints > 1) window.location.hash = '#dev' // show eruda | ||
} | ||
} | ||
window.addEventListener('unhandledrejection', (e) => onError(e.reason)) | ||
window.addEventListener('error', (e) => onError(e.message)) | ||
} | ||
insertLoadingDiv() | ||
document.addEventListener('DOMContentLoaded', () => { | ||
// move loading div to the end of body | ||
const loadingDivElem = document.querySelector('.initial-loader'); | ||
const newContainer = document.body; // replace with your new container | ||
if (loadingDivElem) newContainer.appendChild(loadingDivElem); | ||
}) | ||
</script> | ||
<script type="module" async> | ||
const checkLoadEruda = () => { | ||
if (window.location.hash === '#dev') { | ||
// todo precache (check offline)? | ||
import('https://cdn.skypack.dev/eruda').then(({ default: eruda }) => { | ||
eruda.init() | ||
}) | ||
} | ||
} | ||
checkLoadEruda() | ||
window.addEventListener('hashchange', (e) => { | ||
setTimeout(() => { | ||
checkLoadEruda() | ||
}) | ||
}) | ||
</script> | ||
<style> | ||
html { | ||
background: black; | ||
} | ||
.initial-loader { | ||
--font-size: 20px; | ||
} | ||
@media screen and (min-width: 550px) { | ||
.initial-loader { | ||
--font-size: 30px; | ||
} | ||
} | ||
@media screen and (min-width: 950px) { | ||
.initial-loader { | ||
--font-size: 50px; | ||
} | ||
} | ||
</style> | ||
<!-- // #endregion --> | ||
<!-- <script type="module"> | ||
window.loadPluginScript = async ({ pluginName, script }) => { | ||
window.loadedPlugins[pluginName] = await import(script) | ||
} | ||
</script> --> | ||
<title>Prismarine Web Client</title> | ||
<link rel="favicon" href="favicon.png"> | ||
<link rel="icon" type="image/png" href="favicon.png" /> | ||
<link rel="canonical" href="https://mcraft.fun"> | ||
<meta name="description" content="Minecraft web client running in your browser"> | ||
<meta name="keywords" content="Play, Minecraft, Online, Web, Java, Server, Single player, Javascript, PrismarineJS, Voxel, WebGL, Three.js"> | ||
<meta name="date" content="2024-07-11" scheme="YYYY-MM-DD"> | ||
<meta name="language" content="English"> | ||
<meta name="theme-color" content="#349474"> | ||
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover'> | ||
<meta property="og:title" content="Prismarine Web Client" /> | ||
<meta property="og:type" content="website" /> | ||
<meta property="og:image" content="favicon.png" /> | ||
<meta name="format-detection" content="telephone=no"> | ||
<link rel="manifest" href="manifest.json" crossorigin="use-credentials"> | ||
<meta charset="UTF-8"><script defer src="/static/js/lib-polyfill.3994b79f.js"></script><script defer src="/static/js/lib-lodash.6ca29103.js"></script><script defer src="/static/js/lib-react.23d1c0e4.js"></script><script defer src="/static/js/724.f6adf32c.js"></script><script defer src="/static/js/index.019ee66f.js"></script><link href="/static/css/724.fa89bdfc.css" rel="stylesheet"><link href="/static/css/index.28e8f598.css" rel="stylesheet"></head> | ||
<body> | ||
<div id="react-root"></div> | ||
<div id="ui-root"></div> | ||
<!-- inject script --> | ||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "Prismarine Web Client", | ||
"short_name": "Prismarine Web Client", | ||
"scope": "./", | ||
"start_url": "./", | ||
"icons": [ | ||
{ | ||
"src": "favicon.png", | ||
"sizes": "720x720" | ||
} | ||
], | ||
"background_color": "#349474", | ||
"theme_color": "#349474", | ||
"lang": "en-US", | ||
"orientation": "landscape", | ||
"display": "standalone" | ||
} |
Oops, something went wrong.