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