automatic generation of japanese-styled map
- JavaScript 98.4%
- CSS 0.9%
- HTML 0.6%
| app.js | ||
| index.html | ||
| mapGenerator.js | ||
| names.js | ||
| README.md | ||
| renderer.js | ||
| styles.css | ||
| test.html | ||
| test.js | ||
Prefecture Map Generator v16 - Causal Terrain Cleanup Edition
This version is designed to run directly in VSCode with Live Server. No npm setup is required.
Run
- Open this folder in VSCode.
- Right-click
index.html. - Choose Open with Live Server.
Main changes in v16
- River action is much stronger.
erosionFieldanddepositionFieldnow produce clearer valleys, terraces, and alluvial lowlands. - Neighboring prefecture regions are generated as background territory with
prefectureRegionIdandregionalPrefectureBorders, so the current prefecture is no longer visually isolated. - River color now uses the same blue family as the sea; hierarchy is expressed by width and opacity.
- CBD/DID cells are sparser and restricted to dense, connected urban fabric.
- Railways, roads, and expressways are pruned for long-distance purpose; compact local tangles are rejected except for environmental ring segments.
- Expressway rings are rare. ICs are sampled at shorter intervals along expressway corridors.
- Bridge and tunnel icon rendering was removed. The legacy arrays remain empty for compatibility.
- Municipal regions are less likely to split small urban areas, while large cities claim larger municipality-like areas.
Existing systems retained
- River hierarchy: main rivers, tributaries, and small streams.
- Port classes: major, regional, fishing, lake.
- Major rail corridors first, then purposeful branches.
- Expressways avoid city centers; city access is represented through IC access roads.
- Castles are restricted to terrain/historical candidate sites.
- Default generated names and manual overrides are both managed in
names.js. - Continuous terrain rendering is always on.
Editing place names
Edit names.js.
export const CUSTOM_NAMES = {
"city-0": "Aohara",
"port-0": "Shirahama",
"castle-0": "Kurono"
};
Tests
Open test.html with Live Server to run the browser-side smoke tests, or run node --check *.js on the source files.