Files
eric a10b048968
build / Build Docker Image (push) Canceled after 0s
eom.dev customization
2026-10-24 18:49:03 -04:00

44 lines
1.7 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#1e1e2e">
<title>Play Luanti · eom.dev</title>
<style id="launch-style">
:root { color-scheme: dark; background: #1e1e2e; color: #cdd6f4; font-family: system-ui, sans-serif; }
body { margin: 0; min-height: 100vh; display: grid; place-items: center; }
#status { padding: 1.5rem; color: #a6adc8; overflow-wrap: anywhere; }
</style>
</head>
<body>
<p id="status" role="status" aria-live="polite">Opening the eom.dev world…</p>
<script src="%__RELEASE_UUID__%/launcher.js"></script>
<script>
'use strict';
const status = document.getElementById('status');
const proxy = new URL('/proxy', window.location.href);
proxy.protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
const mtl = new LuantiLauncher();
mtl.setProxy(proxy.href);
mtl.overrideConf('main_menu_script', '');
mtl.setConf('viewing_range', 85);
mtl.onprint = (text) => { status.textContent = text; };
mtl.onprogress = (name, progress) => {
status.textContent = `Opening the world: ${Math.round(progress * 100)}%`;
};
let started = false;
mtl.onready = () => {
if (started) return;
started = true;
document.getElementById('launch-style').remove();
mtl.launch(new LuantiArgs());
};
mtl.onerror = (error) => { status.textContent = String(error); };
mtl.onexit = (code) => {
document.body.textContent = `Luanti exited (${code}). Reload the page to play again.`;
};
</script>
</body>
</html>