Make a fresh clone servable after `git lfs pull` alone, and rebuildable with `tools/build.py` without re-rendering unchanged PSDs: - Track build/ (rendered base PNGs, previews, world composites), web/tiles/, web/tiles-trimmed/, web/data/world.json and web/data/markers/. Large PNGs and the tile pyramids go through Git LFS (.gitattributes); JSON stays plain. - build.py: decide PSD re-export from build/<id>/base.stamp.json (PSD size, mtime, SHA-256 recorded at export time) instead of file mtimes, which are meaningless after an LFS checkout. Same size + new mtime hashes once and refreshes the stamp; --stamp-only writes stamps for existing base.pngs. - Ignore .DS_Store and .env files; track sources/**/*.jpg through LFS. Viewer: - Right-click (long-press) the map for a category menu that drops a draft marker under the pointer and enters marker edit mode for that map. - Marker editing moves out of the side panel into a box anchored next to the marker: Enter or a left click anywhere else saves, Esc cancels, Delete inside the box; drags save position plus the box contents. - Maps panel expands on hover, header click pins/unpins (status shown in the header), unpinned collapses 2 s after the pointer leaves; Overview is the first list entry instead of a separate button. Only the panel scrolls; the page never grows past the viewport. Hover tooltips render above markers. Also includes the pending source additions (overall square base, skirt textures, AI regeneration tooling and notes), service worker, Caddyfile and map config updates. Co-Authored-By: Claude Fable 5 <[email protected]>
98 lines
4.0 KiB
HTML
98 lines
4.0 KiB
HTML
<!doctype html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, viewport-fit=cover">
|
||
<title>Tarkov Maps</title>
|
||
<link rel="stylesheet" href="vendor/leaflet.css">
|
||
<link rel="stylesheet" href="style.css">
|
||
</head>
|
||
<body>
|
||
|
||
<div id="map"></div>
|
||
|
||
<div id="marker-context-menu" role="menu" aria-label="Add marker" hidden></div>
|
||
|
||
<div id="map-toolbar">
|
||
<details id="panel">
|
||
<summary><span class="panel-title">Maps</span><span id="panel-pin"></span></summary>
|
||
<nav id="maplist">
|
||
<button id="overview-map" type="button">Overview</button>
|
||
</nav>
|
||
<section id="placement-tools">
|
||
<div class="layer-actions">
|
||
<button id="toggle-markers" type="button" aria-pressed="true">Markers</button>
|
||
<details id="marker-settings">
|
||
<summary>Marker categories</summary>
|
||
<div id="marker-categories"></div>
|
||
</details>
|
||
<button id="quality-toggle" type="button">Detail</button>
|
||
</div>
|
||
<div class="editor-mode-actions">
|
||
<button id="edit-placement" type="button" disabled>Placement</button>
|
||
<button id="edit-trim" type="button" disabled>Trim area</button>
|
||
<button id="edit-markers" type="button" disabled>Marker edit</button>
|
||
<button id="export-static" type="button">Export site ZIP</button>
|
||
<output id="export-status" role="status"></output>
|
||
</div>
|
||
<div id="placement-editor" hidden>
|
||
<strong id="placement-name"></strong>
|
||
<p>Drag the center anchor to align this map with the overall map.</p>
|
||
<div class="coordinate-fields">
|
||
<label>X <input id="placement-x" type="number" step="0.1"></label>
|
||
<label>Y <input id="placement-y" type="number" step="0.1"></label>
|
||
</div>
|
||
<div class="coordinate-fields size-fields">
|
||
<label>Width <input id="placement-width" type="number" min="1" step="0.1"></label>
|
||
<label>Height <input id="placement-height" type="number" min="1" step="0.1"></label>
|
||
</div>
|
||
<output id="placement-aspect"></output>
|
||
<div class="placement-actions">
|
||
<button id="placement-reset" type="button">Reset</button>
|
||
<button id="placement-save" type="button">Save & rebuild</button>
|
||
</div>
|
||
<output id="placement-status" role="status"></output>
|
||
</div>
|
||
<div id="trim-editor" hidden>
|
||
<strong id="trim-name"></strong>
|
||
<p>Click around the playable boundary to add points. Drag a point to refine it.</p>
|
||
<label class="transparency-field">
|
||
Outside transparency
|
||
<input id="trim-transparency" type="range" min="0" max="100" step="1" value="75">
|
||
<output id="trim-transparency-value">75%</output>
|
||
</label>
|
||
<output id="trim-point-count">0 points</output>
|
||
<div class="placement-actions trim-actions">
|
||
<button id="trim-undo" type="button">Undo point</button>
|
||
<button id="trim-clear" type="button">Clear</button>
|
||
</div>
|
||
<button id="trim-save" type="button">Save trim</button>
|
||
<output id="trim-status" role="status"></output>
|
||
</div>
|
||
<div id="marker-editor" hidden>
|
||
<strong id="marker-editor-name"></strong>
|
||
<p>Right-click the map to add a marker. Click a marker to edit it in place, or drag it to move it.</p>
|
||
<div class="marker-editor-actions">
|
||
<button id="marker-drop" type="button" aria-pressed="false">Drop new marker</button>
|
||
<button id="marker-reset" type="button">Reset this map</button>
|
||
</div>
|
||
<output id="marker-edit-status" role="status"></output>
|
||
</div>
|
||
</section>
|
||
</details>
|
||
</div>
|
||
|
||
<div id="marker-scale-control">
|
||
<label for="marker-scale">Markers</label>
|
||
<input id="marker-scale" type="range" min="-0.30103" max="0.30103" step="0.0001" value="0" autocomplete="off"
|
||
aria-label="Marker and label size, 0.5× to 2×">
|
||
<button id="marker-scale-value" type="button" title="Reset to 1×">1.0×</button>
|
||
</div>
|
||
|
||
<div id="boot">Loading…</div>
|
||
|
||
<script src="vendor/leaflet.js"></script>
|
||
<script src="app.js"></script>
|
||
</body>
|
||
</html>
|