@thi.ng/geom-clip-line 2.2.0 → 2.2.2

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-12-10T14:04:38Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![geom-clip-line](https://media.thi.ng/umbrella/banners-20220914/thing-geom-clip-line.svg?8ca4f323)
3
+ # ![@thi.ng/geom-clip-line](https://media.thi.ng/umbrella/banners-20220914/thing-geom-clip-line.svg?8ca4f323)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/geom-clip-line.svg)](https://www.npmjs.com/package/@thi.ng/geom-clip-line)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/geom-clip-line.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -20,7 +20,7 @@ This project is part of the
20
20
 
21
21
  ## About
22
22
 
23
- 2D line clipping (Liang-Barsky). This is a support package for [@thi.ng/geom](https://github.com/thi-ng/umbrella/tree/develop/packages/geom).
23
+ 2D line clipping (Liang-Barsky)
24
24
 
25
25
  Current implementation is based on [toxiclibs](http://toxiclibs.org)
26
26
  (Java) and Clojure version [thi.ng/geom-clj](http://thi.ng/geom-clj).
@@ -54,11 +54,8 @@ ES module import:
54
54
 
55
55
  For Node.js REPL:
56
56
 
57
- ```text
58
- # with flag only for < v16
59
- node --experimental-repl-await
60
-
61
- > const geomClipLine = await import("@thi.ng/geom-clip-line");
57
+ ```js
58
+ const geomClipLine = await import("@thi.ng/geom-clip-line");
62
59
  ```
63
60
 
64
61
  Package sizes (brotli'd, pre-treeshake): ESM: 661 bytes
@@ -99,7 +96,7 @@ liangBarsky2(
99
96
 
100
97
  ## Authors
101
98
 
102
- Karsten Schmidt
99
+ - [Karsten Schmidt](https://thi.ng)
103
100
 
104
101
  If this project contributes to an academic publication, please cite it as:
105
102
 
@@ -114,4 +111,4 @@ If this project contributes to an academic publication, please cite it as:
114
111
 
115
112
  ## License
116
113
 
117
- &copy; 2013 - 2022 Karsten Schmidt // Apache Software License 2.0
114
+ &copy; 2013 - 2022 Karsten Schmidt // Apache License 2.0
package/liang-barsky.d.ts CHANGED
@@ -1,17 +1,16 @@
1
1
  import type { FnU8, Tuple } from "@thi.ng/api";
2
2
  import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
3
3
  /**
4
- * Performs Liang-Barsky clipping of the line segment with endpoints
5
- * `a`, `b` against the clipping rect defined by `min` and `max`. The
6
- * optional `ca` and `cb` vectors can be given to store the result
7
- * (clipped points). If omitted creates new vectors. Returns a tuple of
8
- * `[ca, cb, a, b]`, where the latter two values represent the
9
- * normalized distances of the clipped points relative to original given
10
- * line segment. Returns `undefined` iff the line lies completely
11
- * outside the rect.
4
+ * Performs Liang-Barsky clipping of the line segment with endpoints `a`, `b`
5
+ * against the clipping rect defined by `min` and `max`. The optional `ca` and
6
+ * `cb` vectors can be given to store the result (clipped points). If omitted
7
+ * creates new vectors. Returns a tuple of `[ca, cb, a, b]`, where the latter
8
+ * two values represent the normalized distances of the clipped points relative
9
+ * to original given line segment. Returns `undefined` iff the line lies
10
+ * completely outside the rect.
12
11
  *
13
- * - {@link https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm}
14
- * - {@link https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c}
12
+ * - https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm
13
+ * - https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c
15
14
  *
16
15
  * @param a - line endpoint
17
16
  * @param b - line endpoint
package/liang-barsky.js CHANGED
@@ -1,15 +1,14 @@
1
1
  /**
2
- * Performs Liang-Barsky clipping of the line segment with endpoints
3
- * `a`, `b` against the clipping rect defined by `min` and `max`. The
4
- * optional `ca` and `cb` vectors can be given to store the result
5
- * (clipped points). If omitted creates new vectors. Returns a tuple of
6
- * `[ca, cb, a, b]`, where the latter two values represent the
7
- * normalized distances of the clipped points relative to original given
8
- * line segment. Returns `undefined` iff the line lies completely
9
- * outside the rect.
2
+ * Performs Liang-Barsky clipping of the line segment with endpoints `a`, `b`
3
+ * against the clipping rect defined by `min` and `max`. The optional `ca` and
4
+ * `cb` vectors can be given to store the result (clipped points). If omitted
5
+ * creates new vectors. Returns a tuple of `[ca, cb, a, b]`, where the latter
6
+ * two values represent the normalized distances of the clipped points relative
7
+ * to original given line segment. Returns `undefined` iff the line lies
8
+ * completely outside the rect.
10
9
  *
11
- * - {@link https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm}
12
- * - {@link https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c}
10
+ * - https://en.wikipedia.org/wiki/Liang%E2%80%93Barsky_algorithm
11
+ * - https://github.com/thi-ng/c-thing/blob/develop/src/geom/clip/liangbarsky.c
13
12
  *
14
13
  * @param a - line endpoint
15
14
  * @param b - line endpoint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom-clip-line",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "2D line clipping (Liang-Barsky)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,17 +34,17 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/geom-isec": "^2.1.37",
39
- "@thi.ng/vectors": "^7.5.26"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/geom-isec": "^2.1.39",
39
+ "@thi.ng/vectors": "^7.5.28"
40
40
  },
41
41
  "devDependencies": {
42
- "@microsoft/api-extractor": "^7.33.5",
43
- "@thi.ng/testament": "^0.3.6",
42
+ "@microsoft/api-extractor": "^7.33.7",
43
+ "@thi.ng/testament": "^0.3.7",
44
44
  "rimraf": "^3.0.2",
45
45
  "tools": "^0.0.1",
46
- "typedoc": "^0.23.20",
47
- "typescript": "^4.8.4"
46
+ "typedoc": "^0.23.22",
47
+ "typescript": "^4.9.4"
48
48
  },
49
49
  "keywords": [
50
50
  "2d",
@@ -84,5 +84,5 @@
84
84
  ],
85
85
  "year": 2013
86
86
  },
87
- "gitHead": "5178ea1d7f4b2de86cf5101bdd73f6567518c0bd\n"
87
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
88
88
  }