@thi.ng/shader-ast-stdlib 0.11.3 → 0.11.6

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**: 2021-12-13T10:26:00Z
3
+ - **Last updated**: 2022-04-07T14:17:30Z
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.
package/README.md CHANGED
@@ -503,4 +503,4 @@ If this project contributes to an academic publication, please cite it as:
503
503
 
504
504
  ## License
505
505
 
506
- © 2019 - 2021 Karsten Schmidt // Apache Software License 2.0
506
+ © 2019 - 2022 Karsten Schmidt // Apache Software License 2.0
@@ -4,7 +4,7 @@
4
4
  * Reference:
5
5
  * https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
6
6
  *
7
- * @param col
7
+ * @param col -
8
8
  */
9
9
  export declare const ACESFilm: import("@thi.ng/shader-ast").TaggedFn1<"vec3", "vec3">;
10
10
  //# sourceMappingURL=aces-film.d.ts.map
@@ -7,7 +7,7 @@ import { clamp01 } from "../math/clamp.js";
7
7
  * Reference:
8
8
  * https://knarkowicz.wordpress.com/2016/01/06/aces-filmic-tone-mapping-curve/
9
9
  *
10
- * @param col
10
+ * @param col -
11
11
  */
12
12
  export const ACESFilm = defn("vec3", "ACESFilm", ["vec3"], (col) => [
13
13
  ret(clamp01(div(mul(col, add(mul(col, 2.51), 0.03)), add(mul(col, add(mul(col, 2.43), 0.59)), 0.14)))),
package/color/levels.d.ts CHANGED
@@ -12,7 +12,7 @@ export declare const midLevelGamma: import("@thi.ng/shader-ast").TaggedFn1<"floa
12
12
  * potentially varying settings per channel). To be used with
13
13
  * {@link levelAdjustGammaRGB}.
14
14
  *
15
- * @param mid
15
+ * @param mid -
16
16
  */
17
17
  export declare const midLevelGammaRGB: (mid: Vec3Term) => import("@thi.ng/shader-ast").Lit<"vec3">;
18
18
  /**
@@ -53,10 +53,10 @@ export declare const levelAdjustMid: (x: FloatTerm, mid: FloatTerm, input: Vec2T
53
53
  * @remarks
54
54
  * Also see {@link levelAdjustGammaRGB}, {@link midLevelGammaRGB}.
55
55
  *
56
- * @param x
57
- * @param mid
58
- * @param input
59
- * @param output
56
+ * @param x -
57
+ * @param mid -
58
+ * @param input -
59
+ * @param output -
60
60
  */
61
61
  export declare const levelAdjustMidRGB: (x: Vec3Term, mid: Vec3Term, input: Mat3Term, output: Mat3Term) => import("@thi.ng/shader-ast").FnCall<"vec3">;
62
62
  //# sourceMappingURL=levels.d.ts.map
package/color/levels.js CHANGED
@@ -21,7 +21,7 @@ export const midLevelGamma = defn("float", "midLevelGamma", ["float"], (mid) =>
21
21
  * potentially varying settings per channel). To be used with
22
22
  * {@link levelAdjustGammaRGB}.
23
23
  *
24
- * @param mid
24
+ * @param mid -
25
25
  */
26
26
  export const midLevelGammaRGB = (mid) => vec3(midLevelGamma($x(mid)), midLevelGamma($y(mid)), midLevelGamma($z(mid)));
27
27
  /**
@@ -66,9 +66,9 @@ export const levelAdjustMid = (x, mid, input, output) => levelAdjustGamma(x, mid
66
66
  * @remarks
67
67
  * Also see {@link levelAdjustGammaRGB}, {@link midLevelGammaRGB}.
68
68
  *
69
- * @param x
70
- * @param mid
71
- * @param input
72
- * @param output
69
+ * @param x -
70
+ * @param mid -
71
+ * @param input -
72
+ * @param output -
73
73
  */
74
74
  export const levelAdjustMidRGB = (x, mid, input, output) => levelAdjustGammaRGB(x, midLevelGammaRGB(mid), input, output);
package/math/fit.d.ts CHANGED
@@ -12,21 +12,21 @@ export declare const fitNorm1: import("@thi.ng/shader-ast").TaggedFn3<"float", "
12
12
  * Fits value `x` from closed interval [a,b] to closed interval [c,d]. No
13
13
  * clamping performed.
14
14
  *
15
- * @param x
16
- * @param a
17
- * @param b
18
- * @param c
19
- * @param d
15
+ * @param x -
16
+ * @param a -
17
+ * @param b -
18
+ * @param c -
19
+ * @param d -
20
20
  */
21
21
  export declare const fit: <T extends PrimTerm>(x: T, a: T, b: T, c: T, d: T) => Term<TermType<T>>;
22
22
  /**
23
23
  * Same as {@link fit}, but first clamps `x` to closed [a,b] interval.
24
24
  *
25
- * @param x
26
- * @param a
27
- * @param b
28
- * @param c
29
- * @param d
25
+ * @param x -
26
+ * @param a -
27
+ * @param b -
28
+ * @param c -
29
+ * @param d -
30
30
  */
31
31
  export declare const fitClamped: <T extends PrimTerm>(x: T, a: T, b: T, c: T, d: T) => Term<TermType<T>>;
32
32
  /**
package/math/fit.js CHANGED
@@ -17,21 +17,21 @@ export const fitNorm1 = defn("float", "fitNorm1", ["float", "float", "float"], (
17
17
  * Fits value `x` from closed interval [a,b] to closed interval [c,d]. No
18
18
  * clamping performed.
19
19
  *
20
- * @param x
21
- * @param a
22
- * @param b
23
- * @param c
24
- * @param d
20
+ * @param x -
21
+ * @param a -
22
+ * @param b -
23
+ * @param c -
24
+ * @param d -
25
25
  */
26
26
  export const fit = (x, a, b, c, d) => mix(c, d, div(sub(x, a), sub(b, a)));
27
27
  /**
28
28
  * Same as {@link fit}, but first clamps `x` to closed [a,b] interval.
29
29
  *
30
- * @param x
31
- * @param a
32
- * @param b
33
- * @param c
34
- * @param d
30
+ * @param x -
31
+ * @param a -
32
+ * @param b -
33
+ * @param c -
34
+ * @param d -
35
35
  */
36
36
  export const fitClamped = (x, a, b, c, d) => mix(c, d, clamp01(div(sub(x, a), sub(b, a))));
37
37
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/shader-ast-stdlib",
3
- "version": "0.11.3",
3
+ "version": "0.11.6",
4
4
  "description": "Function collection for modular GPGPU / shader programming with @thi.ng/shader-ast",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,16 +34,16 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.3.3",
38
- "@thi.ng/shader-ast": "^0.12.3"
37
+ "@thi.ng/api": "^8.3.5",
38
+ "@thi.ng/shader-ast": "^0.12.6"
39
39
  },
40
40
  "devDependencies": {
41
- "@microsoft/api-extractor": "^7.19.2",
42
- "@thi.ng/testament": "^0.2.3",
41
+ "@microsoft/api-extractor": "^7.19.4",
42
+ "@thi.ng/testament": "^0.2.5",
43
43
  "rimraf": "^3.0.2",
44
44
  "tools": "^0.0.1",
45
- "typedoc": "^0.22.10",
46
- "typescript": "^4.5.3"
45
+ "typedoc": "^0.22.13",
46
+ "typescript": "^4.6.2"
47
47
  },
48
48
  "keywords": [
49
49
  "ast",
@@ -93,214 +93,214 @@
93
93
  ],
94
94
  "exports": {
95
95
  ".": {
96
- "import": "./index.js"
96
+ "default": "./index.js"
97
97
  },
98
98
  "./api": {
99
- "import": "./api.js"
99
+ "default": "./api.js"
100
100
  },
101
101
  "./color/aces-film": {
102
- "import": "./color/aces-film.js"
102
+ "default": "./color/aces-film.js"
103
103
  },
104
104
  "./color/levels": {
105
- "import": "./color/levels.js"
105
+ "default": "./color/levels.js"
106
106
  },
107
107
  "./color/linear-srgb": {
108
- "import": "./color/linear-srgb.js"
108
+ "default": "./color/linear-srgb.js"
109
109
  },
110
110
  "./color/luminance": {
111
- "import": "./color/luminance.js"
111
+ "default": "./color/luminance.js"
112
112
  },
113
113
  "./color/porter-duff": {
114
- "import": "./color/porter-duff.js"
114
+ "default": "./color/porter-duff.js"
115
115
  },
116
116
  "./color/rgbe": {
117
- "import": "./color/rgbe.js"
117
+ "default": "./color/rgbe.js"
118
118
  },
119
119
  "./fog/exp": {
120
- "import": "./fog/exp.js"
120
+ "default": "./fog/exp.js"
121
121
  },
122
122
  "./fog/exp2": {
123
- "import": "./fog/exp2.js"
123
+ "default": "./fog/exp2.js"
124
124
  },
125
125
  "./fog/linear": {
126
- "import": "./fog/linear.js"
126
+ "default": "./fog/linear.js"
127
127
  },
128
128
  "./light/lambert": {
129
- "import": "./light/lambert.js"
129
+ "default": "./light/lambert.js"
130
130
  },
131
131
  "./light/trilight": {
132
- "import": "./light/trilight.js"
132
+ "default": "./light/trilight.js"
133
133
  },
134
134
  "./math/additive": {
135
- "import": "./math/additive.js"
135
+ "default": "./math/additive.js"
136
136
  },
137
137
  "./math/cartesian": {
138
- "import": "./math/cartesian.js"
138
+ "default": "./math/cartesian.js"
139
139
  },
140
140
  "./math/clamp": {
141
- "import": "./math/clamp.js"
141
+ "default": "./math/clamp.js"
142
142
  },
143
143
  "./math/cross2": {
144
- "import": "./math/cross2.js"
144
+ "default": "./math/cross2.js"
145
145
  },
146
146
  "./math/dist-chebyshev": {
147
- "import": "./math/dist-chebyshev.js"
147
+ "default": "./math/dist-chebyshev.js"
148
148
  },
149
149
  "./math/dist-manhattan": {
150
- "import": "./math/dist-manhattan.js"
150
+ "default": "./math/dist-manhattan.js"
151
151
  },
152
152
  "./math/fit": {
153
- "import": "./math/fit.js"
153
+ "default": "./math/fit.js"
154
154
  },
155
155
  "./math/magsq": {
156
- "import": "./math/magsq.js"
156
+ "default": "./math/magsq.js"
157
157
  },
158
158
  "./math/maxcomp": {
159
- "import": "./math/maxcomp.js"
159
+ "default": "./math/maxcomp.js"
160
160
  },
161
161
  "./math/mincomp": {
162
- "import": "./math/mincomp.js"
162
+ "default": "./math/mincomp.js"
163
163
  },
164
164
  "./math/mix-cubic": {
165
- "import": "./math/mix-cubic.js"
165
+ "default": "./math/mix-cubic.js"
166
166
  },
167
167
  "./math/mix-quadratic": {
168
- "import": "./math/mix-quadratic.js"
168
+ "default": "./math/mix-quadratic.js"
169
169
  },
170
170
  "./math/orthogonal": {
171
- "import": "./math/orthogonal.js"
171
+ "default": "./math/orthogonal.js"
172
172
  },
173
173
  "./math/osc": {
174
- "import": "./math/osc.js"
174
+ "default": "./math/osc.js"
175
175
  },
176
176
  "./math/polar": {
177
- "import": "./math/polar.js"
177
+ "default": "./math/polar.js"
178
178
  },
179
179
  "./math/sincos": {
180
- "import": "./math/sincos.js"
180
+ "default": "./math/sincos.js"
181
181
  },
182
182
  "./matrix/convert": {
183
- "import": "./matrix/convert.js"
183
+ "default": "./matrix/convert.js"
184
184
  },
185
185
  "./matrix/lookat": {
186
- "import": "./matrix/lookat.js"
186
+ "default": "./matrix/lookat.js"
187
187
  },
188
188
  "./matrix/mvp": {
189
- "import": "./matrix/mvp.js"
189
+ "default": "./matrix/mvp.js"
190
190
  },
191
191
  "./matrix/normal": {
192
- "import": "./matrix/normal.js"
192
+ "default": "./matrix/normal.js"
193
193
  },
194
194
  "./matrix/rotation": {
195
- "import": "./matrix/rotation.js"
195
+ "default": "./matrix/rotation.js"
196
196
  },
197
197
  "./noise/curl3": {
198
- "import": "./noise/curl3.js"
198
+ "default": "./noise/curl3.js"
199
199
  },
200
200
  "./noise/hash": {
201
- "import": "./noise/hash.js"
201
+ "default": "./noise/hash.js"
202
202
  },
203
203
  "./noise/permute": {
204
- "import": "./noise/permute.js"
204
+ "default": "./noise/permute.js"
205
205
  },
206
206
  "./noise/simplex2": {
207
- "import": "./noise/simplex2.js"
207
+ "default": "./noise/simplex2.js"
208
208
  },
209
209
  "./noise/simplex3": {
210
- "import": "./noise/simplex3.js"
210
+ "default": "./noise/simplex3.js"
211
211
  },
212
212
  "./noise/voronoi2": {
213
- "import": "./noise/voronoi2.js"
213
+ "default": "./noise/voronoi2.js"
214
214
  },
215
215
  "./noise/worley2": {
216
- "import": "./noise/worley2.js"
216
+ "default": "./noise/worley2.js"
217
217
  },
218
218
  "./raymarch/ao": {
219
- "import": "./raymarch/ao.js"
219
+ "default": "./raymarch/ao.js"
220
220
  },
221
221
  "./raymarch/direction": {
222
- "import": "./raymarch/direction.js"
222
+ "default": "./raymarch/direction.js"
223
223
  },
224
224
  "./raymarch/normal": {
225
- "import": "./raymarch/normal.js"
225
+ "default": "./raymarch/normal.js"
226
226
  },
227
227
  "./raymarch/point-at": {
228
- "import": "./raymarch/point-at.js"
228
+ "default": "./raymarch/point-at.js"
229
229
  },
230
230
  "./raymarch/scene": {
231
- "import": "./raymarch/scene.js"
231
+ "default": "./raymarch/scene.js"
232
232
  },
233
233
  "./screen/uv": {
234
- "import": "./screen/uv.js"
234
+ "default": "./screen/uv.js"
235
235
  },
236
236
  "./sdf/annular": {
237
- "import": "./sdf/annular.js"
237
+ "default": "./sdf/annular.js"
238
238
  },
239
239
  "./sdf/box": {
240
- "import": "./sdf/box.js"
240
+ "default": "./sdf/box.js"
241
241
  },
242
242
  "./sdf/cylinder": {
243
- "import": "./sdf/cylinder.js"
243
+ "default": "./sdf/cylinder.js"
244
244
  },
245
245
  "./sdf/isec": {
246
- "import": "./sdf/isec.js"
246
+ "default": "./sdf/isec.js"
247
247
  },
248
248
  "./sdf/line": {
249
- "import": "./sdf/line.js"
249
+ "default": "./sdf/line.js"
250
250
  },
251
251
  "./sdf/mirror": {
252
- "import": "./sdf/mirror.js"
252
+ "default": "./sdf/mirror.js"
253
253
  },
254
254
  "./sdf/plane": {
255
- "import": "./sdf/plane.js"
255
+ "default": "./sdf/plane.js"
256
256
  },
257
257
  "./sdf/polyhedra": {
258
- "import": "./sdf/polyhedra.js"
258
+ "default": "./sdf/polyhedra.js"
259
259
  },
260
260
  "./sdf/repeat-polar": {
261
- "import": "./sdf/repeat-polar.js"
261
+ "default": "./sdf/repeat-polar.js"
262
262
  },
263
263
  "./sdf/repeat": {
264
- "import": "./sdf/repeat.js"
264
+ "default": "./sdf/repeat.js"
265
265
  },
266
266
  "./sdf/round": {
267
- "import": "./sdf/round.js"
267
+ "default": "./sdf/round.js"
268
268
  },
269
269
  "./sdf/smooth-isec": {
270
- "import": "./sdf/smooth-isec.js"
270
+ "default": "./sdf/smooth-isec.js"
271
271
  },
272
272
  "./sdf/smooth-sub": {
273
- "import": "./sdf/smooth-sub.js"
273
+ "default": "./sdf/smooth-sub.js"
274
274
  },
275
275
  "./sdf/smooth-union": {
276
- "import": "./sdf/smooth-union.js"
276
+ "default": "./sdf/smooth-union.js"
277
277
  },
278
278
  "./sdf/sphere": {
279
- "import": "./sdf/sphere.js"
279
+ "default": "./sdf/sphere.js"
280
280
  },
281
281
  "./sdf/sub": {
282
- "import": "./sdf/sub.js"
282
+ "default": "./sdf/sub.js"
283
283
  },
284
284
  "./sdf/torus": {
285
- "import": "./sdf/torus.js"
285
+ "default": "./sdf/torus.js"
286
286
  },
287
287
  "./sdf/tri": {
288
- "import": "./sdf/tri.js"
288
+ "default": "./sdf/tri.js"
289
289
  },
290
290
  "./sdf/union": {
291
- "import": "./sdf/union.js"
291
+ "default": "./sdf/union.js"
292
292
  },
293
293
  "./tex/blur": {
294
- "import": "./tex/blur.js"
294
+ "default": "./tex/blur.js"
295
295
  },
296
296
  "./tex/index-coord": {
297
- "import": "./tex/index-coord.js"
297
+ "default": "./tex/index-coord.js"
298
298
  },
299
299
  "./tex/index-uv": {
300
- "import": "./tex/index-uv.js"
300
+ "default": "./tex/index-uv.js"
301
301
  },
302
302
  "./tex/read-index": {
303
- "import": "./tex/read-index.js"
303
+ "default": "./tex/read-index.js"
304
304
  }
305
305
  },
306
306
  "thi.ng": {
@@ -312,5 +312,5 @@
312
312
  ],
313
313
  "year": 2019
314
314
  },
315
- "gitHead": "2db9dd34c0c2c60cbfde3dad0bca352b20292f5c\n"
315
+ "gitHead": "5ee1feb590dd935593b1dd4e7f38a3ed3ba64765\n"
316
316
  }
package/sdf/polyhedra.js CHANGED
@@ -36,8 +36,8 @@ const GDF = [
36
36
  *
37
37
  * Also based on: HG_SDF (Mercury Demogroup)
38
38
  *
39
- * @param id
40
- * @param vecs
39
+ * @param id -
40
+ * @param vecs -
41
41
  */
42
42
  const defGDF = (id, vecs) => [
43
43
  defn("float", id, ["vec3", "float"], (p, r) => [
@@ -9,8 +9,8 @@ export declare const sdfSmoothIntersect: import("@thi.ng/shader-ast").TaggedFn3<
9
9
  * Variadic compiletime macro for {@link sdfSmoothIntersect}. Takes smooth factor
10
10
  * `k`, followed by any number (at least 1 required) of SDF terms.
11
11
  *
12
- * @param k
13
- * @param terms
12
+ * @param k -
13
+ * @param terms -
14
14
  */
15
15
  export declare const sdfSmoothIntersectAll: (k: FloatTerm, ...terms: FloatTerm[]) => FloatTerm;
16
16
  //# sourceMappingURL=smooth-isec.d.ts.map
@@ -21,7 +21,7 @@ export const sdfSmoothIntersect = defn("float", "sdOpSmoothIntersect", ["float",
21
21
  * Variadic compiletime macro for {@link sdfSmoothIntersect}. Takes smooth factor
22
22
  * `k`, followed by any number (at least 1 required) of SDF terms.
23
23
  *
24
- * @param k
25
- * @param terms
24
+ * @param k -
25
+ * @param terms -
26
26
  */
27
27
  export const sdfSmoothIntersectAll = (k, ...terms) => terms.reduce((acc, x) => sdfSmoothIntersect(acc, x, k));
@@ -9,8 +9,8 @@ export declare const sdfSmoothSubtract: import("@thi.ng/shader-ast").TaggedFn3<"
9
9
  * Variadic compiletime macro for {@link sdfSmoothSubtract}. Takes smooth factor
10
10
  * `k`, followed by any number (at least 1 required) of SDF terms.
11
11
  *
12
- * @param k
13
- * @param terms
12
+ * @param k -
13
+ * @param terms -
14
14
  */
15
15
  export declare const sdfSmoothSubtractAll: (k: FloatTerm, ...terms: FloatTerm[]) => FloatTerm;
16
16
  //# sourceMappingURL=smooth-sub.d.ts.map
package/sdf/smooth-sub.js CHANGED
@@ -21,7 +21,7 @@ export const sdfSmoothSubtract = defn("float", "sdOpSmoothSubtract", ["float", "
21
21
  * Variadic compiletime macro for {@link sdfSmoothSubtract}. Takes smooth factor
22
22
  * `k`, followed by any number (at least 1 required) of SDF terms.
23
23
  *
24
- * @param k
25
- * @param terms
24
+ * @param k -
25
+ * @param terms -
26
26
  */
27
27
  export const sdfSmoothSubtractAll = (k, ...terms) => terms.reduce((acc, x) => sdfSmoothSubtract(acc, x, k));
@@ -9,8 +9,8 @@ export declare const sdfSmoothUnion: import("@thi.ng/shader-ast").TaggedFn3<"flo
9
9
  * Variadic compiletime macro for {@link sdfSmoothUnion}. Takes smooth factor
10
10
  * `k`, followed by any number (at least 1 required) of SDF terms.
11
11
  *
12
- * @param k
13
- * @param terms
12
+ * @param k -
13
+ * @param terms -
14
14
  */
15
15
  export declare const sdfSmoothUnionAll: (k: FloatTerm, ...terms: FloatTerm[]) => FloatTerm;
16
16
  //# sourceMappingURL=smooth-union.d.ts.map
@@ -21,7 +21,7 @@ export const sdfSmoothUnion = defn("float", "sdOpSmoothUnion", ["float", "float"
21
21
  * Variadic compiletime macro for {@link sdfSmoothUnion}. Takes smooth factor
22
22
  * `k`, followed by any number (at least 1 required) of SDF terms.
23
23
  *
24
- * @param k
25
- * @param terms
24
+ * @param k -
25
+ * @param terms -
26
26
  */
27
27
  export const sdfSmoothUnionAll = (k, ...terms) => terms.reduce((acc, x) => sdfSmoothUnion(acc, x, k));