ss-component-new 1.3.682 → 1.3.683
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/dist/JSEncrypt-B36c1iN5.js +1983 -0
- package/dist/{MTLLoader-qT5QxtXm.js → MTLLoader-DPHzTMwa.js} +28 -28
- package/dist/{URDFLoader-D3eMTiZb.js → URDFLoader-M-UG5-pR.js} +606 -611
- package/dist/{animationData-DBAbHIow.js → animationData-DRuHGkTO.js} +3 -3
- package/dist/{array-jRfpOka6.js → array-DjjQ0-_X.js} +14 -13
- package/dist/{clone-epSiajPW.js → clone-nUXh221j.js} +1 -1
- package/dist/{eleIcon-BWVKfp5t.js → eleIcon-DlIcb4df.js} +2 -2
- package/dist/{iconfont-DsSG_70z.js → iconfont-BhJBoU2I.js} +91 -91
- package/dist/icons/svg/method.svg +1 -0
- package/dist/{index-DJrzqi4-.js → index-11kpzK0A.js} +17 -17
- package/dist/{index-3va3ENB8.js → index-8KwwXnRD.js} +3 -3
- package/dist/{index-Bmk-CXy5.js → index-B6x7nsvL.js} +5 -5
- package/dist/index-BBzJ8BLa.js +572 -0
- package/dist/{index-dD-mKgue.js → index-BHtNKL1L.js} +2 -2
- package/dist/{index-Bto8e0_l.js → index-BLFiId9N.js} +5 -5
- package/dist/{index-FNOjQQWl.js → index-BNDaeOZD.js} +43 -40
- package/dist/{index-CN6F4ryE.js → index-Ba8phnvt.js} +23 -23
- package/dist/{index-Bd9AU0ks.js → index-CBL2Pg06.js} +5 -5
- package/dist/index-CBPXalBI.js +15007 -0
- package/dist/{index-Bvvz41NY.js → index-CG1vGzHt.js} +1 -1
- package/dist/{index-C-Cstw1x.js → index-CIoBc8yl.js} +62 -60
- package/dist/{index-CfHObnEf.js → index-CJbdXJRV.js} +3 -3
- package/dist/{index-YVR3acYT.js → index-CJySKIdc.js} +1 -1
- package/dist/{index-CPRVBnQZ.js → index-CKB74hmA.js} +483 -482
- package/dist/{index-DVURXaLH.js → index-CM6CVZ_d.js} +13935 -20059
- package/dist/{index-CNydoPVR.js → index-CYspf59Y.js} +8 -8
- package/dist/{index-CUJOuk-t.js → index-CccqT4-H.js} +6 -6
- package/dist/{index-BLAPVSLU.js → index-ChfKhYMO.js} +22242 -22256
- package/dist/{index-CH8pGxiX.js → index-Cl2tex39.js} +172 -163
- package/dist/{index-C5r4GvjQ.js → index-CnmXW-Bj.js} +42 -38
- package/dist/{index-CWCQy24b.js → index-Cpv5443J.js} +4 -4
- package/dist/{index-DT2KzAmL.js → index-CsqopIxB.js} +1077 -1076
- package/dist/{index-CmRnsU1X.js → index-CzgY9rV-.js} +61 -57
- package/dist/{index-Lc7md2MS.js → index-DTjEPXdC.js} +76 -70
- package/dist/{index-BpGFvMaU.js → index-DewO44mx.js} +2 -2
- package/dist/{index-kmuFWiAq.js → index-DkFpug1v.js} +20 -18
- package/dist/{index-D_kI6aHR.js → index-DlFmNKos.js} +8 -7
- package/dist/{index-SjNcMhxZ.js → index-Dx-bFdbp.js} +8 -8
- package/dist/{index-D1o4d6gh.js → index-DyOGhRxL.js} +4 -4
- package/dist/{index-B4vESlof.js → index-QdkaQuAk.js} +2 -2
- package/dist/{index-XGieOXX9.js → index-R2i3Xnfq.js} +4 -4
- package/dist/{index-BLnbN_F-.js → index-gFBsqsq6.js} +3 -3
- package/dist/{index-BFqUz4pN.js → index-rlStojTL.js} +1 -1
- package/dist/{index--PjD6UIW.js → index-zdWtzZvH.js} +7 -7
- package/dist/{index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js → index.vue_vue_type_script_setup_true_lang-DRzriV-s.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_83e6d490_lang-QPys2KyW.js → index.vue_vue_type_style_index_0_scoped_83e6d490_lang-BsOR2Ig8.js} +56038 -49940
- package/dist/isString-h0UV2hrP.js +8 -0
- package/dist/{localIcon-CoJHw5ss.js → localIcon-D5UoFBU5.js} +1 -1
- package/dist/{main-Bgh_Vl8E.js → main-C7zjHnDD.js} +9 -9
- package/dist/{menuIndex-B7ZUahFp.js → menuIndex-BE8WKQ_M.js} +1 -1
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/{request-DiogHwkN.js → request-DolpfyNJ.js} +3076 -3494
- package/dist/ss-component.css +3 -3
- package/dist/ss-component.js +14 -14
- package/dist/ss-component2.js +13 -13
- package/dist/ss-component3.js +1 -1
- package/dist/{threeModel-DF67wAtc.js → threeModel-DiiHNAHL.js} +174 -174
- package/dist/{threePreview-CQQPm2oj.js → threePreview-Bu2Spume.js} +12 -12
- package/dist/{threeSceneView-MukJjphg.js → threeSceneView-DxeVIhrp.js} +50 -49
- package/dist/{threeSceneViewForCPMPIP-Cmw3lxMx.js → threeSceneViewForCPMPIP-DPYmtlbM.js} +17 -16
- package/dist/{threeTrackPathView-d9QnH6pv.js → threeTrackPathView-fb0Ye-HT.js} +114 -114
- package/dist/{threeViewerHost-CxKP0BGS.js → threeViewerHost-DHRT4ihY.js} +36 -36
- package/dist/{urdfTree-BMwSzHf8.js → urdfTree-CFaALNOQ.js} +9 -9
- package/dist/{workpieceTreePanel-DTFfwsXF.js → workpieceTreePanel-BxNqg9o9.js} +60 -56
- package/package.json +4 -2
- package/public/icons/svg/method.svg +1 -0
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/index-B-oUd2b-.js +0 -2623
- package/dist/index-BkChdIqr.js +0 -11779
- package/dist/isString-CoCw_sp3.js +0 -8
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E,
|
|
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-
|
|
3
|
-
import { C as O,
|
|
4
|
-
import "./index-
|
|
5
|
-
import { U as et, J as tt } from "./urdfTree-
|
|
6
|
-
import { E as B } from "./request-
|
|
1
|
+
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, createElementBlock as ee, openBlock as X, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as j, shallowRef as D, watch as Ee, onMounted as Xe, onBeforeUnmount as je, withDirectives as N, createCommentVNode as S, unref as A, renderSlot as ie, createBlock as le, vShow as Z, nextTick as Ye } 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-BhJBoU2I.js";
|
|
3
|
+
import { C as O, i as Oe, b3 as Ge, v as qe, V as te, w as ue, _ as fe, a4 as Ke, y as We, a3 as Je, a0 as Re, a1 as He, p as Qe, b4 as Se } from "./index.vue_vue_type_style_index_0_scoped_83e6d490_lang-BsOR2Ig8.js";
|
|
4
|
+
import "./index-CsqopIxB.js";
|
|
5
|
+
import { U as et, J as tt } from "./urdfTree-CFaALNOQ.js";
|
|
6
|
+
import { E as B } from "./request-DolpfyNJ.js";
|
|
7
7
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
import { i as nt } from "./isString-
|
|
8
|
+
import { i as nt } from "./isString-h0UV2hrP.js";
|
|
9
9
|
function ot(e = 0.5, n = 4) {
|
|
10
10
|
const o = new Oe(
|
|
11
11
|
new Ge(e, n, 32),
|
|
@@ -16,19 +16,19 @@ function ot(e = 0.5, n = 4) {
|
|
|
16
16
|
// ↓ 降金属
|
|
17
17
|
roughness: 0.6
|
|
18
18
|
})
|
|
19
|
-
),
|
|
20
|
-
return o.geometry.translate(0, -
|
|
19
|
+
), a = o.geometry.parameters.height;
|
|
20
|
+
return o.geometry.translate(0, -a / 2, 0), o.rotation.set(-90, 0, 0, "XYZ"), o;
|
|
21
21
|
}
|
|
22
22
|
function st(e, n) {
|
|
23
23
|
e.position.copy(n);
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
const
|
|
27
|
-
n.getWorldPosition(
|
|
25
|
+
function at(e, n, o = new O(16711680)) {
|
|
26
|
+
const a = new te();
|
|
27
|
+
n.getWorldPosition(a);
|
|
28
28
|
const l = e.geometry.attributes.position, t = e.geometry.attributes.color, s = new O(55551);
|
|
29
29
|
let r = 1 / 0, f = -1;
|
|
30
30
|
for (let c = 0; c < l.count; c++) {
|
|
31
|
-
const v = new te().fromBufferAttribute(l, c).distanceTo(
|
|
31
|
+
const v = new te().fromBufferAttribute(l, c).distanceTo(a);
|
|
32
32
|
v < r && (r = v, f = c);
|
|
33
33
|
}
|
|
34
34
|
for (let c = 0; c < t.count; c++) s.toArray(t.array, c * 3);
|
|
@@ -39,10 +39,10 @@ function it(e, n, o = new O(16711680)) {
|
|
|
39
39
|
}
|
|
40
40
|
t.needsUpdate = !0;
|
|
41
41
|
}
|
|
42
|
-
function de(e, n, o,
|
|
43
|
-
st(e, n),
|
|
42
|
+
function de(e, n, o, a = new O(16711680)) {
|
|
43
|
+
st(e, n), at(o, e, a);
|
|
44
44
|
}
|
|
45
|
-
const
|
|
45
|
+
const it = { 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
46
|
__name: "trackAnimationPanel",
|
|
47
47
|
props: {
|
|
48
48
|
cloud: {},
|
|
@@ -51,7 +51,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
51
51
|
},
|
|
52
52
|
emits: ["getThreeData"],
|
|
53
53
|
setup(e, { expose: n, emit: o }) {
|
|
54
|
-
const
|
|
54
|
+
const a = e, l = U(() => a.vectors), t = k(!1), s = k(0), r = k(100);
|
|
55
55
|
let f = !1;
|
|
56
56
|
const c = (g) => `第 ${g + 1} 帧`, m = (g) => {
|
|
57
57
|
if (g < 0 || g >= l.value.length) {
|
|
@@ -59,7 +59,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
59
59
|
return;
|
|
60
60
|
}
|
|
61
61
|
const y = l.value[g];
|
|
62
|
-
s.value = g, de(
|
|
62
|
+
s.value = g, de(a.knife, y, a.cloud);
|
|
63
63
|
}, v = async () => {
|
|
64
64
|
if (l.value.length === 0) {
|
|
65
65
|
B.error("无法播放动画:无数据");
|
|
@@ -92,7 +92,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
92
92
|
await C(), h();
|
|
93
93
|
} }), (g, y) => {
|
|
94
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",
|
|
95
|
+
return X(), ee("div", it, [
|
|
96
96
|
d("div", lt, [
|
|
97
97
|
d("div", rt, [
|
|
98
98
|
p(W, {
|
|
@@ -122,7 +122,7 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
122
122
|
]),
|
|
123
123
|
d("div", ct, [
|
|
124
124
|
y[2] || (y[2] = d("label", null, "当前帧:", -1)),
|
|
125
|
-
d("span", ut,
|
|
125
|
+
d("span", ut, j(s.value + 1) + " / " + j(l.value.length), 1)
|
|
126
126
|
]),
|
|
127
127
|
d("div", ft, [
|
|
128
128
|
y[3] || (y[3] = d("label", null, "动画进度:", -1)),
|
|
@@ -146,8 +146,8 @@ const at = { class: "panel-content" }, lt = { class: "animation-controls" }, rt
|
|
|
146
146
|
function mt(e) {
|
|
147
147
|
const n = [];
|
|
148
148
|
return e.forEach((o) => {
|
|
149
|
-
const [
|
|
150
|
-
n.push(+
|
|
149
|
+
const [a, l, t] = o.trim().split(/\s+/);
|
|
150
|
+
n.push(+a, +l, +t);
|
|
151
151
|
}), n;
|
|
152
152
|
}
|
|
153
153
|
function G(e, n, o) {
|
|
@@ -165,12 +165,12 @@ function G(e, n, o) {
|
|
|
165
165
|
}
|
|
166
166
|
function pt(e) {
|
|
167
167
|
const n = [], o = ["X", "Y", "Z"];
|
|
168
|
-
return e.forEach((
|
|
168
|
+
return e.forEach((a) => {
|
|
169
169
|
const l = {
|
|
170
170
|
x: 0,
|
|
171
171
|
y: 0,
|
|
172
172
|
z: 0
|
|
173
|
-
}, t =
|
|
173
|
+
}, t = a.trim();
|
|
174
174
|
if (!t)
|
|
175
175
|
return;
|
|
176
176
|
let s = null, r = "";
|
|
@@ -191,9 +191,9 @@ const ht = (e) => e == null ? void 0 : e.filter((o) => o.includes("=")), gt = (e
|
|
|
191
191
|
};
|
|
192
192
|
function wt(e) {
|
|
193
193
|
const n = Ct(e), o = [];
|
|
194
|
-
return n.forEach((
|
|
194
|
+
return n.forEach((a) => {
|
|
195
195
|
var v, C, P, _, T, h;
|
|
196
|
-
let [l, t, s, r] =
|
|
196
|
+
let [l, t, s, r] = a.trim().split(/\s+/);
|
|
197
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
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
199
|
o.push(+f, +c, +m);
|
|
@@ -205,12 +205,12 @@ function Tt(e) {
|
|
|
205
205
|
}
|
|
206
206
|
function zt(e) {
|
|
207
207
|
const n = [], o = /* @__PURE__ */ new Set(["X", "Y", "Z"]);
|
|
208
|
-
return e.forEach((
|
|
208
|
+
return e.forEach((a) => {
|
|
209
209
|
const l = {
|
|
210
210
|
x: 0,
|
|
211
211
|
y: 0,
|
|
212
212
|
z: 0
|
|
213
|
-
}, t =
|
|
213
|
+
}, t = a.trim();
|
|
214
214
|
if (!t)
|
|
215
215
|
return;
|
|
216
216
|
let s = null, r = "";
|
|
@@ -236,16 +236,16 @@ async function Pt(e) {
|
|
|
236
236
|
const n = (l = e == null ? void 0 : e.trim()) == null ? void 0 : l.split(/\r?\n/);
|
|
237
237
|
if (At(e))
|
|
238
238
|
return wt(n);
|
|
239
|
-
const o = n == null ? void 0 : n[0],
|
|
240
|
-
if ((
|
|
239
|
+
const o = n == null ? void 0 : n[0], a = (t = o == null ? void 0 : o.trim()) == null ? void 0 : t.split(/\s+/);
|
|
240
|
+
if ((a == null ? void 0 : a.length) >= 3)
|
|
241
241
|
return mt(n);
|
|
242
|
-
if ((
|
|
242
|
+
if ((a == null ? void 0 : a.length) === 1)
|
|
243
243
|
return pt(n);
|
|
244
244
|
}
|
|
245
245
|
async function xt(e) {
|
|
246
246
|
const n = e.trim().split(/\r?\n/), o = [];
|
|
247
|
-
return n.forEach((
|
|
248
|
-
const l =
|
|
247
|
+
return n.forEach((a) => {
|
|
248
|
+
const l = a.trim().split(/\s+/);
|
|
249
249
|
if (l.length != 3)
|
|
250
250
|
return;
|
|
251
251
|
const [t, s, r] = l;
|
|
@@ -254,8 +254,8 @@ async function xt(e) {
|
|
|
254
254
|
}
|
|
255
255
|
async function Ft(e) {
|
|
256
256
|
const n = e.trim().split(/\r?\n/), o = [];
|
|
257
|
-
return n.forEach((
|
|
258
|
-
const l =
|
|
257
|
+
return n.forEach((a) => {
|
|
258
|
+
const l = a.trim().split(/\s+/);
|
|
259
259
|
if (l.length != 3)
|
|
260
260
|
return;
|
|
261
261
|
const [t, s, r] = l;
|
|
@@ -264,14 +264,14 @@ async function Ft(e) {
|
|
|
264
264
|
}
|
|
265
265
|
async function Mt(e) {
|
|
266
266
|
let n = e.trim().split(/\r?\n/);
|
|
267
|
-
return n = n.filter((
|
|
268
|
-
const l =
|
|
267
|
+
return n = n.filter((a) => {
|
|
268
|
+
const l = a.startsWith("X") || a.startsWith("Y") || a.startsWith("Z"), t = a.startsWith("G") && (a.includes("X") || a.includes("Y") || a.includes("Z")), s = a.startsWith("N") && (a.includes("X") || a.includes("Y") || a.includes("Z"));
|
|
269
269
|
return l || t || s;
|
|
270
270
|
}), zt(n);
|
|
271
271
|
}
|
|
272
272
|
async function Ut(e, n) {
|
|
273
|
-
const { isCyd: o, isUv:
|
|
274
|
-
return
|
|
273
|
+
const { isCyd: o, isUv: a, isCpt: l, isNc: t } = n;
|
|
274
|
+
return a ? Pt(e) : o ? Ft(e) : l ? xt(e) : t ? Mt(e) : [];
|
|
275
275
|
}
|
|
276
276
|
function Lt(e) {
|
|
277
277
|
const n = [];
|
|
@@ -279,7 +279,7 @@ function Lt(e) {
|
|
|
279
279
|
n.push(new te(e[o], e[o + 1], e[o + 2]));
|
|
280
280
|
return n;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function Vt(e) {
|
|
283
283
|
const n = new ue();
|
|
284
284
|
n.setAttribute("position", new fe(e, 3));
|
|
285
285
|
const o = new Ke({
|
|
@@ -288,22 +288,22 @@ function $t(e) {
|
|
|
288
288
|
});
|
|
289
289
|
return new We(n, o);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function $t(e, n) {
|
|
292
292
|
if (!n || n.length < 3)
|
|
293
293
|
return;
|
|
294
|
-
const { scene: o, camera:
|
|
295
|
-
if (!o || !
|
|
294
|
+
const { scene: o, camera: a, renderer: l, controls: t } = e();
|
|
295
|
+
if (!o || !a || !l || !t)
|
|
296
296
|
return;
|
|
297
|
-
const s =
|
|
297
|
+
const s = Vt(n);
|
|
298
298
|
return s.name = "轨迹路径", o.add(s), s;
|
|
299
299
|
}
|
|
300
|
-
function Et(e, n, o,
|
|
300
|
+
function Et(e, n, o, a = 4, l = 50) {
|
|
301
301
|
let t = 1 / 0, s = -1 / 0, r = 1 / 0, f = -1 / 0, c = 1 / 0, m = -1 / 0;
|
|
302
302
|
for (let h = 0; h < e.length; h += 3) {
|
|
303
303
|
const L = e[h], g = e[h + 1], y = e[h + 2];
|
|
304
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
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 * (
|
|
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 * (a / 4);
|
|
307
307
|
return Math.min(0.4, T);
|
|
308
308
|
}
|
|
309
309
|
function Xt(e) {
|
|
@@ -315,28 +315,28 @@ function Xt(e) {
|
|
|
315
315
|
for (let t = 0; t < e.length; t += 3)
|
|
316
316
|
o[t] = 0, o[t + 1] = 0.847, o[t + 2] = 1;
|
|
317
317
|
n.setAttribute("color", new Je(o, 3));
|
|
318
|
-
const
|
|
318
|
+
const a = new Re({
|
|
319
319
|
vertexColors: !0,
|
|
320
320
|
size: 0.4,
|
|
321
321
|
// 像素世界单位
|
|
322
322
|
sizeAttenuation: !0
|
|
323
|
-
}), l = new He(n,
|
|
324
|
-
return
|
|
323
|
+
}), l = new He(n, a);
|
|
324
|
+
return a.needsUpdate = !0, l;
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function jt(e, n) {
|
|
327
327
|
if (!n)
|
|
328
328
|
return;
|
|
329
|
-
const { scene: o, camera:
|
|
330
|
-
if (!o || !
|
|
329
|
+
const { scene: o, camera: a, renderer: l, controls: t } = e();
|
|
330
|
+
if (!o || !a || !l || !t)
|
|
331
331
|
return;
|
|
332
332
|
const s = Xt(n);
|
|
333
333
|
if (!s)
|
|
334
334
|
return;
|
|
335
335
|
s.name = "轨迹路径", o.add(s);
|
|
336
|
-
const r = Et(n,
|
|
336
|
+
const r = Et(n, a, l, 0.1, 50);
|
|
337
337
|
return s.material.size = r, s;
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const Yt = { 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
340
|
key: 0,
|
|
341
341
|
class: "loading-overlay"
|
|
342
342
|
}, Rt = /* @__PURE__ */ ce({
|
|
@@ -347,7 +347,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
347
347
|
trackFileType: {}
|
|
348
348
|
},
|
|
349
349
|
setup(e) {
|
|
350
|
-
const n = e, o = k(null),
|
|
350
|
+
const n = e, o = k(null), a = k(!1), l = k(""), t = k(), s = k(!1), r = k(""), f = k(!1), c = k(""), m = D(null), v = D(null), {
|
|
351
351
|
currentModels: C,
|
|
352
352
|
resetView: P,
|
|
353
353
|
initThreeJS: _,
|
|
@@ -362,13 +362,13 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
362
362
|
zoomOut: J
|
|
363
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
364
|
K();
|
|
365
|
-
}, we = (
|
|
366
|
-
ne.value =
|
|
367
|
-
}, R = (
|
|
368
|
-
s.value = !0, r.value =
|
|
369
|
-
}, H = (
|
|
370
|
-
f.value = !0, c.value =
|
|
371
|
-
}, Q = k([]),
|
|
365
|
+
}, we = (i) => {
|
|
366
|
+
ne.value = i, ye();
|
|
367
|
+
}, R = (i) => {
|
|
368
|
+
s.value = !0, r.value = i, i === "剖面视图" && !he.value && ge();
|
|
369
|
+
}, H = (i) => {
|
|
370
|
+
f.value = !0, c.value = i;
|
|
371
|
+
}, Q = k([]), V = k([]), ke = U(() => {
|
|
372
372
|
var u;
|
|
373
373
|
return (u = n.trackFileType) == null ? void 0 : u.isUv;
|
|
374
374
|
}), be = U(() => {
|
|
@@ -381,73 +381,73 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
381
381
|
var u;
|
|
382
382
|
return (u = n.trackFileType) == null ? void 0 : u.isNc;
|
|
383
383
|
}), oe = U(() => {
|
|
384
|
-
const
|
|
385
|
-
return
|
|
384
|
+
const i = n.fileBlobs || [];
|
|
385
|
+
return i == null ? void 0 : i[0];
|
|
386
386
|
});
|
|
387
387
|
let b = D(), F = D();
|
|
388
388
|
const Te = () => {
|
|
389
|
-
const { scene:
|
|
390
|
-
b.value &&
|
|
389
|
+
const { scene: i } = h();
|
|
390
|
+
b.value && i && (re(b.value, i), b.value = null);
|
|
391
391
|
}, ze = () => {
|
|
392
|
-
const { scene:
|
|
393
|
-
F.value &&
|
|
392
|
+
const { scene: i } = h();
|
|
393
|
+
F.value && i && (re(F.value, i), F.value = null);
|
|
394
394
|
}, se = () => {
|
|
395
395
|
Te(), ze();
|
|
396
|
-
}, Ae = async (
|
|
397
|
-
const u = URL.createObjectURL(
|
|
398
|
-
if (URL.revokeObjectURL(u), nt(
|
|
399
|
-
Q.value = await Ut(
|
|
396
|
+
}, Ae = async (i) => {
|
|
397
|
+
const u = URL.createObjectURL(i), $ = await Se(u);
|
|
398
|
+
if (URL.revokeObjectURL(u), nt($)) {
|
|
399
|
+
Q.value = await Ut($, n.trackFileType) || [];
|
|
400
400
|
const z = Q.value;
|
|
401
|
-
ke.value && (b.value =
|
|
401
|
+
ke.value && (b.value = $t(h, z)), (be.value || _e.value || x.value) && (b.value = jt(h, z));
|
|
402
402
|
}
|
|
403
403
|
}, Pe = async () => {
|
|
404
|
-
var
|
|
405
|
-
F.value = ot(),
|
|
406
|
-
},
|
|
407
|
-
se(), await Ae(
|
|
404
|
+
var i, u;
|
|
405
|
+
F.value = ot(), V.value = Lt(Q.value), V.value && V.value.length && (de(F.value, V.value[0], b.value, new O(16711680)), (u = (i = v.value) == null ? void 0 : i.add) == null || u.call(i, F.value));
|
|
406
|
+
}, ae = async (i) => {
|
|
407
|
+
se(), await Ae(i), b.value && Ie(h, b.value), x.value && Pe();
|
|
408
408
|
};
|
|
409
|
-
Ee(() => oe.value, async (
|
|
410
|
-
|
|
409
|
+
Ee(() => oe.value, async (i) => {
|
|
410
|
+
i && await ae(i);
|
|
411
411
|
}, {
|
|
412
412
|
immediate: !0,
|
|
413
413
|
deep: !0
|
|
414
414
|
});
|
|
415
415
|
const xe = async () => {
|
|
416
|
-
var
|
|
417
|
-
await ((
|
|
416
|
+
var i;
|
|
417
|
+
await ((i = t == null ? void 0 : t.value) == null ? void 0 : i.reset()), await ae(oe.value);
|
|
418
418
|
}, Fe = () => {
|
|
419
|
-
var
|
|
420
|
-
x.value && ((
|
|
419
|
+
var i;
|
|
420
|
+
x.value && ((i = t == null ? void 0 : t.value) == null || i.playAnimation());
|
|
421
421
|
}, Me = () => {
|
|
422
|
-
var
|
|
423
|
-
x.value && ((
|
|
422
|
+
var i;
|
|
423
|
+
x.value && ((i = t == null ? void 0 : t.value) == null || i.stopAnimation());
|
|
424
424
|
}, Ue = () => {
|
|
425
|
-
var
|
|
426
|
-
x.value && ((
|
|
425
|
+
var i;
|
|
426
|
+
x.value && ((i = t == null ? void 0 : t.value) == null || i.forwardFrame());
|
|
427
427
|
}, Le = () => {
|
|
428
|
-
var
|
|
429
|
-
x.value && ((
|
|
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");
|
|
428
|
+
var i;
|
|
429
|
+
x.value && ((i = t == null ? void 0 : t.value) == null || i.backwardFrame());
|
|
436
430
|
}, Ve = () => {
|
|
437
|
-
|
|
431
|
+
_(), Ye(() => {
|
|
432
|
+
o.value && (Y = new ResizeObserver(T), Y.observe(o.value));
|
|
433
|
+
});
|
|
434
|
+
const i = h();
|
|
435
|
+
v.value = i.scene, v.value && (v.value.name = "CPMPIP");
|
|
436
|
+
}, $e = () => {
|
|
437
|
+
Y && Y.disconnect(), M.value && pe(), se(), L();
|
|
438
438
|
};
|
|
439
|
-
let
|
|
439
|
+
let Y = null;
|
|
440
440
|
return Xe(async () => {
|
|
441
441
|
try {
|
|
442
|
-
|
|
443
|
-
} catch (
|
|
444
|
-
console.error("Three.js 初始化失败:",
|
|
442
|
+
Ve();
|
|
443
|
+
} catch (i) {
|
|
444
|
+
console.error("Three.js 初始化失败:", i), B.error("渲染引擎初始化失败!");
|
|
445
445
|
}
|
|
446
|
-
}),
|
|
447
|
-
|
|
448
|
-
}), (
|
|
449
|
-
const
|
|
450
|
-
return X(), ee("div",
|
|
446
|
+
}), je(() => {
|
|
447
|
+
$e();
|
|
448
|
+
}), (i, u) => {
|
|
449
|
+
const $ = E("el-scrollbar");
|
|
450
|
+
return X(), ee("div", Yt, [
|
|
451
451
|
d("div", {
|
|
452
452
|
ref_key: "threejsContainer",
|
|
453
453
|
ref: o,
|
|
@@ -487,7 +487,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
487
487
|
}, null, 8, ["active"])
|
|
488
488
|
]),
|
|
489
489
|
d("div", Nt, [
|
|
490
|
-
|
|
490
|
+
ie(i.$slots, "button-left", { switchRightPanel: R }, void 0, !0),
|
|
491
491
|
p(w, {
|
|
492
492
|
name: "jiegoushu",
|
|
493
493
|
size: "24",
|
|
@@ -504,7 +504,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
504
504
|
}, null, 8, ["active"])
|
|
505
505
|
]),
|
|
506
506
|
d("div", Zt, [
|
|
507
|
-
|
|
507
|
+
ie(i.$slots, "button-right", { switchRightPanel: H }, void 0, !0),
|
|
508
508
|
p(w, {
|
|
509
509
|
name: "guanjiekongzhi",
|
|
510
510
|
size: "24",
|
|
@@ -552,14 +552,14 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
552
552
|
]),
|
|
553
553
|
N(d("div", It, [
|
|
554
554
|
d("div", Ot, [
|
|
555
|
-
d("span", null,
|
|
555
|
+
d("span", null, j(r.value), 1),
|
|
556
556
|
d("span", {
|
|
557
557
|
class: "close",
|
|
558
558
|
onClick: u[4] || (u[4] = (z) => s.value = !1)
|
|
559
559
|
}, " X ")
|
|
560
560
|
]),
|
|
561
561
|
d("div", Gt, [
|
|
562
|
-
p(
|
|
562
|
+
p($, { height: "100%" }, {
|
|
563
563
|
default: I(() => [
|
|
564
564
|
r.value === "场景树" ? (X(), le(et, {
|
|
565
565
|
key: 0,
|
|
@@ -579,14 +579,14 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
579
579
|
]),
|
|
580
580
|
N(d("div", qt, [
|
|
581
581
|
d("div", Kt, [
|
|
582
|
-
d("span", null,
|
|
582
|
+
d("span", null, j(c.value), 1),
|
|
583
583
|
d("span", {
|
|
584
584
|
class: "close",
|
|
585
585
|
onClick: u[5] || (u[5] = (z) => f.value = !1)
|
|
586
586
|
}, " X ")
|
|
587
587
|
]),
|
|
588
588
|
d("div", Wt, [
|
|
589
|
-
p(
|
|
589
|
+
p($, { height: "100%" }, {
|
|
590
590
|
default: I(() => [
|
|
591
591
|
N(p(tt, { model: m.value }, null, 8, ["model"]), [
|
|
592
592
|
[Z, c.value === "关节控制"]
|
|
@@ -596,7 +596,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
596
596
|
ref: t,
|
|
597
597
|
cloud: A(b),
|
|
598
598
|
knife: A(F),
|
|
599
|
-
vectors:
|
|
599
|
+
vectors: V.value
|
|
600
600
|
}, null, 8, ["cloud", "knife", "vectors"]), [
|
|
601
601
|
[Z, c.value === "动画仿真" && x.value]
|
|
602
602
|
])
|
|
@@ -607,9 +607,9 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
607
607
|
], 512), [
|
|
608
608
|
[Z, f.value]
|
|
609
609
|
]),
|
|
610
|
-
|
|
610
|
+
a.value ? (X(), ee("div", Jt, [
|
|
611
611
|
u[6] || (u[6] = d("div", { class: "loading-spinner" }, null, -1)),
|
|
612
|
-
d("p", null,
|
|
612
|
+
d("p", null, j(l.value), 1)
|
|
613
613
|
])) : S("", !0)
|
|
614
614
|
]);
|
|
615
615
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H,
|
|
2
|
-
import { a0 as W, u as A, p as D, s as $ } from "./index-
|
|
3
|
-
import { g as j,
|
|
1
|
+
import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H, createElementBlock as N, openBlock as T, createElementVNode as K, createBlock as B, createCommentVNode as V, renderSlot as u, unref as m, withCtx as d } from "vue";
|
|
2
|
+
import { a0 as W, u as A, p as D, s as $ } from "./index-CsqopIxB.js";
|
|
3
|
+
import { g as j, s as M, t as L } from "./index.vue_vue_type_style_index_0_scoped_83e6d490_lang-BsOR2Ig8.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const
|
|
5
|
+
const se = {
|
|
6
6
|
SINGLE: "单机",
|
|
7
7
|
DOUBLE: "双机"
|
|
8
|
-
},
|
|
8
|
+
}, re = {
|
|
9
9
|
ROBOT: 1,
|
|
10
10
|
PIPECOMPARSION: 2
|
|
11
11
|
}, a = {
|
|
@@ -17,7 +17,7 @@ const re = {
|
|
|
17
17
|
// 重大专项场景
|
|
18
18
|
PREVIEW: "preview"
|
|
19
19
|
// 预览模式
|
|
20
|
-
},
|
|
20
|
+
}, z = W("threeState", {
|
|
21
21
|
state: () => ({
|
|
22
22
|
data: {
|
|
23
23
|
files: [],
|
|
@@ -33,26 +33,26 @@ const re = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
function
|
|
37
|
-
const E = A(D), { platform: O } = $(E), y =
|
|
36
|
+
function Y() {
|
|
37
|
+
const E = A(D), { platform: O } = $(E), y = z(D), i = ["uv", "cyd", "nc"], p = ["urdf"], n = ["obj", "stl"], P = [...i, ...p, ...n], f = (e) => {
|
|
38
38
|
if (!g())
|
|
39
39
|
throw new Error("不是三维系统");
|
|
40
40
|
y.setData(e);
|
|
41
41
|
}, _ = () => y.getData(), g = () => O.value === "three", c = (e) => j(e), h = (e) => {
|
|
42
42
|
if (!e)
|
|
43
43
|
return !1;
|
|
44
|
-
const
|
|
45
|
-
return P == null ? void 0 : P.includes(
|
|
44
|
+
const s = c(e);
|
|
45
|
+
return P == null ? void 0 : P.includes(s);
|
|
46
46
|
}, S = (e) => {
|
|
47
47
|
if (!e)
|
|
48
48
|
return !1;
|
|
49
|
-
const
|
|
50
|
-
return n == null ? void 0 : n.includes(
|
|
49
|
+
const s = c(e);
|
|
50
|
+
return n == null ? void 0 : n.includes(s);
|
|
51
51
|
}, v = (e) => {
|
|
52
52
|
if (!e)
|
|
53
53
|
return !1;
|
|
54
|
-
const
|
|
55
|
-
return i == null ? void 0 : i.includes(
|
|
54
|
+
const s = c(e);
|
|
55
|
+
return i == null ? void 0 : i.includes(s);
|
|
56
56
|
}, l = (e) => {
|
|
57
57
|
if (!e)
|
|
58
58
|
return {
|
|
@@ -61,7 +61,7 @@ function z() {
|
|
|
61
61
|
isUv: !1,
|
|
62
62
|
isNc: !1
|
|
63
63
|
};
|
|
64
|
-
const
|
|
64
|
+
const s = c(e), o = i == null ? void 0 : i.find((w) => w === s);
|
|
65
65
|
return {
|
|
66
66
|
isCpt: o === "cpt",
|
|
67
67
|
isCyd: o === "cyd",
|
|
@@ -71,8 +71,8 @@ function z() {
|
|
|
71
71
|
}, C = (e) => {
|
|
72
72
|
if (!e)
|
|
73
73
|
return !1;
|
|
74
|
-
const
|
|
75
|
-
return p == null ? void 0 : p.includes(
|
|
74
|
+
const s = c(e);
|
|
75
|
+
return p == null ? void 0 : p.includes(s);
|
|
76
76
|
}, k = (e) => g() && h(e), t = (e) => ({
|
|
77
77
|
url: e,
|
|
78
78
|
extension: c(e)
|
|
@@ -90,16 +90,16 @@ function z() {
|
|
|
90
90
|
getFileExtension: c,
|
|
91
91
|
getFileInfo: t,
|
|
92
92
|
getFilesInfo: (e) => {
|
|
93
|
-
const
|
|
93
|
+
const s = [];
|
|
94
94
|
for (let o = 0; o < e.length; o++) {
|
|
95
95
|
const F = e[o], w = t(F);
|
|
96
|
-
|
|
96
|
+
s.push(w);
|
|
97
97
|
}
|
|
98
|
-
return
|
|
98
|
+
return s;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const q = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q = {
|
|
103
103
|
key: 4,
|
|
104
104
|
class: "loading"
|
|
105
105
|
}, X = /* @__PURE__ */ U({
|
|
@@ -112,13 +112,13 @@ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
112
112
|
height: { default: "100%" }
|
|
113
113
|
},
|
|
114
114
|
setup(E) {
|
|
115
|
-
const O = b(() => import("./threeSceneView-
|
|
115
|
+
const O = b(() => import("./threeSceneView-DxeVIhrp.js")), y = b(() => import("./threePreview-Bu2Spume.js")), i = b(() => import("./threeTrackPathView-fb0Ye-HT.js")), p = b(() => import("./threeSceneViewForCPMPIP-DPYmtlbM.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = Y(), c = I(() => {
|
|
116
116
|
var t;
|
|
117
|
-
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((
|
|
118
|
-
const { url: e, name:
|
|
117
|
+
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((r) => {
|
|
118
|
+
const { url: e, name: s } = r;
|
|
119
119
|
return {
|
|
120
120
|
url: e,
|
|
121
|
-
name:
|
|
121
|
+
name: s
|
|
122
122
|
};
|
|
123
123
|
});
|
|
124
124
|
}), h = I(() => {
|
|
@@ -126,8 +126,8 @@ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
126
126
|
const t = (e = n == null ? void 0 : n.files) == null ? void 0 : e[0];
|
|
127
127
|
return (t == null ? void 0 : t.extension) || "";
|
|
128
128
|
}), S = I(() => {
|
|
129
|
-
var t,
|
|
130
|
-
return (
|
|
129
|
+
var t, r;
|
|
130
|
+
return (r = (t = n == null ? void 0 : n.threeData) == null ? void 0 : t.data) == null ? void 0 : r.trackFileType;
|
|
131
131
|
}), v = I(() => {
|
|
132
132
|
if (n.componentType)
|
|
133
133
|
switch (n.componentType) {
|
|
@@ -149,10 +149,10 @@ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
149
149
|
}
|
|
150
150
|
C.value = !0;
|
|
151
151
|
try {
|
|
152
|
-
const
|
|
153
|
-
l.value =
|
|
154
|
-
} catch (
|
|
155
|
-
console.error("文件下载时发生错误:",
|
|
152
|
+
const r = await Promise.all(t.map((e) => L(e == null ? void 0 : e.url, e == null ? void 0 : e.name)));
|
|
153
|
+
l.value = r;
|
|
154
|
+
} catch (r) {
|
|
155
|
+
console.error("文件下载时发生错误:", r), l.value = [];
|
|
156
156
|
} finally {
|
|
157
157
|
C.value = !1;
|
|
158
158
|
}
|
|
@@ -163,7 +163,7 @@ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
163
163
|
await k(t || []);
|
|
164
164
|
},
|
|
165
165
|
{ immediate: !0, deep: !0 }
|
|
166
|
-
), (t,
|
|
166
|
+
), (t, r) => (T(), N("div", q, [
|
|
167
167
|
K("div", J, [
|
|
168
168
|
u(t.$slots, "top-menu", {}, void 0, !0)
|
|
169
169
|
]),
|
|
@@ -225,9 +225,9 @@ const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q =
|
|
|
225
225
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
226
226
|
export {
|
|
227
227
|
Z as T,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
Y as a,
|
|
229
|
+
se as r,
|
|
230
|
+
re as s,
|
|
231
231
|
oe as t,
|
|
232
|
-
|
|
232
|
+
z as u
|
|
233
233
|
};
|