toosoon-prng 1.0.2 → 1.0.4
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 +14 -46
- package/lib/controllers.d.ts +25 -27
- package/lib/controllers.js +11 -24
- package/lib/index.d.ts +1 -1
- package/lib/prng.d.ts +3 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/controllers.ts +13 -24
- package/src/index.ts +1 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TOOSOON PRNG
|
|
2
2
|
|
|
3
|
-
TOOSOON pseudo-random number generator utility functions &
|
|
3
|
+
TOOSOON pseudo-random number generator utility functions & controllers.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -24,59 +24,27 @@ PRNG:
|
|
|
24
24
|
import prng from 'toosoon-prng';
|
|
25
25
|
|
|
26
26
|
prng.setSeed('010101');
|
|
27
|
-
console.log(prng.randomFloat('angle', 0, Math.PI)); // Pseudo-random
|
|
27
|
+
console.log(prng.randomFloat('angle', 0, Math.PI)); // Pseudo-random number in the interval [0, PI]
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
PRNG Controllers:
|
|
31
31
|
|
|
32
32
|
```ts
|
|
33
|
-
import {
|
|
34
|
-
BooleanController,
|
|
35
|
-
SignController,
|
|
36
|
-
FloatController,
|
|
37
|
-
IntController,
|
|
38
|
-
HexColorController,
|
|
39
|
-
ItemController,
|
|
40
|
-
ObjectPropertyController,
|
|
41
|
-
WeightsController,
|
|
42
|
-
BooleanGroupController,
|
|
43
|
-
SignGroupController,
|
|
44
|
-
FloatGroupController,
|
|
45
|
-
IntGroupController,
|
|
46
|
-
HexColorGroupController,
|
|
47
|
-
ItemGroupController,
|
|
48
|
-
ObjectPropertyGroupController,
|
|
49
|
-
WeightsGroupController
|
|
50
|
-
} from 'toosoon-prng';
|
|
51
|
-
|
|
52
|
-
const seed = '010101';
|
|
33
|
+
import { FloatController, FloatGroupController } from 'toosoon-prng';
|
|
53
34
|
|
|
54
35
|
const config = {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
sign: new SignController(`${seed}-sign`, 0.5),
|
|
58
|
-
float: new FloatController(`${seed}-float`, 0, 1),
|
|
59
|
-
int: new IntController(`${seed}-int`, 0, 10),
|
|
60
|
-
hex: new HexColorController(`${seed}-hex`),
|
|
61
|
-
item: new ItemController<number>(`${seed}-item`, [0, 0.5, 1]),
|
|
62
|
-
property: new ObjectPropertyController<boolean>(`${seed}-property`, { foo: true, bar: false }),
|
|
63
|
-
value: new WeightsController<string>(`${seed}-value`, [
|
|
64
|
-
{ weight: 0.5, value: 'foo' },
|
|
65
|
-
{ weight: 2, value: 'bar' }
|
|
66
|
-
]),
|
|
67
|
-
// Group Controllers
|
|
68
|
-
groupBoolean: new BooleanGroupController(`${seed}-group-boolean`, 0.5),
|
|
69
|
-
groupSign: new SignGroupController(`${seed}-group-sign`, 0.5),
|
|
70
|
-
groupFloat: new FloatGroupController(`${seed}-group-float`, 0, 1),
|
|
71
|
-
groupInt: new IntGroupController(`${seed}-group-int`, 0, 10),
|
|
72
|
-
groupHex: new HexColorGroupController(`${seed}-group-hex`),
|
|
73
|
-
groupItem: new ItemGroupController<number>(`${seed}-group-item`, [0, 0.5, 1]),
|
|
74
|
-
groupProperty: new ObjectPropertyGroupController<boolean>(`${seed}-group-property`, { foo: true, bar: false }),
|
|
75
|
-
groupValue: new WeightsGroupController<string>(`${seed}-group-value`, [
|
|
76
|
-
{ weight: 0.5, value: 'foo' },
|
|
77
|
-
{ weight: 2, value: 'bar' }
|
|
78
|
-
])
|
|
36
|
+
angle: new FloatController('angle', 0, Math.PI),
|
|
37
|
+
angles: new FloatGroupController('angle', 0, Math.PI)
|
|
79
38
|
};
|
|
39
|
+
|
|
40
|
+
config.angle.addGui(gui, 0, Math.PI, 0.01);
|
|
41
|
+
config.angles.addGui(gui, 0, Math.PI, 0.01);
|
|
42
|
+
|
|
43
|
+
console.log(config.angle.getValue()); // Pseudo-random number in the interval [0, PI]
|
|
44
|
+
|
|
45
|
+
for (let i = 0; i < 5; i++) {
|
|
46
|
+
console.log(config.angles.getValueAt(i)); // 5 Pseudo-random numbers in the interval [0, PI]
|
|
47
|
+
}
|
|
80
48
|
```
|
|
81
49
|
|
|
82
50
|
## PRNG Functions
|
package/lib/controllers.d.ts
CHANGED
|
@@ -1,24 +1,14 @@
|
|
|
1
1
|
import type { Gui, GuiController } from 'toosoon-gui';
|
|
2
|
-
export declare enum PRNGControllerTypes {
|
|
3
|
-
Boolean = "Boolean",
|
|
4
|
-
Sign = "Sign",
|
|
5
|
-
Float = "Float",
|
|
6
|
-
Int = "Int",
|
|
7
|
-
HexColor = "HexColor",
|
|
8
|
-
Item = "Item",
|
|
9
|
-
ObjectProperty = "ObjectProperty",
|
|
10
|
-
Weights = "Weights"
|
|
11
|
-
}
|
|
12
2
|
export interface PRNGController<T = unknown> {
|
|
13
3
|
seed: string;
|
|
14
4
|
value: T;
|
|
15
|
-
|
|
5
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number): GuiController;
|
|
16
6
|
getValue(): T;
|
|
17
7
|
dispose(): void;
|
|
18
8
|
}
|
|
19
9
|
export interface PRNGGroupController<T = unknown> {
|
|
20
10
|
seed: string;
|
|
21
|
-
|
|
11
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number): Gui;
|
|
22
12
|
createController(index: number): PRNGController<T>;
|
|
23
13
|
getValueAt(index: number): T;
|
|
24
14
|
dispose(): void;
|
|
@@ -28,7 +18,7 @@ declare abstract class BasePRNGController<T> implements PRNGController<T> {
|
|
|
28
18
|
abstract value: T;
|
|
29
19
|
gui: GuiController;
|
|
30
20
|
constructor(seed: string);
|
|
31
|
-
abstract
|
|
21
|
+
abstract addGui(gui: Gui, min?: number, max?: number, step?: number): GuiController;
|
|
32
22
|
abstract getValue(): T;
|
|
33
23
|
dispose(): void;
|
|
34
24
|
}
|
|
@@ -42,7 +32,7 @@ declare abstract class BasePRNGGroupController<T> implements PRNGGroupController
|
|
|
42
32
|
step?: number;
|
|
43
33
|
};
|
|
44
34
|
constructor(seed: string);
|
|
45
|
-
|
|
35
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number): Gui;
|
|
46
36
|
abstract createController(index: number): PRNGController<T>;
|
|
47
37
|
getValueAt(index: number): T;
|
|
48
38
|
dispose(): void;
|
|
@@ -51,14 +41,14 @@ export declare class BooleanController extends BasePRNGController<boolean> {
|
|
|
51
41
|
value: boolean;
|
|
52
42
|
probability: number;
|
|
53
43
|
constructor(seed: string, probability?: number);
|
|
54
|
-
|
|
44
|
+
addGui(gui: Gui): GuiController;
|
|
55
45
|
getValue(): boolean;
|
|
56
46
|
}
|
|
57
47
|
export declare class SignController extends BasePRNGController<number> {
|
|
58
48
|
value: number;
|
|
59
49
|
probability: number;
|
|
60
50
|
constructor(seed: string, probability?: number);
|
|
61
|
-
|
|
51
|
+
addGui(gui: Gui): GuiController;
|
|
62
52
|
getValue(): number;
|
|
63
53
|
}
|
|
64
54
|
export declare class FloatController extends BasePRNGController<number> {
|
|
@@ -66,35 +56,39 @@ export declare class FloatController extends BasePRNGController<number> {
|
|
|
66
56
|
min: number;
|
|
67
57
|
max: number;
|
|
68
58
|
constructor(seed: string, min?: number, max?: number);
|
|
69
|
-
|
|
59
|
+
addGui(gui: Gui, min: number, max: number, step?: number): GuiController;
|
|
70
60
|
getValue(): number;
|
|
71
61
|
}
|
|
72
62
|
export declare class IntController extends BasePRNGController<number> {
|
|
73
63
|
value: number;
|
|
74
64
|
min: number;
|
|
75
65
|
max: number;
|
|
76
|
-
constructor(seed: string, min
|
|
77
|
-
|
|
66
|
+
constructor(seed: string, min: number, max: number);
|
|
67
|
+
addGui(gui: Gui, min: number, max: number, step?: number): GuiController;
|
|
78
68
|
getValue(): number;
|
|
79
69
|
}
|
|
80
70
|
export declare class HexColorController extends BasePRNGController<string> {
|
|
81
71
|
value: string;
|
|
82
72
|
constructor(seed: string);
|
|
83
|
-
|
|
73
|
+
addGui(gui: Gui): GuiController;
|
|
84
74
|
getValue(): string;
|
|
85
75
|
}
|
|
86
76
|
export declare class ItemController<T = unknown> extends BasePRNGController<T> {
|
|
87
77
|
value: T;
|
|
88
78
|
items: T[];
|
|
89
79
|
constructor(seed: string, items: T[]);
|
|
90
|
-
|
|
80
|
+
addGui(gui: Gui): GuiController;
|
|
91
81
|
getValue(): T;
|
|
92
82
|
}
|
|
93
83
|
export declare class ObjectPropertyController<T = unknown> extends BasePRNGController<T> {
|
|
94
84
|
value: T;
|
|
95
|
-
object:
|
|
96
|
-
|
|
97
|
-
|
|
85
|
+
object: {
|
|
86
|
+
[key: string]: T;
|
|
87
|
+
};
|
|
88
|
+
constructor(seed: string, object: {
|
|
89
|
+
[key: string]: T;
|
|
90
|
+
});
|
|
91
|
+
addGui(gui: Gui): GuiController;
|
|
98
92
|
getValue(): T;
|
|
99
93
|
}
|
|
100
94
|
type WeightsItems<T> = Array<{
|
|
@@ -106,7 +100,7 @@ export declare class WeightsController<T = unknown> extends BasePRNGController<T
|
|
|
106
100
|
items: WeightsItems<T>;
|
|
107
101
|
weights: number[];
|
|
108
102
|
constructor(seed: string, items: WeightsItems<T>);
|
|
109
|
-
|
|
103
|
+
addGui(gui: Gui): GuiController;
|
|
110
104
|
getValue(): T;
|
|
111
105
|
}
|
|
112
106
|
export declare class BooleanGroupController extends BasePRNGGroupController<boolean> {
|
|
@@ -146,9 +140,13 @@ export declare class ItemGroupController<T = unknown> extends BasePRNGGroupContr
|
|
|
146
140
|
createController(index: number): ItemController<T>;
|
|
147
141
|
}
|
|
148
142
|
export declare class ObjectPropertyGroupController<T = unknown> extends BasePRNGGroupController<T> {
|
|
149
|
-
object:
|
|
143
|
+
object: {
|
|
144
|
+
[key: string]: T;
|
|
145
|
+
};
|
|
150
146
|
controllers: ObjectPropertyController<T>[];
|
|
151
|
-
constructor(seed: string, object:
|
|
147
|
+
constructor(seed: string, object: {
|
|
148
|
+
[key: string]: T;
|
|
149
|
+
});
|
|
152
150
|
createController(index: number): ObjectPropertyController<T>;
|
|
153
151
|
}
|
|
154
152
|
export declare class WeightsGroupController<T = unknown> extends BasePRNGGroupController<T> {
|
package/lib/controllers.js
CHANGED
|
@@ -18,19 +18,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
18
18
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.WeightsGroupController = exports.ObjectPropertyGroupController = exports.ItemGroupController = exports.HexColorGroupController = exports.IntGroupController = exports.FloatGroupController = exports.SignGroupController = exports.BooleanGroupController = exports.WeightsController = exports.ObjectPropertyController = exports.ItemController = exports.HexColorController = exports.IntController = exports.FloatController = exports.SignController = exports.BooleanController =
|
|
21
|
+
exports.WeightsGroupController = exports.ObjectPropertyGroupController = exports.ItemGroupController = exports.HexColorGroupController = exports.IntGroupController = exports.FloatGroupController = exports.SignGroupController = exports.BooleanGroupController = exports.WeightsController = exports.ObjectPropertyController = exports.ItemController = exports.HexColorController = exports.IntController = exports.FloatController = exports.SignController = exports.BooleanController = void 0;
|
|
22
22
|
var prng_1 = __importDefault(require("./prng"));
|
|
23
|
-
var PRNGControllerTypes;
|
|
24
|
-
(function (PRNGControllerTypes) {
|
|
25
|
-
PRNGControllerTypes["Boolean"] = "Boolean";
|
|
26
|
-
PRNGControllerTypes["Sign"] = "Sign";
|
|
27
|
-
PRNGControllerTypes["Float"] = "Float";
|
|
28
|
-
PRNGControllerTypes["Int"] = "Int";
|
|
29
|
-
PRNGControllerTypes["HexColor"] = "HexColor";
|
|
30
|
-
PRNGControllerTypes["Item"] = "Item";
|
|
31
|
-
PRNGControllerTypes["ObjectProperty"] = "ObjectProperty";
|
|
32
|
-
PRNGControllerTypes["Weights"] = "Weights";
|
|
33
|
-
})(PRNGControllerTypes || (exports.PRNGControllerTypes = PRNGControllerTypes = {}));
|
|
34
23
|
// *********************
|
|
35
24
|
// Abstract controllers
|
|
36
25
|
// *********************
|
|
@@ -51,7 +40,7 @@ var BasePRNGGroupController = /** @class */ (function () {
|
|
|
51
40
|
this.controllers = [];
|
|
52
41
|
this.seed = seed;
|
|
53
42
|
}
|
|
54
|
-
BasePRNGGroupController.prototype.
|
|
43
|
+
BasePRNGGroupController.prototype.addGui = function (gui, min, max, step) {
|
|
55
44
|
this.gui = gui.addFolder(this.seed).close();
|
|
56
45
|
this.guiArgs = { min: min, max: max, step: step };
|
|
57
46
|
return this.gui;
|
|
@@ -62,7 +51,7 @@ var BasePRNGGroupController = /** @class */ (function () {
|
|
|
62
51
|
controller = this.createController(index);
|
|
63
52
|
if (this.gui) {
|
|
64
53
|
controller
|
|
65
|
-
.
|
|
54
|
+
.addGui(this.gui, this.guiArgs.min, this.guiArgs.max, this.guiArgs.step)
|
|
66
55
|
.name("".concat(this.seed, "-").concat(index));
|
|
67
56
|
}
|
|
68
57
|
this.controllers[index] = controller;
|
|
@@ -89,7 +78,7 @@ var BooleanController = /** @class */ (function (_super) {
|
|
|
89
78
|
_this.value = _this.getValue();
|
|
90
79
|
return _this;
|
|
91
80
|
}
|
|
92
|
-
BooleanController.prototype.
|
|
81
|
+
BooleanController.prototype.addGui = function (gui) {
|
|
93
82
|
this.gui = gui.add(this, 'value').name(this.seed);
|
|
94
83
|
return this.gui;
|
|
95
84
|
};
|
|
@@ -111,7 +100,7 @@ var SignController = /** @class */ (function (_super) {
|
|
|
111
100
|
_this.value = _this.getValue();
|
|
112
101
|
return _this;
|
|
113
102
|
}
|
|
114
|
-
SignController.prototype.
|
|
103
|
+
SignController.prototype.addGui = function (gui) {
|
|
115
104
|
this.gui = gui.add(this, 'value', [-1, 1]).name(this.seed);
|
|
116
105
|
return this.gui;
|
|
117
106
|
};
|
|
@@ -135,7 +124,7 @@ var FloatController = /** @class */ (function (_super) {
|
|
|
135
124
|
_this.value = _this.getValue();
|
|
136
125
|
return _this;
|
|
137
126
|
}
|
|
138
|
-
FloatController.prototype.
|
|
127
|
+
FloatController.prototype.addGui = function (gui, min, max, step) {
|
|
139
128
|
if (step === void 0) { step = 0.01; }
|
|
140
129
|
this.gui = gui.add(this, 'value', min, max, step).name(this.seed);
|
|
141
130
|
return this.gui;
|
|
@@ -152,15 +141,13 @@ exports.FloatController = FloatController;
|
|
|
152
141
|
var IntController = /** @class */ (function (_super) {
|
|
153
142
|
__extends(IntController, _super);
|
|
154
143
|
function IntController(seed, min, max) {
|
|
155
|
-
if (min === void 0) { min = 0; }
|
|
156
|
-
if (max === void 0) { max = 1; }
|
|
157
144
|
var _this = _super.call(this, seed) || this;
|
|
158
145
|
_this.min = min;
|
|
159
146
|
_this.max = max;
|
|
160
147
|
_this.value = prng_1.default.randomInt(_this.seed, min, max);
|
|
161
148
|
return _this;
|
|
162
149
|
}
|
|
163
|
-
IntController.prototype.
|
|
150
|
+
IntController.prototype.addGui = function (gui, min, max, step) {
|
|
164
151
|
if (step === void 0) { step = 1; }
|
|
165
152
|
this.gui = gui.add(this, 'value', min, max, step).name(this.seed);
|
|
166
153
|
return this.gui;
|
|
@@ -181,7 +168,7 @@ var HexColorController = /** @class */ (function (_super) {
|
|
|
181
168
|
_this.value = _this.getValue();
|
|
182
169
|
return _this;
|
|
183
170
|
}
|
|
184
|
-
HexColorController.prototype.
|
|
171
|
+
HexColorController.prototype.addGui = function (gui) {
|
|
185
172
|
this.gui = gui.addColor(this, 'value').name(this.seed);
|
|
186
173
|
return this.gui;
|
|
187
174
|
};
|
|
@@ -202,7 +189,7 @@ var ItemController = /** @class */ (function (_super) {
|
|
|
202
189
|
_this.value = _this.getValue();
|
|
203
190
|
return _this;
|
|
204
191
|
}
|
|
205
|
-
ItemController.prototype.
|
|
192
|
+
ItemController.prototype.addGui = function (gui) {
|
|
206
193
|
this.gui = gui.add(this, 'value', this.items).name(this.seed);
|
|
207
194
|
return this.gui;
|
|
208
195
|
};
|
|
@@ -223,7 +210,7 @@ var ObjectPropertyController = /** @class */ (function (_super) {
|
|
|
223
210
|
_this.value = _this.getValue();
|
|
224
211
|
return _this;
|
|
225
212
|
}
|
|
226
|
-
ObjectPropertyController.prototype.
|
|
213
|
+
ObjectPropertyController.prototype.addGui = function (gui) {
|
|
227
214
|
this.gui = gui.add(this, 'value', this.object).name(this.seed);
|
|
228
215
|
return this.gui;
|
|
229
216
|
};
|
|
@@ -245,7 +232,7 @@ var WeightsController = /** @class */ (function (_super) {
|
|
|
245
232
|
_this.value = _this.getValue();
|
|
246
233
|
return _this;
|
|
247
234
|
}
|
|
248
|
-
WeightsController.prototype.
|
|
235
|
+
WeightsController.prototype.addGui = function (gui) {
|
|
249
236
|
this.gui = gui
|
|
250
237
|
.add(this, 'value', this.items.map(function (item) { return item.value; }))
|
|
251
238
|
.name(this.seed);
|
package/lib/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { BooleanController, SignController, IntController, FloatController, HexColorController, ItemController, ObjectPropertyController, WeightsController, BooleanGroupController, SignGroupController, IntGroupController, FloatGroupController, HexColorGroupController, ItemGroupController, ObjectPropertyGroupController, WeightsGroupController } from './controllers';
|
|
2
|
+
export type { PRNGController, PRNGGroupController } from './controllers';
|
|
2
3
|
export { cyrb128, sfc32, mulberry32, jsf32, xoshiro128ss } from './utils';
|
|
3
|
-
export type { PRNGControllerTypes, PRNGController, PRNGGroupController } from './controllers';
|
|
4
4
|
export { default } from './prng';
|
package/lib/prng.d.ts
CHANGED
|
@@ -21,7 +21,9 @@ declare class PRNG {
|
|
|
21
21
|
randomInt(seed: string, min: number, max: number): number;
|
|
22
22
|
randomHexColor(seed: string): string;
|
|
23
23
|
randomItem<T = unknown>(seed: string, array?: T[]): T | undefined;
|
|
24
|
-
randomObjectProperty(seed: string, object:
|
|
24
|
+
randomObjectProperty<T = unknown>(seed: string, object: {
|
|
25
|
+
[key: string]: T;
|
|
26
|
+
}): T | undefined;
|
|
25
27
|
randomIndex(seed: string, weights?: number[]): number;
|
|
26
28
|
}
|
|
27
29
|
declare const prng: PRNG;
|
package/lib/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/toosoon-gui/lib/wrapper.d.ts","../node_modules/toosoon-gui/lib/types.d.ts","../node_modules/toosoon-gui/lib/controllers/controller.d.ts","../node_modules/toosoon-gui/lib/controllers/angle-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/color-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/coords-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/file-controller.d.ts","../node_modules/toosoon-gui/lib/gui.d.ts","../node_modules/toosoon-gui/lib/controllers/boolean-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/function-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/number-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/option-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/string-controller.d.ts","../node_modules/toosoon-gui/lib/index.d.ts","../src/utils.ts","../src/prng.ts","../src/controllers.ts","../src/index.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"bb0dc65300311f02c71ab5da7aeffe84364bfb53e727bcd29a20d0b3ae2a0ed4","2afcc0377d7c03c9146b153947520ad46967062ff0118dd512e88560f5c48c4b","c15c72246f26117c4e232ede5d394b80c6c983fb73a3d92ede4da3cf5dd44564","6339a44514a06c5e8f726cf27fc7fb2bf0e2ce5fe0de5545e4d412ba54c209f9","52800b74e97d62cd27f91a19ace28ca7ed32084fc5de80b015c8b62aabb4de99","2eba4de3285ccf1518aa5d87c683e4c4da38a837f69e112710fb107c58e86b9f","7b1267119c9c7c148ee973f8affd943c49f7ec2f5573f83cee25139492b533cd","1361b028bda65af72410feed749981eb80ced6439adf892ead6383fd779aa36e","027d78906c03890d8473731baca3acad76095aa2e68af1c6fcd32ded61d9a430","5eb3db8ef1b8f4eb5b16facea0a1cc3d9c22d6513de77a29c6630233c7ccf888","448bf4331abf7995b2ab5c4a449800e35fc3dbcfb522ed752d84564fd7d17374","3147a65dfdc1827b3a1b3899c5b316e8cc10eeb66f5c26c758bb24b2c962983a","845075e15760edf65e31220cbfc67b0bd436be0cd169181aa524dcf8987ff09e","db6c19a31bb62dc80afd34dd6c773f2385db59abf6608c3f293fedf78bcb1de3",{"version":"50b0ac11d8ac3c1ffc3d96b2047de1f23a71a34ef45278dab9db9663ac34ba43","signature":"a33086c14ef04ee690a02c14ed96e979a244182c9c16c01f8e341d56c4bb25e1"},{"version":"0650759ff8ac62a2cda3144808232debab75642d5abfcc43d6fb669e2e0c9a8d","signature":"f172dda59fe99dae26b48d0c5842827a7c1d80e6dd431ea64876848181ef4bba"},{"version":"edc5c3a31bc570bdebbd2138e3b1a909209b7ff1985d094e3704cd3eed154cee","signature":"34f3de3c34a7a0559f69ce84f1ba425f0d3c7b2461b449dcc3b885d8230fa7b8"},{"version":"73f9aba3dfd4486bbdf9d6b0647b0ca095c6dfd796c5c94dab541c4f51ee8f75","signature":"76e672d8e983a8a8853647e4b1d5d26eef55db7836923e81f8669be3b9a4b006"}],"root":[[79,82]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"strict":true,"target":1},"fileIdsList":[[67,72],[66,72],[66,67,68,69,70,71],[65,66,67,69,71,72,73,74,75,76,77],[65,67,72],[66,67,72],[78,80],[79,80,81],[79,81],[78],[81]],"referencedMap":[[68,1],[73,1],[69,1],[67,2],[70,1],[71,1],[74,1],[75,1],[76,1],[77,1],[72,3],[78,4],[66,5],[65,6],[81,7],[82,8],[80,9]],"exportedModulesMap":[[68,1],[73,1],[69,1],[67,2],[70,1],[71,1],[74,1],[75,1],[76,1],[77,1],[72,3],[78,4],[66,5],[65,6],[81,10],[82,8],[80,11]],"semanticDiagnosticsPerFile":[68,73,69,67,70,71,74,75,76,77,72,78,66,65,63,64,12,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,11,62,61,60,81,82,80,79]},"version":"5.3.3"}
|
|
1
|
+
{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.es2021.d.ts","../node_modules/typescript/lib/lib.es2022.d.ts","../node_modules/typescript/lib/lib.es2023.d.ts","../node_modules/typescript/lib/lib.esnext.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.date.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2019.intl.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.date.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.es2020.number.d.ts","../node_modules/typescript/lib/lib.es2021.promise.d.ts","../node_modules/typescript/lib/lib.es2021.string.d.ts","../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../node_modules/typescript/lib/lib.es2021.intl.d.ts","../node_modules/typescript/lib/lib.es2022.array.d.ts","../node_modules/typescript/lib/lib.es2022.error.d.ts","../node_modules/typescript/lib/lib.es2022.intl.d.ts","../node_modules/typescript/lib/lib.es2022.object.d.ts","../node_modules/typescript/lib/lib.es2022.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2022.string.d.ts","../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../node_modules/typescript/lib/lib.es2023.array.d.ts","../node_modules/typescript/lib/lib.es2023.collection.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../node_modules/typescript/lib/lib.esnext.disposable.d.ts","../node_modules/typescript/lib/lib.esnext.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.d.ts","../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../node_modules/toosoon-gui/lib/wrapper.d.ts","../node_modules/toosoon-gui/lib/types.d.ts","../node_modules/toosoon-gui/lib/controllers/controller.d.ts","../node_modules/toosoon-gui/lib/controllers/angle-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/color-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/coords-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/file-controller.d.ts","../node_modules/toosoon-gui/lib/gui.d.ts","../node_modules/toosoon-gui/lib/controllers/boolean-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/function-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/number-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/option-controller.d.ts","../node_modules/toosoon-gui/lib/controllers/string-controller.d.ts","../node_modules/toosoon-gui/lib/index.d.ts","../src/utils.ts","../src/prng.ts","../src/controllers.ts","../src/index.ts"],"fileInfos":[{"version":"f33e5332b24c3773e930e212cbb8b6867c8ba3ec4492064ea78e55a524d57450","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","26f2f787e82c4222710f3b676b4d83eb5ad0a72fa7b746f03449e7a026ce5073","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","5514e54f17d6d74ecefedc73c504eadffdeda79c7ea205cf9febead32d45c4bc","1c0cdb8dc619bc549c3e5020643e7cf7ae7940058e8c7e5aefa5871b6d86f44b","bed7b7ba0eb5a160b69af72814b4dde371968e40b6c5e73d3a9f7bee407d158c",{"version":"21e41a76098aa7a191028256e52a726baafd45a925ea5cf0222eb430c96c1d83","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"e0275cd0e42990dc3a16f0b7c8bca3efe87f1c8ad404f80c6db1c7c0b828c59f","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"ec0104fee478075cb5171e5f4e3f23add8e02d845ae0165bfa3f1099241fa2aa","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"acae90d417bee324b1372813b5a00829d31c7eb670d299cd7f8f9a648ac05688","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"62a4966981264d1f04c44eb0f4b5bdc3d81c1a54725608861e44755aa24ad6a5","affectsGlobalScope":true},{"version":"4fa6ed14e98aa80b91f61b9805c653ee82af3502dc21c9da5268d3857772ca05","affectsGlobalScope":true},{"version":"e6633e05da3ff36e6da2ec170d0d03ccf33de50ca4dc6f5aeecb572cedd162fb","affectsGlobalScope":true},{"version":"86a34c7a13de9cabc43161348f663624b56871ed80986e41d214932ddd8d6719","affectsGlobalScope":true},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true},{"version":"caccc56c72713969e1cfe5c3d44e5bab151544d9d2b373d7dbe5a1e4166652be","affectsGlobalScope":true},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true},{"version":"50d53ccd31f6667aff66e3d62adf948879a3a16f05d89882d1188084ee415bbc","affectsGlobalScope":true},{"version":"08a58483392df5fcc1db57d782e87734f77ae9eab42516028acbfe46f29a3ef7","affectsGlobalScope":true},{"version":"436aaf437562f276ec2ddbee2f2cdedac7664c1e4c1d2c36839ddd582eeb3d0a","affectsGlobalScope":true},{"version":"13f6e6380c78e15e140243dc4be2fa546c287c6d61f4729bc2dd7cf449605471","affectsGlobalScope":true},{"version":"4350e5922fecd4bedda2964d69c213a1436349d0b8d260dd902795f5b94dc74b","affectsGlobalScope":true},{"version":"d4b1d2c51d058fc21ec2629fff7a76249dec2e36e12960ea056e3ef89174080f","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"bb0dc65300311f02c71ab5da7aeffe84364bfb53e727bcd29a20d0b3ae2a0ed4","2afcc0377d7c03c9146b153947520ad46967062ff0118dd512e88560f5c48c4b","c15c72246f26117c4e232ede5d394b80c6c983fb73a3d92ede4da3cf5dd44564","6339a44514a06c5e8f726cf27fc7fb2bf0e2ce5fe0de5545e4d412ba54c209f9","52800b74e97d62cd27f91a19ace28ca7ed32084fc5de80b015c8b62aabb4de99","2eba4de3285ccf1518aa5d87c683e4c4da38a837f69e112710fb107c58e86b9f","7b1267119c9c7c148ee973f8affd943c49f7ec2f5573f83cee25139492b533cd","1361b028bda65af72410feed749981eb80ced6439adf892ead6383fd779aa36e","027d78906c03890d8473731baca3acad76095aa2e68af1c6fcd32ded61d9a430","5eb3db8ef1b8f4eb5b16facea0a1cc3d9c22d6513de77a29c6630233c7ccf888","448bf4331abf7995b2ab5c4a449800e35fc3dbcfb522ed752d84564fd7d17374","3147a65dfdc1827b3a1b3899c5b316e8cc10eeb66f5c26c758bb24b2c962983a","845075e15760edf65e31220cbfc67b0bd436be0cd169181aa524dcf8987ff09e","db6c19a31bb62dc80afd34dd6c773f2385db59abf6608c3f293fedf78bcb1de3",{"version":"50b0ac11d8ac3c1ffc3d96b2047de1f23a71a34ef45278dab9db9663ac34ba43","signature":"a33086c14ef04ee690a02c14ed96e979a244182c9c16c01f8e341d56c4bb25e1"},{"version":"88053433ff745a552451faf423790b2a4db3de3fbfbc205c1ab52e0d4961a047","signature":"c6ba19df4fc61bdf6e16e5a2a038eb8f2ec5f96dfe09c6d7ed5482050a86dd10"},{"version":"b48c362614657ce2812efed65f794e528ae6166ea47130e8ef39a93d971855b7","signature":"c9684c667c5c5a72e3cd40181c0fc9068b3b81ea9026096ca19146813508bf37"},{"version":"e9741764aa2123b708d01df940fbf0013a84097828807a9af845d0ac8c6d0e31","signature":"afaf6c2c49a218a2722df367c565475f2520d33a7ad72c0d850a47a1df09bd91"}],"root":[[79,82]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"esModuleInterop":true,"experimentalDecorators":true,"module":1,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","skipLibCheck":true,"strict":true,"target":1},"fileIdsList":[[67,72],[66,72],[66,67,68,69,70,71],[65,66,67,69,71,72,73,74,75,76,77],[65,67,72],[66,67,72],[78,80],[79,80,81],[79,81],[78],[81]],"referencedMap":[[68,1],[73,1],[69,1],[67,2],[70,1],[71,1],[74,1],[75,1],[76,1],[77,1],[72,3],[78,4],[66,5],[65,6],[81,7],[82,8],[80,9]],"exportedModulesMap":[[68,1],[73,1],[69,1],[67,2],[70,1],[71,1],[74,1],[75,1],[76,1],[77,1],[72,3],[78,4],[66,5],[65,6],[81,10],[82,8],[80,11]],"semanticDiagnosticsPerFile":[68,73,69,67,70,71,74,75,76,77,72,78,66,65,63,64,12,14,13,2,15,16,17,18,19,20,21,22,3,4,23,27,24,25,26,28,29,30,5,31,32,33,34,6,38,35,36,37,39,7,40,45,46,41,42,43,44,8,50,47,48,49,51,9,52,53,54,57,55,56,58,59,10,1,11,62,61,60,81,82,80,79]},"version":"5.3.3"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "toosoon-prng",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Pseudo-random number generator utility functions &
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Pseudo-random number generator utility functions & controllers",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "npx tsc",
|
package/src/controllers.ts
CHANGED
|
@@ -2,28 +2,17 @@ import type { Gui, GuiController } from 'toosoon-gui';
|
|
|
2
2
|
|
|
3
3
|
import prng from './prng';
|
|
4
4
|
|
|
5
|
-
export enum PRNGControllerTypes {
|
|
6
|
-
Boolean = 'Boolean',
|
|
7
|
-
Sign = 'Sign',
|
|
8
|
-
Float = 'Float',
|
|
9
|
-
Int = 'Int',
|
|
10
|
-
HexColor = 'HexColor',
|
|
11
|
-
Item = 'Item',
|
|
12
|
-
ObjectProperty = 'ObjectProperty',
|
|
13
|
-
Weights = 'Weights'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
5
|
export interface PRNGController<T = unknown> {
|
|
17
6
|
seed: string;
|
|
18
7
|
value: T;
|
|
19
|
-
|
|
8
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number): GuiController;
|
|
20
9
|
getValue(): T;
|
|
21
10
|
dispose(): void;
|
|
22
11
|
}
|
|
23
12
|
|
|
24
13
|
export interface PRNGGroupController<T = unknown> {
|
|
25
14
|
seed: string;
|
|
26
|
-
|
|
15
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number): Gui;
|
|
27
16
|
createController(index: number): PRNGController<T>;
|
|
28
17
|
getValueAt(index: number): T;
|
|
29
18
|
dispose(): void;
|
|
@@ -42,7 +31,7 @@ abstract class BasePRNGController<T> implements PRNGController<T> {
|
|
|
42
31
|
prng.addController(this);
|
|
43
32
|
}
|
|
44
33
|
|
|
45
|
-
abstract
|
|
34
|
+
abstract addGui(gui: Gui, min?: number, max?: number, step?: number): GuiController;
|
|
46
35
|
|
|
47
36
|
abstract getValue(): T;
|
|
48
37
|
|
|
@@ -66,7 +55,7 @@ abstract class BasePRNGGroupController<T> implements PRNGGroupController<T> {
|
|
|
66
55
|
this.seed = seed;
|
|
67
56
|
}
|
|
68
57
|
|
|
69
|
-
|
|
58
|
+
addGui(gui: Gui, min?: number, max?: number, step?: number) {
|
|
70
59
|
this.gui = gui.addFolder(this.seed).close();
|
|
71
60
|
this.guiArgs = { min, max, step };
|
|
72
61
|
return this.gui;
|
|
@@ -80,7 +69,7 @@ abstract class BasePRNGGroupController<T> implements PRNGGroupController<T> {
|
|
|
80
69
|
controller = this.createController(index);
|
|
81
70
|
if (this.gui) {
|
|
82
71
|
controller
|
|
83
|
-
.
|
|
72
|
+
.addGui(this.gui, this.guiArgs.min, this.guiArgs.max, this.guiArgs.step)
|
|
84
73
|
.name(`${this.seed}-${index}`);
|
|
85
74
|
}
|
|
86
75
|
this.controllers[index] = controller;
|
|
@@ -109,7 +98,7 @@ export class BooleanController extends BasePRNGController<boolean> {
|
|
|
109
98
|
this.value = this.getValue();
|
|
110
99
|
}
|
|
111
100
|
|
|
112
|
-
|
|
101
|
+
addGui(gui: Gui) {
|
|
113
102
|
this.gui = gui.add(this, 'value').name(this.seed);
|
|
114
103
|
return this.gui;
|
|
115
104
|
}
|
|
@@ -132,7 +121,7 @@ export class SignController extends BasePRNGController<number> {
|
|
|
132
121
|
this.value = this.getValue();
|
|
133
122
|
}
|
|
134
123
|
|
|
135
|
-
|
|
124
|
+
addGui(gui: Gui) {
|
|
136
125
|
this.gui = gui.add(this, 'value', [-1, 1]).name(this.seed);
|
|
137
126
|
return this.gui;
|
|
138
127
|
}
|
|
@@ -157,7 +146,7 @@ export class FloatController extends BasePRNGController<number> {
|
|
|
157
146
|
this.value = this.getValue();
|
|
158
147
|
}
|
|
159
148
|
|
|
160
|
-
|
|
149
|
+
addGui(gui: Gui, min: number, max: number, step: number = 0.01) {
|
|
161
150
|
this.gui = gui.add(this, 'value', min, max, step).name(this.seed);
|
|
162
151
|
return this.gui;
|
|
163
152
|
}
|
|
@@ -182,7 +171,7 @@ export class IntController extends BasePRNGController<number> {
|
|
|
182
171
|
this.value = prng.randomInt(this.seed, min, max);
|
|
183
172
|
}
|
|
184
173
|
|
|
185
|
-
|
|
174
|
+
addGui(gui: Gui, min: number, max: number, step = 1) {
|
|
186
175
|
this.gui = gui.add(this, 'value', min, max, step).name(this.seed);
|
|
187
176
|
return this.gui;
|
|
188
177
|
}
|
|
@@ -203,7 +192,7 @@ export class HexColorController extends BasePRNGController<string> {
|
|
|
203
192
|
this.value = this.getValue();
|
|
204
193
|
}
|
|
205
194
|
|
|
206
|
-
|
|
195
|
+
addGui(gui: Gui) {
|
|
207
196
|
this.gui = gui.addColor(this, 'value').name(this.seed);
|
|
208
197
|
return this.gui;
|
|
209
198
|
}
|
|
@@ -226,7 +215,7 @@ export class ItemController<T = unknown> extends BasePRNGController<T> {
|
|
|
226
215
|
this.value = this.getValue();
|
|
227
216
|
}
|
|
228
217
|
|
|
229
|
-
|
|
218
|
+
addGui(gui: Gui) {
|
|
230
219
|
this.gui = gui.add(this, 'value', this.items).name(this.seed);
|
|
231
220
|
return this.gui;
|
|
232
221
|
}
|
|
@@ -249,7 +238,7 @@ export class ObjectPropertyController<T = unknown> extends BasePRNGController<T>
|
|
|
249
238
|
this.value = this.getValue();
|
|
250
239
|
}
|
|
251
240
|
|
|
252
|
-
|
|
241
|
+
addGui(gui: Gui) {
|
|
253
242
|
this.gui = gui.add(this, 'value', this.object).name(this.seed);
|
|
254
243
|
return this.gui;
|
|
255
244
|
}
|
|
@@ -276,7 +265,7 @@ export class WeightsController<T = unknown> extends BasePRNGController<T> {
|
|
|
276
265
|
this.value = this.getValue();
|
|
277
266
|
}
|
|
278
267
|
|
|
279
|
-
|
|
268
|
+
addGui(gui: Gui) {
|
|
280
269
|
this.gui = gui
|
|
281
270
|
.add(
|
|
282
271
|
this,
|
package/src/index.ts
CHANGED
|
@@ -16,9 +16,8 @@ export {
|
|
|
16
16
|
ObjectPropertyGroupController,
|
|
17
17
|
WeightsGroupController
|
|
18
18
|
} from './controllers';
|
|
19
|
+
export type { PRNGController, PRNGGroupController } from './controllers';
|
|
19
20
|
|
|
20
21
|
export { cyrb128, sfc32, mulberry32, jsf32, xoshiro128ss } from './utils';
|
|
21
22
|
|
|
22
|
-
export type { PRNGControllerTypes, PRNGController, PRNGGroupController } from './controllers';
|
|
23
|
-
|
|
24
23
|
export { default } from './prng';
|