refactor: draw coastline

This commit is contained in:
max 2022-07-16 15:14:13 +03:00
parent 1888b04d54
commit 4833a8ab35
8 changed files with 422 additions and 371 deletions

View file

@ -2,7 +2,7 @@ import * as d3 from "d3";
import {renderLayer} from "layers";
// @ts-expect-error js module
import {drawCoastline} from "modules/coastline";
import {drawCoastline} from "layers/renderers/drawCoastline";
import {markupPackFeatures} from "modules/markup";
// @ts-expect-error js module
import {drawScaleBar} from "modules/measurers";
@ -24,6 +24,8 @@ export function createPack(grid: IGrid): IPack {
const markup = markupPackFeatures(grid, vertices, pick(cells, "v", "c", "b", "p", "h"));
renderLayer("coastline", vertices, markup.features);
// drawCoastline({vertices, cells}); // split into vertices definition and rendering
// Rivers.generate(newPack, grid);
@ -131,3 +133,6 @@ function repackGrid(grid: IGrid) {
TIME && console.timeEnd("repackGrid");
return pack;
}
function drawLayer(arg0: string, vertices: IGraphVertices, features: TPackFeatures) {
throw new Error("Function not implemented.");
}