ss-component-new 1.3.615 → 1.3.617
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-BL2uYkTJ.js → MTLLoader-B6ottYFV.js} +2 -2
- package/dist/{OrbitControls-Zyj23qrC.js → OrbitControls-BFVKU7s-.js} +1 -1
- package/dist/{URDFLoader-CRx5L75v.js → URDFLoader-CH-7Pzmq.js} +589 -584
- package/dist/{animationData-CJQE6_nu.js → animationData-F0z3GN7j.js} +3 -3
- package/dist/{array-CKTk7Sq_.js → array-CQiszLQE.js} +13 -14
- package/dist/{clone-ESeDvnJv.js → clone-MyfSNInd.js} +1 -1
- package/dist/{eleIcon-C7Pz9jha.js → eleIcon-BoKZ_PzU.js} +2 -2
- package/dist/{iconfont-DZGSkx-_.js → iconfont-BJYdStg5.js} +396 -247
- package/dist/{index-gXFBfuoD.js → index-0zQirLAy.js} +8 -8
- package/dist/{index-BvkIoiVW.js → index-6qXeMn6b.js} +3 -3
- package/dist/{index-obXIOkF7.js → index-8OmAlKII.js} +4 -4
- package/dist/{index-BXh02EAd.js → index-B2LYEScO.js} +4 -4
- package/dist/{index-YvUJL9Us.js → index-B4NcYIuS.js} +1 -1
- package/dist/{index-D8UY4uNQ.js → index-B8NQAdR4.js} +966 -967
- package/dist/{index-rlStojTL.js → index-BFqUz4pN.js} +1 -1
- package/dist/{index-t9LvhXac.js → index-BHtLrI43.js} +5 -5
- package/dist/{index--FPbFJB2.js → index-BODochNh.js} +6 -6
- package/dist/{index-CPW7tdrA.js → index-BkkvdZXm.js} +17 -20
- package/dist/{index-B0M1YCUY.js → index-BvtOLltL.js} +7 -7
- package/dist/{index-DsdWSuDi.js → index-BvyM6d06.js} +482 -483
- package/dist/{index-CX8Apbo7.js → index-BybrpYzx.js} +1 -1
- package/dist/{index-BJFXtH-X.js → index-CAMjP0It.js} +3 -3
- package/dist/{index-tMqKF2l6.js → index-CM6aWexA.js} +2 -2
- package/dist/{index-BBBCr4Oo.js → index-CT1LWsrT.js} +2 -2
- package/dist/{index-CTicGWoS.js → index-CXqqIuf-.js} +3 -3
- package/dist/{index-D9xMYIes.js → index-CYjsE5Gs.js} +3 -3
- package/dist/{index-B_fRppeJ.js → index-CkO7j_i1.js} +8 -8
- package/dist/{index-cYgzND1g.js → index-CnCBS4CT.js} +16268 -16240
- package/dist/{index-DlQXFCw8.js → index-CvZcm-Tt.js} +7 -8
- package/dist/{index-tniD_xHN.js → index-D2BpwRDj.js} +148 -157
- package/dist/{index-DAs4L0hx.js → index-D43kQTBs.js} +6973 -6531
- package/dist/{index-DjSJhlad.js → index-D56uKIwO.js} +60 -62
- package/dist/{index-XvX6TMzr.js → index-DCY5J8nu.js} +1 -1
- package/dist/{index-C3pboX9W.js → index-DIVct0z6.js} +5 -5
- package/dist/{index-Dd-8nw2f.js → index-DIzunSUT.js} +18 -20
- package/dist/{index-11kpzK0A.js → index-DJrzqi4-.js} +17 -17
- package/dist/{index-Cn33Gz2z.js → index-DSrPdLF-.js} +587 -616
- package/dist/{index-BUqviBFi.js → index-DcPtyCDm.js} +29 -35
- package/dist/{index-D1E8EPxn.js → index-DmILGKv9.js} +57 -61
- package/dist/{index-BA1kJZth.js → index-aTEfnfYn.js} +36 -40
- package/dist/{index-BHtNKL1L.js → index-dD-mKgue.js} +2 -2
- package/dist/{index-DkumSU1-.js → index-hg0CdgKe.js} +4 -4
- package/dist/index-mjGbAjJz.js +2623 -0
- 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_39e1db95_lang-X_k372gl.js → index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js} +27760 -27735
- package/dist/isString-Dxm3W5iX.js +8 -0
- package/dist/{localIcon-D5UoFBU5.js → localIcon-CoJHw5ss.js} +1 -1
- package/dist/{main-DgwLoFSd.js → main-BDvWHXas.js} +9 -9
- package/dist/{menuIndex-DAW9B-9g.js → menuIndex-BiUB7t5q.js} +1 -1
- package/dist/{request-B1c8BUkR.js → request-BfrhYBTM.js} +3480 -3062
- 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/svgIcon-4m2zaZkj.js +42 -0
- package/dist/{threeModel-Df46gQvy.js → threeModel-B7guecMM.js} +174 -174
- package/dist/{threePreview-C4Ra7sjU.js → threePreview-CpcrqmFS.js} +554 -554
- package/dist/threeSceneView-CWTmvCY4.js +1290 -0
- package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-VzWmr9CP.js} +207 -208
- package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-Bw6e-quT.js} +25 -25
- package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-DIiGjw_8.js} +4 -4
- package/dist/urdfTree-DU02c_91.js +254 -0
- package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-XH9mYAT2.js} +56 -60
- package/package.json +1 -1
- package/dist/JSEncrypt-B36c1iN5.js +0 -1983
- package/dist/index-BmaW6Me9.js +0 -572
- package/dist/isString-BlNsHiyU.js +0 -8
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/dist/svgIcon-4u4PW7Is.js +0 -42
- package/dist/threeSceneView-tLPMhgrS.js +0 -1291
- package/dist/urdfTree-Bu7OVUsr.js +0 -404
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E,
|
|
2
|
-
import { u as De,
|
|
3
|
-
import { u as
|
|
4
|
-
import
|
|
5
|
-
import "./
|
|
6
|
-
import { E as B } from "./request-
|
|
1
|
+
import { defineComponent as ce, computed as U, ref as k, resolveComponent as E, openBlock as X, createElementBlock as ee, createElementVNode as d, createVNode as p, withCtx as I, toDisplayString as Y, shallowRef as D, watch as Ee, onMounted as Xe, onBeforeUnmount as Ye, unref as A, renderSlot as ae, withDirectives as N, createBlock as le, createCommentVNode as S, vShow as Z, nextTick as je } from "vue";
|
|
2
|
+
import { u as De, a as Ne, b as Ze, C as Be, f as Ie, d as re } from "./iconfont-BJYdStg5.js";
|
|
3
|
+
import { C as O, h as Oe, b0 as Ge, t as qe, V as te, u as ue, Y as fe, a2 as Ke, w as We, a1 as Je, _ as Re, $ as He, p as Qe, b1 as Se } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js";
|
|
4
|
+
import "./index-B8NQAdR4.js";
|
|
5
|
+
import { U as et, J as tt } from "./urdfTree-DU02c_91.js";
|
|
6
|
+
import { E as B } from "./request-BfrhYBTM.js";
|
|
7
7
|
import { _ as ve } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
|
-
import { T as w } from "./svgIcon-
|
|
9
|
-
import { i as nt } from "./isString-
|
|
8
|
+
import { T as w } from "./svgIcon-4m2zaZkj.js";
|
|
9
|
+
import { i as nt } from "./isString-Dxm3W5iX.js";
|
|
10
10
|
function ot(e = 0.5, n = 4) {
|
|
11
|
-
const o = new
|
|
12
|
-
new
|
|
13
|
-
new
|
|
11
|
+
const o = new Oe(
|
|
12
|
+
new Ge(e, n, 32),
|
|
13
|
+
new qe({
|
|
14
14
|
color: "#919191ff",
|
|
15
15
|
// 再提一档灰度
|
|
16
16
|
metalness: 0.3,
|
|
@@ -283,11 +283,11 @@ function Lt(e) {
|
|
|
283
283
|
function $t(e) {
|
|
284
284
|
const n = new ue();
|
|
285
285
|
n.setAttribute("position", new fe(e, 3));
|
|
286
|
-
const o = new
|
|
286
|
+
const o = new Ke({
|
|
287
287
|
color: 55551,
|
|
288
288
|
linewidth: 3
|
|
289
289
|
});
|
|
290
|
-
return new
|
|
290
|
+
return new We(n, o);
|
|
291
291
|
}
|
|
292
292
|
function Vt(e, n) {
|
|
293
293
|
if (!n || n.length < 3)
|
|
@@ -304,7 +304,7 @@ function Et(e, n, o, i = 4, l = 50) {
|
|
|
304
304
|
const L = e[h], g = e[h + 1], y = e[h + 2];
|
|
305
305
|
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);
|
|
306
306
|
}
|
|
307
|
-
const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, P =
|
|
307
|
+
const C = Math.sqrt((s - t) ** 2 + (f - r) ** 2 + (m - c) ** 2) * 0.05, P = Qe.degToRad(n.fov), _ = 2 * Math.tan(P / 2) * l, T = C / _ * o.domElement.height * (i / 4);
|
|
308
308
|
return Math.min(0.4, T);
|
|
309
309
|
}
|
|
310
310
|
function Xt(e) {
|
|
@@ -315,13 +315,13 @@ function Xt(e) {
|
|
|
315
315
|
const o = new Float32Array(e.length);
|
|
316
316
|
for (let t = 0; t < e.length; t += 3)
|
|
317
317
|
o[t] = 0, o[t + 1] = 0.847, o[t + 2] = 1;
|
|
318
|
-
n.setAttribute("color", new
|
|
319
|
-
const i = new
|
|
318
|
+
n.setAttribute("color", new Je(o, 3));
|
|
319
|
+
const i = new Re({
|
|
320
320
|
vertexColors: !0,
|
|
321
321
|
size: 0.4,
|
|
322
322
|
// 像素世界单位
|
|
323
323
|
sizeAttenuation: !0
|
|
324
|
-
}), l = new
|
|
324
|
+
}), l = new He(n, i);
|
|
325
325
|
return i.needsUpdate = !0, l;
|
|
326
326
|
}
|
|
327
327
|
function Yt(e, n) {
|
|
@@ -361,7 +361,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
361
361
|
toggleAxesVisibility: K,
|
|
362
362
|
zoomIn: W,
|
|
363
363
|
zoomOut: J
|
|
364
|
-
} = De(o), { isAnimating: M, toggleAnimation: me, stopAnimation: pe } =
|
|
364
|
+
} = 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 = () => {
|
|
365
365
|
K();
|
|
366
366
|
}, we = (a) => {
|
|
367
367
|
ne.value = a, ye();
|
|
@@ -395,7 +395,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
395
395
|
}, se = () => {
|
|
396
396
|
Te(), ze();
|
|
397
397
|
}, Ae = async (a) => {
|
|
398
|
-
const u = URL.createObjectURL(a), V = await
|
|
398
|
+
const u = URL.createObjectURL(a), V = await Se(u);
|
|
399
399
|
if (URL.revokeObjectURL(u), nt(V)) {
|
|
400
400
|
Q.value = await Ut(V, n.trackFileType) || [];
|
|
401
401
|
const z = Q.value;
|
|
@@ -405,7 +405,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
405
405
|
var a, u;
|
|
406
406
|
F.value = ot(), $.value = Lt(Q.value), $.value && $.value.length && (de(F.value, $.value[0], b.value, new O(16711680)), (u = (a = v.value) == null ? void 0 : a.add) == null || u.call(a, F.value));
|
|
407
407
|
}, ie = async (a) => {
|
|
408
|
-
se(), await Ae(a), b.value &&
|
|
408
|
+
se(), await Ae(a), b.value && Ie(h, b.value), x.value && Pe();
|
|
409
409
|
};
|
|
410
410
|
Ee(() => oe.value, async (a) => {
|
|
411
411
|
a && await ie(a);
|
|
@@ -562,11 +562,11 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
562
562
|
d("div", Gt, [
|
|
563
563
|
p(V, { height: "100%" }, {
|
|
564
564
|
default: I(() => [
|
|
565
|
-
r.value === "场景树" ? (X(), le(
|
|
565
|
+
r.value === "场景树" ? (X(), le(et, {
|
|
566
566
|
key: 0,
|
|
567
567
|
model: m.value
|
|
568
568
|
}, null, 8, ["model"])) : S("", !0),
|
|
569
|
-
r.value === "剖面视图" ? (X(), le(
|
|
569
|
+
r.value === "剖面视图" ? (X(), le(Be, {
|
|
570
570
|
key: 1,
|
|
571
571
|
value: A(ne),
|
|
572
572
|
onChange: we
|
|
@@ -589,7 +589,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
589
589
|
d("div", Wt, [
|
|
590
590
|
p(V, { height: "100%" }, {
|
|
591
591
|
default: I(() => [
|
|
592
|
-
N(p(
|
|
592
|
+
N(p(tt, { model: m.value }, null, 8, ["model"]), [
|
|
593
593
|
[Z, c.value === "关节控制"]
|
|
594
594
|
]),
|
|
595
595
|
N(p(dt, {
|
|
@@ -615,7 +615,7 @@ const jt = { class: "obj-viewer-container" }, Dt = { class: "buttonGroup-topLeft
|
|
|
615
615
|
]);
|
|
616
616
|
};
|
|
617
617
|
}
|
|
618
|
-
}),
|
|
618
|
+
}), rn = /* @__PURE__ */ ve(Rt, [["__scopeId", "data-v-7178b621"]]);
|
|
619
619
|
export {
|
|
620
|
-
|
|
620
|
+
rn as default
|
|
621
621
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H,
|
|
2
|
-
import { Y as W, u as A, p as D, s as $ } from "./index-
|
|
3
|
-
import { g as j, q as M, r as L } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-
|
|
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 { Y as W, u as A, p as D, s as $ } from "./index-B8NQAdR4.js";
|
|
3
|
+
import { g as j, q as M, r as L } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js";
|
|
4
4
|
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
const re = {
|
|
6
6
|
SINGLE: "单机",
|
|
@@ -112,7 +112,7 @@ const z = { 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-CWTmvCY4.js")), y = b(() => import("./threePreview-CpcrqmFS.js")), i = b(() => import("./threeTrackPathView-Bw6e-quT.js")), p = b(() => import("./threeSceneViewForCPMPIP-VzWmr9CP.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = q(), c = I(() => {
|
|
116
116
|
var t;
|
|
117
117
|
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
|
|
118
118
|
const { url: e, name: r } = s;
|
|
@@ -0,0 +1,254 @@
|
|
|
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_39e1db95_lang-Dp7tIi0S.js";
|
|
3
|
+
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const D = (i, a) => {
|
|
5
|
+
if (!a)
|
|
6
|
+
return null;
|
|
7
|
+
const l = i.joints[a];
|
|
8
|
+
return l || null;
|
|
9
|
+
}, ae = (i, a) => {
|
|
10
|
+
if (!a)
|
|
11
|
+
return null;
|
|
12
|
+
const l = D(i, a);
|
|
13
|
+
if (!l)
|
|
14
|
+
return null;
|
|
15
|
+
let o = null;
|
|
16
|
+
return l.traverse((u) => {
|
|
17
|
+
u instanceof V && !o && (o = u);
|
|
18
|
+
}), o;
|
|
19
|
+
}, N = (i, a) => {
|
|
20
|
+
if (!a)
|
|
21
|
+
return null;
|
|
22
|
+
const l = i.links[a];
|
|
23
|
+
return l || null;
|
|
24
|
+
}, ie = (i, a) => {
|
|
25
|
+
if (!a)
|
|
26
|
+
return null;
|
|
27
|
+
const l = N(i, a);
|
|
28
|
+
if (!l)
|
|
29
|
+
return null;
|
|
30
|
+
let o = null;
|
|
31
|
+
return l.traverse((u) => {
|
|
32
|
+
u instanceof V && !o && (o = u);
|
|
33
|
+
}), o;
|
|
34
|
+
}, w = (i) => {
|
|
35
|
+
const a = i.joints;
|
|
36
|
+
return Object.values(a);
|
|
37
|
+
}, oe = (i) => w(i).filter((o) => o.jointType !== "fixed"), ue = (i) => {
|
|
38
|
+
const a = i.links;
|
|
39
|
+
return Object.keys(a);
|
|
40
|
+
}, R = { class: "panel-content" }, O = {
|
|
41
|
+
key: 0,
|
|
42
|
+
class: "joints-list"
|
|
43
|
+
}, K = { class: "joint-info-row" }, B = { class: "joint-left" }, q = { class: "joint-name" }, $ = { class: "joint-range" }, z = { class: "joint-type" }, G = {
|
|
44
|
+
key: 0,
|
|
45
|
+
class: "joint-control-row"
|
|
46
|
+
}, H = { class: "slider-container" }, Q = ["min", "max", "value", "onInput"], W = { class: "value-display" }, X = { class: "joint-value" }, Y = { class: "unit" }, Z = {
|
|
47
|
+
key: 1,
|
|
48
|
+
class: "empty-state"
|
|
49
|
+
}, j = /* @__PURE__ */ I({
|
|
50
|
+
__name: "urdfJointPanel",
|
|
51
|
+
props: {
|
|
52
|
+
model: {}
|
|
53
|
+
},
|
|
54
|
+
setup(i, { expose: a }) {
|
|
55
|
+
const l = i, o = F([]), u = F(null), _ = (n, e = !1) => n === "revolute" ? e ? Math.PI : -Math.PI : n === "prismatic" ? e ? 1 : -1 : 0, y = (n) => {
|
|
56
|
+
if (!n || !n.joints)
|
|
57
|
+
return console.warn("URDF模型无效或不包含关节信息"), [];
|
|
58
|
+
const e = [];
|
|
59
|
+
return w(n).forEach((r) => {
|
|
60
|
+
var c, p;
|
|
61
|
+
if (r.jointType === "fixed")
|
|
62
|
+
return;
|
|
63
|
+
let t = {
|
|
64
|
+
lower: ((c = r.limit) == null ? void 0 : c.lower) ?? _(r.jointType, !1),
|
|
65
|
+
upper: ((p = r.limit) == null ? void 0 : p.upper) ?? _(r.jointType, !0)
|
|
66
|
+
};
|
|
67
|
+
r.jointType === "continuous" && (t = {
|
|
68
|
+
lower: -10 * Math.PI,
|
|
69
|
+
upper: 10 * Math.PI
|
|
70
|
+
}), e.push({
|
|
71
|
+
name: r.name,
|
|
72
|
+
type: r.jointType || "unknown",
|
|
73
|
+
limit: t,
|
|
74
|
+
currentValue: r.angle || 0,
|
|
75
|
+
urdfJoint: r
|
|
76
|
+
});
|
|
77
|
+
}), e;
|
|
78
|
+
}, v = (n, e) => {
|
|
79
|
+
var c;
|
|
80
|
+
const s = o.value.find((p) => p.name === n);
|
|
81
|
+
if (!s) return;
|
|
82
|
+
const r = parseFloat(e), t = Math.max(s.limit.lower, Math.min(s.limit.upper, r));
|
|
83
|
+
s.currentValue = t, (c = l.model) != null && c.setJointValue ? l.model.setJointValue(n, t) : s.urdfJoint.setJointValue(t);
|
|
84
|
+
}, g = () => {
|
|
85
|
+
o.value.forEach((n) => {
|
|
86
|
+
(n.type === "revolute" || n.type === "continuous" || n.type === "prismatic") && v(n.name, 0);
|
|
87
|
+
});
|
|
88
|
+
}, J = () => {
|
|
89
|
+
l.model && o.value.forEach((n) => {
|
|
90
|
+
n.urdfJoint.angle !== void 0 && n.currentValue !== n.urdfJoint.angle && (n.currentValue = n.urdfJoint.angle);
|
|
91
|
+
});
|
|
92
|
+
}, x = () => {
|
|
93
|
+
const n = () => {
|
|
94
|
+
J(), u.value = requestAnimationFrame(n);
|
|
95
|
+
};
|
|
96
|
+
n();
|
|
97
|
+
}, k = () => {
|
|
98
|
+
u.value && (cancelAnimationFrame(u.value), u.value = null);
|
|
99
|
+
};
|
|
100
|
+
return M(
|
|
101
|
+
() => l.model,
|
|
102
|
+
(n) => {
|
|
103
|
+
n ? o.value = y(n) : o.value = [];
|
|
104
|
+
},
|
|
105
|
+
{ immediate: !0 }
|
|
106
|
+
), C(() => {
|
|
107
|
+
x();
|
|
108
|
+
}), E(() => {
|
|
109
|
+
k();
|
|
110
|
+
}), a({
|
|
111
|
+
resetAllJoints: g
|
|
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
|
+
key: s.name,
|
|
116
|
+
class: "joint-item"
|
|
117
|
+
}, [
|
|
118
|
+
d("div", K, [
|
|
119
|
+
d("div", B, [
|
|
120
|
+
d("span", q, h(s.name), 1),
|
|
121
|
+
d("span", $, " [" + h(s.limit.lower.toFixed(2)) + ", " + h(s.limit.upper.toFixed(2)) + "] ", 1)
|
|
122
|
+
]),
|
|
123
|
+
d("span", z, h(s.type), 1)
|
|
124
|
+
]),
|
|
125
|
+
s.type === "revolute" || s.type === "prismatic" || s.type === "continuous" ? (m(), f("div", G, [
|
|
126
|
+
d("div", H, [
|
|
127
|
+
d("input", {
|
|
128
|
+
type: "range",
|
|
129
|
+
min: s.limit.lower,
|
|
130
|
+
max: s.limit.upper,
|
|
131
|
+
step: "0.001",
|
|
132
|
+
value: s.currentValue,
|
|
133
|
+
onInput: (r) => v(s.name, r.target.value),
|
|
134
|
+
class: "joint-slider"
|
|
135
|
+
}, null, 40, Q)
|
|
136
|
+
]),
|
|
137
|
+
d("div", W, [
|
|
138
|
+
d("span", X, h(s.currentValue ? Number(s.currentValue).toFixed(3) : "0.000"), 1),
|
|
139
|
+
d("span", Y, h(s.type === "prismatic" ? "m" : "rad"), 1)
|
|
140
|
+
])
|
|
141
|
+
])) : U("", !0)
|
|
142
|
+
]))), 128))
|
|
143
|
+
])) : (m(), f("div", Z, [...e[0] || (e[0] = [
|
|
144
|
+
d("p", null, "未检测到可控制的关节", -1)
|
|
145
|
+
])]))
|
|
146
|
+
]));
|
|
147
|
+
}
|
|
148
|
+
}), ce = /* @__PURE__ */ b(j, [["__scopeId", "data-v-b1467983"]]), ee = { class: "panel-content" }, te = "id", se = {
|
|
149
|
+
__name: "urdfTree",
|
|
150
|
+
props: {
|
|
151
|
+
model: Object,
|
|
152
|
+
maxExpandCount: {
|
|
153
|
+
type: Number,
|
|
154
|
+
default: 10
|
|
155
|
+
},
|
|
156
|
+
expandStrategy: {
|
|
157
|
+
type: String,
|
|
158
|
+
default: "breadth",
|
|
159
|
+
validator: (i) => ["breadth", "firstLevel"].includes(i)
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
emits: ["nodeClick"],
|
|
163
|
+
setup(i, { emit: a }) {
|
|
164
|
+
const l = i, o = a, u = F([]), _ = {
|
|
165
|
+
children: "children",
|
|
166
|
+
label: "label"
|
|
167
|
+
}, y = (e) => {
|
|
168
|
+
o("nodeClick", e);
|
|
169
|
+
}, v = (e, s = 0) => {
|
|
170
|
+
const r = [];
|
|
171
|
+
return Array.isArray(e) && (e == null ? void 0 : e.length) > 0 && e.forEach((t) => {
|
|
172
|
+
if (!(t != null && t.isMesh) && ((t == null ? void 0 : t.type) === "URDFJoint" || (t == null ? void 0 : t.type) === "URDFLink")) {
|
|
173
|
+
const c = {
|
|
174
|
+
name: t == null ? void 0 : t.name,
|
|
175
|
+
label: t == null ? void 0 : t.name,
|
|
176
|
+
show: !0,
|
|
177
|
+
level: s + 1,
|
|
178
|
+
isPenultimate: !1,
|
|
179
|
+
type: t == null ? void 0 : t.type,
|
|
180
|
+
id: t == null ? void 0 : t.id,
|
|
181
|
+
limit: (t == null ? void 0 : t.limit) ?? "",
|
|
182
|
+
children: v(t == null ? void 0 : t.children, s + 1),
|
|
183
|
+
path: t == null ? void 0 : t.name
|
|
184
|
+
};
|
|
185
|
+
r.push(c);
|
|
186
|
+
}
|
|
187
|
+
}), r;
|
|
188
|
+
}, g = (e) => e ? [{
|
|
189
|
+
name: e == null ? void 0 : e.name,
|
|
190
|
+
label: e == null ? void 0 : e.name,
|
|
191
|
+
show: !0,
|
|
192
|
+
level: 1,
|
|
193
|
+
isPenultimate: !1,
|
|
194
|
+
type: e == null ? void 0 : e.type,
|
|
195
|
+
id: e == null ? void 0 : e.id,
|
|
196
|
+
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
197
|
+
children: v(e == null ? void 0 : e.children, 1) || [],
|
|
198
|
+
path: e == null ? void 0 : e.name
|
|
199
|
+
}] : [], J = (e, s) => {
|
|
200
|
+
const r = [], t = [...e];
|
|
201
|
+
for (; t.length > 0 && r.length < s; ) {
|
|
202
|
+
const c = t.shift();
|
|
203
|
+
c.children && c.children.length > 0 && (r.push(c.id), t.push(...c.children));
|
|
204
|
+
}
|
|
205
|
+
return r;
|
|
206
|
+
}, x = (e, s) => {
|
|
207
|
+
const r = [];
|
|
208
|
+
return e.forEach((t) => {
|
|
209
|
+
if (t.children && t.children.length > 0) {
|
|
210
|
+
r.push(t.id);
|
|
211
|
+
const c = t.children.filter((p) => p.children && p.children.length > 0).slice(0, s).map((p) => p.id);
|
|
212
|
+
r.push(...c);
|
|
213
|
+
}
|
|
214
|
+
}), r.slice(0, s + 1);
|
|
215
|
+
}, k = L(() => !u.value || u.value.length === 0 ? [] : l.expandStrategy === "firstLevel" ? x(u.value, l.maxExpandCount) : J(u.value, l.maxExpandCount)), n = L(() => [{
|
|
216
|
+
name: "场景",
|
|
217
|
+
label: "场景",
|
|
218
|
+
show: !0,
|
|
219
|
+
level: 1,
|
|
220
|
+
isPenultimate: !1,
|
|
221
|
+
type: "场景",
|
|
222
|
+
id: "场景",
|
|
223
|
+
children: l != null && l.model ? g(l.model) : [],
|
|
224
|
+
path: "场景"
|
|
225
|
+
}]);
|
|
226
|
+
return M(
|
|
227
|
+
n,
|
|
228
|
+
(e) => {
|
|
229
|
+
u.value = JSON.parse(JSON.stringify(e));
|
|
230
|
+
},
|
|
231
|
+
{ immediate: !0 }
|
|
232
|
+
), (e, s) => {
|
|
233
|
+
const r = S("el-tree");
|
|
234
|
+
return m(), f("div", ee, [
|
|
235
|
+
A(r, {
|
|
236
|
+
data: u.value,
|
|
237
|
+
props: _,
|
|
238
|
+
"default-expanded-keys": k.value,
|
|
239
|
+
"node-key": te,
|
|
240
|
+
onNodeClick: y
|
|
241
|
+
}, null, 8, ["data", "default-expanded-keys"])
|
|
242
|
+
]);
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
}, de = /* @__PURE__ */ b(se, [["__scopeId", "data-v-cfde50c3"]]);
|
|
246
|
+
export {
|
|
247
|
+
ce as J,
|
|
248
|
+
de as U,
|
|
249
|
+
ae as a,
|
|
250
|
+
ue as b,
|
|
251
|
+
D as c,
|
|
252
|
+
ie as d,
|
|
253
|
+
oe as g
|
|
254
|
+
};
|