@thi.ng/shader-ast-stdlib 0.16.27 → 0.16.29

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
+ ### [0.16.28](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.16.28) (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
  ### [0.16.22](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.16.22) (2024-02-06)
13
19
 
14
20
  #### ♻️ Refactoring
package/README.md CHANGED
@@ -120,7 +120,7 @@ For Node.js REPL:
120
120
  const shaderAstStdlib = await import("@thi.ng/shader-ast-stdlib");
121
121
  ```
122
122
 
123
- Package sizes (brotli'd, pre-treeshake): ESM: 13.42 KB
123
+ Package sizes (brotli'd, pre-treeshake): ESM: 13.36 KB
124
124
 
125
125
  ## Dependencies
126
126
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/shader-ast-stdlib",
3
- "version": "0.16.27",
3
+ "version": "0.16.29",
4
4
  "description": "Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -38,8 +38,8 @@
38
38
  "test": "bun test"
39
39
  },
40
40
  "dependencies": {
41
- "@thi.ng/api": "^8.9.25",
42
- "@thi.ng/shader-ast": "^0.13.12"
41
+ "@thi.ng/api": "^8.9.26",
42
+ "@thi.ng/shader-ast": "^0.13.14"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@microsoft/api-extractor": "^7.40.1",
@@ -354,5 +354,5 @@
354
354
  ],
355
355
  "year": 2019
356
356
  },
357
- "gitHead": "4513a1c703bdbf0f0867f03e547e47692e415fac\n"
357
+ "gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
358
358
  }
package/viz/function.js CHANGED
@@ -23,19 +23,12 @@ import {
23
23
  import { $x, $y } from "@thi.ng/shader-ast/ast/swizzle";
24
24
  import { sym } from "@thi.ng/shader-ast/ast/sym";
25
25
  import { fit } from "../math/fit.js";
26
- const functionSampler = (fn, map, opts) => {
27
- const { min, max, radius, step, area } = {
28
- min: 0,
29
- max: 1,
30
- radius: 1,
31
- step: 4,
32
- area: false,
33
- ...opts
34
- };
26
+ const functionSampler = (fn, map, opts = {}) => {
27
+ const { min = 0, max = 1, radius = 1, steps = 4, area = false } = opts;
35
28
  return defn(F, void 0, [V2, V2], (frag, res) => {
36
29
  let count, total;
37
30
  let q;
38
- const invStep = float(2 * radius / step);
31
+ const invStep = float(2 * radius / steps);
39
32
  return [
40
33
  q = sym(map(frag, res)),
41
34
  // bail out early if outside [min..max] interval