@procore/bim-webviewer-sdk 13.0.0 → 13.0.1-BIM-2909.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.
|
@@ -0,0 +1,993 @@
|
|
|
1
|
+
declare module "validateOptions/index" {
|
|
2
|
+
export { validateOptions } from './validateOptions';
|
|
3
|
+
}
|
|
4
|
+
declare module "unit_util" {
|
|
5
|
+
export const DISPLAY_UNIT_ABBREVIATIONS: {
|
|
6
|
+
readonly Meters: "m";
|
|
7
|
+
readonly Millimeters: "mm";
|
|
8
|
+
readonly FeetInches: "ftin";
|
|
9
|
+
};
|
|
10
|
+
export const UnitUtil: {
|
|
11
|
+
DisplayUnit: {
|
|
12
|
+
readonly METERS: 0;
|
|
13
|
+
readonly MILLIMETERS: 1;
|
|
14
|
+
readonly FEETINCHES: 2;
|
|
15
|
+
};
|
|
16
|
+
Units: {
|
|
17
|
+
readonly Meters: 0;
|
|
18
|
+
readonly Centimeters: 1;
|
|
19
|
+
readonly Millimeters: 2;
|
|
20
|
+
readonly Feet: 3;
|
|
21
|
+
readonly Inches: 4;
|
|
22
|
+
readonly Yards: 5;
|
|
23
|
+
readonly Kilometers: 6;
|
|
24
|
+
readonly Miles: 7;
|
|
25
|
+
readonly Micrometers: 8;
|
|
26
|
+
readonly Mils: 9;
|
|
27
|
+
readonly Microinches: 10;
|
|
28
|
+
};
|
|
29
|
+
ScaleFactors: readonly [readonly [1, 100, 1000, 3.28084, 39.37008, 1.0936133333333, 0.0010000000319999695, 0.0006213712121211932, 1000000.0319999696, 39370.08, 2.54e-8], readonly [0.01, 1, 10, 0.0328084, 0.393701, 0.0109361, 0.00001, 0.0000062137119224, 10000, 393.701, 393700.7874], readonly [0.001, 0.1, 1, 0.00328084, 0.0393701, 0.00109361, 0.000001, 6.2137e-7, 1000, 39.3701, 39370.1], readonly [0.3048, 30.48, 304.8, 1, 12, 0.333333, 0.0003048, 0.000189394, 304800, 12000, 12000000], readonly [0.0254, 2.54, 25.4, 0.0833333, 1, 0.0277778, 0.0000254, 0.0000157828283, 25400, 1000, 1000000], readonly [0.9144, 91.44, 914.4, 3, 36, 1, 0.0009144, 0.000568182, 914400, 36000, 36000000], readonly [1000, 100000, 1000000, 3280.84, 39370.1, 1093.61, 1, 0.621371, 1000000000, 0.621371, 39370078740.157], readonly [1609.34, 160934, 1609344, 5280, 63360, 1760, 1.60934, 1, 1609344000, 63360000, 63360000000], readonly [0.000001, 0.0001, 0.001, 0.00000328084, 0.000039370079, 0.000001093613, 1e-9, 6.214e-10, 1, 0.0393701, 39.37007874], readonly [0.0000254, 0.00254, 0.0254, 0.0000833333, 0.001, 0.0000277778, 2.54e-8, 1.57e-8, 25.4, 1, 1000], readonly [2.54e-8, 0.00000254, 0.0000254, 8.33e-8, 0.000001, 2.77e-8, 2.54e-11, 1.57e-11, 0.03, 0.001, 1]];
|
|
30
|
+
unitFromAbbreviation: (abbv: string) => number;
|
|
31
|
+
abbreviationFromDisplayUnit: (displayUnit: number) => string;
|
|
32
|
+
unitConvert: (value: number, targetUnit: number, sourceUnit: number, pow: number) => number;
|
|
33
|
+
vulgarFraction: (frac: number) => string;
|
|
34
|
+
formatAs: (value: number, displayUnit: string) => string | {
|
|
35
|
+
entire: string;
|
|
36
|
+
whole: string;
|
|
37
|
+
fraction: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
declare module "controllers/SettingsController" {
|
|
42
|
+
type ProjectSettings = {
|
|
43
|
+
displayUnits: string;
|
|
44
|
+
};
|
|
45
|
+
export class SettingsController {
|
|
46
|
+
private projectId;
|
|
47
|
+
private projectSettings;
|
|
48
|
+
private db?;
|
|
49
|
+
constructor(params: {
|
|
50
|
+
projectId: number;
|
|
51
|
+
});
|
|
52
|
+
private onDatabaseOpened;
|
|
53
|
+
private loadSettings;
|
|
54
|
+
private updateProjectSettings;
|
|
55
|
+
private needsUpdating;
|
|
56
|
+
SetValue(key: string, value: number): void;
|
|
57
|
+
getSettings(): ProjectSettings;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
declare module "api/types/Project" {
|
|
61
|
+
export type Project = {
|
|
62
|
+
id: number;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
declare module "api/types/FileExtraction" {
|
|
66
|
+
export type GeometryFile = {
|
|
67
|
+
url: string;
|
|
68
|
+
};
|
|
69
|
+
export type WebFormatExtractionItem = {
|
|
70
|
+
item_type: 'WebFormat';
|
|
71
|
+
artifact: {
|
|
72
|
+
web_format: {
|
|
73
|
+
node_file: GeometryFile;
|
|
74
|
+
mesh_node_file: GeometryFile;
|
|
75
|
+
mesh_file: GeometryFile;
|
|
76
|
+
manifest_file?: GeometryFile;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
export type PropertiesFile = {
|
|
81
|
+
id: number;
|
|
82
|
+
url: string;
|
|
83
|
+
};
|
|
84
|
+
export type PropertiesExtractionItem = {
|
|
85
|
+
item_type: 'Properties';
|
|
86
|
+
artifact: {
|
|
87
|
+
properties: PropertiesFile;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export type FileExtractionItem = WebFormatExtractionItem | PropertiesExtractionItem;
|
|
91
|
+
export type FileExtractionItemType = PropertiesExtractionItem['item_type'] | WebFormatExtractionItem['item_type'];
|
|
92
|
+
export type FileVersion = {
|
|
93
|
+
id: number;
|
|
94
|
+
file_id: number;
|
|
95
|
+
};
|
|
96
|
+
export type BimFileUpload = {
|
|
97
|
+
id: number;
|
|
98
|
+
file_version: FileVersion;
|
|
99
|
+
};
|
|
100
|
+
export type FileExtraction = {
|
|
101
|
+
id: number;
|
|
102
|
+
extraction_items: FileExtractionItem[];
|
|
103
|
+
bim_file_upload: BimFileUpload;
|
|
104
|
+
};
|
|
105
|
+
export type HolderType = 'FileVersion' | 'BimModelRevision';
|
|
106
|
+
}
|
|
107
|
+
declare module "api/types/Model" {
|
|
108
|
+
export type Viewpoint = {
|
|
109
|
+
camera_data: string;
|
|
110
|
+
sections_data: string;
|
|
111
|
+
redlines_data: string;
|
|
112
|
+
primary: boolean;
|
|
113
|
+
};
|
|
114
|
+
export type Model = {
|
|
115
|
+
id: number;
|
|
116
|
+
};
|
|
117
|
+
export type ModelRevision = {
|
|
118
|
+
id: number;
|
|
119
|
+
revision: number;
|
|
120
|
+
viewpoints: Viewpoint[];
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
declare module "types/Math" {
|
|
124
|
+
export type Vector2 = {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
};
|
|
128
|
+
export type Vector3 = {
|
|
129
|
+
x: number;
|
|
130
|
+
y: number;
|
|
131
|
+
z: number;
|
|
132
|
+
};
|
|
133
|
+
export type Vector4 = {
|
|
134
|
+
x: number;
|
|
135
|
+
y: number;
|
|
136
|
+
z: number;
|
|
137
|
+
w: number;
|
|
138
|
+
};
|
|
139
|
+
export type BoundingBox = {
|
|
140
|
+
max: Vector3;
|
|
141
|
+
min: Vector3;
|
|
142
|
+
};
|
|
143
|
+
export type Pose = {
|
|
144
|
+
position: Vector3;
|
|
145
|
+
lookAt: Vector3;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
declare module "types/WebviewerOptions" {
|
|
149
|
+
import { Project } from "api/types/Project";
|
|
150
|
+
import { FileExtraction, GeometryFile } from "api/types/FileExtraction";
|
|
151
|
+
import { Model, ModelRevision } from "api/types/Model";
|
|
152
|
+
import { Vector3 } from "types/Math";
|
|
153
|
+
export type Tool = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
|
|
154
|
+
type SelectionTypes = 'FirstObject' | 'Geometry';
|
|
155
|
+
type FeatureFlags = Partial<{
|
|
156
|
+
enableObjectTreeSearch: boolean;
|
|
157
|
+
}>;
|
|
158
|
+
type CommonOptions = {
|
|
159
|
+
/**
|
|
160
|
+
* Always required
|
|
161
|
+
*/
|
|
162
|
+
projectId: Project['id'];
|
|
163
|
+
parentElement: HTMLElement;
|
|
164
|
+
companyId: number;
|
|
165
|
+
/**
|
|
166
|
+
* Sometimes required
|
|
167
|
+
*/
|
|
168
|
+
/**
|
|
169
|
+
* Always optional
|
|
170
|
+
*/
|
|
171
|
+
tools?: Tool[];
|
|
172
|
+
bcfCamera?: any;
|
|
173
|
+
min_boundary?: Vector3;
|
|
174
|
+
max_boundary?: Vector3;
|
|
175
|
+
rotation?: Vector3;
|
|
176
|
+
plans?: any[];
|
|
177
|
+
levels?: any[];
|
|
178
|
+
locale?: string;
|
|
179
|
+
baseUrl?: string;
|
|
180
|
+
accessToken?: string;
|
|
181
|
+
debug?: boolean;
|
|
182
|
+
multiselect?: boolean;
|
|
183
|
+
selection?: SelectionTypes;
|
|
184
|
+
enableWebWorker?: boolean;
|
|
185
|
+
featureFlags?: FeatureFlags;
|
|
186
|
+
logInitializationTimes?: boolean;
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* API Configurations
|
|
190
|
+
*
|
|
191
|
+
* The Web Viewer can be configured to fetch resources (basically PWF files and
|
|
192
|
+
* properties) in a variety of ways. These types attempt to accurately declare
|
|
193
|
+
* the valid configurations that we support.
|
|
194
|
+
*/
|
|
195
|
+
export type GeometryBundle = {
|
|
196
|
+
nodeUrl: GeometryFile['url'];
|
|
197
|
+
meshnodeUrl: GeometryFile['url'];
|
|
198
|
+
meshUrl?: GeometryFile['url'];
|
|
199
|
+
manifestUrl?: GeometryFile['url'];
|
|
200
|
+
};
|
|
201
|
+
type PwfV2Bundle = {
|
|
202
|
+
nodeUrl: GeometryFile['url'];
|
|
203
|
+
meshnodeUrl: GeometryFile['url'];
|
|
204
|
+
meshUrl: GeometryFile['url'];
|
|
205
|
+
manifestUrl: GeometryFile['url'];
|
|
206
|
+
};
|
|
207
|
+
type PwfV1Bundle = {
|
|
208
|
+
nodeUrl: GeometryFile['url'];
|
|
209
|
+
meshnodeUrl: GeometryFile['url'];
|
|
210
|
+
meshUrl: GeometryFile['url'];
|
|
211
|
+
};
|
|
212
|
+
export type FileExtractionModePwfV1OverrideOptions = CommonOptions & PwfV1Bundle & {
|
|
213
|
+
fileExtractionId: FileExtraction['id'];
|
|
214
|
+
};
|
|
215
|
+
export type FileExtractionModePwfV2OverrideOptions = CommonOptions & PwfV2Bundle & {
|
|
216
|
+
fileExtractionId: FileExtraction['id'];
|
|
217
|
+
};
|
|
218
|
+
export type FileExtractionModeOptions = CommonOptions & {
|
|
219
|
+
fileExtractionId: FileExtraction['id'];
|
|
220
|
+
};
|
|
221
|
+
export type ModelRevisionModePwfV1Options = CommonOptions & PwfV1Bundle & {
|
|
222
|
+
modelId: Model['id'];
|
|
223
|
+
modelRevisionId: ModelRevision['id'];
|
|
224
|
+
};
|
|
225
|
+
export type ModelRevisionModePwfV2Options = CommonOptions & PwfV2Bundle & {
|
|
226
|
+
modelId: Model['id'];
|
|
227
|
+
modelRevisionId: ModelRevision['id'];
|
|
228
|
+
};
|
|
229
|
+
export type Options = FileExtractionModePwfV2OverrideOptions | FileExtractionModePwfV1OverrideOptions | FileExtractionModeOptions | ModelRevisionModePwfV2Options | ModelRevisionModePwfV1Options;
|
|
230
|
+
export const isModelRevisionModePwfV1Options: (options: Options) => options is ModelRevisionModePwfV1Options;
|
|
231
|
+
export const isModelRevisionModePwfV2Options: (options: Options) => options is ModelRevisionModePwfV2Options;
|
|
232
|
+
export const isFileExtractionModePwfV1OverrideOptions: (options: Options) => options is FileExtractionModePwfV1OverrideOptions;
|
|
233
|
+
export const isFileExtractionModePwfV2OverrideOptions: (options: Options) => options is FileExtractionModePwfV2OverrideOptions;
|
|
234
|
+
export const isFileExtractionModeOptions: (options: Options) => options is FileExtractionModeOptions;
|
|
235
|
+
}
|
|
236
|
+
declare module "api/Constants" {
|
|
237
|
+
export const CACHE_STORAGE = "procore-model-runtime-v1.2";
|
|
238
|
+
export const PWF_CACHE_CHUNK_SIZE: number;
|
|
239
|
+
export const restVersion = "rest/v1.0";
|
|
240
|
+
}
|
|
241
|
+
declare module "api/cacheHandler" {
|
|
242
|
+
export const cacheHandler: import("@procore/core-http/dist/middlewares/middleware").Middleware<Response, Response>;
|
|
243
|
+
}
|
|
244
|
+
declare module "api/HttpClient" {
|
|
245
|
+
import { HttpClient } from '@procore/core-http';
|
|
246
|
+
import { Options } from "types/WebviewerOptions";
|
|
247
|
+
export const DEFAULT_HEADERS: {
|
|
248
|
+
'Content-Type': string;
|
|
249
|
+
};
|
|
250
|
+
export function getBaseUrl(options: Options): string;
|
|
251
|
+
export function setHeaders(options: Options): void;
|
|
252
|
+
export function getHeaders(): Record<string, string>;
|
|
253
|
+
export let client: HttpClient;
|
|
254
|
+
export let cachedClient: HttpClient;
|
|
255
|
+
export function initHttpClient(options: Options): void;
|
|
256
|
+
}
|
|
257
|
+
declare module "api/types/Company" {
|
|
258
|
+
export type Company = {
|
|
259
|
+
id: number;
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
declare module "api/bim_file_extractions" {
|
|
263
|
+
import { FileExtraction, PropertiesFile, HolderType } from "api/types/FileExtraction";
|
|
264
|
+
import { Project } from "api/types/Project";
|
|
265
|
+
type GetBimFileExtractionParams = {
|
|
266
|
+
projectId: Project['id'];
|
|
267
|
+
fileExtractionId: FileExtraction['id'];
|
|
268
|
+
};
|
|
269
|
+
export const GetBimFileExtraction: ({ projectId, fileExtractionId, }: GetBimFileExtractionParams) => Promise<Response>;
|
|
270
|
+
type GetBimObjectsForParams = {
|
|
271
|
+
projectId: Project['id'];
|
|
272
|
+
propertyFileId: PropertiesFile['id'];
|
|
273
|
+
holderType: HolderType;
|
|
274
|
+
ids: number[];
|
|
275
|
+
};
|
|
276
|
+
export const GetBimObjectsFor: ({ projectId, propertyFileId, ids, holderType, }: GetBimObjectsForParams) => Promise<Response>;
|
|
277
|
+
type GetSimilarBimObjectsParams = {
|
|
278
|
+
name: string;
|
|
279
|
+
projectId: Project['id'];
|
|
280
|
+
propertyFileId: PropertiesFile['id'];
|
|
281
|
+
holderType: HolderType;
|
|
282
|
+
};
|
|
283
|
+
export const GetSimilarBimObjects: ({ name, projectId, propertyFileId, holderType, }: GetSimilarBimObjectsParams) => Promise<Response>;
|
|
284
|
+
type BimPropertyServiceCheckParams = {
|
|
285
|
+
projectId: Project['id'];
|
|
286
|
+
propertyFileId: PropertiesFile['id'];
|
|
287
|
+
holderType: HolderType;
|
|
288
|
+
};
|
|
289
|
+
export const BimPropertyServiceCheck: ({ projectId, propertyFileId, holderType, }: BimPropertyServiceCheckParams) => Promise<Response>;
|
|
290
|
+
type GetBimPropertiesParams = {
|
|
291
|
+
projectId: Project['id'];
|
|
292
|
+
propertyFileId: PropertiesFile['id'];
|
|
293
|
+
holderType: HolderType;
|
|
294
|
+
objectIds: Array<number>;
|
|
295
|
+
curatedList?: boolean;
|
|
296
|
+
};
|
|
297
|
+
export const GetBimProperties: (params: GetBimPropertiesParams) => Promise<Response>;
|
|
298
|
+
}
|
|
299
|
+
declare module "types/BcfCamera" {
|
|
300
|
+
export type BcfCameraOrthogonal = {
|
|
301
|
+
camera_view_point: {
|
|
302
|
+
x: number;
|
|
303
|
+
y: number;
|
|
304
|
+
z: number;
|
|
305
|
+
};
|
|
306
|
+
camera_direction: {
|
|
307
|
+
x: number;
|
|
308
|
+
y: number;
|
|
309
|
+
z: number;
|
|
310
|
+
};
|
|
311
|
+
camera_up_vector: {
|
|
312
|
+
x: number;
|
|
313
|
+
y: number;
|
|
314
|
+
z: number;
|
|
315
|
+
};
|
|
316
|
+
target_distance: number;
|
|
317
|
+
unit: string;
|
|
318
|
+
vertical_extent: number;
|
|
319
|
+
};
|
|
320
|
+
export type BcfCameraPerspective = {
|
|
321
|
+
camera_view_point: {
|
|
322
|
+
x: number;
|
|
323
|
+
y: number;
|
|
324
|
+
z: number;
|
|
325
|
+
};
|
|
326
|
+
camera_direction: {
|
|
327
|
+
x: number;
|
|
328
|
+
y: number;
|
|
329
|
+
z: number;
|
|
330
|
+
};
|
|
331
|
+
camera_up_vector: {
|
|
332
|
+
x: number;
|
|
333
|
+
y: number;
|
|
334
|
+
z: number;
|
|
335
|
+
};
|
|
336
|
+
target_distance: number;
|
|
337
|
+
unit: string;
|
|
338
|
+
field_of_view: number;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
declare module "viewpoint/types" {
|
|
342
|
+
import { BcfCameraOrthogonal, BcfCameraPerspective } from "types/BcfCamera";
|
|
343
|
+
export type CameraData = {
|
|
344
|
+
perspective_camera?: BcfCameraPerspective;
|
|
345
|
+
orthogonal_camera?: BcfCameraOrthogonal;
|
|
346
|
+
};
|
|
347
|
+
export type AutodeskCommonCamera = {
|
|
348
|
+
Type: string;
|
|
349
|
+
Version: number;
|
|
350
|
+
UnitsToMetersScaleFactor: number;
|
|
351
|
+
WorldUpDirection: [number, number, number];
|
|
352
|
+
WorldFrontDirection: [number, number, number];
|
|
353
|
+
WorldRightDirection: [number, number, number];
|
|
354
|
+
Position: [number, number, number];
|
|
355
|
+
ViewDirection: [number, number, number];
|
|
356
|
+
UpDirection: [number, number, number];
|
|
357
|
+
Projection: string;
|
|
358
|
+
VerticalExtent: number;
|
|
359
|
+
HorizontalExtent: number;
|
|
360
|
+
TargetDistance: number;
|
|
361
|
+
NearDistance: number;
|
|
362
|
+
NearDistanceType: string;
|
|
363
|
+
FarDistance: number;
|
|
364
|
+
FarDistanceType: string;
|
|
365
|
+
UpOffset: number;
|
|
366
|
+
RightOffset: number;
|
|
367
|
+
ImageFit: string;
|
|
368
|
+
HorizontalScale: number;
|
|
369
|
+
ApertureDiameter: number;
|
|
370
|
+
ShutterSpeed: number;
|
|
371
|
+
};
|
|
372
|
+
export type Point = {
|
|
373
|
+
x: number;
|
|
374
|
+
y: number;
|
|
375
|
+
z: number;
|
|
376
|
+
};
|
|
377
|
+
export type Ellipse = {
|
|
378
|
+
min_point: Point;
|
|
379
|
+
max_point: Point;
|
|
380
|
+
color: {
|
|
381
|
+
r: number;
|
|
382
|
+
g: number;
|
|
383
|
+
b: number;
|
|
384
|
+
a: number;
|
|
385
|
+
};
|
|
386
|
+
thickness: number;
|
|
387
|
+
};
|
|
388
|
+
export type Line = {
|
|
389
|
+
start_point: Point;
|
|
390
|
+
end_point: Point;
|
|
391
|
+
color: {
|
|
392
|
+
r: number;
|
|
393
|
+
g: number;
|
|
394
|
+
b: number;
|
|
395
|
+
a: number;
|
|
396
|
+
};
|
|
397
|
+
thickness: number;
|
|
398
|
+
};
|
|
399
|
+
export type Arrow = {
|
|
400
|
+
start_point: Point;
|
|
401
|
+
end_point: Point;
|
|
402
|
+
color: {
|
|
403
|
+
r: number;
|
|
404
|
+
g: number;
|
|
405
|
+
b: number;
|
|
406
|
+
a: number;
|
|
407
|
+
};
|
|
408
|
+
thickness: number;
|
|
409
|
+
};
|
|
410
|
+
export type Text = {
|
|
411
|
+
origin: Point;
|
|
412
|
+
text: string;
|
|
413
|
+
color: {
|
|
414
|
+
r: number;
|
|
415
|
+
g: number;
|
|
416
|
+
b: number;
|
|
417
|
+
a: number;
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
export type RedlinesData = {
|
|
421
|
+
ellipses: Ellipse[];
|
|
422
|
+
lines: Line[];
|
|
423
|
+
arrows: Arrow[];
|
|
424
|
+
texts: Text[];
|
|
425
|
+
};
|
|
426
|
+
export type RedlineEllipse = {
|
|
427
|
+
Type: 'RedlineEllipse';
|
|
428
|
+
MinPoint: [number, number];
|
|
429
|
+
MaxPoint: [number, number];
|
|
430
|
+
Color: [number, number, number];
|
|
431
|
+
Thickness: number;
|
|
432
|
+
};
|
|
433
|
+
export type RedlineLine = {
|
|
434
|
+
Type: 'RedlineLine';
|
|
435
|
+
Start: [number, number];
|
|
436
|
+
End: [number, number];
|
|
437
|
+
Color: [number, number, number];
|
|
438
|
+
Thickness: number;
|
|
439
|
+
};
|
|
440
|
+
export type RedlineArrow = {
|
|
441
|
+
Type: 'RedlineArrow';
|
|
442
|
+
Start: [number, number];
|
|
443
|
+
End: [number, number];
|
|
444
|
+
Color: [number, number, number];
|
|
445
|
+
Thickness: number;
|
|
446
|
+
};
|
|
447
|
+
export type RedlineText = {
|
|
448
|
+
Type: 'RedlineText';
|
|
449
|
+
Origin: [number, number];
|
|
450
|
+
Text: string;
|
|
451
|
+
Color: [number, number, number];
|
|
452
|
+
};
|
|
453
|
+
export type AutodeskRedlineCollection = {
|
|
454
|
+
Values: (RedlineEllipse | RedlineLine | RedlineArrow | RedlineText)[];
|
|
455
|
+
};
|
|
456
|
+
export type InternalViewpoint = {
|
|
457
|
+
camera_data: CameraData;
|
|
458
|
+
sections_data: Record<string, unknown> | Array<Record<string, unknown>> | null;
|
|
459
|
+
redlines_data: RedlinesData | null;
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
declare module "viewpoint/ViewpointFactory" {
|
|
463
|
+
import { InternalViewpoint, RedlinesData, AutodeskRedlineCollection, CameraData, AutodeskCommonCamera } from "viewpoint/types";
|
|
464
|
+
import { Viewpoint } from "api/types/Model";
|
|
465
|
+
export function calculateFieldOfViewFromVerticalExtent(verticalExtent: number, targetDistance: number): number;
|
|
466
|
+
export class ViewpointFactory {
|
|
467
|
+
static createViewpoint(viewpoint: Viewpoint): InternalViewpoint;
|
|
468
|
+
private static getCameraData;
|
|
469
|
+
private static getSectionsData;
|
|
470
|
+
private static getRedlinesData;
|
|
471
|
+
static convertFromAutodeskCommonCamera(autodeskCameraData: AutodeskCommonCamera): CameraData;
|
|
472
|
+
static convertFromAutodeskRedlineCollection(autodeskMarkup: AutodeskRedlineCollection): RedlinesData;
|
|
473
|
+
static getUnit(viewpoint: InternalViewpoint): string;
|
|
474
|
+
static getFov(viewpoint: InternalViewpoint): number;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
declare module "utils/ApiMetaData/ApiMetaData" {
|
|
478
|
+
import { PropertiesFile, FileVersion } from "api/types/FileExtraction";
|
|
479
|
+
import { ModelRevision } from "api/types/Model";
|
|
480
|
+
import * as FileExtractions from "api/bim_file_extractions";
|
|
481
|
+
import * as BimModelRevisions from '../../api/bim_model_revisions';
|
|
482
|
+
import { Options, GeometryBundle } from "types/WebviewerOptions";
|
|
483
|
+
import { InternalViewpoint } from "viewpoint/types";
|
|
484
|
+
type Api = {
|
|
485
|
+
getBimFileExtraction: typeof FileExtractions.GetBimFileExtraction;
|
|
486
|
+
getBimModelRevision: typeof BimModelRevisions.GetBimModelRevision;
|
|
487
|
+
};
|
|
488
|
+
type ApiOptions = Partial<Api>;
|
|
489
|
+
export const API_MODE: {
|
|
490
|
+
readonly FILE_EXTRACTION: "fileExtraction";
|
|
491
|
+
readonly MODEL_REVISION: "modelRevision";
|
|
492
|
+
};
|
|
493
|
+
export type ApiMode = (typeof API_MODE)[keyof typeof API_MODE];
|
|
494
|
+
export class ApiMetaData {
|
|
495
|
+
private store;
|
|
496
|
+
private api;
|
|
497
|
+
apiMode: ApiMode;
|
|
498
|
+
constructor(options: Options & ApiOptions);
|
|
499
|
+
private get fileExtractionBundle();
|
|
500
|
+
get fileVersion(): Promise<FileVersion>;
|
|
501
|
+
private geometryUrlsProvided;
|
|
502
|
+
private get geometryBundleInFileExtractionMode();
|
|
503
|
+
private get geometryBundleInModelRevisionMode();
|
|
504
|
+
get geometryBundle(): Promise<GeometryBundle>;
|
|
505
|
+
get propertyFileId(): Promise<PropertiesFile['id']>;
|
|
506
|
+
get modelRevisionId(): Promise<number>;
|
|
507
|
+
get modelId(): Promise<number>;
|
|
508
|
+
get projectId(): Promise<number>;
|
|
509
|
+
get companyId(): Promise<number>;
|
|
510
|
+
get fileExtractionId(): Promise<number>;
|
|
511
|
+
get modelRevision(): Promise<ModelRevision>;
|
|
512
|
+
get homeViewpoint(): Promise<InternalViewpoint | undefined>;
|
|
513
|
+
private get homeViewpointInModelRevisionMode();
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
declare module "utils/ApiMetaData/index" {
|
|
517
|
+
import { ApiMetaData as _ApiMetaData } from "utils/ApiMetaData/ApiMetaData";
|
|
518
|
+
import { Options } from "types/WebviewerOptions";
|
|
519
|
+
export { API_MODE } from "utils/ApiMetaData/ApiMetaData";
|
|
520
|
+
export type { ApiMode } from "utils/ApiMetaData/ApiMetaData";
|
|
521
|
+
export namespace ApiMetaData {
|
|
522
|
+
let store: _ApiMetaData;
|
|
523
|
+
const init: (initOptions: Options) => void;
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
declare module "controllers/CacheController" {
|
|
527
|
+
import { GeometryBundle, Options } from "types/WebviewerOptions";
|
|
528
|
+
export namespace Cache {
|
|
529
|
+
const removeModel: (options: Options) => Promise<boolean>;
|
|
530
|
+
const hasModel: (geometryBundle: GeometryBundle) => Promise<boolean>;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
declare module "controllers/ApiController/index" {
|
|
534
|
+
export { ApiController, api } from './ApiController';
|
|
535
|
+
}
|
|
536
|
+
declare module "components/Markup/SvgRenderer" {
|
|
537
|
+
import type { Vector2, Vector3 } from "types/Math";
|
|
538
|
+
import type { RenderControllerProxy } from '../../controllers/RenderControllerProxy';
|
|
539
|
+
type RGB = `rgb(${number}, ${number}, ${number})`;
|
|
540
|
+
type RGBA = `rgba(${number}, ${number}, ${number}, ${number})`;
|
|
541
|
+
type HEX = `#${string}`;
|
|
542
|
+
export type CssColor = RGB | RGBA | HEX | string;
|
|
543
|
+
export type CssFont = string;
|
|
544
|
+
type Anchorable = {
|
|
545
|
+
anchor: Vector3;
|
|
546
|
+
anchorOffset?: Vector2;
|
|
547
|
+
};
|
|
548
|
+
type AnchorableLine = {
|
|
549
|
+
anchorStart: Vector3;
|
|
550
|
+
anchorEnd: Vector3;
|
|
551
|
+
};
|
|
552
|
+
export type RadiusEllipse = {
|
|
553
|
+
center: Vector2;
|
|
554
|
+
radius: Vector2;
|
|
555
|
+
stroke: CssColor;
|
|
556
|
+
fill?: CssColor;
|
|
557
|
+
strokeWidth: number;
|
|
558
|
+
zIndex?: number;
|
|
559
|
+
};
|
|
560
|
+
export type BoxEllipse = {
|
|
561
|
+
min: Vector2;
|
|
562
|
+
max: Vector2;
|
|
563
|
+
stroke: CssColor;
|
|
564
|
+
fill?: CssColor;
|
|
565
|
+
strokeWidth: number;
|
|
566
|
+
zIndex?: number;
|
|
567
|
+
};
|
|
568
|
+
export type Line = {
|
|
569
|
+
start: Vector2;
|
|
570
|
+
end: Vector2;
|
|
571
|
+
stroke: CssColor;
|
|
572
|
+
strokeWidth: number;
|
|
573
|
+
zIndex?: number;
|
|
574
|
+
};
|
|
575
|
+
export type Arrow = {
|
|
576
|
+
start: Vector2;
|
|
577
|
+
end: Vector2;
|
|
578
|
+
stroke: CssColor;
|
|
579
|
+
strokeWidth: number;
|
|
580
|
+
zIndex?: number;
|
|
581
|
+
};
|
|
582
|
+
export type Text = {
|
|
583
|
+
origin: Vector2;
|
|
584
|
+
text: string;
|
|
585
|
+
font?: CssFont;
|
|
586
|
+
fill: CssColor;
|
|
587
|
+
zIndex?: number;
|
|
588
|
+
};
|
|
589
|
+
export type Rect = {
|
|
590
|
+
width: number;
|
|
591
|
+
height: number;
|
|
592
|
+
x: number;
|
|
593
|
+
y: number;
|
|
594
|
+
radius?: Vector2;
|
|
595
|
+
fill?: CssColor;
|
|
596
|
+
stroke?: CssColor;
|
|
597
|
+
strokeWidth?: number;
|
|
598
|
+
zIndex?: number;
|
|
599
|
+
};
|
|
600
|
+
export type SvgData = {
|
|
601
|
+
ellipses?: (BoxEllipse | RadiusEllipse)[];
|
|
602
|
+
lines?: Line[];
|
|
603
|
+
arrows?: Arrow[];
|
|
604
|
+
texts?: Text[];
|
|
605
|
+
rects?: Rect[];
|
|
606
|
+
};
|
|
607
|
+
type AnchoredBoxEllipse = BoxEllipse & Anchorable;
|
|
608
|
+
type AnchoredRadiusEllipse = Omit<RadiusEllipse, 'center'> & Anchorable;
|
|
609
|
+
type AnchoredLine = Omit<Line, 'start' | 'end'> & AnchorableLine;
|
|
610
|
+
type AnchoredArrow = Omit<Arrow, 'start' | 'end'> & AnchorableLine;
|
|
611
|
+
type AnchoredText = Omit<Text, 'origin'> & Anchorable;
|
|
612
|
+
type AnchoredRect = Omit<Rect, 'x' | 'y'> & Anchorable;
|
|
613
|
+
export type AnchoredSvgData = {
|
|
614
|
+
ellipses?: (AnchoredBoxEllipse | AnchoredRadiusEllipse)[];
|
|
615
|
+
lines?: AnchoredLine[];
|
|
616
|
+
arrows?: AnchoredArrow[];
|
|
617
|
+
texts?: AnchoredText[];
|
|
618
|
+
rects?: AnchoredRect[];
|
|
619
|
+
};
|
|
620
|
+
export class SvgRenderer {
|
|
621
|
+
private svgEl;
|
|
622
|
+
private dom;
|
|
623
|
+
private arrowId;
|
|
624
|
+
private camera;
|
|
625
|
+
private anchoredSvgData;
|
|
626
|
+
private _renderControllerProxy;
|
|
627
|
+
private _globalOffset;
|
|
628
|
+
constructor();
|
|
629
|
+
private static createSvgEl;
|
|
630
|
+
private onRenderReady;
|
|
631
|
+
private onResize;
|
|
632
|
+
private set globalOffset(value);
|
|
633
|
+
private get globalOffset();
|
|
634
|
+
set renderControllerProxy(renderControllerProxy: RenderControllerProxy);
|
|
635
|
+
get renderControllerProxy(): RenderControllerProxy;
|
|
636
|
+
private hasAnchoredElements;
|
|
637
|
+
private onCameraUpdated;
|
|
638
|
+
private computeFromAnchored;
|
|
639
|
+
private saveAnchoredSvgData;
|
|
640
|
+
private collateByZIndex;
|
|
641
|
+
draw(svgData: SvgData): void;
|
|
642
|
+
drawAnchored(anchoredSvgData: AnchoredSvgData): Promise<void>;
|
|
643
|
+
drawEllipse(ellipse: BoxEllipse | RadiusEllipse): void;
|
|
644
|
+
drawLine(line: Line): void;
|
|
645
|
+
drawArrow(arrow: Arrow): void;
|
|
646
|
+
drawText(text: Text): void;
|
|
647
|
+
drawRect(rect: Rect): void;
|
|
648
|
+
private _clear;
|
|
649
|
+
clear(): void;
|
|
650
|
+
hasContent(): boolean;
|
|
651
|
+
dispose(): void;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
declare module "components/Markup/Markup" {
|
|
655
|
+
import type { RedlinesData } from "viewpoint/types";
|
|
656
|
+
import { SvgRenderer } from "components/Markup/SvgRenderer";
|
|
657
|
+
export class Markup {
|
|
658
|
+
private _markupCanvasWidth?;
|
|
659
|
+
private _markupCanvasHeight?;
|
|
660
|
+
private _rangeY?;
|
|
661
|
+
private _rangeX?;
|
|
662
|
+
private markupData;
|
|
663
|
+
private fov;
|
|
664
|
+
private svgRenderer;
|
|
665
|
+
constructor(params: {
|
|
666
|
+
svgRenderer: SvgRenderer;
|
|
667
|
+
});
|
|
668
|
+
private onSectionsCleared;
|
|
669
|
+
private onFieldOfViewChanged;
|
|
670
|
+
private get markupCanvasWidth();
|
|
671
|
+
private set markupCanvasWidth(value);
|
|
672
|
+
private get markupCanvasHeight();
|
|
673
|
+
private set markupCanvasHeight(value);
|
|
674
|
+
private get rangeX();
|
|
675
|
+
private set rangeX(value);
|
|
676
|
+
private get rangeY();
|
|
677
|
+
private set rangeY(value);
|
|
678
|
+
private onResize;
|
|
679
|
+
private updateRanges;
|
|
680
|
+
private xExtentToPixel;
|
|
681
|
+
private yExtentToPixel;
|
|
682
|
+
private xPixelToExtent;
|
|
683
|
+
private yPixelToExtent;
|
|
684
|
+
private getRGB;
|
|
685
|
+
private convertColor;
|
|
686
|
+
Draw(markupData: RedlinesData, fov: number): void;
|
|
687
|
+
clearMarkup(): void;
|
|
688
|
+
markupDisplayed(): boolean;
|
|
689
|
+
dispose(): void;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
declare module "components/Markup/index" {
|
|
693
|
+
export { Markup } from "components/Markup/Markup";
|
|
694
|
+
}
|
|
695
|
+
declare module "utils/singletons" {
|
|
696
|
+
import { Markup } from "components/Markup/index";
|
|
697
|
+
import { SvgRenderer } from "components/Markup/SvgRenderer";
|
|
698
|
+
export let markup: Markup;
|
|
699
|
+
export let svgRenderer: SvgRenderer;
|
|
700
|
+
export function singletonSetup(): void;
|
|
701
|
+
}
|
|
702
|
+
declare module "components/ToolEnum" {
|
|
703
|
+
import { Tool } from "types/WebviewerOptions";
|
|
704
|
+
export const ToolEnum: {
|
|
705
|
+
[key: string]: Tool;
|
|
706
|
+
};
|
|
707
|
+
}
|
|
708
|
+
declare module "utils/DebugMode" {
|
|
709
|
+
export namespace DebugMode {
|
|
710
|
+
const set: (value: boolean) => void;
|
|
711
|
+
const isActive: () => boolean;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
declare module "utils/Keyhold/Keyhold" {
|
|
715
|
+
export class Keyhold {
|
|
716
|
+
keys: string[];
|
|
717
|
+
constructor();
|
|
718
|
+
processKeydown(key: string): void;
|
|
719
|
+
processKeyup(key: string): void;
|
|
720
|
+
includeSome(haystack: string[]): boolean;
|
|
721
|
+
includes(key: string): boolean;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
declare module "utils/Keyhold/KeyholdListener" {
|
|
725
|
+
import { Keyhold as _Keyhold } from "utils/Keyhold/Keyhold";
|
|
726
|
+
export namespace KeyholdListener {
|
|
727
|
+
let keys: _Keyhold;
|
|
728
|
+
const init: () => void;
|
|
729
|
+
const dispose: () => void;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
declare module "utils/Keyhold/index" {
|
|
733
|
+
export { Keyhold } from "utils/Keyhold/Keyhold";
|
|
734
|
+
export { KeyholdListener } from "utils/Keyhold/KeyholdListener";
|
|
735
|
+
}
|
|
736
|
+
declare module "components/ToolStatus" {
|
|
737
|
+
import type { Options } from "types/WebviewerOptions";
|
|
738
|
+
type Status = 'on' | 'off' | 'disabled';
|
|
739
|
+
type ServiceDependentStatus = Status | 'serviceDown';
|
|
740
|
+
export class ToolStatus {
|
|
741
|
+
private _objectTreeTool;
|
|
742
|
+
private _propertiesTool;
|
|
743
|
+
init(): void;
|
|
744
|
+
get objectTreeTool(): ServiceDependentStatus;
|
|
745
|
+
set objectTreeTool(value: ServiceDependentStatus);
|
|
746
|
+
get propertiesTool(): ServiceDependentStatus;
|
|
747
|
+
set propertiesTool(value: ServiceDependentStatus);
|
|
748
|
+
onSelectTool: (selectToolPayload: {
|
|
749
|
+
origin: string;
|
|
750
|
+
tool: number;
|
|
751
|
+
}) => void;
|
|
752
|
+
setFromOptions: (options: Options) => void;
|
|
753
|
+
reset: () => void;
|
|
754
|
+
}
|
|
755
|
+
export const toolStatus: ToolStatus;
|
|
756
|
+
}
|
|
757
|
+
declare module "api/analytic_events/analyticKeys" {
|
|
758
|
+
export const model: {
|
|
759
|
+
readonly initialization: `${string}.initialization`;
|
|
760
|
+
};
|
|
761
|
+
export const bimToolbars: {
|
|
762
|
+
readonly home_tapped: `${string}.home_tapped`;
|
|
763
|
+
readonly settings_tapped: `${string}.settings_tapped`;
|
|
764
|
+
readonly views_tapped: `${string}.views_tapped`;
|
|
765
|
+
readonly objects_tapped: `${string}.objects_tapped`;
|
|
766
|
+
readonly properties_tapped: `${string}.properties_tapped`;
|
|
767
|
+
readonly measure_tapped: `${string}.measure_tapped`;
|
|
768
|
+
readonly section_box_tapped: `${string}.section_box_tapped`;
|
|
769
|
+
readonly xray_tapped: `${string}.xray_tapped`;
|
|
770
|
+
readonly navigation_default_tapped: `${string}.navigation_default_tapped`;
|
|
771
|
+
readonly navigation_orbit_tapped: `${string}.navigation_orbit_tapped`;
|
|
772
|
+
readonly navigation_fly_tapped: `${string}.navigation_fly_tapped`;
|
|
773
|
+
};
|
|
774
|
+
export const clientLoadings: {
|
|
775
|
+
readonly initialization: `${string}.initialization`;
|
|
776
|
+
readonly download_completed: `${string}.download_completed`;
|
|
777
|
+
};
|
|
778
|
+
export type BimModelsDownloadCompletedPayload = {
|
|
779
|
+
time_to_download: number;
|
|
780
|
+
};
|
|
781
|
+
export type ModelInitializationPayload = {
|
|
782
|
+
success: boolean;
|
|
783
|
+
start_timestamp: number;
|
|
784
|
+
end_timestamp: number;
|
|
785
|
+
total_time: number;
|
|
786
|
+
model_type: 'standard' | 'partitioned';
|
|
787
|
+
node_size: number;
|
|
788
|
+
meshnode_size: number;
|
|
789
|
+
num_nodes: number;
|
|
790
|
+
num_meshnodes: number;
|
|
791
|
+
mesh_size: number;
|
|
792
|
+
num_meshes: number;
|
|
793
|
+
partition_proxy_size: number;
|
|
794
|
+
web_viewer_version: string;
|
|
795
|
+
};
|
|
796
|
+
export const sectionBoxes: {
|
|
797
|
+
readonly enabled: `${string}.enabled`;
|
|
798
|
+
readonly disabled: `${string}.disabled`;
|
|
799
|
+
readonly optionbar_open: `${string}.optionbar_open`;
|
|
800
|
+
readonly optionbar_close: `${string}.optionbar_close`;
|
|
801
|
+
readonly display_planes: `${string}.display_planes`;
|
|
802
|
+
readonly reset: `${string}.reset`;
|
|
803
|
+
readonly zoom_extents: `${string}.zoom_extents`;
|
|
804
|
+
};
|
|
805
|
+
export const SECTION_BOX_ORIGIN: {
|
|
806
|
+
readonly OBJECT: "object";
|
|
807
|
+
readonly OBJECT_TREE: "object_tree";
|
|
808
|
+
readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
|
|
809
|
+
readonly SDK: "sdk";
|
|
810
|
+
readonly TOOLBAR: "toolbar";
|
|
811
|
+
readonly COACHMARK_SECTIONING: "coachmark_sectioning";
|
|
812
|
+
readonly VIEWS: "views";
|
|
813
|
+
};
|
|
814
|
+
export type SectionBoxOrigin = (typeof SECTION_BOX_ORIGIN)[keyof typeof SECTION_BOX_ORIGIN];
|
|
815
|
+
export type SectionBoxDisplayPlanesPayload = {
|
|
816
|
+
hidePlanes: boolean;
|
|
817
|
+
};
|
|
818
|
+
export const bimObjects: {
|
|
819
|
+
hide: string;
|
|
820
|
+
hide_similar: string;
|
|
821
|
+
select_similar: string;
|
|
822
|
+
isolate: string;
|
|
823
|
+
isolate_in_xray: string;
|
|
824
|
+
isolate_in_section_box: string;
|
|
825
|
+
show_properties: string;
|
|
826
|
+
zoom_to_selection: string;
|
|
827
|
+
};
|
|
828
|
+
export const BIM_OBJECT_ORIGIN: {
|
|
829
|
+
readonly OBJECT: "object";
|
|
830
|
+
readonly OBJECT_TREE: "object_tree";
|
|
831
|
+
readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
|
|
832
|
+
readonly SDK: "sdk";
|
|
833
|
+
};
|
|
834
|
+
export const bimProperties: {
|
|
835
|
+
searched: string;
|
|
836
|
+
search_cleared: string;
|
|
837
|
+
tab_changed: string;
|
|
838
|
+
};
|
|
839
|
+
export const modelObjectTrees: {
|
|
840
|
+
readonly hide_all: `${string}.hide_all`;
|
|
841
|
+
readonly select_all: `${string}.select_all`;
|
|
842
|
+
readonly collapse_all: `${string}.collapse_all`;
|
|
843
|
+
readonly searched: `${string}.searched`;
|
|
844
|
+
readonly search_cleared: `${string}.search_cleared`;
|
|
845
|
+
};
|
|
846
|
+
export const renderings: {
|
|
847
|
+
mode_changed: string;
|
|
848
|
+
};
|
|
849
|
+
export const RENDERING_MODE: {
|
|
850
|
+
readonly SHADED: "shaded";
|
|
851
|
+
readonly XRAY: "xray";
|
|
852
|
+
};
|
|
853
|
+
export const RENDERING_MODE_ORIGIN: {
|
|
854
|
+
readonly OBJECT: "object";
|
|
855
|
+
readonly OBJECT_TREE: "object_tree";
|
|
856
|
+
readonly OBJECT_TREE_ACTIONS: "object_tree_actions";
|
|
857
|
+
readonly SDK: "sdk";
|
|
858
|
+
readonly TOOLBAR: "toolbar";
|
|
859
|
+
readonly HOTKEY: "hotkey";
|
|
860
|
+
};
|
|
861
|
+
}
|
|
862
|
+
declare module "api/analytic_events/types/AnalyticEventPayload" {
|
|
863
|
+
export type AnalyticEventPayload = {
|
|
864
|
+
key: string;
|
|
865
|
+
properties?: Record<string, unknown>;
|
|
866
|
+
timestamp?: Date;
|
|
867
|
+
};
|
|
868
|
+
}
|
|
869
|
+
declare module "api/analytic_events/analyticEvents" {
|
|
870
|
+
import { AnalyticEventPayload } from "api/analytic_events/types/AnalyticEventPayload";
|
|
871
|
+
export const trackEvent: (event: AnalyticEventPayload) => Promise<Response>;
|
|
872
|
+
}
|
|
873
|
+
declare module "api/analytic_events/index" {
|
|
874
|
+
export { model, clientLoadings, bimToolbars, sectionBoxes, SECTION_BOX_ORIGIN, bimObjects, BIM_OBJECT_ORIGIN, renderings, RENDERING_MODE, RENDERING_MODE_ORIGIN, } from "api/analytic_events/analyticKeys";
|
|
875
|
+
export type { SectionBoxOrigin, SectionBoxDisplayPlanesPayload, } from "api/analytic_events/analyticKeys";
|
|
876
|
+
export { trackEvent } from "api/analytic_events/analyticEvents";
|
|
877
|
+
export type { AnalyticEventPayload } from "api/analytic_events/types/AnalyticEventPayload";
|
|
878
|
+
}
|
|
879
|
+
declare module "sectioning/utils" {
|
|
880
|
+
import { THREE } from '../threeShaking';
|
|
881
|
+
import { Vector3, BoundingBox } from "types/Math";
|
|
882
|
+
export const transformToThreePlane: (distance: number, normal: Vector3, rotation: Vector3 | null, center: THREE.Vector3 | undefined | null, offset: THREE.Vector3) => THREE.Plane;
|
|
883
|
+
export const validateBoundary: (min: Vector3 | null, max: Vector3 | null) => boolean;
|
|
884
|
+
export const boxToPlane: (min: Vector3, max: Vector3, rotation: Vector3 | null, offset: THREE.Vector3) => THREE.Plane[] | null;
|
|
885
|
+
export const planesToBoundingBox: (planes: THREE.Plane[]) => BoundingBox;
|
|
886
|
+
export const convertToFeet: (vector: Vector3, unit: string) => Vector3;
|
|
887
|
+
}
|
|
888
|
+
declare module "sectioning/SectionBoxDisplayManager" {
|
|
889
|
+
import type { RenderControllerProxy } from '../controllers/RenderControllerProxy';
|
|
890
|
+
import { SectionBoxOrigin } from "api/analytic_events/index";
|
|
891
|
+
import type { BoundingBox } from "types/Math";
|
|
892
|
+
type Configuration = {
|
|
893
|
+
dropdown?: boolean;
|
|
894
|
+
hidePlanes?: boolean;
|
|
895
|
+
overrideSectionBoxSetup?: boolean;
|
|
896
|
+
};
|
|
897
|
+
type SectionBoxDisplayStatus = {
|
|
898
|
+
enabled: boolean;
|
|
899
|
+
configuration: Required<Configuration>;
|
|
900
|
+
bbox: BoundingBox;
|
|
901
|
+
};
|
|
902
|
+
export type SectionBoxDisplayToggledPayload = {
|
|
903
|
+
value: boolean;
|
|
904
|
+
configuration: Required<Configuration>;
|
|
905
|
+
};
|
|
906
|
+
export type SectionBoxDisplayConfiguredPayload = {
|
|
907
|
+
previous: Required<Configuration>;
|
|
908
|
+
current: Required<Configuration>;
|
|
909
|
+
enabled: boolean;
|
|
910
|
+
};
|
|
911
|
+
export class SectionBoxDisplayManager {
|
|
912
|
+
private static isSectionBoxDisplayEnabled;
|
|
913
|
+
private configuration;
|
|
914
|
+
private renderControllerProxy;
|
|
915
|
+
constructor(params: {
|
|
916
|
+
renderController: RenderControllerProxy;
|
|
917
|
+
});
|
|
918
|
+
static isEnabled(): boolean;
|
|
919
|
+
static readonly DEFAULT_CONFIG: Readonly<Required<Configuration>>;
|
|
920
|
+
getConfiguration(): Configuration;
|
|
921
|
+
getSectionBoxDisplay(): Promise<SectionBoxDisplayStatus>;
|
|
922
|
+
configureSectionBoxDisplay(config?: Configuration): void;
|
|
923
|
+
setupSectionBox(enable: boolean): Promise<void>;
|
|
924
|
+
toggleSectionBoxDisplay(params: {
|
|
925
|
+
enable: boolean;
|
|
926
|
+
origin?: SectionBoxOrigin;
|
|
927
|
+
overrideSectionBoxSetup?: boolean;
|
|
928
|
+
}): Promise<void>;
|
|
929
|
+
}
|
|
930
|
+
}
|
|
931
|
+
declare module "utils/constants" {
|
|
932
|
+
export const EMPTY_SPACE_MESHNODE_INDEX = -1;
|
|
933
|
+
export const EMPTY_SPACE_OBJECT_ID = -1;
|
|
934
|
+
export const DEFAULT_FOV = 65;
|
|
935
|
+
export const NO_CURRENT_NODE = -1;
|
|
936
|
+
}
|
|
937
|
+
declare module "components/HomeViewpointManager/HomeViewpointManager" {
|
|
938
|
+
import type { RenderControllerProxy } from '../../controllers/RenderControllerProxy';
|
|
939
|
+
import type { SectionBoxDisplayManager } from "sectioning/SectionBoxDisplayManager";
|
|
940
|
+
export class HomeViewpointManager {
|
|
941
|
+
private renderController;
|
|
942
|
+
private sectionBoxDisplayManager;
|
|
943
|
+
constructor(params: {
|
|
944
|
+
renderController: RenderControllerProxy;
|
|
945
|
+
sectionBoxDisplayManager: SectionBoxDisplayManager;
|
|
946
|
+
});
|
|
947
|
+
activate: () => Promise<void>;
|
|
948
|
+
private activateHomeViewpoint;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
declare module "components/HomeViewpointManager/index" {
|
|
952
|
+
export { HomeViewpointManager } from "components/HomeViewpointManager/HomeViewpointManager";
|
|
953
|
+
}
|
|
954
|
+
declare module "WebViewer" {
|
|
955
|
+
import { Options } from "types/WebviewerOptions";
|
|
956
|
+
import { Vector3 } from "types/Math";
|
|
957
|
+
export class Webviewer {
|
|
958
|
+
static tools: {
|
|
959
|
+
[key: string]: import("types/WebviewerOptions").Tool;
|
|
960
|
+
};
|
|
961
|
+
static toolbar_enum: any;
|
|
962
|
+
static action: any;
|
|
963
|
+
/**
|
|
964
|
+
* Represents the camera in the WebViewer.
|
|
965
|
+
*/
|
|
966
|
+
camera: {
|
|
967
|
+
/**
|
|
968
|
+
* Retrieves the position of the camera.
|
|
969
|
+
* @returns A promise that resolves to a Vector3 object representing the camera position.
|
|
970
|
+
*/
|
|
971
|
+
getPosition: () => Promise<Vector3>;
|
|
972
|
+
/**
|
|
973
|
+
* Sets the position of the camera.
|
|
974
|
+
* @param x - The x-coordinate of the new camera position.
|
|
975
|
+
* @param y - The y-coordinate of the new camera position.
|
|
976
|
+
* @param z - The z-coordinate of the new camera position.
|
|
977
|
+
*/
|
|
978
|
+
setPosition: (x: number, y: number, z: number) => void;
|
|
979
|
+
};
|
|
980
|
+
constructor(options: Options);
|
|
981
|
+
/**
|
|
982
|
+
* Starts the application.
|
|
983
|
+
* This method initializes the necessary variables and subscribes to events.
|
|
984
|
+
* It also checks the BimPropertyService and handles different status codes.
|
|
985
|
+
* It listens for events related to markup display, dismissal, and camera updates.
|
|
986
|
+
*/
|
|
987
|
+
start: () => void;
|
|
988
|
+
/**
|
|
989
|
+
* Terminates the WebViewer instance and cleans up any resources.
|
|
990
|
+
*/
|
|
991
|
+
terminate: () => void;
|
|
992
|
+
}
|
|
993
|
+
}
|