@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
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Parameters for building transformation matrices: translations, rotations around an axis or a
|
|
2
|
+
* Parameters for building transformation matrices: translations, rotations around an axis or a center,
|
|
3
3
|
* uniform and non-uniform scaling, and the composition of several transforms into one. The result is a
|
|
4
4
|
* matrix that any geometry API will accept, so the same transform can be applied to points, curves and
|
|
5
5
|
* solids alike.
|
|
6
6
|
*/
|
|
7
7
|
export var Transforms;
|
|
8
8
|
(function (Transforms) {
|
|
9
|
+
/**
|
|
10
|
+
* An axis, a center and an angle for `transforms.rotationCenterAxis`.
|
|
11
|
+
*/
|
|
9
12
|
class RotationCenterAxisDto {
|
|
10
13
|
constructor(angle, axis, center) {
|
|
11
14
|
/**
|
|
12
|
-
*
|
|
15
|
+
* How far to turn, in degrees; positive is counter-clockwise when the axis points toward
|
|
16
|
+
* you.
|
|
13
17
|
* @default 90
|
|
14
18
|
* @minimum -Infinity
|
|
15
19
|
* @maximum Infinity
|
|
@@ -17,12 +21,12 @@ export var Transforms;
|
|
|
17
21
|
*/
|
|
18
22
|
this.angle = 90;
|
|
19
23
|
/**
|
|
20
|
-
*
|
|
24
|
+
* The direction of the axis to turn around.
|
|
21
25
|
* @default [0, 1, 0]
|
|
22
26
|
*/
|
|
23
27
|
this.axis = [0, 1, 0];
|
|
24
28
|
/**
|
|
25
|
-
*
|
|
29
|
+
* A point the axis passes through; it stays in place.
|
|
26
30
|
* @default [0, 0, 0]
|
|
27
31
|
*/
|
|
28
32
|
this.center = [0, 0, 0];
|
|
@@ -38,10 +42,15 @@ export var Transforms;
|
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
Transforms.RotationCenterAxisDto = RotationCenterAxisDto;
|
|
45
|
+
/**
|
|
46
|
+
* A center and an angle for `transforms.rotationCenterX`, `transforms.rotationCenterY` and
|
|
47
|
+
* `transforms.rotationCenterZ`.
|
|
48
|
+
*/
|
|
41
49
|
class RotationCenterDto {
|
|
42
50
|
constructor(angle, center) {
|
|
43
51
|
/**
|
|
44
|
-
*
|
|
52
|
+
* How far to turn, in degrees; positive is counter-clockwise when the axis points toward
|
|
53
|
+
* you.
|
|
45
54
|
* @default 90
|
|
46
55
|
* @minimum -Infinity
|
|
47
56
|
* @maximum Infinity
|
|
@@ -49,7 +58,7 @@ export var Transforms;
|
|
|
49
58
|
*/
|
|
50
59
|
this.angle = 90;
|
|
51
60
|
/**
|
|
52
|
-
* The
|
|
61
|
+
* The point the axis passes through; it stays in place.
|
|
53
62
|
* @default [0, 0, 0]
|
|
54
63
|
*/
|
|
55
64
|
this.center = [0, 0, 0];
|
|
@@ -62,10 +71,13 @@ export var Transforms;
|
|
|
62
71
|
}
|
|
63
72
|
}
|
|
64
73
|
Transforms.RotationCenterDto = RotationCenterDto;
|
|
74
|
+
/**
|
|
75
|
+
* Three angles and a center for `transforms.rotationCenterYawPitchRoll`.
|
|
76
|
+
*/
|
|
65
77
|
class RotationCenterYawPitchRollDto {
|
|
66
78
|
constructor(yaw, pitch, roll, center) {
|
|
67
79
|
/**
|
|
68
|
-
*
|
|
80
|
+
* The turn about the Y axis, in degrees.
|
|
69
81
|
* @default 0
|
|
70
82
|
* @minimum -Infinity
|
|
71
83
|
* @maximum Infinity
|
|
@@ -73,7 +85,7 @@ export var Transforms;
|
|
|
73
85
|
*/
|
|
74
86
|
this.yaw = 0;
|
|
75
87
|
/**
|
|
76
|
-
*
|
|
88
|
+
* The turn about the X axis, in degrees.
|
|
77
89
|
* @default 0
|
|
78
90
|
* @minimum -Infinity
|
|
79
91
|
* @maximum Infinity
|
|
@@ -81,7 +93,7 @@ export var Transforms;
|
|
|
81
93
|
*/
|
|
82
94
|
this.pitch = 0;
|
|
83
95
|
/**
|
|
84
|
-
*
|
|
96
|
+
* The turn about the Z axis, in degrees.
|
|
85
97
|
* @default 0
|
|
86
98
|
* @minimum -Infinity
|
|
87
99
|
* @maximum Infinity
|
|
@@ -89,7 +101,7 @@ export var Transforms;
|
|
|
89
101
|
*/
|
|
90
102
|
this.roll = 0;
|
|
91
103
|
/**
|
|
92
|
-
* The
|
|
104
|
+
* The point the rotation turns around; it stays in place.
|
|
93
105
|
* @default [0, 0, 0]
|
|
94
106
|
*/
|
|
95
107
|
this.center = [0, 0, 0];
|
|
@@ -108,10 +120,14 @@ export var Transforms;
|
|
|
108
120
|
}
|
|
109
121
|
}
|
|
110
122
|
Transforms.RotationCenterYawPitchRollDto = RotationCenterYawPitchRollDto;
|
|
123
|
+
/**
|
|
124
|
+
* A factor per axis for `transforms.scaleXYZ`, measured from the origin.
|
|
125
|
+
*/
|
|
111
126
|
class ScaleXYZDto {
|
|
112
127
|
constructor(scaleXyz) {
|
|
113
128
|
/**
|
|
114
|
-
*
|
|
129
|
+
* The factor for each axis as `[x, y, z]`: `[1, 2, 1]` doubles distances along Y and leaves
|
|
130
|
+
* X and Z as they are.
|
|
115
131
|
* @default [1, 1, 1]
|
|
116
132
|
*/
|
|
117
133
|
this.scaleXyz = [1, 1, 1];
|
|
@@ -121,22 +137,30 @@ export var Transforms;
|
|
|
121
137
|
}
|
|
122
138
|
}
|
|
123
139
|
Transforms.ScaleXYZDto = ScaleXYZDto;
|
|
140
|
+
/**
|
|
141
|
+
* A center, a direction and a factor for `transforms.stretchDirFromCenter`.
|
|
142
|
+
*/
|
|
124
143
|
class StretchDirCenterDto {
|
|
125
144
|
constructor(scale, center, direction) {
|
|
126
|
-
/**
|
|
145
|
+
/**
|
|
146
|
+
* The point that stays in place; distances are measured from it.
|
|
127
147
|
* @default [0, 0, 0]
|
|
128
148
|
*/
|
|
129
149
|
this.center = [0, 0, 0];
|
|
130
|
-
/**
|
|
150
|
+
/**
|
|
151
|
+
* The direction to stretch along; its length does not matter. Distances across it do not
|
|
152
|
+
* change.
|
|
131
153
|
* @default [0, 0, 1]
|
|
132
|
-
|
|
154
|
+
*/
|
|
133
155
|
this.direction = [0, 0, 1];
|
|
134
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* The factor applied along the direction; 1 changes nothing, 2 doubles distances from the
|
|
158
|
+
* center along it.
|
|
135
159
|
* @default 2
|
|
136
160
|
* @minimum -Infinity
|
|
137
161
|
* @maximum Infinity
|
|
138
162
|
* @step 0.1
|
|
139
|
-
|
|
163
|
+
*/
|
|
140
164
|
this.scale = 2;
|
|
141
165
|
if (scale !== undefined) {
|
|
142
166
|
this.scale = scale;
|
|
@@ -150,15 +174,19 @@ export var Transforms;
|
|
|
150
174
|
}
|
|
151
175
|
}
|
|
152
176
|
Transforms.StretchDirCenterDto = StretchDirCenterDto;
|
|
177
|
+
/**
|
|
178
|
+
* A center and a factor per axis for `transforms.scaleCenterXYZ`.
|
|
179
|
+
*/
|
|
153
180
|
class ScaleCenterXYZDto {
|
|
154
181
|
constructor(center, scaleXyz) {
|
|
155
182
|
/**
|
|
156
|
-
* The
|
|
183
|
+
* The point that stays in place while everything else moves away from it or toward it.
|
|
157
184
|
* @default [0, 0, 0]
|
|
158
185
|
*/
|
|
159
186
|
this.center = [0, 0, 0];
|
|
160
187
|
/**
|
|
161
|
-
*
|
|
188
|
+
* The factor for each axis as `[x, y, z]`: `[1, 2, 1]` doubles distances along Y and leaves
|
|
189
|
+
* X and Z as they are.
|
|
162
190
|
* @default [1, 1, 1]
|
|
163
191
|
*/
|
|
164
192
|
this.scaleXyz = [1, 1, 1];
|
|
@@ -171,10 +199,14 @@ export var Transforms;
|
|
|
171
199
|
}
|
|
172
200
|
}
|
|
173
201
|
Transforms.ScaleCenterXYZDto = ScaleCenterXYZDto;
|
|
202
|
+
/**
|
|
203
|
+
* One factor for `transforms.uniformScale`, applied on every axis from the origin.
|
|
204
|
+
*/
|
|
174
205
|
class UniformScaleDto {
|
|
175
206
|
constructor(scale) {
|
|
176
207
|
/**
|
|
177
|
-
*
|
|
208
|
+
* The factor on every axis: 1 changes nothing, 2 doubles every size and distance from the
|
|
209
|
+
* origin.
|
|
178
210
|
* @default 1
|
|
179
211
|
* @minimum -Infinity
|
|
180
212
|
* @maximum Infinity
|
|
@@ -187,10 +219,14 @@ export var Transforms;
|
|
|
187
219
|
}
|
|
188
220
|
}
|
|
189
221
|
Transforms.UniformScaleDto = UniformScaleDto;
|
|
222
|
+
/**
|
|
223
|
+
* One factor and a center for `transforms.uniformScaleFromCenter`.
|
|
224
|
+
*/
|
|
190
225
|
class UniformScaleFromCenterDto {
|
|
191
226
|
constructor(scale, center) {
|
|
192
227
|
/**
|
|
193
|
-
*
|
|
228
|
+
* The factor on every axis: 1 changes nothing, 2 doubles every size and distance from the
|
|
229
|
+
* center.
|
|
194
230
|
* @default 1
|
|
195
231
|
* @minimum -Infinity
|
|
196
232
|
* @maximum Infinity
|
|
@@ -198,7 +234,7 @@ export var Transforms;
|
|
|
198
234
|
*/
|
|
199
235
|
this.scale = 1;
|
|
200
236
|
/**
|
|
201
|
-
*
|
|
237
|
+
* The point that stays in place while everything else moves away from it or toward it.
|
|
202
238
|
* @default [0, 0, 0]
|
|
203
239
|
*/
|
|
204
240
|
this.center = [0, 0, 0];
|
|
@@ -211,10 +247,13 @@ export var Transforms;
|
|
|
211
247
|
}
|
|
212
248
|
}
|
|
213
249
|
Transforms.UniformScaleFromCenterDto = UniformScaleFromCenterDto;
|
|
250
|
+
/**
|
|
251
|
+
* A vector for `transforms.translationXYZ`, which builds the matrix that moves by it.
|
|
252
|
+
*/
|
|
214
253
|
class TranslationXYZDto {
|
|
215
254
|
constructor(translation) {
|
|
216
255
|
/**
|
|
217
|
-
*
|
|
256
|
+
* How far to move along each axis, as `[x, y, z]` in model units.
|
|
218
257
|
* @default [0, 0, 0]
|
|
219
258
|
*/
|
|
220
259
|
this.translation = [0, 0, 0];
|
|
@@ -224,6 +263,9 @@ export var Transforms;
|
|
|
224
263
|
}
|
|
225
264
|
}
|
|
226
265
|
Transforms.TranslationXYZDto = TranslationXYZDto;
|
|
266
|
+
/**
|
|
267
|
+
* Several vectors for `transforms.translationsXYZ`, one transformation each.
|
|
268
|
+
*/
|
|
227
269
|
class TranslationsXYZDto {
|
|
228
270
|
constructor(translations) {
|
|
229
271
|
if (translations !== undefined) {
|