Merge branch 'master' of https://github.com/Azgaar/Fantasy-Map-Generator into submap-refactoring

This commit is contained in:
Azgaar 2024-10-19 14:03:55 +02:00
commit d19aae59c8
12 changed files with 191 additions and 151 deletions

View file

@ -56,3 +56,17 @@ function drawRouteConnections() {
}
}
}
function drawPoint([x, y], {color = "red", radius = 0.5}) {
debug.append("circle").attr("cx", x).attr("cy", y).attr("r", radius).attr("fill", color);
}
function drawPath(points, {color = "red", width = 0.5}) {
const lineGen = d3.line().curve(d3.curveBundle);
debug
.append("path")
.attr("d", round(lineGen(points)))
.attr("stroke", color)
.attr("stroke-width", width)
.attr("fill", "none");
}