@thi.ng/geom-trace-bitmap 0.3.165 → 0.3.166

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.
Files changed (3) hide show
  1. package/README.md +2 -2
  2. package/package.json +8 -8
  3. package/trace.js +3 -3
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
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
  > [!NOTE]
10
- > This is one of 210 standalone projects, maintained as part
10
+ > This is one of 211 standalone projects, maintained as part
11
11
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
12
12
  > and anti-framework.
13
13
  >
@@ -77,7 +77,7 @@ For Node.js REPL:
77
77
  const gtb = await import("@thi.ng/geom-trace-bitmap");
78
78
  ```
79
79
 
80
- Package sizes (brotli'd, pre-treeshake): ESM: 993 bytes
80
+ Package sizes (brotli'd, pre-treeshake): ESM: 996 bytes
81
81
 
82
82
  ## Dependencies
83
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom-trace-bitmap",
3
- "version": "0.3.165",
3
+ "version": "0.3.166",
4
4
  "description": "Bitmap image to hairline vector and point cloud conversions",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,12 +39,12 @@
39
39
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
40
40
  },
41
41
  "dependencies": {
42
- "@thi.ng/api": "^8.12.9",
43
- "@thi.ng/errors": "^2.5.49",
44
- "@thi.ng/grid-iterators": "^4.0.143",
45
- "@thi.ng/matrices": "^3.0.29",
46
- "@thi.ng/pixel": "^7.5.18",
47
- "@thi.ng/vectors": "^8.6.14"
42
+ "@thi.ng/api": "^8.12.10",
43
+ "@thi.ng/errors": "^2.5.50",
44
+ "@thi.ng/grid-iterators": "^4.0.144",
45
+ "@thi.ng/matrices": "^3.0.30",
46
+ "@thi.ng/pixel": "^7.5.19",
47
+ "@thi.ng/vectors": "^8.6.15"
48
48
  },
49
49
  "devDependencies": {
50
50
  "esbuild": "^0.27.0",
@@ -102,5 +102,5 @@
102
102
  "status": "alpha",
103
103
  "year": 2022
104
104
  },
105
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
105
+ "gitHead": "824bf9047b5a10f777c5c5b4aeecf0c750a22c75\n"
106
106
  }
package/trace.js CHANGED
@@ -10,7 +10,7 @@ const traceBitmap = (opts) => {
10
10
  const { width, height } = opts.img;
11
11
  const lines = [];
12
12
  const points = [];
13
- for (let d of opts.dir || ["h", "v", "d1", "d2", "p"]) {
13
+ for (const d of opts.dir || ["h", "v", "d1", "d2", "p"]) {
14
14
  if (typeof d !== "string") {
15
15
  traceLines(
16
16
  opts,
@@ -75,9 +75,9 @@ const traceLines = (opts, order, border, tx, acc = []) => {
75
75
  let prevBorder = false;
76
76
  const $record = () => {
77
77
  acc.push([curr[0], curr[curr.length - 1]]);
78
- for (let q of curr) img.setAtUnsafe(q[0], q[1], clear);
78
+ for (const q of curr) img.setAtUnsafe(q[0], q[1], clear);
79
79
  };
80
- for (let p of order({ cols: img.width, rows: img.height, tx })) {
80
+ for (const p of order({ cols: img.width, rows: img.height, tx })) {
81
81
  const c = select(img.getAtUnsafe(p[0], p[1]), p);
82
82
  const isBorder = border(p);
83
83
  const n = curr.length;