@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
@@ -1,4 +1,4 @@
1
- export type ComponentName = "StructureTree" | "InspectorTool" | "HiddenTool" | "RoamTool" | "CameraViewTool" | "MeasureTool" | "SectionTool" | "CommentTool" | "AnnotationTool" | "ScreenShotTool" | "SettingTool" | "NavigateTool" | "BCFTool" | "MouseTool";
1
+ export type ComponentName = "StructureTree" | "InspectorTool" | "HiddenTool" | "RoamTool" | "CameraViewTool" | "MeasureTool" | "SectionTool" | "CommentTool" | "AnnotationTool" | "ScreenShotTool" | "SettingTool" | "NavigateTool" | "BCFTool" | "MouseTool" | "OperateTool";
2
2
  export type Tool = {
3
3
  id: number;
4
4
  key: string;
@@ -17,6 +17,7 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
17
17
  mTools: Tool[];
18
18
  visibleToolIds: number[];
19
19
  readyToolIds: number[];
20
+ sectionMode: "plane" | "box" | null;
20
21
  }, {
21
22
  tools: (state: {
22
23
  isPc: boolean;
@@ -46,12 +47,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
46
47
  }[];
47
48
  visibleToolIds: number[];
48
49
  readyToolIds: number[];
50
+ sectionMode: "plane" | "box" | null;
49
51
  } & import('pinia').PiniaCustomStateProperties<{
50
52
  isPc: boolean;
51
53
  pTools: Tool[];
52
54
  mTools: Tool[];
53
55
  visibleToolIds: number[];
54
56
  readyToolIds: number[];
57
+ sectionMode: "plane" | "box" | null;
55
58
  }>) => {
56
59
  id: number;
57
60
  key: string;
@@ -92,12 +95,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
92
95
  }[];
93
96
  visibleToolIds: number[];
94
97
  readyToolIds: number[];
98
+ sectionMode: "plane" | "box" | null;
95
99
  } & import('pinia').PiniaCustomStateProperties<{
96
100
  isPc: boolean;
97
101
  pTools: Tool[];
98
102
  mTools: Tool[];
99
103
  visibleToolIds: number[];
100
104
  readyToolIds: number[];
105
+ sectionMode: "plane" | "box" | null;
101
106
  }>) => Tool[];
102
107
  readyTools: (state: {
103
108
  isPc: boolean;
@@ -127,12 +132,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
127
132
  }[];
128
133
  visibleToolIds: number[];
129
134
  readyToolIds: number[];
135
+ sectionMode: "plane" | "box" | null;
130
136
  } & import('pinia').PiniaCustomStateProperties<{
131
137
  isPc: boolean;
132
138
  pTools: Tool[];
133
139
  mTools: Tool[];
134
140
  visibleToolIds: number[];
135
141
  readyToolIds: number[];
142
+ sectionMode: "plane" | "box" | null;
136
143
  }>) => number[];
137
144
  visibleComponents: (state: {
138
145
  isPc: boolean;
@@ -162,12 +169,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
162
169
  }[];
163
170
  visibleToolIds: number[];
164
171
  readyToolIds: number[];
172
+ sectionMode: "plane" | "box" | null;
165
173
  } & import('pinia').PiniaCustomStateProperties<{
166
174
  isPc: boolean;
167
175
  pTools: Tool[];
168
176
  mTools: Tool[];
169
177
  visibleToolIds: number[];
170
178
  readyToolIds: number[];
179
+ sectionMode: "plane" | "box" | null;
171
180
  }>) => ("" | ComponentName)[];
172
181
  getKeyById: (state: {
173
182
  isPc: boolean;
@@ -197,12 +206,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
197
206
  }[];
198
207
  visibleToolIds: number[];
199
208
  readyToolIds: number[];
209
+ sectionMode: "plane" | "box" | null;
200
210
  } & import('pinia').PiniaCustomStateProperties<{
201
211
  isPc: boolean;
202
212
  pTools: Tool[];
203
213
  mTools: Tool[];
204
214
  visibleToolIds: number[];
205
215
  readyToolIds: number[];
216
+ sectionMode: "plane" | "box" | null;
206
217
  }>) => (toolId: number) => string | undefined;
207
218
  getToolById: (state: {
208
219
  isPc: boolean;
@@ -232,12 +243,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
232
243
  }[];
233
244
  visibleToolIds: number[];
234
245
  readyToolIds: number[];
246
+ sectionMode: "plane" | "box" | null;
235
247
  } & import('pinia').PiniaCustomStateProperties<{
236
248
  isPc: boolean;
237
249
  pTools: Tool[];
238
250
  mTools: Tool[];
239
251
  visibleToolIds: number[];
240
252
  readyToolIds: number[];
253
+ sectionMode: "plane" | "box" | null;
241
254
  }>) => (toolId: number) => Tool | undefined;
242
255
  getToolByKey: (state: {
243
256
  isPc: boolean;
@@ -267,12 +280,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
267
280
  }[];
268
281
  visibleToolIds: number[];
269
282
  readyToolIds: number[];
283
+ sectionMode: "plane" | "box" | null;
270
284
  } & import('pinia').PiniaCustomStateProperties<{
271
285
  isPc: boolean;
272
286
  pTools: Tool[];
273
287
  mTools: Tool[];
274
288
  visibleToolIds: number[];
275
289
  readyToolIds: number[];
290
+ sectionMode: "plane" | "box" | null;
276
291
  }>) => (key: string) => Tool | undefined;
277
292
  hasActiveState: (state: {
278
293
  isPc: boolean;
@@ -302,12 +317,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
302
317
  }[];
303
318
  visibleToolIds: number[];
304
319
  readyToolIds: number[];
320
+ sectionMode: "plane" | "box" | null;
305
321
  } & import('pinia').PiniaCustomStateProperties<{
306
322
  isPc: boolean;
307
323
  pTools: Tool[];
308
324
  mTools: Tool[];
309
325
  visibleToolIds: number[];
310
326
  readyToolIds: number[];
327
+ sectionMode: "plane" | "box" | null;
311
328
  }>) => (id: number) => boolean;
312
329
  isToolEnable: (state: {
313
330
  isPc: boolean;
@@ -337,12 +354,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
337
354
  }[];
338
355
  visibleToolIds: number[];
339
356
  readyToolIds: number[];
357
+ sectionMode: "plane" | "box" | null;
340
358
  } & import('pinia').PiniaCustomStateProperties<{
341
359
  isPc: boolean;
342
360
  pTools: Tool[];
343
361
  mTools: Tool[];
344
362
  visibleToolIds: number[];
345
363
  readyToolIds: number[];
364
+ sectionMode: "plane" | "box" | null;
346
365
  }>) => (id: number) => boolean;
347
366
  isToolEnableBykey: (state: {
348
367
  isPc: boolean;
@@ -372,12 +391,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
372
391
  }[];
373
392
  visibleToolIds: number[];
374
393
  readyToolIds: number[];
394
+ sectionMode: "plane" | "box" | null;
375
395
  } & import('pinia').PiniaCustomStateProperties<{
376
396
  isPc: boolean;
377
397
  pTools: Tool[];
378
398
  mTools: Tool[];
379
399
  visibleToolIds: number[];
380
400
  readyToolIds: number[];
401
+ sectionMode: "plane" | "box" | null;
381
402
  }>) => (key: string) => boolean;
382
403
  isToolActive: (state: {
383
404
  isPc: boolean;
@@ -407,12 +428,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
407
428
  }[];
408
429
  visibleToolIds: number[];
409
430
  readyToolIds: number[];
431
+ sectionMode: "plane" | "box" | null;
410
432
  } & import('pinia').PiniaCustomStateProperties<{
411
433
  isPc: boolean;
412
434
  pTools: Tool[];
413
435
  mTools: Tool[];
414
436
  visibleToolIds: number[];
415
437
  readyToolIds: number[];
438
+ sectionMode: "plane" | "box" | null;
416
439
  }>) => (id: number) => boolean;
417
440
  isToolActiveBykey: (state: {
418
441
  isPc: boolean;
@@ -442,12 +465,14 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
442
465
  }[];
443
466
  visibleToolIds: number[];
444
467
  readyToolIds: number[];
468
+ sectionMode: "plane" | "box" | null;
445
469
  } & import('pinia').PiniaCustomStateProperties<{
446
470
  isPc: boolean;
447
471
  pTools: Tool[];
448
472
  mTools: Tool[];
449
473
  visibleToolIds: number[];
450
474
  readyToolIds: number[];
475
+ sectionMode: "plane" | "box" | null;
451
476
  }>) => (key: string) => boolean;
452
477
  }, {
453
478
  setDevice(type: string): void;
@@ -456,6 +481,7 @@ export declare const useToolbarStore: import('pinia').StoreDefinition<"toolbar",
456
481
  setEnableToolsByKey(keys: string[]): void;
457
482
  setToolActiveStatus(toolId: number, isOpen?: boolean): void;
458
483
  setToolActiveStatusBykey(key: string, isOpen?: boolean): void;
484
+ setSectionMode(mode: "plane" | "box" | null): void;
459
485
  setAllToolClose(extraTool?: number[]): void;
460
486
  setReadyById(toolId: number): void;
461
487
  ifToolAllReady(): boolean;
@@ -467,6 +493,7 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
467
493
  mTools: Tool[];
468
494
  visibleToolIds: number[];
469
495
  readyToolIds: number[];
496
+ sectionMode: "plane" | "box" | null;
470
497
  }, {
471
498
  tools: (state: {
472
499
  isPc: boolean;
@@ -496,12 +523,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
496
523
  }[];
497
524
  visibleToolIds: number[];
498
525
  readyToolIds: number[];
526
+ sectionMode: "plane" | "box" | null;
499
527
  } & import('pinia').PiniaCustomStateProperties<{
500
528
  isPc: boolean;
501
529
  pTools: Tool[];
502
530
  mTools: Tool[];
503
531
  visibleToolIds: number[];
504
532
  readyToolIds: number[];
533
+ sectionMode: "plane" | "box" | null;
505
534
  }>) => {
506
535
  id: number;
507
536
  key: string;
@@ -542,12 +571,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
542
571
  }[];
543
572
  visibleToolIds: number[];
544
573
  readyToolIds: number[];
574
+ sectionMode: "plane" | "box" | null;
545
575
  } & import('pinia').PiniaCustomStateProperties<{
546
576
  isPc: boolean;
547
577
  pTools: Tool[];
548
578
  mTools: Tool[];
549
579
  visibleToolIds: number[];
550
580
  readyToolIds: number[];
581
+ sectionMode: "plane" | "box" | null;
551
582
  }>) => Tool[];
552
583
  readyTools: (state: {
553
584
  isPc: boolean;
@@ -577,12 +608,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
577
608
  }[];
578
609
  visibleToolIds: number[];
579
610
  readyToolIds: number[];
611
+ sectionMode: "plane" | "box" | null;
580
612
  } & import('pinia').PiniaCustomStateProperties<{
581
613
  isPc: boolean;
582
614
  pTools: Tool[];
583
615
  mTools: Tool[];
584
616
  visibleToolIds: number[];
585
617
  readyToolIds: number[];
618
+ sectionMode: "plane" | "box" | null;
586
619
  }>) => number[];
587
620
  visibleComponents: (state: {
588
621
  isPc: boolean;
@@ -612,12 +645,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
612
645
  }[];
613
646
  visibleToolIds: number[];
614
647
  readyToolIds: number[];
648
+ sectionMode: "plane" | "box" | null;
615
649
  } & import('pinia').PiniaCustomStateProperties<{
616
650
  isPc: boolean;
617
651
  pTools: Tool[];
618
652
  mTools: Tool[];
619
653
  visibleToolIds: number[];
620
654
  readyToolIds: number[];
655
+ sectionMode: "plane" | "box" | null;
621
656
  }>) => ("" | ComponentName)[];
622
657
  getKeyById: (state: {
623
658
  isPc: boolean;
@@ -647,12 +682,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
647
682
  }[];
648
683
  visibleToolIds: number[];
649
684
  readyToolIds: number[];
685
+ sectionMode: "plane" | "box" | null;
650
686
  } & import('pinia').PiniaCustomStateProperties<{
651
687
  isPc: boolean;
652
688
  pTools: Tool[];
653
689
  mTools: Tool[];
654
690
  visibleToolIds: number[];
655
691
  readyToolIds: number[];
692
+ sectionMode: "plane" | "box" | null;
656
693
  }>) => (toolId: number) => string | undefined;
657
694
  getToolById: (state: {
658
695
  isPc: boolean;
@@ -682,12 +719,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
682
719
  }[];
683
720
  visibleToolIds: number[];
684
721
  readyToolIds: number[];
722
+ sectionMode: "plane" | "box" | null;
685
723
  } & import('pinia').PiniaCustomStateProperties<{
686
724
  isPc: boolean;
687
725
  pTools: Tool[];
688
726
  mTools: Tool[];
689
727
  visibleToolIds: number[];
690
728
  readyToolIds: number[];
729
+ sectionMode: "plane" | "box" | null;
691
730
  }>) => (toolId: number) => Tool | undefined;
692
731
  getToolByKey: (state: {
693
732
  isPc: boolean;
@@ -717,12 +756,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
717
756
  }[];
718
757
  visibleToolIds: number[];
719
758
  readyToolIds: number[];
759
+ sectionMode: "plane" | "box" | null;
720
760
  } & import('pinia').PiniaCustomStateProperties<{
721
761
  isPc: boolean;
722
762
  pTools: Tool[];
723
763
  mTools: Tool[];
724
764
  visibleToolIds: number[];
725
765
  readyToolIds: number[];
766
+ sectionMode: "plane" | "box" | null;
726
767
  }>) => (key: string) => Tool | undefined;
727
768
  hasActiveState: (state: {
728
769
  isPc: boolean;
@@ -752,12 +793,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
752
793
  }[];
753
794
  visibleToolIds: number[];
754
795
  readyToolIds: number[];
796
+ sectionMode: "plane" | "box" | null;
755
797
  } & import('pinia').PiniaCustomStateProperties<{
756
798
  isPc: boolean;
757
799
  pTools: Tool[];
758
800
  mTools: Tool[];
759
801
  visibleToolIds: number[];
760
802
  readyToolIds: number[];
803
+ sectionMode: "plane" | "box" | null;
761
804
  }>) => (id: number) => boolean;
762
805
  isToolEnable: (state: {
763
806
  isPc: boolean;
@@ -787,12 +830,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
787
830
  }[];
788
831
  visibleToolIds: number[];
789
832
  readyToolIds: number[];
833
+ sectionMode: "plane" | "box" | null;
790
834
  } & import('pinia').PiniaCustomStateProperties<{
791
835
  isPc: boolean;
792
836
  pTools: Tool[];
793
837
  mTools: Tool[];
794
838
  visibleToolIds: number[];
795
839
  readyToolIds: number[];
840
+ sectionMode: "plane" | "box" | null;
796
841
  }>) => (id: number) => boolean;
797
842
  isToolEnableBykey: (state: {
798
843
  isPc: boolean;
@@ -822,12 +867,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
822
867
  }[];
823
868
  visibleToolIds: number[];
824
869
  readyToolIds: number[];
870
+ sectionMode: "plane" | "box" | null;
825
871
  } & import('pinia').PiniaCustomStateProperties<{
826
872
  isPc: boolean;
827
873
  pTools: Tool[];
828
874
  mTools: Tool[];
829
875
  visibleToolIds: number[];
830
876
  readyToolIds: number[];
877
+ sectionMode: "plane" | "box" | null;
831
878
  }>) => (key: string) => boolean;
832
879
  isToolActive: (state: {
833
880
  isPc: boolean;
@@ -857,12 +904,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
857
904
  }[];
858
905
  visibleToolIds: number[];
859
906
  readyToolIds: number[];
907
+ sectionMode: "plane" | "box" | null;
860
908
  } & import('pinia').PiniaCustomStateProperties<{
861
909
  isPc: boolean;
862
910
  pTools: Tool[];
863
911
  mTools: Tool[];
864
912
  visibleToolIds: number[];
865
913
  readyToolIds: number[];
914
+ sectionMode: "plane" | "box" | null;
866
915
  }>) => (id: number) => boolean;
867
916
  isToolActiveBykey: (state: {
868
917
  isPc: boolean;
@@ -892,12 +941,14 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
892
941
  }[];
893
942
  visibleToolIds: number[];
894
943
  readyToolIds: number[];
944
+ sectionMode: "plane" | "box" | null;
895
945
  } & import('pinia').PiniaCustomStateProperties<{
896
946
  isPc: boolean;
897
947
  pTools: Tool[];
898
948
  mTools: Tool[];
899
949
  visibleToolIds: number[];
900
950
  readyToolIds: number[];
951
+ sectionMode: "plane" | "box" | null;
901
952
  }>) => (key: string) => boolean;
902
953
  }, {
903
954
  setDevice(type: string): void;
@@ -906,6 +957,7 @@ export declare function getToolbarStore(): import('pinia').Store<"toolbar", {
906
957
  setEnableToolsByKey(keys: string[]): void;
907
958
  setToolActiveStatus(toolId: number, isOpen?: boolean): void;
908
959
  setToolActiveStatusBykey(key: string, isOpen?: boolean): void;
960
+ setSectionMode(mode: "plane" | "box" | null): void;
909
961
  setAllToolClose(extraTool?: number[]): void;
910
962
  setReadyById(toolId: number): void;
911
963
  ifToolAllReady(): boolean;
@@ -1,5 +1,7 @@
1
1
  export default class OSSHelper {
2
2
  static getBuffer(filePath: string, done: Function, error?: Function): Promise<void>;
3
+ /** 下载单个文件并返回 ArrayBuffer(Promise 风格,便于并发) */
4
+ static fetchBuffer(filePath: string): Promise<ArrayBuffer>;
3
5
  static requestFileFromOSS(filePath: string, isFile: boolean, done: Function, error: Function): Promise<void>;
4
6
  static downloadFile(filePath: string): Promise<ArrayBuffer>;
5
7
  }
@@ -16,7 +16,10 @@ export declare let EventMemory: {
16
16
  };
17
17
  export type AnnoType = "file" | "image" | "record" | "text" | "video";
18
18
  export type RoamEvent = "goUp" | "goDown" | "goLeft" | "goRight" | "goForward" | "goBackward" | "stop";
19
- export type MeasureTool = "distance" | "angle";
19
+ /** 应用层开放的五个测量模式(viewer 还支持 faceArea 面面积,应用层先不放出来) */
20
+ export type MeasureProMode = "pointDistance" | "pointAngle" | "edgeLength" | "edgeDistance" | "edgeAngle" | "circleRadius" | "elevation";
21
+ /** 旧的两种(历史数据 / 老存档还会是这两个值)+ 新的六个模式 */
22
+ export type MeasureTool = "distance" | "angle" | MeasureProMode;
20
23
  export type EventContent = {
21
24
  /**
22
25
  * 是否是功能
@@ -73,6 +76,8 @@ export type EventContent = {
73
76
  title?: string;
74
77
  cameraView?: any;
75
78
  description?: string;
79
+ operateMode?: number;
80
+ operateIds?: string[];
76
81
  };
77
82
  };
78
83
  type instructionName = "updateCmtList" | "checkCmtDetail" | "newComment" | "updateBcfList" | "checkBcfDetail" | "changeBackgroundColor" | "setNavCube" | "setAnnoStatus" | "setCameraView" | "lastSetsContent";
@@ -20,6 +20,35 @@ export declare function createMetadataTask(modelId: string, options: MetadataTas
20
20
  load(targetViewer: any): Promise<void>;
21
21
  cancel(): void;
22
22
  };
23
+ export interface ModelLoadResult {
24
+ code: 200 | -1;
25
+ result: string;
26
+ msg?: string;
27
+ }
28
+ export interface ModelLoadItem {
29
+ /** 模型 ID;为空时由 filePath 推导 */
30
+ modelId?: string;
31
+ /** 下载来源路径(http 完整地址 或 OSS 相对地址),为空表示直接使用 buffer */
32
+ filePath?: string;
33
+ /** 已下载好的模型二进制(filePath 为空时必填) */
34
+ buffer?: ArrayBuffer;
35
+ /** 已就绪的 meta 二进制(可选) */
36
+ metaBuffer?: ArrayBuffer;
37
+ /** 透传引擎 cfg:{ position, scale, rotation, matrix, origin, brightness, ... } */
38
+ options?: Record<string, any>;
39
+ }
40
+ export interface ModelLoaderConfig {
41
+ /** 模型类型(xtc / glb / ifc),默认 xtc */
42
+ modelType?: string;
43
+ /** 是否加载 meta(.xts);不传则运行时取 getConfig("loadMeta") */
44
+ loadMeta?: boolean;
45
+ /** 事件回调:modelLoaded / metaLoading / metaLoaded */
46
+ emit?: (event_name: string, content: any) => void;
47
+ /** 多模型是否顺序加载:true 等待每个模型加载完成再加载下一个;false 各自就绪即加载(默认推荐),默认 true */
48
+ sequential?: boolean;
49
+ /** 非顺序加载时的发起间隔毫秒数(仅作节流),默认 0 表示不节流 */
50
+ loadInterval?: number;
51
+ }
23
52
  /**
24
53
  * BIMX 模型加载
25
54
  * @param modelId 模型 ID
@@ -31,4 +60,63 @@ export declare function createMetadataTask(modelId: string, options: MetadataTas
31
60
  * - position / rotation / scale / origin / alignTo: 多模型坐标对齐参数
32
61
  */
33
62
  export default function viewerLoadModel(modelId: string, modelType: string, modelArrayBuffer: ArrayBuffer, callback?: Function, options?: Record<string, any>): void;
63
+ /**
64
+ * 模型加载器:统一封装「下载 -> 引擎加载 -> meta 加载」。
65
+ *
66
+ * 相比逐模型串行「下载-加载」,这里会:
67
+ * - 顺序加载时用流水线预取:下载第 i 个模型的同时加载第 i-1 个,让网络与解析重叠;
68
+ * - 非顺序加载时所有模型并发下载、就绪即加载;
69
+ * - 单文件(model + meta)并发下载;
70
+ * - OSS STS client 在 OSSHelper 内缓存复用,不再每个文件都申请一次凭证。
71
+ */
72
+ export declare class ModelLoader {
73
+ private modelType;
74
+ private loadMetaOverride?;
75
+ private emit;
76
+ /** 多模型是否顺序加载(默认 true) */
77
+ private sequential;
78
+ /** 非顺序加载的发起间隔(毫秒,默认 0 = 不节流) */
79
+ private loadInterval;
80
+ private metaBuffer?;
81
+ private metaReady;
82
+ private metaEventsBound;
83
+ private pendingMetaModel?;
84
+ constructor(config?: ModelLoaderConfig);
85
+ /** 运行时判断是否加载 meta(跟随 config,避免 setup 阶段 getConfig 尚未就绪) */
86
+ private getLoadMeta;
87
+ /** viewer 销毁/重建时重置内部 meta 状态 */
88
+ reset(): void;
89
+ /** 外部传入已就绪的 meta buffer(单模型外部 buffer 场景,可能晚于模型到达) */
90
+ setMetaBuffer(buffer?: ArrayBuffer): void;
91
+ /** 下载单个文件(http 直连 / OSS),返回 Promise<ArrayBuffer> */
92
+ private fetch;
93
+ /** 模型主体下载路径:http 直接用原地址;OSS 补上 .xtc 等类型后缀 */
94
+ private downloadModelPath;
95
+ /** 加载单个已就绪 buffer 的模型到引擎,模型成功后自动处理 meta */
96
+ loadSingle(modelId: string, buffer: ArrayBuffer, metaBuffer?: ArrayBuffer, options?: Record<string, any>): Promise<ModelLoadResult>;
97
+ /** 引擎模型加载成功后处理 meta:可用则立即加载,否则挂起等 setMetaBuffer */
98
+ private handleMetaAfterModelLoad;
99
+ private loadMetadata;
100
+ /** 绑定引擎 meta 事件(只绑一次),转发给 emit */
101
+ private bindMetaEvents;
102
+ /** 按路径加载单个模型:并发下载 model + meta,下载完再引擎加载;下载失败不抛异常 */
103
+ loadFromPath(modelId: string, filePath: string, options?: Record<string, any>): Promise<ModelLoadResult | undefined>;
104
+ /** 下载 meta(.xts);失败不阻断主流程 */
105
+ private downloadMeta;
106
+ /** 准备单个模型:并发下载 model + meta,返回可直接加载的数据;下载失败 buffer 为空(不抛异常) */
107
+ private prepareItem;
108
+ /**
109
+ * 多模型加载。
110
+ *
111
+ * sequential=true:一个一个来,等当前模型 loaded 后再加载下一个。
112
+ * sequential=false(对齐 xtctwins 示例用法):所有模型同时开始下载,
113
+ * 「谁的 buffer 先到就立即加载谁」,互不等待、默认不插入任何延迟。
114
+ * 这样下载与解析天然重叠,是引擎下最快的加载方式。
115
+ *
116
+ * loadInterval 仅作为可选的发起节流(默认 0 不节流)。
117
+ */
118
+ loadMulti(items: ModelLoadItem[]): Promise<ModelLoadResult[]>;
119
+ /** 延迟指定毫秒数 */
120
+ private sleep;
121
+ }
34
122
  export {};