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
|
|
@ -90,10 +90,7 @@ export function editCoastline(node = d3.event.target) {
|
|||
function redrawCoastline() {
|
||||
const f = +elSelected.attr("data-f");
|
||||
const vertices = pack.features[f].vertices;
|
||||
const points = clipPoly(
|
||||
vertices.map(v => pack.vertices.p[v]),
|
||||
1
|
||||
);
|
||||
const points = clipPoly(vertices.map(v => pack.vertices.p[v]));
|
||||
const d = round(lineGen(points));
|
||||
elSelected.attr("d", d);
|
||||
defs.select("mask#land > path#land_" + f).attr("d", d); // update land mask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue