ss-component-new 1.1.536 → 1.1.538

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.
@@ -1,7 +1,7 @@
1
- import { ref as T, computed as st, watch as Pt, resolveComponent as jt, createElementBlock as B, openBlock as Z, createVNode as x, onMounted as It, onUnmounted as Zt, Fragment as Bt, renderList as $t, createElementVNode as y, createCommentVNode as ut, toDisplayString as J, defineComponent as Xt, normalizeStyle as Tt, normalizeClass as Ct, nextTick as St, onBeforeUnmount as Jt, withDirectives as tt, unref as N, withCtx as kt, createBlock as Gt, isRef as rt, vModelRadio as ht, vShow as gt } from "vue";
1
+ import { ref as T, computed as st, watch as Pt, resolveComponent as jt, createElementBlock as B, openBlock as Z, createVNode as x, onMounted as It, onUnmounted as Zt, Fragment as Bt, renderList as $t, createElementVNode as y, createCommentVNode as ut, toDisplayString as J, defineComponent as Xt, normalizeStyle as Tt, normalizeClass as Ct, nextTick as St, onBeforeUnmount as Jt, withDirectives as tt, unref as U, withCtx as kt, createBlock as Gt, isRef as rt, vModelRadio as ht, vShow as gt } from "vue";
2
2
  import { C as Wt, V as w, M as G, T as et, Q as At, S as zt, a as $, R as qt, P as pt, b as Qt, B as mt, c as te, d as ee, e as se, W as ie, f as oe, A as ne, g as ae, X as le, G as re, h as dt, i as he, j as Ft, k as ce, D as yt, H as ue, l as Rt, m as pe, n as de, E as vt, u as me } from "./threeModel.vue_vue_type_style_index_0_scoped_fa07a7ad_lang-BV7oq1Z4.js";
3
3
  import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
- const Lt = { type: "change" }, Mt = { type: "start" }, Nt = { type: "end" }, ct = new qt(), Ot = new pt(), fe = Math.cos(70 * Qt.DEG2RAD), j = new w(), K = 2 * Math.PI, D = {
4
+ const Lt = { type: "change" }, Et = { type: "start" }, Ut = { type: "end" }, ct = new qt(), Ot = new pt(), fe = Math.cos(70 * Qt.DEG2RAD), j = new w(), K = 2 * Math.PI, D = {
5
5
  NONE: -1,
6
6
  ROTATE: 0,
7
7
  DOLLY: 1,
@@ -19,7 +19,7 @@ class _e extends Wt {
19
19
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
20
20
  */
21
21
  constructor(t, e = null) {
22
- super(t, e), this.state = D.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: G.ROTATE, MIDDLE: G.DOLLY, RIGHT: G.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 At(), this._lastTargetPosition = new w(), this._quat = new At().setFromUnitVectors(t.up, new w(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new zt(), this._sphericalDelta = new zt(), 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 = ye.bind(this), this._onPointerDown = ge.bind(this), this._onPointerUp = ve.bind(this), this._onContextMenu = De.bind(this), this._onMouseWheel = Pe.bind(this), this._onKeyDown = Me.bind(this), this._onTouchStart = Ee.bind(this), this._onTouchMove = xe.bind(this), this._onMouseDown = be.bind(this), this._onMouseMove = we.bind(this), this._interceptControlDown = Te.bind(this), this._interceptControlUp = Ce.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
22
+ super(t, e), this.state = D.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: G.ROTATE, MIDDLE: G.DOLLY, RIGHT: G.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 At(), this._lastTargetPosition = new w(), this._quat = new At().setFromUnitVectors(t.up, new w(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new zt(), this._sphericalDelta = new zt(), 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 = ye.bind(this), this._onPointerDown = ge.bind(this), this._onPointerUp = ve.bind(this), this._onContextMenu = De.bind(this), this._onMouseWheel = Pe.bind(this), this._onKeyDown = Ee.bind(this), this._onTouchStart = Me.bind(this), this._onTouchMove = xe.bind(this), this._onMouseDown = be.bind(this), this._onMouseMove = we.bind(this), this._interceptControlDown = Te.bind(this), this._interceptControlUp = Ce.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
23
23
  }
24
24
  connect(t) {
25
25
  super.connect(t), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -106,8 +106,8 @@ class _e extends Wt {
106
106
  a.unproject(this.object);
107
107
  const P = this.object.zoom;
108
108
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), u = P !== this.object.zoom;
109
- const M = new w(this._mouse.x, this._mouse.y, 0);
110
- M.unproject(this.object), this.object.position.sub(M).add(a), this.object.updateMatrixWorld(), f = j.length();
109
+ const E = new w(this._mouse.x, this._mouse.y, 0);
110
+ E.unproject(this.object), this.object.position.sub(E).add(a), this.object.updateMatrixWorld(), f = j.length();
111
111
  } else
112
112
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
113
113
  f !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(f).add(this.object.position) : (ct.origin.copy(this.object.position), ct.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(ct.direction)) < fe ? this.object.lookAt(this.target) : (Ot.setFromNormalAndCoplanarPoint(this.object.up, this.target), ct.intersectPlane(Ot, this.target))));
@@ -316,7 +316,7 @@ function ye(o) {
316
316
  function ve(o) {
317
317
  switch (this._removePointer(o), this._pointers.length) {
318
318
  case 0:
319
- this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Nt), this.state = D.NONE;
319
+ this.domElement.releasePointerCapture(o.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ut), this.state = D.NONE;
320
320
  break;
321
321
  case 1:
322
322
  const t = this._pointers[0], e = this._pointerPositions[t];
@@ -365,7 +365,7 @@ function be(o) {
365
365
  default:
366
366
  this.state = D.NONE;
367
367
  }
368
- this.state !== D.NONE && this.dispatchEvent(Mt);
368
+ this.state !== D.NONE && this.dispatchEvent(Et);
369
369
  }
370
370
  function we(o) {
371
371
  switch (this.state) {
@@ -384,12 +384,12 @@ function we(o) {
384
384
  }
385
385
  }
386
386
  function Pe(o) {
387
- this.enabled === !1 || this.enableZoom === !1 || this.state !== D.NONE || (o.preventDefault(), this.dispatchEvent(Mt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Nt));
387
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== D.NONE || (o.preventDefault(), this.dispatchEvent(Et), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Ut));
388
388
  }
389
- function Me(o) {
389
+ function Ee(o) {
390
390
  this.enabled !== !1 && this._handleKeyDown(o);
391
391
  }
392
- function Ee(o) {
392
+ function Me(o) {
393
393
  switch (this._trackPointer(o), this._pointers.length) {
394
394
  case 1:
395
395
  switch (this.touches.ONE) {
@@ -422,7 +422,7 @@ function Ee(o) {
422
422
  default:
423
423
  this.state = D.NONE;
424
424
  }
425
- this.state !== D.NONE && this.dispatchEvent(Mt);
425
+ this.state !== D.NONE && this.dispatchEvent(Et);
426
426
  }
427
427
  function xe(o) {
428
428
  switch (this._trackPointer(o), this.state) {
@@ -457,7 +457,7 @@ function Ce(o) {
457
457
  }
458
458
  function Se(o) {
459
459
  let t = null, e = null, i = null, n = null, u = null, f = null, a = null, P = null;
460
- const M = T([]), C = T(new w()), U = T(new w()), A = () => {
460
+ const E = T([]), C = T(new w()), N = T(new w()), A = () => {
461
461
  if (!o.value) return;
462
462
  t = new te(), t.background = new ee(15790320);
463
463
  const d = o.value;
@@ -501,8 +501,8 @@ function Se(o) {
501
501
  }), u.attachControls(n), _(), s();
502
502
  }, h = (d, l) => {
503
503
  a && (t.remove(a), a.dispose()), P && (t.remove(P), P.geometry.dispose(), P.material.dispose());
504
- const E = Math.min(Math.max(Math.floor(d / 20), 30), 40);
505
- a = new re(d, E, 13421772, 14540253), a.rotateX(Math.PI / 2), a.position.copy(l), t.add(a);
504
+ const M = Math.min(Math.max(Math.floor(d / 20), 30), 40);
505
+ a = new re(d, M, 13421772, 14540253), a.rotateX(Math.PI / 2), a.position.copy(l), t.add(a);
506
506
  const H = new dt(d, d), r = new he({
507
507
  opacity: 0.3,
508
508
  // 阴影透明度
@@ -510,15 +510,15 @@ function Se(o) {
510
510
  });
511
511
  P = new Ft(H, r), P.position.copy(l), P.position.z -= 0.01, P.receiveShadow = !0, t.add(P);
512
512
  }, S = () => {
513
- if (M.value.length === 0)
513
+ if (E.value.length === 0)
514
514
  return;
515
515
  const d = new mt();
516
- M.value.forEach((c) => {
516
+ E.value.forEach((c) => {
517
517
  d.expandByObject(c);
518
518
  });
519
- const l = d.getSize(new w()), E = d.getCenter(new w()), H = Math.max(l.x, l.y, l.z), r = Math.max(H * 8, 50), g = new w(
520
- E.x,
521
- E.y,
519
+ const l = d.getSize(new w()), M = d.getCenter(new w()), H = Math.max(l.x, l.y, l.z), r = Math.max(H * 8, 50), g = new w(
520
+ M.x,
521
+ M.y,
522
522
  d.min.z
523
523
  // 模型的最底部
524
524
  );
@@ -528,8 +528,8 @@ function Se(o) {
528
528
  t.add(d);
529
529
  const l = new yt(16777215, 2);
530
530
  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);
531
- const E = new yt(16777215, 0.8);
532
- E.position.set(-8, -8, 6), t.add(E);
531
+ const M = new yt(16777215, 0.8);
532
+ M.position.set(-8, -8, 6), t.add(M);
533
533
  const H = new yt(16777215, 0.6);
534
534
  H.position.set(0, -15, 2), t.add(H);
535
535
  const r = new ue(16777215, 4473924, 0.8);
@@ -553,36 +553,36 @@ function Se(o) {
553
553
  "lightMap",
554
554
  "aoMap",
555
555
  "displacementMap"
556
- ].forEach((E) => {
557
- d[E] && d[E].dispose && d[E].dispose();
556
+ ].forEach((M) => {
557
+ d[M] && d[M].dispose && d[M].dispose();
558
558
  }), d.dispose && d.dispose();
559
559
  }, b = (d) => {
560
560
  d == null || d.traverse((l) => {
561
- l.geometry && l.geometry.dispose(), l.material && (Array.isArray(l.material) ? l.material.forEach((E) => {
562
- p(E);
561
+ l.geometry && l.geometry.dispose(), l.material && (Array.isArray(l.material) ? l.material.forEach((M) => {
562
+ p(M);
563
563
  }) : p(l.material));
564
564
  });
565
565
  };
566
566
  return {
567
567
  // 响应式数据
568
- currentModels: M,
568
+ currentModels: E,
569
569
  initialCameraPosition: C,
570
- initialTargetPosition: U,
570
+ initialTargetPosition: N,
571
571
  // 方法
572
572
  initThreeJS: A,
573
573
  handleResize: () => {
574
574
  if (!o.value || !e || !i || !u) return;
575
- const d = o.value, l = d.clientWidth, E = d.clientHeight;
576
- e.aspect = l / E, e.updateProjectionMatrix(), i.setSize(l, E), u.update();
575
+ const d = o.value, l = d.clientWidth, M = d.clientHeight;
576
+ e.aspect = l / M, e.updateProjectionMatrix(), i.setSize(l, M), u.update();
577
577
  },
578
578
  fitCameraToAllModels: () => {
579
- if (!e || !n || M.value.length === 0) return;
579
+ if (!e || !n || E.value.length === 0) return;
580
580
  const d = new mt();
581
- M.value.forEach((c) => {
581
+ E.value.forEach((c) => {
582
582
  d.expandByObject(c);
583
583
  });
584
- const l = d.getSize(new w()), E = d.getCenter(new w()), r = Math.max(l.x, l.y, l.z) * 0.8, g = new w(E.x + r, E.y - r, E.z + r);
585
- e.position.copy(g), e.lookAt(E), n.target.copy(E), n.update(), C.value.copy(g), U.value.copy(E), S();
584
+ const l = d.getSize(new w()), M = d.getCenter(new w()), r = Math.max(l.x, l.y, l.z) * 0.8, g = new w(M.x + r, M.y - r, M.z + r);
585
+ e.position.copy(g), e.lookAt(M), n.target.copy(M), n.update(), C.value.copy(g), N.value.copy(M), S();
586
586
  },
587
587
  getThreeJSObjects: () => ({
588
588
  scene: t,
@@ -593,7 +593,7 @@ function Se(o) {
593
593
  }),
594
594
  clearAllModels: () => {
595
595
  if (!t) return;
596
- M.value.forEach((l) => {
596
+ E.value.forEach((l) => {
597
597
  t.remove(l), b(l);
598
598
  });
599
599
  const d = [];
@@ -601,7 +601,7 @@ function Se(o) {
601
601
  !l.isLight && !l.isCamera && l.type !== "GridHelper" && l !== P && d.push(l);
602
602
  }), d.forEach((l) => {
603
603
  t.remove(l), b(l);
604
- }), M.value = [], S();
604
+ }), E.value = [], S();
605
605
  },
606
606
  cleanup: () => {
607
607
  f && cancelAnimationFrame(f), a && a.dispose(), P && (P.geometry.dispose(), P.material.dispose()), i && i.dispose(), n && n.dispose(), u && u.dispose();
@@ -611,8 +611,8 @@ function Se(o) {
611
611
  }
612
612
  function ke(o, t) {
613
613
  const e = T(!1);
614
- let i = null, n = 12700, u = new w(), f = new w(), a = new w(), P = 0, M = null;
615
- const C = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, U = (s) => {
614
+ let i = null, n = 12700, u = new w(), f = new w(), a = new w(), P = 0, E = null;
615
+ const C = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, N = (s) => {
616
616
  const p = 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
617
  if (s <= 0.567) {
618
618
  const V = s / 0.567 * Math.PI * 2;
@@ -637,8 +637,8 @@ function ke(o, t) {
637
637
  S();
638
638
  return;
639
639
  }
640
- const Y = U(R);
641
- s.position.copy(Y), s.lookAt(a), p.target.copy(a), M = requestAnimationFrame(A);
640
+ const Y = N(R);
641
+ s.position.copy(Y), s.lookAt(a), p.target.copy(a), E = requestAnimationFrame(A);
642
642
  }, h = () => {
643
643
  if (t.value.length === 0) return;
644
644
  const { camera: s, controls: p } = o();
@@ -653,12 +653,12 @@ function ke(o, t) {
653
653
  const Y = new w(a.x + P * 1.2, a.y, a.z);
654
654
  p.enabled = !1;
655
655
  const F = s.position.clone(), O = 1e3, V = Date.now(), d = () => {
656
- const l = Date.now() - V, E = Math.min(l / O, 1), H = C(E);
657
- s.position.lerpVectors(F, Y, H), s.lookAt(a), p.target.copy(a), E < 1 ? requestAnimationFrame(d) : (e.value = !0, i = null, A());
656
+ const l = Date.now() - V, M = Math.min(l / O, 1), H = C(M);
657
+ s.position.lerpVectors(F, Y, H), s.lookAt(a), p.target.copy(a), M < 1 ? requestAnimationFrame(d) : (e.value = !0, i = null, A());
658
658
  };
659
659
  d();
660
660
  }, S = () => {
661
- e.value = !1, i = null, M && (cancelAnimationFrame(M), M = null);
661
+ e.value = !1, i = null, E && (cancelAnimationFrame(E), E = null);
662
662
  const { controls: s } = o();
663
663
  s && (s.enabled = !0, s.target.copy(f));
664
664
  };
@@ -666,7 +666,7 @@ function ke(o, t) {
666
666
  isAnimating: e,
667
667
  toggleAnimation: () => {
668
668
  if (e.value) {
669
- e.value = !1, i = null, M && (cancelAnimationFrame(M), M = null);
669
+ e.value = !1, i = null, E && (cancelAnimationFrame(E), E = null);
670
670
  const { camera: s, controls: p } = o();
671
671
  if (!s || !p) return;
672
672
  p.enabled = !0;
@@ -694,7 +694,7 @@ function Ae(o, t) {
694
694
  new pt(new w(0, 0, 1), 0)
695
695
  // Z轴平面
696
696
  ];
697
- }, M = () => {
697
+ }, E = () => {
698
698
  f.makeEmpty(), t.value.forEach((_) => {
699
699
  f.expandByObject(_);
700
700
  }), a = f.getCenter(new w());
@@ -710,10 +710,10 @@ function Ae(o, t) {
710
710
  depthWrite: !1
711
711
  }), F = new Ft(p, Y);
712
712
  return F.position.copy(b), F.rotation.copy(R), F;
713
- }, U = () => {
713
+ }, N = () => {
714
714
  if (A(), h(), i.value === "none")
715
715
  return;
716
- M();
716
+ E();
717
717
  let _ = null;
718
718
  if (i.value === "x" ? (n[0].constant = -a.x, _ = n[0]) : i.value === "y" ? (n[1].constant = -a.y, _ = n[1]) : i.value === "z" && (n[2].constant = -a.z, _ = n[2]), _) {
719
719
  t.value.forEach((p) => {
@@ -747,9 +747,9 @@ function Ae(o, t) {
747
747
  isClipping: e,
748
748
  activeClippingAxis: i,
749
749
  toggleClipping: () => {
750
- e.value = !e.value, e.value ? (P(), t.value.length > 0 && M()) : (i.value = "none", A(), h());
750
+ e.value = !e.value, e.value ? (P(), t.value.length > 0 && E()) : (i.value = "none", A(), h());
751
751
  },
752
- updateClippingPlanes: U,
752
+ updateClippingPlanes: N,
753
753
  clearClippingPlanes: A,
754
754
  clearClippingMeshes: h
755
755
  };
@@ -805,7 +805,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
805
805
  limit: (h == null ? void 0 : h.limit) ?? "",
806
806
  children: a(h == null ? void 0 : h.children, 1),
807
807
  path: h == null ? void 0 : h.name
808
- }] : [], M = (h, S) => {
808
+ }] : [], E = (h, S) => {
809
809
  const _ = [], s = [...h];
810
810
  for (; s.length > 0 && _.length < S; ) {
811
811
  const p = s.shift();
@@ -821,7 +821,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
821
821
  _.push(...p);
822
822
  }
823
823
  }), _.slice(0, S + 1);
824
- }, U = st(() => !n.value || n.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? C(n.value, e.maxExpandCount) : M(n.value, e.maxExpandCount)), A = st(() => e != null && e.model ? P(e.model) : []);
824
+ }, N = st(() => !n.value || n.value.length === 0 ? [] : e.expandStrategy === "firstLevel" ? C(n.value, e.maxExpandCount) : E(n.value, e.maxExpandCount)), A = st(() => e != null && e.model ? P(e.model) : []);
825
825
  return Pt(
826
826
  A,
827
827
  (h) => {
@@ -834,7 +834,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
834
834
  x(_, {
835
835
  data: n.value,
836
836
  props: u,
837
- "default-expanded-keys": U.value,
837
+ "default-expanded-keys": N.value,
838
838
  "node-key": Re,
839
839
  onNodeClick: f
840
840
  }, null, 8, ["data", "default-expanded-keys"])
@@ -844,7 +844,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
844
844
  }, Oe = /* @__PURE__ */ ft(Le, [["__scopeId", "data-v-290ff4e1"]]), je = { class: "panel-content" }, Ie = {
845
845
  key: 0,
846
846
  class: "joints-list"
847
- }, Fe = { class: "joint-info-row" }, Ne = { class: "joint-left" }, Ue = { class: "joint-name" }, Ye = { class: "joint-range" }, Ve = { class: "joint-type" }, He = {
847
+ }, Fe = { class: "joint-info-row" }, Ue = { class: "joint-left" }, Ne = { class: "joint-name" }, Ye = { class: "joint-range" }, Ve = { class: "joint-type" }, He = {
848
848
  key: 0,
849
849
  class: "joint-control-row"
850
850
  }, Ke = { class: "slider-container" }, Ze = ["min", "max", "value", "onInput", "disabled"], Be = { class: "value-display" }, $e = { class: "joint-value" }, Xe = { class: "unit" }, Je = {
@@ -860,7 +860,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
860
860
  setup(o, { expose: t }) {
861
861
  const e = o;
862
862
  T(!0);
863
- const i = T([]), n = T(null), u = T(!1), f = T(!1), a = T(0), P = T(0), M = T(null), C = T(1), U = () => Ge / wt / C.value;
863
+ const i = T([]), n = T(null), u = T(!1), f = T(!1), a = T(0), P = T(0), E = T(null), C = T(1), N = () => Ge / wt / C.value;
864
864
  let A = [];
865
865
  Pt(
866
866
  () => e.animationData,
@@ -874,6 +874,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
874
874
  return console.warn("URDF模型没有关节信息"), [];
875
875
  const g = [];
876
876
  return Object.keys(r.joints).forEach((c) => {
877
+ console.log(232, r.joints, c);
877
878
  const v = r.joints[c];
878
879
  if (v._jointType === "fixed")
879
880
  return;
@@ -885,7 +886,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
885
886
  upper: h(v._jointType, !0)
886
887
  };
887
888
  g.push({
888
- name: c,
889
+ name: c.toUpperCase(),
889
890
  type: v._jointType || "unknown",
890
891
  limit: I,
891
892
  currentValue: v.angle || 0,
@@ -901,7 +902,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
901
902
  c.currentValue = I;
902
903
  } else
903
904
  c.currentValue = v;
904
- e.model && e.model.setJointValue ? e.model.setJointValue(r, c.currentValue) : c.urdfJoint && c.urdfJoint.setJointValue(c.currentValue);
905
+ e.model && e.model.setJointValue ? e.model.setJointValue(r.toUpperCase(), c.currentValue) : c.urdfJoint && c.urdfJoint.setJointValue(c.currentValue);
905
906
  }, s = (r) => {
906
907
  r && Object.keys(r).forEach((g) => {
907
908
  const c = r[g], v = i.value.find((I) => I.name.toUpperCase() === g.toUpperCase());
@@ -919,7 +920,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
919
920
  console.warn("没有动画数据");
920
921
  return;
921
922
  }
922
- console.log(232, 111), u.value = !0, f.value = !1;
923
+ u.value = !0, f.value = !1;
923
924
  const r = () => {
924
925
  if (!u.value || f.value) return;
925
926
  const g = P.value / wt, c = A[a.value], v = A[a.value + 1];
@@ -932,13 +933,13 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
932
933
  F();
933
934
  return;
934
935
  }
935
- M.value = setTimeout(r, U());
936
+ E.value = setTimeout(r, N());
936
937
  };
937
938
  r();
938
939
  }, Y = () => {
939
- f.value = !0, M.value && (clearTimeout(M.value), M.value = null);
940
+ f.value = !0, E.value && (clearTimeout(E.value), E.value = null);
940
941
  }, F = () => {
941
- u.value = !1, f.value = !1, C.value = 1, M.value && (clearTimeout(M.value), M.value = null);
942
+ u.value = !1, f.value = !1, C.value = 1, E.value && (clearTimeout(E.value), E.value = null);
942
943
  };
943
944
  t({
944
945
  startAnimation: R,
@@ -966,7 +967,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
966
967
  !e.model || u.value && !f.value || i.value.forEach((r) => {
967
968
  r.urdfJoint && r.urdfJoint.angle !== void 0 && (r.currentValue = r.urdfJoint.angle);
968
969
  });
969
- }, E = () => {
970
+ }, M = () => {
970
971
  const r = () => {
971
972
  l(), n.value = requestAnimationFrame(r);
972
973
  };
@@ -975,7 +976,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
975
976
  n.value && (cancelAnimationFrame(n.value), n.value = null);
976
977
  };
977
978
  return It(() => {
978
- E();
979
+ M();
979
980
  }), Zt(() => {
980
981
  H(), F();
981
982
  }), (r, g) => (Z(), B("div", je, [
@@ -987,8 +988,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
987
988
  class: "joint-item"
988
989
  }, [
989
990
  y("div", Fe, [
990
- y("div", Ne, [
991
- y("span", Ue, J(c.name), 1),
991
+ y("div", Ue, [
992
+ y("span", Ne, J(c.name), 1),
992
993
  y("span", Ye, " [" + J(((v = c.limit) == null ? void 0 : v.lower.toFixed(2)) ?? (c.type === "revolute" ? "-3.14" : "-1.00")) + ", " + J(((I = c.limit) == null ? void 0 : I.upper.toFixed(2)) ?? (c.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
993
994
  ]),
994
995
  y("span", Ve, J(c.type), 1)
@@ -1018,7 +1019,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1018
1019
  ])))
1019
1020
  ]));
1020
1021
  }
1021
- }, qe = /* @__PURE__ */ ft(We, [["__scopeId", "data-v-9e48b758"]]), Qe = ["xlink:href"], ts = /* @__PURE__ */ Xt({
1022
+ }, qe = /* @__PURE__ */ ft(We, [["__scopeId", "data-v-6ec0bcfa"]]), Qe = ["xlink:href"], ts = /* @__PURE__ */ Xt({
1022
1023
  __name: "svgIcon",
1023
1024
  props: {
1024
1025
  backgroundColor: { default: "#f0f0f0" },
@@ -1072,9 +1073,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1072
1073
  setup(o, { expose: t, emit: e }) {
1073
1074
  const i = e, n = o;
1074
1075
  let u = null, f = !1;
1075
- const a = T(null), P = T(!1), M = T("");
1076
+ const a = T(null), P = T(!1), E = T("");
1076
1077
  T(!1);
1077
- const C = T(!1), U = T(!1), A = T(""), h = T(!1), S = T(""), _ = T(), {
1078
+ const C = T(!1), N = T(!1), A = T(""), h = T(!1), S = T(""), _ = T(), {
1078
1079
  currentModels: s,
1079
1080
  initialCameraPosition: p,
1080
1081
  initialTargetPosition: b,
@@ -1084,14 +1085,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1084
1085
  getThreeJSObjects: O,
1085
1086
  clearAllModels: V,
1086
1087
  cleanup: d
1087
- } = Se(a), { isAnimating: l, toggleAnimation: E, stopAnimation: H } = ke(O, s), { isClipping: r, activeClippingAxis: g, toggleClipping: c, updateClippingPlanes: v } = Ae(
1088
+ } = Se(a), { isAnimating: l, toggleAnimation: M, stopAnimation: H } = ke(O, s), { isClipping: r, activeClippingAxis: g, toggleClipping: c, updateClippingPlanes: v } = Ae(
1088
1089
  O,
1089
1090
  s
1090
1091
  ), { addModelsFromUrls: I, loadModelByDefaultPath: W, urdfModel: q } = me(
1091
1092
  O,
1092
1093
  s,
1093
1094
  P,
1094
- M,
1095
+ E,
1095
1096
  V
1096
1097
  ), _t = () => {
1097
1098
  if (C.value || s.value.length === 0) return;
@@ -1104,21 +1105,21 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1104
1105
  L.position.lerpVectors(ot, p.value, Dt), m.target.lerpVectors(nt, b.value, Dt), xt < 1 ? requestAnimationFrame(k) : C.value = !1;
1105
1106
  };
1106
1107
  k();
1107
- }, Ut = async () => f ? Promise.resolve() : new Promise((L) => {
1108
+ }, Nt = async () => f ? Promise.resolve() : new Promise((L) => {
1108
1109
  const m = () => {
1109
1110
  f ? L() : requestAnimationFrame(m);
1110
1111
  };
1111
1112
  m();
1112
- }), Et = async (L, m) => {
1113
+ }), Mt = async (L, m) => {
1113
1114
  try {
1114
- await Ut(), l.value && H(), r.value && c();
1115
+ await Nt(), l.value && H(), r.value && c();
1115
1116
  const X = await m(L);
1116
1117
  return F(), X;
1117
1118
  } catch (X) {
1118
1119
  throw console.error("加载模型失败:", X), X;
1119
1120
  }
1120
- }, Yt = async (L) => Et(L, I), Vt = async (L) => Et(L, W), it = (L) => {
1121
- U.value = !0, A.value = L, L === "剖面视图" && !r.value && c();
1121
+ }, Yt = async (L) => Mt(L, I), Vt = async (L) => Mt(L, W), it = (L) => {
1122
+ N.value = !0, A.value = L, L === "剖面视图" && !r.value && c();
1122
1123
  }, Ht = (L) => {
1123
1124
  h.value = !0, S.value = L;
1124
1125
  }, Kt = () => {
@@ -1190,8 +1191,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1190
1191
  x(z, {
1191
1192
  name: "lookAround",
1192
1193
  size: "24",
1193
- onClick: N(E),
1194
- title: N(l) ? "停止动画" : "动画视图"
1194
+ onClick: U(M),
1195
+ title: U(l) ? "停止动画" : "动画视图"
1195
1196
  }, null, 8, ["onClick", "title"])
1196
1197
  ]),
1197
1198
  y("div", os, [
@@ -1199,14 +1200,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1199
1200
  name: "jiegoushu",
1200
1201
  size: "24",
1201
1202
  onClick: m[0] || (m[0] = (k) => it("场景树")),
1202
- active: U.value && A.value === "场景树",
1203
+ active: N.value && A.value === "场景树",
1203
1204
  title: "场景树"
1204
1205
  }, null, 8, ["active"]),
1205
1206
  x(z, {
1206
1207
  name: "clipping",
1207
1208
  size: "24",
1208
1209
  onClick: m[1] || (m[1] = (k) => it("剖面视图")),
1209
- active: U.value && A.value === "剖面视图",
1210
+ active: N.value && A.value === "剖面视图",
1210
1211
  title: "剖面视图"
1211
1212
  }, null, 8, ["active"]),
1212
1213
  x(z, {
@@ -1291,14 +1292,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1291
1292
  y("span", null, J(A.value), 1),
1292
1293
  y("span", {
1293
1294
  class: "close",
1294
- onClick: m[5] || (m[5] = (k) => U.value = !1)
1295
+ onClick: m[5] || (m[5] = (k) => N.value = !1)
1295
1296
  }, " X ")
1296
1297
  ]),
1297
1298
  x(X, { "max-height": "650px" }, {
1298
1299
  default: kt(() => [
1299
1300
  A.value === "场景树" ? (Z(), Gt(Oe, {
1300
1301
  key: 0,
1301
- model: N(q)
1302
+ model: U(q)
1302
1303
  }, null, 8, ["model"])) : ut("", !0),
1303
1304
  A.value === "剖面视图" ? (Z(), B("div", hs, [
1304
1305
  y("div", cs, [
@@ -1308,9 +1309,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1308
1309
  name: "clipping-axis",
1309
1310
  value: "none",
1310
1311
  "onUpdate:modelValue": m[6] || (m[6] = (k) => rt(g) ? g.value = k : null),
1311
- onChange: m[7] || (m[7] = (...k) => N(v) && N(v)(...k))
1312
+ onChange: m[7] || (m[7] = (...k) => U(v) && U(v)(...k))
1312
1313
  }, null, 544), [
1313
- [ht, N(g)]
1314
+ [ht, U(g)]
1314
1315
  ]),
1315
1316
  m[15] || (m[15] = y("span", { class: "radio-text" }, "无切割", -1))
1316
1317
  ]),
@@ -1320,9 +1321,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1320
1321
  name: "clipping-axis",
1321
1322
  value: "x",
1322
1323
  "onUpdate:modelValue": m[8] || (m[8] = (k) => rt(g) ? g.value = k : null),
1323
- onChange: m[9] || (m[9] = (...k) => N(v) && N(v)(...k))
1324
+ onChange: m[9] || (m[9] = (...k) => U(v) && U(v)(...k))
1324
1325
  }, null, 544), [
1325
- [ht, N(g)]
1326
+ [ht, U(g)]
1326
1327
  ]),
1327
1328
  m[16] || (m[16] = y("span", { class: "radio-text" }, "X轴切割", -1))
1328
1329
  ]),
@@ -1332,9 +1333,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1332
1333
  name: "clipping-axis",
1333
1334
  value: "y",
1334
1335
  "onUpdate:modelValue": m[10] || (m[10] = (k) => rt(g) ? g.value = k : null),
1335
- onChange: m[11] || (m[11] = (...k) => N(v) && N(v)(...k))
1336
+ onChange: m[11] || (m[11] = (...k) => U(v) && U(v)(...k))
1336
1337
  }, null, 544), [
1337
- [ht, N(g)]
1338
+ [ht, U(g)]
1338
1339
  ]),
1339
1340
  m[17] || (m[17] = y("span", { class: "radio-text" }, "Y轴切割", -1))
1340
1341
  ]),
@@ -1344,9 +1345,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1344
1345
  name: "clipping-axis",
1345
1346
  value: "z",
1346
1347
  "onUpdate:modelValue": m[12] || (m[12] = (k) => rt(g) ? g.value = k : null),
1347
- onChange: m[13] || (m[13] = (...k) => N(v) && N(v)(...k))
1348
+ onChange: m[13] || (m[13] = (...k) => U(v) && U(v)(...k))
1348
1349
  }, null, 544), [
1349
- [ht, N(g)]
1350
+ [ht, U(g)]
1350
1351
  ]),
1351
1352
  m[18] || (m[18] = y("span", { class: "radio-text" }, "Z轴切割", -1))
1352
1353
  ])
@@ -1356,7 +1357,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1356
1357
  _: 1
1357
1358
  })
1358
1359
  ], 512), [
1359
- [gt, U.value]
1360
+ [gt, N.value]
1360
1361
  ]),
1361
1362
  tt(y("div", fs, [
1362
1363
  y("div", _s, [
@@ -1371,8 +1372,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1371
1372
  tt(x(qe, {
1372
1373
  ref_key: "jointRef",
1373
1374
  ref: _,
1374
- model: N(q),
1375
- scene: N(u),
1375
+ model: U(q),
1376
+ scene: U(u),
1376
1377
  animationData: n == null ? void 0 : n.animationData
1377
1378
  }, null, 8, ["model", "scene", "animationData"]), [
1378
1379
  [gt, S.value === "关节控制"]
@@ -1385,7 +1386,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1385
1386
  ]),
1386
1387
  P.value ? (Z(), B("div", gs, [
1387
1388
  m[19] || (m[19] = y("div", { class: "loading-spinner" }, null, -1)),
1388
- y("p", null, J(M.value), 1)
1389
+ y("p", null, J(E.value), 1)
1389
1390
  ])) : ut("", !0)
1390
1391
  ]);
1391
1392
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.536",
4
+ "version": "1.1.538",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",