@thi.ng/random 4.1.41 → 4.1.43

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
- <!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
- # ![@thi.ng/random](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/banners/thing-random.svg?58fd6345)
2
+ <!-- Please see: https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#changes-to-readme-files -->
3
+ # ![@thi.ng/random](https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/banners/thing-random.svg?58fd6345)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/random.svg)](https://www.npmjs.com/package/@thi.ng/random)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/random.svg)
@@ -8,11 +8,12 @@
8
8
 
9
9
  > [!NOTE]
10
10
  > This is one of 214 standalone projects, maintained as part
11
- > of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
11
+ > of the [@thi.ng/umbrella](https://codeberg.org/thi.ng/umbrella/) ecosystem
12
12
  > and anti-framework.
13
13
  >
14
- > 🚀 Please help me to work full-time on these projects by [sponsoring me on
15
- > GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
14
+ > 🚀 Please help me to work full-time on these projects by [sponsoring
15
+ > me](https://codeberg.org/thi.ng/umbrella/src/branch/develop/CONTRIBUTING.md#donations).
16
+ > Thank you! ❤️
16
17
 
17
18
  - [About](#about)
18
19
  - [Random distributions](#random-distributions)
@@ -41,48 +42,48 @@ This package provides the `IRandom` interface and various (mostly seedable)
41
42
  pseudo-random number generator implementations, incl. `IRandom` wrappers for
42
43
  `Math.random()` (or other external PRNGs) and `window.crypto`:
43
44
 
44
- - [Crypto](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/crypto.ts)
45
- - [SFC32](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/sfc32.ts)
46
- - [Smush32](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/smush32.ts)
47
- - [System](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/system.ts)
48
- - [WrappedRandom](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/wrapped.ts)
49
- - [Xoshiro128](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/xoshiro128.ts)
50
- - [XorShift128](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/xorshift128.ts)
51
- - [XorWow](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/xorwow.ts)
52
- - [XsAdd](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/xsadd.ts)
45
+ - [Crypto](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/crypto.ts)
46
+ - [SFC32](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/sfc32.ts)
47
+ - [Smush32](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/smush32.ts)
48
+ - [System](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/system.ts)
49
+ - [WrappedRandom](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/wrapped.ts)
50
+ - [Xoshiro128](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/xoshiro128.ts)
51
+ - [XorShift128](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/xorshift128.ts)
52
+ - [XorWow](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/xorwow.ts)
53
+ - [XsAdd](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/xsadd.ts)
53
54
 
54
55
  Partially ported from C implementations taken from [c.thi.ng](http://c.thi.ng).
55
56
 
56
57
  ### Random distributions
57
58
 
58
- - [`exponential()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/distributions/exponential.ts)
59
- - [`gaussian()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/distributions/gaussian.ts)
60
- - [`geometric()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/distributions/geometric.ts)
61
- - [`normal()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/distributions/normal.ts)
62
- - [`uniform()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/distributions/uniform.ts)
59
+ - [`exponential()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/distributions/exponential.ts)
60
+ - [`gaussian()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/distributions/gaussian.ts)
61
+ - [`geometric()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/distributions/geometric.ts)
62
+ - [`normal()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/distributions/normal.ts)
63
+ - [`uniform()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/distributions/uniform.ts)
63
64
 
64
65
  ### Other utilities
65
66
 
66
- - [`coin()` / `fairCoin()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/coin.ts)
67
- - [`pickRandom()` / `pickRandomKey()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/pick-random.ts)
68
- - [`randomBytes()` / `randomBytesFrom()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/random-bytes.ts)
69
- - [`randomID()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/random-id.ts)
70
- - [`weightedRandom()` / `weightedRandomKey()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/weighted-random.ts)
71
- - [`uniqueIndices()` / `uniqueValuesFrom()`](https://github.com/thi-ng/umbrella/tree/develop/packages/random/src/unique-indices.ts)
67
+ - [`coin()` / `fairCoin()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/coin.ts)
68
+ - [`pickRandom()` / `pickRandomKey()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/pick-random.ts)
69
+ - [`randomBytes()` / `randomBytesFrom()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/random-bytes.ts)
70
+ - [`randomID()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/random-id.ts)
71
+ - [`weightedRandom()` / `weightedRandomKey()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/weighted-random.ts)
72
+ - [`uniqueIndices()` / `uniqueValuesFrom()`](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random/src/unique-indices.ts)
72
73
 
73
74
  ## Status
74
75
 
75
76
  **STABLE** - used in production
76
77
 
77
- [Search or submit any issues for this package](https://github.com/thi-ng/umbrella/issues?q=%5Brandom%5D+in%3Atitle)
78
+ [Search or submit any issues for this package](https://codeberg.org/thi.ng/umbrella/issues?q=%5Brandom%5D)
78
79
 
79
80
  ## Support packages
80
81
 
81
- - [@thi.ng/random-fxhash](https://github.com/thi-ng/umbrella/tree/develop/packages/random-fxhash) - [@thi.ng/random](https://github.com/thi-ng/umbrella/tree/develop/packages/random) compatible wrapper & utilities for fxhash's PRNG
82
+ - [@thi.ng/random-fxhash](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random-fxhash) - [@thi.ng/random](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/random) compatible wrapper & utilities for fxhash's PRNG
82
83
 
83
84
  ## Related packages
84
85
 
85
- - [@thi.ng/ksuid](https://github.com/thi-ng/umbrella/tree/develop/packages/ksuid) - Configurable K-sortable unique IDs, ULIDs, binary & base-N encoded, 32/48/64bit time resolutions
86
+ - [@thi.ng/ksuid](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/ksuid) - Configurable K-sortable unique IDs, ULIDs, binary & base-N encoded, 32/48/64bit time resolutions
86
87
 
87
88
  ## Installation
88
89
 
@@ -114,38 +115,38 @@ Package sizes (brotli'd, pre-treeshake): ESM: 1.93 KB
114
115
 
115
116
  ## Dependencies
116
117
 
117
- - [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api)
118
- - [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
118
+ - [@thi.ng/api](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/api)
119
+ - [@thi.ng/errors](https://codeberg.org/thi.ng/umbrella/src/branch/develop/packages/errors)
119
120
 
120
121
  Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
121
122
 
122
123
  ## Usage examples
123
124
 
124
125
  19 projects in this repo's
125
- [/examples](https://github.com/thi-ng/umbrella/tree/develop/examples)
126
+ [/examples](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples)
126
127
  directory are using this package:
127
128
 
128
- | Screenshot | Description | Live demo | Source |
129
- |:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
130
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/canvas-recorder.png" width="240"/> | Self-modifying, animated typographic grid with emergent complex patterns | [Demo](https://demo.thi.ng/umbrella/canvas-recorder/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/canvas-recorder) |
131
- | <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) |
132
- | <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) |
133
- | <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) |
134
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/hiccup-canvas-basics.png" width="240"/> | Basic hiccup-based canvas drawing | [Demo](https://demo.thi.ng/umbrella/hiccup-canvas-basics/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/hiccup-canvas-basics) |
135
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/ifs-fractal.jpg" width="240"/> | Barnsley fern IFS fractal renderer | [Demo](https://demo.thi.ng/umbrella/ifs-fractal/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/ifs-fractal) |
136
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/kmeans-viz.jpg" width="240"/> | k-means clustering visualization | [Demo](https://demo.thi.ng/umbrella/kmeans-viz/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/kmeans-viz) |
137
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/layout-gridgen.png" width="240"/> | Randomized space-filling, nested grid layout generator | [Demo](https://demo.thi.ng/umbrella/layout-gridgen/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/layout-gridgen) |
138
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/pixel-gradients.jpg" width="240"/> | Randomized 4-point 2D color gradient image generator | [Demo](https://demo.thi.ng/umbrella/pixel-gradients/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/pixel-gradients) |
139
- | <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) |
140
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/poly-subdiv.jpg" width="240"/> | Animated, iterative polygon subdivisions & visualization | [Demo](https://demo.thi.ng/umbrella/poly-subdiv/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/poly-subdiv) |
141
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/procedural-text) |
142
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/rdom-klist.png" width="240"/> | Basic usage of thi.ng/rdom keyed list component wrapper | [Demo](https://demo.thi.ng/umbrella/rdom-klist/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/rdom-klist) |
143
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/render-audio.png" width="240"/> | Generative audio synth offline renderer and WAV file export | [Demo](https://demo.thi.ng/umbrella/render-audio/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/render-audio) |
144
- | <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) |
145
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/stacked-layout.png" width="240"/> | Responsive & reactively computed stacked column layout | [Demo](https://demo.thi.ng/umbrella/stacked-layout/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/stacked-layout) |
146
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/thing-packages-quiz.avif" width="240"/> | thi.ng/rdom & thi.ng/rstream based quiz to guess thi.ng package names | [Demo](https://demo.thi.ng/umbrella/thing-packages-quiz/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/thing-packages-quiz) |
147
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/tsne-colors.avif" width="240"/> | Animated t-SNE visualization of 4D data | [Demo](https://demo.thi.ng/umbrella/tsne-colors/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/tsne-colors) |
148
- | <img src="https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/webgl-game-of-life.png" width="240"/> | Game of Life implemented as WebGL2 multi-pass shader pipeline | [Demo](https://demo.thi.ng/umbrella/webgl-game-of-life/) | [Source](https://github.com/thi-ng/umbrella/tree/develop/examples/webgl-game-of-life) |
129
+ | Screenshot | Description | Live demo | Source |
130
+ |:-----------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|:------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|
131
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/canvas-recorder.png" width="240"/> | Self-modifying, animated typographic grid with emergent complex patterns | [Demo](https://demo.thi.ng/umbrella/canvas-recorder/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/canvas-recorder) |
132
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/color-themes.png" width="240"/> | Probabilistic color theme generator | [Demo](https://demo.thi.ng/umbrella/color-themes/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/color-themes) |
133
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/fft-synth.png" width="240"/> | Interactive inverse FFT toy synth | [Demo](https://demo.thi.ng/umbrella/fft-synth/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/fft-synth) |
134
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/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://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/hdom-canvas-particles) |
135
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/hiccup-canvas-basics.png" width="240"/> | Basic hiccup-based canvas drawing | [Demo](https://demo.thi.ng/umbrella/hiccup-canvas-basics/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/hiccup-canvas-basics) |
136
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/ifs-fractal.jpg" width="240"/> | Barnsley fern IFS fractal renderer | [Demo](https://demo.thi.ng/umbrella/ifs-fractal/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/ifs-fractal) |
137
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/kmeans-viz.jpg" width="240"/> | k-means clustering visualization | [Demo](https://demo.thi.ng/umbrella/kmeans-viz/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/kmeans-viz) |
138
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/layout-gridgen.png" width="240"/> | Randomized space-filling, nested grid layout generator | [Demo](https://demo.thi.ng/umbrella/layout-gridgen/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/layout-gridgen) |
139
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/pixel-gradients.jpg" width="240"/> | Randomized 4-point 2D color gradient image generator | [Demo](https://demo.thi.ng/umbrella/pixel-gradients/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/pixel-gradients) |
140
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/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://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/pixel-sorting) |
141
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/poly-subdiv.jpg" width="240"/> | Animated, iterative polygon subdivisions & visualization | [Demo](https://demo.thi.ng/umbrella/poly-subdiv/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/poly-subdiv) |
142
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/procedural-text.jpg" width="240"/> | Procedural stochastic text generation via custom DSL, parse grammar & AST transformation | [Demo](https://demo.thi.ng/umbrella/procedural-text/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/procedural-text) |
143
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/rdom-klist.png" width="240"/> | Basic usage of thi.ng/rdom keyed list component wrapper | [Demo](https://demo.thi.ng/umbrella/rdom-klist/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/rdom-klist) |
144
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/render-audio.png" width="240"/> | Generative audio synth offline renderer and WAV file export | [Demo](https://demo.thi.ng/umbrella/render-audio/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/render-audio) |
145
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/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://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/shader-ast-evo) |
146
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/stacked-layout.png" width="240"/> | Responsive & reactively computed stacked column layout | [Demo](https://demo.thi.ng/umbrella/stacked-layout/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/stacked-layout) |
147
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/thing-packages-quiz.avif" width="240"/> | thi.ng/rdom & thi.ng/rstream based quiz to guess thi.ng package names | [Demo](https://demo.thi.ng/umbrella/thing-packages-quiz/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/thing-packages-quiz) |
148
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/tsne-colors.avif" width="240"/> | Animated t-SNE visualization of 4D data | [Demo](https://demo.thi.ng/umbrella/tsne-colors/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/tsne-colors) |
149
+ | <img src="https://codeberg.org/thi.ng/umbrella/media/branch/develop/assets/examples/webgl-game-of-life.png" width="240"/> | Game of Life implemented as WebGL2 multi-pass shader pipeline | [Demo](https://demo.thi.ng/umbrella/webgl-game-of-life/) | [Source](https://codeberg.org/thi.ng/umbrella/src/branch/develop/examples/webgl-game-of-life) |
149
150
 
150
151
  ## API
151
152
 
package/api.d.ts CHANGED
@@ -7,7 +7,7 @@ export interface INorm {
7
7
  * Not to be confused with the {@link normal} distribution function. The
8
8
  * name here refers to "normalized".
9
9
  *
10
- * Also see: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
10
+ * Also see: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
11
11
  *
12
12
  * @param scale - default 1
13
13
  */
@@ -18,7 +18,7 @@ export interface INorm {
18
18
  * the `(-min..min)` range). Both `min` and `max` MUST be >= 0.
19
19
  *
20
20
  * @remarks
21
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
21
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
22
22
  *
23
23
  * @param min
24
24
  * @param max
@@ -30,14 +30,14 @@ export interface IRandom extends INorm {
30
30
  * Returns unsigned 32bit int in `[0,0xffffffff]` interval.
31
31
  *
32
32
  * @remarks
33
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
33
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
34
34
  */
35
35
  int(): number;
36
36
  /**
37
37
  * Returns float in `[0,max)` interval.
38
38
  *
39
39
  * @remarks
40
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
40
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
41
41
  *
42
42
  * @param max - default 1
43
43
  */
@@ -53,7 +53,7 @@ export interface IRandom extends INorm {
53
53
  * Returns float in `[min,max)` interval.
54
54
  *
55
55
  * @remarks
56
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
56
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
57
57
  *
58
58
  * @param min -
59
59
  * @param max -
@@ -63,7 +63,7 @@ export interface IRandom extends INorm {
63
63
  * Returns int in **signed** integer `[min,max)` interval.
64
64
  *
65
65
  * @remarks
66
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
66
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
67
67
  *
68
68
  * @param min -
69
69
  * @param max -
@@ -73,7 +73,7 @@ export interface IRandom extends INorm {
73
73
  * Returns int in **unsigned** integer `[min,max)` interval.
74
74
  *
75
75
  * @remarks
76
- * See: https://github.com/thi-ng/umbrella/wiki/Glossary#interval
76
+ * See: https://codeberg.org/thi.ng/umbrella/wiki/Glossary#interval
77
77
  *
78
78
  * @param min -
79
79
  * @param max -
package/crypto.d.ts CHANGED
@@ -11,7 +11,7 @@ import { ARandom } from "./arandom.js";
11
11
  *
12
12
  */
13
13
  export declare class Crypto extends ARandom implements IBuffered<Uint8Array>, ICopy<Crypto> {
14
- buffer: Uint8Array;
14
+ buffer: Uint8Array<ArrayBuffer>;
15
15
  protected u32: Uint32Array;
16
16
  protected i: number;
17
17
  /**
@@ -19,7 +19,7 @@ export declare class Crypto extends ARandom implements IBuffered<Uint8Array>, IC
19
19
  */
20
20
  constructor(size?: number);
21
21
  copy(): Crypto;
22
- bytes(): Uint8Array<ArrayBufferLike>;
22
+ bytes(): Uint8Array<ArrayBuffer>;
23
23
  int(): number;
24
24
  }
25
25
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/random",
3
- "version": "4.1.41",
3
+ "version": "4.1.43",
4
4
  "description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -8,7 +8,7 @@
8
8
  "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/thi-ng/umbrella.git",
11
+ "url": "git+https://codeberg.org/thi.ng/umbrella.git",
12
12
  "directory": "packages/random"
13
13
  },
14
14
  "homepage": "https://thi.ng/random",
@@ -40,8 +40,8 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.12.16",
44
- "@thi.ng/errors": "^2.6.5"
43
+ "@thi.ng/api": "^8.12.18",
44
+ "@thi.ng/errors": "^2.6.7"
45
45
  },
46
46
  "devDependencies": {
47
47
  "esbuild": "^0.27.2",
@@ -160,5 +160,5 @@
160
160
  "ksuid"
161
161
  ]
162
162
  },
163
- "gitHead": "411adbeeb5c03da1cf0c86e567c80942a6b875e7\n"
163
+ "gitHead": "8ddf86ea0a1e658ddbf19cc645b29d0c176e29c4\n"
164
164
  }
package/random-bytes.d.ts CHANGED
@@ -8,7 +8,7 @@ import type { IRandom } from "./api.js";
8
8
  * @param start -
9
9
  * @param end -
10
10
  */
11
- export declare const randomBytesFrom: (rnd: IRandom, buf: Uint8Array, start?: number, end?: number) => Uint8Array<ArrayBufferLike>;
11
+ export declare const randomBytesFrom: (rnd: IRandom, buf: Uint8Array<ArrayBuffer>, start?: number, end?: number) => Uint8Array<ArrayBuffer>;
12
12
  /**
13
13
  * Fills given byte array with random values. Wrapper for
14
14
  * `crypto.getRandomValues()` with automatic fallback to using `Math.random` if
@@ -18,5 +18,5 @@ export declare const randomBytesFrom: (rnd: IRandom, buf: Uint8Array, start?: nu
18
18
  * @param start -
19
19
  * @param end -
20
20
  */
21
- export declare const randomBytes: (buf: Uint8Array, start?: number, end?: number) => Uint8Array<ArrayBufferLike>;
21
+ export declare const randomBytes: (buf: Uint8Array<ArrayBuffer>, start?: number, end?: number) => Uint8Array<ArrayBuffer>;
22
22
  //# sourceMappingURL=random-bytes.d.ts.map