mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
refactor(es modules): continue migration
This commit is contained in:
parent
bc65e0e207
commit
97f2b213c4
42 changed files with 252 additions and 222 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import {findCell} from "/src/utils/graphUtils";
|
||||
import {findCell, findGridCell} from "/src/utils/graphUtils";
|
||||
import {MOBILE} from "/src/constants";
|
||||
|
||||
// fit full-screen map if window is resized
|
||||
|
|
@ -305,7 +305,7 @@ function getDepth(f, p) {
|
|||
}
|
||||
|
||||
// get user-friendly (real-world) height value from map data
|
||||
function getFriendlyHeight([x, y]) {
|
||||
export function getFriendlyHeight([x, y]) {
|
||||
const packH = pack.cells.h[findCell(x, y)];
|
||||
const gridH = grid.cells.h[findGridCell(x, y, grid)];
|
||||
const h = packH < 20 ? gridH : packH;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue