mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
refactor(es modules): restore old functions with TS
This commit is contained in:
parent
aa214a7826
commit
dea496018c
7 changed files with 55 additions and 47 deletions
|
|
@ -3,7 +3,7 @@ import {findAll} from "/src/utils/graphUtils";
|
|||
import {unique} from "/src/utils/arrayUtils";
|
||||
import {getRandomColor, getMixedColor} from "/src/utils/colorUtils";
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
import {rand, P, ra, rw, biased} from "/src/utils/probabilityUtils";
|
||||
import {rand, P, ra, rw, biased, gauss} from "/src/utils/probabilityUtils";
|
||||
import {trimVowels, getAdjective, abbreviate} from "/src/utils/languageUtils";
|
||||
|
||||
window.Religions = (function () {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import {TIME} from "/src/config/logging";
|
||||
import {TIME, WARN} from "/src/config/logging";
|
||||
import {last} from "/src/utils/arrayUtils";
|
||||
import {rn} from "/src/utils/numberUtils";
|
||||
import {round} from "/src/utils/stringUtils";
|
||||
import {rw, each} from "/src/utils/probabilityUtils";
|
||||
|
||||
window.Rivers = (function () {
|
||||
const generate = function (allowErosion = true) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ window.viewY = 0;
|
|||
|
||||
window.Zoom = (function () {
|
||||
function onZoom() {
|
||||
if (!d3.event?.transform) return;
|
||||
const {k, x, y} = d3.event.transform;
|
||||
|
||||
const isScaleChanged = Boolean(scale - k);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue