@thi.ng/random 2.4.7 → 3.0.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 CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [2.4.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.6...@thi.ng/random@2.4.7) (2021-08-17)
6
+ ## [3.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@3.0.1...@thi.ng/random@3.0.2) (2021-10-15)
7
7
 
8
8
  **Note:** Version bump only for package @thi.ng/random
9
9
 
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
11
11
 
12
12
 
13
13
 
14
- ## [2.4.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.5...@thi.ng/random@2.4.6) (2021-08-08)
14
+ ## [3.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@3.0.0...@thi.ng/random@3.0.1) (2021-10-13)
15
15
 
16
16
  **Note:** Version bump only for package @thi.ng/random
17
17
 
@@ -19,223 +19,158 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [2.4.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.4...@thi.ng/random@2.4.5) (2021-08-08)
23
-
24
- **Note:** Version bump only for package @thi.ng/random
25
-
26
-
27
-
28
-
29
-
30
- ## [2.4.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.3...@thi.ng/random@2.4.4) (2021-08-04)
31
-
32
-
33
- ### Bug Fixes
34
-
35
- * **random:** update weightedRandom() ([70afa70](https://github.com/thi-ng/umbrella/commit/70afa7097dfd21f85d947ab5f055d0c39589fd48))
36
-
37
-
38
-
39
-
40
-
41
- ## [2.4.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.2...@thi.ng/random@2.4.3) (2021-08-04)
42
-
43
- **Note:** Version bump only for package @thi.ng/random
44
-
45
-
46
-
47
-
48
-
49
- ## [2.4.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.1...@thi.ng/random@2.4.2) (2021-07-01)
50
-
51
- **Note:** Version bump only for package @thi.ng/random
52
-
53
-
54
-
55
-
56
-
57
- ## [2.4.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.0...@thi.ng/random@2.4.1) (2021-06-08)
58
-
59
- **Note:** Version bump only for package @thi.ng/random
60
-
61
-
62
-
63
-
64
-
65
- # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.3.7...@thi.ng/random@2.4.0) (2021-04-19)
66
-
67
-
68
- ### Bug Fixes
69
-
70
- * **random:** HOF issue w/ exponential() ([12586b9](https://github.com/thi-ng/umbrella/commit/12586b9eda66ce3d741402cc9b802c0369f64d88))
71
-
72
-
73
- ### Features
74
-
75
- * **random:** add uniqueValuesFrom/uniqueIndices() ([3b3b5d8](https://github.com/thi-ng/umbrella/commit/3b3b5d8d71d8c3019f84bae7a4791b12933720c4))
76
-
77
-
78
-
79
-
80
-
81
- ## [2.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.3.0...@thi.ng/random@2.3.1) (2021-02-24)
82
-
83
-
84
- ### Bug Fixes
85
-
86
- * **random:** update weightedRandom() ([b1cf4d8](https://github.com/thi-ng/umbrella/commit/b1cf4d8feccac4b3468a2fb0fdee268306406d78))
87
-
88
-
89
-
90
-
91
-
92
- # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.2.0...@thi.ng/random@2.3.0) (2021-02-20)
93
-
94
-
95
- ### Features
96
-
97
- * **random:** add coin()/fairCoin() ([ed66a64](https://github.com/thi-ng/umbrella/commit/ed66a64a7e5efb63b4bbab89bba5100d1aa7ec49))
98
-
99
-
100
-
101
-
102
-
103
- # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.1.5...@thi.ng/random@2.2.0) (2021-01-13)
104
-
105
-
106
- ### Bug Fixes
107
-
108
- * **random:** add opt start index arg for uuid() ([268ec3f](https://github.com/thi-ng/umbrella/commit/268ec3f47470184068fd66b5cc147d8c2e0e0ccb))
109
-
110
-
111
- ### Features
112
-
113
- * **random:** add CRYPTO IRandom impl ([94e69c1](https://github.com/thi-ng/umbrella/commit/94e69c1021ec67c63be78e0467bfc82be6cabc00))
114
- * **random:** add opt start/end for randomBytes() ([4d095da](https://github.com/thi-ng/umbrella/commit/4d095da557b1f3ee9ce46778aeba25f0c6aa94f9))
115
-
116
-
117
- ### Performance Improvements
118
-
119
- * **random:** minor update weightedRandom() ([258fd7b](https://github.com/thi-ng/umbrella/commit/258fd7b25930c41025b7337b44c36e1f00924b47))
22
+ # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.8...@thi.ng/random@3.0.0) (2021-10-12)
120
23
 
121
24
 
25
+ ### Build System
122
26
 
27
+ * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
123
28
 
124
29
 
125
- ## [2.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.1.0...@thi.ng/random@2.1.1) (2020-11-26)
30
+ ### BREAKING CHANGES
126
31
 
32
+ * discontinue CommonJS & UMD versions
127
33
 
128
- ### Bug Fixes
34
+ - only ESM modules will be published from now on
35
+ - CJS obsolete due to ESM support in recent versions of node:
36
+ - i.e. launch NodeJS via:
37
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
38
+ - in the node REPL use `await import(...)` instead of `require()`
39
+ - UMD obsolete due to widespread browser support for ESM
129
40
 
130
- * **random:** add missing subdir to pkg "files" ([916dbe7](https://github.com/thi-ng/umbrella/commit/916dbe7eb12815215b3905ea6ad924b7d397264c))
41
+ Also:
42
+ - normalize/restructure/reorg all package.json files
43
+ - cleanup all build scripts, remove obsolete
44
+ - switch from mocha to @thi.ng/testament for all tests
131
45
 
132
46
 
133
47
 
134
48
 
135
49
 
136
- # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.0.2...@thi.ng/random@2.1.0) (2020-11-24)
137
50
 
51
+ ## [2.4.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.4.3...@thi.ng/random@2.4.4) (2021-08-04)
138
52
 
139
- ### Features
53
+ ### Bug Fixes
140
54
 
141
- * **random:** add distribution HOFs, move gaussian() ([9328821](https://github.com/thi-ng/umbrella/commit/9328821b20e9534c4c66c353d36dfd7dbb5edda6))
142
- * **random:** add randomBytesFrom(), update UUID fns ([b31c872](https://github.com/thi-ng/umbrella/commit/b31c872cb67708510d68d6b2e2260cba843ee86d))
55
+ - **random:** update weightedRandom() ([70afa70](https://github.com/thi-ng/umbrella/commit/70afa7097dfd21f85d947ab5f055d0c39589fd48))
143
56
 
57
+ # [2.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.3.7...@thi.ng/random@2.4.0) (2021-04-19)
144
58
 
59
+ ### Bug Fixes
145
60
 
61
+ - **random:** HOF issue w/ exponential() ([12586b9](https://github.com/thi-ng/umbrella/commit/12586b9eda66ce3d741402cc9b802c0369f64d88))
146
62
 
63
+ ### Features
147
64
 
148
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.4.17...@thi.ng/random@2.0.0) (2020-08-28)
65
+ - **random:** add uniqueValuesFrom/uniqueIndices() ([3b3b5d8](https://github.com/thi-ng/umbrella/commit/3b3b5d8d71d8c3019f84bae7a4791b12933720c4))
149
66
 
67
+ ## [2.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.3.0...@thi.ng/random@2.3.1) (2021-02-24)
150
68
 
151
- ### Bug Fixes
69
+ ### Bug Fixes
152
70
 
153
- * **random:** off-by-one error in SYSTEM.int() ([ca0492d](https://github.com/thi-ng/umbrella/commit/ca0492d2f5f867c8945c279f60cf908037df1385))
71
+ - **random:** update weightedRandom() ([b1cf4d8](https://github.com/thi-ng/umbrella/commit/b1cf4d8feccac4b3468a2fb0fdee268306406d78))
154
72
 
73
+ # [2.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.2.0...@thi.ng/random@2.3.0) (2021-02-20)
155
74
 
156
- ### Features
75
+ ### Features
157
76
 
158
- * **random:** add INorm, extract gaussianCLT() ([c687598](https://github.com/thi-ng/umbrella/commit/c687598f87283a77c109d6b378b1907349eab760))
77
+ - **random:** add coin()/fairCoin() ([ed66a64](https://github.com/thi-ng/umbrella/commit/ed66a64a7e5efb63b4bbab89bba5100d1aa7ec49))
159
78
 
79
+ # [2.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.1.5...@thi.ng/random@2.2.0) (2021-01-13)
160
80
 
161
- ### BREAKING CHANGES
81
+ ### Bug Fixes
162
82
 
163
- * **random:** remove gaussian() from IRandom,
164
- extract as standalone gaussianCLT()
83
+ - **random:** add opt start index arg for uuid() ([268ec3f](https://github.com/thi-ng/umbrella/commit/268ec3f47470184068fd66b5cc147d8c2e0e0ccb))
165
84
 
166
- - update gaussianCLT() default args to be more meaningful
85
+ ### Features
167
86
 
87
+ - **random:** add CRYPTO IRandom impl ([94e69c1](https://github.com/thi-ng/umbrella/commit/94e69c1021ec67c63be78e0467bfc82be6cabc00))
88
+ - **random:** add opt start/end for randomBytes() ([4d095da](https://github.com/thi-ng/umbrella/commit/4d095da557b1f3ee9ce46778aeba25f0c6aa94f9))
168
89
 
90
+ ### Performance Improvements
169
91
 
92
+ - **random:** minor update weightedRandom() ([258fd7b](https://github.com/thi-ng/umbrella/commit/258fd7b25930c41025b7337b44c36e1f00924b47))
170
93
 
94
+ ## [2.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.1.0...@thi.ng/random@2.1.1) (2020-11-26)
171
95
 
172
- # [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.3.2...@thi.ng/random@1.4.0) (2020-03-01)
96
+ ### Bug Fixes
173
97
 
98
+ - **random:** add missing subdir to pkg "files" ([916dbe7](https://github.com/thi-ng/umbrella/commit/916dbe7eb12815215b3905ea6ad924b7d397264c))
174
99
 
175
- ### Bug Fixes
100
+ # [2.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@2.0.2...@thi.ng/random@2.1.0) (2020-11-24)
176
101
 
177
- * **random:** use correct 160bit default seed for XorWow ([38d511b](https://github.com/thi-ng/umbrella/commit/38d511bc2e2c0bf00101e0b9db50cdb371445425))
102
+ ### Features
178
103
 
104
+ - **random:** add distribution HOFs, move gaussian() ([9328821](https://github.com/thi-ng/umbrella/commit/9328821b20e9534c4c66c353d36dfd7dbb5edda6))
105
+ - **random:** add randomBytesFrom(), update UUID fns ([b31c872](https://github.com/thi-ng/umbrella/commit/b31c872cb67708510d68d6b2e2260cba843ee86d))
179
106
 
180
- ### Features
107
+ # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.4.17...@thi.ng/random@2.0.0) (2020-08-28)
181
108
 
182
- * **random:** add Xoshiro128, refactor default seeds ([b535628](https://github.com/thi-ng/umbrella/commit/b535628c879b133d121307695a2a138dac70f008))
109
+ ### Bug Fixes
183
110
 
111
+ - **random:** off-by-one error in SYSTEM.int() ([ca0492d](https://github.com/thi-ng/umbrella/commit/ca0492d2f5f867c8945c279f60cf908037df1385))
184
112
 
113
+ ### Features
185
114
 
115
+ - **random:** add INorm, extract gaussianCLT() ([c687598](https://github.com/thi-ng/umbrella/commit/c687598f87283a77c109d6b378b1907349eab760))
186
116
 
117
+ ### BREAKING CHANGES
187
118
 
188
- # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.2.0...@thi.ng/random@1.3.0) (2020-02-25)
119
+ - **random:** remove gaussian() from IRandom, extract as standalone gaussianCLT()
120
+ - update gaussianCLT() default args to be more meaningful
189
121
 
122
+ # [1.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.3.2...@thi.ng/random@1.4.0) (2020-03-01)
190
123
 
191
- ### Features
124
+ ### Bug Fixes
192
125
 
193
- * **random:** add uuidv4Bytes() ([e9ea10f](https://github.com/thi-ng/umbrella/commit/e9ea10f5e6b2415863e1a552207758aa3a47c9cf))
126
+ - **random:** use correct 160bit default seed for XorWow ([38d511b](https://github.com/thi-ng/umbrella/commit/38d511bc2e2c0bf00101e0b9db50cdb371445425))
194
127
 
128
+ ### Features
195
129
 
130
+ - **random:** add Xoshiro128, refactor default seeds ([b535628](https://github.com/thi-ng/umbrella/commit/b535628c879b133d121307695a2a138dac70f008))
196
131
 
132
+ # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.2.0...@thi.ng/random@1.3.0) (2020-02-25)
197
133
 
134
+ ### Features
198
135
 
199
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.1.15...@thi.ng/random@1.2.0) (2020-01-26)
136
+ - **random:** add uuidv4Bytes() ([e9ea10f](https://github.com/thi-ng/umbrella/commit/e9ea10f5e6b2415863e1a552207758aa3a47c9cf))
200
137
 
201
- ### Features
138
+ # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.1.15...@thi.ng/random@1.2.0) (2020-01-26)
202
139
 
203
- * **random:** add randomBytes() wrapper ([c536bcd](https://github.com/thi-ng/umbrella/commit/c536bcd83c766414e349f6b82494ace9888ac2ba))
140
+ ### Features
204
141
 
205
- ## [1.1.15](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.1.14...@thi.ng/random@1.1.15) (2020-01-24)
142
+ - **random:** add randomBytes() wrapper ([c536bcd](https://github.com/thi-ng/umbrella/commit/c536bcd83c766414e349f6b82494ace9888ac2ba))
206
143
 
207
- ### Performance Improvements
144
+ ## [1.1.15](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.1.14...@thi.ng/random@1.1.15) (2020-01-24)
208
145
 
209
- * **random:** minor update ARandom.norm() ([babbbaa](https://github.com/thi-ng/umbrella/commit/babbbaa12b5be09415f420e7559fa5c8bb76f802))
146
+ ### Performance Improvements
210
147
 
211
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.0.2...@thi.ng/random@1.1.0) (2019-02-15)
148
+ - **random:** minor update ARandom.norm() ([babbbaa](https://github.com/thi-ng/umbrella/commit/babbbaa12b5be09415f420e7559fa5c8bb76f802))
212
149
 
213
- ### Bug Fixes
150
+ # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@1.0.2...@thi.ng/random@1.1.0) (2019-02-15)
214
151
 
215
- * **random:** add opt scale arg to IRandom.float() ([5a7e448](https://github.com/thi-ng/umbrella/commit/5a7e448))
152
+ ### Bug Fixes
216
153
 
217
- ### Features
154
+ - **random:** add opt scale arg to IRandom.float() ([5a7e448](https://github.com/thi-ng/umbrella/commit/5a7e448))
218
155
 
219
- * **random:** add randomID() & weightedRandom() ([f719724](https://github.com/thi-ng/umbrella/commit/f719724))
156
+ ### Features
220
157
 
221
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@0.1.1...@thi.ng/random@1.0.0) (2019-01-21)
158
+ - **random:** add randomID() & weightedRandom() ([f719724](https://github.com/thi-ng/umbrella/commit/f719724))
222
159
 
223
- ### Build System
160
+ # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/random@0.1.1...@thi.ng/random@1.0.0) (2019-01-21)
224
161
 
225
- * update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
162
+ ### Build System
226
163
 
227
- ### BREAKING CHANGES
164
+ - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
228
165
 
229
- * enabled multi-outputs (ES6 modules, CJS, UMD)
166
+ ### BREAKING CHANGES
230
167
 
231
- - build scripts now first build ES6 modules in package root, then call
232
- `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
233
- - all imports MUST be updated to only refer to package level
234
- (not individual files anymore). tree shaking in user land will get rid of
235
- all unused imported symbols.
168
+ - enabled multi-outputs (ES6 modules, CJS, UMD)
169
+ - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
170
+ - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
236
171
 
237
- # 0.1.0 (2018-11-24)
172
+ # 0.1.0 (2018-11-24)
238
173
 
239
- ### Features
174
+ ### Features
240
175
 
241
- * **random:** re-import, extend & refactor random package (MBP2010) ([4aea85d](https://github.com/thi-ng/umbrella/commit/4aea85d))
176
+ - **random:** re-import, extend & refactor random package (MBP2010) ([4aea85d](https://github.com/thi-ng/umbrella/commit/4aea85d))
package/README.md CHANGED
@@ -72,20 +72,30 @@ Partially ported from C implementations taken from [c.thi.ng](http://c.thi.ng).
72
72
  yarn add @thi.ng/random
73
73
  ```
74
74
 
75
+ ES module import:
76
+
75
77
  ```html
76
- // ES module
77
- <script type="module" src="https://unpkg.com/@thi.ng/random?module" crossorigin></script>
78
+ <script type="module" src="https://cdn.skypack.dev/@thi.ng/random"></script>
79
+ ```
80
+
81
+ [Skypack documentation](https://docs.skypack.dev/)
82
+
83
+ For Node.js REPL:
84
+
85
+ ```text
86
+ # with flag only for < v16
87
+ node --experimental-repl-await
78
88
 
79
- // UMD
80
- <script src="https://unpkg.com/@thi.ng/random/lib/index.umd.js" crossorigin></script>
89
+ > const random = await import("@thi.ng/random");
81
90
  ```
82
91
 
83
- Package sizes (gzipped, pre-treeshake): ESM: 1.81 KB / CJS: 1.95 KB / UMD: 1.91 KB
92
+ Package sizes (gzipped, pre-treeshake): ESM: 1.82 KB
84
93
 
85
94
  ## Dependencies
86
95
 
87
96
  - [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api)
88
97
  - [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/develop/packages/checks)
98
+ - [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
89
99
  - [@thi.ng/hex](https://github.com/thi-ng/umbrella/tree/develop/packages/hex)
90
100
 
91
101
  ## Usage examples
@@ -96,12 +106,13 @@ directory are using this package.
96
106
 
97
107
  A selection:
98
108
 
99
- | Screenshot | Description | Live demo | Source |
100
- | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------- |
101
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
102
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/fft-synth.png" width="240"/> | Interactive inverse FFT toy synth | [Demo](https://demo.thi.ng/umbrella/fft-synth/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/fft-synth) |
103
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-sorting.png" width="240"/> | Interactive pixel sorting tool using thi.ng/color & thi.ng/pixel | [Demo](https://demo.thi.ng/umbrella/pixel-sorting/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting) |
104
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-ast-evo.jpg" width="240"/> | Evolutionary shader generation using genetic programming | [Demo](https://demo.thi.ng/umbrella/shader-ast-evo/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-ast-evo) |
109
+ | Screenshot | Description | Live demo | Source |
110
+ |:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------|:------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
111
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/color-themes) |
112
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/fft-synth.png" width="240"/> | Interactive inverse FFT toy synth | [Demo](https://demo.thi.ng/umbrella/fft-synth/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/fft-synth) |
113
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hdom-canvas-particles.jpg" width="240"/> | 2D Bezier curve-guided particle system | [Demo](https://demo.thi.ng/umbrella/hdom-canvas-particles/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hdom-canvas-particles) |
114
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-sorting.png" width="240"/> | Interactive pixel sorting tool using thi.ng/color & thi.ng/pixel | [Demo](https://demo.thi.ng/umbrella/pixel-sorting/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-sorting) |
115
+ | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/shader-ast-evo.jpg" width="240"/> | Evolutionary shader generation using genetic programming | [Demo](https://demo.thi.ng/umbrella/shader-ast-evo/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/shader-ast-evo) |
105
116
 
106
117
  ## API
107
118
 
package/arandom.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "./api";
1
+ import type { IRandom } from "./api.js";
2
2
  export declare abstract class ARandom implements IRandom {
3
3
  abstract int(): number;
4
4
  float(norm?: number): number;
package/coin.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "./api";
1
+ import type { IRandom } from "./api.js";
2
2
  /**
3
3
  * Returns true w/ a (theoretical) probability of 50% (obviously depending on
4
4
  * quality of given {@link IRandom}) PRNG.
package/coin.js CHANGED
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "./system";
1
+ import { SYSTEM } from "./system.js";
2
2
  /**
3
3
  * Returns true w/ a (theoretical) probability of 50% (obviously depending on
4
4
  * quality of given {@link IRandom}) PRNG.
package/crypto.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { IBuffered, ICopy } from "@thi.ng/api";
2
- import { ARandom } from "./arandom";
2
+ import { ARandom } from "./arandom.js";
3
3
  /**
4
4
  * Currently browser only, a `window.crypto` backed {@link IRandom}
5
5
  * implementation. Random values are buffered to minimize overhead. Buffer size
package/crypto.js CHANGED
@@ -1,5 +1,5 @@
1
- import { ARandom } from "./arandom";
2
- import { randomBytes } from "./random-bytes";
1
+ import { ARandom } from "./arandom.js";
2
+ import { randomBytes } from "./random-bytes.js";
3
3
  /**
4
4
  * Currently browser only, a `window.crypto` backed {@link IRandom}
5
5
  * implementation. Random values are buffered to minimize overhead. Buffer size
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "../api";
1
+ import type { IRandom } from "../api.js";
2
2
  /**
3
3
  * Higher order function. Returns no-arg function, yielding values in
4
4
  * exponential distribution based on given rate `lambda`.
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "../system";
1
+ import { SYSTEM } from "../system.js";
2
2
  /**
3
3
  * Higher order function. Returns no-arg function, yielding values in
4
4
  * exponential distribution based on given rate `lambda`.
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "../api";
1
+ import type { IRandom } from "../api.js";
2
2
  /**
3
3
  * Higher order function. Takes a {@link IRandom} instance and returns a no-arg
4
4
  * function which produces values with approx. normal distribution using CLT
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "../system";
1
+ import { SYSTEM } from "../system.js";
2
2
  /**
3
3
  * Higher order function. Takes a {@link IRandom} instance and returns a no-arg
4
4
  * function which produces values with approx. normal distribution using CLT
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "../api";
1
+ import type { IRandom } from "../api.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding values in geometric distribution,
4
4
  * aka the number of independent trials required for the first occurrence of
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "../system";
1
+ import { SYSTEM } from "../system.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding values in geometric distribution,
4
4
  * aka the number of independent trials required for the first occurrence of
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "../api";
1
+ import type { IRandom } from "../api.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding values with normal distribution
4
4
  * for given `bias` and standard deviation `sigma`.
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "../system";
1
+ import { SYSTEM } from "../system.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding values with normal distribution
4
4
  * for given `bias` and standard deviation `sigma`.
@@ -1,4 +1,4 @@
1
- import type { IRandom } from "../api";
1
+ import type { IRandom } from "../api.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding uniformly distributed values in the
4
4
  * `[min,max)` interval (default: `[0,1)`).
@@ -1,4 +1,4 @@
1
- import { SYSTEM } from "../system";
1
+ import { SYSTEM } from "../system.js";
2
2
  /**
3
3
  * HOF. Returns zero-arg function, yielding uniformly distributed values in the
4
4
  * `[min,max)` interval (default: `[0,1)`).
package/index.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- export * from "./api";
2
- export * from "./arandom";
3
- export * from "./crypto";
4
- export * from "./smush32";
5
- export * from "./system";
6
- export * from "./xoshiro128";
7
- export * from "./xorshift128";
8
- export * from "./xorwow";
9
- export * from "./xsadd";
10
- export * from "./coin";
11
- export * from "./random-bytes";
12
- export * from "./random-id";
13
- export * from "./unique-indices";
14
- export * from "./uuid";
15
- export * from "./weighted-random";
16
- export * from "./distributions/exponential";
17
- export * from "./distributions/gaussian";
18
- export * from "./distributions/geometric";
19
- export * from "./distributions/normal";
20
- export * from "./distributions/uniform";
1
+ export * from "./api.js";
2
+ export * from "./arandom.js";
3
+ export * from "./crypto.js";
4
+ export * from "./smush32.js";
5
+ export * from "./system.js";
6
+ export * from "./xoshiro128.js";
7
+ export * from "./xorshift128.js";
8
+ export * from "./xorwow.js";
9
+ export * from "./xsadd.js";
10
+ export * from "./coin.js";
11
+ export * from "./random-bytes.js";
12
+ export * from "./random-id.js";
13
+ export * from "./unique-indices.js";
14
+ export * from "./uuid.js";
15
+ export * from "./weighted-random.js";
16
+ export * from "./distributions/exponential.js";
17
+ export * from "./distributions/gaussian.js";
18
+ export * from "./distributions/geometric.js";
19
+ export * from "./distributions/normal.js";
20
+ export * from "./distributions/uniform.js";
21
21
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,20 +1,20 @@
1
- export * from "./api";
2
- export * from "./arandom";
3
- export * from "./crypto";
4
- export * from "./smush32";
5
- export * from "./system";
6
- export * from "./xoshiro128";
7
- export * from "./xorshift128";
8
- export * from "./xorwow";
9
- export * from "./xsadd";
10
- export * from "./coin";
11
- export * from "./random-bytes";
12
- export * from "./random-id";
13
- export * from "./unique-indices";
14
- export * from "./uuid";
15
- export * from "./weighted-random";
16
- export * from "./distributions/exponential";
17
- export * from "./distributions/gaussian";
18
- export * from "./distributions/geometric";
19
- export * from "./distributions/normal";
20
- export * from "./distributions/uniform";
1
+ export * from "./api.js";
2
+ export * from "./arandom.js";
3
+ export * from "./crypto.js";
4
+ export * from "./smush32.js";
5
+ export * from "./system.js";
6
+ export * from "./xoshiro128.js";
7
+ export * from "./xorshift128.js";
8
+ export * from "./xorwow.js";
9
+ export * from "./xsadd.js";
10
+ export * from "./coin.js";
11
+ export * from "./random-bytes.js";
12
+ export * from "./random-id.js";
13
+ export * from "./unique-indices.js";
14
+ export * from "./uuid.js";
15
+ export * from "./weighted-random.js";
16
+ export * from "./distributions/exponential.js";
17
+ export * from "./distributions/gaussian.js";
18
+ export * from "./distributions/geometric.js";
19
+ export * from "./distributions/normal.js";
20
+ export * from "./distributions/uniform.js";