ss-component-new 1.1.552 → 1.1.554

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.
@@ -15,7 +15,7 @@ const e = s(() => import("./index-BXuzdNd8.js"));
15
15
  e.install = (o) => {
16
16
  o.component("ssMenu", e);
17
17
  };
18
- const m = s(() => import("./index-CNKck1IN.js"));
18
+ const m = s(() => import("./index-j0138X4A.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 l = s(() => import("./threeModel-Cyl4KzRm.js"));
34
+ const l = s(() => import("./threeModel-BJjMjU46.js"));
35
35
  l.install = (o) => {
36
36
  o.component("ssThree", l);
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-BImKcDoO.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-B3OgUMxZ.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-DGtegmw2.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-w-MJfuW8.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-D6OLOdzT.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CUmF1cOi.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-BvsQ93Dk.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-CYj1gF5q.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-NzNwF1Bc.cjs")),children:[{path:"平台管理/菜单管理",name:"Menu",component:async()=>Promise.resolve().then(()=>require("./index-B3OgUMxZ.cjs"))},{path:"平台管理/主菜单管理",name:"MainMenu",component:async()=>Promise.resolve().then(()=>require("./index-DGtegmw2.cjs"))},{path:"系统管理/个人中心",name:"PersonalCenter",component:async()=>Promise.resolve().then(()=>require("./index-w-MJfuW8.cjs"))},{path:"系统管理/职位管理",name:"Post",component:async()=>Promise.resolve().then(()=>require("./index-D6OLOdzT.cjs"))},{path:"系统管理/用户管理",name:"User",component:async()=>Promise.resolve().then(()=>require("./index-CUmF1cOi.cjs"))},{path:"系统管理/角色管理",name:"Role",component:async()=>Promise.resolve().then(()=>require("./index-BvsQ93Dk.cjs"))},{path:"系统管理/部门管理",name:"Dept",component:async()=>Promise.resolve().then(()=>require("./index-CYj1gF5q.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-C2JHM_8A.js"),
11
+ component: async () => import("./index-B5DP9GHv.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'),
@@ -760,7 +760,8 @@ function ze(o, t) {
760
760
  const Re = { class: "panel-content" }, Oe = {
761
761
  __name: "animationTable",
762
762
  props: {
763
- animationData: Object
763
+ animationData: Object,
764
+ model: Object
764
765
  },
765
766
  setup(o) {
766
767
  const t = o;
@@ -768,13 +769,13 @@ const Re = { class: "panel-content" }, Oe = {
768
769
  () => [t == null ? void 0 : t.animationData],
769
770
  () => {
770
771
  var s;
771
- let e = ((s = Ut(t == null ? void 0 : t.animationData)) == null ? void 0 : s.动画输出) ?? [];
772
+ let e = ((s = Ut(t == null ? void 0 : t.animationData)) == null ? void 0 : s.动画输出Content) ?? [];
772
773
  console.log(232, e, t == null ? void 0 : t.animationData), e && e.length > 0;
773
774
  },
774
775
  { deep: !0, immediate: !0 }
775
776
  ), (e, s) => (K(), B("div", Re));
776
777
  }
777
- }, Le = /* @__PURE__ */ st(Oe, [["__scopeId", "data-v-ffc4fbb1"]]), je = { class: "panel-content" }, Ie = "id", Fe = {
778
+ }, Le = /* @__PURE__ */ st(Oe, [["__scopeId", "data-v-4817fa21"]]), je = { class: "panel-content" }, Ie = "id", Fe = {
778
779
  __name: "urdfTree",
779
780
  props: {
780
781
  model: Object,
@@ -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_14112288_lang-DCn4bomb.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");require("./index-BpPyaNFa.cjs");const K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=require("./menu-B-wiVQl5.cjs"),le={type:"change"},oe={type:"start"},he={type:"end"},W=new i.Ray,re=new i.Plane,fe=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 _e 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=ye.bind(this),this._onPointerDown=ge.bind(this),this._onPointerUp=ve.bind(this),this._onContextMenu=xe.bind(this),this._onMouseWheel=we.bind(this),this._onKeyDown=Pe.bind(this),this._onTouchStart=Me.bind(this),this._onTouchMove=De.bind(this),this._onMouseDown=be.bind(this),this._onMouseMove=Ee.bind(this),this._interceptControlDown=Se.bind(this),this._interceptControlUp=ke.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 p=!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),p=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(),p=!!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(),p=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))<fe?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(),p=!0)}return this._scale=1,this._performCursorZoom=!1,p||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 p=z.length();p*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*p/n.clientHeight,this.object.matrix),this._panUp(2*o*p/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,p=o-n.top,y=n.width,r=n.height;this._mouse.x=l/y*2-1,this._mouse.y=-(p/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,p=Math.sqrt(n*n+l*l);this._dollyStart.set(0,p)}_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),p=.5*(e.pageY+n.y);this._rotateEnd.set(l,p)}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,p=Math.sqrt(n*n+l*l);this._dollyEnd.set(0,p),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 ge(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 ye(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function ve(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 be(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 Ee(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 we(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 Pe(a){this.enabled!==!1&&this._handleKeyDown(a)}function Me(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 De(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 xe(a){this.enabled!==!1&&a.preventDefault()}function Se(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function ke(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ve(a){let e=null,o=null,n=null,l=null,p=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 _e(o,n.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,p=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"}}),p.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(_,_),d=new i.ShadowMaterial({opacity:.3,color:0});w=new i.Mesh(U,d),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),d=Math.max(U*8,50),g=new i.Vector3(M.x,M.y,_.min.z);h(d,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 d=new i.HemisphereLight(16777215,4473924,.8);e.add(d);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),p&&p.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||!p)return;const _=a.value,c=_.clientWidth,M=_.clientHeight;o.aspect=c/M,o.updateProjectionMatrix(),n.setSize(c,M),p.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),d=Math.max(c.x,c.y,c.z)*.8,g=new i.Vector3(M.x+d,M.y-d,M.z+d);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:p}),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(),p&&p.dispose()},updateGridForModels:x}}function Te(a,e){const o=t.ref(!1);let n=null,l=12700,p=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,p,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;p.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,p,c),f.target.lerpVectors(C,y,c),_<1&&requestAnimationFrame(N)};N()}else h()},startAnimation:h,stopAnimation:x}}function Ce(a,e){const o=t.ref(!1),n=t.ref("none");let l=[],p=[],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),p.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&&p.forEach(s=>{v.remove(s),s.geometry.dispose(),s.material.dispose()}),p=[]};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 Ae={class:"panel-content"},Ne={__name:"animationTable",props:{animationData:Object},setup(a){const e=a;return t.ref(),t.ref(),t.ref(),t.watch(()=>[e==null?void 0:e.animationData],()=>{var n;let o=((n=ce.cloneDeep(e==null?void 0:e.animationData))==null?void 0:n.动画输出)??[];console.log(232,o,e==null?void 0:e.animationData),o&&o.length>0},{deep:!0,immediate:!0}),(o,n)=>(t.openBlock(),t.createElementBlock("div",Ae))}},ze=K._export_sfc(Ne,[["__scopeId","data-v-ffc4fbb1"]]),Oe={class:"panel-content"},Re="id",Le={__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([]),p={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",Oe,[t.createVNode(v,{data:l.value,props:p,"default-expanded-keys":L.value,"node-key":Re,onNodeClick:y},null,8,["data","default-expanded-keys"])])}}},je=K._export_sfc(Le,[["__scopeId","data-v-290ff4e1"]]),Ie={class:"panel-content"},Ue={key:0,class:"joints-list"},Fe={class:"joint-info-row"},Be={class:"joint-left"},Ye={class:"joint-name"},He={class:"joint-range"},Ze={class:"joint-type"},Ke={key:0,class:"joint-control-row"},$e={class:"slider-container"},Xe=["min","max","value","onInput","disabled"],Ge={class:"value-display"},qe={class:"joint-value"},Je={class:"unit"},We={key:1,class:"empty-state"},Qe=1e3,te=60,et={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(a,{expose:e}){const o=a;t.ref(!0);const n=t.ref([]),l=t.ref(null),p=t.ref(!1),y=t.ref(!1),r=t.ref(0),w=t.ref(0),P=t.ref(null),k=t.ref(1),L=()=>Qe/te/k.value;let V=[];t.watch(()=>o.animationData,d=>{var u;let g=((u=ce.cloneDeep(d))==null?void 0:u.动画输出)??[];g&&g.length>0&&(V=g,C())},{deep:!0});const h=(d,g=!1)=>d==="revolute"?g?Math.PI:-Math.PI:d==="prismatic"?g?1:-1:0,x=d=>{if(!d||!d.joints)return console.warn("URDF模型没有关节信息"),[];const g=[];return Object.keys(d.joints).forEach(u=>{const b=d.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=(d,g)=>{const u=n.value.find(O=>O.name===d);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(d,u.currentValue):u.urdfJoint&&u.urdfJoint.setJointValue(u.currentValue)},s=d=>{d&&Object.keys(d).forEach(g=>{const u=d[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=(d,g,u)=>d+(g-d)*u,E=(d,g,u)=>{if(!d||!g)return d||g;const b={};return Object.keys(d).forEach(O=>{const Y=d[O],H=g[O];b[O]=f(Y,H||Y,u)}),b},C=()=>{if(V.length===0){console.warn("没有动画数据");return}p.value=!0,y.value=!1;const d=()=>{if(!p.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(d,L())};d()},j=()=>{y.value=!0,P.value&&(clearTimeout(P.value),P.value=null)},R=()=>{p.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(d=>{(d.type==="revolute"||d.type==="prismatic")&&v(d.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,d=>{d?n.value=x(d):n.value=[]},{immediate:!0});const c=()=>{!o.model||p.value&&!y.value||n.value.forEach(d=>{d.urdfJoint&&d.urdfJoint.angle!==void 0&&(d.currentValue=d.urdfJoint.angle)})},M=()=>{const d=()=>{c(),l.value=requestAnimationFrame(d)};d()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return t.onMounted(()=>{M()}),t.onUnmounted(()=>{U(),R()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",Ie,[n.value.length>0?(t.openBlock(),t.createElementBlock("div",Ue,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,u=>{var b,O,Y,H;return t.openBlock(),t.createElementBlock("div",{key:u.name,class:"joint-item"},[t.createElementVNode("div",Fe,[t.createElementVNode("div",Be,[t.createElementVNode("span",Ye,t.toDisplayString(u.name),1),t.createElementVNode("span",He," ["+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",Ze,t.toDisplayString(u.type),1)]),u.type==="revolute"||u.type==="prismatic"?(t.openBlock(),t.createElementBlock("div",Ke,[t.createElementVNode("div",$e,[t.createElementVNode("input",{type:"range",min:((Y=u.limit)==null?void 0:Y.lower)??(u.type==="revolute"?-Math.PI:-1),max:((H=u.limit)==null?void 0:H.upper)??(u.type==="revolute"?Math.PI:1),step:.01,value:u.currentValue,onInput:Q=>v(u.name,Q.target.value),class:"joint-slider",disabled:p.value&&!y.value},null,40,Xe)]),t.createElementVNode("div",Ge,[t.createElementVNode("span",qe,t.toDisplayString(u.currentValue.toFixed(3)),1),t.createElementVNode("span",Je,t.toDisplayString(u.type==="revolute"?"rad":"m"),1)])])):t.createCommentVNode("",!0)])}),128))])):(t.openBlock(),t.createElementBlock("div",We,g[0]||(g[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},tt=K._export_sfc(et,[["__scopeId","data-v-603b87bc"]]),ot=["xlink:href"],it=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:p}=e;let y=`${p}`;return y=`${y.replace("px","")}px`,{width:y,height:y}});return(p,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["container",{active:p.active}]),style:t.normalizeStyle(o.value)},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["svg-icon",[p.$attrs.class,p.spin&&"svg-icon-spin"]]),style:t.normalizeStyle(l.value),"aria-hidden":"true"},[t.createElementVNode("use",{"xlink:href":n.value},null,8,ot)],6))],6))}}),T=K._export_sfc(it,[["__scopeId","data-v-3150a90b"]]),st={class:"obj-viewer-container"},nt={class:"buttonGroup-top"},at={class:"buttonGroup-topLeft"},lt={class:"buttonGroup-left"},rt={class:"buttonGroup-right"},ct={class:"buttonGroup-bottom"},ht={class:"left-panel"},ut={class:"panel-header"},dt={key:1,class:"clipping-content"},pt={class:"radio-group"},mt={class:"radio-label"},ft={class:"radio-label"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"right-panel"},vt={class:"panel-header"},bt={key:0,class:"loading-overlay"},Et={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(a,{expose:e,emit:o}){const n=o,l=a;let p=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:_}=Ve(r),{isAnimating:c,toggleAnimation:M,stopAnimation:U}=Te(N,s),{isClipping:d,activeClippingAxis:g,toggleClipping:u,updateClippingPlanes:b}=Ce(N,s),{addModelsFromUrls:O,loadModelByDefaultPath:Y,urdfModel:H}=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(),q=1500,J=Date.now(),S=()=>{const Z=Date.now()-J,ne=Math.min(Z/q,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(),d.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,Y),$=A=>{L.value=!0,V.value=A,A==="剖面视图"&&!d.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(),p=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,q,J;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",nt,[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",at,[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",lt,[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",rt,[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",ct,[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:(q=v.value)==null?void 0:q.pauseAnimation},null,8,["onClick"]),t.createVNode(T,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(J=v.value)==null?void 0:J.resetAll},null,8,["onClick"])]),t.withDirectives(t.createElementVNode("div",ht,[t.createElementVNode("div",ut,[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(je,{key:0,model:t.unref(H)},null,8,["model"])):t.createCommentVNode("",!0),V.value==="剖面视图"?(t.openBlock(),t.createElementBlock("div",dt,[t.createElementVNode("div",pt,[t.createElementVNode("label",mt,[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",ft,[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",_t,[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",gt,[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",yt,[t.createElementVNode("div",vt,[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(tt,{ref_key:"jointRef",ref:v,model:t.unref(H),scene:t.unref(p),animationData:l==null?void 0:l.animationData},null,8,["model","scene","animationData"]),[[t.vShow,x.value==="关节控制"]]),t.withDirectives(t.createVNode(ze,{animationData:l==null?void 0:l.animationData},null,8,["animationData"]),[[t.vShow,x.value==="动画仿真"]])]),_:1})],512),[[t.vShow,h.value]]),w.value?(t.openBlock(),t.createElementBlock("div",bt,[m[20]||(m[20]=t.createElementVNode("div",{class:"loading-spinner"},null,-1)),t.createElementVNode("p",null,t.toDisplayString(P.value),1)])):t.createCommentVNode("",!0)])}}},wt=K._export_sfc(Et,[["__scopeId","data-v-14112288"]]);exports.default=wt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=require("./threeModel.vue_vue_type_style_index_0_scoped_14112288_lang-DCn4bomb.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CK9PyDrN.cjs");require("./index-BpPyaNFa.cjs");const K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=require("./menu-B-wiVQl5.cjs"),le={type:"change"},oe={type:"start"},he={type:"end"},W=new i.Ray,re=new i.Plane,fe=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 _e 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=ye.bind(this),this._onPointerDown=ge.bind(this),this._onPointerUp=ve.bind(this),this._onContextMenu=xe.bind(this),this._onMouseWheel=we.bind(this),this._onKeyDown=Pe.bind(this),this._onTouchStart=Me.bind(this),this._onTouchMove=De.bind(this),this._onMouseDown=be.bind(this),this._onMouseMove=Ee.bind(this),this._interceptControlDown=Se.bind(this),this._interceptControlUp=ke.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 p=!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),p=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(),p=!!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(),p=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))<fe?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(),p=!0)}return this._scale=1,this._performCursorZoom=!1,p||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 p=z.length();p*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*p/n.clientHeight,this.object.matrix),this._panUp(2*o*p/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,p=o-n.top,y=n.width,r=n.height;this._mouse.x=l/y*2-1,this._mouse.y=-(p/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,p=Math.sqrt(n*n+l*l);this._dollyStart.set(0,p)}_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),p=.5*(e.pageY+n.y);this._rotateEnd.set(l,p)}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,p=Math.sqrt(n*n+l*l);this._dollyEnd.set(0,p),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 ge(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 ye(a){this.enabled!==!1&&(a.pointerType==="touch"?this._onTouchMove(a):this._onMouseMove(a))}function ve(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 be(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 Ee(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 we(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 Pe(a){this.enabled!==!1&&this._handleKeyDown(a)}function Me(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 De(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 xe(a){this.enabled!==!1&&a.preventDefault()}function Se(a){a.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function ke(a){a.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Ve(a){let e=null,o=null,n=null,l=null,p=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 _e(o,n.domElement),l.enableDamping=!0,l.dampingFactor=.05,l.mouseButtons={LEFT:i.MOUSE.ROTATE,MIDDLE:i.MOUSE.PAN,RIGHT:null},l.panSpeed=.7,p=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"}}),p.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(_,_),d=new i.ShadowMaterial({opacity:.3,color:0});w=new i.Mesh(U,d),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),d=Math.max(U*8,50),g=new i.Vector3(M.x,M.y,_.min.z);h(d,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 d=new i.HemisphereLight(16777215,4473924,.8);e.add(d);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),p&&p.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||!p)return;const _=a.value,c=_.clientWidth,M=_.clientHeight;o.aspect=c/M,o.updateProjectionMatrix(),n.setSize(c,M),p.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),d=Math.max(c.x,c.y,c.z)*.8,g=new i.Vector3(M.x+d,M.y-d,M.z+d);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:p}),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(),p&&p.dispose()},updateGridForModels:x}}function Te(a,e){const o=t.ref(!1);let n=null,l=12700,p=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,p,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;p.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,p,c),f.target.lerpVectors(C,y,c),_<1&&requestAnimationFrame(N)};N()}else h()},startAnimation:h,stopAnimation:x}}function Ce(a,e){const o=t.ref(!1),n=t.ref("none");let l=[],p=[],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),p.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&&p.forEach(s=>{v.remove(s),s.geometry.dispose(),s.material.dispose()}),p=[]};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 Ae={class:"panel-content"},Ne={__name:"animationTable",props:{animationData:Object,model:Object},setup(a){const e=a;return t.ref(),t.ref(),t.ref(),t.watch(()=>[e==null?void 0:e.animationData],()=>{var n;let o=((n=ce.cloneDeep(e==null?void 0:e.animationData))==null?void 0:n.动画输出Content)??[];console.log(232,o,e==null?void 0:e.animationData),o&&o.length>0},{deep:!0,immediate:!0}),(o,n)=>(t.openBlock(),t.createElementBlock("div",Ae))}},ze=K._export_sfc(Ne,[["__scopeId","data-v-4817fa21"]]),Oe={class:"panel-content"},Re="id",Le={__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([]),p={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",Oe,[t.createVNode(v,{data:l.value,props:p,"default-expanded-keys":L.value,"node-key":Re,onNodeClick:y},null,8,["data","default-expanded-keys"])])}}},je=K._export_sfc(Le,[["__scopeId","data-v-290ff4e1"]]),Ie={class:"panel-content"},Ue={key:0,class:"joints-list"},Fe={class:"joint-info-row"},Be={class:"joint-left"},Ye={class:"joint-name"},He={class:"joint-range"},Ze={class:"joint-type"},Ke={key:0,class:"joint-control-row"},$e={class:"slider-container"},Xe=["min","max","value","onInput","disabled"],Ge={class:"value-display"},qe={class:"joint-value"},Je={class:"unit"},We={key:1,class:"empty-state"},Qe=1e3,te=60,et={__name:"jointPanel",props:{model:Object,scene:Object,animationData:Object},setup(a,{expose:e}){const o=a;t.ref(!0);const n=t.ref([]),l=t.ref(null),p=t.ref(!1),y=t.ref(!1),r=t.ref(0),w=t.ref(0),P=t.ref(null),k=t.ref(1),L=()=>Qe/te/k.value;let V=[];t.watch(()=>o.animationData,d=>{var u;let g=((u=ce.cloneDeep(d))==null?void 0:u.动画输出)??[];g&&g.length>0&&(V=g,C())},{deep:!0});const h=(d,g=!1)=>d==="revolute"?g?Math.PI:-Math.PI:d==="prismatic"?g?1:-1:0,x=d=>{if(!d||!d.joints)return console.warn("URDF模型没有关节信息"),[];const g=[];return Object.keys(d.joints).forEach(u=>{const b=d.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=(d,g)=>{const u=n.value.find(O=>O.name===d);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(d,u.currentValue):u.urdfJoint&&u.urdfJoint.setJointValue(u.currentValue)},s=d=>{d&&Object.keys(d).forEach(g=>{const u=d[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=(d,g,u)=>d+(g-d)*u,E=(d,g,u)=>{if(!d||!g)return d||g;const b={};return Object.keys(d).forEach(O=>{const Y=d[O],H=g[O];b[O]=f(Y,H||Y,u)}),b},C=()=>{if(V.length===0){console.warn("没有动画数据");return}p.value=!0,y.value=!1;const d=()=>{if(!p.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(d,L())};d()},j=()=>{y.value=!0,P.value&&(clearTimeout(P.value),P.value=null)},R=()=>{p.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(d=>{(d.type==="revolute"||d.type==="prismatic")&&v(d.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,d=>{d?n.value=x(d):n.value=[]},{immediate:!0});const c=()=>{!o.model||p.value&&!y.value||n.value.forEach(d=>{d.urdfJoint&&d.urdfJoint.angle!==void 0&&(d.currentValue=d.urdfJoint.angle)})},M=()=>{const d=()=>{c(),l.value=requestAnimationFrame(d)};d()},U=()=>{l.value&&(cancelAnimationFrame(l.value),l.value=null)};return t.onMounted(()=>{M()}),t.onUnmounted(()=>{U(),R()}),(d,g)=>(t.openBlock(),t.createElementBlock("div",Ie,[n.value.length>0?(t.openBlock(),t.createElementBlock("div",Ue,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.value,u=>{var b,O,Y,H;return t.openBlock(),t.createElementBlock("div",{key:u.name,class:"joint-item"},[t.createElementVNode("div",Fe,[t.createElementVNode("div",Be,[t.createElementVNode("span",Ye,t.toDisplayString(u.name),1),t.createElementVNode("span",He," ["+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",Ze,t.toDisplayString(u.type),1)]),u.type==="revolute"||u.type==="prismatic"?(t.openBlock(),t.createElementBlock("div",Ke,[t.createElementVNode("div",$e,[t.createElementVNode("input",{type:"range",min:((Y=u.limit)==null?void 0:Y.lower)??(u.type==="revolute"?-Math.PI:-1),max:((H=u.limit)==null?void 0:H.upper)??(u.type==="revolute"?Math.PI:1),step:.01,value:u.currentValue,onInput:Q=>v(u.name,Q.target.value),class:"joint-slider",disabled:p.value&&!y.value},null,40,Xe)]),t.createElementVNode("div",Ge,[t.createElementVNode("span",qe,t.toDisplayString(u.currentValue.toFixed(3)),1),t.createElementVNode("span",Je,t.toDisplayString(u.type==="revolute"?"rad":"m"),1)])])):t.createCommentVNode("",!0)])}),128))])):(t.openBlock(),t.createElementBlock("div",We,g[0]||(g[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}},tt=K._export_sfc(et,[["__scopeId","data-v-603b87bc"]]),ot=["xlink:href"],it=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:p}=e;let y=`${p}`;return y=`${y.replace("px","")}px`,{width:y,height:y}});return(p,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["container",{active:p.active}]),style:t.normalizeStyle(o.value)},[(t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass(["svg-icon",[p.$attrs.class,p.spin&&"svg-icon-spin"]]),style:t.normalizeStyle(l.value),"aria-hidden":"true"},[t.createElementVNode("use",{"xlink:href":n.value},null,8,ot)],6))],6))}}),T=K._export_sfc(it,[["__scopeId","data-v-3150a90b"]]),st={class:"obj-viewer-container"},nt={class:"buttonGroup-top"},at={class:"buttonGroup-topLeft"},lt={class:"buttonGroup-left"},rt={class:"buttonGroup-right"},ct={class:"buttonGroup-bottom"},ht={class:"left-panel"},ut={class:"panel-header"},dt={key:1,class:"clipping-content"},pt={class:"radio-group"},mt={class:"radio-label"},ft={class:"radio-label"},_t={class:"radio-label"},gt={class:"radio-label"},yt={class:"right-panel"},vt={class:"panel-header"},bt={key:0,class:"loading-overlay"},Et={__name:"threeModel",props:{animationData:{type:Object,default:()=>{}}},emits:["getAnimationData"],setup(a,{expose:e,emit:o}){const n=o,l=a;let p=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:_}=Ve(r),{isAnimating:c,toggleAnimation:M,stopAnimation:U}=Te(N,s),{isClipping:d,activeClippingAxis:g,toggleClipping:u,updateClippingPlanes:b}=Ce(N,s),{addModelsFromUrls:O,loadModelByDefaultPath:Y,urdfModel:H}=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(),q=1500,J=Date.now(),S=()=>{const Z=Date.now()-J,ne=Math.min(Z/q,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(),d.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,Y),$=A=>{L.value=!0,V.value=A,A==="剖面视图"&&!d.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(),p=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,q,J;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",nt,[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",at,[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",lt,[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",rt,[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",ct,[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:(q=v.value)==null?void 0:q.pauseAnimation},null,8,["onClick"]),t.createVNode(T,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:(J=v.value)==null?void 0:J.resetAll},null,8,["onClick"])]),t.withDirectives(t.createElementVNode("div",ht,[t.createElementVNode("div",ut,[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(je,{key:0,model:t.unref(H)},null,8,["model"])):t.createCommentVNode("",!0),V.value==="剖面视图"?(t.openBlock(),t.createElementBlock("div",dt,[t.createElementVNode("div",pt,[t.createElementVNode("label",mt,[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",ft,[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",_t,[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",gt,[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",yt,[t.createElementVNode("div",vt,[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(tt,{ref_key:"jointRef",ref:v,model:t.unref(H),scene:t.unref(p),animationData:l==null?void 0:l.animationData},null,8,["model","scene","animationData"]),[[t.vShow,x.value==="关节控制"]]),t.withDirectives(t.createVNode(ze,{animationData:l==null?void 0:l.animationData},null,8,["animationData"]),[[t.vShow,x.value==="动画仿真"]])]),_:1})],512),[[t.vShow,h.value]]),w.value?(t.openBlock(),t.createElementBlock("div",bt,[m[20]||(m[20]=t.createElementVNode("div",{class:"loading-spinner"},null,-1)),t.createElementVNode("p",null,t.toDisplayString(P.value),1)])):t.createCommentVNode("",!0)])}}},wt=K._export_sfc(Et,[["__scopeId","data-v-14112288"]]);exports.default=wt;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.1.552",
4
+ "version": "1.1.554",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",