@thi.ng/geom-clip-line 2.1.21 → 2.1.22

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-08-01T14:53:59Z
3
+ - **Last updated**: 2022-08-06T15:22:27Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [2.1.22](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-clip-line@2.1.22) (2022-08-06)
13
+
14
+ #### ⏱ Performance improvements
15
+
16
+ - update vector fns ([8dc7918](https://github.com/thi-ng/umbrella/commit/8dc7918))
17
+
12
18
  ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom-clip-line@2.1.0) (2021-11-17)
13
19
 
14
20
  #### 🚀 Features
package/clip-poly.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { intersectLinePolylineAll } from "@thi.ng/geom-isec/line-poly";
2
2
  import { pointInPolygon2 } from "@thi.ng/geom-isec/point";
3
3
  import { intersectRayPolylineAll } from "@thi.ng/geom-isec/ray-poly";
4
- import { direction } from "@thi.ng/vectors/direction";
4
+ import { direction2 } from "@thi.ng/vectors/direction";
5
5
  /**
6
6
  * Computes all intersection points of the infinite line defined by `a`,
7
7
  * `b` with the given polygon. Returns an array of segments where the
@@ -12,7 +12,7 @@ import { direction } from "@thi.ng/vectors/direction";
12
12
  * @param pts -
13
13
  */
14
14
  export const clipLinePoly = (a, b, pts) => {
15
- const isecs = intersectRayPolylineAll(a, direction([], a, b), pts, true).isec;
15
+ const isecs = intersectRayPolylineAll(a, direction2([], a, b), pts, true).isec;
16
16
  return isecs ? collectSegments(isecs) : undefined;
17
17
  };
18
18
  export const clipLineSegmentPoly = (a, b, pts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom-clip-line",
3
- "version": "2.1.21",
3
+ "version": "2.1.22",
4
4
  "description": "2D line clipping (Liang-Barsky)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,12 +35,12 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@thi.ng/api": "^8.3.9",
38
- "@thi.ng/geom-isec": "^2.1.21",
39
- "@thi.ng/vectors": "^7.5.10"
38
+ "@thi.ng/geom-isec": "^2.1.22",
39
+ "@thi.ng/vectors": "^7.5.11"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@microsoft/api-extractor": "^7.25.0",
43
- "@thi.ng/testament": "^0.2.10",
43
+ "@thi.ng/testament": "^0.2.11",
44
44
  "rimraf": "^3.0.2",
45
45
  "tools": "^0.0.1",
46
46
  "typedoc": "^0.22.17",
@@ -84,5 +84,5 @@
84
84
  ],
85
85
  "year": 2013
86
86
  },
87
- "gitHead": "24ec2749982f4193e6bc50173a238f336854bb1c\n"
87
+ "gitHead": "01b7a47077d88c2aefe77650ce3340040bae00ee\n"
88
88
  }