How mercurial20/loremapper works
Loremapper is a browser-based fantasy map editor. Users create or open a planet or flat map, generate or sculpt terrain, add geographic and story features, inspect the result, and save or export it locally. The graph preserves the documented generation, editing, projection, fog-of-war, and asset capabilities. Several subsystem connections rely on the source index or README rather than inspected implementation details; those limits are reflected in the cited evidence.
Main entry points: docStore.ts Document state · App.tsx Editor shell · ToolController.ts Editing tools · geography.ts Geography editing
Components 20
Editor experience
- Editor shell
src/App.tsx - Map creation
src/ui/NewMap.tsx - Editing tools
src/tools/ToolController.ts - Feature inspector
src/ui/panels/SelectionInspector.tsx - Asset library
src/ui/panels/AssetPanel.tsx
Terrain and geography
- Terrain model
src/terrain/TerrainModel.ts - World generation
src/terrain/generator.ts - Geography editing
src/editor/geography.ts - Water features
src/terrain/lakes.ts
Map data and storage
- Map document
src/model/types.ts - Document state
src/store/docStore.ts - Project persistence
src/persistence/projects.ts - Browser database
src/persistence/db.ts
Rendering and export
- Map renderer
src/render/MapRenderer.ts - Map view
src/ui/MapView.tsx - Projections
src/core/projections.ts - Map export
src/editor/exporter.ts - Projected export
src/editor/projectedExport.ts
Shared services
- Usage analytics
src/analytics.ts
Other components
- Mapmaker
Connections 22
- Mapmaker → Editor shell: uses
- Editor shell → Map creation: opens
src/App.tsx - Map creation → World generation: configures
- World generation → Terrain model: builds terrain
- Editor shell → Editing tools: hosts editing
- Editing tools → Document state: commits edits
src/tools/ToolController.ts - Editing tools → Geography editing: uses
src/tools/ToolController.ts - Geography editing → Terrain model: edits terrain
src/editor/geography.ts - Geography editing → Water features: uses
- Feature inspector → Document state: reads selection
src/ui/panels/SelectionInspector.tsx - Document state → Map document: stores
src/store/docStore.ts - Document state → Usage analytics: tracks edits
src/store/docStore.ts - Project persistence → Browser database: persists projects
src/persistence/projects.ts - Editor shell → Map view: displays
src/App.tsx - Map view → Map renderer: renders map
- Map renderer → Terrain model: draws terrain
- Mapmaker → Asset library: adds artwork
- Mapmaker → Map export: exports map
- Map export → Projected export: supports projections
src/editor/projectedExport.ts - Projected export → Projections: projects map
src/editor/projectedExport.ts - Mapmaker → Projections: chooses view
- Mapmaker → Document state: edits document