ss-component-new 1.1.606 → 1.1.607
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-mnEYd91h.cjs → array-C1gcNGaP.cjs} +1 -1
- package/dist/{array-wJSGLzMi.js → array-CaisX3_y.js} +1 -1
- package/dist/{index-jvd5BlOv.js → index-2Wg02nub.js} +3 -3
- package/dist/index-2tDhJ_PE.cjs +74 -0
- package/dist/{index-c4UWXgJ5.js → index-B1cMw_e2.js} +1 -1
- package/dist/{index-aN0VV7Zn.js → index-B807Lss8.js} +5 -5
- package/dist/{index-bIDRuygJ.cjs → index-BB7D-KhK.cjs} +1 -1
- package/dist/{index-CE-DNAtJ.cjs → index-BE4_rScS.cjs} +1 -1
- package/dist/{index-BJi_ECqJ.cjs → index-BJT2Fp0F.cjs} +1 -1
- package/dist/{index-DrhupII9.js → index-BK5LNaz2.js} +3 -3
- package/dist/{index-BhXpwWAD.cjs → index-BLu4cCOv.cjs} +1 -1
- package/dist/{index-Bjt9Z3fS.cjs → index-BO2NNsQ3.cjs} +1 -1
- package/dist/{index-CU4BTXX-.js → index-BXKDfdBV.js} +8 -8
- package/dist/{index-CbVh7iYe.cjs → index-BgX_ia5H.cjs} +1 -1
- package/dist/{index-CotWSnUo.cjs → index-BhfNBV_Y.cjs} +1 -1
- package/dist/{index-BC4hSmTX.js → index-BibVOdJy.js} +8 -8
- package/dist/{index-z1u39i0Q.js → index-BlEsLLOQ.js} +3 -3
- package/dist/{index-tyS8Rj1b.js → index-BmzN-3ze.js} +5 -5
- package/dist/{index-Dm8EQvZF.cjs → index-Bn3uMi-8.cjs} +1 -1
- package/dist/{index-CzWCAX1b.cjs → index-BsQ8_gbw.cjs} +1 -1
- package/dist/{index-iHoBtKmr.cjs → index-CEoanfoT.cjs} +1 -1
- package/dist/{index-jHcoE1qf.js → index-CV9GhHVQ.js} +13 -13
- package/dist/{index-D6yG43aH.js → index-CVee1Bur.js} +6 -6
- package/dist/{index-Bri22Psu.cjs → index-Cplpn8hS.cjs} +1 -1
- package/dist/{index-DOiC1373.cjs → index-CrE-2oNV.cjs} +1 -1
- package/dist/{index-A71k9Ayg.cjs → index-Cuz54Fkl.cjs} +1 -1
- package/dist/{index-C5sVMpe2.cjs → index-CxutEIsS.cjs} +1 -1
- package/dist/{index-DKitGEDC.js → index-D-gtCink.js} +4 -4
- package/dist/{index-DzDj_Ns3.cjs → index-D8E80dju.cjs} +1 -1
- package/dist/{index-BOb-2bQ6.js → index-D8wJ8OVO.js} +2 -2
- package/dist/{index-5CvXwzwG.cjs → index-DB2epzvg.cjs} +1 -1
- package/dist/{index-BvUkcdeg.js → index-DFX5NE_3.js} +3 -3
- package/dist/{index-CK23RDAu.cjs → index-DGCcBd5v.cjs} +1 -1
- package/dist/{index-CMcDLpN5.js → index-DKk2Yk2F.js} +4 -4
- package/dist/{index-FXurbsHT.js → index-DLSzOar0.js} +4 -4
- package/dist/{index-BYOudw8N.cjs → index-Df6NZqSR.cjs} +1 -1
- package/dist/{index-C-NWHxhY.js → index-Dn4SxfsB.js} +4 -4
- package/dist/{index-DYwU_QaV.cjs → index-DsUHBIBK.cjs} +1 -1
- package/dist/{index-XeUoua9q.js → index-DsYFSymz.js} +4 -4
- package/dist/{index-B0YcRdR9.cjs → index-DyxA9Pwa.cjs} +1 -1
- package/dist/{index-rov_SSH0.js → index-GsF9RQ1o.js} +5 -5
- package/dist/{index-CmXpvujN.js → index-HkaBIp59.js} +1 -1
- package/dist/{index-CWY51WH6.js → index-MFHk1eEx.js} +4 -4
- package/dist/{index-DeMFCnys.js → index-S1z7XnLi.js} +3 -3
- package/dist/{index-Bkm9CeI0.js → index-V9vs-ScR.js} +1 -1
- package/dist/{index-BIRuU8z8.js → index-Y9kXXuBJ.js} +4 -4
- package/dist/{index-Cnd5Q6NW.js → index-Z04SVHEk.js} +1 -1
- package/dist/{index-CJ_rdkr8.js → index-hBF27unU.js} +7021 -7051
- package/dist/{index-DtRndrC8.cjs → index-hNt29cU7.cjs} +1 -1
- package/dist/{index-DTZhFQHd.cjs → index-rTgVjPGa.cjs} +1 -1
- package/dist/{index-85WaQkGF.cjs → index-uYHnI5wK.cjs} +1 -1
- package/dist/{index-l52VRsV3.cjs → index-v95HBZGa.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-B7vWHeIj.cjs → index.vue_vue_type_script_setup_true_lang-CeNJa0E4.cjs} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-DRLcD2rZ.js → index.vue_vue_type_script_setup_true_lang-DBVpFaiR.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CixHWeC-.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CJBQxdRk.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtG0TYo3.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dz4Fg0J1.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-ASSo2Hye.cjs → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-Biklcd9I.cjs} +9 -9
- package/dist/{index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-C6BRqqE9.js → index.vue_vue_type_style_index_0_scoped_1ee6cc73_lang-C5-XfA7-.js} +2090 -2084
- package/dist/{index.vue_vue_type_style_index_0_scoped_9a453346_lang-BYz6fW8p.cjs → index.vue_vue_type_style_index_0_scoped_9a453346_lang-C1BOdGun.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_9a453346_lang-kDCmh28Z.js → index.vue_vue_type_style_index_0_scoped_9a453346_lang-DgHSOxfw.js} +8 -8
- package/dist/{login-afGmER0u.js → login-B63LEngH.js} +1 -1
- package/dist/{login-BBvcYktp.cjs → login-Db7lD3cs.cjs} +1 -1
- package/dist/{main-D8boH0D-.cjs → main-B_yFDeIi.cjs} +1 -1
- package/dist/{main-aE5taVmN.js → main-DjbrOkYk.js} +5 -5
- package/dist/{menu-DYsWoy6Z.cjs → menu-1olc0mrV.cjs} +9 -9
- package/dist/{menu-Qw1eGtzq.js → menu-BxkEScwt.js} +201 -199
- package/dist/{modelComp-y7HaQuVQ.js → modelComp-Bj7Q1JDt.js} +1 -1
- package/dist/{modelComp-8s0tWZDU.cjs → modelComp-C5jCD_od.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +9 -9
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +9 -9
- package/dist/{threeModel-CFZVlfLq.cjs → threeModel-BFW_sW2p.cjs} +1 -1
- package/dist/{threeModel-osVTVLWn.js → threeModel-CGO5VFhW.js} +142 -142
- package/package.json +1 -1
- package/dist/index-RFCzxTjm.cjs +0 -87
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as D, watch as xe, createElementBlock as J, openBlock as X, createBlock as He, computed as pe, resolveComponent as Ke, createVNode as k, onMounted as Xe, onUnmounted as Qe, Fragment as et, renderList as tt, createElementVNode as P, createCommentVNode as we, toDisplayString as le, defineComponent as st, normalizeStyle as je, normalizeClass as Ie, nextTick as Fe, onBeforeUnmount as it, withDirectives as ce, unref as Z, withCtx as Ne, isRef as _e, vModelRadio as ge, vShow as ye } from "vue";
|
|
2
|
-
import { E as
|
|
2
|
+
import { E as ot, V as y, M as he, T as ue, Q as Ue, F as Ye, G as ie, R as at, P as Pe, H as $e, J as Ee, K as nt, L as lt, N as rt, W as ct, O as ht, U as ut, X as pt, Y as dt, Z as mt, _ as Me, $ as ft, a0 as ze, a1 as _t, a2 as Se, a3 as gt, a4 as Ve, a5 as Ge, a6 as Je, a7 as ke, D as yt, a8 as me, a9 as vt, aa as bt, ab as wt } from "./index-Y9kXXuBJ.js";
|
|
3
3
|
import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { c as We } from "./menu-
|
|
5
|
-
const Be = { type: "change" }, Le = { type: "start" }, qe = { type: "end" }, ve = new
|
|
4
|
+
import { c as We } from "./menu-BxkEScwt.js";
|
|
5
|
+
const Be = { type: "change" }, Le = { type: "start" }, qe = { type: "end" }, ve = new at(), Ze = new Pe(), Pt = Math.cos(70 * $e.DEG2RAD), V = new y(), G = 2 * Math.PI, A = {
|
|
6
6
|
NONE: -1,
|
|
7
7
|
ROTATE: 0,
|
|
8
8
|
DOLLY: 1,
|
|
@@ -12,7 +12,7 @@ const Be = { type: "change" }, Le = { type: "start" }, qe = { type: "end" }, ve
|
|
|
12
12
|
TOUCH_DOLLY_PAN: 5,
|
|
13
13
|
TOUCH_DOLLY_ROTATE: 6
|
|
14
14
|
}, Ae = 1e-6;
|
|
15
|
-
class Mt extends
|
|
15
|
+
class Mt extends ot {
|
|
16
16
|
/**
|
|
17
17
|
* Constructs a new controls instance.
|
|
18
18
|
*
|
|
@@ -86,8 +86,8 @@ class Mt extends at {
|
|
|
86
86
|
update(e = null) {
|
|
87
87
|
const t = this.object.position;
|
|
88
88
|
V.copy(t).sub(this.target), V.applyQuaternion(this._quat), this._spherical.setFromVector3(V), this.autoRotate && this.state === A.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), 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);
|
|
89
|
-
let i = this.minAzimuthAngle,
|
|
90
|
-
isFinite(i) && isFinite(
|
|
89
|
+
let i = this.minAzimuthAngle, a = this.maxAzimuthAngle;
|
|
90
|
+
isFinite(i) && isFinite(a) && (i < -Math.PI ? i += G : i > Math.PI && (i -= G), a < -Math.PI ? a += G : a > Math.PI && (a -= G), i <= a ? this._spherical.theta = Math.max(i, Math.min(a, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (i + a) / 2 ? Math.max(i, this._spherical.theta) : Math.min(a, 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);
|
|
91
91
|
let p = !1;
|
|
92
92
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
93
93
|
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
@@ -141,8 +141,8 @@ class Mt extends at {
|
|
|
141
141
|
_pan(e, t) {
|
|
142
142
|
const i = this.domElement;
|
|
143
143
|
if (this.object.isPerspectiveCamera) {
|
|
144
|
-
const
|
|
145
|
-
V.copy(
|
|
144
|
+
const a = this.object.position;
|
|
145
|
+
V.copy(a).sub(this.target);
|
|
146
146
|
let p = V.length();
|
|
147
147
|
p *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * p / i.clientHeight, this.object.matrix), this._panUp(2 * t * p / i.clientHeight, this.object.matrix);
|
|
148
148
|
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / i.clientWidth, this.object.matrix), this._panUp(t * (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);
|
|
@@ -157,8 +157,8 @@ class Mt extends at {
|
|
|
157
157
|
if (!this.zoomToCursor)
|
|
158
158
|
return;
|
|
159
159
|
this._performCursorZoom = !0;
|
|
160
|
-
const i = this.domElement.getBoundingClientRect(),
|
|
161
|
-
this._mouse.x =
|
|
160
|
+
const i = this.domElement.getBoundingClientRect(), a = e - i.left, p = t - i.top, v = i.width, n = i.height;
|
|
161
|
+
this._mouse.x = a / v * 2 - 1, this._mouse.y = -(p / n) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
|
|
162
162
|
}
|
|
163
163
|
_clampDistance(e) {
|
|
164
164
|
return Math.max(this.minDistance, Math.min(this.maxDistance, e));
|
|
@@ -211,20 +211,20 @@ class Mt extends at {
|
|
|
211
211
|
if (this._pointers.length === 1)
|
|
212
212
|
this._rotateStart.set(e.pageX, e.pageY);
|
|
213
213
|
else {
|
|
214
|
-
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x),
|
|
215
|
-
this._rotateStart.set(i,
|
|
214
|
+
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x), a = 0.5 * (e.pageY + t.y);
|
|
215
|
+
this._rotateStart.set(i, a);
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
_handleTouchStartPan(e) {
|
|
219
219
|
if (this._pointers.length === 1)
|
|
220
220
|
this._panStart.set(e.pageX, e.pageY);
|
|
221
221
|
else {
|
|
222
|
-
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x),
|
|
223
|
-
this._panStart.set(i,
|
|
222
|
+
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x), a = 0.5 * (e.pageY + t.y);
|
|
223
|
+
this._panStart.set(i, a);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
_handleTouchStartDolly(e) {
|
|
227
|
-
const t = this._getSecondPointerPosition(e), i = e.pageX - t.x,
|
|
227
|
+
const t = this._getSecondPointerPosition(e), i = e.pageX - t.x, a = e.pageY - t.y, p = Math.sqrt(i * i + a * a);
|
|
228
228
|
this._dollyStart.set(0, p);
|
|
229
229
|
}
|
|
230
230
|
_handleTouchStartDollyPan(e) {
|
|
@@ -237,8 +237,8 @@ class Mt extends at {
|
|
|
237
237
|
if (this._pointers.length == 1)
|
|
238
238
|
this._rotateEnd.set(e.pageX, e.pageY);
|
|
239
239
|
else {
|
|
240
|
-
const i = this._getSecondPointerPosition(e),
|
|
241
|
-
this._rotateEnd.set(
|
|
240
|
+
const i = this._getSecondPointerPosition(e), a = 0.5 * (e.pageX + i.x), p = 0.5 * (e.pageY + i.y);
|
|
241
|
+
this._rotateEnd.set(a, p);
|
|
242
242
|
}
|
|
243
243
|
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
244
244
|
const t = this.domElement;
|
|
@@ -248,13 +248,13 @@ class Mt extends at {
|
|
|
248
248
|
if (this._pointers.length === 1)
|
|
249
249
|
this._panEnd.set(e.pageX, e.pageY);
|
|
250
250
|
else {
|
|
251
|
-
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x),
|
|
252
|
-
this._panEnd.set(i,
|
|
251
|
+
const t = this._getSecondPointerPosition(e), i = 0.5 * (e.pageX + t.x), a = 0.5 * (e.pageY + t.y);
|
|
252
|
+
this._panEnd.set(i, a);
|
|
253
253
|
}
|
|
254
254
|
this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
|
|
255
255
|
}
|
|
256
256
|
_handleTouchMoveDolly(e) {
|
|
257
|
-
const t = this._getSecondPointerPosition(e), i = e.pageX - t.x,
|
|
257
|
+
const t = this._getSecondPointerPosition(e), i = e.pageX - t.x, a = e.pageY - t.y, p = Math.sqrt(i * i + a * a);
|
|
258
258
|
this._dollyEnd.set(0, p), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
|
|
259
259
|
const v = (e.pageX + t.x) * 0.5, n = (e.pageY + t.y) * 0.5;
|
|
260
260
|
this._updateZoomParameters(v, n);
|
|
@@ -308,16 +308,16 @@ class Mt extends at {
|
|
|
308
308
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
function xt(
|
|
312
|
-
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(
|
|
311
|
+
function xt(o) {
|
|
312
|
+
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)));
|
|
313
313
|
}
|
|
314
|
-
function Et(
|
|
315
|
-
this.enabled !== !1 && (
|
|
314
|
+
function Et(o) {
|
|
315
|
+
this.enabled !== !1 && (o.pointerType === "touch" ? this._onTouchMove(o) : this._onMouseMove(o));
|
|
316
316
|
}
|
|
317
|
-
function Dt(
|
|
318
|
-
switch (this._removePointer(
|
|
317
|
+
function Dt(o) {
|
|
318
|
+
switch (this._removePointer(o), this._pointers.length) {
|
|
319
319
|
case 0:
|
|
320
|
-
this.domElement.releasePointerCapture(
|
|
320
|
+
this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(qe), this.state = A.NONE;
|
|
321
321
|
break;
|
|
322
322
|
case 1:
|
|
323
323
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
|
@@ -325,9 +325,9 @@ function Dt(a) {
|
|
|
325
325
|
break;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function Tt(
|
|
328
|
+
function Tt(o) {
|
|
329
329
|
let e;
|
|
330
|
-
switch (
|
|
330
|
+
switch (o.button) {
|
|
331
331
|
case 0:
|
|
332
332
|
e = this.mouseButtons.LEFT;
|
|
333
333
|
break;
|
|
@@ -343,24 +343,24 @@ function Tt(a) {
|
|
|
343
343
|
switch (e) {
|
|
344
344
|
case he.DOLLY:
|
|
345
345
|
if (this.enableZoom === !1) return;
|
|
346
|
-
this._handleMouseDownDolly(
|
|
346
|
+
this._handleMouseDownDolly(o), this.state = A.DOLLY;
|
|
347
347
|
break;
|
|
348
348
|
case he.ROTATE:
|
|
349
|
-
if (
|
|
349
|
+
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
350
350
|
if (this.enablePan === !1) return;
|
|
351
|
-
this._handleMouseDownPan(
|
|
351
|
+
this._handleMouseDownPan(o), this.state = A.PAN;
|
|
352
352
|
} else {
|
|
353
353
|
if (this.enableRotate === !1) return;
|
|
354
|
-
this._handleMouseDownRotate(
|
|
354
|
+
this._handleMouseDownRotate(o), this.state = A.ROTATE;
|
|
355
355
|
}
|
|
356
356
|
break;
|
|
357
357
|
case he.PAN:
|
|
358
|
-
if (
|
|
358
|
+
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
359
359
|
if (this.enableRotate === !1) return;
|
|
360
|
-
this._handleMouseDownRotate(
|
|
360
|
+
this._handleMouseDownRotate(o), this.state = A.ROTATE;
|
|
361
361
|
} else {
|
|
362
362
|
if (this.enablePan === !1) return;
|
|
363
|
-
this._handleMouseDownPan(
|
|
363
|
+
this._handleMouseDownPan(o), this.state = A.PAN;
|
|
364
364
|
}
|
|
365
365
|
break;
|
|
366
366
|
default:
|
|
@@ -368,39 +368,39 @@ function Tt(a) {
|
|
|
368
368
|
}
|
|
369
369
|
this.state !== A.NONE && this.dispatchEvent(Le);
|
|
370
370
|
}
|
|
371
|
-
function Ct(
|
|
371
|
+
function Ct(o) {
|
|
372
372
|
switch (this.state) {
|
|
373
373
|
case A.ROTATE:
|
|
374
374
|
if (this.enableRotate === !1) return;
|
|
375
|
-
this._handleMouseMoveRotate(
|
|
375
|
+
this._handleMouseMoveRotate(o);
|
|
376
376
|
break;
|
|
377
377
|
case A.DOLLY:
|
|
378
378
|
if (this.enableZoom === !1) return;
|
|
379
|
-
this._handleMouseMoveDolly(
|
|
379
|
+
this._handleMouseMoveDolly(o);
|
|
380
380
|
break;
|
|
381
381
|
case A.PAN:
|
|
382
382
|
if (this.enablePan === !1) return;
|
|
383
|
-
this._handleMouseMovePan(
|
|
383
|
+
this._handleMouseMovePan(o);
|
|
384
384
|
break;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
|
-
function St(
|
|
388
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== A.NONE || (
|
|
387
|
+
function St(o) {
|
|
388
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== A.NONE || (o.preventDefault(), this.dispatchEvent(Le), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(qe));
|
|
389
389
|
}
|
|
390
|
-
function kt(
|
|
391
|
-
this.enabled !== !1 && this._handleKeyDown(
|
|
390
|
+
function kt(o) {
|
|
391
|
+
this.enabled !== !1 && this._handleKeyDown(o);
|
|
392
392
|
}
|
|
393
|
-
function At(
|
|
394
|
-
switch (this._trackPointer(
|
|
393
|
+
function At(o) {
|
|
394
|
+
switch (this._trackPointer(o), this._pointers.length) {
|
|
395
395
|
case 1:
|
|
396
396
|
switch (this.touches.ONE) {
|
|
397
397
|
case ue.ROTATE:
|
|
398
398
|
if (this.enableRotate === !1) return;
|
|
399
|
-
this._handleTouchStartRotate(
|
|
399
|
+
this._handleTouchStartRotate(o), this.state = A.TOUCH_ROTATE;
|
|
400
400
|
break;
|
|
401
401
|
case ue.PAN:
|
|
402
402
|
if (this.enablePan === !1) return;
|
|
403
|
-
this._handleTouchStartPan(
|
|
403
|
+
this._handleTouchStartPan(o), this.state = A.TOUCH_PAN;
|
|
404
404
|
break;
|
|
405
405
|
default:
|
|
406
406
|
this.state = A.NONE;
|
|
@@ -410,11 +410,11 @@ function At(a) {
|
|
|
410
410
|
switch (this.touches.TWO) {
|
|
411
411
|
case ue.DOLLY_PAN:
|
|
412
412
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
413
|
-
this._handleTouchStartDollyPan(
|
|
413
|
+
this._handleTouchStartDollyPan(o), this.state = A.TOUCH_DOLLY_PAN;
|
|
414
414
|
break;
|
|
415
415
|
case ue.DOLLY_ROTATE:
|
|
416
416
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
417
|
-
this._handleTouchStartDollyRotate(
|
|
417
|
+
this._handleTouchStartDollyRotate(o), this.state = A.TOUCH_DOLLY_ROTATE;
|
|
418
418
|
break;
|
|
419
419
|
default:
|
|
420
420
|
this.state = A.NONE;
|
|
@@ -425,51 +425,51 @@ function At(a) {
|
|
|
425
425
|
}
|
|
426
426
|
this.state !== A.NONE && this.dispatchEvent(Le);
|
|
427
427
|
}
|
|
428
|
-
function Rt(
|
|
429
|
-
switch (this._trackPointer(
|
|
428
|
+
function Rt(o) {
|
|
429
|
+
switch (this._trackPointer(o), this.state) {
|
|
430
430
|
case A.TOUCH_ROTATE:
|
|
431
431
|
if (this.enableRotate === !1) return;
|
|
432
|
-
this._handleTouchMoveRotate(
|
|
432
|
+
this._handleTouchMoveRotate(o), this.update();
|
|
433
433
|
break;
|
|
434
434
|
case A.TOUCH_PAN:
|
|
435
435
|
if (this.enablePan === !1) return;
|
|
436
|
-
this._handleTouchMovePan(
|
|
436
|
+
this._handleTouchMovePan(o), this.update();
|
|
437
437
|
break;
|
|
438
438
|
case A.TOUCH_DOLLY_PAN:
|
|
439
439
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
440
|
-
this._handleTouchMoveDollyPan(
|
|
440
|
+
this._handleTouchMoveDollyPan(o), this.update();
|
|
441
441
|
break;
|
|
442
442
|
case A.TOUCH_DOLLY_ROTATE:
|
|
443
443
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
444
|
-
this._handleTouchMoveDollyRotate(
|
|
444
|
+
this._handleTouchMoveDollyRotate(o), this.update();
|
|
445
445
|
break;
|
|
446
446
|
default:
|
|
447
447
|
this.state = A.NONE;
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function zt(
|
|
451
|
-
this.enabled !== !1 &&
|
|
450
|
+
function zt(o) {
|
|
451
|
+
this.enabled !== !1 && o.preventDefault();
|
|
452
452
|
}
|
|
453
|
-
function Lt(
|
|
454
|
-
|
|
453
|
+
function Lt(o) {
|
|
454
|
+
o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
455
455
|
}
|
|
456
|
-
function Ot(
|
|
457
|
-
|
|
456
|
+
function Ot(o) {
|
|
457
|
+
o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
458
458
|
}
|
|
459
|
-
function jt(
|
|
460
|
-
let e = null, t = null, i = null,
|
|
459
|
+
function jt(o) {
|
|
460
|
+
let e = null, t = null, i = null, a = null, p = null, v = null, n = null, E = null;
|
|
461
461
|
const x = D([]), z = D(new y()), O = D(new y()), F = () => {
|
|
462
|
-
if (!
|
|
462
|
+
if (!o.value) return;
|
|
463
463
|
e = new nt(), e.background = new lt(15790320);
|
|
464
|
-
const m =
|
|
464
|
+
const m = o.value;
|
|
465
465
|
t = new rt(75, m.clientWidth / m.clientHeight, 0.1, 1e4), t.position.set(8, -8, 6), t.up.set(0, 0, 1), t.lookAt(0, 0, 0), i = new ct({
|
|
466
466
|
antialias: !0,
|
|
467
467
|
alpha: !0
|
|
468
|
-
}), i.setSize(m.clientWidth, m.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = ht, i.toneMapping = ut, i.toneMappingExposure = 1, i.outputColorSpace = pt, m.appendChild(i.domElement),
|
|
468
|
+
}), i.setSize(m.clientWidth, m.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = ht, i.toneMapping = ut, i.toneMappingExposure = 1, i.outputColorSpace = pt, m.appendChild(i.domElement), a = new Mt(t, i.domElement), a.enableDamping = !0, a.dampingFactor = 0.05, a.mouseButtons = {
|
|
469
469
|
LEFT: null,
|
|
470
470
|
MIDDLE: he.PAN,
|
|
471
471
|
RIGHT: he.ROTATE
|
|
472
|
-
},
|
|
472
|
+
}, a.panSpeed = 0.7, p = new dt(t, i, {
|
|
473
473
|
container: m,
|
|
474
474
|
type: "cube",
|
|
475
475
|
placement: "top-right",
|
|
@@ -499,7 +499,7 @@ function jt(a) {
|
|
|
499
499
|
back: {
|
|
500
500
|
label: "Bottom"
|
|
501
501
|
}
|
|
502
|
-
}), p.attachControls(
|
|
502
|
+
}), p.attachControls(a), g(), s();
|
|
503
503
|
}, r = (m, u) => {
|
|
504
504
|
n && (e.remove(n), n.dispose()), E && (e.remove(E), E.geometry.dispose(), E.material.dispose());
|
|
505
505
|
const T = Math.min(Math.max(Math.floor(m / 20), 30), 40);
|
|
@@ -527,13 +527,13 @@ function jt(a) {
|
|
|
527
527
|
console.warn("无法计算包围盒,网格更新失败");
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
|
-
const T = m.getSize(new y()), B = m.getCenter(new y()), R = Math.max(T.x, T.y, T.z),
|
|
530
|
+
const T = m.getSize(new y()), B = m.getCenter(new y()), R = Math.max(T.x, T.y, T.z), oe = Math.max(R * 8, 50), N = new y(
|
|
531
531
|
B.x,
|
|
532
532
|
B.y,
|
|
533
533
|
m.min.z
|
|
534
534
|
// 模型的最底部
|
|
535
535
|
);
|
|
536
|
-
r(
|
|
536
|
+
r(oe, N);
|
|
537
537
|
}, g = () => {
|
|
538
538
|
const m = new _t(4210752, 0.6);
|
|
539
539
|
e.add(m);
|
|
@@ -545,12 +545,12 @@ function jt(a) {
|
|
|
545
545
|
B.position.set(0, -15, 2), e.add(B);
|
|
546
546
|
const R = new gt(16777215, 4473924, 0.8);
|
|
547
547
|
e.add(R);
|
|
548
|
-
const
|
|
549
|
-
|
|
548
|
+
const oe = new Ve(16777215, 1, 50);
|
|
549
|
+
oe.position.set(15, 15, 15), e.add(oe);
|
|
550
550
|
const N = new Ve(16777215, 0.5, 50);
|
|
551
551
|
N.position.set(-15, -15, 15), e.add(N);
|
|
552
552
|
}, s = () => {
|
|
553
|
-
v = requestAnimationFrame(s),
|
|
553
|
+
v = requestAnimationFrame(s), a && a.update(), i && e && t && i.render(e, t), p && p.render();
|
|
554
554
|
}, d = (m) => {
|
|
555
555
|
[
|
|
556
556
|
"map",
|
|
@@ -582,12 +582,12 @@ function jt(a) {
|
|
|
582
582
|
// 方法
|
|
583
583
|
initThreeJS: F,
|
|
584
584
|
handleResize: () => {
|
|
585
|
-
if (!
|
|
586
|
-
const m =
|
|
585
|
+
if (!o.value || !t || !i || !p) return;
|
|
586
|
+
const m = o.value, u = m.clientWidth, T = m.clientHeight;
|
|
587
587
|
t.aspect = u / T, t.updateProjectionMatrix(), i.setSize(u, T), p.update();
|
|
588
588
|
},
|
|
589
589
|
fitCameraToAllModels: (m) => {
|
|
590
|
-
if (!t || !
|
|
590
|
+
if (!t || !a || x.value.length === 0) return;
|
|
591
591
|
const u = new Ee();
|
|
592
592
|
let T = !1;
|
|
593
593
|
if (x.value.forEach((ee) => {
|
|
@@ -603,13 +603,13 @@ function jt(a) {
|
|
|
603
603
|
return;
|
|
604
604
|
}
|
|
605
605
|
const B = u.getSize(new y()), R = u.getCenter(new y()), N = Math.max(B.x, B.y, B.z) * 0.8, W = new y(R.x + N, R.y - N, R.z + N);
|
|
606
|
-
t.position.copy(W), t.lookAt(R),
|
|
606
|
+
t.position.copy(W), t.lookAt(R), a.target.copy(R), a.update(), z.value.copy(W), O.value.copy(R), S();
|
|
607
607
|
},
|
|
608
608
|
getThreeJSObjects: () => ({
|
|
609
609
|
scene: e,
|
|
610
610
|
camera: t,
|
|
611
611
|
renderer: i,
|
|
612
|
-
controls:
|
|
612
|
+
controls: a,
|
|
613
613
|
gizmo: p
|
|
614
614
|
}),
|
|
615
615
|
clearAllModels: () => {
|
|
@@ -625,14 +625,14 @@ function jt(a) {
|
|
|
625
625
|
}), x.value = [], S();
|
|
626
626
|
},
|
|
627
627
|
cleanup: () => {
|
|
628
|
-
v && cancelAnimationFrame(v), n && n.dispose(), E && (E.geometry.dispose(), E.material.dispose()), i && i.dispose(),
|
|
628
|
+
v && cancelAnimationFrame(v), n && n.dispose(), E && (E.geometry.dispose(), E.material.dispose()), i && i.dispose(), a && a.dispose(), p && p.dispose();
|
|
629
629
|
},
|
|
630
630
|
updateGridForModels: S
|
|
631
631
|
};
|
|
632
632
|
}
|
|
633
|
-
function It(
|
|
633
|
+
function It(o, e) {
|
|
634
634
|
const t = D(!1);
|
|
635
|
-
let i = null,
|
|
635
|
+
let i = null, a = 12700, p = new y(), v = new y(), n = new y(), E = 0, x = null;
|
|
636
636
|
const z = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, O = (s) => {
|
|
637
637
|
const d = new y(), w = E * 1.2, j = new y(n.x + w, n.y, n.z), $ = new y(n.x, n.y + w, n.z), Y = new y(n.x, n.y - w, n.z);
|
|
638
638
|
if (s <= 0.567) {
|
|
@@ -650,10 +650,10 @@ function It(a, e) {
|
|
|
650
650
|
}
|
|
651
651
|
return d;
|
|
652
652
|
}, F = () => {
|
|
653
|
-
const { camera: s, controls: d } =
|
|
653
|
+
const { camera: s, controls: d } = o();
|
|
654
654
|
if (!s || !d) return;
|
|
655
655
|
i || (i = Date.now());
|
|
656
|
-
const w = Date.now() - i, j = Math.min(w /
|
|
656
|
+
const w = Date.now() - i, j = Math.min(w / a, 1);
|
|
657
657
|
if (j >= 1) {
|
|
658
658
|
S();
|
|
659
659
|
return;
|
|
@@ -662,7 +662,7 @@ function It(a, e) {
|
|
|
662
662
|
s.position.copy($), s.lookAt(n), d.target.copy(n), x = requestAnimationFrame(F);
|
|
663
663
|
}, r = () => {
|
|
664
664
|
if (e.value.length === 0) return;
|
|
665
|
-
const { camera: s, controls: d } =
|
|
665
|
+
const { camera: s, controls: d } = o();
|
|
666
666
|
if (!s || !d) return;
|
|
667
667
|
p.copy(s.position), v.copy(d.target);
|
|
668
668
|
const w = new Ee();
|
|
@@ -680,7 +680,7 @@ function It(a, e) {
|
|
|
680
680
|
m();
|
|
681
681
|
}, S = () => {
|
|
682
682
|
t.value = !1, i = null, x && (cancelAnimationFrame(x), x = null);
|
|
683
|
-
const { controls: s } =
|
|
683
|
+
const { controls: s } = o();
|
|
684
684
|
s && (s.enabled = !0, s.target.copy(v));
|
|
685
685
|
};
|
|
686
686
|
return {
|
|
@@ -688,7 +688,7 @@ function It(a, e) {
|
|
|
688
688
|
toggleAnimation: () => {
|
|
689
689
|
if (t.value) {
|
|
690
690
|
t.value = !1, i = null, x && (cancelAnimationFrame(x), x = null);
|
|
691
|
-
const { camera: s, controls: d } =
|
|
691
|
+
const { camera: s, controls: d } = o();
|
|
692
692
|
if (!s || !d) return;
|
|
693
693
|
d.enabled = !0;
|
|
694
694
|
const w = s.position.clone(), j = d.target.clone(), $ = 1500, Y = Date.now(), H = () => {
|
|
@@ -703,11 +703,11 @@ function It(a, e) {
|
|
|
703
703
|
stopAnimation: S
|
|
704
704
|
};
|
|
705
705
|
}
|
|
706
|
-
function Ft(
|
|
706
|
+
function Ft(o, e) {
|
|
707
707
|
const t = D(!1), i = D("none");
|
|
708
|
-
let
|
|
708
|
+
let a = [], p = [], v = new Ee(), n = new y();
|
|
709
709
|
const E = () => {
|
|
710
|
-
|
|
710
|
+
a = [
|
|
711
711
|
new Pe(new y(1, 0, 0), 0),
|
|
712
712
|
// X轴平面
|
|
713
713
|
new Pe(new y(0, 1, 0), 0),
|
|
@@ -736,7 +736,7 @@ function Ft(a, e) {
|
|
|
736
736
|
return;
|
|
737
737
|
x();
|
|
738
738
|
let g = null;
|
|
739
|
-
if (i.value === "x" ? (
|
|
739
|
+
if (i.value === "x" ? (a[0].constant = -n.x, g = a[0]) : i.value === "y" ? (a[1].constant = -n.y, g = a[1]) : i.value === "z" && (a[2].constant = -n.z, g = a[2]), g) {
|
|
740
740
|
e.value.forEach((d) => {
|
|
741
741
|
d.traverse((w) => {
|
|
742
742
|
w.isMesh && w.material && (Array.isArray(w.material) ? w.material.forEach((j) => {
|
|
@@ -744,7 +744,7 @@ function Ft(a, e) {
|
|
|
744
744
|
}) : w.material.clippingPlanes = [g]);
|
|
745
745
|
});
|
|
746
746
|
});
|
|
747
|
-
const { scene: s } =
|
|
747
|
+
const { scene: s } = o();
|
|
748
748
|
if (s) {
|
|
749
749
|
const d = z(i.value);
|
|
750
750
|
s.add(d), p.push(d);
|
|
@@ -759,7 +759,7 @@ function Ft(a, e) {
|
|
|
759
759
|
});
|
|
760
760
|
});
|
|
761
761
|
}, r = () => {
|
|
762
|
-
const { scene: g } =
|
|
762
|
+
const { scene: g } = o();
|
|
763
763
|
g && p.forEach((s) => {
|
|
764
764
|
g.remove(s), s.geometry.dispose(), s.material.dispose();
|
|
765
765
|
}), p = [];
|
|
@@ -781,19 +781,19 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
781
781
|
animationData: Object,
|
|
782
782
|
model: Object
|
|
783
783
|
},
|
|
784
|
-
setup(
|
|
785
|
-
const e =
|
|
784
|
+
setup(o) {
|
|
785
|
+
const e = o;
|
|
786
786
|
D();
|
|
787
787
|
const t = D();
|
|
788
788
|
return xe(
|
|
789
789
|
() => [e == null ? void 0 : e.animationData],
|
|
790
790
|
() => {
|
|
791
|
-
var
|
|
792
|
-
let i = ((
|
|
791
|
+
var a;
|
|
792
|
+
let i = ((a = We(e == null ? void 0 : e.animationData)) == null ? void 0 : a.动画输出Content) ?? [];
|
|
793
793
|
i && (t.value = i);
|
|
794
794
|
},
|
|
795
795
|
{ deep: !0, immediate: !0 }
|
|
796
|
-
), (i,
|
|
796
|
+
), (i, a) => {
|
|
797
797
|
var p, v, n;
|
|
798
798
|
return X(), J("div", Nt, [
|
|
799
799
|
(X(), He(yt, {
|
|
@@ -816,12 +816,12 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
816
816
|
expandStrategy: {
|
|
817
817
|
type: String,
|
|
818
818
|
default: "breadth",
|
|
819
|
-
validator: (
|
|
819
|
+
validator: (o) => ["breadth", "firstLevel"].includes(o)
|
|
820
820
|
}
|
|
821
821
|
},
|
|
822
822
|
emits: ["nodeClick"],
|
|
823
|
-
setup(
|
|
824
|
-
const t =
|
|
823
|
+
setup(o, { emit: e }) {
|
|
824
|
+
const t = o, i = e, a = D([]), p = {
|
|
825
825
|
children: "children",
|
|
826
826
|
label: "label"
|
|
827
827
|
}, v = (r) => {
|
|
@@ -872,18 +872,18 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
872
872
|
g.push(...d);
|
|
873
873
|
}
|
|
874
874
|
}), g.slice(0, S + 1);
|
|
875
|
-
}, O = pe(() => !
|
|
875
|
+
}, O = pe(() => !a.value || a.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ? z(a.value, t.maxExpandCount) : x(a.value, t.maxExpandCount)), F = pe(() => t != null && t.model ? E(t.model) : []);
|
|
876
876
|
return xe(
|
|
877
877
|
F,
|
|
878
878
|
(r) => {
|
|
879
|
-
|
|
879
|
+
a.value = JSON.parse(JSON.stringify(r));
|
|
880
880
|
},
|
|
881
881
|
{ immediate: !0 }
|
|
882
882
|
), (r, S) => {
|
|
883
883
|
const g = Ke("el-tree");
|
|
884
884
|
return X(), J("div", Vt, [
|
|
885
885
|
k(g, {
|
|
886
|
-
data:
|
|
886
|
+
data: a.value,
|
|
887
887
|
props: p,
|
|
888
888
|
"default-expanded-keys": O.value,
|
|
889
889
|
"node-key": Bt,
|
|
@@ -892,13 +892,13 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
892
892
|
]);
|
|
893
893
|
};
|
|
894
894
|
}
|
|
895
|
-
}, Ht = /* @__PURE__ */ fe(Zt, [["__scopeId", "data-v-
|
|
895
|
+
}, Ht = /* @__PURE__ */ fe(Zt, [["__scopeId", "data-v-fde9ea18"]]), Kt = { class: "panel-content" }, Xt = {
|
|
896
896
|
key: 0,
|
|
897
897
|
class: "joints-list"
|
|
898
898
|
}, $t = { class: "joint-info-row" }, Gt = { class: "joint-left" }, Jt = { class: "joint-name" }, Wt = { class: "joint-range" }, qt = { class: "joint-type" }, Qt = {
|
|
899
899
|
key: 0,
|
|
900
900
|
class: "joint-control-row"
|
|
901
|
-
}, es = { class: "slider-container" }, ts = ["min", "max", "value", "onInput", "disabled"], ss = { class: "value-display" }, is = { class: "joint-value" },
|
|
901
|
+
}, es = { class: "slider-container" }, ts = ["min", "max", "value", "onInput", "disabled"], ss = { class: "value-display" }, is = { class: "joint-value" }, os = { class: "unit" }, as = {
|
|
902
902
|
key: 1,
|
|
903
903
|
class: "empty-state"
|
|
904
904
|
}, be = 1e-3, ns = 1e3, Re = 60, ls = {
|
|
@@ -908,26 +908,26 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
908
908
|
scene: Object,
|
|
909
909
|
animationData: Object
|
|
910
910
|
},
|
|
911
|
-
setup(
|
|
912
|
-
const t =
|
|
911
|
+
setup(o, { expose: e }) {
|
|
912
|
+
const t = o;
|
|
913
913
|
D(!0);
|
|
914
|
-
const i = D([]),
|
|
914
|
+
const i = D([]), a = D(null), p = D(null), v = D(12.5), n = D(), E = D(1302), x = D(!1), z = D(!1), O = D(0), F = D(0), r = D(null), S = $e.degToRad, g = D(1), s = () => ns / Re / g.value;
|
|
915
915
|
let d = [];
|
|
916
916
|
xe(
|
|
917
917
|
() => t.animationData,
|
|
918
918
|
(l) => {
|
|
919
919
|
var h;
|
|
920
|
-
E.value = l.extra.管长, v.value = l.extra.外径 / 2;
|
|
920
|
+
console.log(111, l), E.value = l.extra.管长, v.value = l.extra.外径 / 2;
|
|
921
921
|
let b = ((h = We(l)) == null ? void 0 : h.动画输出) ?? [];
|
|
922
922
|
b && b.length > 0 && (d = b);
|
|
923
923
|
},
|
|
924
924
|
{ deep: !0 }
|
|
925
925
|
), pe(() => d.length > 0);
|
|
926
926
|
const w = (l, b = !1) => l === "revolute" ? b ? Math.PI : -Math.PI : l === "prismatic" ? b ? 1 : -1 : 0, j = () => {
|
|
927
|
-
if (!
|
|
927
|
+
if (!a.value)
|
|
928
928
|
return ElMessage.error("未加载 URDF"), !1;
|
|
929
929
|
let l = null;
|
|
930
|
-
return
|
|
930
|
+
return a.value.traverse((b) => {
|
|
931
931
|
b.name === "Pipe_Link" && !l && b.traverse((h) => {
|
|
932
932
|
h instanceof ze && !l && (l = h);
|
|
933
933
|
});
|
|
@@ -993,9 +993,9 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
993
993
|
f.localX.applyMatrix4(c), f.localZ.applyMatrix4(c);
|
|
994
994
|
}
|
|
995
995
|
if (h > 0 && (f.pos.add(f.localY.clone().multiplyScalar(h * be)), b.push(f.pos.clone())), _ > 0 && U > 0) {
|
|
996
|
-
const c = S(_), I = U * be, q = f.pos.clone().add(f.localX.clone().multiplyScalar(-I)),
|
|
997
|
-
for (let Q = 1; Q <=
|
|
998
|
-
const re = c * Q /
|
|
996
|
+
const c = S(_), I = U * be, q = f.pos.clone().add(f.localX.clone().multiplyScalar(-I)), ae = Math.max(16, Math.ceil(_ / 5));
|
|
997
|
+
for (let Q = 1; Q <= ae; Q++) {
|
|
998
|
+
const re = c * Q / ae, C = new me().makeRotationAxis(f.localZ, re), se = f.localX.clone().multiplyScalar(I).applyMatrix4(C), ne = q.clone().add(se);
|
|
999
999
|
b.push(ne);
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
@@ -1013,9 +1013,9 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1013
1013
|
};
|
|
1014
1014
|
const c = [];
|
|
1015
1015
|
for (let I = b.length - 1; I >= 0; I--) {
|
|
1016
|
-
const q = b[I],
|
|
1017
|
-
if (
|
|
1018
|
-
const Q =
|
|
1016
|
+
const q = b[I], ae = K(q);
|
|
1017
|
+
if (ae.length > 0) {
|
|
1018
|
+
const Q = ae.map((se) => {
|
|
1019
1019
|
const ne = se.clone(), Oe = new me();
|
|
1020
1020
|
return Oe.makeBasis(f.localX, f.localY, f.localZ), ne.applyMatrix4(Oe), ne.add(f.pos);
|
|
1021
1021
|
});
|
|
@@ -1075,14 +1075,14 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1075
1075
|
r.value = setTimeout(l, s());
|
|
1076
1076
|
};
|
|
1077
1077
|
l();
|
|
1078
|
-
},
|
|
1078
|
+
}, oe = () => {
|
|
1079
1079
|
z.value = !0, r.value && (clearTimeout(r.value), r.value = null);
|
|
1080
1080
|
}, N = () => {
|
|
1081
1081
|
x.value = !1, z.value = !1, g.value = 1, r.value && (clearTimeout(r.value), r.value = null);
|
|
1082
1082
|
};
|
|
1083
1083
|
e({
|
|
1084
1084
|
startAnimation: R,
|
|
1085
|
-
pauseAnimation:
|
|
1085
|
+
pauseAnimation: oe,
|
|
1086
1086
|
stopAnimation: N,
|
|
1087
1087
|
resetAll: () => {
|
|
1088
1088
|
N(), O.value = 0, F.value = 0, i.value.forEach((l) => {
|
|
@@ -1098,7 +1098,7 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1098
1098
|
}), xe(
|
|
1099
1099
|
() => t.model,
|
|
1100
1100
|
(l) => {
|
|
1101
|
-
l ? (
|
|
1101
|
+
l ? (a.value = l, i.value = $(l)) : i.value = [];
|
|
1102
1102
|
},
|
|
1103
1103
|
{ immediate: !0 }
|
|
1104
1104
|
);
|
|
@@ -1148,17 +1148,17 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1148
1148
|
]),
|
|
1149
1149
|
P("div", ss, [
|
|
1150
1150
|
P("span", is, le(h.currentValue ? Number(h.currentValue).toFixed(3) : "0.000"), 1),
|
|
1151
|
-
P("span",
|
|
1151
|
+
P("span", os, le(h.type === "revolute" ? "rad" : "m"), 1)
|
|
1152
1152
|
])
|
|
1153
1153
|
])) : we("", !0)
|
|
1154
1154
|
]);
|
|
1155
1155
|
}), 128))
|
|
1156
|
-
])) : (X(), J("div",
|
|
1156
|
+
])) : (X(), J("div", as, b[0] || (b[0] = [
|
|
1157
1157
|
P("p", null, "未检测到可控制的关节", -1)
|
|
1158
1158
|
])))
|
|
1159
1159
|
]));
|
|
1160
1160
|
}
|
|
1161
|
-
}, rs = /* @__PURE__ */ fe(ls, [["__scopeId", "data-v-
|
|
1161
|
+
}, rs = /* @__PURE__ */ fe(ls, [["__scopeId", "data-v-a874abed"]]), cs = ["xlink:href"], hs = /* @__PURE__ */ st({
|
|
1162
1162
|
__name: "svgIcon",
|
|
1163
1163
|
props: {
|
|
1164
1164
|
backgroundColor: { default: "#f0f0f0" },
|
|
@@ -1168,12 +1168,12 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1168
1168
|
spin: { type: Boolean, default: !1 },
|
|
1169
1169
|
active: { type: Boolean, default: !1 }
|
|
1170
1170
|
},
|
|
1171
|
-
setup(
|
|
1172
|
-
const e =
|
|
1171
|
+
setup(o) {
|
|
1172
|
+
const e = o, t = pe(
|
|
1173
1173
|
() => ({
|
|
1174
1174
|
backgroundColor: e.backgroundColor
|
|
1175
1175
|
})
|
|
1176
|
-
), i = pe(() => `#${e.prefix}-${e.name}`),
|
|
1176
|
+
), i = pe(() => `#${e.prefix}-${e.name}`), a = pe(() => {
|
|
1177
1177
|
const { size: p } = e;
|
|
1178
1178
|
let v = `${p}`;
|
|
1179
1179
|
return v = `${v.replace("px", "")}px`, {
|
|
@@ -1187,14 +1187,14 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1187
1187
|
}, [
|
|
1188
1188
|
(X(), J("svg", {
|
|
1189
1189
|
class: Ie(["svg-icon", [p.$attrs.class, p.spin && "svg-icon-spin"]]),
|
|
1190
|
-
style: je(
|
|
1190
|
+
style: je(a.value),
|
|
1191
1191
|
"aria-hidden": "true"
|
|
1192
1192
|
}, [
|
|
1193
1193
|
P("use", { "xlink:href": i.value }, null, 8, cs)
|
|
1194
1194
|
], 6))
|
|
1195
1195
|
], 6));
|
|
1196
1196
|
}
|
|
1197
|
-
}), L = /* @__PURE__ */ fe(hs, [["__scopeId", "data-v-
|
|
1197
|
+
}), L = /* @__PURE__ */ fe(hs, [["__scopeId", "data-v-53bfc052"]]), us = { class: "obj-viewer-container" }, ps = { class: "buttonGroup-top" }, ds = { class: "buttonGroup-topLeft" }, ms = { class: "buttonGroup-left" }, fs = { class: "buttonGroup-right" }, _s = { class: "buttonGroup-bottom" }, gs = { class: "left-panel" }, ys = { class: "panel-header" }, vs = {
|
|
1198
1198
|
key: 1,
|
|
1199
1199
|
class: "clipping-content"
|
|
1200
1200
|
}, bs = { class: "radio-group" }, ws = { class: "radio-label" }, Ps = { class: "radio-label" }, Ms = { class: "radio-label" }, xs = { class: "radio-label" }, Es = { class: "right-panel" }, Ds = { class: "panel-header" }, Ts = {
|
|
@@ -1210,9 +1210,9 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1210
1210
|
}
|
|
1211
1211
|
},
|
|
1212
1212
|
emits: ["getAnimationData"],
|
|
1213
|
-
setup(
|
|
1213
|
+
setup(o, { expose: e, emit: t }) {
|
|
1214
1214
|
const i = t;
|
|
1215
|
-
let
|
|
1215
|
+
let a = null, p = !1;
|
|
1216
1216
|
const v = D(null), n = D(!1), E = D("");
|
|
1217
1217
|
D(!1);
|
|
1218
1218
|
const x = D(!1), z = D(!1), O = D(""), F = D(!1), r = D(""), S = D(), {
|
|
@@ -1225,7 +1225,7 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1225
1225
|
getThreeJSObjects: Y,
|
|
1226
1226
|
clearAllModels: H,
|
|
1227
1227
|
cleanup: K
|
|
1228
|
-
} = jt(v), { isAnimating: m, toggleAnimation: u, stopAnimation: T } = It(Y, g), { isClipping: B, activeClippingAxis: R, toggleClipping:
|
|
1228
|
+
} = jt(v), { isAnimating: m, toggleAnimation: u, stopAnimation: T } = It(Y, g), { isClipping: B, activeClippingAxis: R, toggleClipping: oe, updateClippingPlanes: N } = Ft(
|
|
1229
1229
|
Y,
|
|
1230
1230
|
g
|
|
1231
1231
|
), { addModelsFromUrls: W, loadModelByDefaultPath: ee, urdfModel: de, modelBoundingBoxes: De } = wt(
|
|
@@ -1240,9 +1240,9 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1240
1240
|
const { camera: f, controls: c } = Y();
|
|
1241
1241
|
if (!f || !c) return;
|
|
1242
1242
|
c.enabled = !0;
|
|
1243
|
-
const I = (te) => te < 0.5 ? 4 * te * te * te : 1 - Math.pow(-2 * te + 2, 3) / 2, q = f.position.clone(),
|
|
1243
|
+
const I = (te) => te < 0.5 ? 4 * te * te * te : 1 - Math.pow(-2 * te + 2, 3) / 2, q = f.position.clone(), ae = c.target.clone(), Q = 1500, re = Date.now(), C = () => {
|
|
1244
1244
|
const te = Date.now() - re, se = Math.min(te / Q, 1), ne = I(se);
|
|
1245
|
-
f.position.lerpVectors(q, s.value, ne), c.target.lerpVectors(
|
|
1245
|
+
f.position.lerpVectors(q, s.value, ne), c.target.lerpVectors(ae, d.value, ne), se < 1 ? requestAnimationFrame(C) : x.value = !1;
|
|
1246
1246
|
};
|
|
1247
1247
|
C();
|
|
1248
1248
|
}, Ce = async () => p ? Promise.resolve() : new Promise((f) => {
|
|
@@ -1252,14 +1252,14 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1252
1252
|
c();
|
|
1253
1253
|
}), l = async (f, c) => {
|
|
1254
1254
|
try {
|
|
1255
|
-
await Ce(), m.value && T(), B.value &&
|
|
1255
|
+
await Ce(), m.value && T(), B.value && oe();
|
|
1256
1256
|
const I = await c(f);
|
|
1257
1257
|
return $(De), I;
|
|
1258
1258
|
} catch (I) {
|
|
1259
1259
|
throw console.error("加载模型失败:", I), I;
|
|
1260
1260
|
}
|
|
1261
1261
|
}, b = async (f) => l(f, W), h = async (f) => l(f, ee), M = (f) => {
|
|
1262
|
-
z.value = !0, O.value = f, f === "剖面视图" && !B.value &&
|
|
1262
|
+
z.value = !0, O.value = f, f === "剖面视图" && !B.value && oe();
|
|
1263
1263
|
}, _ = (f) => {
|
|
1264
1264
|
F.value = !0, r.value = f, f === "动画仿真" && i("getAnimationData");
|
|
1265
1265
|
}, U = () => {
|
|
@@ -1271,7 +1271,7 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1271
1271
|
return Xe(async () => {
|
|
1272
1272
|
await Fe();
|
|
1273
1273
|
try {
|
|
1274
|
-
w(),
|
|
1274
|
+
w(), a = Y().scene, p = !0, window.addEventListener("resize", j);
|
|
1275
1275
|
} catch (f) {
|
|
1276
1276
|
console.error("Three.js初始化失败:", f);
|
|
1277
1277
|
}
|
|
@@ -1281,7 +1281,7 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1281
1281
|
addModelsFromUrls: b,
|
|
1282
1282
|
loadModelByDefaultPath: h
|
|
1283
1283
|
}), (f, c) => {
|
|
1284
|
-
var q,
|
|
1284
|
+
var q, ae, Q, re;
|
|
1285
1285
|
const I = Ke("el-scrollbar");
|
|
1286
1286
|
return X(), J("div", us, [
|
|
1287
1287
|
P("div", {
|
|
@@ -1413,7 +1413,7 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1413
1413
|
size: "24",
|
|
1414
1414
|
backgroundColor: "#ffffff",
|
|
1415
1415
|
title: "快进",
|
|
1416
|
-
onClick: (
|
|
1416
|
+
onClick: (ae = S.value) == null ? void 0 : ae.fastForward
|
|
1417
1417
|
}, null, 8, ["onClick"]),
|
|
1418
1418
|
k(L, {
|
|
1419
1419
|
name: "zanting",
|
|
@@ -1516,12 +1516,12 @@ const Nt = { class: "panel-content" }, Ut = {
|
|
|
1516
1516
|
ref_key: "jointRef",
|
|
1517
1517
|
ref: S,
|
|
1518
1518
|
model: Z(de),
|
|
1519
|
-
scene: Z(
|
|
1520
|
-
animationData:
|
|
1519
|
+
scene: Z(a),
|
|
1520
|
+
animationData: o.animationData
|
|
1521
1521
|
}, null, 8, ["model", "scene", "animationData"]), [
|
|
1522
1522
|
[ye, r.value === "关节控制"]
|
|
1523
1523
|
]),
|
|
1524
|
-
ce(k(Yt, { animationData:
|
|
1524
|
+
ce(k(Yt, { animationData: o.animationData }, null, 8, ["animationData"]), [
|
|
1525
1525
|
[ye, r.value === "动画仿真"]
|
|
1526
1526
|
])
|
|
1527
1527
|
]),
|