mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 04:21:24 +01:00
burg remapping
This commit is contained in:
parent
36248e36b5
commit
6f97864962
3 changed files with 26 additions and 15 deletions
|
|
@ -27,8 +27,8 @@ const generateSubmap = debounce(function (x, y, w, h) {
|
|||
progress: p => progressUI.innerHTML = p,
|
||||
}
|
||||
|
||||
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
|
||||
const projection = (x, y) => {
|
||||
const [[x0, y0], [x1, y1]] = getViewBoxExtent();
|
||||
return [x * (x1-x0) / graphWidth + x0, y * (y1-y0) / graphHeight + y0]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue