alt approach to fixing miter render bug

This commit is contained in:
Stewart Allen 2021-04-13 13:31:02 -04:00
commit 401577943c
2 changed files with 4 additions and 3 deletions

View file

@ -85,6 +85,9 @@
}
addPolys(polys, options) {
if (options && options.clean) {
polys = polys.map(p => p.clean());
}
if (options && options.flat) {
return this.addFlats(polys, options);
}
@ -200,8 +203,6 @@
const contour = [];
poly = poly.debur(0.05);
if (!poly) return;
poly = poly.clean();
if (!poly) return;
poly = poly.miter();
poly.points.forEach(p => {
contour.push(new THREE.Vector2(p.x, p.y));