mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
refactoring for row based code
This commit is contained in:
parent
b640f977b9
commit
db49f1c924
7 changed files with 50 additions and 21 deletions
|
|
@ -169,6 +169,7 @@ window.UISubmap = (function () {
|
|||
WARN && console.warn("Resampling current map");
|
||||
const cellNumId = +byId("submapPointsInput").value;
|
||||
if (!cellsDensityMap[cellNumId]) return console.error("Unknown cell number!");
|
||||
const gridAlgorithm = window[document.getElementById('gridAlgorithm').value];
|
||||
|
||||
const {angle, shiftX, shiftY, ratio, mirrorH, mirrorV} = getTransformInput();
|
||||
|
||||
|
|
@ -203,6 +204,7 @@ window.UISubmap = (function () {
|
|||
smoothHeightMap: false,
|
||||
rescaleStyles: false,
|
||||
scale: 1,
|
||||
gridAlgorithm,
|
||||
projection,
|
||||
inverse
|
||||
});
|
||||
|
|
@ -229,7 +231,8 @@ window.UISubmap = (function () {
|
|||
smoothHeightMap: scale > 2,
|
||||
inverse: (x, y) => [x / origScale + x0, y / origScale + y0],
|
||||
projection: (x, y) => [(x - x0) * origScale, (y - y0) * origScale],
|
||||
scale: origScale
|
||||
scale: origScale,
|
||||
gridAlgorithm: window[byId('gridAlgorithm').value],
|
||||
};
|
||||
|
||||
// converting map position on the planet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue