Tussenpunten van anchorpoints

This commit is contained in:
Ruben van de Ven 2020-12-22 12:08:49 +01:00
parent 7329f8e7ae
commit cc505355b3

View file

@ -52,6 +52,17 @@ function getPathShapeBetweenPoints(p1, p2, corners) {
} }
// teken punten tussen alle punten
let allCornerPoints = [];
for (let index = 0; index < cornerPoints.length; index++) {
const c = cornerPoints[index];
const nextC = cornerPoints[(index+1)%cornerPoints.length];
allCornerPoints.push(c);
allCornerPoints.push([.5*(nextC[0]+c[0]), .5*(nextC[1]+c[1])]);
}
cornerPoints = allCornerPoints;
// create d: // create d:
let d = ""; let d = "";
const r = 10; const r = 10;