@ithinkdt/jt-web3 0.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,53 @@
1
+ <!--
2
+ * @fileName:
3
+ * @Date: 2021-09-23 14:35:48
4
+ * @Author: manyao.zhu
5
+ -->
6
+
7
+ # [jt-web-3d Change log](https://codeup.aliyun.com/ithinkdt-code/nio-ndqs/jt-web/blob/master/CHANGELOG.md)
8
+
9
+ ## v0.0.1 (2021/9/23)
10
+
11
+ - **feature** 测点右键支持测点重复问题
12
+ - **fix** 统计图框拖拽模型是断掉的问题
13
+
14
+ ## v0.0.3 (2021/11/25)
15
+
16
+ - **feature** 测点的 tips 信息(鼠标的移入移除事件) / 测点支持指定的点透视
17
+ - **fix** 统计图框连线双击等操作,线条消失的问题
18
+
19
+ ## v0.0.4 (2022/03/17)
20
+
21
+ - **feature** 测点添加双击功能
22
+
23
+ ## v0.0.5 (2022/04/14)
24
+
25
+ - **feature** 测点点面模式添加重复 + 双击 + 移入移出 事件
26
+
27
+ ## v0.0.6/ v0.0.7 (2022/04/15)
28
+
29
+ - **featrue** 直角面 + 三角面的重构, 支持单个设置透明度
30
+
31
+ ## v0.1.0 (2022/05/12)
32
+
33
+ - **fix** 统计图框连线在重新渲染模型时, 底层操作模型断线问题
34
+
35
+ ## v0.1.2 (2022/10/27)
36
+
37
+ - **feature** 添加移动端关于测点的操作(支持自动判定当前操作系统, 当移动端时, 添加新的 API 用于测点的单选、复选、操作等功能)
38
+
39
+ ## v0.1.5 (2023/02/01)
40
+
41
+ - **fix** 解决老版本不支持 typescript 的问题 (vue3.0 + ts 中,老版本中的全局变量没有直接挂在 window 下)
42
+
43
+ ## v0.1.6 (2023/05/23)
44
+
45
+ - **fix** 对引擎包添加域名白名单, 限制未授权的域名使用
46
+
47
+ ## v0.1.7 (2023/06/29)
48
+
49
+ - **fix + feat** 对引擎包模型加载的缓存机制进行修改, 以及添加预加载缓存的功能
50
+
51
+ ## v0.1.8 (2023/07/03)
52
+
53
+ - **fix + feat** 对引擎包模型加载的缓存机制进行修改, 以及添加预加载缓存的功能(修改之前定义的字段)
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ <!--
2
+ * @fileName:
3
+ * @Date: 2021-09-23 14:31:40
4
+ * @Author: manyao.zhu
5
+ -->
6
+ # @ithinkdt/jt-web-3d
7
+
8
+ bom 3d模型的 jt数据在web端的展示工具
9
+
10
+ ## how to install
11
+
12
+ #### For TypeScript such as Angular Vue React
13
+
14
+ install
15
+
16
+ ```
17
+ npm i @ithinkdt/jt-web-3d --save-dev
18
+ ```
19
+
20
+ Import
21
+
22
+ ```
23
+ import jt-web from '@ithinkdt/jt-web-3d';
24
+ ```
25
+
26
+ ## publish
27
+
28
+ 根目录运行
29
+
30
+ ```
31
+ npm run build
32
+ ```
33
+
34
+ 修改package.json中的版本号后
35
+
36
+ ```
37
+ npm publish
38
+ ```
39
+
40
+
41
+ ## How to use
42
+
43
+ #### html
44
+
45
+ ```
46
+ // 这里的 id 固定 JT_WEB, class 固定 siemens-app-container
47
+ <div class="siemens-app-container" id="JT_WEB"></div>
48
+ ```
49
+
50
+ #### js
51
+ ##### 初始化 (渲染配置)
52
+
53
+ const jt_web = jt_web({
54
+ // 数据
55
+ data: {
56
+ title: '测试产品', // 模型组件名称
57
+ psId: '122', // 模型组件ID
58
+ "units": 5,
59
+ }
60
+ })
61
+
62
+
63
+ ## DATA 数据格式
64
+
65
+ ```
66
+ Data {
67
+ bboxMax: number[];
68
+ bboxMin: number[];
69
+ mat64: string;
70
+ psId: string;
71
+ title: string;
72
+ children: NonleafNode[] | LeafNode[];
73
+ }
74
+ ```
75
+
76
+ ```
77
+ LeafNode {
78
+ b64data: string;
79
+ bboxMax: number[];
80
+ bboxMin: number[];
81
+ psId: string;
82
+ title: string;
83
+ units: 5;
84
+ xform: number[];
85
+ }
86
+ ```
87
+
88
+ ```
89
+ NonleafNode {
90
+ bboxMax: number[];
91
+ bboxMin: number[];
92
+ psId: string;
93
+ title: string;
94
+ children: NonleafNode[] | LeafNode[];
95
+ }
96
+ ```
97
+
98
+ ## [Change log](/CHANGELOG.md)
Binary file
Binary file
Binary file
package/dist/index.css ADDED
@@ -0,0 +1,408 @@
1
+ /*****************************************************************/
2
+ /********************** Office CSS library ***********************/
3
+ /********************** Version: 1.0.2.0 *************************/
4
+ /*****************************************************************/
5
+
6
+ /* Basic Font and Background Colors for text */
7
+ .office-docTheme-primary-fontColor { color:#000000; }
8
+ .office-docTheme-primary-bgColor { background-color:#ffffff; }
9
+ .office-docTheme-secondary-fontColor { color: #000000; }
10
+ .office-docTheme-secondary-bgColor { background-color: #ffffff; }
11
+
12
+
13
+ /* Accent color definitions for fonts */
14
+ .office-contentAccent1-color { color:#5b9bd5; }
15
+ .office-contentAccent2-color { color:#ed7d31; }
16
+ .office-contentAccent3-color { color:#a5a5a5; }
17
+ .office-contentAccent4-color { color:#ffc000; }
18
+ .office-contentAccent5-color { color:#4472c4; }
19
+ .office-contentAccent6-color { color:#70ad47; }
20
+
21
+ /* Accent color for backgrounds */
22
+ .office-contentAccent1-bgColor { background-color:#5b9bd5; }
23
+ .office-contentAccent2-bgColor { background-color:#ed7d31; }
24
+ .office-contentAccent3-bgColor { background-color:#a5a5a5; }
25
+ .office-contentAccent4-bgColor { background-color:#ffc000; }
26
+ .office-contentAccent5-bgColor { background-color:#4472c4; }
27
+ .office-contentAccent6-bgColor { background-color:#70ad47; }
28
+
29
+ /* Accent color for borders */
30
+ .office-contentAccent1-borderColor { border-color:#5b9bd5; }
31
+ .office-contentAccent2-borderColor { border-color:#ed7d31; }
32
+ .office-contentAccent3-borderColor { border-color:#a5a5a5; }
33
+ .office-contentAccent4-borderColor { border-color:#ffc000; }
34
+ .office-contentAccent5-borderColor { border-color:#4472c4; }
35
+ .office-contentAccent6-borderColor { border-color:#70ad47; }
36
+
37
+ /* links */
38
+ .office-a {color: #0563c1; }
39
+ .office-a:visited { color: #954f72; }
40
+
41
+ /* Body Fonts */
42
+ .office-bodyFont-latin { font-family:"Calibri"; } /* Latin name of the Font */
43
+ .office-bodyFont-localized { font-family:"Calibri"; } /* Localized name of the Font. contains the default font name according to the culture currently used in Office */
44
+
45
+ /* Headers Font */
46
+ .office-headerFont-latin { font-family:"Calibri Light"; }
47
+ .office-headerFont-localized { font-family:"Calibri Light"; }
48
+
49
+
50
+
51
+ /* The following classes define the Office themes. This classes make sense for the taskpane apps */
52
+
53
+ /* Basic Font and Background Colors for PPT */
54
+ .office-officeTheme-primary-fontColor { color:#b83b1d; }
55
+ .office-officeTheme-primary-bgColor { background-color:#dedede; }
56
+ .office-officeTheme-secondary-fontColor { color:#262626; }
57
+ .office-officeTheme-secondary-bgColor { background-color:#ffffff; }
58
+
59
+ /* Basic Font and Background Colors for Outlook Web Access */
60
+ /* remove comments and delete other apps officeTheme classes to get OWA defaults
61
+ .office-officeTheme-primary-fontColor { color:#ea4400; }
62
+ .office-officeTheme-primary-bgColor { background-color:#ffffff; }
63
+ .office-officeTheme-secondary-fontColor { color:#ffffff; }
64
+ .office-officeTheme-secondary-bgColor { background-color:#ea4400; }
65
+ */
66
+ /* Page-specific styling */
67
+
68
+ #contentBlock, #viewerHost {
69
+ height: 100%;
70
+ width: 100%;
71
+
72
+ }
73
+
74
+
75
+ /* viewer color.*/
76
+ #component {
77
+ /*background: #009999;*/
78
+ height: auto;
79
+ width: auto;
80
+ }
81
+
82
+
83
+ #modelViews {
84
+ display: none;
85
+ }
86
+
87
+ .siemens-app-container {
88
+ height: 100%;
89
+ width: 100%;
90
+ /* padding: 5px; */
91
+ }
92
+
93
+ .siemens-inner-app-container {
94
+ height: 100%;
95
+ width: 100%;
96
+ }
97
+
98
+ .siemens-Icon--pan {
99
+ display: inline-block;
100
+ vertical-align: middle;
101
+ height: 24px;
102
+ width: 24px;
103
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAAkUlEQVRIS7WU0Q2FIBAEqY46LM2S7OjkEk0E50DM8jHJY253E39eMrOloFSCUglKJSiVoMw5b4WdboRnvUO3l7jGLSoQvU716AVHRN1hYAbaCA9/abek4zfPTX/4j2Ws/4JWtOFZ2q3w8AfaGAa+EnWrkBMFe/Q61ePmKhx0I0r2+3+RGpRKUCpBqQSlEpQ6LJ334TErwy345wAAAABJRU5ErkJggg==');
104
+ }
105
+
106
+ .siemens-Icon--rotate {
107
+ display: inline-block;
108
+ vertical-align: middle;
109
+ height: 24px;
110
+ width: 24px;
111
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAABpUlEQVRIS7WUu3HDMBBEVYJKUAkswRFjlaASXIJLcAkqQSU4VaYSVILHiUN6HwbHwWcJWTN28Ahi73AADgfslmX5V6zomOd5L97FIt7oO78WK7Yo2El8ig/xklv6J+dfYsUgB7uJO//Gho69spVYETToKr7Eq7MH2LPf1dk7IdAAcj3MN3q2J9/WDp0Q5EEHYfNNP+vY8ZNcx4BOCMoB+j8K8k0wAtPSPzr/kk4I3ABppOOb1tjU1BpUHTmRU1a4ueVn9fVHDqyOnF7EtDVgpAsqqjorDKyaWoZDM6Crb3SjcSfw56zi3kzYMJ7FxQwqd1RNXPyTSuz4reeif3aCNqUBYg1QIp3dsYAUIPfxj/pHx97dE2lMco8Jhg+X7JxJlCb+tPRTGrbAlw+OXdk55Bf3Ya3/LeSTdhurY6s8xY92YlPZQhzB2ZxDYJI4fXLncpruhhg+0bLHC0xm9q0xngECsQIOkgFpQrXY7STZjwXCaq+cAjmwWoKRNiYkhQQuqc5BfbLQnU3V+Q0KEmU7rKDAils8Gxys6FBQKuNh7bdY8e9Ydj8vG5GuuH3iBQAAAABJRU5ErkJggg==');
112
+ }
113
+
114
+ .siemens-Icon--zoom {
115
+ display: inline-block;
116
+ vertical-align: middle;
117
+ height: 24px;
118
+ width: 24px;
119
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAACXBIWXMAAAsSAAALEgHS3X78AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKBJREFUSEvtlLENwCAMBDMdc2S0jJSNHF4KkWUOQ5OO4gQc+L/jMLNlSilnxbTSPYGScOGNpRKUERferfTeg9ITw7QnPwJlg0J0zu4jKMVoWC6c05JONOrATUMKA6eSK3rRiRlUkIEyYxdM2QVTdsFHDboq/30V79B/n52gYZ2z+whKTwzRnvwIlBEfFld670FJuNDGNFygHOFKlsLN7HgAtSUxK38xc24AAAAASUVORK5CYII=');
120
+ }
121
+
122
+ /* .siemens-Icon--snapshot {
123
+ display: inline-block;
124
+ vertical-align: middle;
125
+ height: 24px;
126
+ width: 24px;
127
+ background-image: url('Images/snapshot24.png');
128
+ }
129
+
130
+ .siemens-Icon--open {
131
+ display: inline-block;
132
+ vertical-align: middle;
133
+ height: 24px;
134
+ width: 24px;
135
+ background-image: url('../Images/open24.png');
136
+ }
137
+
138
+ .siemens-Icon--settings {
139
+ display: inline-block;
140
+ vertical-align: middle;
141
+ height: 24px;
142
+ width: 24px;
143
+ background-image: url('Images/settings24.png');
144
+ } */
145
+
146
+ .siemens-Icon--modelViews {
147
+ display: inline-block;
148
+ vertical-align: middle;
149
+ height: 24px;
150
+ width: 24px;
151
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAABa0lEQVRIS72Uy3XCMBBFKYESKIESWHlNCZRCKZTAkmVKSAk5rLJM0oDyro9GGUnjYDucLK5H89EbM5bYpJRWMQzDVpzFW7bbqK4LzEFipyz8ktdY/GNbWzkt2iBT+fspMfm+6d7ipSBChTJlfROfYnIcxHOeuhuxrsijIpmftfgSZ4tFkM91cpc3OIipER1znDx1Ci9s4NZTH/nU1hexCCtq19m3efPLuu9CHFsCEVbUrj2P4l3C8+8NRDnfPh7EuC9jvEq0+M1aM+cPcRFl3k0N34U8deNxLmJz0KaduHoBWZnqBcjvbE8nYuTCbiQ5xzl/FRxNRofFP7S1lePJG3mjsAkoxx14x0Z5CIOgTTRA4Ncmj6gchASj4WMpVN6yNCE+B2qhFUeIa88878JvulrtEsaHNpv4OEtZjhpNwr/lJXTihnxGteqtPQgxkosPyg+brqETa/2/Mj6cqN3Gp4hDWbgmTxNPKW2+AfJEtANTGDs9AAAAAElFTkSuQmCC');
152
+ }
153
+
154
+ .siemens-is-disabled {
155
+ opacity: 0.5;
156
+ pointer-events: none;
157
+ }
158
+
159
+ /* .siemens-Icon--onedrive {
160
+ display: inline-block;
161
+ vertical-align: middle;
162
+ height: 25px;
163
+ width: 33px;
164
+ background-image: url('./images/skydriveicon_blue.png');
165
+ } */
166
+
167
+ siemens-commandBar-Icon {
168
+ height: 24px;
169
+ width: 24px;
170
+ }
171
+
172
+ .siemens-sideCommands, .siemens-commandBarItem-link, .siemens-commandBarItem-linkWrapper, .siemens-commandBarItem {
173
+ height: 32px;
174
+ }
175
+
176
+ .siemens-commandBar {
177
+ height: 32px;
178
+ }
179
+
180
+ .siemens-commandBarItem {
181
+ margin-right: 4px;
182
+ }
183
+
184
+ .siemens-sideCommands {
185
+ padding-right: 30px;
186
+ }
187
+
188
+ .ms-CommandBarItem-link:before{
189
+ content: none !important;
190
+ }
191
+
192
+ .siemens-commandBarItem-link:before{
193
+ content: none !important;
194
+ }
195
+
196
+ .siemens-commandBarItem-link {
197
+ line-height: 32px;
198
+ padding-right: 3px;
199
+ padding-left: 3px;
200
+ }
201
+
202
+ .siemens-commandBar-mainArea {
203
+ padding-left: 0px;
204
+ overflow-y: hidden;
205
+ line-height: 32px;
206
+ }
207
+
208
+
209
+ .siemens-spinner-container {
210
+ position: absolute;
211
+ top: 0;
212
+ left: 0;
213
+ width: 100%;
214
+ height: 100%;
215
+ z-index: 99;
216
+
217
+ }
218
+
219
+ .siemens-spinner {
220
+ height: 48px;
221
+ position: absolute;
222
+ top: 50%;
223
+ left: 50%;
224
+ transform: translate(-50%, -50%);
225
+ color: #333333;
226
+ }
227
+
228
+ .siemens-spinner-label {
229
+ text-align: left;
230
+ color: #333333;
231
+ }
232
+
233
+ .siemens-spinner-circle {
234
+ background-color: #333333;
235
+ }
236
+
237
+ .siemens-Dropdown {
238
+ padding-left: 20px;
239
+ padding-top: 5px;
240
+ font-size: 16px;
241
+ }
242
+
243
+ .siemens-messagebanner {
244
+ min-width: 239px;
245
+ margin-top: 10px;
246
+ }
247
+
248
+ .siemens-hidden {
249
+ display: none;
250
+ }
251
+
252
+ .siemens-visible {
253
+ display: block;
254
+ }
255
+
256
+ .siemens-settings-pane {
257
+ overflow-y: visible;
258
+ }
259
+
260
+ .siemens-setting-commands {
261
+ margin-top: -40px;
262
+ }
263
+
264
+ .siemens-commandBar-mainArea-Settings {
265
+ width: 300px;
266
+ }
267
+
268
+ .siemens-panel-main {
269
+ padding-right: 15px;
270
+ margin-top: 8px;
271
+ margin-right: 8px;
272
+ }
273
+
274
+ .siemens-viewer-title{
275
+ text-align: center;
276
+ }
277
+
278
+ .siemens-viewer-label{
279
+ text-align: left;
280
+ }
281
+
282
+ .siemens-callout{
283
+ top: 0px;
284
+ position: absolute;
285
+ margin-top: 35px;
286
+ margin-left: 30px;
287
+ }
288
+
289
+
290
+ .ms-MessageBanner-text {
291
+ min-width: 159px;
292
+ }
293
+
294
+ .ms-Panel-main .ms-CommandBar {
295
+ display: block;
296
+ }
297
+
298
+ .siemens-commandBarItem-link.is-selected {
299
+ font-family: 'Segoe UI Semibold WestEuropean', 'Segoe UI Semibold', 'Segoe UI', Tahoma, Arial, sans-serif;
300
+ border-bottom: 2px solid #0078d7;
301
+ }
302
+
303
+ .structureLabel.strusel {
304
+ background-color: lightblue;
305
+ }
306
+ html,
307
+ body {
308
+ height: 100%;
309
+ }
310
+ .sel {
311
+ color: white!important;
312
+ background-color: #3389FA !important;
313
+ }
314
+ .head {
315
+ color: #3389FA;
316
+ position: absolute;
317
+ z-index: 9999;
318
+ width: 100%;
319
+ }
320
+ .head .groupDiv {
321
+ text-align: center;
322
+ display: inline-block;
323
+ border: 1px dotted gray;
324
+ }
325
+ .head i {
326
+ font-size: 20px;
327
+ cursor: pointer;
328
+ border: 2px solid #3389FA;
329
+ background-color: white;
330
+ padding: 1px;
331
+ margin: 2px;
332
+ width: 22px;
333
+ text-align: center;
334
+ }
335
+ .head input[type="color"] {
336
+ height: 22px;
337
+ width: 22px;
338
+ padding: 0px;
339
+ margin: 0px;
340
+ cursor: pointer;
341
+ line-height: 40px;
342
+ border: 2px solid #3389FA;
343
+ }
344
+ .head select {
345
+ color: #3389FA;
346
+ height: 27px;
347
+ margin: 1px;
348
+ float: left;
349
+ border: 2px solid #3389FA;
350
+ }
351
+ .head .right {
352
+ float: right;
353
+ }
354
+ .head .right i {
355
+ float: left;
356
+ }
357
+ .uploadArea {
358
+ display: none;
359
+ position: absolute;
360
+ top: 0;
361
+ left: 0;
362
+ width: 100%;
363
+ height: 100%;
364
+ z-index: 9999;
365
+ }
366
+ .uploadArea textarea {
367
+ width: 100%;
368
+ height: calc(100% - 50px);
369
+ }
370
+ .uploadArea div {
371
+ text-align: center;
372
+ }
373
+ .uploadArea div i {
374
+ color: #3389FA;
375
+ font-size: 30px;
376
+ cursor: pointer;
377
+ border: 2px solid #3389FA;
378
+ padding: 1px;
379
+ margin: 2px;
380
+ text-align: center;
381
+ }
382
+ .floatArea {
383
+ position: absolute;
384
+ top: 0;
385
+ left: 0;
386
+ height: 100%;
387
+ }
388
+ .floatArea div {
389
+ width: 177px;
390
+ height: 157px;
391
+ position: absolute;
392
+ z-index: 8000;
393
+ background-image: url(b40724dee8e713eae84fa7d84e61a744.jpg);
394
+ background-size: contain;
395
+ }
396
+ #contextMenu {
397
+ position: absolute;
398
+ background: white;
399
+ border: 1px black solid;
400
+ width: 200px;
401
+ height: 200px;
402
+ display: none;
403
+ z-index: 9000;
404
+ }
405
+ #contextMenu.visible {
406
+ display: block;
407
+ }
408
+