@thi.ng/geom-clip-poly 2.1.38 → 2.1.39
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/CHANGELOG.md +1 -1
- package/index.d.ts +4 -4
- package/index.js +4 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { ReadonlyVec } from "@thi.ng/vectors";
|
|
2
2
|
/**
|
|
3
|
-
* Extended version of Sutherland-Hodgeman convex polygon clipping
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Extended version of Sutherland-Hodgeman convex polygon clipping supporting
|
|
4
|
+
* any convex boundary polygon (not only rects). Returns new array of clipped
|
|
5
|
+
* vertices.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm
|
|
8
8
|
*
|
|
9
9
|
* @param pts - subject poly vertices
|
|
10
10
|
* @param bounds - clipping boundary vertices
|
package/index.js
CHANGED
|
@@ -3,11 +3,11 @@ import { centroid } from "@thi.ng/geom-poly-utils/centroid";
|
|
|
3
3
|
import { EPS } from "@thi.ng/math/api";
|
|
4
4
|
import { corner2 } from "@thi.ng/vectors/clockwise";
|
|
5
5
|
/**
|
|
6
|
-
* Extended version of Sutherland-Hodgeman convex polygon clipping
|
|
7
|
-
*
|
|
8
|
-
*
|
|
6
|
+
* Extended version of Sutherland-Hodgeman convex polygon clipping supporting
|
|
7
|
+
* any convex boundary polygon (not only rects). Returns new array of clipped
|
|
8
|
+
* vertices.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* https://en.wikipedia.org/wiki/Sutherland%E2%80%93Hodgman_algorithm
|
|
11
11
|
*
|
|
12
12
|
* @param pts - subject poly vertices
|
|
13
13
|
* @param bounds - clipping boundary vertices
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-clip-poly",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.39",
|
|
4
4
|
"description": "2D polygon clipping / offsetting (Sutherland-Hodgeman, Grainer-Hormann)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/geom-isec": "^2.1.
|
|
38
|
-
"@thi.ng/geom-poly-utils": "^2.3.
|
|
39
|
-
"@thi.ng/math": "^5.3.
|
|
40
|
-
"@thi.ng/vectors": "^7.5.
|
|
37
|
+
"@thi.ng/geom-isec": "^2.1.39",
|
|
38
|
+
"@thi.ng/geom-poly-utils": "^2.3.23",
|
|
39
|
+
"@thi.ng/math": "^5.3.17",
|
|
40
|
+
"@thi.ng/vectors": "^7.5.28"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@microsoft/api-extractor": "^7.33.7",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
],
|
|
84
84
|
"year": 2013
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
|
|
87
87
|
}
|