Extracts only the base map art from re3mr PSDs (the top-level LOCATION group), tiles it to WebP, and renders every map on one shared world canvas. Pipeline: psd_tree -> export_base -> tile -> build -> preview, driven entirely by maps.json. Adding a map is a config change. Maps are placed on an 8192px grid (tileSize * 2^maxZoom) so a cell's tile index shift is exactly cell * 2^z at every zoom. Each map keeps its own locally numbered pyramid and the browser translates on the fly, so adding a map never re-tiles the others. excludeLayers works around psd-tools rendering stroke-only vector shapes as solid fills, which otherwise buries Customs under a white fill. Co-Authored-By: Claude Opus 5 <[email protected]>
115 lines
2.7 KiB
CSS
115 lines
2.7 KiB
CSS
:root {
|
|
--bg: #14161a;
|
|
--panel: #1e2229ee;
|
|
--line: #333a44;
|
|
--text: #e6e8ec;
|
|
--muted: #9aa3b0;
|
|
--accent: #7fc4a0;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
html, body {
|
|
margin: 0;
|
|
height: 100%;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
overscroll-behavior: none;
|
|
}
|
|
|
|
#map {
|
|
position: absolute;
|
|
inset: 0;
|
|
background: var(--bg);
|
|
}
|
|
|
|
#boot {
|
|
position: absolute;
|
|
inset: 0;
|
|
display: grid;
|
|
place-items: center;
|
|
color: var(--muted);
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* --- map picker ------------------------------------------------------- */
|
|
|
|
#panel {
|
|
position: absolute;
|
|
z-index: 1000;
|
|
top: calc(10px + env(safe-area-inset-top));
|
|
left: calc(10px + env(safe-area-inset-left));
|
|
max-width: min(260px, calc(100vw - 20px));
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
backdrop-filter: blur(6px);
|
|
overflow: hidden;
|
|
}
|
|
|
|
#panel summary {
|
|
padding: 10px 14px;
|
|
cursor: pointer;
|
|
font-weight: 600;
|
|
letter-spacing: .04em;
|
|
text-transform: uppercase;
|
|
font-size: 12px;
|
|
color: var(--muted);
|
|
user-select: none;
|
|
list-style: none;
|
|
}
|
|
#panel summary::-webkit-details-marker { display: none; }
|
|
#panel summary::after { content: " ▾"; }
|
|
#panel:not([open]) summary::after { content: " ▸"; }
|
|
|
|
#maplist {
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-top: 1px solid var(--line);
|
|
max-height: 50vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
#maplist button {
|
|
all: unset;
|
|
padding: 11px 14px;
|
|
min-height: 44px; /* touch target */
|
|
cursor: pointer;
|
|
color: var(--text);
|
|
border-bottom: 1px solid #ffffff0f;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
#maplist button:last-child { border-bottom: 0; }
|
|
#maplist button:hover,
|
|
#maplist button:focus-visible { background: #ffffff12; }
|
|
#maplist button[aria-current="true"] { color: var(--accent); }
|
|
#maplist button[aria-current="true"]::before { content: "●"; font-size: 9px; }
|
|
#maplist button:not([aria-current="true"])::before { content: "○"; font-size: 9px; color: var(--muted); }
|
|
|
|
/* --- leaflet chrome --------------------------------------------------- */
|
|
|
|
.leaflet-container { background: var(--bg); font: inherit; }
|
|
|
|
.leaflet-control-zoom a {
|
|
background: var(--panel);
|
|
border-color: var(--line) !important;
|
|
color: var(--text);
|
|
}
|
|
.leaflet-control-zoom a:hover { background: #2a303a; }
|
|
|
|
.leaflet-control-attribution {
|
|
background: var(--panel) !important;
|
|
color: var(--muted);
|
|
padding: 3px 8px;
|
|
font-size: 11px;
|
|
}
|
|
.leaflet-control-attribution a { color: var(--accent); }
|
|
|
|
@media (max-width: 640px) {
|
|
#panel { max-width: calc(100vw - 20px); }
|
|
.leaflet-control-zoom { display: none; } /* pinch to zoom instead */
|
|
}
|