@bitbybit-dev/base 1.2.0 → 1.3.0-rc.0
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/lib/api/GlobalCDNProvider.js +1 -1
- package/lib/api/inputs/base-inputs.d.ts +13 -12
- package/lib/api/inputs/color-inputs.d.ts +97 -48
- package/lib/api/inputs/color-inputs.js +95 -46
- package/lib/api/inputs/dates-inputs.d.ts +67 -26
- package/lib/api/inputs/dates-inputs.js +57 -16
- package/lib/api/inputs/io-inputs.d.ts +13 -15
- package/lib/api/inputs/io-inputs.js +7 -8
- package/lib/api/inputs/line-inputs.d.ts +88 -33
- package/lib/api/inputs/line-inputs.js +61 -11
- package/lib/api/inputs/lists-inputs.d.ts +207 -96
- package/lib/api/inputs/lists-inputs.js +153 -45
- package/lib/api/inputs/logic-inputs.d.ts +52 -22
- package/lib/api/inputs/logic-inputs.js +41 -12
- package/lib/api/inputs/math-inputs.d.ts +113 -52
- package/lib/api/inputs/math-inputs.js +112 -51
- package/lib/api/inputs/mesh-inputs.d.ts +30 -11
- package/lib/api/inputs/mesh-inputs.js +21 -3
- package/lib/api/inputs/point-inputs.d.ts +240 -107
- package/lib/api/inputs/point-inputs.js +199 -73
- package/lib/api/inputs/polyline-inputs.d.ts +68 -28
- package/lib/api/inputs/polyline-inputs.js +48 -13
- package/lib/api/inputs/text-inputs.d.ts +117 -46
- package/lib/api/inputs/text-inputs.js +111 -41
- package/lib/api/inputs/transforms-inputs.d.ts +65 -23
- package/lib/api/inputs/transforms-inputs.js +64 -22
- package/lib/api/inputs/vector-inputs.d.ts +154 -76
- package/lib/api/inputs/vector-inputs.js +132 -57
- package/lib/api/models/point/hex-grid-data.d.ts +1 -1
- package/lib/api/models/point/hex-grid-data.js +1 -1
- package/lib/api/services/color.d.ts +149 -70
- package/lib/api/services/color.js +149 -70
- package/lib/api/services/dates.d.ts +313 -150
- package/lib/api/services/dates.js +313 -150
- package/lib/api/services/line.d.ts +138 -68
- package/lib/api/services/line.js +138 -68
- package/lib/api/services/lists.d.ts +357 -177
- package/lib/api/services/lists.js +357 -177
- package/lib/api/services/logic.d.ts +98 -45
- package/lib/api/services/logic.js +98 -45
- package/lib/api/services/math.d.ts +363 -211
- package/lib/api/services/math.js +363 -211
- package/lib/api/services/mesh.d.ts +73 -31
- package/lib/api/services/mesh.js +73 -31
- package/lib/api/services/point.d.ts +367 -147
- package/lib/api/services/point.js +367 -147
- package/lib/api/services/polyline.d.ts +146 -71
- package/lib/api/services/polyline.js +146 -71
- package/lib/api/services/text.d.ts +320 -165
- package/lib/api/services/text.js +320 -165
- package/lib/api/services/transforms.d.ts +145 -58
- package/lib/api/services/transforms.js +145 -58
- package/lib/api/services/vector.d.ts +381 -156
- package/lib/api/services/vector.js +381 -156
- package/package.json +1 -1
|
@@ -21,72 +21,91 @@ export declare namespace Logic {
|
|
|
21
21
|
equal = "==",
|
|
22
22
|
notEqual = "!="
|
|
23
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Two values and an operator for `logic.compare`.
|
|
26
|
+
*/
|
|
24
27
|
class ComparisonDto<T> {
|
|
25
28
|
constructor(first?: T, second?: T, operator?: BooleanOperatorsEnum);
|
|
26
29
|
/**
|
|
27
|
-
*
|
|
30
|
+
* The value on the left of the operator.
|
|
28
31
|
* @default undefined
|
|
29
32
|
*/
|
|
30
33
|
first: T;
|
|
31
34
|
/**
|
|
32
|
-
*
|
|
35
|
+
* The value on the right of the operator.
|
|
33
36
|
* @default undefined
|
|
34
37
|
*/
|
|
35
38
|
second: T;
|
|
36
39
|
/**
|
|
37
|
-
*
|
|
40
|
+
* The comparison: `<`, `<=`, `>`, `>=`, `==`, `!=`, or the strict `===` and `!==`, which do
|
|
41
|
+
* not convert types.
|
|
38
42
|
* @default less
|
|
39
43
|
*/
|
|
40
44
|
operator: BooleanOperatorsEnum;
|
|
41
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* One boolean for `logic.boolean` and `logic.not`, which pass it through or flip it.
|
|
48
|
+
*/
|
|
42
49
|
class BooleanDto {
|
|
43
50
|
constructor(boolean?: boolean);
|
|
44
51
|
/**
|
|
45
|
-
*
|
|
52
|
+
* The boolean value.
|
|
46
53
|
* @default false
|
|
47
54
|
*/
|
|
48
55
|
boolean: boolean;
|
|
49
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* A list of booleans for `logic.notList`, which flips every one of them.
|
|
59
|
+
*/
|
|
50
60
|
class BooleanListDto {
|
|
51
61
|
constructor(booleans?: boolean[]);
|
|
52
62
|
/**
|
|
53
|
-
*
|
|
63
|
+
* The booleans, in order.
|
|
54
64
|
* @default undefined
|
|
55
65
|
*/
|
|
56
66
|
booleans: boolean[];
|
|
57
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* A value and a condition for `logic.valueGate`.
|
|
70
|
+
*/
|
|
58
71
|
class ValueGateDto<T> {
|
|
59
72
|
constructor(value?: T, boolean?: boolean);
|
|
60
73
|
/**
|
|
61
|
-
*
|
|
74
|
+
* The value that passes through when the gate is open.
|
|
62
75
|
* @default undefined
|
|
63
76
|
*/
|
|
64
77
|
value: T;
|
|
65
78
|
/**
|
|
66
|
-
*
|
|
79
|
+
* When true the gate is open and the value passes; when false the result is undefined.
|
|
67
80
|
* @default false
|
|
68
81
|
*/
|
|
69
82
|
boolean: boolean;
|
|
70
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* A preferred value and a fallback for `logic.firstDefinedValueGate`.
|
|
86
|
+
*/
|
|
71
87
|
class TwoValueGateDto<T, U> {
|
|
72
88
|
constructor(value1?: T, value2?: U);
|
|
73
89
|
/**
|
|
74
|
-
*
|
|
90
|
+
* The value used when it is defined.
|
|
75
91
|
* @default undefined
|
|
76
92
|
* @optional true
|
|
77
93
|
*/
|
|
78
94
|
value1?: T | undefined;
|
|
79
95
|
/**
|
|
80
|
-
*
|
|
96
|
+
* The value used when the first is undefined.
|
|
81
97
|
* @default undefined
|
|
82
98
|
* @optional true
|
|
83
99
|
*/
|
|
84
100
|
value2?: U | undefined;
|
|
85
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* A length and a probability for `logic.randomBooleans`.
|
|
104
|
+
*/
|
|
86
105
|
class RandomBooleansDto {
|
|
87
106
|
constructor(length?: number);
|
|
88
107
|
/**
|
|
89
|
-
*
|
|
108
|
+
* How many booleans to draw.
|
|
90
109
|
* @default 10
|
|
91
110
|
* @minimum 1
|
|
92
111
|
* @maximum Infinity
|
|
@@ -94,7 +113,7 @@ export declare namespace Logic {
|
|
|
94
113
|
*/
|
|
95
114
|
length: number;
|
|
96
115
|
/**
|
|
97
|
-
*
|
|
116
|
+
* The chance of each boolean being true, from 0 (never) to 1 (always).
|
|
98
117
|
* @default 0.5
|
|
99
118
|
* @minimum 0
|
|
100
119
|
* @maximum 1
|
|
@@ -102,14 +121,17 @@ export declare namespace Logic {
|
|
|
102
121
|
*/
|
|
103
122
|
trueThreshold: number;
|
|
104
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Numbers, two thresholds and a step count for `logic.twoThresholdRandomGradient`.
|
|
126
|
+
*/
|
|
105
127
|
class TwoThresholdRandomGradientDto {
|
|
106
128
|
/**
|
|
107
|
-
*
|
|
129
|
+
* The numbers to turn into booleans, one each.
|
|
108
130
|
* @default undefined
|
|
109
131
|
*/
|
|
110
132
|
numbers: number[];
|
|
111
133
|
/**
|
|
112
|
-
*
|
|
134
|
+
* Numbers below this are always true.
|
|
113
135
|
* @default 1
|
|
114
136
|
* @minimum 0
|
|
115
137
|
* @maximum Infinity
|
|
@@ -117,7 +139,8 @@ export declare namespace Logic {
|
|
|
117
139
|
*/
|
|
118
140
|
thresholdTotalTrue: number;
|
|
119
141
|
/**
|
|
120
|
-
*
|
|
142
|
+
* Numbers above this are always false; between the two thresholds the chance of true fades
|
|
143
|
+
* from certain to none.
|
|
121
144
|
* @default 2
|
|
122
145
|
* @minimum 0
|
|
123
146
|
* @maximum Infinity
|
|
@@ -125,7 +148,7 @@ export declare namespace Logic {
|
|
|
125
148
|
*/
|
|
126
149
|
thresholdTotalFalse: number;
|
|
127
150
|
/**
|
|
128
|
-
*
|
|
151
|
+
* How many steps the fade between the thresholds has; more steps make it smoother.
|
|
129
152
|
* @default 10
|
|
130
153
|
* @minimum 0
|
|
131
154
|
* @maximum Infinity
|
|
@@ -133,15 +156,17 @@ export declare namespace Logic {
|
|
|
133
156
|
*/
|
|
134
157
|
nrLevels: number;
|
|
135
158
|
}
|
|
159
|
+
/**
|
|
160
|
+
* Numbers and a threshold for `logic.thresholdBooleanList`, which turns them into booleans.
|
|
161
|
+
*/
|
|
136
162
|
class ThresholdBooleanListDto {
|
|
137
163
|
/**
|
|
138
|
-
*
|
|
164
|
+
* The numbers to turn into booleans, one each.
|
|
139
165
|
* @default undefined
|
|
140
166
|
*/
|
|
141
167
|
numbers: number[];
|
|
142
168
|
/**
|
|
143
|
-
*
|
|
144
|
-
* If number in the list is larger than this threshold it will become false if inverse stays false.
|
|
169
|
+
* Numbers below this become true and the rest false, unless `inverse` flips them.
|
|
145
170
|
* @default 1
|
|
146
171
|
* @minimum 0
|
|
147
172
|
* @maximum Infinity
|
|
@@ -149,24 +174,29 @@ export declare namespace Logic {
|
|
|
149
174
|
*/
|
|
150
175
|
threshold: number;
|
|
151
176
|
/**
|
|
152
|
-
*
|
|
177
|
+
* When true, every result is flipped: true becomes false and false becomes true.
|
|
153
178
|
* @default false
|
|
154
179
|
*/
|
|
155
180
|
inverse: boolean;
|
|
156
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Numbers and ranges for `logic.thresholdGapsBooleanList`, which marks the numbers inside any
|
|
184
|
+
* range.
|
|
185
|
+
*/
|
|
157
186
|
class ThresholdGapsBooleanListDto {
|
|
158
187
|
/**
|
|
159
|
-
*
|
|
188
|
+
* The numbers to turn into booleans, one each.
|
|
160
189
|
* @default undefined
|
|
161
190
|
*/
|
|
162
191
|
numbers: number[];
|
|
163
192
|
/**
|
|
164
|
-
*
|
|
193
|
+
* The ranges, each `[min, max]` with both ends included; a number inside any of them
|
|
194
|
+
* becomes true.
|
|
165
195
|
* @default undefined
|
|
166
196
|
*/
|
|
167
197
|
gapThresholds: Base.Vector2[];
|
|
168
198
|
/**
|
|
169
|
-
*
|
|
199
|
+
* When true, every result is flipped: true becomes false and false becomes true.
|
|
170
200
|
* @default false
|
|
171
201
|
*/
|
|
172
202
|
inverse: boolean;
|
|
@@ -24,10 +24,14 @@ export var Logic;
|
|
|
24
24
|
BooleanOperatorsEnum["equal"] = "==";
|
|
25
25
|
BooleanOperatorsEnum["notEqual"] = "!=";
|
|
26
26
|
})(BooleanOperatorsEnum = Logic.BooleanOperatorsEnum || (Logic.BooleanOperatorsEnum = {}));
|
|
27
|
+
/**
|
|
28
|
+
* Two values and an operator for `logic.compare`.
|
|
29
|
+
*/
|
|
27
30
|
class ComparisonDto {
|
|
28
31
|
constructor(first, second, operator) {
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* The comparison: `<`, `<=`, `>`, `>=`, `==`, `!=`, or the strict `===` and `!==`, which do
|
|
34
|
+
* not convert types.
|
|
31
35
|
* @default less
|
|
32
36
|
*/
|
|
33
37
|
this.operator = BooleanOperatorsEnum.less;
|
|
@@ -43,10 +47,13 @@ export var Logic;
|
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
Logic.ComparisonDto = ComparisonDto;
|
|
50
|
+
/**
|
|
51
|
+
* One boolean for `logic.boolean` and `logic.not`, which pass it through or flip it.
|
|
52
|
+
*/
|
|
46
53
|
class BooleanDto {
|
|
47
54
|
constructor(boolean) {
|
|
48
55
|
/**
|
|
49
|
-
*
|
|
56
|
+
* The boolean value.
|
|
50
57
|
* @default false
|
|
51
58
|
*/
|
|
52
59
|
this.boolean = false;
|
|
@@ -56,6 +63,9 @@ export var Logic;
|
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
65
|
Logic.BooleanDto = BooleanDto;
|
|
66
|
+
/**
|
|
67
|
+
* A list of booleans for `logic.notList`, which flips every one of them.
|
|
68
|
+
*/
|
|
59
69
|
class BooleanListDto {
|
|
60
70
|
constructor(booleans) {
|
|
61
71
|
if (booleans !== undefined) {
|
|
@@ -64,10 +74,13 @@ export var Logic;
|
|
|
64
74
|
}
|
|
65
75
|
}
|
|
66
76
|
Logic.BooleanListDto = BooleanListDto;
|
|
77
|
+
/**
|
|
78
|
+
* A value and a condition for `logic.valueGate`.
|
|
79
|
+
*/
|
|
67
80
|
class ValueGateDto {
|
|
68
81
|
constructor(value, boolean) {
|
|
69
82
|
/**
|
|
70
|
-
*
|
|
83
|
+
* When true the gate is open and the value passes; when false the result is undefined.
|
|
71
84
|
* @default false
|
|
72
85
|
*/
|
|
73
86
|
this.boolean = false;
|
|
@@ -80,6 +93,9 @@ export var Logic;
|
|
|
80
93
|
}
|
|
81
94
|
}
|
|
82
95
|
Logic.ValueGateDto = ValueGateDto;
|
|
96
|
+
/**
|
|
97
|
+
* A preferred value and a fallback for `logic.firstDefinedValueGate`.
|
|
98
|
+
*/
|
|
83
99
|
class TwoValueGateDto {
|
|
84
100
|
constructor(value1, value2) {
|
|
85
101
|
if (value1 !== undefined) {
|
|
@@ -91,10 +107,13 @@ export var Logic;
|
|
|
91
107
|
}
|
|
92
108
|
}
|
|
93
109
|
Logic.TwoValueGateDto = TwoValueGateDto;
|
|
110
|
+
/**
|
|
111
|
+
* A length and a probability for `logic.randomBooleans`.
|
|
112
|
+
*/
|
|
94
113
|
class RandomBooleansDto {
|
|
95
114
|
constructor(length) {
|
|
96
115
|
/**
|
|
97
|
-
*
|
|
116
|
+
* How many booleans to draw.
|
|
98
117
|
* @default 10
|
|
99
118
|
* @minimum 1
|
|
100
119
|
* @maximum Infinity
|
|
@@ -102,7 +121,7 @@ export var Logic;
|
|
|
102
121
|
*/
|
|
103
122
|
this.length = 10;
|
|
104
123
|
/**
|
|
105
|
-
*
|
|
124
|
+
* The chance of each boolean being true, from 0 (never) to 1 (always).
|
|
106
125
|
* @default 0.5
|
|
107
126
|
* @minimum 0
|
|
108
127
|
* @maximum 1
|
|
@@ -115,10 +134,13 @@ export var Logic;
|
|
|
115
134
|
}
|
|
116
135
|
}
|
|
117
136
|
Logic.RandomBooleansDto = RandomBooleansDto;
|
|
137
|
+
/**
|
|
138
|
+
* Numbers, two thresholds and a step count for `logic.twoThresholdRandomGradient`.
|
|
139
|
+
*/
|
|
118
140
|
class TwoThresholdRandomGradientDto {
|
|
119
141
|
constructor() {
|
|
120
142
|
/**
|
|
121
|
-
*
|
|
143
|
+
* Numbers below this are always true.
|
|
122
144
|
* @default 1
|
|
123
145
|
* @minimum 0
|
|
124
146
|
* @maximum Infinity
|
|
@@ -126,7 +148,8 @@ export var Logic;
|
|
|
126
148
|
*/
|
|
127
149
|
this.thresholdTotalTrue = 1;
|
|
128
150
|
/**
|
|
129
|
-
*
|
|
151
|
+
* Numbers above this are always false; between the two thresholds the chance of true fades
|
|
152
|
+
* from certain to none.
|
|
130
153
|
* @default 2
|
|
131
154
|
* @minimum 0
|
|
132
155
|
* @maximum Infinity
|
|
@@ -134,7 +157,7 @@ export var Logic;
|
|
|
134
157
|
*/
|
|
135
158
|
this.thresholdTotalFalse = 2;
|
|
136
159
|
/**
|
|
137
|
-
*
|
|
160
|
+
* How many steps the fade between the thresholds has; more steps make it smoother.
|
|
138
161
|
* @default 10
|
|
139
162
|
* @minimum 0
|
|
140
163
|
* @maximum Infinity
|
|
@@ -144,11 +167,13 @@ export var Logic;
|
|
|
144
167
|
}
|
|
145
168
|
}
|
|
146
169
|
Logic.TwoThresholdRandomGradientDto = TwoThresholdRandomGradientDto;
|
|
170
|
+
/**
|
|
171
|
+
* Numbers and a threshold for `logic.thresholdBooleanList`, which turns them into booleans.
|
|
172
|
+
*/
|
|
147
173
|
class ThresholdBooleanListDto {
|
|
148
174
|
constructor() {
|
|
149
175
|
/**
|
|
150
|
-
*
|
|
151
|
-
* If number in the list is larger than this threshold it will become false if inverse stays false.
|
|
176
|
+
* Numbers below this become true and the rest false, unless `inverse` flips them.
|
|
152
177
|
* @default 1
|
|
153
178
|
* @minimum 0
|
|
154
179
|
* @maximum Infinity
|
|
@@ -156,17 +181,21 @@ export var Logic;
|
|
|
156
181
|
*/
|
|
157
182
|
this.threshold = 1;
|
|
158
183
|
/**
|
|
159
|
-
*
|
|
184
|
+
* When true, every result is flipped: true becomes false and false becomes true.
|
|
160
185
|
* @default false
|
|
161
186
|
*/
|
|
162
187
|
this.inverse = false;
|
|
163
188
|
}
|
|
164
189
|
}
|
|
165
190
|
Logic.ThresholdBooleanListDto = ThresholdBooleanListDto;
|
|
191
|
+
/**
|
|
192
|
+
* Numbers and ranges for `logic.thresholdGapsBooleanList`, which marks the numbers inside any
|
|
193
|
+
* range.
|
|
194
|
+
*/
|
|
166
195
|
class ThresholdGapsBooleanListDto {
|
|
167
196
|
constructor() {
|
|
168
197
|
/**
|
|
169
|
-
*
|
|
198
|
+
* When true, every result is flipped: true becomes false and false becomes true.
|
|
170
199
|
* @default false
|
|
171
200
|
*/
|
|
172
201
|
this.inverse = false;
|