ss-component-new 1.1.575 → 1.1.577
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/{index-Bt5IupWu.js → index-Df99Ox1E.js} +1 -1
- package/dist/{index-CSEzSwRR.cjs → index-FR75nldT.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +1 -1
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +1 -1
- package/dist/{threeModel-CwMsSS9U.js → threeModel-C44QlC8T.js} +578 -578
- package/dist/threeModel-CGVdAHgP.cjs +1 -0
- package/package.json +1 -1
- package/dist/threeModel-BPO7uoJ2.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { C as
|
|
1
|
+
import { ref as C, watch as xt, createElementBlock as q, openBlock as $, createBlock as Zt, computed as ut, resolveComponent as Ht, createVNode as A, onMounted as Kt, onUnmounted as Jt, Fragment as Wt, renderList as qt, createElementVNode as w, createCommentVNode as wt, toDisplayString as nt, defineComponent as Qt, normalizeStyle as Lt, normalizeClass as Ot, nextTick as jt, onBeforeUnmount as te, withDirectives as rt, unref as Z, withCtx as It, isRef as _t, vModelRadio as gt, vShow as yt } from "vue";
|
|
2
|
+
import { C as ee, V as g, M as ct, T as ht, Q as Ft, D as Nt, E as tt, R as se, P as Pt, F as Xt, G as Et, H as ie, J as oe, K as ae, W as ne, L as le, N as re, O as ce, X as he, U as ue, Y as Mt, Z as pe, _ as Bt, $ as de, a0 as Ct, a1 as me, a2 as Yt, a3 as fe, a4 as _e, a5 as St, B as ge, a6 as dt, a7 as ye, a8 as ve, a9 as be } from "./index-DmVbKcfI.js";
|
|
3
3
|
import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
import { c as
|
|
5
|
-
const Ut = { type: "change" },
|
|
4
|
+
import { c as $t } from "./menu-Qw1eGtzq.js";
|
|
5
|
+
const Ut = { type: "change" }, Rt = { type: "start" }, Gt = { type: "end" }, vt = new se(), Vt = new Pt(), we = Math.cos(70 * Xt.DEG2RAD), U = new g(), W = 2 * Math.PI, R = {
|
|
6
6
|
NONE: -1,
|
|
7
7
|
ROTATE: 0,
|
|
8
8
|
DOLLY: 1,
|
|
@@ -12,7 +12,7 @@ const Ut = { type: "change" }, zt = { type: "start" }, $t = { type: "end" }, vt
|
|
|
12
12
|
TOUCH_DOLLY_PAN: 5,
|
|
13
13
|
TOUCH_DOLLY_ROTATE: 6
|
|
14
14
|
}, kt = 1e-6;
|
|
15
|
-
class Pe extends
|
|
15
|
+
class Pe extends ee {
|
|
16
16
|
/**
|
|
17
17
|
* Constructs a new controls instance.
|
|
18
18
|
*
|
|
@@ -20,7 +20,7 @@ class Pe extends te {
|
|
|
20
20
|
* @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
|
|
21
21
|
*/
|
|
22
22
|
constructor(t, e = null) {
|
|
23
|
-
super(t, e), this.state =
|
|
23
|
+
super(t, e), this.state = R.NONE, this.target = new g(), this.cursor = new g(), 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: ct.ROTATE, MIDDLE: ct.DOLLY, RIGHT: ct.PAN }, this.touches = { ONE: ht.ROTATE, TWO: ht.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new g(), this._lastQuaternion = new Ft(), this._lastTargetPosition = new g(), this._quat = new Ft().setFromUnitVectors(t.up, new g(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Nt(), this._sphericalDelta = new Nt(), this._scale = 1, this._panOffset = new g(), this._rotateStart = new tt(), this._rotateEnd = new tt(), this._rotateDelta = new tt(), this._panStart = new tt(), this._panEnd = new tt(), this._panDelta = new tt(), this._dollyStart = new tt(), this._dollyEnd = new tt(), this._dollyDelta = new tt(), this._dollyDirection = new g(), this._mouse = new tt(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = xe.bind(this), this._onPointerDown = Me.bind(this), this._onPointerUp = Ee.bind(this), this._onContextMenu = Re.bind(this), this._onMouseWheel = Ce.bind(this), this._onKeyDown = Se.bind(this), this._onTouchStart = ke.bind(this), this._onTouchMove = Ae.bind(this), this._onMouseDown = De.bind(this), this._onMouseMove = Te.bind(this), this._interceptControlDown = ze.bind(this), this._interceptControlUp = Le.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
24
24
|
}
|
|
25
25
|
connect(t) {
|
|
26
26
|
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";
|
|
@@ -81,40 +81,40 @@ class Pe extends te {
|
|
|
81
81
|
* was called, or the initial state.
|
|
82
82
|
*/
|
|
83
83
|
reset() {
|
|
84
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ut), this.update(), this.state =
|
|
84
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ut), this.update(), this.state = R.NONE;
|
|
85
85
|
}
|
|
86
86
|
update(t = null) {
|
|
87
87
|
const e = this.object.position;
|
|
88
|
-
U.copy(e).sub(this.target), U.applyQuaternion(this._quat), this._spherical.setFromVector3(U), this.autoRotate && this.state ===
|
|
88
|
+
U.copy(e).sub(this.target), U.applyQuaternion(this._quat), this._spherical.setFromVector3(U), this.autoRotate && this.state === R.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);
|
|
89
89
|
let i = this.minAzimuthAngle, a = this.maxAzimuthAngle;
|
|
90
90
|
isFinite(i) && isFinite(a) && (i < -Math.PI ? i += W : i > Math.PI && (i -= W), a < -Math.PI ? a += W : a > Math.PI && (a -= W), 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 m = !1;
|
|
92
92
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
|
|
93
93
|
this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
94
94
|
else {
|
|
95
|
-
const
|
|
96
|
-
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), m =
|
|
95
|
+
const _ = this._spherical.radius;
|
|
96
|
+
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), m = _ != this._spherical.radius;
|
|
97
97
|
}
|
|
98
98
|
if (U.setFromSpherical(this._spherical), U.applyQuaternion(this._quatInverse), e.copy(this.target).add(U), 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) {
|
|
99
|
-
let
|
|
99
|
+
let _ = null;
|
|
100
100
|
if (this.object.isPerspectiveCamera) {
|
|
101
101
|
const n = U.length();
|
|
102
|
-
|
|
103
|
-
const
|
|
104
|
-
this.object.position.addScaledVector(this._dollyDirection,
|
|
102
|
+
_ = this._clampDistance(n * this._scale);
|
|
103
|
+
const P = n - _;
|
|
104
|
+
this.object.position.addScaledVector(this._dollyDirection, P), this.object.updateMatrixWorld(), m = !!P;
|
|
105
105
|
} else if (this.object.isOrthographicCamera) {
|
|
106
|
-
const n = new
|
|
106
|
+
const n = new g(this._mouse.x, this._mouse.y, 0);
|
|
107
107
|
n.unproject(this.object);
|
|
108
|
-
const
|
|
109
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), m =
|
|
110
|
-
const
|
|
111
|
-
|
|
108
|
+
const P = this.object.zoom;
|
|
109
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), m = P !== this.object.zoom;
|
|
110
|
+
const E = new g(this._mouse.x, this._mouse.y, 0);
|
|
111
|
+
E.unproject(this.object), this.object.position.sub(E).add(n), this.object.updateMatrixWorld(), _ = U.length();
|
|
112
112
|
} else
|
|
113
113
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
114
|
-
|
|
114
|
+
_ !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(_).add(this.object.position) : (vt.origin.copy(this.object.position), vt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(vt.direction)) < we ? this.object.lookAt(this.target) : (Vt.setFromNormalAndCoplanarPoint(this.object.up, this.target), vt.intersectPlane(Vt, this.target))));
|
|
115
115
|
} else if (this.object.isOrthographicCamera) {
|
|
116
|
-
const
|
|
117
|
-
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)),
|
|
116
|
+
const _ = this.object.zoom;
|
|
117
|
+
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), _ !== this.object.zoom && (this.object.updateProjectionMatrix(), m = !0);
|
|
118
118
|
}
|
|
119
119
|
return this._scale = 1, this._performCursorZoom = !1, m || this._lastPosition.distanceToSquared(this.object.position) > kt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > kt || this._lastTargetPosition.distanceToSquared(this.target) > kt ? (this.dispatchEvent(Ut), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
120
120
|
}
|
|
@@ -157,8 +157,8 @@ class Pe extends te {
|
|
|
157
157
|
if (!this.zoomToCursor)
|
|
158
158
|
return;
|
|
159
159
|
this._performCursorZoom = !0;
|
|
160
|
-
const i = this.domElement.getBoundingClientRect(), a = t - i.left, m = e - i.top,
|
|
161
|
-
this._mouse.x = a /
|
|
160
|
+
const i = this.domElement.getBoundingClientRect(), a = t - i.left, m = e - i.top, _ = i.width, n = i.height;
|
|
161
|
+
this._mouse.x = a / _ * 2 - 1, this._mouse.y = -(m / 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(t) {
|
|
164
164
|
return Math.max(this.minDistance, Math.min(this.maxDistance, t));
|
|
@@ -256,8 +256,8 @@ class Pe extends te {
|
|
|
256
256
|
_handleTouchMoveDolly(t) {
|
|
257
257
|
const e = this._getSecondPointerPosition(t), i = t.pageX - e.x, a = t.pageY - e.y, m = Math.sqrt(i * i + a * a);
|
|
258
258
|
this._dollyEnd.set(0, m), 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
|
-
const
|
|
260
|
-
this._updateZoomParameters(
|
|
259
|
+
const _ = (t.pageX + e.x) * 0.5, n = (t.pageY + e.y) * 0.5;
|
|
260
|
+
this._updateZoomParameters(_, n);
|
|
261
261
|
}
|
|
262
262
|
_handleTouchMoveDollyPan(t) {
|
|
263
263
|
this.enableZoom && this._handleTouchMoveDolly(t), this.enablePan && this._handleTouchMovePan(t);
|
|
@@ -284,7 +284,7 @@ class Pe extends te {
|
|
|
284
284
|
}
|
|
285
285
|
_trackPointer(t) {
|
|
286
286
|
let e = this._pointerPositions[t.pointerId];
|
|
287
|
-
e === void 0 && (e = new
|
|
287
|
+
e === void 0 && (e = new tt(), this._pointerPositions[t.pointerId] = e), e.set(t.pageX, t.pageY);
|
|
288
288
|
}
|
|
289
289
|
_getSecondPointerPosition(t) {
|
|
290
290
|
const e = t.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
@@ -317,7 +317,7 @@ function xe(o) {
|
|
|
317
317
|
function Ee(o) {
|
|
318
318
|
switch (this._removePointer(o), this._pointers.length) {
|
|
319
319
|
case 0:
|
|
320
|
-
this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
320
|
+
this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Gt), this.state = R.NONE;
|
|
321
321
|
break;
|
|
322
322
|
case 1:
|
|
323
323
|
const t = this._pointers[0], e = this._pointerPositions[t];
|
|
@@ -343,49 +343,49 @@ function De(o) {
|
|
|
343
343
|
switch (t) {
|
|
344
344
|
case ct.DOLLY:
|
|
345
345
|
if (this.enableZoom === !1) return;
|
|
346
|
-
this._handleMouseDownDolly(o), this.state =
|
|
346
|
+
this._handleMouseDownDolly(o), this.state = R.DOLLY;
|
|
347
347
|
break;
|
|
348
348
|
case ct.ROTATE:
|
|
349
349
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
350
350
|
if (this.enablePan === !1) return;
|
|
351
|
-
this._handleMouseDownPan(o), this.state =
|
|
351
|
+
this._handleMouseDownPan(o), this.state = R.PAN;
|
|
352
352
|
} else {
|
|
353
353
|
if (this.enableRotate === !1) return;
|
|
354
|
-
this._handleMouseDownRotate(o), this.state =
|
|
354
|
+
this._handleMouseDownRotate(o), this.state = R.ROTATE;
|
|
355
355
|
}
|
|
356
356
|
break;
|
|
357
357
|
case ct.PAN:
|
|
358
358
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
|
359
359
|
if (this.enableRotate === !1) return;
|
|
360
|
-
this._handleMouseDownRotate(o), this.state =
|
|
360
|
+
this._handleMouseDownRotate(o), this.state = R.ROTATE;
|
|
361
361
|
} else {
|
|
362
362
|
if (this.enablePan === !1) return;
|
|
363
|
-
this._handleMouseDownPan(o), this.state =
|
|
363
|
+
this._handleMouseDownPan(o), this.state = R.PAN;
|
|
364
364
|
}
|
|
365
365
|
break;
|
|
366
366
|
default:
|
|
367
|
-
this.state =
|
|
367
|
+
this.state = R.NONE;
|
|
368
368
|
}
|
|
369
|
-
this.state !==
|
|
369
|
+
this.state !== R.NONE && this.dispatchEvent(Rt);
|
|
370
370
|
}
|
|
371
371
|
function Te(o) {
|
|
372
372
|
switch (this.state) {
|
|
373
|
-
case
|
|
373
|
+
case R.ROTATE:
|
|
374
374
|
if (this.enableRotate === !1) return;
|
|
375
375
|
this._handleMouseMoveRotate(o);
|
|
376
376
|
break;
|
|
377
|
-
case
|
|
377
|
+
case R.DOLLY:
|
|
378
378
|
if (this.enableZoom === !1) return;
|
|
379
379
|
this._handleMouseMoveDolly(o);
|
|
380
380
|
break;
|
|
381
|
-
case
|
|
381
|
+
case R.PAN:
|
|
382
382
|
if (this.enablePan === !1) return;
|
|
383
383
|
this._handleMouseMovePan(o);
|
|
384
384
|
break;
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
function Ce(o) {
|
|
388
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
388
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== R.NONE || (o.preventDefault(), this.dispatchEvent(Rt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Gt));
|
|
389
389
|
}
|
|
390
390
|
function Se(o) {
|
|
391
391
|
this.enabled !== !1 && this._handleKeyDown(o);
|
|
@@ -396,81 +396,81 @@ function ke(o) {
|
|
|
396
396
|
switch (this.touches.ONE) {
|
|
397
397
|
case ht.ROTATE:
|
|
398
398
|
if (this.enableRotate === !1) return;
|
|
399
|
-
this._handleTouchStartRotate(o), this.state =
|
|
399
|
+
this._handleTouchStartRotate(o), this.state = R.TOUCH_ROTATE;
|
|
400
400
|
break;
|
|
401
401
|
case ht.PAN:
|
|
402
402
|
if (this.enablePan === !1) return;
|
|
403
|
-
this._handleTouchStartPan(o), this.state =
|
|
403
|
+
this._handleTouchStartPan(o), this.state = R.TOUCH_PAN;
|
|
404
404
|
break;
|
|
405
405
|
default:
|
|
406
|
-
this.state =
|
|
406
|
+
this.state = R.NONE;
|
|
407
407
|
}
|
|
408
408
|
break;
|
|
409
409
|
case 2:
|
|
410
410
|
switch (this.touches.TWO) {
|
|
411
411
|
case ht.DOLLY_PAN:
|
|
412
412
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
413
|
-
this._handleTouchStartDollyPan(o), this.state =
|
|
413
|
+
this._handleTouchStartDollyPan(o), this.state = R.TOUCH_DOLLY_PAN;
|
|
414
414
|
break;
|
|
415
415
|
case ht.DOLLY_ROTATE:
|
|
416
416
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
417
|
-
this._handleTouchStartDollyRotate(o), this.state =
|
|
417
|
+
this._handleTouchStartDollyRotate(o), this.state = R.TOUCH_DOLLY_ROTATE;
|
|
418
418
|
break;
|
|
419
419
|
default:
|
|
420
|
-
this.state =
|
|
420
|
+
this.state = R.NONE;
|
|
421
421
|
}
|
|
422
422
|
break;
|
|
423
423
|
default:
|
|
424
|
-
this.state =
|
|
424
|
+
this.state = R.NONE;
|
|
425
425
|
}
|
|
426
|
-
this.state !==
|
|
426
|
+
this.state !== R.NONE && this.dispatchEvent(Rt);
|
|
427
427
|
}
|
|
428
428
|
function Ae(o) {
|
|
429
429
|
switch (this._trackPointer(o), this.state) {
|
|
430
|
-
case
|
|
430
|
+
case R.TOUCH_ROTATE:
|
|
431
431
|
if (this.enableRotate === !1) return;
|
|
432
432
|
this._handleTouchMoveRotate(o), this.update();
|
|
433
433
|
break;
|
|
434
|
-
case
|
|
434
|
+
case R.TOUCH_PAN:
|
|
435
435
|
if (this.enablePan === !1) return;
|
|
436
436
|
this._handleTouchMovePan(o), this.update();
|
|
437
437
|
break;
|
|
438
|
-
case
|
|
438
|
+
case R.TOUCH_DOLLY_PAN:
|
|
439
439
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
440
440
|
this._handleTouchMoveDollyPan(o), this.update();
|
|
441
441
|
break;
|
|
442
|
-
case
|
|
442
|
+
case R.TOUCH_DOLLY_ROTATE:
|
|
443
443
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
444
444
|
this._handleTouchMoveDollyRotate(o), this.update();
|
|
445
445
|
break;
|
|
446
446
|
default:
|
|
447
|
-
this.state =
|
|
447
|
+
this.state = R.NONE;
|
|
448
448
|
}
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function Re(o) {
|
|
451
451
|
this.enabled !== !1 && o.preventDefault();
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function ze(o) {
|
|
454
454
|
o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
455
455
|
}
|
|
456
456
|
function Le(o) {
|
|
457
457
|
o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
|
458
458
|
}
|
|
459
459
|
function Oe(o) {
|
|
460
|
-
let t = null, e = null, i = null, a = null, m = null,
|
|
461
|
-
const
|
|
460
|
+
let t = null, e = null, i = null, a = null, m = null, _ = null, n = null, P = null;
|
|
461
|
+
const E = C([]), I = C(new g()), N = C(new g()), z = () => {
|
|
462
462
|
if (!o.value) return;
|
|
463
463
|
t = new ie(), t.background = new oe(15790320);
|
|
464
|
-
const
|
|
465
|
-
e = new ae(75,
|
|
464
|
+
const d = o.value;
|
|
465
|
+
e = new ae(75, d.clientWidth / d.clientHeight, 0.1, 1e4), e.position.set(8, -8, 6), e.up.set(0, 0, 1), e.lookAt(0, 0, 0), i = new ne({
|
|
466
466
|
antialias: !0,
|
|
467
467
|
alpha: !0
|
|
468
|
-
}), i.setSize(
|
|
468
|
+
}), i.setSize(d.clientWidth, d.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = le, i.toneMapping = re, i.toneMappingExposure = 1, i.outputColorSpace = ce, d.appendChild(i.domElement), a = new Pe(e, i.domElement), a.enableDamping = !0, a.dampingFactor = 0.05, a.mouseButtons = {
|
|
469
469
|
LEFT: ct.ROTATE,
|
|
470
470
|
MIDDLE: ct.PAN,
|
|
471
471
|
RIGHT: null
|
|
472
472
|
}, a.panSpeed = 0.7, m = new he(e, i, {
|
|
473
|
-
container:
|
|
473
|
+
container: d,
|
|
474
474
|
type: "cube",
|
|
475
475
|
placement: "top-right",
|
|
476
476
|
offset: {
|
|
@@ -499,49 +499,49 @@ function Oe(o) {
|
|
|
499
499
|
back: {
|
|
500
500
|
label: "Bottom"
|
|
501
501
|
}
|
|
502
|
-
}), m.attachControls(a),
|
|
503
|
-
},
|
|
504
|
-
n && (t.remove(n), n.dispose()),
|
|
505
|
-
const
|
|
506
|
-
n = new ue(
|
|
507
|
-
const X = new Mt(
|
|
502
|
+
}), m.attachControls(a), v(), s();
|
|
503
|
+
}, c = (d, r) => {
|
|
504
|
+
n && (t.remove(n), n.dispose()), P && (t.remove(P), P.geometry.dispose(), P.material.dispose());
|
|
505
|
+
const S = Math.min(Math.max(Math.floor(d / 20), 30), 40);
|
|
506
|
+
n = new ue(d, S, 13421772, 14540253), n.rotateX(Math.PI / 2), n.position.copy(r), t.add(n);
|
|
507
|
+
const X = new Mt(d, d), J = new pe({
|
|
508
508
|
opacity: 0.3,
|
|
509
509
|
// 阴影透明度
|
|
510
510
|
color: 0
|
|
511
511
|
});
|
|
512
|
-
|
|
513
|
-
},
|
|
514
|
-
if (
|
|
512
|
+
P = new Bt(X, J), P.position.copy(r), P.position.z -= 0.01, P.receiveShadow = !0, t.add(P);
|
|
513
|
+
}, x = () => {
|
|
514
|
+
if (E.value.length === 0)
|
|
515
515
|
return;
|
|
516
|
-
const
|
|
517
|
-
|
|
518
|
-
|
|
516
|
+
const d = new Et();
|
|
517
|
+
E.value.forEach((et) => {
|
|
518
|
+
d.expandByObject(et);
|
|
519
519
|
});
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
520
|
+
const r = d.getSize(new g()), S = d.getCenter(new g()), X = Math.max(r.x, r.y, r.z), J = Math.max(X * 8, 50), L = new g(
|
|
521
|
+
S.x,
|
|
522
|
+
S.y,
|
|
523
|
+
d.min.z
|
|
524
524
|
// 模型的最底部
|
|
525
525
|
);
|
|
526
|
-
|
|
527
|
-
},
|
|
528
|
-
const
|
|
529
|
-
t.add(
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
|
|
526
|
+
c(J, L);
|
|
527
|
+
}, v = () => {
|
|
528
|
+
const d = new de(4210752, 0.6);
|
|
529
|
+
t.add(d);
|
|
530
|
+
const r = new Ct(16777215, 2);
|
|
531
|
+
r.position.set(10, 10, 8), r.castShadow = !0, r.shadow.mapSize.width = 4096, r.shadow.mapSize.height = 4096, r.shadow.camera.near = 0.5, r.shadow.camera.far = 50, r.shadow.camera.left = -50, r.shadow.camera.right = 50, r.shadow.camera.top = 50, r.shadow.camera.bottom = -50, t.add(r);
|
|
532
|
+
const S = new Ct(16777215, 0.8);
|
|
533
|
+
S.position.set(-8, -8, 6), t.add(S);
|
|
534
534
|
const X = new Ct(16777215, 0.6);
|
|
535
535
|
X.position.set(0, -15, 2), t.add(X);
|
|
536
|
-
const
|
|
537
|
-
t.add(
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
const
|
|
541
|
-
|
|
536
|
+
const J = new me(16777215, 4473924, 0.8);
|
|
537
|
+
t.add(J);
|
|
538
|
+
const L = new Yt(16777215, 1, 50);
|
|
539
|
+
L.position.set(15, 15, 15), t.add(L);
|
|
540
|
+
const et = new Yt(16777215, 0.5, 50);
|
|
541
|
+
et.position.set(-15, -15, 15), t.add(et);
|
|
542
542
|
}, s = () => {
|
|
543
|
-
|
|
544
|
-
},
|
|
543
|
+
_ = requestAnimationFrame(s), a && a.update(), i && t && e && i.render(t, e), m && m.render();
|
|
544
|
+
}, f = (d) => {
|
|
545
545
|
[
|
|
546
546
|
"map",
|
|
547
547
|
"normalMap",
|
|
@@ -554,36 +554,36 @@ function Oe(o) {
|
|
|
554
554
|
"lightMap",
|
|
555
555
|
"aoMap",
|
|
556
556
|
"displacementMap"
|
|
557
|
-
].forEach((
|
|
558
|
-
|
|
559
|
-
}),
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
}) :
|
|
557
|
+
].forEach((S) => {
|
|
558
|
+
d[S] && d[S].dispose && d[S].dispose();
|
|
559
|
+
}), d.dispose && d.dispose();
|
|
560
|
+
}, b = (d) => {
|
|
561
|
+
d == null || d.traverse((r) => {
|
|
562
|
+
r.geometry && r.geometry.dispose(), r.material && (Array.isArray(r.material) ? r.material.forEach((S) => {
|
|
563
|
+
f(S);
|
|
564
|
+
}) : f(r.material));
|
|
565
565
|
});
|
|
566
566
|
};
|
|
567
567
|
return {
|
|
568
568
|
// 响应式数据
|
|
569
|
-
currentModels:
|
|
569
|
+
currentModels: E,
|
|
570
570
|
initialCameraPosition: I,
|
|
571
571
|
initialTargetPosition: N,
|
|
572
572
|
// 方法
|
|
573
|
-
initThreeJS:
|
|
573
|
+
initThreeJS: z,
|
|
574
574
|
handleResize: () => {
|
|
575
575
|
if (!o.value || !e || !i || !m) return;
|
|
576
|
-
const
|
|
577
|
-
e.aspect =
|
|
576
|
+
const d = o.value, r = d.clientWidth, S = d.clientHeight;
|
|
577
|
+
e.aspect = r / S, e.updateProjectionMatrix(), i.setSize(r, S), m.update();
|
|
578
578
|
},
|
|
579
579
|
fitCameraToAllModels: () => {
|
|
580
|
-
if (!e || !a ||
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
|
|
580
|
+
if (!e || !a || E.value.length === 0) return;
|
|
581
|
+
const d = new Et();
|
|
582
|
+
E.value.forEach((et) => {
|
|
583
|
+
d.expandByObject(et);
|
|
584
584
|
});
|
|
585
|
-
const
|
|
586
|
-
e.position.copy(
|
|
585
|
+
const r = d.getSize(new g()), S = d.getCenter(new g()), J = Math.max(r.x, r.y, r.z) * 0.8, L = new g(S.x + J, S.y - J, S.z + J);
|
|
586
|
+
e.position.copy(L), e.lookAt(S), a.target.copy(S), a.update(), I.value.copy(L), N.value.copy(S), x();
|
|
587
587
|
},
|
|
588
588
|
getThreeJSObjects: () => ({
|
|
589
589
|
scene: t,
|
|
@@ -594,165 +594,165 @@ function Oe(o) {
|
|
|
594
594
|
}),
|
|
595
595
|
clearAllModels: () => {
|
|
596
596
|
if (!t) return;
|
|
597
|
-
|
|
598
|
-
t.remove(
|
|
597
|
+
E.value.forEach((r) => {
|
|
598
|
+
t.remove(r), b(r);
|
|
599
599
|
});
|
|
600
|
-
const
|
|
601
|
-
t.children.forEach((
|
|
602
|
-
!
|
|
603
|
-
}),
|
|
604
|
-
t.remove(
|
|
605
|
-
}),
|
|
600
|
+
const d = [];
|
|
601
|
+
t.children.forEach((r) => {
|
|
602
|
+
!r.isLight && !r.isCamera && r.type !== "GridHelper" && r !== P && d.push(r);
|
|
603
|
+
}), d.forEach((r) => {
|
|
604
|
+
t.remove(r), b(r);
|
|
605
|
+
}), E.value = [], x();
|
|
606
606
|
},
|
|
607
607
|
cleanup: () => {
|
|
608
|
-
|
|
608
|
+
_ && cancelAnimationFrame(_), n && n.dispose(), P && (P.geometry.dispose(), P.material.dispose()), i && i.dispose(), a && a.dispose(), m && m.dispose();
|
|
609
609
|
},
|
|
610
|
-
updateGridForModels:
|
|
610
|
+
updateGridForModels: x
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
function je(o, t) {
|
|
614
|
-
const e =
|
|
615
|
-
let i = null, a = 12700, m = new
|
|
614
|
+
const e = C(!1);
|
|
615
|
+
let i = null, a = 12700, m = new g(), _ = new g(), n = new g(), P = 0, E = null;
|
|
616
616
|
const I = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, N = (s) => {
|
|
617
|
-
const
|
|
617
|
+
const f = new g(), b = P * 1.2, F = new g(n.x + b, n.y, n.z), H = new g(n.x, n.y + b, n.z), G = new g(n.x, n.y - b, n.z);
|
|
618
618
|
if (s <= 0.567) {
|
|
619
|
-
const
|
|
620
|
-
|
|
619
|
+
const K = s / 0.567 * Math.PI * 2;
|
|
620
|
+
f.x = n.x + Math.cos(K) * b, f.z = n.z + Math.sin(K) * b, f.y = n.y;
|
|
621
621
|
} else if (s <= 0.724) {
|
|
622
|
-
const Y = (s - 0.567) / 0.157,
|
|
623
|
-
|
|
622
|
+
const Y = (s - 0.567) / 0.157, K = I(Y);
|
|
623
|
+
f.lerpVectors(F, H, K);
|
|
624
624
|
} else if (s <= 0.881) {
|
|
625
|
-
const Y = (s - 0.724) / 0.157,
|
|
626
|
-
|
|
625
|
+
const Y = (s - 0.724) / 0.157, d = I(Y) * Math.PI;
|
|
626
|
+
f.x = n.x + Math.sin(d) * b, f.y = n.y + Math.cos(d) * b, f.z = n.z;
|
|
627
627
|
} else {
|
|
628
|
-
const Y = (s - 0.881) / 0.119,
|
|
629
|
-
|
|
628
|
+
const Y = (s - 0.881) / 0.119, K = I(Y);
|
|
629
|
+
f.lerpVectors(G, m, K);
|
|
630
630
|
}
|
|
631
|
-
return
|
|
632
|
-
},
|
|
633
|
-
const { camera: s, controls:
|
|
634
|
-
if (!s || !
|
|
631
|
+
return f;
|
|
632
|
+
}, z = () => {
|
|
633
|
+
const { camera: s, controls: f } = o();
|
|
634
|
+
if (!s || !f) return;
|
|
635
635
|
i || (i = Date.now());
|
|
636
|
-
const
|
|
637
|
-
if (
|
|
638
|
-
|
|
636
|
+
const b = Date.now() - i, F = Math.min(b / a, 1);
|
|
637
|
+
if (F >= 1) {
|
|
638
|
+
x();
|
|
639
639
|
return;
|
|
640
640
|
}
|
|
641
|
-
const
|
|
642
|
-
s.position.copy(
|
|
643
|
-
},
|
|
641
|
+
const H = N(F);
|
|
642
|
+
s.position.copy(H), s.lookAt(n), f.target.copy(n), E = requestAnimationFrame(z);
|
|
643
|
+
}, c = () => {
|
|
644
644
|
if (t.value.length === 0) return;
|
|
645
|
-
const { camera: s, controls:
|
|
646
|
-
if (!s || !
|
|
647
|
-
m.copy(s.position),
|
|
648
|
-
const
|
|
649
|
-
t.value.forEach((
|
|
650
|
-
|
|
645
|
+
const { camera: s, controls: f } = o();
|
|
646
|
+
if (!s || !f) return;
|
|
647
|
+
m.copy(s.position), _.copy(f.target);
|
|
648
|
+
const b = new Et();
|
|
649
|
+
t.value.forEach((r) => {
|
|
650
|
+
b.expandByObject(r);
|
|
651
651
|
});
|
|
652
|
-
const
|
|
653
|
-
n =
|
|
654
|
-
const
|
|
655
|
-
|
|
656
|
-
const
|
|
657
|
-
const
|
|
658
|
-
s.position.lerpVectors(
|
|
652
|
+
const F = b.getSize(new g());
|
|
653
|
+
n = b.getCenter(new g()), P = Math.max(F.x, F.y, F.z) * 1.2;
|
|
654
|
+
const H = new g(n.x + P * 1.2, n.y, n.z);
|
|
655
|
+
f.enabled = !1;
|
|
656
|
+
const G = s.position.clone(), Y = 1e3, K = Date.now(), d = () => {
|
|
657
|
+
const r = Date.now() - K, S = Math.min(r / Y, 1), X = I(S);
|
|
658
|
+
s.position.lerpVectors(G, H, X), s.lookAt(n), f.target.copy(n), S < 1 ? requestAnimationFrame(d) : (e.value = !0, i = null, z());
|
|
659
659
|
};
|
|
660
|
-
|
|
661
|
-
},
|
|
662
|
-
e.value = !1, i = null,
|
|
660
|
+
d();
|
|
661
|
+
}, x = () => {
|
|
662
|
+
e.value = !1, i = null, E && (cancelAnimationFrame(E), E = null);
|
|
663
663
|
const { controls: s } = o();
|
|
664
|
-
s && (s.enabled = !0, s.target.copy(
|
|
664
|
+
s && (s.enabled = !0, s.target.copy(_));
|
|
665
665
|
};
|
|
666
666
|
return {
|
|
667
667
|
isAnimating: e,
|
|
668
668
|
toggleAnimation: () => {
|
|
669
669
|
if (e.value) {
|
|
670
|
-
e.value = !1, i = null,
|
|
671
|
-
const { camera: s, controls:
|
|
672
|
-
if (!s || !
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
const
|
|
676
|
-
s.position.lerpVectors(
|
|
670
|
+
e.value = !1, i = null, E && (cancelAnimationFrame(E), E = null);
|
|
671
|
+
const { camera: s, controls: f } = o();
|
|
672
|
+
if (!s || !f) return;
|
|
673
|
+
f.enabled = !0;
|
|
674
|
+
const b = s.position.clone(), F = f.target.clone(), H = 1500, G = Date.now(), Y = () => {
|
|
675
|
+
const K = Date.now() - G, d = Math.min(K / H, 1), r = I(d);
|
|
676
|
+
s.position.lerpVectors(b, m, r), f.target.lerpVectors(F, _, r), d < 1 && requestAnimationFrame(Y);
|
|
677
677
|
};
|
|
678
678
|
Y();
|
|
679
679
|
} else
|
|
680
|
-
|
|
680
|
+
c();
|
|
681
681
|
},
|
|
682
|
-
startAnimation:
|
|
683
|
-
stopAnimation:
|
|
682
|
+
startAnimation: c,
|
|
683
|
+
stopAnimation: x
|
|
684
684
|
};
|
|
685
685
|
}
|
|
686
686
|
function Ie(o, t) {
|
|
687
|
-
const e =
|
|
688
|
-
let a = [], m = [],
|
|
689
|
-
const
|
|
687
|
+
const e = C(!1), i = C("none");
|
|
688
|
+
let a = [], m = [], _ = new Et(), n = new g();
|
|
689
|
+
const P = () => {
|
|
690
690
|
a = [
|
|
691
|
-
new Pt(new
|
|
691
|
+
new Pt(new g(1, 0, 0), 0),
|
|
692
692
|
// X轴平面
|
|
693
|
-
new Pt(new
|
|
693
|
+
new Pt(new g(0, 1, 0), 0),
|
|
694
694
|
// Y轴平面
|
|
695
|
-
new Pt(new
|
|
695
|
+
new Pt(new g(0, 0, 1), 0)
|
|
696
696
|
// Z轴平面
|
|
697
697
|
];
|
|
698
|
-
},
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
}), n =
|
|
702
|
-
}, I = (
|
|
703
|
-
const s =
|
|
704
|
-
let
|
|
705
|
-
|
|
706
|
-
const
|
|
698
|
+
}, E = () => {
|
|
699
|
+
_.makeEmpty(), t.value.forEach((v) => {
|
|
700
|
+
_.expandByObject(v);
|
|
701
|
+
}), n = _.getCenter(new g());
|
|
702
|
+
}, I = (v) => {
|
|
703
|
+
const s = _.getSize(new g());
|
|
704
|
+
let f, b, F;
|
|
705
|
+
v === "x" ? (f = new Mt(s.z * 1.2, s.y * 1.2), b = new g(n.x, n.y, n.z), F = new St(0, Math.PI / 2, 0)) : v === "y" ? (f = new Mt(s.x * 1.2, s.z * 1.2), b = new g(n.x, n.y, n.z), F = new St(Math.PI / 2, 0, 0)) : v === "z" && (f = new Mt(s.x * 1.2, s.y * 1.2), b = new g(n.x, n.y, n.z), F = new St(0, 0, 0));
|
|
706
|
+
const H = new fe({
|
|
707
707
|
color: 8900331,
|
|
708
708
|
transparent: !0,
|
|
709
709
|
opacity: 0.3,
|
|
710
710
|
side: _e,
|
|
711
711
|
depthWrite: !1
|
|
712
|
-
}),
|
|
713
|
-
return
|
|
712
|
+
}), G = new Bt(f, H);
|
|
713
|
+
return G.position.copy(b), G.rotation.copy(F), G;
|
|
714
714
|
}, N = () => {
|
|
715
|
-
if (
|
|
715
|
+
if (z(), c(), i.value === "none")
|
|
716
716
|
return;
|
|
717
|
-
|
|
718
|
-
let
|
|
719
|
-
if (i.value === "x" ? (a[0].constant = -n.x,
|
|
720
|
-
t.value.forEach((
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
}) :
|
|
717
|
+
E();
|
|
718
|
+
let v = null;
|
|
719
|
+
if (i.value === "x" ? (a[0].constant = -n.x, v = a[0]) : i.value === "y" ? (a[1].constant = -n.y, v = a[1]) : i.value === "z" && (a[2].constant = -n.z, v = a[2]), v) {
|
|
720
|
+
t.value.forEach((f) => {
|
|
721
|
+
f.traverse((b) => {
|
|
722
|
+
b.isMesh && b.material && (Array.isArray(b.material) ? b.material.forEach((F) => {
|
|
723
|
+
F.clippingPlanes = [v];
|
|
724
|
+
}) : b.material.clippingPlanes = [v]);
|
|
725
725
|
});
|
|
726
726
|
});
|
|
727
727
|
const { scene: s } = o();
|
|
728
728
|
if (s) {
|
|
729
|
-
const
|
|
730
|
-
s.add(
|
|
729
|
+
const f = I(i.value);
|
|
730
|
+
s.add(f), m.push(f);
|
|
731
731
|
}
|
|
732
732
|
}
|
|
733
|
-
},
|
|
734
|
-
t.value.forEach((
|
|
735
|
-
|
|
736
|
-
s.isMesh && s.material && (Array.isArray(s.material) ? s.material.forEach((
|
|
737
|
-
|
|
733
|
+
}, z = () => {
|
|
734
|
+
t.value.forEach((v) => {
|
|
735
|
+
v.traverse((s) => {
|
|
736
|
+
s.isMesh && s.material && (Array.isArray(s.material) ? s.material.forEach((f) => {
|
|
737
|
+
f.clippingPlanes = [];
|
|
738
738
|
}) : s.material.clippingPlanes = []);
|
|
739
739
|
});
|
|
740
740
|
});
|
|
741
|
-
},
|
|
742
|
-
const { scene:
|
|
743
|
-
|
|
744
|
-
|
|
741
|
+
}, c = () => {
|
|
742
|
+
const { scene: v } = o();
|
|
743
|
+
v && m.forEach((s) => {
|
|
744
|
+
v.remove(s), s.geometry.dispose(), s.material.dispose();
|
|
745
745
|
}), m = [];
|
|
746
746
|
};
|
|
747
747
|
return {
|
|
748
748
|
isClipping: e,
|
|
749
749
|
activeClippingAxis: i,
|
|
750
750
|
toggleClipping: () => {
|
|
751
|
-
e.value = !e.value, e.value ? (
|
|
751
|
+
e.value = !e.value, e.value ? (P(), t.value.length > 0 && E()) : (i.value = "none", z(), c());
|
|
752
752
|
},
|
|
753
753
|
updateClippingPlanes: N,
|
|
754
|
-
clearClippingPlanes:
|
|
755
|
-
clearClippingMeshes:
|
|
754
|
+
clearClippingPlanes: z,
|
|
755
|
+
clearClippingMeshes: c
|
|
756
756
|
};
|
|
757
757
|
}
|
|
758
758
|
const Fe = { class: "panel-content" }, Ne = {
|
|
@@ -763,22 +763,22 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
763
763
|
},
|
|
764
764
|
setup(o) {
|
|
765
765
|
const t = o;
|
|
766
|
-
|
|
767
|
-
const e =
|
|
766
|
+
C();
|
|
767
|
+
const e = C();
|
|
768
768
|
return xt(
|
|
769
769
|
() => [t == null ? void 0 : t.animationData],
|
|
770
770
|
() => {
|
|
771
771
|
var a;
|
|
772
|
-
let i = ((a =
|
|
772
|
+
let i = ((a = $t(t == null ? void 0 : t.animationData)) == null ? void 0 : a.动画输出Content) ?? [];
|
|
773
773
|
i && (e.value = i);
|
|
774
774
|
},
|
|
775
775
|
{ deep: !0, immediate: !0 }
|
|
776
776
|
), (i, a) => {
|
|
777
|
-
var m,
|
|
778
|
-
return
|
|
779
|
-
(
|
|
777
|
+
var m, _, n;
|
|
778
|
+
return $(), q("div", Fe, [
|
|
779
|
+
($(), Zt(ge, {
|
|
780
780
|
itemData: (m = e.value) == null ? void 0 : m.compData,
|
|
781
|
-
key: (
|
|
781
|
+
key: (_ = e.value) == null ? void 0 : _.id,
|
|
782
782
|
index: (n = e.value) == null ? void 0 : n.id,
|
|
783
783
|
showHeader: !1
|
|
784
784
|
}, null, 8, ["itemData", "index"]))
|
|
@@ -801,73 +801,73 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
801
801
|
},
|
|
802
802
|
emits: ["nodeClick"],
|
|
803
803
|
setup(o, { emit: t }) {
|
|
804
|
-
const e = o, i = t, a =
|
|
804
|
+
const e = o, i = t, a = C([]), m = {
|
|
805
805
|
children: "children",
|
|
806
806
|
label: "label"
|
|
807
|
-
},
|
|
808
|
-
i("nodeClick",
|
|
809
|
-
}, n = (
|
|
810
|
-
const
|
|
811
|
-
return Array.isArray(
|
|
807
|
+
}, _ = (c) => {
|
|
808
|
+
i("nodeClick", c);
|
|
809
|
+
}, n = (c, x = 0) => {
|
|
810
|
+
const v = [];
|
|
811
|
+
return Array.isArray(c) && (c == null ? void 0 : c.length) > 0 && c.forEach((s) => {
|
|
812
812
|
if (!(s != null && s.isMesh) && ((s == null ? void 0 : s.type) === "URDFJoint" || (s == null ? void 0 : s.type) === "URDFLink")) {
|
|
813
|
-
const
|
|
813
|
+
const f = {
|
|
814
814
|
name: s == null ? void 0 : s.name,
|
|
815
815
|
label: s == null ? void 0 : s.name,
|
|
816
816
|
show: !0,
|
|
817
|
-
level:
|
|
817
|
+
level: x + 1,
|
|
818
818
|
isPenultimate: !1,
|
|
819
819
|
type: s == null ? void 0 : s.type,
|
|
820
820
|
id: s == null ? void 0 : s.id,
|
|
821
821
|
limit: (s == null ? void 0 : s.limit) ?? "",
|
|
822
|
-
children: n(s == null ? void 0 : s.children,
|
|
822
|
+
children: n(s == null ? void 0 : s.children, x + 1),
|
|
823
823
|
path: s == null ? void 0 : s.name
|
|
824
824
|
};
|
|
825
|
-
|
|
825
|
+
v.push(f);
|
|
826
826
|
}
|
|
827
|
-
}),
|
|
828
|
-
},
|
|
829
|
-
name:
|
|
830
|
-
label:
|
|
827
|
+
}), v;
|
|
828
|
+
}, P = (c) => c ? [{
|
|
829
|
+
name: c == null ? void 0 : c.name,
|
|
830
|
+
label: c == null ? void 0 : c.name,
|
|
831
831
|
show: !0,
|
|
832
832
|
level: 1,
|
|
833
833
|
isPenultimate: !1,
|
|
834
|
-
type:
|
|
835
|
-
id:
|
|
836
|
-
limit: (
|
|
837
|
-
children: n(
|
|
838
|
-
path:
|
|
839
|
-
}] : [],
|
|
840
|
-
const
|
|
841
|
-
for (; s.length > 0 &&
|
|
842
|
-
const
|
|
843
|
-
|
|
834
|
+
type: c == null ? void 0 : c.type,
|
|
835
|
+
id: c == null ? void 0 : c.id,
|
|
836
|
+
limit: (c == null ? void 0 : c.limit) ?? "",
|
|
837
|
+
children: n(c == null ? void 0 : c.children, 1),
|
|
838
|
+
path: c == null ? void 0 : c.name
|
|
839
|
+
}] : [], E = (c, x) => {
|
|
840
|
+
const v = [], s = [...c];
|
|
841
|
+
for (; s.length > 0 && v.length < x; ) {
|
|
842
|
+
const f = s.shift();
|
|
843
|
+
f.children && f.children.length > 0 && (v.push(f.id), s.push(...f.children));
|
|
844
844
|
}
|
|
845
|
-
return
|
|
846
|
-
}, I = (
|
|
847
|
-
const
|
|
848
|
-
return
|
|
845
|
+
return v;
|
|
846
|
+
}, I = (c, x) => {
|
|
847
|
+
const v = [];
|
|
848
|
+
return c.forEach((s) => {
|
|
849
849
|
if (s.children && s.children.length > 0) {
|
|
850
|
-
|
|
851
|
-
const
|
|
852
|
-
|
|
850
|
+
v.push(s.id);
|
|
851
|
+
const f = s.children.filter((b) => b.children && b.children.length > 0).slice(0, x).map((b) => b.id);
|
|
852
|
+
v.push(...f);
|
|
853
853
|
}
|
|
854
|
-
}),
|
|
855
|
-
}, N = ut(() => !a.value || a.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? I(a.value, e.maxExpandCount) :
|
|
854
|
+
}), v.slice(0, x + 1);
|
|
855
|
+
}, N = ut(() => !a.value || a.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? I(a.value, e.maxExpandCount) : E(a.value, e.maxExpandCount)), z = ut(() => e != null && e.model ? P(e.model) : []);
|
|
856
856
|
return xt(
|
|
857
|
-
|
|
858
|
-
(
|
|
859
|
-
a.value = JSON.parse(JSON.stringify(
|
|
857
|
+
z,
|
|
858
|
+
(c) => {
|
|
859
|
+
a.value = JSON.parse(JSON.stringify(c));
|
|
860
860
|
},
|
|
861
861
|
{ immediate: !0 }
|
|
862
|
-
), (
|
|
863
|
-
const
|
|
864
|
-
return
|
|
865
|
-
|
|
862
|
+
), (c, x) => {
|
|
863
|
+
const v = Ht("el-tree");
|
|
864
|
+
return $(), q("div", Ue, [
|
|
865
|
+
A(v, {
|
|
866
866
|
data: a.value,
|
|
867
867
|
props: m,
|
|
868
868
|
"default-expanded-keys": N.value,
|
|
869
869
|
"node-key": Ve,
|
|
870
|
-
onNodeClick:
|
|
870
|
+
onNodeClick: _
|
|
871
871
|
}, null, 8, ["data", "default-expanded-keys"])
|
|
872
872
|
]);
|
|
873
873
|
};
|
|
@@ -890,251 +890,251 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
890
890
|
},
|
|
891
891
|
setup(o, { expose: t }) {
|
|
892
892
|
const e = o;
|
|
893
|
-
|
|
894
|
-
const i =
|
|
895
|
-
let
|
|
893
|
+
C(!0);
|
|
894
|
+
const i = C([]), a = C(null), m = C(12.5), _ = C(), n = C(1302), P = C(!1), E = C(!1), I = C(0), N = C(0), z = C(null), c = Xt.degToRad, x = C(1), v = () => as / At / x.value;
|
|
895
|
+
let s = [];
|
|
896
896
|
xt(
|
|
897
897
|
() => e.animationData,
|
|
898
|
-
(
|
|
898
|
+
(p) => {
|
|
899
899
|
var h;
|
|
900
|
-
let
|
|
901
|
-
|
|
900
|
+
let y = ((h = $t(p)) == null ? void 0 : h.动画输出) ?? [];
|
|
901
|
+
y && y.length > 0 && (s = y, X());
|
|
902
902
|
},
|
|
903
903
|
{ deep: !0 }
|
|
904
904
|
);
|
|
905
|
-
const
|
|
906
|
-
if (!
|
|
905
|
+
const f = ut(() => s.length > 0), b = (p, y = !1) => p === "revolute" ? y ? Math.PI : -Math.PI : p === "prismatic" ? y ? 1 : -1 : 0, F = (p) => {
|
|
906
|
+
if (!p || !p.joints)
|
|
907
907
|
return console.warn("URDF模型没有关节信息"), [];
|
|
908
|
-
let
|
|
908
|
+
let y;
|
|
909
909
|
const h = [];
|
|
910
|
-
return Object.keys(
|
|
911
|
-
const
|
|
912
|
-
if (
|
|
910
|
+
return Object.keys(p.joints).forEach((M) => {
|
|
911
|
+
const u = p.joints[M];
|
|
912
|
+
if (u._jointType === "fixed")
|
|
913
913
|
return;
|
|
914
|
-
const
|
|
915
|
-
lower:
|
|
916
|
-
upper:
|
|
914
|
+
const O = u.limit ? {
|
|
915
|
+
lower: u.limit.lower ?? b(u._jointType, !1),
|
|
916
|
+
upper: u.limit.upper ?? b(u._jointType, !0)
|
|
917
917
|
} : {
|
|
918
|
-
lower:
|
|
919
|
-
upper:
|
|
918
|
+
lower: b(u._jointType, !1),
|
|
919
|
+
upper: b(u._jointType, !0)
|
|
920
920
|
};
|
|
921
921
|
h.push({
|
|
922
|
-
name:
|
|
923
|
-
type:
|
|
924
|
-
limit:
|
|
925
|
-
currentValue:
|
|
926
|
-
urdfJoint:
|
|
922
|
+
name: M,
|
|
923
|
+
type: u._jointType || "unknown",
|
|
924
|
+
limit: O,
|
|
925
|
+
currentValue: u.angle || 0,
|
|
926
|
+
urdfJoint: u
|
|
927
927
|
});
|
|
928
|
-
}),
|
|
929
|
-
var
|
|
930
|
-
|
|
931
|
-
|
|
928
|
+
}), p.traverse((M) => {
|
|
929
|
+
var u;
|
|
930
|
+
M.name === "Pipe_Link" && !y && ((u = M.children) == null || u.forEach((O) => {
|
|
931
|
+
O && !y && (y = O);
|
|
932
932
|
}));
|
|
933
|
-
}),
|
|
934
|
-
},
|
|
935
|
-
const h = i.value.find((
|
|
933
|
+
}), y ? (_.value = y, h.sort((M, u) => M.name.localeCompare(u.name))) : !1;
|
|
934
|
+
}, H = (p, y) => {
|
|
935
|
+
const h = i.value.find((u) => u.name === p);
|
|
936
936
|
if (!h) return;
|
|
937
|
-
const
|
|
937
|
+
const M = parseFloat(y);
|
|
938
938
|
if (h.limit) {
|
|
939
|
-
const
|
|
940
|
-
h.currentValue =
|
|
939
|
+
const u = Math.max(h.limit.lower, Math.min(h.limit.upper, M));
|
|
940
|
+
h.currentValue = u;
|
|
941
941
|
} else
|
|
942
|
-
h.currentValue =
|
|
943
|
-
e.model && e.model.setJointValue ? e.model.setJointValue(
|
|
944
|
-
},
|
|
945
|
-
let
|
|
946
|
-
const
|
|
947
|
-
return
|
|
948
|
-
}, 0),
|
|
949
|
-
const
|
|
950
|
-
pos: new
|
|
951
|
-
localY: new
|
|
952
|
-
localX: new
|
|
953
|
-
localZ: new
|
|
942
|
+
h.currentValue = M;
|
|
943
|
+
e.model && e.model.setJointValue ? e.model.setJointValue(p, h.currentValue) : h.urdfJoint && h.urdfJoint.setJointValue(h.currentValue);
|
|
944
|
+
}, G = (p) => p.reduce((y, h) => {
|
|
945
|
+
let M = 0;
|
|
946
|
+
const u = h.Y ?? 0, O = h.C ?? 0, D = h.R ?? 0;
|
|
947
|
+
return u > 0 && (M += u), O > 0 && D > 0 && (M += D * c(O)), y + M;
|
|
948
|
+
}, 0), Y = (p) => {
|
|
949
|
+
const y = [], h = p.Y ?? 0, M = p.B ?? 0, u = p.C ?? 0, O = p.R ?? 0, D = {
|
|
950
|
+
pos: new g(0, 0, 0),
|
|
951
|
+
localY: new g(0, 1, 0),
|
|
952
|
+
localX: new g(1, 0, 0),
|
|
953
|
+
localZ: new g(0, 0, 1)
|
|
954
954
|
};
|
|
955
|
-
if (!h && !
|
|
956
|
-
if (
|
|
957
|
-
const
|
|
958
|
-
D.localX.applyMatrix4(
|
|
955
|
+
if (!h && !u) return y;
|
|
956
|
+
if (y.push(D.pos.clone()), M !== 0) {
|
|
957
|
+
const T = new dt().makeRotationAxis(D.localY, c(M));
|
|
958
|
+
D.localX.applyMatrix4(T), D.localZ.applyMatrix4(T);
|
|
959
959
|
}
|
|
960
|
-
if (h > 0 && (D.pos.add(D.localY.clone().multiplyScalar(h * bt)),
|
|
961
|
-
const
|
|
962
|
-
for (let Q = 1; Q <=
|
|
963
|
-
const
|
|
964
|
-
|
|
960
|
+
if (h > 0 && (D.pos.add(D.localY.clone().multiplyScalar(h * bt)), y.push(D.pos.clone())), u > 0 && O > 0) {
|
|
961
|
+
const T = c(u), l = O * bt, V = D.pos.clone().add(D.localX.clone().multiplyScalar(-l)), st = Math.max(16, Math.ceil(u / 5));
|
|
962
|
+
for (let Q = 1; Q <= st; Q++) {
|
|
963
|
+
const lt = T * Q / st, at = new dt().makeRotationAxis(D.localZ, lt), B = D.localX.clone().multiplyScalar(l).applyMatrix4(at), it = V.clone().add(B);
|
|
964
|
+
y.push(it);
|
|
965
965
|
}
|
|
966
966
|
}
|
|
967
|
-
return
|
|
968
|
-
},
|
|
969
|
-
if (!
|
|
970
|
-
const
|
|
971
|
-
|
|
972
|
-
const
|
|
973
|
-
|
|
967
|
+
return y;
|
|
968
|
+
}, K = (p) => {
|
|
969
|
+
if (!_.value || !f.value) return;
|
|
970
|
+
const y = s.slice(0, p + 1), h = G(y), M = Math.max(0, n.value - h), u = [];
|
|
971
|
+
u.push(new g(0, 0, 0));
|
|
972
|
+
const O = new g(0, M * bt, 0);
|
|
973
|
+
M > 0 && u.push(O);
|
|
974
974
|
let D = {
|
|
975
|
-
pos:
|
|
976
|
-
localY: new
|
|
977
|
-
localX: new
|
|
978
|
-
localZ: new
|
|
975
|
+
pos: O.clone(),
|
|
976
|
+
localY: new g(0, 1, 0),
|
|
977
|
+
localX: new g(1, 0, 0),
|
|
978
|
+
localZ: new g(0, 0, 1)
|
|
979
979
|
};
|
|
980
|
-
const
|
|
981
|
-
for (let
|
|
982
|
-
const
|
|
983
|
-
if (
|
|
984
|
-
const Q =
|
|
985
|
-
const
|
|
980
|
+
const T = [];
|
|
981
|
+
for (let l = y.length - 1; l >= 0; l--) {
|
|
982
|
+
const V = y[l], st = Y(V);
|
|
983
|
+
if (st.length > 0) {
|
|
984
|
+
const Q = st.map((B) => {
|
|
985
|
+
const it = B.clone(), pt = new dt();
|
|
986
986
|
return pt.makeBasis(
|
|
987
987
|
D.localX,
|
|
988
988
|
D.localY,
|
|
989
989
|
D.localZ
|
|
990
|
-
),
|
|
990
|
+
), it.applyMatrix4(pt), it.add(D.pos);
|
|
991
991
|
});
|
|
992
|
-
|
|
993
|
-
const
|
|
994
|
-
D.pos =
|
|
995
|
-
const
|
|
996
|
-
if (
|
|
997
|
-
const
|
|
998
|
-
D.localX.applyMatrix4(
|
|
992
|
+
T.push(Q);
|
|
993
|
+
const lt = Q[Q.length - 1];
|
|
994
|
+
D.pos = lt.clone();
|
|
995
|
+
const at = V.B ?? 0, k = V.C ?? 0;
|
|
996
|
+
if (at !== 0) {
|
|
997
|
+
const B = new dt().makeRotationAxis(D.localY, c(at));
|
|
998
|
+
D.localX.applyMatrix4(B), D.localZ.applyMatrix4(B);
|
|
999
999
|
}
|
|
1000
|
-
if (
|
|
1001
|
-
const
|
|
1002
|
-
D.localY.applyMatrix4(
|
|
1000
|
+
if (k > 0) {
|
|
1001
|
+
const B = c(k), it = new dt().makeRotationAxis(D.localZ, B);
|
|
1002
|
+
D.localY.applyMatrix4(it), D.localX.applyMatrix4(it);
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
for (const
|
|
1007
|
-
|
|
1008
|
-
|
|
1006
|
+
for (const l of T)
|
|
1007
|
+
l.length > 1 && u.push(...l.slice(1));
|
|
1008
|
+
u.length < 2 && u.push(new g(0, 1e-3, 0)), console.log(2321, u);
|
|
1009
1009
|
try {
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1012
|
-
Math.max(2,
|
|
1010
|
+
const l = new ye(u, !1, "catmullrom", 0.01), V = new ve(
|
|
1011
|
+
l,
|
|
1012
|
+
Math.max(2, u.length * 4),
|
|
1013
1013
|
m.value * bt,
|
|
1014
1014
|
18,
|
|
1015
1015
|
!1
|
|
1016
1016
|
);
|
|
1017
|
-
|
|
1018
|
-
} catch (
|
|
1019
|
-
console.error("主管件更新失败",
|
|
1017
|
+
_.value.geometry.dispose(), _.value.geometry = V;
|
|
1018
|
+
} catch (l) {
|
|
1019
|
+
console.error("主管件更新失败", l);
|
|
1020
1020
|
}
|
|
1021
|
-
},
|
|
1022
|
-
|
|
1023
|
-
const
|
|
1024
|
-
|
|
1021
|
+
}, d = (p) => {
|
|
1022
|
+
p && Object.keys(p).forEach((y, h) => {
|
|
1023
|
+
const M = p[y], u = i.value.find((O) => O.name === y);
|
|
1024
|
+
u && (u.currentValue = M, e.model && e.model.setJointValue ? e.model.setJointValue(y, M) : u.urdfJoint && u.urdfJoint.setJointValue(M)), console.log(232, h), K(h);
|
|
1025
1025
|
});
|
|
1026
|
-
},
|
|
1027
|
-
if (!
|
|
1028
|
-
const
|
|
1029
|
-
return Object.keys(
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1032
|
-
}),
|
|
1033
|
-
},
|
|
1034
|
-
if (
|
|
1026
|
+
}, r = (p, y, h) => p + (y - p) * h, S = (p, y, h) => {
|
|
1027
|
+
if (!p || !y) return p || y;
|
|
1028
|
+
const M = {};
|
|
1029
|
+
return Object.keys(p).forEach((u) => {
|
|
1030
|
+
const O = p[u], D = y[u];
|
|
1031
|
+
M[u] = r(O, D || O, h);
|
|
1032
|
+
}), M;
|
|
1033
|
+
}, X = () => {
|
|
1034
|
+
if (s.length === 0) {
|
|
1035
1035
|
console.warn("没有动画数据");
|
|
1036
1036
|
return;
|
|
1037
1037
|
}
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
if (!
|
|
1041
|
-
const
|
|
1042
|
-
if (
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1038
|
+
P.value = !0, E.value = !1;
|
|
1039
|
+
const p = () => {
|
|
1040
|
+
if (!P.value || E.value) return;
|
|
1041
|
+
const y = N.value / At, h = s[I.value], M = s[I.value + 1];
|
|
1042
|
+
if (M) {
|
|
1043
|
+
const u = S(h, M, y);
|
|
1044
|
+
d(u);
|
|
1045
1045
|
} else
|
|
1046
|
-
|
|
1047
|
-
if (N.value++, N.value >= At && (N.value = 0, I.value++, I.value >=
|
|
1048
|
-
|
|
1046
|
+
d(h);
|
|
1047
|
+
if (N.value++, N.value >= At && (N.value = 0, I.value++, I.value >= s.length - 1)) {
|
|
1048
|
+
L();
|
|
1049
1049
|
return;
|
|
1050
1050
|
}
|
|
1051
|
-
|
|
1051
|
+
z.value = setTimeout(p, v());
|
|
1052
1052
|
};
|
|
1053
|
-
|
|
1054
|
-
},
|
|
1055
|
-
|
|
1056
|
-
},
|
|
1057
|
-
|
|
1053
|
+
p();
|
|
1054
|
+
}, J = () => {
|
|
1055
|
+
E.value = !0, z.value && (clearTimeout(z.value), z.value = null);
|
|
1056
|
+
}, L = () => {
|
|
1057
|
+
P.value = !1, E.value = !1, x.value = 1, z.value && (clearTimeout(z.value), z.value = null);
|
|
1058
1058
|
};
|
|
1059
1059
|
t({
|
|
1060
|
-
startAnimation:
|
|
1061
|
-
pauseAnimation:
|
|
1062
|
-
stopAnimation:
|
|
1060
|
+
startAnimation: X,
|
|
1061
|
+
pauseAnimation: J,
|
|
1062
|
+
stopAnimation: L,
|
|
1063
1063
|
resetAll: () => {
|
|
1064
|
-
|
|
1065
|
-
(
|
|
1064
|
+
L(), I.value = 0, N.value = 0, i.value.forEach((p) => {
|
|
1065
|
+
(p.type === "revolute" || p.type === "prismatic") && H(p.name, 0);
|
|
1066
1066
|
});
|
|
1067
1067
|
},
|
|
1068
1068
|
fastForward: () => {
|
|
1069
|
-
|
|
1069
|
+
x.value < 4 && (x.value = Math.min(4, x.value * 2));
|
|
1070
1070
|
},
|
|
1071
1071
|
fastBackward: () => {
|
|
1072
|
-
|
|
1072
|
+
x.value > 0.25 && (x.value = Math.max(0.25, x.value / 2));
|
|
1073
1073
|
}
|
|
1074
1074
|
}), xt(
|
|
1075
1075
|
() => e.model,
|
|
1076
|
-
(
|
|
1077
|
-
|
|
1076
|
+
(p) => {
|
|
1077
|
+
p ? i.value = F(p) : i.value = [];
|
|
1078
1078
|
},
|
|
1079
1079
|
{ immediate: !0 }
|
|
1080
1080
|
);
|
|
1081
1081
|
const Dt = () => {
|
|
1082
|
-
!e.model ||
|
|
1083
|
-
|
|
1082
|
+
!e.model || P.value && !E.value || i.value.forEach((p) => {
|
|
1083
|
+
p.urdfJoint && p.urdfJoint.angle !== void 0 && (p.currentValue = p.urdfJoint.angle);
|
|
1084
1084
|
});
|
|
1085
|
-
}, Tt = () => {
|
|
1086
|
-
const u = () => {
|
|
1087
|
-
Dt(), a.value = requestAnimationFrame(u);
|
|
1088
|
-
};
|
|
1089
|
-
u();
|
|
1090
1085
|
}, ft = () => {
|
|
1086
|
+
const p = () => {
|
|
1087
|
+
Dt(), a.value = requestAnimationFrame(p);
|
|
1088
|
+
};
|
|
1089
|
+
p();
|
|
1090
|
+
}, Tt = () => {
|
|
1091
1091
|
a.value && (cancelAnimationFrame(a.value), a.value = null);
|
|
1092
1092
|
};
|
|
1093
1093
|
return Kt(() => {
|
|
1094
|
-
|
|
1095
|
-
}),
|
|
1096
|
-
|
|
1097
|
-
}), (
|
|
1098
|
-
i.value.length > 0 ? (
|
|
1099
|
-
(
|
|
1100
|
-
var
|
|
1101
|
-
return
|
|
1094
|
+
ft();
|
|
1095
|
+
}), Jt(() => {
|
|
1096
|
+
Tt(), L();
|
|
1097
|
+
}), (p, y) => ($(), q("div", Ke, [
|
|
1098
|
+
i.value.length > 0 ? ($(), q("div", Xe, [
|
|
1099
|
+
($(!0), q(Wt, null, qt(i.value, (h) => {
|
|
1100
|
+
var M, u, O, D;
|
|
1101
|
+
return $(), q("div", {
|
|
1102
1102
|
key: h.name,
|
|
1103
1103
|
class: "joint-item"
|
|
1104
1104
|
}, [
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1105
|
+
w("div", Be, [
|
|
1106
|
+
w("div", $e, [
|
|
1107
|
+
w("span", Ge, nt(h.name), 1),
|
|
1108
|
+
w("span", Je, " [" + nt(((M = h.limit) == null ? void 0 : M.lower.toFixed(2)) ?? (h.type === "revolute" ? "-3.14" : "-1.00")) + ", " + nt(((u = h.limit) == null ? void 0 : u.upper.toFixed(2)) ?? (h.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
|
|
1109
1109
|
]),
|
|
1110
|
-
|
|
1110
|
+
w("span", We, nt(h.type), 1)
|
|
1111
1111
|
]),
|
|
1112
|
-
h.type === "revolute" || h.type === "prismatic" ? (
|
|
1113
|
-
|
|
1114
|
-
|
|
1112
|
+
h.type === "revolute" || h.type === "prismatic" ? ($(), q("div", qe, [
|
|
1113
|
+
w("div", Qe, [
|
|
1114
|
+
w("input", {
|
|
1115
1115
|
type: "range",
|
|
1116
|
-
min: ((
|
|
1116
|
+
min: ((O = h.limit) == null ? void 0 : O.lower) ?? (h.type === "revolute" ? -Math.PI : -1),
|
|
1117
1117
|
max: ((D = h.limit) == null ? void 0 : D.upper) ?? (h.type === "revolute" ? Math.PI : 1),
|
|
1118
1118
|
step: 0.01,
|
|
1119
1119
|
value: h.currentValue,
|
|
1120
|
-
onInput: (
|
|
1120
|
+
onInput: (T) => H(h.name, T.target.value),
|
|
1121
1121
|
class: "joint-slider",
|
|
1122
|
-
disabled:
|
|
1122
|
+
disabled: P.value && !E.value
|
|
1123
1123
|
}, null, 40, ts)
|
|
1124
1124
|
]),
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1125
|
+
w("div", es, [
|
|
1126
|
+
w("span", ss, nt(h.currentValue.toFixed(3)), 1),
|
|
1127
|
+
w("span", is, nt(h.type === "revolute" ? "rad" : "m"), 1)
|
|
1128
1128
|
])
|
|
1129
1129
|
])) : wt("", !0)
|
|
1130
1130
|
]);
|
|
1131
1131
|
}), 128))
|
|
1132
|
-
])) : (
|
|
1133
|
-
|
|
1132
|
+
])) : ($(), q("div", os, y[0] || (y[0] = [
|
|
1133
|
+
w("p", null, "未检测到可控制的关节", -1)
|
|
1134
1134
|
])))
|
|
1135
1135
|
]));
|
|
1136
1136
|
}
|
|
1137
|
-
}, ls = /* @__PURE__ */ mt(ns, [["__scopeId", "data-v-
|
|
1137
|
+
}, ls = /* @__PURE__ */ mt(ns, [["__scopeId", "data-v-9ee05a01"]]), rs = ["xlink:href"], cs = /* @__PURE__ */ Qt({
|
|
1138
1138
|
__name: "svgIcon",
|
|
1139
1139
|
props: {
|
|
1140
1140
|
backgroundColor: { default: "#f0f0f0" },
|
|
@@ -1151,26 +1151,26 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
1151
1151
|
})
|
|
1152
1152
|
), i = ut(() => `#${t.prefix}-${t.name}`), a = ut(() => {
|
|
1153
1153
|
const { size: m } = t;
|
|
1154
|
-
let
|
|
1155
|
-
return
|
|
1156
|
-
width:
|
|
1157
|
-
height:
|
|
1154
|
+
let _ = `${m}`;
|
|
1155
|
+
return _ = `${_.replace("px", "")}px`, {
|
|
1156
|
+
width: _,
|
|
1157
|
+
height: _
|
|
1158
1158
|
};
|
|
1159
1159
|
});
|
|
1160
|
-
return (m,
|
|
1160
|
+
return (m, _) => ($(), q("div", {
|
|
1161
1161
|
class: Ot(["container", { active: m.active }]),
|
|
1162
1162
|
style: Lt(e.value)
|
|
1163
1163
|
}, [
|
|
1164
|
-
(
|
|
1164
|
+
($(), q("svg", {
|
|
1165
1165
|
class: Ot(["svg-icon", [m.$attrs.class, m.spin && "svg-icon-spin"]]),
|
|
1166
1166
|
style: Lt(a.value),
|
|
1167
1167
|
"aria-hidden": "true"
|
|
1168
1168
|
}, [
|
|
1169
|
-
|
|
1169
|
+
w("use", { "xlink:href": i.value }, null, 8, rs)
|
|
1170
1170
|
], 6))
|
|
1171
1171
|
], 6));
|
|
1172
1172
|
}
|
|
1173
|
-
}),
|
|
1173
|
+
}), j = /* @__PURE__ */ mt(cs, [["__scopeId", "data-v-3150a90b"]]), hs = { class: "obj-viewer-container" }, us = { class: "buttonGroup-top" }, ps = { class: "buttonGroup-topLeft" }, ds = { class: "buttonGroup-left" }, ms = { class: "buttonGroup-right" }, fs = { class: "buttonGroup-bottom" }, _s = { class: "left-panel" }, gs = { class: "panel-header" }, ys = {
|
|
1174
1174
|
key: 1,
|
|
1175
1175
|
class: "clipping-content"
|
|
1176
1176
|
}, vs = { class: "radio-group" }, bs = { class: "radio-label" }, ws = { class: "radio-label" }, Ps = { class: "radio-label" }, Ms = { class: "radio-label" }, xs = { class: "right-panel" }, Es = { class: "panel-header" }, Ds = {
|
|
@@ -1188,287 +1188,287 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
1188
1188
|
emits: ["getAnimationData"],
|
|
1189
1189
|
setup(o, { expose: t, emit: e }) {
|
|
1190
1190
|
const i = e, a = o;
|
|
1191
|
-
let m = null,
|
|
1192
|
-
const n =
|
|
1193
|
-
|
|
1194
|
-
const I =
|
|
1191
|
+
let m = null, _ = !1;
|
|
1192
|
+
const n = C(null), P = C(!1), E = C("");
|
|
1193
|
+
C(!1);
|
|
1194
|
+
const I = C(!1), N = C(!1), z = C(""), c = C(!1), x = C(""), v = C(), {
|
|
1195
1195
|
currentModels: s,
|
|
1196
|
-
initialCameraPosition:
|
|
1197
|
-
initialTargetPosition:
|
|
1198
|
-
initThreeJS:
|
|
1199
|
-
handleResize:
|
|
1200
|
-
fitCameraToAllModels:
|
|
1196
|
+
initialCameraPosition: f,
|
|
1197
|
+
initialTargetPosition: b,
|
|
1198
|
+
initThreeJS: F,
|
|
1199
|
+
handleResize: H,
|
|
1200
|
+
fitCameraToAllModels: G,
|
|
1201
1201
|
getThreeJSObjects: Y,
|
|
1202
|
-
clearAllModels:
|
|
1203
|
-
cleanup:
|
|
1204
|
-
} = Oe(n), { isAnimating:
|
|
1202
|
+
clearAllModels: K,
|
|
1203
|
+
cleanup: d
|
|
1204
|
+
} = Oe(n), { isAnimating: r, toggleAnimation: S, stopAnimation: X } = je(Y, s), { isClipping: J, activeClippingAxis: L, toggleClipping: et, updateClippingPlanes: ot } = Ie(
|
|
1205
1205
|
Y,
|
|
1206
1206
|
s
|
|
1207
|
-
), { addModelsFromUrls:
|
|
1207
|
+
), { addModelsFromUrls: zt, loadModelByDefaultPath: Dt, urdfModel: ft } = be(
|
|
1208
1208
|
Y,
|
|
1209
1209
|
s,
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
),
|
|
1210
|
+
P,
|
|
1211
|
+
E,
|
|
1212
|
+
K
|
|
1213
|
+
), Tt = () => {
|
|
1214
1214
|
if (I.value || s.value.length === 0) return;
|
|
1215
|
-
I.value = !0,
|
|
1216
|
-
const { camera:
|
|
1217
|
-
if (!
|
|
1218
|
-
|
|
1219
|
-
const
|
|
1220
|
-
const
|
|
1221
|
-
|
|
1215
|
+
I.value = !0, r.value && X();
|
|
1216
|
+
const { camera: T, controls: l } = Y();
|
|
1217
|
+
if (!T || !l) return;
|
|
1218
|
+
l.enabled = !0;
|
|
1219
|
+
const V = (B) => B < 0.5 ? 4 * B * B * B : 1 - Math.pow(-2 * B + 2, 3) / 2, st = T.position.clone(), Q = l.target.clone(), lt = 1500, at = Date.now(), k = () => {
|
|
1220
|
+
const B = Date.now() - at, it = Math.min(B / lt, 1), pt = V(it);
|
|
1221
|
+
T.position.lerpVectors(st, f.value, pt), l.target.lerpVectors(Q, b.value, pt), it < 1 ? requestAnimationFrame(k) : I.value = !1;
|
|
1222
1222
|
};
|
|
1223
|
-
|
|
1224
|
-
},
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1223
|
+
k();
|
|
1224
|
+
}, p = async () => _ ? Promise.resolve() : new Promise((T) => {
|
|
1225
|
+
const l = () => {
|
|
1226
|
+
_ ? T() : requestAnimationFrame(l);
|
|
1227
1227
|
};
|
|
1228
|
-
|
|
1229
|
-
}),
|
|
1228
|
+
l();
|
|
1229
|
+
}), y = async (T, l) => {
|
|
1230
1230
|
try {
|
|
1231
|
-
await
|
|
1232
|
-
const
|
|
1233
|
-
return
|
|
1234
|
-
} catch (
|
|
1235
|
-
throw console.error("加载模型失败:",
|
|
1231
|
+
await p(), r.value && X(), J.value && et();
|
|
1232
|
+
const V = await l(T);
|
|
1233
|
+
return G(), V;
|
|
1234
|
+
} catch (V) {
|
|
1235
|
+
throw console.error("加载模型失败:", V), V;
|
|
1236
1236
|
}
|
|
1237
|
-
},
|
|
1238
|
-
N.value = !0,
|
|
1239
|
-
},
|
|
1240
|
-
|
|
1241
|
-
},
|
|
1237
|
+
}, h = async (T) => y(T, zt), M = async (T) => y(T, Dt), u = (T) => {
|
|
1238
|
+
N.value = !0, z.value = T, T === "剖面视图" && !J.value && et();
|
|
1239
|
+
}, O = (T) => {
|
|
1240
|
+
c.value = !0, x.value = T;
|
|
1241
|
+
}, D = () => {
|
|
1242
1242
|
i("getAnimationData"), jt(() => {
|
|
1243
|
-
var
|
|
1244
|
-
(
|
|
1243
|
+
var T;
|
|
1244
|
+
(T = v.value) == null || T.startAnimation();
|
|
1245
1245
|
});
|
|
1246
1246
|
};
|
|
1247
1247
|
return Kt(async () => {
|
|
1248
1248
|
await jt();
|
|
1249
1249
|
try {
|
|
1250
|
-
|
|
1251
|
-
} catch (
|
|
1252
|
-
console.error("Three.js初始化失败:",
|
|
1250
|
+
F(), m = Y().scene, _ = !0, window.addEventListener("resize", H);
|
|
1251
|
+
} catch (T) {
|
|
1252
|
+
console.error("Three.js初始化失败:", T);
|
|
1253
1253
|
}
|
|
1254
|
-
}),
|
|
1255
|
-
|
|
1254
|
+
}), te(() => {
|
|
1255
|
+
_ = !1, z.value = "", x.value = "", window.removeEventListener("resize", H), r.value && X(), d();
|
|
1256
1256
|
}), t({
|
|
1257
|
-
addModelsFromUrls:
|
|
1258
|
-
loadModelByDefaultPath:
|
|
1259
|
-
}), (
|
|
1260
|
-
var
|
|
1261
|
-
const
|
|
1262
|
-
return
|
|
1263
|
-
|
|
1257
|
+
addModelsFromUrls: h,
|
|
1258
|
+
loadModelByDefaultPath: M
|
|
1259
|
+
}), (T, l) => {
|
|
1260
|
+
var st, Q, lt, at;
|
|
1261
|
+
const V = Ht("el-scrollbar");
|
|
1262
|
+
return $(), q("div", hs, [
|
|
1263
|
+
w("div", {
|
|
1264
1264
|
ref_key: "threejsContainer",
|
|
1265
1265
|
ref: n,
|
|
1266
1266
|
class: "threejs-container"
|
|
1267
1267
|
}, null, 512),
|
|
1268
|
-
|
|
1269
|
-
|
|
1268
|
+
w("div", us, [
|
|
1269
|
+
A(j, {
|
|
1270
1270
|
name: "guanjianjiexi",
|
|
1271
1271
|
size: "34"
|
|
1272
1272
|
}),
|
|
1273
|
-
|
|
1273
|
+
A(j, {
|
|
1274
1274
|
name: "guanjiekongzhi",
|
|
1275
1275
|
size: "34"
|
|
1276
1276
|
}),
|
|
1277
|
-
|
|
1277
|
+
A(j, {
|
|
1278
1278
|
name: "gongyishengcheng",
|
|
1279
1279
|
size: "34"
|
|
1280
1280
|
}),
|
|
1281
|
-
|
|
1281
|
+
A(j, {
|
|
1282
1282
|
name: "buchangshezhi",
|
|
1283
1283
|
size: "34"
|
|
1284
1284
|
}),
|
|
1285
|
-
|
|
1285
|
+
A(j, {
|
|
1286
1286
|
name: "shuchujiagongchengxu",
|
|
1287
1287
|
size: "34"
|
|
1288
1288
|
})
|
|
1289
1289
|
]),
|
|
1290
|
-
|
|
1291
|
-
|
|
1290
|
+
w("div", ps, [
|
|
1291
|
+
A(j, {
|
|
1292
1292
|
name: "viewReset",
|
|
1293
1293
|
size: "24",
|
|
1294
|
-
onClick:
|
|
1294
|
+
onClick: Tt,
|
|
1295
1295
|
title: "重置"
|
|
1296
1296
|
}),
|
|
1297
|
-
|
|
1297
|
+
A(j, {
|
|
1298
1298
|
name: "fangda",
|
|
1299
1299
|
size: "24",
|
|
1300
1300
|
title: "放大"
|
|
1301
1301
|
}),
|
|
1302
|
-
|
|
1302
|
+
A(j, {
|
|
1303
1303
|
name: "suoxiao",
|
|
1304
1304
|
size: "24",
|
|
1305
1305
|
title: "缩小"
|
|
1306
1306
|
}),
|
|
1307
|
-
|
|
1307
|
+
A(j, {
|
|
1308
1308
|
name: "lookAround",
|
|
1309
1309
|
size: "24",
|
|
1310
|
-
onClick:
|
|
1311
|
-
title:
|
|
1310
|
+
onClick: Z(S),
|
|
1311
|
+
title: Z(r) ? "停止动画" : "动画视图"
|
|
1312
1312
|
}, null, 8, ["onClick", "title"])
|
|
1313
1313
|
]),
|
|
1314
|
-
|
|
1315
|
-
|
|
1314
|
+
w("div", ds, [
|
|
1315
|
+
A(j, {
|
|
1316
1316
|
name: "jiegoushu",
|
|
1317
1317
|
size: "24",
|
|
1318
|
-
onClick:
|
|
1319
|
-
active: N.value &&
|
|
1318
|
+
onClick: l[0] || (l[0] = (k) => u("场景树")),
|
|
1319
|
+
active: N.value && z.value === "场景树",
|
|
1320
1320
|
title: "场景树"
|
|
1321
1321
|
}, null, 8, ["active"]),
|
|
1322
|
-
|
|
1322
|
+
A(j, {
|
|
1323
1323
|
name: "clipping",
|
|
1324
1324
|
size: "24",
|
|
1325
|
-
onClick:
|
|
1326
|
-
active: N.value &&
|
|
1325
|
+
onClick: l[1] || (l[1] = (k) => u("剖面视图")),
|
|
1326
|
+
active: N.value && z.value === "剖面视图",
|
|
1327
1327
|
title: "剖面视图"
|
|
1328
1328
|
}, null, 8, ["active"]),
|
|
1329
|
-
|
|
1329
|
+
A(j, {
|
|
1330
1330
|
name: "donghuafangzhen",
|
|
1331
1331
|
size: "24",
|
|
1332
|
-
onClick:
|
|
1332
|
+
onClick: l[2] || (l[2] = (k) => u("场景树3"))
|
|
1333
1333
|
}),
|
|
1334
|
-
|
|
1334
|
+
A(j, {
|
|
1335
1335
|
name: "donghuafangzhen",
|
|
1336
1336
|
size: "24",
|
|
1337
|
-
onClick:
|
|
1337
|
+
onClick: l[3] || (l[3] = (k) => u("场景4"))
|
|
1338
1338
|
})
|
|
1339
1339
|
]),
|
|
1340
|
-
|
|
1341
|
-
|
|
1340
|
+
w("div", ms, [
|
|
1341
|
+
A(j, {
|
|
1342
1342
|
name: "donghuafangzhen",
|
|
1343
1343
|
size: "24"
|
|
1344
1344
|
}),
|
|
1345
|
-
|
|
1345
|
+
A(j, {
|
|
1346
1346
|
name: "donghuafangzhen",
|
|
1347
1347
|
size: "24"
|
|
1348
1348
|
}),
|
|
1349
|
-
|
|
1349
|
+
A(j, {
|
|
1350
1350
|
name: "guanjiekongzhi",
|
|
1351
1351
|
size: "24",
|
|
1352
|
-
onClick:
|
|
1353
|
-
active:
|
|
1352
|
+
onClick: l[4] || (l[4] = (k) => O("关节控制")),
|
|
1353
|
+
active: c.value && x.value === "关节控制",
|
|
1354
1354
|
title: "关节控制"
|
|
1355
1355
|
}, null, 8, ["active"]),
|
|
1356
|
-
|
|
1356
|
+
A(j, {
|
|
1357
1357
|
name: "DongHuaFangZhen",
|
|
1358
1358
|
size: "24",
|
|
1359
1359
|
title: "动画仿真",
|
|
1360
|
-
onClick:
|
|
1361
|
-
active:
|
|
1360
|
+
onClick: l[5] || (l[5] = (k) => O("动画仿真")),
|
|
1361
|
+
active: c.value && x.value === "动画仿真"
|
|
1362
1362
|
}, null, 8, ["active"]),
|
|
1363
|
-
|
|
1363
|
+
A(j, {
|
|
1364
1364
|
name: "donghuafangzhen",
|
|
1365
1365
|
size: "24"
|
|
1366
1366
|
}),
|
|
1367
|
-
|
|
1367
|
+
A(j, {
|
|
1368
1368
|
name: "donghuafangzhen",
|
|
1369
1369
|
size: "24"
|
|
1370
1370
|
})
|
|
1371
1371
|
]),
|
|
1372
|
-
|
|
1373
|
-
|
|
1372
|
+
w("div", fs, [
|
|
1373
|
+
A(j, {
|
|
1374
1374
|
name: "kuaitui",
|
|
1375
1375
|
size: "24",
|
|
1376
1376
|
backgroundColor: "#ffffff",
|
|
1377
1377
|
title: "快退",
|
|
1378
|
-
onClick: (
|
|
1378
|
+
onClick: (st = v.value) == null ? void 0 : st.fastBackward
|
|
1379
1379
|
}, null, 8, ["onClick"]),
|
|
1380
|
-
|
|
1380
|
+
A(j, {
|
|
1381
1381
|
name: "bofang",
|
|
1382
1382
|
size: "24",
|
|
1383
1383
|
backgroundColor: "#ffffff",
|
|
1384
1384
|
title: "播放",
|
|
1385
|
-
onClick:
|
|
1385
|
+
onClick: D
|
|
1386
1386
|
}),
|
|
1387
|
-
|
|
1387
|
+
A(j, {
|
|
1388
1388
|
name: "kuaijin",
|
|
1389
1389
|
size: "24",
|
|
1390
1390
|
backgroundColor: "#ffffff",
|
|
1391
1391
|
title: "快进",
|
|
1392
|
-
onClick: (
|
|
1392
|
+
onClick: (Q = v.value) == null ? void 0 : Q.fastForward
|
|
1393
1393
|
}, null, 8, ["onClick"]),
|
|
1394
|
-
|
|
1394
|
+
A(j, {
|
|
1395
1395
|
name: "zanting",
|
|
1396
1396
|
size: "24",
|
|
1397
1397
|
backgroundColor: "#ffffff",
|
|
1398
1398
|
title: "暂停",
|
|
1399
|
-
onClick: (
|
|
1399
|
+
onClick: (lt = v.value) == null ? void 0 : lt.pauseAnimation
|
|
1400
1400
|
}, null, 8, ["onClick"]),
|
|
1401
|
-
|
|
1401
|
+
A(j, {
|
|
1402
1402
|
name: "zhongzhi",
|
|
1403
1403
|
size: "24",
|
|
1404
1404
|
backgroundColor: "#ffffff",
|
|
1405
1405
|
title: "停止",
|
|
1406
|
-
onClick: (
|
|
1406
|
+
onClick: (at = v.value) == null ? void 0 : at.resetAll
|
|
1407
1407
|
}, null, 8, ["onClick"])
|
|
1408
1408
|
]),
|
|
1409
|
-
rt(
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1409
|
+
rt(w("div", _s, [
|
|
1410
|
+
w("div", gs, [
|
|
1411
|
+
w("span", null, nt(z.value), 1),
|
|
1412
|
+
w("span", {
|
|
1413
1413
|
class: "close",
|
|
1414
|
-
onClick:
|
|
1414
|
+
onClick: l[6] || (l[6] = (k) => N.value = !1)
|
|
1415
1415
|
}, " X ")
|
|
1416
1416
|
]),
|
|
1417
|
-
|
|
1417
|
+
A(V, { "max-height": "650px" }, {
|
|
1418
1418
|
default: It(() => [
|
|
1419
|
-
|
|
1419
|
+
z.value === "场景树" ? ($(), Zt(He, {
|
|
1420
1420
|
key: 0,
|
|
1421
|
-
model:
|
|
1421
|
+
model: Z(ft)
|
|
1422
1422
|
}, null, 8, ["model"])) : wt("", !0),
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
rt(
|
|
1423
|
+
z.value === "剖面视图" ? ($(), q("div", ys, [
|
|
1424
|
+
w("div", vs, [
|
|
1425
|
+
w("label", bs, [
|
|
1426
|
+
rt(w("input", {
|
|
1427
1427
|
type: "radio",
|
|
1428
1428
|
name: "clipping-axis",
|
|
1429
1429
|
value: "none",
|
|
1430
|
-
"onUpdate:modelValue":
|
|
1431
|
-
onChange:
|
|
1430
|
+
"onUpdate:modelValue": l[7] || (l[7] = (k) => _t(L) ? L.value = k : null),
|
|
1431
|
+
onChange: l[8] || (l[8] = (...k) => Z(ot) && Z(ot)(...k))
|
|
1432
1432
|
}, null, 544), [
|
|
1433
|
-
[gt,
|
|
1433
|
+
[gt, Z(L)]
|
|
1434
1434
|
]),
|
|
1435
|
-
|
|
1435
|
+
l[16] || (l[16] = w("span", { class: "radio-text" }, "无切割", -1))
|
|
1436
1436
|
]),
|
|
1437
|
-
|
|
1438
|
-
rt(
|
|
1437
|
+
w("label", ws, [
|
|
1438
|
+
rt(w("input", {
|
|
1439
1439
|
type: "radio",
|
|
1440
1440
|
name: "clipping-axis",
|
|
1441
1441
|
value: "x",
|
|
1442
|
-
"onUpdate:modelValue":
|
|
1443
|
-
onChange:
|
|
1442
|
+
"onUpdate:modelValue": l[9] || (l[9] = (k) => _t(L) ? L.value = k : null),
|
|
1443
|
+
onChange: l[10] || (l[10] = (...k) => Z(ot) && Z(ot)(...k))
|
|
1444
1444
|
}, null, 544), [
|
|
1445
|
-
[gt,
|
|
1445
|
+
[gt, Z(L)]
|
|
1446
1446
|
]),
|
|
1447
|
-
|
|
1447
|
+
l[17] || (l[17] = w("span", { class: "radio-text" }, "X轴切割", -1))
|
|
1448
1448
|
]),
|
|
1449
|
-
|
|
1450
|
-
rt(
|
|
1449
|
+
w("label", Ps, [
|
|
1450
|
+
rt(w("input", {
|
|
1451
1451
|
type: "radio",
|
|
1452
1452
|
name: "clipping-axis",
|
|
1453
1453
|
value: "y",
|
|
1454
|
-
"onUpdate:modelValue":
|
|
1455
|
-
onChange:
|
|
1454
|
+
"onUpdate:modelValue": l[11] || (l[11] = (k) => _t(L) ? L.value = k : null),
|
|
1455
|
+
onChange: l[12] || (l[12] = (...k) => Z(ot) && Z(ot)(...k))
|
|
1456
1456
|
}, null, 544), [
|
|
1457
|
-
[gt,
|
|
1457
|
+
[gt, Z(L)]
|
|
1458
1458
|
]),
|
|
1459
|
-
|
|
1459
|
+
l[18] || (l[18] = w("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
1460
1460
|
]),
|
|
1461
|
-
|
|
1462
|
-
rt(
|
|
1461
|
+
w("label", Ms, [
|
|
1462
|
+
rt(w("input", {
|
|
1463
1463
|
type: "radio",
|
|
1464
1464
|
name: "clipping-axis",
|
|
1465
1465
|
value: "z",
|
|
1466
|
-
"onUpdate:modelValue":
|
|
1467
|
-
onChange:
|
|
1466
|
+
"onUpdate:modelValue": l[13] || (l[13] = (k) => _t(L) ? L.value = k : null),
|
|
1467
|
+
onChange: l[14] || (l[14] = (...k) => Z(ot) && Z(ot)(...k))
|
|
1468
1468
|
}, null, 544), [
|
|
1469
|
-
[gt,
|
|
1469
|
+
[gt, Z(L)]
|
|
1470
1470
|
]),
|
|
1471
|
-
|
|
1471
|
+
l[19] || (l[19] = w("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
1472
1472
|
])
|
|
1473
1473
|
])
|
|
1474
1474
|
])) : wt("", !0)
|
|
@@ -1478,44 +1478,44 @@ const Fe = { class: "panel-content" }, Ne = {
|
|
|
1478
1478
|
], 512), [
|
|
1479
1479
|
[yt, N.value]
|
|
1480
1480
|
]),
|
|
1481
|
-
rt(
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1481
|
+
rt(w("div", xs, [
|
|
1482
|
+
w("div", Es, [
|
|
1483
|
+
w("span", null, nt(x.value), 1),
|
|
1484
|
+
w("span", {
|
|
1485
1485
|
class: "close",
|
|
1486
|
-
onClick:
|
|
1486
|
+
onClick: l[15] || (l[15] = (k) => c.value = !1)
|
|
1487
1487
|
}, " X ")
|
|
1488
1488
|
]),
|
|
1489
|
-
|
|
1489
|
+
A(V, { "max-height": "650px" }, {
|
|
1490
1490
|
default: It(() => [
|
|
1491
|
-
rt(
|
|
1491
|
+
rt(A(ls, {
|
|
1492
1492
|
ref_key: "jointRef",
|
|
1493
|
-
ref:
|
|
1494
|
-
model:
|
|
1495
|
-
scene:
|
|
1493
|
+
ref: v,
|
|
1494
|
+
model: Z(ft),
|
|
1495
|
+
scene: Z(m),
|
|
1496
1496
|
animationData: a == null ? void 0 : a.animationData
|
|
1497
1497
|
}, null, 8, ["model", "scene", "animationData"]), [
|
|
1498
|
-
[yt,
|
|
1498
|
+
[yt, x.value === "关节控制"]
|
|
1499
1499
|
]),
|
|
1500
|
-
rt(
|
|
1500
|
+
rt(A(Ye, {
|
|
1501
1501
|
animationData: a == null ? void 0 : a.animationData
|
|
1502
1502
|
}, null, 8, ["animationData"]), [
|
|
1503
|
-
[yt,
|
|
1503
|
+
[yt, x.value === "动画仿真"]
|
|
1504
1504
|
])
|
|
1505
1505
|
]),
|
|
1506
1506
|
_: 1
|
|
1507
1507
|
})
|
|
1508
1508
|
], 512), [
|
|
1509
|
-
[yt,
|
|
1509
|
+
[yt, c.value]
|
|
1510
1510
|
]),
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1511
|
+
P.value ? ($(), q("div", Ds, [
|
|
1512
|
+
l[20] || (l[20] = w("div", { class: "loading-spinner" }, null, -1)),
|
|
1513
|
+
w("p", null, nt(E.value), 1)
|
|
1514
1514
|
])) : wt("", !0)
|
|
1515
1515
|
]);
|
|
1516
1516
|
};
|
|
1517
1517
|
}
|
|
1518
|
-
},
|
|
1518
|
+
}, Rs = /* @__PURE__ */ mt(Ts, [["__scopeId", "data-v-14112288"]]);
|
|
1519
1519
|
export {
|
|
1520
|
-
|
|
1520
|
+
Rs as default
|
|
1521
1521
|
};
|