From 66d22f26c0b9d6e5bf6e2170ac5d15c41834d830 Mon Sep 17 00:00:00 2001 From: Azgaar Date: Thu, 12 Dec 2024 13:11:54 +0100 Subject: [PATCH] [Draft] Submap refactoring (#1153) * refactor: submap - start * refactor: submap - continue * Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring * refactor: submap - relocate burgs * refactor: submap - restore routes * refactor: submap - restore lake names * refactor: submap - UI update * refactor: submap - restore river and biome data * refactor: submap - simplify options * refactor: submap - restore rivers * refactor: submap - recalculateMapSize * refactor: submap - add middle points * refactor: submap - don't add middle points, unified findPath fn * chore: update version * feat: submap - relocate out of map regiments * feat: submap - fix route gen * feat: submap - allow custom number of cells * feat: submap - add checkbox submapRescaleBurgStyles * feat: submap - update version hash * chore: supporters update --------- Co-authored-by: Azgaar --- index.html | 298 +++++++++++++++------------- main.js | 19 +- modules/burgs-and-states.js | 3 +- modules/resample.js | 365 +++++++++++++++++++++++++++++++++++ modules/river-generator.js | 64 +++--- modules/routes-generator.js | 234 +++++++--------------- modules/ui/layers.js | 4 +- modules/ui/options.js | 8 +- modules/ui/rivers-creator.js | 28 +-- modules/ui/rivers-editor.js | 18 +- modules/ui/submap-tool.js | 95 +++++++++ modules/ui/submap.js | 332 ------------------------------- modules/ui/tools.js | 50 +++-- modules/ui/transform-tool.js | 201 +++++++++++++++++++ utils/graphUtils.js | 6 +- utils/pathUtils.js | 57 ++++++ utils/shorthands.js | 2 + versioning.js | 4 +- 18 files changed, 1043 insertions(+), 745 deletions(-) create mode 100644 modules/resample.js create mode 100644 modules/ui/submap-tool.js delete mode 100644 modules/ui/submap.js create mode 100644 modules/ui/transform-tool.js diff --git a/index.html b/index.html index 304a757e..8a268152 100644 --- a/index.html +++ b/index.html @@ -1081,8 +1081,14 @@ id="styleGridSizeFriendly" data-tip="Distance between grid cell centers (in map scale)" > - - + + @@ -1834,6 +1840,7 @@ @@ -2179,8 +2186,8 @@
Create
- - + +
@@ -2418,7 +2425,9 @@
- +
@@ -3512,7 +3521,11 @@ - +