mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
refactor: submap - start
This commit is contained in:
parent
26b659a59e
commit
58ccd238f6
8 changed files with 486 additions and 522 deletions
270
index.html
270
index.html
|
|
@ -1081,8 +1081,14 @@
|
|||
id="styleGridSizeFriendly"
|
||||
data-tip="Distance between grid cell centers (in map scale)"
|
||||
></output>
|
||||
<a href="https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Scale-and-distance#grids" target="_blank">
|
||||
<span data-tip="Open wiki article scale and distance to know about grid scale" class="icon-info-circled pointer"></span>
|
||||
<a
|
||||
href="https://github.com/Azgaar/Fantasy-Map-Generator/wiki/Scale-and-distance#grids"
|
||||
target="_blank"
|
||||
>
|
||||
<span
|
||||
data-tip="Open wiki article scale and distance to know about grid scale"
|
||||
class="icon-info-circled pointer"
|
||||
></span>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
@ -1834,6 +1840,7 @@
|
|||
<select id="azgaarAssistant" data-stored="azgaarAssistant">
|
||||
<option value="show" selected>Show</option>
|
||||
<option value="hide">Hide</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
|
@ -2179,8 +2186,8 @@
|
|||
|
||||
<div class="separator">Create</div>
|
||||
<div class="grid">
|
||||
<button id="openSubmapMenu" data-tip="Click to generate a submap from the current viewport">Submap</button>
|
||||
<button id="openResampleMenu" data-tip="Click to transform the map">Transform</button>
|
||||
<button id="openSubmapTool" data-tip="Click to generate a submap from the current viewport">Submap</button>
|
||||
<button id="openTransformTool" data-tip="Click to transform the map">Transform</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -2418,7 +2425,9 @@
|
|||
|
||||
<div id="exitCustomization">
|
||||
<div data-tip="Drag to move the pane">
|
||||
<button data-tip="Finalize the heightmap and exit the edit mode" id="finalizeHeightmap">Exit Customization</button>
|
||||
<button data-tip="Finalize the heightmap and exit the edit mode" id="finalizeHeightmap">
|
||||
Exit Customization
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -3512,7 +3521,11 @@
|
|||
<button id="burgEditEmblem" data-tip="Edit emblem" class="icon-shield-alt"></button>
|
||||
<button id="burgTogglePreview" data-tip="Toggle preview" class="icon-map"></button>
|
||||
<button id="burgLocate" data-tip="Zoom map and center view in the burg" class="icon-target"></button>
|
||||
<button id="burgRelocate" data-tip="Relocate burg. Click on map to move the burg" class="icon-map-pin"></button>
|
||||
<button
|
||||
id="burgRelocate"
|
||||
data-tip="Relocate burg. Click on map to move the burg"
|
||||
class="icon-map-pin"
|
||||
></button>
|
||||
<button id="burglLegend" data-tip="Edit free text notes (legend) for this burg" class="icon-edit"></button>
|
||||
<button id="burgLock" class="icon-lock-open" onmouseover="showElementLockTip(event)"></button>
|
||||
<button
|
||||
|
|
@ -5297,7 +5310,9 @@
|
|||
>
|
||||
Population
|
||||
</div>
|
||||
<div data-tip="Click to sort by burg features" class="sortable alphabetically" data-sortby="features">Features </div>
|
||||
<div data-tip="Click to sort by burg features" class="sortable alphabetically" data-sortby="features">
|
||||
Features
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="burgsBody" class="table"></div>
|
||||
|
|
@ -5751,6 +5766,104 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="submapTool" style="display: none" class="dialog">
|
||||
<p style="font-weight: bold">
|
||||
This operation is destructive and irreversible. It will create a completely new map based on the current one.
|
||||
Don't forget to save the current project as a .map file first!
|
||||
</p>
|
||||
|
||||
<p>Settings to be changed: population rate, map pixel size</p>
|
||||
<p>
|
||||
Data to be copied: heightmap, biomes, religions, population, precipitation, cultures, states, provinces,
|
||||
military regiments
|
||||
</p>
|
||||
<p>Data to be regenerated: zones, routes, rivers</p>
|
||||
<p>Burgs may be remapped incorrectly, manual change is required</p>
|
||||
|
||||
<p>Keep data for:</p>
|
||||
<div data-tip="Lock all markers copied from the original map">
|
||||
<input id="submapLockMarkers" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapLockMarkers" class="checkbox-label">Markers</label>
|
||||
</div>
|
||||
<div data-tip="Lock all burgs copied from the original map">
|
||||
<input id="submapLockBurgs" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapLockBurgs" class="checkbox-label">Burgs</label>
|
||||
</div>
|
||||
|
||||
<p>Experimental features:</p>
|
||||
<div data-tip="Rivers on the parent map will errode land (helps to get similar river network)">
|
||||
<input id="submapDepressRivers" class="checkbox" type="checkbox" />
|
||||
<label for="submapDepressRivers" class="checkbox-label">Errode riverbeds</label>
|
||||
</div>
|
||||
<div data-tip="Rescale styles (burg labels, emblem size) to match the new scale">
|
||||
<input id="submapRescaleStyles" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapRescaleStyles" class="checkbox-label">Rescale styles</label>
|
||||
</div>
|
||||
<div data-tip="Move all existing towns to the 'largetown' burg group">
|
||||
<input id="submapPromoteTowns" class="checkbox" type="checkbox" />
|
||||
<label for="submapPromoteTowns" class="checkbox-label">Promote towns to largetowns</label>
|
||||
</div>
|
||||
<div data-tip="Add lakes in depressions (can be very slow on big landmasses)">
|
||||
<input id="submapAddLakeInDepression" class="checkbox" type="checkbox" />
|
||||
<label for="submapAddLakeInDepression" class="checkbox-label">Add lakes in depressions (slow)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="transformTool" style="display: none" class="dialog">
|
||||
<div style="padding-top: 0.5em; width: 40em; font-weight: bold">
|
||||
This operation is destructive and irreversible. It will create a completely new map based on the current one.
|
||||
Don't forget to save the .map file to your machine first!
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="transformToolBody"
|
||||
style="
|
||||
padding: 0.5em 0;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: repeat(5, 1fr);
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<div>Points number</div>
|
||||
<div>
|
||||
<input id="transformPointsInput" type="range" min="1" max="13" value="4" />
|
||||
<output id="transformPointsFormatted" style="color: #053305">10K</output>
|
||||
</div>
|
||||
|
||||
<div>Shift</div>
|
||||
<div>
|
||||
<label>X: <input id="transformShiftX" type="number" size="4" value="0" /></label>
|
||||
<label>Y: <input id="transformShiftY" type="number" size="4" value="0" /></label>
|
||||
</div>
|
||||
|
||||
<div>Rotate</div>
|
||||
<div>
|
||||
<input id="transformAngleInput" type="range" min="0" max="359" value="0" />
|
||||
<output id="transformAngleOutput">0</output>°
|
||||
</div>
|
||||
|
||||
<div>Scale</div>
|
||||
<div>
|
||||
<input id="transformScaleInput" type="range" min="-25" max="25" value="0" />
|
||||
<output id="transformScaleResult">1</output>x
|
||||
</div>
|
||||
|
||||
<div>Mirror</div>
|
||||
<div style="display: flex; gap: 0.5em">
|
||||
<input type="checkbox" class="checkbox" id="transformMirrorH" />
|
||||
<label for="transformMirrorH" class="checkbox-label">horizontally</label>
|
||||
<input type="checkbox" class="checkbox" id="transformMirrorV" />
|
||||
<label for="transformMirrorV" class="checkbox-label">vertically</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="transformPreview" style="position: relative; overflow: hidden; outline: 1px solid #666">
|
||||
<canvas id="transformPreviewCanvas" style="position: absolute; transform-origin: center"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="options3d" class="dialog stable" style="display: none">
|
||||
<div id="options3dMesh" style="display: none">
|
||||
<div data-tip="Set map rotation speed. Set to 0 is you want to toggle off the rotation">
|
||||
|
|
@ -6070,105 +6183,6 @@
|
|||
<div id="tileStatus" style="font-style: italic"></div>
|
||||
</div>
|
||||
|
||||
<div id="resampleDialog" style="display: none" class="dialog">
|
||||
<div style="width: 34em; max-width: 80vw; font-weight: bold; padding: 6px">
|
||||
This operation is destructive and irreversible. It will create a completely new map based on the current one.
|
||||
Don't forget to save the current project to your machine first!
|
||||
</div>
|
||||
|
||||
<div
|
||||
style="
|
||||
width: auto;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: repeat(5, 1fr);
|
||||
align-items: center;
|
||||
padding: 0.5em;
|
||||
"
|
||||
>
|
||||
<div>Points number</div>
|
||||
<div>
|
||||
<input id="submapPointsInput" type="range" min="1" max="13" value="4" />
|
||||
<output id="submapPointsOutputFormatted" style="color: #053305">10K</output>
|
||||
</div>
|
||||
|
||||
<div>Shift</div>
|
||||
<div>
|
||||
<label>X: <input id="submapShiftX" type="number" size="4" value="0" /></label>
|
||||
<label>Y: <input id="submapShiftY" type="number" size="4" value="0" /></label>
|
||||
</div>
|
||||
|
||||
<div>Rotate</div>
|
||||
<div>
|
||||
<input id="submapAngleInput" type="range" min="0" max="359" value="0" />
|
||||
<output id="submapAngleOutput">0</output>°
|
||||
</div>
|
||||
|
||||
<div>Scale</div>
|
||||
<div>
|
||||
<input id="submapScaleInput" type="range" min="-25" max="25" value="0" />
|
||||
<output id="submapScaleOutput">1</output>x
|
||||
</div>
|
||||
|
||||
<div>Mirror</div>
|
||||
<div>
|
||||
<input type="checkbox" class="checkbox" id="submapMirrorH" />
|
||||
<label for="submapMirrorH" class="checkbox-label">horizontally</label>
|
||||
|
||||
<input type="checkbox" class="checkbox" id="submapMirrorV" />
|
||||
<label for="submapMirrorV" class="checkbox-label">vertically</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="submapPreview"
|
||||
style="border: 1px solid #666; margin: 1em auto; overflow: hidden; position: relative"
|
||||
></div>
|
||||
</div>
|
||||
|
||||
<div id="submapOptionsDialog" style="display: none" class="dialog">
|
||||
<p style="font-weight: bold">
|
||||
This operation is destructive and irreversible. It will create a completely new map based on the current one.
|
||||
Don't forget to save the current project as a .map file first!
|
||||
</p>
|
||||
|
||||
<p>Settings to be changed: population rate, map pixel size</p>
|
||||
<p>
|
||||
Data to be copied: heightmap, biomes, religions, population, precipitation, cultures, states, provinces,
|
||||
military regiments
|
||||
</p>
|
||||
<p>Data to be regenerated: zones, routes, rivers</p>
|
||||
<p>Burgs may be remapped incorrectly, manual change is required</p>
|
||||
|
||||
<p>Keep data for:</p>
|
||||
<div data-tip="Lock all markers copied from the original map">
|
||||
<input id="submapLockMarkers" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapLockMarkers" class="checkbox-label">Markers</label>
|
||||
</div>
|
||||
<div data-tip="Lock all burgs copied from the original map">
|
||||
<input id="submapLockBurgs" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapLockBurgs" class="checkbox-label">Burgs</label>
|
||||
</div>
|
||||
|
||||
<p>Experimental features:</p>
|
||||
<div data-tip="Rivers on the parent map will errode land (helps to get similar river network)">
|
||||
<input id="submapDepressRivers" class="checkbox" type="checkbox" />
|
||||
<label for="submapDepressRivers" class="checkbox-label">Errode riverbeds</label>
|
||||
</div>
|
||||
<div data-tip="Rescale styles (burg labels, emblem size) to match the new scale">
|
||||
<input id="submapRescaleStyles" class="checkbox" type="checkbox" checked />
|
||||
<label for="submapRescaleStyles" class="checkbox-label">Rescale styles</label>
|
||||
</div>
|
||||
<div data-tip="Move all existing towns to the 'largetown' burg group">
|
||||
<input id="submapPromoteTowns" class="checkbox" type="checkbox" />
|
||||
<label for="submapPromoteTowns" class="checkbox-label">Promote towns to largetowns</label>
|
||||
</div>
|
||||
<div data-tip="Add lakes in depressions (can be very slow on big landmasses)">
|
||||
<input id="submapAddLakeInDepression" class="checkbox" type="checkbox" />
|
||||
<label for="submapAddLakeInDepression" class="checkbox-label">Add lakes in depressions (slow)</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="alert" style="display: none" class="dialog">
|
||||
<p id="alertMessage">Warning!</p>
|
||||
</div>
|
||||
|
|
@ -7837,32 +7851,57 @@
|
|||
<pattern id="pattern_square" width="25" height="25" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 25 0 L 0 0 0 25" />
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_pointyHex" width="25" height="43.4" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 0,0 12.5,7.2 25,0 M 12.5,21.7 V 7.2 Z M 0,43.4 V 28.9 L 12.5,21.7 25,28.9 v 14.5" />
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_flatHex" width="43.4" height="25" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 43.4,0 36.2,12.5 43.4,25 M 21.7,12.5 H 36.2 Z M 0,0 H 14.5 L 21.7,12.5 14.5,25 H 0" />
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_square45deg" width="35.355" height="35.355" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 0 0 L 35.355 35.355 M 0 35.355 L 35.355 0" />
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_squareTruncated" width="25" height="25" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 8.33 25 L 0 16.66 V 8.33 L 8.33 0 16.66 0 25 8.33 M 16.66 25 L 25 16.66 L 25 8.33 M 8.33 25 L 16.66 25" />
|
||||
<path
|
||||
d="M 8.33 25 L 0 16.66 V 8.33 L 8.33 0 16.66 0 25 8.33 M 16.66 25 L 25 16.66 L 25 8.33 M 8.33 25 L 16.66 25"
|
||||
/>
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_squareTetrakis" width="25" height="25" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 25 0 L 0 0 0 25 M 0 0 L 25 25 M 0 25 L 25 0 M 12.5 0 L 12.5 25 M 0 12.5 L 25 12.5 M 0 25 L 25 25 L 25 0" />
|
||||
<path
|
||||
d="M 25 0 L 0 0 0 25 M 0 0 L 25 25 M 0 25 L 25 0 M 12.5 0 L 12.5 25 M 0 12.5 L 25 12.5 M 0 25 L 25 25 L 25 0"
|
||||
/>
|
||||
</pattern>
|
||||
<pattern id="pattern_triangleHorizontal" width="41.76" height="72.33" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 41.76 36.165 H 0 L 20.88 0 41.76 36.165 20.88 72.33 0 36.165 M 0 0 H 72.33 M 0 72.33 L 41.76 72.33" />
|
||||
|
||||
<pattern
|
||||
id="pattern_triangleHorizontal"
|
||||
width="41.76"
|
||||
height="72.33"
|
||||
patternUnits="userSpaceOnUse"
|
||||
fill="none"
|
||||
>
|
||||
<path
|
||||
d="M 41.76 36.165 H 0 L 20.88 0 41.76 36.165 20.88 72.33 0 36.165 M 0 0 H 72.33 M 0 72.33 L 41.76 72.33"
|
||||
/>
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_triangleVertical" width="72.33" height="41.76" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 36.165 0 L 0 20.88 36.165 41.76 72.33 20.88 36.165 0 V 41.76 M 0 0 V 72.33 M 72.33 0 L 72.33 41.76">
|
||||
<path
|
||||
d="M 36.165 0 L 0 20.88 36.165 41.76 72.33 20.88 36.165 0 V 41.76 M 0 0 V 72.33 M 72.33 0 L 72.33 41.76"
|
||||
/>
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_trihexagonal" width="25" height="43.4" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 25 10.85 H 0 L 18.85 43.4 25 32.55 H 0 L 18.85 0 25 10.85" />
|
||||
</pattern>
|
||||
|
||||
<pattern id="pattern_rhombille" width="82.5" height="50" patternUnits="userSpaceOnUse" fill="none">
|
||||
<path d="M 13.8 50 L 0 25 13.8 0 H 41.2 L 27.5 25 41.2 50 55 25 41.2 0 68.8 0 82.5 25 68.8 50 M 0 25 H 27.5 M 55 25 H 82.5 M 13.8 50 H 41.2 L 68.8 50" />
|
||||
<path
|
||||
d="M 13.8 50 L 0 25 13.8 0 H 41.2 L 27.5 25 41.2 50 55 25 41.2 0 68.8 0 82.5 25 68.8 50 M 0 25 H 27.5 M 55 25 H 82.5 M 13.8 50 H 41.2 L 68.8 50"
|
||||
/>
|
||||
</pattern>
|
||||
</g>
|
||||
|
||||
|
|
@ -8062,7 +8101,7 @@
|
|||
<script src="modules/markers-generator.js?v=1.104.0"></script>
|
||||
<script src="modules/zones-generator.js?v=1.104.0"></script>
|
||||
<script src="modules/coa-generator.js?v=1.99.00"></script>
|
||||
<script src="modules/submap.js?v=1.104.0"></script>
|
||||
<script src="modules/submap.js?v=1.105.13"></script>
|
||||
<script src="libs/alea.min.js?v1.105.0"></script>
|
||||
<script src="libs/polylabel.min.js?v1.105.0"></script>
|
||||
<script src="libs/lineclip.min.js?v1.105.0"></script>
|
||||
|
|
@ -8078,7 +8117,7 @@
|
|||
<script defer src="modules/relief-icons.js?v=1.99.05"></script>
|
||||
<script defer src="modules/ui/style.js?v=1.104.0"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.105.11"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.105.12"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.105.13"></script>
|
||||
<script defer src="modules/ui/world-configurator.js?v=1.105.4"></script>
|
||||
<script defer src="modules/ui/heightmap-editor.js?v=1.105.2"></script>
|
||||
<script defer src="modules/ui/provinces-editor.js?v=1.104.0"></script>
|
||||
|
|
@ -8113,7 +8152,8 @@
|
|||
<script defer src="modules/ui/emblems-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/markers-editor.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/3d.js?v=1.99.00"></script>
|
||||
<script defer src="modules/ui/submap.js?v=1.99.10"></script>
|
||||
<script defer src="modules/ui/submap-tool.js?v=1.105.13"></script>
|
||||
<script defer src="modules/ui/transform-tool.js?v=1.105.13"></script>
|
||||
<script defer src="modules/ui/hotkeys.js?v=1.104.0"></script>
|
||||
<script defer src="modules/coa-renderer.js?v=1.99.00"></script>
|
||||
<script defer src="libs/rgbquant.min.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue