@thi.ng/rasterize 1.0.171 → 1.0.173

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/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
  >
package/draw.js CHANGED
@@ -9,11 +9,11 @@ const __drawSolid2D = (pts, grid, val) => {
9
9
  offset,
10
10
  stride: [sx, sy]
11
11
  } = grid;
12
- for (let p of pts) {
12
+ for (const p of pts) {
13
13
  data[offset + p[0] * sx + p[1] * sy] = val;
14
14
  }
15
15
  } else {
16
- for (let p of pts) {
16
+ for (const p of pts) {
17
17
  grid.setAtUnsafe(p[0], p[1], val);
18
18
  }
19
19
  }
@@ -27,11 +27,11 @@ const __drawShader2D = (pts, grid, shader) => {
27
27
  offset,
28
28
  stride: [sx, sy]
29
29
  } = grid;
30
- for (let { 0: x, 1: y } of pts) {
30
+ for (const { 0: x, 1: y } of pts) {
31
31
  data[offset + x * sx + y * sy] = shader(grid, x, y);
32
32
  }
33
33
  } else {
34
- for (let { 0: x, 1: y } of pts) {
34
+ for (const { 0: x, 1: y } of pts) {
35
35
  grid.setAtUnsafe(x, y, shader(grid, x, y));
36
36
  }
37
37
  }
package/line.js CHANGED
@@ -8,7 +8,7 @@ const drawLine = (grid, x1, y1, x2, y2, val) => __draw2D(
8
8
  const traceLine = (grid, x1, y1, x2, y2, fn) => {
9
9
  const pts = lineClipped(x1, y1, x2, y2, 0, 0, grid.size[0], grid.size[1]);
10
10
  if (pts) {
11
- for (let p of pts) fn(p);
11
+ for (const p of pts) fn(p);
12
12
  }
13
13
  return grid;
14
14
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rasterize",
3
- "version": "1.0.171",
3
+ "version": "1.0.173",
4
4
  "description": "Headless 2D shape drawing, filling & rasterization for arbitrary targets/purposes (no canvas required)",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -39,13 +39,13 @@
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/checks": "^3.7.25",
44
- "@thi.ng/equiv": "^2.1.99",
45
- "@thi.ng/grid-iterators": "^4.0.143",
46
- "@thi.ng/porter-duff": "^2.1.121",
47
- "@thi.ng/random": "^4.1.34",
48
- "@thi.ng/transducers": "^9.6.18"
42
+ "@thi.ng/api": "^8.12.10",
43
+ "@thi.ng/checks": "^3.8.0",
44
+ "@thi.ng/equiv": "^2.1.100",
45
+ "@thi.ng/grid-iterators": "^4.0.145",
46
+ "@thi.ng/porter-duff": "^2.1.122",
47
+ "@thi.ng/random": "^4.1.35",
48
+ "@thi.ng/transducers": "^9.6.19"
49
49
  },
50
50
  "devDependencies": {
51
51
  "esbuild": "^0.27.0",
@@ -126,5 +126,5 @@
126
126
  "status": "alpha",
127
127
  "year": 2021
128
128
  },
129
- "gitHead": "fdca77cabf47dd23a9ab17a5ca13e3060075c12c\n"
129
+ "gitHead": "8625a1c6383737a8fdbe7a3f96ea3cbabc957fa6\n"
130
130
  }