ss-component-new 1.1.548 → 1.1.549

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/{index-Buwm_HMT.cjs → index-B0jp4rJ7.cjs} +1 -1
  2. package/dist/{index-Dimxaw7v.js → index-BL6y6PkR.js} +1 -1
  3. package/dist/{index-DmEQ5rMj.cjs → index-Bc9NwNnP.cjs} +1 -1
  4. package/dist/{index-RHKeqrca.cjs → index-BlLYwXtf.cjs} +1 -1
  5. package/dist/{index-Cz3_SMCC.cjs → index-CCyyOPMU.cjs} +1 -1
  6. package/dist/{index-D-mmTu6o.cjs → index-CK0FtUOV.cjs} +1 -1
  7. package/dist/{index-DS5aMp22.cjs → index-CNPCeC2R.cjs} +1 -1
  8. package/dist/{index-DHzXS1Iy.cjs → index-Cj1y3b3x.cjs} +1 -1
  9. package/dist/{index-DCDTqWhV.js → index-CmmPH5Nz.js} +1 -1
  10. package/dist/{index-CBy0Wmr-.js → index-Cp4Ibjgx.js} +1 -1
  11. package/dist/{index-BweqqBIq.cjs → index-Ct9i3GIp.cjs} +1 -1
  12. package/dist/{index-7EhdrGYQ.js → index-CvTBM8UU.js} +1 -1
  13. package/dist/{index-BtGkSSqq.js → index-CzXcFvtA.js} +1 -1
  14. package/dist/{index-CX--CK9W.js → index-D5uIssA5.js} +2 -2
  15. package/dist/{index-DoK7bh85.cjs → index-D8WL61QB.cjs} +1 -1
  16. package/dist/{index-X2klfuIp.js → index-DCw_RgRm.js} +1 -1
  17. package/dist/{index-CdTFgks3.js → index-DHUzevs5.js} +1 -1
  18. package/dist/{index-HZltj8sF.js → index-DJ4YpOiS.js} +5 -5
  19. package/dist/{index-Ci-Jzm4O.cjs → index-DPU8Fdsu.cjs} +1 -1
  20. package/dist/{index-fCkjyUfU.cjs → index-DTzLbtKP.cjs} +1 -1
  21. package/dist/{index-DDUx9hJu.cjs → index-Da47VRa7.cjs} +1 -1
  22. package/dist/{index-Blj1gMr9.js → index-NQOTKxxa.js} +1 -1
  23. package/dist/{index-DOElpe7o.cjs → index-UUIxWTD6.cjs} +1 -1
  24. package/dist/{index-C0MryFa-.js → index-i5CuleWd.js} +7 -7
  25. package/dist/{index-YhTbPFhY.js → index-m3qmbCYh.js} +1 -1
  26. package/dist/{index-B9F0k3X6.js → index-o0LagUNU.js} +1 -1
  27. package/dist/{index.vue_vue_type_style_index_0_scoped_82f8c0ec_lang-UIjhdOZs.js → index.vue_vue_type_style_index_0_scoped_82f8c0ec_lang-D7itLmR5.js} +4 -4
  28. package/dist/{index.vue_vue_type_style_index_0_scoped_82f8c0ec_lang-pS_4Mrx1.cjs → index.vue_vue_type_style_index_0_scoped_82f8c0ec_lang-D_mftZvC.cjs} +1 -1
  29. package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-GwS-75w8.js → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-CNqodk4L.js} +1 -1
  30. package/dist/{index.vue_vue_type_style_index_0_scoped_d888ede3_lang-hS31ouB0.cjs → index.vue_vue_type_style_index_0_scoped_d888ede3_lang-j6KWYpT_.cjs} +1 -1
  31. package/dist/{main-DaAvRrX9.cjs → main-C9CZNzwj.cjs} +1 -1
  32. package/dist/{main-DHTtRsVg.js → main-DfUga26e.js} +2 -2
  33. package/dist/ss-component.cjs +1 -1
  34. package/dist/ss-component.css +1 -1
  35. package/dist/ss-component.js +4 -4
  36. package/dist/ss-component2.cjs +1 -1
  37. package/dist/ss-component2.js +7 -7
  38. package/dist/{threeModel-Bsipl6Uv.cjs → threeModel-Dlnb0_Wq.cjs} +1 -1
  39. package/dist/{threeModel-CU0X1c55.js → threeModel-_evs0GT3.js} +155 -154
  40. package/package.json +1 -1
  41. /package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4bd4d061_lang-C4kzFz9R.js → threeModel.vue_vue_type_style_index_0_scoped_3cea1cdc_lang-C4kzFz9R.js} +0 -0
  42. /package/dist/{threeModel.vue_vue_type_style_index_0_scoped_4bd4d061_lang-CO6ZYvsh.cjs → threeModel.vue_vue_type_style_index_0_scoped_3cea1cdc_lang-CO6ZYvsh.cjs} +0 -0
@@ -3,7 +3,7 @@ import { S as b } from "./index-BHtNKL1L.js";
3
3
  import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BPJ7Cu30.js";
4
4
  import "./menu-DV47UKJo.js";
5
5
  import l from "./ss-component2.js";
6
- const n = s(() => import("./main-DHTtRsVg.js"));
6
+ const n = s(() => import("./main-DfUga26e.js"));
7
7
  n.install = (o) => {
8
8
  o.component("ssComponent", n);
9
9
  };
@@ -11,11 +11,11 @@ const t = s(() => import("./index-ffDSB4Kw.js").then((o) => o.m));
11
11
  t.install = (o) => {
12
12
  o.component("ssTab", t);
13
13
  };
14
- const e = s(() => import("./index-BtGkSSqq.js"));
14
+ const e = s(() => import("./index-CzXcFvtA.js"));
15
15
  e.install = (o) => {
16
16
  o.component("ssMenu", e);
17
17
  };
18
- const m = s(() => import("./index-HZltj8sF.js"));
18
+ const m = s(() => import("./index-DJ4YpOiS.js"));
19
19
  m.install = (o) => {
20
20
  o.component("ssMenuComponent", m);
21
21
  };
@@ -31,7 +31,7 @@ const i = s(() => import("./index-Dp8nYzYT.js"));
31
31
  i.install = (o) => {
32
32
  o.component("ssAvatar", i);
33
33
  };
34
- const c = s(() => import("./threeModel-CU0X1c55.js"));
34
+ const c = s(() => import("./threeModel-_evs0GT3.js"));
35
35
  c.install = (o) => {
36
36
  o.component("ssThree", c);
37
37
  };
@@ -1 +1 @@
1
- "use strict";const o=require("vue-router"),t=[{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-i6oSAK8p.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-D-mmTu6o.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-Buwm_HMT.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-DOElpe7o.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-DiVZz6Oe.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-DHzXS1Iy.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-DS5aMp22.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-Ci-Jzm4O.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-BweqqBIq.cjs"))},{path:"priority",name:"Priority",component:async()=>Promise.resolve().then(()=>require("./index-D0QjuJev.cjs"))}]}],n=o.createRouter({history:o.createWebHashHistory(),routes:t});n.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=n;
1
+ "use strict";const o=require("vue-router"),t=[{path:"/login",name:"Login",component:async()=>Promise.resolve().then(()=>require("./index-i6oSAK8p.cjs"))},{path:"/",name:"Model",component:async()=>Promise.resolve().then(()=>require("./index-CK0FtUOV.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-B0jp4rJ7.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-UUIxWTD6.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-DiVZz6Oe.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-Cj1y3b3x.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CNPCeC2R.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-DPU8Fdsu.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-Ct9i3GIp.cjs"))},{path:"priority",name:"Priority",component:async()=>Promise.resolve().then(()=>require("./index-D0QjuJev.cjs"))}]}],n=o.createRouter({history:o.createWebHashHistory(),routes:t});n.beforeEach((r,s,e)=>{!sessionStorage.getItem("loginToken")&&r.path!=="/login"?e("/login"):e()});module.exports=n;
@@ -8,7 +8,7 @@ const a = [
8
8
  {
9
9
  path: "/",
10
10
  name: "Model",
11
- component: async () => import("./index-C0MryFa-.js"),
11
+ component: async () => import("./index-i5CuleWd.js"),
12
12
  // component: async ()=>import('@/components/views/model/component/main.vue'),
13
13
  // component: async ()=>import('@/components/views/canvas/index.vue'),
14
14
  // component: async ()=>import('@/components/views/test/index.vue'),
@@ -16,12 +16,12 @@ const a = [
16
16
  {
17
17
  path: "平台管理/菜单管理",
18
18
  name: "Menu",
19
- component: async () => import("./index-CX--CK9W.js")
19
+ component: async () => import("./index-D5uIssA5.js")
20
20
  },
21
21
  {
22
22
  path: "平台管理/主菜单管理",
23
23
  name: "MainMenu",
24
- component: async () => import("./index-DCDTqWhV.js")
24
+ component: async () => import("./index-CmmPH5Nz.js")
25
25
  },
26
26
  {
27
27
  path: "系统管理/个人中心",
@@ -31,22 +31,22 @@ const a = [
31
31
  {
32
32
  path: "系统管理/职位管理",
33
33
  name: "Post",
34
- component: async () => import("./index-Dimxaw7v.js")
34
+ component: async () => import("./index-BL6y6PkR.js")
35
35
  },
36
36
  {
37
37
  path: "系统管理/用户管理",
38
38
  name: "User",
39
- component: async () => import("./index-CdTFgks3.js")
39
+ component: async () => import("./index-DHUzevs5.js")
40
40
  },
41
41
  {
42
42
  path: "系统管理/角色管理",
43
43
  name: "Role",
44
- component: async () => import("./index-X2klfuIp.js")
44
+ component: async () => import("./index-DCw_RgRm.js")
45
45
  },
46
46
  {
47
47
  path: "系统管理/部门管理",
48
48
  name: "Dept",
49
- component: async () => import("./index-7EhdrGYQ.js")
49
+ component: async () => import("./index-CvTBM8UU.js")
50
50
  },
51
51
  {
52
52
  path: "priority",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("./threeModel.vue_vue_type_style_index_0_scoped_4bd4d061_lang-CO6ZYvsh.cjs"),fe=require("./index-CxnxDX6H.cjs"),ce=require("./menu-B-wiVQl5.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le={type:"change"},oe={type:"start"},he={type:"end"},W=new i.Ray,re=new i.Plane,_e=Math.cos(70*i.MathUtils.DEG2RAD),z=new i.Vector3,F=2*Math.PI,D={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ee=1e-6;class ge extends i.Controls{constructor(e,o=null){super(e,o),this.state=D.NONE,this.target=new i.Vector3,this.cursor=new i.Vector3,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=.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:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.DOLLY,RIGHT:i.MOUSE.PAN},this.touches={ONE:i.TOUCH.ROTATE,TWO:i.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new i.Vector3,this._lastQuaternion=new i.Quaternion,this._lastTargetPosition=new i.Vector3,this._quat=new i.Quaternion().setFromUnitVectors(e.up,new i.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new i.Spherical,this._sphericalDelta=new i.Spherical,this._scale=1,this._panOffset=new i.Vector3,this._rotateStart=new i.Vector2,this._rotateEnd=new i.Vector2,this._rotateDelta=new i.Vector2,this._panStart=new i.Vector2,this._panEnd=new i.Vector2,this._panDelta=new i.Vector2,this._dollyStart=new i.Vector2,this._dollyEnd=new i.Vector2,this._dollyDelta=new i.Vector2,this._dollyDirection=new i.Vector3,this._mouse=new i.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=ve.bind(this),this._onPointerDown=ye.bind(this),this._onPointerUp=be.bind(this),this._onContextMenu=Se.bind(this),this._onMouseWheel=Pe.bind(this),this._onKeyDown=Me.bind(this),this._onTouchStart=De.bind(this),this._onTouchMove=xe.bind(this),this._onMouseDown=Ee.bind(this),this._onMouseMove=we.bind(this),this._interceptControlDown=ke.bind(this),this._interceptControlUp=Ve.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),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"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(le),this.update(),this.state=D.NONE}update(e=null){const o=this.object.position;z.copy(o).sub(this.target),z.applyQuaternion(this._quat),this._spherical.setFromVector3(z),this.autoRotate&&this.state===D.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,l=this.maxAzimuthAngle;isFinite(n)&&isFinite(l)&&(n<-Math.PI?n+=F:n>Math.PI&&(n-=F),l<-Math.PI?l+=F:l>Math.PI&&(l-=F),n<=l?this._spherical.theta=Math.max(n,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+l)/2?Math.max(n,this._spherical.theta):Math.min(l,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let d=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const y=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),d=y!=this._spherical.radius}if(z.setFromSpherical(this._spherical),z.applyQuaternion(this._quatInverse),o.copy(this.target).add(z),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let y=null;if(this.object.isPerspectiveCamera){const r=z.length();y=this._clampDistance(r*this._scale);const w=r-y;this.object.position.addScaledVector(this._dollyDirection,w),this.object.updateMatrixWorld(),d=!!w}else if(this.object.isOrthographicCamera){const r=new i.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const w=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),d=w!==this.object.zoom;const P=new i.Vector3(this._mouse.x,this._mouse.y,0);P.unproject(this.object),this.object.position.sub(P).add(r),this.object.updateMatrixWorld(),y=z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;y!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(y).add(this.object.position):(W.origin.copy(this.object.position),W.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(W.direction))<_e?this.object.lookAt(this.target):(re.setFromNormalAndCoplanarPoint(this.object.up,this.target),W.intersectPlane(re,this.target))))}else if(this.object.isOrthographicCamera){const y=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),y!==this.object.zoom&&(this.object.updateProjectionMatrix(),d=!0)}return this._scale=1,this._performCursorZoom=!1,d||this._lastPosition.distanceToSquared(this.object.position)>ee||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ee||this._lastTargetPosition.distanceToSquared(this.target)>ee?(this.dispatchEvent(le),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?F/60*this.autoRotateSpeed*e:F/60/60*this.autoRotateSpeed}_getZoomScale(e){const o=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,o){z.setFromMatrixColumn(o,0),z.multiplyScalar(-e),this._panOffset.add(z)}_panUp(e,o){this.screenSpacePanning===!0?z.setFromMatrixColumn(o,1):(z.setFromMatrixColumn(o,0),z.crossVectors(this.object.up,z)),z.multiplyScalar(e),this._panOffset.add(z)}_pan(e,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;z.copy(l).sub(this.target);let d=z.length();d*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*d/n.clientHeight,this.object.matrix),this._panUp(2*o*d/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),l=e-n.left,d=o-n.top,y=n.width,r=n.height;this._mouse.x=l/y*2-1,this._mouse.y=-(d/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let o=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),n=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._rotateStart.set(n,l)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),n=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._panStart.set(n,l)}}_handleTouchStartDolly(e){const o=this._getSecondPointerPosition(e),n=e.pageX-o.x,l=e.pageY-o.y,d=Math.sqrt(n*n+l*l);this._dollyStart.set(0,d)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),l=.5*(e.pageX+n.x),d=.5*(e.pageY+n.y);this._rotateEnd.set(l,d)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),n=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._panEnd.set(n,l)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const o=this._getSecondPointerPosition(e),n=e.pageX-o.x,l=e.pageY-o.y,d=Math.sqrt(n*n+l*l);this._dollyEnd.set(0,d),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const y=(e.pageX+o.x)*.5,r=(e.pageY+o.y)*.5;this._updateZoomParameters(y,r)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==e.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(e){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==e.pointerId)return!0;return!1}_trackPointer(e){let o=this._pointerPositions[e.pointerId];o===void 0&&(o=new i.Vector2,this._pointerPositions[e.pointerId]=o),o.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const o=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(e){const o=e.deltaMode,n={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(o){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function ye(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function ve(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function be(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(he),this.state=D.NONE;break;case 1:const e=this._pointers[0],o=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:o.x,pageY:o.y});break}}function Ee(a){let e;switch(a.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case i.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=D.DOLLY;break;case i.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=D.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=D.ROTATE}break;case i.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=D.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=D.PAN}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(oe)}function we(a){switch(this.state){case D.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case D.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case D.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Pe(a){this.enabled===!1||this.enableZoom===!1||this.state!==D.NONE||(a.preventDefault(),this.dispatchEvent(oe),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(he))}function Me(a){this.enabled!==!1&&this._handleKeyDown(a)}function De(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case i.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=D.TOUCH_ROTATE;break;case i.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=D.TOUCH_PAN;break;default:this.state=D.NONE}break;case 2:switch(this.touches.TWO){case i.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=D.TOUCH_DOLLY_PAN;break;case i.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=D.TOUCH_DOLLY_ROTATE;break;default:this.state=D.NONE}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(oe)}function xe(a){switch(this._trackPointer(a),this.state){case D.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case D.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case D.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case D.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=D.NONE}}function Se(a){this.enabled!==!1&&a.preventDefault()}function ke(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ve(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Te(a){let e=null,o=null,n=null,l=null,d=null,y=null,r=null,w=null;const P=t.ref([]),k=t.ref(new i.Vector3),L=t.ref(new i.Vector3),V=()=>{if(!a.value)return;e=new i.Scene,e.background=new i.Color(15790320);const _=a.value;o=new i.PerspectiveCamera(75,_.clientWidth/_.clientHeight,.1,1e4),o.position.set(8,-8,6),o.up.set(0,0,1),o.lookAt(0,0,0),n=new i.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(_.clientWidth,_.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=i.PCFSoftShadowMap,n.toneMapping=i.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=i.SRGBColorSpace,_.appendChild(n.domElement),l=new ge(o,n.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,d=new i.Xe(o,n,{container:_,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),d.attachControls(l),v(),s()},h=(_,c)=>{r&&(e.remove(r),r.dispose()),w&&(e.remove(w),w.geometry.dispose(),w.material.dispose());const M=Math.min(Math.max(Math.floor(_/20),30),40);r=new i.GridHelper(_,M,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(c),e.add(r);const U=new i.PlaneGeometry(_,_),p=new i.ShadowMaterial({opacity:.3,color:0});w=new i.Mesh(U,p),w.position.copy(c),w.position.z-=.01,w.receiveShadow=!0,e.add(w)},x=()=>{if(P.value.length===0)return;const _=new i.Box3;P.value.forEach(u=>{_.expandByObject(u)});const c=_.getSize(new i.Vector3),M=_.getCenter(new i.Vector3),U=Math.max(c.x,c.y,c.z),p=Math.max(U*8,50),g=new i.Vector3(M.x,M.y,_.min.z);h(p,g)},v=()=>{const _=new i.AmbientLight(4210752,.6);e.add(_);const c=new i.DirectionalLight(16777215,2);c.position.set(10,10,8),c.castShadow=!0,c.shadow.mapSize.width=4096,c.shadow.mapSize.height=4096,c.shadow.camera.near=.5,c.shadow.camera.far=50,c.shadow.camera.left=-50,c.shadow.camera.right=50,c.shadow.camera.top=50,c.shadow.camera.bottom=-50,e.add(c);const M=new i.DirectionalLight(16777215,.8);M.position.set(-8,-8,6),e.add(M);const U=new i.DirectionalLight(16777215,.6);U.position.set(0,-15,2),e.add(U);const p=new i.HemisphereLight(16777215,4473924,.8);e.add(p);const g=new i.PointLight(16777215,1,50);g.position.set(15,15,15),e.add(g);const u=new i.PointLight(16777215,.5,50);u.position.set(-15,-15,15),e.add(u)},s=()=>{y=requestAnimationFrame(s),l&&l.update(),n&&e&&o&&n.render(e,o),d&&d.render()},f=_=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(M=>{_[M]&&_[M].dispose&&_[M].dispose()}),_.dispose&&_.dispose()},E=_=>{_==null||_.traverse(c=>{c.geometry&&c.geometry.dispose(),c.material&&(Array.isArray(c.material)?c.material.forEach(M=>{f(M)}):f(c.material))})};return{currentModels:P,initialCameraPosition:k,initialTargetPosition:L,initThreeJS:V,handleResize:()=>{if(!a.value||!o||!n||!d)return;const _=a.value,c=_.clientWidth,M=_.clientHeight;o.aspect=c/M,o.updateProjectionMatrix(),n.setSize(c,M),d.update()},fitCameraToAllModels:()=>{if(!o||!l||P.value.length===0)return;const _=new i.Box3;P.value.forEach(u=>{_.expandByObject(u)});const c=_.getSize(new i.Vector3),M=_.getCenter(new i.Vector3),p=Math.max(c.x,c.y,c.z)*.8,g=new i.Vector3(M.x+p,M.y-p,M.z+p);o.position.copy(g),o.lookAt(M),l.target.copy(M),l.update(),k.value.copy(g),L.value.copy(M),x()},getThreeJSObjects:()=>({scene:e,camera:o,renderer:n,controls:l,gizmo:d}),clearAllModels:()=>{if(!e)return;P.value.forEach(c=>{e.remove(c),E(c)});const _=[];e.children.forEach(c=>{!c.isLight&&!c.isCamera&&c.type!=="GridHelper"&&c!==w&&_.push(c)}),_.forEach(c=>{e.remove(c),E(c)}),P.value=[],x()},cleanup:()=>{y&&cancelAnimationFrame(y),r&&r.dispose(),w&&(w.geometry.dispose(),w.material.dispose()),n&&n.dispose(),l&&l.dispose(),d&&d.dispose()},updateGridForModels:x}}function Ce(a,e){const o=t.ref(!1);let n=null,l=12700,d=new i.Vector3,y=new i.Vector3,r=new i.Vector3,w=0,P=null;const k=s=>s<.5?4*s*s*s:1-Math.pow(-2*s+2,3)/2,L=s=>{const f=new i.Vector3,E=w*1.2,C=new i.Vector3(r.x+E,r.y,r.z),j=new i.Vector3(r.x,r.y+E,r.z),R=new i.Vector3(r.x,r.y-E,r.z);if(s<=.567){const I=s/.567*Math.PI*2;f.x=r.x+Math.cos(I)*E,f.z=r.z+Math.sin(I)*E,f.y=r.y}else if(s<=.724){const N=(s-.567)/.157,I=k(N);f.lerpVectors(C,j,I)}else if(s<=.881){const N=(s-.724)/.157,_=k(N)*Math.PI;f.x=r.x+Math.sin(_)*E,f.y=r.y+Math.cos(_)*E,f.z=r.z}else{const N=(s-.881)/.119,I=k(N);f.lerpVectors(R,d,I)}return f},V=()=>{const{camera:s,controls:f}=a();if(!s||!f)return;n||(n=Date.now());const E=Date.now()-n,C=Math.min(E/l,1);if(C>=1){x();return}const j=L(C);s.position.copy(j),s.lookAt(r),f.target.copy(r),P=requestAnimationFrame(V)},h=()=>{if(e.value.length===0)return;const{camera:s,controls:f}=a();if(!s||!f)return;d.copy(s.position),y.copy(f.target);const E=new i.Box3;e.value.forEach(c=>{E.expandByObject(c)});const C=E.getSize(new i.Vector3);r=E.getCenter(new i.Vector3),w=Math.max(C.x,C.y,C.z)*1.2;const j=new i.Vector3(r.x+w*1.2,r.y,r.z);f.enabled=!1;const R=s.position.clone(),N=1e3,I=Date.now(),_=()=>{const c=Date.now()-I,M=Math.min(c/N,1),U=k(M);s.position.lerpVectors(R,j,U),s.lookAt(r),f.target.copy(r),M<1?requestAnimationFrame(_):(o.value=!0,n=null,V())};_()},x=()=>{o.value=!1,n=null,P&&(cancelAnimationFrame(P),P=null);const{controls:s}=a();s&&(s.enabled=!0,s.target.copy(y))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,P&&(cancelAnimationFrame(P),P=null);const{camera:s,controls:f}=a();if(!s||!f)return;f.enabled=!0;const E=s.position.clone(),C=f.target.clone(),j=1500,R=Date.now(),N=()=>{const I=Date.now()-R,_=Math.min(I/j,1),c=k(_);s.position.lerpVectors(E,d,c),f.target.lerpVectors(C,y,c),_<1&&requestAnimationFrame(N)};N()}else h()},startAnimation:h,stopAnimation:x}}function Ae(a,e){const o=t.ref(!1),n=t.ref("none");let l=[],d=[],y=new i.Box3,r=new i.Vector3;const w=()=>{l=[new i.Plane(new i.Vector3(1,0,0),0),new i.Plane(new i.Vector3(0,1,0),0),new i.Plane(new i.Vector3(0,0,1),0)]},P=()=>{y.makeEmpty(),e.value.forEach(v=>{y.expandByObject(v)}),r=y.getCenter(new i.Vector3)},k=v=>{const s=y.getSize(new i.Vector3);let f,E,C;v==="x"?(f=new i.PlaneGeometry(s.z*1.2,s.y*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(0,Math.PI/2,0)):v==="y"?(f=new i.PlaneGeometry(s.x*1.2,s.z*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(Math.PI/2,0,0)):v==="z"&&(f=new i.PlaneGeometry(s.x*1.2,s.y*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(0,0,0));const j=new i.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:i.DoubleSide,depthWrite:!1}),R=new i.Mesh(f,j);return R.position.copy(E),R.rotation.copy(C),R},L=()=>{if(V(),h(),n.value==="none")return;P();let v=null;if(n.value==="x"?(l[0].constant=-r.x,v=l[0]):n.value==="y"?(l[1].constant=-r.y,v=l[1]):n.value==="z"&&(l[2].constant=-r.z,v=l[2]),v){e.value.forEach(f=>{f.traverse(E=>{E.isMesh&&E.material&&(Array.isArray(E.material)?E.material.forEach(C=>{C.clippingPlanes=[v]}):E.material.clippingPlanes=[v])})});const{scene:s}=a();if(s){const f=k(n.value);s.add(f),d.push(f)}}},V=()=>{e.value.forEach(v=>{v.traverse(s=>{s.isMesh&&s.material&&(Array.isArray(s.material)?s.material.forEach(f=>{f.clippingPlanes=[]}):s.material.clippingPlanes=[])})})},h=()=>{const{scene:v}=a();v&&d.forEach(s=>{v.remove(s),s.geometry.dispose(),s.material.dispose()}),d=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(w(),e.value.length>0&&P()):(n.value="none",V(),h())},updateClippingPlanes:L,clearClippingPlanes:V,clearClippingMeshes:h}}const Ne={class:"panel-content"},ze=t.defineComponent({__name:"animationTable",props:{animationData:Object,urdf:Object},setup(a){const e=a;t.ref([]);const o=t.ref([]),n=t.ref([]);return t.watch(()=>[e==null?void 0:e.animationData,e==null?void 0:e.urdf],()=>{var d;let l=((d=ce.cloneDeep(e==null?void 0:e.animationData))==null?void 0:d.动画输出)??[];l&&l.length>0&&(e!=null&&e.urdf)&&console.log(232,l,e==null?void 0:e.urdf)},{deep:!0}),(l,d)=>(t.openBlock(),t.createElementBlock("div",Ne,[t.createVNode(fe.ssTable,{columns:o.value,tableData:n.value,isShowPagination:!1},null,8,["columns","tableData"])]))}}),Oe=K._export_sfc(ze,[["__scopeId","data-v-2f0cd581"]]),Re={class:"panel-content"},Le="id",je={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:e}){const o=a,n=e,l=t.ref([]),d={children:"children",label:"label"},y=h=>{n("nodeClick",h)},r=(h,x=0)=>{const v=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(s=>{if(!(s!=null&&s.isMesh)&&((s==null?void 0:s.type)==="URDFJoint"||(s==null?void 0:s.type)==="URDFLink")){const f={name:s==null?void 0:s.name,label:s==null?void 0:s.name,show:!0,level:x+1,isPenultimate:!1,type:s==null?void 0:s.type,id:s==null?void 0:s.id,limit:(s==null?void 0:s.limit)??"",children:r(s==null?void 0:s.children,x+1),path:s==null?void 0:s.name};v.push(f)}}),v},w=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:r(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],P=(h,x)=>{const v=[],s=[...h];for(;s.length>0&&v.length<x;){const f=s.shift();f.children&&f.children.length>0&&(v.push(f.id),s.push(...f.children))}return v},k=(h,x)=>{const v=[];return h.forEach(s=>{if(s.children&&s.children.length>0){v.push(s.id);const f=s.children.filter(E=>E.children&&E.children.length>0).slice(0,x).map(E=>E.id);v.push(...f)}}),v.slice(0,x+1)},L=t.computed(()=>!l.value||l.value.length===0?[]:o.expandStrategy==="firstLevel"?k(l.value,o.maxExpandCount):P(l.value,o.maxExpandCount)),V=t.computed(()=>o!=null&&o.model?w(o.model):[]);return t.watch(V,h=>{l.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,x)=>{const v=t.resolveComponent("el-tree");return t.openBlock(),t.createElementBlock("div",Re,[t.createVNode(v,{data:l.value,props:d,"default-expanded-keys":L.value,"node-key":Le,onNodeClick:y},null,8,["data","default-expanded-keys"])])}}},Ie=K._export_sfc(je,[["__scopeId","data-v-290ff4e1"]]),Ue={class:"panel-content"},Fe={key:0,class:"joints-list"},Be={class:"joint-info-row"},Ye={class:"joint-left"},He={class:"joint-name"},Ze={class:"joint-range"},Ke={class:"joint-type"},$e={key:0,class:"joint-control-row"},Xe={class:"slider-container"},Ge=["min","max","value","onInput","disabled"],Je={class:"value-display"},qe={class:"joint-value"},We={class:"unit"},Qe={key:1,class:"empty-state"},et=1e3,te=60,tt={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Array},setup(a,{expose:e}){const o=a;t.ref(!0);const n=t.ref([]),l=t.ref(null),d=t.ref(!1),y=t.ref(!1),r=t.ref(0),w=t.ref(0),P=t.ref(null),k=t.ref(1),L=()=>et/te/k.value;let V=[];t.watch(()=>o.animationData,p=>{var u;let g=((u=ce.cloneDeep(p))==null?void 0:u.动画输出)??[];g&&g.length>0&&(V=g,C())},{deep:!0});const h=(p,g=!1)=>p==="revolute"?g?Math.PI:-Math.PI:p==="prismatic"?g?1:-1:0,x=p=>{if(!p||!p.joints)return console.warn("URDF模型没有关节信息"),[];const g=[];return Object.keys(p.joints).forEach(u=>{const b=p.joints[u];if(b._jointType==="fixed")return;const O=b.limit?{lower:b.limit.lower??h(b._jointType,!1),upper:b.limit.upper??h(b._jointType,!0)}:{lower:h(b._jointType,!1),upper:h(b._jointType,!0)};g.push({name:u,type:b._jointType||"unknown",limit:O,currentValue:b.angle||0,urdfJoint:b})}),g.sort((u,b)=>u.name.localeCompare(b.name))},v=(p,g)=>{const u=n.value.find(O=>O.name===p);if(!u)return;const b=parseFloat(g);if(u.limit){const O=Math.max(u.limit.lower,Math.min(u.limit.upper,b));u.currentValue=O}else u.currentValue=b;o.model&&o.model.setJointValue?o.model.setJointValue(p,u.currentValue):u.urdfJoint&&u.urdfJoint.setJointValue(u.currentValue)},s=p=>{p&&Object.keys(p).forEach(g=>{const u=p[g],b=n.value.find(O=>O.name===g);b&&(b.currentValue=u,o.model&&o.model.setJointValue?o.model.setJointValue(g,u):b.urdfJoint&&b.urdfJoint.setJointValue(u))})},f=(p,g,u)=>p+(g-p)*u,E=(p,g,u)=>{if(!p||!g)return p||g;const b={};return Object.keys(p).forEach(O=>{const H=p[O],Y=g[O];b[O]=f(H,Y||H,u)}),b},C=()=>{if(V.length===0){console.warn("没有动画数据");return}d.value=!0,y.value=!1;const p=()=>{if(!d.value||y.value)return;const g=w.value/te,u=V[r.value],b=V[r.value+1];if(b){const O=E(u,b,g);s(O)}else s(u);if(w.value++,w.value>=te&&(w.value=0,r.value++,r.value>=V.length-1)){R();return}P.value=setTimeout(p,L())};p()},j=()=>{y.value=!0,P.value&&(clearTimeout(P.value),P.value=null)},R=()=>{d.value=!1,y.value=!1,k.value=1,P.value&&(clearTimeout(P.value),P.value=null)};e({startAnimation:C,pauseAnimation:j,stopAnimation:R,resetAll:()=>{R(),r.value=0,w.value=0,n.value.forEach(p=>{(p.type==="revolute"||p.type==="prismatic")&&v(p.name,0)})},fastForward:()=>{k.value<4&&(k.value=Math.min(4,k.value*2))},fastBackward:()=>{k.value>.25&&(k.value=Math.max(.25,k.value/2))}}),t.watch(()=>o.model,p=>{p?n.value=x(p):n.value=[]},{immediate:!0});const c=()=>{!o.model||d.value&&!y.value||n.value.forEach(p=>{p.urdfJoint&&p.urdfJoint.angle!==void 0&&(p.currentValue=p.urdfJoint.angle)})},M=()=>{const p=()=>{c(),l.value=requestAnimationFrame(p)};p()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return t.onMounted(()=>{M()}),t.onUnmounted(()=>{U(),R()}),(p,g)=>(t.openBlock(),t.createElementBlock("div",Ue,[n.value.length>0?(t.openBlock(),t.createElementBlock("div",Fe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,u=>{var b,O,H,Y;return t.openBlock(),t.createElementBlock("div",{key:u.name,class:"joint-item"},[t.createElementVNode("div",Be,[t.createElementVNode("div",Ye,[t.createElementVNode("span",He,t.toDisplayString(u.name),1),t.createElementVNode("span",Ze," ["+t.toDisplayString(((b=u.limit)==null?void 0:b.lower.toFixed(2))??(u.type==="revolute"?"-3.14":"-1.00"))+", "+t.toDisplayString(((O=u.limit)==null?void 0:O.upper.toFixed(2))??(u.type==="revolute"?"3.14":"1.00"))+"] ",1)]),t.createElementVNode("span",Ke,t.toDisplayString(u.type),1)]),u.type==="revolute"||u.type==="prismatic"?(t.openBlock(),t.createElementBlock("div",$e,[t.createElementVNode("div",Xe,[t.createElementVNode("input",{type:"range",min:((H=u.limit)==null?void 0:H.lower)??(u.type==="revolute"?-Math.PI:-1),max:((Y=u.limit)==null?void 0:Y.upper)??(u.type==="revolute"?Math.PI:1),step:.01,value:u.currentValue,onInput:Q=>v(u.name,Q.target.value),class:"joint-slider",disabled:d.value&&!y.value},null,40,Ge)]),t.createElementVNode("div",Je,[t.createElementVNode("span",qe,t.toDisplayString(u.currentValue.toFixed(3)),1),t.createElementVNode("span",We,t.toDisplayString(u.type==="revolute"?"rad":"m"),1)])])):t.createCommentVNode("",!0)])}),128))])):(t.openBlock(),t.createElementBlock("div",Qe,g[0]||(g[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},ot=K._export_sfc(tt,[["__scopeId","data-v-e59e34fa"]]),it=["xlink:href"],st=t.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const e=a,o=t.computed(()=>({backgroundColor:e.backgroundColor})),n=t.computed(()=>`#${e.prefix}-${e.name}`),l=t.computed(()=>{const{size:d}=e;let y=`${d}`;return y=`${y.replace("px","")}px`,{width:y,height:y}});return(d,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["container",{active:d.active}]),style:t.normalizeStyle(o.value)},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["svg-icon",[d.$attrs.class,d.spin&&"svg-icon-spin"]]),style:t.normalizeStyle(l.value),"aria-hidden":"true"},[t.createElementVNode("use",{"xlink:href":n.value},null,8,it)],6))],6))}}),T=K._export_sfc(st,[["__scopeId","data-v-3150a90b"]]),nt={class:"obj-viewer-container"},at={class:"buttonGroup-top"},lt={class:"buttonGroup-topLeft"},rt={class:"buttonGroup-left"},ct={class:"buttonGroup-right"},ht={class:"buttonGroup-bottom"},ut={class:"left-panel"},dt={class:"panel-header"},pt={key:1,class:"clipping-content"},mt={class:"radio-group"},ft={class:"radio-label"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"radio-label"},vt={class:"right-panel"},bt={class:"panel-header"},Et={key:0,class:"loading-overlay"},wt={__name:"threeModel",props:{animationData:{type:Array,default:[]}},emits:["getAnimationData"],setup(a,{expose:e,emit:o}){const n=o,l=a;let d=null,y=!1;const r=t.ref(null),w=t.ref(!1),P=t.ref("");t.ref(!1);const k=t.ref(!1),L=t.ref(!1),V=t.ref(""),h=t.ref(!1),x=t.ref(""),v=t.ref(),{currentModels:s,initialCameraPosition:f,initialTargetPosition:E,initThreeJS:C,handleResize:j,fitCameraToAllModels:R,getThreeJSObjects:N,clearAllModels:I,cleanup:_}=Te(r),{isAnimating:c,toggleAnimation:M,stopAnimation:U}=Ce(N,s),{isClipping:p,activeClippingAxis:g,toggleClipping:u,updateClippingPlanes:b}=Ae(N,s),{addModelsFromUrls:O,loadModelByDefaultPath:H,urdfModel:Y}=i.useModelLoader(N,s,w,P,I),Q=()=>{if(k.value||s.value.length===0)return;k.value=!0,c.value&&U();const{camera:A,controls:m}=N();if(!A||!m)return;m.enabled=!0;const B=Z=>Z<.5?4*Z*Z*Z:1-Math.pow(-2*Z+2,3)/2,X=A.position.clone(),G=m.target.clone(),J=1500,q=Date.now(),S=()=>{const Z=Date.now()-q,ne=Math.min(Z/J,1),ae=B(ne);A.position.lerpVectors(X,f.value,ae),m.target.lerpVectors(G,E.value,ae),ne<1?requestAnimationFrame(S):k.value=!1};S()},ue=async()=>y?Promise.resolve():new Promise(A=>{const m=()=>{y?A():requestAnimationFrame(m)};m()}),ie=async(A,m)=>{try{await ue(),c.value&&U(),p.value&&u();const B=await m(A);return R(),B}catch(B){throw console.error("加载模型失败:",B),B}},de=async A=>ie(A,O),pe=async A=>ie(A,H),$=A=>{L.value=!0,V.value=A,A==="剖面视图"&&!p.value&&u()},se=A=>{h.value=!0,x.value=A},me=()=>{n("getAnimationData"),t.nextTick(()=>{var A;(A=v.value)==null||A.startAnimation()})};return t.onMounted(async()=>{await t.nextTick();try{C(),d=N().scene,y=!0,window.addEventListener("resize",j)}catch(A){console.error("Three.js初始化失败:",A)}}),t.onBeforeUnmount(()=>{y=!1,V.value="",x.value="",window.removeEventListener("resize",j),c.value&&U(),_()}),e({addModelsFromUrls:de,loadModelByDefaultPath:pe}),(A,m)=>{var X,G,J,q;const B=t.resolveComponent("el-scrollbar");return t.openBlock(),t.createElementBlock("div",nt,[t.createElementVNode("div",{ref_key:"threejsContainer",ref:r,class:"threejs-container"},null,512),t.createElementVNode("div",at,[t.createVNode(T,{name:"guanjianjiexi",size:"34"}),t.createVNode(T,{name:"guanjiekongzhi",size:"34"}),t.createVNode(T,{name:"gongyishengcheng",size:"34"}),t.createVNode(T,{name:"buchangshezhi",size:"34"}),t.createVNode(T,{name:"shuchujiagongchengxu",size:"34"})]),t.createElementVNode("div",lt,[t.createVNode(T,{name:"viewReset",size:"24",onClick:Q,title:"重置"}),t.createVNode(T,{name:"fangda",size:"24",title:"放大"}),t.createVNode(T,{name:"suoxiao",size:"24",title:"缩小"}),t.createVNode(T,{name:"lookAround",size:"24",onClick:t.unref(M),title:t.unref(c)?"停止动画":"动画视图"},null,8,["onClick","title"])]),t.createElementVNode("div",rt,[t.createVNode(T,{name:"jiegoushu",size:"24",onClick:m[0]||(m[0]=S=>$("场景树")),active:L.value&&V.value==="场景树",title:"场景树"},null,8,["active"]),t.createVNode(T,{name:"clipping",size:"24",onClick:m[1]||(m[1]=S=>$("剖面视图")),active:L.value&&V.value==="剖面视图",title:"剖面视图"},null,8,["active"]),t.createVNode(T,{name:"donghuafangzhen",size:"24",onClick:m[2]||(m[2]=S=>$("场景树3"))}),t.createVNode(T,{name:"donghuafangzhen",size:"24",onClick:m[3]||(m[3]=S=>$("场景4"))})]),t.createElementVNode("div",ct,[t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"guanjiekongzhi",size:"24",onClick:m[4]||(m[4]=S=>se("关节控制")),active:h.value&&x.value==="关节控制",title:"关节控制"},null,8,["active"]),t.createVNode(T,{name:"DongHuaFangZhen",size:"24",title:"动画仿真",onClick:m[5]||(m[5]=S=>se("动画仿真")),active:h.value&&x.value==="动画仿真"},null,8,["active"]),t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"donghuafangzhen",size:"24"})]),t.createElementVNode("div",ht,[t.createVNode(T,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(X=v.value)==null?void 0:X.fastBackward},null,8,["onClick"]),t.createVNode(T,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:me}),t.createVNode(T,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(G=v.value)==null?void 0:G.fastForward},null,8,["onClick"]),t.createVNode(T,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(J=v.value)==null?void 0:J.pauseAnimation},null,8,["onClick"]),t.createVNode(T,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(q=v.value)==null?void 0:q.resetAll},null,8,["onClick"])]),t.withDirectives(t.createElementVNode("div",ut,[t.createElementVNode("div",dt,[t.createElementVNode("span",null,t.toDisplayString(V.value),1),t.createElementVNode("span",{class:"close",onClick:m[6]||(m[6]=S=>L.value=!1)}," X ")]),t.createVNode(B,{"max-height":"650px"},{default:t.withCtx(()=>[V.value==="场景树"?(t.openBlock(),t.createBlock(Ie,{key:0,model:t.unref(Y)},null,8,["model"])):t.createCommentVNode("",!0),V.value==="剖面视图"?(t.openBlock(),t.createElementBlock("div",pt,[t.createElementVNode("div",mt,[t.createElementVNode("label",ft,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":m[7]||(m[7]=S=>t.isRef(g)?g.value=S:null),onChange:m[8]||(m[8]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[16]||(m[16]=t.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),t.createElementVNode("label",_t,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":m[9]||(m[9]=S=>t.isRef(g)?g.value=S:null),onChange:m[10]||(m[10]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[17]||(m[17]=t.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),t.createElementVNode("label",gt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":m[11]||(m[11]=S=>t.isRef(g)?g.value=S:null),onChange:m[12]||(m[12]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[18]||(m[18]=t.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),t.createElementVNode("label",yt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":m[13]||(m[13]=S=>t.isRef(g)?g.value=S:null),onChange:m[14]||(m[14]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[19]||(m[19]=t.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):t.createCommentVNode("",!0)]),_:1})],512),[[t.vShow,L.value]]),t.withDirectives(t.createElementVNode("div",vt,[t.createElementVNode("div",bt,[t.createElementVNode("span",null,t.toDisplayString(x.value),1),t.createElementVNode("span",{class:"close",onClick:m[15]||(m[15]=S=>h.value=!1)}," X ")]),t.createVNode(B,{"max-height":"650px"},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(ot,{ref_key:"jointRef",ref:v,model:t.unref(Y),scene:t.unref(d),animationData:l==null?void 0:l.animationData},null,8,["model","scene","animationData"]),[[t.vShow,x.value==="关节控制"]]),t.withDirectives(t.createVNode(Oe,{animationData:l==null?void 0:l.animationData,urdf:t.unref(Y)},null,8,["animationData","urdf"]),[[t.vShow,x.value==="动画仿真"]])]),_:1})],512),[[t.vShow,h.value]]),w.value?(t.openBlock(),t.createElementBlock("div",Et,[m[20]||(m[20]=t.createElementVNode("div",{class:"loading-spinner"},null,-1)),t.createElementVNode("p",null,t.toDisplayString(P.value),1)])):t.createCommentVNode("",!0)])}}},Pt=K._export_sfc(wt,[["__scopeId","data-v-4bd4d061"]]);exports.default=Pt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("./threeModel.vue_vue_type_style_index_0_scoped_3cea1cdc_lang-CO6ZYvsh.cjs"),fe=require("./index-CxnxDX6H.cjs"),ce=require("./menu-B-wiVQl5.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),le={type:"change"},oe={type:"start"},he={type:"end"},W=new i.Ray,re=new i.Plane,_e=Math.cos(70*i.MathUtils.DEG2RAD),z=new i.Vector3,F=2*Math.PI,D={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},ee=1e-6;class ge extends i.Controls{constructor(e,o=null){super(e,o),this.state=D.NONE,this.target=new i.Vector3,this.cursor=new i.Vector3,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=.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:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.DOLLY,RIGHT:i.MOUSE.PAN},this.touches={ONE:i.TOUCH.ROTATE,TWO:i.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new i.Vector3,this._lastQuaternion=new i.Quaternion,this._lastTargetPosition=new i.Vector3,this._quat=new i.Quaternion().setFromUnitVectors(e.up,new i.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new i.Spherical,this._sphericalDelta=new i.Spherical,this._scale=1,this._panOffset=new i.Vector3,this._rotateStart=new i.Vector2,this._rotateEnd=new i.Vector2,this._rotateDelta=new i.Vector2,this._panStart=new i.Vector2,this._panEnd=new i.Vector2,this._panDelta=new i.Vector2,this._dollyStart=new i.Vector2,this._dollyEnd=new i.Vector2,this._dollyDelta=new i.Vector2,this._dollyDirection=new i.Vector3,this._mouse=new i.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=ve.bind(this),this._onPointerDown=ye.bind(this),this._onPointerUp=be.bind(this),this._onContextMenu=Se.bind(this),this._onMouseWheel=Pe.bind(this),this._onKeyDown=Me.bind(this),this._onTouchStart=De.bind(this),this._onTouchMove=xe.bind(this),this._onMouseDown=Ee.bind(this),this._onMouseMove=we.bind(this),this._interceptControlDown=ke.bind(this),this._interceptControlUp=Ve.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),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"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(le),this.update(),this.state=D.NONE}update(e=null){const o=this.object.position;z.copy(o).sub(this.target),z.applyQuaternion(this._quat),this._spherical.setFromVector3(z),this.autoRotate&&this.state===D.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let s=this.minAzimuthAngle,l=this.maxAzimuthAngle;isFinite(s)&&isFinite(l)&&(s<-Math.PI?s+=F:s>Math.PI&&(s-=F),l<-Math.PI?l+=F:l>Math.PI&&(l-=F),s<=l?this._spherical.theta=Math.max(s,Math.min(l,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(s+l)/2?Math.max(s,this._spherical.theta):Math.min(l,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let d=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const y=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),d=y!=this._spherical.radius}if(z.setFromSpherical(this._spherical),z.applyQuaternion(this._quatInverse),o.copy(this.target).add(z),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let y=null;if(this.object.isPerspectiveCamera){const r=z.length();y=this._clampDistance(r*this._scale);const w=r-y;this.object.position.addScaledVector(this._dollyDirection,w),this.object.updateMatrixWorld(),d=!!w}else if(this.object.isOrthographicCamera){const r=new i.Vector3(this._mouse.x,this._mouse.y,0);r.unproject(this.object);const w=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),d=w!==this.object.zoom;const P=new i.Vector3(this._mouse.x,this._mouse.y,0);P.unproject(this.object),this.object.position.sub(P).add(r),this.object.updateMatrixWorld(),y=z.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;y!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(y).add(this.object.position):(W.origin.copy(this.object.position),W.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(W.direction))<_e?this.object.lookAt(this.target):(re.setFromNormalAndCoplanarPoint(this.object.up,this.target),W.intersectPlane(re,this.target))))}else if(this.object.isOrthographicCamera){const y=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),y!==this.object.zoom&&(this.object.updateProjectionMatrix(),d=!0)}return this._scale=1,this._performCursorZoom=!1,d||this._lastPosition.distanceToSquared(this.object.position)>ee||8*(1-this._lastQuaternion.dot(this.object.quaternion))>ee||this._lastTargetPosition.distanceToSquared(this.target)>ee?(this.dispatchEvent(le),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?F/60*this.autoRotateSpeed*e:F/60/60*this.autoRotateSpeed}_getZoomScale(e){const o=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,o){z.setFromMatrixColumn(o,0),z.multiplyScalar(-e),this._panOffset.add(z)}_panUp(e,o){this.screenSpacePanning===!0?z.setFromMatrixColumn(o,1):(z.setFromMatrixColumn(o,0),z.crossVectors(this.object.up,z)),z.multiplyScalar(e),this._panOffset.add(z)}_pan(e,o){const s=this.domElement;if(this.object.isPerspectiveCamera){const l=this.object.position;z.copy(l).sub(this.target);let d=z.length();d*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*d/s.clientHeight,this.object.matrix),this._panUp(2*o*d/s.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/s.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/s.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const s=this.domElement.getBoundingClientRect(),l=e-s.left,d=o-s.top,y=s.width,r=s.height;this._mouse.x=l/y*2-1,this._mouse.y=-(d/r)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let o=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-F*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),s=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._rotateStart.set(s,l)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),s=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._panStart.set(s,l)}}_handleTouchStartDolly(e){const o=this._getSecondPointerPosition(e),s=e.pageX-o.x,l=e.pageY-o.y,d=Math.sqrt(s*s+l*l);this._dollyStart.set(0,d)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const s=this._getSecondPointerPosition(e),l=.5*(e.pageX+s.x),d=.5*(e.pageY+s.y);this._rotateEnd.set(l,d)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(F*this._rotateDelta.x/o.clientHeight),this._rotateUp(F*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const o=this._getSecondPointerPosition(e),s=.5*(e.pageX+o.x),l=.5*(e.pageY+o.y);this._panEnd.set(s,l)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const o=this._getSecondPointerPosition(e),s=e.pageX-o.x,l=e.pageY-o.y,d=Math.sqrt(s*s+l*l);this._dollyEnd.set(0,d),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const y=(e.pageX+o.x)*.5,r=(e.pageY+o.y)*.5;this._updateZoomParameters(y,r)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==e.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(e){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==e.pointerId)return!0;return!1}_trackPointer(e){let o=this._pointerPositions[e.pointerId];o===void 0&&(o=new i.Vector2,this._pointerPositions[e.pointerId]=o),o.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){const o=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(e){const o=e.deltaMode,s={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(o){case 1:s.deltaY*=16;break;case 2:s.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(s.deltaY*=10),s}}function ye(a){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(a.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(a)&&(this._addPointer(a),a.pointerType==="touch"?this._onTouchStart(a):this._onMouseDown(a)))}function ve(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function be(a){switch(this._removePointer(a),this._pointers.length){case 0:this.domElement.releasePointerCapture(a.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(he),this.state=D.NONE;break;case 1:const e=this._pointers[0],o=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:o.x,pageY:o.y});break}}function Ee(a){let e;switch(a.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case i.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(a),this.state=D.DOLLY;break;case i.MOUSE.ROTATE:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=D.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=D.ROTATE}break;case i.MOUSE.PAN:if(a.ctrlKey||a.metaKey||a.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(a),this.state=D.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(a),this.state=D.PAN}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(oe)}function we(a){switch(this.state){case D.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(a);break;case D.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(a);break;case D.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(a);break}}function Pe(a){this.enabled===!1||this.enableZoom===!1||this.state!==D.NONE||(a.preventDefault(),this.dispatchEvent(oe),this._handleMouseWheel(this._customWheelEvent(a)),this.dispatchEvent(he))}function Me(a){this.enabled!==!1&&this._handleKeyDown(a)}function De(a){switch(this._trackPointer(a),this._pointers.length){case 1:switch(this.touches.ONE){case i.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(a),this.state=D.TOUCH_ROTATE;break;case i.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(a),this.state=D.TOUCH_PAN;break;default:this.state=D.NONE}break;case 2:switch(this.touches.TWO){case i.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(a),this.state=D.TOUCH_DOLLY_PAN;break;case i.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(a),this.state=D.TOUCH_DOLLY_ROTATE;break;default:this.state=D.NONE}break;default:this.state=D.NONE}this.state!==D.NONE&&this.dispatchEvent(oe)}function xe(a){switch(this._trackPointer(a),this.state){case D.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(a),this.update();break;case D.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(a),this.update();break;case D.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(a),this.update();break;case D.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(a),this.update();break;default:this.state=D.NONE}}function Se(a){this.enabled!==!1&&a.preventDefault()}function ke(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ve(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Te(a){let e=null,o=null,s=null,l=null,d=null,y=null,r=null,w=null;const P=t.ref([]),k=t.ref(new i.Vector3),L=t.ref(new i.Vector3),V=()=>{if(!a.value)return;e=new i.Scene,e.background=new i.Color(15790320);const _=a.value;o=new i.PerspectiveCamera(75,_.clientWidth/_.clientHeight,.1,1e4),o.position.set(8,-8,6),o.up.set(0,0,1),o.lookAt(0,0,0),s=new i.WebGLRenderer({antialias:!0,alpha:!0}),s.setSize(_.clientWidth,_.clientHeight),s.localClippingEnabled=!0,s.shadowMap.enabled=!0,s.shadowMap.type=i.PCFSoftShadowMap,s.toneMapping=i.ACESFilmicToneMapping,s.toneMappingExposure=1,s.outputColorSpace=i.SRGBColorSpace,_.appendChild(s.domElement),l=new ge(o,s.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,d=new i.Xe(o,s,{container:_,type:"cube",placement:"top-right",offset:{top:10,right:10},background:{color:"#D1D1D1",opacity:1},front:{label:"Top"},bottom:{label:"Front"},left:{label:"Left"},right:{label:"Right"},top:{label:"Back"},back:{label:"Bottom"}}),d.attachControls(l),v(),n()},h=(_,c)=>{r&&(e.remove(r),r.dispose()),w&&(e.remove(w),w.geometry.dispose(),w.material.dispose());const M=Math.min(Math.max(Math.floor(_/20),30),40);r=new i.GridHelper(_,M,13421772,14540253),r.rotateX(Math.PI/2),r.position.copy(c),e.add(r);const U=new i.PlaneGeometry(_,_),p=new i.ShadowMaterial({opacity:.3,color:0});w=new i.Mesh(U,p),w.position.copy(c),w.position.z-=.01,w.receiveShadow=!0,e.add(w)},x=()=>{if(P.value.length===0)return;const _=new i.Box3;P.value.forEach(u=>{_.expandByObject(u)});const c=_.getSize(new i.Vector3),M=_.getCenter(new i.Vector3),U=Math.max(c.x,c.y,c.z),p=Math.max(U*8,50),g=new i.Vector3(M.x,M.y,_.min.z);h(p,g)},v=()=>{const _=new i.AmbientLight(4210752,.6);e.add(_);const c=new i.DirectionalLight(16777215,2);c.position.set(10,10,8),c.castShadow=!0,c.shadow.mapSize.width=4096,c.shadow.mapSize.height=4096,c.shadow.camera.near=.5,c.shadow.camera.far=50,c.shadow.camera.left=-50,c.shadow.camera.right=50,c.shadow.camera.top=50,c.shadow.camera.bottom=-50,e.add(c);const M=new i.DirectionalLight(16777215,.8);M.position.set(-8,-8,6),e.add(M);const U=new i.DirectionalLight(16777215,.6);U.position.set(0,-15,2),e.add(U);const p=new i.HemisphereLight(16777215,4473924,.8);e.add(p);const g=new i.PointLight(16777215,1,50);g.position.set(15,15,15),e.add(g);const u=new i.PointLight(16777215,.5,50);u.position.set(-15,-15,15),e.add(u)},n=()=>{y=requestAnimationFrame(n),l&&l.update(),s&&e&&o&&s.render(e,o),d&&d.render()},f=_=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(M=>{_[M]&&_[M].dispose&&_[M].dispose()}),_.dispose&&_.dispose()},E=_=>{_==null||_.traverse(c=>{c.geometry&&c.geometry.dispose(),c.material&&(Array.isArray(c.material)?c.material.forEach(M=>{f(M)}):f(c.material))})};return{currentModels:P,initialCameraPosition:k,initialTargetPosition:L,initThreeJS:V,handleResize:()=>{if(!a.value||!o||!s||!d)return;const _=a.value,c=_.clientWidth,M=_.clientHeight;o.aspect=c/M,o.updateProjectionMatrix(),s.setSize(c,M),d.update()},fitCameraToAllModels:()=>{if(!o||!l||P.value.length===0)return;const _=new i.Box3;P.value.forEach(u=>{_.expandByObject(u)});const c=_.getSize(new i.Vector3),M=_.getCenter(new i.Vector3),p=Math.max(c.x,c.y,c.z)*.8,g=new i.Vector3(M.x+p,M.y-p,M.z+p);o.position.copy(g),o.lookAt(M),l.target.copy(M),l.update(),k.value.copy(g),L.value.copy(M),x()},getThreeJSObjects:()=>({scene:e,camera:o,renderer:s,controls:l,gizmo:d}),clearAllModels:()=>{if(!e)return;P.value.forEach(c=>{e.remove(c),E(c)});const _=[];e.children.forEach(c=>{!c.isLight&&!c.isCamera&&c.type!=="GridHelper"&&c!==w&&_.push(c)}),_.forEach(c=>{e.remove(c),E(c)}),P.value=[],x()},cleanup:()=>{y&&cancelAnimationFrame(y),r&&r.dispose(),w&&(w.geometry.dispose(),w.material.dispose()),s&&s.dispose(),l&&l.dispose(),d&&d.dispose()},updateGridForModels:x}}function Ce(a,e){const o=t.ref(!1);let s=null,l=12700,d=new i.Vector3,y=new i.Vector3,r=new i.Vector3,w=0,P=null;const k=n=>n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2,L=n=>{const f=new i.Vector3,E=w*1.2,C=new i.Vector3(r.x+E,r.y,r.z),j=new i.Vector3(r.x,r.y+E,r.z),R=new i.Vector3(r.x,r.y-E,r.z);if(n<=.567){const I=n/.567*Math.PI*2;f.x=r.x+Math.cos(I)*E,f.z=r.z+Math.sin(I)*E,f.y=r.y}else if(n<=.724){const N=(n-.567)/.157,I=k(N);f.lerpVectors(C,j,I)}else if(n<=.881){const N=(n-.724)/.157,_=k(N)*Math.PI;f.x=r.x+Math.sin(_)*E,f.y=r.y+Math.cos(_)*E,f.z=r.z}else{const N=(n-.881)/.119,I=k(N);f.lerpVectors(R,d,I)}return f},V=()=>{const{camera:n,controls:f}=a();if(!n||!f)return;s||(s=Date.now());const E=Date.now()-s,C=Math.min(E/l,1);if(C>=1){x();return}const j=L(C);n.position.copy(j),n.lookAt(r),f.target.copy(r),P=requestAnimationFrame(V)},h=()=>{if(e.value.length===0)return;const{camera:n,controls:f}=a();if(!n||!f)return;d.copy(n.position),y.copy(f.target);const E=new i.Box3;e.value.forEach(c=>{E.expandByObject(c)});const C=E.getSize(new i.Vector3);r=E.getCenter(new i.Vector3),w=Math.max(C.x,C.y,C.z)*1.2;const j=new i.Vector3(r.x+w*1.2,r.y,r.z);f.enabled=!1;const R=n.position.clone(),N=1e3,I=Date.now(),_=()=>{const c=Date.now()-I,M=Math.min(c/N,1),U=k(M);n.position.lerpVectors(R,j,U),n.lookAt(r),f.target.copy(r),M<1?requestAnimationFrame(_):(o.value=!0,s=null,V())};_()},x=()=>{o.value=!1,s=null,P&&(cancelAnimationFrame(P),P=null);const{controls:n}=a();n&&(n.enabled=!0,n.target.copy(y))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,s=null,P&&(cancelAnimationFrame(P),P=null);const{camera:n,controls:f}=a();if(!n||!f)return;f.enabled=!0;const E=n.position.clone(),C=f.target.clone(),j=1500,R=Date.now(),N=()=>{const I=Date.now()-R,_=Math.min(I/j,1),c=k(_);n.position.lerpVectors(E,d,c),f.target.lerpVectors(C,y,c),_<1&&requestAnimationFrame(N)};N()}else h()},startAnimation:h,stopAnimation:x}}function Ae(a,e){const o=t.ref(!1),s=t.ref("none");let l=[],d=[],y=new i.Box3,r=new i.Vector3;const w=()=>{l=[new i.Plane(new i.Vector3(1,0,0),0),new i.Plane(new i.Vector3(0,1,0),0),new i.Plane(new i.Vector3(0,0,1),0)]},P=()=>{y.makeEmpty(),e.value.forEach(v=>{y.expandByObject(v)}),r=y.getCenter(new i.Vector3)},k=v=>{const n=y.getSize(new i.Vector3);let f,E,C;v==="x"?(f=new i.PlaneGeometry(n.z*1.2,n.y*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(0,Math.PI/2,0)):v==="y"?(f=new i.PlaneGeometry(n.x*1.2,n.z*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(Math.PI/2,0,0)):v==="z"&&(f=new i.PlaneGeometry(n.x*1.2,n.y*1.2),E=new i.Vector3(r.x,r.y,r.z),C=new i.Euler(0,0,0));const j=new i.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:i.DoubleSide,depthWrite:!1}),R=new i.Mesh(f,j);return R.position.copy(E),R.rotation.copy(C),R},L=()=>{if(V(),h(),s.value==="none")return;P();let v=null;if(s.value==="x"?(l[0].constant=-r.x,v=l[0]):s.value==="y"?(l[1].constant=-r.y,v=l[1]):s.value==="z"&&(l[2].constant=-r.z,v=l[2]),v){e.value.forEach(f=>{f.traverse(E=>{E.isMesh&&E.material&&(Array.isArray(E.material)?E.material.forEach(C=>{C.clippingPlanes=[v]}):E.material.clippingPlanes=[v])})});const{scene:n}=a();if(n){const f=k(s.value);n.add(f),d.push(f)}}},V=()=>{e.value.forEach(v=>{v.traverse(n=>{n.isMesh&&n.material&&(Array.isArray(n.material)?n.material.forEach(f=>{f.clippingPlanes=[]}):n.material.clippingPlanes=[])})})},h=()=>{const{scene:v}=a();v&&d.forEach(n=>{v.remove(n),n.geometry.dispose(),n.material.dispose()}),d=[]};return{isClipping:o,activeClippingAxis:s,toggleClipping:()=>{o.value=!o.value,o.value?(w(),e.value.length>0&&P()):(s.value="none",V(),h())},updateClippingPlanes:L,clearClippingPlanes:V,clearClippingMeshes:h}}const Ne={class:"panel-content"},ze=t.defineComponent({__name:"animationTable",props:{animationData:Object,urdf:Object},setup(a){const e=a;t.ref([]);const o=t.ref([]),s=t.ref([]);return t.watch(()=>[e==null?void 0:e.animationData,e==null?void 0:e.urdf],()=>{var d;let l=((d=ce.cloneDeep(e==null?void 0:e.animationData))==null?void 0:d.动画输出)??[];console.log(232,l,e==null?void 0:e.animationData,e==null?void 0:e.urdf),l&&l.length>0&&(e!=null&&e.urdf)},{deep:!0,immediate:!0}),(l,d)=>(t.openBlock(),t.createElementBlock("div",Ne,[t.createVNode(fe.ssTable,{columns:o.value,tableData:s.value,isShowPagination:!1},null,8,["columns","tableData"])]))}}),Oe=K._export_sfc(ze,[["__scopeId","data-v-7aa41950"]]),Re={class:"panel-content"},Le="id",je={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:a=>["breadth","firstLevel"].includes(a)}},emits:["nodeClick"],setup(a,{emit:e}){const o=a,s=e,l=t.ref([]),d={children:"children",label:"label"},y=h=>{s("nodeClick",h)},r=(h,x=0)=>{const v=[];return Array.isArray(h)&&(h==null?void 0:h.length)>0&&h.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const f={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:x+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:r(n==null?void 0:n.children,x+1),path:n==null?void 0:n.name};v.push(f)}}),v},w=h=>h?[{name:h==null?void 0:h.name,label:h==null?void 0:h.name,show:!0,level:1,isPenultimate:!1,type:h==null?void 0:h.type,id:h==null?void 0:h.id,limit:(h==null?void 0:h.limit)??"",children:r(h==null?void 0:h.children,1),path:h==null?void 0:h.name}]:[],P=(h,x)=>{const v=[],n=[...h];for(;n.length>0&&v.length<x;){const f=n.shift();f.children&&f.children.length>0&&(v.push(f.id),n.push(...f.children))}return v},k=(h,x)=>{const v=[];return h.forEach(n=>{if(n.children&&n.children.length>0){v.push(n.id);const f=n.children.filter(E=>E.children&&E.children.length>0).slice(0,x).map(E=>E.id);v.push(...f)}}),v.slice(0,x+1)},L=t.computed(()=>!l.value||l.value.length===0?[]:o.expandStrategy==="firstLevel"?k(l.value,o.maxExpandCount):P(l.value,o.maxExpandCount)),V=t.computed(()=>o!=null&&o.model?w(o.model):[]);return t.watch(V,h=>{l.value=JSON.parse(JSON.stringify(h))},{immediate:!0}),(h,x)=>{const v=t.resolveComponent("el-tree");return t.openBlock(),t.createElementBlock("div",Re,[t.createVNode(v,{data:l.value,props:d,"default-expanded-keys":L.value,"node-key":Le,onNodeClick:y},null,8,["data","default-expanded-keys"])])}}},Ie=K._export_sfc(je,[["__scopeId","data-v-290ff4e1"]]),Ue={class:"panel-content"},Fe={key:0,class:"joints-list"},Be={class:"joint-info-row"},Ye={class:"joint-left"},He={class:"joint-name"},Ze={class:"joint-range"},Ke={class:"joint-type"},$e={key:0,class:"joint-control-row"},Xe={class:"slider-container"},Ge=["min","max","value","onInput","disabled"],Je={class:"value-display"},qe={class:"joint-value"},We={class:"unit"},Qe={key:1,class:"empty-state"},et=1e3,te=60,tt={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(a,{expose:e}){const o=a;t.ref(!0);const s=t.ref([]),l=t.ref(null),d=t.ref(!1),y=t.ref(!1),r=t.ref(0),w=t.ref(0),P=t.ref(null),k=t.ref(1),L=()=>et/te/k.value;let V=[];t.watch(()=>o.animationData,p=>{var u;let g=((u=ce.cloneDeep(p))==null?void 0:u.动画输出)??[];g&&g.length>0&&(V=g,C())},{deep:!0});const h=(p,g=!1)=>p==="revolute"?g?Math.PI:-Math.PI:p==="prismatic"?g?1:-1:0,x=p=>{if(!p||!p.joints)return console.warn("URDF模型没有关节信息"),[];const g=[];return Object.keys(p.joints).forEach(u=>{const b=p.joints[u];if(b._jointType==="fixed")return;const O=b.limit?{lower:b.limit.lower??h(b._jointType,!1),upper:b.limit.upper??h(b._jointType,!0)}:{lower:h(b._jointType,!1),upper:h(b._jointType,!0)};g.push({name:u,type:b._jointType||"unknown",limit:O,currentValue:b.angle||0,urdfJoint:b})}),g.sort((u,b)=>u.name.localeCompare(b.name))},v=(p,g)=>{const u=s.value.find(O=>O.name===p);if(!u)return;const b=parseFloat(g);if(u.limit){const O=Math.max(u.limit.lower,Math.min(u.limit.upper,b));u.currentValue=O}else u.currentValue=b;o.model&&o.model.setJointValue?o.model.setJointValue(p,u.currentValue):u.urdfJoint&&u.urdfJoint.setJointValue(u.currentValue)},n=p=>{p&&Object.keys(p).forEach(g=>{const u=p[g],b=s.value.find(O=>O.name===g);b&&(b.currentValue=u,o.model&&o.model.setJointValue?o.model.setJointValue(g,u):b.urdfJoint&&b.urdfJoint.setJointValue(u))})},f=(p,g,u)=>p+(g-p)*u,E=(p,g,u)=>{if(!p||!g)return p||g;const b={};return Object.keys(p).forEach(O=>{const H=p[O],Y=g[O];b[O]=f(H,Y||H,u)}),b},C=()=>{if(V.length===0){console.warn("没有动画数据");return}d.value=!0,y.value=!1;const p=()=>{if(!d.value||y.value)return;const g=w.value/te,u=V[r.value],b=V[r.value+1];if(b){const O=E(u,b,g);n(O)}else n(u);if(w.value++,w.value>=te&&(w.value=0,r.value++,r.value>=V.length-1)){R();return}P.value=setTimeout(p,L())};p()},j=()=>{y.value=!0,P.value&&(clearTimeout(P.value),P.value=null)},R=()=>{d.value=!1,y.value=!1,k.value=1,P.value&&(clearTimeout(P.value),P.value=null)};e({startAnimation:C,pauseAnimation:j,stopAnimation:R,resetAll:()=>{R(),r.value=0,w.value=0,s.value.forEach(p=>{(p.type==="revolute"||p.type==="prismatic")&&v(p.name,0)})},fastForward:()=>{k.value<4&&(k.value=Math.min(4,k.value*2))},fastBackward:()=>{k.value>.25&&(k.value=Math.max(.25,k.value/2))}}),t.watch(()=>o.model,p=>{p?s.value=x(p):s.value=[]},{immediate:!0});const c=()=>{!o.model||d.value&&!y.value||s.value.forEach(p=>{p.urdfJoint&&p.urdfJoint.angle!==void 0&&(p.currentValue=p.urdfJoint.angle)})},M=()=>{const p=()=>{c(),l.value=requestAnimationFrame(p)};p()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return t.onMounted(()=>{M()}),t.onUnmounted(()=>{U(),R()}),(p,g)=>(t.openBlock(),t.createElementBlock("div",Ue,[s.value.length>0?(t.openBlock(),t.createElementBlock("div",Fe,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,u=>{var b,O,H,Y;return t.openBlock(),t.createElementBlock("div",{key:u.name,class:"joint-item"},[t.createElementVNode("div",Be,[t.createElementVNode("div",Ye,[t.createElementVNode("span",He,t.toDisplayString(u.name),1),t.createElementVNode("span",Ze," ["+t.toDisplayString(((b=u.limit)==null?void 0:b.lower.toFixed(2))??(u.type==="revolute"?"-3.14":"-1.00"))+", "+t.toDisplayString(((O=u.limit)==null?void 0:O.upper.toFixed(2))??(u.type==="revolute"?"3.14":"1.00"))+"] ",1)]),t.createElementVNode("span",Ke,t.toDisplayString(u.type),1)]),u.type==="revolute"||u.type==="prismatic"?(t.openBlock(),t.createElementBlock("div",$e,[t.createElementVNode("div",Xe,[t.createElementVNode("input",{type:"range",min:((H=u.limit)==null?void 0:H.lower)??(u.type==="revolute"?-Math.PI:-1),max:((Y=u.limit)==null?void 0:Y.upper)??(u.type==="revolute"?Math.PI:1),step:.01,value:u.currentValue,onInput:Q=>v(u.name,Q.target.value),class:"joint-slider",disabled:d.value&&!y.value},null,40,Ge)]),t.createElementVNode("div",Je,[t.createElementVNode("span",qe,t.toDisplayString(u.currentValue.toFixed(3)),1),t.createElementVNode("span",We,t.toDisplayString(u.type==="revolute"?"rad":"m"),1)])])):t.createCommentVNode("",!0)])}),128))])):(t.openBlock(),t.createElementBlock("div",Qe,g[0]||(g[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},ot=K._export_sfc(tt,[["__scopeId","data-v-603b87bc"]]),it=["xlink:href"],nt=t.defineComponent({__name:"svgIcon",props:{backgroundColor:{default:"#f0f0f0"},prefix:{default:"icon"},name:{},size:{default:16},spin:{type:Boolean,default:!1},active:{type:Boolean,default:!1}},setup(a){const e=a,o=t.computed(()=>({backgroundColor:e.backgroundColor})),s=t.computed(()=>`#${e.prefix}-${e.name}`),l=t.computed(()=>{const{size:d}=e;let y=`${d}`;return y=`${y.replace("px","")}px`,{width:y,height:y}});return(d,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["container",{active:d.active}]),style:t.normalizeStyle(o.value)},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["svg-icon",[d.$attrs.class,d.spin&&"svg-icon-spin"]]),style:t.normalizeStyle(l.value),"aria-hidden":"true"},[t.createElementVNode("use",{"xlink:href":s.value},null,8,it)],6))],6))}}),T=K._export_sfc(nt,[["__scopeId","data-v-3150a90b"]]),st={class:"obj-viewer-container"},at={class:"buttonGroup-top"},lt={class:"buttonGroup-topLeft"},rt={class:"buttonGroup-left"},ct={class:"buttonGroup-right"},ht={class:"buttonGroup-bottom"},ut={class:"left-panel"},dt={class:"panel-header"},pt={key:1,class:"clipping-content"},mt={class:"radio-group"},ft={class:"radio-label"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"radio-label"},vt={class:"right-panel"},bt={class:"panel-header"},Et={key:0,class:"loading-overlay"},wt={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(a,{expose:e,emit:o}){const s=o,l=a;let d=null,y=!1;const r=t.ref(null),w=t.ref(!1),P=t.ref("");t.ref(!1);const k=t.ref(!1),L=t.ref(!1),V=t.ref(""),h=t.ref(!1),x=t.ref(""),v=t.ref(),{currentModels:n,initialCameraPosition:f,initialTargetPosition:E,initThreeJS:C,handleResize:j,fitCameraToAllModels:R,getThreeJSObjects:N,clearAllModels:I,cleanup:_}=Te(r),{isAnimating:c,toggleAnimation:M,stopAnimation:U}=Ce(N,n),{isClipping:p,activeClippingAxis:g,toggleClipping:u,updateClippingPlanes:b}=Ae(N,n),{addModelsFromUrls:O,loadModelByDefaultPath:H,urdfModel:Y}=i.useModelLoader(N,n,w,P,I),Q=()=>{if(k.value||n.value.length===0)return;k.value=!0,c.value&&U();const{camera:A,controls:m}=N();if(!A||!m)return;m.enabled=!0;const B=Z=>Z<.5?4*Z*Z*Z:1-Math.pow(-2*Z+2,3)/2,X=A.position.clone(),G=m.target.clone(),J=1500,q=Date.now(),S=()=>{const Z=Date.now()-q,se=Math.min(Z/J,1),ae=B(se);A.position.lerpVectors(X,f.value,ae),m.target.lerpVectors(G,E.value,ae),se<1?requestAnimationFrame(S):k.value=!1};S()},ue=async()=>y?Promise.resolve():new Promise(A=>{const m=()=>{y?A():requestAnimationFrame(m)};m()}),ie=async(A,m)=>{try{await ue(),c.value&&U(),p.value&&u();const B=await m(A);return R(),B}catch(B){throw console.error("加载模型失败:",B),B}},de=async A=>ie(A,O),pe=async A=>ie(A,H),$=A=>{L.value=!0,V.value=A,A==="剖面视图"&&!p.value&&u()},ne=A=>{h.value=!0,x.value=A},me=()=>{s("getAnimationData"),t.nextTick(()=>{var A;(A=v.value)==null||A.startAnimation()})};return t.onMounted(async()=>{await t.nextTick();try{C(),d=N().scene,y=!0,window.addEventListener("resize",j)}catch(A){console.error("Three.js初始化失败:",A)}}),t.onBeforeUnmount(()=>{y=!1,V.value="",x.value="",window.removeEventListener("resize",j),c.value&&U(),_()}),e({addModelsFromUrls:de,loadModelByDefaultPath:pe}),(A,m)=>{var X,G,J,q;const B=t.resolveComponent("el-scrollbar");return t.openBlock(),t.createElementBlock("div",st,[t.createElementVNode("div",{ref_key:"threejsContainer",ref:r,class:"threejs-container"},null,512),t.createElementVNode("div",at,[t.createVNode(T,{name:"guanjianjiexi",size:"34"}),t.createVNode(T,{name:"guanjiekongzhi",size:"34"}),t.createVNode(T,{name:"gongyishengcheng",size:"34"}),t.createVNode(T,{name:"buchangshezhi",size:"34"}),t.createVNode(T,{name:"shuchujiagongchengxu",size:"34"})]),t.createElementVNode("div",lt,[t.createVNode(T,{name:"viewReset",size:"24",onClick:Q,title:"重置"}),t.createVNode(T,{name:"fangda",size:"24",title:"放大"}),t.createVNode(T,{name:"suoxiao",size:"24",title:"缩小"}),t.createVNode(T,{name:"lookAround",size:"24",onClick:t.unref(M),title:t.unref(c)?"停止动画":"动画视图"},null,8,["onClick","title"])]),t.createElementVNode("div",rt,[t.createVNode(T,{name:"jiegoushu",size:"24",onClick:m[0]||(m[0]=S=>$("场景树")),active:L.value&&V.value==="场景树",title:"场景树"},null,8,["active"]),t.createVNode(T,{name:"clipping",size:"24",onClick:m[1]||(m[1]=S=>$("剖面视图")),active:L.value&&V.value==="剖面视图",title:"剖面视图"},null,8,["active"]),t.createVNode(T,{name:"donghuafangzhen",size:"24",onClick:m[2]||(m[2]=S=>$("场景树3"))}),t.createVNode(T,{name:"donghuafangzhen",size:"24",onClick:m[3]||(m[3]=S=>$("场景4"))})]),t.createElementVNode("div",ct,[t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"guanjiekongzhi",size:"24",onClick:m[4]||(m[4]=S=>ne("关节控制")),active:h.value&&x.value==="关节控制",title:"关节控制"},null,8,["active"]),t.createVNode(T,{name:"DongHuaFangZhen",size:"24",title:"动画仿真",onClick:m[5]||(m[5]=S=>ne("动画仿真")),active:h.value&&x.value==="动画仿真"},null,8,["active"]),t.createVNode(T,{name:"donghuafangzhen",size:"24"}),t.createVNode(T,{name:"donghuafangzhen",size:"24"})]),t.createElementVNode("div",ht,[t.createVNode(T,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:(X=v.value)==null?void 0:X.fastBackward},null,8,["onClick"]),t.createVNode(T,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:me}),t.createVNode(T,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:(G=v.value)==null?void 0:G.fastForward},null,8,["onClick"]),t.createVNode(T,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:(J=v.value)==null?void 0:J.pauseAnimation},null,8,["onClick"]),t.createVNode(T,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(q=v.value)==null?void 0:q.resetAll},null,8,["onClick"])]),t.withDirectives(t.createElementVNode("div",ut,[t.createElementVNode("div",dt,[t.createElementVNode("span",null,t.toDisplayString(V.value),1),t.createElementVNode("span",{class:"close",onClick:m[6]||(m[6]=S=>L.value=!1)}," X ")]),t.createVNode(B,{"max-height":"650px"},{default:t.withCtx(()=>[V.value==="场景树"?(t.openBlock(),t.createBlock(Ie,{key:0,model:t.unref(Y)},null,8,["model"])):t.createCommentVNode("",!0),V.value==="剖面视图"?(t.openBlock(),t.createElementBlock("div",pt,[t.createElementVNode("div",mt,[t.createElementVNode("label",ft,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":m[7]||(m[7]=S=>t.isRef(g)?g.value=S:null),onChange:m[8]||(m[8]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[16]||(m[16]=t.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),t.createElementVNode("label",_t,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":m[9]||(m[9]=S=>t.isRef(g)?g.value=S:null),onChange:m[10]||(m[10]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[17]||(m[17]=t.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),t.createElementVNode("label",gt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":m[11]||(m[11]=S=>t.isRef(g)?g.value=S:null),onChange:m[12]||(m[12]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[18]||(m[18]=t.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),t.createElementVNode("label",yt,[t.withDirectives(t.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":m[13]||(m[13]=S=>t.isRef(g)?g.value=S:null),onChange:m[14]||(m[14]=(...S)=>t.unref(b)&&t.unref(b)(...S))},null,544),[[t.vModelRadio,t.unref(g)]]),m[19]||(m[19]=t.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):t.createCommentVNode("",!0)]),_:1})],512),[[t.vShow,L.value]]),t.withDirectives(t.createElementVNode("div",vt,[t.createElementVNode("div",bt,[t.createElementVNode("span",null,t.toDisplayString(x.value),1),t.createElementVNode("span",{class:"close",onClick:m[15]||(m[15]=S=>h.value=!1)}," X ")]),t.createVNode(B,{"max-height":"650px"},{default:t.withCtx(()=>[t.withDirectives(t.createVNode(ot,{ref_key:"jointRef",ref:v,model:t.unref(Y),scene:t.unref(d),animationData:l==null?void 0:l.animationData},null,8,["model","scene","animationData"]),[[t.vShow,x.value==="关节控制"]]),t.withDirectives(t.createVNode(Oe,{animationData:l==null?void 0:l.animationData,urdf:t.unref(Y)},null,8,["animationData","urdf"]),[[t.vShow,x.value==="动画仿真"]])]),_:1})],512),[[t.vShow,h.value]]),w.value?(t.openBlock(),t.createElementBlock("div",Et,[m[20]||(m[20]=t.createElementVNode("div",{class:"loading-spinner"},null,-1)),t.createElementVNode("p",null,t.toDisplayString(P.value),1)])):t.createCommentVNode("",!0)])}}},Pt=K._export_sfc(wt,[["__scopeId","data-v-3cea1cdc"]]);exports.default=Pt;