Goal
Explore using UnicodeMaps inside a terminal-UI framework — concretely
Tachikoma.jl — and, if it fits,
provide a reusable map widget (a pannable/zoomable panel) rather than only
the standalone worldmap / explore entry points.
Why it should fit
render(center, zoom; size = (w, h)) is stateless and returns a w × h grid of
braille chars + 24-bit colors. That maps directly onto Tachikoma's
Model / update! / view architecture and its Buffer / set_char! model:
- Model:
lon, lat, zoom, and a reusable TileSource (for its tile cache).
view(model, frame): render at the widget's area size, then blit each
cell into frame.buffer via set_char! (fg = cell color, bg = mc.background).
update!(model, event): arrow / + / - keys mutate lon/lat/zoom
(reuse the existing pan/zoom math).
Standalone explore() and frame() would not be used inside Tachikoma — the
framework owns the terminal, event loop and double-buffering; only the core
render() is reused.
Known caveat
Tile fetching is synchronous over HTTP. In a 60 fps loop, the first visit to
an uncached tile stalls a frame (~100–300 ms). Cached tiles are instant, so
revisiting is smooth, but exploring new areas hitches. The clean fix is async
tile loading (fetch in a Task, redraw when ready) — which would also benefit
the standalone explore().
Tasks
References
- Standalone interactive loop for comparison:
src/interactive.jl (explore).
- Renderer:
src/render.jl (render, pan_center).
Goal
Explore using
UnicodeMapsinside a terminal-UI framework — concretelyTachikoma.jl — and, if it fits,
provide a reusable map widget (a pannable/zoomable panel) rather than only
the standalone
worldmap/exploreentry points.Why it should fit
render(center, zoom; size = (w, h))is stateless and returns aw × hgrid ofbraille chars + 24-bit colors. That maps directly onto Tachikoma's
Model/update!/viewarchitecture and itsBuffer/set_char!model:lon,lat,zoom, and a reusableTileSource(for its tile cache).view(model, frame):renderat the widget'sareasize, then blit eachcell into
frame.bufferviaset_char!(fg = cell color, bg =mc.background).update!(model, event): arrow /+/-keys mutatelon/lat/zoom(reuse the existing pan/zoom math).
Standalone
explore()andframe()would not be used inside Tachikoma — theframework owns the terminal, event loop and double-buffering; only the core
render()is reused.Known caveat
Tile fetching is synchronous over HTTP. In a 60 fps loop, the first visit to
an uncached tile stalls a frame (~100–300 ms). Cached tiles are instant, so
revisiting is smooth, but exploring new areas hitches. The clean fix is async
tile loading (fetch in a
Task, redraw when ready) — which would also benefitthe standalone
explore().Tasks
mc.canvas.grid— e.g.
cells(mc)yielding(row, col, char, color, background).pan_center) for reuse in a hostupdate!.MapWidgetModel/update!/viewagainst Tachikoma's real APIand add it as an example (or an optional package extension).
References
src/interactive.jl(explore).src/render.jl(render,pan_center).