Commit build outputs via LFS; right-click markers, inline edit box, panel pin
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]>
This commit is contained in:
1 parent
234dc32c86
commit
472c983287
10884 files changed
+48384
-351
No files matched your search
@@ -6,6 +6,12 @@
|
||||
"runtimeExecutable": "pwsh",
|
||||
"runtimeArgs": ["-NoProfile", "-File", "server/run.ps1", "-Port", "8080"],
|
||||
"port": 8080
|
||||
},
|
||||
{
|
||||
"name": "tarkovmap-mac",
|
||||
"runtimeExecutable": ".venv/bin/python",
|
||||
"runtimeArgs": ["server/serve.py", "8080", "--editable"],
|
||||
"port": 8080
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -2,3 +2,8 @@
|
||||
*.psb filter=lfs diff=lfs merge=lfs -text
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
sources/**/*.png filter=lfs diff=lfs merge=lfs -text
|
||||
sources/**/*.jpg filter=lfs diff=lfs merge=lfs -text
|
||||
# Build outputs: large rendered PNGs and the tile pyramids live in LFS.
|
||||
build/**/*.png filter=lfs diff=lfs merge=lfs -text
|
||||
web/tiles/** filter=lfs diff=lfs merge=lfs -text
|
||||
web/tiles-trimmed/** filter=lfs diff=lfs merge=lfs -text
|
||||
+9
-6
@@ -1,11 +1,9 @@
|
||||
# Source artwork is committed through Git LFS. See .gitattributes.
|
||||
|
||||
# Generated by tools/build.py -- rebuildable from sources/, so not tracked.
|
||||
build/
|
||||
web/tiles/
|
||||
web/tiles-trimmed/
|
||||
web/data/world.json
|
||||
web/data/markers/
|
||||
# Generated by tools/build.py from sources/. Tracked so a fresh clone serves
|
||||
# immediately after `git lfs pull`: the big PNGs in build/ and the tile
|
||||
# pyramids are Git LFS objects (see .gitattributes); the JSON is plain Git.
|
||||
# build/<id>/base.stamp.json lets build.py skip the slow PSD render.
|
||||
|
||||
# Deployable static-site bundles created by the editable server.
|
||||
exports/
|
||||
@@ -22,3 +20,8 @@ node_modules/
|
||||
|
||||
# Local Git worktrees used for parallel feature development.
|
||||
.worktrees/
|
||||
|
||||
.env
|
||||
*.env
|
||||
|
||||
.DS_Store
|
||||
+93
-10
@@ -226,7 +226,7 @@ at the end.
|
||||
### `tile.py` — place, pad, cut
|
||||
|
||||
Crops, scales to the world size implied by `place`, pads to the cell boundary,
|
||||
and writes WebP tiles (quality 82, method 4). Fully-transparent tiles are
|
||||
and writes WebP tiles (quality 78, method 5). Fully-transparent tiles are
|
||||
skipped; fully-opaque tiles are written as RGB rather than RGBA.
|
||||
|
||||
It refuses to tile a map larger than one cell with an actionable message.
|
||||
@@ -300,6 +300,8 @@ around 8 GB for the largest PSDs.
|
||||
| `minZoom` | no | Raise the automatically derived zoom at which a nested detail layer appears |
|
||||
| `place` | yes | `{cx, cy, w, h?}`: center anchor and dimensions in **rotated** overall-map pixels |
|
||||
| `pxPerMeter` | no | From the map's scale bar; recorded for future use |
|
||||
| `skirt` | no | EXPERIMENTAL: `{image, scale?, featherIn?, fadeOut?, matchColours?}` — AI terrain texture baked around the playable polygon in the trimmed pyramid; generated by `tools/skirt.py` (MiniMax `mmx`). See README → *Experimental: AI-generated skirts* |
|
||||
| `background` | no | Colour baked under the artwork at tile time — only where there is artwork, grown by `halo` source px and feathered, at `opacity`. A string (`"#5c6168"`) or `{color, halo?: 48, opacity?: 1}`. For floor plans drawn on transparency (Factory) |
|
||||
| `trim` | no | `{points, outsideTransparency}` playable-area polygon; see below |
|
||||
| `parent` | no | parent map id for grouped navigation and dropdown ordering |
|
||||
|
||||
@@ -385,9 +387,13 @@ controls toggle individual marker types. Visibility choices are saved in local
|
||||
browser storage. Hover tooltips show the marker name, category and source map.
|
||||
|
||||
**Marker edit** enables existing markers as draggable Leaflet markers. Clicking
|
||||
one opens its label and category fields; dragging persists normalized map-local
|
||||
coordinates. **Drop new marker** creates a draggable draft that is written only
|
||||
after its label and category are confirmed. `/api/marker` stores extracted
|
||||
one opens an edit box anchored next to it (a Leaflet popup in its own pane)
|
||||
with the label, category and a delete button; Enter or a left click anywhere
|
||||
outside the box saves, Escape cancels. Dragging persists normalized map-local
|
||||
coordinates. Right-clicking the map opens a category menu that creates a
|
||||
draggable draft at the pointer (entering marker edit mode for the map under it)
|
||||
and opens the same box; **Drop new marker** does the same with a click. A draft
|
||||
is written only when its box is committed. `/api/marker` stores extracted
|
||||
marker changes as overrides, new markers as additions, and deletions as default
|
||||
marker ID tombstones in
|
||||
`web/data/marker-edits/<map-id>.json`; it never rewrites the corresponding
|
||||
@@ -472,15 +478,89 @@ Measured at DPR 1.5, in source pixels per device pixel (higher is sharper):
|
||||
| Below native level | 0.56 | **1.33** |
|
||||
| At native level | 0.67 | 0.67 |
|
||||
|
||||
It costs roughly 4× the tiles in view (~17 KB each), which is a fair trade on a
|
||||
LAN. The boost switches itself off on a 1:1 display with integer zoom.
|
||||
It costs roughly 4× the tiles in view (~17 KB each) in DOM nodes, decodes and
|
||||
bytes, so it is conditional: on above DPR 1.05 in Auto, always on in Sharp,
|
||||
always off in Fast (see *Performance profile*). A 1:1 display in Auto accepts
|
||||
at most a 1.19× stretch at quarter zooms.
|
||||
|
||||
### Performance profile
|
||||
|
||||
`app.js` derives `PERF` and `DENSITY_BOOST` from a *Detail* mode
|
||||
(`localStorage` key `tarkov-quality`: `auto` | `fast` | `sharp`; the panel
|
||||
button cycles it and reloads, because tile size and layer options are fixed at
|
||||
layer creation):
|
||||
|
||||
| | Auto | Fast | Sharp |
|
||||
| --- | --- | --- | --- |
|
||||
| density boost | DPR > 1.05 | off | on |
|
||||
| `fadeAnimation` | on | off | on |
|
||||
| `updateWhenIdle` | `L.Browser.mobile` | on | `L.Browser.mobile` |
|
||||
| `updateInterval` / `keepBuffer` | 200 ms / 2 | 400 ms / 1 | 200 ms / 2 |
|
||||
| cache-warm depth | z ≤ 5 | z ≤ 4 | z ≤ 5 |
|
||||
|
||||
Auto becomes Fast on a low-end device (`deviceMemory` ≤ 4, `hardwareConcurrency`
|
||||
≤ 2) or a slow connection (`saveData`, 2G/3G); warming is skipped on slow
|
||||
connections. The base layer always loads mid-pan (`updateWhenIdle: false`).
|
||||
|
||||
Independent of mode:
|
||||
|
||||
- **Low-res underlay** — a second `OffsetTileLayer` per detail map with
|
||||
`maxNativeZoom` capped at `PERF.previewLevel` (4), `updateWhenIdle`,
|
||||
`keepBuffer 4`, `zIndex 0` in the same pane (`.tile-preview`). Its container
|
||||
is set to opacity 1 on the main layer's `loading` event and 0 on `load`, so
|
||||
a trimmed map's translucent margin never stacks twice once real tiles are
|
||||
in. Created before the main layer so its few requests leave first; URL and
|
||||
version follow `setLayerSource`.
|
||||
- **Cache warming** — `precacheUrls()` reproduces `tile.py`'s grid maths
|
||||
(`pad · scale / tileSize`) from `world.json` and fetches every map's shallow
|
||||
levels at idle (`requestIdleCallback`, two in flight, `priority: 'low'`,
|
||||
paused between `movestart` and `moveend`). Empty tiles inside the bounding
|
||||
box 404 and are ignored. A `tarkov-precache` stamp (versions + time) skips
|
||||
the pass for a week.
|
||||
- **Per-frame work** — `updatePreviewTransforms` iterates only `movedPreviews`
|
||||
(maps whose placement preview differs from the saved geometry), so outside
|
||||
the placement editor the `move`/`zoom` handler is a no-op. `focus()` returns
|
||||
early when the focused family is unchanged (it used to re-stack every pane
|
||||
and re-fetch the family's marker files on every `moveend`).
|
||||
`updateMarkerDensity` runs on `zoomend`. `createTile` sets
|
||||
`decoding = 'async'`.
|
||||
- **Markers** — `layoutMarkerLabels` resets all labels first (writes) and then
|
||||
measures (reads); returns early when no label class is active; indexes icon
|
||||
rectangles in the same cell grid as labels (`makeRectIndex`) instead of a
|
||||
linear `some()` per candidate; generates the 8 rings × 16 angles lazily and
|
||||
stops at the first acceptable spot; reads cached `_poi` parts (label, leader,
|
||||
size, extract flag, set by `cacheMarkerParts` when a marker is added) instead
|
||||
of `querySelector` per pass; and decides label visibility from the
|
||||
container's `marker-labels-visible` / `marker-extract-labels-visible`
|
||||
classes, mirroring style.css, instead of `getComputedStyle`. `categoryConfig`
|
||||
is memoised. `refreshMarkers` keeps markers inside `viewportPadding × 3`
|
||||
through short pans. Each pass is recorded as a `tarkov:marker-labels`
|
||||
`performance.measure`.
|
||||
- **Marker size slider** — `#marker-scale-control` (top right; bottom left
|
||||
under 640 px) sets `--marker-scale` on the map container; `.poi-content` is
|
||||
`transform: scale(var(--marker-scale))` about its centre, so no icon is
|
||||
rebuilt. The layout works in visual (scaled) pixels and converts to the
|
||||
icon's local space when writing styles: `local = size/2 + (visual − point)/scale`.
|
||||
Tooltip offsets follow the scale. Logarithmic slider, 0.5×–2×, persisted as
|
||||
`tarkov-marker-scale`; clicking the readout resets to 1×.
|
||||
- **Service worker** — `web/sw.js`: tiles/vendor cache-first, shell
|
||||
stale-while-revalidate, `data/*.json` network-first with cache fallback,
|
||||
`capabilities.json` and `api/` network only. Registered only when
|
||||
`capabilities.mapEditing` is false; the authoring server unregisters any
|
||||
existing worker. The page posts the live `version`/`trimmedVersion` list so
|
||||
tiles from superseded builds are evicted. Needs HTTPS or `localhost`.
|
||||
|
||||
### Other behaviour
|
||||
|
||||
- URL hash `#zoom/y/x` for shareable positions.
|
||||
- Map picker; the active map is marked.
|
||||
- `window.tarkovMap` / `window.tarkovWorld` exposed for console debugging.
|
||||
- Non-dismissible attribution control (licence requirement).
|
||||
- Non-dismissible attribution control (licence requirement), flush in the
|
||||
bottom-right corner below the zoom buttons (added first; Leaflet stacks
|
||||
bottom-corner controls upwards).
|
||||
- Zoom buttons are Leaflet's `<a href="#">` made non-draggable (`draggable =
|
||||
false`, `dragstart` prevented, `-webkit-user-drag: none`) and styled like the
|
||||
toolbar buttons — a moving click used to start a ghost-image link drag.
|
||||
- Mobile: `viewport-fit=cover`, safe-area insets, 44 px touch targets,
|
||||
collapsible picker, zoom buttons hidden under 640 px in favour of pinch.
|
||||
|
||||
@@ -550,8 +630,9 @@ per map view. It now sets HTTP/1.1, which is most of its improvement above.
|
||||
**Neither serves HTTP/2**: browsers only negotiate h2 over TLS, and trusting a
|
||||
local CA on every phone is not worth it on a LAN. The Caddy win is Go's I/O.
|
||||
|
||||
Cache policy: tiles `public, max-age=604800, immutable`; app shell and
|
||||
`world.json` `no-cache`.
|
||||
Cache policy: tiles `public, max-age=31536000, immutable`; app shell,
|
||||
`sw.js` and `world.json` `no-cache` (a service worker script must never be
|
||||
served stale — Caddy's `@shell` matcher includes `/sw.js`).
|
||||
|
||||
To reach it from a phone, allow the port once (elevated):
|
||||
|
||||
@@ -675,7 +756,9 @@ literal `@` to the commit message. Use a heredoc with `git commit -F -`.
|
||||
| --- | --- | --- |
|
||||
| XYZ tile pyramid + Leaflet | Standard, mobile gestures free, no client deps | `L.imageOverlay` (39 MP in one request); IIIF/DZI (extra dependency) |
|
||||
| 256 px tiles | Works cleanly with the density boost (128 CSS px at 2×) | 512 px — fewer requests but coarser boost granularity |
|
||||
| WebP q82 | ~4× smaller than PNG, alpha supported everywhere in scope | PNG (too large); JPEG (no alpha) |
|
||||
| Conditional density boost + Detail modes | 4× tiles only where a display can show them; weak devices and slow links get 256 px tiles | Unconditional boost (4× tiles on every 1:1 display) |
|
||||
| Low-res underlay shown only while loading | "Blurry then sharp" with no double-alpha on trimmed margins | Always-on underlay (stacks translucent margins); nothing (holes while loading) |
|
||||
| WebP q78 / method 5 | ~4× smaller than PNG, alpha supported everywhere in scope; ~15–20 % smaller than q82 at no visible cost on map art | PNG (too large); JPEG (no alpha); method 6 (~60× slower on RGBA tiles, no smaller) |
|
||||
| Pad maps onto the grid | Exact placement with an integral tile grid, zero cost | Snapping origins (131 072 px granularity — unusable); one giant baked world raster (gigapixels, rebuild everything per change) |
|
||||
| Per-map pyramids | Adding a map never re-tiles the others | Single world pyramid |
|
||||
| Pure-Python pipeline | No native binaries across several machines; 39 MP fits in RAM | libvips `dzsave` (faster, but a native dep) |
|
||||
|
||||
@@ -17,6 +17,11 @@ git lfs install
|
||||
git lfs pull
|
||||
```
|
||||
|
||||
That alone gives a servable site: the rendered base maps (`build/`), the tile
|
||||
pyramids (`web/tiles*/`) and `web/data/` are committed (large files through
|
||||
LFS), so nothing has to be built to run the server. Build only to pick up
|
||||
changes to `maps.json` or the source PSDs:
|
||||
|
||||
```bash
|
||||
python -m pip install -r tools/requirements.txt
|
||||
```
|
||||
@@ -25,6 +30,11 @@ python -m pip install -r tools/requirements.txt
|
||||
python tools/build.py
|
||||
```
|
||||
|
||||
`build.py` skips every map whose PSD is unchanged since its `base.png` was
|
||||
rendered (tracked in `build/<id>/base.stamp.json`, not by file mtimes, so a
|
||||
fresh clone does not re-render anything) and never rewrites an existing tile
|
||||
pyramid; delete `web/tiles/<id>` or pass `--force-export` to redo one.
|
||||
|
||||
```bash
|
||||
pwsh server/get-caddy.ps1
|
||||
```
|
||||
@@ -40,8 +50,9 @@ Pass `-ReadOnly` for a deployment-style preview. In read-only mode `run.ps1`
|
||||
uses Caddy when `server/caddy.exe` is present and falls back to `serve.py`, so
|
||||
the Caddy download is optional — see [Serving](#serving).
|
||||
|
||||
Source PSDs and archives are stored through Git LFS. Run `git lfs install`
|
||||
before cloning and `git lfs pull` if a checkout contains pointer files.
|
||||
Source PSDs and archives, the rendered `build/` PNGs and the tile pyramids are
|
||||
stored through Git LFS. Run `git lfs install` before cloning and `git lfs pull`
|
||||
if a checkout contains pointer files.
|
||||
|
||||
## Documentation
|
||||
|
||||
@@ -73,9 +84,9 @@ tools/
|
||||
server/serve.py dependency-free static server with sane cache headers
|
||||
web/ the site: index.html, app.js, style.css, vendored Leaflet
|
||||
sources/ Git LFS — layered source artwork
|
||||
build/ gitignored — intermediate PNGs
|
||||
web/tiles/ gitignored — generated original tiles
|
||||
web/tiles-trimmed/ gitignored — generated permanently trimmed tiles
|
||||
build/ Git LFS — rendered base PNGs + base.stamp.json (PSD fingerprint)
|
||||
web/tiles/ Git LFS — generated original tiles
|
||||
web/tiles-trimmed/ Git LFS — generated permanently trimmed tiles
|
||||
```
|
||||
|
||||
## How the shared canvas works
|
||||
@@ -191,15 +202,22 @@ Extracts and transits are enabled by default, use larger high-stacking symbols,
|
||||
and reveal labels earlier than ordinary markers. Bulk spawn, loot, key, cache
|
||||
and location categories begin hidden to keep the main map readable.
|
||||
|
||||
The **Markers** slider (top right; bottom left on phones) scales marker icons
|
||||
and labels from 0.5× to 2× — it is one CSS transform per marker, persisted in
|
||||
`localStorage`; click the value to reset to 1×.
|
||||
|
||||
Visible labels are laid out against the current viewport, nearby marker icons
|
||||
and the open control panel. Crowded labels move to the nearest free position;
|
||||
when that position is no longer adjacent, a leader line connects the label to
|
||||
its marker. Extract labels receive placement priority.
|
||||
|
||||
With the editable server running, select a map and open **Marker edit**. Click
|
||||
an existing marker to rename it or change its category, drag it to save a new
|
||||
position, delete it, or choose **Drop new marker** and click inside the selected
|
||||
map.
|
||||
With the editable server running, right-click the map (long-press on touch) and
|
||||
pick a category from the menu: a draft marker appears under the pointer with an
|
||||
edit box beside it. Type the name, then press Enter or click anywhere else to
|
||||
save it; Escape discards it. The same box opens when you click an existing
|
||||
marker in **Marker edit** mode, where you can rename it, change its category,
|
||||
delete it, or drag it to save a new position. **Drop new marker** is the
|
||||
click-to-place alternative for the selected map.
|
||||
Manual changes are written to `web/data/marker-edits/<map-id>.json` as compact
|
||||
overrides, additions and deleted-marker IDs. The generated file under
|
||||
`data/markers/` remains untouched, so deletion is reversible.
|
||||
@@ -281,11 +299,98 @@ pixel (higher is sharper, 1.0 is pixel-perfect):
|
||||
| at native | 0.67 | 0.67 |
|
||||
|
||||
It costs ~4× the tiles in view (99 at the busiest level on a 1315 px viewport,
|
||||
~17 KB each). Cached for a week and served by Caddy, that is a fair trade.
|
||||
~17 KB each) — DOM nodes, decodes and bytes — so it is no longer unconditional.
|
||||
In **Auto** it is on for displays above 1:1 (`devicePixelRatio` > 1.05, where
|
||||
the extra pixels are actually shown) and off for 1:1 displays, which accept at
|
||||
most a 1.19× stretch at quarter zooms. **Sharp** forces it on, **Fast** forces
|
||||
it off. See [Performance](#performance).
|
||||
|
||||
Past a map's native level you are beyond its source resolution and the browser
|
||||
upscales — unavoidable, and `ZOOM_HEADROOM` deliberately allows one level of it.
|
||||
|
||||
## Performance
|
||||
|
||||
The map is meant to be glanced at mid-raid, often on the weaker machine or
|
||||
phone that is *not* running the game, over whatever the Wi-Fi is doing. Two
|
||||
bottlenecks — device and connection — and both are dominated by how many
|
||||
tiles are in play.
|
||||
|
||||
**Detail modes** (the *Detail* button in the panel; stored in `localStorage`,
|
||||
reloads the page):
|
||||
|
||||
| Mode | Tiles | Tile fade | Tile loading | When |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Auto | density boost only above DPR 1 | on | during pans on desktop, after pans on phones | default |
|
||||
| Fast | 256 CSS px, no boost | off | after the pan settles | ≤ 4 GB RAM, ≤ 2 cores, `saveData`, 2G/3G — or by choice |
|
||||
| Sharp | density boost always | on | during pans | you have the GPU and the bandwidth |
|
||||
|
||||
Measured on one Customs view at zoom 7 (816 × 1051 viewport): Auto/Sharp on a
|
||||
2× display **89 requests / 1.3 MB / 89 tile nodes**; Fast **45 / 0.5 MB / 42**.
|
||||
|
||||
**Always on, whatever the mode:**
|
||||
|
||||
- **Low-res underlay.** Each detail map keeps its z ≤ 4 pyramid resident — a
|
||||
handful of tiles, ~20 KB per map — shown only while that map's full-res
|
||||
tiles are loading. A fresh deep link or a flick into new ground paints
|
||||
*blurry then sharp* instead of *holes then sharp*.
|
||||
- **Cache warming.** After the first view lands, the overview and every map's
|
||||
z ≤ 5 (z ≤ 4 in Fast) are fetched at idle, two at a time, low priority,
|
||||
paused while you pan. Tiles are `immutable` for a year, so the next visit —
|
||||
or the next alt-tab — paints the whole world from cache and only the deep
|
||||
levels of the map you are on touch the network. Skipped on `saveData` and
|
||||
2G/3G.
|
||||
- **Service worker** (`web/sw.js`, read-only viewer only, HTTPS or
|
||||
`localhost`): tiles and vendor files cache-first, app shell
|
||||
stale-while-revalidate, `data/*.json` network-first with offline fallback.
|
||||
The map keeps working with no connection at all. The authoring server
|
||||
unregisters it so rebuilds show up immediately; plain-HTTP LAN addresses
|
||||
can't run one and rely on the warmed HTTP cache instead.
|
||||
- **Nothing per frame.** Pan/zoom handlers only touch the DOM when an editor
|
||||
is actually moving a map; markers re-cull and re-layout on `zoomend`, not on
|
||||
every zoom frame; the panel no longer `backdrop-filter`s the moving map;
|
||||
tiles decode off the main thread (`decoding="async"`).
|
||||
- **Markers.** Label layout batches writes before reads (one layout instead of
|
||||
one per label), tests icon collisions against a grid index instead of every
|
||||
icon, generates candidate positions lazily ring by ring, resolves label/leader
|
||||
elements once per marker instead of per pass, and derives label visibility
|
||||
from the map's CSS classes instead of `getComputedStyle` per label. Markers
|
||||
just outside the padded viewport are kept through short pans instead of being
|
||||
destroyed and recreated. Every pass is recorded as a
|
||||
`tarkov:marker-labels` performance measure.
|
||||
- **Smaller tiles.** WebP q78 instead of q82: ~15–20 % fewer bytes at no
|
||||
visible cost on map art (Customs 12.7 → 10.4 MB). Encoder method stays
|
||||
fast (5); method 6 is ~60× slower on tiles with alpha for no size gain.
|
||||
|
||||
## Experimental: AI-generated skirts
|
||||
|
||||
The re3mr maps come with their own frame — Woods has black bars, Customs a
|
||||
sky gradient and a vignette — and the trim polygon only fades it. A *skirt*
|
||||
replaces it with terrain in the style of the map's own art, generated with the
|
||||
MiniMax CLI (`mmx`, logged in):
|
||||
|
||||
```bash
|
||||
python tools/skirt.py woods # vision → prompt → 1536² texture
|
||||
python tools/build.py --trim-only woods
|
||||
```
|
||||
|
||||
`skirt.py` samples the art just inside the playable polygon, asks `mmx vision`
|
||||
to describe the ground (vegetation, palette, rendering style), asks
|
||||
`mmx image generate` for a strictly orthographic, uniformly distributed,
|
||||
seamless texture, saves it to `sources/skirts/<id>.jpg` (+ a `.json` with the
|
||||
prompt and seed), and adds a default `skirt` block to the map in `maps.json`.
|
||||
`tile.py` then bakes it into the **trimmed** pyramid only: the texture is made
|
||||
seamless (offset-blend) and tiled with varied flips, colour-matched to the
|
||||
band just inside the polygon, laid under the whole rectangle and faded out
|
||||
toward its edge; the art is soft-cut at the polygon and its own frame is
|
||||
discarded. The original pyramid (what the editors show) is untouched.
|
||||
|
||||
Knobs in `maps.json` → `skirt`: `scale` (texture px → map px, 0.6),
|
||||
`featherIn` (soft cut width, 80 px), `fadeOut` (fraction of the short side,
|
||||
0.12), `matchColours` (true). Re-roll with `--seed N`, or `--prompt "…"` to
|
||||
skip vision. Limits: `mmx` is text-to-image only, so the skirt matches
|
||||
terrain and palette but cannot continue roads or buildings across the edge;
|
||||
it also fills tiles that were empty before (Woods trimmed: 4.4 → 7.8 MB).
|
||||
|
||||
## Serving
|
||||
|
||||
Two read-only options, both selected with `server/run.ps1 -ReadOnly`:
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/customs/customs-dorms.psd",
|
||||
"size": 207215095,
|
||||
"mtime": 1787301527.6423855,
|
||||
"sha256": "6d63cdfd4d7d3458dff2278e0a764f3a82b35886df12f4c30db9f4b739ac997e"
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/customs/customs.psd",
|
||||
"size": 1142534761,
|
||||
"mtime": 1787301537.2696896,
|
||||
"sha256": "582e8e6064e6f592366da6f8f74dc8e07abab7247106900cc57dec87155dce86"
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/factory/re3mrFactory.psd",
|
||||
"size": 517242825,
|
||||
"mtime": 1787301516.2591262,
|
||||
"sha256": "440550fd7bee5e56fd114e3669d3d8d23064f00fb0a1dd1f87fcaca5b6257cdd"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/ground-zero/GroundZeroByRe3mr.psd",
|
||||
"size": 43909743,
|
||||
"mtime": 1787417115.629301,
|
||||
"sha256": "f65643b4160c9d8ebc0c642d79c00af7f4a79606cda49d0946ea011bd6a4c591"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/interchange/interchange.psd",
|
||||
"size": 1064461599,
|
||||
"mtime": 1787301536.0511887,
|
||||
"sha256": "65111f728d8c31c4891169769605dc3c65153ed7bdfe8379f257328c41732f11"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/labyrinth/re3mrLabyrinth.psd",
|
||||
"size": 151696290,
|
||||
"mtime": 1787301526.4774568,
|
||||
"sha256": "d79ce746c7cd4b50682dc47ee4ae202842ef22b0f557fbef825b4cd6ef08abc8"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/lighthouse/lighthouse.psd",
|
||||
"size": 485527305,
|
||||
"mtime": 1787301513.7015066,
|
||||
"sha256": "95de67bf3b2e055e62cd98db9ead19fb11926ff3d54e15a6f2415c268e132def"
|
||||
}
|
||||
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/reserve/reserve.psd",
|
||||
"size": 299230680,
|
||||
"mtime": 1787301529.1001534,
|
||||
"sha256": "5d7e57b46cf2d13f8359f65bab512a6e90205aae51acf6a1a92a85fc08816a64"
|
||||
}
|
||||
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/shoreline-resort/shoreline-resort.psd",
|
||||
"size": 526828266,
|
||||
"mtime": 1787301511.8441346,
|
||||
"sha256": "d73796372581be6429bacfc89b73a9b1d8363d31a988f7238ab046ac28e64823"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/shoreline/shoreline.psd",
|
||||
"size": 202566846,
|
||||
"mtime": 1787301528.1293306,
|
||||
"sha256": "0b181a8b0d42e0cd40086492b9b7de9c6c2a89173461a0264e3caa7c85254ff8"
|
||||
}
|
||||
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/streets/streets.psd",
|
||||
"size": 811040886,
|
||||
"mtime": 1787301531.953131,
|
||||
"sha256": "38b6019fe23c0fcd7134e370b16825127ba5cb0506e81fbeb689688361c4d9b0"
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"psd": "sources/woods/woods.psd",
|
||||
"size": 530230770,
|
||||
"mtime": 1787301517.6677017,
|
||||
"sha256": "ede7a1ac01f7eb6dfa08db28bd1c7ee954d457251605e24f9568d2f164625d80"
|
||||
}
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,183 @@
|
||||
{
|
||||
"level": 5,
|
||||
"dimensions": [
|
||||
7368,
|
||||
7368
|
||||
],
|
||||
"baseWorldSize": [
|
||||
117888,
|
||||
117888
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"id": "woods",
|
||||
"name": "Woods",
|
||||
"rect": [
|
||||
2512,
|
||||
2173,
|
||||
4072,
|
||||
4013
|
||||
],
|
||||
"size": [
|
||||
1560,
|
||||
1840
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "lighthouse",
|
||||
"name": "Lighthouse",
|
||||
"rect": [
|
||||
1434,
|
||||
3951,
|
||||
2934,
|
||||
5638
|
||||
],
|
||||
"size": [
|
||||
1500,
|
||||
1687
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shoreline",
|
||||
"name": "Shoreline",
|
||||
"rect": [
|
||||
2490,
|
||||
4694,
|
||||
4330,
|
||||
6029
|
||||
],
|
||||
"size": [
|
||||
1840,
|
||||
1335
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "streets",
|
||||
"name": "Streets of Tarkov",
|
||||
"rect": [
|
||||
3605,
|
||||
1727,
|
||||
4925,
|
||||
2567
|
||||
],
|
||||
"size": [
|
||||
1320,
|
||||
840
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "customs",
|
||||
"name": "Customs",
|
||||
"rect": [
|
||||
3432,
|
||||
3633,
|
||||
4558,
|
||||
4201
|
||||
],
|
||||
"size": [
|
||||
1126,
|
||||
568
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "labyrinth",
|
||||
"name": "Labyrinth",
|
||||
"rect": [
|
||||
4558,
|
||||
4740,
|
||||
5358,
|
||||
5469
|
||||
],
|
||||
"size": [
|
||||
800,
|
||||
729
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "reserve",
|
||||
"name": "Reserve",
|
||||
"rect": [
|
||||
2916,
|
||||
4189,
|
||||
3868,
|
||||
4720
|
||||
],
|
||||
"size": [
|
||||
952,
|
||||
531
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "interchange",
|
||||
"name": "Interchange",
|
||||
"rect": [
|
||||
4375,
|
||||
3153,
|
||||
5249,
|
||||
3645
|
||||
],
|
||||
"size": [
|
||||
874,
|
||||
492
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ground-zero",
|
||||
"name": "Ground Zero",
|
||||
"rect": [
|
||||
3922,
|
||||
944,
|
||||
4302,
|
||||
1587
|
||||
],
|
||||
"size": [
|
||||
380,
|
||||
643
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shoreline-resort",
|
||||
"name": "Shoreline \u2014 Resort",
|
||||
"rect": [
|
||||
3923,
|
||||
4734,
|
||||
4443,
|
||||
5026
|
||||
],
|
||||
"size": [
|
||||
520,
|
||||
292
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "customs-dorms",
|
||||
"name": "Customs \u2014 Dorms",
|
||||
"rect": [
|
||||
4224,
|
||||
4013,
|
||||
4504,
|
||||
4332
|
||||
],
|
||||
"size": [
|
||||
280,
|
||||
319
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "factory",
|
||||
"name": "Factory",
|
||||
"rect": [
|
||||
3378,
|
||||
3590,
|
||||
3858,
|
||||
3744
|
||||
],
|
||||
"size": [
|
||||
480,
|
||||
154
|
||||
]
|
||||
}
|
||||
],
|
||||
"composite": "build/world/composite-z5.png",
|
||||
"mask": "build/world/mask-z5.png"
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,183 @@
|
||||
{
|
||||
"level": 6,
|
||||
"dimensions": [
|
||||
14736,
|
||||
14736
|
||||
],
|
||||
"baseWorldSize": [
|
||||
117888,
|
||||
117888
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"id": "woods",
|
||||
"name": "Woods",
|
||||
"rect": [
|
||||
5023,
|
||||
4346,
|
||||
8143,
|
||||
8026
|
||||
],
|
||||
"size": [
|
||||
3120,
|
||||
3680
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "lighthouse",
|
||||
"name": "Lighthouse",
|
||||
"rect": [
|
||||
2868,
|
||||
7901,
|
||||
5868,
|
||||
11275
|
||||
],
|
||||
"size": [
|
||||
3000,
|
||||
3374
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shoreline",
|
||||
"name": "Shoreline",
|
||||
"rect": [
|
||||
4980,
|
||||
9389,
|
||||
8660,
|
||||
12059
|
||||
],
|
||||
"size": [
|
||||
3680,
|
||||
2670
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "streets",
|
||||
"name": "Streets of Tarkov",
|
||||
"rect": [
|
||||
7211,
|
||||
3453,
|
||||
9851,
|
||||
5133
|
||||
],
|
||||
"size": [
|
||||
2640,
|
||||
1680
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "customs",
|
||||
"name": "Customs",
|
||||
"rect": [
|
||||
6864,
|
||||
7267,
|
||||
9116,
|
||||
8403
|
||||
],
|
||||
"size": [
|
||||
2252,
|
||||
1136
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "labyrinth",
|
||||
"name": "Labyrinth",
|
||||
"rect": [
|
||||
9116,
|
||||
9479,
|
||||
10716,
|
||||
10937
|
||||
],
|
||||
"size": [
|
||||
1600,
|
||||
1458
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "reserve",
|
||||
"name": "Reserve",
|
||||
"rect": [
|
||||
5832,
|
||||
8377,
|
||||
7736,
|
||||
9439
|
||||
],
|
||||
"size": [
|
||||
1904,
|
||||
1062
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "interchange",
|
||||
"name": "Interchange",
|
||||
"rect": [
|
||||
8750,
|
||||
6307,
|
||||
10498,
|
||||
7290
|
||||
],
|
||||
"size": [
|
||||
1748,
|
||||
983
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "ground-zero",
|
||||
"name": "Ground Zero",
|
||||
"rect": [
|
||||
7845,
|
||||
1888,
|
||||
8605,
|
||||
3174
|
||||
],
|
||||
"size": [
|
||||
760,
|
||||
1286
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "shoreline-resort",
|
||||
"name": "Shoreline \u2014 Resort",
|
||||
"rect": [
|
||||
7845,
|
||||
9469,
|
||||
8885,
|
||||
10054
|
||||
],
|
||||
"size": [
|
||||
1040,
|
||||
585
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "customs-dorms",
|
||||
"name": "Customs \u2014 Dorms",
|
||||
"rect": [
|
||||
8448,
|
||||
8027,
|
||||
9008,
|
||||
8665
|
||||
],
|
||||
"size": [
|
||||
560,
|
||||
638
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "factory",
|
||||
"name": "Factory",
|
||||
"rect": [
|
||||
6755,
|
||||
7180,
|
||||
7715,
|
||||
7488
|
||||
],
|
||||
"size": [
|
||||
960,
|
||||
308
|
||||
]
|
||||
}
|
||||
],
|
||||
"composite": "build/world/composite-z6.png",
|
||||
"mask": "build/world/mask-z6.png"
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 10884 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user