mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
fix: clip by bbox
This commit is contained in:
parent
392cc24f7c
commit
9bd90e51d9
6 changed files with 7 additions and 19 deletions
|
|
@ -18,10 +18,7 @@ export function drawBiomes() {
|
|||
const edgeVerticle = cells.v[i].find(v => vertices.c[v].some(i => cells.biome[i] !== b));
|
||||
const chain = connectVertices(edgeVerticle, b);
|
||||
if (chain.length < 3) continue;
|
||||
const points = clipPoly(
|
||||
chain.map(v => vertices.p[v]),
|
||||
1
|
||||
);
|
||||
const points = clipPoly(chain.map(v => vertices.p[v]));
|
||||
paths[b] += "M" + points.join("L") + "Z";
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue