ss-component-new 1.3.657 → 1.3.659
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/config.js +1 -1
- package/dist/index-CQG5_ZDD.js +1084 -0
- package/dist/index-C_HX7GAm.js +8849 -0
- package/dist/index-ZPct7ETq.js +180 -0
- package/dist/platform-BsULsE0-.js +16684 -0
- package/dist/ss-component.css +2 -8
- package/dist/ss-component.js +26 -67
- package/dist/ss-component2.js +15 -75
- package/dist/ss-component3.js +785 -9
- package/package.json +4 -4
- package/public/config.js +1 -1
- package/dist/MTLLoader-DI0avKtj.js +0 -657
- package/dist/URDFLoader-PUxvYFDe.js +0 -2304
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/animationData-05aVUytq.js +0 -83
- package/dist/array-M5UIzgFU.js +0 -1044
- package/dist/clone-Ddn1p6-1.js +0 -8
- package/dist/eleIcon-BWVKfp5t.js +0 -29
- package/dist/iconfont-BNdGaGPn.js +0 -1018
- package/dist/icons/svg/Update.svg +0 -1
- package/dist/icons/svg/functionList.svg +0 -1
- package/dist/icons/svg/uploadCopy.svg +0 -1
- package/dist/index-B7ESWQK3.js +0 -468
- package/dist/index-BDhIWgKn.js +0 -658
- package/dist/index-BFYqRqws.js +0 -83
- package/dist/index-BFqUz4pN.js +0 -52
- package/dist/index-BP1mKUQP.js +0 -627
- package/dist/index-BczRQX8N.js +0 -407
- package/dist/index-BnrvtCYj.js +0 -55
- package/dist/index-Bpr501oZ.js +0 -78
- package/dist/index-BtOiWnaj.js +0 -117
- package/dist/index-BvbZiTVB.js +0 -342
- package/dist/index-Bvvz41NY.js +0 -44
- package/dist/index-C9DBY1gg.js +0 -103
- package/dist/index-CFFbhR3G.js +0 -996
- package/dist/index-COr2mcbl.js +0 -48
- package/dist/index-CV_jQDcg.js +0 -9
- package/dist/index-CXV4riUN.js +0 -864
- package/dist/index-CXe4q28L.js +0 -447
- package/dist/index-CYKmHhSo.js +0 -61974
- package/dist/index-ChNfRlIP.js +0 -596
- package/dist/index-D-5v1Jx7.js +0 -93
- package/dist/index-D4LcEpQ7.js +0 -619
- package/dist/index-DGObzWyL.js +0 -8984
- package/dist/index-DJ59jXR0.js +0 -28483
- package/dist/index-DJrzqi4-.js +0 -209
- package/dist/index-D_kI6aHR.js +0 -98
- package/dist/index-Dr9Wt5nC.js +0 -84
- package/dist/index-Dwt0Wlg_.js +0 -201
- package/dist/index-DxBEJThZ.js +0 -93
- package/dist/index-DyOIxMCm.js +0 -11769
- package/dist/index-J_lJ8THH.js +0 -107
- package/dist/index-MgxLPMC2.js +0 -30
- package/dist/index-SeW03TeK.js +0 -2623
- package/dist/index-WPJbEuld.js +0 -62
- package/dist/index-WuWGP1Bp.js +0 -24847
- package/dist/index-YVR3acYT.js +0 -61
- package/dist/index-dD-mKgue.js +0 -27
- package/dist/index-uF-ibwG0.js +0 -9
- package/dist/index-yRXVIg-Q.js +0 -98
- package/dist/index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js +0 -55
- package/dist/index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js +0 -137728
- package/dist/isString-CoCw_sp3.js +0 -8
- package/dist/localIcon-CoJHw5ss.js +0 -76
- package/dist/main-6nOFPtBP.js +0 -502
- package/dist/menuIndex-Dt0NyAyE.js +0 -159
- package/dist/request-DiogHwkN.js +0 -9465
- package/dist/threeModel-CO0qgNsr.js +0 -1108
- package/dist/threePreview-BHLSA5YS.js +0 -2259
- package/dist/threeSceneView-C2e1Jcsq.js +0 -1289
- package/dist/threeSceneViewForCPMPIP-DSLQhiGf.js +0 -538
- package/dist/threeTrackPathView-BR8-g2Tr.js +0 -620
- package/dist/threeViewerHost-DSHo_0Ag.js +0 -233
- package/dist/urdfTree-IEJgkVzs.js +0 -254
- package/dist/workpieceTreePanel-aZV2ut3W.js +0 -555
- package/public/icons/svg/Update.svg +0 -1
- package/public/icons/svg/functionList.svg +0 -1
- package/public/icons/svg/uploadCopy.svg +0 -1
- /package/dist/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/dist/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
- /package/public/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/public/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
|
@@ -1,555 +0,0 @@
|
|
|
1
|
-
var ce = Object.defineProperty;
|
|
2
|
-
var de = (b, l, t) => l in b ? ce(b, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : b[l] = t;
|
|
3
|
-
var J = (b, l, t) => de(b, typeof l != "symbol" ? l + "" : l, t);
|
|
4
|
-
import { U as me } from "./URDFLoader-PUxvYFDe.js";
|
|
5
|
-
import { S as ve, M as pe, O as fe } from "./MTLLoader-DI0avKtj.js";
|
|
6
|
-
import { b2 as be, b3 as re, s as O, k as we, h as he, b4 as E, B as ge, b5 as _e, ap as je, V as ye } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.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-BNdGaGPn.js";
|
|
9
|
-
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
const Se = "http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";
|
|
11
|
-
function Me(b) {
|
|
12
|
-
const { mtlUrl: l, manager: t, resourcePath: s, onLoad: m, onProgress: i, onError: h } = b, v = new pe(t);
|
|
13
|
-
return s && v.setResourcePath(s), v.load(l, m, i, h), v;
|
|
14
|
-
}
|
|
15
|
-
function Fe(b) {
|
|
16
|
-
const { objUrl: l, manager: t, materials: s, onLoad: m, onProgress: i, onError: h } = b, v = new fe(t);
|
|
17
|
-
return s && v.setMaterials(s), v.load(l, m, i, h), v;
|
|
18
|
-
}
|
|
19
|
-
function De(b) {
|
|
20
|
-
const { manager: l, baseFolderUrl: t, onFileProgress: s } = b, m = new me(l);
|
|
21
|
-
return m.packages = (i) => `${t.endsWith("/") ? t : t + "/"}${i}/`, m.loadMeshCb = (i, h, v) => {
|
|
22
|
-
const y = (() => {
|
|
23
|
-
const g = i.split("?")[0].split("#")[0], r = g.lastIndexOf(".");
|
|
24
|
-
return r >= 0 ? g.slice(r + 1).toLowerCase() : void 0;
|
|
25
|
-
})();
|
|
26
|
-
switch (y) {
|
|
27
|
-
// OBJ+MTL
|
|
28
|
-
case "obj": {
|
|
29
|
-
const g = (() => {
|
|
30
|
-
try {
|
|
31
|
-
return new URL(".", i).toString();
|
|
32
|
-
} catch {
|
|
33
|
-
const n = i.lastIndexOf("/");
|
|
34
|
-
return n >= 0 ? i.slice(0, n + 1) : i;
|
|
35
|
-
}
|
|
36
|
-
})(), r = (() => {
|
|
37
|
-
var u;
|
|
38
|
-
return (((u = i.split("/").pop()) == null ? void 0 : u.split("?")[0].split("#")[0]) ?? "").replace(/\.[^/.?#]+$/, "");
|
|
39
|
-
})(), f = `${g}${r}.mtl`, _ = (n) => {
|
|
40
|
-
Fe({
|
|
41
|
-
objUrl: i,
|
|
42
|
-
manager: h,
|
|
43
|
-
materials: n,
|
|
44
|
-
onLoad: (u) => v(u),
|
|
45
|
-
onProgress: (u) => s == null ? void 0 : s(i, u == null ? void 0 : u.loaded, u == null ? void 0 : u.total),
|
|
46
|
-
onError: (u) => {
|
|
47
|
-
console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${i}`, u), v(new O());
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
};
|
|
51
|
-
Me({
|
|
52
|
-
mtlUrl: f,
|
|
53
|
-
manager: h,
|
|
54
|
-
resourcePath: g,
|
|
55
|
-
onLoad: (n) => {
|
|
56
|
-
try {
|
|
57
|
-
n.preload();
|
|
58
|
-
} catch {
|
|
59
|
-
}
|
|
60
|
-
_(n);
|
|
61
|
-
},
|
|
62
|
-
onProgress: (n) => s == null ? void 0 : s(f, n == null ? void 0 : n.loaded, n == null ? void 0 : n.total),
|
|
63
|
-
onError: (n) => {
|
|
64
|
-
console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`), _(void 0);
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
break;
|
|
68
|
-
}
|
|
69
|
-
case "stl": {
|
|
70
|
-
new ve(h).load(
|
|
71
|
-
i,
|
|
72
|
-
(r) => {
|
|
73
|
-
const f = new we({ color: 12303291, shininess: 30 }), _ = new he(r, f);
|
|
74
|
-
_.castShadow = !0, _.receiveShadow = !0, v(_);
|
|
75
|
-
},
|
|
76
|
-
(r) => s == null ? void 0 : s(i, r == null ? void 0 : r.loaded, r == null ? void 0 : r.total),
|
|
77
|
-
(r) => {
|
|
78
|
-
console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${i}`, r), v(new O());
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
default:
|
|
84
|
-
console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${y} (路径: ${i})`), v(new O());
|
|
85
|
-
}
|
|
86
|
-
}, m;
|
|
87
|
-
}
|
|
88
|
-
function dt(b, l, t, s) {
|
|
89
|
-
return { loadSceneFromFile: (i) => new Promise((h, v) => {
|
|
90
|
-
t.value = !0, s.value = "正在初始化 URDF 加载器...";
|
|
91
|
-
let y = 0, g = 0, r = null;
|
|
92
|
-
const f = new be();
|
|
93
|
-
f.onStart = (n, u, j) => {
|
|
94
|
-
y = j || 0, g = u || 0, s.value = y > 0 ? `开始下载资源: 0 / ${y}` : "开始下载资源...", t.value = !0;
|
|
95
|
-
}, f.onProgress = (n, u, j) => {
|
|
96
|
-
g = u, y = j;
|
|
97
|
-
const $ = `正在加载 ${u} / ${j} 个文件: ${re(n)}`;
|
|
98
|
-
s.value = $, u === j && (s.value = "资源加载完成,正在处理模型...", setTimeout(() => {
|
|
99
|
-
if (r) {
|
|
100
|
-
r.updateMatrixWorld(!0);
|
|
101
|
-
const p = new ge().setFromObject(r);
|
|
102
|
-
p.isEmpty() && console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"), r.userData.boundingBox = p, r.traverse((d) => {
|
|
103
|
-
d.isMesh && (d.castShadow = !0, d.receiveShadow = !0);
|
|
104
|
-
}), h(r);
|
|
105
|
-
} else
|
|
106
|
-
v(new Error("URDF 文件本身加载失败。"));
|
|
107
|
-
s.value = "模型加载完成", setTimeout(() => {
|
|
108
|
-
s.value === "模型加载完成" && (t.value = !1, s.value = "");
|
|
109
|
-
}, 500);
|
|
110
|
-
}, 100));
|
|
111
|
-
}, f.onError = (n) => {
|
|
112
|
-
console.warn(`LoadingManager 报告一个资源加载失败: ${n}。加载流程将继续。`);
|
|
113
|
-
};
|
|
114
|
-
const _ = (n, u, j) => {
|
|
115
|
-
const $ = re(n);
|
|
116
|
-
let p;
|
|
117
|
-
j && j > 0 ? p = `${$}(${E(u)} / ${E(j)})` : u && u > 0 ? p = `${$}(已下载 ${E(u)})` : p = `${$}`, s.value = `正在下载第 ${g + 1} / ${y} 个文件: ${p}`;
|
|
118
|
-
};
|
|
119
|
-
try {
|
|
120
|
-
const n = URL.createObjectURL(i);
|
|
121
|
-
De({
|
|
122
|
-
manager: f,
|
|
123
|
-
baseFolderUrl: Se,
|
|
124
|
-
onFileProgress: _
|
|
125
|
-
}).load(
|
|
126
|
-
n,
|
|
127
|
-
(j) => {
|
|
128
|
-
r = j;
|
|
129
|
-
},
|
|
130
|
-
void 0,
|
|
131
|
-
(j) => {
|
|
132
|
-
console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`, j), s.value = "URDF 文件解析失败", t.value = !1, v(new Error(`加载 URDF 文件失败: ${i.name}`));
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
} catch (n) {
|
|
136
|
-
console.error("初始化 URDF 加载时发生致命错误:", n), s.value = "模型加载失败", t.value = !1, v(n);
|
|
137
|
-
}
|
|
138
|
-
}) };
|
|
139
|
-
}
|
|
140
|
-
function mt(b, l, t, s = ["URDFVisual"]) {
|
|
141
|
-
let m = null;
|
|
142
|
-
const i = T(null), h = new _e(), v = new je(), y = /* @__PURE__ */ new Map();
|
|
143
|
-
function g() {
|
|
144
|
-
t.value.forEach((p) => {
|
|
145
|
-
p.traverse((d) => {
|
|
146
|
-
s != null && s.includes(d.type) && y.set(d.id, {
|
|
147
|
-
obj: d,
|
|
148
|
-
axis: d.axis || new ye(1, 0, 0),
|
|
149
|
-
// URDF 里的 <axis>
|
|
150
|
-
limits: d.limits
|
|
151
|
-
});
|
|
152
|
-
});
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
function r(p) {
|
|
156
|
-
i.value && i.value.obj.traverse((d) => {
|
|
157
|
-
var e;
|
|
158
|
-
d.material && ((e = d.material.emissive) == null || e.set(0));
|
|
159
|
-
}), i.value = p, p.obj.traverse((d) => {
|
|
160
|
-
var e;
|
|
161
|
-
d.material && ((e = d.material.emissive) == null || e.set(65280));
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
function f(p) {
|
|
165
|
-
const d = b.value.getBoundingClientRect();
|
|
166
|
-
v.x = (p.clientX - d.left) / d.width * 2 - 1, v.y = -((p.clientY - d.top) / d.height) * 2 + 1, h.setFromCamera(v, m);
|
|
167
|
-
const e = h.intersectObjects(t.value, !0);
|
|
168
|
-
if (e.length === 0) return;
|
|
169
|
-
let o = e[0].object, w = null;
|
|
170
|
-
for (; o; ) {
|
|
171
|
-
if (y.has(o.id)) {
|
|
172
|
-
w = y.get(o.id);
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
o = o.parent;
|
|
176
|
-
}
|
|
177
|
-
w && r(w);
|
|
178
|
-
}
|
|
179
|
-
function _() {
|
|
180
|
-
b.value && b.value.removeEventListener("click", f, !1);
|
|
181
|
-
}
|
|
182
|
-
function n() {
|
|
183
|
-
const { scene: p, camera: d } = l();
|
|
184
|
-
m = d, g(), b.value && b.value.addEventListener("click", f, !1);
|
|
185
|
-
}
|
|
186
|
-
function u(p) {
|
|
187
|
-
i.value && (i.value.obj.visible = p);
|
|
188
|
-
}
|
|
189
|
-
function j(p) {
|
|
190
|
-
var o;
|
|
191
|
-
const { axis: d, value: e } = p;
|
|
192
|
-
Ue((o = i.value) == null ? void 0 : o.obj, d, e);
|
|
193
|
-
}
|
|
194
|
-
function $(p) {
|
|
195
|
-
var o;
|
|
196
|
-
const { axis: d, value: e } = p;
|
|
197
|
-
Re((o = i.value) == null ? void 0 : o.obj, d, e);
|
|
198
|
-
}
|
|
199
|
-
return {
|
|
200
|
-
initRaycaster: n,
|
|
201
|
-
dispose: _,
|
|
202
|
-
selectedObject3D: i,
|
|
203
|
-
setSelectedObjVisible: u,
|
|
204
|
-
updatePosition: j,
|
|
205
|
-
updateRotation: $
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
|
-
class vt {
|
|
209
|
-
constructor(l) {
|
|
210
|
-
J(this, "robot");
|
|
211
|
-
J(this, "movableJoints");
|
|
212
|
-
this.robot = l, this.movableJoints = this.getMovableJoints();
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* 获取所有可动关节
|
|
216
|
-
*/
|
|
217
|
-
getMovableJoints() {
|
|
218
|
-
return Object.values(this.robot.joints).filter((l) => l.jointType !== "fixed");
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* 获取可动关节名称列表
|
|
222
|
-
*/
|
|
223
|
-
getMovableJointNames() {
|
|
224
|
-
return this.movableJoints.map((l) => l.name);
|
|
225
|
-
}
|
|
226
|
-
/**
|
|
227
|
-
* 设置单个关节角度
|
|
228
|
-
*/
|
|
229
|
-
setJointAngle(l, t) {
|
|
230
|
-
const s = this.robot.joints[l];
|
|
231
|
-
if (!s || s.jointType === "fixed")
|
|
232
|
-
return console.warn(`关节 ${l} 不存在或不可动`), !1;
|
|
233
|
-
if (s.limit) {
|
|
234
|
-
const m = Math.max(s.limit.lower, Math.min(s.limit.upper, t));
|
|
235
|
-
m !== t && console.warn(`关节 ${l} 角度被限制在 [${s.limit.lower}, ${s.limit.upper}]`), s.setJointValue(m);
|
|
236
|
-
} else
|
|
237
|
-
s.setJointValue(t);
|
|
238
|
-
return !0;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* 批量设置关节角度
|
|
242
|
-
*/
|
|
243
|
-
setJointAngles(l) {
|
|
244
|
-
Object.entries(l).forEach(([t, s]) => {
|
|
245
|
-
typeof s == "number" && !isNaN(s) && this.setJointAngle(t, s);
|
|
246
|
-
});
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* 获取当前所有关节状态
|
|
250
|
-
*/
|
|
251
|
-
getCurrentJointStates() {
|
|
252
|
-
const l = {};
|
|
253
|
-
return this.movableJoints.forEach((t) => {
|
|
254
|
-
l[t.name] = t.angle || 0;
|
|
255
|
-
}), l;
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* 重置所有关节到零位
|
|
259
|
-
*/
|
|
260
|
-
resetToZero() {
|
|
261
|
-
this.movableJoints.forEach((l) => {
|
|
262
|
-
l.setJointValue(0);
|
|
263
|
-
});
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* 获取关节限制信息
|
|
267
|
-
*/
|
|
268
|
-
getJointLimits(l) {
|
|
269
|
-
const t = this.robot.joints[l];
|
|
270
|
-
return !t || !t.limit ? null : {
|
|
271
|
-
lower: t.limit.lower,
|
|
272
|
-
upper: t.limit.upper
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* 线性插值动画到目标状态
|
|
277
|
-
*/
|
|
278
|
-
async animateToState(l, t = 1e3, s) {
|
|
279
|
-
const m = this.getCurrentJointStates(), i = Date.now();
|
|
280
|
-
return new Promise((h) => {
|
|
281
|
-
const v = () => {
|
|
282
|
-
const y = Date.now() - i, g = Math.min(y / 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
|
-
};
|
|
288
|
-
v();
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* 缓动函数
|
|
293
|
-
*/
|
|
294
|
-
easeInOutCubic(l) {
|
|
295
|
-
return l < 0.5 ? 4 * l * l * l : 1 - Math.pow(-2 * l + 2, 3) / 2;
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* 播放关键帧动画序列
|
|
299
|
-
*/
|
|
300
|
-
async playSequence(l, t = 1e3, s) {
|
|
301
|
-
for (let m = 0; m < l.length; m++)
|
|
302
|
-
await this.animateToState(l[m], t, (i) => {
|
|
303
|
-
s && s(m, i);
|
|
304
|
-
});
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
const Je = { class: "panel-content" }, Oe = { class: "obj" }, Ee = {
|
|
308
|
-
key: 0,
|
|
309
|
-
class: "obj-base"
|
|
310
|
-
}, xe = ["title"], ke = ["title"], Ve = { key: 1 }, Te = { class: "obj-position" }, ze = { class: "coord-item" }, Pe = { class: "coord-item" }, Ae = { class: "coord-item" }, Ie = { class: "obj-rotation" }, Be = { class: "coord-item" }, Ne = { class: "coord-item" }, We = { class: "coord-item" }, qe = { class: "world" }, Xe = { class: "coord-line" }, Ye = { class: "coord-text" }, Ze = { class: "world-position-item" }, Ke = { class: "world-position-item" }, Ge = { class: "world-position-item" }, He = { class: "coord-line" }, Qe = { class: "coord-text" }, et = { class: "world-rotation-item" }, tt = { class: "world-rotation-item" }, ot = { class: "world-rotation-item" }, st = /* @__PURE__ */ Le({
|
|
311
|
-
__name: "workpieceTreePanel",
|
|
312
|
-
props: {
|
|
313
|
-
model: {},
|
|
314
|
-
maxExpandCount: { default: 10 },
|
|
315
|
-
expandStrategy: { default: "breadth" }
|
|
316
|
-
},
|
|
317
|
-
emits: ["nodeClick", "visibleChange", "updatePosition", "updateRotation"],
|
|
318
|
-
setup(b, { emit: l }) {
|
|
319
|
-
const t = b, s = l, m = T([]), i = T({}), h = (e, o = 0) => {
|
|
320
|
-
const w = [];
|
|
321
|
-
return Array.isArray(e) && (e == null ? void 0 : e.length) > 0 && e.forEach((a) => {
|
|
322
|
-
if (!(a != null && a.isMesh)) {
|
|
323
|
-
const L = {
|
|
324
|
-
name: a == null ? void 0 : a.name,
|
|
325
|
-
label: (a == null ? void 0 : a.name) || (a == null ? void 0 : a.type),
|
|
326
|
-
show: !0,
|
|
327
|
-
level: o + 1,
|
|
328
|
-
isPenultimate: !1,
|
|
329
|
-
type: a == null ? void 0 : a.type,
|
|
330
|
-
id: a == null ? void 0 : a.id,
|
|
331
|
-
limit: (a == null ? void 0 : a.limit) ?? "",
|
|
332
|
-
children: h(a == null ? void 0 : a.children, o + 1),
|
|
333
|
-
path: a == null ? void 0 : a.name
|
|
334
|
-
};
|
|
335
|
-
w.push(L);
|
|
336
|
-
}
|
|
337
|
-
}), w;
|
|
338
|
-
}, v = (e) => e ? [{
|
|
339
|
-
name: e == null ? void 0 : e.name,
|
|
340
|
-
label: (e == null ? void 0 : e.name) || (e == null ? void 0 : e.type),
|
|
341
|
-
show: !0,
|
|
342
|
-
level: 1,
|
|
343
|
-
isPenultimate: !1,
|
|
344
|
-
type: e == null ? void 0 : e.type,
|
|
345
|
-
id: e == null ? void 0 : e.id,
|
|
346
|
-
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
347
|
-
children: h(e == null ? void 0 : e.children, 1),
|
|
348
|
-
path: e == null ? void 0 : e.name
|
|
349
|
-
}] : [], y = (e, o) => {
|
|
350
|
-
const w = [], a = [...e];
|
|
351
|
-
for (; a.length > 0 && w.length < o; ) {
|
|
352
|
-
const L = a.shift();
|
|
353
|
-
L.children && L.children.length > 0 && (w.push(L.id), a.push(...L.children));
|
|
354
|
-
}
|
|
355
|
-
return w;
|
|
356
|
-
}, g = (e, o) => {
|
|
357
|
-
const w = [];
|
|
358
|
-
return e.forEach((a) => {
|
|
359
|
-
if (a.children && a.children.length > 0) {
|
|
360
|
-
w.push(a.id);
|
|
361
|
-
const L = a.children.filter((S) => S.children && S.children.length > 0).slice(0, o).map((S) => S.id);
|
|
362
|
-
w.push(...L);
|
|
363
|
-
}
|
|
364
|
-
}), w.slice(0, o + 1);
|
|
365
|
-
};
|
|
366
|
-
M(() => !m.value || m.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ? g(m.value, t.maxExpandCount) : y(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
|
-
s("updatePosition", {
|
|
369
|
-
obj: t.model,
|
|
370
|
-
axis: o,
|
|
371
|
-
value: (e == null ? void 0 : e.toString()) || "0"
|
|
372
|
-
});
|
|
373
|
-
}, n = (e, o) => {
|
|
374
|
-
s("updateRotation", {
|
|
375
|
-
obj: t.model,
|
|
376
|
-
axis: o,
|
|
377
|
-
value: (e == null ? void 0 : e.toString()) || "0"
|
|
378
|
-
});
|
|
379
|
-
}, u = (e) => {
|
|
380
|
-
s("visibleChange", e);
|
|
381
|
-
}, j = M(() => t != null && t.model ? v(t.model) : []), $ = M(() => {
|
|
382
|
-
var e, o;
|
|
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
|
-
}), p = M(() => {
|
|
385
|
-
var e;
|
|
386
|
-
return (e = t == null ? void 0 : t.model) == null ? void 0 : e.type;
|
|
387
|
-
}), d = M(() => {
|
|
388
|
-
var e;
|
|
389
|
-
return (e = t == null ? void 0 : t.model) == null ? void 0 : e.visible;
|
|
390
|
-
});
|
|
391
|
-
return ue(() => t.model, () => {
|
|
392
|
-
t.model && (i.value = $e(t.model));
|
|
393
|
-
}, {
|
|
394
|
-
deep: !0,
|
|
395
|
-
immediate: !0
|
|
396
|
-
}), ue(
|
|
397
|
-
j,
|
|
398
|
-
(e) => {
|
|
399
|
-
m.value = JSON.parse(JSON.stringify(e));
|
|
400
|
-
},
|
|
401
|
-
{ immediate: !0 }
|
|
402
|
-
), (e, o) => {
|
|
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
|
-
const w = x("el-divider"), a = x("el-switch"), L = x("el-input-number");
|
|
405
|
-
return k(), V("div", Je, [
|
|
406
|
-
U(w, null, {
|
|
407
|
-
default: F(() => [...o[6] || (o[6] = [
|
|
408
|
-
D("对象", -1)
|
|
409
|
-
])]),
|
|
410
|
-
_: 1
|
|
411
|
-
}),
|
|
412
|
-
c("div", Oe, [
|
|
413
|
-
t.model ? (k(), V("div", Ee, [
|
|
414
|
-
c("div", {
|
|
415
|
-
class: "obj-name",
|
|
416
|
-
title: $.value
|
|
417
|
-
}, C($.value), 9, xe),
|
|
418
|
-
c("div", {
|
|
419
|
-
class: "obj-type",
|
|
420
|
-
title: p.value
|
|
421
|
-
}, "[" + C(p.value) + "]", 9, ke)
|
|
422
|
-
])) : (k(), V("div", Ve, "空")),
|
|
423
|
-
U(a, {
|
|
424
|
-
"model-value": d.value,
|
|
425
|
-
onChange: u
|
|
426
|
-
}, null, 8, ["model-value"])
|
|
427
|
-
]),
|
|
428
|
-
U(w, null, {
|
|
429
|
-
default: F(() => [...o[7] || (o[7] = [
|
|
430
|
-
D("相对位置", -1)
|
|
431
|
-
])]),
|
|
432
|
-
_: 1
|
|
433
|
-
}),
|
|
434
|
-
c("div", Te, [
|
|
435
|
-
c("div", ze, [
|
|
436
|
-
o[8] || (o[8] = c("span", { class: "axis-label" }, "X", -1)),
|
|
437
|
-
U(L, {
|
|
438
|
-
"model-value": r((z = (S = i.value) == null ? void 0 : S.position) == null ? void 0 : z.x),
|
|
439
|
-
onChange: o[0] || (o[0] = (R) => _(R, "x")),
|
|
440
|
-
size: "small",
|
|
441
|
-
class: "coord-input-compact",
|
|
442
|
-
precision: 3,
|
|
443
|
-
step: 0.1,
|
|
444
|
-
controls: !0,
|
|
445
|
-
"controls-position": "right"
|
|
446
|
-
}, null, 8, ["model-value"])
|
|
447
|
-
]),
|
|
448
|
-
c("div", Pe, [
|
|
449
|
-
o[9] || (o[9] = c("span", { class: "axis-label" }, "Y", -1)),
|
|
450
|
-
U(L, {
|
|
451
|
-
"model-value": r((A = (P = i.value) == null ? void 0 : P.position) == null ? void 0 : A.y),
|
|
452
|
-
onChange: o[1] || (o[1] = (R) => _(R, "y")),
|
|
453
|
-
size: "small",
|
|
454
|
-
class: "coord-input-compact",
|
|
455
|
-
precision: 3,
|
|
456
|
-
step: 0.1,
|
|
457
|
-
controls: !0,
|
|
458
|
-
"controls-position": "right"
|
|
459
|
-
}, null, 8, ["model-value"])
|
|
460
|
-
]),
|
|
461
|
-
c("div", Ae, [
|
|
462
|
-
o[10] || (o[10] = c("span", { class: "axis-label" }, "Z", -1)),
|
|
463
|
-
U(L, {
|
|
464
|
-
"model-value": r((B = (I = i.value) == null ? void 0 : I.position) == null ? void 0 : B.z),
|
|
465
|
-
onChange: o[2] || (o[2] = (R) => _(R, "z")),
|
|
466
|
-
size: "small",
|
|
467
|
-
class: "coord-input-compact",
|
|
468
|
-
precision: 3,
|
|
469
|
-
step: 0.1,
|
|
470
|
-
controls: !0,
|
|
471
|
-
"controls-position": "right"
|
|
472
|
-
}, null, 8, ["model-value"])
|
|
473
|
-
])
|
|
474
|
-
]),
|
|
475
|
-
U(w, null, {
|
|
476
|
-
default: F(() => [...o[11] || (o[11] = [
|
|
477
|
-
D("相对旋转", -1)
|
|
478
|
-
])]),
|
|
479
|
-
_: 1
|
|
480
|
-
}),
|
|
481
|
-
c("div", Ie, [
|
|
482
|
-
c("div", Be, [
|
|
483
|
-
o[12] || (o[12] = c("span", { class: "axis-label" }, "X°", -1)),
|
|
484
|
-
U(L, {
|
|
485
|
-
"model-value": f((W = (N = i.value) == null ? void 0 : N.rotation) == null ? void 0 : W.x),
|
|
486
|
-
onChange: o[3] || (o[3] = (R) => n(R, "x")),
|
|
487
|
-
size: "small",
|
|
488
|
-
class: "coord-input-compact",
|
|
489
|
-
precision: 3,
|
|
490
|
-
step: 0.1,
|
|
491
|
-
controls: !0,
|
|
492
|
-
"controls-position": "right"
|
|
493
|
-
}, null, 8, ["model-value"])
|
|
494
|
-
]),
|
|
495
|
-
c("div", Ne, [
|
|
496
|
-
o[13] || (o[13] = c("span", { class: "axis-label" }, "Y°", -1)),
|
|
497
|
-
U(L, {
|
|
498
|
-
"model-value": f((X = (q = i.value) == null ? void 0 : q.rotation) == null ? void 0 : X.y),
|
|
499
|
-
onChange: o[4] || (o[4] = (R) => n(R, "y")),
|
|
500
|
-
size: "small",
|
|
501
|
-
class: "coord-input-compact",
|
|
502
|
-
precision: 3,
|
|
503
|
-
step: 0.1,
|
|
504
|
-
controls: !0,
|
|
505
|
-
"controls-position": "right"
|
|
506
|
-
}, null, 8, ["model-value"])
|
|
507
|
-
]),
|
|
508
|
-
c("div", We, [
|
|
509
|
-
o[14] || (o[14] = c("span", { class: "axis-label" }, "Z°", -1)),
|
|
510
|
-
U(L, {
|
|
511
|
-
"model-value": f((Z = (Y = i.value) == null ? void 0 : Y.rotation) == null ? void 0 : Z.z),
|
|
512
|
-
onChange: o[5] || (o[5] = (R) => n(R, "z")),
|
|
513
|
-
size: "small",
|
|
514
|
-
class: "coord-input-compact",
|
|
515
|
-
precision: 3,
|
|
516
|
-
step: 0.1,
|
|
517
|
-
controls: !0,
|
|
518
|
-
"controls-position": "right"
|
|
519
|
-
}, null, 8, ["model-value"])
|
|
520
|
-
])
|
|
521
|
-
]),
|
|
522
|
-
U(w, null, {
|
|
523
|
-
default: F(() => [...o[15] || (o[15] = [
|
|
524
|
-
D("世界信息", -1)
|
|
525
|
-
])]),
|
|
526
|
-
_: 1
|
|
527
|
-
}),
|
|
528
|
-
c("div", qe, [
|
|
529
|
-
c("div", Xe, [
|
|
530
|
-
o[16] || (o[16] = c("span", { class: "coord-label" }, "世界位置:", -1)),
|
|
531
|
-
c("span", Ye, [
|
|
532
|
-
c("div", Ze, C(r((G = (K = i.value) == null ? void 0 : K.worldPosition) == null ? void 0 : G.x)) + ", ", 1),
|
|
533
|
-
c("div", Ke, C(r((Q = (H = i.value) == null ? void 0 : H.worldPosition) == null ? void 0 : Q.y)) + ", ", 1),
|
|
534
|
-
c("div", Ge, C(r((te = (ee = i.value) == null ? void 0 : ee.worldPosition) == null ? void 0 : te.z)), 1)
|
|
535
|
-
])
|
|
536
|
-
]),
|
|
537
|
-
c("div", He, [
|
|
538
|
-
o[17] || (o[17] = c("span", { class: "coord-label" }, "世界旋转:", -1)),
|
|
539
|
-
c("span", Qe, [
|
|
540
|
-
c("div", et, C(f((se = (oe = i.value) == null ? void 0 : oe.worldRotation) == null ? void 0 : se.x)) + "°, ", 1),
|
|
541
|
-
c("div", tt, C(f((le = (ie = i.value) == null ? void 0 : ie.worldRotation) == null ? void 0 : le.y)) + "°, ", 1),
|
|
542
|
-
c("div", ot, C(f((ne = (ae = i.value) == null ? void 0 : ae.worldRotation) == null ? void 0 : ne.z)) + "° ", 1)
|
|
543
|
-
])
|
|
544
|
-
])
|
|
545
|
-
])
|
|
546
|
-
]);
|
|
547
|
-
};
|
|
548
|
-
}
|
|
549
|
-
}), pt = /* @__PURE__ */ Ce(st, [["__scopeId", "data-v-00d48931"]]);
|
|
550
|
-
export {
|
|
551
|
-
vt as U,
|
|
552
|
-
pt as W,
|
|
553
|
-
dt as a,
|
|
554
|
-
mt as u
|
|
555
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1780017622530" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5240" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M223.425605 449.2744l161.632237 0 0 253.65714c0 16.954137 13.745049 30.699186 30.699186 30.699186 16.95516 0 30.699186-13.745049 30.699186-30.699186l0-284.356326c0-16.95516-13.744026-30.699186-30.699186-30.699186L291.035446 387.876028l217.23665-248.51605L733.039255 387.580293 607.104031 387.580293c-16.954137 0-30.699186 13.745049-30.699186 30.699186l0 284.652062c0 16.954137 13.745049 30.699186 30.699186 30.699186s30.699186-13.745049 30.699186-30.699186L637.803217 448.978664l164.448376 0c12.140505 0 23.140023-7.154957 28.063149-18.251689 4.922103-11.097756 2.841721-24.053835-5.307889-33.05279L530.62315 72.570829c-5.881964-6.495948-14.273075-10.134825-23.024389-10.091846-8.763594 0.076748-17.076934 3.895727-22.844288 10.494005L200.312188 398.371056c-7.92653 9.067516-9.818623 21.931498-4.839215 32.896224S211.383338 449.2744 223.425605 449.2744z" p-id="5241"></path><path d="M222.354204 829.113381l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186s-13.745049-30.699186-30.699186-30.699186L222.354204 767.715009c-16.954137 0-30.699186 13.745049-30.699186 30.699186S205.400067 829.113381 222.354204 829.113381z" p-id="5242"></path><path d="M804.086381 896.729361 222.354204 896.729361c-16.954137 0-30.699186 13.745049-30.699186 30.699186s13.745049 30.699186 30.699186 30.699186l581.732178 0c16.954137 0 30.699186-13.745049 30.699186-30.699186S821.041542 896.729361 804.086381 896.729361z" p-id="5243"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1780642425297" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2833" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M384 806.4l275.2-275.2-57.6-57.6-19.2 19.2c-12.8 12.8-38.4 12.8-51.2 0-12.8-12.8-12.8-38.4 0-51.2l19.2-19.2c25.6-25.6 64-25.6 89.6 0l64 70.4c25.6 25.6 25.6 64 0 89.6l-275.2 275.2c6.4 12.8 12.8 32 12.8 44.8 0 51.2-44.8 96-96 96S256 947.2 256 896s44.8-96 96-96c12.8 0 25.6 0 32 6.4z m275.2-563.2L384 518.4l57.6 57.6 19.2-19.2c12.8-12.8 38.4-12.8 51.2 0 12.8 12.8 12.8 38.4 0 51.2l-25.6 25.6c-25.6 25.6-64 25.6-89.6 0l-64-70.4c-25.6-25.6-25.6-64 0-89.6L614.4 192c-6.4-12.8-6.4-19.2-6.4-32 0-51.2 44.8-96 96-96s96 44.8 96 96S755.2 256 704 256c-19.2 0-32-6.4-44.8-12.8z m198.4 275.2l-128-128c-12.8-12.8-12.8-38.4 0-51.2 12.8-12.8 38.4-12.8 51.2 0l128 128c12.8 12.8 19.2 32 19.2 51.2 0 19.2-6.4 38.4-19.2 51.2l-128 128c-12.8 12.8-38.4 12.8-51.2 0-12.8-12.8-12.8-38.4 0-51.2l128-128z m-691.2 0l128 128c12.8 12.8 12.8 38.4 0 51.2-12.8 12.8-38.4 12.8-51.2 0l-128-128c-12.8-12.8-19.2-32-19.2-51.2 0-19.2 6.4-38.4 19.2-51.2l128-128c12.8-12.8 38.4-12.8 51.2 0 12.8 12.8 12.8 38.4 0 51.2l-128 128z" p-id="2834"></path></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1780017236338" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3877" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M96.1 575.7a32.2 32.1 0 1 0 64.4 0 32.2 32.1 0 1 0-64.4 0Z" fill="#4D4D4D" p-id="3878"></path><path d="M742.1 450.7l-269.5-2.1c-14.3-0.1-26 13.8-26 31s11.7 31.3 26 31.4l269.5 2.1c14.3 0.1 26-13.8 26-31s-11.7-31.3-26-31.4zM742.1 577.7l-269.5-2.1c-14.3-0.1-26 13.8-26 31s11.7 31.3 26 31.4l269.5 2.1c14.3 0.2 26-13.8 26-31s-11.7-31.3-26-31.4z" fill="#4D4D4D" p-id="3879"></path><path d="M736.1 63.9H417c-70.4 0-128 57.6-128 128h-64.9c-70.4 0-128 57.6-128 128v128c-0.1 17.7 14.4 32 32.2 32 17.8 0 32.2-14.4 32.2-32.1V320c0-35.2 28.8-64 64-64H289v447.8c0 70.4 57.6 128 128 128h255.1c-0.1 35.2-28.8 63.8-64 63.8H224.5c-35.2 0-64-28.8-64-64V703.5c0-17.7-14.4-32.1-32.2-32.1-17.8 0-32.3 14.4-32.3 32.1v128.3c0 70.4 57.6 128 128 128h384.1c70.4 0 128-57.6 128-128h65c70.4 0 128-57.6 128-128V255.9l-193-192z m0.1 63.4l127.7 128.3H800c-35.2 0-64-28.8-64-64v-64.3h0.2z m64 641H416.1c-35.2 0-64-28.8-64-64v-513c0-35.2 28.8-64 64-64H671V191c0 70.4 57.6 128 128 128h65.2v385.3c0 35.2-28.8 64-64 64z" p-id="3880"></path></svg>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|