feat: drawFeatures

This commit is contained in:
Azgaar 2024-09-06 21:14:54 +02:00
parent 6d9c86ba74
commit 4b071730f7
16 changed files with 233 additions and 416 deletions

View file

@ -3,6 +3,7 @@
// clip polygon by graph bbox
function clipPoly(points, secure = 0) {
if (points.length < 2) return points;
return polygonclip(points, [0, 0, graphWidth, graphHeight], secure);
}

View file

@ -110,8 +110,7 @@ function getVertexPath(cellsArray) {
if (onborderCell === undefined) continue;
const feature = pack.features[cells.f[onborderCell]];
if (feature.type === "lake") {
if (!feature.shoreline) Lakes.getShoreline(feature);
if (feature.type === "lake" && feature.shoreline) {
if (feature.shoreline.every(ofSameType)) continue; // inner lake
}