ss-component-new 1.3.665 → 1.3.666

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 (84) hide show
  1. package/dist/MTLLoader-DI0avKtj.js +657 -0
  2. package/dist/URDFLoader-PUxvYFDe.js +2304 -0
  3. package/dist/animationData-05aVUytq.js +83 -0
  4. package/dist/array-BHRYnJKv.js +1044 -0
  5. package/dist/clone-Ddn1p6-1.js +8 -0
  6. package/dist/config.js +1 -1
  7. package/dist/eleIcon-BWVKfp5t.js +29 -0
  8. package/dist/iconfont-BNdGaGPn.js +1018 -0
  9. package/dist/icons/svg/Update.svg +1 -0
  10. package/dist/icons/svg/functionList.svg +1 -0
  11. package/dist/icons/svg/uploadCopy.svg +1 -0
  12. package/dist/index-7mFTFA3-.js +107 -0
  13. package/dist/index-BDhIWgKn.js +658 -0
  14. package/dist/index-BFqUz4pN.js +52 -0
  15. package/dist/index-BP1mKUQP.js +627 -0
  16. package/dist/index-BczRQX8N.js +407 -0
  17. package/dist/index-BnrvtCYj.js +55 -0
  18. package/dist/index-Bpr501oZ.js +78 -0
  19. package/dist/index-BvbZiTVB.js +342 -0
  20. package/dist/index-Bvvz41NY.js +44 -0
  21. package/dist/index-C2M8MGB3.js +83 -0
  22. package/dist/index-C67QqPPT.js +24865 -0
  23. package/dist/index-C85-PeF1.js +11773 -0
  24. package/dist/index-C9DBY1gg.js +103 -0
  25. package/dist/index-CFFbhR3G.js +996 -0
  26. package/dist/index-COr2mcbl.js +48 -0
  27. package/dist/index-CQ8DCGnJ.js +98 -0
  28. package/dist/index-CV2cha0T.js +864 -0
  29. package/dist/index-CV_jQDcg.js +9 -0
  30. package/dist/index-CXe4q28L.js +447 -0
  31. package/dist/{index-BobGeNMx.js → index-ChNfRlIP.js} +5 -5
  32. package/dist/index-CqNlqFQ5.js +117 -0
  33. package/dist/index-D-5v1Jx7.js +93 -0
  34. package/dist/index-D4LcEpQ7.js +619 -0
  35. package/dist/index-D9w3QWuY.js +468 -0
  36. package/dist/index-DGObzWyL.js +8984 -0
  37. package/dist/index-DJ59jXR0.js +28483 -0
  38. package/dist/index-DJrzqi4-.js +209 -0
  39. package/dist/index-D_kI6aHR.js +98 -0
  40. package/dist/index-DhQcwkOc.js +61958 -0
  41. package/dist/index-DhULdX5n.js +2623 -0
  42. package/dist/index-Dibj25i7.js +93 -0
  43. package/dist/index-Dr9Wt5nC.js +84 -0
  44. package/dist/index-Dwt0Wlg_.js +201 -0
  45. package/dist/index-WPJbEuld.js +62 -0
  46. package/dist/index-YVR3acYT.js +61 -0
  47. package/dist/{index-BKK_dL6t.js → index-dD-mKgue.js} +3 -3
  48. package/dist/index-roQK_1xA.js +30 -0
  49. package/dist/index-uF-ibwG0.js +9 -0
  50. package/dist/{index.vue_vue_type_script_setup_true_lang-DRzriV-s.js → index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js} +2 -2
  51. package/dist/index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js +137728 -0
  52. package/dist/isString-CoCw_sp3.js +8 -0
  53. package/dist/localIcon-CoJHw5ss.js +76 -0
  54. package/dist/main-Dlo2i9wB.js +502 -0
  55. package/dist/menuIndex-Dt0NyAyE.js +159 -0
  56. package/dist/request-DiogHwkN.js +9465 -0
  57. package/dist/ss-component.css +8 -2
  58. package/dist/ss-component.js +64 -28
  59. package/dist/ss-component2.js +75 -15
  60. package/dist/ss-component3.js +1 -1
  61. package/dist/threeModel-BfY7WDWB.js +1108 -0
  62. package/dist/threePreview-BHLSA5YS.js +2259 -0
  63. package/dist/threeSceneView-ZTUK-ls2.js +1289 -0
  64. package/dist/threeSceneViewForCPMPIP-DCG4eBvk.js +538 -0
  65. package/dist/threeTrackPathView-BR8-g2Tr.js +620 -0
  66. package/dist/threeViewerHost-BwblfmOC.js +233 -0
  67. package/dist/urdfTree-IEJgkVzs.js +254 -0
  68. package/dist/workpieceTreePanel-aZV2ut3W.js +555 -0
  69. package/package.json +4 -4
  70. package/public/config.js +1 -1
  71. package/public/icons/svg/Update.svg +1 -0
  72. package/public/icons/svg/functionList.svg +1 -0
  73. package/public/icons/svg/uploadCopy.svg +1 -0
  74. package/dist/index-CoXdIQt_.js +0 -50
  75. package/dist/index-DJWOuBw9.js +0 -195
  76. package/dist/index-DK2pco3V.js +0 -1044
  77. package/dist/index-DfraOPVU.js +0 -9022
  78. package/dist/index-MHAwX3y9.js +0 -182
  79. package/dist/menu-B8iV5Rhf.js +0 -5215
  80. package/dist/origin-C4Shcrcr.js +0 -11428
  81. /package/dist/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  82. /package/dist/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
  83. /package/public/icons/svg/{table-close.svg → tableClose.svg} +0 -0
  84. /package/public/icons/svg/{table-expand.svg → tableExpand.svg} +0 -0
@@ -0,0 +1,620 @@
1
+ import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, openBlock as X, createElementBlock as ee, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as Y, shallowRef as D, watch as Ee, onMounted as Xe, onBeforeUnmount as Ye, unref as A, renderSlot as ae, withDirectives as N, createBlock as le, createCommentVNode as S, vShow as Z, nextTick as je } from "vue";
2
+ import { u as De, a as Ne, b as Ze, T as w, C as Be, f as Ie, d as re } from "./iconfont-BNdGaGPn.js";
3
+ import { C as O, h as Oe, b0 as Ge, t as qe, V as te, u as ue, Y as fe, a2 as Ke, w as We, a1 as Je, _ as Re, $ as He, p as Qe, b1 as Se } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js";
4
+ import "./index-DGObzWyL.js";
5
+ import { U as et, J as tt } from "./urdfTree-IEJgkVzs.js";
6
+ import { E as B } from "./request-DiogHwkN.js";
7
+ import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
+ import { i as nt } from "./isString-CoCw_sp3.js";
9
+ function ot(e = 0.5, n = 4) {
10
+ const o = new Oe(
11
+ new Ge(e, n, 32),
12
+ new qe({
13
+ color: "#919191ff",
14
+ // 再提一档灰度
15
+ metalness: 0.3,
16
+ // ↓ 降金属
17
+ roughness: 0.6
18
+ })
19
+ ), i = o.geometry.parameters.height;
20
+ return o.geometry.translate(0, -i / 2, 0), o.rotation.set(-90, 0, 0, "XYZ"), o;
21
+ }
22
+ function st(e, n) {
23
+ e.position.copy(n);
24
+ }
25
+ function it(e, n, o = new O(16711680)) {
26
+ const i = new te();
27
+ n.getWorldPosition(i);
28
+ const l = e.geometry.attributes.position, t = e.geometry.attributes.color, s = new O(55551);
29
+ let r = 1 / 0, f = -1;
30
+ for (let c = 0; c < l.count; c++) {
31
+ const v = new te().fromBufferAttribute(l, c).distanceTo(i);
32
+ v < r && (r = v, f = c);
33
+ }
34
+ for (let c = 0; c < t.count; c++) s.toArray(t.array, c * 3);
35
+ if (f !== -1) {
36
+ const c = o.toArray(), m = f * 3 + 2;
37
+ for (let v = 0; v < m; v = v + 3)
38
+ t.array[v] = c[0], t.array[v + 1] = c[1], t.array[v + 2] = c[2];
39
+ }
40
+ t.needsUpdate = !0;
41
+ }
42
+ function de(e, n, o, i = new O(16711680)) {
43
+ st(e, n), it(o, e, i);
44
+ }
45
+ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt = { class: "control-row" }, ct = { class: "control-row" }, ut = { class: "frame-info" }, ft = { class: "control-row" }, vt = /* @__PURE__ */ ce({
46
+ __name: "trackAnimationPanel",
47
+ props: {
48
+ cloud: {},
49
+ knife: {},
50
+ vectors: {}
51
+ },
52
+ emits: ["getThreeData"],
53
+ setup(e, { expose: n, emit: o }) {
54
+ const i = e, l = U(() => i.vectors), t = k(!1), s = k(0), r = k(100);
55
+ let f = !1;
56
+ const c = (g) => `第 ${g + 1} 帧`, m = (g) => {
57
+ if (g < 0 || g >= l.value.length) {
58
+ console.error(`帧索引 ${g} 超出范围`);
59
+ return;
60
+ }
61
+ const y = l.value[g];
62
+ s.value = g, de(i.knife, y, i.cloud);
63
+ }, v = async () => {
64
+ if (l.value.length === 0) {
65
+ B.error("无法播放动画:无数据");
66
+ return;
67
+ }
68
+ if (!t.value) {
69
+ t.value = !0, f = !1, l.value.length - 1 === s.value && (s.value = 0);
70
+ try {
71
+ for (let g = s.value + 1; g < l.value.length && !f; g++)
72
+ await new Promise((y) => setTimeout(y, r.value)), m(g);
73
+ f || B.success("动画播放完成");
74
+ } catch (g) {
75
+ console.error("动画播放出错:", g);
76
+ } finally {
77
+ t.value = !1;
78
+ }
79
+ }
80
+ }, C = () => {
81
+ f = !0, t.value = !1, B.info("动画已停止");
82
+ }, P = (g) => {
83
+ t.value && C(), m(g);
84
+ }, _ = () => {
85
+ t.value && C(), !(s.value + 1 >= l.value.length) && m(s.value + 1);
86
+ }, T = () => {
87
+ t.value && C(), s.value !== 0 && m(s.value - 1);
88
+ }, h = () => {
89
+ s.value = 0;
90
+ };
91
+ return n({ playAnimation: v, stopAnimation: C, forwardFrame: _, backwardFrame: T, resetAnimationFrame: h, reset: async () => {
92
+ await C(), h();
93
+ } }), (g, y) => {
94
+ const q = E("el-input-number"), K = E("el-form-item"), W = E("el-form"), J = E("el-slider");
95
+ return X(), ee("div", at, [
96
+ d("div", lt, [
97
+ d("div", rt, [
98
+ p(W, {
99
+ "label-width": "auto",
100
+ style: { width: "100%" }
101
+ }, {
102
+ default: I(() => [
103
+ p(K, {
104
+ label: "帧间隔 (ms):",
105
+ prop: "frameDuration"
106
+ }, {
107
+ default: I(() => [
108
+ p(q, {
109
+ modelValue: r.value,
110
+ "onUpdate:modelValue": y[0] || (y[0] = (M) => r.value = M),
111
+ min: 0,
112
+ max: 5e3,
113
+ step: 10,
114
+ style: { width: "100%" }
115
+ }, null, 8, ["modelValue"])
116
+ ]),
117
+ _: 1
118
+ })
119
+ ]),
120
+ _: 1
121
+ })
122
+ ]),
123
+ d("div", ct, [
124
+ y[2] || (y[2] = d("label", null, "当前帧:", -1)),
125
+ d("span", ut, Y(s.value + 1) + " / " + Y(l.value.length), 1)
126
+ ]),
127
+ d("div", ft, [
128
+ y[3] || (y[3] = d("label", null, "动画进度:", -1)),
129
+ p(J, {
130
+ modelValue: s.value,
131
+ "onUpdate:modelValue": y[1] || (y[1] = (M) => s.value = M),
132
+ min: 0,
133
+ max: l.value.length > 0 ? l.value.length - 1 : 0,
134
+ step: 1,
135
+ "format-tooltip": c,
136
+ onInput: P,
137
+ disabled: l.value.length === 0,
138
+ style: { "flex-grow": "1", margin: "0 10px" }
139
+ }, null, 8, ["modelValue", "max", "disabled"])
140
+ ])
141
+ ])
142
+ ]);
143
+ };
144
+ }
145
+ }), dt = /* @__PURE__ */ ve(vt, [["__scopeId", "data-v-f6fc7a8c"]]);
146
+ function mt(e) {
147
+ const n = [];
148
+ return e.forEach((o) => {
149
+ const [i, l, t] = o.trim().split(/\s+/);
150
+ n.push(+i, +l, +t);
151
+ }), n;
152
+ }
153
+ function G(e, n, o) {
154
+ switch (e) {
155
+ case "X":
156
+ n.x = +o || 0;
157
+ break;
158
+ case "Y":
159
+ n.y = +o || 0;
160
+ break;
161
+ case "Z":
162
+ n.z = +o || 0;
163
+ break;
164
+ }
165
+ }
166
+ function pt(e) {
167
+ const n = [], o = ["X", "Y", "Z"];
168
+ return e.forEach((i) => {
169
+ const l = {
170
+ x: 0,
171
+ y: 0,
172
+ z: 0
173
+ }, t = i.trim();
174
+ if (!t)
175
+ return;
176
+ let s = null, r = "";
177
+ for (let f = 0; f < (t == null ? void 0 : t.length); f++) {
178
+ const c = t[f], m = o.find((v) => v === c);
179
+ if (m) {
180
+ s && G(s, l, r), r = "", s = m;
181
+ continue;
182
+ }
183
+ r = r + c;
184
+ }
185
+ G(s, l, r), n.push(l.x, l.y, l.z);
186
+ }), n;
187
+ }
188
+ const ht = (e) => e == null ? void 0 : e.filter((o) => o.includes("=")), gt = (e) => e.replace(/,/g, ""), yt = (e) => e == null ? void 0 : e.map((o) => gt(o)), Ct = (e) => {
189
+ const n = ht(e);
190
+ return yt(n);
191
+ };
192
+ function wt(e) {
193
+ const n = Ct(e), o = [];
194
+ return n.forEach((i) => {
195
+ var v, C, P, _, T, h;
196
+ let [l, t, s, r] = i.trim().split(/\s+/);
197
+ t = (v = t == null ? void 0 : t.trim) == null ? void 0 : v.call(t), s = (C = s == null ? void 0 : s.trim) == null ? void 0 : C.call(s), r = (P = r == null ? void 0 : r.trim) == null ? void 0 : P.call(r);
198
+ const [, f] = (_ = t == null ? void 0 : t.split) == null ? void 0 : _.call(t, "="), [, c] = (T = s == null ? void 0 : s.split) == null ? void 0 : T.call(s, "="), [, m] = (h = r == null ? void 0 : r.split) == null ? void 0 : h.call(r, "=");
199
+ o.push(+f, +c, +m);
200
+ }), o;
201
+ }
202
+ const kt = (e) => e >= "0" && e <= "9", bt = (e) => e === "+" || e === "-", _t = (e) => e === ".";
203
+ function Tt(e) {
204
+ return kt(e) || bt(e) || _t(e);
205
+ }
206
+ function zt(e) {
207
+ const n = [], o = /* @__PURE__ */ new Set(["X", "Y", "Z"]);
208
+ return e.forEach((i) => {
209
+ const l = {
210
+ x: 0,
211
+ y: 0,
212
+ z: 0
213
+ }, t = i.trim();
214
+ if (!t)
215
+ return;
216
+ let s = null, r = "";
217
+ for (let f = 0; f < (t == null ? void 0 : t.length); f++) {
218
+ const c = t[f];
219
+ if (c === "T")
220
+ break;
221
+ const m = o.has(c) ? c : null, v = Tt(c);
222
+ if (m || !v) {
223
+ s && G(s, l, r), s = m, r = "";
224
+ continue;
225
+ }
226
+ r = r + c;
227
+ }
228
+ s && G(s, l, r), n.push(l.x, l.y, l.z);
229
+ }), n;
230
+ }
231
+ function At(e) {
232
+ return e == null ? void 0 : e.includes("=");
233
+ }
234
+ async function Pt(e) {
235
+ var l, t;
236
+ const n = (l = e == null ? void 0 : e.trim()) == null ? void 0 : l.split(/\r?\n/);
237
+ if (At(e))
238
+ return wt(n);
239
+ const o = n == null ? void 0 : n[0], i = (t = o == null ? void 0 : o.trim()) == null ? void 0 : t.split(/\s+/);
240
+ if ((i == null ? void 0 : i.length) >= 3)
241
+ return mt(n);
242
+ if ((i == null ? void 0 : i.length) === 1)
243
+ return pt(n);
244
+ }
245
+ async function xt(e) {
246
+ const n = e.trim().split(/\r?\n/), o = [];
247
+ return n.forEach((i) => {
248
+ const l = i.trim().split(/\s+/);
249
+ if (l.length != 3)
250
+ return;
251
+ const [t, s, r] = l;
252
+ o.push(+t, +s, +r);
253
+ }), o;
254
+ }
255
+ async function Ft(e) {
256
+ const n = e.trim().split(/\r?\n/), o = [];
257
+ return n.forEach((i) => {
258
+ const l = i.trim().split(/\s+/);
259
+ if (l.length != 3)
260
+ return;
261
+ const [t, s, r] = l;
262
+ o.push(+t, +s, +r);
263
+ }), o;
264
+ }
265
+ async function Mt(e) {
266
+ let n = e.trim().split(/\r?\n/);
267
+ return n = n.filter((i) => {
268
+ const l = i.startsWith("X") || i.startsWith("Y") || i.startsWith("Z"), t = i.startsWith("G") && (i.includes("X") || i.includes("Y") || i.includes("Z")), s = i.startsWith("N") && (i.includes("X") || i.includes("Y") || i.includes("Z"));
269
+ return l || t || s;
270
+ }), zt(n);
271
+ }
272
+ async function Ut(e, n) {
273
+ const { isCyd: o, isUv: i, isCpt: l, isNc: t } = n;
274
+ return i ? Pt(e) : o ? Ft(e) : l ? xt(e) : t ? Mt(e) : [];
275
+ }
276
+ function Lt(e) {
277
+ const n = [];
278
+ for (let o = 0; o < e.length; o += 3)
279
+ n.push(new te(e[o], e[o + 1], e[o + 2]));
280
+ return n;
281
+ }
282
+ function $t(e) {
283
+ const n = new ue();
284
+ n.setAttribute("position", new fe(e, 3));
285
+ const o = new Ke({
286
+ color: 55551,
287
+ linewidth: 3
288
+ });
289
+ return new We(n, o);
290
+ }
291
+ function Vt(e, n) {
292
+ if (!n || n.length < 3)
293
+ return;
294
+ const { scene: o, camera: i, renderer: l, controls: t } = e();
295
+ if (!o || !i || !l || !t)
296
+ return;
297
+ const s = $t(n);
298
+ return s.name = "轨迹路径", o.add(s), s;
299
+ }
300
+ function Et(e, n, o, i = 4, l = 50) {
301
+ let t = 1 / 0, s = -1 / 0, r = 1 / 0, f = -1 / 0, c = 1 / 0, m = -1 / 0;
302
+ for (let h = 0; h < e.length; h += 3) {
303
+ const L = e[h], g = e[h + 1], y = e[h + 2];
304
+ t = Math.min(t, L), s = Math.max(s, L), r = Math.min(r, g), f = Math.max(f, g), c = Math.min(c, y), m = Math.max(m, y);
305
+ }
306
+ const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, P = Qe.degToRad(n.fov), _ = 2 * Math.tan(P / 2) * l, T = C / _ * o.domElement.height * (i / 4);
307
+ return Math.min(0.4, T);
308
+ }
309
+ function Xt(e) {
310
+ if (e.length % 3 !== 0)
311
+ return console.error("points array length is not a multiple of 3:", e), null;
312
+ const n = new ue();
313
+ n.setAttribute("position", new fe(e, 3));
314
+ const o = new Float32Array(e.length);
315
+ for (let t = 0; t < e.length; t += 3)
316
+ o[t] = 0, o[t + 1] = 0.847, o[t + 2] = 1;
317
+ n.setAttribute("color", new Je(o, 3));
318
+ const i = new Re({
319
+ vertexColors: !0,
320
+ size: 0.4,
321
+ // 像素世界单位
322
+ sizeAttenuation: !0
323
+ }), l = new He(n, i);
324
+ return i.needsUpdate = !0, l;
325
+ }
326
+ function Yt(e, n) {
327
+ if (!n)
328
+ return;
329
+ const { scene: o, camera: i, renderer: l, controls: t } = e();
330
+ if (!o || !i || !l || !t)
331
+ return;
332
+ const s = Xt(n);
333
+ if (!s)
334
+ return;
335
+ s.name = "轨迹路径", o.add(s);
336
+ const r = Et(n, i, l, 0.1, 50);
337
+ return s.material.size = r, s;
338
+ }
339
+ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft" }, Nt = { class: "buttonGroup-left" }, Zt = { class: "buttonGroup-right" }, Bt = { class: "buttonGroup-bottom" }, It = { class: "left-panel" }, Ot = { class: "panel-header" }, Gt = { class: "panel-body" }, qt = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Jt = {
340
+ key: 0,
341
+ class: "loading-overlay"
342
+ }, Rt = /* @__PURE__ */ ce({
343
+ __name: "threeTrackPathView",
344
+ props: {
345
+ fileBlobs: {},
346
+ threeData: { default: () => "" },
347
+ trackFileType: {}
348
+ },
349
+ setup(e) {
350
+ const n = e, o = k(null), i = k(!1), l = k(""), t = k(), s = k(!1), r = k(""), f = k(!1), c = k(""), m = D(null), v = D(null), {
351
+ currentModels: C,
352
+ resetView: P,
353
+ initThreeJS: _,
354
+ handleResize: T,
355
+ getThreeJSObjects: h,
356
+ cleanup: L,
357
+ setModels: g,
358
+ setAndFitModels: y,
359
+ axesHelperVisible: q,
360
+ toggleAxesVisibility: K,
361
+ zoomIn: W,
362
+ zoomOut: J
363
+ } = De(o), { isAnimating: M, toggleAnimation: me, startAnimation: Ht, stopAnimation: pe } = Ne(h, C), { isClipping: he, activeClippingAxis: ne, toggleClipping: ge, updateClippingPlanes: ye } = Ze(h, C), Ce = () => {
364
+ K();
365
+ }, we = (a) => {
366
+ ne.value = a, ye();
367
+ }, R = (a) => {
368
+ s.value = !0, r.value = a, a === "剖面视图" && !he.value && ge();
369
+ }, H = (a) => {
370
+ f.value = !0, c.value = a;
371
+ }, Q = k([]), $ = k([]), ke = U(() => {
372
+ var u;
373
+ return (u = n.trackFileType) == null ? void 0 : u.isUv;
374
+ }), be = U(() => {
375
+ var u;
376
+ return (u = n.trackFileType) == null ? void 0 : u.isCyd;
377
+ }), _e = U(() => {
378
+ var u;
379
+ return (u = n.trackFileType) == null ? void 0 : u.isCpt;
380
+ }), x = U(() => {
381
+ var u;
382
+ return (u = n.trackFileType) == null ? void 0 : u.isNc;
383
+ }), oe = U(() => {
384
+ const a = n.fileBlobs || [];
385
+ return a == null ? void 0 : a[0];
386
+ });
387
+ let b = D(), F = D();
388
+ const Te = () => {
389
+ const { scene: a } = h();
390
+ b.value && a && (re(b.value, a), b.value = null);
391
+ }, ze = () => {
392
+ const { scene: a } = h();
393
+ F.value && a && (re(F.value, a), F.value = null);
394
+ }, se = () => {
395
+ Te(), ze();
396
+ }, Ae = async (a) => {
397
+ const u = URL.createObjectURL(a), V = await Se(u);
398
+ if (URL.revokeObjectURL(u), nt(V)) {
399
+ Q.value = await Ut(V, n.trackFileType) || [];
400
+ const z = Q.value;
401
+ ke.value && (b.value = Vt(h, z)), (be.value || _e.value || x.value) && (b.value = Yt(h, z));
402
+ }
403
+ }, Pe = async () => {
404
+ var a, u;
405
+ F.value = ot(), $.value = Lt(Q.value), $.value && $.value.length && (de(F.value, $.value[0], b.value, new O(16711680)), (u = (a = v.value) == null ? void 0 : a.add) == null || u.call(a, F.value));
406
+ }, ie = async (a) => {
407
+ se(), await Ae(a), b.value && Ie(h, b.value), x.value && Pe();
408
+ };
409
+ Ee(() => oe.value, async (a) => {
410
+ a && await ie(a);
411
+ }, {
412
+ immediate: !0,
413
+ deep: !0
414
+ });
415
+ const xe = async () => {
416
+ var a;
417
+ await ((a = t == null ? void 0 : t.value) == null ? void 0 : a.reset()), await ie(oe.value);
418
+ }, Fe = () => {
419
+ var a;
420
+ x.value && ((a = t == null ? void 0 : t.value) == null || a.playAnimation());
421
+ }, Me = () => {
422
+ var a;
423
+ x.value && ((a = t == null ? void 0 : t.value) == null || a.stopAnimation());
424
+ }, Ue = () => {
425
+ var a;
426
+ x.value && ((a = t == null ? void 0 : t.value) == null || a.forwardFrame());
427
+ }, Le = () => {
428
+ var a;
429
+ x.value && ((a = t == null ? void 0 : t.value) == null || a.backwardFrame());
430
+ }, $e = () => {
431
+ _(), je(() => {
432
+ o.value && (j = new ResizeObserver(T), j.observe(o.value));
433
+ });
434
+ const a = h();
435
+ v.value = a.scene, v.value && (v.value.name = "CPMPIP");
436
+ }, Ve = () => {
437
+ j && j.disconnect(), M.value && pe(), se(), L();
438
+ };
439
+ let j = null;
440
+ return Xe(async () => {
441
+ try {
442
+ $e();
443
+ } catch (a) {
444
+ console.error("Three.js 初始化失败:", a), B.error("渲染引擎初始化失败!");
445
+ }
446
+ }), Ye(() => {
447
+ Ve();
448
+ }), (a, u) => {
449
+ const V = E("el-scrollbar");
450
+ return X(), ee("div", jt, [
451
+ d("div", {
452
+ ref_key: "threejsContainer",
453
+ ref: o,
454
+ class: "threejs-container"
455
+ }, null, 512),
456
+ d("div", Dt, [
457
+ p(w, {
458
+ name: "viewReset",
459
+ size: "24",
460
+ onClick: xe,
461
+ title: "重置"
462
+ }),
463
+ p(w, {
464
+ name: "fangda",
465
+ size: "24",
466
+ title: "放大",
467
+ onClick: A(W)
468
+ }, null, 8, ["onClick"]),
469
+ p(w, {
470
+ name: "suoxiao",
471
+ size: "24",
472
+ title: "缩小",
473
+ onClick: A(J)
474
+ }, null, 8, ["onClick"]),
475
+ p(w, {
476
+ name: "lookAround",
477
+ size: "24",
478
+ onClick: A(me),
479
+ title: A(M) ? "停止动画" : "动画视图"
480
+ }, null, 8, ["onClick", "title"]),
481
+ p(w, {
482
+ name: "zuobiaoxi",
483
+ size: "24",
484
+ active: A(q),
485
+ onClick: Ce,
486
+ title: "显隐坐标轴"
487
+ }, null, 8, ["active"])
488
+ ]),
489
+ d("div", Nt, [
490
+ ae(a.$slots, "button-left", { switchRightPanel: R }, void 0, !0),
491
+ p(w, {
492
+ name: "jiegoushu",
493
+ size: "24",
494
+ onClick: u[0] || (u[0] = (z) => R("场景树")),
495
+ active: s.value && r.value === "场景树",
496
+ title: "场景树"
497
+ }, null, 8, ["active"]),
498
+ p(w, {
499
+ name: "clipping",
500
+ size: "24",
501
+ onClick: u[1] || (u[1] = (z) => R("剖面视图")),
502
+ active: s.value && r.value === "剖面视图",
503
+ title: "剖面视图"
504
+ }, null, 8, ["active"])
505
+ ]),
506
+ d("div", Zt, [
507
+ ae(a.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
508
+ p(w, {
509
+ name: "guanjiekongzhi",
510
+ size: "24",
511
+ onClick: u[2] || (u[2] = (z) => H("关节控制")),
512
+ active: f.value && c.value === "关节控制",
513
+ title: "关节控制"
514
+ }, null, 8, ["active"]),
515
+ p(w, {
516
+ name: "donghuafangzhen",
517
+ size: "24",
518
+ title: "动画仿真",
519
+ onClick: u[3] || (u[3] = (z) => H("动画仿真")),
520
+ active: f.value && c.value === "动画仿真"
521
+ }, null, 8, ["active"])
522
+ ]),
523
+ d("div", Bt, [
524
+ p(w, {
525
+ name: "kuaitui",
526
+ size: "24",
527
+ backgroundColor: "#ffffff",
528
+ title: "快退",
529
+ onClick: Le
530
+ }),
531
+ p(w, {
532
+ name: "bofang",
533
+ size: "24",
534
+ backgroundColor: "#ffffff",
535
+ title: "播放",
536
+ onClick: Fe
537
+ }),
538
+ p(w, {
539
+ name: "kuaijin",
540
+ size: "24",
541
+ backgroundColor: "#ffffff",
542
+ title: "快进",
543
+ onClick: Ue
544
+ }),
545
+ p(w, {
546
+ name: "zanting",
547
+ size: "24",
548
+ backgroundColor: "#ffffff",
549
+ title: "暂停",
550
+ onClick: Me
551
+ })
552
+ ]),
553
+ N(d("div", It, [
554
+ d("div", Ot, [
555
+ d("span", null, Y(r.value), 1),
556
+ d("span", {
557
+ class: "close",
558
+ onClick: u[4] || (u[4] = (z) => s.value = !1)
559
+ }, " X ")
560
+ ]),
561
+ d("div", Gt, [
562
+ p(V, { height: "100%" }, {
563
+ default: I(() => [
564
+ r.value === "场景树" ? (X(), le(et, {
565
+ key: 0,
566
+ model: m.value
567
+ }, null, 8, ["model"])) : S("", !0),
568
+ r.value === "剖面视图" ? (X(), le(Be, {
569
+ key: 1,
570
+ value: A(ne),
571
+ onChange: we
572
+ }, null, 8, ["value"])) : S("", !0)
573
+ ]),
574
+ _: 1
575
+ })
576
+ ])
577
+ ], 512), [
578
+ [Z, s.value]
579
+ ]),
580
+ N(d("div", qt, [
581
+ d("div", Kt, [
582
+ d("span", null, Y(c.value), 1),
583
+ d("span", {
584
+ class: "close",
585
+ onClick: u[5] || (u[5] = (z) => f.value = !1)
586
+ }, " X ")
587
+ ]),
588
+ d("div", Wt, [
589
+ p(V, { height: "100%" }, {
590
+ default: I(() => [
591
+ N(p(tt, { model: m.value }, null, 8, ["model"]), [
592
+ [Z, c.value === "关节控制"]
593
+ ]),
594
+ N(p(dt, {
595
+ ref_key: "animationPanelRef",
596
+ ref: t,
597
+ cloud: A(b),
598
+ knife: A(F),
599
+ vectors: $.value
600
+ }, null, 8, ["cloud", "knife", "vectors"]), [
601
+ [Z, c.value === "动画仿真" && x.value]
602
+ ])
603
+ ]),
604
+ _: 1
605
+ })
606
+ ])
607
+ ], 512), [
608
+ [Z, f.value]
609
+ ]),
610
+ i.value ? (X(), ee("div", Jt, [
611
+ u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
612
+ d("p", null, Y(l.value), 1)
613
+ ])) : S("", !0)
614
+ ]);
615
+ };
616
+ }
617
+ }), ln = /* @__PURE__ */ ve(Rt, [["__scopeId", "data-v-7178b621"]]);
618
+ export {
619
+ ln as default
620
+ };