Files
Hexagon-Editor/tiles.html

120 lines
2.0 KiB
HTML
Raw Permalink Normal View History

2025-12-25 10:16:42 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Three.js Texture Editor</title>
<style>
html, body {
margin: 0;
padding: 0;
overflow: hidden;
width: 100vw;
height: 100vh;
}
body {
position: relative;
font-family: "Segoe UI", sans-serif;
}
canvas {
display: block;
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 0;
}
.ui-overlay {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
pointer-events: none;
z-index: 10;
}
#colorPanelContainer {
position: absolute;
top: 42px;
left: 12px;
display: flex;
gap: 6px;
padding: 6px;
background: rgba(0, 0, 0, 0.4);
border-radius: 6px;
pointer-events: auto;
}
.color-swatch {
width: 24px;
height: 24px;
border: 2px solid white;
cursor: pointer;
border-radius: 4px;
}
.color-swatch.selected {
outline: 2px solid yellow;
}
.button-group {
position: absolute;
top: 12px;
right: 12px;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: auto;
}
button {
padding: 6px 14px;
background: linear-gradient(to bottom, #f0f0f0, #dcdcdc);
border: 1px solid #999;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
button:hover {
background: linear-gradient(to bottom, #ffffff, #e0e0e0);
}
</style>
</head>
<body>
<div class="ui-overlay">
<div id="colorHint" style="
position: absolute;
top: 16px;
left: 10px;
color: white;
font-family: sans-serif;
font-size: 12px;
background: rgba(0,0,0,0.6);
padding: 4px 6px;
border-radius: 4px;
pointer-events: none;
z-index: 10;
">
Scroll to switch colors
</div>
<div id="colorPanelContainer"></div>
<div class="button-group">
<button id="resetAll">Reset All</button>
<button id="pulseButton">Pulse</button>
</div>
</div>
<script type="module" src="./tiled_ground.js"></script>
</body>
</html>