add curves-only support to gpu contour, merge co-planar point runs

This commit is contained in:
Stewart Allen 2025-11-11 15:06:05 -05:00
commit f4d7a37265
7 changed files with 84 additions and 39 deletions

View file

@ -127,6 +127,12 @@ class Point {
return p;
}
// annotate instance with other field data (see clone())
annotate(obj = {}) {
Object.assign(this, obj);
return this;
}
slopeTo(p) {
return newSlope(this, p);
}

View file

@ -908,6 +908,7 @@ export class Polygon {
* todo make more efficient
*
* @param {Boolean} deep
* @param {String[]} fields to copy beyond class fields
* @returns {Polygon}
*/
clone(deep, fields) {
@ -2145,6 +2146,7 @@ export class Polygon {
return null;
}
// annotate instance with other field data (see clone())
annotate(obj = {}) {
Object.assign(this, obj);
return this;