refactor(es modules): migrate numberUtils

This commit is contained in:
Azgaar 2022-06-26 02:11:36 +03:00
parent b425a9daf6
commit ad252b54e6
63 changed files with 97 additions and 56 deletions

View file

@ -22,11 +22,14 @@ import {
isLand,
shouldRegenerateGrid
} from "./utils/graphUtils";
import {rn, minmax, normalize} from "./utils/numberUtils";
import {byId} from "./utils/shorthands";
import "./components";
addGlobalListeners();
const d3 = window.d3;
window.fmg = {
modules: {}
};
@ -51,8 +54,8 @@ rulers = new Rulers();
biomesData = Biomes.getDefault();
nameBases = Names.getNameBases(); // cultures-related data
color = d3.scaleSequential(d3.interpolateSpectral); // default color scheme
lineGen = d3.line().curve(d3.curveBasis); // d3 line generator with default curve interpolation
// color = d3.scaleSequential(d3.interpolateSpectral); // default color scheme
// lineGen = d3.line().curve(d3.curveBasis); // d3 line generator with default curve interpolation
// voronoi graph extension, cannot be changed after generation
graphWidth = +byId("mapWidthInput").value;