mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 10:01:23 +01:00
refactor: don'r store events globally
This commit is contained in:
parent
37826f1c2d
commit
0d1b52e538
5 changed files with 8 additions and 7 deletions
|
|
@ -53,14 +53,13 @@ async function generate(options?: IGenerationOptions) {
|
|||
window.mapCoordinates = calculateMapCoordinates();
|
||||
|
||||
const newGrid = await createGrid(grid, precreatedGraph);
|
||||
const {pack: newPack, conflicts} = createPack(newGrid);
|
||||
const newPack = createPack(newGrid);
|
||||
|
||||
// TODO: draw default ruler
|
||||
|
||||
// redefine global grid and pack
|
||||
grid = newGrid;
|
||||
pack = newPack;
|
||||
events = {conflicts};
|
||||
|
||||
// temp rendering for debug
|
||||
// renderLayer("cells");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue