@thi.ng/shader-ast-stdlib 0.16.26 → 0.16.28

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-19T16:07:07Z
3
+ - **Last updated**: 2024-02-22T23:15:26Z
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
@@ -18,7 +18,7 @@
18
18
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
19
19
 
20
20
  > [!NOTE]
21
- > This is one of 189 standalone projects, maintained as part
21
+ > This is one of 190 standalone projects, maintained as part
22
22
  > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
23
23
  > and anti-framework.
24
24
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/shader-ast-stdlib",
3
- "version": "0.16.26",
3
+ "version": "0.16.28",
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.24",
42
- "@thi.ng/shader-ast": "^0.13.11"
41
+ "@thi.ng/api": "^8.9.25",
42
+ "@thi.ng/shader-ast": "^0.13.13"
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": "2724c87ca41810f2112f9d8c3d6b90dfaeea876b\n"
357
+ "gitHead": "16f2b92b5410bd35dcde6c2971c8e62783ebc472\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