ss-component-new 1.2.98 → 1.2.99

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 (92) hide show
  1. package/dist/MTLLoader-B4z0XNO-.js +304 -0
  2. package/dist/MTLLoader-n_3HPhif.cjs +2 -0
  3. package/dist/OBJLoader-C_JaUegI.cjs +5 -0
  4. package/dist/OBJLoader-Dilcv9TL.js +356 -0
  5. package/dist/{OrbitControls-BLs9AYBY.cjs → OrbitControls-8LBwRzcq.cjs} +1 -1
  6. package/dist/{OrbitControls-KkyEKP5M.js → OrbitControls-Cz47Q27N.js} +1 -1
  7. package/dist/{animationData-Btgynl98.js → animationData-C8lM4zZj.js} +1 -1
  8. package/dist/{animationData-CCImpyvS.cjs → animationData-CKcPDmLp.cjs} +1 -1
  9. package/dist/{iconfont-BXzhYF5A.cjs → iconfont-B1cUqs_N.cjs} +1 -1
  10. package/dist/{iconfont-B8CQB3CO.js → iconfont-CUWS5tNH.js} +2 -2
  11. package/dist/{index-6sDAnob5.cjs → index-2hqZ_tND.cjs} +1 -1
  12. package/dist/{index-CnBVZu9x.cjs → index-AuEh0RiU.cjs} +1 -1
  13. package/dist/{index-BaXxrBtb.cjs → index-B2UPNwqJ.cjs} +1 -1
  14. package/dist/{index-DXrBVvWh.js → index-BCvmfE-Q.js} +3 -3
  15. package/dist/{index-Bk8CKDbz.js → index-BDw8DIQx.js} +130 -130
  16. package/dist/{index-Cz7uQ_eD.js → index-BPv8txj6.js} +6 -6
  17. package/dist/{index--JyaPE1g.js → index-BQaejVqo.js} +1 -1
  18. package/dist/{index-BMSOMrGq.cjs → index-Ba16ouw0.cjs} +1 -1
  19. package/dist/{index-C9U9aO2Y.js → index-BaSO3EEl.js} +3 -3
  20. package/dist/{index-1TxthiQw.cjs → index-BdSiNUC0.cjs} +1 -1
  21. package/dist/{index-CYmbZuJq.cjs → index-BfU8GMj1.cjs} +1 -1
  22. package/dist/{index-B_WRw_3s.cjs → index-BjKKDSDx.cjs} +1 -1
  23. package/dist/{index-DThE5nRZ.cjs → index-BqgfejIC.cjs} +1 -1
  24. package/dist/{index-Dggo7EaF.js → index-BxONUPjM.js} +1 -1
  25. package/dist/{index-BCNDy7LZ.js → index-Byp3gJNW.js} +1 -1
  26. package/dist/{index-hbpC0O70.js → index-C7ZsHeLt.js} +3 -3
  27. package/dist/{index-tUUpniUl.js → index-C9p_wwJ7.js} +6 -6
  28. package/dist/{index-zsvDrZxo.js → index-CKlt750z.js} +1 -1
  29. package/dist/{index-C_rjTaFu.cjs → index-CQwDw3-2.cjs} +1 -1
  30. package/dist/{index-CLddyFrz.js → index-CR1Ng5ip.js} +3 -3
  31. package/dist/{index-DMTBVsgY.cjs → index-CZIqVNof.cjs} +1 -1
  32. package/dist/{index-yWC1EX2L.cjs → index-C_208RkZ.cjs} +1 -1
  33. package/dist/{index-k579sq5M.cjs → index-CqZ1E-Mt.cjs} +1 -1
  34. package/dist/{index-Cmlus98m.js → index-CrNsPd4D.js} +2 -2
  35. package/dist/{index-DRjN9mko.cjs → index-CvQCAGWI.cjs} +1 -1
  36. package/dist/{index-B8XDW6Ly.cjs → index-CyCcPnZb.cjs} +1 -1
  37. package/dist/{index-CAAOZFSQ.js → index-CyE5qCBb.js} +13 -13
  38. package/dist/{index-DcxUbnrO.cjs → index-D32pAhQk.cjs} +1 -1
  39. package/dist/{index-DZf4BLpR.js → index-DAUjjqaD.js} +391 -391
  40. package/dist/{index-DvQRFx9T.cjs → index-DQTlc6Gq.cjs} +1 -1
  41. package/dist/{index-blVMOcaF.js → index-DTilOAv_.js} +2 -2
  42. package/dist/{index-7ZZHuv4d.cjs → index-D_22J0ok.cjs} +1 -1
  43. package/dist/{index-JQ_SaJ0O.js → index-DboUMA_C.js} +1 -1
  44. package/dist/{index-BkPXyAKD.js → index-DgMQpO6g.js} +1 -1
  45. package/dist/{index-FnJX1FLR.cjs → index-Dh6GqpZF.cjs} +1 -1
  46. package/dist/{index-CWJuJJYp.cjs → index-DhqEoDPT.cjs} +1 -1
  47. package/dist/{index-uWijQ8Cy.js → index-DlwlGkyt.js} +2 -2
  48. package/dist/{index-nSLXu4eq.cjs → index-DtDmxPdD.cjs} +1 -1
  49. package/dist/{index-CUAM_spJ.js → index-GxmJC9kr.js} +1 -1
  50. package/dist/{index-2wJBzGa-.cjs → index-XKn5AuYT.cjs} +1 -1
  51. package/dist/{index-B4YN6ElV.js → index-mEKMjplD.js} +1 -1
  52. package/dist/{index-DdQjdsrn.js → index-vglZ0qjT.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BKdUW522.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DKwCF412.cjs} +1 -1
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DPDuWtDv.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DqIuWlps.js} +6 -6
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CmofVWvn.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js} +7302 -7338
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Y4oIHCVM.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs} +282 -282
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-D0zznqn6.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cpyo5jke.js} +3 -3
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-YB8ip9Xh.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cq8VF9uK.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_1_lang-CT8c_mLo.js → index.vue_vue_type_style_index_1_lang-B_HCEX9y.js} +6 -5
  60. package/dist/{index.vue_vue_type_style_index_1_lang-BB0IwRdP.cjs → index.vue_vue_type_style_index_1_lang-rTLLuvuo.cjs} +5 -5
  61. package/dist/loaderUtil-B0djdt91.js +5 -0
  62. package/dist/loaderUtil-CaWWb8db.cjs +1 -0
  63. package/dist/{main-CbZLyXuF.js → main-DHx-3OSy.js} +2 -2
  64. package/dist/{main-BOuiQUiL.cjs → main-DS156sQ4.cjs} +1 -1
  65. package/dist/ss-component.cjs +1 -1
  66. package/dist/ss-component.css +1 -1
  67. package/dist/ss-component.js +9 -9
  68. package/dist/ss-component2.cjs +1 -1
  69. package/dist/ss-component2.js +10 -10
  70. package/dist/{threeModel-i87HG3Ck.cjs → threeModel-CfIK1rQB.cjs} +1 -1
  71. package/dist/{threeModel-BJ6MrCa-.js → threeModel-WYCdw_Ff.js} +4 -4
  72. package/dist/{threePreview-D3wObBZq.js → threePreview-C29AR7Mr.js} +7 -6
  73. package/dist/threePreview-Ci8TnUQ8.cjs +1 -0
  74. package/dist/{threeSceneView-DQpyKixe.cjs → threeSceneView-C2MDCMux.cjs} +1 -1
  75. package/dist/{threeSceneView-DDpjEIgl.js → threeSceneView-F15mW1mm.js} +6 -6
  76. package/dist/{threeSceneViewForCPMPIP-DV_aOUU5.js → threeSceneViewForCPMPIP-DK4G_ZpP.js} +219 -219
  77. package/dist/threeSceneViewForCPMPIP-DuPZn_qv.cjs +5 -0
  78. package/dist/threeTrackPathView-C4eBUMef.cjs +370 -0
  79. package/dist/{threeTrackPathView-D6aAG4g8.js → threeTrackPathView-DMj6YGxT.js} +316 -323
  80. package/dist/{threeViewerHost-XR9tepbY.js → threeViewerHost-C9ipsMff.js} +2 -2
  81. package/dist/{threeViewerHost-I50ZyvKF.cjs → threeViewerHost-CW6JmOUJ.cjs} +2 -2
  82. package/dist/{urdfTree-B19ebCHj.cjs → urdfTree-CTiMB7ge.cjs} +1 -1
  83. package/dist/{urdfTree-CjxhpnRl.js → urdfTree-DGEACy9-.js} +1 -1
  84. package/dist/{workpieceTreePanel-DAnMGvlX.js → workpieceTreePanel-C1gy5a8r.js} +53 -52
  85. package/dist/workpieceTreePanel-Ded0Gqke.cjs +1 -0
  86. package/package.json +1 -1
  87. package/dist/MTLLoader-CCS24gLm.js +0 -657
  88. package/dist/MTLLoader-DlcJK6vT.cjs +0 -6
  89. package/dist/threePreview-B3v9SadK.cjs +0 -1
  90. package/dist/threeSceneViewForCPMPIP-iaIkud0j.cjs +0 -5
  91. package/dist/threeTrackPathView-nPb7Tgdd.cjs +0 -370
  92. package/dist/workpieceTreePanel-0L7tkycK.cjs +0 -1
@@ -1,154 +1,15 @@
1
- import { defineComponent as Oe, computed as G, ref as M, resolveComponent as q, createElementBlock as ae, openBlock as Y, createElementVNode as m, createVNode as w, withCtx as ue, toDisplayString as Z, watch as Ie, shallowRef as Q, onMounted as ft, onBeforeUnmount as pt, withDirectives as j, createCommentVNode as we, unref as b, renderSlot as Le, createBlock as mt, isRef as ee, vModelRadio as te, vShow as ne } from "vue";
2
- import { u as ht, a as vt, b as gt, f as yt, d as Te } from "./iconfont-B8CQB3CO.js";
3
- import { C as de, k as je, aE as wt, v as xt, V as x, aF as bt, aG as Se, aH as ze, av as R, aI as _t, B as pe, aD as Ve, aJ as St, aK as re, aL as Ne, Y as We, aM as le, aN as K, aO as zt, r as Ct, s as Ge, t as At, w as Ut, a5 as Et, ag as Mt, ao as Lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CmofVWvn.js";
4
- import { r as Tt } from "./threeViewerHost-XR9tepbY.js";
1
+ import { defineComponent as Oe, computed as G, ref as M, resolveComponent as q, createElementBlock as ae, openBlock as Y, createElementVNode as m, createVNode as w, withCtx as ue, toDisplayString as Z, watch as je, shallowRef as Q, onMounted as dt, onBeforeUnmount as ft, withDirectives as I, createCommentVNode as we, unref as b, renderSlot as Le, createBlock as pt, isRef as ee, vModelRadio as te, vShow as ne } from "vue";
2
+ import { u as mt, a as vt, b as ht, f as gt, d as Pe } from "./iconfont-CUWS5tNH.js";
3
+ import { aE as yt, aF as Se, aG as Ce, av as R, aH as wt, B as pe, aD as Ie, V as x, aI as xt, aJ as re, aK as Ve, Y as Ne, aL as le, k as bt, aM as K, aN as _t, r as St, s as We, C as de, t as Ct, w as zt, a5 as At, ag as Ut, ao as Et } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js";
4
+ import { r as Mt } from "./threeViewerHost-C9ipsMff.js";
5
5
  import { E as ce } from "./index-BUYYl2Pc.js";
6
- import { U as kt, J as Pt } from "./urdfTree-CjxhpnRl.js";
7
- import { _ as Re } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
+ import { U as Lt, J as Pt } from "./urdfTree-DGEACy9-.js";
7
+ import { l as Tt } from "./loaderUtil-B0djdt91.js";
8
+ import { _ as Ge } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
9
  import { T as E } from "./svgIcon-D-_fXUBL.js";
9
- import { i as Bt } from "./isString-BATKat46.js";
10
- function Dt(o = 0.5, e = 4) {
11
- const t = new je(
12
- new wt(o, e, 32),
13
- new xt({
14
- color: "#919191ff",
15
- // 再提一档灰度
16
- metalness: 0.3,
17
- // ↓ 降金属
18
- roughness: 0.6
19
- })
20
- ), i = t.geometry.parameters.height;
21
- return t.geometry.translate(0, -i / 2, 0), t.rotation.set(-90, 0, 0, "XYZ"), t;
22
- }
23
- function Ft(o, e) {
24
- o.position.copy(e);
25
- }
26
- function Ot(o, e, t = new de(16711680)) {
27
- const i = new x();
28
- e.getWorldPosition(i);
29
- const n = o.geometry.attributes.position, s = o.geometry.attributes.color, r = new de(55551);
30
- let a = 1 / 0, d = -1;
31
- for (let u = 0; u < n.count; u++) {
32
- const f = new x().fromBufferAttribute(n, u).distanceTo(i);
33
- f < a && (a = f, d = u);
34
- }
35
- for (let u = 0; u < s.count; u++) r.toArray(s.array, u * 3);
36
- if (d !== -1) {
37
- const u = t.toArray(), p = d * 3 + 2;
38
- for (let f = 0; f < p; f = f + 3)
39
- s.array[f] = u[0], s.array[f + 1] = u[1], s.array[f + 2] = u[2];
40
- }
41
- s.needsUpdate = !0;
42
- }
43
- function He(o, e, t, i = new de(16711680)) {
44
- Ft(o, e), Ot(t, o, i);
45
- }
46
- const It = { class: "panel-content" }, jt = { class: "animation-controls" }, Vt = { class: "control-row" }, Nt = { class: "control-row" }, Wt = { class: "frame-info" }, Gt = { class: "control-row" }, Rt = /* @__PURE__ */ Oe({
47
- __name: "trackAnimationPanel",
48
- props: {
49
- cloud: {},
50
- knife: {},
51
- vectors: {}
52
- },
53
- emits: ["getThreeData"],
54
- setup(o, { expose: e, emit: t }) {
55
- const i = o, n = G(() => i.vectors), s = M(!1), r = M(0), a = M(50);
56
- let d = !1;
57
- const u = (g) => `第 ${g + 1} 帧`, p = (g) => {
58
- if (g < 0 || g >= n.value.length) {
59
- console.error(`帧索引 ${g} 超出范围`);
60
- return;
61
- }
62
- const v = n.value[g];
63
- r.value = g, He(i.knife, v, i.cloud);
64
- }, f = async () => {
65
- if (n.value.length === 0) {
66
- ce.error("无法播放动画:无数据");
67
- return;
68
- }
69
- if (!s.value) {
70
- s.value = !0, d = !1, n.value.length - 1 === r.value && (r.value = 0);
71
- try {
72
- for (let g = r.value + 1; g < n.value.length && !d; g++)
73
- await new Promise((v) => setTimeout(v, a.value)), p(g);
74
- d || ce.success("动画播放完成");
75
- } catch (g) {
76
- console.error("动画播放出错:", g);
77
- } finally {
78
- s.value = !1;
79
- }
80
- }
81
- }, h = async () => {
82
- s.value && (d = !0, await new Promise((g) => {
83
- const v = Ie(() => s.value, (L) => {
84
- v(), g();
85
- });
86
- }), ce.info("动画已停止"));
87
- }, U = async (g) => {
88
- s.value && await h(), p(g);
89
- }, P = async () => {
90
- s.value && await h(), !(r.value + 1 >= n.value.length) && p(r.value + 1);
91
- }, k = async () => {
92
- s.value && await h(), r.value !== 0 && p(r.value - 1);
93
- }, _ = () => {
94
- r.value = 0;
95
- };
96
- return e({ playAnimation: f, stopAnimation: h, forwardFrame: P, backwardFrame: k, resetAnimationFrame: _, reset: async () => {
97
- await h(), _();
98
- } }), (g, v) => {
99
- const L = q("el-input-number"), me = q("el-form-item"), he = q("el-form"), J = q("el-slider");
100
- return Y(), ae("div", It, [
101
- m("div", jt, [
102
- m("div", Vt, [
103
- w(he, {
104
- "label-width": "auto",
105
- style: { width: "100%" }
106
- }, {
107
- default: ue(() => [
108
- w(me, {
109
- label: "帧间隔 (ms):",
110
- prop: "frameDuration"
111
- }, {
112
- default: ue(() => [
113
- w(L, {
114
- modelValue: a.value,
115
- "onUpdate:modelValue": v[0] || (v[0] = (H) => a.value = H),
116
- min: 0,
117
- max: 5e3,
118
- step: 10,
119
- style: { width: "100%" }
120
- }, null, 8, ["modelValue"])
121
- ]),
122
- _: 1
123
- })
124
- ]),
125
- _: 1
126
- })
127
- ]),
128
- m("div", Nt, [
129
- v[2] || (v[2] = m("label", null, "当前帧:", -1)),
130
- m("span", Wt, Z(r.value + 1) + " / " + Z(n.value.length), 1)
131
- ]),
132
- m("div", Gt, [
133
- v[3] || (v[3] = m("label", null, "动画进度:", -1)),
134
- w(J, {
135
- modelValue: r.value,
136
- "onUpdate:modelValue": v[1] || (v[1] = (H) => r.value = H),
137
- min: 0,
138
- max: n.value.length > 0 ? n.value.length - 1 : 0,
139
- step: 1,
140
- "format-tooltip": u,
141
- onInput: U,
142
- disabled: n.value.length === 0,
143
- style: { "flex-grow": "1", margin: "0 10px" }
144
- }, null, 8, ["modelValue", "max", "disabled"])
145
- ])
146
- ])
147
- ]);
148
- };
149
- }
150
- }), Ht = /* @__PURE__ */ Re(Rt, [["__scopeId", "data-v-56b5183f"]]), ke = new pe(), ie = new x();
151
- class $e extends bt {
10
+ import { i as kt } from "./isString-BATKat46.js";
11
+ const Te = new pe(), ie = new x();
12
+ class Re extends yt {
152
13
  /**
153
14
  * Constructs a new line segments geometry.
154
15
  */
@@ -177,7 +38,7 @@ class $e extends bt {
177
38
  setPositions(e) {
178
39
  let t;
179
40
  e instanceof Float32Array ? t = e : Array.isArray(e) && (t = new Float32Array(e));
180
- const i = new ze(t, 6, 1);
41
+ const i = new Ce(t, 6, 1);
181
42
  return this.setAttribute("instanceStart", new R(i, 3, 0)), this.setAttribute("instanceEnd", new R(i, 3, 3)), this.instanceCount = this.attributes.instanceStart.count, this.computeBoundingBox(), this.computeBoundingSphere(), this;
182
43
  }
183
44
  /**
@@ -190,7 +51,7 @@ class $e extends bt {
190
51
  setColors(e) {
191
52
  let t;
192
53
  e instanceof Float32Array ? t = e : Array.isArray(e) && (t = new Float32Array(e));
193
- const i = new ze(t, 6, 1);
54
+ const i = new Ce(t, 6, 1);
194
55
  return this.setAttribute("instanceColorStart", new R(i, 3, 0)), this.setAttribute("instanceColorEnd", new R(i, 3, 3)), this;
195
56
  }
196
57
  /**
@@ -218,7 +79,7 @@ class $e extends bt {
218
79
  * @return {LineSegmentsGeometry} A reference to this geometry.
219
80
  */
220
81
  fromMesh(e) {
221
- return this.fromWireframeGeometry(new _t(e.geometry)), this;
82
+ return this.fromWireframeGeometry(new wt(e.geometry)), this;
222
83
  }
223
84
  /**
224
85
  * Setups this line segments geometry from the given line segments.
@@ -234,10 +95,10 @@ class $e extends bt {
234
95
  computeBoundingBox() {
235
96
  this.boundingBox === null && (this.boundingBox = new pe());
236
97
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
237
- e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), ke.setFromBufferAttribute(t), this.boundingBox.union(ke));
98
+ e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), Te.setFromBufferAttribute(t), this.boundingBox.union(Te));
238
99
  }
239
100
  computeBoundingSphere() {
240
- this.boundingSphere === null && (this.boundingSphere = new Ve()), this.boundingBox === null && this.computeBoundingBox();
101
+ this.boundingSphere === null && (this.boundingSphere = new Ie()), this.boundingBox === null && this.computeBoundingBox();
241
102
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
242
103
  if (e !== void 0 && t !== void 0) {
243
104
  const i = this.boundingSphere.center;
@@ -254,7 +115,7 @@ class $e extends bt {
254
115
  le.line = {
255
116
  worldUnits: { value: 1 },
256
117
  linewidth: { value: 1 },
257
- resolution: { value: new We(1, 1) },
118
+ resolution: { value: new Ne(1, 1) },
258
119
  dashOffset: { value: 0 },
259
120
  dashScale: { value: 1 },
260
121
  dashSize: { value: 1 },
@@ -262,7 +123,7 @@ le.line = {
262
123
  // todo FIX - maybe change to totalSize
263
124
  };
264
125
  re.line = {
265
- uniforms: Ne.merge([
126
+ uniforms: Ve.merge([
266
127
  le.common,
267
128
  le.fog,
268
129
  le.line
@@ -645,7 +506,7 @@ re.line = {
645
506
  `
646
507
  )
647
508
  };
648
- class Ce extends St {
509
+ class ze extends xt {
649
510
  /**
650
511
  * Constructs a new line segments geometry.
651
512
  *
@@ -658,7 +519,7 @@ class Ce extends St {
658
519
  constructor(e) {
659
520
  super({
660
521
  type: "LineMaterial",
661
- uniforms: Ne.clone(re.line.uniforms),
522
+ uniforms: Ve.clone(re.line.uniforms),
662
523
  vertexShader: re.line.vertexShader,
663
524
  fragmentShader: re.line.fragmentShader,
664
525
  clipping: !0
@@ -800,17 +661,17 @@ class Ce extends St {
800
661
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
801
662
  }
802
663
  }
803
- const xe = new K(), Pe = new x(), Be = new x(), S = new K(), z = new K(), B = new K(), be = new x(), _e = new Ct(), C = new zt(), De = new x(), oe = new pe(), se = new Ve(), D = new K();
664
+ const xe = new K(), ke = new x(), Be = new x(), S = new K(), C = new K(), B = new K(), be = new x(), _e = new St(), z = new _t(), De = new x(), oe = new pe(), se = new Ie(), D = new K();
804
665
  let F, W;
805
666
  function Fe(o, e, t) {
806
667
  return D.set(0, 0, -e, 1).applyMatrix4(o.projectionMatrix), D.multiplyScalar(1 / D.w), D.x = W / t.width, D.y = W / t.height, D.applyMatrix4(o.projectionMatrixInverse), D.multiplyScalar(1 / D.w), Math.abs(Math.max(D.x, D.y));
807
668
  }
808
- function $t(o, e) {
669
+ function Bt(o, e) {
809
670
  const t = o.matrixWorld, i = o.geometry, n = i.attributes.instanceStart, s = i.attributes.instanceEnd, r = Math.min(i.instanceCount, n.count);
810
671
  for (let a = 0, d = r; a < d; a++) {
811
- C.start.fromBufferAttribute(n, a), C.end.fromBufferAttribute(s, a), C.applyMatrix4(t);
672
+ z.start.fromBufferAttribute(n, a), z.end.fromBufferAttribute(s, a), z.applyMatrix4(t);
812
673
  const u = new x(), p = new x();
813
- F.distanceSqToSegment(C.start, C.end, p, u), p.distanceTo(u) < W * 0.5 && e.push({
674
+ F.distanceSqToSegment(z.start, z.end, p, u), p.distanceTo(u) < W * 0.5 && e.push({
814
675
  point: p,
815
676
  pointOnLine: u,
816
677
  distance: F.origin.distanceTo(p),
@@ -822,47 +683,47 @@ function $t(o, e) {
822
683
  });
823
684
  }
824
685
  }
825
- function Xt(o, e, t) {
686
+ function Dt(o, e, t) {
826
687
  const i = e.projectionMatrix, s = o.material.resolution, r = o.matrixWorld, a = o.geometry, d = a.attributes.instanceStart, u = a.attributes.instanceEnd, p = Math.min(a.instanceCount, d.count), f = -e.near;
827
688
  F.at(1, B), B.w = 1, B.applyMatrix4(e.matrixWorldInverse), B.applyMatrix4(i), B.multiplyScalar(1 / B.w), B.x *= s.x / 2, B.y *= s.y / 2, B.z = 0, be.copy(B), _e.multiplyMatrices(e.matrixWorldInverse, r);
828
- for (let h = 0, U = p; h < U; h++) {
829
- if (S.fromBufferAttribute(d, h), z.fromBufferAttribute(u, h), S.w = 1, z.w = 1, S.applyMatrix4(_e), z.applyMatrix4(_e), S.z > f && z.z > f)
689
+ for (let v = 0, U = p; v < U; v++) {
690
+ if (S.fromBufferAttribute(d, v), C.fromBufferAttribute(u, v), S.w = 1, C.w = 1, S.applyMatrix4(_e), C.applyMatrix4(_e), S.z > f && C.z > f)
830
691
  continue;
831
692
  if (S.z > f) {
832
- const v = S.z - z.z, L = (S.z - f) / v;
833
- S.lerp(z, L);
834
- } else if (z.z > f) {
835
- const v = z.z - S.z, L = (z.z - f) / v;
836
- z.lerp(S, L);
693
+ const h = S.z - C.z, L = (S.z - f) / h;
694
+ S.lerp(C, L);
695
+ } else if (C.z > f) {
696
+ const h = C.z - S.z, L = (C.z - f) / h;
697
+ C.lerp(S, L);
837
698
  }
838
- S.applyMatrix4(i), z.applyMatrix4(i), S.multiplyScalar(1 / S.w), z.multiplyScalar(1 / z.w), S.x *= s.x / 2, S.y *= s.y / 2, z.x *= s.x / 2, z.y *= s.y / 2, C.start.copy(S), C.start.z = 0, C.end.copy(z), C.end.z = 0;
839
- const k = C.closestPointToPointParameter(be, !0);
840
- C.at(k, De);
841
- const _ = Ge.lerp(S.z, z.z, k), A = _ >= -1 && _ <= 1, g = be.distanceTo(De) < W * 0.5;
699
+ S.applyMatrix4(i), C.applyMatrix4(i), S.multiplyScalar(1 / S.w), C.multiplyScalar(1 / C.w), S.x *= s.x / 2, S.y *= s.y / 2, C.x *= s.x / 2, C.y *= s.y / 2, z.start.copy(S), z.start.z = 0, z.end.copy(C), z.end.z = 0;
700
+ const T = z.closestPointToPointParameter(be, !0);
701
+ z.at(T, De);
702
+ const _ = We.lerp(S.z, C.z, T), A = _ >= -1 && _ <= 1, g = be.distanceTo(De) < W * 0.5;
842
703
  if (A && g) {
843
- C.start.fromBufferAttribute(d, h), C.end.fromBufferAttribute(u, h), C.start.applyMatrix4(r), C.end.applyMatrix4(r);
844
- const v = new x(), L = new x();
845
- F.distanceSqToSegment(C.start, C.end, L, v), t.push({
704
+ z.start.fromBufferAttribute(d, v), z.end.fromBufferAttribute(u, v), z.start.applyMatrix4(r), z.end.applyMatrix4(r);
705
+ const h = new x(), L = new x();
706
+ F.distanceSqToSegment(z.start, z.end, L, h), t.push({
846
707
  point: L,
847
- pointOnLine: v,
708
+ pointOnLine: h,
848
709
  distance: F.origin.distanceTo(L),
849
710
  object: o,
850
711
  face: null,
851
- faceIndex: h,
712
+ faceIndex: v,
852
713
  uv: null,
853
714
  uv1: null
854
715
  });
855
716
  }
856
717
  }
857
718
  }
858
- class qt extends je {
719
+ class Ft extends bt {
859
720
  /**
860
721
  * Constructs a new wide line.
861
722
  *
862
723
  * @param {LineSegmentsGeometry} [geometry] - The line geometry.
863
724
  * @param {LineMaterial} [material] - The line material.
864
725
  */
865
- constructor(e = new $e(), t = new Ce({ color: Math.random() * 16777215 })) {
726
+ constructor(e = new Re(), t = new ze({ color: Math.random() * 16777215 })) {
866
727
  super(e, t), this.isLineSegments2 = !0, this.type = "LineSegments2";
867
728
  }
868
729
  /**
@@ -875,8 +736,8 @@ class qt extends je {
875
736
  computeLineDistances() {
876
737
  const e = this.geometry, t = e.attributes.instanceStart, i = e.attributes.instanceEnd, n = new Float32Array(2 * t.count);
877
738
  for (let r = 0, a = 0, d = t.count; r < d; r++, a += 2)
878
- Pe.fromBufferAttribute(t, r), Be.fromBufferAttribute(i, r), n[a] = a === 0 ? 0 : n[a - 1], n[a + 1] = n[a] + Pe.distanceTo(Be);
879
- const s = new ze(n, 2, 1);
739
+ ke.fromBufferAttribute(t, r), Be.fromBufferAttribute(i, r), n[a] = a === 0 ? 0 : n[a - 1], n[a + 1] = n[a] + ke.distanceTo(Be);
740
+ const s = new Ce(n, 2, 1);
880
741
  return e.setAttribute("instanceDistanceStart", new R(s, 1, 0)), e.setAttribute("instanceDistanceEnd", new R(s, 1, 1)), this;
881
742
  }
882
743
  /**
@@ -909,14 +770,14 @@ class qt extends je {
909
770
  const f = Math.max(n.near, oe.distanceToPoint(F.origin));
910
771
  p = Fe(n, f, d.resolution);
911
772
  }
912
- oe.expandByScalar(p), F.intersectsBox(oe) !== !1 && (i ? $t(this, t) : Xt(this, n, t));
773
+ oe.expandByScalar(p), F.intersectsBox(oe) !== !1 && (i ? Bt(this, t) : Dt(this, n, t));
913
774
  }
914
775
  onBeforeRender(e) {
915
776
  const t = this.material.uniforms;
916
777
  t && t.resolution && (e.getViewport(xe), this.material.uniforms.resolution.value.set(xe.z, xe.w));
917
778
  }
918
779
  }
919
- class Xe extends $e {
780
+ class He extends Re {
920
781
  /**
921
782
  * Constructs a new line geometry.
922
783
  */
@@ -970,18 +831,150 @@ class Xe extends $e {
970
831
  return this.setPositions(t.attributes.position.array), this;
971
832
  }
972
833
  }
973
- class Yt extends qt {
834
+ class Ot extends Ft {
974
835
  /**
975
836
  * Constructs a new wide line.
976
837
  *
977
838
  * @param {LineGeometry} [geometry] - The line geometry.
978
839
  * @param {LineMaterial} [material] - The line material.
979
840
  */
980
- constructor(e = new Xe(), t = new Ce({ color: Math.random() * 16777215 })) {
841
+ constructor(e = new He(), t = new ze({ color: Math.random() * 16777215 })) {
981
842
  super(e, t), this.isLine2 = !0, this.type = "Line2";
982
843
  }
983
844
  }
984
- function Zt(o) {
845
+ async function jt(o) {
846
+ return await Tt(o);
847
+ }
848
+ function It(o, e) {
849
+ debugger;
850
+ o.position.copy(e);
851
+ }
852
+ function Vt(o, e, t = new de(16711680)) {
853
+ const i = new x();
854
+ e.getWorldPosition(i);
855
+ const n = o.geometry.attributes.position, s = o.geometry.attributes.color, r = new de(55551);
856
+ let a = 1 / 0, d = -1;
857
+ for (let u = 0; u < n.count; u++) {
858
+ const f = new x().fromBufferAttribute(n, u).distanceTo(i);
859
+ f < a && (a = f, d = u);
860
+ }
861
+ for (let u = 0; u < s.count; u++) r.toArray(s.array, u * 3);
862
+ if (d !== -1) {
863
+ const u = t.toArray(), p = d * 3 + 2;
864
+ for (let f = 0; f < p; f = f + 3)
865
+ s.array[f] = u[0], s.array[f + 1] = u[1], s.array[f + 2] = u[2];
866
+ }
867
+ s.needsUpdate = !0;
868
+ }
869
+ function $e(o, e, t, i = new de(16711680)) {
870
+ It(o, e), Vt(t, o, i);
871
+ }
872
+ const Nt = { class: "panel-content" }, Wt = { class: "animation-controls" }, Gt = { class: "control-row" }, Rt = { class: "control-row" }, Ht = { class: "frame-info" }, $t = { class: "control-row" }, Xt = /* @__PURE__ */ Oe({
873
+ __name: "trackAnimationPanel",
874
+ props: {
875
+ cloud: {},
876
+ knife: {},
877
+ vectors: {}
878
+ },
879
+ emits: ["getThreeData"],
880
+ setup(o, { expose: e, emit: t }) {
881
+ const i = o, n = G(() => i.vectors), s = M(!1), r = M(0), a = M(100);
882
+ let d = !1;
883
+ const u = (g) => `第 ${g + 1} 帧`, p = (g) => {
884
+ if (g < 0 || g >= n.value.length) {
885
+ console.error(`帧索引 ${g} 超出范围`);
886
+ return;
887
+ }
888
+ const h = n.value[g];
889
+ r.value = g, $e(i.knife, h, i.cloud);
890
+ }, f = async () => {
891
+ if (n.value.length === 0) {
892
+ ce.error("无法播放动画:无数据");
893
+ return;
894
+ }
895
+ if (!s.value) {
896
+ s.value = !0, d = !1, n.value.length - 1 === r.value && (r.value = 0);
897
+ try {
898
+ for (let g = r.value + 1; g < n.value.length && !d; g++)
899
+ await new Promise((h) => setTimeout(h, a.value)), p(g);
900
+ d || ce.success("动画播放完成");
901
+ } catch (g) {
902
+ console.error("动画播放出错:", g);
903
+ } finally {
904
+ s.value = !1;
905
+ }
906
+ }
907
+ }, v = async () => {
908
+ s.value && (d = !0, await new Promise((g) => {
909
+ const h = je(() => s.value, (L) => {
910
+ h(), g();
911
+ });
912
+ }), ce.info("动画已停止"));
913
+ }, U = async (g) => {
914
+ s.value && await v(), p(g);
915
+ }, k = async () => {
916
+ s.value && await v(), !(r.value + 1 >= n.value.length) && p(r.value + 1);
917
+ }, T = async () => {
918
+ s.value && await v(), r.value !== 0 && p(r.value - 1);
919
+ }, _ = () => {
920
+ r.value = 0;
921
+ };
922
+ return e({ playAnimation: f, stopAnimation: v, forwardFrame: k, backwardFrame: T, resetAnimationFrame: _, reset: async () => {
923
+ await v(), _();
924
+ } }), (g, h) => {
925
+ const L = q("el-input-number"), me = q("el-form-item"), ve = q("el-form"), J = q("el-slider");
926
+ return Y(), ae("div", Nt, [
927
+ m("div", Wt, [
928
+ m("div", Gt, [
929
+ w(ve, {
930
+ "label-width": "auto",
931
+ style: { width: "100%" }
932
+ }, {
933
+ default: ue(() => [
934
+ w(me, {
935
+ label: "帧间隔 (ms):",
936
+ prop: "frameDuration"
937
+ }, {
938
+ default: ue(() => [
939
+ w(L, {
940
+ modelValue: a.value,
941
+ "onUpdate:modelValue": h[0] || (h[0] = (H) => a.value = H),
942
+ min: 0,
943
+ max: 5e3,
944
+ step: 10,
945
+ style: { width: "100%" }
946
+ }, null, 8, ["modelValue"])
947
+ ]),
948
+ _: 1
949
+ })
950
+ ]),
951
+ _: 1
952
+ })
953
+ ]),
954
+ m("div", Rt, [
955
+ h[2] || (h[2] = m("label", null, "当前帧:", -1)),
956
+ m("span", Ht, Z(r.value + 1) + " / " + Z(n.value.length), 1)
957
+ ]),
958
+ m("div", $t, [
959
+ h[3] || (h[3] = m("label", null, "动画进度:", -1)),
960
+ w(J, {
961
+ modelValue: r.value,
962
+ "onUpdate:modelValue": h[1] || (h[1] = (H) => r.value = H),
963
+ min: 0,
964
+ max: n.value.length > 0 ? n.value.length - 1 : 0,
965
+ step: 1,
966
+ "format-tooltip": u,
967
+ onInput: U,
968
+ disabled: n.value.length === 0,
969
+ style: { "flex-grow": "1", margin: "0 10px" }
970
+ }, null, 8, ["modelValue", "max", "disabled"])
971
+ ])
972
+ ])
973
+ ]);
974
+ };
975
+ }
976
+ }), qt = /* @__PURE__ */ Ge(Xt, [["__scopeId", "data-v-b5665bfd"]]);
977
+ function Yt(o) {
985
978
  const e = [];
986
979
  return o.forEach((t) => {
987
980
  const [i, n, s] = t.trim().split(/\s+/);
@@ -1001,7 +994,7 @@ function fe(o, e, t) {
1001
994
  break;
1002
995
  }
1003
996
  }
1004
- function Kt(o) {
997
+ function Zt(o) {
1005
998
  const e = [], t = ["X", "Y", "Z"];
1006
999
  return o.forEach((i) => {
1007
1000
  const n = {
@@ -1023,25 +1016,25 @@ function Kt(o) {
1023
1016
  fe(r, n, a), e.push(n.x, n.y, n.z);
1024
1017
  }), e;
1025
1018
  }
1026
- const Jt = (o) => o == null ? void 0 : o.filter((t) => t.includes("=")), Qt = (o) => o.replace(/,/g, ""), en = (o) => o == null ? void 0 : o.map((t) => Qt(t)), tn = (o) => {
1027
- const e = Jt(o);
1028
- return en(e);
1019
+ const Kt = (o) => o == null ? void 0 : o.filter((t) => t.includes("=")), Jt = (o) => o.replace(/,/g, ""), Qt = (o) => o == null ? void 0 : o.map((t) => Jt(t)), en = (o) => {
1020
+ const e = Kt(o);
1021
+ return Qt(e);
1029
1022
  };
1030
- function nn(o) {
1031
- const e = tn(o), t = [];
1023
+ function tn(o) {
1024
+ const e = en(o), t = [];
1032
1025
  return e.forEach((i) => {
1033
- var f, h, U, P, k, _;
1026
+ var f, v, U, k, T, _;
1034
1027
  let [n, s, r, a] = i.trim().split(/\s+/);
1035
- s = (f = s == null ? void 0 : s.trim) == null ? void 0 : f.call(s), r = (h = r == null ? void 0 : r.trim) == null ? void 0 : h.call(r), a = (U = a == null ? void 0 : a.trim) == null ? void 0 : U.call(a);
1036
- const [, d] = (P = s == null ? void 0 : s.split) == null ? void 0 : P.call(s, "="), [, u] = (k = r == null ? void 0 : r.split) == null ? void 0 : k.call(r, "="), [, p] = (_ = a == null ? void 0 : a.split) == null ? void 0 : _.call(a, "=");
1028
+ s = (f = s == null ? void 0 : s.trim) == null ? void 0 : f.call(s), r = (v = r == null ? void 0 : r.trim) == null ? void 0 : v.call(r), a = (U = a == null ? void 0 : a.trim) == null ? void 0 : U.call(a);
1029
+ const [, d] = (k = s == null ? void 0 : s.split) == null ? void 0 : k.call(s, "="), [, u] = (T = r == null ? void 0 : r.split) == null ? void 0 : T.call(r, "="), [, p] = (_ = a == null ? void 0 : a.split) == null ? void 0 : _.call(a, "=");
1037
1030
  t.push(+d, +u, +p);
1038
1031
  }), t;
1039
1032
  }
1040
- const on = (o) => o >= "0" && o <= "9", sn = (o) => o === "+" || o === "-", an = (o) => o === ".";
1041
- function rn(o) {
1042
- return on(o) || sn(o) || an(o);
1033
+ const nn = (o) => o >= "0" && o <= "9", on = (o) => o === "+" || o === "-", sn = (o) => o === ".";
1034
+ function an(o) {
1035
+ return nn(o) || on(o) || sn(o);
1043
1036
  }
1044
- function ln(o) {
1037
+ function rn(o) {
1045
1038
  const e = [], t = /* @__PURE__ */ new Set(["X", "Y", "Z"]);
1046
1039
  return o.forEach((i) => {
1047
1040
  const n = {
@@ -1053,7 +1046,7 @@ function ln(o) {
1053
1046
  return;
1054
1047
  let r = null, a = "";
1055
1048
  for (let d = 0; d < (s == null ? void 0 : s.length); d++) {
1056
- const u = s[d], p = t.has(u) ? u : null, f = rn(u);
1049
+ const u = s[d], p = t.has(u) ? u : null, f = an(u);
1057
1050
  if (p || !f) {
1058
1051
  r && fe(r, n, a), r = p, a = "";
1059
1052
  continue;
@@ -1063,21 +1056,21 @@ function ln(o) {
1063
1056
  r && fe(r, n, a), e.push(n.x, n.y, n.z);
1064
1057
  }), e;
1065
1058
  }
1066
- function cn(o) {
1059
+ function ln(o) {
1067
1060
  return o == null ? void 0 : o.includes("=");
1068
1061
  }
1069
- async function un(o) {
1062
+ async function cn(o) {
1070
1063
  var n, s;
1071
1064
  const e = (n = o == null ? void 0 : o.trim()) == null ? void 0 : n.split(/\r?\n/);
1072
- if (cn(o))
1073
- return nn(e);
1065
+ if (ln(o))
1066
+ return tn(e);
1074
1067
  const t = e == null ? void 0 : e[0], i = (s = t == null ? void 0 : t.trim()) == null ? void 0 : s.split(/\s+/);
1075
1068
  if ((i == null ? void 0 : i.length) >= 3)
1076
- return Zt(e);
1069
+ return Yt(e);
1077
1070
  if ((i == null ? void 0 : i.length) === 1)
1078
- return Kt(e);
1071
+ return Zt(e);
1079
1072
  }
1080
- async function dn(o) {
1073
+ async function un(o) {
1081
1074
  const e = o.trim().split(/\r?\n/), t = [];
1082
1075
  return e.forEach((i) => {
1083
1076
  const n = i.trim().split(/\s+/);
@@ -1087,7 +1080,7 @@ async function dn(o) {
1087
1080
  t.push(+s, +r, +a);
1088
1081
  }), t;
1089
1082
  }
1090
- async function fn(o) {
1083
+ async function dn(o) {
1091
1084
  const e = o.trim().split(/\r?\n/), t = [];
1092
1085
  return e.forEach((i) => {
1093
1086
  const n = i.trim().split(/\s+/);
@@ -1097,18 +1090,18 @@ async function fn(o) {
1097
1090
  t.push(+s, +r, +a);
1098
1091
  }), t;
1099
1092
  }
1100
- async function pn(o) {
1093
+ async function fn(o) {
1101
1094
  let e = o.trim().split(/\r?\n/);
1102
1095
  return e = e.filter((i) => {
1103
1096
  const n = i.startsWith("X"), s = i.startsWith("G") && i.includes("X");
1104
1097
  return n || s;
1105
- }), ln(e);
1098
+ }), rn(e);
1106
1099
  }
1107
- async function mn(o, e) {
1100
+ async function pn(o, e) {
1108
1101
  const { isCyd: t, isUv: i, isCpt: n, isNc: s } = e;
1109
- return i ? un(o) : t ? fn(o) : n ? dn(o) : s ? pn(o) : [];
1102
+ return i ? cn(o) : t ? dn(o) : n ? un(o) : s ? fn(o) : [];
1110
1103
  }
1111
- function hn(o) {
1104
+ function mn(o) {
1112
1105
  const e = [];
1113
1106
  for (let t = 0; t < o.length; t += 3)
1114
1107
  e.push(new x(o[t], o[t + 1], o[t + 2]));
@@ -1121,45 +1114,45 @@ function vn(o, e) {
1121
1114
  if (!t || !i || !n || !s)
1122
1115
  return;
1123
1116
  const r = [];
1124
- for (let h = 0; h < e.length; h += 3)
1125
- r.push(new x(e[h], e[h + 1], e[h + 2]));
1126
- const d = new At(r, !1, "catmullrom", 0.5).getPoints(150).flatMap((h) => [h.x, h.y, h.z]), u = new Xe();
1117
+ for (let v = 0; v < e.length; v += 3)
1118
+ r.push(new x(e[v], e[v + 1], e[v + 2]));
1119
+ const d = new Ct(r, !1, "catmullrom", 0.5).getPoints(150).flatMap((v) => [v.x, v.y, v.z]), u = new He();
1127
1120
  u.setPositions(d);
1128
- const p = new Ce({
1121
+ const p = new ze({
1129
1122
  color: 55551,
1130
1123
  linewidth: 3,
1131
1124
  // 像素宽度,可 >1
1132
- resolution: new We(window.innerWidth, window.innerHeight)
1133
- }), f = new Yt(u, p);
1125
+ resolution: new Ne(window.innerWidth, window.innerHeight)
1126
+ }), f = new Ot(u, p);
1134
1127
  return f.name = "轨迹路径", t.add(f), f;
1135
1128
  }
1136
- function gn(o, e, t, i = 4, n = 50) {
1129
+ function hn(o, e, t, i = 4, n = 50) {
1137
1130
  let s = 1 / 0, r = -1 / 0, a = 1 / 0, d = -1 / 0, u = 1 / 0, p = -1 / 0;
1138
1131
  for (let _ = 0; _ < o.length; _ += 3) {
1139
- const A = o[_], g = o[_ + 1], v = o[_ + 2];
1140
- s = Math.min(s, A), r = Math.max(r, A), a = Math.min(a, g), d = Math.max(d, g), u = Math.min(u, v), p = Math.max(p, v);
1132
+ const A = o[_], g = o[_ + 1], h = o[_ + 2];
1133
+ s = Math.min(s, A), r = Math.max(r, A), a = Math.min(a, g), d = Math.max(d, g), u = Math.min(u, h), p = Math.max(p, h);
1141
1134
  }
1142
- const h = Math.sqrt((r - s) ** 2 + (d - a) ** 2 + (p - u) ** 2) * 0.05, U = Ge.degToRad(e.fov), P = 2 * Math.tan(U / 2) * n, k = h / P * t.domElement.height * (i / 4);
1143
- return Math.min(0.4, k);
1135
+ const v = Math.sqrt((r - s) ** 2 + (d - a) ** 2 + (p - u) ** 2) * 0.05, U = We.degToRad(e.fov), k = 2 * Math.tan(U / 2) * n, T = v / k * t.domElement.height * (i / 4);
1136
+ return Math.min(0.4, T);
1144
1137
  }
1145
- function yn(o) {
1138
+ function gn(o) {
1146
1139
  if (o.length % 3 !== 0)
1147
1140
  return console.error("points array length is not a multiple of 3:", o), null;
1148
- const e = new Ut();
1141
+ const e = new zt();
1149
1142
  e.setAttribute("position", new Se(o, 3));
1150
1143
  const t = new Float32Array(o.length);
1151
1144
  for (let s = 0; s < o.length; s += 3)
1152
1145
  t[s] = 0, t[s + 1] = 0.847, t[s + 2] = 1;
1153
- e.setAttribute("color", new Et(t, 3));
1154
- const i = new Mt({
1146
+ e.setAttribute("color", new At(t, 3));
1147
+ const i = new Ut({
1155
1148
  vertexColors: !0,
1156
1149
  size: 0.4,
1157
1150
  // 像素世界单位
1158
1151
  sizeAttenuation: !0
1159
- }), n = new Lt(e, i);
1152
+ }), n = new Et(e, i);
1160
1153
  return i.needsUpdate = !0, n;
1161
1154
  }
1162
- function wn(o, e) {
1155
+ function yn(o, e) {
1163
1156
  const t = new pe().setFromArray(e), i = [
1164
1157
  new x(t.min.x, t.min.y, t.min.z),
1165
1158
  new x(t.max.x, t.min.y, t.min.z),
@@ -1175,25 +1168,25 @@ function wn(o, e) {
1175
1168
  n = Math.max(n, s.distanceTo(o.position));
1176
1169
  return n;
1177
1170
  }
1178
- function xn(o, e) {
1171
+ function wn(o, e) {
1179
1172
  if (!e)
1180
1173
  return;
1181
1174
  const { scene: t, camera: i, renderer: n, controls: s } = o();
1182
1175
  if (!t || !i || !n || !s)
1183
1176
  return;
1184
- const r = yn(e);
1177
+ const r = gn(e);
1185
1178
  if (!r)
1186
1179
  return;
1187
1180
  r.name = "轨迹路径", t.add(r);
1188
- const a = gn(e, i, n, 0.1, 50);
1181
+ const a = hn(e, i, n, 0.1, 50);
1189
1182
  r.material.size = a;
1190
- const d = wn(i, e);
1183
+ const d = yn(i, e);
1191
1184
  return i.far = d * 1.2, i.updateProjectionMatrix(), r;
1192
1185
  }
1193
- const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft" }, Sn = { class: "buttonGroup-left" }, zn = { class: "buttonGroup-right" }, Cn = { class: "buttonGroup-bottom" }, An = { class: "left-panel" }, Un = { class: "panel-header" }, En = { class: "panel-body" }, Mn = {
1186
+ const xn = { class: "obj-viewer-container" }, bn = { class: "buttonGroup-topLeft" }, _n = { class: "buttonGroup-left" }, Sn = { class: "buttonGroup-right" }, Cn = { class: "buttonGroup-bottom" }, zn = { class: "left-panel" }, An = { class: "panel-header" }, Un = { class: "panel-body" }, En = {
1194
1187
  key: 1,
1195
1188
  class: "clipping-content"
1196
- }, Ln = { class: "radio-group" }, Tn = { class: "radio-label" }, kn = { class: "radio-label" }, Pn = { class: "radio-label" }, Bn = { class: "radio-label" }, Dn = { class: "right-panel" }, Fn = { class: "panel-header" }, On = { class: "panel-body" }, In = {
1189
+ }, Mn = { class: "radio-group" }, Ln = { class: "radio-label" }, Pn = { class: "radio-label" }, Tn = { class: "radio-label" }, kn = { class: "radio-label" }, Bn = { class: "right-panel" }, Dn = { class: "panel-header" }, Fn = { class: "panel-body" }, On = {
1197
1190
  key: 0,
1198
1191
  class: "loading-overlay"
1199
1192
  }, jn = /* @__PURE__ */ Oe({
@@ -1205,29 +1198,29 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1205
1198
  },
1206
1199
  emits: ["getAnimationData", "getThreeData"],
1207
1200
  setup(o, { emit: e }) {
1208
- const t = e, i = o, n = M(null), s = M(!1), r = M(""), a = M(), d = M(!1), u = M(""), p = M(!1), f = M(""), h = Q(null), U = Q(null), {
1209
- currentModels: P,
1210
- initThreeJS: k,
1201
+ const t = e, i = o, n = M(null), s = M(!1), r = M(""), a = M(), d = M(!1), u = M(""), p = M(!1), f = M(""), v = Q(null), U = Q(null), {
1202
+ currentModels: k,
1203
+ initThreeJS: T,
1211
1204
  handleResize: _,
1212
1205
  getThreeJSObjects: A,
1213
1206
  cleanup: g,
1214
- axesHelperVisible: v,
1207
+ axesHelperVisible: h,
1215
1208
  toggleAxesVisibility: L,
1216
1209
  zoomIn: me,
1217
- zoomOut: he
1218
- } = ht(n), { isAnimating: J, toggleAnimation: H, stopAnimation: qe } = vt(A, P), { isClipping: Ye, activeClippingAxis: T, toggleClipping: Ze, updateClippingPlanes: O } = gt(A, P), Ke = () => {
1210
+ zoomOut: ve
1211
+ } = mt(n), { isAnimating: J, toggleAnimation: H, stopAnimation: Xe } = vt(A, k), { isClipping: qe, activeClippingAxis: P, toggleClipping: Ye, updateClippingPlanes: O } = ht(A, k), Ze = () => {
1219
1212
  L();
1220
- }, ve = (c) => {
1221
- d.value = !0, u.value = c, c === "剖面视图" && !Ye.value && Ze();
1213
+ }, he = (c) => {
1214
+ d.value = !0, u.value = c, c === "剖面视图" && !qe.value && Ye();
1222
1215
  }, ge = (c) => {
1223
1216
  p.value = !0, f.value = c, c === "动画仿真" && t("getAnimationData");
1224
- }, ye = M([]), $ = M([]), Je = G(() => {
1217
+ }, ye = M([]), $ = M([]), Ke = G(() => {
1225
1218
  var l;
1226
1219
  return (l = i.trackFileType) == null ? void 0 : l.isUv;
1227
- }), Qe = G(() => {
1220
+ }), Je = G(() => {
1228
1221
  var l;
1229
1222
  return (l = i.trackFileType) == null ? void 0 : l.isCyd;
1230
- }), et = G(() => {
1223
+ }), Qe = G(() => {
1231
1224
  var l;
1232
1225
  return (l = i.trackFileType) == null ? void 0 : l.isCpt;
1233
1226
  }), V = G(() => {
@@ -1237,78 +1230,78 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1237
1230
  const c = i.fileBlobs || [];
1238
1231
  return c == null ? void 0 : c[0];
1239
1232
  });
1240
- let I = Q(), N = Q();
1241
- const tt = () => {
1233
+ let j = Q(), N = Q();
1234
+ const et = () => {
1242
1235
  const { scene: c } = A();
1243
- I.value && c && (Te(I.value, c), I.value = null);
1244
- }, nt = () => {
1236
+ j.value && c && (Pe(j.value, c), j.value = null);
1237
+ }, tt = () => {
1245
1238
  const { scene: c } = A();
1246
- N.value && c && (Te(N.value, c), N.value = null);
1239
+ N.value && c && (Pe(N.value, c), N.value = null);
1247
1240
  }, Ue = () => {
1248
- tt(), nt();
1249
- }, it = async (c) => {
1250
- const l = URL.createObjectURL(c), X = await Tt(l);
1251
- if (URL.revokeObjectURL(l), Bt(X)) {
1252
- const y = await mn(X, i.trackFileType) || [];
1241
+ et(), tt();
1242
+ }, nt = async (c) => {
1243
+ const l = URL.createObjectURL(c), X = await Mt(l);
1244
+ if (URL.revokeObjectURL(l), kt(X)) {
1245
+ const y = await pn(X, i.trackFileType) || [];
1253
1246
  ye.value = y;
1254
1247
  const Me = ye.value;
1255
- Je.value && (I.value = vn(A, Me)), (Qe.value || et.value || V.value) && (I.value = xn(A, Me)), yt(A, I.value);
1248
+ Ke.value && (j.value = vn(A, Me)), (Je.value || Qe.value || V.value) && (j.value = wn(A, Me)), gt(A, j.value);
1256
1249
  }
1257
- }, ot = () => {
1250
+ }, it = async () => {
1258
1251
  var c, l;
1259
- N.value = Dt(), $.value = hn(ye.value), $.value && $.value.length && (He(N.value, $.value[0], I.value, new de(16711680)), (l = (c = U.value) == null ? void 0 : c.add) == null || l.call(c, N.value));
1260
- }, st = async () => {
1252
+ N.value = await jt("http://222.92.178.198:55002/CPMPIP/Cut/1_4%20Single%20Flute%20End%20Mill-Cut002.obj"), $.value = mn(ye.value), $.value && $.value.length && ($e(N.value, $.value[0], j.value, new de(16711680)), (l = (c = U.value) == null ? void 0 : c.add) == null || l.call(c, N.value));
1253
+ }, ot = async () => {
1261
1254
  var c;
1262
1255
  await ((c = a == null ? void 0 : a.value) == null ? void 0 : c.reset()), await Ee(Ae.value);
1263
1256
  }, Ee = async (c) => {
1264
- Ue(), await it(c), V.value && ot();
1257
+ Ue(), await nt(c), V.value && it();
1265
1258
  };
1266
- Ie(() => Ae.value, async (c) => {
1259
+ je(() => Ae.value, async (c) => {
1267
1260
  c && await Ee(c);
1268
1261
  }, {
1269
1262
  immediate: !0,
1270
1263
  deep: !0
1271
1264
  });
1272
- const at = () => {
1265
+ const st = () => {
1273
1266
  var c;
1274
1267
  V.value && ((c = a == null ? void 0 : a.value) == null || c.playAnimation());
1275
- }, rt = () => {
1268
+ }, at = () => {
1276
1269
  var c;
1277
1270
  V.value && ((c = a == null ? void 0 : a.value) == null || c.stopAnimation());
1278
- }, lt = () => {
1271
+ }, rt = () => {
1279
1272
  var c;
1280
1273
  V.value && ((c = a == null ? void 0 : a.value) == null || c.forwardFrame());
1281
- }, ct = () => {
1274
+ }, lt = () => {
1282
1275
  var c;
1283
1276
  V.value && ((c = a == null ? void 0 : a.value) == null || c.backwardFrame());
1284
- }, ut = () => {
1285
- k(), window.addEventListener("resize", _);
1277
+ }, ct = () => {
1278
+ T(), window.addEventListener("resize", _);
1286
1279
  const c = A();
1287
1280
  U.value = c.scene, U.value && (U.value.name = "CPMPIP");
1288
- }, dt = () => {
1289
- window.removeEventListener("resize", _), J.value && qe(), Ue(), g();
1281
+ }, ut = () => {
1282
+ window.removeEventListener("resize", _), J.value && Xe(), Ue(), g();
1290
1283
  };
1291
- return ft(async () => {
1284
+ return dt(async () => {
1292
1285
  try {
1293
- ut();
1286
+ ct();
1294
1287
  } catch (c) {
1295
1288
  console.error("Three.js 初始化失败:", c), ce.error("渲染引擎初始化失败!");
1296
1289
  }
1297
- }), pt(() => {
1298
- dt();
1290
+ }), ft(() => {
1291
+ ut();
1299
1292
  }), (c, l) => {
1300
1293
  const X = q("el-scrollbar");
1301
- return Y(), ae("div", bn, [
1294
+ return Y(), ae("div", xn, [
1302
1295
  m("div", {
1303
1296
  ref_key: "threejsContainer",
1304
1297
  ref: n,
1305
1298
  class: "threejs-container"
1306
1299
  }, null, 512),
1307
- m("div", _n, [
1300
+ m("div", bn, [
1308
1301
  w(E, {
1309
1302
  name: "viewReset",
1310
1303
  size: "24",
1311
- onClick: st,
1304
+ onClick: ot,
1312
1305
  title: "重置"
1313
1306
  }),
1314
1307
  w(E, {
@@ -1321,7 +1314,7 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1321
1314
  name: "suoxiao",
1322
1315
  size: "24",
1323
1316
  title: "缩小",
1324
- onClick: b(he)
1317
+ onClick: b(ve)
1325
1318
  }, null, 8, ["onClick"]),
1326
1319
  w(E, {
1327
1320
  name: "lookAround",
@@ -1332,29 +1325,29 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1332
1325
  w(E, {
1333
1326
  name: "zuobiaoxi",
1334
1327
  size: "24",
1335
- active: b(v),
1336
- onClick: Ke,
1328
+ active: b(h),
1329
+ onClick: Ze,
1337
1330
  title: "显隐坐标轴"
1338
1331
  }, null, 8, ["active"])
1339
1332
  ]),
1340
- m("div", Sn, [
1341
- Le(c.$slots, "button-left", { switchRightPanel: ve }, void 0, !0),
1333
+ m("div", _n, [
1334
+ Le(c.$slots, "button-left", { switchRightPanel: he }, void 0, !0),
1342
1335
  w(E, {
1343
1336
  name: "jiegoushu",
1344
1337
  size: "24",
1345
- onClick: l[0] || (l[0] = (y) => ve("场景树")),
1338
+ onClick: l[0] || (l[0] = (y) => he("场景树")),
1346
1339
  active: d.value && u.value === "场景树",
1347
1340
  title: "场景树"
1348
1341
  }, null, 8, ["active"]),
1349
1342
  w(E, {
1350
1343
  name: "clipping",
1351
1344
  size: "24",
1352
- onClick: l[1] || (l[1] = (y) => ve("剖面视图")),
1345
+ onClick: l[1] || (l[1] = (y) => he("剖面视图")),
1353
1346
  active: d.value && u.value === "剖面视图",
1354
1347
  title: "剖面视图"
1355
1348
  }, null, 8, ["active"])
1356
1349
  ]),
1357
- m("div", zn, [
1350
+ m("div", Sn, [
1358
1351
  Le(c.$slots, "button-right", { switchRightPanel: ge }, void 0, !0),
1359
1352
  w(E, {
1360
1353
  name: "guanjiekongzhi",
@@ -1377,96 +1370,96 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1377
1370
  size: "24",
1378
1371
  backgroundColor: "#ffffff",
1379
1372
  title: "快退",
1380
- onClick: ct
1373
+ onClick: lt
1381
1374
  }),
1382
1375
  w(E, {
1383
1376
  name: "bofang",
1384
1377
  size: "24",
1385
1378
  backgroundColor: "#ffffff",
1386
1379
  title: "播放",
1387
- onClick: at
1380
+ onClick: st
1388
1381
  }),
1389
1382
  w(E, {
1390
1383
  name: "kuaijin",
1391
1384
  size: "24",
1392
1385
  backgroundColor: "#ffffff",
1393
1386
  title: "快进",
1394
- onClick: lt
1387
+ onClick: rt
1395
1388
  }),
1396
1389
  w(E, {
1397
1390
  name: "zanting",
1398
1391
  size: "24",
1399
1392
  backgroundColor: "#ffffff",
1400
1393
  title: "暂停",
1401
- onClick: rt
1394
+ onClick: at
1402
1395
  })
1403
1396
  ]),
1404
- j(m("div", An, [
1405
- m("div", Un, [
1397
+ I(m("div", zn, [
1398
+ m("div", An, [
1406
1399
  m("span", null, Z(u.value), 1),
1407
1400
  m("span", {
1408
1401
  class: "close",
1409
1402
  onClick: l[4] || (l[4] = (y) => d.value = !1)
1410
1403
  }, " X ")
1411
1404
  ]),
1412
- m("div", En, [
1405
+ m("div", Un, [
1413
1406
  w(X, { height: "100%" }, {
1414
1407
  default: ue(() => [
1415
- u.value === "场景树" ? (Y(), mt(kt, {
1408
+ u.value === "场景树" ? (Y(), pt(Lt, {
1416
1409
  key: 0,
1417
- model: h.value
1410
+ model: v.value
1418
1411
  }, null, 8, ["model"])) : we("", !0),
1419
- u.value === "剖面视图" ? (Y(), ae("div", Mn, [
1420
- m("div", Ln, [
1421
- m("label", Tn, [
1422
- j(m("input", {
1412
+ u.value === "剖面视图" ? (Y(), ae("div", En, [
1413
+ m("div", Mn, [
1414
+ m("label", Ln, [
1415
+ I(m("input", {
1423
1416
  type: "radio",
1424
1417
  name: "clipping-axis",
1425
1418
  value: "none",
1426
- "onUpdate:modelValue": l[5] || (l[5] = (y) => ee(T) ? T.value = y : null),
1419
+ "onUpdate:modelValue": l[5] || (l[5] = (y) => ee(P) ? P.value = y : null),
1427
1420
  onChange: l[6] || (l[6] = //@ts-ignore
1428
1421
  (...y) => b(O) && b(O)(...y))
1429
1422
  }, null, 544), [
1430
- [te, b(T)]
1423
+ [te, b(P)]
1431
1424
  ]),
1432
1425
  l[14] || (l[14] = m("span", { class: "radio-text" }, "无切割", -1))
1433
1426
  ]),
1434
- m("label", kn, [
1435
- j(m("input", {
1427
+ m("label", Pn, [
1428
+ I(m("input", {
1436
1429
  type: "radio",
1437
1430
  name: "clipping-axis",
1438
1431
  value: "x",
1439
- "onUpdate:modelValue": l[7] || (l[7] = (y) => ee(T) ? T.value = y : null),
1432
+ "onUpdate:modelValue": l[7] || (l[7] = (y) => ee(P) ? P.value = y : null),
1440
1433
  onChange: l[8] || (l[8] = //@ts-ignore
1441
1434
  (...y) => b(O) && b(O)(...y))
1442
1435
  }, null, 544), [
1443
- [te, b(T)]
1436
+ [te, b(P)]
1444
1437
  ]),
1445
1438
  l[15] || (l[15] = m("span", { class: "radio-text" }, "X轴切割", -1))
1446
1439
  ]),
1447
- m("label", Pn, [
1448
- j(m("input", {
1440
+ m("label", Tn, [
1441
+ I(m("input", {
1449
1442
  type: "radio",
1450
1443
  name: "clipping-axis",
1451
1444
  value: "y",
1452
- "onUpdate:modelValue": l[9] || (l[9] = (y) => ee(T) ? T.value = y : null),
1445
+ "onUpdate:modelValue": l[9] || (l[9] = (y) => ee(P) ? P.value = y : null),
1453
1446
  onChange: l[10] || (l[10] = //@ts-ignore
1454
1447
  (...y) => b(O) && b(O)(...y))
1455
1448
  }, null, 544), [
1456
- [te, b(T)]
1449
+ [te, b(P)]
1457
1450
  ]),
1458
1451
  l[16] || (l[16] = m("span", { class: "radio-text" }, "Y轴切割", -1))
1459
1452
  ]),
1460
- m("label", Bn, [
1461
- j(m("input", {
1453
+ m("label", kn, [
1454
+ I(m("input", {
1462
1455
  type: "radio",
1463
1456
  name: "clipping-axis",
1464
1457
  value: "z",
1465
- "onUpdate:modelValue": l[11] || (l[11] = (y) => ee(T) ? T.value = y : null),
1458
+ "onUpdate:modelValue": l[11] || (l[11] = (y) => ee(P) ? P.value = y : null),
1466
1459
  onChange: l[12] || (l[12] = //@ts-ignore
1467
1460
  (...y) => b(O) && b(O)(...y))
1468
1461
  }, null, 544), [
1469
- [te, b(T)]
1462
+ [te, b(P)]
1470
1463
  ]),
1471
1464
  l[17] || (l[17] = m("span", { class: "radio-text" }, "Z轴切割", -1))
1472
1465
  ])
@@ -1479,24 +1472,24 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1479
1472
  ], 512), [
1480
1473
  [ne, d.value]
1481
1474
  ]),
1482
- j(m("div", Dn, [
1483
- m("div", Fn, [
1475
+ I(m("div", Bn, [
1476
+ m("div", Dn, [
1484
1477
  m("span", null, Z(f.value), 1),
1485
1478
  m("span", {
1486
1479
  class: "close",
1487
1480
  onClick: l[13] || (l[13] = (y) => p.value = !1)
1488
1481
  }, " X ")
1489
1482
  ]),
1490
- m("div", On, [
1483
+ m("div", Fn, [
1491
1484
  w(X, { height: "100%" }, {
1492
1485
  default: ue(() => [
1493
- j(w(Pt, { model: h.value }, null, 8, ["model"]), [
1486
+ I(w(Pt, { model: v.value }, null, 8, ["model"]), [
1494
1487
  [ne, f.value === "关节控制"]
1495
1488
  ]),
1496
- j(w(Ht, {
1489
+ I(w(qt, {
1497
1490
  ref_key: "animationPanelRef",
1498
1491
  ref: a,
1499
- cloud: b(I),
1492
+ cloud: b(j),
1500
1493
  knife: b(N),
1501
1494
  vectors: $.value
1502
1495
  }, null, 8, ["cloud", "knife", "vectors"]), [
@@ -1509,14 +1502,14 @@ const bn = { class: "obj-viewer-container" }, _n = { class: "buttonGroup-topLeft
1509
1502
  ], 512), [
1510
1503
  [ne, p.value]
1511
1504
  ]),
1512
- s.value ? (Y(), ae("div", In, [
1505
+ s.value ? (Y(), ae("div", On, [
1513
1506
  l[18] || (l[18] = m("div", { class: "loading-spinner" }, null, -1)),
1514
1507
  m("p", null, Z(r.value), 1)
1515
1508
  ])) : we("", !0)
1516
1509
  ]);
1517
1510
  };
1518
1511
  }
1519
- }), Yn = /* @__PURE__ */ Re(jn, [["__scopeId", "data-v-a8f1772d"]]);
1512
+ }), Yn = /* @__PURE__ */ Ge(jn, [["__scopeId", "data-v-14459d17"]]);
1520
1513
  export {
1521
1514
  Yn as default
1522
1515
  };