@xtctwins/tctwins-bimx-engine 0.3.11 → 0.3.13

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.
Files changed (61) hide show
  1. package/README.md +1 -1
  2. package/dist/{AnnotationTool-BnLd0s38.mjs → AnnotationTool-k3W4xmw6.mjs} +13 -14
  3. package/dist/BIMX_Viewer_Lib.es.js +5 -5
  4. package/dist/BIMX_Viewer_Lib.umd.js +184 -164
  5. package/dist/{CameraViewTool-BGmwAori.mjs → CameraViewTool-CuXnJa74.mjs} +15 -15
  6. package/dist/{CommentTool-B9TgO52t.mjs → CommentTool-CUtaZc7Y.mjs} +276 -277
  7. package/dist/{HiddenTool-CNMJqZzC.mjs → HiddenTool-CzJ19mP1.mjs} +9 -10
  8. package/dist/{InspectorTool-CiyN_aCB.mjs → InspectorTool-BTH82K8b.mjs} +3 -3
  9. package/dist/MeasureTool-BvPkIvmX.mjs +593 -0
  10. package/dist/{MouseTool-B07SstRZ.mjs → MouseTool-CiywjpW3.mjs} +6 -6
  11. package/dist/{NavigateTool-B8qIl9xy.mjs → NavigateTool-CDlYpMXl.mjs} +13 -14
  12. package/dist/OperateTool-NMIYz2YN.mjs +185 -0
  13. package/dist/{RoamTool-3sDI1Ouu.mjs → RoamTool-BkwJBBAg.mjs} +1 -1
  14. package/dist/{ScreenShotTool-CjsT2-Va.mjs → ScreenShotTool-BP-xDRKf.mjs} +16 -17
  15. package/dist/SectionTool-mt4iqa1I.mjs +241 -0
  16. package/dist/SettingTool-DieHq4VO.mjs +1745 -0
  17. package/dist/{StructureTree-B183vT5b.mjs → StructureTree-C8C435JY.mjs} +5 -6
  18. package/dist/{alert-DN7oOiZl.mjs → alert-B9Uw8l52.mjs} +18 -13
  19. package/dist/{index-DfRswjrC.mjs → index-B_IMYBaJ.mjs} +59333 -53195
  20. package/dist/{panel.vue_vue_type_style_index_0_lang-DOsptET6.mjs → panel.vue_vue_type_style_index_0_lang-BswWCo8x.mjs} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/{tallPanel-D0Zgkc3n.mjs → tallPanel-CnTIaRU-.mjs} +1 -1
  23. package/package.json +5 -5
  24. package/types/components/BimViewerComponents/OperateTool.vue.d.ts +12 -0
  25. package/types/components/BimViewerComponents/SectionModeBar.vue.d.ts +2 -0
  26. package/types/components/BimxViewerComp.vue.d.ts +2 -0
  27. package/types/components/utilsComponents/alert.vue.d.ts +9 -0
  28. package/types/i18n/index.d.ts +212 -0
  29. package/types/i18n/locales/en-US.d.ts +53 -0
  30. package/types/i18n/locales/zh-CN.d.ts +53 -0
  31. package/types/pages/BimxViewerEntry.vue.d.ts +3 -0
  32. package/types/store/const.d.ts +12 -0
  33. package/types/store/toolbars.d.ts +53 -1
  34. package/types/utils/OSSHelper.d.ts +2 -0
  35. package/types/utils/eventBus.d.ts +6 -1
  36. package/types/viewerManager/load/loadModel.d.ts +88 -0
  37. package/types/viewerManager/sectionManager.d.ts +524 -0
  38. package/types/viewerManager/viewerManager.d.ts +7 -1
  39. package/dist/AnnotationTool-Bp8DGFFA.mjs +0 -167
  40. package/dist/CameraViewTool-BwVnc0ua.mjs +0 -164
  41. package/dist/CommentTool-C7NLPxMd.mjs +0 -1529
  42. package/dist/HiddenTool-i1AESn4-.mjs +0 -57
  43. package/dist/InspectorTool-D4gr7uiQ.mjs +0 -679
  44. package/dist/MeasureTool-BNBUx-1X.mjs +0 -323
  45. package/dist/MeasureTool-Cxnp9MVY.mjs +0 -323
  46. package/dist/MouseTool-DVqNDADf.mjs +0 -84
  47. package/dist/NavigateTool-DKTSPVCL.mjs +0 -52
  48. package/dist/RoamTool-CazuxheL.mjs +0 -287
  49. package/dist/ScreenShotTool-fYVxpPrW.mjs +0 -430
  50. package/dist/SectionTool-Bpk5jewK.mjs +0 -331
  51. package/dist/SectionTool-DMSGkjYm.mjs +0 -331
  52. package/dist/SettingTool-BuSm2JB6.mjs +0 -695
  53. package/dist/SettingTool-IBRpWdfo.mjs +0 -695
  54. package/dist/StructureTree-D9z28tm4.mjs +0 -1686
  55. package/dist/alert-DwTFq4bp.mjs +0 -47
  56. package/dist/const-DOnRsYpZ.mjs +0 -389
  57. package/dist/el-slider-C9_q447A.mjs +0 -1059
  58. package/dist/el-slider-dslleM3g.mjs +0 -1059
  59. package/dist/index-BzB8rqmg.mjs +0 -131961
  60. package/dist/panel.vue_vue_type_style_index_0_lang-E8w23EhV.mjs +0 -61
  61. package/dist/tallPanel-Dp1ZbCTR.mjs +0 -84
@@ -0,0 +1,524 @@
1
+ /** 剖切子模式:plane = 剖切面,box = 剖切盒,null = 未选中任何模式 */
2
+ export type SectionMode = "plane" | "box" | null;
3
+ /** 剖切面被批量停用/恢复/清空后广播,供剖切面板刷新列表 */
4
+ export declare const SECTION_PLANES_CHANGED = "sectionPlanesChanged";
5
+ /**
6
+ * 剖切工具(剖切面 / 剖切盒)子模式调度。
7
+ *
8
+ * - 进入剖切盒:已有剖切面「停用但保留」,切回剖切面时恢复原状态
9
+ * - 进入剖切面:剖切盒「停用但保留」,切回剖切盒时恢复上次调整
10
+ * - 再次点击当前模式的按钮 = 关闭该模式:剖切盒销毁、剖切面清空
11
+ * - 关闭剖切工具:保留剖切效果,只隐藏剖切面控制器和剖切盒
12
+ */
13
+ export default class SectionManager {
14
+ /** 进入剖切盒前处于启用状态的剖切面 id */
15
+ protected static suspendedSectionIds: string[];
16
+ protected static get sectionTool(): any;
17
+ protected static get store(): import('pinia').Store<"toolbar", {
18
+ isPc: boolean;
19
+ pTools: import('../store/toolbars').Tool[];
20
+ mTools: import('../store/toolbars').Tool[];
21
+ visibleToolIds: number[];
22
+ readyToolIds: number[];
23
+ sectionMode: "plane" | "box" | null;
24
+ }, {
25
+ tools: (state: {
26
+ isPc: boolean;
27
+ pTools: {
28
+ id: number;
29
+ key: string;
30
+ name: string;
31
+ hasActiveState: boolean;
32
+ component: import('../store/toolbars').ComponentName | "";
33
+ isShowDelimiter: boolean;
34
+ img: string;
35
+ imgActive: string;
36
+ isActive: boolean;
37
+ position?: 0 | 1 | 2 | undefined;
38
+ }[];
39
+ mTools: {
40
+ id: number;
41
+ key: string;
42
+ name: string;
43
+ hasActiveState: boolean;
44
+ component: import('../store/toolbars').ComponentName | "";
45
+ isShowDelimiter: boolean;
46
+ img: string;
47
+ imgActive: string;
48
+ isActive: boolean;
49
+ position?: 0 | 1 | 2 | undefined;
50
+ }[];
51
+ visibleToolIds: number[];
52
+ readyToolIds: number[];
53
+ sectionMode: "plane" | "box" | null;
54
+ } & import('pinia').PiniaCustomStateProperties<{
55
+ isPc: boolean;
56
+ pTools: import('../store/toolbars').Tool[];
57
+ mTools: import('../store/toolbars').Tool[];
58
+ visibleToolIds: number[];
59
+ readyToolIds: number[];
60
+ sectionMode: "plane" | "box" | null;
61
+ }>) => {
62
+ id: number;
63
+ key: string;
64
+ name: string;
65
+ hasActiveState: boolean;
66
+ component: import('../store/toolbars').ComponentName | "";
67
+ isShowDelimiter: boolean;
68
+ img: string;
69
+ imgActive: string;
70
+ isActive: boolean;
71
+ position?: 0 | 1 | 2 | undefined;
72
+ }[];
73
+ visibleTools: (state: {
74
+ isPc: boolean;
75
+ pTools: {
76
+ id: number;
77
+ key: string;
78
+ name: string;
79
+ hasActiveState: boolean;
80
+ component: import('../store/toolbars').ComponentName | "";
81
+ isShowDelimiter: boolean;
82
+ img: string;
83
+ imgActive: string;
84
+ isActive: boolean;
85
+ position?: 0 | 1 | 2 | undefined;
86
+ }[];
87
+ mTools: {
88
+ id: number;
89
+ key: string;
90
+ name: string;
91
+ hasActiveState: boolean;
92
+ component: import('../store/toolbars').ComponentName | "";
93
+ isShowDelimiter: boolean;
94
+ img: string;
95
+ imgActive: string;
96
+ isActive: boolean;
97
+ position?: 0 | 1 | 2 | undefined;
98
+ }[];
99
+ visibleToolIds: number[];
100
+ readyToolIds: number[];
101
+ sectionMode: "plane" | "box" | null;
102
+ } & import('pinia').PiniaCustomStateProperties<{
103
+ isPc: boolean;
104
+ pTools: import('../store/toolbars').Tool[];
105
+ mTools: import('../store/toolbars').Tool[];
106
+ visibleToolIds: number[];
107
+ readyToolIds: number[];
108
+ sectionMode: "plane" | "box" | null;
109
+ }>) => import('../store/toolbars').Tool[];
110
+ readyTools: (state: {
111
+ isPc: boolean;
112
+ pTools: {
113
+ id: number;
114
+ key: string;
115
+ name: string;
116
+ hasActiveState: boolean;
117
+ component: import('../store/toolbars').ComponentName | "";
118
+ isShowDelimiter: boolean;
119
+ img: string;
120
+ imgActive: string;
121
+ isActive: boolean;
122
+ position?: 0 | 1 | 2 | undefined;
123
+ }[];
124
+ mTools: {
125
+ id: number;
126
+ key: string;
127
+ name: string;
128
+ hasActiveState: boolean;
129
+ component: import('../store/toolbars').ComponentName | "";
130
+ isShowDelimiter: boolean;
131
+ img: string;
132
+ imgActive: string;
133
+ isActive: boolean;
134
+ position?: 0 | 1 | 2 | undefined;
135
+ }[];
136
+ visibleToolIds: number[];
137
+ readyToolIds: number[];
138
+ sectionMode: "plane" | "box" | null;
139
+ } & import('pinia').PiniaCustomStateProperties<{
140
+ isPc: boolean;
141
+ pTools: import('../store/toolbars').Tool[];
142
+ mTools: import('../store/toolbars').Tool[];
143
+ visibleToolIds: number[];
144
+ readyToolIds: number[];
145
+ sectionMode: "plane" | "box" | null;
146
+ }>) => number[];
147
+ visibleComponents: (state: {
148
+ isPc: boolean;
149
+ pTools: {
150
+ id: number;
151
+ key: string;
152
+ name: string;
153
+ hasActiveState: boolean;
154
+ component: import('../store/toolbars').ComponentName | "";
155
+ isShowDelimiter: boolean;
156
+ img: string;
157
+ imgActive: string;
158
+ isActive: boolean;
159
+ position?: 0 | 1 | 2 | undefined;
160
+ }[];
161
+ mTools: {
162
+ id: number;
163
+ key: string;
164
+ name: string;
165
+ hasActiveState: boolean;
166
+ component: import('../store/toolbars').ComponentName | "";
167
+ isShowDelimiter: boolean;
168
+ img: string;
169
+ imgActive: string;
170
+ isActive: boolean;
171
+ position?: 0 | 1 | 2 | undefined;
172
+ }[];
173
+ visibleToolIds: number[];
174
+ readyToolIds: number[];
175
+ sectionMode: "plane" | "box" | null;
176
+ } & import('pinia').PiniaCustomStateProperties<{
177
+ isPc: boolean;
178
+ pTools: import('../store/toolbars').Tool[];
179
+ mTools: import('../store/toolbars').Tool[];
180
+ visibleToolIds: number[];
181
+ readyToolIds: number[];
182
+ sectionMode: "plane" | "box" | null;
183
+ }>) => ("" | import('../store/toolbars').ComponentName)[];
184
+ getKeyById: (state: {
185
+ isPc: boolean;
186
+ pTools: {
187
+ id: number;
188
+ key: string;
189
+ name: string;
190
+ hasActiveState: boolean;
191
+ component: import('../store/toolbars').ComponentName | "";
192
+ isShowDelimiter: boolean;
193
+ img: string;
194
+ imgActive: string;
195
+ isActive: boolean;
196
+ position?: 0 | 1 | 2 | undefined;
197
+ }[];
198
+ mTools: {
199
+ id: number;
200
+ key: string;
201
+ name: string;
202
+ hasActiveState: boolean;
203
+ component: import('../store/toolbars').ComponentName | "";
204
+ isShowDelimiter: boolean;
205
+ img: string;
206
+ imgActive: string;
207
+ isActive: boolean;
208
+ position?: 0 | 1 | 2 | undefined;
209
+ }[];
210
+ visibleToolIds: number[];
211
+ readyToolIds: number[];
212
+ sectionMode: "plane" | "box" | null;
213
+ } & import('pinia').PiniaCustomStateProperties<{
214
+ isPc: boolean;
215
+ pTools: import('../store/toolbars').Tool[];
216
+ mTools: import('../store/toolbars').Tool[];
217
+ visibleToolIds: number[];
218
+ readyToolIds: number[];
219
+ sectionMode: "plane" | "box" | null;
220
+ }>) => (toolId: number) => string | undefined;
221
+ getToolById: (state: {
222
+ isPc: boolean;
223
+ pTools: {
224
+ id: number;
225
+ key: string;
226
+ name: string;
227
+ hasActiveState: boolean;
228
+ component: import('../store/toolbars').ComponentName | "";
229
+ isShowDelimiter: boolean;
230
+ img: string;
231
+ imgActive: string;
232
+ isActive: boolean;
233
+ position?: 0 | 1 | 2 | undefined;
234
+ }[];
235
+ mTools: {
236
+ id: number;
237
+ key: string;
238
+ name: string;
239
+ hasActiveState: boolean;
240
+ component: import('../store/toolbars').ComponentName | "";
241
+ isShowDelimiter: boolean;
242
+ img: string;
243
+ imgActive: string;
244
+ isActive: boolean;
245
+ position?: 0 | 1 | 2 | undefined;
246
+ }[];
247
+ visibleToolIds: number[];
248
+ readyToolIds: number[];
249
+ sectionMode: "plane" | "box" | null;
250
+ } & import('pinia').PiniaCustomStateProperties<{
251
+ isPc: boolean;
252
+ pTools: import('../store/toolbars').Tool[];
253
+ mTools: import('../store/toolbars').Tool[];
254
+ visibleToolIds: number[];
255
+ readyToolIds: number[];
256
+ sectionMode: "plane" | "box" | null;
257
+ }>) => (toolId: number) => import('../store/toolbars').Tool | undefined;
258
+ getToolByKey: (state: {
259
+ isPc: boolean;
260
+ pTools: {
261
+ id: number;
262
+ key: string;
263
+ name: string;
264
+ hasActiveState: boolean;
265
+ component: import('../store/toolbars').ComponentName | "";
266
+ isShowDelimiter: boolean;
267
+ img: string;
268
+ imgActive: string;
269
+ isActive: boolean;
270
+ position?: 0 | 1 | 2 | undefined;
271
+ }[];
272
+ mTools: {
273
+ id: number;
274
+ key: string;
275
+ name: string;
276
+ hasActiveState: boolean;
277
+ component: import('../store/toolbars').ComponentName | "";
278
+ isShowDelimiter: boolean;
279
+ img: string;
280
+ imgActive: string;
281
+ isActive: boolean;
282
+ position?: 0 | 1 | 2 | undefined;
283
+ }[];
284
+ visibleToolIds: number[];
285
+ readyToolIds: number[];
286
+ sectionMode: "plane" | "box" | null;
287
+ } & import('pinia').PiniaCustomStateProperties<{
288
+ isPc: boolean;
289
+ pTools: import('../store/toolbars').Tool[];
290
+ mTools: import('../store/toolbars').Tool[];
291
+ visibleToolIds: number[];
292
+ readyToolIds: number[];
293
+ sectionMode: "plane" | "box" | null;
294
+ }>) => (key: string) => import('../store/toolbars').Tool | undefined;
295
+ hasActiveState: (state: {
296
+ isPc: boolean;
297
+ pTools: {
298
+ id: number;
299
+ key: string;
300
+ name: string;
301
+ hasActiveState: boolean;
302
+ component: import('../store/toolbars').ComponentName | "";
303
+ isShowDelimiter: boolean;
304
+ img: string;
305
+ imgActive: string;
306
+ isActive: boolean;
307
+ position?: 0 | 1 | 2 | undefined;
308
+ }[];
309
+ mTools: {
310
+ id: number;
311
+ key: string;
312
+ name: string;
313
+ hasActiveState: boolean;
314
+ component: import('../store/toolbars').ComponentName | "";
315
+ isShowDelimiter: boolean;
316
+ img: string;
317
+ imgActive: string;
318
+ isActive: boolean;
319
+ position?: 0 | 1 | 2 | undefined;
320
+ }[];
321
+ visibleToolIds: number[];
322
+ readyToolIds: number[];
323
+ sectionMode: "plane" | "box" | null;
324
+ } & import('pinia').PiniaCustomStateProperties<{
325
+ isPc: boolean;
326
+ pTools: import('../store/toolbars').Tool[];
327
+ mTools: import('../store/toolbars').Tool[];
328
+ visibleToolIds: number[];
329
+ readyToolIds: number[];
330
+ sectionMode: "plane" | "box" | null;
331
+ }>) => (id: number) => boolean;
332
+ isToolEnable: (state: {
333
+ isPc: boolean;
334
+ pTools: {
335
+ id: number;
336
+ key: string;
337
+ name: string;
338
+ hasActiveState: boolean;
339
+ component: import('../store/toolbars').ComponentName | "";
340
+ isShowDelimiter: boolean;
341
+ img: string;
342
+ imgActive: string;
343
+ isActive: boolean;
344
+ position?: 0 | 1 | 2 | undefined;
345
+ }[];
346
+ mTools: {
347
+ id: number;
348
+ key: string;
349
+ name: string;
350
+ hasActiveState: boolean;
351
+ component: import('../store/toolbars').ComponentName | "";
352
+ isShowDelimiter: boolean;
353
+ img: string;
354
+ imgActive: string;
355
+ isActive: boolean;
356
+ position?: 0 | 1 | 2 | undefined;
357
+ }[];
358
+ visibleToolIds: number[];
359
+ readyToolIds: number[];
360
+ sectionMode: "plane" | "box" | null;
361
+ } & import('pinia').PiniaCustomStateProperties<{
362
+ isPc: boolean;
363
+ pTools: import('../store/toolbars').Tool[];
364
+ mTools: import('../store/toolbars').Tool[];
365
+ visibleToolIds: number[];
366
+ readyToolIds: number[];
367
+ sectionMode: "plane" | "box" | null;
368
+ }>) => (id: number) => boolean;
369
+ isToolEnableBykey: (state: {
370
+ isPc: boolean;
371
+ pTools: {
372
+ id: number;
373
+ key: string;
374
+ name: string;
375
+ hasActiveState: boolean;
376
+ component: import('../store/toolbars').ComponentName | "";
377
+ isShowDelimiter: boolean;
378
+ img: string;
379
+ imgActive: string;
380
+ isActive: boolean;
381
+ position?: 0 | 1 | 2 | undefined;
382
+ }[];
383
+ mTools: {
384
+ id: number;
385
+ key: string;
386
+ name: string;
387
+ hasActiveState: boolean;
388
+ component: import('../store/toolbars').ComponentName | "";
389
+ isShowDelimiter: boolean;
390
+ img: string;
391
+ imgActive: string;
392
+ isActive: boolean;
393
+ position?: 0 | 1 | 2 | undefined;
394
+ }[];
395
+ visibleToolIds: number[];
396
+ readyToolIds: number[];
397
+ sectionMode: "plane" | "box" | null;
398
+ } & import('pinia').PiniaCustomStateProperties<{
399
+ isPc: boolean;
400
+ pTools: import('../store/toolbars').Tool[];
401
+ mTools: import('../store/toolbars').Tool[];
402
+ visibleToolIds: number[];
403
+ readyToolIds: number[];
404
+ sectionMode: "plane" | "box" | null;
405
+ }>) => (key: string) => boolean;
406
+ isToolActive: (state: {
407
+ isPc: boolean;
408
+ pTools: {
409
+ id: number;
410
+ key: string;
411
+ name: string;
412
+ hasActiveState: boolean;
413
+ component: import('../store/toolbars').ComponentName | "";
414
+ isShowDelimiter: boolean;
415
+ img: string;
416
+ imgActive: string;
417
+ isActive: boolean;
418
+ position?: 0 | 1 | 2 | undefined;
419
+ }[];
420
+ mTools: {
421
+ id: number;
422
+ key: string;
423
+ name: string;
424
+ hasActiveState: boolean;
425
+ component: import('../store/toolbars').ComponentName | "";
426
+ isShowDelimiter: boolean;
427
+ img: string;
428
+ imgActive: string;
429
+ isActive: boolean;
430
+ position?: 0 | 1 | 2 | undefined;
431
+ }[];
432
+ visibleToolIds: number[];
433
+ readyToolIds: number[];
434
+ sectionMode: "plane" | "box" | null;
435
+ } & import('pinia').PiniaCustomStateProperties<{
436
+ isPc: boolean;
437
+ pTools: import('../store/toolbars').Tool[];
438
+ mTools: import('../store/toolbars').Tool[];
439
+ visibleToolIds: number[];
440
+ readyToolIds: number[];
441
+ sectionMode: "plane" | "box" | null;
442
+ }>) => (id: number) => boolean;
443
+ isToolActiveBykey: (state: {
444
+ isPc: boolean;
445
+ pTools: {
446
+ id: number;
447
+ key: string;
448
+ name: string;
449
+ hasActiveState: boolean;
450
+ component: import('../store/toolbars').ComponentName | "";
451
+ isShowDelimiter: boolean;
452
+ img: string;
453
+ imgActive: string;
454
+ isActive: boolean;
455
+ position?: 0 | 1 | 2 | undefined;
456
+ }[];
457
+ mTools: {
458
+ id: number;
459
+ key: string;
460
+ name: string;
461
+ hasActiveState: boolean;
462
+ component: import('../store/toolbars').ComponentName | "";
463
+ isShowDelimiter: boolean;
464
+ img: string;
465
+ imgActive: string;
466
+ isActive: boolean;
467
+ position?: 0 | 1 | 2 | undefined;
468
+ }[];
469
+ visibleToolIds: number[];
470
+ readyToolIds: number[];
471
+ sectionMode: "plane" | "box" | null;
472
+ } & import('pinia').PiniaCustomStateProperties<{
473
+ isPc: boolean;
474
+ pTools: import('../store/toolbars').Tool[];
475
+ mTools: import('../store/toolbars').Tool[];
476
+ visibleToolIds: number[];
477
+ readyToolIds: number[];
478
+ sectionMode: "plane" | "box" | null;
479
+ }>) => (key: string) => boolean;
480
+ }, {
481
+ setDevice(type: string): void;
482
+ toggleToolVisibility(toolId: any): void;
483
+ setEnableTools(toolIds: number[]): void;
484
+ setEnableToolsByKey(keys: string[]): void;
485
+ setToolActiveStatus(toolId: number, isOpen?: boolean): void;
486
+ setToolActiveStatusBykey(key: string, isOpen?: boolean): void;
487
+ setSectionMode(mode: "plane" | "box" | null): void;
488
+ setAllToolClose(extraTool?: number[]): void;
489
+ setReadyById(toolId: number): void;
490
+ ifToolAllReady(): boolean;
491
+ setReadyTools(toolIds: number[]): void;
492
+ }>;
493
+ /**
494
+ * 剖切工具开关
495
+ * @param active
496
+ */
497
+ static SetActive(active: boolean): void;
498
+ /**
499
+ * 点击模式按钮;重复点击当前模式表示关闭该模式
500
+ * @param mode
501
+ */
502
+ static ToggleMode(mode: Exclude<SectionMode, null>): void;
503
+ /** 重置剖切盒范围(回到初始/最近一次适配范围) */
504
+ static ResetBox(): void;
505
+ /**
506
+ * 显示/隐藏剖切盒控制器(裁剪保留)
507
+ * @returns 切换后是否显示
508
+ */
509
+ static ToggleBoxVisible(): boolean;
510
+ /** 剖切盒控制器当前是否显示 */
511
+ static IsBoxVisible(): boolean;
512
+ /** 关闭剖切盒:销毁盒体并清空当前模式,模型完全恢复 */
513
+ static CloseBox(): void;
514
+ /** 按当前子模式同步剖切面和剖切盒 */
515
+ protected static applyMode(): void;
516
+ /** 停用(但保留)全部剖切面,并记录原本启用的那些 */
517
+ protected static suspendPlanes(): void;
518
+ /** 恢复进入剖切盒之前处于启用状态的剖切面 */
519
+ protected static restorePlanes(): void;
520
+ /** 清空全部剖切面(剖切盒内部的平面由引擎过滤,不会被清掉) */
521
+ protected static clearPlanes(): void;
522
+ /** 销毁剖切盒 */
523
+ protected static destroyBox(): void;
524
+ }
@@ -1,6 +1,7 @@
1
+ import { MeasureTool } from '../utils/eventBus';
1
2
  export default class ViewerManager {
2
3
  static viewerState: {
3
- measureType: string;
4
+ measureType: MeasureTool;
4
5
  };
5
6
  static entityState: {
6
7
  xrayedObjectIds: string[];
@@ -23,6 +24,11 @@ export default class ViewerManager {
23
24
  */
24
25
  static GetModelBrightness(modelId: string): number | undefined;
25
26
  static SaveViewerState(content: any): void;
27
+ /**
28
+ * 兼容老存档:旧的 `distance` / `angle` 换成新的两点测距 / 三点测角;
29
+ * 应用层当前没开放的模式(例如面面积)退回两点测距,避免面板上没有对应按钮。
30
+ */
31
+ static NormalizeMeasureMode(mode: string): MeasureTool;
26
32
  static SetToolActiveById(id: number, active?: boolean): void;
27
33
  static SetToolActiveByKey(key: string, active?: boolean): void;
28
34
  static SetAllClose(): void;