polygon miter paths. bump rev 2.3.D6

This commit is contained in:
Stewart Allen 2020-11-11 14:40:15 -05:00
commit 4c00a41a2a
8 changed files with 83 additions and 8 deletions

View file

@ -3,7 +3,7 @@
"use strict";
(function() {
const KIRI = self.kiri, BASE = self.base, POLY = BASE.polygons;
const KIRI = self.kiri, BASE = self.base, POLY = BASE.polygons, newPolygon = BASE.newPolygon;
class Render {
constructor() {
@ -164,6 +164,14 @@
polys.forEach(poly => {
const contour = [];
poly = poly.miter();
// if (poly.debug) {
// const save = this.current;
// this.setLayer('debug.acute', 0xff0000).addPoly(poly, {thin:true});
// this.setLayer('debug.start', 0x00ff00).addPoly(newPolygon().centerRectangle(poly.first(),1,1), {thin:true});
// this.setLayer('debug.end', 0x0000ff).addPoly(newPolygon().centerRectangle(poly.last(),0.8,0.8), {thin:true});
// this.current = save;
// }
poly.points.forEach(p => {
contour.push(new THREE.Vector2(p.x, p.y));
});