@thi.ng/geom-trace-bitmap 0.3.49 → 0.3.52
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/README.md +7 -3
- package/api.d.ts +3 -2
- package/package.json +8 -8
- package/trace.d.ts +6 -5
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,9 +7,13 @@
|
|
|
7
7
|

|
|
8
8
|
[](https://mastodon.thi.ng/@toxi)
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
> [!NOTE]
|
|
11
|
+
> This is one of 189 standalone projects, maintained as part
|
|
12
|
+
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
13
|
+
> and anti-framework.
|
|
14
|
+
>
|
|
15
|
+
> 🚀 Help me to work full-time on these projects by [sponsoring me on
|
|
16
|
+
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
13
17
|
|
|
14
18
|
- [About](#about)
|
|
15
19
|
- [Status](#status)
|
package/api.d.ts
CHANGED
|
@@ -49,8 +49,9 @@ export interface TraceOpts {
|
|
|
49
49
|
}
|
|
50
50
|
export interface TraceBitmapOpts extends TraceOpts {
|
|
51
51
|
/**
|
|
52
|
-
* Optional sequence of {@link
|
|
53
|
-
* default _all_ directions are traced in
|
|
52
|
+
* Optional sequence of {@link TraceDir} or {@link TraceDirImpl}
|
|
53
|
+
* directions/modes to perform. By default _all_ directions are traced in
|
|
54
|
+
* this order:
|
|
54
55
|
*
|
|
55
56
|
* - (h)orizontal
|
|
56
57
|
* - (v)ertical
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-trace-bitmap",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.52",
|
|
4
4
|
"description": "Bitmap image to hairline vector and point cloud conversions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"test": "bun test"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@thi.ng/api": "^8.9.
|
|
39
|
-
"@thi.ng/errors": "^2.4.
|
|
40
|
-
"@thi.ng/grid-iterators": "^4.0.
|
|
41
|
-
"@thi.ng/matrices": "^2.3.
|
|
42
|
-
"@thi.ng/pixel": "^6.
|
|
43
|
-
"@thi.ng/vectors": "^7.
|
|
38
|
+
"@thi.ng/api": "^8.9.20",
|
|
39
|
+
"@thi.ng/errors": "^2.4.13",
|
|
40
|
+
"@thi.ng/grid-iterators": "^4.0.45",
|
|
41
|
+
"@thi.ng/matrices": "^2.3.8",
|
|
42
|
+
"@thi.ng/pixel": "^6.1.2",
|
|
43
|
+
"@thi.ng/vectors": "^7.10.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@microsoft/api-extractor": "^7.39.0",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"status": "alpha",
|
|
101
101
|
"year": 2022
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "3fa30b2dc2de762f24fd64b881b68d4da33d4c38\n"
|
|
104
104
|
}
|
package/trace.d.ts
CHANGED
|
@@ -4,13 +4,14 @@ import type { Vec, VecPair } from "@thi.ng/vectors";
|
|
|
4
4
|
import type { TraceBitmapOpts, TraceOpts } from "./api.js";
|
|
5
5
|
/**
|
|
6
6
|
* Main conversion/extraction function. According to given
|
|
7
|
-
* {@link TraceBitmapOpts.
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* {@link TraceBitmapOpts.dir}, extracts line segments and/or points from given
|
|
8
|
+
* pixel buffer and returns object of results. By default _all_ line directions
|
|
9
|
+
* and points are processed. If {@link TraceBitmapOpts.mat} is given, all
|
|
10
|
+
* coordinates are transformed with that matrix.
|
|
11
11
|
*
|
|
12
12
|
* ```ts
|
|
13
|
-
*
|
|
13
|
+
* // extract horizontal line segments
|
|
14
|
+
* traceBitmap({ img: ..., dir: ["h"] })
|
|
14
15
|
* // { lines: [...], points: [] }
|
|
15
16
|
* ```
|
|
16
17
|
*
|