mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
refactor(es modules): temporary remove alias
This commit is contained in:
parent
4814bce58d
commit
4feed39d5c
68 changed files with 165 additions and 148 deletions
11
src/main.ts
11
src/main.ts
|
|
@ -1,6 +1,8 @@
|
|||
// Azgaar (azgaar.fmg@yandex.com). Minsk, 2017-2022. MIT License
|
||||
// https://github.com/Azgaar/Fantasy-Map-Generator
|
||||
|
||||
console.log("Hello World");
|
||||
|
||||
import {invokeActiveZooming} from "../modules/activeZooming";
|
||||
import {applyPreset, drawBorders, drawRivers, drawStates} from "../modules/ui/layers";
|
||||
import {applyMapSize, applyStoredOptions, randomizeOptions} from "../modules/ui/options";
|
||||
|
|
@ -21,12 +23,13 @@ import {
|
|||
isLand,
|
||||
shouldRegenerateGrid
|
||||
} from "./utils/graphUtils";
|
||||
import {parseError} from "@/utils/errorUtils";
|
||||
import {parseError} from "./utils/errorUtils";
|
||||
import {rn, minmax, normalize} from "./utils/numberUtils";
|
||||
import {createTypedArray} from "./utils/arrayUtils";
|
||||
import {clipPoly} from "@/utils/lineUtils";
|
||||
import {rand, P, gauss, ra, rw, generateSeed} from "@/utils/probabilityUtils";
|
||||
import {getAdjective} from "@/utils/languageUtils";
|
||||
import {clipPoly} from "./utils/lineUtils";
|
||||
import {rand, P, gauss, ra, rw, generateSeed} from "./utils/probabilityUtils";
|
||||
import {getAdjective} from "./utils/languageUtils";
|
||||
import {debounce} from "./utils/functionUtils";
|
||||
import {byId} from "./utils/shorthands";
|
||||
import "./components";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {rn} from "../utils/numberUtils";
|
||||
import {parseTransform} from "@/utils/stringUtils";
|
||||
import {parseTransform} from "/src/utils/stringUtils";
|
||||
|
||||
export function drawLegend(name: string, data: unknown[]) {
|
||||
legend.selectAll("*").remove(); // fully redraw every time
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import {findCell} from "/src/utils/graphUtils";
|
||||
import {last} from "/src/utils/arrayUtils";
|
||||
import {getSegmentId} from "@/utils/lineUtils";
|
||||
import {getSegmentId} from "/src/utils/lineUtils";
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
import {round, parseTransform} from "@/utils/stringUtils";
|
||||
import {si} from "@/utils/unitUtils";
|
||||
import {round, parseTransform} from "/src/utils/stringUtils";
|
||||
import {si} from "/src/utils/unitUtils";
|
||||
|
||||
export class Rulers {
|
||||
constructor() {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import {dragLegendBox} from "../modules/legend";
|
||||
import {findCell, findGridCell} from "../utils/graphUtils";
|
||||
import {tip, showMainTip} from "./tooltips";
|
||||
import {si, convertTemperature} from "@/utils/unitUtils";
|
||||
import {debounce} from "@/utils/functionUtils";
|
||||
import {si, convertTemperature} from "/src/utils/unitUtils";
|
||||
import {debounce} from "/src/utils/functionUtils";
|
||||
|
||||
export function restoreDefaultEvents() {
|
||||
Zoom.setZoomBehavior();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {ERROR} from "@/config/logging";
|
||||
import {ERROR} from "/src/config/logging";
|
||||
|
||||
// prompt replacer (prompt does not work in Electron)
|
||||
const $prompt: HTMLElement = document.getElementById("prompt")!;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {UINT8_MAX, UINT16_MAX, UINT32_MAX} from "@/constants";
|
||||
import {UINT8_MAX, UINT16_MAX, UINT32_MAX} from "/src/constants";
|
||||
|
||||
export function last<T>(array: T[]) {
|
||||
return array[array.length - 1];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {P} from "@/utils/probabilityUtils";
|
||||
import {P} from "/src/utils/probabilityUtils";
|
||||
|
||||
// chars that serve as vowels
|
||||
const VOWELS = `aeiouyɑ'əøɛœæɶɒɨɪɔɐʊɤɯаоиеёэыуюяàèìòùỳẁȁȅȉȍȕáéíóúýẃőűâêîôûŷŵäëïöüÿẅãẽĩõũỹąęįǫųāēīōūȳăĕĭŏŭǎěǐǒǔȧėȯẏẇạẹịọụỵẉḛḭṵṳ`;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {ERROR} from "@/config/logging";
|
||||
import {ERROR} from "/src/config/logging";
|
||||
import {minmax, rn} from "./numberUtils";
|
||||
|
||||
const d3 = window.d3;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import {rn} from "@/utils/numberUtils";
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
|
||||
// round numbers in string to d decimals
|
||||
export function round(str: string, d = 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue