@xtctwins/tctwins-bimx-viewer 0.1.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/README.md +0 -0
- package/dist/tctwins-bimx-viewer.min.es.js +847 -0
- package/dist/version.js +2 -0
- package/package.json +60 -0
- package/types/index.d.ts +6 -0
- package/types/src/BIMViewer.d.ts +668 -0
- package/types/src/BusyModal.d.ts +28 -0
- package/types/src/Controller.d.ts +142 -0
- package/types/src/EventTrigger.d.ts +23 -0
- package/types/src/IFCElementDescriptions/IFCElementDescriptions.d.ts +780 -0
- package/types/src/IFCObjectDefaults/ModelIFCObjectColors.d.ts +26 -0
- package/types/src/IFCObjectDefaults/ViewerIFCObjectColors.d.ts +161 -0
- package/types/src/TMap.d.ts +27 -0
- package/types/src/collision/ObjectsKdTree3.d.ts +37 -0
- package/types/src/contextMenus/CanvasContextMenu.d.ts +12 -0
- package/types/src/contextMenus/ModelsContextMenu.d.ts +13 -0
- package/types/src/contextMenus/ObjectContextMenu.d.ts +20 -0
- package/types/src/contextMenus/TreeViewContextMenu.d.ts +20 -0
- package/types/src/explorer/ClassesExplorer.d.ts +75 -0
- package/types/src/explorer/ModelsExplorer.d.ts +106 -0
- package/types/src/explorer/ObjectsExplorer.d.ts +44 -0
- package/types/src/explorer/StoreysExplorer.d.ts +58 -0
- package/types/src/inspector/PropertiesInspector.d.ts +39 -0
- package/types/src/messages.d.ts +373 -0
- package/types/src/server/OSSHelper.d.ts +4 -0
- package/types/src/server/Server.d.ts +129 -0
- package/types/src/toolbar/AnnotationTool.d.ts +71 -0
- package/types/src/toolbar/CommentsTool.d.ts +248 -0
- package/types/src/toolbar/FirstPersonMode.d.ts +55 -0
- package/types/src/toolbar/FitAction.d.ts +21 -0
- package/types/src/toolbar/HideTool.d.ts +13 -0
- package/types/src/toolbar/MarqueeSelectionTool.d.ts +28 -0
- package/types/src/toolbar/MeasureTool.d.ts +12 -0
- package/types/src/toolbar/MeasureTools/MeasureAngleTool.d.ts +115 -0
- package/types/src/toolbar/MeasureTools/MeasureDistanceTool.d.ts +123 -0
- package/types/src/toolbar/NavCubeMode.d.ts +21 -0
- package/types/src/toolbar/OrthoMode.d.ts +21 -0
- package/types/src/toolbar/QueryTool.d.ts +13 -0
- package/types/src/toolbar/ResetAction.d.ts +16 -0
- package/types/src/toolbar/SectionTool.d.ts +131 -0
- package/types/src/toolbar/SelectionTool.d.ts +14 -0
- package/types/src/toolbar/SettingTool.d.ts +13 -0
- package/types/src/toolbar/ShowSpacesMode.d.ts +22 -0
- package/types/src/toolbar/ThreeDMode.d.ts +20 -0
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale translations for BIMViewer
|
|
3
|
+
*/
|
|
4
|
+
declare const messages: {
|
|
5
|
+
ch: {
|
|
6
|
+
NavCube: {
|
|
7
|
+
front: string;
|
|
8
|
+
back: string;
|
|
9
|
+
top: string;
|
|
10
|
+
bottom: string;
|
|
11
|
+
left: string;
|
|
12
|
+
right: string;
|
|
13
|
+
};
|
|
14
|
+
modelsExplorer: {
|
|
15
|
+
title: string;
|
|
16
|
+
loadAll: string;
|
|
17
|
+
loadAllTip: string;
|
|
18
|
+
unloadAll: string;
|
|
19
|
+
unloadAllTip: string;
|
|
20
|
+
add: string;
|
|
21
|
+
addTip: string;
|
|
22
|
+
};
|
|
23
|
+
objectsExplorer: {
|
|
24
|
+
title: string;
|
|
25
|
+
showAll: string;
|
|
26
|
+
showAllTip: string;
|
|
27
|
+
hideAll: string;
|
|
28
|
+
hideAllTip: string;
|
|
29
|
+
};
|
|
30
|
+
classesExplorer: {
|
|
31
|
+
title: string;
|
|
32
|
+
showAll: string;
|
|
33
|
+
showAllTip: string;
|
|
34
|
+
hideAll: string;
|
|
35
|
+
hideAllTip: string;
|
|
36
|
+
};
|
|
37
|
+
storeysExplorer: {
|
|
38
|
+
title: string;
|
|
39
|
+
showAll: string;
|
|
40
|
+
showAllTip: string;
|
|
41
|
+
hideAll: string;
|
|
42
|
+
hideAllTip: string;
|
|
43
|
+
};
|
|
44
|
+
propertiesInspector: {
|
|
45
|
+
title: string;
|
|
46
|
+
noObjectSelectedWarning: string;
|
|
47
|
+
noPropSetWarning: string;
|
|
48
|
+
};
|
|
49
|
+
toolbar: {
|
|
50
|
+
toggleExplorer: string;
|
|
51
|
+
toggleProperties: string;
|
|
52
|
+
resetViewTip: string;
|
|
53
|
+
toggle2d3dTip: string;
|
|
54
|
+
togglePerspectiveTip: string;
|
|
55
|
+
viewFitTip: string;
|
|
56
|
+
firstPersonTip: string;
|
|
57
|
+
hideObjectsTip: string;
|
|
58
|
+
annotationObjectsTip: string;
|
|
59
|
+
selectObjectsTip: string;
|
|
60
|
+
queryObjectsTip: string;
|
|
61
|
+
sliceObjectsTip: string;
|
|
62
|
+
slicesMenuTip: string;
|
|
63
|
+
showSpacesTip: string;
|
|
64
|
+
numSlicesTip: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
en: {
|
|
68
|
+
NavCube: {
|
|
69
|
+
front: string;
|
|
70
|
+
back: string;
|
|
71
|
+
top: string;
|
|
72
|
+
bottom: string;
|
|
73
|
+
left: string;
|
|
74
|
+
right: string;
|
|
75
|
+
};
|
|
76
|
+
modelsExplorer: {
|
|
77
|
+
title: string;
|
|
78
|
+
loadAll: string;
|
|
79
|
+
loadAllTip: string;
|
|
80
|
+
unloadAll: string;
|
|
81
|
+
unloadAllTip: string;
|
|
82
|
+
add: string;
|
|
83
|
+
addTip: string;
|
|
84
|
+
};
|
|
85
|
+
objectsExplorer: {
|
|
86
|
+
title: string;
|
|
87
|
+
showAll: string;
|
|
88
|
+
showAllTip: string;
|
|
89
|
+
hideAll: string;
|
|
90
|
+
hideAllTip: string;
|
|
91
|
+
};
|
|
92
|
+
classesExplorer: {
|
|
93
|
+
title: string;
|
|
94
|
+
showAll: string;
|
|
95
|
+
showAllTip: string;
|
|
96
|
+
hideAll: string;
|
|
97
|
+
hideAllTip: string;
|
|
98
|
+
};
|
|
99
|
+
storeysExplorer: {
|
|
100
|
+
title: string;
|
|
101
|
+
showAll: string;
|
|
102
|
+
showAllTip: string;
|
|
103
|
+
hideAll: string;
|
|
104
|
+
hideAllTip: string;
|
|
105
|
+
};
|
|
106
|
+
propertiesInspector: {
|
|
107
|
+
title: string;
|
|
108
|
+
noObjectSelectedWarning: string;
|
|
109
|
+
noPropSetWarning: string;
|
|
110
|
+
};
|
|
111
|
+
toolbar: {
|
|
112
|
+
toggleExplorer: string;
|
|
113
|
+
toggleProperties: string;
|
|
114
|
+
resetViewTip: string;
|
|
115
|
+
toggle2d3dTip: string;
|
|
116
|
+
togglePerspectiveTip: string;
|
|
117
|
+
viewFitTip: string;
|
|
118
|
+
firstPersonTip: string;
|
|
119
|
+
hideObjectsTip: string;
|
|
120
|
+
selectObjectsTip: string;
|
|
121
|
+
queryObjectsTip: string;
|
|
122
|
+
sliceObjectsTip: string;
|
|
123
|
+
slicesMenuTip: string;
|
|
124
|
+
showSpacesTip: string;
|
|
125
|
+
numSlicesTip: string;
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
de: {
|
|
129
|
+
NavCube: {
|
|
130
|
+
front: string;
|
|
131
|
+
back: string;
|
|
132
|
+
top: string;
|
|
133
|
+
bottom: string;
|
|
134
|
+
left: string;
|
|
135
|
+
right: string;
|
|
136
|
+
};
|
|
137
|
+
modelsExplorer: {
|
|
138
|
+
title: string;
|
|
139
|
+
loadAll: string;
|
|
140
|
+
loadAllTip: string;
|
|
141
|
+
unloadAll: string;
|
|
142
|
+
unloadAllTip: string;
|
|
143
|
+
add: string;
|
|
144
|
+
addTip: string;
|
|
145
|
+
};
|
|
146
|
+
objectsExplorer: {
|
|
147
|
+
title: string;
|
|
148
|
+
showAll: string;
|
|
149
|
+
showAllTip: string;
|
|
150
|
+
hideAll: string;
|
|
151
|
+
hideAllTip: string;
|
|
152
|
+
};
|
|
153
|
+
classesExplorer: {
|
|
154
|
+
title: string;
|
|
155
|
+
showAll: string;
|
|
156
|
+
showAllTip: string;
|
|
157
|
+
hideAll: string;
|
|
158
|
+
hideAllTip: string;
|
|
159
|
+
};
|
|
160
|
+
storeysExplorer: {
|
|
161
|
+
title: string;
|
|
162
|
+
showAll: string;
|
|
163
|
+
showAllTip: string;
|
|
164
|
+
hideAll: string;
|
|
165
|
+
hideAllTip: string;
|
|
166
|
+
};
|
|
167
|
+
propertiesInspector: {
|
|
168
|
+
title: string;
|
|
169
|
+
noObjectSelectedWarning: string;
|
|
170
|
+
noPropSetWarning: string;
|
|
171
|
+
};
|
|
172
|
+
toolbar: {
|
|
173
|
+
toggleExplorer: string;
|
|
174
|
+
toggleProperties: string;
|
|
175
|
+
resetViewTip: string;
|
|
176
|
+
toggle2d3dTip: string;
|
|
177
|
+
togglePerspectiveTip: string;
|
|
178
|
+
viewFitTip: string;
|
|
179
|
+
firstPersonTip: string;
|
|
180
|
+
hideObjectsTip: string;
|
|
181
|
+
selectObjectsTip: string;
|
|
182
|
+
queryObjectsTip: string;
|
|
183
|
+
sliceObjectsTip: string;
|
|
184
|
+
slicesMenuTip: string;
|
|
185
|
+
showSpacesTip: string;
|
|
186
|
+
numSlicesTip: string;
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
fr: {
|
|
190
|
+
NavCube: {
|
|
191
|
+
front: string;
|
|
192
|
+
back: string;
|
|
193
|
+
top: string;
|
|
194
|
+
bottom: string;
|
|
195
|
+
left: string;
|
|
196
|
+
right: string;
|
|
197
|
+
};
|
|
198
|
+
modelsExplorer: {
|
|
199
|
+
title: string;
|
|
200
|
+
loadAll: string;
|
|
201
|
+
loadAllTip: string;
|
|
202
|
+
unloadAll: string;
|
|
203
|
+
unloadAllTip: string;
|
|
204
|
+
add: string;
|
|
205
|
+
addTip: string;
|
|
206
|
+
};
|
|
207
|
+
objectsExplorer: {
|
|
208
|
+
title: string;
|
|
209
|
+
showAll: string;
|
|
210
|
+
showAllTip: string;
|
|
211
|
+
hideAll: string;
|
|
212
|
+
hideAllTip: string;
|
|
213
|
+
};
|
|
214
|
+
classesExplorer: {
|
|
215
|
+
title: string;
|
|
216
|
+
showAll: string;
|
|
217
|
+
showAllTip: string;
|
|
218
|
+
hideAll: string;
|
|
219
|
+
hideAllTip: string;
|
|
220
|
+
};
|
|
221
|
+
storeysExplorer: {
|
|
222
|
+
title: string;
|
|
223
|
+
showAll: string;
|
|
224
|
+
showAllTip: string;
|
|
225
|
+
hideAll: string;
|
|
226
|
+
hideAllTip: string;
|
|
227
|
+
};
|
|
228
|
+
propertiesInspector: {
|
|
229
|
+
title: string;
|
|
230
|
+
noObjectSelectedWarning: string;
|
|
231
|
+
noPropSetWarning: string;
|
|
232
|
+
};
|
|
233
|
+
toolbar: {
|
|
234
|
+
toggleExplorer: string;
|
|
235
|
+
toggleProperties: string;
|
|
236
|
+
resetViewTip: string;
|
|
237
|
+
toggle2d3dTip: string;
|
|
238
|
+
togglePerspectiveTip: string;
|
|
239
|
+
viewFitTip: string;
|
|
240
|
+
firstPersonTip: string;
|
|
241
|
+
hideObjectsTip: string;
|
|
242
|
+
selectObjectsTip: string;
|
|
243
|
+
queryObjectsTip: string;
|
|
244
|
+
sliceObjectsTip: string;
|
|
245
|
+
slicesMenuTip: string;
|
|
246
|
+
showSpacesTip: string;
|
|
247
|
+
numSlicesTip: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
pl: {
|
|
251
|
+
NavCube: {
|
|
252
|
+
front: string;
|
|
253
|
+
back: string;
|
|
254
|
+
top: string;
|
|
255
|
+
bottom: string;
|
|
256
|
+
left: string;
|
|
257
|
+
right: string;
|
|
258
|
+
};
|
|
259
|
+
modelsExplorer: {
|
|
260
|
+
title: string;
|
|
261
|
+
loadAll: string;
|
|
262
|
+
loadAllTip: string;
|
|
263
|
+
unloadAll: string;
|
|
264
|
+
unloadAllTip: string;
|
|
265
|
+
add: string;
|
|
266
|
+
addTip: string;
|
|
267
|
+
};
|
|
268
|
+
objectsExplorer: {
|
|
269
|
+
title: string;
|
|
270
|
+
showAll: string;
|
|
271
|
+
showAllTip: string;
|
|
272
|
+
hideAll: string;
|
|
273
|
+
hideAllTip: string;
|
|
274
|
+
};
|
|
275
|
+
classesExplorer: {
|
|
276
|
+
title: string;
|
|
277
|
+
showAll: string;
|
|
278
|
+
showAllTip: string;
|
|
279
|
+
hideAll: string;
|
|
280
|
+
hideAllTip: string;
|
|
281
|
+
};
|
|
282
|
+
storeysExplorer: {
|
|
283
|
+
title: string;
|
|
284
|
+
showAll: string;
|
|
285
|
+
showAllTip: string;
|
|
286
|
+
hideAll: string;
|
|
287
|
+
hideAllTip: string;
|
|
288
|
+
};
|
|
289
|
+
propertiesInspector: {
|
|
290
|
+
title: string;
|
|
291
|
+
noObjectSelectedWarning: string;
|
|
292
|
+
noPropSetWarning: string;
|
|
293
|
+
};
|
|
294
|
+
toolbar: {
|
|
295
|
+
toggleExplorer: string;
|
|
296
|
+
toggleProperties: string;
|
|
297
|
+
resetViewTip: string;
|
|
298
|
+
toggle2d3dTip: string;
|
|
299
|
+
togglePerspectiveTip: string;
|
|
300
|
+
viewFitTip: string;
|
|
301
|
+
firstPersonTip: string;
|
|
302
|
+
hideObjectsTip: string;
|
|
303
|
+
selectObjectsTip: string;
|
|
304
|
+
queryObjectsTip: string;
|
|
305
|
+
sliceObjectsTip: string;
|
|
306
|
+
slicesMenuTip: string;
|
|
307
|
+
showSpacesTip: string;
|
|
308
|
+
numSlicesTip: string;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
ru: {
|
|
312
|
+
NavCube: {
|
|
313
|
+
front: string;
|
|
314
|
+
back: string;
|
|
315
|
+
top: string;
|
|
316
|
+
bottom: string;
|
|
317
|
+
left: string;
|
|
318
|
+
right: string;
|
|
319
|
+
};
|
|
320
|
+
modelsExplorer: {
|
|
321
|
+
title: string;
|
|
322
|
+
loadAll: string;
|
|
323
|
+
loadAllTip: string;
|
|
324
|
+
unloadAll: string;
|
|
325
|
+
unloadAllTip: string;
|
|
326
|
+
add: string;
|
|
327
|
+
addTip: string;
|
|
328
|
+
};
|
|
329
|
+
objectsExplorer: {
|
|
330
|
+
title: string;
|
|
331
|
+
showAll: string;
|
|
332
|
+
showAllTip: string;
|
|
333
|
+
hideAll: string;
|
|
334
|
+
hideAllTip: string;
|
|
335
|
+
};
|
|
336
|
+
classesExplorer: {
|
|
337
|
+
title: string;
|
|
338
|
+
showAll: string;
|
|
339
|
+
showAllTip: string;
|
|
340
|
+
hideAll: string;
|
|
341
|
+
hideAllTip: string;
|
|
342
|
+
};
|
|
343
|
+
storeysExplorer: {
|
|
344
|
+
title: string;
|
|
345
|
+
showAll: string;
|
|
346
|
+
showAllTip: string;
|
|
347
|
+
hideAll: string;
|
|
348
|
+
hideAllTip: string;
|
|
349
|
+
};
|
|
350
|
+
propertiesInspector: {
|
|
351
|
+
title: string;
|
|
352
|
+
noObjectSelectedWarning: string;
|
|
353
|
+
noPropSetWarning: string;
|
|
354
|
+
};
|
|
355
|
+
toolbar: {
|
|
356
|
+
toggleExplorer: string;
|
|
357
|
+
toggleProperties: string;
|
|
358
|
+
resetViewTip: string;
|
|
359
|
+
toggle2d3dTip: string;
|
|
360
|
+
togglePerspectiveTip: string;
|
|
361
|
+
viewFitTip: string;
|
|
362
|
+
firstPersonTip: string;
|
|
363
|
+
hideObjectsTip: string;
|
|
364
|
+
selectObjectsTip: string;
|
|
365
|
+
queryObjectsTip: string;
|
|
366
|
+
sliceObjectsTip: string;
|
|
367
|
+
slicesMenuTip: string;
|
|
368
|
+
showSpacesTip: string;
|
|
369
|
+
numSlicesTip: string;
|
|
370
|
+
};
|
|
371
|
+
};
|
|
372
|
+
};
|
|
373
|
+
export default messages;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export default class OSSHelper {
|
|
2
|
+
static getBuffer(filePath: string, region_url: string, bucket_name: string, done: Function, error: Function): Promise<void>;
|
|
3
|
+
static requestFileFromOSS(filePath: string, region_url: string, bucket_name: string, isFile: boolean, done: Function, error: Function): Promise<void>;
|
|
4
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default server client which loads content for a {@link BIMViewer} via HTTP from the file system.
|
|
3
|
+
* A BIMViewer is instantiated with an instance of this class.
|
|
4
|
+
* To load content from an alternative source, instantiate BIMViewer
|
|
5
|
+
* with your own custom implementation of this class.
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export default class Server {
|
|
9
|
+
protected _dataDir: string;
|
|
10
|
+
protected _filePath: string;
|
|
11
|
+
/**
|
|
12
|
+
* Constructs a Server.
|
|
13
|
+
*
|
|
14
|
+
* @param {*} [cfg] Server configuration.
|
|
15
|
+
* @param {String} [cfg.dataDir] Base directory for content.
|
|
16
|
+
* @param {String} [cfg.filePath] Base directory for content.
|
|
17
|
+
*/
|
|
18
|
+
constructor(cfg?: any);
|
|
19
|
+
/**
|
|
20
|
+
* Gets information on all available projects.
|
|
21
|
+
*
|
|
22
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
23
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
24
|
+
*/
|
|
25
|
+
getProjects(done: Function, error: Function): void;
|
|
26
|
+
/**
|
|
27
|
+
* Gets information for a project.
|
|
28
|
+
* @param {String} projectId ID of the project.
|
|
29
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
30
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
31
|
+
*/
|
|
32
|
+
getProject(projectId: string, done: Function, error: Function): void;
|
|
33
|
+
/**
|
|
34
|
+
* Gets metadata for a model within a project.
|
|
35
|
+
*
|
|
36
|
+
* @param {String} projectId ID of the project.
|
|
37
|
+
* @param {String} modelId ID of the model.
|
|
38
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
39
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
40
|
+
*/
|
|
41
|
+
getMetadata(projectId: string, modelId: string, done: Function, error: Function): void;
|
|
42
|
+
/**
|
|
43
|
+
* Gets information for a project.
|
|
44
|
+
* @param {String} projectId ID of the project.
|
|
45
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
46
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
47
|
+
*/
|
|
48
|
+
getModelProject(region_url: string, bucket_name: string, done: Function, error: Function): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Gets metadata for a model within a project.
|
|
51
|
+
*
|
|
52
|
+
* @param {String} projectId ID of the project.
|
|
53
|
+
* @param {String} FileId path of the model.
|
|
54
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
55
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
56
|
+
*/
|
|
57
|
+
getModelMetadata(region_url: string, bucket_name: string, done: Function, error: Function): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Gets geometry for a model within a project.
|
|
60
|
+
*
|
|
61
|
+
* @param {String} projectId ID of the project.
|
|
62
|
+
* @param {String} FileId ID of the model.
|
|
63
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
64
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
65
|
+
*/
|
|
66
|
+
getModelGeometry(region_url: string, bucket_name: string, done: Function, error: Function): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Gets geometry for a model within a project.
|
|
69
|
+
*
|
|
70
|
+
* @param {String} projectId ID of the project.
|
|
71
|
+
* @param {String} modelId ID of the model.
|
|
72
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
73
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
74
|
+
*/
|
|
75
|
+
getGeometry(projectId: string, modelId: string, done: Function, error: Function): void;
|
|
76
|
+
/**
|
|
77
|
+
* Gets geometry for a model within a project.
|
|
78
|
+
*
|
|
79
|
+
* @param {String} projectId ID of the project.
|
|
80
|
+
* @param {String} modelId ID of the model.
|
|
81
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
82
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
83
|
+
*/
|
|
84
|
+
getObjectInfo(projectId: string, modelId: string, objectId: string, done: Function, error: Function): void;
|
|
85
|
+
/**
|
|
86
|
+
* Gets existing issues for a model within a project.
|
|
87
|
+
*
|
|
88
|
+
* @param {String} projectId ID of the project.
|
|
89
|
+
* @param {String} modelId ID of the model.
|
|
90
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
91
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
92
|
+
*/
|
|
93
|
+
getIssues(projectId: string, modelId: string, done: Function, error: Function): void;
|
|
94
|
+
/**
|
|
95
|
+
* Gets a JSON manifest file for a model that's split into multiple XTC files
|
|
96
|
+
* (and maybe also JSON metadata files).
|
|
97
|
+
*
|
|
98
|
+
* The manifest can have an arbitrary name, and will list all the XTC
|
|
99
|
+
* (and maybe separate JSON metada files)
|
|
100
|
+
* that comprise the model.
|
|
101
|
+
*
|
|
102
|
+
* @param {String} projectId ID of the project.
|
|
103
|
+
* @param {String} modelId ID of the model.
|
|
104
|
+
* @param {String} manifestName Filename of the manifest.
|
|
105
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
106
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
107
|
+
*/
|
|
108
|
+
getSplitModelManifest(projectId: string, modelId: string, manifestName: string, done: Function, error: Function): void;
|
|
109
|
+
/**
|
|
110
|
+
* Gets one of the metadata files within a split model within a project.
|
|
111
|
+
*
|
|
112
|
+
* @param {String} projectId ID of the project.
|
|
113
|
+
* @param {String} modelId ID of the model.
|
|
114
|
+
* @param {String} metadataFileName Filename of the metadata file.
|
|
115
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
116
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
117
|
+
*/
|
|
118
|
+
getSplitModelMetadata(projectId: string, modelId: string, metadataFileName: string, done: Function, error: Function): void;
|
|
119
|
+
/**
|
|
120
|
+
* Gets one of the XTC geometry files within a split model within a project.
|
|
121
|
+
*
|
|
122
|
+
* @param {String} projectId ID of the project.
|
|
123
|
+
* @param {String} modelId ID of the model.
|
|
124
|
+
* @param {String} geometryFileName Filename of the XTC geometry file.
|
|
125
|
+
* @param {Function} done Callback through which the JSON result is returned.
|
|
126
|
+
* @param {Function} error Callback through which an error message is returned on error.
|
|
127
|
+
*/
|
|
128
|
+
getSplitModelGeometry(projectId: string, modelId: string, geometryFileName: string, done: Function, error: Function): void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Annotation } from "@xtctwins/tctwins-core";
|
|
2
|
+
import Controller from "../Controller";
|
|
3
|
+
import EventTrigger from "../EventTrigger";
|
|
4
|
+
export declare type AnnotationContent = {
|
|
5
|
+
/** 当前标注所在模型ID */
|
|
6
|
+
modelId: string;
|
|
7
|
+
/** 当前标注ID */
|
|
8
|
+
entityId: string;
|
|
9
|
+
/** 当前标注类型 */
|
|
10
|
+
type: string;
|
|
11
|
+
/** 当前标注内容 */
|
|
12
|
+
content: object;
|
|
13
|
+
/** 当前标注坐标 */
|
|
14
|
+
worldPos: [];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 标注工具
|
|
18
|
+
* @class
|
|
19
|
+
*/
|
|
20
|
+
export default class AnnotationTool extends Controller {
|
|
21
|
+
private annotationsPlugin;
|
|
22
|
+
private _AnnotationList;
|
|
23
|
+
currentAnnotation: any;
|
|
24
|
+
_currentType: string;
|
|
25
|
+
protected _modelId: string;
|
|
26
|
+
protected eventTrigger: EventTrigger;
|
|
27
|
+
protected annotationWrapper: HTMLElement;
|
|
28
|
+
imageSrc: Map<string, any>;
|
|
29
|
+
/**
|
|
30
|
+
创建一个标注工具对象
|
|
31
|
+
@param {*} parent
|
|
32
|
+
@param {*} cfg
|
|
33
|
+
*/
|
|
34
|
+
constructor(parent: any, cfg: any);
|
|
35
|
+
setAllVisible(visible: boolean): void;
|
|
36
|
+
clickToCreateAnno(event: any): void;
|
|
37
|
+
private getTime;
|
|
38
|
+
/**
|
|
39
|
+
* @ignore
|
|
40
|
+
* 获取鼠标或者屏幕点击事件对应坐标
|
|
41
|
+
* @param event
|
|
42
|
+
* @returns
|
|
43
|
+
*/
|
|
44
|
+
getCanvasPos(event: any | undefined | null): any;
|
|
45
|
+
/**
|
|
46
|
+
* 设置当前标注类型
|
|
47
|
+
* @param {string} type
|
|
48
|
+
*/
|
|
49
|
+
setCurrentType(type: string): void;
|
|
50
|
+
private initCreateAnnotation;
|
|
51
|
+
showAnnotationList(): void;
|
|
52
|
+
addAnnotation(id: string, worldPos: number[], type: string): void;
|
|
53
|
+
private clear;
|
|
54
|
+
get AnnotationList(): any;
|
|
55
|
+
set AnnotationList(value: any);
|
|
56
|
+
private getTypeImage;
|
|
57
|
+
setTypeImage(urls: any): void;
|
|
58
|
+
destroyAnnotationById(entityid: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* 获取指定id的标注对象
|
|
61
|
+
* @param {string} entityid
|
|
62
|
+
* @return {} annotationsPlugin.annotations[entityid]
|
|
63
|
+
* */
|
|
64
|
+
getAnnotationById(entityid: string): Annotation;
|
|
65
|
+
/**
|
|
66
|
+
* 获取标注插件标注列表
|
|
67
|
+
* @return {} annotationsPlugin.annotations
|
|
68
|
+
*/
|
|
69
|
+
get annotationPluginList(): any;
|
|
70
|
+
destroy(): void;
|
|
71
|
+
}
|