clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

archive/golden-reference
atlas / frontend / src / constants.js
constants.js 2.7K
1// Zones, grid cells, and categories without an archive color draw from this2// wheel. Mid-tone hues anchored on the identity's cerulean and earths: bright3// enough to read over world tiles under the white outset, muted enough not to4// shout over the neutral chrome.5export const palette = [6 "#4fb3d5", "#c9924b", "#82b56a", "#c96a6a", "#9581cc",7 "#4bc9a9", "#d4b04a", "#6a92c9", "#b08a5a", "#8fb3a2",8];910export const geohashAlphabet = "0123456789bcdefghjkmnpqrstuvwxyz";11export const geohashMaxDepth = 3;12export const overzoomLevels = 2;1314// A fragment rather than a path: the window has no address bar to make a path15// worth reading, the app can be mounted under a workspace prefix that a pushed16// path would navigate out of, and a fragment cannot 404. Slash-separated17// because both slugs contain dashes.18// The window is reopened far more often than it is refreshed, and reopening it19// to a default view discards work the reader did to reach where they were. The20// whole arrangement is kept: which map, which layer, where the view sits, what21// is filtered out and which groups are folded.22// The key carries the schema's generation: the unified hide-set writes ids of23// more than one kind under "hidden", which a build from before the legend24// tree would misread, and its sessions would misread us. A new key lets both25// vintages keep their own arrangements rather than corrupt each other's.26export const sessionKey = "atlas.session.v3";2728// The overview is drawn once per lens from the shallowest pyramid level big29// enough to read, then only the viewport rectangle moves.30export const overviewTargetSize = 168;3132export const outsetColors = {33 light: "rgba(255, 255, 255, 0.96)",34 dark: "rgba(7, 9, 7, 0.98)",35};3637// The geohash grid's one visual vocabulary. Both projections render from38// these numbers through gridCellVisual, so the chart and the globe cannot39// drift apart: line weight encodes the hierarchy the way MGRS grids weigh40// theirs, the chosen path draws in white over per-cell palette accents, and41// the label is a small chip in the cell's bottom-right corner -- the42// bounding-box convention -- spelling the full hash with its prefix faint43// and its final character bright, the principal digit of the address.44export const gridTheme = {45 labelSizePx: 11,46 neighborLabelSizePx: 10,47 labelInsetPx: 5,48 labelFont: "ui-monospace, SFMono-Regular, Menlo, monospace",49 prefixAlpha: 0.55,50 chip: "rgba(12, 15, 22, 0.76)",51 neighborChip: "rgba(8, 11, 18, 0.88)",52 lineWhite: "#ffffff",53 widths: { leaf: 2.5, scope: 2.5, scopeBare: 1.8, child: 1.4, neighbor: 1 },54 childLineAlpha: 0.82,55 neighborLineAlpha: 0.44,56 leafFillAlpha: 0.14,57 childFillAlpha: 0.055,58 neighborTextAlpha: 0.72,59 dimColor: "#050810",60 dimBase: 0.3,61 dimStep: 0.06,62 dimCap: 0.52,63};