ss-component-new 1.1.586 → 1.1.587

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,4 +1,4 @@
1
- import { ref as D, watch as xe, createElementBlock as J, openBlock as B, createBlock as Ze, computed as ue, resolveComponent as Ke, createVNode as T, onMounted as Be, onUnmounted as We, Fragment as qe, renderList as Qe, createElementVNode as g, createCommentVNode as we, toDisplayString as ie, defineComponent as et, normalizeStyle as Le, normalizeClass as je, nextTick as Ie, onBeforeUnmount as tt, withDirectives as ne, unref as Y, withCtx as Fe, isRef as ge, vModelRadio as ye, vShow as ve } from "vue";
1
+ import { ref as D, watch as xe, createElementBlock as J, openBlock as B, createBlock as Ze, computed as ue, resolveComponent as Ke, createVNode as T, onMounted as Be, onUnmounted as We, Fragment as qe, renderList as Qe, createElementVNode as g, createCommentVNode as we, toDisplayString as ie, defineComponent as et, normalizeStyle as Le, normalizeClass as je, nextTick as Ie, onBeforeUnmount as tt, withDirectives as ne, unref as U, withCtx as Fe, isRef as ge, vModelRadio as ye, vShow as ve } from "vue";
2
2
  import { C as st, V as y, M as ae, T as ce, Q as Ne, D as Ue, E as ee, R as it, P as Pe, F as $e, G as Ee, H as ot, J as nt, K as at, W as lt, L as rt, N as ht, O as ct, X as ut, U as pt, Y as Me, Z as dt, _ as Xe, $ as mt, a0 as Te, a1 as ft, a2 as Ye, a3 as _t, a4 as gt, a5 as Ce, B as yt, a6 as Se, a7 as vt, a8 as bt, a9 as wt } from "./index-Bqwsx3he.js";
3
3
  import { _ as fe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  import { c as Ge } from "./menu-Qw1eGtzq.js";
@@ -100,15 +100,15 @@ class Mt extends st {
100
100
  if (this.object.isPerspectiveCamera) {
101
101
  const a = N.length();
102
102
  m = this._clampDistance(a * this._scale);
103
- const w = a - m;
104
- this.object.position.addScaledVector(this._dollyDirection, w), this.object.updateMatrixWorld(), d = !!w;
103
+ const b = a - m;
104
+ this.object.position.addScaledVector(this._dollyDirection, b), this.object.updateMatrixWorld(), d = !!b;
105
105
  } else if (this.object.isOrthographicCamera) {
106
106
  const a = new y(this._mouse.x, this._mouse.y, 0);
107
107
  a.unproject(this.object);
108
- const w = this.object.zoom;
109
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), d = w !== this.object.zoom;
110
- const x = new y(this._mouse.x, this._mouse.y, 0);
111
- x.unproject(this.object), this.object.position.sub(x).add(a), this.object.updateMatrixWorld(), m = N.length();
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(), d = b !== this.object.zoom;
110
+ const P = new y(this._mouse.x, this._mouse.y, 0);
111
+ P.unproject(this.object), this.object.position.sub(P).add(a), this.object.updateMatrixWorld(), m = N.length();
112
112
  } else
113
113
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
114
114
  m !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(m).add(this.object.position) : (be.origin.copy(this.object.position), be.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(be.direction)) < Pt ? this.object.lookAt(this.target) : (He.setFromNormalAndCoplanarPoint(this.object.up, this.target), be.intersectPlane(He, this.target))));
@@ -457,20 +457,20 @@ function Lt(o) {
457
457
  o.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
458
458
  }
459
459
  function jt(o) {
460
- let e = null, t = null, i = null, n = null, d = null, m = null, a = null, w = null;
461
- const x = D([]), O = D(new y()), L = D(new y()), j = () => {
460
+ let e = null, t = null, i = null, n = null, d = null, m = null, a = null, b = null;
461
+ const P = D([]), O = D(new y()), L = D(new y()), j = () => {
462
462
  if (!o.value) return;
463
463
  e = new ot(), e.background = new nt(15790320);
464
- const u = o.value;
465
- t = new at(75, u.clientWidth / u.clientHeight, 0.1, 1e4), t.position.set(8, -8, 6), t.up.set(0, 0, 1), t.lookAt(0, 0, 0), i = new lt({
464
+ const p = o.value;
465
+ t = new at(75, p.clientWidth / p.clientHeight, 0.1, 1e4), t.position.set(8, -8, 6), t.up.set(0, 0, 1), t.lookAt(0, 0, 0), i = new lt({
466
466
  antialias: !0,
467
467
  alpha: !0
468
- }), i.setSize(u.clientWidth, u.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = rt, i.toneMapping = ht, i.toneMappingExposure = 1, i.outputColorSpace = ct, u.appendChild(i.domElement), n = new Mt(t, i.domElement), n.enableDamping = !0, n.dampingFactor = 0.05, n.mouseButtons = {
468
+ }), i.setSize(p.clientWidth, p.clientHeight), i.localClippingEnabled = !0, i.shadowMap.enabled = !0, i.shadowMap.type = rt, i.toneMapping = ht, i.toneMappingExposure = 1, i.outputColorSpace = ct, p.appendChild(i.domElement), n = new Mt(t, i.domElement), n.enableDamping = !0, n.dampingFactor = 0.05, n.mouseButtons = {
469
469
  LEFT: ae.ROTATE,
470
470
  MIDDLE: ae.PAN,
471
471
  RIGHT: null
472
472
  }, n.panSpeed = 0.7, d = new ut(t, i, {
473
- container: u,
473
+ container: p,
474
474
  type: "cube",
475
475
  placement: "top-right",
476
476
  offset: {
@@ -500,37 +500,37 @@ function jt(o) {
500
500
  label: "Bottom"
501
501
  }
502
502
  }), d.attachControls(n), f(), s();
503
- }, l = (u, r) => {
504
- a && (e.remove(a), a.dispose()), w && (e.remove(w), w.geometry.dispose(), w.material.dispose());
505
- const P = Math.min(Math.max(Math.floor(u / 20), 30), 40);
506
- a = new pt(u, P, 13421772, 14540253), a.rotateX(Math.PI / 2), a.position.copy(r), e.add(a);
507
- const $ = new Me(u, u), G = new dt({
503
+ }, l = (p, r) => {
504
+ a && (e.remove(a), a.dispose()), b && (e.remove(b), b.geometry.dispose(), b.material.dispose());
505
+ const M = Math.min(Math.max(Math.floor(p / 20), 30), 40);
506
+ a = new pt(p, M, 13421772, 14540253), a.rotateX(Math.PI / 2), a.position.copy(r), e.add(a);
507
+ const $ = new Me(p, p), G = new dt({
508
508
  opacity: 0.3,
509
509
  // 阴影透明度
510
510
  color: 0
511
511
  });
512
- w = new Xe($, G), w.position.copy(r), w.position.z -= 0.01, w.receiveShadow = !0, e.add(w);
512
+ b = new Xe($, G), b.position.copy(r), b.position.z -= 0.01, b.receiveShadow = !0, e.add(b);
513
513
  }, k = () => {
514
- if (x.value.length === 0)
514
+ if (P.value.length === 0)
515
515
  return;
516
- const u = new Ee();
517
- x.value.forEach((W) => {
518
- u.expandByObject(W);
516
+ const p = new Ee();
517
+ P.value.forEach((W) => {
518
+ p.expandByObject(W);
519
519
  });
520
- const r = u.getSize(new y()), P = u.getCenter(new y()), $ = Math.max(r.x, r.y, r.z), G = Math.max($ * 8, 50), I = new y(
521
- P.x,
522
- P.y,
523
- u.min.z
520
+ const r = p.getSize(new y()), M = p.getCenter(new y()), $ = Math.max(r.x, r.y, r.z), G = Math.max($ * 8, 50), I = new y(
521
+ M.x,
522
+ M.y,
523
+ p.min.z
524
524
  // 模型的最底部
525
525
  );
526
526
  l(G, I);
527
527
  }, f = () => {
528
- const u = new mt(4210752, 0.6);
529
- e.add(u);
528
+ const p = new mt(4210752, 0.6);
529
+ e.add(p);
530
530
  const r = new Te(16777215, 2);
531
531
  r.position.set(10, 10, 8), r.castShadow = !0, r.shadow.mapSize.width = 4096, r.shadow.mapSize.height = 4096, r.shadow.camera.near = 0.5, r.shadow.camera.far = 50, r.shadow.camera.left = -50, r.shadow.camera.right = 50, r.shadow.camera.top = 50, r.shadow.camera.bottom = -50, e.add(r);
532
- const P = new Te(16777215, 0.8);
533
- P.position.set(-8, -8, 6), e.add(P);
532
+ const M = new Te(16777215, 0.8);
533
+ M.position.set(-8, -8, 6), e.add(M);
534
534
  const $ = new Te(16777215, 0.6);
535
535
  $.position.set(0, -15, 2), e.add($);
536
536
  const G = new ft(16777215, 4473924, 0.8);
@@ -541,7 +541,7 @@ function jt(o) {
541
541
  W.position.set(-15, -15, 15), e.add(W);
542
542
  }, s = () => {
543
543
  m = requestAnimationFrame(s), n && n.update(), i && e && t && i.render(e, t), d && d.render();
544
- }, c = (u) => {
544
+ }, u = (p) => {
545
545
  [
546
546
  "map",
547
547
  "normalMap",
@@ -554,36 +554,36 @@ function jt(o) {
554
554
  "lightMap",
555
555
  "aoMap",
556
556
  "displacementMap"
557
- ].forEach((P) => {
558
- u[P] && u[P].dispose && u[P].dispose();
559
- }), u.dispose && u.dispose();
560
- }, b = (u) => {
561
- u == null || u.traverse((r) => {
562
- r.geometry && r.geometry.dispose(), r.material && (Array.isArray(r.material) ? r.material.forEach((P) => {
563
- c(P);
564
- }) : c(r.material));
557
+ ].forEach((M) => {
558
+ p[M] && p[M].dispose && p[M].dispose();
559
+ }), p.dispose && p.dispose();
560
+ }, v = (p) => {
561
+ p == null || p.traverse((r) => {
562
+ r.geometry && r.geometry.dispose(), r.material && (Array.isArray(r.material) ? r.material.forEach((M) => {
563
+ u(M);
564
+ }) : u(r.material));
565
565
  });
566
566
  };
567
567
  return {
568
568
  // 响应式数据
569
- currentModels: x,
569
+ currentModels: P,
570
570
  initialCameraPosition: O,
571
571
  initialTargetPosition: L,
572
572
  // 方法
573
573
  initThreeJS: j,
574
574
  handleResize: () => {
575
575
  if (!o.value || !t || !i || !d) return;
576
- const u = o.value, r = u.clientWidth, P = u.clientHeight;
577
- t.aspect = r / P, t.updateProjectionMatrix(), i.setSize(r, P), d.update();
576
+ const p = o.value, r = p.clientWidth, M = p.clientHeight;
577
+ t.aspect = r / M, t.updateProjectionMatrix(), i.setSize(r, M), d.update();
578
578
  },
579
579
  fitCameraToAllModels: () => {
580
- if (!t || !n || x.value.length === 0) return;
581
- const u = new Ee();
582
- x.value.forEach((W) => {
583
- u.expandByObject(W);
580
+ if (!t || !n || P.value.length === 0) return;
581
+ const p = new Ee();
582
+ P.value.forEach((W) => {
583
+ p.expandByObject(W);
584
584
  });
585
- const r = u.getSize(new y()), P = u.getCenter(new y()), G = Math.max(r.x, r.y, r.z) * 0.8, I = new y(P.x + G, P.y - G, P.z + G);
586
- t.position.copy(I), t.lookAt(P), n.target.copy(P), n.update(), O.value.copy(I), L.value.copy(P), k();
585
+ const r = p.getSize(new y()), M = p.getCenter(new y()), G = Math.max(r.x, r.y, r.z) * 0.8, I = new y(M.x + G, M.y - G, M.z + G);
586
+ t.position.copy(I), t.lookAt(M), n.target.copy(M), n.update(), O.value.copy(I), L.value.copy(M), k();
587
587
  },
588
588
  getThreeJSObjects: () => ({
589
589
  scene: e,
@@ -594,72 +594,72 @@ function jt(o) {
594
594
  }),
595
595
  clearAllModels: () => {
596
596
  if (!e) return;
597
- x.value.forEach((r) => {
598
- e.remove(r), b(r);
597
+ P.value.forEach((r) => {
598
+ e.remove(r), v(r);
599
599
  });
600
- const u = [];
600
+ const p = [];
601
601
  e.children.forEach((r) => {
602
- !r.isLight && !r.isCamera && r.type !== "GridHelper" && r !== w && u.push(r);
603
- }), u.forEach((r) => {
604
- e.remove(r), b(r);
605
- }), x.value = [], k();
602
+ !r.isLight && !r.isCamera && r.type !== "GridHelper" && r !== b && p.push(r);
603
+ }), p.forEach((r) => {
604
+ e.remove(r), v(r);
605
+ }), P.value = [], k();
606
606
  },
607
607
  cleanup: () => {
608
- m && cancelAnimationFrame(m), a && a.dispose(), w && (w.geometry.dispose(), w.material.dispose()), i && i.dispose(), n && n.dispose(), d && d.dispose();
608
+ m && cancelAnimationFrame(m), a && a.dispose(), b && (b.geometry.dispose(), b.material.dispose()), i && i.dispose(), n && n.dispose(), d && d.dispose();
609
609
  },
610
610
  updateGridForModels: k
611
611
  };
612
612
  }
613
613
  function It(o, e) {
614
614
  const t = D(!1);
615
- let i = null, n = 12700, d = new y(), m = new y(), a = new y(), w = 0, x = null;
615
+ let i = null, n = 12700, d = new y(), m = new y(), a = new y(), b = 0, P = null;
616
616
  const O = (s) => s < 0.5 ? 4 * s * s * s : 1 - Math.pow(-2 * s + 2, 3) / 2, L = (s) => {
617
- const c = new y(), b = w * 1.2, R = new y(a.x + b, a.y, a.z), H = new y(a.x, a.y + b, a.z), Z = new y(a.x, a.y - b, a.z);
617
+ const u = new y(), v = b * 1.2, R = new y(a.x + v, a.y, a.z), V = new y(a.x, a.y + v, a.z), H = new y(a.x, a.y - v, a.z);
618
618
  if (s <= 0.567) {
619
- const V = s / 0.567 * Math.PI * 2;
620
- c.x = a.x + Math.cos(V) * b, c.z = a.z + Math.sin(V) * b, c.y = a.y;
619
+ const Y = s / 0.567 * Math.PI * 2;
620
+ u.x = a.x + Math.cos(Y) * v, u.z = a.z + Math.sin(Y) * v, u.y = a.y;
621
621
  } else if (s <= 0.724) {
622
- const F = (s - 0.567) / 0.157, V = O(F);
623
- c.lerpVectors(R, H, V);
622
+ const F = (s - 0.567) / 0.157, Y = O(F);
623
+ u.lerpVectors(R, V, Y);
624
624
  } else if (s <= 0.881) {
625
- const F = (s - 0.724) / 0.157, u = O(F) * Math.PI;
626
- c.x = a.x + Math.sin(u) * b, c.y = a.y + Math.cos(u) * b, c.z = a.z;
625
+ const F = (s - 0.724) / 0.157, p = O(F) * Math.PI;
626
+ u.x = a.x + Math.sin(p) * v, u.y = a.y + Math.cos(p) * v, u.z = a.z;
627
627
  } else {
628
- const F = (s - 0.881) / 0.119, V = O(F);
629
- c.lerpVectors(Z, d, V);
628
+ const F = (s - 0.881) / 0.119, Y = O(F);
629
+ u.lerpVectors(H, d, Y);
630
630
  }
631
- return c;
631
+ return u;
632
632
  }, j = () => {
633
- const { camera: s, controls: c } = o();
634
- if (!s || !c) return;
633
+ const { camera: s, controls: u } = o();
634
+ if (!s || !u) return;
635
635
  i || (i = Date.now());
636
- const b = Date.now() - i, R = Math.min(b / n, 1);
636
+ const v = Date.now() - i, R = Math.min(v / n, 1);
637
637
  if (R >= 1) {
638
638
  k();
639
639
  return;
640
640
  }
641
- const H = L(R);
642
- s.position.copy(H), s.lookAt(a), c.target.copy(a), x = requestAnimationFrame(j);
641
+ const V = L(R);
642
+ s.position.copy(V), s.lookAt(a), u.target.copy(a), P = requestAnimationFrame(j);
643
643
  }, l = () => {
644
644
  if (e.value.length === 0) return;
645
- const { camera: s, controls: c } = o();
646
- if (!s || !c) return;
647
- d.copy(s.position), m.copy(c.target);
648
- const b = new Ee();
645
+ const { camera: s, controls: u } = o();
646
+ if (!s || !u) return;
647
+ d.copy(s.position), m.copy(u.target);
648
+ const v = new Ee();
649
649
  e.value.forEach((r) => {
650
- b.expandByObject(r);
650
+ v.expandByObject(r);
651
651
  });
652
- const R = b.getSize(new y());
653
- a = b.getCenter(new y()), w = Math.max(R.x, R.y, R.z) * 1.2;
654
- const H = new y(a.x + w * 1.2, a.y, a.z);
655
- c.enabled = !1;
656
- const Z = s.position.clone(), F = 1e3, V = Date.now(), u = () => {
657
- const r = Date.now() - V, P = Math.min(r / F, 1), $ = O(P);
658
- s.position.lerpVectors(Z, H, $), s.lookAt(a), c.target.copy(a), P < 1 ? requestAnimationFrame(u) : (t.value = !0, i = null, j());
652
+ const R = v.getSize(new y());
653
+ a = v.getCenter(new y()), b = Math.max(R.x, R.y, R.z) * 1.2;
654
+ const V = new y(a.x + b * 1.2, a.y, a.z);
655
+ u.enabled = !1;
656
+ const H = s.position.clone(), F = 1e3, Y = Date.now(), p = () => {
657
+ const r = Date.now() - Y, M = Math.min(r / F, 1), $ = O(M);
658
+ s.position.lerpVectors(H, V, $), s.lookAt(a), u.target.copy(a), M < 1 ? requestAnimationFrame(p) : (t.value = !0, i = null, j());
659
659
  };
660
- u();
660
+ p();
661
661
  }, k = () => {
662
- t.value = !1, i = null, x && (cancelAnimationFrame(x), x = null);
662
+ t.value = !1, i = null, P && (cancelAnimationFrame(P), P = null);
663
663
  const { controls: s } = o();
664
664
  s && (s.enabled = !0, s.target.copy(m));
665
665
  };
@@ -667,13 +667,13 @@ function It(o, e) {
667
667
  isAnimating: t,
668
668
  toggleAnimation: () => {
669
669
  if (t.value) {
670
- t.value = !1, i = null, x && (cancelAnimationFrame(x), x = null);
671
- const { camera: s, controls: c } = o();
672
- if (!s || !c) return;
673
- c.enabled = !0;
674
- const b = s.position.clone(), R = c.target.clone(), H = 1500, Z = Date.now(), F = () => {
675
- const V = Date.now() - Z, u = Math.min(V / H, 1), r = O(u);
676
- s.position.lerpVectors(b, d, r), c.target.lerpVectors(R, m, r), u < 1 && requestAnimationFrame(F);
670
+ t.value = !1, i = null, P && (cancelAnimationFrame(P), P = null);
671
+ const { camera: s, controls: u } = o();
672
+ if (!s || !u) return;
673
+ u.enabled = !0;
674
+ const v = s.position.clone(), R = u.target.clone(), V = 1500, H = Date.now(), F = () => {
675
+ const Y = Date.now() - H, p = Math.min(Y / V, 1), r = O(p);
676
+ s.position.lerpVectors(v, d, r), u.target.lerpVectors(R, m, r), p < 1 && requestAnimationFrame(F);
677
677
  };
678
678
  F();
679
679
  } else
@@ -686,7 +686,7 @@ function It(o, e) {
686
686
  function Ft(o, e) {
687
687
  const t = D(!1), i = D("none");
688
688
  let n = [], d = [], m = new Ee(), a = new y();
689
- const w = () => {
689
+ const b = () => {
690
690
  n = [
691
691
  new Pe(new y(1, 0, 0), 0),
692
692
  // X轴平面
@@ -695,46 +695,46 @@ function Ft(o, e) {
695
695
  new Pe(new y(0, 0, 1), 0)
696
696
  // Z轴平面
697
697
  ];
698
- }, x = () => {
698
+ }, P = () => {
699
699
  m.makeEmpty(), e.value.forEach((f) => {
700
700
  m.expandByObject(f);
701
701
  }), a = m.getCenter(new y());
702
702
  }, O = (f) => {
703
703
  const s = m.getSize(new y());
704
- let c, b, R;
705
- f === "x" ? (c = new Me(s.z * 1.2, s.y * 1.2), b = new y(a.x, a.y, a.z), R = new Ce(0, Math.PI / 2, 0)) : f === "y" ? (c = new Me(s.x * 1.2, s.z * 1.2), b = new y(a.x, a.y, a.z), R = new Ce(Math.PI / 2, 0, 0)) : f === "z" && (c = new Me(s.x * 1.2, s.y * 1.2), b = new y(a.x, a.y, a.z), R = new Ce(0, 0, 0));
706
- const H = new _t({
704
+ let u, v, R;
705
+ f === "x" ? (u = new Me(s.z * 1.2, s.y * 1.2), v = new y(a.x, a.y, a.z), R = new Ce(0, Math.PI / 2, 0)) : f === "y" ? (u = new Me(s.x * 1.2, s.z * 1.2), v = new y(a.x, a.y, a.z), R = new Ce(Math.PI / 2, 0, 0)) : f === "z" && (u = new Me(s.x * 1.2, s.y * 1.2), v = new y(a.x, a.y, a.z), R = new Ce(0, 0, 0));
706
+ const V = new _t({
707
707
  color: 8900331,
708
708
  transparent: !0,
709
709
  opacity: 0.3,
710
710
  side: gt,
711
711
  depthWrite: !1
712
- }), Z = new Xe(c, H);
713
- return Z.position.copy(b), Z.rotation.copy(R), Z;
712
+ }), H = new Xe(u, V);
713
+ return H.position.copy(v), H.rotation.copy(R), H;
714
714
  }, L = () => {
715
715
  if (j(), l(), i.value === "none")
716
716
  return;
717
- x();
717
+ P();
718
718
  let f = null;
719
719
  if (i.value === "x" ? (n[0].constant = -a.x, f = n[0]) : i.value === "y" ? (n[1].constant = -a.y, f = n[1]) : i.value === "z" && (n[2].constant = -a.z, f = n[2]), f) {
720
- e.value.forEach((c) => {
721
- c.traverse((b) => {
722
- b.isMesh && b.material && (Array.isArray(b.material) ? b.material.forEach((R) => {
720
+ e.value.forEach((u) => {
721
+ u.traverse((v) => {
722
+ v.isMesh && v.material && (Array.isArray(v.material) ? v.material.forEach((R) => {
723
723
  R.clippingPlanes = [f];
724
- }) : b.material.clippingPlanes = [f]);
724
+ }) : v.material.clippingPlanes = [f]);
725
725
  });
726
726
  });
727
727
  const { scene: s } = o();
728
728
  if (s) {
729
- const c = O(i.value);
730
- s.add(c), d.push(c);
729
+ const u = O(i.value);
730
+ s.add(u), d.push(u);
731
731
  }
732
732
  }
733
733
  }, j = () => {
734
734
  e.value.forEach((f) => {
735
735
  f.traverse((s) => {
736
- s.isMesh && s.material && (Array.isArray(s.material) ? s.material.forEach((c) => {
737
- c.clippingPlanes = [];
736
+ s.isMesh && s.material && (Array.isArray(s.material) ? s.material.forEach((u) => {
737
+ u.clippingPlanes = [];
738
738
  }) : s.material.clippingPlanes = []);
739
739
  });
740
740
  });
@@ -748,7 +748,7 @@ function Ft(o, e) {
748
748
  isClipping: t,
749
749
  activeClippingAxis: i,
750
750
  toggleClipping: () => {
751
- t.value = !t.value, t.value ? (w(), e.value.length > 0 && x()) : (i.value = "none", j(), l());
751
+ t.value = !t.value, t.value ? (b(), e.value.length > 0 && P()) : (i.value = "none", j(), l());
752
752
  },
753
753
  updateClippingPlanes: L,
754
754
  clearClippingPlanes: j,
@@ -810,7 +810,7 @@ const Nt = { class: "panel-content" }, Ut = {
810
810
  const f = [];
811
811
  return Array.isArray(l) && (l == null ? void 0 : l.length) > 0 && l.forEach((s) => {
812
812
  if (!(s != null && s.isMesh) && ((s == null ? void 0 : s.type) === "URDFJoint" || (s == null ? void 0 : s.type) === "URDFLink")) {
813
- const c = {
813
+ const u = {
814
814
  name: s == null ? void 0 : s.name,
815
815
  label: s == null ? void 0 : s.name,
816
816
  show: !0,
@@ -822,10 +822,10 @@ const Nt = { class: "panel-content" }, Ut = {
822
822
  children: a(s == null ? void 0 : s.children, k + 1),
823
823
  path: s == null ? void 0 : s.name
824
824
  };
825
- f.push(c);
825
+ f.push(u);
826
826
  }
827
827
  }), f;
828
- }, w = (l) => l ? [{
828
+ }, b = (l) => l ? [{
829
829
  name: l == null ? void 0 : l.name,
830
830
  label: l == null ? void 0 : l.name,
831
831
  show: !0,
@@ -836,11 +836,11 @@ const Nt = { class: "panel-content" }, Ut = {
836
836
  limit: (l == null ? void 0 : l.limit) ?? "",
837
837
  children: a(l == null ? void 0 : l.children, 1),
838
838
  path: l == null ? void 0 : l.name
839
- }] : [], x = (l, k) => {
839
+ }] : [], P = (l, k) => {
840
840
  const f = [], s = [...l];
841
841
  for (; s.length > 0 && f.length < k; ) {
842
- const c = s.shift();
843
- c.children && c.children.length > 0 && (f.push(c.id), s.push(...c.children));
842
+ const u = s.shift();
843
+ u.children && u.children.length > 0 && (f.push(u.id), s.push(...u.children));
844
844
  }
845
845
  return f;
846
846
  }, O = (l, k) => {
@@ -848,11 +848,11 @@ const Nt = { class: "panel-content" }, Ut = {
848
848
  return l.forEach((s) => {
849
849
  if (s.children && s.children.length > 0) {
850
850
  f.push(s.id);
851
- const c = s.children.filter((b) => b.children && b.children.length > 0).slice(0, k).map((b) => b.id);
852
- f.push(...c);
851
+ const u = s.children.filter((v) => v.children && v.children.length > 0).slice(0, k).map((v) => v.id);
852
+ f.push(...u);
853
853
  }
854
854
  }), f.slice(0, k + 1);
855
- }, L = ue(() => !n.value || n.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ? O(n.value, t.maxExpandCount) : x(n.value, t.maxExpandCount)), j = ue(() => t != null && t.model ? w(t.model) : []);
855
+ }, L = ue(() => !n.value || n.value.length === 0 ? [] : t.expandStrategy === "firstLevel" ? O(n.value, t.maxExpandCount) : P(n.value, t.maxExpandCount)), j = ue(() => t != null && t.model ? b(t.model) : []);
856
856
  return xe(
857
857
  j,
858
858
  (l) => {
@@ -893,97 +893,97 @@ const Nt = { class: "panel-content" }, Ut = {
893
893
  D(!0);
894
894
  const i = D([]), n = D(null), d = D(12.5), m = D();
895
895
  D(1302);
896
- const a = D(!1), w = D(!1), x = D(0), O = D(0), L = D(null), j = $e.degToRad, l = D(1), k = () => as / ze / l.value;
896
+ const a = D(!1), b = D(!1), P = D(0), O = D(0), L = D(null), j = $e.degToRad, l = D(1), k = () => as / ze / l.value;
897
897
  let f = [];
898
898
  xe(
899
899
  () => t.animationData,
900
900
  (_) => {
901
- var p;
902
- let M = ((p = Ge(_)) == null ? void 0 : p.动画输出) ?? [];
903
- M && M.length > 0 && (f = M, u());
901
+ var c;
902
+ let x = ((c = Ge(_)) == null ? void 0 : c.动画输出) ?? [];
903
+ x && x.length > 0 && (f = x, p());
904
904
  },
905
905
  { deep: !0 }
906
906
  );
907
- const s = ue(() => f.length > 0), c = (_, M = !1) => _ === "revolute" ? M ? Math.PI : -Math.PI : _ === "prismatic" ? M ? 1 : -1 : 0, b = (_) => {
907
+ const s = ue(() => f.length > 0), u = (_, x = !1) => _ === "revolute" ? x ? Math.PI : -Math.PI : _ === "prismatic" ? x ? 1 : -1 : 0, v = (_) => {
908
908
  if (!_ || !_.joints)
909
909
  return console.warn("URDF模型没有关节信息"), [];
910
- let M = null;
910
+ let x = null;
911
911
  if (_.traverse((E) => {
912
- E.name === "Pipe_Link" && !M && (M = E);
913
- }), M)
914
- m.value = M;
912
+ E.name === "Pipe_Link" && !x && (x = E);
913
+ }), x)
914
+ m.value = x;
915
915
  else
916
916
  return console.warn("未找到管子模型"), [];
917
- const p = [];
917
+ const c = [];
918
918
  return Object.keys(_.joints).forEach((E) => {
919
- const v = _.joints[E];
920
- if (v._jointType === "fixed")
919
+ const w = _.joints[E];
920
+ if (w._jointType === "fixed")
921
921
  return;
922
- const U = v.limit ? {
923
- lower: v.limit.lower ?? c(v._jointType, !1),
924
- upper: v.limit.upper ?? c(v._jointType, !0)
922
+ const Z = w.limit ? {
923
+ lower: w.limit.lower ?? u(w._jointType, !1),
924
+ upper: w.limit.upper ?? u(w._jointType, !0)
925
925
  } : {
926
- lower: c(v._jointType, !1),
927
- upper: c(v._jointType, !0)
926
+ lower: u(w._jointType, !1),
927
+ upper: u(w._jointType, !0)
928
928
  };
929
- p.push({
929
+ c.push({
930
930
  name: E,
931
- type: v._jointType || "unknown",
932
- limit: U,
933
- currentValue: v.angle || 0,
934
- urdfJoint: v
931
+ type: w._jointType || "unknown",
932
+ limit: Z,
933
+ currentValue: w.angle || 0,
934
+ urdfJoint: w
935
935
  });
936
- }), p.sort((E, v) => E.name.localeCompare(v.name));
937
- }, R = (_, M) => {
938
- const p = i.value.find((v) => v.name === _);
939
- if (!p) return;
940
- const E = parseFloat(M);
941
- if (p.limit) {
942
- const v = Math.max(p.limit.lower, Math.min(p.limit.upper, E));
943
- p.currentValue = v;
936
+ }), c.sort((E, w) => E.name.localeCompare(w.name));
937
+ }, R = (_, x) => {
938
+ const c = i.value.find((w) => w.name === _);
939
+ if (!c) return;
940
+ const E = parseFloat(x);
941
+ if (c.limit) {
942
+ const w = Math.max(c.limit.lower, Math.min(c.limit.upper, E));
943
+ c.currentValue = w;
944
944
  } else
945
- p.currentValue = E;
946
- t.model && t.model.setJointValue ? t.model.setJointValue(_, p.currentValue) : p.urdfJoint && p.urdfJoint.setJointValue(p.currentValue);
947
- }, H = (_) => {
945
+ c.currentValue = E;
946
+ t.model && t.model.setJointValue ? t.model.setJointValue(_, c.currentValue) : c.urdfJoint && c.urdfJoint.setJointValue(c.currentValue);
947
+ }, V = (_) => {
948
948
  if (!m.value || !s.value) return;
949
- const M = f.slice(0, _ + 1), p = [];
950
- let E = new y(0, 0, 0), v = new y(0, 1, 0), U = new y(1, 0, 0);
951
- p.push(E.clone());
952
- for (const K of M) {
949
+ const x = f.slice(0, _ + 1), c = [];
950
+ let E = new y(0, 0, 0), w = new y(0, 1, 0), Z = new y(1, 0, 0);
951
+ c.push(E.clone());
952
+ for (const K of x) {
953
953
  const q = K.Y ?? 0, pe = K.B ?? 0, de = K.C ?? 0, A = K.R ?? 0;
954
954
  if (pe !== 0) {
955
- const h = new Se().makeRotationAxis(v, j(pe));
956
- U.applyMatrix4(h);
955
+ const h = new Se().makeRotationAxis(w, j(pe));
956
+ Z.applyMatrix4(h);
957
957
  }
958
958
  if (q > 0) {
959
- const h = v.clone().multiplyScalar(q * Ae);
960
- E.add(h), p.push(E.clone());
959
+ const h = w.clone().multiplyScalar(q * Ae);
960
+ E.add(h), c.push(E.clone());
961
961
  }
962
962
  if (de > 0 && A > 0) {
963
963
  const h = j(de), Q = A * Ae, le = Math.max(16, Math.ceil(de / 5)), re = E.clone().add(
964
- U.clone().multiplyScalar(-Q)
964
+ Z.clone().multiplyScalar(-Q)
965
965
  );
966
966
  for (let oe = 1; oe <= le; oe++) {
967
967
  const C = oe / le, se = h * C, _e = new Se().makeRotationAxis(
968
- v.clone().cross(U).normalize(),
968
+ w.clone().cross(Z).normalize(),
969
969
  se
970
970
  ), me = E.clone().sub(re);
971
971
  me.applyMatrix4(_e);
972
972
  const Oe = re.clone().add(me);
973
- p.push(Oe), E.copy(Oe);
973
+ c.push(Oe), E.copy(Oe);
974
974
  }
975
975
  const he = new Se().makeRotationAxis(
976
- v.clone().cross(U).normalize(),
976
+ w.clone().cross(Z).normalize(),
977
977
  h
978
978
  );
979
- U.applyMatrix4(he);
979
+ Z.applyMatrix4(he);
980
980
  }
981
981
  }
982
- p.length < 2 && p.push(new y(0, 1e-3, 0));
982
+ c.length < 2 && c.push(new y(0, 1e-3, 0));
983
983
  try {
984
- const K = new vt(p), q = new bt(
984
+ const K = new vt(c), q = new bt(
985
985
  K,
986
- Math.max(2, p.length * 4),
986
+ Math.max(2, c.length * 4),
987
987
  d.value * Ae,
988
988
  18,
989
989
  !1
@@ -992,50 +992,52 @@ const Nt = { class: "panel-content" }, Ut = {
992
992
  } catch (K) {
993
993
  console.error("更新管子几何体失败:", K);
994
994
  }
995
- }, Z = (_) => {
996
- _ && (Object.keys(_).forEach((M, p) => {
997
- const E = _[M], v = i.value.find((U) => U.name === M);
998
- v && (v.currentValue = E, t.model && t.model.setJointValue ? t.model.setJointValue(M, E) : v.urdfJoint && v.urdfJoint.setJointValue(E));
999
- }), console.log(232, index), H(index));
1000
- }, F = (_, M, p) => _ + (M - _) * p, V = (_, M, p) => {
1001
- if (!_ || !M) return _ || M;
995
+ }, H = (_) => {
996
+ _ && (Object.keys(_).forEach((x) => {
997
+ const c = _[x], E = i.value.find((w) => w.name === x);
998
+ E && (E.currentValue = c, t.model && t.model.setJointValue ? t.model.setJointValue(x, c) : E.urdfJoint && E.urdfJoint.setJointValue(c));
999
+ }), console.log(232, index), V(index));
1000
+ }, F = (_, x, c) => _ + (x - _) * c, Y = (_, x, c) => {
1001
+ if (!_ || !x) return _ || x;
1002
1002
  const E = {};
1003
- return Object.keys(_).forEach((v) => {
1004
- const U = _[v], K = M[v];
1005
- E[v] = F(U, K || U, p);
1003
+ return Object.keys(_).forEach((w) => {
1004
+ const Z = _[w], K = x[w];
1005
+ E[w] = F(Z, K || Z, c);
1006
1006
  }), E;
1007
- }, u = () => {
1007
+ }, p = () => {
1008
1008
  if (f.length === 0) {
1009
1009
  console.warn("没有动画数据");
1010
1010
  return;
1011
1011
  }
1012
- a.value = !0, w.value = !1;
1012
+ a.value = !0, b.value = !1;
1013
1013
  const _ = () => {
1014
- if (!a.value || w.value) return;
1015
- const M = O.value / ze, p = f[x.value], E = f[x.value + 1];
1014
+ if (!a.value || b.value) return;
1015
+ const x = O.value / ze;
1016
+ P.value;
1017
+ const c = f[P.value], E = f[P.value + 1];
1016
1018
  if (E) {
1017
- const v = V(p, E, M);
1018
- Z(v);
1019
+ const w = Y(c, E, x);
1020
+ H(w);
1019
1021
  } else
1020
- Z(p);
1021
- if (O.value++, O.value >= ze && (O.value = 0, x.value++, x.value >= f.length - 1)) {
1022
- P();
1022
+ H(c);
1023
+ if (O.value++, O.value >= ze && (O.value = 0, P.value++, P.value >= f.length - 1)) {
1024
+ M();
1023
1025
  return;
1024
1026
  }
1025
1027
  L.value = setTimeout(_, k());
1026
1028
  };
1027
1029
  _();
1028
1030
  }, r = () => {
1029
- w.value = !0, L.value && (clearTimeout(L.value), L.value = null);
1030
- }, P = () => {
1031
- a.value = !1, w.value = !1, l.value = 1, L.value && (clearTimeout(L.value), L.value = null);
1031
+ b.value = !0, L.value && (clearTimeout(L.value), L.value = null);
1032
+ }, M = () => {
1033
+ a.value = !1, b.value = !1, l.value = 1, L.value && (clearTimeout(L.value), L.value = null);
1032
1034
  };
1033
1035
  e({
1034
- startAnimation: u,
1036
+ startAnimation: p,
1035
1037
  pauseAnimation: r,
1036
- stopAnimation: P,
1038
+ stopAnimation: M,
1037
1039
  resetAll: () => {
1038
- P(), x.value = 0, O.value = 0, i.value.forEach((_) => {
1040
+ M(), P.value = 0, O.value = 0, i.value.forEach((_) => {
1039
1041
  (_.type === "revolute" || _.type === "prismatic") && R(_.name, 0);
1040
1042
  });
1041
1043
  },
@@ -1048,12 +1050,12 @@ const Nt = { class: "panel-content" }, Ut = {
1048
1050
  }), xe(
1049
1051
  () => t.model,
1050
1052
  (_) => {
1051
- _ ? i.value = b(_) : i.value = [];
1053
+ _ ? i.value = v(_) : i.value = [];
1052
1054
  },
1053
1055
  { immediate: !0 }
1054
1056
  );
1055
1057
  const W = () => {
1056
- !t.model || a.value && !w.value || i.value.forEach((_) => {
1058
+ !t.model || a.value && !b.value || i.value.forEach((_) => {
1057
1059
  _.urdfJoint && _.urdfJoint.angle !== void 0 && (_.currentValue = _.urdfJoint.angle);
1058
1060
  });
1059
1061
  }, te = () => {
@@ -1067,48 +1069,48 @@ const Nt = { class: "panel-content" }, Ut = {
1067
1069
  return Be(() => {
1068
1070
  te();
1069
1071
  }), We(() => {
1070
- De(), P();
1071
- }), (_, M) => (B(), J("div", Bt, [
1072
+ De(), M();
1073
+ }), (_, x) => (B(), J("div", Bt, [
1072
1074
  i.value.length > 0 ? (B(), J("div", $t, [
1073
- (B(!0), J(qe, null, Qe(i.value, (p) => {
1074
- var E, v, U, K;
1075
+ (B(!0), J(qe, null, Qe(i.value, (c) => {
1076
+ var E, w, Z, K;
1075
1077
  return B(), J("div", {
1076
- key: p.name,
1078
+ key: c.name,
1077
1079
  class: "joint-item"
1078
1080
  }, [
1079
1081
  g("div", Xt, [
1080
1082
  g("div", Gt, [
1081
- g("span", Jt, ie(p.name), 1),
1082
- g("span", Wt, " [" + ie(((E = p.limit) == null ? void 0 : E.lower.toFixed(2)) ?? (p.type === "revolute" ? "-3.14" : "-1.00")) + ", " + ie(((v = p.limit) == null ? void 0 : v.upper.toFixed(2)) ?? (p.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
1083
+ g("span", Jt, ie(c.name), 1),
1084
+ g("span", Wt, " [" + ie(((E = c.limit) == null ? void 0 : E.lower.toFixed(2)) ?? (c.type === "revolute" ? "-3.14" : "-1.00")) + ", " + ie(((w = c.limit) == null ? void 0 : w.upper.toFixed(2)) ?? (c.type === "revolute" ? "3.14" : "1.00")) + "] ", 1)
1083
1085
  ]),
1084
- g("span", qt, ie(p.type), 1)
1086
+ g("span", qt, ie(c.type), 1)
1085
1087
  ]),
1086
- p.type === "revolute" || p.type === "prismatic" ? (B(), J("div", Qt, [
1088
+ c.type === "revolute" || c.type === "prismatic" ? (B(), J("div", Qt, [
1087
1089
  g("div", es, [
1088
1090
  g("input", {
1089
1091
  type: "range",
1090
- min: ((U = p.limit) == null ? void 0 : U.lower) ?? (p.type === "revolute" ? -Math.PI : -1),
1091
- max: ((K = p.limit) == null ? void 0 : K.upper) ?? (p.type === "revolute" ? Math.PI : 1),
1092
+ min: ((Z = c.limit) == null ? void 0 : Z.lower) ?? (c.type === "revolute" ? -Math.PI : -1),
1093
+ max: ((K = c.limit) == null ? void 0 : K.upper) ?? (c.type === "revolute" ? Math.PI : 1),
1092
1094
  step: 0.01,
1093
- value: p.currentValue,
1094
- onInput: (q) => R(p.name, q.target.value),
1095
+ value: c.currentValue,
1096
+ onInput: (q) => R(c.name, q.target.value),
1095
1097
  class: "joint-slider",
1096
- disabled: a.value && !w.value
1098
+ disabled: a.value && !b.value
1097
1099
  }, null, 40, ts)
1098
1100
  ]),
1099
1101
  g("div", ss, [
1100
- g("span", is, ie(p.currentValue.toFixed(3)), 1),
1101
- g("span", os, ie(p.type === "revolute" ? "rad" : "m"), 1)
1102
+ g("span", is, ie(c.currentValue.toFixed(3)), 1),
1103
+ g("span", os, ie(c.type === "revolute" ? "rad" : "m"), 1)
1102
1104
  ])
1103
1105
  ])) : we("", !0)
1104
1106
  ]);
1105
1107
  }), 128))
1106
- ])) : (B(), J("div", ns, M[0] || (M[0] = [
1108
+ ])) : (B(), J("div", ns, x[0] || (x[0] = [
1107
1109
  g("p", null, "未检测到可控制的关节", -1)
1108
1110
  ])))
1109
1111
  ]));
1110
1112
  }
1111
- }, rs = /* @__PURE__ */ fe(ls, [["__scopeId", "data-v-64bf81e0"]]), hs = ["xlink:href"], cs = /* @__PURE__ */ et({
1113
+ }, rs = /* @__PURE__ */ fe(ls, [["__scopeId", "data-v-1d84cea4"]]), hs = ["xlink:href"], cs = /* @__PURE__ */ et({
1112
1114
  __name: "svgIcon",
1113
1115
  props: {
1114
1116
  backgroundColor: { default: "#f0f0f0" },
@@ -1163,28 +1165,28 @@ const Nt = { class: "panel-content" }, Ut = {
1163
1165
  setup(o, { expose: e, emit: t }) {
1164
1166
  const i = t, n = o;
1165
1167
  let d = null, m = !1;
1166
- const a = D(null), w = D(!1), x = D("");
1168
+ const a = D(null), b = D(!1), P = D("");
1167
1169
  D(!1);
1168
1170
  const O = D(!1), L = D(!1), j = D(""), l = D(!1), k = D(""), f = D(), {
1169
1171
  currentModels: s,
1170
- initialCameraPosition: c,
1171
- initialTargetPosition: b,
1172
+ initialCameraPosition: u,
1173
+ initialTargetPosition: v,
1172
1174
  initThreeJS: R,
1173
- handleResize: H,
1174
- fitCameraToAllModels: Z,
1175
+ handleResize: V,
1176
+ fitCameraToAllModels: H,
1175
1177
  getThreeJSObjects: F,
1176
- clearAllModels: V,
1177
- cleanup: u
1178
- } = jt(a), { isAnimating: r, toggleAnimation: P, stopAnimation: $ } = It(F, s), { isClipping: G, activeClippingAxis: I, toggleClipping: W, updateClippingPlanes: te } = Ft(
1178
+ clearAllModels: Y,
1179
+ cleanup: p
1180
+ } = jt(a), { isAnimating: r, toggleAnimation: M, stopAnimation: $ } = It(F, s), { isClipping: G, activeClippingAxis: I, toggleClipping: W, updateClippingPlanes: te } = Ft(
1179
1181
  F,
1180
1182
  s
1181
- ), { addModelsFromUrls: De, loadModelByDefaultPath: _, urdfModel: M } = wt(
1183
+ ), { addModelsFromUrls: De, loadModelByDefaultPath: _, urdfModel: x } = wt(
1182
1184
  F,
1183
1185
  s,
1184
- w,
1185
- x,
1186
- V
1187
- ), p = () => {
1186
+ b,
1187
+ P,
1188
+ Y
1189
+ ), c = () => {
1188
1190
  if (O.value || s.value.length === 0) return;
1189
1191
  O.value = !0, r.value && $();
1190
1192
  const { camera: A, controls: h } = F();
@@ -1192,7 +1194,7 @@ const Nt = { class: "panel-content" }, Ut = {
1192
1194
  h.enabled = !0;
1193
1195
  const Q = (se) => se < 0.5 ? 4 * se * se * se : 1 - Math.pow(-2 * se + 2, 3) / 2, le = A.position.clone(), re = h.target.clone(), he = 1500, oe = Date.now(), C = () => {
1194
1196
  const se = Date.now() - oe, _e = Math.min(se / he, 1), me = Q(_e);
1195
- A.position.lerpVectors(le, c.value, me), h.target.lerpVectors(re, b.value, me), _e < 1 ? requestAnimationFrame(C) : O.value = !1;
1197
+ A.position.lerpVectors(le, u.value, me), h.target.lerpVectors(re, v.value, me), _e < 1 ? requestAnimationFrame(C) : O.value = !1;
1196
1198
  };
1197
1199
  C();
1198
1200
  }, E = async () => m ? Promise.resolve() : new Promise((A) => {
@@ -1200,15 +1202,15 @@ const Nt = { class: "panel-content" }, Ut = {
1200
1202
  m ? A() : requestAnimationFrame(h);
1201
1203
  };
1202
1204
  h();
1203
- }), v = async (A, h) => {
1205
+ }), w = async (A, h) => {
1204
1206
  try {
1205
1207
  await E(), r.value && $(), G.value && W();
1206
1208
  const Q = await h(A);
1207
- return Z(), Q;
1209
+ return H(), Q;
1208
1210
  } catch (Q) {
1209
1211
  throw console.error("加载模型失败:", Q), Q;
1210
1212
  }
1211
- }, U = async (A) => v(A, De), K = async (A) => v(A, _), q = (A) => {
1213
+ }, Z = async (A) => w(A, De), K = async (A) => w(A, _), q = (A) => {
1212
1214
  L.value = !0, j.value = A, A === "剖面视图" && !G.value && W();
1213
1215
  }, pe = (A) => {
1214
1216
  l.value = !0, k.value = A;
@@ -1221,14 +1223,14 @@ const Nt = { class: "panel-content" }, Ut = {
1221
1223
  return Be(async () => {
1222
1224
  await Ie();
1223
1225
  try {
1224
- R(), d = F().scene, m = !0, window.addEventListener("resize", H);
1226
+ R(), d = F().scene, m = !0, window.addEventListener("resize", V);
1225
1227
  } catch (A) {
1226
1228
  console.error("Three.js初始化失败:", A);
1227
1229
  }
1228
1230
  }), tt(() => {
1229
- m = !1, j.value = "", k.value = "", window.removeEventListener("resize", H), r.value && $(), u();
1231
+ m = !1, j.value = "", k.value = "", window.removeEventListener("resize", V), r.value && $(), p();
1230
1232
  }), e({
1231
- addModelsFromUrls: U,
1233
+ addModelsFromUrls: Z,
1232
1234
  loadModelByDefaultPath: K
1233
1235
  }), (A, h) => {
1234
1236
  var le, re, he, oe;
@@ -1265,7 +1267,7 @@ const Nt = { class: "panel-content" }, Ut = {
1265
1267
  T(z, {
1266
1268
  name: "viewReset",
1267
1269
  size: "24",
1268
- onClick: p,
1270
+ onClick: c,
1269
1271
  title: "重置"
1270
1272
  }),
1271
1273
  T(z, {
@@ -1281,8 +1283,8 @@ const Nt = { class: "panel-content" }, Ut = {
1281
1283
  T(z, {
1282
1284
  name: "lookAround",
1283
1285
  size: "24",
1284
- onClick: Y(P),
1285
- title: Y(r) ? "停止动画" : "动画视图"
1286
+ onClick: U(M),
1287
+ title: U(r) ? "停止动画" : "动画视图"
1286
1288
  }, null, 8, ["onClick", "title"])
1287
1289
  ]),
1288
1290
  g("div", ms, [
@@ -1392,7 +1394,7 @@ const Nt = { class: "panel-content" }, Ut = {
1392
1394
  default: Fe(() => [
1393
1395
  j.value === "场景树" ? (B(), Ze(Kt, {
1394
1396
  key: 0,
1395
- model: Y(M)
1397
+ model: U(x)
1396
1398
  }, null, 8, ["model"])) : we("", !0),
1397
1399
  j.value === "剖面视图" ? (B(), J("div", vs, [
1398
1400
  g("div", bs, [
@@ -1402,9 +1404,9 @@ const Nt = { class: "panel-content" }, Ut = {
1402
1404
  name: "clipping-axis",
1403
1405
  value: "none",
1404
1406
  "onUpdate:modelValue": h[7] || (h[7] = (C) => ge(I) ? I.value = C : null),
1405
- onChange: h[8] || (h[8] = (...C) => Y(te) && Y(te)(...C))
1407
+ onChange: h[8] || (h[8] = (...C) => U(te) && U(te)(...C))
1406
1408
  }, null, 544), [
1407
- [ye, Y(I)]
1409
+ [ye, U(I)]
1408
1410
  ]),
1409
1411
  h[16] || (h[16] = g("span", { class: "radio-text" }, "无切割", -1))
1410
1412
  ]),
@@ -1414,9 +1416,9 @@ const Nt = { class: "panel-content" }, Ut = {
1414
1416
  name: "clipping-axis",
1415
1417
  value: "x",
1416
1418
  "onUpdate:modelValue": h[9] || (h[9] = (C) => ge(I) ? I.value = C : null),
1417
- onChange: h[10] || (h[10] = (...C) => Y(te) && Y(te)(...C))
1419
+ onChange: h[10] || (h[10] = (...C) => U(te) && U(te)(...C))
1418
1420
  }, null, 544), [
1419
- [ye, Y(I)]
1421
+ [ye, U(I)]
1420
1422
  ]),
1421
1423
  h[17] || (h[17] = g("span", { class: "radio-text" }, "X轴切割", -1))
1422
1424
  ]),
@@ -1426,9 +1428,9 @@ const Nt = { class: "panel-content" }, Ut = {
1426
1428
  name: "clipping-axis",
1427
1429
  value: "y",
1428
1430
  "onUpdate:modelValue": h[11] || (h[11] = (C) => ge(I) ? I.value = C : null),
1429
- onChange: h[12] || (h[12] = (...C) => Y(te) && Y(te)(...C))
1431
+ onChange: h[12] || (h[12] = (...C) => U(te) && U(te)(...C))
1430
1432
  }, null, 544), [
1431
- [ye, Y(I)]
1433
+ [ye, U(I)]
1432
1434
  ]),
1433
1435
  h[18] || (h[18] = g("span", { class: "radio-text" }, "Y轴切割", -1))
1434
1436
  ]),
@@ -1438,9 +1440,9 @@ const Nt = { class: "panel-content" }, Ut = {
1438
1440
  name: "clipping-axis",
1439
1441
  value: "z",
1440
1442
  "onUpdate:modelValue": h[13] || (h[13] = (C) => ge(I) ? I.value = C : null),
1441
- onChange: h[14] || (h[14] = (...C) => Y(te) && Y(te)(...C))
1443
+ onChange: h[14] || (h[14] = (...C) => U(te) && U(te)(...C))
1442
1444
  }, null, 544), [
1443
- [ye, Y(I)]
1445
+ [ye, U(I)]
1444
1446
  ]),
1445
1447
  h[19] || (h[19] = g("span", { class: "radio-text" }, "Z轴切割", -1))
1446
1448
  ])
@@ -1465,8 +1467,8 @@ const Nt = { class: "panel-content" }, Ut = {
1465
1467
  ne(T(rs, {
1466
1468
  ref_key: "jointRef",
1467
1469
  ref: f,
1468
- model: Y(M),
1469
- scene: Y(d),
1470
+ model: U(x),
1471
+ scene: U(d),
1470
1472
  animationData: n == null ? void 0 : n.animationData
1471
1473
  }, null, 8, ["model", "scene", "animationData"]), [
1472
1474
  [ve, k.value === "关节控制"]
@@ -1482,9 +1484,9 @@ const Nt = { class: "panel-content" }, Ut = {
1482
1484
  ], 512), [
1483
1485
  [ve, l.value]
1484
1486
  ]),
1485
- w.value ? (B(), J("div", Ts, [
1487
+ b.value ? (B(), J("div", Ts, [
1486
1488
  h[20] || (h[20] = g("div", { class: "loading-spinner" }, null, -1)),
1487
- g("p", null, ie(x.value), 1)
1489
+ g("p", null, ie(P.value), 1)
1488
1490
  ])) : we("", !0)
1489
1491
  ]);
1490
1492
  };