ss-component-new 1.1.538 → 1.1.539

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 U, 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 N, 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" }, 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 = {
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 = {
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 = 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();
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();
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 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();
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();
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(Ut), this.state = D.NONE;
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;
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(Et);
368
+ this.state !== D.NONE && this.dispatchEvent(Mt);
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(Et), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Ut));
387
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== D.NONE || (o.preventDefault(), this.dispatchEvent(Mt), this._handleMouseWheel(this._customWheelEvent(o)), this.dispatchEvent(Nt));
388
388
  }
389
- function Ee(o) {
389
+ function Me(o) {
390
390
  this.enabled !== !1 && this._handleKeyDown(o);
391
391
  }
392
- function Me(o) {
392
+ function Ee(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 Me(o) {
422
422
  default:
423
423
  this.state = D.NONE;
424
424
  }
425
- this.state !== D.NONE && this.dispatchEvent(Et);
425
+ this.state !== D.NONE && this.dispatchEvent(Mt);
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 E = T([]), C = T(new w()), N = T(new w()), A = () => {
460
+ const M = T([]), C = T(new w()), U = 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 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);
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);
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 (E.value.length === 0)
513
+ if (M.value.length === 0)
514
514
  return;
515
515
  const d = new mt();
516
- E.value.forEach((c) => {
516
+ M.value.forEach((c) => {
517
517
  d.expandByObject(c);
518
518
  });
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,
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,
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 M = new yt(16777215, 0.8);
532
- M.position.set(-8, -8, 6), t.add(M);
531
+ const E = new yt(16777215, 0.8);
532
+ E.position.set(-8, -8, 6), t.add(E);
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((M) => {
557
- d[M] && d[M].dispose && d[M].dispose();
556
+ ].forEach((E) => {
557
+ d[E] && d[E].dispose && d[E].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((M) => {
562
- p(M);
561
+ l.geometry && l.geometry.dispose(), l.material && (Array.isArray(l.material) ? l.material.forEach((E) => {
562
+ p(E);
563
563
  }) : p(l.material));
564
564
  });
565
565
  };
566
566
  return {
567
567
  // 响应式数据
568
- currentModels: E,
568
+ currentModels: M,
569
569
  initialCameraPosition: C,
570
- initialTargetPosition: N,
570
+ initialTargetPosition: U,
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, M = d.clientHeight;
576
- e.aspect = l / M, e.updateProjectionMatrix(), i.setSize(l, M), u.update();
575
+ const d = o.value, l = d.clientWidth, E = d.clientHeight;
576
+ e.aspect = l / E, e.updateProjectionMatrix(), i.setSize(l, E), u.update();
577
577
  },
578
578
  fitCameraToAllModels: () => {
579
- if (!e || !n || E.value.length === 0) return;
579
+ if (!e || !n || M.value.length === 0) return;
580
580
  const d = new mt();
581
- E.value.forEach((c) => {
581
+ M.value.forEach((c) => {
582
582
  d.expandByObject(c);
583
583
  });
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();
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();
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
- E.value.forEach((l) => {
596
+ M.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
- }), E.value = [], S();
604
+ }), M.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, E = null;
615
- const C = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, N = (s) => {
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) => {
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 = N(R);
641
- s.position.copy(Y), s.lookAt(a), p.target.copy(a), E = requestAnimationFrame(A);
640
+ const Y = U(R);
641
+ s.position.copy(Y), s.lookAt(a), p.target.copy(a), M = 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, 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());
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());
658
658
  };
659
659
  d();
660
660
  }, S = () => {
661
- e.value = !1, i = null, E && (cancelAnimationFrame(E), E = null);
661
+ e.value = !1, i = null, M && (cancelAnimationFrame(M), M = 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, E && (cancelAnimationFrame(E), E = null);
669
+ e.value = !1, i = null, M && (cancelAnimationFrame(M), M = 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
- }, E = () => {
697
+ }, M = () => {
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
- }, N = () => {
713
+ }, U = () => {
714
714
  if (A(), h(), i.value === "none")
715
715
  return;
716
- E();
716
+ M();
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 && E()) : (i.value = "none", A(), h());
750
+ e.value = !e.value, e.value ? (P(), t.value.length > 0 && M()) : (i.value = "none", A(), h());
751
751
  },
752
- updateClippingPlanes: N,
752
+ updateClippingPlanes: U,
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
- }] : [], E = (h, S) => {
808
+ }] : [], M = (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
- }, 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) : []);
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) : []);
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": N.value,
837
+ "default-expanded-keys": U.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" }, Ue = { class: "joint-left" }, Ne = { class: "joint-name" }, Ye = { class: "joint-range" }, Ve = { class: "joint-type" }, He = {
847
+ }, Fe = { class: "joint-info-row" }, Ne = { class: "joint-left" }, Ue = { 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), E = T(null), C = T(1), N = () => Ge / wt / C.value;
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;
864
864
  let A = [];
865
865
  Pt(
866
866
  () => e.animationData,
@@ -874,7 +874,6 @@ 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);
878
877
  const v = r.joints[c];
879
878
  if (v._jointType === "fixed")
880
879
  return;
@@ -886,7 +885,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
886
885
  upper: h(v._jointType, !0)
887
886
  };
888
887
  g.push({
889
- name: c.toUpperCase(),
888
+ name: c,
890
889
  type: v._jointType || "unknown",
891
890
  limit: I,
892
891
  currentValue: v.angle || 0,
@@ -894,7 +893,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
894
893
  });
895
894
  }), g.sort((c, v) => c.name.localeCompare(v.name));
896
895
  }, _ = (r, g) => {
897
- const c = i.value.find((I) => I.name.toUpperCase() === r.toUpperCase());
896
+ const c = i.value.find((I) => I.name === r);
898
897
  if (!c) return;
899
898
  const v = parseFloat(g);
900
899
  if (c.limit) {
@@ -902,10 +901,10 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
902
901
  c.currentValue = I;
903
902
  } else
904
903
  c.currentValue = v;
905
- e.model && e.model.setJointValue ? e.model.setJointValue(r.toUpperCase(), c.currentValue) : c.urdfJoint && c.urdfJoint.setJointValue(c.currentValue);
904
+ e.model && e.model.setJointValue ? e.model.setJointValue(r, c.currentValue) : c.urdfJoint && c.urdfJoint.setJointValue(c.currentValue);
906
905
  }, s = (r) => {
907
906
  r && Object.keys(r).forEach((g) => {
908
- const c = r[g], v = i.value.find((I) => I.name.toUpperCase() === g.toUpperCase());
907
+ const c = r[g], v = i.value.find((I) => I.name === g);
909
908
  v && (v.currentValue = c, e.model && e.model.setJointValue ? e.model.setJointValue(g, c) : v.urdfJoint && v.urdfJoint.setJointValue(c));
910
909
  });
911
910
  }, p = (r, g, c) => r + (g - r) * c, b = (r, g, c) => {
@@ -920,7 +919,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
920
919
  console.warn("没有动画数据");
921
920
  return;
922
921
  }
923
- u.value = !0, f.value = !1;
922
+ console.log(232, 111), u.value = !0, f.value = !1;
924
923
  const r = () => {
925
924
  if (!u.value || f.value) return;
926
925
  const g = P.value / wt, c = A[a.value], v = A[a.value + 1];
@@ -933,13 +932,13 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
933
932
  F();
934
933
  return;
935
934
  }
936
- E.value = setTimeout(r, N());
935
+ M.value = setTimeout(r, U());
937
936
  };
938
937
  r();
939
938
  }, Y = () => {
940
- f.value = !0, E.value && (clearTimeout(E.value), E.value = null);
939
+ f.value = !0, M.value && (clearTimeout(M.value), M.value = null);
941
940
  }, F = () => {
942
- u.value = !1, f.value = !1, C.value = 1, E.value && (clearTimeout(E.value), E.value = null);
941
+ u.value = !1, f.value = !1, C.value = 1, M.value && (clearTimeout(M.value), M.value = null);
943
942
  };
944
943
  t({
945
944
  startAnimation: R,
@@ -967,7 +966,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
967
966
  !e.model || u.value && !f.value || i.value.forEach((r) => {
968
967
  r.urdfJoint && r.urdfJoint.angle !== void 0 && (r.currentValue = r.urdfJoint.angle);
969
968
  });
970
- }, M = () => {
969
+ }, E = () => {
971
970
  const r = () => {
972
971
  l(), n.value = requestAnimationFrame(r);
973
972
  };
@@ -976,7 +975,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
976
975
  n.value && (cancelAnimationFrame(n.value), n.value = null);
977
976
  };
978
977
  return It(() => {
979
- M();
978
+ E();
980
979
  }), Zt(() => {
981
980
  H(), F();
982
981
  }), (r, g) => (Z(), B("div", je, [
@@ -988,8 +987,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
988
987
  class: "joint-item"
989
988
  }, [
990
989
  y("div", Fe, [
991
- y("div", Ue, [
992
- y("span", Ne, J(c.name), 1),
990
+ y("div", Ne, [
991
+ y("span", Ue, J(c.name), 1),
993
992
  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)
994
993
  ]),
995
994
  y("span", Ve, J(c.type), 1)
@@ -1019,7 +1018,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1019
1018
  ])))
1020
1019
  ]));
1021
1020
  }
1022
- }, qe = /* @__PURE__ */ ft(We, [["__scopeId", "data-v-6ec0bcfa"]]), Qe = ["xlink:href"], ts = /* @__PURE__ */ Xt({
1021
+ }, qe = /* @__PURE__ */ ft(We, [["__scopeId", "data-v-007cd1b2"]]), Qe = ["xlink:href"], ts = /* @__PURE__ */ Xt({
1023
1022
  __name: "svgIcon",
1024
1023
  props: {
1025
1024
  backgroundColor: { default: "#f0f0f0" },
@@ -1073,9 +1072,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1073
1072
  setup(o, { expose: t, emit: e }) {
1074
1073
  const i = e, n = o;
1075
1074
  let u = null, f = !1;
1076
- const a = T(null), P = T(!1), E = T("");
1075
+ const a = T(null), P = T(!1), M = T("");
1077
1076
  T(!1);
1078
- const C = T(!1), N = T(!1), A = T(""), h = T(!1), S = T(""), _ = T(), {
1077
+ const C = T(!1), U = T(!1), A = T(""), h = T(!1), S = T(""), _ = T(), {
1079
1078
  currentModels: s,
1080
1079
  initialCameraPosition: p,
1081
1080
  initialTargetPosition: b,
@@ -1085,14 +1084,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1085
1084
  getThreeJSObjects: O,
1086
1085
  clearAllModels: V,
1087
1086
  cleanup: d
1088
- } = Se(a), { isAnimating: l, toggleAnimation: M, stopAnimation: H } = ke(O, s), { isClipping: r, activeClippingAxis: g, toggleClipping: c, updateClippingPlanes: v } = Ae(
1087
+ } = Se(a), { isAnimating: l, toggleAnimation: E, stopAnimation: H } = ke(O, s), { isClipping: r, activeClippingAxis: g, toggleClipping: c, updateClippingPlanes: v } = Ae(
1089
1088
  O,
1090
1089
  s
1091
1090
  ), { addModelsFromUrls: I, loadModelByDefaultPath: W, urdfModel: q } = me(
1092
1091
  O,
1093
1092
  s,
1094
1093
  P,
1095
- E,
1094
+ M,
1096
1095
  V
1097
1096
  ), _t = () => {
1098
1097
  if (C.value || s.value.length === 0) return;
@@ -1105,21 +1104,21 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1105
1104
  L.position.lerpVectors(ot, p.value, Dt), m.target.lerpVectors(nt, b.value, Dt), xt < 1 ? requestAnimationFrame(k) : C.value = !1;
1106
1105
  };
1107
1106
  k();
1108
- }, Nt = async () => f ? Promise.resolve() : new Promise((L) => {
1107
+ }, Ut = async () => f ? Promise.resolve() : new Promise((L) => {
1109
1108
  const m = () => {
1110
1109
  f ? L() : requestAnimationFrame(m);
1111
1110
  };
1112
1111
  m();
1113
- }), Mt = async (L, m) => {
1112
+ }), Et = async (L, m) => {
1114
1113
  try {
1115
- await Nt(), l.value && H(), r.value && c();
1114
+ await Ut(), l.value && H(), r.value && c();
1116
1115
  const X = await m(L);
1117
1116
  return F(), X;
1118
1117
  } catch (X) {
1119
1118
  throw console.error("加载模型失败:", X), X;
1120
1119
  }
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();
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();
1123
1122
  }, Ht = (L) => {
1124
1123
  h.value = !0, S.value = L;
1125
1124
  }, Kt = () => {
@@ -1191,8 +1190,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1191
1190
  x(z, {
1192
1191
  name: "lookAround",
1193
1192
  size: "24",
1194
- onClick: U(M),
1195
- title: U(l) ? "停止动画" : "动画视图"
1193
+ onClick: N(E),
1194
+ title: N(l) ? "停止动画" : "动画视图"
1196
1195
  }, null, 8, ["onClick", "title"])
1197
1196
  ]),
1198
1197
  y("div", os, [
@@ -1200,14 +1199,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1200
1199
  name: "jiegoushu",
1201
1200
  size: "24",
1202
1201
  onClick: m[0] || (m[0] = (k) => it("场景树")),
1203
- active: N.value && A.value === "场景树",
1202
+ active: U.value && A.value === "场景树",
1204
1203
  title: "场景树"
1205
1204
  }, null, 8, ["active"]),
1206
1205
  x(z, {
1207
1206
  name: "clipping",
1208
1207
  size: "24",
1209
1208
  onClick: m[1] || (m[1] = (k) => it("剖面视图")),
1210
- active: N.value && A.value === "剖面视图",
1209
+ active: U.value && A.value === "剖面视图",
1211
1210
  title: "剖面视图"
1212
1211
  }, null, 8, ["active"]),
1213
1212
  x(z, {
@@ -1292,14 +1291,14 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1292
1291
  y("span", null, J(A.value), 1),
1293
1292
  y("span", {
1294
1293
  class: "close",
1295
- onClick: m[5] || (m[5] = (k) => N.value = !1)
1294
+ onClick: m[5] || (m[5] = (k) => U.value = !1)
1296
1295
  }, " X ")
1297
1296
  ]),
1298
1297
  x(X, { "max-height": "650px" }, {
1299
1298
  default: kt(() => [
1300
1299
  A.value === "场景树" ? (Z(), Gt(Oe, {
1301
1300
  key: 0,
1302
- model: U(q)
1301
+ model: N(q)
1303
1302
  }, null, 8, ["model"])) : ut("", !0),
1304
1303
  A.value === "剖面视图" ? (Z(), B("div", hs, [
1305
1304
  y("div", cs, [
@@ -1309,9 +1308,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1309
1308
  name: "clipping-axis",
1310
1309
  value: "none",
1311
1310
  "onUpdate:modelValue": m[6] || (m[6] = (k) => rt(g) ? g.value = k : null),
1312
- onChange: m[7] || (m[7] = (...k) => U(v) && U(v)(...k))
1311
+ onChange: m[7] || (m[7] = (...k) => N(v) && N(v)(...k))
1313
1312
  }, null, 544), [
1314
- [ht, U(g)]
1313
+ [ht, N(g)]
1315
1314
  ]),
1316
1315
  m[15] || (m[15] = y("span", { class: "radio-text" }, "无切割", -1))
1317
1316
  ]),
@@ -1321,9 +1320,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1321
1320
  name: "clipping-axis",
1322
1321
  value: "x",
1323
1322
  "onUpdate:modelValue": m[8] || (m[8] = (k) => rt(g) ? g.value = k : null),
1324
- onChange: m[9] || (m[9] = (...k) => U(v) && U(v)(...k))
1323
+ onChange: m[9] || (m[9] = (...k) => N(v) && N(v)(...k))
1325
1324
  }, null, 544), [
1326
- [ht, U(g)]
1325
+ [ht, N(g)]
1327
1326
  ]),
1328
1327
  m[16] || (m[16] = y("span", { class: "radio-text" }, "X轴切割", -1))
1329
1328
  ]),
@@ -1333,9 +1332,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1333
1332
  name: "clipping-axis",
1334
1333
  value: "y",
1335
1334
  "onUpdate:modelValue": m[10] || (m[10] = (k) => rt(g) ? g.value = k : null),
1336
- onChange: m[11] || (m[11] = (...k) => U(v) && U(v)(...k))
1335
+ onChange: m[11] || (m[11] = (...k) => N(v) && N(v)(...k))
1337
1336
  }, null, 544), [
1338
- [ht, U(g)]
1337
+ [ht, N(g)]
1339
1338
  ]),
1340
1339
  m[17] || (m[17] = y("span", { class: "radio-text" }, "Y轴切割", -1))
1341
1340
  ]),
@@ -1345,9 +1344,9 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1345
1344
  name: "clipping-axis",
1346
1345
  value: "z",
1347
1346
  "onUpdate:modelValue": m[12] || (m[12] = (k) => rt(g) ? g.value = k : null),
1348
- onChange: m[13] || (m[13] = (...k) => U(v) && U(v)(...k))
1347
+ onChange: m[13] || (m[13] = (...k) => N(v) && N(v)(...k))
1349
1348
  }, null, 544), [
1350
- [ht, U(g)]
1349
+ [ht, N(g)]
1351
1350
  ]),
1352
1351
  m[18] || (m[18] = y("span", { class: "radio-text" }, "Z轴切割", -1))
1353
1352
  ])
@@ -1357,7 +1356,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1357
1356
  _: 1
1358
1357
  })
1359
1358
  ], 512), [
1360
- [gt, N.value]
1359
+ [gt, U.value]
1361
1360
  ]),
1362
1361
  tt(y("div", fs, [
1363
1362
  y("div", _s, [
@@ -1372,8 +1371,8 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1372
1371
  tt(x(qe, {
1373
1372
  ref_key: "jointRef",
1374
1373
  ref: _,
1375
- model: U(q),
1376
- scene: U(u),
1374
+ model: N(q),
1375
+ scene: N(u),
1377
1376
  animationData: n == null ? void 0 : n.animationData
1378
1377
  }, null, 8, ["model", "scene", "animationData"]), [
1379
1378
  [gt, S.value === "关节控制"]
@@ -1386,7 +1385,7 @@ const ze = { class: "panel-content" }, Re = "id", Le = {
1386
1385
  ]),
1387
1386
  P.value ? (Z(), B("div", gs, [
1388
1387
  m[19] || (m[19] = y("div", { class: "loading-spinner" }, null, -1)),
1389
- y("p", null, J(E.value), 1)
1388
+ y("p", null, J(M.value), 1)
1390
1389
  ])) : ut("", !0)
1391
1390
  ]);
1392
1391
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.538",
4
+ "version": "1.1.539",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",