fix: single tile hull

This commit is contained in:
cha0s 2021-03-28 17:28:12 -05:00
parent e2f655f7cc
commit 129a16dcf0

View File

@ -72,18 +72,20 @@ export default (latus) => {
body.push([xxs + 1, yys + 3]);
}
}
const hull = Vertice.removeCollinear(
Vertice.smooth(
const hull = 4 === body.length
? body
: Vertice.removeCollinear(
Vertice.smooth(
Vertice.ortho(
Vertice.unique(body),
2,
Vertice.smooth(
Vertice.ortho(
Vertice.unique(body),
2,
),
Math.PI / 2,
),
Math.PI / 2,
Math.PI / 4,
),
Math.PI / 4,
),
);
);
for (let i = 0; i < hull.length; i++) {
hull[i] = Vector.scale(hull[i], 0.25);
}