You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Draw the structures, and let an operator stop the map reading (#136) (#140)
* 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.
* 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.
Copy file name to clipboardExpand all lines: src/renderer/src/locales/en.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,12 @@ export default {
127
127
heads: 'Heads',
128
128
goTo: 'Centre the map here',
129
129
performance: 'Performance',
130
+
perfScope:
131
+
'These are settings for THIS SERVER, not for this window — the app, the web panel and the public site all read the same tiles, so a change here applies to every one of them.',
132
+
perfPan: 'Keep loading as the view moves',
133
+
perfPanHint:
134
+
'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.',
135
+
loadHere: 'Load this view',
130
136
perfCache: 'Cache parsed tiles on disk',
131
137
perfCacheHint:
132
138
'A region costs a few hundred milliseconds to parse and about a millisecond to read back. With this on, a region is parsed once and re-parsed only when the server rewrites it.',
Copy file name to clipboardExpand all lines: src/renderer/src/locales/tr.ts
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -129,6 +129,12 @@ const tr: typeof en = {
129
129
heads: 'Kafalar',
130
130
goTo: 'Haritayı buraya ortala',
131
131
performance: 'Performans',
132
+
perfScope:
133
+
'Bunlar BU SUNUCUNUN ayarları, bu pencerenin değil — uygulama, web paneli ve herkese açık site aynı parçaları okur, yani burada yapılan değişiklik hepsine uygulanır.',
134
+
perfPan: 'Görünüm hareket ettikçe yüklemeye devam et',
135
+
perfPanHint:
136
+
'Kapalıyken harita elindekini çizer ve “Bu görünümü yükle” demeden başka bir şey istemez — böylece büyük bir dünyada gezinmek hiçbir maliyet çıkarmaz.',
137
+
loadHere: 'Bu görünümü yükle',
132
138
perfCache: 'Çözümlenmiş parçaları diskte önbelleğe al',
133
139
perfCacheHint:
134
140
'Bir bölgeyi çözümlemek birkaç yüz milisaniye, geri okumak yaklaşık bir milisaniye sürer. Bu açıkken bir bölge bir kez çözümlenir ve yalnızca sunucu onu yeniden yazdığında tekrar çözümlenir.',
0 commit comments