refactor(es modules): restore old functions with TS

This commit is contained in:
Azgaar 2022-06-27 02:21:15 +03:00
parent aa214a7826
commit dea496018c
7 changed files with 55 additions and 47 deletions

View file

@ -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 () {

View file

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

View file

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