add new path generator. let it bake for a while before removing the old one

This commit is contained in:
Stewart Allen 2022-10-04 00:25:44 -04:00
commit 1d47ec9473
4 changed files with 328 additions and 25 deletions

View file

@ -3,6 +3,7 @@
"use strict";
// dep: geo.base
// dep: geo.paths
// dep: ext.clip2
// dep: ext.earcut
// dep: geo.point
@ -59,6 +60,14 @@ class Polygon {
return bounds;
}
toPath2D(offset) {
return base.paths.pointsToPath(this.points, offset, this.open);
}
toPath3D(offset, height, z) {
return base.paths.pathTo3D(this.toPath2D(offset), height, z);
}
toString(verbose) {
let l;
if (this.inner && this.inner.length) {