@xtctwins/tctwins-bimx-engine 0.3.2 → 0.3.3

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 (170) hide show
  1. package/README.md +196 -193
  2. package/dist/AnnotationTool-C3o-nYdK.mjs +167 -0
  3. package/dist/BIMX_Viewer_Lib.es.js +3 -3
  4. package/dist/BIMX_Viewer_Lib.umd.js +165 -265
  5. package/dist/CameraViewTool-DaGFzAdV.mjs +164 -0
  6. package/dist/CommentTool-BuqyVt4A.mjs +1529 -0
  7. package/dist/{HiddenTool-rORoKTeD.mjs → HiddenTool-B20p_qDY.mjs} +16 -16
  8. package/dist/{InspectorTool-l4bDxTia.mjs → InspectorTool-ChM2elpV.mjs} +66 -66
  9. package/dist/{MeasureTool-d-EV6m2R.mjs → MeasureTool-BZF__yUT.mjs} +107 -131
  10. package/dist/{MouseTool-DKMcdeRD.mjs → MouseTool-Bhmif0vq.mjs} +32 -35
  11. package/dist/{NavigateTool-BNvZ8Oat.mjs → NavigateTool-DER-SD2Y.mjs} +13 -13
  12. package/dist/{RoamTool-DJu93SVl.mjs → RoamTool-B2fyUtKk.mjs} +14 -14
  13. package/dist/ScreenShotTool-C8iq1Ssm.mjs +357 -0
  14. package/dist/SectionTool-CL95rzx4.mjs +331 -0
  15. package/dist/SettingTool-b9HLJ1iu.mjs +657 -0
  16. package/dist/StructureTree-DlqVbX97.mjs +1583 -0
  17. package/dist/{Alert-5pEYzrMO.mjs → alert-DoM5CyWV.mjs} +8 -8
  18. package/dist/const-DOnRsYpZ.mjs +389 -0
  19. package/dist/el-input-number-Bj97l7q_.mjs +818 -0
  20. package/dist/index-Cslxj2q_.mjs +128302 -0
  21. package/dist/index.html +17 -17
  22. package/dist/{Panel.vue_vue_type_style_index_0_lang-C4tqfy-B.mjs → panel.vue_vue_type_style_index_0_lang-r40t3eim.mjs} +2 -2
  23. package/dist/style.css +1 -1
  24. package/dist/{TallPanel-DtXOSzmF.mjs → tallPanel-CdjNke7H.mjs} +14 -14
  25. package/package.json +3 -4
  26. package/types/components/BCFComponents/BCFAddPanel.vue.d.ts +10 -38
  27. package/types/components/BCFComponents/BCFCommentNew.vue.d.ts +22 -0
  28. package/types/components/BCFComponents/BCFDetailPanel.vue.d.ts +9 -37
  29. package/types/components/BCFComponents/BCFDisplayList.vue.d.ts +7 -5
  30. package/types/components/BCFComponents/BCFFilter.vue.d.ts +7 -5
  31. package/types/components/BCFComponents/BCFTool.vue.d.ts +7 -4
  32. package/types/components/BCFComponents/addObjectOrAnno.vue.d.ts +7 -5
  33. package/types/components/BCFComponents/checkObjectPanel.vue.d.ts +6 -5
  34. package/types/components/BCFComponents/commentInput.vue.d.ts +10 -36
  35. package/types/components/BCFComponents/commentsView.vue.d.ts +7 -36
  36. package/types/components/BCFComponents/dialogPanel.vue.d.ts +8 -5
  37. package/types/components/BCFComponents/imageView.vue.d.ts +7 -5
  38. package/types/components/BCFComponents/imageZoomIn.vue.d.ts +6 -5
  39. package/types/components/BimViewerComponents/AnnotationTool.vue.d.ts +1 -1
  40. package/types/components/BimViewerComponents/AppToolbar.vue.d.ts +1 -18
  41. package/types/components/{tools/NavigateTool.vue.d.ts → BimViewerComponents/CameraViewTool.vue.d.ts} +3 -1
  42. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +1 -1
  43. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +1 -32
  44. package/types/components/BimViewerComponents/HiddenTool.vue.d.ts +1 -1
  45. package/types/components/BimViewerComponents/InspectorTool.vue.d.ts +0 -2
  46. package/types/components/BimViewerComponents/MeasureTool.vue.d.ts +0 -2
  47. package/types/components/BimViewerComponents/MobileCommentsTool/{MobileCommentAdd.vue.d.ts → add.vue.d.ts} +8 -6
  48. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +5 -4
  49. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +2 -2
  50. package/types/components/BimViewerComponents/MobileCommentsTool/filter.vue.d.ts +1 -478
  51. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +7 -499
  52. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +6 -5
  53. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +1 -1
  54. package/types/components/BimViewerComponents/NavigateTool.vue.d.ts +1 -1
  55. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +1 -1
  56. package/types/components/BimViewerComponents/RoamTool.vue.d.ts +1 -1
  57. package/types/components/BimViewerComponents/SectionTool.vue.d.ts +0 -4
  58. package/types/components/BimViewerComponents/SettingTool.vue.d.ts +6 -4
  59. package/types/components/BimViewerComponents/StructureTree.vue.d.ts +1 -4026
  60. package/types/components/BimViewerComponents/Toolbar.vue.d.ts +1 -1
  61. package/types/components/BimViewerComponents/emptyPage.vue.d.ts +8 -0
  62. package/types/components/BimViewerComponents/mobileToolbar.vue.d.ts +1 -18
  63. package/types/components/BimxViewerComp.vue.d.ts +14 -7
  64. package/types/components/MobileBCFComponents/MobileBCFAdd.vue.d.ts +10 -37
  65. package/types/components/MobileBCFComponents/MobileBCFDetail.vue.d.ts +9 -37
  66. package/types/components/MobileBCFComponents/MobileBCFDisplayList.vue.d.ts +7 -499
  67. package/types/components/MobileBCFComponents/MobileBCFFilter.vue.d.ts +1 -478
  68. package/types/components/MobileBCFComponents/MobileBCFTool.vue.d.ts +8 -5
  69. package/types/components/MobileBCFComponents/MobileCommentInput.vue.d.ts +12 -38
  70. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +9 -7
  71. package/types/components/MobileBCFComponents/selectPanel.vue.d.ts +7 -5
  72. package/types/components/bimxViewer.vue.d.ts +14 -7
  73. package/types/components/utilsComponents/alert.vue.d.ts +1 -1
  74. package/types/components/utilsComponents/closeButton.vue.d.ts +1 -1
  75. package/types/components/utilsComponents/closeButton_dark.vue.d.ts +1 -1
  76. package/types/components/utilsComponents/emptyPage.vue.d.ts +1 -1
  77. package/types/components/utilsComponents/loading.vue.d.ts +1 -1
  78. package/types/components/utilsComponents/panel.vue.d.ts +2 -8
  79. package/types/components/utilsComponents/prompt.vue.d.ts +1 -1
  80. package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -3
  81. package/types/components/utilsComponents/tallPanel.vue.d.ts +3 -13
  82. package/types/components/utilsComponents/tallPanel_noPos.vue.d.ts +3 -13
  83. package/types/i18n/index.d.ts +5 -5
  84. package/types/i18n/locales/en-US.d.ts +1 -1
  85. package/types/i18n/locales/zh-CN.d.ts +1 -1
  86. package/types/pages/BimxViewerEntry.vue.d.ts +59 -5
  87. package/types/pages/viewerEntry.vue.d.ts +57 -7
  88. package/types/store/bcfReflect.d.ts +81 -13
  89. package/types/store/const.d.ts +228 -11
  90. package/types/store/initConfigs.d.ts +1 -1
  91. package/types/store/toolbars.d.ts +117 -69
  92. package/types/store/userInfoStore.d.ts +1 -1
  93. package/types/tests/cmt.d.ts +1 -0
  94. package/types/utils/OSSHelper.d.ts +0 -27
  95. package/types/utils/cacheInfo.d.ts +3 -26
  96. package/types/utils/eventBus.d.ts +87 -1
  97. package/types/viewerManager/viewerManager.d.ts +3 -53
  98. package/dist/AnnotationTool-B3tDIyWy.mjs +0 -239
  99. package/dist/CommentTool--UgPVIZZ.mjs +0 -1541
  100. package/dist/ScreenShotTool-D2h0Qjtv.mjs +0 -430
  101. package/dist/SectionTool-DHw2Zfzv.mjs +0 -343
  102. package/dist/SettingTool-D13GBT87.mjs +0 -747
  103. package/dist/StructureTree-DHaOzAP9.mjs +0 -1662
  104. package/dist/bimTools-D3TraX9d.mjs +0 -75
  105. package/dist/el-slider-CHaMBaUG.mjs +0 -1040
  106. package/dist/index-BDupeKSG.mjs +0 -127986
  107. package/types/components/bcf/AddObjectOrAnno.vue.d.ts +0 -16
  108. package/types/components/bcf/BCFAddPanel.vue.d.ts +0 -55
  109. package/types/components/bcf/BCFDetailPanel.vue.d.ts +0 -59
  110. package/types/components/bcf/BCFDisplayList.vue.d.ts +0 -18
  111. package/types/components/bcf/BCFFilter.vue.d.ts +0 -14
  112. package/types/components/bcf/BCFTool.vue.d.ts +0 -15
  113. package/types/components/bcf/CheckObjectPanel.vue.d.ts +0 -11
  114. package/types/components/bcf/CommentInput.vue.d.ts +0 -51
  115. package/types/components/bcf/CommentsView.vue.d.ts +0 -48
  116. package/types/components/bcf/DialogPanel.vue.d.ts +0 -15
  117. package/types/components/bcf/ImageView.vue.d.ts +0 -17
  118. package/types/components/bcf/ImageZoomIn.vue.d.ts +0 -9
  119. package/types/components/bcf/MobileBCFAdd.vue.d.ts +0 -56
  120. package/types/components/bcf/MobileBCFDetail.vue.d.ts +0 -55
  121. package/types/components/bcf/MobileBCFDisplayList.vue.d.ts +0 -498
  122. package/types/components/bcf/MobileBCFFilter.vue.d.ts +0 -475
  123. package/types/components/bcf/MobileBCFTool.vue.d.ts +0 -17
  124. package/types/components/bcf/MobileCommentInput.vue.d.ts +0 -54
  125. package/types/components/bcf/MobileCommentsView.vue.d.ts +0 -17
  126. package/types/components/bcf/SelectPanel.vue.d.ts +0 -12
  127. package/types/components/comment/mobile/MobileCommentAdd.vue.d.ts +0 -14
  128. package/types/components/comment/mobile/MobileDetail.vue.d.ts +0 -11
  129. package/types/components/comment/mobile/MobileDraw.vue.d.ts +0 -17
  130. package/types/components/comment/mobile/MobileFilter.vue.d.ts +0 -475
  131. package/types/components/comment/mobile/MobileList.vue.d.ts +0 -497
  132. package/types/components/comment/mobile/MobileZoomIn.vue.d.ts +0 -9
  133. package/types/components/comment/pc/PcDraw.vue.d.ts +0 -14
  134. package/types/components/shared/Alert.vue.d.ts +0 -32
  135. package/types/components/shared/CloseButton.vue.d.ts +0 -50
  136. package/types/components/shared/CloseButtonDark.vue.d.ts +0 -32
  137. package/types/components/shared/EmptyPage.vue.d.ts +0 -6
  138. package/types/components/shared/Loading.vue.d.ts +0 -2
  139. package/types/components/shared/Panel.vue.d.ts +0 -47
  140. package/types/components/shared/Prompt.vue.d.ts +0 -8
  141. package/types/components/shared/RectangleButton.vue.d.ts +0 -106
  142. package/types/components/shared/TallPanel.vue.d.ts +0 -69
  143. package/types/components/shared/TallPanelNoPos.vue.d.ts +0 -82
  144. package/types/components/tools/AnnotationTool.vue.d.ts +0 -14
  145. package/types/components/tools/AppToolbar.vue.d.ts +0 -27
  146. package/types/components/tools/ClickEvent.vue.d.ts +0 -6
  147. package/types/components/tools/CommentTool.vue.d.ts +0 -45
  148. package/types/components/tools/HiddenTool.vue.d.ts +0 -12
  149. package/types/components/tools/InspectorTool.vue.d.ts +0 -14
  150. package/types/components/tools/MeasureTool.vue.d.ts +0 -14
  151. package/types/components/tools/MouseTool.vue.d.ts +0 -6
  152. package/types/components/tools/RoamTool.vue.d.ts +0 -12
  153. package/types/components/tools/ScreenShotTool.vue.d.ts +0 -10
  154. package/types/components/tools/SectionTool.vue.d.ts +0 -14
  155. package/types/components/tools/SettingTool.vue.d.ts +0 -13
  156. package/types/components/tools/StructureTree.vue.d.ts +0 -11645
  157. package/types/components/tools/Toolbar.vue.d.ts +0 -10
  158. package/types/composables/useBimViewerEvent.d.ts +0 -44
  159. package/types/composables/useEmitHandler.d.ts +0 -2
  160. package/types/composables/useToolActive.d.ts +0 -1
  161. package/types/composables/useToolReady.d.ts +0 -1
  162. package/types/store/const/app.d.ts +0 -66
  163. package/types/store/const/bimTools.d.ts +0 -81
  164. package/types/store/const/project.d.ts +0 -48
  165. package/types/store/const/theme.d.ts +0 -16
  166. package/types/store/const/toolbar.d.ts +0 -26
  167. package/types/stores/viewerStore.d.ts +0 -112
  168. package/types/types/bcf.d.ts +0 -83
  169. package/types/types/events.d.ts +0 -88
  170. package/types/utils/dbscan.d.ts +0 -1
package/README.md CHANGED
@@ -1,193 +1,196 @@
1
- ## @xtctwins/tctwins-bimx-engine
2
-
3
- # xtc 三维文件查看器
4
-
5
- ## 安装相关依赖
6
-
7
- ## UI element-plus
8
-
9
- <https://www.npmjs.com/package/element-plus>
10
-
11
- ```ssh
12
- npm i element-plus
13
- ```
14
-
15
- ## 事件总线 mitt
16
-
17
- <https://www.npmjs.com/package/mitt>
18
-
19
- ```ssh
20
- npm i mitt
21
- ```
22
-
23
- ## 状态管理 pinia
24
-
25
- <https://www.npmjs.com/package/pinia>
26
-
27
- ```ssh
28
- npm i pinia
29
- ```
30
-
31
- ## 文件获取 ali-oss
32
-
33
- <https://www.npmjs.com/package/ali-oss>
34
-
35
- ```ssh
36
- npm i ali-oss
37
- ```
38
-
39
- # 安装依赖
40
-
41
- ```ssh
42
- // 安装依赖
43
- npm i @xtctwins/tctwins-bimx-engine
44
- // 引入样式
45
- import "@xtctwins/tctwins-bimx-engine/dist/style.css";
46
- ```
47
-
48
- # Example
49
-
50
- ```ts
51
- <template>
52
- <!-- 一个模型 -->
53
- <!-- :model-buffer 和 :file-path 选一个使用即可-->
54
- <!-- :model-buffer 是直接传入模型buffer数据-->
55
- <!-- :file-path 是传入文件下载路径-->
56
- <BIMXViewer
57
- v-if="initialzed"
58
- :load-meta="true"
59
- :file-path="filePath"
60
- :nav-cube-size="120"
61
- :background-color="'#d0d0d0'"
62
- @emit-handler="EmitHandler" />
63
-
64
- <!-- 集成模型 -->
65
- <!-- 请使用-->
66
- <!--:file-paths="filePaths"-->
67
- <!--:multi-model="true"-->
68
- </template>
69
-
70
- <script lang="ts" setup>
71
- import { onMounted, ref } from "vue";
72
- import { BIMXViewer } from "@xtctwins/tctwins-bimx-engine";
73
- import type { EventContent } from "@xtctwins/tctwins-bimx-engine";
74
- import "@xtctwins/tctwins-bimx-engine/dist/style.css";
75
-
76
- const initialzed = ref(false);
77
- const filePath = ref(`https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
78
- const filePaths = [
79
- "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
80
- "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
81
- "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170731500203.xtc"
82
- ];
83
- const modelBuffer = ref<ArrayBuffer>();
84
-
85
- onMounted(() => {
86
- //如果选择直接传入模型modelBuffer,请在获取到buffer后再初始化BIMXViewer
87
- // getModel(() => {
88
- // initialzed.value = true;
89
- // });
90
-
91
- //如果使用filePath或者filePaths则直接初始化BIMXViewer即可
92
- initialzed.value = true;
93
- });
94
-
95
- //监听引擎传出的事件
96
- const EmitHandler = (content: EventContent) => {
97
- console.log(content);
98
- };
99
-
100
- //xtc模型数据
101
- const getModel = (callback: () => void) => {
102
- // 自行填写获取模型文件的内容
103
- // ...
104
- // modelBuffer.value = ...
105
- callback();
106
- };
107
- </script>
108
-
109
- <style>
110
- #app {
111
- position: absolute;
112
- left: 0;
113
- right: 0;
114
- top: 0;
115
- bottom: 0;
116
- width: 100%;
117
- height: 100%;
118
- }
119
- </style>
120
-
121
- ```
122
-
123
- ## 其他参数解释
124
-
125
- ### 基础设置
126
-
127
- 是否载入构件属性信息(xts文件),
128
- 如果要载入,在模型xtc文件相同路径下必须有同名xts文件
129
-
130
- ```ssh
131
- :load-meta="true"
132
- ```
133
-
134
- 是否显示导航盒
135
-
136
- ```ssh
137
- :showNavCube="true"
138
- ```
139
-
140
- 导航盒尺寸
141
-
142
- ```ssh
143
- :nav-cube-size="120"
144
- ```
145
-
146
- 背景颜色
147
-
148
- ```ssh
149
- :background-color="#d0d0d0"
150
- ```
151
-
152
- ### 功能
153
-
154
- 添加需要的即可
155
-
156
- ```ssh
157
- inspector
158
- ```
159
-
160
- inspector - 构建属性面板开启 (需要开启loadMeta)
161
-
162
- ```ssh
163
- reseta
164
- ```
165
-
166
- reseta - 重置模型视角
167
-
168
- ## 事件
169
-
170
- ```ssh
171
- //监听引擎传出的事件
172
- const EmitHandler = (content: EventContent) => {
173
- console.log(content);
174
- };
175
- ```
176
-
177
- ```ts
178
- //事件内容
179
- type EventContent = {
180
- isTool: boolean;
181
- event_target: ComponentName | "BimXViewer" | "ToolBar";
182
- event_name: string;
183
- content: {};
184
- };
185
- ```
186
-
187
- 事件内容包括:
188
-
189
- ```ssh
190
- "pickedEntity" - 点击构件
191
- "pickedNothing" - 点击空白处
192
- ...
193
- ```
1
+ ## @xtctwins/tctwins-bimx-engine
2
+
3
+ # xtc 三维文件查看器
4
+
5
+ ## 安装相关依赖
6
+
7
+ ## UI element-plus
8
+
9
+ <https://www.npmjs.com/package/element-plus>
10
+
11
+ ```ssh
12
+ npm i element-plus
13
+ ```
14
+
15
+ ## 事件总线 mitt
16
+
17
+ <https://www.npmjs.com/package/mitt>
18
+
19
+ ```ssh
20
+ npm i mitt
21
+ ```
22
+
23
+ ## 状态管理 pinia
24
+
25
+ <https://www.npmjs.com/package/pinia>
26
+
27
+ ```ssh
28
+ npm i pinia
29
+ ```
30
+
31
+ ## 文件获取 ali-oss
32
+
33
+ <https://www.npmjs.com/package/ali-oss>
34
+
35
+ ```ssh
36
+ npm i ali-oss
37
+ ```
38
+
39
+ # 安装依赖
40
+
41
+ ```ssh
42
+ // 安装依赖
43
+ npm i @xtctwins/tctwins-bimx-engine
44
+ // 引入样式
45
+ import "@xtctwins/tctwins-bimx-engine/dist/style.css";
46
+ ```
47
+
48
+ # Example
49
+
50
+ ```ts
51
+ <template>
52
+ <!-- 一个模型 -->
53
+ <!-- :model-buffer 和 :file-path 选一个使用即可-->
54
+ <!-- :model-buffer 是直接传入模型buffer数据-->
55
+ <!-- :file-path 是传入文件下载路径-->
56
+ <BIMXViewer
57
+ v-if="initialzed"
58
+ :load-meta="true"
59
+ :file-path="filePath"
60
+ :nav-cube-size="120"
61
+ :background-color="'#d0d0d0'"
62
+ @emit-handler="EmitHandler" />
63
+
64
+ <!-- 集成模型 -->
65
+ <!-- 请使用-->
66
+ <!--:file-paths="filePaths"-->
67
+ <!--:multi-model="true"-->
68
+ </template>
69
+
70
+ <script lang="ts" setup>
71
+ import { onMounted, ref } from "vue";
72
+ import { BIMXViewer } from "@xtctwins/tctwins-bimx-engine";
73
+ import type { EventContent } from "@xtctwins/tctwins-bimx-engine";
74
+ import "@xtctwins/tctwins-bimx-engine/dist/style.css";
75
+
76
+ const initialzed = ref(false);
77
+ const filePath = ref(`https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
78
+ const filePaths = [
79
+ "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
80
+ "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
81
+ "https://tctwins-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170731500203.xtc"
82
+ ];
83
+ const modelBuffer = ref<ArrayBuffer>();
84
+
85
+ onMounted(() => {
86
+ //如果选择直接传入模型modelBuffer,请在获取到buffer后再初始化BIMXViewer
87
+ // getModel(() => {
88
+ // initialzed.value = true;
89
+ // });
90
+
91
+ //如果使用filePath或者filePaths则直接初始化BIMXViewer即可
92
+ initialzed.value = true;
93
+ });
94
+
95
+ //监听引擎传出的事件
96
+ const EmitHandler = (content: EventContent) => {
97
+ console.log(content);
98
+ };
99
+
100
+ //xtc模型数据
101
+ const getModel = (callback: () => void) => {
102
+ // 自行填写获取模型文件的内容
103
+ // ...
104
+ // modelBuffer.value = ...
105
+ callback();
106
+ };
107
+ </script>
108
+
109
+ <style>
110
+ #app {
111
+ position: absolute;
112
+ left: 0;
113
+ right: 0;
114
+ top: 0;
115
+ bottom: 0;
116
+ width: 100%;
117
+ height: 100%;
118
+ }
119
+ </style>
120
+
121
+ ```
122
+
123
+ ## 其他参数解释
124
+
125
+ ### 基础设置
126
+
127
+ 是否载入构件属性信息(xts文件),
128
+ 如果要载入,在模型xtc文件相同路径下必须有同名xts文件
129
+
130
+ ```ssh
131
+ :load-meta="true"
132
+ ```
133
+
134
+ 是否显示导航盒
135
+
136
+ ```ssh
137
+ :showNavCube="true"
138
+ ```
139
+
140
+ 导航盒尺寸
141
+
142
+ ```ssh
143
+ :nav-cube-size="120"
144
+ ```
145
+
146
+ 背景颜色
147
+
148
+ ```ssh
149
+ :background-color="#d0d0d0"
150
+ ```
151
+
152
+ ### 功能
153
+
154
+ 添加需要的即可
155
+
156
+ ```ssh
157
+ inspector
158
+ ```
159
+
160
+ inspector - 构建属性面板开启 (需要开启loadMeta)
161
+
162
+ ```ssh
163
+ reseta
164
+ ```
165
+
166
+ reseta - 重置模型视角
167
+
168
+ ## 事件
169
+
170
+ ```ssh
171
+ //监听引擎传出的事件
172
+ const EmitHandler = (content: EventContent) => {
173
+ console.log(content);
174
+ };
175
+ ```
176
+
177
+ ```ts
178
+ //事件内容
179
+ type EventContent = {
180
+ isTool: boolean;
181
+ event_target: ComponentName | "BimXViewer" | "ToolBar";
182
+ event_name: string;
183
+ content: {};
184
+ };
185
+ ```
186
+
187
+ 事件内容包括:
188
+
189
+ ```ssh
190
+ "pickedEntity" - 点击构件
191
+ "pickedNothing" - 点击空白处
192
+ ...
193
+ ```
194
+
195
+ ---
196
+ ##### 此版本为正式
@@ -0,0 +1,167 @@
1
+ import { _ as D } from "./alert-DoM5CyWV.mjs";
2
+ import { defineComponent as O, ref as p, watch as q, onMounted as H, onBeforeUnmount as R, openBlock as i, createElementBlock as a, unref as n, createCommentVNode as b, createElementVNode as c, normalizeClass as f, Fragment as B, renderList as C, toDisplayString as U, withDirectives as z, createVNode as F, vShow as j } from "vue";
3
+ import { n as G, o as J, p as t, q as v, O as r, y as K } from "./index-Cslxj2q_.mjs";
4
+ import { A as l } from "./const-DOnRsYpZ.mjs";
5
+ const Q = { class: "annotation_component" }, Y = {
6
+ key: 0,
7
+ id: "annotation_toolbar",
8
+ class: "annotation_toolbar"
9
+ }, Z = {
10
+ key: 0,
11
+ class: "toolbar_trangle"
12
+ }, ee = { class: "annotation_toolbar_group" }, ne = ["id", "disabled", "onClick"], oe = ["src"], te = {
13
+ key: 1,
14
+ class: "toolbar_trangle"
15
+ }, ie = {
16
+ key: 1,
17
+ class: "mobile_annotation_toolbar"
18
+ }, ae = { class: "anno_toolList" }, se = { class: "label-list" }, ce = ["onClick"], re = { class: "item-img" }, le = ["src"], _e = { class: "item-name" }, de = /* @__PURE__ */ O({
19
+ __name: "AnnotationTool",
20
+ props: ["componentId"],
21
+ emits: ["uploadImage", "clickAnnotation", "emitHandler"],
22
+ setup(y, { emit: $ }) {
23
+ const P = G(), w = J(), S = $, d = (e) => {
24
+ S("emitHandler", e);
25
+ };
26
+ let T;
27
+ const A = p(!0), s = p("");
28
+ let m;
29
+ const M = p(), h = y;
30
+ q(
31
+ () => w.isToolActive(h.componentId),
32
+ (e) => {
33
+ e || (s.value = "");
34
+ }
35
+ ), H(() => {
36
+ M.value = t("annoLimit"), w.setReadyById(h.componentId);
37
+ });
38
+ const x = {
39
+ image: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/image_active.png`,
40
+ file: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/file_active.png`,
41
+ record: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/record_active.png`,
42
+ text: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/text_active.png`,
43
+ video: `${r}/BIMX_Website/main/mainView/function_icon/annotation_icons/video_active.png`
44
+ }, k = () => {
45
+ T = window.bimViewer.annotationTool, T.setTypeImage(x), m = window.bimViewer.eventTrigger, m.on("createAnnotation", (e) => {
46
+ d({
47
+ isTool: !0,
48
+ event_target: "AnnotationTool",
49
+ event_name: "createAnnotation",
50
+ content: {
51
+ currentAnnotation: e
52
+ }
53
+ });
54
+ }), m.on("markerClicked", (e) => {
55
+ d({
56
+ isTool: !0,
57
+ event_target: "AnnotationTool",
58
+ event_name: "clickAnnotation",
59
+ content: {
60
+ targetAnno: e
61
+ }
62
+ });
63
+ }), t("isMobile") || m.on("requestDeleteMarker", (e) => {
64
+ d({
65
+ isTool: !0,
66
+ event_target: "AnnotationTool",
67
+ event_name: "requestDelAnno",
68
+ content: {
69
+ msg: "请求删除指定标注",
70
+ annoId: e
71
+ }
72
+ });
73
+ });
74
+ };
75
+ v.on("BimViewer", k);
76
+ const I = (e) => {
77
+ g(L(e.type));
78
+ };
79
+ v.on("setAnnoStatus", I), R(() => {
80
+ v.off("BimViewer", k), v.off("setAnnoStatus", I);
81
+ });
82
+ const L = (e) => {
83
+ if (e === "image")
84
+ return l[0];
85
+ if (e === "record")
86
+ return l[1];
87
+ if (e === "video")
88
+ return l[2];
89
+ if (e === "file")
90
+ return l[3];
91
+ if (e === "text")
92
+ return l[4];
93
+ }, g = (e) => {
94
+ t("editPrivilege") != 1 && (s.value === e.code ? (s.value = "", V(e, !1)) : (s.value = e.code, V(e, !0)));
95
+ }, N = (e) => {
96
+ window.bimViewer.annotationTool.setEnabled(e);
97
+ }, V = (e, _) => {
98
+ N(_), E(e.code, _);
99
+ }, E = (e, _) => {
100
+ window.bimViewer.annotationTool.setCurrentType(e), d({
101
+ isTool: !0,
102
+ event_target: "AnnotationTool",
103
+ event_name: "clickAnnoTool",
104
+ content: {
105
+ active: _,
106
+ tool_type: e
107
+ }
108
+ });
109
+ };
110
+ return (e, _) => {
111
+ const W = D;
112
+ return i(), a("div", Q, [
113
+ n(t)("isMobile") ? (i(), a("div", ie, [
114
+ c("div", ae, [
115
+ c("div", se, [
116
+ (i(!0), a(B, null, C(n(l), (o, u) => (i(), a("div", {
117
+ key: u,
118
+ class: f(["label-item", { "label-item-active": s.value === o.code && n(t)("editPrivilege") == 0, noPermission: n(t)("editPrivilege") == 1 }]),
119
+ onClick: (X) => g(o)
120
+ }, [
121
+ c("div", re, [
122
+ c("img", {
123
+ class: "label-item-img",
124
+ src: n(r) + `/bim-viewer/annotation/new-icons/bimkk-mobile-anno-${s.value === o.code && n(t)("editPrivilege") == 0 ? o.imgActive : o.img}.svg`,
125
+ alt: ""
126
+ }, null, 8, le),
127
+ c("div", _e, U(n(P)(o.name)), 1)
128
+ ])
129
+ ], 10, ce))), 128))
130
+ ])
131
+ ])
132
+ ])) : (i(), a("div", Y, [
133
+ n(t)("annotationPos").pos.includes("top") ? (i(), a("div", Z)) : b("", !0),
134
+ c("div", {
135
+ class: f(["annotation_toolbar_wrapper", { annotation_toolbar_wrapper_disable: n(t)("editPrivilege") == 1 }])
136
+ }, [
137
+ c("div", ee, [
138
+ (i(!0), a(B, null, C(n(l), (o, u) => (i(), a("button", {
139
+ id: `annotation_tool_btn_${u}`,
140
+ key: u,
141
+ class: f(["annotation_tool_btn", { active: s.value === o.code }]),
142
+ disabled: n(t)("editPrivilege") == 1,
143
+ onClick: (X) => g(o)
144
+ }, [
145
+ b("", !0),
146
+ c("img", {
147
+ src: `${n(r)}/bim-viewer/action-bars/panno-${s.value !== o.code ? o.img : o.imgActive}.svg`
148
+ }, null, 8, oe)
149
+ ], 10, ne))), 128))
150
+ ])
151
+ ], 2),
152
+ n(t)("annotationPos").pos.includes("bottom") ? (i(), a("div", te)) : b("", !0)
153
+ ])),
154
+ z(F(W, {
155
+ "click-handle": () => {
156
+ A.value = !1;
157
+ }
158
+ }, null, 8, ["click-handle"]), [
159
+ [j, A.value && n(t)("editPrivilege") == 0]
160
+ ])
161
+ ]);
162
+ };
163
+ }
164
+ }), pe = /* @__PURE__ */ K(de, [["__scopeId", "data-v-7c08da5a"]]);
165
+ export {
166
+ pe as default
167
+ };
@@ -1,4 +1,4 @@
1
- import { au as e, M as t, av as o, aw as i, V as l, ax as n, ay as I, az as r, aA as C, aB as f, aC as g, aD as u, aE as B, J as M } from "./index-BDupeKSG.mjs";
1
+ import { ao as e, C as t, ap as o, av as i, V as l, as as n, at as I, ay as r, aq as C, au as f, ar as g, aw as u, ax as w, z as y } from "./index-Cslxj2q_.mjs";
2
2
  export {
3
3
  e as BIMXViewer,
4
4
  t as BIMX_CONFIGS,
@@ -12,6 +12,6 @@ export {
12
12
  f as setGlobalI18n,
13
13
  g as setI18nInstance,
14
14
  u as setToolStatusById,
15
- B as setToolStatusBykey,
16
- M as useLocaleStore
15
+ w as setToolStatusBykey,
16
+ y as useLocaleStore
17
17
  };