@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
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export var Line;
|
|
8
8
|
(function (Line) {
|
|
9
|
+
/**
|
|
10
|
+
* A line as a plain object: where it starts and where it ends. Also the input of `line.create`
|
|
11
|
+
* and `line.createSegment`.
|
|
12
|
+
*/
|
|
9
13
|
class LinePointsDto {
|
|
10
14
|
/**
|
|
11
15
|
* Provide options without default values
|
|
@@ -20,6 +24,9 @@ export var Line;
|
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
Line.LinePointsDto = LinePointsDto;
|
|
27
|
+
/**
|
|
28
|
+
* Two matching lists of points for `line.linesBetweenStartAndEndPoints`.
|
|
29
|
+
*/
|
|
23
30
|
class LineStartEndPointsDto {
|
|
24
31
|
/**
|
|
25
32
|
* Provide options without default values
|
|
@@ -34,13 +41,17 @@ export var Line;
|
|
|
34
41
|
}
|
|
35
42
|
}
|
|
36
43
|
Line.LineStartEndPointsDto = LineStartEndPointsDto;
|
|
44
|
+
/**
|
|
45
|
+
* One line and how to draw it: its width, color and opacity, and whether the drawn mesh will
|
|
46
|
+
* be updated later.
|
|
47
|
+
*/
|
|
37
48
|
class DrawLineDto {
|
|
38
49
|
/**
|
|
39
50
|
* Provide options without default values
|
|
40
51
|
*/
|
|
41
52
|
constructor(line, opacity, colours, size, updatable, lineMesh) {
|
|
42
53
|
/**
|
|
43
|
-
*
|
|
54
|
+
* How opaque the line is, from 0 (invisible) to 1 (solid).
|
|
44
55
|
* @default 1
|
|
45
56
|
* @minimum 0
|
|
46
57
|
* @maximum 1
|
|
@@ -48,12 +59,12 @@ export var Line;
|
|
|
48
59
|
*/
|
|
49
60
|
this.opacity = 1;
|
|
50
61
|
/**
|
|
51
|
-
*
|
|
62
|
+
* Color of the line as a hex text such as `#ff0000`; a list of texts is also accepted.
|
|
52
63
|
* @default #444444
|
|
53
64
|
*/
|
|
54
65
|
this.colours = "#444444";
|
|
55
66
|
/**
|
|
56
|
-
* Width of the line
|
|
67
|
+
* Width of the drawn line.
|
|
57
68
|
* @default 3
|
|
58
69
|
* @minimum 0
|
|
59
70
|
* @maximum Infinity
|
|
@@ -61,7 +72,7 @@ export var Line;
|
|
|
61
72
|
*/
|
|
62
73
|
this.size = 3;
|
|
63
74
|
/**
|
|
64
|
-
*
|
|
75
|
+
* When true, the drawn mesh is built so its ends can be moved later without redrawing.
|
|
65
76
|
* @default false
|
|
66
77
|
*/
|
|
67
78
|
this.updatable = false;
|
|
@@ -86,13 +97,17 @@ export var Line;
|
|
|
86
97
|
}
|
|
87
98
|
}
|
|
88
99
|
Line.DrawLineDto = DrawLineDto;
|
|
100
|
+
/**
|
|
101
|
+
* A list of lines and how to draw them: their width, colors and opacity, and whether the drawn
|
|
102
|
+
* mesh will be updated later.
|
|
103
|
+
*/
|
|
89
104
|
class DrawLinesDto {
|
|
90
105
|
/**
|
|
91
106
|
* Provide options without default values
|
|
92
107
|
*/
|
|
93
108
|
constructor(lines, opacity, colours, size, updatable, linesMesh) {
|
|
94
109
|
/**
|
|
95
|
-
*
|
|
110
|
+
* How opaque the lines are, from 0 (invisible) to 1 (solid).
|
|
96
111
|
* @default 1
|
|
97
112
|
* @minimum 0
|
|
98
113
|
* @maximum 1
|
|
@@ -100,12 +115,12 @@ export var Line;
|
|
|
100
115
|
*/
|
|
101
116
|
this.opacity = 1;
|
|
102
117
|
/**
|
|
103
|
-
*
|
|
118
|
+
* One hex color text for all lines, or one text per line.
|
|
104
119
|
* @default #444444
|
|
105
120
|
*/
|
|
106
121
|
this.colours = "#444444";
|
|
107
122
|
/**
|
|
108
|
-
* Width of the
|
|
123
|
+
* Width of the drawn lines.
|
|
109
124
|
* @default 3
|
|
110
125
|
* @minimum 0
|
|
111
126
|
* @maximum Infinity
|
|
@@ -113,7 +128,7 @@ export var Line;
|
|
|
113
128
|
*/
|
|
114
129
|
this.size = 3;
|
|
115
130
|
/**
|
|
116
|
-
*
|
|
131
|
+
* When true, the drawn mesh is built so the ends can be moved later without redrawing.
|
|
117
132
|
* @default false
|
|
118
133
|
*/
|
|
119
134
|
this.updatable = false;
|
|
@@ -138,6 +153,9 @@ export var Line;
|
|
|
138
153
|
}
|
|
139
154
|
}
|
|
140
155
|
Line.DrawLinesDto = DrawLinesDto;
|
|
156
|
+
/**
|
|
157
|
+
* Points in order for `line.linesBetweenPoints`, which joins each to the next.
|
|
158
|
+
*/
|
|
141
159
|
class PointsLinesDto {
|
|
142
160
|
constructor(points) {
|
|
143
161
|
if (points !== undefined) {
|
|
@@ -146,6 +164,10 @@ export var Line;
|
|
|
146
164
|
}
|
|
147
165
|
}
|
|
148
166
|
Line.PointsLinesDto = PointsLinesDto;
|
|
167
|
+
/**
|
|
168
|
+
* One line for the methods that read or convert it: `line.length`, `line.reverse`,
|
|
169
|
+
* `line.lineToSegment` and the others.
|
|
170
|
+
*/
|
|
149
171
|
class LineDto {
|
|
150
172
|
constructor(line) {
|
|
151
173
|
if (line !== undefined) {
|
|
@@ -154,6 +176,9 @@ export var Line;
|
|
|
154
176
|
}
|
|
155
177
|
}
|
|
156
178
|
Line.LineDto = LineDto;
|
|
179
|
+
/**
|
|
180
|
+
* One segment, a pair of points, for `line.segmentToLine`.
|
|
181
|
+
*/
|
|
157
182
|
class SegmentDto {
|
|
158
183
|
constructor(segment) {
|
|
159
184
|
if (segment !== undefined) {
|
|
@@ -162,6 +187,9 @@ export var Line;
|
|
|
162
187
|
}
|
|
163
188
|
}
|
|
164
189
|
Line.SegmentDto = SegmentDto;
|
|
190
|
+
/**
|
|
191
|
+
* Several segments, each a pair of points, for `line.segmentsToLines`.
|
|
192
|
+
*/
|
|
165
193
|
class SegmentsDto {
|
|
166
194
|
constructor(segments) {
|
|
167
195
|
if (segments !== undefined) {
|
|
@@ -170,6 +198,10 @@ export var Line;
|
|
|
170
198
|
}
|
|
171
199
|
}
|
|
172
200
|
Line.SegmentsDto = SegmentsDto;
|
|
201
|
+
/**
|
|
202
|
+
* Several line objects for `line.linesToSegments`, which converts each to its pair-of-points
|
|
203
|
+
* form.
|
|
204
|
+
*/
|
|
173
205
|
class LinesDto {
|
|
174
206
|
constructor(lines) {
|
|
175
207
|
if (lines !== undefined) {
|
|
@@ -178,15 +210,20 @@ export var Line;
|
|
|
178
210
|
}
|
|
179
211
|
}
|
|
180
212
|
Line.LinesDto = LinesDto;
|
|
213
|
+
/**
|
|
214
|
+
* Two lines and the rules for `line.lineLineIntersection`.
|
|
215
|
+
*/
|
|
181
216
|
class LineLineIntersectionDto {
|
|
182
217
|
constructor(line1, line2, tolerance) {
|
|
183
218
|
/**
|
|
184
|
-
*
|
|
219
|
+
* When true, the crossing must lie within both segments; when false the lines are extended
|
|
220
|
+
* without end.
|
|
185
221
|
* @default true
|
|
186
222
|
*/
|
|
187
223
|
this.checkSegmentsOnly = true;
|
|
188
224
|
/**
|
|
189
|
-
*
|
|
225
|
+
* How close, in model units, two lines must come to count as meeting; also the distance
|
|
226
|
+
* below which a line counts as having no length.
|
|
190
227
|
* @default 0.01
|
|
191
228
|
* @minimum 0
|
|
192
229
|
* @maximum Infinity
|
|
@@ -205,10 +242,14 @@ export var Line;
|
|
|
205
242
|
}
|
|
206
243
|
}
|
|
207
244
|
Line.LineLineIntersectionDto = LineLineIntersectionDto;
|
|
245
|
+
/**
|
|
246
|
+
* A line and a fraction along it for `line.getPointOnLine`.
|
|
247
|
+
*/
|
|
208
248
|
class PointOnLineDto {
|
|
209
249
|
constructor(line, param) {
|
|
210
250
|
/**
|
|
211
|
-
*
|
|
251
|
+
* How far along the line, from 0 at the start to 1 at the end; values outside that range
|
|
252
|
+
* continue past the ends.
|
|
212
253
|
* @default 0.5
|
|
213
254
|
* @minimum -Infinity
|
|
214
255
|
* @maximum Infinity
|
|
@@ -224,6 +265,9 @@ export var Line;
|
|
|
224
265
|
}
|
|
225
266
|
}
|
|
226
267
|
Line.PointOnLineDto = PointOnLineDto;
|
|
268
|
+
/**
|
|
269
|
+
* A line and the transformation `line.transformLine` applies to both its ends.
|
|
270
|
+
*/
|
|
227
271
|
class TransformLineDto {
|
|
228
272
|
constructor(line, transformation) {
|
|
229
273
|
if (line !== undefined) {
|
|
@@ -235,6 +279,9 @@ export var Line;
|
|
|
235
279
|
}
|
|
236
280
|
}
|
|
237
281
|
Line.TransformLineDto = TransformLineDto;
|
|
282
|
+
/**
|
|
283
|
+
* Lines and one transformation per line for `line.transformsForLines`.
|
|
284
|
+
*/
|
|
238
285
|
class TransformsLinesDto {
|
|
239
286
|
constructor(lines, transformation) {
|
|
240
287
|
if (lines !== undefined) {
|
|
@@ -246,6 +293,9 @@ export var Line;
|
|
|
246
293
|
}
|
|
247
294
|
}
|
|
248
295
|
Line.TransformsLinesDto = TransformsLinesDto;
|
|
296
|
+
/**
|
|
297
|
+
* Lines and the one transformation applied to all of them.
|
|
298
|
+
*/
|
|
249
299
|
class TransformLinesDto {
|
|
250
300
|
constructor(lines, transformation) {
|
|
251
301
|
if (lines !== undefined) {
|