@thi.ng/shader-ast-stdlib 0.10.8 → 0.11.2
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 +164 -76
- package/README.md +1 -1
- package/dev/boids.js +1433 -0
- package/dev/grayscott.js +425 -0
- package/dev/snoise-debug.js +252 -0
- package/package.json +314 -309
package/CHANGELOG.md
CHANGED
|
@@ -1,136 +1,224 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
- **Last updated**: 2021-11-21T17:09:28Z
|
|
4
|
+
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
|
+
|
|
3
6
|
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
|
+
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
|
|
8
|
+
|
|
9
|
+
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
|
+
and/or version bumps of transitive dependencies.
|
|
11
|
+
|
|
12
|
+
## [0.11.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.11.0) (2021-11-17)
|
|
13
|
+
|
|
14
|
+
#### 🚀 Features
|
|
15
|
+
|
|
16
|
+
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
|
|
17
|
+
Improving the overall build ergonomics
|
|
18
|
+
- introduced a tools workspaces
|
|
19
|
+
- imported it in all needed packages/examples
|
|
20
|
+
- inclusive project root
|
|
21
|
+
|
|
22
|
+
#### ♻️ Refactoring
|
|
23
|
+
|
|
24
|
+
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
|
|
25
|
+
this commit reverts (partly) changes made in:
|
|
26
|
+
ef346d7a8753590dc9094108a3d861a8dbd5dd2c
|
|
27
|
+
overall purpose is better testament ergonomics:
|
|
28
|
+
instead of having to pass NODE_OPTIONS with every invocation
|
|
29
|
+
having a binary to handle this for us.
|
|
30
|
+
|
|
31
|
+
### [0.10.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.10.1) (2021-10-13)
|
|
32
|
+
|
|
33
|
+
#### ♻️ Refactoring
|
|
34
|
+
|
|
35
|
+
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
|
|
36
|
+
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
|
|
37
|
+
- add .js suffix for all relative imports
|
|
38
|
+
|
|
39
|
+
## [0.10.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.10.0) (2021-10-12)
|
|
40
|
+
|
|
41
|
+
#### 🛑 Breaking changes
|
|
42
|
+
|
|
43
|
+
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
|
|
44
|
+
- BREAKING CHANGE: discontinue CommonJS & UMD versions
|
|
45
|
+
- only ESM modules will be published from now on
|
|
46
|
+
- CJS obsolete due to ESM support in recent versions of node:
|
|
47
|
+
- i.e. launch NodeJS via:
|
|
48
|
+
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
49
|
+
- in the node REPL use `await import(...)` instead of `require()`
|
|
50
|
+
- UMD obsolete due to widespread browser support for ESM
|
|
51
|
+
Also:
|
|
52
|
+
- normalize/restructure/reorg all package.json files
|
|
53
|
+
- cleanup all build scripts, remove obsolete
|
|
54
|
+
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
|
|
55
|
+
|
|
56
|
+
#### ♻️ Refactoring
|
|
57
|
+
|
|
58
|
+
- update imports ([b22054e](https://github.com/thi-ng/umbrella/commit/b22054e))
|
|
59
|
+
- update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
|
|
60
|
+
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
|
|
61
|
+
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
|
|
62
|
+
|
|
63
|
+
## [0.9.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.9.0) (2021-08-17)
|
|
64
|
+
|
|
65
|
+
#### 🚀 Features
|
|
66
|
+
|
|
67
|
+
- add level correction fns ([54963e7](https://github.com/thi-ng/umbrella/commit/54963e7))
|
|
68
|
+
|
|
69
|
+
## [0.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.8.0) (2021-08-13)
|
|
5
70
|
|
|
6
|
-
|
|
71
|
+
#### 🚀 Features
|
|
7
72
|
|
|
8
|
-
|
|
73
|
+
- add variadic SDF ops ([8d6390c](https://github.com/thi-ng/umbrella/commit/8d6390c))
|
|
74
|
+
- add SDF domain ops ([c41b288](https://github.com/thi-ng/umbrella/commit/c41b288))
|
|
75
|
+
- add sdfMirror2()
|
|
76
|
+
- add sdfRepeatPolar()
|
|
77
|
+
- add oscillator fns ([f14e8cb](https://github.com/thi-ng/umbrella/commit/f14e8cb))
|
|
78
|
+
- add SDF polyhedra fns ([2100e50](https://github.com/thi-ng/umbrella/commit/2100e50))
|
|
9
79
|
|
|
80
|
+
#### ♻️ Refactoring
|
|
10
81
|
|
|
82
|
+
- update vec const handling ([3b31e72](https://github.com/thi-ng/umbrella/commit/3b31e72))
|
|
11
83
|
|
|
84
|
+
## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.7.0) (2021-08-09)
|
|
12
85
|
|
|
86
|
+
#### 🚀 Features
|
|
13
87
|
|
|
14
|
-
|
|
88
|
+
- variadic sdf isec/sub/union ([fbff935](https://github.com/thi-ng/umbrella/commit/fbff935))
|
|
89
|
+
- add sdfUnion2(), add missing exports ([9d52838](https://github.com/thi-ng/umbrella/commit/9d52838))
|
|
15
90
|
|
|
91
|
+
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.6.0) (2021-04-24)
|
|
16
92
|
|
|
17
|
-
|
|
93
|
+
#### 🚀 Features
|
|
18
94
|
|
|
19
|
-
|
|
95
|
+
- add decodeRGBE() ([f98c6a2](https://github.com/thi-ng/umbrella/commit/f98c6a2))
|
|
20
96
|
|
|
97
|
+
### [0.5.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.5.6) (2020-12-07)
|
|
21
98
|
|
|
22
|
-
|
|
99
|
+
#### ♻️ Refactoring
|
|
23
100
|
|
|
24
|
-
|
|
101
|
+
- update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
|
|
25
102
|
|
|
26
|
-
-
|
|
27
|
-
- CJS obsolete due to ESM support in recent versions of node:
|
|
28
|
-
- i.e. launch NodeJS via:
|
|
29
|
-
- `node --experimental-specifier-resolution=node --experimental-repl-await`
|
|
30
|
-
- in the node REPL use `await import(...)` instead of `require()`
|
|
31
|
-
- UMD obsolete due to widespread browser support for ESM
|
|
103
|
+
### [0.5.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.5.1) (2020-09-13)
|
|
32
104
|
|
|
33
|
-
|
|
34
|
-
- normalize/restructure/reorg all package.json files
|
|
35
|
-
- cleanup all build scripts, remove obsolete
|
|
36
|
-
- switch from mocha to @thi.ng/testament for all tests
|
|
105
|
+
#### ♻️ Refactoring
|
|
37
106
|
|
|
107
|
+
- update imports ([643376a](https://github.com/thi-ng/umbrella/commit/643376a))
|
|
38
108
|
|
|
109
|
+
## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.5.0) (2020-08-28)
|
|
39
110
|
|
|
111
|
+
#### 🚀 Features
|
|
40
112
|
|
|
113
|
+
- add ACES film tonemapping ([8a0b1a3](https://github.com/thi-ng/umbrella/commit/8a0b1a3))
|
|
114
|
+
- update module re-exports
|
|
115
|
+
- add mixCubic()/mixQuadratic() ([4dfc020](https://github.com/thi-ng/umbrella/commit/4dfc020))
|
|
116
|
+
- add fit()/fitClamped() ([64ba64c](https://github.com/thi-ng/umbrella/commit/64ba64c))
|
|
41
117
|
|
|
118
|
+
#### ♻️ Refactoring
|
|
42
119
|
|
|
43
|
-
|
|
120
|
+
- update/dedupe various fns/overrides ([8e5635b](https://github.com/thi-ng/umbrella/commit/8e5635b))
|
|
121
|
+
- update various sym() decls ([a5901ab](https://github.com/thi-ng/umbrella/commit/a5901ab))
|
|
122
|
+
- remove obsolete type arg
|
|
44
123
|
|
|
45
|
-
###
|
|
124
|
+
### [0.4.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.4.5) (2020-08-16)
|
|
46
125
|
|
|
47
|
-
|
|
126
|
+
#### ⏱ Performance improvements
|
|
48
127
|
|
|
49
|
-
|
|
128
|
+
- update blur9/13() ([de632c6](https://github.com/thi-ng/umbrella/commit/de632c6))
|
|
50
129
|
|
|
51
|
-
|
|
130
|
+
## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.4.0) (2020-08-08)
|
|
52
131
|
|
|
53
|
-
|
|
54
|
-
- **shader-ast-stdlib:** add SDF domain ops ([c41b288](https://github.com/thi-ng/umbrella/commit/c41b288758b532a10ed625f8a1d8a4e899af53a8))
|
|
55
|
-
- **shader-ast-stdlib:** add SDF polyhedra fns ([2100e50](https://github.com/thi-ng/umbrella/commit/2100e508828501d3d7d7f7e398da2a8d4b600c6c))
|
|
56
|
-
- **shader-ast-stdlib:** add variadic SDF ops ([8d6390c](https://github.com/thi-ng/umbrella/commit/8d6390cc7df7d3ee41c8a415956253cdc2bd8e97))
|
|
132
|
+
#### 🚀 Features
|
|
57
133
|
|
|
58
|
-
|
|
134
|
+
- add borderMask() ([bea00bf](https://github.com/thi-ng/umbrella/commit/bea00bf))
|
|
59
135
|
|
|
60
|
-
|
|
136
|
+
#### ♻️ Refactoring
|
|
61
137
|
|
|
62
|
-
-
|
|
63
|
-
- **shader-ast-stdlib:** variadic sdf isec/sub/union ([fbff935](https://github.com/thi-ng/umbrella/commit/fbff93515220ac9263e9ad74f9359a78bf2ab24c))
|
|
138
|
+
- minor update additive() ([ae593e4](https://github.com/thi-ng/umbrella/commit/ae593e4))
|
|
64
139
|
|
|
65
|
-
|
|
140
|
+
### [0.3.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.3.5) (2020-02-25)
|
|
66
141
|
|
|
67
|
-
|
|
142
|
+
#### ♻️ Refactoring
|
|
68
143
|
|
|
69
|
-
-
|
|
144
|
+
- update imports ([863909a](https://github.com/thi-ng/umbrella/commit/863909a))
|
|
70
145
|
|
|
71
|
-
|
|
146
|
+
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.3.0) (2019-09-21)
|
|
72
147
|
|
|
73
|
-
|
|
148
|
+
#### 🚀 Features
|
|
74
149
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
150
|
+
- add fragUV() ([b85dc8b](https://github.com/thi-ng/umbrella/commit/b85dc8b))
|
|
151
|
+
- add rotationAroundAxis3/4, matrix conversions ([8a473c1](https://github.com/thi-ng/umbrella/commit/8a473c1))
|
|
152
|
+
- add snoise3 & curlNoise3 ([a7dc75d](https://github.com/thi-ng/umbrella/commit/a7dc75d))
|
|
78
153
|
|
|
79
|
-
|
|
154
|
+
#### 🩹 Bug fixes
|
|
80
155
|
|
|
81
|
-
|
|
156
|
+
- fix imports ([188309a](https://github.com/thi-ng/umbrella/commit/188309a))
|
|
157
|
+
- fix imports ([16823b2](https://github.com/thi-ng/umbrella/commit/16823b2))
|
|
82
158
|
|
|
83
|
-
|
|
159
|
+
#### ♻️ Refactoring
|
|
84
160
|
|
|
85
|
-
|
|
161
|
+
- more snoise3 refactoring ([977f0db](https://github.com/thi-ng/umbrella/commit/977f0db))
|
|
162
|
+
- update snoise3 ([fddfa85](https://github.com/thi-ng/umbrella/commit/fddfa85))
|
|
86
163
|
|
|
87
|
-
###
|
|
164
|
+
### [0.2.3](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.2.3) (2019-08-21)
|
|
88
165
|
|
|
89
|
-
|
|
166
|
+
#### ♻️ Refactoring
|
|
90
167
|
|
|
91
|
-
|
|
168
|
+
- update readIndex*() ([e6775f7](https://github.com/thi-ng/umbrella/commit/e6775f7))
|
|
169
|
+
- update permute fns (re-use) ([c5a36a1](https://github.com/thi-ng/umbrella/commit/c5a36a1))
|
|
170
|
+
- update clamp01/clamp11() ([bd59ff5](https://github.com/thi-ng/umbrella/commit/bd59ff5))
|
|
171
|
+
- update & fix porterDuff() HOF ([5f83ce1](https://github.com/thi-ng/umbrella/commit/5f83ce1))
|
|
92
172
|
|
|
93
|
-
|
|
173
|
+
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.2.0) (2019-07-31)
|
|
94
174
|
|
|
95
|
-
|
|
96
|
-
- **shader-ast-stdlib:** fix imports ([16823b2](https://github.com/thi-ng/umbrella/commit/16823b2))
|
|
175
|
+
#### 🚀 Features
|
|
97
176
|
|
|
98
|
-
|
|
177
|
+
- add porter-duff operators ([285197d](https://github.com/thi-ng/umbrella/commit/285197d))
|
|
178
|
+
- add guassian blur fns ([759ace7](https://github.com/thi-ng/umbrella/commit/759ace7))
|
|
99
179
|
|
|
100
|
-
|
|
101
|
-
- **shader-ast-stdlib:** add guassian blur fns ([759ace7](https://github.com/thi-ng/umbrella/commit/759ace7))
|
|
102
|
-
- **shader-ast-stdlib:** add rotationAroundAxis3/4, matrix conversions ([8a473c1](https://github.com/thi-ng/umbrella/commit/8a473c1))
|
|
103
|
-
- **shader-ast-stdlib:** add snoise3 & curlNoise3 ([a7dc75d](https://github.com/thi-ng/umbrella/commit/a7dc75d))
|
|
180
|
+
### [0.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.1.1) (2019-07-08)
|
|
104
181
|
|
|
105
|
-
|
|
182
|
+
#### 🩹 Bug fixes
|
|
106
183
|
|
|
107
|
-
|
|
184
|
+
- update incomplete cartesian3, refactor cartesian2 ([3299d59](https://github.com/thi-ng/umbrella/commit/3299d59))
|
|
108
185
|
|
|
109
|
-
|
|
186
|
+
#### ♻️ Refactoring
|
|
110
187
|
|
|
111
|
-
|
|
188
|
+
- update function arg lists ([#98](https://github.com/thi-ng/umbrella/issues/98)) ([7d5fdce](https://github.com/thi-ng/umbrella/commit/7d5fdce))
|
|
112
189
|
|
|
113
|
-
|
|
190
|
+
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/shader-ast-stdlib@0.1.0) (2019-07-07)
|
|
114
191
|
|
|
115
|
-
|
|
192
|
+
#### 🚀 Features
|
|
116
193
|
|
|
117
|
-
|
|
194
|
+
- add more functions ([4b6e4fe](https://github.com/thi-ng/umbrella/commit/4b6e4fe))
|
|
195
|
+
- toLinear() / toSRGB()
|
|
196
|
+
- luminanceRGB()
|
|
197
|
+
- cartesian2/3() / polar2/3()
|
|
198
|
+
- perpendicularCW/CCW()
|
|
199
|
+
- sincos() / cossin()
|
|
200
|
+
- rotation matrix factories for mat2/3/4
|
|
201
|
+
- add more hash fns, update voronoise2 ([65b2a15](https://github.com/thi-ng/umbrella/commit/65b2a15))
|
|
202
|
+
- add indexTo*() and readIndex*() fns ([a804c28](https://github.com/thi-ng/umbrella/commit/a804c28))
|
|
203
|
+
- add readIndex fns, hash2, minor refactorings ([34b20f0](https://github.com/thi-ng/umbrella/commit/34b20f0))
|
|
204
|
+
- add additive() HOF ([43b2223](https://github.com/thi-ng/umbrella/commit/43b2223))
|
|
205
|
+
- add snoise2, distance fns ([0849f8b](https://github.com/thi-ng/umbrella/commit/0849f8b))
|
|
206
|
+
- add voronoise2() & hash3() ([4bafe19](https://github.com/thi-ng/umbrella/commit/4bafe19))
|
|
207
|
+
- add 2d worley noise & permutations ([a645c71](https://github.com/thi-ng/umbrella/commit/a645c71))
|
|
208
|
+
- add new fns, various refactoring, add docs ([b215055](https://github.com/thi-ng/umbrella/commit/b215055))
|
|
209
|
+
- add clamp11(), orthogonal(), rayPointAt()
|
|
210
|
+
- split lambert() / halfLambert()
|
|
211
|
+
- switch to more inline fns
|
|
212
|
+
- extract stdlib as separate pkg ([86461ed](https://github.com/thi-ng/umbrella/commit/86461ed))
|
|
118
213
|
|
|
119
|
-
|
|
214
|
+
#### 🩹 Bug fixes
|
|
120
215
|
|
|
121
|
-
-
|
|
122
|
-
-
|
|
123
|
-
-
|
|
216
|
+
- fix rotationX4/Y4 return types ([c858dce](https://github.com/thi-ng/umbrella/commit/c858dce))
|
|
217
|
+
- fix imports ([4d9e126](https://github.com/thi-ng/umbrella/commit/4d9e126))
|
|
218
|
+
- update additive() fn arg type ([5d66ff2](https://github.com/thi-ng/umbrella/commit/5d66ff2))
|
|
124
219
|
|
|
125
|
-
|
|
220
|
+
#### ♻️ Refactoring
|
|
126
221
|
|
|
127
|
-
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
- **shader-ast-stdlib:** add more functions ([4b6e4fe](https://github.com/thi-ng/umbrella/commit/4b6e4fe))
|
|
131
|
-
- **shader-ast-stdlib:** add more hash fns, update voronoise2 ([65b2a15](https://github.com/thi-ng/umbrella/commit/65b2a15))
|
|
132
|
-
- **shader-ast-stdlib:** add new fns, various refactoring, add docs ([b215055](https://github.com/thi-ng/umbrella/commit/b215055))
|
|
133
|
-
- **shader-ast-stdlib:** add readIndex fns, hash2, minor refactorings ([34b20f0](https://github.com/thi-ng/umbrella/commit/34b20f0))
|
|
134
|
-
- **shader-ast-stdlib:** add snoise2, distance fns ([0849f8b](https://github.com/thi-ng/umbrella/commit/0849f8b))
|
|
135
|
-
- **shader-ast-stdlib:** add voronoise2() & hash3() ([4bafe19](https://github.com/thi-ng/umbrella/commit/4bafe19))
|
|
136
|
-
- **shader-ast-stdlib:** extract stdlib as separate pkg ([86461ed](https://github.com/thi-ng/umbrella/commit/86461ed))
|
|
222
|
+
- reorg src folder ([ebaa1c2](https://github.com/thi-ng/umbrella/commit/ebaa1c2))
|
|
223
|
+
- update raymarchScene/AO loops ([8a4bd89](https://github.com/thi-ng/umbrella/commit/8a4bd89))
|
|
224
|
+
- use post-increment for counter to be compatible w/ WebGL1
|
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ node --experimental-repl-await
|
|
|
104
104
|
> const shaderAstStdlib = await import("@thi.ng/shader-ast-stdlib");
|
|
105
105
|
```
|
|
106
106
|
|
|
107
|
-
Package sizes (gzipped, pre-treeshake): ESM:
|
|
107
|
+
Package sizes (gzipped, pre-treeshake): ESM: 11.05 KB
|
|
108
108
|
|
|
109
109
|
## Dependencies
|
|
110
110
|
|