@bitbybit-dev/base 1.2.0-rc.2 → 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 Dates;
|
|
8
8
|
(function (Dates) {
|
|
9
|
+
/**
|
|
10
|
+
* One date for the reading and formatting methods of `dates`: `getYear`, `getMonth`,
|
|
11
|
+
* `toISOString` and the rest.
|
|
12
|
+
*/
|
|
9
13
|
class DateDto {
|
|
10
14
|
constructor(date) {
|
|
11
15
|
if (date !== undefined) {
|
|
@@ -14,6 +18,9 @@ export var Dates;
|
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
Dates.DateDto = DateDto;
|
|
21
|
+
/**
|
|
22
|
+
* A date written as text for `dates.parseDate`.
|
|
23
|
+
*/
|
|
17
24
|
class DateStringDto {
|
|
18
25
|
constructor(dateString) {
|
|
19
26
|
if (dateString !== undefined) {
|
|
@@ -22,10 +29,13 @@ export var Dates;
|
|
|
22
29
|
}
|
|
23
30
|
}
|
|
24
31
|
Dates.DateStringDto = DateStringDto;
|
|
32
|
+
/**
|
|
33
|
+
* A date and a new value for its seconds, for `dates.setSeconds` and `dates.setUTCSeconds`.
|
|
34
|
+
*/
|
|
25
35
|
class DateSecondsDto {
|
|
26
36
|
constructor(date, seconds) {
|
|
27
37
|
/**
|
|
28
|
-
* The seconds
|
|
38
|
+
* The new seconds from 0 to 59; a value outside the range rolls the date over.
|
|
29
39
|
* @default 30
|
|
30
40
|
* @minimum 0
|
|
31
41
|
* @maximum Infinity
|
|
@@ -41,10 +51,13 @@ export var Dates;
|
|
|
41
51
|
}
|
|
42
52
|
}
|
|
43
53
|
Dates.DateSecondsDto = DateSecondsDto;
|
|
54
|
+
/**
|
|
55
|
+
* A date and a new value for its day, for `dates.setDayOfMonth` and `dates.setUTCDay`.
|
|
56
|
+
*/
|
|
44
57
|
class DateDayDto {
|
|
45
58
|
constructor(date, day) {
|
|
46
59
|
/**
|
|
47
|
-
* The day of the date
|
|
60
|
+
* The new day of the month, from 1 to 31; a value outside the range rolls the date over.
|
|
48
61
|
* @default 1
|
|
49
62
|
* @minimum 0
|
|
50
63
|
* @maximum Infinity
|
|
@@ -60,10 +73,14 @@ export var Dates;
|
|
|
60
73
|
}
|
|
61
74
|
}
|
|
62
75
|
Dates.DateDayDto = DateDayDto;
|
|
76
|
+
/**
|
|
77
|
+
* A date and a new value for its year, for `dates.setYear` and `dates.setUTCYear`.
|
|
78
|
+
*/
|
|
63
79
|
class DateYearDto {
|
|
64
80
|
constructor(date, year) {
|
|
65
81
|
/**
|
|
66
|
-
* The year
|
|
82
|
+
* The new year as a full number such as 2024; a value outside the range rolls the date
|
|
83
|
+
* over.
|
|
67
84
|
* @default 1
|
|
68
85
|
* @minimum 0
|
|
69
86
|
* @maximum Infinity
|
|
@@ -79,10 +96,14 @@ export var Dates;
|
|
|
79
96
|
}
|
|
80
97
|
}
|
|
81
98
|
Dates.DateYearDto = DateYearDto;
|
|
99
|
+
/**
|
|
100
|
+
* A date and a new value for its month, for `dates.setMonth` and `dates.setUTCMonth`.
|
|
101
|
+
*/
|
|
82
102
|
class DateMonthDto {
|
|
83
103
|
constructor(date, month) {
|
|
84
104
|
/**
|
|
85
|
-
* The month
|
|
105
|
+
* The new month counting from 0: 0 is January, 11 December; a value outside the range rolls
|
|
106
|
+
* the date over.
|
|
86
107
|
* @default 1
|
|
87
108
|
* @minimum 0
|
|
88
109
|
* @maximum Infinity
|
|
@@ -98,10 +119,13 @@ export var Dates;
|
|
|
98
119
|
}
|
|
99
120
|
}
|
|
100
121
|
Dates.DateMonthDto = DateMonthDto;
|
|
122
|
+
/**
|
|
123
|
+
* A date and a new value for its hours, for `dates.setHours` and `dates.setUTCHours`.
|
|
124
|
+
*/
|
|
101
125
|
class DateHoursDto {
|
|
102
126
|
constructor(date, hours) {
|
|
103
127
|
/**
|
|
104
|
-
* The hours
|
|
128
|
+
* The new hours from 0 to 23; a value outside the range rolls the date over.
|
|
105
129
|
* @default 1
|
|
106
130
|
* @minimum 0
|
|
107
131
|
* @maximum Infinity
|
|
@@ -117,10 +141,13 @@ export var Dates;
|
|
|
117
141
|
}
|
|
118
142
|
}
|
|
119
143
|
Dates.DateHoursDto = DateHoursDto;
|
|
144
|
+
/**
|
|
145
|
+
* A date and a new value for its minutes, for `dates.setMinutes` and `dates.setUTCMinutes`.
|
|
146
|
+
*/
|
|
120
147
|
class DateMinutesDto {
|
|
121
148
|
constructor(date, minutes) {
|
|
122
149
|
/**
|
|
123
|
-
* The minutes
|
|
150
|
+
* The new minutes from 0 to 59; a value outside the range rolls the date over.
|
|
124
151
|
* @default 1
|
|
125
152
|
* @minimum 0
|
|
126
153
|
* @maximum Infinity
|
|
@@ -136,10 +163,14 @@ export var Dates;
|
|
|
136
163
|
}
|
|
137
164
|
}
|
|
138
165
|
Dates.DateMinutesDto = DateMinutesDto;
|
|
166
|
+
/**
|
|
167
|
+
* A date and a new value for its milliseconds, for `dates.setMilliseconds` and
|
|
168
|
+
* `dates.setUTCMilliseconds`.
|
|
169
|
+
*/
|
|
139
170
|
class DateMillisecondsDto {
|
|
140
171
|
constructor(date, milliseconds) {
|
|
141
172
|
/**
|
|
142
|
-
* The milliseconds
|
|
173
|
+
* The new milliseconds from 0 to 999; a value outside the range rolls the date over.
|
|
143
174
|
* @default 1
|
|
144
175
|
* @minimum 0
|
|
145
176
|
* @maximum Infinity
|
|
@@ -155,10 +186,13 @@ export var Dates;
|
|
|
155
186
|
}
|
|
156
187
|
}
|
|
157
188
|
Dates.DateMillisecondsDto = DateMillisecondsDto;
|
|
189
|
+
/**
|
|
190
|
+
* A date and a Unix timestamp for `dates.setTime`.
|
|
191
|
+
*/
|
|
158
192
|
class DateTimeDto {
|
|
159
193
|
constructor(date, time) {
|
|
160
194
|
/**
|
|
161
|
-
* The
|
|
195
|
+
* The new moment as milliseconds since 1 January 1970 at 00:00 UTC.
|
|
162
196
|
* @default 1
|
|
163
197
|
* @minimum 0
|
|
164
198
|
* @maximum Infinity
|
|
@@ -174,10 +208,13 @@ export var Dates;
|
|
|
174
208
|
}
|
|
175
209
|
}
|
|
176
210
|
Dates.DateTimeDto = DateTimeDto;
|
|
211
|
+
/**
|
|
212
|
+
* A Unix timestamp for `dates.createFromUnixTimeStamp`, which turns it into a date.
|
|
213
|
+
*/
|
|
177
214
|
class CreateFromUnixTimeStampDto {
|
|
178
215
|
constructor(unixTimeStamp) {
|
|
179
216
|
/**
|
|
180
|
-
*
|
|
217
|
+
* Milliseconds since 1 January 1970 at 00:00 UTC.
|
|
181
218
|
* @default 1
|
|
182
219
|
* @minimum 0
|
|
183
220
|
* @maximum Infinity
|
|
@@ -190,10 +227,14 @@ export var Dates;
|
|
|
190
227
|
}
|
|
191
228
|
}
|
|
192
229
|
Dates.CreateFromUnixTimeStampDto = CreateFromUnixTimeStampDto;
|
|
230
|
+
/**
|
|
231
|
+
* The parts of a date for `dates.createDate` and `dates.createDateUTC`; a part outside its
|
|
232
|
+
* range rolls the date over.
|
|
233
|
+
*/
|
|
193
234
|
class CreateDateDto {
|
|
194
235
|
constructor(year, month, day, hours, minutes, seconds, milliseconds) {
|
|
195
236
|
/**
|
|
196
|
-
* The year
|
|
237
|
+
* The full year, such as 2024.
|
|
197
238
|
* @default 1
|
|
198
239
|
* @minimum 0
|
|
199
240
|
* @maximum Infinity
|
|
@@ -201,7 +242,7 @@ export var Dates;
|
|
|
201
242
|
*/
|
|
202
243
|
this.year = 1;
|
|
203
244
|
/**
|
|
204
|
-
* The month
|
|
245
|
+
* The month counting from 0: 0 is January, 11 December.
|
|
205
246
|
* @default 1
|
|
206
247
|
* @minimum 0
|
|
207
248
|
* @maximum Infinity
|
|
@@ -209,7 +250,7 @@ export var Dates;
|
|
|
209
250
|
*/
|
|
210
251
|
this.month = 1;
|
|
211
252
|
/**
|
|
212
|
-
* The day of the month
|
|
253
|
+
* The day of the month, from 1 to 31.
|
|
213
254
|
* @default 1
|
|
214
255
|
* @minimum 0
|
|
215
256
|
* @maximum Infinity
|
|
@@ -217,7 +258,7 @@ export var Dates;
|
|
|
217
258
|
*/
|
|
218
259
|
this.day = 1;
|
|
219
260
|
/**
|
|
220
|
-
* The
|
|
261
|
+
* The hour, from 0 to 23.
|
|
221
262
|
* @default 1
|
|
222
263
|
* @minimum 0
|
|
223
264
|
* @maximum Infinity
|
|
@@ -225,7 +266,7 @@ export var Dates;
|
|
|
225
266
|
*/
|
|
226
267
|
this.hours = 1;
|
|
227
268
|
/**
|
|
228
|
-
* The minutes
|
|
269
|
+
* The minutes, from 0 to 59.
|
|
229
270
|
* @default 1
|
|
230
271
|
* @minimum 0
|
|
231
272
|
* @maximum Infinity
|
|
@@ -233,7 +274,7 @@ export var Dates;
|
|
|
233
274
|
*/
|
|
234
275
|
this.minutes = 1;
|
|
235
276
|
/**
|
|
236
|
-
* The seconds
|
|
277
|
+
* The seconds, from 0 to 59.
|
|
237
278
|
* @default 1
|
|
238
279
|
* @minimum 0
|
|
239
280
|
* @maximum Infinity
|
|
@@ -241,7 +282,7 @@ export var Dates;
|
|
|
241
282
|
*/
|
|
242
283
|
this.seconds = 1;
|
|
243
284
|
/**
|
|
244
|
-
* The milliseconds
|
|
285
|
+
* The milliseconds, from 0 to 999.
|
|
245
286
|
* @default 1
|
|
246
287
|
* @minimum 0
|
|
247
288
|
* @maximum Infinity
|
|
@@ -31,7 +31,7 @@ export declare namespace IO {
|
|
|
31
31
|
*/
|
|
32
32
|
center: Base.Point2;
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* Distance from the center to the arc, in drawing units.
|
|
35
35
|
* @default undefined
|
|
36
36
|
*/
|
|
37
37
|
radius: number;
|
|
@@ -47,7 +47,7 @@ export declare namespace IO {
|
|
|
47
47
|
endAngle: number;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* A full circle in a DXF path, given by its center and radius.
|
|
51
51
|
*/
|
|
52
52
|
class DxfCircleSegmentDto {
|
|
53
53
|
constructor(center?: Base.Point2, radius?: number);
|
|
@@ -57,7 +57,7 @@ export declare namespace IO {
|
|
|
57
57
|
*/
|
|
58
58
|
center: Base.Point2;
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
60
|
+
* Distance from the center to the circle, in drawing units.
|
|
61
61
|
* @default undefined
|
|
62
62
|
*/
|
|
63
63
|
radius: number;
|
|
@@ -79,12 +79,11 @@ export declare namespace IO {
|
|
|
79
79
|
*/
|
|
80
80
|
closed?: boolean | undefined;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* 0 = straight line segment
|
|
86
|
-
* Array length should match points length (or be undefined for all straight segments)
|
|
82
|
+
* One bulge per vertex to bend the segment after it into an arc: 0 keeps it straight,
|
|
83
|
+
* positive bends counter-clockwise, negative clockwise. Leave it out for straight segments
|
|
84
|
+
* only.
|
|
87
85
|
* @default undefined
|
|
86
|
+
* @optional true
|
|
88
87
|
*/
|
|
89
88
|
bulges?: number[] | undefined;
|
|
90
89
|
}
|
|
@@ -144,7 +143,8 @@ export declare namespace IO {
|
|
|
144
143
|
paths: DxfPathDto[];
|
|
145
144
|
}
|
|
146
145
|
/**
|
|
147
|
-
*
|
|
146
|
+
* A whole DXF drawing: its path parts by layer and color, and the color and version format to
|
|
147
|
+
* write.
|
|
148
148
|
*/
|
|
149
149
|
class DxfModelDto {
|
|
150
150
|
constructor(dxfPathsParts?: DxfPathsPartDto[], colorFormat?: "aci" | "truecolor", acadVersion?: "AC1009" | "AC1015");
|
|
@@ -154,16 +154,14 @@ export declare namespace IO {
|
|
|
154
154
|
*/
|
|
155
155
|
dxfPathsParts: DxfPathsPartDto[];
|
|
156
156
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* - "truecolor": 24-bit RGB true color - Full color spectrum, requires newer CAD software
|
|
157
|
+
* How colors are written: `aci`, the AutoCAD color index from 1 to 255 that older
|
|
158
|
+
* software reads, or `truecolor`, full 24-bit RGB for newer software.
|
|
160
159
|
* @default aci
|
|
161
160
|
*/
|
|
162
161
|
colorFormat?: "aci" | "truecolor" | undefined;
|
|
163
162
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
* - "AC1015": AutoCAD 2000 - Modern format with extended features
|
|
163
|
+
* The DXF version to write: `AC1009` (AutoCAD R12) for the widest compatibility, or
|
|
164
|
+
* `AC1015` (AutoCAD 2000) for the newer features.
|
|
167
165
|
* @default AC1009
|
|
168
166
|
*/
|
|
169
167
|
acadVersion?: "AC1009" | "AC1015" | undefined;
|
|
@@ -40,7 +40,7 @@ export var IO;
|
|
|
40
40
|
}
|
|
41
41
|
IO.DxfArcSegmentDto = DxfArcSegmentDto;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* A full circle in a DXF path, given by its center and radius.
|
|
44
44
|
*/
|
|
45
45
|
class DxfCircleSegmentDto {
|
|
46
46
|
constructor(center, radius) {
|
|
@@ -143,21 +143,20 @@ export var IO;
|
|
|
143
143
|
}
|
|
144
144
|
IO.DxfPathsPartDto = DxfPathsPartDto;
|
|
145
145
|
/**
|
|
146
|
-
*
|
|
146
|
+
* A whole DXF drawing: its path parts by layer and color, and the color and version format to
|
|
147
|
+
* write.
|
|
147
148
|
*/
|
|
148
149
|
class DxfModelDto {
|
|
149
150
|
constructor(dxfPathsParts, colorFormat, acadVersion) {
|
|
150
151
|
/**
|
|
151
|
-
*
|
|
152
|
-
*
|
|
153
|
-
* - "truecolor": 24-bit RGB true color - Full color spectrum, requires newer CAD software
|
|
152
|
+
* How colors are written: `aci`, the AutoCAD color index from 1 to 255 that older
|
|
153
|
+
* software reads, or `truecolor`, full 24-bit RGB for newer software.
|
|
154
154
|
* @default aci
|
|
155
155
|
*/
|
|
156
156
|
this.colorFormat = "aci";
|
|
157
157
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* - "AC1015": AutoCAD 2000 - Modern format with extended features
|
|
158
|
+
* The DXF version to write: `AC1009` (AutoCAD R12) for the widest compatibility, or
|
|
159
|
+
* `AC1015` (AutoCAD 2000) for the newer features.
|
|
161
160
|
* @default AC1009
|
|
162
161
|
*/
|
|
163
162
|
this.acadVersion = "AC1009";
|
|
@@ -5,50 +5,61 @@ import { Base } from "./base-inputs";
|
|
|
5
5
|
* converting them into polylines or kernel edges.
|
|
6
6
|
*/
|
|
7
7
|
export declare namespace Line {
|
|
8
|
+
/**
|
|
9
|
+
* A line as a plain object: where it starts and where it ends. Also the input of `line.create`
|
|
10
|
+
* and `line.createSegment`.
|
|
11
|
+
*/
|
|
8
12
|
class LinePointsDto {
|
|
9
13
|
/**
|
|
10
14
|
* Provide options without default values
|
|
11
15
|
*/
|
|
12
16
|
constructor(start?: Base.Point3, end?: Base.Point3);
|
|
13
17
|
/**
|
|
14
|
-
*
|
|
18
|
+
* The first point of the line, where it begins.
|
|
15
19
|
* @default undefined
|
|
16
20
|
*/
|
|
17
21
|
start: Base.Point3;
|
|
18
22
|
/**
|
|
19
|
-
*
|
|
23
|
+
* The second point of the line, where it finishes; the direction runs from start to end.
|
|
20
24
|
* @default undefined
|
|
21
25
|
*/
|
|
22
26
|
end: Base.Point3;
|
|
23
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Two matching lists of points for `line.linesBetweenStartAndEndPoints`.
|
|
30
|
+
*/
|
|
24
31
|
class LineStartEndPointsDto {
|
|
25
32
|
/**
|
|
26
33
|
* Provide options without default values
|
|
27
34
|
*/
|
|
28
35
|
constructor(startPoints?: Base.Point3[], endPoints?: Base.Point3[]);
|
|
29
36
|
/**
|
|
30
|
-
*
|
|
37
|
+
* The start of each line, in order.
|
|
31
38
|
* @default undefined
|
|
32
39
|
*/
|
|
33
40
|
startPoints: Base.Point3[];
|
|
34
41
|
/**
|
|
35
|
-
*
|
|
42
|
+
* The end of each line, in the same order as the starts.
|
|
36
43
|
* @default undefined
|
|
37
44
|
*/
|
|
38
45
|
endPoints: Base.Point3[];
|
|
39
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* One line and how to draw it: its width, color and opacity, and whether the drawn mesh will
|
|
49
|
+
* be updated later.
|
|
50
|
+
*/
|
|
40
51
|
class DrawLineDto<T> {
|
|
41
52
|
/**
|
|
42
53
|
* Provide options without default values
|
|
43
54
|
*/
|
|
44
55
|
constructor(line?: LinePointsDto, opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, lineMesh?: T);
|
|
45
56
|
/**
|
|
46
|
-
*
|
|
57
|
+
* The line to draw, with its start and end.
|
|
47
58
|
* @default undefined
|
|
48
59
|
*/
|
|
49
60
|
line: LinePointsDto;
|
|
50
61
|
/**
|
|
51
|
-
*
|
|
62
|
+
* How opaque the line is, from 0 (invisible) to 1 (solid).
|
|
52
63
|
* @default 1
|
|
53
64
|
* @minimum 0
|
|
54
65
|
* @maximum 1
|
|
@@ -56,12 +67,12 @@ export declare namespace Line {
|
|
|
56
67
|
*/
|
|
57
68
|
opacity?: number | undefined;
|
|
58
69
|
/**
|
|
59
|
-
*
|
|
70
|
+
* Color of the line as a hex text such as `#ff0000`; a list of texts is also accepted.
|
|
60
71
|
* @default #444444
|
|
61
72
|
*/
|
|
62
73
|
colours?: string | string[] | undefined;
|
|
63
74
|
/**
|
|
64
|
-
* Width of the line
|
|
75
|
+
* Width of the drawn line.
|
|
65
76
|
* @default 3
|
|
66
77
|
* @minimum 0
|
|
67
78
|
* @maximum Infinity
|
|
@@ -69,28 +80,34 @@ export declare namespace Line {
|
|
|
69
80
|
*/
|
|
70
81
|
size?: number | undefined;
|
|
71
82
|
/**
|
|
72
|
-
*
|
|
83
|
+
* When true, the drawn mesh is built so its ends can be moved later without redrawing.
|
|
73
84
|
* @default false
|
|
74
85
|
*/
|
|
75
86
|
updatable?: boolean | undefined;
|
|
76
87
|
/**
|
|
77
|
-
*
|
|
88
|
+
* A mesh drawn earlier for this line; when given it is updated in place instead of a new
|
|
89
|
+
* one being made.
|
|
78
90
|
* @default undefined
|
|
91
|
+
* @optional true
|
|
79
92
|
*/
|
|
80
93
|
lineMesh?: T | undefined;
|
|
81
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* A list of lines and how to draw them: their width, colors and opacity, and whether the drawn
|
|
97
|
+
* mesh will be updated later.
|
|
98
|
+
*/
|
|
82
99
|
class DrawLinesDto<T> {
|
|
83
100
|
/**
|
|
84
101
|
* Provide options without default values
|
|
85
102
|
*/
|
|
86
103
|
constructor(lines?: LinePointsDto[], opacity?: number, colours?: string | string[], size?: number, updatable?: boolean, linesMesh?: T);
|
|
87
104
|
/**
|
|
88
|
-
*
|
|
105
|
+
* The lines to draw, each with its start and end.
|
|
89
106
|
* @default undefined
|
|
90
107
|
*/
|
|
91
108
|
lines: LinePointsDto[];
|
|
92
109
|
/**
|
|
93
|
-
*
|
|
110
|
+
* How opaque the lines are, from 0 (invisible) to 1 (solid).
|
|
94
111
|
* @default 1
|
|
95
112
|
* @minimum 0
|
|
96
113
|
* @maximum 1
|
|
@@ -98,12 +115,12 @@ export declare namespace Line {
|
|
|
98
115
|
*/
|
|
99
116
|
opacity?: number | undefined;
|
|
100
117
|
/**
|
|
101
|
-
*
|
|
118
|
+
* One hex color text for all lines, or one text per line.
|
|
102
119
|
* @default #444444
|
|
103
120
|
*/
|
|
104
121
|
colours?: string | string[] | undefined;
|
|
105
122
|
/**
|
|
106
|
-
* Width of the
|
|
123
|
+
* Width of the drawn lines.
|
|
107
124
|
* @default 3
|
|
108
125
|
* @minimum 0
|
|
109
126
|
* @maximum Infinity
|
|
@@ -111,75 +128,99 @@ export declare namespace Line {
|
|
|
111
128
|
*/
|
|
112
129
|
size?: number | undefined;
|
|
113
130
|
/**
|
|
114
|
-
*
|
|
131
|
+
* When true, the drawn mesh is built so the ends can be moved later without redrawing.
|
|
115
132
|
* @default false
|
|
116
133
|
*/
|
|
117
134
|
updatable?: boolean | undefined;
|
|
118
135
|
/**
|
|
119
|
-
*
|
|
136
|
+
* A mesh drawn earlier for these lines; when given it is updated in place instead of a new
|
|
137
|
+
* one being made.
|
|
120
138
|
* @default undefined
|
|
139
|
+
* @optional true
|
|
121
140
|
*/
|
|
122
141
|
linesMesh?: T | undefined;
|
|
123
142
|
}
|
|
143
|
+
/**
|
|
144
|
+
* Points in order for `line.linesBetweenPoints`, which joins each to the next.
|
|
145
|
+
*/
|
|
124
146
|
class PointsLinesDto {
|
|
125
147
|
constructor(points?: Base.Point3[]);
|
|
126
148
|
/**
|
|
127
|
-
*
|
|
149
|
+
* The points to join, in order along the chain.
|
|
128
150
|
* @default undefined
|
|
129
151
|
*/
|
|
130
152
|
points: Base.Point3[];
|
|
131
153
|
}
|
|
154
|
+
/**
|
|
155
|
+
* One line for the methods that read or convert it: `line.length`, `line.reverse`,
|
|
156
|
+
* `line.lineToSegment` and the others.
|
|
157
|
+
*/
|
|
132
158
|
class LineDto {
|
|
133
159
|
constructor(line?: LinePointsDto);
|
|
134
160
|
/**
|
|
135
|
-
*
|
|
161
|
+
* The line object with its start and end.
|
|
136
162
|
* @default undefined
|
|
137
163
|
*/
|
|
138
164
|
line: LinePointsDto;
|
|
139
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* One segment, a pair of points, for `line.segmentToLine`.
|
|
168
|
+
*/
|
|
140
169
|
class SegmentDto {
|
|
141
170
|
constructor(segment?: Base.Segment3);
|
|
142
171
|
/**
|
|
143
|
-
*
|
|
172
|
+
* The segment as `[start, end]`.
|
|
144
173
|
* @default undefined
|
|
145
174
|
*/
|
|
146
175
|
segment: Base.Segment3;
|
|
147
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Several segments, each a pair of points, for `line.segmentsToLines`.
|
|
179
|
+
*/
|
|
148
180
|
class SegmentsDto {
|
|
149
181
|
constructor(segments?: Base.Segment3[]);
|
|
150
182
|
/**
|
|
151
|
-
*
|
|
183
|
+
* The segments, each `[start, end]`.
|
|
152
184
|
* @default undefined
|
|
153
185
|
*/
|
|
154
186
|
segments: Base.Segment3[];
|
|
155
187
|
}
|
|
188
|
+
/**
|
|
189
|
+
* Several line objects for `line.linesToSegments`, which converts each to its pair-of-points
|
|
190
|
+
* form.
|
|
191
|
+
*/
|
|
156
192
|
class LinesDto {
|
|
157
193
|
constructor(lines?: LinePointsDto[]);
|
|
158
194
|
/**
|
|
159
|
-
*
|
|
195
|
+
* The line objects to convert.
|
|
160
196
|
* @default undefined
|
|
161
197
|
*/
|
|
162
198
|
lines: LinePointsDto[];
|
|
163
199
|
}
|
|
200
|
+
/**
|
|
201
|
+
* Two lines and the rules for `line.lineLineIntersection`.
|
|
202
|
+
*/
|
|
164
203
|
class LineLineIntersectionDto {
|
|
165
204
|
constructor(line1?: LinePointsDto, line2?: LinePointsDto, tolerance?: number);
|
|
166
205
|
/**
|
|
167
|
-
*
|
|
206
|
+
* The first line.
|
|
168
207
|
* @default undefined
|
|
169
208
|
*/
|
|
170
209
|
line1: LinePointsDto;
|
|
171
210
|
/**
|
|
172
|
-
*
|
|
211
|
+
* The second line.
|
|
173
212
|
* @default undefined
|
|
174
213
|
*/
|
|
175
214
|
line2: LinePointsDto;
|
|
176
215
|
/**
|
|
177
|
-
*
|
|
216
|
+
* When true, the crossing must lie within both segments; when false the lines are extended
|
|
217
|
+
* without end.
|
|
178
218
|
* @default true
|
|
179
219
|
*/
|
|
180
220
|
checkSegmentsOnly?: boolean | undefined;
|
|
181
221
|
/**
|
|
182
|
-
*
|
|
222
|
+
* How close, in model units, two lines must come to count as meeting; also the distance
|
|
223
|
+
* below which a line counts as having no length.
|
|
183
224
|
* @default 0.01
|
|
184
225
|
* @minimum 0
|
|
185
226
|
* @maximum Infinity
|
|
@@ -187,15 +228,19 @@ export declare namespace Line {
|
|
|
187
228
|
*/
|
|
188
229
|
tolerance?: number | undefined;
|
|
189
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* A line and a fraction along it for `line.getPointOnLine`.
|
|
233
|
+
*/
|
|
190
234
|
class PointOnLineDto {
|
|
191
235
|
constructor(line?: LinePointsDto, param?: number);
|
|
192
236
|
/**
|
|
193
|
-
*
|
|
237
|
+
* The line to place the point on.
|
|
194
238
|
* @default undefined
|
|
195
239
|
*/
|
|
196
240
|
line: LinePointsDto;
|
|
197
241
|
/**
|
|
198
|
-
*
|
|
242
|
+
* How far along the line, from 0 at the start to 1 at the end; values outside that range
|
|
243
|
+
* continue past the ends.
|
|
199
244
|
* @default 0.5
|
|
200
245
|
* @minimum -Infinity
|
|
201
246
|
* @maximum Infinity
|
|
@@ -203,41 +248,51 @@ export declare namespace Line {
|
|
|
203
248
|
*/
|
|
204
249
|
param?: number | undefined;
|
|
205
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* A line and the transformation `line.transformLine` applies to both its ends.
|
|
253
|
+
*/
|
|
206
254
|
class TransformLineDto {
|
|
207
255
|
constructor(line?: LinePointsDto, transformation?: Base.TransformMatrixes);
|
|
208
256
|
/**
|
|
209
|
-
*
|
|
257
|
+
* The line to transform; a new line is returned.
|
|
210
258
|
* @default undefined
|
|
211
259
|
*/
|
|
212
260
|
line: LinePointsDto;
|
|
213
261
|
/**
|
|
214
|
-
*
|
|
262
|
+
* A transformation matrix, or a list of them applied in order.
|
|
215
263
|
* @default undefined
|
|
216
264
|
*/
|
|
217
265
|
transformation: Base.TransformMatrixes;
|
|
218
266
|
}
|
|
267
|
+
/**
|
|
268
|
+
* Lines and one transformation per line for `line.transformsForLines`.
|
|
269
|
+
*/
|
|
219
270
|
class TransformsLinesDto {
|
|
220
271
|
constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes[]);
|
|
221
272
|
/**
|
|
222
|
-
*
|
|
273
|
+
* The lines to transform, as many as there are transformations.
|
|
223
274
|
* @default undefined
|
|
224
275
|
*/
|
|
225
276
|
lines: LinePointsDto[];
|
|
226
277
|
/**
|
|
227
|
-
*
|
|
278
|
+
* One transformation per line, in the same order; each may be a matrix or a list of
|
|
279
|
+
* matrices applied in order.
|
|
228
280
|
* @default undefined
|
|
229
281
|
*/
|
|
230
282
|
transformation: Base.TransformMatrixes[];
|
|
231
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Lines and the one transformation applied to all of them.
|
|
286
|
+
*/
|
|
232
287
|
class TransformLinesDto {
|
|
233
288
|
constructor(lines?: LinePointsDto[], transformation?: Base.TransformMatrixes);
|
|
234
289
|
/**
|
|
235
|
-
*
|
|
290
|
+
* The lines to transform; the result keeps their order.
|
|
236
291
|
* @default undefined
|
|
237
292
|
*/
|
|
238
293
|
lines: LinePointsDto[];
|
|
239
294
|
/**
|
|
240
|
-
*
|
|
295
|
+
* A transformation matrix, or a list of them applied in order, used for every line.
|
|
241
296
|
* @default undefined
|
|
242
297
|
*/
|
|
243
298
|
transformation: Base.TransformMatrixes;
|