refactor: detect feature vertex

This commit is contained in:
Azgaar 2022-07-15 01:51:08 +03:00
parent f82fcbae0f
commit 3410c48c58
5 changed files with 105 additions and 18 deletions

View file

@ -42,6 +42,9 @@ async function generate(options?: IGenerationOptions) {
const timeStart = performance.now();
const {seed: precreatedSeed, graph: precreatedGraph} = options || {};
// temp for testing:
hideLoading();
Zoom?.invoke();
setSeed(precreatedSeed);

View file

@ -23,9 +23,9 @@ const {Lakes, OceanLayers, Rivers, Biomes, Cultures, BurgsAndStates, Religions,
export function createPack(grid: IGrid): IPack {
const {vertices, cells} = repackGrid(grid);
const markup = markupPackFeatures(grid, pick(cells, "c", "b", "p", "h"));
const markup = markupPackFeatures(grid, vertices, pick(cells, "v", "c", "b", "p", "h"));
drawCoastline({vertices, cells}); // split into vertices definition and rendering
// drawCoastline({vertices, cells}); // split into vertices definition and rendering
// Rivers.generate(newPack, grid);
// renderLayer("rivers", newPack);