@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.
Files changed (55) hide show
  1. package/lib/api/GlobalCDNProvider.js +1 -1
  2. package/lib/api/inputs/base-inputs.d.ts +13 -12
  3. package/lib/api/inputs/color-inputs.d.ts +97 -48
  4. package/lib/api/inputs/color-inputs.js +95 -46
  5. package/lib/api/inputs/dates-inputs.d.ts +67 -26
  6. package/lib/api/inputs/dates-inputs.js +57 -16
  7. package/lib/api/inputs/io-inputs.d.ts +13 -15
  8. package/lib/api/inputs/io-inputs.js +7 -8
  9. package/lib/api/inputs/line-inputs.d.ts +88 -33
  10. package/lib/api/inputs/line-inputs.js +61 -11
  11. package/lib/api/inputs/lists-inputs.d.ts +207 -96
  12. package/lib/api/inputs/lists-inputs.js +153 -45
  13. package/lib/api/inputs/logic-inputs.d.ts +52 -22
  14. package/lib/api/inputs/logic-inputs.js +41 -12
  15. package/lib/api/inputs/math-inputs.d.ts +113 -52
  16. package/lib/api/inputs/math-inputs.js +112 -51
  17. package/lib/api/inputs/mesh-inputs.d.ts +30 -11
  18. package/lib/api/inputs/mesh-inputs.js +21 -3
  19. package/lib/api/inputs/point-inputs.d.ts +240 -107
  20. package/lib/api/inputs/point-inputs.js +199 -73
  21. package/lib/api/inputs/polyline-inputs.d.ts +68 -28
  22. package/lib/api/inputs/polyline-inputs.js +48 -13
  23. package/lib/api/inputs/text-inputs.d.ts +117 -46
  24. package/lib/api/inputs/text-inputs.js +111 -41
  25. package/lib/api/inputs/transforms-inputs.d.ts +65 -23
  26. package/lib/api/inputs/transforms-inputs.js +64 -22
  27. package/lib/api/inputs/vector-inputs.d.ts +154 -76
  28. package/lib/api/inputs/vector-inputs.js +132 -57
  29. package/lib/api/models/point/hex-grid-data.d.ts +1 -1
  30. package/lib/api/models/point/hex-grid-data.js +1 -1
  31. package/lib/api/services/color.d.ts +149 -70
  32. package/lib/api/services/color.js +149 -70
  33. package/lib/api/services/dates.d.ts +313 -150
  34. package/lib/api/services/dates.js +313 -150
  35. package/lib/api/services/line.d.ts +138 -68
  36. package/lib/api/services/line.js +138 -68
  37. package/lib/api/services/lists.d.ts +357 -177
  38. package/lib/api/services/lists.js +357 -177
  39. package/lib/api/services/logic.d.ts +98 -45
  40. package/lib/api/services/logic.js +98 -45
  41. package/lib/api/services/math.d.ts +363 -211
  42. package/lib/api/services/math.js +363 -211
  43. package/lib/api/services/mesh.d.ts +73 -31
  44. package/lib/api/services/mesh.js +73 -31
  45. package/lib/api/services/point.d.ts +367 -147
  46. package/lib/api/services/point.js +367 -147
  47. package/lib/api/services/polyline.d.ts +146 -71
  48. package/lib/api/services/polyline.js +146 -71
  49. package/lib/api/services/text.d.ts +320 -165
  50. package/lib/api/services/text.js +320 -165
  51. package/lib/api/services/transforms.d.ts +145 -58
  52. package/lib/api/services/transforms.js +145 -58
  53. package/lib/api/services/vector.d.ts +381 -156
  54. package/lib/api/services/vector.js +381 -156
  55. package/package.json +1 -1
@@ -6,6 +6,9 @@
6
6
  */
7
7
  export var Point;
8
8
  (function (Point) {
9
+ /**
10
+ * One point for `point.getX`, `point.getY` and `point.getZ`.
11
+ */
9
12
  class PointDto {
10
13
  constructor(point) {
11
14
  if (point !== undefined) {
@@ -14,10 +17,13 @@ export var Point;
14
17
  }
15
18
  }
16
19
  Point.PointDto = PointDto;
20
+ /**
21
+ * The three values `point.pointXYZ` puts together into `[x, y, z]`.
22
+ */
17
23
  class PointXYZDto {
18
24
  constructor(x, y, z) {
19
25
  /**
20
- * Point
26
+ * The X value, the first entry.
21
27
  * @default 0
22
28
  * @minimum -Infinity
23
29
  * @maximum Infinity
@@ -25,7 +31,7 @@ export var Point;
25
31
  */
26
32
  this.x = 0;
27
33
  /**
28
- * Point
34
+ * The Y value, the second entry; Y is up.
29
35
  * @default 0
30
36
  * @minimum -Infinity
31
37
  * @maximum Infinity
@@ -33,12 +39,12 @@ export var Point;
33
39
  */
34
40
  this.y = 0;
35
41
  /**
36
- * Point
37
- * @default 0
38
- * @minimum -Infinity
39
- * @maximum Infinity
40
- * @step 0.1
41
- */
42
+ * The Z value, the third entry.
43
+ * @default 0
44
+ * @minimum -Infinity
45
+ * @maximum Infinity
46
+ * @step 0.1
47
+ */
42
48
  this.z = 0;
43
49
  if (x !== undefined) {
44
50
  this.x = x;
@@ -52,10 +58,13 @@ export var Point;
52
58
  }
53
59
  }
54
60
  Point.PointXYZDto = PointXYZDto;
61
+ /**
62
+ * The two values `point.pointXY` puts together into `[x, y]`.
63
+ */
55
64
  class PointXYDto {
56
65
  constructor(x, y) {
57
66
  /**
58
- * Point
67
+ * The X value, the first entry.
59
68
  * @default 0
60
69
  * @minimum -Infinity
61
70
  * @maximum Infinity
@@ -63,7 +72,7 @@ export var Point;
63
72
  */
64
73
  this.x = 0;
65
74
  /**
66
- * Point
75
+ * The Y value, the second entry.
67
76
  * @default 0
68
77
  * @minimum -Infinity
69
78
  * @maximum Infinity
@@ -79,6 +88,10 @@ export var Point;
79
88
  }
80
89
  }
81
90
  Point.PointXYDto = PointXYDto;
91
+ /**
92
+ * A list of points for the methods that read them together: `point.boundingBoxOfPoints`,
93
+ * `point.averagePoint` and `point.sortPoints`.
94
+ */
82
95
  class PointsDto {
83
96
  constructor(points) {
84
97
  if (points !== undefined) {
@@ -87,6 +100,9 @@ export var Point;
87
100
  }
88
101
  }
89
102
  Point.PointsDto = PointsDto;
103
+ /**
104
+ * Two points, for methods that relate one point to another.
105
+ */
90
106
  class TwoPointsDto {
91
107
  constructor(point1, point2) {
92
108
  if (point1 !== undefined) {
@@ -98,13 +114,17 @@ export var Point;
98
114
  }
99
115
  }
100
116
  Point.TwoPointsDto = TwoPointsDto;
117
+ /**
118
+ * One point and how to draw it: its size, color and opacity, and whether the drawn mesh will
119
+ * be updated later.
120
+ */
101
121
  class DrawPointDto {
102
122
  /**
103
123
  * Provide options without default values
104
124
  */
105
125
  constructor(point, opacity, size, colours, updatable, pointMesh) {
106
126
  /**
107
- * Value between 0 and 1
127
+ * How opaque the point is, from 0 (invisible) to 1 (solid).
108
128
  * @default 1
109
129
  * @minimum 0
110
130
  * @maximum 1
@@ -112,7 +132,7 @@ export var Point;
112
132
  */
113
133
  this.opacity = 1;
114
134
  /**
115
- * Size of the point
135
+ * Size of the drawn point, in model units.
116
136
  * @default 3
117
137
  * @minimum 0
118
138
  * @maximum Infinity
@@ -120,12 +140,14 @@ export var Point;
120
140
  */
121
141
  this.size = 3;
122
142
  /**
123
- * Hex colour string
143
+ * Color of the point as a hex string such as `#ff0000`; a list of strings is also
144
+ * accepted.
124
145
  * @default #444444
125
146
  */
126
147
  this.colours = "#444444";
127
148
  /**
128
- * Indicates wether the position of this point will change in time
149
+ * When true, the drawn mesh is built so its position can be changed later without
150
+ * redrawing.
129
151
  * @default false
130
152
  */
131
153
  this.updatable = false;
@@ -150,13 +172,17 @@ export var Point;
150
172
  }
151
173
  }
152
174
  Point.DrawPointDto = DrawPointDto;
175
+ /**
176
+ * A list of points and how to draw them: their size, colors and opacity, and whether the drawn
177
+ * mesh will be updated later.
178
+ */
153
179
  class DrawPointsDto {
154
180
  /**
155
181
  * Provide options without default values
156
182
  */
157
183
  constructor(points, opacity, size, colours, updatable, pointsMesh) {
158
184
  /**
159
- * Value between 0 and 1
185
+ * How opaque the points are, from 0 (invisible) to 1 (solid).
160
186
  * @default 1
161
187
  * @minimum 0
162
188
  * @maximum 1
@@ -164,7 +190,7 @@ export var Point;
164
190
  */
165
191
  this.opacity = 1;
166
192
  /**
167
- * Size of the points
193
+ * Size of each drawn point, in model units.
168
194
  * @default 0.1
169
195
  * @minimum 0
170
196
  * @maximum Infinity
@@ -172,12 +198,13 @@ export var Point;
172
198
  */
173
199
  this.size = 0.1;
174
200
  /**
175
- * Hex colour string or collection of strings
201
+ * One hex color string for all points, or one string per point.
176
202
  * @default #444444
177
203
  */
178
204
  this.colours = "#444444";
179
205
  /**
180
- * Indicates wether the position of this point will change in time
206
+ * When true, the drawn mesh is built so the positions can be changed later without
207
+ * redrawing.
181
208
  * @default false
182
209
  */
183
210
  this.updatable = false;
@@ -202,6 +229,9 @@ export var Point;
202
229
  }
203
230
  }
204
231
  Point.DrawPointsDto = DrawPointsDto;
232
+ /**
233
+ * One point and the transformation `point.transformPoint` applies to it.
234
+ */
205
235
  class TransformPointDto {
206
236
  constructor(point, transformation) {
207
237
  if (point !== undefined) {
@@ -213,6 +243,9 @@ export var Point;
213
243
  }
214
244
  }
215
245
  Point.TransformPointDto = TransformPointDto;
246
+ /**
247
+ * Points and the one transformation `point.transformPoints` applies to all of them.
248
+ */
216
249
  class TransformPointsDto {
217
250
  constructor(points, transformation) {
218
251
  if (points !== undefined) {
@@ -224,6 +257,10 @@ export var Point;
224
257
  }
225
258
  }
226
259
  Point.TransformPointsDto = TransformPointsDto;
260
+ /**
261
+ * Points and one vector per point for `point.translatePointsWithVectors`; the two lists must
262
+ * have the same length.
263
+ */
227
264
  class TranslatePointsWithVectorsDto {
228
265
  constructor(points, translations) {
229
266
  if (points !== undefined) {
@@ -235,6 +272,9 @@ export var Point;
235
272
  }
236
273
  }
237
274
  Point.TranslatePointsWithVectorsDto = TranslatePointsWithVectorsDto;
275
+ /**
276
+ * Points and the one vector `point.translatePoints` moves them all by.
277
+ */
238
278
  class TranslatePointsDto {
239
279
  constructor(points, translation) {
240
280
  if (points !== undefined) {
@@ -246,22 +286,25 @@ export var Point;
246
286
  }
247
287
  }
248
288
  Point.TranslatePointsDto = TranslatePointsDto;
289
+ /**
290
+ * Points and the distance along each axis that `point.translateXYZPoints` moves them.
291
+ */
249
292
  class TranslateXYZPointsDto {
250
293
  constructor(points, x, y, z) {
251
294
  /**
252
- * X vector value
295
+ * Distance to move along X, in model units.
253
296
  * @default 0
254
297
  */
255
298
  this.x = 0;
256
299
  /**
257
- * Y vector value
258
- * @default 1
259
- */
300
+ * Distance to move along Y, which is up, in model units.
301
+ * @default 1
302
+ */
260
303
  this.y = 1;
261
304
  /**
262
- * Z vector value
263
- * @default 0
264
- */
305
+ * Distance to move along Z, in model units.
306
+ * @default 0
307
+ */
265
308
  this.z = 0;
266
309
  if (points !== undefined) {
267
310
  this.points = points;
@@ -278,15 +321,19 @@ export var Point;
278
321
  }
279
322
  }
280
323
  Point.TranslateXYZPointsDto = TranslateXYZPointsDto;
324
+ /**
325
+ * Points, a center and a factor per axis for `point.scalePointsCenterXYZ`.
326
+ */
281
327
  class ScalePointsCenterXYZDto {
282
328
  constructor(points, center, scaleXyz) {
283
329
  /**
284
- * The center from which the scaling is applied
330
+ * The point that stays in place while the others move away from it or toward it.
285
331
  * @default [0, 0, 0]
286
332
  */
287
333
  this.center = [0, 0, 0];
288
334
  /**
289
- * 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%
335
+ * The factor for each axis as `[x, y, z]`: `[1, 2, 1]` doubles distances along Y and leaves
336
+ * X and Z as they are.
290
337
  * @default [1, 1, 1]
291
338
  */
292
339
  this.scaleXyz = [1, 1, 1];
@@ -302,20 +349,25 @@ export var Point;
302
349
  }
303
350
  }
304
351
  Point.ScalePointsCenterXYZDto = ScalePointsCenterXYZDto;
352
+ /**
353
+ * Points, a center, a direction and a factor for `point.stretchPointsDirFromCenter`, which
354
+ * scales only along that direction.
355
+ */
305
356
  class StretchPointsDirFromCenterDto {
306
357
  constructor(points, center, direction, scale) {
307
358
  /**
308
- * The center from which the scaling is applied
359
+ * The point that stays in place; distances are measured from it.
309
360
  * @default [0, 0, 0]
310
361
  */
311
362
  this.center = [0, 0, 0];
312
363
  /**
313
- * Stretch direction vector
364
+ * The direction to stretch along; distances across it do not change.
314
365
  * @default [0, 0, 1]
315
366
  */
316
367
  this.direction = [0, 0, 1];
317
368
  /**
318
- * The scale factor to apply along the direction vector. 1.0 means no change.
369
+ * The factor applied along the direction; 1 leaves the points as they are, 2 doubles their
370
+ * distance from the center along it.
319
371
  * @default 2
320
372
  * @minimum -Infinity
321
373
  * @maximum Infinity
@@ -337,10 +389,14 @@ export var Point;
337
389
  }
338
390
  }
339
391
  Point.StretchPointsDirFromCenterDto = StretchPointsDirFromCenterDto;
392
+ /**
393
+ * Points, an axis, a center and an angle for `point.rotatePointsCenterAxis`.
394
+ */
340
395
  class RotatePointsCenterAxisDto {
341
396
  constructor(points, angle, axis, center) {
342
397
  /**
343
- * Angle of rotation in degrees
398
+ * How far to turn, in degrees; positive is counter-clockwise when the axis points toward
399
+ * you.
344
400
  * @default 90
345
401
  * @minimum -Infinity
346
402
  * @maximum Infinity
@@ -348,12 +404,12 @@ export var Point;
348
404
  */
349
405
  this.angle = 90;
350
406
  /**
351
- * Axis vector for rotation
407
+ * The direction of the axis to turn around.
352
408
  * @default [0, 1, 0]
353
409
  */
354
410
  this.axis = [0, 1, 0];
355
411
  /**
356
- * The center from which the axis is pointing
412
+ * A point the axis passes through.
357
413
  * @default [0, 0, 0]
358
414
  */
359
415
  this.center = [0, 0, 0];
@@ -372,6 +428,10 @@ export var Point;
372
428
  }
373
429
  }
374
430
  Point.RotatePointsCenterAxisDto = RotatePointsCenterAxisDto;
431
+ /**
432
+ * Points and one transformation per point for `point.transformsForPoints`; the two lists must
433
+ * have the same length.
434
+ */
375
435
  class TransformsForPointsDto {
376
436
  constructor(points, transformation) {
377
437
  if (points !== undefined) {
@@ -383,10 +443,13 @@ export var Point;
383
443
  }
384
444
  }
385
445
  Point.TransformsForPointsDto = TransformsForPointsDto;
446
+ /**
447
+ * Three points that define a plane, for `point.normalFromThreePoints`.
448
+ */
386
449
  class ThreePointsNormalDto {
387
450
  constructor(point1, point2, point3, reverseNormal) {
388
451
  /**
389
- * Reverse normal direction
452
+ * When true, the normal is flipped to point the other way.
390
453
  * @default false
391
454
  */
392
455
  this.reverseNormal = false;
@@ -405,10 +468,15 @@ export var Point;
405
468
  }
406
469
  }
407
470
  Point.ThreePointsNormalDto = ThreePointsNormalDto;
471
+ /**
472
+ * A corner for `point.maxFilletRadius` and `point.maxFilletRadiusHalfLine`: the corner point is
473
+ * `end`, and `start` and `center` are the far ends of the two segments that meet there.
474
+ */
408
475
  class ThreePointsToleranceDto {
409
476
  constructor(start, center, end, tolerance) {
410
477
  /**
411
- * Tolerance for the calculation
478
+ * A segment shorter than this, or an angle within it of straight or folded back, gives a
479
+ * radius of 0.
412
480
  * @default 1e-7
413
481
  * @minimum -Infinity
414
482
  * @maximum Infinity
@@ -430,15 +498,21 @@ export var Point;
430
498
  }
431
499
  }
432
500
  Point.ThreePointsToleranceDto = ThreePointsToleranceDto;
501
+ /**
502
+ * A polyline's points for `point.maxFilletsHalfLine` and `point.safestPointsMaxFilletHalfLine`,
503
+ * and whether it closes back on itself.
504
+ */
433
505
  class PointsMaxFilletsHalfLineDto {
434
506
  constructor(points, checkLastWithFirst, tolerance) {
435
507
  /**
436
- * Check first and last point for duplicates
508
+ * When true, the polyline is closed and the corners at its first and last points are
509
+ * included.
437
510
  * @default false
438
511
  */
439
512
  this.checkLastWithFirst = false;
440
513
  /**
441
- * Tolerance for the calculation
514
+ * A segment shorter than this, or an angle within it of straight or folded back, gives a
515
+ * radius of 0.
442
516
  * @default 1e-7
443
517
  * @minimum -Infinity
444
518
  * @maximum Infinity
@@ -457,10 +531,14 @@ export var Point;
457
531
  }
458
532
  }
459
533
  Point.PointsMaxFilletsHalfLineDto = PointsMaxFilletsHalfLineDto;
534
+ /**
535
+ * Points to filter with `point.removeConsecutiveDuplicates`, and how close two points must be
536
+ * to count as the same.
537
+ */
460
538
  class RemoveConsecutiveDuplicatesDto {
461
539
  constructor(points, tolerance, checkFirstAndLast) {
462
540
  /**
463
- * Tolerance for removing duplicates
541
+ * Two points count as the same when every coordinate differs by less than this.
464
542
  * @default 1e-7
465
543
  * @minimum 0
466
544
  * @maximum Infinity
@@ -468,7 +546,8 @@ export var Point;
468
546
  */
469
547
  this.tolerance = 1e-7;
470
548
  /**
471
- * Check first and last point for duplicates
549
+ * When true, a last point that repeats the first is dropped as well, which closes a loop
550
+ * cleanly.
472
551
  */
473
552
  this.checkFirstAndLast = false;
474
553
  if (points !== undefined) {
@@ -483,6 +562,10 @@ export var Point;
483
562
  }
484
563
  }
485
564
  Point.RemoveConsecutiveDuplicatesDto = RemoveConsecutiveDuplicatesDto;
565
+ /**
566
+ * A point and a list to search for `point.closestPointFromPoints`,
567
+ * `point.closestPointFromPointsDistance` and `point.closestPointFromPointsIndex`.
568
+ */
486
569
  class ClosestPointFromPointsDto {
487
570
  constructor(points, point) {
488
571
  if (points !== undefined) {
@@ -494,10 +577,13 @@ export var Point;
494
577
  }
495
578
  }
496
579
  Point.ClosestPointFromPointsDto = ClosestPointFromPointsDto;
580
+ /**
581
+ * Two points and a tolerance for `point.twoPointsAlmostEqual`.
582
+ */
497
583
  class TwoPointsToleranceDto {
498
584
  constructor(point1, point2, tolerance) {
499
585
  /**
500
- * Tolerance for the calculation
586
+ * The points count as equal when the distance between them is below this.
501
587
  * @default 1e-7
502
588
  * @minimum -Infinity
503
589
  * @maximum Infinity
@@ -516,6 +602,9 @@ export var Point;
516
602
  }
517
603
  }
518
604
  Point.TwoPointsToleranceDto = TwoPointsToleranceDto;
605
+ /**
606
+ * Two points for `point.distance`: where a measurement starts and where it ends.
607
+ */
519
608
  class StartEndPointsDto {
520
609
  constructor(startPoint, endPoint) {
521
610
  if (startPoint !== undefined) {
@@ -527,6 +616,9 @@ export var Point;
527
616
  }
528
617
  }
529
618
  Point.StartEndPointsDto = StartEndPointsDto;
619
+ /**
620
+ * One start point and many end points for `point.distancesToPoints`.
621
+ */
530
622
  class StartEndPointsListDto {
531
623
  constructor(startPoint, endPoints) {
532
624
  if (startPoint !== undefined) {
@@ -538,6 +630,9 @@ export var Point;
538
630
  }
539
631
  }
540
632
  Point.StartEndPointsListDto = StartEndPointsListDto;
633
+ /**
634
+ * One point and a count for `point.multiplyPoint`, which repeats it.
635
+ */
541
636
  class MultiplyPointDto {
542
637
  constructor(point, amountOfPoints) {
543
638
  if (point !== undefined) {
@@ -549,10 +644,15 @@ export var Point;
549
644
  }
550
645
  }
551
646
  Point.MultiplyPointDto = MultiplyPointDto;
647
+ /**
648
+ * The shape of the logarithmic spiral `point.spiral` lays out: how many points, how far it
649
+ * reaches and how quickly it opens.
650
+ */
552
651
  class SpiralDto {
553
652
  constructor(radius, numberPoints, widening, factor, phi) {
554
653
  /**
555
- * Identifies phi angle
654
+ * Growth ratio of the spiral; values near 1 make a tight spiral, larger values open it
655
+ * faster.
556
656
  * @default 0.9
557
657
  * @minimum 0
558
658
  * @maximum Infinity
@@ -560,7 +660,7 @@ export var Point;
560
660
  */
561
661
  this.phi = 0.9;
562
662
  /**
563
- * Identifies how many points will be created
663
+ * How many points to place along the spiral.
564
664
  * @default 200
565
665
  * @minimum 0
566
666
  * @maximum Infinity
@@ -568,7 +668,7 @@ export var Point;
568
668
  */
569
669
  this.numberPoints = 200;
570
670
  /**
571
- * Widening factor of the spiral
671
+ * How much the spiral widens per turn; larger values spread the turns further apart.
572
672
  * @default 3
573
673
  * @minimum 0
574
674
  * @maximum Infinity
@@ -576,7 +676,7 @@ export var Point;
576
676
  */
577
677
  this.widening = 3;
578
678
  /**
579
- * Radius of the spiral
679
+ * The distance from the origin the last point reaches, in model units.
580
680
  * @default 6
581
681
  * @minimum 0
582
682
  * @maximum Infinity
@@ -584,7 +684,8 @@ export var Point;
584
684
  */
585
685
  this.radius = 6;
586
686
  /**
587
- * Factor of the spiral
687
+ * Scales the distance before the angle is computed, which turns the whole spiral; 1 leaves
688
+ * it as it is.
588
689
  * @default 1
589
690
  * @minimum 0
590
691
  * @maximum Infinity
@@ -609,75 +710,97 @@ export var Point;
609
710
  }
610
711
  }
611
712
  Point.SpiralDto = SpiralDto;
713
+ /**
714
+ * The area, counts and orientation for `point.hexGridScaledToFit`, which sizes hexagons so the
715
+ * given number of them fills the width and height.
716
+ */
612
717
  class HexGridScaledToFitDto {
613
- constructor(wdith, height, nrHexagonsU, nrHexagonsV, centerGrid, pointsOnGround) {
614
- /** Total desired width for the grid area. The hexagon size will be derived from this and nrHexagonsU.
718
+ constructor(width, height, nrHexagonsInHeight, nrHexagonsInWidth, centerGrid, pointsOnGround) {
719
+ /**
720
+ * The total width to fill, in model units; the hexagon size follows from it and
721
+ * `nrHexagonsInWidth`.
615
722
  * @default 10
616
723
  * @minimum 0
617
724
  * @maximum Infinity
618
725
  * @step 0.1
619
726
  */
620
727
  this.width = 10;
621
- /** Total desired height for the grid area. Note: due to hexagon geometry, the actual grid height might differ slightly if maintaining regular hexagons based on width.
728
+ /**
729
+ * The total height to fill, in model units. Regular hexagons may not tile it exactly, so
730
+ * the real height can differ slightly.
622
731
  * @default 10
623
732
  * @minimum 0
624
733
  * @maximum Infinity
625
734
  * @step 0.1
626
- */
735
+ */
627
736
  this.height = 10;
628
- /** Number of hexagons desired in width.
737
+ /**
738
+ * How many hexagons across.
629
739
  * @default 10
630
740
  * @minimum 0
631
741
  * @maximum Infinity
632
742
  * @step 1
633
743
  */
634
744
  this.nrHexagonsInWidth = 10;
635
- /** Number of hexagons desired in height.
745
+ /**
746
+ * How many hexagons from top to bottom.
636
747
  * @default 10
637
748
  * @minimum 0
638
749
  * @maximum Infinity
639
750
  * @step 1
640
751
  */
641
752
  this.nrHexagonsInHeight = 10;
642
- /** If true, the hexagons will be oriented with their flat sides facing up and down.
753
+ /**
754
+ * When true, the hexagons have a flat edge at the top and bottom; when false a corner
755
+ * points up.
643
756
  * @default false
644
757
  */
645
758
  this.flatTop = false;
646
- /** If true, shift the entire grid up by half hex height.
759
+ /**
760
+ * When true, the grid is stretched so its top row reaches past the top edge, filling the rectangle
761
+ * without a jagged border there.
647
762
  * @default false
648
- */
763
+ */
649
764
  this.extendTop = false;
650
- /** If true, shift the entire grid down by half hex height.
765
+ /**
766
+ * When true, the grid is stretched so its bottom row reaches past the bottom edge, filling the
767
+ * rectangle without a jagged border there.
651
768
  * @default false
652
- */
769
+ */
653
770
  this.extendBottom = false;
654
- /** If true, shift the entire grid left by half hex width.
771
+ /**
772
+ * When true, the grid is stretched so its left column reaches past the left edge, filling the
773
+ * rectangle without a jagged border there.
655
774
  * @default false
656
- */
775
+ */
657
776
  this.extendLeft = false;
658
- /** If true, shift the entire grid right by half hex width.
777
+ /**
778
+ * When true, the grid is stretched so its right column reaches past the right edge, filling the
779
+ * rectangle without a jagged border there.
659
780
  * @default false
660
- */
781
+ */
661
782
  this.extendRight = false;
662
- /** If true, the grid center (based on totalWidth/totalHeight) will be at [0,0,0].
783
+ /**
784
+ * When true, the middle of the grid sits at the origin instead of its corner.
663
785
  * @default false
664
786
  */
665
787
  this.centerGrid = false;
666
- /** If true, swaps Y and Z coordinates and sets Y to 0, placing points on the XZ ground plane.
788
+ /**
789
+ * When true, the grid lies on the XZ ground plane (Y becomes 0) instead of the XY plane.
667
790
  * @default false
668
791
  */
669
792
  this.pointsOnGround = false;
670
- if (wdith !== undefined) {
671
- this.width = wdith;
793
+ if (width !== undefined) {
794
+ this.width = width;
672
795
  }
673
796
  if (height !== undefined) {
674
797
  this.height = height;
675
798
  }
676
- if (nrHexagonsU !== undefined) {
677
- this.nrHexagonsInHeight = nrHexagonsU;
799
+ if (nrHexagonsInHeight !== undefined) {
800
+ this.nrHexagonsInHeight = nrHexagonsInHeight;
678
801
  }
679
- if (nrHexagonsV !== undefined) {
680
- this.nrHexagonsInWidth = nrHexagonsV;
802
+ if (nrHexagonsInWidth !== undefined) {
803
+ this.nrHexagonsInWidth = nrHexagonsInWidth;
681
804
  }
682
805
  if (centerGrid !== undefined) {
683
806
  this.centerGrid = centerGrid;
@@ -688,10 +811,13 @@ export var Point;
688
811
  }
689
812
  }
690
813
  Point.HexGridScaledToFitDto = HexGridScaledToFitDto;
814
+ /**
815
+ * The hexagon size, the column and row counts and the placement for `point.hexGrid`.
816
+ */
691
817
  class HexGridCentersDto {
692
818
  constructor(nrHexagonsX, nrHexagonsY, radiusHexagon, orientOnCenter, pointsOnGround) {
693
819
  /**
694
- * Number of hexagons on Y direction
820
+ * How many rows of hexagons along Y.
695
821
  * @default 21
696
822
  * @minimum 0
697
823
  * @maximum Infinity
@@ -699,7 +825,7 @@ export var Point;
699
825
  */
700
826
  this.nrHexagonsY = 21;
701
827
  /**
702
- * Number of Hexagons on Z direction
828
+ * How many columns of hexagons along X.
703
829
  * @default 21
704
830
  * @minimum 0
705
831
  * @maximum Infinity
@@ -707,7 +833,7 @@ export var Point;
707
833
  */
708
834
  this.nrHexagonsX = 21;
709
835
  /**
710
- * radius of a single hexagon
836
+ * Distance from a hexagon's center to one of its corners, in model units.
711
837
  * @default 0.2
712
838
  * @minimum 0
713
839
  * @maximum Infinity
@@ -715,12 +841,12 @@ export var Point;
715
841
  */
716
842
  this.radiusHexagon = 0.2;
717
843
  /**
718
- * Orient hexagon points grid on center
844
+ * When true, the middle of the grid sits at the origin instead of its corner.
719
845
  * @default false
720
846
  */
721
847
  this.orientOnCenter = false;
722
848
  /**
723
- * Orient points on the ground
849
+ * When true, the grid lies on the XZ ground plane (Y becomes 0) instead of the XY plane.
724
850
  * @default false
725
851
  */
726
852
  this.pointsOnGround = false;