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