@xtctwins/tctwins-bimx-engine 0.2.27 → 0.2.29

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 (51) hide show
  1. package/README.md +190 -2
  2. package/dist/{AnnotationTool-B7nWZ4G5.mjs → AnnotationTool-SBYW5l9D.mjs} +4 -4
  3. package/dist/BIMX_Viewer_Lib.es.js +3 -3
  4. package/dist/BIMX_Viewer_Lib.umd.js +169 -167
  5. package/dist/CommentTool-CgOJaw3r.mjs +1152 -0
  6. package/dist/HiddenTool-oLAXVx5n.mjs +60 -0
  7. package/dist/{InspectorTool-CY3zFGQD.mjs → InspectorTool-BFF1y0Hd.mjs} +172 -168
  8. package/dist/MeasureTool-TgRsk80O.mjs +326 -0
  9. package/dist/MouseTool-B_K0VTfv.mjs +84 -0
  10. package/dist/{NavigateTool-DjUv0sB0.mjs → NavigateTool-Pt1RtvU7.mjs} +2 -2
  11. package/dist/{RoamTool-CKL0_tkh.mjs → RoamTool-CxFRCXo2.mjs} +19 -19
  12. package/dist/{ScreenShotTool-Cf6zltVu.mjs → ScreenShotTool-C8d9Jpt5.mjs} +54 -54
  13. package/dist/{SectionTool-B-3aAa1S.mjs → SectionTool-CyE6J_19.mjs} +6 -6
  14. package/dist/{SettingTool-hU6cHyzO.mjs → SettingTool-BoeUSNoj.mjs} +267 -267
  15. package/dist/StructureTree-DOR9XbQH.mjs +1612 -0
  16. package/dist/{alert-C0gJS8RJ.mjs → alert-Bx6vm68V.mjs} +1 -1
  17. package/dist/{const-B1FlFgEN.mjs → const-DfPhsetT.mjs} +8 -4
  18. package/dist/{el-input-number-CzzdJ8y7.mjs → el-input-number-pvso00SK.mjs} +164 -164
  19. package/dist/{index-5iwaCnV5.mjs → index-CP000Qpy.mjs} +27778 -26767
  20. package/dist/{panel.vue_vue_type_style_index_0_lang-CunrM2Xo.mjs → panel.vue_vue_type_style_index_0_lang-Cfinw87a.mjs} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/{tallPanel-Bjwjiu1q.mjs → tallPanel-CqoOOH4r.mjs} +1 -1
  23. package/package.json +3 -4
  24. package/types/components/BCFComponents/commentsView.vue.d.ts +2 -2
  25. package/types/components/BimViewerComponents/ClickEvent.vue.d.ts +6 -0
  26. package/types/components/BimViewerComponents/CommentTool.vue.d.ts +2 -0
  27. package/types/components/BimViewerComponents/MobileCommentsTool/add.vue.d.ts +16 -0
  28. package/types/components/BimViewerComponents/MobileCommentsTool/detail.vue.d.ts +12 -0
  29. package/types/components/BimViewerComponents/MobileCommentsTool/draw.vue.d.ts +17 -0
  30. package/types/components/BimViewerComponents/MobileCommentsTool/list.vue.d.ts +13 -0
  31. package/types/components/BimViewerComponents/MobileCommentsTool/zoomIn.vue.d.ts +10 -0
  32. package/types/components/BimViewerComponents/MouseTool.vue.d.ts +6 -0
  33. package/types/components/BimViewerComponents/PCCommentTool/pcdraw.vue.d.ts +14 -0
  34. package/types/components/MobileBCFComponents/MobileCommentsView.vue.d.ts +2 -2
  35. package/types/components/bimxViewer.vue.d.ts +4 -0
  36. package/types/components/utilsComponents/prompt.vue.d.ts +8 -0
  37. package/types/components/utilsComponents/rectangleButton.vue.d.ts +1 -1
  38. package/types/pages/viewerEntry.vue.d.ts +24 -17
  39. package/types/store/initConfigs.d.ts +1 -1
  40. package/types/store/toolbars.d.ts +449 -39
  41. package/types/store/userInfoStore.d.ts +32 -0
  42. package/types/tests/cmt.d.ts +1 -0
  43. package/types/utils/OSSHelper.d.ts +1 -0
  44. package/types/utils/eventBus.d.ts +10 -1
  45. package/types/viewerManager/initial/viewerInitial.d.ts +13 -1
  46. package/types/viewerManager/load/loadModel.d.ts +1 -1
  47. package/types/viewerManager/viewerManager.d.ts +7 -0
  48. package/dist/CommentTool-CRviYuWC.mjs +0 -330
  49. package/dist/HiddenTool-BA2gynA8.mjs +0 -60
  50. package/dist/MeasureTool-KyZ3WUcp.mjs +0 -267
  51. package/dist/StructureTree-D8vz11zh.mjs +0 -1581
package/README.md CHANGED
@@ -1,5 +1,193 @@
1
1
  ## @xtctwins/tctwins-bimx-engine
2
2
 
3
- ### mode: prod
3
+ # xtc 三维文件查看器
4
4
 
5
- ### 调整设置保存;
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://bimkk-oss-test.oss-cn-beijing.aliyuncs.com/test/1公寓幕墙.xtc`);
78
+ const filePaths = [
79
+ "https://bimkk-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170745913287.xtc",
80
+ "https://bimkk-oss-test.oss-cn-beijing.aliyuncs.com/tests/models/multiModel/model2/20250205170736552499.xtc",
81
+ "https://bimkk-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,7 +1,7 @@
1
- import { _ as D } from "./alert-C0gJS8RJ.mjs";
1
+ import { _ as D } from "./alert-Bx6vm68V.mjs";
2
2
  import { defineComponent as O, ref as p, watch as H, onMounted as q, onBeforeUnmount as P, openBlock as e, createElementBlock as i, unref as c, createCommentVNode as b, createElementVNode as t, Fragment as V, renderList as B, normalizeClass as C, toDisplayString as R, withDirectives as U, createVNode as z, vShow as F } from "vue";
3
- import { n as j, o as _, p as v, O as l, x as G } from "./index-5iwaCnV5.mjs";
4
- import { A as r } from "./const-B1FlFgEN.mjs";
3
+ import { n as j, o as _, p as v, O as l, x as G } from "./index-CP000Qpy.mjs";
4
+ import { A as r } from "./const-DfPhsetT.mjs";
5
5
  const J = { class: "annotation_component" }, K = {
6
6
  key: 0,
7
7
  id: "annotation_toolbar",
@@ -161,7 +161,7 @@ const J = { class: "annotation_component" }, K = {
161
161
  ]);
162
162
  };
163
163
  }
164
- }), pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-e46a7ef6"]]);
164
+ }), pn = /* @__PURE__ */ G(dn, [["__scopeId", "data-v-413c2f27"]]);
165
165
  export {
166
166
  pn as default
167
167
  };
@@ -1,4 +1,4 @@
1
- import { aa as e, B as o, ab as t, ad as i, V as l, ag as r, ac as I, ae as n, af as B } from "./index-5iwaCnV5.mjs";
1
+ import { an as e, B as o, ao as t, aq as i, V as l, at as r, ap as n, ar as I, as as B } from "./index-CP000Qpy.mjs";
2
2
  export {
3
3
  e as BIMXViewer,
4
4
  o as BIMX_CONFIGS,
@@ -6,7 +6,7 @@ export {
6
6
  i as InitializeConfigs,
7
7
  l as ViewerManager,
8
8
  r as setAllToolClose,
9
- I as setConfigs,
10
- n as setToolStatusById,
9
+ n as setConfigs,
10
+ I as setToolStatusById,
11
11
  B as setToolStatusBykey
12
12
  };