refactor(es modules): dissolve general.js

This commit is contained in:
Azgaar 2022-06-30 00:17:28 +03:00
parent 9206f46c42
commit 2e4d142cf7
90 changed files with 802 additions and 749 deletions

View file

@ -1,4 +1,4 @@
import {clipPoly} from "/src/utils/lineUtils";
import {clipPoly} from "utils/lineUtils";
export function drawBiomes() {
TIME && console.time("drawBiomes");

View file

@ -1,4 +1,4 @@
import {getGridPolygon} from "/src/utils/graphUtils";
import {getGridPolygon} from "utils/graphUtils";
export function drawCells() {
cells.selectAll("path").remove();

View file

@ -1,6 +1,6 @@
import {rn} from "/src/utils/numberUtils";
import {round} from "/src/utils/stringUtils";
import {byId} from "/src/utils/shorthands";
import {rn} from "utils/numberUtils";
import {round} from "utils/stringUtils";
import {byId} from "utils/shorthands";
export function drawCoordinates() {
coordinates.selectAll("*").remove(); // remove every time

View file

@ -1,6 +1,6 @@
import {getProvincesVertices} from "./drawProvinces";
import {minmax, rn} from "/src/utils/numberUtils";
import {byId} from "/src/utils/shorthands";
import {minmax, rn} from "utils/numberUtils";
import {byId} from "utils/shorthands";
export function drawEmblems() {
const {states, provinces, burgs} = pack;

View file

@ -1,4 +1,4 @@
import {getColorScheme, getHeightColor} from "/src/utils/colorUtils";
import {getColorScheme, getHeightColor} from "utils/colorUtils";
export function drawHeightmap() {
terrs.selectAll("*").remove();

View file

@ -1,4 +1,4 @@
import {getGridPolygon} from "/src/utils/graphUtils";
import {getGridPolygon} from "utils/graphUtils";
export function drawIce() {
const {cells, vertices} = grid;

View file

@ -1,4 +1,4 @@
import {rn} from "/src/utils/numberUtils";
import {rn} from "utils/numberUtils";
const pinShapeMap = {
bubble: (stroke, fill) =>

View file

@ -1,4 +1,4 @@
import {convertTemperature} from "/src/utils/unitUtils";
import {convertTemperature} from "utils/unitUtils";
export function drawTemperature() {
temperature.selectAll("*").remove();

View file

@ -1,4 +1,4 @@
import {TIME} from "/src/config/logging";
import {TIME} from "config/logging";
import {drawBiomes} from "./drawBiomes";
import {drawBorders} from "./drawBorders";
import {drawCells} from "./drawCells";

View file

@ -1,6 +1,6 @@
import {tip} from "/src/scripts/tooltips";
import {getBase64} from "/src/utils/functionUtils";
import {isCtrlClick} from "/src/utils/keyboardUtils";
import {tip} from "scripts/tooltips";
import {getBase64} from "utils/functionUtils";
import {isCtrlClick} from "utils/keyboardUtils";
import {turnLayerButtonOn, turnLayerButtonOff, layerIsOn} from "./utils";
import {renderLayer} from "./renderers";