ss-component-new 1.3.683 → 1.3.685
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/{MTLLoader-DPHzTMwa.js → MTLLoader-DzMo1SNe.js} +102 -102
- package/dist/{URDFLoader-M-UG5-pR.js → URDFLoader-BAROJ9ka.js} +591 -586
- package/dist/{animationData-DRuHGkTO.js → animationData-CTWTDXsQ.js} +7 -7
- package/dist/{array-DjjQ0-_X.js → array-CGwsP6o5.js} +13 -14
- package/dist/{clone-nUXh221j.js → clone-sAhQxdz5.js} +1 -1
- package/dist/{eleIcon-DlIcb4df.js → eleIcon-6RTuwqdk.js} +2 -2
- package/dist/fileUtil-UOt_otFo.js +20 -0
- package/dist/{iconfont-BhJBoU2I.js → iconfont-TorEaqH3.js} +125 -125
- package/dist/{index-CG1vGzHt.js → index--N4l6N1w.js} +1 -1
- package/dist/{index-gFBsqsq6.js → index-9ILPqo2_.js} +3 -3
- package/dist/{index-R2i3Xnfq.js → index-B30aeKGM.js} +4 -4
- package/dist/{index-zdWtzZvH.js → index-BCmMcLum.js} +7 -7
- package/dist/{index-rlStojTL.js → index-BFqUz4pN.js} +1 -1
- package/dist/{index-DkFpug1v.js → index-BJAHKZNx.js} +18 -20
- package/dist/{index-DlFmNKos.js → index-BKMAFsRN.js} +7 -8
- package/dist/{index-Dx-bFdbp.js → index-BRQACLz0.js} +8 -8
- package/dist/{index-CzgY9rV-.js → index-BzT9veMM.js} +57 -61
- package/dist/{index-QdkaQuAk.js → index-C06Ba2iF.js} +2 -2
- package/dist/{index-BNDaeOZD.js → index-C9_Pcose.js} +40 -43
- package/dist/{index-CM6CVZ_d.js → index-CCYxDZ1R.js} +21515 -15031
- package/dist/index-CGzlH16h.js +331 -0
- package/dist/{index-DewO44mx.js → index-COBZQS9O.js} +2 -2
- package/dist/index-CX4rmFoH.js +2623 -0
- package/dist/{index-CJySKIdc.js → index-CvOCu8lX.js} +1 -1
- package/dist/{index-CnmXW-Bj.js → index-D-YGtSgX.js} +36 -40
- package/dist/{index-CJbdXJRV.js → index-D-_Ie1fO.js} +3 -3
- package/dist/{index-11kpzK0A.js → index-DJrzqi4-.js} +17 -17
- package/dist/{index-CKB74hmA.js → index-DUPQ7Cfd.js} +482 -483
- package/dist/{index-CIoBc8yl.js → index-D_Bn-9ej.js} +60 -62
- package/dist/{index-CsqopIxB.js → index-D_f48W32.js} +1078 -1079
- package/dist/{index-CYspf59Y.js → index-DbS-yoGf.js} +8 -8
- package/dist/{index-DyOGhRxL.js → index-DeLc4k1p.js} +4 -4
- package/dist/{index-Cl2tex39.js → index-DfJJKz37.js} +163 -172
- package/dist/{index-8KwwXnRD.js → index-DyoKmN7k.js} +3 -3
- package/dist/{index-ChfKhYMO.js → index-Rr-ZoXmb.js} +24355 -24391
- package/dist/{index-BLFiId9N.js → index-TpycHQ-H.js} +5 -5
- package/dist/index-bNY-PrZV.js +11779 -0
- package/dist/{index-BHtNKL1L.js → index-dD-mKgue.js} +2 -2
- package/dist/{index-CBL2Pg06.js → index-dcW2d4Zs.js} +5 -5
- package/dist/{index-Cpv5443J.js → index-hGjbrq0G.js} +4 -4
- package/dist/{index-CccqT4-H.js → index-j8TmMAmi.js} +6 -6
- package/dist/{index-B6x7nsvL.js → index-tCEjJktX.js} +5 -5
- package/dist/{index-DTjEPXdC.js → index-tLigeTzl.js} +76 -81
- 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
- package/dist/{index.vue_vue_type_style_index_0_scoped_83e6d490_lang-BsOR2Ig8.js → index.vue_vue_type_style_index_0_scoped_83e6d490_lang-LGVq0cuS.js} +50343 -56267
- package/dist/isString-DzMmG8uL.js +8 -0
- package/dist/{localIcon-D5UoFBU5.js → localIcon-CoJHw5ss.js} +1 -1
- package/dist/{main-C7zjHnDD.js → main-Du1zP7Kw.js} +9 -9
- package/dist/{menuIndex-BE8WKQ_M.js → menuIndex-C_G8igKy.js} +1 -1
- package/dist/{request-DolpfyNJ.js → request-CllqY4TP.js} +3482 -3063
- 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-DiiHNAHL.js → threeModel-fAbD9e7m.js} +174 -174
- package/dist/{threePreview-Bu2Spume.js → threePreview-0iSlhKYj.js} +12 -12
- package/dist/{threeSceneView-DxeVIhrp.js → threeSceneView-DRd2cEoX.js} +49 -50
- package/dist/{threeSceneViewForCPMPIP-DPYmtlbM.js → threeSceneViewForCPMPIP-B4J6jX9N.js} +16 -17
- package/dist/{threeTrackPathView-fb0Ye-HT.js → threeTrackPathView-BzrYvQKg.js} +36 -36
- package/dist/{threeViewerHost-DHRT4ihY.js → threeViewerHost-C09kiZJV.js} +36 -36
- package/dist/{urdfTree-CFaALNOQ.js → urdfTree-CZeEnUnE.js} +9 -9
- package/dist/{workpieceTreePanel-BxNqg9o9.js → workpieceTreePanel-BLWHbILu.js} +76 -80
- package/package.json +2 -4
- package/dist/JSEncrypt-B36c1iN5.js +0 -1983
- package/dist/icons/svg/method.svg +0 -1
- package/dist/index-BBzJ8BLa.js +0 -572
- package/dist/index-Ba8phnvt.js +0 -342
- package/dist/index-CBPXalBI.js +0 -15007
- package/dist/isString-h0UV2hrP.js +0 -8
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/icons/svg/method.svg +0 -1
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -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, openBlock as T, createElementBlock as N, createElementVNode as K, renderSlot as u, unref as m, createBlock as B, withCtx as d, createCommentVNode as V } from "vue";
|
|
2
|
+
import { a0 as W, u as A, p as D, s as $ } from "./index-D_f48W32.js";
|
|
3
|
+
import { g as j, q as M, r as L } from "./index.vue_vue_type_style_index_0_scoped_83e6d490_lang-LGVq0cuS.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const
|
|
5
|
+
const re = {
|
|
6
6
|
SINGLE: "单机",
|
|
7
7
|
DOUBLE: "双机"
|
|
8
|
-
},
|
|
8
|
+
}, se = {
|
|
9
9
|
ROBOT: 1,
|
|
10
10
|
PIPECOMPARSION: 2
|
|
11
11
|
}, a = {
|
|
@@ -17,7 +17,7 @@ const se = {
|
|
|
17
17
|
// 重大专项场景
|
|
18
18
|
PREVIEW: "preview"
|
|
19
19
|
// 预览模式
|
|
20
|
-
},
|
|
20
|
+
}, q = W("threeState", {
|
|
21
21
|
state: () => ({
|
|
22
22
|
data: {
|
|
23
23
|
files: [],
|
|
@@ -33,26 +33,26 @@ const se = {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
function
|
|
37
|
-
const E = A(D), { platform: O } = $(E), y =
|
|
36
|
+
function z() {
|
|
37
|
+
const E = A(D), { platform: O } = $(E), y = q(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 r = c(e);
|
|
45
|
+
return P == null ? void 0 : P.includes(r);
|
|
46
46
|
}, S = (e) => {
|
|
47
47
|
if (!e)
|
|
48
48
|
return !1;
|
|
49
|
-
const
|
|
50
|
-
return n == null ? void 0 : n.includes(
|
|
49
|
+
const r = c(e);
|
|
50
|
+
return n == null ? void 0 : n.includes(r);
|
|
51
51
|
}, v = (e) => {
|
|
52
52
|
if (!e)
|
|
53
53
|
return !1;
|
|
54
|
-
const
|
|
55
|
-
return i == null ? void 0 : i.includes(
|
|
54
|
+
const r = c(e);
|
|
55
|
+
return i == null ? void 0 : i.includes(r);
|
|
56
56
|
}, l = (e) => {
|
|
57
57
|
if (!e)
|
|
58
58
|
return {
|
|
@@ -61,7 +61,7 @@ function Y() {
|
|
|
61
61
|
isUv: !1,
|
|
62
62
|
isNc: !1
|
|
63
63
|
};
|
|
64
|
-
const
|
|
64
|
+
const r = c(e), o = i == null ? void 0 : i.find((w) => w === r);
|
|
65
65
|
return {
|
|
66
66
|
isCpt: o === "cpt",
|
|
67
67
|
isCyd: o === "cyd",
|
|
@@ -71,8 +71,8 @@ function Y() {
|
|
|
71
71
|
}, C = (e) => {
|
|
72
72
|
if (!e)
|
|
73
73
|
return !1;
|
|
74
|
-
const
|
|
75
|
-
return p == null ? void 0 : p.includes(
|
|
74
|
+
const r = c(e);
|
|
75
|
+
return p == null ? void 0 : p.includes(r);
|
|
76
76
|
}, k = (e) => g() && h(e), t = (e) => ({
|
|
77
77
|
url: e,
|
|
78
78
|
extension: c(e)
|
|
@@ -90,16 +90,16 @@ function Y() {
|
|
|
90
90
|
getFileExtension: c,
|
|
91
91
|
getFileInfo: t,
|
|
92
92
|
getFilesInfo: (e) => {
|
|
93
|
-
const
|
|
93
|
+
const r = [];
|
|
94
94
|
for (let o = 0; o < e.length; o++) {
|
|
95
95
|
const F = e[o], w = t(F);
|
|
96
|
-
|
|
96
|
+
r.push(w);
|
|
97
97
|
}
|
|
98
|
-
return
|
|
98
|
+
return r;
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const Y = { 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 q = { 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-DRd2cEoX.js")), y = b(() => import("./threePreview-0iSlhKYj.js")), i = b(() => import("./threeTrackPathView-BzrYvQKg.js")), p = b(() => import("./threeSceneViewForCPMPIP-B4J6jX9N.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = z(), 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((s) => {
|
|
118
|
+
const { url: e, name: r } = s;
|
|
119
119
|
return {
|
|
120
120
|
url: e,
|
|
121
|
-
name:
|
|
121
|
+
name: r
|
|
122
122
|
};
|
|
123
123
|
});
|
|
124
124
|
}), h = I(() => {
|
|
@@ -126,8 +126,8 @@ const q = { 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, s;
|
|
130
|
+
return (s = (t = n == null ? void 0 : n.threeData) == null ? void 0 : t.data) == null ? void 0 : s.trackFileType;
|
|
131
131
|
}), v = I(() => {
|
|
132
132
|
if (n.componentType)
|
|
133
133
|
switch (n.componentType) {
|
|
@@ -149,10 +149,10 @@ const q = { 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 s = await Promise.all(t.map((e) => L(e == null ? void 0 : e.url, e == null ? void 0 : e.name)));
|
|
153
|
+
l.value = s;
|
|
154
|
+
} catch (s) {
|
|
155
|
+
console.error("文件下载时发生错误:", s), l.value = [];
|
|
156
156
|
} finally {
|
|
157
157
|
C.value = !1;
|
|
158
158
|
}
|
|
@@ -163,7 +163,7 @@ const q = { 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, s) => (T(), N("div", Y, [
|
|
167
167
|
K("div", J, [
|
|
168
168
|
u(t.$slots, "top-menu", {}, void 0, !0)
|
|
169
169
|
]),
|
|
@@ -225,9 +225,9 @@ const q = { 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
|
+
z as a,
|
|
229
|
+
re as r,
|
|
230
|
+
se as s,
|
|
231
231
|
oe as t,
|
|
232
|
-
|
|
232
|
+
q as u
|
|
233
233
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as I, ref as F, watch as M, onMounted as C, onUnmounted as E,
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as I, ref as F, watch as M, onMounted as C, onUnmounted as E, openBlock as m, createElementBlock as f, Fragment as P, renderList as T, createElementVNode as d, toDisplayString as h, createCommentVNode as U, computed as L, resolveComponent as S, createVNode as A } from "vue";
|
|
2
|
+
import { h as V } from "./index.vue_vue_type_style_index_0_scoped_83e6d490_lang-LGVq0cuS.js";
|
|
3
3
|
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const D = (i, a) => {
|
|
5
5
|
if (!a)
|
|
@@ -109,9 +109,9 @@ const D = (i, a) => {
|
|
|
109
109
|
k();
|
|
110
110
|
}), a({
|
|
111
111
|
resetAllJoints: g
|
|
112
|
-
}), (n, e) => (
|
|
113
|
-
o.value.length > 0 ? (
|
|
114
|
-
(
|
|
112
|
+
}), (n, e) => (m(), f("div", R, [
|
|
113
|
+
o.value.length > 0 ? (m(), f("div", O, [
|
|
114
|
+
(m(!0), f(P, null, T(o.value, (s) => (m(), f("div", {
|
|
115
115
|
key: s.name,
|
|
116
116
|
class: "joint-item"
|
|
117
117
|
}, [
|
|
@@ -122,7 +122,7 @@ const D = (i, a) => {
|
|
|
122
122
|
]),
|
|
123
123
|
d("span", z, h(s.type), 1)
|
|
124
124
|
]),
|
|
125
|
-
s.type === "revolute" || s.type === "prismatic" || s.type === "continuous" ? (
|
|
125
|
+
s.type === "revolute" || s.type === "prismatic" || s.type === "continuous" ? (m(), f("div", G, [
|
|
126
126
|
d("div", H, [
|
|
127
127
|
d("input", {
|
|
128
128
|
type: "range",
|
|
@@ -140,9 +140,9 @@ const D = (i, a) => {
|
|
|
140
140
|
])
|
|
141
141
|
])) : U("", !0)
|
|
142
142
|
]))), 128))
|
|
143
|
-
])) : (
|
|
143
|
+
])) : (m(), f("div", Z, [...e[0] || (e[0] = [
|
|
144
144
|
d("p", null, "未检测到可控制的关节", -1)
|
|
145
|
-
])))
|
|
145
|
+
])]))
|
|
146
146
|
]));
|
|
147
147
|
}
|
|
148
148
|
}), ce = /* @__PURE__ */ b(j, [["__scopeId", "data-v-b1467983"]]), ee = { class: "panel-content" }, te = "id", se = {
|
|
@@ -231,7 +231,7 @@ const D = (i, a) => {
|
|
|
231
231
|
{ immediate: !0 }
|
|
232
232
|
), (e, s) => {
|
|
233
233
|
const r = S("el-tree");
|
|
234
|
-
return
|
|
234
|
+
return m(), f("div", ee, [
|
|
235
235
|
A(r, {
|
|
236
236
|
data: u.value,
|
|
237
237
|
props: _,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
var ce = Object.defineProperty;
|
|
2
2
|
var de = (b, l, t) => l in b ? ce(b, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : b[l] = t;
|
|
3
3
|
var J = (b, l, t) => de(b, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
-
import { U as me } from "./URDFLoader-
|
|
5
|
-
import { S as ve, M as pe, O as fe } from "./MTLLoader-
|
|
6
|
-
import {
|
|
7
|
-
import { ref as T, defineComponent as Le, computed as M, watch as ue, resolveComponent as x,
|
|
8
|
-
import { c as Re, e as Ue, g as $e } from "./iconfont-
|
|
4
|
+
import { U as me } from "./URDFLoader-BAROJ9ka.js";
|
|
5
|
+
import { S as ve, M as pe, O as fe } from "./MTLLoader-DzMo1SNe.js";
|
|
6
|
+
import { bb as be, bc as re, s as O, k as we, h as he, bd as E, B as ge, be as _e, ay as ye, V as je } from "./index.vue_vue_type_style_index_0_scoped_83e6d490_lang-LGVq0cuS.js";
|
|
7
|
+
import { ref as T, defineComponent as Le, computed as M, watch as ue, resolveComponent as x, openBlock as k, createElementBlock as V, createVNode as U, withCtx as F, createTextVNode as D, createElementVNode as c, toDisplayString as C } from "vue";
|
|
8
|
+
import { c as Re, e as Ue, g as $e } from "./iconfont-TorEaqH3.js";
|
|
9
9
|
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const Se = "http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";
|
|
11
11
|
function Me(b) {
|
|
@@ -19,14 +19,14 @@ function Fe(b) {
|
|
|
19
19
|
function De(b) {
|
|
20
20
|
const { manager: l, baseFolderUrl: t, onFileProgress: s } = b, m = new me(l);
|
|
21
21
|
return m.packages = (i) => `${t.endsWith("/") ? t : t + "/"}${i}/`, m.loadMeshCb = (i, h, v) => {
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
return r >= 0 ?
|
|
22
|
+
const j = (() => {
|
|
23
|
+
const g = i.split("?")[0].split("#")[0], r = g.lastIndexOf(".");
|
|
24
|
+
return r >= 0 ? g.slice(r + 1).toLowerCase() : void 0;
|
|
25
25
|
})();
|
|
26
|
-
switch (
|
|
26
|
+
switch (j) {
|
|
27
27
|
// OBJ+MTL
|
|
28
28
|
case "obj": {
|
|
29
|
-
const
|
|
29
|
+
const g = (() => {
|
|
30
30
|
try {
|
|
31
31
|
return new URL(".", i).toString();
|
|
32
32
|
} catch {
|
|
@@ -36,7 +36,7 @@ function De(b) {
|
|
|
36
36
|
})(), r = (() => {
|
|
37
37
|
var u;
|
|
38
38
|
return (((u = i.split("/").pop()) == null ? void 0 : u.split("?")[0].split("#")[0]) ?? "").replace(/\.[^/.?#]+$/, "");
|
|
39
|
-
})(), f = `${
|
|
39
|
+
})(), f = `${g}${r}.mtl`, _ = (n) => {
|
|
40
40
|
Fe({
|
|
41
41
|
objUrl: i,
|
|
42
42
|
manager: h,
|
|
@@ -51,17 +51,17 @@ function De(b) {
|
|
|
51
51
|
Me({
|
|
52
52
|
mtlUrl: f,
|
|
53
53
|
manager: h,
|
|
54
|
-
resourcePath:
|
|
54
|
+
resourcePath: g,
|
|
55
55
|
onLoad: (n) => {
|
|
56
56
|
try {
|
|
57
57
|
n.preload();
|
|
58
58
|
} catch {
|
|
59
59
|
}
|
|
60
|
-
|
|
60
|
+
_(n);
|
|
61
61
|
},
|
|
62
62
|
onProgress: (n) => s == null ? void 0 : s(f, n == null ? void 0 : n.loaded, n == null ? void 0 : n.total),
|
|
63
63
|
onError: (n) => {
|
|
64
|
-
console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`),
|
|
64
|
+
console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`), _(void 0);
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
break;
|
|
@@ -70,8 +70,8 @@ function De(b) {
|
|
|
70
70
|
new ve(h).load(
|
|
71
71
|
i,
|
|
72
72
|
(r) => {
|
|
73
|
-
const f = new we({ color: 12303291, shininess: 30 }),
|
|
74
|
-
|
|
73
|
+
const f = new we({ color: 12303291, shininess: 30 }), _ = new he(r, f);
|
|
74
|
+
_.castShadow = !0, _.receiveShadow = !0, v(_);
|
|
75
75
|
},
|
|
76
76
|
(r) => s == null ? void 0 : s(i, r == null ? void 0 : r.loaded, r == null ? void 0 : r.total),
|
|
77
77
|
(r) => {
|
|
@@ -81,24 +81,24 @@ function De(b) {
|
|
|
81
81
|
break;
|
|
82
82
|
}
|
|
83
83
|
default:
|
|
84
|
-
console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${
|
|
84
|
+
console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${j} (路径: ${i})`), v(new O());
|
|
85
85
|
}
|
|
86
86
|
}, m;
|
|
87
87
|
}
|
|
88
88
|
function dt(b, l, t, s) {
|
|
89
89
|
return { loadSceneFromFile: (i) => new Promise((h, v) => {
|
|
90
90
|
t.value = !0, s.value = "正在初始化 URDF 加载器...";
|
|
91
|
-
let
|
|
91
|
+
let j = 0, g = 0, r = null;
|
|
92
92
|
const f = new be();
|
|
93
|
-
f.onStart = (n, u,
|
|
94
|
-
|
|
95
|
-
}, f.onProgress = (n, u,
|
|
96
|
-
|
|
97
|
-
const $ = `正在加载 ${u} / ${
|
|
98
|
-
s.value = $, u ===
|
|
93
|
+
f.onStart = (n, u, y) => {
|
|
94
|
+
j = y || 0, g = u || 0, s.value = j > 0 ? `开始下载资源: 0 / ${j}` : "开始下载资源...", t.value = !0;
|
|
95
|
+
}, f.onProgress = (n, u, y) => {
|
|
96
|
+
g = u, j = y;
|
|
97
|
+
const $ = `正在加载 ${u} / ${y} 个文件: ${re(n)}`;
|
|
98
|
+
s.value = $, u === y && (s.value = "资源加载完成,正在处理模型...", setTimeout(() => {
|
|
99
99
|
if (r) {
|
|
100
100
|
r.updateMatrixWorld(!0);
|
|
101
|
-
const p = new
|
|
101
|
+
const p = new ge().setFromObject(r);
|
|
102
102
|
p.isEmpty() && console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"), r.userData.boundingBox = p, r.traverse((d) => {
|
|
103
103
|
d.isMesh && (d.castShadow = !0, d.receiveShadow = !0);
|
|
104
104
|
}), h(r);
|
|
@@ -111,25 +111,25 @@ function dt(b, l, t, s) {
|
|
|
111
111
|
}, f.onError = (n) => {
|
|
112
112
|
console.warn(`LoadingManager 报告一个资源加载失败: ${n}。加载流程将继续。`);
|
|
113
113
|
};
|
|
114
|
-
const
|
|
114
|
+
const _ = (n, u, y) => {
|
|
115
115
|
const $ = re(n);
|
|
116
116
|
let p;
|
|
117
|
-
|
|
117
|
+
y && y > 0 ? p = `${$}(${E(u)} / ${E(y)})` : u && u > 0 ? p = `${$}(已下载 ${E(u)})` : p = `${$}`, s.value = `正在下载第 ${g + 1} / ${j} 个文件: ${p}`;
|
|
118
118
|
};
|
|
119
119
|
try {
|
|
120
120
|
const n = URL.createObjectURL(i);
|
|
121
121
|
De({
|
|
122
122
|
manager: f,
|
|
123
123
|
baseFolderUrl: Se,
|
|
124
|
-
onFileProgress:
|
|
124
|
+
onFileProgress: _
|
|
125
125
|
}).load(
|
|
126
126
|
n,
|
|
127
|
-
(
|
|
128
|
-
r =
|
|
127
|
+
(y) => {
|
|
128
|
+
r = y;
|
|
129
129
|
},
|
|
130
130
|
void 0,
|
|
131
|
-
(
|
|
132
|
-
console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`,
|
|
131
|
+
(y) => {
|
|
132
|
+
console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`, y), s.value = "URDF 文件解析失败", t.value = !1, v(new Error(`加载 URDF 文件失败: ${i.name}`));
|
|
133
133
|
}
|
|
134
134
|
);
|
|
135
135
|
} catch (n) {
|
|
@@ -139,13 +139,13 @@ function dt(b, l, t, s) {
|
|
|
139
139
|
}
|
|
140
140
|
function mt(b, l, t, s = ["URDFVisual"]) {
|
|
141
141
|
let m = null;
|
|
142
|
-
const i = T(null), h = new
|
|
143
|
-
function
|
|
142
|
+
const i = T(null), h = new _e(), v = new ye(), j = /* @__PURE__ */ new Map();
|
|
143
|
+
function g() {
|
|
144
144
|
t.value.forEach((p) => {
|
|
145
145
|
p.traverse((d) => {
|
|
146
|
-
s != null && s.includes(d.type) &&
|
|
146
|
+
s != null && s.includes(d.type) && j.set(d.id, {
|
|
147
147
|
obj: d,
|
|
148
|
-
axis: d.axis || new
|
|
148
|
+
axis: d.axis || new je(1, 0, 0),
|
|
149
149
|
// URDF 里的 <axis>
|
|
150
150
|
limits: d.limits
|
|
151
151
|
});
|
|
@@ -168,25 +168,25 @@ function mt(b, l, t, s = ["URDFVisual"]) {
|
|
|
168
168
|
if (e.length === 0) return;
|
|
169
169
|
let o = e[0].object, w = null;
|
|
170
170
|
for (; o; ) {
|
|
171
|
-
if (
|
|
172
|
-
w =
|
|
171
|
+
if (j.has(o.id)) {
|
|
172
|
+
w = j.get(o.id);
|
|
173
173
|
break;
|
|
174
174
|
}
|
|
175
175
|
o = o.parent;
|
|
176
176
|
}
|
|
177
177
|
w && r(w);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function _() {
|
|
180
180
|
b.value && b.value.removeEventListener("click", f, !1);
|
|
181
181
|
}
|
|
182
182
|
function n() {
|
|
183
183
|
const { scene: p, camera: d } = l();
|
|
184
|
-
m = d,
|
|
184
|
+
m = d, g(), b.value && b.value.addEventListener("click", f, !1);
|
|
185
185
|
}
|
|
186
186
|
function u(p) {
|
|
187
187
|
i.value && (i.value.obj.visible = p);
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function y(p) {
|
|
190
190
|
var o;
|
|
191
191
|
const { axis: d, value: e } = p;
|
|
192
192
|
Ue((o = i.value) == null ? void 0 : o.obj, d, e);
|
|
@@ -198,10 +198,10 @@ function mt(b, l, t, s = ["URDFVisual"]) {
|
|
|
198
198
|
}
|
|
199
199
|
return {
|
|
200
200
|
initRaycaster: n,
|
|
201
|
-
dispose:
|
|
201
|
+
dispose: _,
|
|
202
202
|
selectedObject3D: i,
|
|
203
203
|
setSelectedObjVisible: u,
|
|
204
|
-
updatePosition:
|
|
204
|
+
updatePosition: y,
|
|
205
205
|
updateRotation: $
|
|
206
206
|
};
|
|
207
207
|
}
|
|
@@ -279,11 +279,11 @@ class vt {
|
|
|
279
279
|
const m = this.getCurrentJointStates(), i = Date.now();
|
|
280
280
|
return new Promise((h) => {
|
|
281
281
|
const v = () => {
|
|
282
|
-
const
|
|
283
|
-
Object.keys(l).forEach((
|
|
284
|
-
const n = m[
|
|
285
|
-
f[
|
|
286
|
-
}), this.setJointAngles(f), s && s(
|
|
282
|
+
const j = Date.now() - i, g = Math.min(j / t, 1), r = this.easeInOutCubic(g), f = {};
|
|
283
|
+
Object.keys(l).forEach((_) => {
|
|
284
|
+
const n = m[_] || 0, u = l[_];
|
|
285
|
+
f[_] = n + (u - n) * r;
|
|
286
|
+
}), this.setJointAngles(f), s && s(g), g < 1 ? requestAnimationFrame(v) : h();
|
|
287
287
|
};
|
|
288
288
|
v();
|
|
289
289
|
});
|
|
@@ -346,14 +346,14 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
346
346
|
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
347
347
|
children: h(e == null ? void 0 : e.children, 1),
|
|
348
348
|
path: e == null ? void 0 : e.name
|
|
349
|
-
}] : [],
|
|
349
|
+
}] : [], j = (e, o) => {
|
|
350
350
|
const w = [], a = [...e];
|
|
351
351
|
for (; a.length > 0 && w.length < o; ) {
|
|
352
352
|
const L = a.shift();
|
|
353
353
|
L.children && L.children.length > 0 && (w.push(L.id), a.push(...L.children));
|
|
354
354
|
}
|
|
355
355
|
return w;
|
|
356
|
-
},
|
|
356
|
+
}, g = (e, o) => {
|
|
357
357
|
const w = [];
|
|
358
358
|
return e.forEach((a) => {
|
|
359
359
|
if (a.children && a.children.length > 0) {
|
|
@@ -363,8 +363,8 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
363
363
|
}
|
|
364
364
|
}), w.slice(0, o + 1);
|
|
365
365
|
};
|
|
366
|
-
M(() => !m.value || m.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ?
|
|
367
|
-
const r = (e) => e ? parseFloat(e.toFixed(3)) : 0, f = (e) => e ? parseFloat(e.toFixed(1)) : 0,
|
|
366
|
+
M(() => !m.value || m.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ? g(m.value, t.maxExpandCount) : j(m.value, t.maxExpandCount));
|
|
367
|
+
const r = (e) => e ? parseFloat(e.toFixed(3)) : 0, f = (e) => e ? parseFloat(e.toFixed(1)) : 0, _ = (e, o) => {
|
|
368
368
|
s("updatePosition", {
|
|
369
369
|
obj: t.model,
|
|
370
370
|
axis: o,
|
|
@@ -378,7 +378,7 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
378
378
|
});
|
|
379
379
|
}, u = (e) => {
|
|
380
380
|
s("visibleChange", e);
|
|
381
|
-
},
|
|
381
|
+
}, y = M(() => t != null && t.model ? v(t.model) : []), $ = M(() => {
|
|
382
382
|
var e, o;
|
|
383
383
|
return ((e = t == null ? void 0 : t.model) == null ? void 0 : e.name) || ((o = t == null ? void 0 : t.model) == null ? void 0 : o.type);
|
|
384
384
|
}), p = M(() => {
|
|
@@ -394,7 +394,7 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
394
394
|
deep: !0,
|
|
395
395
|
immediate: !0
|
|
396
396
|
}), ue(
|
|
397
|
-
|
|
397
|
+
y,
|
|
398
398
|
(e) => {
|
|
399
399
|
m.value = JSON.parse(JSON.stringify(e));
|
|
400
400
|
},
|
|
@@ -402,16 +402,15 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
402
402
|
), (e, o) => {
|
|
403
403
|
var S, z, P, A, I, B, N, W, q, X, Y, Z, K, G, H, Q, ee, te, oe, se, ie, le, ae, ne;
|
|
404
404
|
const w = x("el-divider"), a = x("el-switch"), L = x("el-input-number");
|
|
405
|
-
return
|
|
405
|
+
return k(), V("div", Je, [
|
|
406
406
|
U(w, null, {
|
|
407
|
-
default: F(() => o[6] || (o[6] = [
|
|
408
|
-
D("对象")
|
|
409
|
-
])),
|
|
410
|
-
_: 1
|
|
411
|
-
__: [6]
|
|
407
|
+
default: F(() => [...o[6] || (o[6] = [
|
|
408
|
+
D("对象", -1)
|
|
409
|
+
])]),
|
|
410
|
+
_: 1
|
|
412
411
|
}),
|
|
413
412
|
c("div", Oe, [
|
|
414
|
-
t.model ? (
|
|
413
|
+
t.model ? (k(), V("div", Ee, [
|
|
415
414
|
c("div", {
|
|
416
415
|
class: "obj-name",
|
|
417
416
|
title: $.value
|
|
@@ -420,25 +419,24 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
420
419
|
class: "obj-type",
|
|
421
420
|
title: p.value
|
|
422
421
|
}, "[" + C(p.value) + "]", 9, ke)
|
|
423
|
-
])) : (
|
|
422
|
+
])) : (k(), V("div", Ve, "空")),
|
|
424
423
|
U(a, {
|
|
425
424
|
"model-value": d.value,
|
|
426
425
|
onChange: u
|
|
427
426
|
}, null, 8, ["model-value"])
|
|
428
427
|
]),
|
|
429
428
|
U(w, null, {
|
|
430
|
-
default: F(() => o[7] || (o[7] = [
|
|
431
|
-
D("相对位置")
|
|
432
|
-
])),
|
|
433
|
-
_: 1
|
|
434
|
-
__: [7]
|
|
429
|
+
default: F(() => [...o[7] || (o[7] = [
|
|
430
|
+
D("相对位置", -1)
|
|
431
|
+
])]),
|
|
432
|
+
_: 1
|
|
435
433
|
}),
|
|
436
434
|
c("div", Te, [
|
|
437
435
|
c("div", ze, [
|
|
438
436
|
o[8] || (o[8] = c("span", { class: "axis-label" }, "X", -1)),
|
|
439
437
|
U(L, {
|
|
440
438
|
"model-value": r((z = (S = i.value) == null ? void 0 : S.position) == null ? void 0 : z.x),
|
|
441
|
-
onChange: o[0] || (o[0] = (R) =>
|
|
439
|
+
onChange: o[0] || (o[0] = (R) => _(R, "x")),
|
|
442
440
|
size: "small",
|
|
443
441
|
class: "coord-input-compact",
|
|
444
442
|
precision: 3,
|
|
@@ -451,7 +449,7 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
451
449
|
o[9] || (o[9] = c("span", { class: "axis-label" }, "Y", -1)),
|
|
452
450
|
U(L, {
|
|
453
451
|
"model-value": r((A = (P = i.value) == null ? void 0 : P.position) == null ? void 0 : A.y),
|
|
454
|
-
onChange: o[1] || (o[1] = (R) =>
|
|
452
|
+
onChange: o[1] || (o[1] = (R) => _(R, "y")),
|
|
455
453
|
size: "small",
|
|
456
454
|
class: "coord-input-compact",
|
|
457
455
|
precision: 3,
|
|
@@ -464,7 +462,7 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
464
462
|
o[10] || (o[10] = c("span", { class: "axis-label" }, "Z", -1)),
|
|
465
463
|
U(L, {
|
|
466
464
|
"model-value": r((B = (I = i.value) == null ? void 0 : I.position) == null ? void 0 : B.z),
|
|
467
|
-
onChange: o[2] || (o[2] = (R) =>
|
|
465
|
+
onChange: o[2] || (o[2] = (R) => _(R, "z")),
|
|
468
466
|
size: "small",
|
|
469
467
|
class: "coord-input-compact",
|
|
470
468
|
precision: 3,
|
|
@@ -475,11 +473,10 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
475
473
|
])
|
|
476
474
|
]),
|
|
477
475
|
U(w, null, {
|
|
478
|
-
default: F(() => o[11] || (o[11] = [
|
|
479
|
-
D("相对旋转")
|
|
480
|
-
])),
|
|
481
|
-
_: 1
|
|
482
|
-
__: [11]
|
|
476
|
+
default: F(() => [...o[11] || (o[11] = [
|
|
477
|
+
D("相对旋转", -1)
|
|
478
|
+
])]),
|
|
479
|
+
_: 1
|
|
483
480
|
}),
|
|
484
481
|
c("div", Ie, [
|
|
485
482
|
c("div", Be, [
|
|
@@ -523,11 +520,10 @@ const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
|
523
520
|
])
|
|
524
521
|
]),
|
|
525
522
|
U(w, null, {
|
|
526
|
-
default: F(() => o[15] || (o[15] = [
|
|
527
|
-
D("世界信息")
|
|
528
|
-
])),
|
|
529
|
-
_: 1
|
|
530
|
-
__: [15]
|
|
523
|
+
default: F(() => [...o[15] || (o[15] = [
|
|
524
|
+
D("世界信息", -1)
|
|
525
|
+
])]),
|
|
526
|
+
_: 1
|
|
531
527
|
}),
|
|
532
528
|
c("div", qe, [
|
|
533
529
|
c("div", Xe, [
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ss-component-new",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.685",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"@js-preview/excel": "^1.7.14",
|
|
25
25
|
"@vue-office/excel": "^1.7.14",
|
|
26
26
|
"axios": "^1.9.0",
|
|
27
|
-
"codemirror": "^
|
|
28
|
-
"codemirror-editor-vue3": "^2.8.0",
|
|
27
|
+
"codemirror": "^6.0.2",
|
|
29
28
|
"cropperjs": "^1.6.2",
|
|
30
29
|
"dayjs": "^1.11.13",
|
|
31
30
|
"docx-preview": "^0.3.6",
|
|
@@ -58,7 +57,6 @@
|
|
|
58
57
|
"xlsx": "^0.18.5"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"@types/codemirror": "^5.60.17",
|
|
62
60
|
"@types/lodash-es": "^4.17.12",
|
|
63
61
|
"@types/node": "^22.14.1",
|
|
64
62
|
"@types/three": "^0.177.0",
|