refactoring for row based code

This commit is contained in:
GoteGuru 2022-06-19 00:11:46 +02:00
parent b640f977b9
commit db49f1c924
7 changed files with 50 additions and 21 deletions

View file

@ -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