@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 +83 -148
- package/README.md +22 -11
- package/arandom.d.ts +1 -1
- package/coin.d.ts +1 -1
- package/coin.js +1 -1
- package/crypto.d.ts +1 -1
- package/crypto.js +2 -2
- package/distributions/exponential.d.ts +1 -1
- package/distributions/exponential.js +1 -1
- package/distributions/gaussian.d.ts +1 -1
- package/distributions/gaussian.js +1 -1
- package/distributions/geometric.d.ts +1 -1
- package/distributions/geometric.js +1 -1
- package/distributions/normal.d.ts +1 -1
- package/distributions/normal.js +1 -1
- package/distributions/uniform.d.ts +1 -1
- package/distributions/uniform.js +1 -1
- package/index.d.ts +20 -20
- package/index.js +20 -20
- package/package.json +94 -25
- package/random-bytes.d.ts +1 -1
- package/random-bytes.js +2 -2
- package/random-id.d.ts +1 -1
- package/random-id.js +1 -1
- package/smush32.d.ts +2 -2
- package/smush32.js +2 -2
- package/system.d.ts +1 -1
- package/system.js +1 -1
- package/unique-indices.d.ts +2 -2
- package/unique-indices.js +2 -2
- package/uuid.d.ts +1 -1
- package/uuid.js +1 -1
- package/weighted-random.d.ts +1 -1
- package/weighted-random.js +2 -2
- package/xorshift128.d.ts +2 -2
- package/xorshift128.js +2 -2
- package/xorwow.d.ts +2 -2
- package/xorwow.js +2 -2
- package/xoshiro128.d.ts +2 -2
- package/xoshiro128.js +2 -2
- package/xsadd.d.ts +2 -2
- package/xsadd.js +2 -2
- package/lib/index.js +0 -365
- package/lib/index.js.map +0 -1
- package/lib/index.umd.js +0 -1
- package/lib/index.umd.js.map +0 -1
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
|
-
## [
|
|
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
|
-
## [
|
|
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
|
-
|
|
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
|
-
|
|
30
|
+
### BREAKING CHANGES
|
|
126
31
|
|
|
32
|
+
* discontinue CommonJS & UMD versions
|
|
127
33
|
|
|
128
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
53
|
+
### Bug Fixes
|
|
140
54
|
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
69
|
+
### Bug Fixes
|
|
152
70
|
|
|
153
|
-
|
|
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
|
-
###
|
|
75
|
+
### Features
|
|
157
76
|
|
|
158
|
-
|
|
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
|
-
###
|
|
81
|
+
### Bug Fixes
|
|
162
82
|
|
|
163
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
124
|
+
### Bug Fixes
|
|
192
125
|
|
|
193
|
-
|
|
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
|
-
|
|
136
|
+
- **random:** add uuidv4Bytes() ([e9ea10f](https://github.com/thi-ng/umbrella/commit/e9ea10f5e6b2415863e1a552207758aa3a47c9cf))
|
|
200
137
|
|
|
201
|
-
|
|
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
|
-
|
|
140
|
+
### Features
|
|
204
141
|
|
|
205
|
-
|
|
142
|
+
- **random:** add randomBytes() wrapper ([c536bcd](https://github.com/thi-ng/umbrella/commit/c536bcd83c766414e349f6b82494ace9888ac2ba))
|
|
206
143
|
|
|
207
|
-
|
|
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
|
-
|
|
146
|
+
### Performance Improvements
|
|
210
147
|
|
|
211
|
-
|
|
148
|
+
- **random:** minor update ARandom.norm() ([babbbaa](https://github.com/thi-ng/umbrella/commit/babbbaa12b5be09415f420e7559fa5c8bb76f802))
|
|
212
149
|
|
|
213
|
-
|
|
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
|
-
|
|
152
|
+
### Bug Fixes
|
|
216
153
|
|
|
217
|
-
|
|
154
|
+
- **random:** add opt scale arg to IRandom.float() ([5a7e448](https://github.com/thi-ng/umbrella/commit/5a7e448))
|
|
218
155
|
|
|
219
|
-
|
|
156
|
+
### Features
|
|
220
157
|
|
|
221
|
-
|
|
158
|
+
- **random:** add randomID() & weightedRandom() ([f719724](https://github.com/thi-ng/umbrella/commit/f719724))
|
|
222
159
|
|
|
223
|
-
|
|
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
|
-
|
|
162
|
+
### Build System
|
|
226
163
|
|
|
227
|
-
|
|
164
|
+
- update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
|
|
228
165
|
|
|
229
|
-
|
|
166
|
+
### BREAKING CHANGES
|
|
230
167
|
|
|
231
|
-
-
|
|
232
|
-
|
|
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
|
-
#
|
|
172
|
+
# 0.1.0 (2018-11-24)
|
|
238
173
|
|
|
239
|
-
###
|
|
174
|
+
### Features
|
|
240
175
|
|
|
241
|
-
|
|
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
|
-
|
|
77
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
|
100
|
-
|
|
101
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/color-themes.png" width="240"/>
|
|
102
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/fft-synth.png" width="240"/>
|
|
103
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
104
|
-
| <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/
|
|
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
package/coin.d.ts
CHANGED
package/coin.js
CHANGED
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
|
package/distributions/normal.js
CHANGED
package/distributions/uniform.js
CHANGED
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";
|