Skip to content

Draw the structures, and let an operator stop the map reading (#136) - #140

Merged
CaYatur merged 2 commits into
mainfrom
feat/map-icons-and-load-control
Jul 29, 2026
Merged

Draw the structures, and let an operator stop the map reading (#136)#140
CaYatur merged 2 commits into
mainfrom
feat/map-icons-and-load-control

Conversation

@CaYatur

@CaYatur CaYatur commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Draw the structures, and let an operator stop the map reading (#136)

Structures are glyphs now, not single letters in coloured dots: a house, a
chest, a stepped pyramid, a keep, a pickaxe, and a pin for anything
unrecognised. SVG path data in shared/mapIcons.ts rather than images — a
canvas builds a Path2D from a path string, so one definition serves the
desktop canvas, both web canvases and any HTML legend, with no asset to ship
and no blurring when it scales.

Each is a single filled silhouette. A marker is about sixteen device pixels
across, and anything with interior detail turns to mud at that size. They sit on
a dark disc ringed in the kind's colour, because a bare silhouette disappears
against terrain its own colour — a grey pickaxe on stone, a red chest on
netherrack.

Path2D is built once per kind and reused; constructing one per marker per
frame is parsing the same string hundreds of times a second.

And loading as the view moves is now a setting, on by default. Off, the map
draws what it already holds and asks for nothing more until you press "Load this
view" — so panning across a large world costs nothing at all. That is the answer
for a machine where the reading itself is the problem, and it is honest about
the trade: new ground stays blank until you ask for it.

The performance settings say what they are. They persist on the server and
every surface reads the same tiles, so sitting in a map toolbar they read as a
preference of that window. Both the desktop and the panel now say plainly that
a change there applies to the app, the panel and the public site alike.

Asserted: every glyph starts with a move, closes, stays inside the box it claims
(a path that leaves it will not sit where it is placed), carries a colour and a
label, and an unrecognised kind still gets one. new Path2D throws nothing on
malformed data — it renders an empty shape — so a typo would otherwise be a
marker with a hole in it and no error anywhere.

**Structures are glyphs now**, not single letters in coloured dots: a house, a
chest, a stepped pyramid, a keep, a pickaxe, and a pin for anything
unrecognised. SVG path data in `shared/mapIcons.ts` rather than images — a
canvas builds a `Path2D` from a path string, so one definition serves the
desktop canvas, both web canvases and any HTML legend, with no asset to ship
and no blurring when it scales.

Each is a single filled silhouette. A marker is about sixteen device pixels
across, and anything with interior detail turns to mud at that size. They sit on
a dark disc ringed in the kind's colour, because a bare silhouette disappears
against terrain its own colour — a grey pickaxe on stone, a red chest on
netherrack.

`Path2D` is built once per kind and reused; constructing one per marker per
frame is parsing the same string hundreds of times a second.

**And loading as the view moves is now a setting**, on by default. Off, the map
draws what it already holds and asks for nothing more until you press "Load this
view" — so panning across a large world costs nothing at all. That is the answer
for a machine where the reading itself is the problem, and it is honest about
the trade: new ground stays blank until you ask for it.

**The performance settings say what they are.** They persist on the server and
every surface reads the same tiles, so sitting in a map toolbar they read as a
preference of that window. Both the desktop and the panel now say plainly that
a change there applies to the app, the panel and the public site alike.

Asserted: every glyph starts with a move, closes, stays inside the box it claims
(a path that leaves it will not sit where it is placed), carries a colour and a
label, and an unrecognised kind still gets one. `new Path2D` throws nothing on
malformed data — it renders an empty shape — so a typo would otherwise be a
marker with a hole in it and no error anywhere.
Copilot AI review requested due to automatic review settings July 29, 2026 11:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

…end nobody could read

I wrote "a change here applies to the app, the panel and the public site alike"
into the settings UI, and the public site ignored `loadOnPan` entirely. The feed
carries it now, so a visitor cannot spend more of the server's budget than the
operator allowed — and the sentence is true.

`MAP.loadOnPan` was also never initialised, so the fetch guard worked by
`undefined !== false` happening to be true. That is a coincidence, not a
default.

`iconSvg` was exported and used by nothing but its own test. It builds the map's
icon key now, because glyphs nobody can name are decoration — and that turned up
the real defect: it called `iconFor`, which is the stringified-helper trap from
#116. Embedded into a page, a function that calls another throws a
`ReferenceError` the moment the bundler renames the callee, with nothing wrong
in the source. It is self-contained, both pages define the table under the exact
identifier it reads, and the embedded-copy check in the smoke now covers it
alongside `avatarUrl` and `itemIconUrl`.

Two backticks in comments inside template literals, again. The gate run before
this one was against a stale build and told me nothing; the green above is a
fresh one.
@CaYatur

CaYatur commented Jul 29, 2026

Copy link
Copy Markdown
Owner Author

Self-review: the setting I said applies everywhere did not, and a legend nobody could read

I wrote "a change here applies to the app, the panel and the public site alike"
into the settings UI, and the public site ignored loadOnPan entirely. The feed
carries it now, so a visitor cannot spend more of the server's budget than the
operator allowed — and the sentence is true.

MAP.loadOnPan was also never initialised, so the fetch guard worked by
undefined !== false happening to be true. That is a coincidence, not a
default.

iconSvg was exported and used by nothing but its own test. It builds the map's
icon key now, because glyphs nobody can name are decoration — and that turned up
the real defect: it called iconFor, which is the stringified-helper trap from
#116. Embedded into a page, a function that calls another throws a
ReferenceError the moment the bundler renames the callee, with nothing wrong
in the source. It is self-contained, both pages define the table under the exact
identifier it reads, and the embedded-copy check in the smoke now covers it
alongside avatarUrl and itemIconUrl.

Two backticks in comments inside template literals, again. The gate run before
this one was against a stale build and told me nothing; the green above is a
fresh one.

@CaYatur
CaYatur merged commit df43398 into main Jul 29, 2026
@CaYatur
CaYatur deleted the feat/map-icons-and-load-control branch July 29, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants