@bitbybit-dev/base 0.19.7 → 0.19.8
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/babel.config.cjs +0 -1
- package/{index.js → index.ts} +2 -1
- package/lib/api/inputs/base-inputs.ts +18 -0
- package/lib/api/inputs/{color-inputs.d.ts → color-inputs.ts} +48 -26
- package/lib/api/inputs/{lists-inputs.d.ts → lists-inputs.ts} +190 -91
- package/lib/api/inputs/{logic-inputs.d.ts → logic-inputs.ts} +46 -24
- package/lib/api/inputs/{math-inputs.d.ts → math-inputs.ts} +97 -53
- package/lib/api/inputs/{point-inputs.d.ts → point-inputs.ts} +168 -77
- package/lib/api/inputs/text-inputs.ts +108 -0
- package/lib/api/inputs/{transforms-inputs.d.ts → transforms-inputs.ts} +64 -35
- package/lib/api/inputs/{vector-inputs.d.ts → vector-inputs.ts} +104 -48
- package/lib/api/services/color.test.ts +86 -0
- package/lib/api/services/{color.js → color.ts} +34 -15
- package/lib/api/services/{geometry-helper.js → geometry-helper.ts} +43 -31
- package/lib/api/services/{index.d.ts → index.ts} +1 -1
- package/lib/api/services/lists.test.ts +612 -0
- package/lib/api/services/{lists.js → lists.ts} +83 -59
- package/lib/api/services/logic.test.ts +187 -0
- package/lib/api/services/{logic.js → logic.ts} +32 -24
- package/lib/api/services/math.test.ts +622 -0
- package/lib/api/services/{math.js → math.ts} +136 -71
- package/lib/api/services/{point.js → point.ts} +67 -32
- package/lib/api/services/text.test.ts +55 -0
- package/lib/api/services/{text.js → text.ts} +17 -7
- package/lib/api/services/{transforms.js → transforms.ts} +83 -37
- package/lib/api/services/vector.test.ts +360 -0
- package/lib/api/services/{vector.js → vector.ts} +80 -42
- package/lib/{index.d.ts → index.ts} +1 -0
- package/package.json +1 -1
- package/tsconfig.bitbybit.json +26 -0
- package/tsconfig.json +24 -0
- package/babel.config.d.cts +0 -5
- package/index.d.ts +0 -1
- package/lib/api/index.js +0 -1
- package/lib/api/inputs/base-inputs.d.ts +0 -35
- package/lib/api/inputs/base-inputs.js +0 -1
- package/lib/api/inputs/color-inputs.js +0 -164
- package/lib/api/inputs/index.js +0 -9
- package/lib/api/inputs/inputs.js +0 -9
- package/lib/api/inputs/lists-inputs.js +0 -576
- package/lib/api/inputs/logic-inputs.js +0 -111
- package/lib/api/inputs/math-inputs.js +0 -391
- package/lib/api/inputs/point-inputs.js +0 -521
- package/lib/api/inputs/text-inputs.d.ts +0 -83
- package/lib/api/inputs/text-inputs.js +0 -120
- package/lib/api/inputs/transforms-inputs.js +0 -200
- package/lib/api/inputs/vector-inputs.js +0 -304
- package/lib/api/services/color.d.ts +0 -114
- package/lib/api/services/geometry-helper.d.ts +0 -15
- package/lib/api/services/index.js +0 -9
- package/lib/api/services/lists.d.ts +0 -287
- package/lib/api/services/logic.d.ts +0 -99
- package/lib/api/services/math.d.ts +0 -349
- package/lib/api/services/point.d.ts +0 -222
- package/lib/api/services/text.d.ts +0 -69
- package/lib/api/services/transforms.d.ts +0 -122
- package/lib/api/services/vector.d.ts +0 -320
- package/lib/index.js +0 -1
- /package/lib/api/{index.d.ts → index.ts} +0 -0
- /package/lib/api/inputs/{index.d.ts → index.ts} +0 -0
- /package/lib/api/inputs/{inputs.d.ts → inputs.ts} +0 -0
|
@@ -1,521 +0,0 @@
|
|
|
1
|
-
export var Point;
|
|
2
|
-
(function (Point) {
|
|
3
|
-
class PointDto {
|
|
4
|
-
constructor(point) {
|
|
5
|
-
if (point !== undefined) {
|
|
6
|
-
this.point = point;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
Point.PointDto = PointDto;
|
|
11
|
-
class PointXYZDto {
|
|
12
|
-
constructor(x, y, z) {
|
|
13
|
-
/**
|
|
14
|
-
* Point
|
|
15
|
-
* @default 0
|
|
16
|
-
* @minimum -Infinity
|
|
17
|
-
* @maximum Infinity
|
|
18
|
-
* @step 0.1
|
|
19
|
-
*/
|
|
20
|
-
this.x = 0;
|
|
21
|
-
/**
|
|
22
|
-
* Point
|
|
23
|
-
* @default 0
|
|
24
|
-
* @minimum -Infinity
|
|
25
|
-
* @maximum Infinity
|
|
26
|
-
* @step 0.1
|
|
27
|
-
*/
|
|
28
|
-
this.y = 0;
|
|
29
|
-
/**
|
|
30
|
-
* Point
|
|
31
|
-
* @default 0
|
|
32
|
-
* @minimum -Infinity
|
|
33
|
-
* @maximum Infinity
|
|
34
|
-
* @step 0.1
|
|
35
|
-
*/
|
|
36
|
-
this.z = 0;
|
|
37
|
-
if (x !== undefined) {
|
|
38
|
-
this.x = x;
|
|
39
|
-
}
|
|
40
|
-
if (y !== undefined) {
|
|
41
|
-
this.y = y;
|
|
42
|
-
}
|
|
43
|
-
if (z !== undefined) {
|
|
44
|
-
this.z = z;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
Point.PointXYZDto = PointXYZDto;
|
|
49
|
-
class PointXYDto {
|
|
50
|
-
constructor(x, y) {
|
|
51
|
-
/**
|
|
52
|
-
* Point
|
|
53
|
-
* @default 0
|
|
54
|
-
* @minimum -Infinity
|
|
55
|
-
* @maximum Infinity
|
|
56
|
-
* @step 0.1
|
|
57
|
-
*/
|
|
58
|
-
this.x = 0;
|
|
59
|
-
/**
|
|
60
|
-
* Point
|
|
61
|
-
* @default 0
|
|
62
|
-
* @minimum -Infinity
|
|
63
|
-
* @maximum Infinity
|
|
64
|
-
* @step 0.1
|
|
65
|
-
*/
|
|
66
|
-
this.y = 0;
|
|
67
|
-
if (x !== undefined) {
|
|
68
|
-
this.x = x;
|
|
69
|
-
}
|
|
70
|
-
if (y !== undefined) {
|
|
71
|
-
this.y = y;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
Point.PointXYDto = PointXYDto;
|
|
76
|
-
class PointsDto {
|
|
77
|
-
constructor(points) {
|
|
78
|
-
if (points !== undefined) {
|
|
79
|
-
this.points = points;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
Point.PointsDto = PointsDto;
|
|
84
|
-
class TwoPointsDto {
|
|
85
|
-
constructor(point1, point2) {
|
|
86
|
-
if (point1 !== undefined) {
|
|
87
|
-
this.point1 = point1;
|
|
88
|
-
}
|
|
89
|
-
if (point2 !== undefined) {
|
|
90
|
-
this.point2 = point2;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
Point.TwoPointsDto = TwoPointsDto;
|
|
95
|
-
class DrawPointDto {
|
|
96
|
-
/**
|
|
97
|
-
* Provide options without default values
|
|
98
|
-
*/
|
|
99
|
-
constructor(point, opacity, size, colours, updatable, pointMesh) {
|
|
100
|
-
/**
|
|
101
|
-
* Value between 0 and 1
|
|
102
|
-
* @default 1
|
|
103
|
-
* @minimum 0
|
|
104
|
-
* @maximum 1
|
|
105
|
-
* @step 0.1
|
|
106
|
-
*/
|
|
107
|
-
this.opacity = 1;
|
|
108
|
-
/**
|
|
109
|
-
* Size of the point
|
|
110
|
-
* @default 3
|
|
111
|
-
* @minimum 0
|
|
112
|
-
* @maximum Infinity
|
|
113
|
-
* @step 0.1
|
|
114
|
-
*/
|
|
115
|
-
this.size = 3;
|
|
116
|
-
/**
|
|
117
|
-
* Hex colour string
|
|
118
|
-
* @default #444444
|
|
119
|
-
*/
|
|
120
|
-
this.colours = "#444444";
|
|
121
|
-
/**
|
|
122
|
-
* Indicates wether the position of this point will change in time
|
|
123
|
-
* @default false
|
|
124
|
-
*/
|
|
125
|
-
this.updatable = false;
|
|
126
|
-
if (point !== undefined) {
|
|
127
|
-
this.point = point;
|
|
128
|
-
}
|
|
129
|
-
if (opacity !== undefined) {
|
|
130
|
-
this.opacity = opacity;
|
|
131
|
-
}
|
|
132
|
-
if (size !== undefined) {
|
|
133
|
-
this.size = size;
|
|
134
|
-
}
|
|
135
|
-
if (colours !== undefined) {
|
|
136
|
-
this.colours = colours;
|
|
137
|
-
}
|
|
138
|
-
if (updatable !== undefined) {
|
|
139
|
-
this.updatable = updatable;
|
|
140
|
-
}
|
|
141
|
-
if (pointMesh !== undefined) {
|
|
142
|
-
this.pointMesh = pointMesh;
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
Point.DrawPointDto = DrawPointDto;
|
|
147
|
-
class DrawPointsDto {
|
|
148
|
-
/**
|
|
149
|
-
* Provide options without default values
|
|
150
|
-
*/
|
|
151
|
-
constructor(points, opacity, size, colours, updatable, pointsMesh) {
|
|
152
|
-
/**
|
|
153
|
-
* Value between 0 and 1
|
|
154
|
-
* @default 1
|
|
155
|
-
* @minimum 0
|
|
156
|
-
* @maximum 1
|
|
157
|
-
* @step 0.1
|
|
158
|
-
*/
|
|
159
|
-
this.opacity = 1;
|
|
160
|
-
/**
|
|
161
|
-
* Size of the points
|
|
162
|
-
* @default 0.1
|
|
163
|
-
* @minimum 0
|
|
164
|
-
* @maximum Infinity
|
|
165
|
-
* @step 0.1
|
|
166
|
-
*/
|
|
167
|
-
this.size = 0.1;
|
|
168
|
-
/**
|
|
169
|
-
* Hex colour string or collection of strings
|
|
170
|
-
* @default #444444
|
|
171
|
-
*/
|
|
172
|
-
this.colours = "#444444";
|
|
173
|
-
/**
|
|
174
|
-
* Indicates wether the position of this point will change in time
|
|
175
|
-
* @default false
|
|
176
|
-
*/
|
|
177
|
-
this.updatable = false;
|
|
178
|
-
if (points !== undefined) {
|
|
179
|
-
this.points = points;
|
|
180
|
-
}
|
|
181
|
-
if (opacity !== undefined) {
|
|
182
|
-
this.opacity = opacity;
|
|
183
|
-
}
|
|
184
|
-
if (size !== undefined) {
|
|
185
|
-
this.size = size;
|
|
186
|
-
}
|
|
187
|
-
if (colours !== undefined) {
|
|
188
|
-
this.colours = colours;
|
|
189
|
-
}
|
|
190
|
-
if (updatable !== undefined) {
|
|
191
|
-
this.updatable = updatable;
|
|
192
|
-
}
|
|
193
|
-
if (pointsMesh !== undefined) {
|
|
194
|
-
this.pointsMesh = pointsMesh;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
Point.DrawPointsDto = DrawPointsDto;
|
|
199
|
-
class TransformPointDto {
|
|
200
|
-
constructor(point, transformation) {
|
|
201
|
-
if (point !== undefined) {
|
|
202
|
-
this.point = point;
|
|
203
|
-
}
|
|
204
|
-
if (transformation !== undefined) {
|
|
205
|
-
this.transformation = transformation;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
Point.TransformPointDto = TransformPointDto;
|
|
210
|
-
class TransformPointsDto {
|
|
211
|
-
constructor(points, transformation) {
|
|
212
|
-
if (points !== undefined) {
|
|
213
|
-
this.points = points;
|
|
214
|
-
}
|
|
215
|
-
if (transformation !== undefined) {
|
|
216
|
-
this.transformation = transformation;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
Point.TransformPointsDto = TransformPointsDto;
|
|
221
|
-
class TranslatePointsWithVectorsDto {
|
|
222
|
-
constructor(points, translations) {
|
|
223
|
-
if (points !== undefined) {
|
|
224
|
-
this.points = points;
|
|
225
|
-
}
|
|
226
|
-
if (translations !== undefined) {
|
|
227
|
-
this.translations = translations;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
Point.TranslatePointsWithVectorsDto = TranslatePointsWithVectorsDto;
|
|
232
|
-
class TranslatePointsDto {
|
|
233
|
-
constructor(points, translation) {
|
|
234
|
-
if (points !== undefined) {
|
|
235
|
-
this.points = points;
|
|
236
|
-
}
|
|
237
|
-
if (translation !== undefined) {
|
|
238
|
-
this.translation = translation;
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
Point.TranslatePointsDto = TranslatePointsDto;
|
|
243
|
-
class TranslateXYZPointsDto {
|
|
244
|
-
constructor(points, x, y, z) {
|
|
245
|
-
/**
|
|
246
|
-
* X vector value
|
|
247
|
-
* @default 0
|
|
248
|
-
*/
|
|
249
|
-
this.x = 0;
|
|
250
|
-
/**
|
|
251
|
-
* Y vector value
|
|
252
|
-
* @default 1
|
|
253
|
-
*/
|
|
254
|
-
this.y = 1;
|
|
255
|
-
/**
|
|
256
|
-
* Z vector value
|
|
257
|
-
* @default 0
|
|
258
|
-
*/
|
|
259
|
-
this.z = 0;
|
|
260
|
-
if (points !== undefined) {
|
|
261
|
-
this.points = points;
|
|
262
|
-
}
|
|
263
|
-
if (x !== undefined) {
|
|
264
|
-
this.x = x;
|
|
265
|
-
}
|
|
266
|
-
if (y !== undefined) {
|
|
267
|
-
this.y = y;
|
|
268
|
-
}
|
|
269
|
-
if (z !== undefined) {
|
|
270
|
-
this.z = z;
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
Point.TranslateXYZPointsDto = TranslateXYZPointsDto;
|
|
275
|
-
class ScalePointsCenterXYZDto {
|
|
276
|
-
constructor(points, center, scaleXyz) {
|
|
277
|
-
/**
|
|
278
|
-
* The center from which the scaling is applied
|
|
279
|
-
* @default [0, 0, 0]
|
|
280
|
-
*/
|
|
281
|
-
this.center = [0, 0, 0];
|
|
282
|
-
/**
|
|
283
|
-
* Scaling factors for each axis [1, 2, 1] means that Y axis will be scaled 200% and both x and z axis will remain on 100%
|
|
284
|
-
* @default [1, 1, 1]
|
|
285
|
-
*/
|
|
286
|
-
this.scaleXyz = [1, 1, 1];
|
|
287
|
-
if (points !== undefined) {
|
|
288
|
-
this.points = points;
|
|
289
|
-
}
|
|
290
|
-
if (center !== undefined) {
|
|
291
|
-
this.center = center;
|
|
292
|
-
}
|
|
293
|
-
if (scaleXyz !== undefined) {
|
|
294
|
-
this.scaleXyz = scaleXyz;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
Point.ScalePointsCenterXYZDto = ScalePointsCenterXYZDto;
|
|
299
|
-
class RotatePointsCenterAxisDto {
|
|
300
|
-
constructor(points, angle, axis, center) {
|
|
301
|
-
/**
|
|
302
|
-
* Angle of rotation in degrees
|
|
303
|
-
* @default 90
|
|
304
|
-
* @minimum -Infinity
|
|
305
|
-
* @maximum Infinity
|
|
306
|
-
* @step 1
|
|
307
|
-
*/
|
|
308
|
-
this.angle = 90;
|
|
309
|
-
/**
|
|
310
|
-
* Axis vector for rotation
|
|
311
|
-
* @default [0, 1, 0]
|
|
312
|
-
*/
|
|
313
|
-
this.axis = [0, 1, 0];
|
|
314
|
-
/**
|
|
315
|
-
* The center from which the axis is pointing
|
|
316
|
-
* @default [0, 0, 0]
|
|
317
|
-
*/
|
|
318
|
-
this.center = [0, 0, 0];
|
|
319
|
-
if (points !== undefined) {
|
|
320
|
-
this.points = points;
|
|
321
|
-
}
|
|
322
|
-
if (angle !== undefined) {
|
|
323
|
-
this.angle = angle;
|
|
324
|
-
}
|
|
325
|
-
if (axis !== undefined) {
|
|
326
|
-
this.axis = axis;
|
|
327
|
-
}
|
|
328
|
-
if (center !== undefined) {
|
|
329
|
-
this.center = center;
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
Point.RotatePointsCenterAxisDto = RotatePointsCenterAxisDto;
|
|
334
|
-
class TransformsForPointsDto {
|
|
335
|
-
constructor(points, transformation) {
|
|
336
|
-
if (points !== undefined) {
|
|
337
|
-
this.points = points;
|
|
338
|
-
}
|
|
339
|
-
if (transformation !== undefined) {
|
|
340
|
-
this.transformation = transformation;
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
Point.TransformsForPointsDto = TransformsForPointsDto;
|
|
345
|
-
class RemoveConsecutiveDuplicatesDto {
|
|
346
|
-
constructor(points, tolerance, checkFirstAndLast) {
|
|
347
|
-
/**
|
|
348
|
-
* Tolerance for removing duplicates
|
|
349
|
-
* @default 1e-7
|
|
350
|
-
* @minimum 0
|
|
351
|
-
* @maximum Infinity
|
|
352
|
-
* @step 1e-7
|
|
353
|
-
*/
|
|
354
|
-
this.tolerance = 1e-7;
|
|
355
|
-
/**
|
|
356
|
-
* Check first and last point for duplicates
|
|
357
|
-
*/
|
|
358
|
-
this.checkFirstAndLast = false;
|
|
359
|
-
if (points !== undefined) {
|
|
360
|
-
this.points = points;
|
|
361
|
-
}
|
|
362
|
-
if (tolerance !== undefined) {
|
|
363
|
-
this.tolerance = tolerance;
|
|
364
|
-
}
|
|
365
|
-
if (checkFirstAndLast !== undefined) {
|
|
366
|
-
this.checkFirstAndLast = checkFirstAndLast;
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
}
|
|
370
|
-
Point.RemoveConsecutiveDuplicatesDto = RemoveConsecutiveDuplicatesDto;
|
|
371
|
-
class ClosestPointFromPointsDto {
|
|
372
|
-
constructor(points, point) {
|
|
373
|
-
if (points !== undefined) {
|
|
374
|
-
this.points = points;
|
|
375
|
-
}
|
|
376
|
-
if (point !== undefined) {
|
|
377
|
-
this.point = point;
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
Point.ClosestPointFromPointsDto = ClosestPointFromPointsDto;
|
|
382
|
-
class StartEndPointsDto {
|
|
383
|
-
constructor(startPoint, endPoint) {
|
|
384
|
-
if (startPoint !== undefined) {
|
|
385
|
-
this.startPoint = startPoint;
|
|
386
|
-
}
|
|
387
|
-
if (endPoint !== undefined) {
|
|
388
|
-
this.endPoint = endPoint;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
Point.StartEndPointsDto = StartEndPointsDto;
|
|
393
|
-
class StartEndPointsListDto {
|
|
394
|
-
constructor(startPoint, endPoints) {
|
|
395
|
-
if (startPoint !== undefined) {
|
|
396
|
-
this.startPoint = startPoint;
|
|
397
|
-
}
|
|
398
|
-
if (endPoints !== undefined) {
|
|
399
|
-
this.endPoints = endPoints;
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
Point.StartEndPointsListDto = StartEndPointsListDto;
|
|
404
|
-
class MultiplyPointDto {
|
|
405
|
-
constructor(point, amountOfPoints) {
|
|
406
|
-
if (point !== undefined) {
|
|
407
|
-
this.point = point;
|
|
408
|
-
}
|
|
409
|
-
if (amountOfPoints !== undefined) {
|
|
410
|
-
this.amountOfPoints = amountOfPoints;
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
Point.MultiplyPointDto = MultiplyPointDto;
|
|
415
|
-
class SpiralDto {
|
|
416
|
-
constructor(radius, numberPoints, widening, factor, phi) {
|
|
417
|
-
/**
|
|
418
|
-
* Identifies phi angle
|
|
419
|
-
* @default 0.9
|
|
420
|
-
* @minimum 0
|
|
421
|
-
* @maximum Infinity
|
|
422
|
-
* @step 0.1
|
|
423
|
-
*/
|
|
424
|
-
this.phi = 0.9;
|
|
425
|
-
/**
|
|
426
|
-
* Identifies how many points will be created
|
|
427
|
-
* @default 200
|
|
428
|
-
* @minimum 0
|
|
429
|
-
* @maximum Infinity
|
|
430
|
-
* @step 10
|
|
431
|
-
*/
|
|
432
|
-
this.numberPoints = 200;
|
|
433
|
-
/**
|
|
434
|
-
* Widening factor of the spiral
|
|
435
|
-
* @default 3
|
|
436
|
-
* @minimum 0
|
|
437
|
-
* @maximum Infinity
|
|
438
|
-
* @step 0.1
|
|
439
|
-
*/
|
|
440
|
-
this.widening = 3;
|
|
441
|
-
/**
|
|
442
|
-
* Radius of the spiral
|
|
443
|
-
* @default 6
|
|
444
|
-
* @minimum 0
|
|
445
|
-
* @maximum Infinity
|
|
446
|
-
* @step 0.1
|
|
447
|
-
*/
|
|
448
|
-
this.radius = 6;
|
|
449
|
-
/**
|
|
450
|
-
* Factor of the spiral
|
|
451
|
-
* @default 1
|
|
452
|
-
* @minimum 0
|
|
453
|
-
* @maximum Infinity
|
|
454
|
-
* @step 0.1
|
|
455
|
-
*/
|
|
456
|
-
this.factor = 1;
|
|
457
|
-
if (radius !== undefined) {
|
|
458
|
-
this.radius = radius;
|
|
459
|
-
}
|
|
460
|
-
if (numberPoints !== undefined) {
|
|
461
|
-
this.numberPoints = numberPoints;
|
|
462
|
-
}
|
|
463
|
-
if (widening !== undefined) {
|
|
464
|
-
this.widening = widening;
|
|
465
|
-
}
|
|
466
|
-
if (factor !== undefined) {
|
|
467
|
-
this.factor = factor;
|
|
468
|
-
}
|
|
469
|
-
if (phi !== undefined) {
|
|
470
|
-
this.phi = phi;
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
Point.SpiralDto = SpiralDto;
|
|
475
|
-
class HexGridCentersDto {
|
|
476
|
-
constructor(nrHexagonsX, nrHexagonsY, radiusHexagon, orientOnCenter, pointsOnGround) {
|
|
477
|
-
/**
|
|
478
|
-
* Number of hexagons on Y direction
|
|
479
|
-
* @default 21
|
|
480
|
-
* @minimum 0
|
|
481
|
-
* @maximum Infinity
|
|
482
|
-
* @step 1
|
|
483
|
-
*/
|
|
484
|
-
this.nrHexagonsY = 21;
|
|
485
|
-
/**
|
|
486
|
-
* Number of Hexagons on Z direction
|
|
487
|
-
* @default 21
|
|
488
|
-
* @minimum 0
|
|
489
|
-
* @maximum Infinity
|
|
490
|
-
* @step 1
|
|
491
|
-
*/
|
|
492
|
-
this.nrHexagonsX = 21;
|
|
493
|
-
/**
|
|
494
|
-
* Orient hexagon points grid on center
|
|
495
|
-
* @default false
|
|
496
|
-
*/
|
|
497
|
-
this.orientOnCenter = false;
|
|
498
|
-
/**
|
|
499
|
-
* Orient points on the ground
|
|
500
|
-
* @default false
|
|
501
|
-
*/
|
|
502
|
-
this.pointsOnGround = false;
|
|
503
|
-
if (nrHexagonsX !== undefined) {
|
|
504
|
-
this.nrHexagonsX = nrHexagonsX;
|
|
505
|
-
}
|
|
506
|
-
if (nrHexagonsY !== undefined) {
|
|
507
|
-
this.nrHexagonsY = nrHexagonsY;
|
|
508
|
-
}
|
|
509
|
-
if (radiusHexagon !== undefined) {
|
|
510
|
-
this.radiusHexagon = radiusHexagon;
|
|
511
|
-
}
|
|
512
|
-
if (orientOnCenter !== undefined) {
|
|
513
|
-
this.orientOnCenter = orientOnCenter;
|
|
514
|
-
}
|
|
515
|
-
if (pointsOnGround !== undefined) {
|
|
516
|
-
this.pointsOnGround = pointsOnGround;
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
Point.HexGridCentersDto = HexGridCentersDto;
|
|
521
|
-
})(Point || (Point = {}));
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export declare namespace Text {
|
|
2
|
-
class TextDto {
|
|
3
|
-
constructor(text?: string);
|
|
4
|
-
/**
|
|
5
|
-
* The text
|
|
6
|
-
* @default Hello World
|
|
7
|
-
*/
|
|
8
|
-
text: string;
|
|
9
|
-
}
|
|
10
|
-
class TextSplitDto {
|
|
11
|
-
constructor(text?: string, separator?: string);
|
|
12
|
-
/**
|
|
13
|
-
* Text to split
|
|
14
|
-
* @default a,b,c
|
|
15
|
-
*/
|
|
16
|
-
text: string;
|
|
17
|
-
/**
|
|
18
|
-
* Text to split by
|
|
19
|
-
* @default ,
|
|
20
|
-
*/
|
|
21
|
-
separator: string;
|
|
22
|
-
}
|
|
23
|
-
class TextReplaceDto {
|
|
24
|
-
constructor(text?: string, search?: string, replaceWith?: string);
|
|
25
|
-
/**
|
|
26
|
-
* Text to replace
|
|
27
|
-
* @default a-c
|
|
28
|
-
*/
|
|
29
|
-
text: string;
|
|
30
|
-
/**
|
|
31
|
-
* Text to search for
|
|
32
|
-
* @default -
|
|
33
|
-
*/
|
|
34
|
-
search: string;
|
|
35
|
-
/**
|
|
36
|
-
* Text to replace found occurences
|
|
37
|
-
* @default b
|
|
38
|
-
*/
|
|
39
|
-
replaceWith: string;
|
|
40
|
-
}
|
|
41
|
-
class TextJoinDto {
|
|
42
|
-
constructor(list?: string[], separator?: string);
|
|
43
|
-
/**
|
|
44
|
-
* Text to join
|
|
45
|
-
* @default undefined
|
|
46
|
-
*/
|
|
47
|
-
list: string[];
|
|
48
|
-
/**
|
|
49
|
-
* Text to join by
|
|
50
|
-
* @default ,
|
|
51
|
-
*/
|
|
52
|
-
separator: string;
|
|
53
|
-
}
|
|
54
|
-
class ToStringDto<T> {
|
|
55
|
-
constructor(item?: T);
|
|
56
|
-
/**
|
|
57
|
-
* Item to stringify
|
|
58
|
-
* @default undefined
|
|
59
|
-
*/
|
|
60
|
-
item: T;
|
|
61
|
-
}
|
|
62
|
-
class ToStringEachDto<T> {
|
|
63
|
-
constructor(list?: T[]);
|
|
64
|
-
/**
|
|
65
|
-
* Item to stringify
|
|
66
|
-
* @default undefined
|
|
67
|
-
*/
|
|
68
|
-
list: T[];
|
|
69
|
-
}
|
|
70
|
-
class TextFormatDto {
|
|
71
|
-
constructor(text?: string, values?: string[]);
|
|
72
|
-
/**
|
|
73
|
-
* Text to format
|
|
74
|
-
* @default Hello {0}
|
|
75
|
-
*/
|
|
76
|
-
text: string;
|
|
77
|
-
/**
|
|
78
|
-
* Values to format
|
|
79
|
-
* @default ["World"]
|
|
80
|
-
*/
|
|
81
|
-
values: string[];
|
|
82
|
-
}
|
|
83
|
-
}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
-
export var Text;
|
|
3
|
-
(function (Text) {
|
|
4
|
-
class TextDto {
|
|
5
|
-
constructor(text) {
|
|
6
|
-
/**
|
|
7
|
-
* The text
|
|
8
|
-
* @default Hello World
|
|
9
|
-
*/
|
|
10
|
-
this.text = "Hello World";
|
|
11
|
-
if (text !== undefined) {
|
|
12
|
-
this.text = text;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
Text.TextDto = TextDto;
|
|
17
|
-
class TextSplitDto {
|
|
18
|
-
constructor(text, separator) {
|
|
19
|
-
/**
|
|
20
|
-
* Text to split
|
|
21
|
-
* @default a,b,c
|
|
22
|
-
*/
|
|
23
|
-
this.text = "a,b,c";
|
|
24
|
-
/**
|
|
25
|
-
* Text to split by
|
|
26
|
-
* @default ,
|
|
27
|
-
*/
|
|
28
|
-
this.separator = ",";
|
|
29
|
-
if (text !== undefined) {
|
|
30
|
-
this.text = text;
|
|
31
|
-
}
|
|
32
|
-
if (separator !== undefined) {
|
|
33
|
-
this.separator = separator;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
Text.TextSplitDto = TextSplitDto;
|
|
38
|
-
class TextReplaceDto {
|
|
39
|
-
constructor(text, search, replaceWith) {
|
|
40
|
-
/**
|
|
41
|
-
* Text to replace
|
|
42
|
-
* @default a-c
|
|
43
|
-
*/
|
|
44
|
-
this.text = "a-c";
|
|
45
|
-
/**
|
|
46
|
-
* Text to search for
|
|
47
|
-
* @default -
|
|
48
|
-
*/
|
|
49
|
-
this.search = "-";
|
|
50
|
-
/**
|
|
51
|
-
* Text to replace found occurences
|
|
52
|
-
* @default b
|
|
53
|
-
*/
|
|
54
|
-
this.replaceWith = "b";
|
|
55
|
-
if (text !== undefined) {
|
|
56
|
-
this.text = text;
|
|
57
|
-
}
|
|
58
|
-
if (search !== undefined) {
|
|
59
|
-
this.search = search;
|
|
60
|
-
}
|
|
61
|
-
if (replaceWith !== undefined) {
|
|
62
|
-
this.replaceWith = replaceWith;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
Text.TextReplaceDto = TextReplaceDto;
|
|
67
|
-
class TextJoinDto {
|
|
68
|
-
constructor(list, separator) {
|
|
69
|
-
/**
|
|
70
|
-
* Text to join by
|
|
71
|
-
* @default ,
|
|
72
|
-
*/
|
|
73
|
-
this.separator = ",";
|
|
74
|
-
if (list !== undefined) {
|
|
75
|
-
this.list = list;
|
|
76
|
-
}
|
|
77
|
-
if (separator !== undefined) {
|
|
78
|
-
this.separator = separator;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
Text.TextJoinDto = TextJoinDto;
|
|
83
|
-
class ToStringDto {
|
|
84
|
-
constructor(item) {
|
|
85
|
-
if (item !== undefined) {
|
|
86
|
-
this.item = item;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
Text.ToStringDto = ToStringDto;
|
|
91
|
-
class ToStringEachDto {
|
|
92
|
-
constructor(list) {
|
|
93
|
-
if (list !== undefined) {
|
|
94
|
-
this.list = list;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
Text.ToStringEachDto = ToStringEachDto;
|
|
99
|
-
class TextFormatDto {
|
|
100
|
-
constructor(text, values) {
|
|
101
|
-
/**
|
|
102
|
-
* Text to format
|
|
103
|
-
* @default Hello {0}
|
|
104
|
-
*/
|
|
105
|
-
this.text = "Hello {0}";
|
|
106
|
-
/**
|
|
107
|
-
* Values to format
|
|
108
|
-
* @default ["World"]
|
|
109
|
-
*/
|
|
110
|
-
this.values = ["World"];
|
|
111
|
-
if (text !== undefined) {
|
|
112
|
-
this.text = text;
|
|
113
|
-
}
|
|
114
|
-
if (values !== undefined) {
|
|
115
|
-
this.values = values;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
Text.TextFormatDto = TextFormatDto;
|
|
120
|
-
})(Text || (Text = {}));
|