rework the viewer around base layers, overlays and side panels
One base layer is drawn opaque and any number of overlays over it, so rocks can be looked for on top of the terrain rather than instead of it. Settings and rock finding live in fixed panels beside the map, not in windows over it. What is under the cursor is worked out on a thread of its own, since computing it per frame stalled the window. Find nearest searches regions outward from the view's centre and stops once no nearer region is left; probes leave pins. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
80
Plan.org
80
Plan.org
@@ -485,6 +485,86 @@ Viewer:
|
||||
- *Tile keys.* Now injective bit fields. The old =map * 64 + stratum=
|
||||
packing could alias once resolutions passed 64.
|
||||
|
||||
** Interface pass (after phase 6)
|
||||
- *Multi-select.* The legend highlights any number of rocks; Show all
|
||||
clears it.
|
||||
- *Coverage.* Each legend entry shows its share of the visible map,
|
||||
counted from the drawn rock tiles' values.
|
||||
- *Find nearest* (=src/search.sex=).
|
||||
- Order: regions nearest the view centre first.
|
||||
- Sampling: every 16 blocks, on cores - 1 threads, each with its own
|
||||
generator.
|
||||
- Stopping: once the next region can't hold anything nearer.
|
||||
- Refinement: block by block in the 3 x 3 chunks around the hit.
|
||||
- Range: 24 regions, about 12,000 blocks.
|
||||
- Result: the view jumps there, and the column is pinned and probed.
|
||||
- Caveat: a patch smaller than the 16-block sampling can be missed.
|
||||
- *Pins.* Every probe drops a numbered pin; clicking a pin probes it
|
||||
again. The Probe window has Go to and Clear pins.
|
||||
- *Info panel.* Wider, one fact per line.
|
||||
- *Font.* A system monospace font with Cyrillic: Menlo, or DejaVu Sans
|
||||
Mono on Linux. Nuklear's built-in font is ASCII only, so a Cyrillic
|
||||
seed read from =serverconfig.json= showed as =??????=.
|
||||
- *Layout.* Panels are sized from the window at start; Probe sits left
|
||||
of the Layer panel.
|
||||
- *Command line.* =--find= and repeated =--highlight= for screenshot
|
||||
tests.
|
||||
|
||||
** Layers and Rocks window
|
||||
- *Base.* One base layer, opaque: Ocean, Rivers, or Terrain height (the
|
||||
default).
|
||||
- *Overlays.* Any number, drawn over the base with one opacity slider
|
||||
(default 50%): Landform, Climate, Geologic province, Upheaval, Rock
|
||||
strata thickness (with its stratum picker), Rock.
|
||||
- *Draw and queue order.* Layer by layer, base first; each layer's
|
||||
tiles nearest the centre first.
|
||||
- *Rocks window.* Always shown: mode, depth or Y, the legend with
|
||||
highlights, Find nearest. Coverage percentages appear while the Rock
|
||||
overlay is on.
|
||||
- *Rock overlay transparency.* Water, air, and every rock not
|
||||
highlighted are transparent, so the base shows through.
|
||||
- *Ticks.* Checkboxes and options get an accent; Nuklear's default
|
||||
draws a ticked box darker, as if empty.
|
||||
- *Tile cache.* Holds 65,536 tiles, since every region now has several.
|
||||
- *Command line.* =--base=, =--overlay= (repeatable) and =--opacity=
|
||||
replace =--layer=.
|
||||
|
||||
** Side panels
|
||||
- *Layout.* Two opaque panels, pinned to the window's edges every frame:
|
||||
- left, 310 points: World, Info and Probe;
|
||||
- right, 300 points: Layers and Rocks.
|
||||
Each section is a collapsible Nuklear tree tab.
|
||||
- *Map viewport.* The map is the rectangle between the panels. All
|
||||
world/window conversions, drawing (clipped), zoom-at-cursor, the
|
||||
visible tile range and the coverage counts use it, so the panels hide
|
||||
nothing and coverage counts only what is on screen.
|
||||
- *Default window.* 1600 x 960.
|
||||
- *Story locations checkbox.* Toggles the spawn and story markers; off
|
||||
by default.
|
||||
- *Rock under cursor checkbox.* A label beside the cursor naming the
|
||||
rock there in the Rocks mode (surface, depth or Y), or water, air or
|
||||
mantle.
|
||||
|
||||
** Hover worker
|
||||
- *The lag.* Info and the cursor label used to compute on the UI
|
||||
thread: a whole chunk of heights (about 11 ms) per new chunk, region
|
||||
maps per new region, and a river plate (80 ms) per new plate. Moving
|
||||
the cursor stalled frames, and the label lagged behind the cursor.
|
||||
- *The worker* (=src/hover.sex=). A thread with its own generators
|
||||
answers "what is at this block". The answer covers:
|
||||
- height;
|
||||
- the rock in the Rocks mode, and the surface rock;
|
||||
- landform, province, climate, ocean, upheaval;
|
||||
- river distance and bank depth.
|
||||
- *Newest only.* The viewer posts the cursor's block every frame. The
|
||||
worker takes the newest and drops stale requests; the viewer shows
|
||||
its newest answer.
|
||||
- *The label* moves with the cursor every frame, whatever the answer's
|
||||
age. While the worker owes an answer, the viewer keeps drawing.
|
||||
- *Single columns.* =terra/column-height= computes one column (about
|
||||
11 us). Probes on the main thread use it too.
|
||||
- *Test flag.* =--mouse X Y= places the cursor for screenshot tests.
|
||||
|
||||
** 7. Performance + polish
|
||||
- Level of detail:
|
||||
- zoomed out: one column per N blocks;
|
||||
|
||||
Reference in New Issue
Block a user