Files
maps/frontend/index.html
Dongho Kim afdcf23222 update
2025-11-28 23:25:17 +09:00

107 lines
2.6 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Maps</title>
<style>
body {
margin: 0;
overflow: hidden;
background-color: #1a1a1a;
font-family: system-ui, -apple-system, sans-serif;
}
canvas {
width: 100vw;
height: 100vh;
display: block;
}
#ui-container {
position: absolute;
top: 20px;
right: 20px;
display: flex;
flex-direction: column;
gap: 10px;
background: rgba(0, 0, 0, 0.5);
padding: 10px;
border-radius: 8px;
backdrop-filter: blur(5px);
color: white;
}
.control-group {
display: flex;
flex-direction: column;
gap: 5px;
}
button {
background: #333;
color: white;
border: 1px solid #555;
padding: 8px;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
}
button:hover {
background: #444;
}
button:active {
background: #222;
}
#debug-info {
position: absolute;
bottom: 20px;
left: 20px;
color: rgba(255, 255, 255, 0.7);
font-size: 12px;
pointer-events: none;
background: rgba(0, 0, 0, 0.5);
padding: 5px 10px;
border-radius: 4px;
}
</style>
</head>
<body>
<div id="ui-container">
<div class="control-group">
<button id="btn-zoom-in">+</button>
<button id="btn-zoom-out">-</button>
</div>
<div class="control-group">
<label for="zoom-slider" style="font-size: 12px;">Zoom</label>
<input type="range" id="zoom-slider" min="0" max="100" value="50">
</div>
<button id="btn-location">📍 My Location</button>
</div>
<div id="debug-info">
Zoom: <span id="debug-zoom">--</span> | Pos: <span id="debug-pos">--</span>
</div>
<script type="module">
import init from './wasm.js';
async function run() {
try {
await init();
console.log("WASM initialized");
} catch (e) {
console.error("Failed to initialize WASM:", e);
}
}
run();
</script>
</body>
</html>