@thi.ng/geom-trace-bitmap 0.1.0 → 0.1.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 +1 -1
- package/README.md +6 -5
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -25,13 +25,13 @@ Bitmap image to hairline vector and point cloud conversions. This is a support p
|
|
|
25
25
|
|
|
26
26
|
This package provides an extensible setup to extract user selectable
|
|
27
27
|
single-pixel width line segments in horizontal, vertical and diagonal (45°)
|
|
28
|
-
directions and/or single pixels 2d point cloud. The main
|
|
28
|
+
directions and/or single pixels as 2d point cloud. The main
|
|
29
29
|
[`traceBitmap()`](https://docs.thi.ng/umbrella/geom-trace-bitmap/functions/traceBitmap.html)
|
|
30
30
|
function supports a predicate function to filter qualifying pixel values,
|
|
31
31
|
options to control which line orientations should be considered (incl. providing
|
|
32
32
|
custom ones and in which order of application), as well as a 2x3 matrix to
|
|
33
33
|
transform extracted points (pixel coordinates). See
|
|
34
|
-
[`TraceBitmapOpts`](https://docs.thi.ng/umbrella/geom-trace-
|
|
34
|
+
[`TraceBitmapOpts`](https://docs.thi.ng/umbrella/geom-trace-bitmap/interfaces/TraceBitmapOpts.html)
|
|
35
35
|
and example below for details.
|
|
36
36
|
|
|
37
37
|
## Status
|
|
@@ -65,7 +65,7 @@ For Node.js REPL:
|
|
|
65
65
|
const geomTraceBitmap = await import("@thi.ng/geom-trace-bitmap");
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
Package sizes (brotli'd, pre-treeshake): ESM:
|
|
68
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 759 bytes
|
|
69
69
|
|
|
70
70
|
## Dependencies
|
|
71
71
|
|
|
@@ -107,7 +107,8 @@ const { lines, points: dots } = traceBitmap({
|
|
|
107
107
|
// pixel selection predicate (here to select all bright pixels)
|
|
108
108
|
select: (x) => x > 128,
|
|
109
109
|
// process horizontals, verticals, diagonals & points (default)
|
|
110
|
-
|
|
110
|
+
// see: https://docs.thi.ng/umbrella/geom-trace-bitmap/types/TraceDir.html
|
|
111
|
+
dir: ["h", "v", "d1", "d2", "p"]
|
|
111
112
|
});
|
|
112
113
|
|
|
113
114
|
// write extracted geometry as SVG file
|
|
@@ -140,4 +141,4 @@ If this project contributes to an academic publication, please cite it as:
|
|
|
140
141
|
|
|
141
142
|
## License
|
|
142
143
|
|
|
143
|
-
© 2022 Karsten Schmidt // Apache License 2.0
|
|
144
|
+
© 2022 - 2023 Karsten Schmidt // Apache License 2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/geom-trace-bitmap",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Bitmap image to hairline vector and point cloud conversions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -34,20 +34,20 @@
|
|
|
34
34
|
"test": "testament test"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@thi.ng/api": "^8.
|
|
38
|
-
"@thi.ng/errors": "^2.2.
|
|
39
|
-
"@thi.ng/grid-iterators": "^3.0.
|
|
40
|
-
"@thi.ng/matrices": "^2.1.
|
|
41
|
-
"@thi.ng/pixel": "^4.
|
|
42
|
-
"@thi.ng/vectors": "^7.
|
|
37
|
+
"@thi.ng/api": "^8.7.0",
|
|
38
|
+
"@thi.ng/errors": "^2.2.9",
|
|
39
|
+
"@thi.ng/grid-iterators": "^3.0.3",
|
|
40
|
+
"@thi.ng/matrices": "^2.1.41",
|
|
41
|
+
"@thi.ng/pixel": "^4.1.1",
|
|
42
|
+
"@thi.ng/vectors": "^7.6.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@microsoft/api-extractor": "^7.
|
|
46
|
-
"@thi.ng/testament": "^0.3.
|
|
47
|
-
"rimraf": "^
|
|
45
|
+
"@microsoft/api-extractor": "^7.34.2",
|
|
46
|
+
"@thi.ng/testament": "^0.3.10",
|
|
47
|
+
"rimraf": "^4.1.2",
|
|
48
48
|
"tools": "^0.0.1",
|
|
49
|
-
"typedoc": "^0.23.
|
|
50
|
-
"typescript": "^4.9.
|
|
49
|
+
"typedoc": "^0.23.24",
|
|
50
|
+
"typescript": "^4.9.5"
|
|
51
51
|
},
|
|
52
52
|
"keywords": [
|
|
53
53
|
"bitmap",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"status": "alpha",
|
|
98
98
|
"year": 2022
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "50ba9c87676fac60c46d2bc0e4d2c7711a374a68\n"
|
|
101
101
|
}
|