@weasel-js/geom 1.9.3 → 1.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/3d/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { PORT_REACH, portControls, portCurvePoints, cubicAt } from '../chunk-YQADYJJ7.js';
2
2
  export { PORT_REACH } from '../chunk-YQADYJJ7.js';
3
- import { SINGULAR_RATIO } from '../chunk-7ROQRYOA.js';
3
+ import { SINGULAR_RATIO } from '../chunk-N5SYTHMR.js';
4
4
 
5
5
  // src/3d/vec3.ts
6
6
  function add(a, b) {
@@ -34,6 +34,13 @@ declare function pathDivide(...paths: Path[]): PolygonPath[];
34
34
  */
35
35
  declare function pathCrop(...paths: Path[]): PolygonPath[];
36
36
 
37
+ /**
38
+ * Union the triangles of an indexed mesh (`vertices` as x, y pairs; `indices`
39
+ * three per triangle) into canonical, non-overlapping rings. Overlaps count
40
+ * once, and triangles with no area are skipped. The result holds only M/L/Z.
41
+ */
42
+ declare function trianglesToPath(vertices: ArrayLike<number>, indices: ArrayLike<number>): PolygonPath;
43
+
37
44
  /** A `[x, y]` 2-tuple. */
38
45
  type Pair = [number, number];
39
46
  /** Closed ring (first vertex repeated as last). */
@@ -115,4 +122,4 @@ declare function splitPathByPolyline(path: Path, cut: readonly Point[], opts?: S
115
122
  */
116
123
  declare function snipPathByPolyline(path: Path, cut: readonly Point[]): Path[] | null;
117
124
 
118
- export { type MultiPolygon, type Pair, type PathToMultiPolygonOptions, type Polygon, type Ring, type SplitBySegmentOptions, multiPolygonToPath, pathCrop, pathDivide, pathExclude, pathIntersect, pathSubtract, pathToMultiPolygon, pathUnion, snipPathByPolyline, splitPathByPolyline, splitPathBySegment };
125
+ export { type MultiPolygon, type Pair, type PathToMultiPolygonOptions, type Polygon, type Ring, type SplitBySegmentOptions, multiPolygonToPath, pathCrop, pathDivide, pathExclude, pathIntersect, pathSubtract, pathToMultiPolygon, pathUnion, snipPathByPolyline, splitPathByPolyline, splitPathBySegment, trianglesToPath };