ss-component-new 1.1.430 → 1.1.431
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/{array-CmTW1wXQ.js → array-CYHZDvJf.js} +1 -1
- package/dist/{array-BE8kxwbF.cjs → array-DoAPPPoU.cjs} +1 -1
- package/dist/{index-D5JRjtWD.cjs → index-0UsRG8Nl.cjs} +1 -1
- package/dist/{index-BWHERznY.js → index-4C972HsD.js} +4 -4
- package/dist/{index-B3sv--5l.js → index-B2WdBcN2.js} +9 -9
- package/dist/{index-BnlhM9YS.js → index-B9YbkQTN.js} +7 -7
- package/dist/{index-DQq3rsff.js → index-BGu6K09X.js} +5 -5
- package/dist/{index-Bb7GoIJp.cjs → index-BRWn9N9z.cjs} +1 -1
- package/dist/{index-DUPkZILz.cjs → index-BSlYS8L6.cjs} +1 -1
- package/dist/{index-N9Y_z5k_.cjs → index-BbH6qY5i.cjs} +1 -1
- package/dist/{index-DkiBGvqU.js → index-Bp2y9XSw.js} +1 -1
- package/dist/{index-CqaFuVhy.cjs → index-Bw61yR16.cjs} +1 -1
- package/dist/{index-uatggqnf.js → index-ByKePmLX.js} +5 -5
- package/dist/{index-CzfGrSpV.js → index-C1LJSord.js} +1 -1
- package/dist/{index-DxNyBY1w.cjs → index-CGf5Z3_H.cjs} +1 -1
- package/dist/{index-B_AUqKy_.cjs → index-CGgr5f-z.cjs} +1 -1
- package/dist/{index-D2aIlMCu.cjs → index-CKudLJJ1.cjs} +1 -1
- package/dist/{index-Di1ajNKI.js → index-CZyGWfHG.js} +4 -4
- package/dist/{index-D6iTzH06.cjs → index-CdgOQe0i.cjs} +1 -1
- package/dist/{index-BiuhwvlL.js → index-CesPDA_Y.js} +9 -9
- package/dist/{index-DygfoHkC.cjs → index-CjjVgYXa.cjs} +1 -1
- package/dist/{index-CsHPoVQL.cjs → index-Cn9Oohz3.cjs} +1 -1
- package/dist/{index-CMBrDaM5.js → index-Cnqn6WIO.js} +1 -1
- package/dist/{index-CONyMR2I.cjs → index-Con3aMMd.cjs} +1 -1
- package/dist/{index-BCFtIIf_.cjs → index-CrSg-82a.cjs} +1 -1
- package/dist/{index-eH2F0oMQ.js → index-Crmnjr2c.js} +3 -3
- package/dist/{index-DOm1fXtU.cjs → index-CsYxP0-F.cjs} +1 -1
- package/dist/{index-gXA0eS6O.cjs → index-CydkxCxM.cjs} +1 -1
- package/dist/{index-C-jjWrUl.cjs → index-D-nO19V3.cjs} +1 -1
- package/dist/{index-Clor83sA.cjs → index-D0mkoPSf.cjs} +1 -1
- package/dist/{index-DFilfUFX.js → index-D2P4LtZm.js} +3 -3
- package/dist/{index-D_j7_Hn_.cjs → index-DADAKv9O.cjs} +1 -1
- package/dist/{index-LoH8EwXA.js → index-DANnEh5L.js} +3 -3
- package/dist/{index-DDoTCY3C.js → index-DArGJfKY.js} +5 -5
- package/dist/{index-CYOSbBn4.js → index-DHH9k3Cd.js} +16 -16
- package/dist/{index-DxCiQhlC.js → index-DMEfwWgq.js} +2 -2
- package/dist/{index-Daqdy9e9.js → index-DkAnI-XG.js} +5 -5
- package/dist/{index-B8ONEgpW.cjs → index-DoNbKVmQ.cjs} +1 -1
- package/dist/{index-BZkQ29Tz.cjs → index-DpRiYeQY.cjs} +1 -1
- package/dist/{index-BwhVhBYj.js → index-Dqon02wb.js} +5 -5
- package/dist/{index-qEFkFDy8.js → index-DtDR26cB.js} +7 -7
- package/dist/{index-CjlMUufz.cjs → index-FqJpETte.cjs} +1 -1
- package/dist/{index-CrtuDvMe.js → index-LSoD1i3A.js} +1 -1
- package/dist/{index-EzZiR3ly.js → index-SdUkriaK.js} +4 -4
- package/dist/{index-Cqd4dRu7.js → index-SrhMzOCY.js} +4 -4
- package/dist/{index-pvjM6t0d.js → index-X2ZWiRcv.js} +6 -6
- package/dist/{index-DIxSv5u4.cjs → index-b6aBSRMl.cjs} +1 -1
- package/dist/{index-CNpklHzK.cjs → index-dlfEnHmI.cjs} +1 -1
- package/dist/{index-DXtXtduX.js → index-fvJb5bN3.js} +4 -4
- package/dist/{index-CSj1osh5.js → index-lH7K2Ae4.js} +6 -6
- package/dist/{index-PdwN7EaB.cjs → index-qYLxQkHk.cjs} +1 -1
- package/dist/{index-o5dof3CA.cjs → index-sIPyCyQi.cjs} +1 -1
- package/dist/{index-DeXnZk4X.js → index-wFIaJ63i.js} +6 -6
- package/dist/{index-D3ah-UXX.cjs → index-xm6KYCoF.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-YlUeUQJ4.js → index.vue_vue_type_script_setup_true_lang-BWUFgZh-.js} +3 -3
- package/dist/{index.vue_vue_type_script_setup_true_lang-EaaJleWP.cjs → index.vue_vue_type_script_setup_true_lang-BZ7tchOp.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CClJxB6F.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BI2vSErk.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bw_ydbnW.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CZtlnVW5.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B2duMdZT.cjs → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-B-rWYebv.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-CcYfjXoA.js → index.vue_vue_type_style_index_0_scoped_ed9fe0f5_lang-uU-cctzF.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-TQjM60R4.js → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-DnITgFWi.js} +15 -15
- package/dist/{index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-Z8fBYrL9.cjs → index.vue_vue_type_style_index_0_scoped_f69cf49c_lang-DozWSlZt.cjs} +1 -1
- package/dist/{login-BMAi9yYX.cjs → login-C7DmHc80.cjs} +1 -1
- package/dist/{login-B520hsEu.js → login-CJCoAoN1.js} +1 -1
- package/dist/{main-Dpbg9Pxc.js → main-D4Q91qkP.js} +6 -6
- package/dist/{main-yzKa6bxy.cjs → main-iJ0nSePL.cjs} +1 -1
- package/dist/{menu-qAL8FiSW.js → menu-BuloZZcj.js} +1 -1
- package/dist/{menu-BAEUpxbd.cjs → menu-n3qjG2rK.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/dist/threeModel-BiEaleFf.cjs +1 -0
- package/dist/{threeModel-ClGUp5fG.js → threeModel-apAPzYrf.js} +566 -587
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-DYhzYEGg.js → threeModel.vue_vue_type_style_index_0_scoped_506601a0_lang-BKIbj4w0.js} +2 -2
- package/dist/{threeModel.vue_vue_type_style_index_0_scoped_3e87dec6_lang-BOT5Tivd.cjs → threeModel.vue_vue_type_style_index_0_scoped_506601a0_lang-CaLVdXus.cjs} +1 -1
- package/package.json +1 -1
- package/dist/threeModel-CxKWxMlL.cjs +0 -1
|
@@ -1,86 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as
|
|
3
|
-
import { _ as
|
|
4
|
-
const
|
|
5
|
-
__name: "index",
|
|
6
|
-
props: {
|
|
7
|
-
treeData: Array,
|
|
8
|
-
expand: {
|
|
9
|
-
type: Boolean,
|
|
10
|
-
default: !1
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
emits: ["nodeClick"],
|
|
14
|
-
setup(o, { emit: t }) {
|
|
15
|
-
const e = t, i = o, l = {
|
|
16
|
-
children: "children",
|
|
17
|
-
label: "label"
|
|
18
|
-
}, u = (s) => {
|
|
19
|
-
e("nodeClick", s);
|
|
20
|
-
};
|
|
21
|
-
return (s, a) => {
|
|
22
|
-
const f = Rt("el-tree");
|
|
23
|
-
return z(), j("div", de, [
|
|
24
|
-
B(f, {
|
|
25
|
-
data: i == null ? void 0 : i.treeData,
|
|
26
|
-
props: l,
|
|
27
|
-
"default-expand-all": o.expand,
|
|
28
|
-
onNodeClick: u
|
|
29
|
-
}, null, 8, ["data", "default-expand-all"])
|
|
30
|
-
]);
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
}), ce = /* @__PURE__ */ Q(_e, [["__scopeId", "data-v-b4bd4658"]]), Pe = { class: "panel-content" }, Je = /* @__PURE__ */ wt({
|
|
34
|
-
__name: "robotMenu",
|
|
35
|
-
props: {
|
|
36
|
-
model: Object
|
|
37
|
-
},
|
|
38
|
-
setup(o) {
|
|
39
|
-
const t = o, e = D([]), i = (s, a = 0) => {
|
|
40
|
-
const f = [];
|
|
41
|
-
return Array.isArray(s) && (s == null ? void 0 : s.length) > 0 && s.forEach((h) => {
|
|
42
|
-
if (!(h != null && h.isMesh) && ((h == null ? void 0 : h.type) === "URDFJoint" || (h == null ? void 0 : h.type) === "URDFLink")) {
|
|
43
|
-
const x = {
|
|
44
|
-
name: h == null ? void 0 : h.name,
|
|
45
|
-
label: h == null ? void 0 : h.name,
|
|
46
|
-
show: !0,
|
|
47
|
-
level: a + 1,
|
|
48
|
-
isPenultimate: !1,
|
|
49
|
-
type: h == null ? void 0 : h.type,
|
|
50
|
-
id: h == null ? void 0 : h.id,
|
|
51
|
-
limit: (h == null ? void 0 : h.limit) ?? "",
|
|
52
|
-
children: i(h == null ? void 0 : h.children, a + 1),
|
|
53
|
-
path: h == null ? void 0 : h.name
|
|
54
|
-
};
|
|
55
|
-
f.push(x);
|
|
56
|
-
}
|
|
57
|
-
}), f;
|
|
58
|
-
}, l = (s) => s ? [{
|
|
59
|
-
name: s == null ? void 0 : s.name,
|
|
60
|
-
label: s == null ? void 0 : s.name,
|
|
61
|
-
show: !0,
|
|
62
|
-
level: 1,
|
|
63
|
-
isPenultimate: !1,
|
|
64
|
-
type: s == null ? void 0 : s.type,
|
|
65
|
-
id: s == null ? void 0 : s.id,
|
|
66
|
-
limit: (s == null ? void 0 : s.limit) ?? "",
|
|
67
|
-
children: i(s == null ? void 0 : s.children, 1),
|
|
68
|
-
path: s == null ? void 0 : s.name
|
|
69
|
-
}] : [], u = Ht(() => t != null && t.model ? l(t.model) : []);
|
|
70
|
-
return Bt(
|
|
71
|
-
u,
|
|
72
|
-
(s) => {
|
|
73
|
-
e.value = JSON.parse(JSON.stringify(s));
|
|
74
|
-
},
|
|
75
|
-
{ immediate: !0 }
|
|
76
|
-
), (s, a) => (z(), j("div", Pe, [
|
|
77
|
-
B(ce, {
|
|
78
|
-
treeData: e.value,
|
|
79
|
-
expand: !0
|
|
80
|
-
}, null, 8, ["treeData"])
|
|
81
|
-
]));
|
|
82
|
-
}
|
|
83
|
-
}), ue = /* @__PURE__ */ Q(Je, [["__scopeId", "data-v-b1177706"]]), Mt = { type: "change" }, dt = { type: "start" }, xt = { type: "end" }, ot = new Vt(), vt = new nt(), pe = Math.cos(70 * Zt.DEG2RAD), S = new y(), H = 2 * Math.PI, M = {
|
|
1
|
+
import { ref as x, computed as Lt, watch as wt, resolveComponent as Rt, createElementBlock as F, openBlock as j, createVNode as D, onMounted as Bt, onUnmounted as Ht, Fragment as ut, createElementVNode as u, toDisplayString as Y, renderList as jt, createCommentVNode as q, normalizeClass as pt, normalizeStyle as It, nextTick as Ft, onBeforeUnmount as Nt, withDirectives as X, unref as O, withCtx as mt, createBlock as Gt, isRef as tt, vModelRadio as et, vShow as ft } from "vue";
|
|
2
|
+
import { C as Ut, V as y, M as K, T as W, Q as gt, S as yt, a as U, R as Yt, P as ot, b as Vt, B as at, c as Zt, d as Kt, e as $t, W as Xt, f as Wt, A as qt, g as Qt, X as te, G as ee, h as nt, i as ie, j as Et, k as oe, D as rt, H as ne, l as bt, m as ae, n as se, E as lt, _ as re, o as le } from "./threeModel.vue_vue_type_style_index_0_scoped_506601a0_lang-BKIbj4w0.js";
|
|
3
|
+
import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
const Mt = { type: "change" }, dt = { type: "start" }, Tt = { type: "end" }, it = new Yt(), vt = new ot(), he = Math.cos(70 * Vt.DEG2RAD), k = new y(), H = 2 * Math.PI, w = {
|
|
84
5
|
NONE: -1,
|
|
85
6
|
ROTATE: 0,
|
|
86
7
|
DOLLY: 1,
|
|
@@ -90,7 +11,7 @@ const de = { class: "tree-container" }, _e = /* @__PURE__ */ wt({
|
|
|
90
11
|
TOUCH_DOLLY_PAN: 5,
|
|
91
12
|
TOUCH_DOLLY_ROTATE: 6
|
|
92
13
|
}, ht = 1e-6;
|
|
93
|
-
class
|
|
14
|
+
class de extends Ut {
|
|
94
15
|
/**
|
|
95
16
|
* Constructs a new controls instance.
|
|
96
17
|
*
|
|
@@ -98,7 +19,7 @@ class me extends Yt {
|
|
|
98
19
|
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
99
20
|
*/
|
|
100
21
|
constructor(t, e = null) {
|
|
101
|
-
super(t, e), this.state =
|
|
22
|
+
super(t, e), this.state = w.NONE, this.target = new y(), this.cursor = new y(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: K.ROTATE, MIDDLE: K.DOLLY, RIGHT: K.PAN }, this.touches = { ONE: W.ROTATE, TWO: W.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new y(), this._lastQuaternion = new gt(), this._lastTargetPosition = new y(), this._quat = new gt().setFromUnitVectors(t.up, new y(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new yt(), this._sphericalDelta = new yt(), this._scale = 1, this._panOffset = new y(), this._rotateStart = new U(), this._rotateEnd = new U(), this._rotateDelta = new U(), this._panStart = new U(), this._panEnd = new U(), this._panDelta = new U(), this._dollyStart = new U(), this._dollyEnd = new U(), this._dollyDelta = new U(), this._dollyDirection = new y(), this._mouse = new U(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ce.bind(this), this._onPointerDown = _e.bind(this), this._onPointerUp = Pe.bind(this), this._onContextMenu = ge.bind(this), this._onMouseWheel = pe.bind(this), this._onKeyDown = me.bind(this), this._onTouchStart = Ge.bind(this), this._onTouchMove = fe.bind(this), this._onMouseDown = Je.bind(this), this._onMouseMove = ue.bind(this), this._interceptControlDown = ye.bind(this), this._interceptControlUp = be.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
102
23
|
}
|
|
103
24
|
connect(t) {
|
|
104
25
|
super.connect(t), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
|
|
@@ -159,42 +80,42 @@ class me extends Yt {
|
|
|
159
80
|
* was called, or the initial state.
|
|
160
81
|
*/
|
|
161
82
|
reset() {
|
|
162
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Mt), this.update(), this.state =
|
|
83
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Mt), this.update(), this.state = w.NONE;
|
|
163
84
|
}
|
|
164
85
|
update(t = null) {
|
|
165
86
|
const e = this.object.position;
|
|
166
|
-
|
|
167
|
-
let i = this.minAzimuthAngle,
|
|
168
|
-
isFinite(i) && isFinite(
|
|
169
|
-
let
|
|
87
|
+
k.copy(e).sub(this.target), k.applyQuaternion(this._quat), this._spherical.setFromVector3(k), this.autoRotate && this.state === w.NONE && this._rotateLeft(this._getAutoRotationAngle(t)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
88
|
+
let i = this.minAzimuthAngle, r = this.maxAzimuthAngle;
|
|
89
|
+
isFinite(i) && isFinite(r) && (i < -Math.PI ? i += H : i > Math.PI && (i -= H), r < -Math.PI ? r += H : r > Math.PI && (r -= H), i <= r ? this._spherical.theta = Math.max(i, Math.min(r, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + r) / 2 ? Math.max(i, this._spherical.theta) : Math.min(r, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
90
|
+
let J = !1;
|
|
170
91
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
171
92
|
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
172
93
|
else {
|
|
173
|
-
const
|
|
174
|
-
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale),
|
|
94
|
+
const f = this._spherical.radius;
|
|
95
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), J = f != this._spherical.radius;
|
|
175
96
|
}
|
|
176
|
-
if (
|
|
177
|
-
let
|
|
97
|
+
if (k.setFromSpherical(this._spherical), k.applyQuaternion(this._quatInverse), e.copy(this.target).add(k), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
|
|
98
|
+
let f = null;
|
|
178
99
|
if (this.object.isPerspectiveCamera) {
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
const
|
|
182
|
-
this.object.position.addScaledVector(this._dollyDirection,
|
|
100
|
+
const s = k.length();
|
|
101
|
+
f = this._clampDistance(s * this._scale);
|
|
102
|
+
const M = s - f;
|
|
103
|
+
this.object.position.addScaledVector(this._dollyDirection, M), this.object.updateMatrixWorld(), J = !!M;
|
|
183
104
|
} else if (this.object.isOrthographicCamera) {
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
const
|
|
187
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(),
|
|
188
|
-
const
|
|
189
|
-
|
|
105
|
+
const s = new y(this._mouse.x, this._mouse.y, 0);
|
|
106
|
+
s.unproject(this.object);
|
|
107
|
+
const M = this.object.zoom;
|
|
108
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), J = M !== this.object.zoom;
|
|
109
|
+
const v = new y(this._mouse.x, this._mouse.y, 0);
|
|
110
|
+
v.unproject(this.object), this.object.position.sub(v).add(s), this.object.updateMatrixWorld(), f = k.length();
|
|
190
111
|
} else
|
|
191
112
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
192
|
-
|
|
113
|
+
f !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(f).add(this.object.position) : (it.origin.copy(this.object.position), it.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(it.direction)) < he ? this.object.lookAt(this.target) : (vt.setFromNormalAndCoplanarPoint(this.object.up, this.target), it.intersectPlane(vt, this.target))));
|
|
193
114
|
} else if (this.object.isOrthographicCamera) {
|
|
194
|
-
const
|
|
195
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)),
|
|
115
|
+
const f = this.object.zoom;
|
|
116
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), f !== this.object.zoom && (this.object.updateProjectionMatrix(), J = !0);
|
|
196
117
|
}
|
|
197
|
-
return this._scale = 1, this._performCursorZoom = !1,
|
|
118
|
+
return this._scale = 1, this._performCursorZoom = !1, J || this._lastPosition.distanceToSquared(this.object.position) > ht || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ht || this._lastTargetPosition.distanceToSquared(this.target) > ht ? (this.dispatchEvent(Mt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
198
119
|
}
|
|
199
120
|
_getAutoRotationAngle(t) {
|
|
200
121
|
return t !== null ? H / 60 * this.autoRotateSpeed * t : H / 60 / 60 * this.autoRotateSpeed;
|
|
@@ -210,19 +131,19 @@ class me extends Yt {
|
|
|
210
131
|
this._sphericalDelta.phi -= t;
|
|
211
132
|
}
|
|
212
133
|
_panLeft(t, e) {
|
|
213
|
-
|
|
134
|
+
k.setFromMatrixColumn(e, 0), k.multiplyScalar(-t), this._panOffset.add(k);
|
|
214
135
|
}
|
|
215
136
|
_panUp(t, e) {
|
|
216
|
-
this.screenSpacePanning === !0 ?
|
|
137
|
+
this.screenSpacePanning === !0 ? k.setFromMatrixColumn(e, 1) : (k.setFromMatrixColumn(e, 0), k.crossVectors(this.object.up, k)), k.multiplyScalar(t), this._panOffset.add(k);
|
|
217
138
|
}
|
|
218
139
|
// deltaX and deltaY are in pixels; right and down are positive
|
|
219
140
|
_pan(t, e) {
|
|
220
141
|
const i = this.domElement;
|
|
221
142
|
if (this.object.isPerspectiveCamera) {
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
let
|
|
225
|
-
|
|
143
|
+
const r = this.object.position;
|
|
144
|
+
k.copy(r).sub(this.target);
|
|
145
|
+
let J = k.length();
|
|
146
|
+
J *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * J / i.clientHeight, this.object.matrix), this._panUp(2 * e * J / i.clientHeight, this.object.matrix);
|
|
226
147
|
} else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / i.clientWidth, this.object.matrix), this._panUp(e * (this.object.top - this.object.bottom) / this.object.zoom / i.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
|
|
227
148
|
}
|
|
228
149
|
_dollyOut(t) {
|
|
@@ -235,8 +156,8 @@ class me extends Yt {
|
|
|
235
156
|
if (!this.zoomToCursor)
|
|
236
157
|
return;
|
|
237
158
|
this._performCursorZoom = !0;
|
|
238
|
-
const i = this.domElement.getBoundingClientRect(),
|
|
239
|
-
this._mouse.x =
|
|
159
|
+
const i = this.domElement.getBoundingClientRect(), r = t - i.left, J = e - i.top, f = i.width, s = i.height;
|
|
160
|
+
this._mouse.x = r / f * 2 - 1, this._mouse.y = -(J / s) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
|
|
240
161
|
}
|
|
241
162
|
_clampDistance(t) {
|
|
242
163
|
return Math.max(this.minDistance, Math.min(this.maxDistance, t));
|
|
@@ -289,21 +210,21 @@ class me extends Yt {
|
|
|
289
210
|
if (this._pointers.length === 1)
|
|
290
211
|
this._rotateStart.set(t.pageX, t.pageY);
|
|
291
212
|
else {
|
|
292
|
-
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x),
|
|
293
|
-
this._rotateStart.set(i,
|
|
213
|
+
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x), r = 0.5 * (t.pageY + e.y);
|
|
214
|
+
this._rotateStart.set(i, r);
|
|
294
215
|
}
|
|
295
216
|
}
|
|
296
217
|
_handleTouchStartPan(t) {
|
|
297
218
|
if (this._pointers.length === 1)
|
|
298
219
|
this._panStart.set(t.pageX, t.pageY);
|
|
299
220
|
else {
|
|
300
|
-
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x),
|
|
301
|
-
this._panStart.set(i,
|
|
221
|
+
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x), r = 0.5 * (t.pageY + e.y);
|
|
222
|
+
this._panStart.set(i, r);
|
|
302
223
|
}
|
|
303
224
|
}
|
|
304
225
|
_handleTouchStartDolly(t) {
|
|
305
|
-
const e = this._getSecondPointerPosition(t), i = t.pageX - e.x,
|
|
306
|
-
this._dollyStart.set(0,
|
|
226
|
+
const e = this._getSecondPointerPosition(t), i = t.pageX - e.x, r = t.pageY - e.y, J = Math.sqrt(i * i + r * r);
|
|
227
|
+
this._dollyStart.set(0, J);
|
|
307
228
|
}
|
|
308
229
|
_handleTouchStartDollyPan(t) {
|
|
309
230
|
this.enableZoom && this._handleTouchStartDolly(t), this.enablePan && this._handleTouchStartPan(t);
|
|
@@ -315,8 +236,8 @@ class me extends Yt {
|
|
|
315
236
|
if (this._pointers.length == 1)
|
|
316
237
|
this._rotateEnd.set(t.pageX, t.pageY);
|
|
317
238
|
else {
|
|
318
|
-
const i = this._getSecondPointerPosition(t),
|
|
319
|
-
this._rotateEnd.set(
|
|
239
|
+
const i = this._getSecondPointerPosition(t), r = 0.5 * (t.pageX + i.x), J = 0.5 * (t.pageY + i.y);
|
|
240
|
+
this._rotateEnd.set(r, J);
|
|
320
241
|
}
|
|
321
242
|
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
322
243
|
const e = this.domElement;
|
|
@@ -326,16 +247,16 @@ class me extends Yt {
|
|
|
326
247
|
if (this._pointers.length === 1)
|
|
327
248
|
this._panEnd.set(t.pageX, t.pageY);
|
|
328
249
|
else {
|
|
329
|
-
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x),
|
|
330
|
-
this._panEnd.set(i,
|
|
250
|
+
const e = this._getSecondPointerPosition(t), i = 0.5 * (t.pageX + e.x), r = 0.5 * (t.pageY + e.y);
|
|
251
|
+
this._panEnd.set(i, r);
|
|
331
252
|
}
|
|
332
253
|
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
|
|
333
254
|
}
|
|
334
255
|
_handleTouchMoveDolly(t) {
|
|
335
|
-
const e = this._getSecondPointerPosition(t), i = t.pageX - e.x,
|
|
336
|
-
this._dollyEnd.set(0,
|
|
337
|
-
const
|
|
338
|
-
this._updateZoomParameters(
|
|
256
|
+
const e = this._getSecondPointerPosition(t), i = t.pageX - e.x, r = t.pageY - e.y, J = Math.sqrt(i * i + r * r);
|
|
257
|
+
this._dollyEnd.set(0, J), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
|
|
258
|
+
const f = (t.pageX + e.x) * 0.5, s = (t.pageY + e.y) * 0.5;
|
|
259
|
+
this._updateZoomParameters(f, s);
|
|
339
260
|
}
|
|
340
261
|
_handleTouchMoveDollyPan(t) {
|
|
341
262
|
this.enableZoom && this._handleTouchMoveDolly(t), this.enablePan && this._handleTouchMovePan(t);
|
|
@@ -386,16 +307,16 @@ class me extends Yt {
|
|
|
386
307
|
return t.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
|
387
308
|
}
|
|
388
309
|
}
|
|
389
|
-
function
|
|
310
|
+
function _e(o) {
|
|
390
311
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(o.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(o) && (this._addPointer(o), o.pointerType === "touch" ? this._onTouchStart(o) : this._onMouseDown(o)));
|
|
391
312
|
}
|
|
392
|
-
function
|
|
313
|
+
function ce(o) {
|
|
393
314
|
this.enabled !== !1 && (o.pointerType === "touch" ? this._onTouchMove(o) : this._onMouseMove(o));
|
|
394
315
|
}
|
|
395
|
-
function
|
|
316
|
+
function Pe(o) {
|
|
396
317
|
switch (this._removePointer(o), this._pointers.length) {
|
|
397
318
|
case 0:
|
|
398
|
-
this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
319
|
+
this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tt), this.state = w.NONE;
|
|
399
320
|
break;
|
|
400
321
|
case 1:
|
|
401
322
|
const t = this._pointers[0], e = this._pointerPositions[t];
|
|
@@ -403,7 +324,7 @@ function ge(o) {
|
|
|
403
324
|
break;
|
|
404
325
|
}
|
|
405
326
|
}
|
|
406
|
-
function
|
|
327
|
+
function Je(o) {
|
|
407
328
|
let t;
|
|
408
329
|
switch (o.button) {
|
|
409
330
|
case 0:
|
|
@@ -419,136 +340,136 @@ function ye(o) {
|
|
|
419
340
|
t = -1;
|
|
420
341
|
}
|
|
421
342
|
switch (t) {
|
|
422
|
-
case
|
|
343
|
+
case K.DOLLY:
|
|
423
344
|
if (this.enableZoom === !1) return;
|
|
424
|
-
this._handleMouseDownDolly(o), this.state =
|
|
345
|
+
this._handleMouseDownDolly(o), this.state = w.DOLLY;
|
|
425
346
|
break;
|
|
426
|
-
case
|
|
347
|
+
case K.ROTATE:
|
|
427
348
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
428
349
|
if (this.enablePan === !1) return;
|
|
429
|
-
this._handleMouseDownPan(o), this.state =
|
|
350
|
+
this._handleMouseDownPan(o), this.state = w.PAN;
|
|
430
351
|
} else {
|
|
431
352
|
if (this.enableRotate === !1) return;
|
|
432
|
-
this._handleMouseDownRotate(o), this.state =
|
|
353
|
+
this._handleMouseDownRotate(o), this.state = w.ROTATE;
|
|
433
354
|
}
|
|
434
355
|
break;
|
|
435
|
-
case
|
|
356
|
+
case K.PAN:
|
|
436
357
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
437
358
|
if (this.enableRotate === !1) return;
|
|
438
|
-
this._handleMouseDownRotate(o), this.state =
|
|
359
|
+
this._handleMouseDownRotate(o), this.state = w.ROTATE;
|
|
439
360
|
} else {
|
|
440
361
|
if (this.enablePan === !1) return;
|
|
441
|
-
this._handleMouseDownPan(o), this.state =
|
|
362
|
+
this._handleMouseDownPan(o), this.state = w.PAN;
|
|
442
363
|
}
|
|
443
364
|
break;
|
|
444
365
|
default:
|
|
445
|
-
this.state =
|
|
366
|
+
this.state = w.NONE;
|
|
446
367
|
}
|
|
447
|
-
this.state !==
|
|
368
|
+
this.state !== w.NONE && this.dispatchEvent(dt);
|
|
448
369
|
}
|
|
449
|
-
function
|
|
370
|
+
function ue(o) {
|
|
450
371
|
switch (this.state) {
|
|
451
|
-
case
|
|
372
|
+
case w.ROTATE:
|
|
452
373
|
if (this.enableRotate === !1) return;
|
|
453
374
|
this._handleMouseMoveRotate(o);
|
|
454
375
|
break;
|
|
455
|
-
case
|
|
376
|
+
case w.DOLLY:
|
|
456
377
|
if (this.enableZoom === !1) return;
|
|
457
378
|
this._handleMouseMoveDolly(o);
|
|
458
379
|
break;
|
|
459
|
-
case
|
|
380
|
+
case w.PAN:
|
|
460
381
|
if (this.enablePan === !1) return;
|
|
461
382
|
this._handleMouseMovePan(o);
|
|
462
383
|
break;
|
|
463
384
|
}
|
|
464
385
|
}
|
|
465
|
-
function
|
|
466
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
386
|
+
function pe(o) {
|
|
387
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== w.NONE || (o.preventDefault(), this.dispatchEvent(dt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Tt));
|
|
467
388
|
}
|
|
468
|
-
function
|
|
389
|
+
function me(o) {
|
|
469
390
|
this.enabled !== !1 && this._handleKeyDown(o);
|
|
470
391
|
}
|
|
471
|
-
function
|
|
392
|
+
function Ge(o) {
|
|
472
393
|
switch (this._trackPointer(o), this._pointers.length) {
|
|
473
394
|
case 1:
|
|
474
395
|
switch (this.touches.ONE) {
|
|
475
396
|
case W.ROTATE:
|
|
476
397
|
if (this.enableRotate === !1) return;
|
|
477
|
-
this._handleTouchStartRotate(o), this.state =
|
|
398
|
+
this._handleTouchStartRotate(o), this.state = w.TOUCH_ROTATE;
|
|
478
399
|
break;
|
|
479
400
|
case W.PAN:
|
|
480
401
|
if (this.enablePan === !1) return;
|
|
481
|
-
this._handleTouchStartPan(o), this.state =
|
|
402
|
+
this._handleTouchStartPan(o), this.state = w.TOUCH_PAN;
|
|
482
403
|
break;
|
|
483
404
|
default:
|
|
484
|
-
this.state =
|
|
405
|
+
this.state = w.NONE;
|
|
485
406
|
}
|
|
486
407
|
break;
|
|
487
408
|
case 2:
|
|
488
409
|
switch (this.touches.TWO) {
|
|
489
410
|
case W.DOLLY_PAN:
|
|
490
411
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
491
|
-
this._handleTouchStartDollyPan(o), this.state =
|
|
412
|
+
this._handleTouchStartDollyPan(o), this.state = w.TOUCH_DOLLY_PAN;
|
|
492
413
|
break;
|
|
493
414
|
case W.DOLLY_ROTATE:
|
|
494
415
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
495
|
-
this._handleTouchStartDollyRotate(o), this.state =
|
|
416
|
+
this._handleTouchStartDollyRotate(o), this.state = w.TOUCH_DOLLY_ROTATE;
|
|
496
417
|
break;
|
|
497
418
|
default:
|
|
498
|
-
this.state =
|
|
419
|
+
this.state = w.NONE;
|
|
499
420
|
}
|
|
500
421
|
break;
|
|
501
422
|
default:
|
|
502
|
-
this.state =
|
|
423
|
+
this.state = w.NONE;
|
|
503
424
|
}
|
|
504
|
-
this.state !==
|
|
425
|
+
this.state !== w.NONE && this.dispatchEvent(dt);
|
|
505
426
|
}
|
|
506
|
-
function
|
|
427
|
+
function fe(o) {
|
|
507
428
|
switch (this._trackPointer(o), this.state) {
|
|
508
|
-
case
|
|
429
|
+
case w.TOUCH_ROTATE:
|
|
509
430
|
if (this.enableRotate === !1) return;
|
|
510
431
|
this._handleTouchMoveRotate(o), this.update();
|
|
511
432
|
break;
|
|
512
|
-
case
|
|
433
|
+
case w.TOUCH_PAN:
|
|
513
434
|
if (this.enablePan === !1) return;
|
|
514
435
|
this._handleTouchMovePan(o), this.update();
|
|
515
436
|
break;
|
|
516
|
-
case
|
|
437
|
+
case w.TOUCH_DOLLY_PAN:
|
|
517
438
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
518
439
|
this._handleTouchMoveDollyPan(o), this.update();
|
|
519
440
|
break;
|
|
520
|
-
case
|
|
441
|
+
case w.TOUCH_DOLLY_ROTATE:
|
|
521
442
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
522
443
|
this._handleTouchMoveDollyRotate(o), this.update();
|
|
523
444
|
break;
|
|
524
445
|
default:
|
|
525
|
-
this.state =
|
|
446
|
+
this.state = w.NONE;
|
|
526
447
|
}
|
|
527
448
|
}
|
|
528
|
-
function
|
|
449
|
+
function ge(o) {
|
|
529
450
|
this.enabled !== !1 && o.preventDefault();
|
|
530
451
|
}
|
|
531
|
-
function
|
|
452
|
+
function ye(o) {
|
|
532
453
|
o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
533
454
|
}
|
|
534
|
-
function
|
|
455
|
+
function be(o) {
|
|
535
456
|
o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
536
457
|
}
|
|
537
|
-
function
|
|
538
|
-
let t = null, e = null, i = null,
|
|
539
|
-
const
|
|
458
|
+
function Me(o) {
|
|
459
|
+
let t = null, e = null, i = null, r = null, J = null, f = null, s = null, M = null;
|
|
460
|
+
const v = x([]), _ = x(new y()), C = x(new y()), S = () => {
|
|
540
461
|
if (!o.value) return;
|
|
541
|
-
t = new
|
|
542
|
-
const
|
|
543
|
-
e = new
|
|
462
|
+
t = new Zt(), t.background = new Kt(15790320);
|
|
463
|
+
const a = o.value;
|
|
464
|
+
e = new $t(75, a.clientWidth / a.clientHeight, 0.1, 1e4), e.position.set(8, -8, 6), e.up.set(0, 0, 1), e.lookAt(0, 0, 0), i = new Xt({
|
|
544
465
|
antialias: !0,
|
|
545
466
|
alpha: !0
|
|
546
|
-
}), i.setSize(
|
|
547
|
-
LEFT:
|
|
548
|
-
MIDDLE:
|
|
467
|
+
}), i.setSize(a.clientWidth, a.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = Wt, i.toneMapping = qt, i.toneMappingExposure = 1, i.outputColorSpace = Qt, a.appendChild(i.domElement), r = new de(e, i.domElement), r.enableDamping = !0, r.dampingFactor = 0.05, r.mouseButtons = {
|
|
468
|
+
LEFT: K.ROTATE,
|
|
469
|
+
MIDDLE: K.PAN,
|
|
549
470
|
RIGHT: null
|
|
550
|
-
},
|
|
551
|
-
container:
|
|
471
|
+
}, r.panSpeed = 0.7, J = new te(e, i, {
|
|
472
|
+
container: a,
|
|
552
473
|
type: "cube",
|
|
553
474
|
placement: "top-right",
|
|
554
475
|
offset: {
|
|
@@ -577,49 +498,49 @@ function xe(o) {
|
|
|
577
498
|
back: {
|
|
578
499
|
label: "Bottom"
|
|
579
500
|
}
|
|
580
|
-
}),
|
|
581
|
-
},
|
|
582
|
-
|
|
583
|
-
const b = Math.min(Math.max(Math.floor(
|
|
584
|
-
|
|
585
|
-
const
|
|
501
|
+
}), J.attachControls(r), R(), l();
|
|
502
|
+
}, p = (a, n) => {
|
|
503
|
+
s && (t.remove(s), s.dispose()), M && (t.remove(M), M.geometry.dispose(), M.material.dispose());
|
|
504
|
+
const b = Math.min(Math.max(Math.floor(a / 20), 30), 40);
|
|
505
|
+
s = new ee(a, b, 13421772, 14540253), s.rotateX(Math.PI / 2), s.position.copy(n), t.add(s);
|
|
506
|
+
const E = new nt(a, a), L = new ie({
|
|
586
507
|
opacity: 0.3,
|
|
587
508
|
// 阴影透明度
|
|
588
509
|
color: 0
|
|
589
510
|
});
|
|
590
|
-
|
|
591
|
-
},
|
|
592
|
-
if (
|
|
511
|
+
M = new Et(E, L), M.position.copy(n), M.position.z -= 0.01, M.receiveShadow = !0, t.add(M);
|
|
512
|
+
}, I = () => {
|
|
513
|
+
if (v.value.length === 0)
|
|
593
514
|
return;
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
|
|
515
|
+
const a = new at();
|
|
516
|
+
v.value.forEach((Z) => {
|
|
517
|
+
a.expandByObject(Z);
|
|
597
518
|
});
|
|
598
|
-
const n =
|
|
519
|
+
const n = a.getSize(new y()), b = a.getCenter(new y()), E = Math.max(n.x, n.y, n.z), L = Math.max(E * 8, 50), N = new y(
|
|
599
520
|
b.x,
|
|
600
521
|
b.y,
|
|
601
|
-
|
|
522
|
+
a.min.z
|
|
602
523
|
// 模型的最底部
|
|
603
524
|
);
|
|
604
|
-
|
|
605
|
-
},
|
|
606
|
-
const
|
|
607
|
-
t.add(
|
|
525
|
+
p(L, N);
|
|
526
|
+
}, R = () => {
|
|
527
|
+
const a = new oe(4210752, 0.6);
|
|
528
|
+
t.add(a);
|
|
608
529
|
const n = new rt(16777215, 2);
|
|
609
530
|
n.position.set(10, 10, 8), n.castShadow = !0, n.shadow.mapSize.width = 4096, n.shadow.mapSize.height = 4096, n.shadow.camera.near = 0.5, n.shadow.camera.far = 50, n.shadow.camera.left = -50, n.shadow.camera.right = 50, n.shadow.camera.top = 50, n.shadow.camera.bottom = -50, t.add(n);
|
|
610
531
|
const b = new rt(16777215, 0.8);
|
|
611
532
|
b.position.set(-8, -8, 6), t.add(b);
|
|
612
|
-
const
|
|
613
|
-
|
|
614
|
-
const L = new
|
|
533
|
+
const E = new rt(16777215, 0.6);
|
|
534
|
+
E.position.set(0, -15, 2), t.add(E);
|
|
535
|
+
const L = new ne(16777215, 4473924, 0.8);
|
|
615
536
|
t.add(L);
|
|
616
537
|
const N = new bt(16777215, 1, 50);
|
|
617
538
|
N.position.set(15, 15, 15), t.add(N);
|
|
618
|
-
const
|
|
619
|
-
|
|
620
|
-
},
|
|
621
|
-
|
|
622
|
-
}, m = (
|
|
539
|
+
const Z = new bt(16777215, 0.5, 50);
|
|
540
|
+
Z.position.set(-15, -15, 15), t.add(Z);
|
|
541
|
+
}, l = () => {
|
|
542
|
+
f = requestAnimationFrame(l), r && r.update(), i && t && e && i.render(t, e), J && J.render();
|
|
543
|
+
}, m = (a) => {
|
|
623
544
|
[
|
|
624
545
|
"map",
|
|
625
546
|
"normalMap",
|
|
@@ -633,10 +554,10 @@ function xe(o) {
|
|
|
633
554
|
"aoMap",
|
|
634
555
|
"displacementMap"
|
|
635
556
|
].forEach((b) => {
|
|
636
|
-
|
|
637
|
-
}),
|
|
638
|
-
}, g = (
|
|
639
|
-
|
|
557
|
+
a[b] && a[b].dispose && a[b].dispose();
|
|
558
|
+
}), a.dispose && a.dispose();
|
|
559
|
+
}, g = (a) => {
|
|
560
|
+
a == null || a.traverse((n) => {
|
|
640
561
|
n.geometry && n.geometry.dispose(), n.material && (Array.isArray(n.material) ? n.material.forEach((b) => {
|
|
641
562
|
m(b);
|
|
642
563
|
}) : m(n.material));
|
|
@@ -644,196 +565,257 @@ function xe(o) {
|
|
|
644
565
|
};
|
|
645
566
|
return {
|
|
646
567
|
// 响应式数据
|
|
647
|
-
currentModels:
|
|
648
|
-
initialCameraPosition:
|
|
649
|
-
initialTargetPosition:
|
|
568
|
+
currentModels: v,
|
|
569
|
+
initialCameraPosition: _,
|
|
570
|
+
initialTargetPosition: C,
|
|
650
571
|
// 方法
|
|
651
|
-
initThreeJS:
|
|
572
|
+
initThreeJS: S,
|
|
652
573
|
handleResize: () => {
|
|
653
|
-
if (!o.value || !e || !i || !
|
|
654
|
-
const
|
|
655
|
-
e.aspect = n / b, e.updateProjectionMatrix(), i.setSize(n, b),
|
|
574
|
+
if (!o.value || !e || !i || !J) return;
|
|
575
|
+
const a = o.value, n = a.clientWidth, b = a.clientHeight;
|
|
576
|
+
e.aspect = n / b, e.updateProjectionMatrix(), i.setSize(n, b), J.update();
|
|
656
577
|
},
|
|
657
578
|
fitCameraToAllModels: () => {
|
|
658
|
-
if (!e || !
|
|
659
|
-
const
|
|
660
|
-
|
|
661
|
-
|
|
579
|
+
if (!e || !r || v.value.length === 0) return;
|
|
580
|
+
const a = new at();
|
|
581
|
+
v.value.forEach((Z) => {
|
|
582
|
+
a.expandByObject(Z);
|
|
662
583
|
});
|
|
663
|
-
const n =
|
|
664
|
-
e.position.copy(N), e.lookAt(b),
|
|
584
|
+
const n = a.getSize(new y()), b = a.getCenter(new y()), L = Math.max(n.x, n.y, n.z) * 0.8, N = new y(b.x + L, b.y - L, b.z + L);
|
|
585
|
+
e.position.copy(N), e.lookAt(b), r.target.copy(b), r.update(), _.value.copy(N), C.value.copy(b), I();
|
|
665
586
|
},
|
|
666
587
|
getThreeJSObjects: () => ({
|
|
667
588
|
scene: t,
|
|
668
589
|
camera: e,
|
|
669
590
|
renderer: i,
|
|
670
|
-
controls:
|
|
671
|
-
gizmo:
|
|
591
|
+
controls: r,
|
|
592
|
+
gizmo: J
|
|
672
593
|
}),
|
|
673
594
|
clearAllModels: () => {
|
|
674
595
|
if (!t) return;
|
|
675
|
-
|
|
596
|
+
v.value.forEach((n) => {
|
|
676
597
|
t.remove(n), g(n);
|
|
677
598
|
});
|
|
678
|
-
const
|
|
599
|
+
const a = [];
|
|
679
600
|
t.children.forEach((n) => {
|
|
680
|
-
!n.isLight && !n.isCamera && n.type !== "GridHelper" && n !==
|
|
681
|
-
}),
|
|
601
|
+
!n.isLight && !n.isCamera && n.type !== "GridHelper" && n !== M && a.push(n);
|
|
602
|
+
}), a.forEach((n) => {
|
|
682
603
|
t.remove(n), g(n);
|
|
683
|
-
}),
|
|
604
|
+
}), v.value = [], I();
|
|
684
605
|
},
|
|
685
606
|
cleanup: () => {
|
|
686
|
-
|
|
607
|
+
f && cancelAnimationFrame(f), s && s.dispose(), M && (M.geometry.dispose(), M.material.dispose()), i && i.dispose(), r && r.dispose(), J && J.dispose();
|
|
687
608
|
},
|
|
688
|
-
updateGridForModels:
|
|
609
|
+
updateGridForModels: I
|
|
689
610
|
};
|
|
690
611
|
}
|
|
691
|
-
function
|
|
692
|
-
const e =
|
|
693
|
-
let i = null,
|
|
694
|
-
const
|
|
695
|
-
const m = new y(), g =
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
m.x =
|
|
699
|
-
} else if (
|
|
700
|
-
const
|
|
701
|
-
m.lerpVectors(
|
|
702
|
-
} else if (
|
|
703
|
-
const
|
|
704
|
-
m.x =
|
|
612
|
+
function ve(o, t) {
|
|
613
|
+
const e = x(!1);
|
|
614
|
+
let i = null, r = 12700, J = new y(), f = new y(), s = new y(), M = 0, v = null;
|
|
615
|
+
const _ = (l) => l < 0.5 ? 4 * l * l * l : 1 - Math.pow(-2 * l + 2, 3) / 2, C = (l) => {
|
|
616
|
+
const m = new y(), g = M * 1.2, T = new y(s.x + g, s.y, s.z), d = new y(s.x, s.y + g, s.z), G = new y(s.x, s.y - g, s.z);
|
|
617
|
+
if (l <= 0.567) {
|
|
618
|
+
const P = l / 0.567 * Math.PI * 2;
|
|
619
|
+
m.x = s.x + Math.cos(P) * g, m.z = s.z + Math.sin(P) * g, m.y = s.y;
|
|
620
|
+
} else if (l <= 0.724) {
|
|
621
|
+
const h = (l - 0.567) / 0.157, P = _(h);
|
|
622
|
+
m.lerpVectors(T, d, P);
|
|
623
|
+
} else if (l <= 0.881) {
|
|
624
|
+
const h = (l - 0.724) / 0.157, a = _(h) * Math.PI;
|
|
625
|
+
m.x = s.x + Math.sin(a) * g, m.y = s.y + Math.cos(a) * g, m.z = s.z;
|
|
705
626
|
} else {
|
|
706
|
-
const
|
|
707
|
-
m.lerpVectors(G,
|
|
627
|
+
const h = (l - 0.881) / 0.119, P = _(h);
|
|
628
|
+
m.lerpVectors(G, J, P);
|
|
708
629
|
}
|
|
709
630
|
return m;
|
|
710
|
-
},
|
|
711
|
-
const { camera:
|
|
712
|
-
if (!
|
|
631
|
+
}, S = () => {
|
|
632
|
+
const { camera: l, controls: m } = o();
|
|
633
|
+
if (!l || !m) return;
|
|
713
634
|
i || (i = Date.now());
|
|
714
|
-
const g = Date.now() - i,
|
|
715
|
-
if (
|
|
716
|
-
|
|
635
|
+
const g = Date.now() - i, T = Math.min(g / r, 1);
|
|
636
|
+
if (T >= 1) {
|
|
637
|
+
I();
|
|
717
638
|
return;
|
|
718
639
|
}
|
|
719
|
-
const
|
|
720
|
-
|
|
721
|
-
},
|
|
640
|
+
const d = C(T);
|
|
641
|
+
l.position.copy(d), l.lookAt(s), m.target.copy(s), v = requestAnimationFrame(S);
|
|
642
|
+
}, p = () => {
|
|
722
643
|
if (t.value.length === 0) return;
|
|
723
|
-
const { camera:
|
|
724
|
-
if (!
|
|
725
|
-
|
|
726
|
-
const g = new
|
|
644
|
+
const { camera: l, controls: m } = o();
|
|
645
|
+
if (!l || !m) return;
|
|
646
|
+
J.copy(l.position), f.copy(m.target);
|
|
647
|
+
const g = new at();
|
|
727
648
|
t.value.forEach((n) => {
|
|
728
649
|
g.expandByObject(n);
|
|
729
650
|
});
|
|
730
|
-
const
|
|
731
|
-
|
|
732
|
-
const
|
|
651
|
+
const T = g.getSize(new y());
|
|
652
|
+
s = g.getCenter(new y()), M = Math.max(T.x, T.y, T.z) * 1.2;
|
|
653
|
+
const d = new y(s.x + M * 1.2, s.y, s.z);
|
|
733
654
|
m.enabled = !1;
|
|
734
|
-
const G =
|
|
735
|
-
const n = Date.now() -
|
|
736
|
-
|
|
655
|
+
const G = l.position.clone(), h = 1e3, P = Date.now(), a = () => {
|
|
656
|
+
const n = Date.now() - P, b = Math.min(n / h, 1), E = _(b);
|
|
657
|
+
l.position.lerpVectors(G, d, E), l.lookAt(s), m.target.copy(s), b < 1 ? requestAnimationFrame(a) : (e.value = !0, i = null, S());
|
|
737
658
|
};
|
|
738
|
-
|
|
739
|
-
},
|
|
740
|
-
e.value = !1, i = null,
|
|
741
|
-
const { controls:
|
|
742
|
-
|
|
659
|
+
a();
|
|
660
|
+
}, I = () => {
|
|
661
|
+
e.value = !1, i = null, v && (cancelAnimationFrame(v), v = null);
|
|
662
|
+
const { controls: l } = o();
|
|
663
|
+
l && (l.enabled = !0, l.target.copy(f));
|
|
743
664
|
};
|
|
744
665
|
return {
|
|
745
666
|
isAnimating: e,
|
|
746
667
|
toggleAnimation: () => {
|
|
747
668
|
if (e.value) {
|
|
748
|
-
e.value = !1, i = null,
|
|
749
|
-
const { camera:
|
|
750
|
-
if (!
|
|
669
|
+
e.value = !1, i = null, v && (cancelAnimationFrame(v), v = null);
|
|
670
|
+
const { camera: l, controls: m } = o();
|
|
671
|
+
if (!l || !m) return;
|
|
751
672
|
m.enabled = !0;
|
|
752
|
-
const g =
|
|
753
|
-
const
|
|
754
|
-
|
|
673
|
+
const g = l.position.clone(), T = m.target.clone(), d = 1500, G = Date.now(), h = () => {
|
|
674
|
+
const P = Date.now() - G, a = Math.min(P / d, 1), n = _(a);
|
|
675
|
+
l.position.lerpVectors(g, J, n), m.target.lerpVectors(T, f, n), a < 1 && requestAnimationFrame(h);
|
|
755
676
|
};
|
|
756
|
-
|
|
677
|
+
h();
|
|
757
678
|
} else
|
|
758
|
-
|
|
679
|
+
p();
|
|
759
680
|
},
|
|
760
|
-
startAnimation:
|
|
761
|
-
stopAnimation:
|
|
681
|
+
startAnimation: p,
|
|
682
|
+
stopAnimation: I
|
|
762
683
|
};
|
|
763
684
|
}
|
|
764
|
-
function
|
|
765
|
-
const e =
|
|
766
|
-
let
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
new
|
|
685
|
+
function we(o, t) {
|
|
686
|
+
const e = x(!1), i = x("none");
|
|
687
|
+
let r = [], J = [], f = new at(), s = new y();
|
|
688
|
+
const M = () => {
|
|
689
|
+
r = [
|
|
690
|
+
new ot(new y(1, 0, 0), 0),
|
|
770
691
|
// X轴平面
|
|
771
|
-
new
|
|
692
|
+
new ot(new y(0, 1, 0), 0),
|
|
772
693
|
// Y轴平面
|
|
773
|
-
new
|
|
694
|
+
new ot(new y(0, 0, 1), 0)
|
|
774
695
|
// Z轴平面
|
|
775
696
|
];
|
|
776
|
-
},
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
}),
|
|
780
|
-
},
|
|
781
|
-
const
|
|
782
|
-
let m, g,
|
|
783
|
-
|
|
784
|
-
const
|
|
697
|
+
}, v = () => {
|
|
698
|
+
f.makeEmpty(), t.value.forEach((R) => {
|
|
699
|
+
f.expandByObject(R);
|
|
700
|
+
}), s = f.getCenter(new y());
|
|
701
|
+
}, _ = (R) => {
|
|
702
|
+
const l = f.getSize(new y());
|
|
703
|
+
let m, g, T;
|
|
704
|
+
R === "x" ? (m = new nt(l.z * 1.2, l.y * 1.2), g = new y(s.x, s.y, s.z), T = new lt(0, Math.PI / 2, 0)) : R === "y" ? (m = new nt(l.x * 1.2, l.z * 1.2), g = new y(s.x, s.y, s.z), T = new lt(Math.PI / 2, 0, 0)) : R === "z" && (m = new nt(l.x * 1.2, l.y * 1.2), g = new y(s.x, s.y, s.z), T = new lt(0, 0, 0));
|
|
705
|
+
const d = new ae({
|
|
785
706
|
color: 8900331,
|
|
786
707
|
transparent: !0,
|
|
787
708
|
opacity: 0.3,
|
|
788
|
-
side:
|
|
709
|
+
side: se,
|
|
789
710
|
depthWrite: !1
|
|
790
|
-
}), G = new
|
|
791
|
-
return G.position.copy(g), G.rotation.copy(
|
|
792
|
-
},
|
|
793
|
-
if (
|
|
711
|
+
}), G = new Et(m, d);
|
|
712
|
+
return G.position.copy(g), G.rotation.copy(T), G;
|
|
713
|
+
}, C = () => {
|
|
714
|
+
if (S(), p(), i.value === "none")
|
|
794
715
|
return;
|
|
795
|
-
|
|
796
|
-
let
|
|
797
|
-
if (i.value === "x" ? (
|
|
716
|
+
v();
|
|
717
|
+
let R = null;
|
|
718
|
+
if (i.value === "x" ? (r[0].constant = -s.x, R = r[0]) : i.value === "y" ? (r[1].constant = -s.y, R = r[1]) : i.value === "z" && (r[2].constant = -s.z, R = r[2]), R) {
|
|
798
719
|
t.value.forEach((m) => {
|
|
799
720
|
m.traverse((g) => {
|
|
800
|
-
g.isMesh && g.material && (Array.isArray(g.material) ? g.material.forEach((
|
|
801
|
-
|
|
802
|
-
}) : g.material.clippingPlanes = [
|
|
721
|
+
g.isMesh && g.material && (Array.isArray(g.material) ? g.material.forEach((T) => {
|
|
722
|
+
T.clippingPlanes = [R];
|
|
723
|
+
}) : g.material.clippingPlanes = [R]);
|
|
803
724
|
});
|
|
804
725
|
});
|
|
805
|
-
const { scene:
|
|
806
|
-
if (
|
|
807
|
-
const m =
|
|
808
|
-
|
|
726
|
+
const { scene: l } = o();
|
|
727
|
+
if (l) {
|
|
728
|
+
const m = _(i.value);
|
|
729
|
+
l.add(m), J.push(m);
|
|
809
730
|
}
|
|
810
731
|
}
|
|
811
|
-
},
|
|
812
|
-
t.value.forEach((
|
|
813
|
-
|
|
814
|
-
|
|
732
|
+
}, S = () => {
|
|
733
|
+
t.value.forEach((R) => {
|
|
734
|
+
R.traverse((l) => {
|
|
735
|
+
l.isMesh && l.material && (Array.isArray(l.material) ? l.material.forEach((m) => {
|
|
815
736
|
m.clippingPlanes = [];
|
|
816
|
-
}) :
|
|
737
|
+
}) : l.material.clippingPlanes = []);
|
|
817
738
|
});
|
|
818
739
|
});
|
|
819
|
-
},
|
|
820
|
-
const { scene:
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}),
|
|
740
|
+
}, p = () => {
|
|
741
|
+
const { scene: R } = o();
|
|
742
|
+
R && J.forEach((l) => {
|
|
743
|
+
R.remove(l), l.geometry.dispose(), l.material.dispose();
|
|
744
|
+
}), J = [];
|
|
824
745
|
};
|
|
825
746
|
return {
|
|
826
747
|
isClipping: e,
|
|
827
748
|
activeClippingAxis: i,
|
|
828
749
|
toggleClipping: () => {
|
|
829
|
-
e.value = !e.value, e.value ? (
|
|
750
|
+
e.value = !e.value, e.value ? (M(), t.value.length > 0 && v()) : (i.value = "none", S(), p());
|
|
830
751
|
},
|
|
831
|
-
updateClippingPlanes:
|
|
832
|
-
clearClippingPlanes:
|
|
833
|
-
clearClippingMeshes:
|
|
752
|
+
updateClippingPlanes: C,
|
|
753
|
+
clearClippingPlanes: S,
|
|
754
|
+
clearClippingMeshes: p
|
|
834
755
|
};
|
|
835
756
|
}
|
|
836
|
-
const
|
|
757
|
+
const Re = { class: "panel-content" }, Be = {
|
|
758
|
+
__name: "urdfTree",
|
|
759
|
+
props: {
|
|
760
|
+
model: Object
|
|
761
|
+
},
|
|
762
|
+
emits: ["nodeClick"],
|
|
763
|
+
setup(o, { emit: t }) {
|
|
764
|
+
const e = o, i = t, r = x([]), J = {
|
|
765
|
+
children: "children",
|
|
766
|
+
label: "label"
|
|
767
|
+
}, f = (_) => {
|
|
768
|
+
i("nodeClick", _);
|
|
769
|
+
}, s = (_, C = 0) => {
|
|
770
|
+
const S = [];
|
|
771
|
+
return Array.isArray(_) && (_ == null ? void 0 : _.length) > 0 && _.forEach((p) => {
|
|
772
|
+
if (!(p != null && p.isMesh) && ((p == null ? void 0 : p.type) === "URDFJoint" || (p == null ? void 0 : p.type) === "URDFLink")) {
|
|
773
|
+
const I = {
|
|
774
|
+
name: p == null ? void 0 : p.name,
|
|
775
|
+
label: p == null ? void 0 : p.name,
|
|
776
|
+
show: !0,
|
|
777
|
+
level: C + 1,
|
|
778
|
+
isPenultimate: !1,
|
|
779
|
+
type: p == null ? void 0 : p.type,
|
|
780
|
+
id: p == null ? void 0 : p.id,
|
|
781
|
+
limit: (p == null ? void 0 : p.limit) ?? "",
|
|
782
|
+
children: s(p == null ? void 0 : p.children, C + 1),
|
|
783
|
+
path: p == null ? void 0 : p.name
|
|
784
|
+
};
|
|
785
|
+
S.push(I);
|
|
786
|
+
}
|
|
787
|
+
}), S;
|
|
788
|
+
}, M = (_) => _ ? [{
|
|
789
|
+
name: _ == null ? void 0 : _.name,
|
|
790
|
+
label: _ == null ? void 0 : _.name,
|
|
791
|
+
show: !0,
|
|
792
|
+
level: 1,
|
|
793
|
+
isPenultimate: !1,
|
|
794
|
+
type: _ == null ? void 0 : _.type,
|
|
795
|
+
id: _ == null ? void 0 : _.id,
|
|
796
|
+
limit: (_ == null ? void 0 : _.limit) ?? "",
|
|
797
|
+
children: s(_ == null ? void 0 : _.children, 1),
|
|
798
|
+
path: _ == null ? void 0 : _.name
|
|
799
|
+
}] : [], v = Lt(() => e != null && e.model ? M(e.model) : []);
|
|
800
|
+
return wt(
|
|
801
|
+
v,
|
|
802
|
+
(_) => {
|
|
803
|
+
r.value = JSON.parse(JSON.stringify(_));
|
|
804
|
+
},
|
|
805
|
+
{ immediate: !0 }
|
|
806
|
+
), (_, C) => {
|
|
807
|
+
const S = Rt("el-tree");
|
|
808
|
+
return j(), F("div", Re, [
|
|
809
|
+
D(S, {
|
|
810
|
+
data: r.value,
|
|
811
|
+
props: J,
|
|
812
|
+
"default-expand-all": !1,
|
|
813
|
+
onNodeClick: f
|
|
814
|
+
}, null, 8, ["data"])
|
|
815
|
+
]);
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
}, Ee = /* @__PURE__ */ st(Be, [["__scopeId", "data-v-6cd6079b"]]), Te = [
|
|
837
819
|
{
|
|
838
820
|
"J1_Joint(GP1)": -3172089e-9,
|
|
839
821
|
"J2_Joint(GP1)": -0.096027484,
|
|
@@ -1458,16 +1440,16 @@ const Ce = [
|
|
|
1458
1440
|
"BendGuidePart_Joint(GP2)": -0.015,
|
|
1459
1441
|
"HolderRoate_Joint(GP3)": 6.283185307
|
|
1460
1442
|
}
|
|
1461
|
-
],
|
|
1443
|
+
], De = { class: "panel-actions" }, xe = ["disabled"], Se = { class: "panel-content" }, Ce = {
|
|
1462
1444
|
key: 0,
|
|
1463
1445
|
class: "joints-list"
|
|
1464
|
-
},
|
|
1446
|
+
}, Ae = { class: "joint-info-row" }, ke = { class: "joint-left" }, ze = { class: "joint-name" }, Oe = { class: "joint-range" }, Le = { class: "joint-type" }, He = {
|
|
1465
1447
|
key: 0,
|
|
1466
1448
|
class: "joint-control-row"
|
|
1467
|
-
},
|
|
1449
|
+
}, je = { class: "slider-container" }, Ie = ["min", "max", "value", "onInput", "disabled"], Fe = { class: "value-display" }, Ne = { class: "joint-value" }, Ue = { class: "unit" }, Ye = {
|
|
1468
1450
|
key: 1,
|
|
1469
1451
|
class: "empty-state"
|
|
1470
|
-
},
|
|
1452
|
+
}, Ve = 1e3, Ze = {
|
|
1471
1453
|
__name: "jointPanel",
|
|
1472
1454
|
props: {
|
|
1473
1455
|
model: Object,
|
|
@@ -1475,416 +1457,413 @@ const Ce = [
|
|
|
1475
1457
|
},
|
|
1476
1458
|
setup(o) {
|
|
1477
1459
|
const t = o;
|
|
1478
|
-
|
|
1479
|
-
const e =
|
|
1480
|
-
|
|
1481
|
-
const
|
|
1482
|
-
if (!
|
|
1460
|
+
x(!0);
|
|
1461
|
+
const e = x([]), i = x(null), r = x(!1), J = x(null), f = Te;
|
|
1462
|
+
f.length > 0 && Object.keys(f[0]);
|
|
1463
|
+
const s = (d, G = !1) => d === "revolute" ? G ? Math.PI : -Math.PI : d === "prismatic" ? G ? 1 : -1 : 0, M = (d) => {
|
|
1464
|
+
if (!d || !d.joints)
|
|
1483
1465
|
return console.warn("URDF模型没有关节信息"), [];
|
|
1484
1466
|
const G = [];
|
|
1485
|
-
return Object.keys(
|
|
1486
|
-
const
|
|
1487
|
-
if (
|
|
1467
|
+
return Object.keys(d.joints).forEach((h) => {
|
|
1468
|
+
const P = d.joints[h];
|
|
1469
|
+
if (P._jointType === "fixed")
|
|
1488
1470
|
return;
|
|
1489
|
-
const
|
|
1490
|
-
lower:
|
|
1491
|
-
upper:
|
|
1471
|
+
const a = P.limit ? {
|
|
1472
|
+
lower: P.limit.lower ?? s(P._jointType, !1),
|
|
1473
|
+
upper: P.limit.upper ?? s(P._jointType, !0)
|
|
1492
1474
|
} : {
|
|
1493
|
-
lower:
|
|
1494
|
-
upper:
|
|
1475
|
+
lower: s(P._jointType, !1),
|
|
1476
|
+
upper: s(P._jointType, !0)
|
|
1495
1477
|
};
|
|
1496
1478
|
G.push({
|
|
1497
|
-
name:
|
|
1498
|
-
type:
|
|
1499
|
-
limit:
|
|
1500
|
-
currentValue:
|
|
1501
|
-
urdfJoint:
|
|
1479
|
+
name: h,
|
|
1480
|
+
type: P._jointType || "unknown",
|
|
1481
|
+
limit: a,
|
|
1482
|
+
currentValue: P.angle || 0,
|
|
1483
|
+
urdfJoint: P
|
|
1502
1484
|
});
|
|
1503
|
-
}), G.sort((
|
|
1504
|
-
},
|
|
1505
|
-
const
|
|
1506
|
-
if (!
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1509
|
-
const
|
|
1510
|
-
|
|
1485
|
+
}), G.sort((h, P) => h.name.localeCompare(P.name));
|
|
1486
|
+
}, v = (d, G) => {
|
|
1487
|
+
const h = e.value.find((a) => a.name === d);
|
|
1488
|
+
if (!h) return;
|
|
1489
|
+
const P = parseFloat(G);
|
|
1490
|
+
if (h.limit) {
|
|
1491
|
+
const a = Math.max(h.limit.lower, Math.min(h.limit.upper, P));
|
|
1492
|
+
h.currentValue = a;
|
|
1511
1493
|
} else
|
|
1512
|
-
|
|
1513
|
-
t.model && t.model.setJointValue ? t.model.setJointValue(
|
|
1514
|
-
},
|
|
1515
|
-
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1494
|
+
h.currentValue = P;
|
|
1495
|
+
t.model && t.model.setJointValue ? t.model.setJointValue(d, h.currentValue) : h.urdfJoint && h.urdfJoint.setJointValue(h.currentValue);
|
|
1496
|
+
}, _ = (d) => {
|
|
1497
|
+
d && Object.keys(d).forEach((G) => {
|
|
1498
|
+
const h = d[G], P = e.value.find((a) => a.name === G);
|
|
1499
|
+
P && (P.currentValue = h, t.model && t.model.setJointValue ? t.model.setJointValue(G, h) : P.urdfJoint && P.urdfJoint.setJointValue(h));
|
|
1518
1500
|
});
|
|
1519
|
-
},
|
|
1520
|
-
if (!
|
|
1521
|
-
const
|
|
1522
|
-
return Object.keys(
|
|
1523
|
-
const n =
|
|
1524
|
-
|
|
1525
|
-
}),
|
|
1501
|
+
}, C = (d, G, h) => d + (G - d) * h, S = (d, G, h) => {
|
|
1502
|
+
if (!d || !G) return d || G;
|
|
1503
|
+
const P = {};
|
|
1504
|
+
return Object.keys(d).forEach((a) => {
|
|
1505
|
+
const n = d[a], b = G[a];
|
|
1506
|
+
P[a] = C(n, b || n, h);
|
|
1507
|
+
}), P;
|
|
1508
|
+
}, p = () => {
|
|
1509
|
+
r.value ? R() : I();
|
|
1526
1510
|
}, I = () => {
|
|
1527
|
-
|
|
1528
|
-
}, F = () => {
|
|
1529
|
-
if (s.length === 0) {
|
|
1511
|
+
if (f.length === 0) {
|
|
1530
1512
|
console.warn("没有动画数据");
|
|
1531
1513
|
return;
|
|
1532
1514
|
}
|
|
1533
|
-
|
|
1534
|
-
const
|
|
1535
|
-
let
|
|
1515
|
+
r.value = !0;
|
|
1516
|
+
const d = f.length, G = 60, h = Ve / G;
|
|
1517
|
+
let P = 0, a = 0;
|
|
1536
1518
|
const n = () => {
|
|
1537
|
-
if (!
|
|
1538
|
-
const b =
|
|
1519
|
+
if (!r.value) return;
|
|
1520
|
+
const b = P / G, E = f[a], L = f[a + 1];
|
|
1539
1521
|
if (L) {
|
|
1540
|
-
const N =
|
|
1541
|
-
|
|
1522
|
+
const N = S(E, L, b);
|
|
1523
|
+
_(N);
|
|
1542
1524
|
} else
|
|
1543
|
-
|
|
1544
|
-
if (
|
|
1545
|
-
|
|
1525
|
+
_(E);
|
|
1526
|
+
if (P++, P >= G && (P = 0, a++, a >= d - 1)) {
|
|
1527
|
+
R();
|
|
1546
1528
|
return;
|
|
1547
1529
|
}
|
|
1548
|
-
|
|
1530
|
+
J.value = setTimeout(n, h);
|
|
1549
1531
|
};
|
|
1550
1532
|
n();
|
|
1551
|
-
},
|
|
1552
|
-
|
|
1553
|
-
},
|
|
1554
|
-
e.value.forEach((
|
|
1555
|
-
(
|
|
1533
|
+
}, R = () => {
|
|
1534
|
+
r.value = !1, J.value && (clearTimeout(J.value), J.value = null);
|
|
1535
|
+
}, l = () => {
|
|
1536
|
+
e.value.forEach((d) => {
|
|
1537
|
+
(d.type === "revolute" || d.type === "prismatic") && v(d.name, 0);
|
|
1556
1538
|
});
|
|
1557
1539
|
};
|
|
1558
|
-
|
|
1540
|
+
wt(
|
|
1559
1541
|
() => t.model,
|
|
1560
|
-
(
|
|
1561
|
-
|
|
1542
|
+
(d) => {
|
|
1543
|
+
d ? e.value = M(d) : e.value = [];
|
|
1562
1544
|
},
|
|
1563
1545
|
{ immediate: !0 }
|
|
1564
1546
|
);
|
|
1565
1547
|
const m = () => {
|
|
1566
|
-
!t.model ||
|
|
1567
|
-
|
|
1548
|
+
!t.model || r.value || e.value.forEach((d) => {
|
|
1549
|
+
d.urdfJoint && d.urdfJoint.angle !== void 0 && (d.currentValue = d.urdfJoint.angle);
|
|
1568
1550
|
});
|
|
1569
1551
|
}, g = () => {
|
|
1570
|
-
const
|
|
1571
|
-
m(), i.value = requestAnimationFrame(
|
|
1552
|
+
const d = () => {
|
|
1553
|
+
m(), i.value = requestAnimationFrame(d);
|
|
1572
1554
|
};
|
|
1573
|
-
|
|
1574
|
-
},
|
|
1555
|
+
d();
|
|
1556
|
+
}, T = () => {
|
|
1575
1557
|
i.value && (cancelAnimationFrame(i.value), i.value = null);
|
|
1576
1558
|
};
|
|
1577
|
-
return
|
|
1559
|
+
return Bt(() => {
|
|
1578
1560
|
g();
|
|
1579
|
-
}),
|
|
1580
|
-
|
|
1581
|
-
}), (
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
onClick:
|
|
1561
|
+
}), Ht(() => {
|
|
1562
|
+
T(), R();
|
|
1563
|
+
}), (d, G) => (j(), F(ut, null, [
|
|
1564
|
+
u("div", De, [
|
|
1565
|
+
u("button", {
|
|
1566
|
+
onClick: p,
|
|
1585
1567
|
class: "animate-btn"
|
|
1586
|
-
}, Y(
|
|
1587
|
-
|
|
1588
|
-
onClick:
|
|
1589
|
-
disabled:
|
|
1590
|
-
}, "重置所有关节", 8,
|
|
1568
|
+
}, Y(r.value ? "停止动画" : "开始动画"), 1),
|
|
1569
|
+
u("button", {
|
|
1570
|
+
onClick: l,
|
|
1571
|
+
disabled: r.value
|
|
1572
|
+
}, "重置所有关节", 8, xe)
|
|
1591
1573
|
]),
|
|
1592
|
-
|
|
1593
|
-
e.value.length > 0 ? (
|
|
1594
|
-
(
|
|
1595
|
-
var
|
|
1596
|
-
return
|
|
1597
|
-
key:
|
|
1574
|
+
u("div", Se, [
|
|
1575
|
+
e.value.length > 0 ? (j(), F("div", Ce, [
|
|
1576
|
+
(j(!0), F(ut, null, jt(e.value, (h) => {
|
|
1577
|
+
var P, a, n, b;
|
|
1578
|
+
return j(), F("div", {
|
|
1579
|
+
key: h.name,
|
|
1598
1580
|
class: "joint-item"
|
|
1599
1581
|
}, [
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1582
|
+
u("div", Ae, [
|
|
1583
|
+
u("div", ke, [
|
|
1584
|
+
u("span", ze, Y(h.name), 1),
|
|
1585
|
+
u("span", Oe, " [" + Y(((P = h.limit) == null ? void 0 : P.lower.toFixed(2)) ?? (h.type === "revolute" ? "-3.14" : "-1.00")) + ", " + Y(((a = h.limit) == null ? void 0 : a.upper.toFixed(2)) ?? (h.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
|
|
1604
1586
|
]),
|
|
1605
|
-
|
|
1587
|
+
u("span", Le, Y(h.type), 1)
|
|
1606
1588
|
]),
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1589
|
+
h.type === "revolute" || h.type === "prismatic" ? (j(), F("div", He, [
|
|
1590
|
+
u("div", je, [
|
|
1591
|
+
u("input", {
|
|
1610
1592
|
type: "range",
|
|
1611
|
-
min: ((n =
|
|
1612
|
-
max: ((b =
|
|
1593
|
+
min: ((n = h.limit) == null ? void 0 : n.lower) ?? (h.type === "revolute" ? -Math.PI : -1),
|
|
1594
|
+
max: ((b = h.limit) == null ? void 0 : b.upper) ?? (h.type === "revolute" ? Math.PI : 1),
|
|
1613
1595
|
step: 0.01,
|
|
1614
|
-
value:
|
|
1615
|
-
onInput: (
|
|
1596
|
+
value: h.currentValue,
|
|
1597
|
+
onInput: (E) => v(h.name, E.target.value),
|
|
1616
1598
|
class: "joint-slider",
|
|
1617
|
-
disabled:
|
|
1618
|
-
}, null, 40,
|
|
1599
|
+
disabled: r.value
|
|
1600
|
+
}, null, 40, Ie)
|
|
1619
1601
|
]),
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1602
|
+
u("div", Fe, [
|
|
1603
|
+
u("span", Ne, Y(h.currentValue.toFixed(3)), 1),
|
|
1604
|
+
u("span", Ue, Y(h.type === "revolute" ? "rad" : "m"), 1)
|
|
1623
1605
|
])
|
|
1624
1606
|
])) : q("", !0)
|
|
1625
1607
|
]);
|
|
1626
1608
|
}), 128))
|
|
1627
|
-
])) : (
|
|
1628
|
-
|
|
1609
|
+
])) : (j(), F("div", Ye, G[0] || (G[0] = [
|
|
1610
|
+
u("p", null, "未检测到可控制的关节", -1)
|
|
1629
1611
|
])))
|
|
1630
1612
|
])
|
|
1631
1613
|
], 64));
|
|
1632
1614
|
}
|
|
1633
|
-
},
|
|
1634
|
-
function
|
|
1635
|
-
return
|
|
1615
|
+
}, Ke = /* @__PURE__ */ st(Ze, [["__scopeId", "data-v-ef47ba0d"]]), $e = ["xlink:href"];
|
|
1616
|
+
function Xe(o, t, e, i, r, J) {
|
|
1617
|
+
return j(), F("div", {
|
|
1636
1618
|
class: pt(["container", { active: o.active }])
|
|
1637
1619
|
}, [
|
|
1638
|
-
(
|
|
1620
|
+
(j(), F("svg", {
|
|
1639
1621
|
class: pt(["svg-icon", [o.$attrs.class, o.spin && "svg-icon-spin"]]),
|
|
1640
|
-
style:
|
|
1622
|
+
style: It(o.getStyle),
|
|
1641
1623
|
"aria-hidden": "true"
|
|
1642
1624
|
}, [
|
|
1643
|
-
|
|
1625
|
+
u("use", { "xlink:href": o.symbolId }, null, 8, $e)
|
|
1644
1626
|
], 6))
|
|
1645
1627
|
], 2);
|
|
1646
1628
|
}
|
|
1647
|
-
const
|
|
1629
|
+
const z = /* @__PURE__ */ st(re, [["render", Xe], ["__scopeId", "data-v-1f76fc63"]]), We = { class: "obj-viewer-container" }, qe = { class: "buttonGroup-top" }, Qe = { class: "buttonGroup-topLeft" }, ti = { class: "buttonGroup-left" }, ei = { class: "buttonGroup-right" }, ii = { class: "left-panel" }, oi = { class: "panel-header" }, ni = {
|
|
1648
1630
|
key: 1,
|
|
1649
1631
|
class: "panel-content"
|
|
1650
|
-
},
|
|
1632
|
+
}, ai = { class: "radio-group" }, si = { class: "radio-label" }, ri = { class: "radio-label" }, li = { class: "radio-label" }, hi = { class: "radio-label" }, di = { class: "right-panel" }, _i = { class: "panel-header" }, ci = {
|
|
1651
1633
|
key: 0,
|
|
1652
1634
|
class: "loading-overlay"
|
|
1653
|
-
},
|
|
1635
|
+
}, Pi = {
|
|
1654
1636
|
__name: "threeModel",
|
|
1655
1637
|
setup(o, { expose: t }) {
|
|
1656
1638
|
let e = null, i = !1;
|
|
1657
|
-
const
|
|
1658
|
-
|
|
1659
|
-
const
|
|
1660
|
-
currentModels:
|
|
1661
|
-
initialCameraPosition:
|
|
1662
|
-
initialTargetPosition:
|
|
1663
|
-
initThreeJS:
|
|
1664
|
-
handleResize:
|
|
1639
|
+
const r = x(null), J = x(!1), f = x("");
|
|
1640
|
+
x(!1);
|
|
1641
|
+
const s = x(!1), M = x(!1), v = x(""), _ = x(!1), C = x(""), {
|
|
1642
|
+
currentModels: S,
|
|
1643
|
+
initialCameraPosition: p,
|
|
1644
|
+
initialTargetPosition: I,
|
|
1645
|
+
initThreeJS: R,
|
|
1646
|
+
handleResize: l,
|
|
1665
1647
|
fitCameraToAllModels: m,
|
|
1666
1648
|
getThreeJSObjects: g,
|
|
1667
|
-
clearAllModels:
|
|
1668
|
-
cleanup:
|
|
1669
|
-
} =
|
|
1649
|
+
clearAllModels: T,
|
|
1650
|
+
cleanup: d
|
|
1651
|
+
} = Me(r), { isAnimating: G, toggleAnimation: h, stopAnimation: P } = ve(g, S), { isClipping: a, activeClippingAxis: n, toggleClipping: b, updateClippingPlanes: E } = we(
|
|
1670
1652
|
g,
|
|
1671
|
-
|
|
1672
|
-
), { addModelsFromUrls: L, loadModelByDefaultPath: N, urdfModel:
|
|
1653
|
+
S
|
|
1654
|
+
), { addModelsFromUrls: L, loadModelByDefaultPath: N, urdfModel: Z } = le(
|
|
1673
1655
|
g,
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
),
|
|
1679
|
-
if (
|
|
1680
|
-
|
|
1681
|
-
const { camera:
|
|
1682
|
-
if (!
|
|
1683
|
-
|
|
1684
|
-
const
|
|
1685
|
-
const
|
|
1686
|
-
|
|
1656
|
+
S,
|
|
1657
|
+
J,
|
|
1658
|
+
f,
|
|
1659
|
+
T
|
|
1660
|
+
), Dt = () => {
|
|
1661
|
+
if (s.value || S.value.length === 0) return;
|
|
1662
|
+
s.value = !0, G.value && P();
|
|
1663
|
+
const { camera: A, controls: c } = g();
|
|
1664
|
+
if (!A || !c) return;
|
|
1665
|
+
c.enabled = !0;
|
|
1666
|
+
const V = ($) => $ < 0.5 ? 4 * $ * $ * $ : 1 - Math.pow(-2 * $ + 2, 3) / 2, B = A.position.clone(), kt = c.target.clone(), zt = 1500, Ot = Date.now(), ct = () => {
|
|
1667
|
+
const $ = Date.now() - Ot, Pt = Math.min($ / zt, 1), Jt = V(Pt);
|
|
1668
|
+
A.position.lerpVectors(B, p.value, Jt), c.target.lerpVectors(kt, I.value, Jt), Pt < 1 ? requestAnimationFrame(ct) : s.value = !1;
|
|
1687
1669
|
};
|
|
1688
1670
|
ct();
|
|
1689
|
-
},
|
|
1690
|
-
const
|
|
1691
|
-
i ?
|
|
1671
|
+
}, xt = async () => i ? Promise.resolve() : new Promise((A) => {
|
|
1672
|
+
const c = () => {
|
|
1673
|
+
i ? A() : requestAnimationFrame(c);
|
|
1692
1674
|
};
|
|
1693
|
-
|
|
1694
|
-
}), _t = async (
|
|
1675
|
+
c();
|
|
1676
|
+
}), _t = async (A, c) => {
|
|
1695
1677
|
try {
|
|
1696
|
-
await
|
|
1697
|
-
const
|
|
1698
|
-
return m(),
|
|
1699
|
-
} catch (
|
|
1700
|
-
throw console.error("加载模型失败:",
|
|
1678
|
+
await xt(), G.value && P(), a.value && b();
|
|
1679
|
+
const V = await c(A);
|
|
1680
|
+
return m(), V;
|
|
1681
|
+
} catch (V) {
|
|
1682
|
+
throw console.error("加载模型失败:", V), V;
|
|
1701
1683
|
}
|
|
1702
|
-
},
|
|
1703
|
-
|
|
1704
|
-
},
|
|
1705
|
-
|
|
1684
|
+
}, St = async (A) => _t(A, L), Ct = async (A) => _t(A, N), Q = (A) => {
|
|
1685
|
+
M.value = !0, v.value = A, A === "剖面图" && !a.value && b();
|
|
1686
|
+
}, At = (A) => {
|
|
1687
|
+
_.value = !0, C.value = A;
|
|
1706
1688
|
};
|
|
1707
|
-
return
|
|
1708
|
-
await
|
|
1689
|
+
return Bt(async () => {
|
|
1690
|
+
await Ft();
|
|
1709
1691
|
try {
|
|
1710
|
-
|
|
1711
|
-
} catch (
|
|
1712
|
-
console.error("Three.js初始化失败:",
|
|
1692
|
+
R(), e = g().scene, i = !0, window.addEventListener("resize", l);
|
|
1693
|
+
} catch (A) {
|
|
1694
|
+
console.error("Three.js初始化失败:", A);
|
|
1713
1695
|
}
|
|
1714
|
-
}),
|
|
1715
|
-
i = !1,
|
|
1696
|
+
}), Nt(() => {
|
|
1697
|
+
i = !1, v.value = "", C.value = "", window.removeEventListener("resize", l), G.value && P(), d();
|
|
1716
1698
|
}), t({
|
|
1717
|
-
addModelsFromUrls:
|
|
1718
|
-
loadModelByDefaultPath:
|
|
1719
|
-
}), (
|
|
1720
|
-
const
|
|
1721
|
-
return
|
|
1722
|
-
|
|
1699
|
+
addModelsFromUrls: St,
|
|
1700
|
+
loadModelByDefaultPath: Ct
|
|
1701
|
+
}), (A, c) => {
|
|
1702
|
+
const V = Rt("el-scrollbar");
|
|
1703
|
+
return j(), F("div", We, [
|
|
1704
|
+
u("div", {
|
|
1723
1705
|
ref_key: "threejsContainer",
|
|
1724
|
-
ref:
|
|
1706
|
+
ref: r,
|
|
1725
1707
|
class: "threejs-container"
|
|
1726
1708
|
}, null, 512),
|
|
1727
|
-
|
|
1728
|
-
|
|
1709
|
+
u("div", qe, [
|
|
1710
|
+
D(z, {
|
|
1729
1711
|
name: "guanjianjiexi",
|
|
1730
1712
|
size: "34"
|
|
1731
1713
|
}),
|
|
1732
|
-
|
|
1714
|
+
D(z, {
|
|
1733
1715
|
name: "guanjiekongzhi",
|
|
1734
1716
|
size: "34"
|
|
1735
1717
|
}),
|
|
1736
|
-
|
|
1718
|
+
D(z, {
|
|
1737
1719
|
name: "gongyishengcheng",
|
|
1738
1720
|
size: "34"
|
|
1739
1721
|
}),
|
|
1740
|
-
|
|
1722
|
+
D(z, {
|
|
1741
1723
|
name: "buchangshezhi",
|
|
1742
1724
|
size: "34"
|
|
1743
1725
|
}),
|
|
1744
|
-
|
|
1726
|
+
D(z, {
|
|
1745
1727
|
name: "shuchujiagongchengxu",
|
|
1746
1728
|
size: "34"
|
|
1747
1729
|
})
|
|
1748
1730
|
]),
|
|
1749
|
-
|
|
1750
|
-
|
|
1731
|
+
u("div", Qe, [
|
|
1732
|
+
D(z, {
|
|
1751
1733
|
name: "donghuafangzhen",
|
|
1752
1734
|
size: "24",
|
|
1753
|
-
onClick:
|
|
1735
|
+
onClick: Dt,
|
|
1754
1736
|
title: "重置"
|
|
1755
1737
|
}),
|
|
1756
|
-
|
|
1738
|
+
D(z, {
|
|
1757
1739
|
name: "fangda",
|
|
1758
1740
|
size: "24",
|
|
1759
1741
|
title: "放大"
|
|
1760
1742
|
}),
|
|
1761
|
-
|
|
1743
|
+
D(z, {
|
|
1762
1744
|
name: "suoxiao",
|
|
1763
1745
|
size: "24",
|
|
1764
1746
|
title: "缩小"
|
|
1765
1747
|
}),
|
|
1766
|
-
|
|
1748
|
+
D(z, {
|
|
1767
1749
|
name: "donghuafangzhen",
|
|
1768
1750
|
size: "24",
|
|
1769
|
-
onClick:
|
|
1770
|
-
title:
|
|
1751
|
+
onClick: O(h),
|
|
1752
|
+
title: O(G) ? "停止动画" : "动画视图"
|
|
1771
1753
|
}, null, 8, ["onClick", "title"])
|
|
1772
1754
|
]),
|
|
1773
|
-
|
|
1774
|
-
|
|
1755
|
+
u("div", ti, [
|
|
1756
|
+
D(z, {
|
|
1775
1757
|
name: "jiegoushu",
|
|
1776
1758
|
size: "24",
|
|
1777
|
-
onClick:
|
|
1778
|
-
active:
|
|
1759
|
+
onClick: c[0] || (c[0] = (B) => Q("场景树")),
|
|
1760
|
+
active: M.value && v.value === "场景树"
|
|
1779
1761
|
}, null, 8, ["active"]),
|
|
1780
|
-
|
|
1762
|
+
D(z, {
|
|
1781
1763
|
name: "donghuafangzhen",
|
|
1782
1764
|
size: "24",
|
|
1783
|
-
onClick:
|
|
1784
|
-
active:
|
|
1765
|
+
onClick: c[1] || (c[1] = (B) => Q("剖面图")),
|
|
1766
|
+
active: M.value && v.value === "剖面图"
|
|
1785
1767
|
}, null, 8, ["active"]),
|
|
1786
|
-
|
|
1768
|
+
D(z, {
|
|
1787
1769
|
name: "donghuafangzhen",
|
|
1788
1770
|
size: "24",
|
|
1789
|
-
onClick:
|
|
1771
|
+
onClick: c[2] || (c[2] = (B) => Q("场景树3"))
|
|
1790
1772
|
}),
|
|
1791
|
-
|
|
1773
|
+
D(z, {
|
|
1792
1774
|
name: "donghuafangzhen",
|
|
1793
1775
|
size: "24",
|
|
1794
|
-
onClick:
|
|
1776
|
+
onClick: c[3] || (c[3] = (B) => Q("场景4"))
|
|
1795
1777
|
})
|
|
1796
1778
|
]),
|
|
1797
|
-
|
|
1798
|
-
|
|
1779
|
+
u("div", ei, [
|
|
1780
|
+
D(z, {
|
|
1799
1781
|
name: "donghuafangzhen",
|
|
1800
1782
|
size: "24"
|
|
1801
1783
|
}),
|
|
1802
|
-
|
|
1784
|
+
D(z, {
|
|
1803
1785
|
name: "donghuafangzhen",
|
|
1804
1786
|
size: "24"
|
|
1805
1787
|
}),
|
|
1806
|
-
|
|
1788
|
+
D(z, {
|
|
1807
1789
|
name: "guanjiekongzhi",
|
|
1808
1790
|
size: "24",
|
|
1809
|
-
onClick:
|
|
1810
|
-
active:
|
|
1791
|
+
onClick: c[4] || (c[4] = (B) => At("关节控制")),
|
|
1792
|
+
active: _.value && C.value === "关节控制"
|
|
1811
1793
|
}, null, 8, ["active"]),
|
|
1812
|
-
|
|
1794
|
+
D(z, {
|
|
1813
1795
|
name: "donghuafangzhen",
|
|
1814
1796
|
size: "24"
|
|
1815
1797
|
}),
|
|
1816
|
-
|
|
1798
|
+
D(z, {
|
|
1817
1799
|
name: "donghuafangzhen",
|
|
1818
1800
|
size: "24"
|
|
1819
1801
|
}),
|
|
1820
|
-
|
|
1802
|
+
D(z, {
|
|
1821
1803
|
name: "donghuafangzhen",
|
|
1822
1804
|
size: "24"
|
|
1823
1805
|
})
|
|
1824
1806
|
]),
|
|
1825
|
-
X(
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1807
|
+
X(u("div", ii, [
|
|
1808
|
+
u("div", oi, [
|
|
1809
|
+
u("span", null, Y(v.value), 1),
|
|
1810
|
+
u("span", {
|
|
1829
1811
|
class: "close",
|
|
1830
|
-
onClick:
|
|
1812
|
+
onClick: c[5] || (c[5] = (B) => M.value = !1)
|
|
1831
1813
|
}, " X ")
|
|
1832
1814
|
]),
|
|
1833
|
-
|
|
1815
|
+
D(V, { "max-height": "650px" }, {
|
|
1834
1816
|
default: mt(() => [
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
p("div", hi, [
|
|
1841
|
-
p("label", di, [
|
|
1842
|
-
X(p("input", {
|
|
1817
|
+
v.value === "场景树" ? (j(), Gt(Ee, { key: 0 })) : q("", !0),
|
|
1818
|
+
v.value === "剖面图" ? (j(), F("div", ni, [
|
|
1819
|
+
u("div", ai, [
|
|
1820
|
+
u("label", si, [
|
|
1821
|
+
X(u("input", {
|
|
1843
1822
|
type: "radio",
|
|
1844
1823
|
name: "clipping-axis",
|
|
1845
1824
|
value: "none",
|
|
1846
|
-
"onUpdate:modelValue":
|
|
1847
|
-
onChange:
|
|
1825
|
+
"onUpdate:modelValue": c[6] || (c[6] = (B) => tt(n) ? n.value = B : null),
|
|
1826
|
+
onChange: c[7] || (c[7] = (...B) => O(E) && O(E)(...B))
|
|
1848
1827
|
}, null, 544), [
|
|
1849
|
-
[
|
|
1828
|
+
[et, O(n)]
|
|
1850
1829
|
]),
|
|
1851
|
-
|
|
1830
|
+
c[15] || (c[15] = u("span", { class: "radio-text" }, "无切割", -1))
|
|
1852
1831
|
]),
|
|
1853
|
-
|
|
1854
|
-
X(
|
|
1832
|
+
u("label", ri, [
|
|
1833
|
+
X(u("input", {
|
|
1855
1834
|
type: "radio",
|
|
1856
1835
|
name: "clipping-axis",
|
|
1857
1836
|
value: "x",
|
|
1858
|
-
"onUpdate:modelValue":
|
|
1859
|
-
onChange:
|
|
1837
|
+
"onUpdate:modelValue": c[8] || (c[8] = (B) => tt(n) ? n.value = B : null),
|
|
1838
|
+
onChange: c[9] || (c[9] = (...B) => O(E) && O(E)(...B))
|
|
1860
1839
|
}, null, 544), [
|
|
1861
|
-
[
|
|
1840
|
+
[et, O(n)]
|
|
1862
1841
|
]),
|
|
1863
|
-
|
|
1842
|
+
c[16] || (c[16] = u("span", { class: "radio-text" }, "X轴切割", -1))
|
|
1864
1843
|
]),
|
|
1865
|
-
|
|
1866
|
-
X(
|
|
1844
|
+
u("label", li, [
|
|
1845
|
+
X(u("input", {
|
|
1867
1846
|
type: "radio",
|
|
1868
1847
|
name: "clipping-axis",
|
|
1869
1848
|
value: "y",
|
|
1870
|
-
"onUpdate:modelValue":
|
|
1871
|
-
onChange:
|
|
1849
|
+
"onUpdate:modelValue": c[10] || (c[10] = (B) => tt(n) ? n.value = B : null),
|
|
1850
|
+
onChange: c[11] || (c[11] = (...B) => O(E) && O(E)(...B))
|
|
1872
1851
|
}, null, 544), [
|
|
1873
|
-
[
|
|
1852
|
+
[et, O(n)]
|
|
1874
1853
|
]),
|
|
1875
|
-
|
|
1854
|
+
c[17] || (c[17] = u("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
1876
1855
|
]),
|
|
1877
|
-
|
|
1878
|
-
X(
|
|
1856
|
+
u("label", hi, [
|
|
1857
|
+
X(u("input", {
|
|
1879
1858
|
type: "radio",
|
|
1880
1859
|
name: "clipping-axis",
|
|
1881
1860
|
value: "z",
|
|
1882
|
-
"onUpdate:modelValue":
|
|
1883
|
-
onChange:
|
|
1861
|
+
"onUpdate:modelValue": c[12] || (c[12] = (B) => tt(n) ? n.value = B : null),
|
|
1862
|
+
onChange: c[13] || (c[13] = (...B) => O(E) && O(E)(...B))
|
|
1884
1863
|
}, null, 544), [
|
|
1885
|
-
[
|
|
1864
|
+
[et, O(n)]
|
|
1886
1865
|
]),
|
|
1887
|
-
|
|
1866
|
+
c[18] || (c[18] = u("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
1888
1867
|
])
|
|
1889
1868
|
])
|
|
1890
1869
|
])) : q("", !0)
|
|
@@ -1892,37 +1871,37 @@ const C = /* @__PURE__ */ Q(le, [["render", ti], ["__scopeId", "data-v-1f76fc63"
|
|
|
1892
1871
|
_: 1
|
|
1893
1872
|
})
|
|
1894
1873
|
], 512), [
|
|
1895
|
-
[ft,
|
|
1874
|
+
[ft, M.value]
|
|
1896
1875
|
]),
|
|
1897
|
-
X(
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1876
|
+
X(u("div", di, [
|
|
1877
|
+
u("div", _i, [
|
|
1878
|
+
u("span", null, Y(C.value), 1),
|
|
1879
|
+
u("span", {
|
|
1901
1880
|
class: "close",
|
|
1902
|
-
onClick:
|
|
1881
|
+
onClick: c[14] || (c[14] = (B) => _.value = !1)
|
|
1903
1882
|
}, " X ")
|
|
1904
1883
|
]),
|
|
1905
|
-
|
|
1884
|
+
D(V, { "max-height": "650px" }, {
|
|
1906
1885
|
default: mt(() => [
|
|
1907
|
-
|
|
1886
|
+
C.value === "关节控制" ? (j(), Gt(Ke, {
|
|
1908
1887
|
key: 0,
|
|
1909
|
-
model:
|
|
1910
|
-
scene:
|
|
1888
|
+
model: O(Z),
|
|
1889
|
+
scene: O(e)
|
|
1911
1890
|
}, null, 8, ["model", "scene"])) : q("", !0)
|
|
1912
1891
|
]),
|
|
1913
1892
|
_: 1
|
|
1914
1893
|
})
|
|
1915
1894
|
], 512), [
|
|
1916
|
-
[ft,
|
|
1895
|
+
[ft, _.value]
|
|
1917
1896
|
]),
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1897
|
+
J.value ? (j(), F("div", ci, [
|
|
1898
|
+
c[19] || (c[19] = u("div", { class: "loading-spinner" }, null, -1)),
|
|
1899
|
+
u("p", null, Y(f.value), 1)
|
|
1921
1900
|
])) : q("", !0)
|
|
1922
1901
|
]);
|
|
1923
1902
|
};
|
|
1924
1903
|
}
|
|
1925
|
-
},
|
|
1904
|
+
}, mi = /* @__PURE__ */ st(Pi, [["__scopeId", "data-v-506601a0"]]);
|
|
1926
1905
|
export {
|
|
1927
|
-
|
|
1906
|
+
mi as default
|
|
1928
1907
|
};
|