ss-component-new 1.1.554 → 1.1.556

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.
Files changed (56) hide show
  1. package/dist/{index-DnU4tt9j.js → index-A9vxRWRJ.js} +1 -1
  2. package/dist/{index-BIqrhoc3.js → index-B0KEc4se.js} +3 -3
  3. package/dist/{index-BXuzdNd8.js → index-B0zewoKU.js} +1 -1
  4. package/dist/{index-DGtegmw2.cjs → index-B4sdpTyS.cjs} +1 -1
  5. package/dist/{index-DGA3OWJM.js → index-B8H4YhbP.js} +5 -6
  6. package/dist/{index-BG1OEOyl.js → index-BBU7IP4E.js} +1 -1
  7. package/dist/{index-D6aOs9h0.cjs → index-BGxaEDzd.cjs} +1 -1
  8. package/dist/{threeModel.vue_vue_type_style_index_0_scoped_14112288_lang-BV7oq1Z4.js → index-BRSajVMs.js} +10989 -9490
  9. package/dist/{index-CTL7xS-L.js → index-BbArPHI_.js} +3 -3
  10. package/dist/{index-B5DP9GHv.js → index-BjpzOnQV.js} +77 -78
  11. package/dist/{index-j0138X4A.js → index-C0fQaxj0.js} +10 -11
  12. package/dist/index-CQ4Fra8B.cjs +1 -0
  13. package/dist/{index-CYj1gF5q.cjs → index-CQUG7LOj.cjs} +1 -1
  14. package/dist/{index-CUmF1cOi.cjs → index-Cc936HCy.cjs} +1 -1
  15. package/dist/{index-BT2f4FLq.js → index-CrHUNEBr.js} +2 -2
  16. package/dist/index-CxnxDX6H.cjs +15 -0
  17. package/dist/index-DGYkSeKR.cjs +1 -0
  18. package/dist/{index-gBugMNnB.js → index-DKfJ4aOY.js} +1 -1
  19. package/dist/{index-CsCuCAbN.js → index-DN3mTV37.js} +1 -1
  20. package/dist/{index-BWR-wioX.js → index-DOcT5e2z.js} +1 -1
  21. package/dist/{index-D6OLOdzT.cjs → index-DdBP0Wqm.cjs} +1 -1
  22. package/dist/{index-B3OgUMxZ.cjs → index-DdvfxWm4.cjs} +1 -1
  23. package/dist/{index-Ca4GQBZm.cjs → index-DgovG-d1.cjs} +1 -1
  24. package/dist/{index-BvsQ93Dk.cjs → index-Dh1bXLMt.cjs} +1 -1
  25. package/dist/{index-BxnDBGDC.cjs → index-Dh_dKOHK.cjs} +1 -1
  26. package/dist/{index-w-MJfuW8.cjs → index-DiVZz6Oe.cjs} +1 -1
  27. package/dist/index-DsIoySp6.cjs +1 -0
  28. package/dist/index-DtFsiCW3.cjs +4207 -0
  29. package/dist/{index-DNmz0vZR.js → index-F0D-IvSv.js} +2 -2
  30. package/dist/{index-BsItO9KY.cjs → index-PZTeRkmZ.cjs} +1 -1
  31. package/dist/{index-CpsSJGyI.js → index-VTSBaqt5.js} +1 -1
  32. package/dist/{index-CcbZfGsJ.js → index-ffDSB4Kw.js} +1239 -1212
  33. package/dist/{index.vue_vue_type_style_index_0_scoped_d65464db_lang-CfknFSZO.js → index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-BMrXZat4.js} +5 -5
  34. package/dist/{index.vue_vue_type_style_index_0_scoped_d65464db_lang-CMsstxHC.cjs → index.vue_vue_type_style_index_0_scoped_c4f9c92c_lang-CyuSo2v_.cjs} +1 -1
  35. package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-bRTgUmAd.js → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-Bst45l6S.js} +13 -13
  36. package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-BlwV7pHr.cjs → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-SrVKwnka.cjs} +1 -1
  37. package/dist/{main-BwaV15pa.js → main-DqytzL3P.js} +2 -2
  38. package/dist/{main-BKy8Vv3Z.cjs → main-v-FR4zPs.cjs} +1 -1
  39. package/dist/ss-component.cjs +1 -1
  40. package/dist/ss-component.css +1 -1
  41. package/dist/ss-component.js +11 -11
  42. package/dist/ss-component2.cjs +1 -1
  43. package/dist/ss-component2.js +8 -8
  44. package/dist/threeModel-CmuTBluh.cjs +1 -0
  45. package/dist/{threeModel-BJjMjU46.js → threeModel-WrnyyU3X.js} +299 -288
  46. package/package.json +1 -1
  47. package/dist/index-C2UyEyuW.cjs +0 -1
  48. package/dist/index-C8DwyrtS.cjs +0 -1
  49. package/dist/index-CFs5XhDB.cjs +0 -15
  50. package/dist/index-CZ6afBwK.cjs +0 -1
  51. package/dist/index-CiZ2YAhq.js +0 -1506
  52. package/dist/index-Csb_gyiA.cjs +0 -1
  53. package/dist/index-NzNwF1Bc.cjs +0 -1
  54. package/dist/index-nuI9V5ye.js +0 -31
  55. package/dist/threeModel-CMXrjPQi.cjs +0 -1
  56. package/dist/threeModel.vue_vue_type_style_index_0_scoped_14112288_lang-DCn4bomb.cjs +0 -4207
@@ -1,10 +1,8 @@
1
- import { ref as x, watch as _t, createElementBlock as B, openBlock as K, computed as it, resolveComponent as It, createVNode as D, onMounted as Ft, onUnmounted as Bt, Fragment as $t, renderList as Xt, createElementVNode as y, createCommentVNode as dt, toDisplayString as J, defineComponent as Jt, normalizeStyle as Ct, normalizeClass as St, nextTick as kt, onBeforeUnmount as Gt, withDirectives as G, unref as N, withCtx as At, createBlock as Wt, isRef as ht, vModelRadio as ct, vShow as ut } from "vue";
2
- import { C as qt, V as w, M as W, T as et, Q as zt, S as Rt, a as $, R as Qt, P as mt, b as te, B as gt, c as ee, d as ie, e as se, W as oe, f as ne, A as ae, g as le, X as re, G as he, h as ft, i as ce, j as Nt, k as ue, D as vt, H as pe, l as Ot, m as de, n as me, E as bt, u as fe } from "./threeModel.vue_vue_type_style_index_0_scoped_14112288_lang-BV7oq1Z4.js";
3
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BPJ7Cu30.js";
4
- import "./index-BHtNKL1L.js";
1
+ import { ref as x, watch as _t, createElementBlock as $, openBlock as H, createBlock as It, computed as it, resolveComponent as Ft, createVNode as D, onMounted as Nt, onUnmounted as Bt, Fragment as Xt, renderList as Jt, createElementVNode as y, createCommentVNode as dt, toDisplayString as J, defineComponent as Gt, normalizeStyle as Ct, normalizeClass as St, nextTick as kt, onBeforeUnmount as Wt, withDirectives as G, unref as N, withCtx as At, isRef as ht, vModelRadio as ct, vShow as ut } from "vue";
2
+ import { C as qt, V as P, M as W, T as et, Q as zt, D as Ot, E as B, R as Qt, P as mt, F as te, G as gt, H as ee, J as ie, K as se, W as oe, L as ae, N as ne, O as le, X as re, U as he, Y as ft, Z as ce, _ as Ut, $ as ue, a0 as vt, a1 as pe, a2 as Rt, a3 as de, a4 as me, a5 as bt, B as fe, a6 as _e } from "./index-BRSajVMs.js";
5
3
  import { _ as st } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { c as Ut } from "./menu-DV47UKJo.js";
7
- const Lt = { type: "change" }, Mt = { type: "start" }, Yt = { type: "end" }, pt = new Qt(), jt = new mt(), _e = Math.cos(70 * te.DEG2RAD), j = new w(), Z = 2 * Math.PI, T = {
4
+ import { c as Yt } from "./menu-DV47UKJo.js";
5
+ const Lt = { type: "change" }, Mt = { type: "start" }, Vt = { type: "end" }, pt = new Qt(), jt = new mt(), ge = Math.cos(70 * te.DEG2RAD), j = new P(), K = 2 * Math.PI, T = {
8
6
  NONE: -1,
9
7
  ROTATE: 0,
10
8
  DOLLY: 1,
@@ -14,7 +12,7 @@ const Lt = { type: "change" }, Mt = { type: "start" }, Yt = { type: "end" }, pt
14
12
  TOUCH_DOLLY_PAN: 5,
15
13
  TOUCH_DOLLY_ROTATE: 6
16
14
  }, wt = 1e-6;
17
- class ge extends qt {
15
+ class ye extends qt {
18
16
  /**
19
17
  * Constructs a new controls instance.
20
18
  *
@@ -22,7 +20,7 @@ class ge extends qt {
22
20
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
23
21
  */
24
22
  constructor(t, e = null) {
25
- super(t, e), this.state = T.NONE, this.target = new w(), this.cursor = new w(), 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: W.ROTATE, MIDDLE: W.DOLLY, RIGHT: W.PAN }, this.touches = { ONE: et.ROTATE, TWO: et.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new w(), this._lastQuaternion = new zt(), this._lastTargetPosition = new w(), this._quat = new zt().setFromUnitVectors(t.up, new w(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Rt(), this._sphericalDelta = new Rt(), this._scale = 1, this._panOffset = new w(), this._rotateStart = new $(), this._rotateEnd = new $(), this._rotateDelta = new $(), this._panStart = new $(), this._panEnd = new $(), this._panDelta = new $(), this._dollyStart = new $(), this._dollyEnd = new $(), this._dollyDelta = new $(), this._dollyDirection = new w(), this._mouse = new $(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ve.bind(this), this._onPointerDown = ye.bind(this), this._onPointerUp = be.bind(this), this._onContextMenu = Te.bind(this), this._onMouseWheel = Me.bind(this), this._onKeyDown = Ee.bind(this), this._onTouchStart = De.bind(this), this._onTouchMove = xe.bind(this), this._onMouseDown = we.bind(this), this._onMouseMove = Pe.bind(this), this._interceptControlDown = Ce.bind(this), this._interceptControlUp = Se.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
23
+ super(t, e), this.state = T.NONE, this.target = new P(), this.cursor = new P(), 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: W.ROTATE, MIDDLE: W.DOLLY, RIGHT: W.PAN }, this.touches = { ONE: et.ROTATE, TWO: et.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new zt(), this._lastTargetPosition = new P(), this._quat = new zt().setFromUnitVectors(t.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ot(), this._sphericalDelta = new Ot(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new B(), this._rotateEnd = new B(), this._rotateDelta = new B(), this._panStart = new B(), this._panEnd = new B(), this._panDelta = new B(), this._dollyStart = new B(), this._dollyEnd = new B(), this._dollyDelta = new B(), this._dollyDirection = new P(), this._mouse = new B(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = be.bind(this), this._onPointerDown = ve.bind(this), this._onPointerUp = we.bind(this), this._onContextMenu = Ce.bind(this), this._onMouseWheel = Ee.bind(this), this._onKeyDown = De.bind(this), this._onTouchStart = xe.bind(this), this._onTouchMove = Te.bind(this), this._onMouseDown = Pe.bind(this), this._onMouseMove = Me.bind(this), this._interceptControlDown = Se.bind(this), this._interceptControlUp = ke.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
26
24
  }
27
25
  connect(t) {
28
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";
@@ -88,40 +86,40 @@ class ge extends qt {
88
86
  update(t = null) {
89
87
  const e = this.object.position;
90
88
  j.copy(e).sub(this.target), j.applyQuaternion(this._quat), this._spherical.setFromVector3(j), this.autoRotate && this.state === T.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);
91
- let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
92
- isFinite(s) && isFinite(n) && (s < -Math.PI ? s += Z : s > Math.PI && (s -= Z), n < -Math.PI ? n += Z : n > Math.PI && (n -= Z), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, 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);
89
+ let s = this.minAzimuthAngle, a = this.maxAzimuthAngle;
90
+ isFinite(s) && isFinite(a) && (s < -Math.PI ? s += K : s > Math.PI && (s -= K), a < -Math.PI ? a += K : a > Math.PI && (a -= K), s <= a ? this._spherical.theta = Math.max(s, Math.min(a, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + a) / 2 ? Math.max(s, 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);
93
91
  let u = !1;
94
92
  if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera)
95
93
  this._spherical.radius = this._clampDistance(this._spherical.radius);
96
94
  else {
97
- const _ = this._spherical.radius;
98
- this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), u = _ != this._spherical.radius;
95
+ const f = this._spherical.radius;
96
+ this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), u = f != this._spherical.radius;
99
97
  }
100
98
  if (j.setFromSpherical(this._spherical), j.applyQuaternion(this._quatInverse), e.copy(this.target).add(j), 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) {
101
- let _ = null;
99
+ let f = null;
102
100
  if (this.object.isPerspectiveCamera) {
103
- const a = j.length();
104
- _ = this._clampDistance(a * this._scale);
105
- const P = a - _;
106
- this.object.position.addScaledVector(this._dollyDirection, P), this.object.updateMatrixWorld(), u = !!P;
101
+ const n = j.length();
102
+ f = this._clampDistance(n * this._scale);
103
+ const b = n - f;
104
+ this.object.position.addScaledVector(this._dollyDirection, b), this.object.updateMatrixWorld(), u = !!b;
107
105
  } else if (this.object.isOrthographicCamera) {
108
- const a = new w(this._mouse.x, this._mouse.y, 0);
109
- a.unproject(this.object);
110
- const P = this.object.zoom;
111
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), u = P !== this.object.zoom;
112
- const M = new w(this._mouse.x, this._mouse.y, 0);
113
- M.unproject(this.object), this.object.position.sub(M).add(a), this.object.updateMatrixWorld(), _ = j.length();
106
+ const n = new P(this._mouse.x, this._mouse.y, 0);
107
+ n.unproject(this.object);
108
+ const b = this.object.zoom;
109
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), u = b !== this.object.zoom;
110
+ const M = new P(this._mouse.x, this._mouse.y, 0);
111
+ M.unproject(this.object), this.object.position.sub(M).add(n), this.object.updateMatrixWorld(), f = j.length();
114
112
  } else
115
113
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
116
- _ !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(_).add(this.object.position) : (pt.origin.copy(this.object.position), pt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(pt.direction)) < _e ? this.object.lookAt(this.target) : (jt.setFromNormalAndCoplanarPoint(this.object.up, this.target), pt.intersectPlane(jt, this.target))));
114
+ f !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(f).add(this.object.position) : (pt.origin.copy(this.object.position), pt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(pt.direction)) < ge ? this.object.lookAt(this.target) : (jt.setFromNormalAndCoplanarPoint(this.object.up, this.target), pt.intersectPlane(jt, this.target))));
117
115
  } else if (this.object.isOrthographicCamera) {
118
- const _ = this.object.zoom;
119
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), _ !== this.object.zoom && (this.object.updateProjectionMatrix(), u = !0);
116
+ const f = this.object.zoom;
117
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), f !== this.object.zoom && (this.object.updateProjectionMatrix(), u = !0);
120
118
  }
121
119
  return this._scale = 1, this._performCursorZoom = !1, u || this._lastPosition.distanceToSquared(this.object.position) > wt || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > wt || this._lastTargetPosition.distanceToSquared(this.target) > wt ? (this.dispatchEvent(Lt), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
122
120
  }
123
121
  _getAutoRotationAngle(t) {
124
- return t !== null ? Z / 60 * this.autoRotateSpeed * t : Z / 60 / 60 * this.autoRotateSpeed;
122
+ return t !== null ? K / 60 * this.autoRotateSpeed * t : K / 60 / 60 * this.autoRotateSpeed;
125
123
  }
126
124
  _getZoomScale(t) {
127
125
  const e = Math.abs(t * 0.01);
@@ -143,8 +141,8 @@ class ge extends qt {
143
141
  _pan(t, e) {
144
142
  const s = this.domElement;
145
143
  if (this.object.isPerspectiveCamera) {
146
- const n = this.object.position;
147
- j.copy(n).sub(this.target);
144
+ const a = this.object.position;
145
+ j.copy(a).sub(this.target);
148
146
  let u = j.length();
149
147
  u *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * t * u / s.clientHeight, this.object.matrix), this._panUp(2 * e * u / s.clientHeight, this.object.matrix);
150
148
  } else this.object.isOrthographicCamera ? (this._panLeft(t * (this.object.right - this.object.left) / this.object.zoom / s.clientWidth, this.object.matrix), this._panUp(e * (this.object.top - this.object.bottom) / this.object.zoom / s.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
@@ -159,8 +157,8 @@ class ge extends qt {
159
157
  if (!this.zoomToCursor)
160
158
  return;
161
159
  this._performCursorZoom = !0;
162
- const s = this.domElement.getBoundingClientRect(), n = t - s.left, u = e - s.top, _ = s.width, a = s.height;
163
- this._mouse.x = n / _ * 2 - 1, this._mouse.y = -(u / a) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
160
+ const s = this.domElement.getBoundingClientRect(), a = t - s.left, u = e - s.top, f = s.width, n = s.height;
161
+ this._mouse.x = a / f * 2 - 1, this._mouse.y = -(u / n) * 2 + 1, this._dollyDirection.set(this._mouse.x, this._mouse.y, 1).unproject(this.object).sub(this.object.position).normalize();
164
162
  }
165
163
  _clampDistance(t) {
166
164
  return Math.max(this.minDistance, Math.min(this.maxDistance, t));
@@ -180,7 +178,7 @@ class ge extends qt {
180
178
  _handleMouseMoveRotate(t) {
181
179
  this._rotateEnd.set(t.clientX, t.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
182
180
  const e = this.domElement;
183
- this._rotateLeft(Z * this._rotateDelta.x / e.clientHeight), this._rotateUp(Z * this._rotateDelta.y / e.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
181
+ this._rotateLeft(K * this._rotateDelta.x / e.clientHeight), this._rotateUp(K * this._rotateDelta.y / e.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
184
182
  }
185
183
  _handleMouseMoveDolly(t) {
186
184
  this._dollyEnd.set(t.clientX, t.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
@@ -195,16 +193,16 @@ class ge extends qt {
195
193
  let e = !1;
196
194
  switch (t.code) {
197
195
  case this.keys.UP:
198
- t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateUp(Z * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), e = !0;
196
+ t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateUp(K * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), e = !0;
199
197
  break;
200
198
  case this.keys.BOTTOM:
201
- t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateUp(-Z * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), e = !0;
199
+ t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateUp(-K * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), e = !0;
202
200
  break;
203
201
  case this.keys.LEFT:
204
- t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateLeft(Z * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), e = !0;
202
+ t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateLeft(K * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), e = !0;
205
203
  break;
206
204
  case this.keys.RIGHT:
207
- t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateLeft(-Z * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), e = !0;
205
+ t.ctrlKey || t.metaKey || t.shiftKey ? this.enableRotate && this._rotateLeft(-K * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), e = !0;
208
206
  break;
209
207
  }
210
208
  e && (t.preventDefault(), this.update());
@@ -213,20 +211,20 @@ class ge extends qt {
213
211
  if (this._pointers.length === 1)
214
212
  this._rotateStart.set(t.pageX, t.pageY);
215
213
  else {
216
- const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), n = 0.5 * (t.pageY + e.y);
217
- this._rotateStart.set(s, n);
214
+ const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), a = 0.5 * (t.pageY + e.y);
215
+ this._rotateStart.set(s, a);
218
216
  }
219
217
  }
220
218
  _handleTouchStartPan(t) {
221
219
  if (this._pointers.length === 1)
222
220
  this._panStart.set(t.pageX, t.pageY);
223
221
  else {
224
- const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), n = 0.5 * (t.pageY + e.y);
225
- this._panStart.set(s, n);
222
+ const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), a = 0.5 * (t.pageY + e.y);
223
+ this._panStart.set(s, a);
226
224
  }
227
225
  }
228
226
  _handleTouchStartDolly(t) {
229
- const e = this._getSecondPointerPosition(t), s = t.pageX - e.x, n = t.pageY - e.y, u = Math.sqrt(s * s + n * n);
227
+ const e = this._getSecondPointerPosition(t), s = t.pageX - e.x, a = t.pageY - e.y, u = Math.sqrt(s * s + a * a);
230
228
  this._dollyStart.set(0, u);
231
229
  }
232
230
  _handleTouchStartDollyPan(t) {
@@ -239,27 +237,27 @@ class ge extends qt {
239
237
  if (this._pointers.length == 1)
240
238
  this._rotateEnd.set(t.pageX, t.pageY);
241
239
  else {
242
- const s = this._getSecondPointerPosition(t), n = 0.5 * (t.pageX + s.x), u = 0.5 * (t.pageY + s.y);
243
- this._rotateEnd.set(n, u);
240
+ const s = this._getSecondPointerPosition(t), a = 0.5 * (t.pageX + s.x), u = 0.5 * (t.pageY + s.y);
241
+ this._rotateEnd.set(a, u);
244
242
  }
245
243
  this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
246
244
  const e = this.domElement;
247
- this._rotateLeft(Z * this._rotateDelta.x / e.clientHeight), this._rotateUp(Z * this._rotateDelta.y / e.clientHeight), this._rotateStart.copy(this._rotateEnd);
245
+ this._rotateLeft(K * this._rotateDelta.x / e.clientHeight), this._rotateUp(K * this._rotateDelta.y / e.clientHeight), this._rotateStart.copy(this._rotateEnd);
248
246
  }
249
247
  _handleTouchMovePan(t) {
250
248
  if (this._pointers.length === 1)
251
249
  this._panEnd.set(t.pageX, t.pageY);
252
250
  else {
253
- const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), n = 0.5 * (t.pageY + e.y);
254
- this._panEnd.set(s, n);
251
+ const e = this._getSecondPointerPosition(t), s = 0.5 * (t.pageX + e.x), a = 0.5 * (t.pageY + e.y);
252
+ this._panEnd.set(s, a);
255
253
  }
256
254
  this._panDelta.subVectors(this._panEnd, this._panStart).multiplyScalar(this.panSpeed), this._pan(this._panDelta.x, this._panDelta.y), this._panStart.copy(this._panEnd);
257
255
  }
258
256
  _handleTouchMoveDolly(t) {
259
- const e = this._getSecondPointerPosition(t), s = t.pageX - e.x, n = t.pageY - e.y, u = Math.sqrt(s * s + n * n);
257
+ const e = this._getSecondPointerPosition(t), s = t.pageX - e.x, a = t.pageY - e.y, u = Math.sqrt(s * s + a * a);
260
258
  this._dollyEnd.set(0, u), this._dollyDelta.set(0, Math.pow(this._dollyEnd.y / this._dollyStart.y, this.zoomSpeed)), this._dollyOut(this._dollyDelta.y), this._dollyStart.copy(this._dollyEnd);
261
- const _ = (t.pageX + e.x) * 0.5, a = (t.pageY + e.y) * 0.5;
262
- this._updateZoomParameters(_, a);
259
+ const f = (t.pageX + e.x) * 0.5, n = (t.pageY + e.y) * 0.5;
260
+ this._updateZoomParameters(f, n);
263
261
  }
264
262
  _handleTouchMoveDollyPan(t) {
265
263
  this.enableZoom && this._handleTouchMoveDolly(t), this.enablePan && this._handleTouchMovePan(t);
@@ -286,7 +284,7 @@ class ge extends qt {
286
284
  }
287
285
  _trackPointer(t) {
288
286
  let e = this._pointerPositions[t.pointerId];
289
- e === void 0 && (e = new $(), this._pointerPositions[t.pointerId] = e), e.set(t.pageX, t.pageY);
287
+ e === void 0 && (e = new B(), this._pointerPositions[t.pointerId] = e), e.set(t.pageX, t.pageY);
290
288
  }
291
289
  _getSecondPointerPosition(t) {
292
290
  const e = t.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -310,16 +308,16 @@ class ge extends qt {
310
308
  return t.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
311
309
  }
312
310
  }
313
- function ye(o) {
311
+ function ve(o) {
314
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)));
315
313
  }
316
- function ve(o) {
314
+ function be(o) {
317
315
  this.enabled !== !1 && (o.pointerType === "touch" ? this._onTouchMove(o) : this._onMouseMove(o));
318
316
  }
319
- function be(o) {
317
+ function we(o) {
320
318
  switch (this._removePointer(o), this._pointers.length) {
321
319
  case 0:
322
- this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Yt), this.state = T.NONE;
320
+ this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Vt), this.state = T.NONE;
323
321
  break;
324
322
  case 1:
325
323
  const t = this._pointers[0], e = this._pointerPositions[t];
@@ -327,7 +325,7 @@ function be(o) {
327
325
  break;
328
326
  }
329
327
  }
330
- function we(o) {
328
+ function Pe(o) {
331
329
  let t;
332
330
  switch (o.button) {
333
331
  case 0:
@@ -370,7 +368,7 @@ function we(o) {
370
368
  }
371
369
  this.state !== T.NONE && this.dispatchEvent(Mt);
372
370
  }
373
- function Pe(o) {
371
+ function Me(o) {
374
372
  switch (this.state) {
375
373
  case T.ROTATE:
376
374
  if (this.enableRotate === !1) return;
@@ -386,13 +384,13 @@ function Pe(o) {
386
384
  break;
387
385
  }
388
386
  }
389
- function Me(o) {
390
- this.enabled === !1 || this.enableZoom === !1 || this.state !== T.NONE || (o.preventDefault(), this.dispatchEvent(Mt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Yt));
391
- }
392
387
  function Ee(o) {
393
- this.enabled !== !1 && this._handleKeyDown(o);
388
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== T.NONE || (o.preventDefault(), this.dispatchEvent(Mt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Vt));
394
389
  }
395
390
  function De(o) {
391
+ this.enabled !== !1 && this._handleKeyDown(o);
392
+ }
393
+ function xe(o) {
396
394
  switch (this._trackPointer(o), this._pointers.length) {
397
395
  case 1:
398
396
  switch (this.touches.ONE) {
@@ -427,7 +425,7 @@ function De(o) {
427
425
  }
428
426
  this.state !== T.NONE && this.dispatchEvent(Mt);
429
427
  }
430
- function xe(o) {
428
+ function Te(o) {
431
429
  switch (this._trackPointer(o), this.state) {
432
430
  case T.TOUCH_ROTATE:
433
431
  if (this.enableRotate === !1) return;
@@ -449,29 +447,29 @@ function xe(o) {
449
447
  this.state = T.NONE;
450
448
  }
451
449
  }
452
- function Te(o) {
450
+ function Ce(o) {
453
451
  this.enabled !== !1 && o.preventDefault();
454
452
  }
455
- function Ce(o) {
453
+ function Se(o) {
456
454
  o.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
457
455
  }
458
- function Se(o) {
456
+ function ke(o) {
459
457
  o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
460
458
  }
461
- function ke(o) {
462
- let t = null, e = null, s = null, n = null, u = null, _ = null, a = null, P = null;
463
- const M = x([]), k = x(new w()), U = x(new w()), A = () => {
459
+ function Ae(o) {
460
+ let t = null, e = null, s = null, a = null, u = null, f = null, n = null, b = null;
461
+ const M = x([]), k = x(new P()), U = x(new P()), A = () => {
464
462
  if (!o.value) return;
465
463
  t = new ee(), t.background = new ie(15790320);
466
464
  const m = o.value;
467
465
  e = new se(75, m.clientWidth / m.clientHeight, 0.1, 1e4), e.position.set(8, -8, 6), e.up.set(0, 0, 1), e.lookAt(0, 0, 0), s = new oe({
468
466
  antialias: !0,
469
467
  alpha: !0
470
- }), s.setSize(m.clientWidth, m.clientHeight), s.localClippingEnabled = !0, s.shadowMap.enabled = !0, s.shadowMap.type = ne, s.toneMapping = ae, s.toneMappingExposure = 1, s.outputColorSpace = le, m.appendChild(s.domElement), n = new ge(e, s.domElement), n.enableDamping = !0, n.dampingFactor = 0.05, n.mouseButtons = {
468
+ }), s.setSize(m.clientWidth, m.clientHeight), s.localClippingEnabled = !0, s.shadowMap.enabled = !0, s.shadowMap.type = ae, s.toneMapping = ne, s.toneMappingExposure = 1, s.outputColorSpace = le, m.appendChild(s.domElement), a = new ye(e, s.domElement), a.enableDamping = !0, a.dampingFactor = 0.05, a.mouseButtons = {
471
469
  LEFT: W.ROTATE,
472
470
  MIDDLE: W.PAN,
473
471
  RIGHT: null
474
- }, n.panSpeed = 0.7, u = new re(e, s, {
472
+ }, a.panSpeed = 0.7, u = new re(e, s, {
475
473
  container: m,
476
474
  type: "cube",
477
475
  placement: "top-right",
@@ -501,17 +499,17 @@ function ke(o) {
501
499
  back: {
502
500
  label: "Bottom"
503
501
  }
504
- }), u.attachControls(n), g(), i();
502
+ }), u.attachControls(a), g(), i();
505
503
  }, r = (m, l) => {
506
- a && (t.remove(a), a.dispose()), P && (t.remove(P), P.geometry.dispose(), P.material.dispose());
504
+ n && (t.remove(n), n.dispose()), b && (t.remove(b), b.geometry.dispose(), b.material.dispose());
507
505
  const E = Math.min(Math.max(Math.floor(m / 20), 30), 40);
508
- a = new he(m, E, 13421772, 14540253), a.rotateX(Math.PI / 2), a.position.copy(l), t.add(a);
509
- const H = new ft(m, m), c = new ce({
506
+ n = new he(m, E, 13421772, 14540253), n.rotateX(Math.PI / 2), n.position.copy(l), t.add(n);
507
+ const Z = new ft(m, m), c = new ce({
510
508
  opacity: 0.3,
511
509
  // 阴影透明度
512
510
  color: 0
513
511
  });
514
- P = new Nt(H, c), P.position.copy(l), P.position.z -= 0.01, P.receiveShadow = !0, t.add(P);
512
+ b = new Ut(Z, c), b.position.copy(l), b.position.z -= 0.01, b.receiveShadow = !0, t.add(b);
515
513
  }, C = () => {
516
514
  if (M.value.length === 0)
517
515
  return;
@@ -519,13 +517,13 @@ function ke(o) {
519
517
  M.value.forEach((h) => {
520
518
  m.expandByObject(h);
521
519
  });
522
- const l = m.getSize(new w()), E = m.getCenter(new w()), H = Math.max(l.x, l.y, l.z), c = Math.max(H * 8, 50), f = new w(
520
+ const l = m.getSize(new P()), E = m.getCenter(new P()), Z = Math.max(l.x, l.y, l.z), c = Math.max(Z * 8, 50), _ = new P(
523
521
  E.x,
524
522
  E.y,
525
523
  m.min.z
526
524
  // 模型的最底部
527
525
  );
528
- r(c, f);
526
+ r(c, _);
529
527
  }, g = () => {
530
528
  const m = new ue(4210752, 0.6);
531
529
  t.add(m);
@@ -533,16 +531,16 @@ function ke(o) {
533
531
  l.position.set(10, 10, 8), l.castShadow = !0, l.shadow.mapSize.width = 4096, l.shadow.mapSize.height = 4096, l.shadow.camera.near = 0.5, l.shadow.camera.far = 50, l.shadow.camera.left = -50, l.shadow.camera.right = 50, l.shadow.camera.top = 50, l.shadow.camera.bottom = -50, t.add(l);
534
532
  const E = new vt(16777215, 0.8);
535
533
  E.position.set(-8, -8, 6), t.add(E);
536
- const H = new vt(16777215, 0.6);
537
- H.position.set(0, -15, 2), t.add(H);
534
+ const Z = new vt(16777215, 0.6);
535
+ Z.position.set(0, -15, 2), t.add(Z);
538
536
  const c = new pe(16777215, 4473924, 0.8);
539
537
  t.add(c);
540
- const f = new Ot(16777215, 1, 50);
541
- f.position.set(15, 15, 15), t.add(f);
542
- const h = new Ot(16777215, 0.5, 50);
538
+ const _ = new Rt(16777215, 1, 50);
539
+ _.position.set(15, 15, 15), t.add(_);
540
+ const h = new Rt(16777215, 0.5, 50);
543
541
  h.position.set(-15, -15, 15), t.add(h);
544
542
  }, i = () => {
545
- _ = requestAnimationFrame(i), n && n.update(), s && t && e && s.render(t, e), u && u.render();
543
+ f = requestAnimationFrame(i), a && a.update(), s && t && e && s.render(t, e), u && u.render();
546
544
  }, d = (m) => {
547
545
  [
548
546
  "map",
@@ -559,7 +557,7 @@ function ke(o) {
559
557
  ].forEach((E) => {
560
558
  m[E] && m[E].dispose && m[E].dispose();
561
559
  }), m.dispose && m.dispose();
562
- }, b = (m) => {
560
+ }, w = (m) => {
563
561
  m == null || m.traverse((l) => {
564
562
  l.geometry && l.geometry.dispose(), l.material && (Array.isArray(l.material) ? l.material.forEach((E) => {
565
563
  d(E);
@@ -579,53 +577,53 @@ function ke(o) {
579
577
  e.aspect = l / E, e.updateProjectionMatrix(), s.setSize(l, E), u.update();
580
578
  },
581
579
  fitCameraToAllModels: () => {
582
- if (!e || !n || M.value.length === 0) return;
580
+ if (!e || !a || M.value.length === 0) return;
583
581
  const m = new gt();
584
582
  M.value.forEach((h) => {
585
583
  m.expandByObject(h);
586
584
  });
587
- const l = m.getSize(new w()), E = m.getCenter(new w()), c = Math.max(l.x, l.y, l.z) * 0.8, f = new w(E.x + c, E.y - c, E.z + c);
588
- e.position.copy(f), e.lookAt(E), n.target.copy(E), n.update(), k.value.copy(f), U.value.copy(E), C();
585
+ const l = m.getSize(new P()), E = m.getCenter(new P()), c = Math.max(l.x, l.y, l.z) * 0.8, _ = new P(E.x + c, E.y - c, E.z + c);
586
+ e.position.copy(_), e.lookAt(E), a.target.copy(E), a.update(), k.value.copy(_), U.value.copy(E), C();
589
587
  },
590
588
  getThreeJSObjects: () => ({
591
589
  scene: t,
592
590
  camera: e,
593
591
  renderer: s,
594
- controls: n,
592
+ controls: a,
595
593
  gizmo: u
596
594
  }),
597
595
  clearAllModels: () => {
598
596
  if (!t) return;
599
597
  M.value.forEach((l) => {
600
- t.remove(l), b(l);
598
+ t.remove(l), w(l);
601
599
  });
602
600
  const m = [];
603
601
  t.children.forEach((l) => {
604
- !l.isLight && !l.isCamera && l.type !== "GridHelper" && l !== P && m.push(l);
602
+ !l.isLight && !l.isCamera && l.type !== "GridHelper" && l !== b && m.push(l);
605
603
  }), m.forEach((l) => {
606
- t.remove(l), b(l);
604
+ t.remove(l), w(l);
607
605
  }), M.value = [], C();
608
606
  },
609
607
  cleanup: () => {
610
- _ && cancelAnimationFrame(_), a && a.dispose(), P && (P.geometry.dispose(), P.material.dispose()), s && s.dispose(), n && n.dispose(), u && u.dispose();
608
+ f && cancelAnimationFrame(f), n && n.dispose(), b && (b.geometry.dispose(), b.material.dispose()), s && s.dispose(), a && a.dispose(), u && u.dispose();
611
609
  },
612
610
  updateGridForModels: C
613
611
  };
614
612
  }
615
- function Ae(o, t) {
613
+ function ze(o, t) {
616
614
  const e = x(!1);
617
- let s = null, n = 12700, u = new w(), _ = new w(), a = new w(), P = 0, M = null;
615
+ let s = null, a = 12700, u = new P(), f = new P(), n = new P(), b = 0, M = null;
618
616
  const k = (i) => i < 0.5 ? 4 * i * i * i : 1 - Math.pow(-2 * i + 2, 3) / 2, U = (i) => {
619
- const d = new w(), b = P * 1.2, R = new w(a.x + b, a.y, a.z), Y = new w(a.x, a.y + b, a.z), F = new w(a.x, a.y - b, a.z);
617
+ const d = new P(), w = b * 1.2, O = new P(n.x + w, n.y, n.z), Y = new P(n.x, n.y + w, n.z), F = new P(n.x, n.y - w, n.z);
620
618
  if (i <= 0.567) {
621
619
  const V = i / 0.567 * Math.PI * 2;
622
- d.x = a.x + Math.cos(V) * b, d.z = a.z + Math.sin(V) * b, d.y = a.y;
620
+ d.x = n.x + Math.cos(V) * w, d.z = n.z + Math.sin(V) * w, d.y = n.y;
623
621
  } else if (i <= 0.724) {
624
622
  const L = (i - 0.567) / 0.157, V = k(L);
625
- d.lerpVectors(R, Y, V);
623
+ d.lerpVectors(O, Y, V);
626
624
  } else if (i <= 0.881) {
627
625
  const L = (i - 0.724) / 0.157, m = k(L) * Math.PI;
628
- d.x = a.x + Math.sin(m) * b, d.y = a.y + Math.cos(m) * b, d.z = a.z;
626
+ d.x = n.x + Math.sin(m) * w, d.y = n.y + Math.cos(m) * w, d.z = n.z;
629
627
  } else {
630
628
  const L = (i - 0.881) / 0.119, V = k(L);
631
629
  d.lerpVectors(F, u, V);
@@ -635,35 +633,35 @@ function Ae(o, t) {
635
633
  const { camera: i, controls: d } = o();
636
634
  if (!i || !d) return;
637
635
  s || (s = Date.now());
638
- const b = Date.now() - s, R = Math.min(b / n, 1);
639
- if (R >= 1) {
636
+ const w = Date.now() - s, O = Math.min(w / a, 1);
637
+ if (O >= 1) {
640
638
  C();
641
639
  return;
642
640
  }
643
- const Y = U(R);
644
- i.position.copy(Y), i.lookAt(a), d.target.copy(a), M = requestAnimationFrame(A);
641
+ const Y = U(O);
642
+ i.position.copy(Y), i.lookAt(n), d.target.copy(n), M = requestAnimationFrame(A);
645
643
  }, r = () => {
646
644
  if (t.value.length === 0) return;
647
645
  const { camera: i, controls: d } = o();
648
646
  if (!i || !d) return;
649
- u.copy(i.position), _.copy(d.target);
650
- const b = new gt();
647
+ u.copy(i.position), f.copy(d.target);
648
+ const w = new gt();
651
649
  t.value.forEach((l) => {
652
- b.expandByObject(l);
650
+ w.expandByObject(l);
653
651
  });
654
- const R = b.getSize(new w());
655
- a = b.getCenter(new w()), P = Math.max(R.x, R.y, R.z) * 1.2;
656
- const Y = new w(a.x + P * 1.2, a.y, a.z);
652
+ const O = w.getSize(new P());
653
+ n = w.getCenter(new P()), b = Math.max(O.x, O.y, O.z) * 1.2;
654
+ const Y = new P(n.x + b * 1.2, n.y, n.z);
657
655
  d.enabled = !1;
658
656
  const F = i.position.clone(), L = 1e3, V = Date.now(), m = () => {
659
- const l = Date.now() - V, E = Math.min(l / L, 1), H = k(E);
660
- i.position.lerpVectors(F, Y, H), i.lookAt(a), d.target.copy(a), E < 1 ? requestAnimationFrame(m) : (e.value = !0, s = null, A());
657
+ const l = Date.now() - V, E = Math.min(l / L, 1), Z = k(E);
658
+ i.position.lerpVectors(F, Y, Z), i.lookAt(n), d.target.copy(n), E < 1 ? requestAnimationFrame(m) : (e.value = !0, s = null, A());
661
659
  };
662
660
  m();
663
661
  }, C = () => {
664
662
  e.value = !1, s = null, M && (cancelAnimationFrame(M), M = null);
665
663
  const { controls: i } = o();
666
- i && (i.enabled = !0, i.target.copy(_));
664
+ i && (i.enabled = !0, i.target.copy(f));
667
665
  };
668
666
  return {
669
667
  isAnimating: e,
@@ -673,9 +671,9 @@ function Ae(o, t) {
673
671
  const { camera: i, controls: d } = o();
674
672
  if (!i || !d) return;
675
673
  d.enabled = !0;
676
- const b = i.position.clone(), R = d.target.clone(), Y = 1500, F = Date.now(), L = () => {
674
+ const w = i.position.clone(), O = d.target.clone(), Y = 1500, F = Date.now(), L = () => {
677
675
  const V = Date.now() - F, m = Math.min(V / Y, 1), l = k(m);
678
- i.position.lerpVectors(b, u, l), d.target.lerpVectors(R, _, l), m < 1 && requestAnimationFrame(L);
676
+ i.position.lerpVectors(w, u, l), d.target.lerpVectors(O, f, l), m < 1 && requestAnimationFrame(L);
679
677
  };
680
678
  L();
681
679
  } else
@@ -685,45 +683,45 @@ function Ae(o, t) {
685
683
  stopAnimation: C
686
684
  };
687
685
  }
688
- function ze(o, t) {
686
+ function Oe(o, t) {
689
687
  const e = x(!1), s = x("none");
690
- let n = [], u = [], _ = new gt(), a = new w();
691
- const P = () => {
692
- n = [
693
- new mt(new w(1, 0, 0), 0),
688
+ let a = [], u = [], f = new gt(), n = new P();
689
+ const b = () => {
690
+ a = [
691
+ new mt(new P(1, 0, 0), 0),
694
692
  // X轴平面
695
- new mt(new w(0, 1, 0), 0),
693
+ new mt(new P(0, 1, 0), 0),
696
694
  // Y轴平面
697
- new mt(new w(0, 0, 1), 0)
695
+ new mt(new P(0, 0, 1), 0)
698
696
  // Z轴平面
699
697
  ];
700
698
  }, M = () => {
701
- _.makeEmpty(), t.value.forEach((g) => {
702
- _.expandByObject(g);
703
- }), a = _.getCenter(new w());
699
+ f.makeEmpty(), t.value.forEach((g) => {
700
+ f.expandByObject(g);
701
+ }), n = f.getCenter(new P());
704
702
  }, k = (g) => {
705
- const i = _.getSize(new w());
706
- let d, b, R;
707
- g === "x" ? (d = new ft(i.z * 1.2, i.y * 1.2), b = new w(a.x, a.y, a.z), R = new bt(0, Math.PI / 2, 0)) : g === "y" ? (d = new ft(i.x * 1.2, i.z * 1.2), b = new w(a.x, a.y, a.z), R = new bt(Math.PI / 2, 0, 0)) : g === "z" && (d = new ft(i.x * 1.2, i.y * 1.2), b = new w(a.x, a.y, a.z), R = new bt(0, 0, 0));
703
+ const i = f.getSize(new P());
704
+ let d, w, O;
705
+ g === "x" ? (d = new ft(i.z * 1.2, i.y * 1.2), w = new P(n.x, n.y, n.z), O = new bt(0, Math.PI / 2, 0)) : g === "y" ? (d = new ft(i.x * 1.2, i.z * 1.2), w = new P(n.x, n.y, n.z), O = new bt(Math.PI / 2, 0, 0)) : g === "z" && (d = new ft(i.x * 1.2, i.y * 1.2), w = new P(n.x, n.y, n.z), O = new bt(0, 0, 0));
708
706
  const Y = new de({
709
707
  color: 8900331,
710
708
  transparent: !0,
711
709
  opacity: 0.3,
712
710
  side: me,
713
711
  depthWrite: !1
714
- }), F = new Nt(d, Y);
715
- return F.position.copy(b), F.rotation.copy(R), F;
712
+ }), F = new Ut(d, Y);
713
+ return F.position.copy(w), F.rotation.copy(O), F;
716
714
  }, U = () => {
717
715
  if (A(), r(), s.value === "none")
718
716
  return;
719
717
  M();
720
718
  let g = null;
721
- if (s.value === "x" ? (n[0].constant = -a.x, g = n[0]) : s.value === "y" ? (n[1].constant = -a.y, g = n[1]) : s.value === "z" && (n[2].constant = -a.z, g = n[2]), g) {
719
+ if (s.value === "x" ? (a[0].constant = -n.x, g = a[0]) : s.value === "y" ? (a[1].constant = -n.y, g = a[1]) : s.value === "z" && (a[2].constant = -n.z, g = a[2]), g) {
722
720
  t.value.forEach((d) => {
723
- d.traverse((b) => {
724
- b.isMesh && b.material && (Array.isArray(b.material) ? b.material.forEach((R) => {
725
- R.clippingPlanes = [g];
726
- }) : b.material.clippingPlanes = [g]);
721
+ d.traverse((w) => {
722
+ w.isMesh && w.material && (Array.isArray(w.material) ? w.material.forEach((O) => {
723
+ O.clippingPlanes = [g];
724
+ }) : w.material.clippingPlanes = [g]);
727
725
  });
728
726
  });
729
727
  const { scene: i } = o();
@@ -750,14 +748,14 @@ function ze(o, t) {
750
748
  isClipping: e,
751
749
  activeClippingAxis: s,
752
750
  toggleClipping: () => {
753
- e.value = !e.value, e.value ? (P(), t.value.length > 0 && M()) : (s.value = "none", A(), r());
751
+ e.value = !e.value, e.value ? (b(), t.value.length > 0 && M()) : (s.value = "none", A(), r());
754
752
  },
755
753
  updateClippingPlanes: U,
756
754
  clearClippingPlanes: A,
757
755
  clearClippingMeshes: r
758
756
  };
759
757
  }
760
- const Re = { class: "panel-content" }, Oe = {
758
+ const Re = { class: "panel-content" }, Le = {
761
759
  __name: "animationTable",
762
760
  props: {
763
761
  animationData: Object,
@@ -765,17 +763,30 @@ const Re = { class: "panel-content" }, Oe = {
765
763
  },
766
764
  setup(o) {
767
765
  const t = o;
768
- return x(), x(), x(), _t(
766
+ x();
767
+ const e = x();
768
+ return _t(
769
769
  () => [t == null ? void 0 : t.animationData],
770
770
  () => {
771
- var s;
772
- let e = ((s = Ut(t == null ? void 0 : t.animationData)) == null ? void 0 : s.动画输出Content) ?? [];
773
- console.log(232, e, t == null ? void 0 : t.animationData), e && e.length > 0;
771
+ var a;
772
+ let s = ((a = Yt(t == null ? void 0 : t.animationData)) == null ? void 0 : a.动画输出Content) ?? [];
773
+ s && s.length > 0 && (e.value = s);
774
774
  },
775
775
  { deep: !0, immediate: !0 }
776
- ), (e, s) => (K(), B("div", Re));
776
+ ), (s, a) => {
777
+ var u, f, n, b;
778
+ return H(), $("div", Re, [
779
+ (H(), It(fe, {
780
+ compName: e.value.name,
781
+ itemData: (u = e.value) == null ? void 0 : u.compData,
782
+ childItemData: (f = s.item) == null ? void 0 : f.itemChildData,
783
+ key: (n = e.value) == null ? void 0 : n.id,
784
+ index: (b = e.value) == null ? void 0 : b.id
785
+ }, null, 8, ["compName", "itemData", "childItemData", "index"]))
786
+ ]);
787
+ };
777
788
  }
778
- }, Le = /* @__PURE__ */ st(Oe, [["__scopeId", "data-v-4817fa21"]]), je = { class: "panel-content" }, Ie = "id", Fe = {
789
+ }, je = /* @__PURE__ */ st(Le, [["__scopeId", "data-v-d400f99f"]]), Ie = { class: "panel-content" }, Fe = "id", Ne = {
779
790
  __name: "urdfTree",
780
791
  props: {
781
792
  model: Object,
@@ -791,12 +802,12 @@ const Re = { class: "panel-content" }, Oe = {
791
802
  },
792
803
  emits: ["nodeClick"],
793
804
  setup(o, { emit: t }) {
794
- const e = o, s = t, n = x([]), u = {
805
+ const e = o, s = t, a = x([]), u = {
795
806
  children: "children",
796
807
  label: "label"
797
- }, _ = (r) => {
808
+ }, f = (r) => {
798
809
  s("nodeClick", r);
799
- }, a = (r, C = 0) => {
810
+ }, n = (r, C = 0) => {
800
811
  const g = [];
801
812
  return Array.isArray(r) && (r == null ? void 0 : r.length) > 0 && r.forEach((i) => {
802
813
  if (!(i != null && i.isMesh) && ((i == null ? void 0 : i.type) === "URDFJoint" || (i == null ? void 0 : i.type) === "URDFLink")) {
@@ -809,13 +820,13 @@ const Re = { class: "panel-content" }, Oe = {
809
820
  type: i == null ? void 0 : i.type,
810
821
  id: i == null ? void 0 : i.id,
811
822
  limit: (i == null ? void 0 : i.limit) ?? "",
812
- children: a(i == null ? void 0 : i.children, C + 1),
823
+ children: n(i == null ? void 0 : i.children, C + 1),
813
824
  path: i == null ? void 0 : i.name
814
825
  };
815
826
  g.push(d);
816
827
  }
817
828
  }), g;
818
- }, P = (r) => r ? [{
829
+ }, b = (r) => r ? [{
819
830
  name: r == null ? void 0 : r.name,
820
831
  label: r == null ? void 0 : r.name,
821
832
  show: !0,
@@ -824,7 +835,7 @@ const Re = { class: "panel-content" }, Oe = {
824
835
  type: r == null ? void 0 : r.type,
825
836
  id: r == null ? void 0 : r.id,
826
837
  limit: (r == null ? void 0 : r.limit) ?? "",
827
- children: a(r == null ? void 0 : r.children, 1),
838
+ children: n(r == null ? void 0 : r.children, 1),
828
839
  path: r == null ? void 0 : r.name
829
840
  }] : [], M = (r, C) => {
830
841
  const g = [], i = [...r];
@@ -838,40 +849,40 @@ const Re = { class: "panel-content" }, Oe = {
838
849
  return r.forEach((i) => {
839
850
  if (i.children && i.children.length > 0) {
840
851
  g.push(i.id);
841
- const d = i.children.filter((b) => b.children && b.children.length > 0).slice(0, C).map((b) => b.id);
852
+ const d = i.children.filter((w) => w.children && w.children.length > 0).slice(0, C).map((w) => w.id);
842
853
  g.push(...d);
843
854
  }
844
855
  }), g.slice(0, C + 1);
845
- }, U = it(() => !n.value || n.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? k(n.value, e.maxExpandCount) : M(n.value, e.maxExpandCount)), A = it(() => e != null && e.model ? P(e.model) : []);
856
+ }, U = it(() => !a.value || a.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? k(a.value, e.maxExpandCount) : M(a.value, e.maxExpandCount)), A = it(() => e != null && e.model ? b(e.model) : []);
846
857
  return _t(
847
858
  A,
848
859
  (r) => {
849
- n.value = JSON.parse(JSON.stringify(r));
860
+ a.value = JSON.parse(JSON.stringify(r));
850
861
  },
851
862
  { immediate: !0 }
852
863
  ), (r, C) => {
853
- const g = It("el-tree");
854
- return K(), B("div", je, [
864
+ const g = Ft("el-tree");
865
+ return H(), $("div", Ie, [
855
866
  D(g, {
856
- data: n.value,
867
+ data: a.value,
857
868
  props: u,
858
869
  "default-expanded-keys": U.value,
859
- "node-key": Ie,
860
- onNodeClick: _
870
+ "node-key": Fe,
871
+ onNodeClick: f
861
872
  }, null, 8, ["data", "default-expanded-keys"])
862
873
  ]);
863
874
  };
864
875
  }
865
- }, Ne = /* @__PURE__ */ st(Fe, [["__scopeId", "data-v-290ff4e1"]]), Ue = { class: "panel-content" }, Ye = {
876
+ }, Ue = /* @__PURE__ */ st(Ne, [["__scopeId", "data-v-290ff4e1"]]), Ye = { class: "panel-content" }, Ve = {
866
877
  key: 0,
867
878
  class: "joints-list"
868
- }, Ve = { class: "joint-info-row" }, He = { class: "joint-left" }, Ze = { class: "joint-name" }, Ke = { class: "joint-range" }, Be = { class: "joint-type" }, $e = {
879
+ }, Ze = { class: "joint-info-row" }, He = { class: "joint-left" }, Ke = { class: "joint-name" }, $e = { class: "joint-range" }, Be = { class: "joint-type" }, Xe = {
869
880
  key: 0,
870
881
  class: "joint-control-row"
871
- }, Xe = { class: "slider-container" }, Je = ["min", "max", "value", "onInput", "disabled"], Ge = { class: "value-display" }, We = { class: "joint-value" }, qe = { class: "unit" }, Qe = {
882
+ }, Je = { class: "slider-container" }, Ge = ["min", "max", "value", "onInput", "disabled"], We = { class: "value-display" }, qe = { class: "joint-value" }, Qe = { class: "unit" }, ti = {
872
883
  key: 1,
873
884
  class: "empty-state"
874
- }, ti = 1e3, Pt = 60, ei = {
885
+ }, ei = 1e3, Pt = 60, ii = {
875
886
  __name: "jointPanel",
876
887
  props: {
877
888
  model: Object,
@@ -881,21 +892,21 @@ const Re = { class: "panel-content" }, Oe = {
881
892
  setup(o, { expose: t }) {
882
893
  const e = o;
883
894
  x(!0);
884
- const s = x([]), n = x(null), u = x(!1), _ = x(!1), a = x(0), P = x(0), M = x(null), k = x(1), U = () => ti / Pt / k.value;
895
+ const s = x([]), a = x(null), u = x(!1), f = x(!1), n = x(0), b = x(0), M = x(null), k = x(1), U = () => ei / Pt / k.value;
885
896
  let A = [];
886
897
  _t(
887
898
  () => e.animationData,
888
899
  (c) => {
889
900
  var h;
890
- let f = ((h = Ut(c)) == null ? void 0 : h.动画输出) ?? [];
891
- f && f.length > 0 && (A = f, R());
901
+ let _ = ((h = Yt(c)) == null ? void 0 : h.动画输出) ?? [];
902
+ _ && _.length > 0 && (A = _, O());
892
903
  },
893
904
  { deep: !0 }
894
905
  );
895
- const r = (c, f = !1) => c === "revolute" ? f ? Math.PI : -Math.PI : c === "prismatic" ? f ? 1 : -1 : 0, C = (c) => {
906
+ const r = (c, _ = !1) => c === "revolute" ? _ ? Math.PI : -Math.PI : c === "prismatic" ? _ ? 1 : -1 : 0, C = (c) => {
896
907
  if (!c || !c.joints)
897
908
  return console.warn("URDF模型没有关节信息"), [];
898
- const f = [];
909
+ const _ = [];
899
910
  return Object.keys(c.joints).forEach((h) => {
900
911
  const v = c.joints[h];
901
912
  if (v._jointType === "fixed")
@@ -907,18 +918,18 @@ const Re = { class: "panel-content" }, Oe = {
907
918
  lower: r(v._jointType, !1),
908
919
  upper: r(v._jointType, !0)
909
920
  };
910
- f.push({
921
+ _.push({
911
922
  name: h,
912
923
  type: v._jointType || "unknown",
913
924
  limit: I,
914
925
  currentValue: v.angle || 0,
915
926
  urdfJoint: v
916
927
  });
917
- }), f.sort((h, v) => h.name.localeCompare(v.name));
918
- }, g = (c, f) => {
928
+ }), _.sort((h, v) => h.name.localeCompare(v.name));
929
+ }, g = (c, _) => {
919
930
  const h = s.value.find((I) => I.name === c);
920
931
  if (!h) return;
921
- const v = parseFloat(f);
932
+ const v = parseFloat(_);
922
933
  if (h.limit) {
923
934
  const I = Math.max(h.limit.lower, Math.min(h.limit.upper, v));
924
935
  h.currentValue = I;
@@ -926,32 +937,32 @@ const Re = { class: "panel-content" }, Oe = {
926
937
  h.currentValue = v;
927
938
  e.model && e.model.setJointValue ? e.model.setJointValue(c, h.currentValue) : h.urdfJoint && h.urdfJoint.setJointValue(h.currentValue);
928
939
  }, i = (c) => {
929
- c && Object.keys(c).forEach((f) => {
930
- const h = c[f], v = s.value.find((I) => I.name === f);
931
- v && (v.currentValue = h, e.model && e.model.setJointValue ? e.model.setJointValue(f, h) : v.urdfJoint && v.urdfJoint.setJointValue(h));
940
+ c && Object.keys(c).forEach((_) => {
941
+ const h = c[_], v = s.value.find((I) => I.name === _);
942
+ v && (v.currentValue = h, e.model && e.model.setJointValue ? e.model.setJointValue(_, h) : v.urdfJoint && v.urdfJoint.setJointValue(h));
932
943
  });
933
- }, d = (c, f, h) => c + (f - c) * h, b = (c, f, h) => {
934
- if (!c || !f) return c || f;
944
+ }, d = (c, _, h) => c + (_ - c) * h, w = (c, _, h) => {
945
+ if (!c || !_) return c || _;
935
946
  const v = {};
936
947
  return Object.keys(c).forEach((I) => {
937
- const q = c[I], Q = f[I];
948
+ const q = c[I], Q = _[I];
938
949
  v[I] = d(q, Q || q, h);
939
950
  }), v;
940
- }, R = () => {
951
+ }, O = () => {
941
952
  if (A.length === 0) {
942
953
  console.warn("没有动画数据");
943
954
  return;
944
955
  }
945
- u.value = !0, _.value = !1;
956
+ u.value = !0, f.value = !1;
946
957
  const c = () => {
947
- if (!u.value || _.value) return;
948
- const f = P.value / Pt, h = A[a.value], v = A[a.value + 1];
958
+ if (!u.value || f.value) return;
959
+ const _ = b.value / Pt, h = A[n.value], v = A[n.value + 1];
949
960
  if (v) {
950
- const I = b(h, v, f);
961
+ const I = w(h, v, _);
951
962
  i(I);
952
963
  } else
953
964
  i(h);
954
- if (P.value++, P.value >= Pt && (P.value = 0, a.value++, a.value >= A.length - 1)) {
965
+ if (b.value++, b.value >= Pt && (b.value = 0, n.value++, n.value >= A.length - 1)) {
955
966
  F();
956
967
  return;
957
968
  }
@@ -959,16 +970,16 @@ const Re = { class: "panel-content" }, Oe = {
959
970
  };
960
971
  c();
961
972
  }, Y = () => {
962
- _.value = !0, M.value && (clearTimeout(M.value), M.value = null);
973
+ f.value = !0, M.value && (clearTimeout(M.value), M.value = null);
963
974
  }, F = () => {
964
- u.value = !1, _.value = !1, k.value = 1, M.value && (clearTimeout(M.value), M.value = null);
975
+ u.value = !1, f.value = !1, k.value = 1, M.value && (clearTimeout(M.value), M.value = null);
965
976
  };
966
977
  t({
967
- startAnimation: R,
978
+ startAnimation: O,
968
979
  pauseAnimation: Y,
969
980
  stopAnimation: F,
970
981
  resetAll: () => {
971
- F(), a.value = 0, P.value = 0, s.value.forEach((c) => {
982
+ F(), n.value = 0, b.value = 0, s.value.forEach((c) => {
972
983
  (c.type === "revolute" || c.type === "prismatic") && g(c.name, 0);
973
984
  });
974
985
  },
@@ -986,38 +997,38 @@ const Re = { class: "panel-content" }, Oe = {
986
997
  { immediate: !0 }
987
998
  );
988
999
  const l = () => {
989
- !e.model || u.value && !_.value || s.value.forEach((c) => {
1000
+ !e.model || u.value && !f.value || s.value.forEach((c) => {
990
1001
  c.urdfJoint && c.urdfJoint.angle !== void 0 && (c.currentValue = c.urdfJoint.angle);
991
1002
  });
992
1003
  }, E = () => {
993
1004
  const c = () => {
994
- l(), n.value = requestAnimationFrame(c);
1005
+ l(), a.value = requestAnimationFrame(c);
995
1006
  };
996
1007
  c();
997
- }, H = () => {
998
- n.value && (cancelAnimationFrame(n.value), n.value = null);
1008
+ }, Z = () => {
1009
+ a.value && (cancelAnimationFrame(a.value), a.value = null);
999
1010
  };
1000
- return Ft(() => {
1011
+ return Nt(() => {
1001
1012
  E();
1002
1013
  }), Bt(() => {
1003
- H(), F();
1004
- }), (c, f) => (K(), B("div", Ue, [
1005
- s.value.length > 0 ? (K(), B("div", Ye, [
1006
- (K(!0), B($t, null, Xt(s.value, (h) => {
1014
+ Z(), F();
1015
+ }), (c, _) => (H(), $("div", Ye, [
1016
+ s.value.length > 0 ? (H(), $("div", Ve, [
1017
+ (H(!0), $(Xt, null, Jt(s.value, (h) => {
1007
1018
  var v, I, q, Q;
1008
- return K(), B("div", {
1019
+ return H(), $("div", {
1009
1020
  key: h.name,
1010
1021
  class: "joint-item"
1011
1022
  }, [
1012
- y("div", Ve, [
1023
+ y("div", Ze, [
1013
1024
  y("div", He, [
1014
- y("span", Ze, J(h.name), 1),
1015
- y("span", Ke, " [" + J(((v = h.limit) == null ? void 0 : v.lower.toFixed(2)) ?? (h.type === "revolute" ? "-3.14" : "-1.00")) + ", " + J(((I = h.limit) == null ? void 0 : I.upper.toFixed(2)) ?? (h.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
1025
+ y("span", Ke, J(h.name), 1),
1026
+ y("span", $e, " [" + J(((v = h.limit) == null ? void 0 : v.lower.toFixed(2)) ?? (h.type === "revolute" ? "-3.14" : "-1.00")) + ", " + J(((I = h.limit) == null ? void 0 : I.upper.toFixed(2)) ?? (h.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
1016
1027
  ]),
1017
1028
  y("span", Be, J(h.type), 1)
1018
1029
  ]),
1019
- h.type === "revolute" || h.type === "prismatic" ? (K(), B("div", $e, [
1020
- y("div", Xe, [
1030
+ h.type === "revolute" || h.type === "prismatic" ? (H(), $("div", Xe, [
1031
+ y("div", Je, [
1021
1032
  y("input", {
1022
1033
  type: "range",
1023
1034
  min: ((q = h.limit) == null ? void 0 : q.lower) ?? (h.type === "revolute" ? -Math.PI : -1),
@@ -1026,22 +1037,22 @@ const Re = { class: "panel-content" }, Oe = {
1026
1037
  value: h.currentValue,
1027
1038
  onInput: (yt) => g(h.name, yt.target.value),
1028
1039
  class: "joint-slider",
1029
- disabled: u.value && !_.value
1030
- }, null, 40, Je)
1040
+ disabled: u.value && !f.value
1041
+ }, null, 40, Ge)
1031
1042
  ]),
1032
- y("div", Ge, [
1033
- y("span", We, J(h.currentValue.toFixed(3)), 1),
1034
- y("span", qe, J(h.type === "revolute" ? "rad" : "m"), 1)
1043
+ y("div", We, [
1044
+ y("span", qe, J(h.currentValue.toFixed(3)), 1),
1045
+ y("span", Qe, J(h.type === "revolute" ? "rad" : "m"), 1)
1035
1046
  ])
1036
1047
  ])) : dt("", !0)
1037
1048
  ]);
1038
1049
  }), 128))
1039
- ])) : (K(), B("div", Qe, f[0] || (f[0] = [
1050
+ ])) : (H(), $("div", ti, _[0] || (_[0] = [
1040
1051
  y("p", null, "未检测到可控制的关节", -1)
1041
1052
  ])))
1042
1053
  ]));
1043
1054
  }
1044
- }, ii = /* @__PURE__ */ st(ei, [["__scopeId", "data-v-603b87bc"]]), si = ["xlink:href"], oi = /* @__PURE__ */ Jt({
1055
+ }, si = /* @__PURE__ */ st(ii, [["__scopeId", "data-v-603b87bc"]]), oi = ["xlink:href"], ai = /* @__PURE__ */ Gt({
1045
1056
  __name: "svgIcon",
1046
1057
  props: {
1047
1058
  backgroundColor: { default: "#f0f0f0" },
@@ -1056,34 +1067,34 @@ const Re = { class: "panel-content" }, Oe = {
1056
1067
  () => ({
1057
1068
  backgroundColor: t.backgroundColor
1058
1069
  })
1059
- ), s = it(() => `#${t.prefix}-${t.name}`), n = it(() => {
1070
+ ), s = it(() => `#${t.prefix}-${t.name}`), a = it(() => {
1060
1071
  const { size: u } = t;
1061
- let _ = `${u}`;
1062
- return _ = `${_.replace("px", "")}px`, {
1063
- width: _,
1064
- height: _
1072
+ let f = `${u}`;
1073
+ return f = `${f.replace("px", "")}px`, {
1074
+ width: f,
1075
+ height: f
1065
1076
  };
1066
1077
  });
1067
- return (u, _) => (K(), B("div", {
1078
+ return (u, f) => (H(), $("div", {
1068
1079
  class: St(["container", { active: u.active }]),
1069
1080
  style: Ct(e.value)
1070
1081
  }, [
1071
- (K(), B("svg", {
1082
+ (H(), $("svg", {
1072
1083
  class: St(["svg-icon", [u.$attrs.class, u.spin && "svg-icon-spin"]]),
1073
- style: Ct(n.value),
1084
+ style: Ct(a.value),
1074
1085
  "aria-hidden": "true"
1075
1086
  }, [
1076
- y("use", { "xlink:href": s.value }, null, 8, si)
1087
+ y("use", { "xlink:href": s.value }, null, 8, oi)
1077
1088
  ], 6))
1078
1089
  ], 6));
1079
1090
  }
1080
- }), z = /* @__PURE__ */ st(oi, [["__scopeId", "data-v-3150a90b"]]), ni = { class: "obj-viewer-container" }, ai = { class: "buttonGroup-top" }, li = { class: "buttonGroup-topLeft" }, ri = { class: "buttonGroup-left" }, hi = { class: "buttonGroup-right" }, ci = { class: "buttonGroup-bottom" }, ui = { class: "left-panel" }, pi = { class: "panel-header" }, di = {
1091
+ }), z = /* @__PURE__ */ st(ai, [["__scopeId", "data-v-3150a90b"]]), ni = { class: "obj-viewer-container" }, li = { class: "buttonGroup-top" }, ri = { class: "buttonGroup-topLeft" }, hi = { class: "buttonGroup-left" }, ci = { class: "buttonGroup-right" }, ui = { class: "buttonGroup-bottom" }, pi = { class: "left-panel" }, di = { class: "panel-header" }, mi = {
1081
1092
  key: 1,
1082
1093
  class: "clipping-content"
1083
- }, mi = { class: "radio-group" }, fi = { class: "radio-label" }, _i = { class: "radio-label" }, gi = { class: "radio-label" }, yi = { class: "radio-label" }, vi = { class: "right-panel" }, bi = { class: "panel-header" }, wi = {
1094
+ }, fi = { class: "radio-group" }, _i = { class: "radio-label" }, gi = { class: "radio-label" }, yi = { class: "radio-label" }, vi = { class: "radio-label" }, bi = { class: "right-panel" }, wi = { class: "panel-header" }, Pi = {
1084
1095
  key: 0,
1085
1096
  class: "loading-overlay"
1086
- }, Pi = {
1097
+ }, Mi = {
1087
1098
  __name: "threeModel",
1088
1099
  props: {
1089
1100
  animationData: {
@@ -1094,85 +1105,85 @@ const Re = { class: "panel-content" }, Oe = {
1094
1105
  },
1095
1106
  emits: ["getAnimationData"],
1096
1107
  setup(o, { expose: t, emit: e }) {
1097
- const s = e, n = o;
1098
- let u = null, _ = !1;
1099
- const a = x(null), P = x(!1), M = x("");
1108
+ const s = e, a = o;
1109
+ let u = null, f = !1;
1110
+ const n = x(null), b = x(!1), M = x("");
1100
1111
  x(!1);
1101
1112
  const k = x(!1), U = x(!1), A = x(""), r = x(!1), C = x(""), g = x(), {
1102
1113
  currentModels: i,
1103
1114
  initialCameraPosition: d,
1104
- initialTargetPosition: b,
1105
- initThreeJS: R,
1115
+ initialTargetPosition: w,
1116
+ initThreeJS: O,
1106
1117
  handleResize: Y,
1107
1118
  fitCameraToAllModels: F,
1108
1119
  getThreeJSObjects: L,
1109
1120
  clearAllModels: V,
1110
1121
  cleanup: m
1111
- } = ke(a), { isAnimating: l, toggleAnimation: E, stopAnimation: H } = Ae(L, i), { isClipping: c, activeClippingAxis: f, toggleClipping: h, updateClippingPlanes: v } = ze(
1122
+ } = Ae(n), { isAnimating: l, toggleAnimation: E, stopAnimation: Z } = ze(L, i), { isClipping: c, activeClippingAxis: _, toggleClipping: h, updateClippingPlanes: v } = Oe(
1112
1123
  L,
1113
1124
  i
1114
- ), { addModelsFromUrls: I, loadModelByDefaultPath: q, urdfModel: Q } = fe(
1125
+ ), { addModelsFromUrls: I, loadModelByDefaultPath: q, urdfModel: Q } = _e(
1115
1126
  L,
1116
1127
  i,
1117
- P,
1128
+ b,
1118
1129
  M,
1119
1130
  V
1120
1131
  ), yt = () => {
1121
1132
  if (k.value || i.value.length === 0) return;
1122
- k.value = !0, l.value && H();
1123
- const { camera: O, controls: p } = L();
1124
- if (!O || !p) return;
1133
+ k.value = !0, l.value && Z();
1134
+ const { camera: R, controls: p } = L();
1135
+ if (!R || !p) return;
1125
1136
  p.enabled = !0;
1126
- const X = (tt) => tt < 0.5 ? 4 * tt * tt * tt : 1 - Math.pow(-2 * tt + 2, 3) / 2, nt = O.position.clone(), at = p.target.clone(), lt = 1500, rt = Date.now(), S = () => {
1137
+ const X = (tt) => tt < 0.5 ? 4 * tt * tt * tt : 1 - Math.pow(-2 * tt + 2, 3) / 2, at = R.position.clone(), nt = p.target.clone(), lt = 1500, rt = Date.now(), S = () => {
1127
1138
  const tt = Date.now() - rt, xt = Math.min(tt / lt, 1), Tt = X(xt);
1128
- O.position.lerpVectors(nt, d.value, Tt), p.target.lerpVectors(at, b.value, Tt), xt < 1 ? requestAnimationFrame(S) : k.value = !1;
1139
+ R.position.lerpVectors(at, d.value, Tt), p.target.lerpVectors(nt, w.value, Tt), xt < 1 ? requestAnimationFrame(S) : k.value = !1;
1129
1140
  };
1130
1141
  S();
1131
- }, Vt = async () => _ ? Promise.resolve() : new Promise((O) => {
1142
+ }, Zt = async () => f ? Promise.resolve() : new Promise((R) => {
1132
1143
  const p = () => {
1133
- _ ? O() : requestAnimationFrame(p);
1144
+ f ? R() : requestAnimationFrame(p);
1134
1145
  };
1135
1146
  p();
1136
- }), Et = async (O, p) => {
1147
+ }), Et = async (R, p) => {
1137
1148
  try {
1138
- await Vt(), l.value && H(), c.value && h();
1139
- const X = await p(O);
1149
+ await Zt(), l.value && Z(), c.value && h();
1150
+ const X = await p(R);
1140
1151
  return F(), X;
1141
1152
  } catch (X) {
1142
1153
  throw console.error("加载模型失败:", X), X;
1143
1154
  }
1144
- }, Ht = async (O) => Et(O, I), Zt = async (O) => Et(O, q), ot = (O) => {
1145
- U.value = !0, A.value = O, O === "剖面视图" && !c.value && h();
1146
- }, Dt = (O) => {
1147
- r.value = !0, C.value = O;
1148
- }, Kt = () => {
1155
+ }, Ht = async (R) => Et(R, I), Kt = async (R) => Et(R, q), ot = (R) => {
1156
+ U.value = !0, A.value = R, R === "剖面视图" && !c.value && h();
1157
+ }, Dt = (R) => {
1158
+ r.value = !0, C.value = R;
1159
+ }, $t = () => {
1149
1160
  s("getAnimationData"), kt(() => {
1150
- var O;
1151
- (O = g.value) == null || O.startAnimation();
1161
+ var R;
1162
+ (R = g.value) == null || R.startAnimation();
1152
1163
  });
1153
1164
  };
1154
- return Ft(async () => {
1165
+ return Nt(async () => {
1155
1166
  await kt();
1156
1167
  try {
1157
- R(), u = L().scene, _ = !0, window.addEventListener("resize", Y);
1158
- } catch (O) {
1159
- console.error("Three.js初始化失败:", O);
1168
+ O(), u = L().scene, f = !0, window.addEventListener("resize", Y);
1169
+ } catch (R) {
1170
+ console.error("Three.js初始化失败:", R);
1160
1171
  }
1161
- }), Gt(() => {
1162
- _ = !1, A.value = "", C.value = "", window.removeEventListener("resize", Y), l.value && H(), m();
1172
+ }), Wt(() => {
1173
+ f = !1, A.value = "", C.value = "", window.removeEventListener("resize", Y), l.value && Z(), m();
1163
1174
  }), t({
1164
1175
  addModelsFromUrls: Ht,
1165
- loadModelByDefaultPath: Zt
1166
- }), (O, p) => {
1167
- var nt, at, lt, rt;
1168
- const X = It("el-scrollbar");
1169
- return K(), B("div", ni, [
1176
+ loadModelByDefaultPath: Kt
1177
+ }), (R, p) => {
1178
+ var at, nt, lt, rt;
1179
+ const X = Ft("el-scrollbar");
1180
+ return H(), $("div", ni, [
1170
1181
  y("div", {
1171
1182
  ref_key: "threejsContainer",
1172
- ref: a,
1183
+ ref: n,
1173
1184
  class: "threejs-container"
1174
1185
  }, null, 512),
1175
- y("div", ai, [
1186
+ y("div", li, [
1176
1187
  D(z, {
1177
1188
  name: "guanjianjiexi",
1178
1189
  size: "34"
@@ -1194,7 +1205,7 @@ const Re = { class: "panel-content" }, Oe = {
1194
1205
  size: "34"
1195
1206
  })
1196
1207
  ]),
1197
- y("div", li, [
1208
+ y("div", ri, [
1198
1209
  D(z, {
1199
1210
  name: "viewReset",
1200
1211
  size: "24",
@@ -1218,7 +1229,7 @@ const Re = { class: "panel-content" }, Oe = {
1218
1229
  title: N(l) ? "停止动画" : "动画视图"
1219
1230
  }, null, 8, ["onClick", "title"])
1220
1231
  ]),
1221
- y("div", ri, [
1232
+ y("div", hi, [
1222
1233
  D(z, {
1223
1234
  name: "jiegoushu",
1224
1235
  size: "24",
@@ -1244,7 +1255,7 @@ const Re = { class: "panel-content" }, Oe = {
1244
1255
  onClick: p[3] || (p[3] = (S) => ot("场景4"))
1245
1256
  })
1246
1257
  ]),
1247
- y("div", hi, [
1258
+ y("div", ci, [
1248
1259
  D(z, {
1249
1260
  name: "donghuafangzhen",
1250
1261
  size: "24"
@@ -1276,27 +1287,27 @@ const Re = { class: "panel-content" }, Oe = {
1276
1287
  size: "24"
1277
1288
  })
1278
1289
  ]),
1279
- y("div", ci, [
1290
+ y("div", ui, [
1280
1291
  D(z, {
1281
1292
  name: "kuaitui",
1282
1293
  size: "24",
1283
1294
  backgroundColor: "#ffffff",
1284
1295
  title: "快退",
1285
- onClick: (nt = g.value) == null ? void 0 : nt.fastBackward
1296
+ onClick: (at = g.value) == null ? void 0 : at.fastBackward
1286
1297
  }, null, 8, ["onClick"]),
1287
1298
  D(z, {
1288
1299
  name: "bofang",
1289
1300
  size: "24",
1290
1301
  backgroundColor: "#ffffff",
1291
1302
  title: "播放",
1292
- onClick: Kt
1303
+ onClick: $t
1293
1304
  }),
1294
1305
  D(z, {
1295
1306
  name: "kuaijin",
1296
1307
  size: "24",
1297
1308
  backgroundColor: "#ffffff",
1298
1309
  title: "快进",
1299
- onClick: (at = g.value) == null ? void 0 : at.fastForward
1310
+ onClick: (nt = g.value) == null ? void 0 : nt.fastForward
1300
1311
  }, null, 8, ["onClick"]),
1301
1312
  D(z, {
1302
1313
  name: "zanting",
@@ -1313,8 +1324,8 @@ const Re = { class: "panel-content" }, Oe = {
1313
1324
  onClick: (rt = g.value) == null ? void 0 : rt.resetAll
1314
1325
  }, null, 8, ["onClick"])
1315
1326
  ]),
1316
- G(y("div", ui, [
1317
- y("div", pi, [
1327
+ G(y("div", pi, [
1328
+ y("div", di, [
1318
1329
  y("span", null, J(A.value), 1),
1319
1330
  y("span", {
1320
1331
  class: "close",
@@ -1323,57 +1334,57 @@ const Re = { class: "panel-content" }, Oe = {
1323
1334
  ]),
1324
1335
  D(X, { "max-height": "650px" }, {
1325
1336
  default: At(() => [
1326
- A.value === "场景树" ? (K(), Wt(Ne, {
1337
+ A.value === "场景树" ? (H(), It(Ue, {
1327
1338
  key: 0,
1328
1339
  model: N(Q)
1329
1340
  }, null, 8, ["model"])) : dt("", !0),
1330
- A.value === "剖面视图" ? (K(), B("div", di, [
1331
- y("div", mi, [
1332
- y("label", fi, [
1341
+ A.value === "剖面视图" ? (H(), $("div", mi, [
1342
+ y("div", fi, [
1343
+ y("label", _i, [
1333
1344
  G(y("input", {
1334
1345
  type: "radio",
1335
1346
  name: "clipping-axis",
1336
1347
  value: "none",
1337
- "onUpdate:modelValue": p[7] || (p[7] = (S) => ht(f) ? f.value = S : null),
1348
+ "onUpdate:modelValue": p[7] || (p[7] = (S) => ht(_) ? _.value = S : null),
1338
1349
  onChange: p[8] || (p[8] = (...S) => N(v) && N(v)(...S))
1339
1350
  }, null, 544), [
1340
- [ct, N(f)]
1351
+ [ct, N(_)]
1341
1352
  ]),
1342
1353
  p[16] || (p[16] = y("span", { class: "radio-text" }, "无切割", -1))
1343
1354
  ]),
1344
- y("label", _i, [
1355
+ y("label", gi, [
1345
1356
  G(y("input", {
1346
1357
  type: "radio",
1347
1358
  name: "clipping-axis",
1348
1359
  value: "x",
1349
- "onUpdate:modelValue": p[9] || (p[9] = (S) => ht(f) ? f.value = S : null),
1360
+ "onUpdate:modelValue": p[9] || (p[9] = (S) => ht(_) ? _.value = S : null),
1350
1361
  onChange: p[10] || (p[10] = (...S) => N(v) && N(v)(...S))
1351
1362
  }, null, 544), [
1352
- [ct, N(f)]
1363
+ [ct, N(_)]
1353
1364
  ]),
1354
1365
  p[17] || (p[17] = y("span", { class: "radio-text" }, "X轴切割", -1))
1355
1366
  ]),
1356
- y("label", gi, [
1367
+ y("label", yi, [
1357
1368
  G(y("input", {
1358
1369
  type: "radio",
1359
1370
  name: "clipping-axis",
1360
1371
  value: "y",
1361
- "onUpdate:modelValue": p[11] || (p[11] = (S) => ht(f) ? f.value = S : null),
1372
+ "onUpdate:modelValue": p[11] || (p[11] = (S) => ht(_) ? _.value = S : null),
1362
1373
  onChange: p[12] || (p[12] = (...S) => N(v) && N(v)(...S))
1363
1374
  }, null, 544), [
1364
- [ct, N(f)]
1375
+ [ct, N(_)]
1365
1376
  ]),
1366
1377
  p[18] || (p[18] = y("span", { class: "radio-text" }, "Y轴切割", -1))
1367
1378
  ]),
1368
- y("label", yi, [
1379
+ y("label", vi, [
1369
1380
  G(y("input", {
1370
1381
  type: "radio",
1371
1382
  name: "clipping-axis",
1372
1383
  value: "z",
1373
- "onUpdate:modelValue": p[13] || (p[13] = (S) => ht(f) ? f.value = S : null),
1384
+ "onUpdate:modelValue": p[13] || (p[13] = (S) => ht(_) ? _.value = S : null),
1374
1385
  onChange: p[14] || (p[14] = (...S) => N(v) && N(v)(...S))
1375
1386
  }, null, 544), [
1376
- [ct, N(f)]
1387
+ [ct, N(_)]
1377
1388
  ]),
1378
1389
  p[19] || (p[19] = y("span", { class: "radio-text" }, "Z轴切割", -1))
1379
1390
  ])
@@ -1385,8 +1396,8 @@ const Re = { class: "panel-content" }, Oe = {
1385
1396
  ], 512), [
1386
1397
  [ut, U.value]
1387
1398
  ]),
1388
- G(y("div", vi, [
1389
- y("div", bi, [
1399
+ G(y("div", bi, [
1400
+ y("div", wi, [
1390
1401
  y("span", null, J(C.value), 1),
1391
1402
  y("span", {
1392
1403
  class: "close",
@@ -1395,17 +1406,17 @@ const Re = { class: "panel-content" }, Oe = {
1395
1406
  ]),
1396
1407
  D(X, { "max-height": "650px" }, {
1397
1408
  default: At(() => [
1398
- G(D(ii, {
1409
+ G(D(si, {
1399
1410
  ref_key: "jointRef",
1400
1411
  ref: g,
1401
1412
  model: N(Q),
1402
1413
  scene: N(u),
1403
- animationData: n == null ? void 0 : n.animationData
1414
+ animationData: a == null ? void 0 : a.animationData
1404
1415
  }, null, 8, ["model", "scene", "animationData"]), [
1405
1416
  [ut, C.value === "关节控制"]
1406
1417
  ]),
1407
- G(D(Le, {
1408
- animationData: n == null ? void 0 : n.animationData
1418
+ G(D(je, {
1419
+ animationData: a == null ? void 0 : a.animationData
1409
1420
  }, null, 8, ["animationData"]), [
1410
1421
  [ut, C.value === "动画仿真"]
1411
1422
  ])
@@ -1415,14 +1426,14 @@ const Re = { class: "panel-content" }, Oe = {
1415
1426
  ], 512), [
1416
1427
  [ut, r.value]
1417
1428
  ]),
1418
- P.value ? (K(), B("div", wi, [
1429
+ b.value ? (H(), $("div", Pi, [
1419
1430
  p[20] || (p[20] = y("div", { class: "loading-spinner" }, null, -1)),
1420
1431
  y("p", null, J(M.value), 1)
1421
1432
  ])) : dt("", !0)
1422
1433
  ]);
1423
1434
  };
1424
1435
  }
1425
- }, Si = /* @__PURE__ */ st(Pi, [["__scopeId", "data-v-14112288"]]);
1436
+ }, Ci = /* @__PURE__ */ st(Mi, [["__scopeId", "data-v-14112288"]]);
1426
1437
  export {
1427
- Si as default
1438
+ Ci as default
1428
1439
  };