@thi.ng/rasterize 1.0.81 → 1.0.83

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**: 2024-02-22T11:59:16Z
3
+ - **Last updated**: 2024-02-25T14:07:53Z
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.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [1.0.82](https://github.com/thi-ng/umbrella/tree/@thi.ng/rasterize@1.0.82) (2024-02-22)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update object destructuring in all pkgs & examples ([f36aeb0](https://github.com/thi-ng/umbrella/commit/f36aeb0))
17
+
12
18
  ### [1.0.58](https://github.com/thi-ng/umbrella/tree/@thi.ng/rasterize@1.0.58) (2023-11-09)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -167,7 +167,7 @@ For Node.js REPL:
167
167
  const rasterize = await import("@thi.ng/rasterize");
168
168
  ```
169
169
 
170
- Package sizes (brotli'd, pre-treeshake): ESM: 1.48 KB
170
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.47 KB
171
171
 
172
172
  ## Dependencies
173
173
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rasterize",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "2D shape drawing & rasterization",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,13 +35,13 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.25",
38
+ "@thi.ng/api": "^8.9.26",
39
39
  "@thi.ng/checks": "^3.5.0",
40
40
  "@thi.ng/equiv": "^2.1.49",
41
- "@thi.ng/grid-iterators": "^4.0.53",
42
- "@thi.ng/porter-duff": "^2.1.67",
43
- "@thi.ng/random": "^3.6.32",
44
- "@thi.ng/transducers": "^8.9.5"
41
+ "@thi.ng/grid-iterators": "^4.0.55",
42
+ "@thi.ng/porter-duff": "^2.1.68",
43
+ "@thi.ng/random": "^3.6.33",
44
+ "@thi.ng/transducers": "^8.9.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@microsoft/api-extractor": "^7.40.1",
@@ -119,5 +119,5 @@
119
119
  "status": "alpha",
120
120
  "year": 2021
121
121
  },
122
- "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
122
+ "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
123
123
  }
package/shader.js CHANGED
@@ -18,11 +18,7 @@ const defStripes = ({
18
18
  b
19
19
  }) => dir === "h" ? (_, x) => x % size < sizeA ? a : b : dir === "v" ? (_, __, y) => y % size < sizeA ? a : b : (_, x, y) => (x + y) % size < sizeA ? a : b;
20
20
  const defNoise = (opts) => {
21
- const { probability, rnd, a, b } = {
22
- probability: 0.5,
23
- rnd: SYSTEM,
24
- ...opts
25
- };
21
+ const { probability = 0.5, rnd = SYSTEM, a, b } = opts;
26
22
  return () => rnd.probability(probability) ? a : b;
27
23
  };
28
24
  const defBlendF = (col, blend = SRC_OVER_F, isPremultiplied = false) => {