orbit/dev/landing-click.html

33 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Orbit — dev landing click-path test</title>
<base href="../" />
<style>
html, body { margin: 0; height: 100%; background: #04060d; overflow: hidden; }
#game { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
</style>
<script src="lib/phaser.min.js"></script>
<script>
window.__PAGE_ERR__ = null;
window.addEventListener('error', (e) => {
window.__PAGE_ERR__ = { type: 'error', msg: String(e.message), src: String(e.filename).slice(-60) + ':' + e.lineno };
});
window.addEventListener('unhandledrejection', (e) => {
window.__PAGE_ERR__ = { type: 'rejection', msg: String(e.reason) };
});
const __CON = [];
for (const m of ['log', 'info', 'warn', 'error']) {
const orig = console[m].bind(console);
console[m] = (...a) => { try { __CON.push(a.map((x) => (typeof x === 'string' ? x : String(x))).join(' ').slice(0, 400)); } catch {} orig(...a); };
}
window.__CONSOLE__ = () => __CON.slice(-30);
</script>
</head>
<body>
<div id="game"></div>
<script type="module" src="dev/landing-click.mjs"></script>
</body>
</html>