ss-component-new 1.3.39 → 1.3.40
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.
- package/dist/{MTLLoader-2i72y41c.js → MTLLoader-CBRDqlja.js} +24 -24
- package/dist/{MTLLoader-DXzoNrir.cjs → MTLLoader-YtHulNzU.cjs} +1 -1
- package/dist/{OrbitControls-25f9O6FX.cjs → OrbitControls-Bwzpfq8_.cjs} +1 -1
- package/dist/{OrbitControls-DLMbmcAk.js → OrbitControls-CKR1ruPg.js} +1 -1
- package/dist/{URDFLoader-C9bE_XzP.js → URDFLoader-D-0fnLWu.js} +189 -189
- package/dist/{URDFLoader-Cr4cwEF8.cjs → URDFLoader-DIvTWPgk.cjs} +1 -1
- package/dist/{animationData-0idWk1St.js → animationData-BBVNOO1d.js} +19 -19
- package/dist/{animationData-Bq1xWpzh.cjs → animationData-krmt7b15.cjs} +1 -1
- package/dist/{array-D7ZpHOUW.js → array-B7hKAHMR.js} +46 -46
- package/dist/{array-BcZ8wZJh.cjs → array-BMhRsnRu.cjs} +1 -1
- package/dist/{iconfont-D_lKvP4A.js → iconfont-CSj9Ypb0.js} +29 -29
- package/dist/{iconfont-C8smb8wH.cjs → iconfont-CUPzGSlt.cjs} +1 -1
- package/dist/index-BDzsGCjm.cjs +11 -0
- package/dist/{index-CuwDFx38.cjs → index-BFKUrR1o.cjs} +1 -1
- package/dist/{index-Dl-Z36zZ.cjs → index-BG3-boe7.cjs} +1 -1
- package/dist/index-BJ8XP3Y-.cjs +1 -0
- package/dist/{index-BJPBBWWH.cjs → index-BLxE_tkf.cjs} +1 -1
- package/dist/{index-Ddoq7kRQ.js → index-BT6DSXQW.js} +9 -9
- package/dist/{index-BFqQiTF3.cjs → index-BUsoO5VT.cjs} +1 -1
- package/dist/{index-U0xNmCVP.cjs → index-BVgS3Nd5.cjs} +1 -1
- package/dist/{index-BJ4dYIP9.js → index-Bcrscjdm.js} +2 -2
- package/dist/{index-2cLYbH8L.js → index-BgUChdje.js} +8 -8
- package/dist/index-BteE57Nz.js +103 -0
- package/dist/{index-mMYvuatu.js → index-C75tqiG_.js} +41 -41
- package/dist/{index-C09fhtZ7.js → index-C7WQ1ky5.js} +2 -2
- package/dist/index-C8FzkPpO.cjs +1 -0
- package/dist/{index-DRTxe12U.cjs → index-C8fMwErX.cjs} +13 -13
- package/dist/{index-BeF439qb.js → index-CCsW4SQb.js} +7 -7
- package/dist/{index-nr6V1FzX.js → index-CEq2QX9L.js} +7 -7
- package/dist/{index-CXiOVgoz.js → index-CEzEaG0d.js} +1 -1
- package/dist/{index-BjVhxFhd.js → index-CGm9oYu2.js} +5 -5
- package/dist/{index-Cjqg29ul.cjs → index-CIrXKpNl.cjs} +1 -1
- package/dist/{index-CXF4fGBx.cjs → index-CQozkDNK.cjs} +1 -1
- package/dist/{index-C-_cejgk.js → index-CTE81JBY.js} +3 -3
- package/dist/{index-BSzis22W.cjs → index-CliK2V0E.cjs} +1 -1
- package/dist/{index-CYttSa5h.js → index-CppJQDiT.js} +3 -3
- package/dist/{index-DM30Ja8n.cjs → index-Cul6hC7f.cjs} +1 -1
- package/dist/{index-CMro3YG1.cjs → index-CuvQZsbE.cjs} +1 -1
- package/dist/{index-DU9e5EhS.cjs → index-Cw4Pm2PQ.cjs} +1 -1
- package/dist/{index-BmPlus3L.cjs → index-CwMhzp9R.cjs} +1 -1
- package/dist/{index-DdKUuRez.js → index-D39AtL48.js} +1 -1
- package/dist/{index-DQeVX7pl.js → index-D9lVn2ja.js} +5 -5
- package/dist/{index-CyiMl_77.js → index-DABBYx7H.js} +1 -1
- package/dist/{index-CvwIVk4C.js → index-DDQZOo-o.js} +3 -3
- package/dist/{index-Bmjp4oN2.cjs → index-DDsoPHBA.cjs} +1 -1
- package/dist/{index-CZZ8Ifs9.js → index-DFjh1qWr.js} +2 -2
- package/dist/{index-Va8AOLWi.js → index-DGRL8SEt.js} +1 -1
- package/dist/index-DGeMVYJU.js +12544 -0
- package/dist/{index-HWbROorb.js → index-DLyb9Q5L.js} +2 -2
- package/dist/{index-BFkiAoiG.cjs → index-DN2waPoj.cjs} +1 -1
- package/dist/{index-Dhu1H8ka.js → index-DWfxnemZ.js} +2 -2
- package/dist/{index-BAu0NK04.cjs → index-DdNJrN4I.cjs} +1 -1
- package/dist/{index-BC4zbL4W.cjs → index-Dm-5UkTK.cjs} +1 -1
- package/dist/{index-DkCH5VtE.js → index-Dq8v_eJA.js} +6 -6
- package/dist/{index-OaeHF7Y4.cjs → index-Du0eSoIx.cjs} +1 -1
- package/dist/{index-C0hS-bj5.js → index-DxVKhVHR.js} +7 -7
- package/dist/{index-BeqcmxG1.js → index-OYiyhWAy.js} +7 -7
- package/dist/{index-DPmCVTf0.cjs → index-OZTa9Fl3.cjs} +1 -1
- package/dist/{index-CqvnJnTM.cjs → index-d6tZBTSp.cjs} +1 -1
- package/dist/{index-CEcgrss3.cjs → index-euZWOilV.cjs} +1 -1
- package/dist/{index-SG3iZ1zi.cjs → index-lDcFCgsk.cjs} +1 -1
- package/dist/{index-CldRoanF.js → index-rZKPYWM6.js} +2 -2
- package/dist/{index-COQpDVsv.js → index-sMsCzNtW.js} +1535 -1570
- package/dist/{index-BWCv7zxy.cjs → index-vCTVD7cV.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs} +382 -392
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js} +28120 -28781
- package/dist/{index.vue_vue_type_style_index_1_lang-BIBuo_6N.cjs → index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-M5fbenhC.js → index.vue_vue_type_style_index_1_lang-q8rMzh6x.js} +75 -75
- package/dist/{main-CZBz_zjr.js → main-CbBG4x5W.js} +4 -4
- package/dist/{main-pPT0wg-M.cjs → main-D7LZI3yR.cjs} +1 -1
- package/dist/{menuIndex-D52EAwtb.cjs → menuIndex-8RF_0N_y.cjs} +1 -1
- package/dist/{menuIndex-DYaogp2R.js → menuIndex-BwWrdu20.js} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +10 -10
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +11 -11
- package/dist/{threeModel-BObCDF1v.js → threeModel-CiTIBkkk.js} +45 -45
- package/dist/{threeModel-hIc2ofR5.cjs → threeModel-Dd-cfGXr.cjs} +1 -1
- package/dist/{threePreview-Dm8s6ZzZ.cjs → threePreview-CBFQtSls.cjs} +1 -1
- package/dist/{threePreview-STh6e4ji.js → threePreview-XQG7sQy9.js} +125 -125
- package/dist/{threeSceneView-BrPJwJe5.js → threeSceneView-CdZFIImJ.js} +38 -38
- package/dist/{threeSceneView-DsimUKrC.cjs → threeSceneView-D97Sc8hd.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-C5cYg_nz.cjs → threeSceneViewForCPMPIP-4Cjv1ZS4.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-BjnGQodx.js → threeSceneViewForCPMPIP-DH__ogKh.js} +8 -8
- package/dist/{threeTrackPathView-BQYAP4DB.js → threeTrackPathView-BFQXaw-a.js} +78 -78
- package/dist/{threeTrackPathView-CJsgvwfM.cjs → threeTrackPathView-s17KavQX.cjs} +1 -1
- package/dist/{threeViewerHost-Sk5pSWMo.js → threeViewerHost-BgPjA_94.js} +11 -11
- package/dist/{threeViewerHost-B9_P3rIV.cjs → threeViewerHost-C39tiQj-.cjs} +1 -1
- package/dist/{urdfTree-B1eVnyil.js → urdfTree-DM6uTeXj.js} +10 -10
- package/dist/{urdfTree-DoHqwX6e.cjs → urdfTree-HdeBG5se.cjs} +1 -1
- package/dist/{workpieceTreePanel-DKNEmjW7.cjs → workpieceTreePanel-BKOHDm85.cjs} +1 -1
- package/dist/{workpieceTreePanel-CZA2q-tk.js → workpieceTreePanel-C5qUdbmi.js} +63 -63
- package/package.json +1 -1
- package/dist/index-Ccqg6q19.cjs +0 -1
- package/dist/index-CpbBe_mV.cjs +0 -1
- package/dist/index-DIWralYr.js +0 -67
- package/dist/index-De99NYNm.cjs +0 -1
- package/dist/index-O6tv0Wzx.js +0 -11883
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const an=require("./MTLLoader-DXzoNrir.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs");class tt extends a.DataTextureLoader{constructor(O){super(O)}parse(O){function ee(f){switch(f.image_type){case ye:case te:if(f.colormap_length>256||f.colormap_size!==24||f.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case Z:case se:case pe:case me:if(f.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case be:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+f.image_type)}if(f.width<=0||f.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(f.pixel_size!==8&&f.pixel_size!==16&&f.pixel_size!==24&&f.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+f.pixel_size)}function v(f,Y,z,D,$){let j,V;const _=z.pixel_size>>3,C=z.width*z.height*_;if(Y&&(V=$.subarray(D,D+=z.colormap_length*(z.colormap_size>>3))),f){j=new Uint8Array(C);let A,h,T,J=0;const de=new Uint8Array(_);for(;J<C;)if(A=$[D++],h=(A&127)+1,A&128){for(T=0;T<_;++T)de[T]=$[D++];for(T=0;T<h;++T)j.set(de,J+T*_);J+=_*h}else{for(h*=_,T=0;T<h;++T)j[J+T]=$[D++];J+=h}}else j=$.subarray(D,D+=Y?z.width*z.height:C);return{pixel_data:j,palettes:V}}function oe(f,Y,z,D,$,j,V,_,C){const A=C;let h,T=0,J,de;const we=L.width;for(de=Y;de!==D;de+=z)for(J=$;J!==V;J+=j,T++)h=_[T],f[(J+we*de)*4+3]=255,f[(J+we*de)*4+2]=A[h*3+0],f[(J+we*de)*4+1]=A[h*3+1],f[(J+we*de)*4+0]=A[h*3+2];return f}function R(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A+=2)C=_[A+0]+(_[A+1]<<8),f[(h+J*T)*4+0]=(C&31744)>>7,f[(h+J*T)*4+1]=(C&992)>>2,f[(h+J*T)*4+2]=(C&31)<<3,f[(h+J*T)*4+3]=C&32768?0:255;return f}function re(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=3)f[(A+T*h)*4+3]=255,f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2];return f}function S(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=4)f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2],f[(A+T*h)*4+3]=_[C+3];return f}function X(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A++)C=_[A],f[(h+J*T)*4+0]=C,f[(h+J*T)*4+1]=C,f[(h+J*T)*4+2]=C,f[(h+J*T)*4+3]=255;return f}function ie(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=2)f[(A+T*h)*4+0]=_[C+0],f[(A+T*h)*4+1]=_[C+0],f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+3]=_[C+1];return f}function ge(f,Y,z,D,$){let j,V,_,C,A,h;switch((L.flags&I)>>U){default:case W:j=0,_=1,A=Y,V=0,C=1,h=z;break;case B:j=0,_=1,A=Y,V=z-1,C=-1,h=-1;break;case G:j=Y-1,_=-1,A=-1,V=0,C=1,h=z;break;case x:j=Y-1,_=-1,A=-1,V=z-1,C=-1,h=-1;break}if(q)switch(L.pixel_size){case 8:X(f,V,C,h,j,_,A,D);break;case 16:ie(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(L.pixel_size){case 8:oe(f,V,C,h,j,_,A,D,$);break;case 16:R(f,V,C,h,j,_,A,D);break;case 24:re(f,V,C,h,j,_,A,D);break;case 32:S(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return f}const be=0,ye=1,Z=2,se=3,te=9,pe=10,me=11,I=48,U=4,B=0,x=1,W=2,G=3;if(O.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let g=0;const p=new Uint8Array(O),L={id_length:p[g++],colormap_type:p[g++],image_type:p[g++],colormap_index:p[g++]|p[g++]<<8,colormap_length:p[g++]|p[g++]<<8,colormap_size:p[g++],origin:[p[g++]|p[g++]<<8,p[g++]|p[g++]<<8],width:p[g++]|p[g++]<<8,height:p[g++]|p[g++]<<8,pixel_size:p[g++],flags:p[g++]};if(ee(L),L.id_length+g>O.length)throw new Error("THREE.TGALoader: No data.");g+=L.id_length;let M=!1,N=!1,q=!1;switch(L.image_type){case te:M=!0,N=!0;break;case ye:N=!0;break;case pe:M=!0;break;case Z:break;case me:M=!0,q=!0;break;case se:q=!0;break}const ce=new Uint8Array(L.width*L.height*4),ne=v(M,N,L,g,p);return ge(ce,L.width,L.height,ne.pixel_data,ne.palettes),{data:ce,width:L.width,height:L.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class cn extends a.Loader{load(O,ee,v,oe){const R=this,re=R.path===""?a.LoaderUtils.extractUrlBase(O):R.path,S=new a.FileLoader(R.manager);S.setPath(R.path),S.setRequestHeader(R.requestHeader),S.setWithCredentials(R.withCredentials),S.load(O,function(X){try{ee(R.parse(X,re))}catch(ie){oe?oe(ie):console.error(ie),R.manager.itemError(O)}},v,oe)}parse(O,ee){function v(t,e){const i=[],n=t.childNodes;for(let s=0,o=n.length;s<o;s++){const r=n[s];r.nodeName===e&&i.push(r)}return i}function oe(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function R(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function re(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function S(t){return t.substring(1)}function X(){return"three_default_"+on++}function ie(t){return Object.keys(t).length===0}function ge(t){return{unit:be(v(t,"unit")[0]),upAxis:ye(v(t,"up_axis")[0])}}function be(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function ye(t){return t!==void 0?t.textContent:"Y_UP"}function Z(t,e,i,n){const s=v(t,e)[0];if(s!==void 0){const o=v(s,i);for(let r=0;r<o.length;r++)n(o[r])}}function se(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function te(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function pe(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType!==1)continue;let r;switch(o.nodeName){case"source":r=o.getAttribute("id"),e.sources[r]=_e(o);break;case"sampler":r=o.getAttribute("id"),e.samplers[r]=me(o);break;case"channel":r=o.getAttribute("target"),e.channels[r]=I(o);break;case"animation":pe(o),i=!0;break;default:console.log(o)}}i===!1&&(E.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function me(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic");e.inputs[r]=o;break}}return e}function I(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let o=n.shift();const r=o.indexOf("(")!==-1,u=o.indexOf(".")!==-1;if(u)n=o.split("."),o=n.shift(),e.member=n.shift();else if(r){const l=o.split("(");o=l.shift();for(let d=0;d<l.length;d++)l[d]=parseInt(l[d].replace(/\)/,""));e.indices=l}return e.id=s,e.sid=o,e.arraySyntax=r,e.memberSyntax=u,e.sampler=S(t.getAttribute("source")),e}function U(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const o in i)if(i.hasOwnProperty(o)){const r=i[o],u=n[r.sampler],l=u.inputs.INPUT,d=u.inputs.OUTPUT,y=s[l],c=s[d],b=x(r,y,c);L(b,e)}return e}function B(t){return te(E.animations[t],U)}function x(t,e,i){const n=E.nodes[t.id],s=Ne(n.id),o=n.transforms[t.sid],r=n.matrix.clone().transpose();let u,l,d,y,c,b;const m={};switch(o){case"matrix":for(d=0,y=e.array.length;d<y;d++)if(u=e.array[d],l=d*i.stride,m[u]===void 0&&(m[u]={}),t.arraySyntax===!0){const K=i.array[l],H=t.indices[0]+4*t.indices[1];m[u][H]=K}else for(c=0,b=i.stride;c<b;c++)m[u][c]=i.array[l+c];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break}const k=W(m,r);return{name:s.uuid,keyframes:k}}function W(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)M(i,s,e.elements[s]);return i;function n(s,o){return s.time-o.time}}const G=new a.Vector3,g=new a.Vector3,p=new a.Quaternion;function L(t,e){const i=t.keyframes,n=t.name,s=[],o=[],r=[],u=[];for(let l=0,d=i.length;l<d;l++){const y=i[l],c=y.time,b=y.value;le.fromArray(b).transpose(),le.decompose(G,p,g),s.push(c),o.push(G.x,G.y,G.z),r.push(p.x,p.y,p.z,p.w),u.push(g.x,g.y,g.z)}return o.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,o)),r.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,r)),u.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,u)),e}function M(t,e,i){let n,s=!0,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]=i;else N(t,e)}function N(t,e){let i,n;for(let s=0,o=t.length;s<o;s++){const r=t[s];if(r.value[e]===null){if(i=q(t,s,e),n=ce(t,s,e),i===null){r.value[e]=n.value[e];continue}if(n===null){r.value[e]=i.value[e];continue}ne(r,i,n,e)}}}function q(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function ce(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function ne(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function f(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(S(s.getAttribute("url")));break}}E.clips[t.getAttribute("id")]=e}function Y(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let o=0,r=s.length;o<r;o++){const u=B(s[o]);for(let l=0,d=u.length;l<d;l++)e.push(u[l])}return new a.AnimationClip(i,n,e)}function z(t){return te(E.clips[t],Y)}function D(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=S(s.getAttribute("source")),e.skin=$(s);break;case"morph":e.id=S(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}E.controllers[t.getAttribute("id")]=e}function $(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=R(s.textContent);break;case"source":const o=s.getAttribute("id");e.sources[o]=_e(s);break;case"joints":e.joints=j(s);break;case"vertex_weights":e.vertexWeights=V(s);break}}return e}function j(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source"));e.inputs[o]=r;break}}return e}function V(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source")),u=parseInt(s.getAttribute("offset"));e.inputs[o]={id:r,offset:u};break;case"vcount":e.vcount=re(s.textContent);break;case"v":e.v=re(s.textContent);break}}return e}function _(t){const e={id:t.id},i=E.geometries[e.id];return t.skin!==void 0&&(e.skin=C(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function C(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,o=s.vcount,r=s.v,u=s.inputs.JOINT.offset,l=s.inputs.WEIGHT.offset,d=t.sources[t.joints.inputs.JOINT],y=t.sources[t.joints.inputs.INV_BIND_MATRIX],c=n[s.inputs.WEIGHT.id].array;let b=0,m,k,w;for(m=0,w=o.length;m<w;m++){const H=o[m],F=[];for(k=0;k<H;k++){const P=r[b+u],he=r[b+l],ae=c[he];F.push({index:P,weight:ae}),b+=2}for(F.sort(K),k=0;k<4;k++){const P=F[k];P!==void 0?(i.indices.array.push(P.index),i.weights.array.push(P.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),m=0,w=d.array.length;m<w;m++){const H=d.array[m],F=new a.Matrix4().fromArray(y.array,m*y.stride).transpose();i.joints.push({name:H,boneInverse:F})}return i;function K(H,F){return F.weight-H.weight}}function A(t){return te(E.controllers[t],_)}function h(t){const e={init_from:v(t,"init_from")[0].textContent};E.images[t.getAttribute("id")]=e}function T(t){return t.build!==void 0?t.build:t.init_from}function J(t){const e=E.images[t];return e!==void 0?te(e,T):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function de(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=we(s);break}}E.effects[t.getAttribute("id")]=e}function we(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":st(s,e);break;case"technique":e.technique=at(s);break;case"extra":e.extra=Ge(s);break}}return e}function st(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType===1)switch(o.nodeName){case"surface":e.surfaces[i]=ot(o);break;case"sampler2D":e.samplers[i]=rt(o);break}}}function ot(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function rt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function at(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=ct(s);break;case"extra":e.extra=Ge(s);break}}return e}function ct(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=Se(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:Se(s)};break}}return e}function Se(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=R(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:Ie(s)};break}}return e}function Ie(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":lt(s,e);break}}return e}function lt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":dt(s,e);break}}}function dt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}}function Ge(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=ut(s);break}}return e}function ut(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}return e}function Oe(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:Ie(s)};break}}return e}function Fe(t){return t}function ft(t){return te(E.effects[t],Fe)}function ht(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=S(s.getAttribute("url"));break}}E.materials[t.getAttribute("id")]=e}function pt(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=Re;break;default:e=Ze}return e}function Pe(t){const e=ft(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(l,d=null){const y=e.profile.samplers[l.id];let c=null;if(y!==void 0){const b=e.profile.surfaces[y.source];c=J(b.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),c=J(l.id);if(c!==null){const b=pt(c);if(b!==void 0){const m=b.load(c),k=l.extra;if(k!==void 0&&k.technique!==void 0&&ie(k.technique)===!1){const w=k.technique;m.wrapS=w.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,m.wrapT=w.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,m.offset.set(w.offsetU||0,w.offsetV||0),m.repeat.set(w.repeatU||1,w.repeatV||1)}else m.wrapS=a.RepeatWrapping,m.wrapT=a.RepeatWrapping;return d!==null&&(m.colorSpace=d),m}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",c),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",l.id),null}const o=i.parameters;for(const l in o){const d=o[l];switch(l){case"diffuse":d.color&&n.color.fromArray(d.color),d.texture&&(n.map=s(d.texture,a.SRGBColorSpace));break;case"specular":d.color&&n.specular&&n.specular.fromArray(d.color),d.texture&&(n.specularMap=s(d.texture));break;case"bump":d.texture&&(n.normalMap=s(d.texture));break;case"ambient":d.texture&&(n.lightMap=s(d.texture,a.SRGBColorSpace));break;case"shininess":d.float&&n.shininess&&(n.shininess=d.float);break;case"emission":d.color&&n.emissive&&n.emissive.fromArray(d.color),d.texture&&(n.emissiveMap=s(d.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let r=o.transparent,u=o.transparency;if(u===void 0&&r&&(u={float:1}),r===void 0&&u&&(r={opaque:"A_ONE",data:{color:[1,1,1,1]}}),r&&u)if(r.data.texture)n.transparent=!0;else{const l=r.data.color;switch(r.opaque){case"A_ONE":n.opacity=l[3]*u.float;break;case"RGB_ZERO":n.opacity=1-l[0]*u.float;break;case"A_ZERO":n.opacity=1-l[3]*u.float;break;case"RGB_ONE":n.opacity=l[0]*u.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',r.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const l=i.extra.technique;for(const d in l){const y=l[d];switch(d){case"double_sided":n.side=y===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(y.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function mt(t){return te(E.materials[t],Pe)}function gt(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=bt(s);break}}E.cameras[t.getAttribute("id")]=e}function bt(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return yt(i)}}return{}}function yt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=wt(n);break}}return e}function wt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function Ue(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function kt(t){const e=E.cameras[t];return e!==void 0?te(e,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function Nt(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=At(s);break}}E.lights[t.getAttribute("id")]=e}function At(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=Tt(s)}}return e}function Tt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const o=R(s.textContent);e.color=new a.Color().fromArray(o),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const r=parseFloat(s.textContent);e.distance=r?Math.sqrt(1/r):0;break}}return e}function qe(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function Et(t){const e=E.lights[t];return e!==void 0?te(e,qe):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function xt(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=v(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const o=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[o]=_e(s);break;case"vertices":e.vertices=Ct(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(_t(s));break;default:console.log(s)}}E.geometries[t.getAttribute("id")]=e}}function _e(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=R(n.textContent);break;case"Name_array":e.array=oe(n.textContent);break;case"technique_common":const s=v(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function Ct(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=S(n.getAttribute("source")))}return e}function _t(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic"),u=parseInt(s.getAttribute("offset")),l=parseInt(s.getAttribute("set")),d=l>0?r+l:r;e.inputs[d]={id:o,offset:u},e.stride=Math.max(e.stride,u+1),r==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=re(s.textContent);break;case"p":e.p=re(s.textContent);break}}return e}function Lt(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function Mt(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function je(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const o=Lt(s);for(const r in o){const u=o[r];Mt(u),e[r]=Rt(u,i,n)}return e}function Rt(t,e,i){const n={},s={array:[],stride:0},o={array:[],stride:0},r={array:[],stride:0},u={array:[],stride:0},l={array:[],stride:0},d={array:[],stride:4},y={array:[],stride:4},c=new a.BufferGeometry,b=[];let m=0;for(let k=0;k<t.length;k++){const w=t[k],K=w.inputs;let H=0;switch(w.type){case"lines":case"linestrips":H=w.count*2;break;case"triangles":H=w.count*3;break;case"polylist":for(let F=0;F<w.count;F++){const P=w.vcount[F];switch(P){case 3:H+=3;break;case 4:H+=6;break;default:H+=(P-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",w.type)}c.addGroup(m,H,k),m+=H,w.material&&b.push(w.material);for(const F in K){const P=K[F];switch(F){case"VERTEX":for(const he in i){const ae=i[he];switch(he){case"POSITION":const Ae=s.array.length;if(ue(w,e[ae],P.offset,s.array),s.stride=e[ae].stride,e.skinWeights&&e.skinIndices&&(ue(w,e.skinIndices,P.offset,d.array),ue(w,e.skinWeights,P.offset,y.array)),w.hasUV===!1&&t.uvsNeedsFix===!0){const rn=(s.array.length-Ae)/s.stride;for(let et=0;et<rn;et++)r.array.push(0,0)}break;case"NORMAL":ue(w,e[ae],P.offset,o.array),o.stride=e[ae].stride;break;case"COLOR":ue(w,e[ae],P.offset,l.array),l.stride=e[ae].stride;break;case"TEXCOORD":ue(w,e[ae],P.offset,r.array),r.stride=e[ae].stride;break;case"TEXCOORD1":ue(w,e[ae],P.offset,u.array),r.stride=e[ae].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',he)}}break;case"NORMAL":ue(w,e[P.id],P.offset,o.array),o.stride=e[P.id].stride;break;case"COLOR":ue(w,e[P.id],P.offset,l.array,!0),l.stride=e[P.id].stride;break;case"TEXCOORD":ue(w,e[P.id],P.offset,r.array),r.stride=e[P.id].stride;break;case"TEXCOORD1":ue(w,e[P.id],P.offset,u.array),u.stride=e[P.id].stride;break}}}return s.array.length>0&&c.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),o.array.length>0&&c.setAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&c.setAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),r.array.length>0&&c.setAttribute("uv",new a.Float32BufferAttribute(r.array,r.stride)),u.array.length>0&&c.setAttribute("uv1",new a.Float32BufferAttribute(u.array,u.stride)),d.array.length>0&&c.setAttribute("skinIndex",new a.Float32BufferAttribute(d.array,d.stride)),y.array.length>0&&c.setAttribute("skinWeight",new a.Float32BufferAttribute(y.array,y.stride)),n.data=c,n.type=t[0].type,n.materialKeys=b,n}function ue(t,e,i,n,s=!1){const o=t.p,r=t.stride,u=t.vcount;function l(c){let b=o[c+i]*y;const m=b+y;for(;b<m;b++)n.push(d[b]);if(s){const k=n.length-y-1;Ee.setRGB(n[k+0],n[k+1],n[k+2],a.SRGBColorSpace),n[k+0]=Ee.r,n[k+1]=Ee.g,n[k+2]=Ee.b}}const d=e.array,y=e.stride;if(t.vcount!==void 0){let c=0;for(let b=0,m=u.length;b<m;b++){const k=u[b];if(k===4){const w=c+r*0,K=c+r*1,H=c+r*2,F=c+r*3;l(w),l(K),l(F),l(K),l(H),l(F)}else if(k===3){const w=c+r*0,K=c+r*1,H=c+r*2;l(w),l(K),l(H)}else if(k>4)for(let w=1,K=k-2;w<=K;w++){const H=c+r*0,F=c+r*w,P=c+r*(w+1);l(H),l(F),l(P)}c+=r*k}}else for(let c=0,b=o.length;c<b;c+=r)l(c)}function Be(t){return te(E.geometries[t],je)}function vt(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":Gt(n,e);break}}E.kinematicsModels[t.getAttribute("id")]=e}function St(t){return t.build!==void 0?t.build:t}function It(t){return te(E.kinematicsModels[t],St)}function Gt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=Ot(n);break;case"link":e.links.push(He(n));break}}}function Ot(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=Ft(n);break}}return e}function Ft(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=R(n.textContent);e.axis.fromArray(s);break;case"limits":const o=n.getElementsByTagName("max")[0],r=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(o.textContent),e.limits.min=parseFloat(r.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function He(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(Pt(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function Pt(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(He(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function De(t){const e={type:t.nodeName},i=R(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function Ut(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},qt(n,e.rigidBodies[n.getAttribute("name")]);break}}E.physicsModels[t.getAttribute("id")]=e}function qt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":jt(n,e);break}}}function jt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=R(n.textContent);break;case"mass":e.mass=R(n.textContent)[0];break}}}function Bt(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(Ht(n));break}}E.kinematicsScenes[S(t.getAttribute("url"))]=e}function Ht(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const o=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=o.substring(0,o.length-1);break}}return e}function Dt(t){return t.build!==void 0?t.build:t}function Vt(t){return te(E.kinematicsScenes[t],Dt)}function zt(){const t=Object.keys(E.kinematicsModels)[0],e=Object.keys(E.kinematicsScenes)[0],i=Object.keys(E.visualScenes)[0];if(t===void 0||e===void 0)return;const n=It(t),s=Vt(e),o=Ye(i),r=s.bindJointAxis,u={};for(let y=0,c=r.length;y<c;y++){const b=r[y],m=Q.querySelector('[sid="'+b.target+'"]');if(m){const k=m.parentElement;l(b.jointIndex,k)}}function l(y,c){const b=c.getAttribute("name"),m=n.joints[y];o.traverse(function(k){k.name===b&&(u[y]={object:k,transforms:Jt(c),joint:m,position:m.zeroPosition})})}const d=new a.Matrix4;Qe={joints:n&&n.joints,getJointValue:function(y){const c=u[y];if(c)return c.position;console.warn("THREE.ColladaLoader: Joint "+y+" doesn't exist.")},setJointValue:function(y,c){const b=u[y];if(b){const m=b.joint;if(c>m.limits.max||c<m.limits.min)console.warn("THREE.ColladaLoader: Joint "+y+" value "+c+" outside of limits (min: "+m.limits.min+", max: "+m.limits.max+").");else if(m.static)console.warn("THREE.ColladaLoader: Joint "+y+" is static.");else{const k=b.object,w=m.axis,K=b.transforms;le.identity();for(let H=0;H<K.length;H++){const F=K[H];if(F.sid&&F.sid.indexOf(y)!==-1)switch(m.type){case"revolute":le.multiply(d.makeRotationAxis(w,a.MathUtils.degToRad(c)));break;case"prismatic":le.multiply(d.makeTranslation(w.x*c,w.y*c,w.z*c));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+m.type);break}else switch(F.type){case"matrix":le.multiply(F.obj);break;case"translate":le.multiply(d.makeTranslation(F.obj.x,F.obj.y,F.obj.z));break;case"scale":le.scale(F.obj);break;case"rotate":le.multiply(d.makeRotationAxis(F.obj,F.angle));break}}k.matrix.copy(le),k.matrix.decompose(k.position,k.quaternion,k.scale),u[y].position=c}}else console.log("THREE.ColladaLoader: "+y+" does not exist.")}}}function Jt(t){const e=[],i=Q.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let o,r;switch(s.nodeName){case"matrix":o=R(s.textContent);const u=new a.Matrix4().fromArray(o).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:u});break;case"translate":case"scale":o=R(s.textContent),r=new a.Vector3().fromArray(o),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r});break;case"rotate":o=R(s.textContent),r=new a.Vector3().fromArray(o);const l=a.MathUtils.degToRad(o[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r,angle:l});break}}return e}function Wt(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const le=new a.Matrix4,ke=new a.Vector3;function Le(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),Le(n);break;case"instance_camera":e.instanceCameras.push(S(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(Ve(n));break;case"instance_light":e.instanceLights.push(S(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(Ve(n));break;case"instance_node":e.instanceNodes.push(S(n.getAttribute("url")));break;case"matrix":s=R(n.textContent),e.matrix.multiply(le.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=R(n.textContent),ke.fromArray(s),e.matrix.multiply(le.makeTranslation(ke.x,ke.y,ke.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=R(n.textContent);const o=a.MathUtils.degToRad(s[3]);e.matrix.multiply(le.makeRotationAxis(ke.fromArray(s),o)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=R(n.textContent),e.matrix.scale(ke.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return We(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):E.nodes[e.id]=e,e}function Ve(t){const e={id:S(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let o=0;o<s.length;o++){const r=s[o],u=r.getAttribute("symbol"),l=r.getAttribute("target");e.materials[u]=S(l)}break;case"skeleton":e.skeletons.push(S(n.textContent));break}}return e}function Kt(t,e){const i=[],n=[];let s,o,r;for(s=0;s<t.length;s++){const d=t[s];let y;if(We(d))y=Ne(d),ze(y,e,i);else if(Qt(d)){const b=E.visualScenes[d].children;for(let m=0;m<b.length;m++){const k=b[m];if(k.type==="JOINT"){const w=Ne(k.id);ze(w,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",d)}for(s=0;s<e.length;s++)for(o=0;o<i.length;o++)if(r=i[o],r.bone.name===e[s].name){n[s]=r,r.processed=!0;break}for(s=0;s<i.length;s++)r=i[s],r.processed===!1&&(n.push(r),r.processed=!0);const u=[],l=[];for(s=0;s<n.length;s++)r=n[s],u.push(r.bone),l.push(r.boneInverse);return new a.Skeleton(u,l)}function ze(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let o=0;o<e.length;o++){const r=e[o];if(r.name===n.name){s=r.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function Yt(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,o=t.instanceCameras,r=t.instanceControllers,u=t.instanceLights,l=t.instanceGeometries,d=t.instanceNodes;for(let c=0,b=n.length;c<b;c++)e.push(Ne(n[c]));for(let c=0,b=o.length;c<b;c++){const m=kt(o[c]);m!==null&&e.push(m.clone())}for(let c=0,b=r.length;c<b;c++){const m=r[c],k=A(m.id),w=Be(k.id),K=Je(w,m.materials),H=m.skeletons,F=k.skin.joints,P=Kt(H,F);for(let he=0,ae=K.length;he<ae;he++){const Ae=K[he];Ae.isSkinnedMesh&&(Ae.bind(P,k.skin.bindMatrix),Ae.normalizeSkinWeights()),e.push(Ae)}}for(let c=0,b=u.length;c<b;c++){const m=Et(u[c]);m!==null&&e.push(m.clone())}for(let c=0,b=l.length;c<b;c++){const m=l[c],k=Be(m.id),w=Je(k,m.materials);for(let K=0,H=w.length;K<H;K++)e.push(w[K])}for(let c=0,b=d.length;c<b;c++)e.push(Ne(d[c]).clone());let y;if(n.length===0&&e.length===1)y=e[0];else{y=s==="JOINT"?new a.Bone:new a.Group;for(let c=0;c<e.length;c++)y.add(e[c])}return y.name=s==="JOINT"?t.sid:t.name,y.matrix.copy(i),y.matrix.decompose(y.position,y.quaternion,y.scale),y}const Xt=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function $t(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const o=e[t[n]];o===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(Xt)):i.push(mt(o))}return i}function Je(t,e){const i=[];for(const n in t){const s=t[n],o=$t(s.materialKeys,e);if(o.length===0&&(n==="lines"||n==="linestrips"?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let d=0,y=o.length;d<y;d++){const c=o[d];if(c.isMeshPhongMaterial===!0||c.isMeshLambertMaterial===!0){const b=new a.LineBasicMaterial;b.color.copy(c.color),b.opacity=c.opacity,b.transparent=c.transparent,o[d]=b}}const r=s.data.attributes.skinIndex!==void 0,u=o.length===1?o[0]:o;let l;switch(n){case"lines":l=new a.LineSegments(s.data,u);break;case"linestrips":l=new a.Line(s.data,u);break;case"triangles":case"polylist":r?l=new a.SkinnedMesh(s.data,u):l=new a.Mesh(s.data,u);break}i.push(l)}return i}function We(t){return E.nodes[t]!==void 0}function Ne(t){return te(E.nodes[t],Yt)}function Zt(t){const e={name:t.getAttribute("name"),children:[]};Wt(t);const i=v(t,"node");for(let n=0;n<i.length;n++)e.children.push(Le(i[n]));E.visualScenes[t.getAttribute("id")]=e}function Ke(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(Ne(s.id))}return e}function Qt(t){return E.visualScenes[t]!==void 0}function Ye(t){return te(E.visualScenes[t],Ke)}function en(t){const e=v(t,"instance_visual_scene")[0];return Ye(S(e.getAttribute("url")))}function tn(){const t=E.clips;if(ie(t)===!0){if(ie(E.animations)===!1){const e=[];for(const i in E.animations){const n=B(i);for(let s=0,o=n.length;s<o;s++)e.push(n[s])}xe.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)xe.push(z(e))}function nn(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
|
|
1
|
+
"use strict";const an=require("./MTLLoader-YtHulNzU.cjs"),a=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs");class tt extends a.DataTextureLoader{constructor(O){super(O)}parse(O){function ee(f){switch(f.image_type){case ye:case te:if(f.colormap_length>256||f.colormap_size!==24||f.colormap_type!==1)throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case Z:case se:case pe:case me:if(f.colormap_type)throw new Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case be:throw new Error("THREE.TGALoader: No data.");default:throw new Error("THREE.TGALoader: Invalid type "+f.image_type)}if(f.width<=0||f.height<=0)throw new Error("THREE.TGALoader: Invalid image size.");if(f.pixel_size!==8&&f.pixel_size!==16&&f.pixel_size!==24&&f.pixel_size!==32)throw new Error("THREE.TGALoader: Invalid pixel size "+f.pixel_size)}function v(f,Y,z,D,$){let j,V;const _=z.pixel_size>>3,C=z.width*z.height*_;if(Y&&(V=$.subarray(D,D+=z.colormap_length*(z.colormap_size>>3))),f){j=new Uint8Array(C);let A,h,T,J=0;const de=new Uint8Array(_);for(;J<C;)if(A=$[D++],h=(A&127)+1,A&128){for(T=0;T<_;++T)de[T]=$[D++];for(T=0;T<h;++T)j.set(de,J+T*_);J+=_*h}else{for(h*=_,T=0;T<h;++T)j[J+T]=$[D++];J+=h}}else j=$.subarray(D,D+=Y?z.width*z.height:C);return{pixel_data:j,palettes:V}}function oe(f,Y,z,D,$,j,V,_,C){const A=C;let h,T=0,J,de;const we=L.width;for(de=Y;de!==D;de+=z)for(J=$;J!==V;J+=j,T++)h=_[T],f[(J+we*de)*4+3]=255,f[(J+we*de)*4+2]=A[h*3+0],f[(J+we*de)*4+1]=A[h*3+1],f[(J+we*de)*4+0]=A[h*3+2];return f}function R(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A+=2)C=_[A+0]+(_[A+1]<<8),f[(h+J*T)*4+0]=(C&31744)>>7,f[(h+J*T)*4+1]=(C&992)>>2,f[(h+J*T)*4+2]=(C&31)<<3,f[(h+J*T)*4+3]=C&32768?0:255;return f}function re(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=3)f[(A+T*h)*4+3]=255,f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2];return f}function S(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=4)f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+1]=_[C+1],f[(A+T*h)*4+0]=_[C+2],f[(A+T*h)*4+3]=_[C+3];return f}function X(f,Y,z,D,$,j,V,_){let C,A=0,h,T;const J=L.width;for(T=Y;T!==D;T+=z)for(h=$;h!==V;h+=j,A++)C=_[A],f[(h+J*T)*4+0]=C,f[(h+J*T)*4+1]=C,f[(h+J*T)*4+2]=C,f[(h+J*T)*4+3]=255;return f}function ie(f,Y,z,D,$,j,V,_){let C=0,A,h;const T=L.width;for(h=Y;h!==D;h+=z)for(A=$;A!==V;A+=j,C+=2)f[(A+T*h)*4+0]=_[C+0],f[(A+T*h)*4+1]=_[C+0],f[(A+T*h)*4+2]=_[C+0],f[(A+T*h)*4+3]=_[C+1];return f}function ge(f,Y,z,D,$){let j,V,_,C,A,h;switch((L.flags&I)>>U){default:case W:j=0,_=1,A=Y,V=0,C=1,h=z;break;case B:j=0,_=1,A=Y,V=z-1,C=-1,h=-1;break;case G:j=Y-1,_=-1,A=-1,V=0,C=1,h=z;break;case x:j=Y-1,_=-1,A=-1,V=z-1,C=-1,h=-1;break}if(q)switch(L.pixel_size){case 8:X(f,V,C,h,j,_,A,D);break;case 16:ie(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}else switch(L.pixel_size){case 8:oe(f,V,C,h,j,_,A,D,$);break;case 16:R(f,V,C,h,j,_,A,D);break;case 24:re(f,V,C,h,j,_,A,D);break;case 32:S(f,V,C,h,j,_,A,D);break;default:throw new Error("THREE.TGALoader: Format not supported.")}return f}const be=0,ye=1,Z=2,se=3,te=9,pe=10,me=11,I=48,U=4,B=0,x=1,W=2,G=3;if(O.length<19)throw new Error("THREE.TGALoader: Not enough data to contain header.");let g=0;const p=new Uint8Array(O),L={id_length:p[g++],colormap_type:p[g++],image_type:p[g++],colormap_index:p[g++]|p[g++]<<8,colormap_length:p[g++]|p[g++]<<8,colormap_size:p[g++],origin:[p[g++]|p[g++]<<8,p[g++]|p[g++]<<8],width:p[g++]|p[g++]<<8,height:p[g++]|p[g++]<<8,pixel_size:p[g++],flags:p[g++]};if(ee(L),L.id_length+g>O.length)throw new Error("THREE.TGALoader: No data.");g+=L.id_length;let M=!1,N=!1,q=!1;switch(L.image_type){case te:M=!0,N=!0;break;case ye:N=!0;break;case pe:M=!0;break;case Z:break;case me:M=!0,q=!0;break;case se:q=!0;break}const ce=new Uint8Array(L.width*L.height*4),ne=v(M,N,L,g,p);return ge(ce,L.width,L.height,ne.pixel_data,ne.palettes),{data:ce,width:L.width,height:L.height,flipY:!0,generateMipmaps:!0,minFilter:a.LinearMipmapLinearFilter}}}class cn extends a.Loader{load(O,ee,v,oe){const R=this,re=R.path===""?a.LoaderUtils.extractUrlBase(O):R.path,S=new a.FileLoader(R.manager);S.setPath(R.path),S.setRequestHeader(R.requestHeader),S.setWithCredentials(R.withCredentials),S.load(O,function(X){try{ee(R.parse(X,re))}catch(ie){oe?oe(ie):console.error(ie),R.manager.itemError(O)}},v,oe)}parse(O,ee){function v(t,e){const i=[],n=t.childNodes;for(let s=0,o=n.length;s<o;s++){const r=n[s];r.nodeName===e&&i.push(r)}return i}function oe(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return i}function R(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseFloat(e[n]);return i}function re(t){if(t.length===0)return[];const e=t.trim().split(/\s+/),i=new Array(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=parseInt(e[n]);return i}function S(t){return t.substring(1)}function X(){return"three_default_"+on++}function ie(t){return Object.keys(t).length===0}function ge(t){return{unit:be(v(t,"unit")[0]),upAxis:ye(v(t,"up_axis")[0])}}function be(t){return t!==void 0&&t.hasAttribute("meter")===!0?parseFloat(t.getAttribute("meter")):1}function ye(t){return t!==void 0?t.textContent:"Y_UP"}function Z(t,e,i,n){const s=v(t,e)[0];if(s!==void 0){const o=v(s,i);for(let r=0;r<o.length;r++)n(o[r])}}function se(t,e){for(const i in t){const n=t[i];n.build=e(t[i])}}function te(t,e){return t.build!==void 0||(t.build=e(t)),t.build}function pe(t){const e={sources:{},samplers:{},channels:{}};let i=!1;for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType!==1)continue;let r;switch(o.nodeName){case"source":r=o.getAttribute("id"),e.sources[r]=_e(o);break;case"sampler":r=o.getAttribute("id"),e.samplers[r]=me(o);break;case"channel":r=o.getAttribute("target"),e.channels[r]=I(o);break;case"animation":pe(o),i=!0;break;default:console.log(o)}}i===!1&&(E.animations[t.getAttribute("id")||a.MathUtils.generateUUID()]=e)}function me(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic");e.inputs[r]=o;break}}return e}function I(t){const e={};let n=t.getAttribute("target").split("/");const s=n.shift();let o=n.shift();const r=o.indexOf("(")!==-1,u=o.indexOf(".")!==-1;if(u)n=o.split("."),o=n.shift(),e.member=n.shift();else if(r){const l=o.split("(");o=l.shift();for(let d=0;d<l.length;d++)l[d]=parseInt(l[d].replace(/\)/,""));e.indices=l}return e.id=s,e.sid=o,e.arraySyntax=r,e.memberSyntax=u,e.sampler=S(t.getAttribute("source")),e}function U(t){const e=[],i=t.channels,n=t.samplers,s=t.sources;for(const o in i)if(i.hasOwnProperty(o)){const r=i[o],u=n[r.sampler],l=u.inputs.INPUT,d=u.inputs.OUTPUT,y=s[l],c=s[d],b=x(r,y,c);L(b,e)}return e}function B(t){return te(E.animations[t],U)}function x(t,e,i){const n=E.nodes[t.id],s=Ne(n.id),o=n.transforms[t.sid],r=n.matrix.clone().transpose();let u,l,d,y,c,b;const m={};switch(o){case"matrix":for(d=0,y=e.array.length;d<y;d++)if(u=e.array[d],l=d*i.stride,m[u]===void 0&&(m[u]={}),t.arraySyntax===!0){const K=i.array[l],H=t.indices[0]+4*t.indices[1];m[u][H]=K}else for(c=0,b=i.stride;c<b;c++)m[u][c]=i.array[l+c];break;case"translate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"rotate":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break;case"scale":console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.',o);break}const k=W(m,r);return{name:s.uuid,keyframes:k}}function W(t,e){const i=[];for(const s in t)i.push({time:parseFloat(s),value:t[s]});i.sort(n);for(let s=0;s<16;s++)M(i,s,e.elements[s]);return i;function n(s,o){return s.time-o.time}}const G=new a.Vector3,g=new a.Vector3,p=new a.Quaternion;function L(t,e){const i=t.keyframes,n=t.name,s=[],o=[],r=[],u=[];for(let l=0,d=i.length;l<d;l++){const y=i[l],c=y.time,b=y.value;le.fromArray(b).transpose(),le.decompose(G,p,g),s.push(c),o.push(G.x,G.y,G.z),r.push(p.x,p.y,p.z,p.w),u.push(g.x,g.y,g.z)}return o.length>0&&e.push(new a.VectorKeyframeTrack(n+".position",s,o)),r.length>0&&e.push(new a.QuaternionKeyframeTrack(n+".quaternion",s,r)),u.length>0&&e.push(new a.VectorKeyframeTrack(n+".scale",s,u)),e}function M(t,e,i){let n,s=!0,o,r;for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]===void 0?n.value[e]=null:s=!1;if(s===!0)for(o=0,r=t.length;o<r;o++)n=t[o],n.value[e]=i;else N(t,e)}function N(t,e){let i,n;for(let s=0,o=t.length;s<o;s++){const r=t[s];if(r.value[e]===null){if(i=q(t,s,e),n=ce(t,s,e),i===null){r.value[e]=n.value[e];continue}if(n===null){r.value[e]=i.value[e];continue}ne(r,i,n,e)}}}function q(t,e,i){for(;e>=0;){const n=t[e];if(n.value[i]!==null)return n;e--}return null}function ce(t,e,i){for(;e<t.length;){const n=t[e];if(n.value[i]!==null)return n;e++}return null}function ne(t,e,i,n){if(i.time-e.time===0){t.value[n]=e.value[n];return}t.value[n]=(t.time-e.time)*(i.value[n]-e.value[n])/(i.time-e.time)+e.value[n]}function f(t){const e={name:t.getAttribute("id")||"default",start:parseFloat(t.getAttribute("start")||0),end:parseFloat(t.getAttribute("end")||0),animations:[]};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_animation":e.animations.push(S(s.getAttribute("url")));break}}E.clips[t.getAttribute("id")]=e}function Y(t){const e=[],i=t.name,n=t.end-t.start||-1,s=t.animations;for(let o=0,r=s.length;o<r;o++){const u=B(s[o]);for(let l=0,d=u.length;l<d;l++)e.push(u[l])}return new a.AnimationClip(i,n,e)}function z(t){return te(E.clips[t],Y)}function D(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"skin":e.id=S(s.getAttribute("source")),e.skin=$(s);break;case"morph":e.id=S(s.getAttribute("source")),console.warn("THREE.ColladaLoader: Morph target animation not supported yet.");break}}E.controllers[t.getAttribute("id")]=e}function $(t){const e={sources:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"bind_shape_matrix":e.bindShapeMatrix=R(s.textContent);break;case"source":const o=s.getAttribute("id");e.sources[o]=_e(s);break;case"joints":e.joints=j(s);break;case"vertex_weights":e.vertexWeights=V(s);break}}return e}function j(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source"));e.inputs[o]=r;break}}return e}function V(t){const e={inputs:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=s.getAttribute("semantic"),r=S(s.getAttribute("source")),u=parseInt(s.getAttribute("offset"));e.inputs[o]={id:r,offset:u};break;case"vcount":e.vcount=re(s.textContent);break;case"v":e.v=re(s.textContent);break}}return e}function _(t){const e={id:t.id},i=E.geometries[e.id];return t.skin!==void 0&&(e.skin=C(t.skin),i.sources.skinIndices=e.skin.indices,i.sources.skinWeights=e.skin.weights),e}function C(t){const i={joints:[],indices:{array:[],stride:4},weights:{array:[],stride:4}},n=t.sources,s=t.vertexWeights,o=s.vcount,r=s.v,u=s.inputs.JOINT.offset,l=s.inputs.WEIGHT.offset,d=t.sources[t.joints.inputs.JOINT],y=t.sources[t.joints.inputs.INV_BIND_MATRIX],c=n[s.inputs.WEIGHT.id].array;let b=0,m,k,w;for(m=0,w=o.length;m<w;m++){const H=o[m],F=[];for(k=0;k<H;k++){const P=r[b+u],he=r[b+l],ae=c[he];F.push({index:P,weight:ae}),b+=2}for(F.sort(K),k=0;k<4;k++){const P=F[k];P!==void 0?(i.indices.array.push(P.index),i.weights.array.push(P.weight)):(i.indices.array.push(0),i.weights.array.push(0))}}for(t.bindShapeMatrix?i.bindMatrix=new a.Matrix4().fromArray(t.bindShapeMatrix).transpose():i.bindMatrix=new a.Matrix4().identity(),m=0,w=d.array.length;m<w;m++){const H=d.array[m],F=new a.Matrix4().fromArray(y.array,m*y.stride).transpose();i.joints.push({name:H,boneInverse:F})}return i;function K(H,F){return F.weight-H.weight}}function A(t){return te(E.controllers[t],_)}function h(t){const e={init_from:v(t,"init_from")[0].textContent};E.images[t.getAttribute("id")]=e}function T(t){return t.build!==void 0?t.build:t.init_from}function J(t){const e=E.images[t];return e!==void 0?te(e,T):(console.warn("THREE.ColladaLoader: Couldn't find image with ID:",t),null)}function de(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"profile_COMMON":e.profile=we(s);break}}E.effects[t.getAttribute("id")]=e}function we(t){const e={surfaces:{},samplers:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"newparam":st(s,e);break;case"technique":e.technique=at(s);break;case"extra":e.extra=Ge(s);break}}return e}function st(t,e){const i=t.getAttribute("sid");for(let n=0,s=t.childNodes.length;n<s;n++){const o=t.childNodes[n];if(o.nodeType===1)switch(o.nodeName){case"surface":e.surfaces[i]=ot(o);break;case"sampler2D":e.samplers[i]=rt(o);break}}}function ot(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"init_from":e.init_from=s.textContent;break}}return e}function rt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"source":e.source=s.textContent;break}}return e}function at(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"constant":case"lambert":case"blinn":case"phong":e.type=s.nodeName,e.parameters=ct(s);break;case"extra":e.extra=Ge(s);break}}return e}function ct(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"emission":case"diffuse":case"specular":case"bump":case"ambient":case"shininess":case"transparency":e[s.nodeName]=Se(s);break;case"transparent":e[s.nodeName]={opaque:s.hasAttribute("opaque")?s.getAttribute("opaque"):"A_ONE",data:Se(s)};break}}return e}function Se(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":e[s.nodeName]=R(s.textContent);break;case"float":e[s.nodeName]=parseFloat(s.textContent);break;case"texture":e[s.nodeName]={id:s.getAttribute("texture"),extra:Ie(s)};break}}return e}function Ie(t){const e={technique:{}};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"extra":lt(s,e);break}}return e}function lt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":dt(s,e);break}}}function dt(t,e){for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"repeatU":case"repeatV":case"offsetU":case"offsetV":e.technique[s.nodeName]=parseFloat(s.textContent);break;case"wrapU":case"wrapV":s.textContent.toUpperCase()==="TRUE"?e.technique[s.nodeName]=1:s.textContent.toUpperCase()==="FALSE"?e.technique[s.nodeName]=0:e.technique[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}}function Ge(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique":e.technique=ut(s);break}}return e}function ut(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"double_sided":e[s.nodeName]=parseInt(s.textContent);break;case"bump":e[s.nodeName]=Oe(s);break}}return e}function Oe(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"texture":e[s.nodeName]={id:s.getAttribute("texture"),texcoord:s.getAttribute("texcoord"),extra:Ie(s)};break}}return e}function Fe(t){return t}function ft(t){return te(E.effects[t],Fe)}function ht(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"instance_effect":e.url=S(s.getAttribute("url"));break}}E.materials[t.getAttribute("id")]=e}function pt(t){let e,i=t.slice((t.lastIndexOf(".")-1>>>0)+2);switch(i=i.toLowerCase(),i){case"tga":e=Re;break;default:e=Ze}return e}function Pe(t){const e=ft(t.url),i=e.profile.technique;let n;switch(i.type){case"phong":case"blinn":n=new a.MeshPhongMaterial;break;case"lambert":n=new a.MeshLambertMaterial;break;default:n=new a.MeshBasicMaterial;break}n.name=t.name||"";function s(l,d=null){const y=e.profile.samplers[l.id];let c=null;if(y!==void 0){const b=e.profile.surfaces[y.source];c=J(b.init_from)}else console.warn("THREE.ColladaLoader: Undefined sampler. Access image directly (see #12530)."),c=J(l.id);if(c!==null){const b=pt(c);if(b!==void 0){const m=b.load(c),k=l.extra;if(k!==void 0&&k.technique!==void 0&&ie(k.technique)===!1){const w=k.technique;m.wrapS=w.wrapU?a.RepeatWrapping:a.ClampToEdgeWrapping,m.wrapT=w.wrapV?a.RepeatWrapping:a.ClampToEdgeWrapping,m.offset.set(w.offsetU||0,w.offsetV||0),m.repeat.set(w.repeatU||1,w.repeatV||1)}else m.wrapS=a.RepeatWrapping,m.wrapT=a.RepeatWrapping;return d!==null&&(m.colorSpace=d),m}else return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",c),null}else return console.warn("THREE.ColladaLoader: Couldn't create texture with ID:",l.id),null}const o=i.parameters;for(const l in o){const d=o[l];switch(l){case"diffuse":d.color&&n.color.fromArray(d.color),d.texture&&(n.map=s(d.texture,a.SRGBColorSpace));break;case"specular":d.color&&n.specular&&n.specular.fromArray(d.color),d.texture&&(n.specularMap=s(d.texture));break;case"bump":d.texture&&(n.normalMap=s(d.texture));break;case"ambient":d.texture&&(n.lightMap=s(d.texture,a.SRGBColorSpace));break;case"shininess":d.float&&n.shininess&&(n.shininess=d.float);break;case"emission":d.color&&n.emissive&&n.emissive.fromArray(d.color),d.texture&&(n.emissiveMap=s(d.texture,a.SRGBColorSpace));break}}a.ColorManagement.colorSpaceToWorking(n.color,a.SRGBColorSpace),n.specular&&a.ColorManagement.colorSpaceToWorking(n.specular,a.SRGBColorSpace),n.emissive&&a.ColorManagement.colorSpaceToWorking(n.emissive,a.SRGBColorSpace);let r=o.transparent,u=o.transparency;if(u===void 0&&r&&(u={float:1}),r===void 0&&u&&(r={opaque:"A_ONE",data:{color:[1,1,1,1]}}),r&&u)if(r.data.texture)n.transparent=!0;else{const l=r.data.color;switch(r.opaque){case"A_ONE":n.opacity=l[3]*u.float;break;case"RGB_ZERO":n.opacity=1-l[0]*u.float;break;case"A_ZERO":n.opacity=1-l[3]*u.float;break;case"RGB_ONE":n.opacity=l[0]*u.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',r.opaque)}n.opacity<1&&(n.transparent=!0)}if(i.extra!==void 0&&i.extra.technique!==void 0){const l=i.extra.technique;for(const d in l){const y=l[d];switch(d){case"double_sided":n.side=y===1?a.DoubleSide:a.FrontSide;break;case"bump":n.normalMap=s(y.texture),n.normalScale=new a.Vector2(1,1);break}}}return n}function mt(t){return te(E.materials[t],Pe)}function gt(t){const e={name:t.getAttribute("name")};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"optics":e.optics=bt(s);break}}E.cameras[t.getAttribute("id")]=e}function bt(t){for(let e=0;e<t.childNodes.length;e++){const i=t.childNodes[e];switch(i.nodeName){case"technique_common":return yt(i)}}return{}}function yt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"perspective":case"orthographic":e.technique=n.nodeName,e.parameters=wt(n);break}}return e}function wt(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"xfov":case"yfov":case"xmag":case"ymag":case"znear":case"zfar":case"aspect_ratio":e[n.nodeName]=parseFloat(n.textContent);break}}return e}function Ue(t){let e;switch(t.optics.technique){case"perspective":e=new a.PerspectiveCamera(t.optics.parameters.yfov,t.optics.parameters.aspect_ratio,t.optics.parameters.znear,t.optics.parameters.zfar);break;case"orthographic":let i=t.optics.parameters.ymag,n=t.optics.parameters.xmag;const s=t.optics.parameters.aspect_ratio;n=n===void 0?i*s:n,i=i===void 0?n/s:i,n*=.5,i*=.5,e=new a.OrthographicCamera(-n,n,i,-i,t.optics.parameters.znear,t.optics.parameters.zfar);break;default:e=new a.PerspectiveCamera;break}return e.name=t.name||"",e}function kt(t){const e=E.cameras[t];return e!==void 0?te(e,Ue):(console.warn("THREE.ColladaLoader: Couldn't find camera with ID:",t),null)}function Nt(t){let e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"technique_common":e=At(s);break}}E.lights[t.getAttribute("id")]=e}function At(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"directional":case"point":case"spot":case"ambient":e.technique=s.nodeName,e.parameters=Tt(s)}}return e}function Tt(t){const e={};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"color":const o=R(s.textContent);e.color=new a.Color().fromArray(o),a.ColorManagement.colorSpaceToWorking(e.color,a.SRGBColorSpace);break;case"falloff_angle":e.falloffAngle=parseFloat(s.textContent);break;case"quadratic_attenuation":const r=parseFloat(s.textContent);e.distance=r?Math.sqrt(1/r):0;break}}return e}function qe(t){let e;switch(t.technique){case"directional":e=new a.DirectionalLight;break;case"point":e=new a.PointLight;break;case"spot":e=new a.SpotLight;break;case"ambient":e=new a.AmbientLight;break}return t.parameters.color&&e.color.copy(t.parameters.color),t.parameters.distance&&(e.distance=t.parameters.distance),e}function Et(t){const e=E.lights[t];return e!==void 0?te(e,qe):(console.warn("THREE.ColladaLoader: Couldn't find light with ID:",t),null)}function xt(t){const e={name:t.getAttribute("name"),sources:{},vertices:{},primitives:[]},i=v(t,"mesh")[0];if(i!==void 0){for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;const o=s.getAttribute("id");switch(s.nodeName){case"source":e.sources[o]=_e(s);break;case"vertices":e.vertices=Ct(s);break;case"polygons":console.warn("THREE.ColladaLoader: Unsupported primitive type: ",s.nodeName);break;case"lines":case"linestrips":case"polylist":case"triangles":e.primitives.push(_t(s));break;default:console.log(s)}}E.geometries[t.getAttribute("id")]=e}}function _e(t){const e={array:[],stride:3};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"float_array":e.array=R(n.textContent);break;case"Name_array":e.array=oe(n.textContent);break;case"technique_common":const s=v(n,"accessor")[0];s!==void 0&&(e.stride=parseInt(s.getAttribute("stride")));break}}return e}function Ct(t){const e={};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];n.nodeType===1&&(e[n.getAttribute("semantic")]=S(n.getAttribute("source")))}return e}function _t(t){const e={type:t.nodeName,material:t.getAttribute("material"),count:parseInt(t.getAttribute("count")),inputs:{},stride:0,hasUV:!1};for(let i=0,n=t.childNodes.length;i<n;i++){const s=t.childNodes[i];if(s.nodeType===1)switch(s.nodeName){case"input":const o=S(s.getAttribute("source")),r=s.getAttribute("semantic"),u=parseInt(s.getAttribute("offset")),l=parseInt(s.getAttribute("set")),d=l>0?r+l:r;e.inputs[d]={id:o,offset:u},e.stride=Math.max(e.stride,u+1),r==="TEXCOORD"&&(e.hasUV=!0);break;case"vcount":e.vcount=re(s.textContent);break;case"p":e.p=re(s.textContent);break}}return e}function Lt(t){const e={};for(let i=0;i<t.length;i++){const n=t[i];e[n.type]===void 0&&(e[n.type]=[]),e[n.type].push(n)}return e}function Mt(t){let e=0;for(let i=0,n=t.length;i<n;i++)t[i].hasUV===!0&&e++;e>0&&e<t.length&&(t.uvsNeedsFix=!0)}function je(t){const e={},i=t.sources,n=t.vertices,s=t.primitives;if(s.length===0)return{};const o=Lt(s);for(const r in o){const u=o[r];Mt(u),e[r]=Rt(u,i,n)}return e}function Rt(t,e,i){const n={},s={array:[],stride:0},o={array:[],stride:0},r={array:[],stride:0},u={array:[],stride:0},l={array:[],stride:0},d={array:[],stride:4},y={array:[],stride:4},c=new a.BufferGeometry,b=[];let m=0;for(let k=0;k<t.length;k++){const w=t[k],K=w.inputs;let H=0;switch(w.type){case"lines":case"linestrips":H=w.count*2;break;case"triangles":H=w.count*3;break;case"polylist":for(let F=0;F<w.count;F++){const P=w.vcount[F];switch(P){case 3:H+=3;break;case 4:H+=6;break;default:H+=(P-2)*3;break}}break;default:console.warn("THREE.ColladaLoader: Unknown primitive type:",w.type)}c.addGroup(m,H,k),m+=H,w.material&&b.push(w.material);for(const F in K){const P=K[F];switch(F){case"VERTEX":for(const he in i){const ae=i[he];switch(he){case"POSITION":const Ae=s.array.length;if(ue(w,e[ae],P.offset,s.array),s.stride=e[ae].stride,e.skinWeights&&e.skinIndices&&(ue(w,e.skinIndices,P.offset,d.array),ue(w,e.skinWeights,P.offset,y.array)),w.hasUV===!1&&t.uvsNeedsFix===!0){const rn=(s.array.length-Ae)/s.stride;for(let et=0;et<rn;et++)r.array.push(0,0)}break;case"NORMAL":ue(w,e[ae],P.offset,o.array),o.stride=e[ae].stride;break;case"COLOR":ue(w,e[ae],P.offset,l.array),l.stride=e[ae].stride;break;case"TEXCOORD":ue(w,e[ae],P.offset,r.array),r.stride=e[ae].stride;break;case"TEXCOORD1":ue(w,e[ae],P.offset,u.array),r.stride=e[ae].stride;break;default:console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.',he)}}break;case"NORMAL":ue(w,e[P.id],P.offset,o.array),o.stride=e[P.id].stride;break;case"COLOR":ue(w,e[P.id],P.offset,l.array,!0),l.stride=e[P.id].stride;break;case"TEXCOORD":ue(w,e[P.id],P.offset,r.array),r.stride=e[P.id].stride;break;case"TEXCOORD1":ue(w,e[P.id],P.offset,u.array),u.stride=e[P.id].stride;break}}}return s.array.length>0&&c.setAttribute("position",new a.Float32BufferAttribute(s.array,s.stride)),o.array.length>0&&c.setAttribute("normal",new a.Float32BufferAttribute(o.array,o.stride)),l.array.length>0&&c.setAttribute("color",new a.Float32BufferAttribute(l.array,l.stride)),r.array.length>0&&c.setAttribute("uv",new a.Float32BufferAttribute(r.array,r.stride)),u.array.length>0&&c.setAttribute("uv1",new a.Float32BufferAttribute(u.array,u.stride)),d.array.length>0&&c.setAttribute("skinIndex",new a.Float32BufferAttribute(d.array,d.stride)),y.array.length>0&&c.setAttribute("skinWeight",new a.Float32BufferAttribute(y.array,y.stride)),n.data=c,n.type=t[0].type,n.materialKeys=b,n}function ue(t,e,i,n,s=!1){const o=t.p,r=t.stride,u=t.vcount;function l(c){let b=o[c+i]*y;const m=b+y;for(;b<m;b++)n.push(d[b]);if(s){const k=n.length-y-1;Ee.setRGB(n[k+0],n[k+1],n[k+2],a.SRGBColorSpace),n[k+0]=Ee.r,n[k+1]=Ee.g,n[k+2]=Ee.b}}const d=e.array,y=e.stride;if(t.vcount!==void 0){let c=0;for(let b=0,m=u.length;b<m;b++){const k=u[b];if(k===4){const w=c+r*0,K=c+r*1,H=c+r*2,F=c+r*3;l(w),l(K),l(F),l(K),l(H),l(F)}else if(k===3){const w=c+r*0,K=c+r*1,H=c+r*2;l(w),l(K),l(H)}else if(k>4)for(let w=1,K=k-2;w<=K;w++){const H=c+r*0,F=c+r*w,P=c+r*(w+1);l(H),l(F),l(P)}c+=r*k}}else for(let c=0,b=o.length;c<b;c+=r)l(c)}function Be(t){return te(E.geometries[t],je)}function vt(t){const e={name:t.getAttribute("name")||"",joints:{},links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":Gt(n,e);break}}E.kinematicsModels[t.getAttribute("id")]=e}function St(t){return t.build!==void 0?t.build:t}function It(t){return te(E.kinematicsModels[t],St)}function Gt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"joint":e.joints[n.getAttribute("sid")]=Ot(n);break;case"link":e.links.push(He(n));break}}}function Ot(t){let e;for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"prismatic":case"revolute":e=Ft(n);break}}return e}function Ft(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",axis:new a.Vector3,limits:{min:0,max:0},type:t.nodeName,static:!1,zeroPosition:0,middlePosition:0};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=R(n.textContent);e.axis.fromArray(s);break;case"limits":const o=n.getElementsByTagName("max")[0],r=n.getElementsByTagName("min")[0];e.limits.max=parseFloat(o.textContent),e.limits.min=parseFloat(r.textContent);break}}return e.limits.min>=e.limits.max&&(e.static=!0),e.middlePosition=(e.limits.min+e.limits.max)/2,e}function He(t){const e={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"attachment_full":e.attachments.push(Pt(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function Pt(t){const e={joint:t.getAttribute("joint").split("/").pop(),transforms:[],links:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"link":e.links.push(He(n));break;case"matrix":case"translate":case"rotate":e.transforms.push(De(n));break}}return e}function De(t){const e={type:t.nodeName},i=R(t.textContent);switch(e.type){case"matrix":e.obj=new a.Matrix4,e.obj.fromArray(i).transpose();break;case"translate":e.obj=new a.Vector3,e.obj.fromArray(i);break;case"rotate":e.obj=new a.Vector3,e.obj.fromArray(i),e.angle=a.MathUtils.degToRad(i[3]);break}return e}function Ut(t){const e={name:t.getAttribute("name")||"",rigidBodies:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"rigid_body":e.rigidBodies[n.getAttribute("name")]={},qt(n,e.rigidBodies[n.getAttribute("name")]);break}}E.physicsModels[t.getAttribute("id")]=e}function qt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"technique_common":jt(n,e);break}}}function jt(t,e){for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"inertia":e.inertia=R(n.textContent);break;case"mass":e.mass=R(n.textContent)[0];break}}}function Bt(t){const e={bindJointAxis:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"bind_joint_axis":e.bindJointAxis.push(Ht(n));break}}E.kinematicsScenes[S(t.getAttribute("url"))]=e}function Ht(t){const e={target:t.getAttribute("target").split("/").pop()};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType===1)switch(n.nodeName){case"axis":const s=n.getElementsByTagName("param")[0];e.axis=s.textContent;const o=e.axis.split("inst_").pop().split("axis")[0];e.jointIndex=o.substring(0,o.length-1);break}}return e}function Dt(t){return t.build!==void 0?t.build:t}function Vt(t){return te(E.kinematicsScenes[t],Dt)}function zt(){const t=Object.keys(E.kinematicsModels)[0],e=Object.keys(E.kinematicsScenes)[0],i=Object.keys(E.visualScenes)[0];if(t===void 0||e===void 0)return;const n=It(t),s=Vt(e),o=Ye(i),r=s.bindJointAxis,u={};for(let y=0,c=r.length;y<c;y++){const b=r[y],m=Q.querySelector('[sid="'+b.target+'"]');if(m){const k=m.parentElement;l(b.jointIndex,k)}}function l(y,c){const b=c.getAttribute("name"),m=n.joints[y];o.traverse(function(k){k.name===b&&(u[y]={object:k,transforms:Jt(c),joint:m,position:m.zeroPosition})})}const d=new a.Matrix4;Qe={joints:n&&n.joints,getJointValue:function(y){const c=u[y];if(c)return c.position;console.warn("THREE.ColladaLoader: Joint "+y+" doesn't exist.")},setJointValue:function(y,c){const b=u[y];if(b){const m=b.joint;if(c>m.limits.max||c<m.limits.min)console.warn("THREE.ColladaLoader: Joint "+y+" value "+c+" outside of limits (min: "+m.limits.min+", max: "+m.limits.max+").");else if(m.static)console.warn("THREE.ColladaLoader: Joint "+y+" is static.");else{const k=b.object,w=m.axis,K=b.transforms;le.identity();for(let H=0;H<K.length;H++){const F=K[H];if(F.sid&&F.sid.indexOf(y)!==-1)switch(m.type){case"revolute":le.multiply(d.makeRotationAxis(w,a.MathUtils.degToRad(c)));break;case"prismatic":le.multiply(d.makeTranslation(w.x*c,w.y*c,w.z*c));break;default:console.warn("THREE.ColladaLoader: Unknown joint type: "+m.type);break}else switch(F.type){case"matrix":le.multiply(F.obj);break;case"translate":le.multiply(d.makeTranslation(F.obj.x,F.obj.y,F.obj.z));break;case"scale":le.scale(F.obj);break;case"rotate":le.multiply(d.makeRotationAxis(F.obj,F.angle));break}}k.matrix.copy(le),k.matrix.decompose(k.position,k.quaternion,k.scale),u[y].position=c}}else console.log("THREE.ColladaLoader: "+y+" does not exist.")}}}function Jt(t){const e=[],i=Q.querySelector('[id="'+t.id+'"]');for(let n=0;n<i.childNodes.length;n++){const s=i.childNodes[n];if(s.nodeType!==1)continue;let o,r;switch(s.nodeName){case"matrix":o=R(s.textContent);const u=new a.Matrix4().fromArray(o).transpose();e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:u});break;case"translate":case"scale":o=R(s.textContent),r=new a.Vector3().fromArray(o),e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r});break;case"rotate":o=R(s.textContent),r=new a.Vector3().fromArray(o);const l=a.MathUtils.degToRad(o[3]);e.push({sid:s.getAttribute("sid"),type:s.nodeName,obj:r,angle:l});break}}return e}function Wt(t){const e=t.getElementsByTagName("node");for(let i=0;i<e.length;i++){const n=e[i];n.hasAttribute("id")===!1&&n.setAttribute("id",X())}}const le=new a.Matrix4,ke=new a.Vector3;function Le(t){const e={name:t.getAttribute("name")||"",type:t.getAttribute("type"),id:t.getAttribute("id"),sid:t.getAttribute("sid"),matrix:new a.Matrix4,nodes:[],instanceCameras:[],instanceControllers:[],instanceLights:[],instanceGeometries:[],instanceNodes:[],transforms:{}};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];if(n.nodeType!==1)continue;let s;switch(n.nodeName){case"node":e.nodes.push(n.getAttribute("id")),Le(n);break;case"instance_camera":e.instanceCameras.push(S(n.getAttribute("url")));break;case"instance_controller":e.instanceControllers.push(Ve(n));break;case"instance_light":e.instanceLights.push(S(n.getAttribute("url")));break;case"instance_geometry":e.instanceGeometries.push(Ve(n));break;case"instance_node":e.instanceNodes.push(S(n.getAttribute("url")));break;case"matrix":s=R(n.textContent),e.matrix.multiply(le.fromArray(s).transpose()),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"translate":s=R(n.textContent),ke.fromArray(s),e.matrix.multiply(le.makeTranslation(ke.x,ke.y,ke.z)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"rotate":s=R(n.textContent);const o=a.MathUtils.degToRad(s[3]);e.matrix.multiply(le.makeRotationAxis(ke.fromArray(s),o)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"scale":s=R(n.textContent),e.matrix.scale(ke.fromArray(s)),e.transforms[n.getAttribute("sid")]=n.nodeName;break;case"extra":break;default:console.log(n)}}return We(e.id)?console.warn("THREE.ColladaLoader: There is already a node with ID %s. Exclude current node from further processing.",e.id):E.nodes[e.id]=e,e}function Ve(t){const e={id:S(t.getAttribute("url")),materials:{},skeletons:[]};for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];switch(n.nodeName){case"bind_material":const s=n.getElementsByTagName("instance_material");for(let o=0;o<s.length;o++){const r=s[o],u=r.getAttribute("symbol"),l=r.getAttribute("target");e.materials[u]=S(l)}break;case"skeleton":e.skeletons.push(S(n.textContent));break}}return e}function Kt(t,e){const i=[],n=[];let s,o,r;for(s=0;s<t.length;s++){const d=t[s];let y;if(We(d))y=Ne(d),ze(y,e,i);else if(Qt(d)){const b=E.visualScenes[d].children;for(let m=0;m<b.length;m++){const k=b[m];if(k.type==="JOINT"){const w=Ne(k.id);ze(w,e,i)}}}else console.error("THREE.ColladaLoader: Unable to find root bone of skeleton with ID:",d)}for(s=0;s<e.length;s++)for(o=0;o<i.length;o++)if(r=i[o],r.bone.name===e[s].name){n[s]=r,r.processed=!0;break}for(s=0;s<i.length;s++)r=i[s],r.processed===!1&&(n.push(r),r.processed=!0);const u=[],l=[];for(s=0;s<n.length;s++)r=n[s],u.push(r.bone),l.push(r.boneInverse);return new a.Skeleton(u,l)}function ze(t,e,i){t.traverse(function(n){if(n.isBone===!0){let s;for(let o=0;o<e.length;o++){const r=e[o];if(r.name===n.name){s=r.boneInverse;break}}s===void 0&&(s=new a.Matrix4),i.push({bone:n,boneInverse:s,processed:!1})}})}function Yt(t){const e=[],i=t.matrix,n=t.nodes,s=t.type,o=t.instanceCameras,r=t.instanceControllers,u=t.instanceLights,l=t.instanceGeometries,d=t.instanceNodes;for(let c=0,b=n.length;c<b;c++)e.push(Ne(n[c]));for(let c=0,b=o.length;c<b;c++){const m=kt(o[c]);m!==null&&e.push(m.clone())}for(let c=0,b=r.length;c<b;c++){const m=r[c],k=A(m.id),w=Be(k.id),K=Je(w,m.materials),H=m.skeletons,F=k.skin.joints,P=Kt(H,F);for(let he=0,ae=K.length;he<ae;he++){const Ae=K[he];Ae.isSkinnedMesh&&(Ae.bind(P,k.skin.bindMatrix),Ae.normalizeSkinWeights()),e.push(Ae)}}for(let c=0,b=u.length;c<b;c++){const m=Et(u[c]);m!==null&&e.push(m.clone())}for(let c=0,b=l.length;c<b;c++){const m=l[c],k=Be(m.id),w=Je(k,m.materials);for(let K=0,H=w.length;K<H;K++)e.push(w[K])}for(let c=0,b=d.length;c<b;c++)e.push(Ne(d[c]).clone());let y;if(n.length===0&&e.length===1)y=e[0];else{y=s==="JOINT"?new a.Bone:new a.Group;for(let c=0;c<e.length;c++)y.add(e[c])}return y.name=s==="JOINT"?t.sid:t.name,y.matrix.copy(i),y.matrix.decompose(y.position,y.quaternion,y.scale),y}const Xt=new a.MeshBasicMaterial({name:a.Loader.DEFAULT_MATERIAL_NAME,color:16711935});function $t(t,e){const i=[];for(let n=0,s=t.length;n<s;n++){const o=e[t[n]];o===void 0?(console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.",t[n]),i.push(Xt)):i.push(mt(o))}return i}function Je(t,e){const i=[];for(const n in t){const s=t[n],o=$t(s.materialKeys,e);if(o.length===0&&(n==="lines"||n==="linestrips"?o.push(new a.LineBasicMaterial):o.push(new a.MeshPhongMaterial)),n==="lines"||n==="linestrips")for(let d=0,y=o.length;d<y;d++){const c=o[d];if(c.isMeshPhongMaterial===!0||c.isMeshLambertMaterial===!0){const b=new a.LineBasicMaterial;b.color.copy(c.color),b.opacity=c.opacity,b.transparent=c.transparent,o[d]=b}}const r=s.data.attributes.skinIndex!==void 0,u=o.length===1?o[0]:o;let l;switch(n){case"lines":l=new a.LineSegments(s.data,u);break;case"linestrips":l=new a.Line(s.data,u);break;case"triangles":case"polylist":r?l=new a.SkinnedMesh(s.data,u):l=new a.Mesh(s.data,u);break}i.push(l)}return i}function We(t){return E.nodes[t]!==void 0}function Ne(t){return te(E.nodes[t],Yt)}function Zt(t){const e={name:t.getAttribute("name"),children:[]};Wt(t);const i=v(t,"node");for(let n=0;n<i.length;n++)e.children.push(Le(i[n]));E.visualScenes[t.getAttribute("id")]=e}function Ke(t){const e=new a.Group;e.name=t.name;const i=t.children;for(let n=0;n<i.length;n++){const s=i[n];e.add(Ne(s.id))}return e}function Qt(t){return E.visualScenes[t]!==void 0}function Ye(t){return te(E.visualScenes[t],Ke)}function en(t){const e=v(t,"instance_visual_scene")[0];return Ye(S(e.getAttribute("url")))}function tn(){const t=E.clips;if(ie(t)===!0){if(ie(E.animations)===!1){const e=[];for(const i in E.animations){const n=B(i);for(let s=0,o=n.length;s<o;s++)e.push(n[s])}xe.push(new a.AnimationClip("default",-1,e))}}else for(const e in t)xe.push(z(e))}function nn(t){let e="";const i=[t];for(;i.length;){const n=i.shift();n.nodeType===Node.TEXT_NODE?e+=n.textContent:(e+=`
|
|
2
2
|
`,i.push(...n.childNodes))}return e.trim()}if(O.length===0)return{scene:new a.Scene};const Xe=new DOMParser().parseFromString(O,"application/xml"),Q=v(Xe,"COLLADA")[0],Me=Xe.getElementsByTagName("parsererror")[0];if(Me!==void 0){const t=v(Me,"div")[0];let e;return t?e=t.textContent:e=nn(Me),console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
3
3
|
`,e),null}const sn=Q.getAttribute("version");console.debug("THREE.ColladaLoader: File version",sn);const $e=ge(v(Q,"asset")[0]),Ze=new a.TextureLoader(this.manager);Ze.setPath(this.resourcePath||ee).setCrossOrigin(this.crossOrigin);let Re;tt&&(Re=new tt(this.manager),Re.setPath(this.resourcePath||ee));const Ee=new a.Color,xe=[];let Qe={},on=0;const E={animations:{},clips:{},controllers:{},images:{},effects:{},materials:{},cameras:{},lights:{},geometries:{},nodes:{},visualScenes:{},kinematicsModels:{},physicsModels:{},kinematicsScenes:{}};Z(Q,"library_animations","animation",pe),Z(Q,"library_animation_clips","animation_clip",f),Z(Q,"library_controllers","controller",D),Z(Q,"library_images","image",h),Z(Q,"library_effects","effect",de),Z(Q,"library_materials","material",ht),Z(Q,"library_cameras","camera",gt),Z(Q,"library_lights","light",Nt),Z(Q,"library_geometries","geometry",xt),Z(Q,"library_nodes","node",Le),Z(Q,"library_visual_scenes","visual_scene",Zt),Z(Q,"library_kinematics_models","kinematics_model",vt),Z(Q,"library_physics_models","physics_model",Ut),Z(Q,"scene","instance_kinematics_scene",Bt),se(E.animations,U),se(E.clips,Y),se(E.controllers,_),se(E.images,T),se(E.effects,Fe),se(E.materials,Pe),se(E.cameras,Ue),se(E.lights,qe),se(E.geometries,je),se(E.visualScenes,Ke),tn(),zt();const Ce=en(v(Q,"scene")[0]);return Ce.animations=xe,$e.upAxis==="Z_UP"&&(console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."),Ce.rotation.set(-Math.PI/2,0,0)),Ce.scale.multiplyScalar($e.unit),{get animations(){return console.warn("THREE.ColladaLoader: Please access animations over scene.animations now."),xe},kinematics:Qe,library:E,scene:Ce}}}const ve=new a.Quaternion,nt=new a.Euler;function Te(fe){return fe?fe.trim().split(/\s+/g).map(O=>parseFloat(O)):[0,0,0]}function it(fe,O,ee=!1){ee||fe.rotation.set(0,0,0),nt.set(O[0],O[1],O[2],"ZYX"),ve.setFromEuler(nt),ve.multiply(fe.quaternion),fe.quaternion.copy(ve)}class ln{constructor(O){this.manager=O||a.DefaultLoadingManager,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(O){return new Promise((ee,v)=>{this.load(O,ee,null,v)})}load(O,ee,v,oe){const R=this.manager,re=a.LoaderUtils.extractUrlBase(O),S=this.manager.resolveURL(O);R.itemStart(S),fetch(S,this.fetchOptions).then(X=>{if(X.ok)return v&&v(null),X.text();throw new Error(`URDFLoader: Failed to load url '${S}' with error code ${X.status} : ${X.statusText}.`)}).then(X=>{const ie=this.parse(X,this.workingPath||re);ee(ie),R.itemEnd(S)}).catch(X=>{oe?oe(X):console.error("URDFLoader: Error loading file.",X),R.itemError(S),R.itemEnd(S)})}parse(O,ee=this.workingPath){const v=this.packages,oe=this.loadMeshCb,R=this.parseVisual,re=this.parseCollision,S=this.manager,X={},ie={},ge={};function be(I){if(!/^package:\/\//.test(I))return ee?ee+I:I;const[U,B]=I.replace(/^package:\/\//,"").split(/\/(.+)/);if(typeof v=="string")return v.endsWith(U)?v+"/"+B:v+"/"+U+"/"+B;if(v instanceof Function)return v(U)+"/"+B;if(typeof v=="object")return U in v?v[U]+"/"+B:(console.error(`URDFLoader : ${U} not found in provided package list.`),null)}function ye(I){let U;I instanceof Document?U=[...I.children]:I instanceof Element?U=[I]:U=[...new DOMParser().parseFromString(I,"text/xml").children];const B=U.filter(x=>x.nodeName==="robot").pop();return Z(B)}function Z(I){const U=[...I.children],B=U.filter(M=>M.nodeName.toLowerCase()==="link"),x=U.filter(M=>M.nodeName.toLowerCase()==="joint"),W=U.filter(M=>M.nodeName.toLowerCase()==="material"),G=new a.URDFRobot;G.robotName=I.getAttribute("name"),G.urdfRobotNode=I,W.forEach(M=>{const N=M.getAttribute("name");ge[N]=pe(M)});const g={},p={};B.forEach(M=>{const N=M.getAttribute("name"),q=I.querySelector(`child[link="${N}"]`)===null;X[N]=te(M,g,p,q?G:null)}),x.forEach(M=>{const N=M.getAttribute("name");ie[N]=se(M)}),G.joints=ie,G.links=X,G.colliders=p,G.visual=g;const L=Object.values(ie);return L.forEach(M=>{M instanceof a.URDFMimicJoint&&ie[M.mimicJoint].mimicJoints.push(M)}),L.forEach(M=>{const N=new Set,q=ce=>{if(N.has(ce))throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");N.add(ce),ce.mimicJoints.forEach(ne=>{q(ne)})};q(M)}),G.frames={...p,...g,...X,...ie},G}function se(I){const U=[...I.children],B=I.getAttribute("type");let x;const W=U.find(N=>N.nodeName.toLowerCase()==="mimic");W?(x=new a.URDFMimicJoint,x.mimicJoint=W.getAttribute("joint"),x.multiplier=parseFloat(W.getAttribute("multiplier")||1),x.offset=parseFloat(W.getAttribute("offset")||0)):x=new a.URDFJoint,x.urdfNode=I,x.name=I.getAttribute("name"),x.urdfName=x.name,x.jointType=B;let G=null,g=null,p=[0,0,0],L=[0,0,0];U.forEach(N=>{const q=N.nodeName.toLowerCase();q==="origin"?(p=Te(N.getAttribute("xyz")),L=Te(N.getAttribute("rpy"))):q==="child"?g=X[N.getAttribute("link")]:q==="parent"?G=X[N.getAttribute("link")]:q==="limit"&&(x.limit.lower=parseFloat(N.getAttribute("lower")||x.limit.lower),x.limit.upper=parseFloat(N.getAttribute("upper")||x.limit.upper))}),G.add(x),x.add(g),it(x,L),x.position.set(p[0],p[1],p[2]);const M=U.filter(N=>N.nodeName.toLowerCase()==="axis")[0];if(M){const N=M.getAttribute("xyz").split(/\s+/g).map(q=>parseFloat(q));x.axis=new a.Vector3(N[0],N[1],N[2]),x.axis.normalize()}return x}function te(I,U,B,x=null){x===null&&(x=new a.URDFLink);const W=[...I.children];return x.name=I.getAttribute("name"),x.urdfName=x.name,x.urdfNode=I,R&&W.filter(g=>g.nodeName.toLowerCase()==="visual").forEach(g=>{const p=me(g,ge);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,U[L]=p}}),re&&W.filter(g=>g.nodeName.toLowerCase()==="collision").forEach(g=>{const p=me(g);if(x.add(p),g.hasAttribute("name")){const L=g.getAttribute("name");p.name=L,p.urdfName=L,B[L]=p}}),x}function pe(I){const U=[...I.children],B=new a.MeshPhongMaterial;return B.name=I.getAttribute("name")||"",U.forEach(x=>{const W=x.nodeName.toLowerCase();if(W==="color"){const G=x.getAttribute("rgba").split(/\s/g).map(g=>parseFloat(g));B.color.setRGB(G[0],G[1],G[2]),B.opacity=G[3],B.transparent=G[3]<1,B.depthWrite=!B.transparent}else if(W==="texture"){const G=x.getAttribute("filename");if(G){const g=new a.TextureLoader(S),p=be(G);B.map=g.load(p),B.map.colorSpace=a.SRGBColorSpace}}}),B}function me(I,U={}){const B=I.nodeName.toLowerCase()==="collision",x=[...I.children];let W=null;const G=x.filter(p=>p.nodeName.toLowerCase()==="material")[0];if(G){const p=G.getAttribute("name");p&&p in U?W=U[p]:W=pe(G)}else W=new a.MeshPhongMaterial;const g=B?new a.URDFCollider:new a.URDFVisual;return g.urdfNode=I,x.forEach(p=>{const L=p.nodeName.toLowerCase();if(L==="geometry"){const M=p.children[0].nodeName.toLowerCase();if(M==="mesh"){const N=p.children[0].getAttribute("filename"),q=be(N);if(q!==null){const ce=p.children[0].getAttribute("scale");if(ce){const ne=Te(ce);g.scale.set(ne[0],ne[1],ne[2])}oe(q,S,(ne,f)=>{f?console.error("URDFLoader: Error loading mesh.",f):ne&&(ne instanceof a.Mesh&&(ne.material=W),ne.position.set(0,0,0),ne.quaternion.identity(),g.add(ne))})}}else if(M==="box"){const N=new a.Mesh;N.geometry=new a.BoxGeometry(1,1,1),N.material=W;const q=Te(p.children[0].getAttribute("size"));N.scale.set(q[0],q[1],q[2]),g.add(N)}else if(M==="sphere"){const N=new a.Mesh;N.geometry=new a.SphereGeometry(1,30,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0;N.scale.set(q,q,q),g.add(N)}else if(M==="cylinder"){const N=new a.Mesh;N.geometry=new a.CylinderGeometry(1,1,1,30),N.material=W;const q=parseFloat(p.children[0].getAttribute("radius"))||0,ce=parseFloat(p.children[0].getAttribute("length"))||0;N.scale.set(q,ce,q),N.rotation.set(Math.PI/2,0,0),g.add(N)}}else if(L==="origin"){const M=Te(p.getAttribute("xyz")),N=Te(p.getAttribute("rpy"));g.position.set(M[0],M[1],M[2]),g.rotation.set(0,0,0),it(g,N)}}),g}return ye(O)}defaultMeshLoader(O,ee,v){/\.stl$/i.test(O)?new an.STLLoader(ee).load(O,R=>{const re=new a.Mesh(R,new a.MeshPhongMaterial);v(re)}):/\.dae$/i.test(O)?new cn(ee).load(O,R=>v(R.scene)):console.warn(`URDFLoader: Could not load model at ${O}.
|
|
4
4
|
No loader available`)}}exports.URDFLoader=ln;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { c as
|
|
1
|
+
import { g as K, aF as C, c as x, a9 as N, bH as S } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js";
|
|
2
|
+
import { c as O } from "./index-sMsCzNtW.js";
|
|
3
3
|
const g = async (n) => {
|
|
4
4
|
const e = n.join("/"), c = sessionStorage.getItem("systemKey");
|
|
5
|
-
return await
|
|
5
|
+
return await K(e, c, "");
|
|
6
6
|
}, R = (n) => {
|
|
7
7
|
var s;
|
|
8
8
|
const e = n == null ? void 0 : n.compData, c = (s = e == null ? void 0 : e.find((i) => {
|
|
@@ -13,7 +13,7 @@ const g = async (n) => {
|
|
|
13
13
|
const { prop: p, value: D } = i;
|
|
14
14
|
r[p] = D;
|
|
15
15
|
}), r;
|
|
16
|
-
},
|
|
16
|
+
}, H = async () => {
|
|
17
17
|
let n = {};
|
|
18
18
|
const c = await g(["弯管仿真加工分析", "模具筛选安装"]), r = C("输入(加工件)", c), s = R(r), i = s.管长 || 0, p = s.外径 || 0;
|
|
19
19
|
console.log("管长", i, "外径", p, s);
|
|
@@ -21,27 +21,27 @@ const g = async (n) => {
|
|
|
21
21
|
console.log("夹持长度", P, b);
|
|
22
22
|
const G = Number(P), m = {}, l = await g(["弯管仿真加工分析", "仿真动画生成"]);
|
|
23
23
|
l == null || l.forEach((a) => {
|
|
24
|
-
var M, d, f, y, w,
|
|
24
|
+
var M, d, f, y, w, F;
|
|
25
25
|
if ((a == null ? void 0 : a.comp) === "Table") {
|
|
26
|
-
let
|
|
26
|
+
let L = [], u = (f = (d = (M = a == null ? void 0 : a.compData) == null ? void 0 : M.find((t) => (t == null ? void 0 : t.key) === "header")) == null ? void 0 : d.contents) == null ? void 0 : f.map((t) => t == null ? void 0 : t.label), h = (F = (w = (y = a == null ? void 0 : a.compData) == null ? void 0 : y.find((t) => (t == null ? void 0 : t.key) === "tableContents")) == null ? void 0 : w.contents) == null ? void 0 : F.map((t) => (t = t == null ? void 0 : t.filter((o) => !(o != null && o.id)), t));
|
|
27
27
|
h == null || h.forEach((t) => {
|
|
28
|
-
|
|
28
|
+
L.push(
|
|
29
29
|
x(
|
|
30
30
|
t,
|
|
31
31
|
u == null ? void 0 : u.filter((o) => o !== "操作")
|
|
32
32
|
)
|
|
33
33
|
);
|
|
34
|
-
}), m[a.name] =
|
|
34
|
+
}), m[a.name] = L, m[a.name + "Content"] = a;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
const A =
|
|
37
|
+
const A = O(m) || [];
|
|
38
38
|
return n = {
|
|
39
39
|
initialPipeLength: D,
|
|
40
40
|
pipeRadius: T,
|
|
41
41
|
clampLength: G,
|
|
42
42
|
animationData: A
|
|
43
43
|
}, n;
|
|
44
|
-
},
|
|
44
|
+
}, q = async () => {
|
|
45
45
|
let n = {};
|
|
46
46
|
const c = await g(["双弯管仿真加工分析", "模具筛选安装"]), r = C("输入(加工件)", c), s = R(r), i = s.管长 || 0, p = s.外径 || 0;
|
|
47
47
|
console.log("管长", i, "外径", p, s);
|
|
@@ -49,34 +49,34 @@ const g = async (n) => {
|
|
|
49
49
|
console.log("夹持长度", P, b);
|
|
50
50
|
const G = Number(P), m = {}, l = await g(["双弯管仿真加工分析", "仿真动画生成"]);
|
|
51
51
|
l == null || l.forEach((a) => {
|
|
52
|
-
var M, d, f, y, w,
|
|
52
|
+
var M, d, f, y, w, F;
|
|
53
53
|
if ((a == null ? void 0 : a.comp) === "Table") {
|
|
54
|
-
let
|
|
54
|
+
let L = [], u = (f = (d = (M = a == null ? void 0 : a.compData) == null ? void 0 : M.find((t) => (t == null ? void 0 : t.key) === "header")) == null ? void 0 : d.contents) == null ? void 0 : f.map((t) => t == null ? void 0 : t.label), h = (F = (w = (y = a == null ? void 0 : a.compData) == null ? void 0 : y.find((t) => (t == null ? void 0 : t.key) === "tableContents")) == null ? void 0 : w.contents) == null ? void 0 : F.map((t) => (t = t == null ? void 0 : t.filter((o) => !(o != null && o.id)), t));
|
|
55
55
|
h == null || h.forEach((t) => {
|
|
56
|
-
|
|
56
|
+
L.push(
|
|
57
57
|
x(
|
|
58
58
|
t,
|
|
59
59
|
u == null ? void 0 : u.filter((o) => o !== "操作")
|
|
60
60
|
)
|
|
61
61
|
);
|
|
62
|
-
}), m[a.name] =
|
|
62
|
+
}), m[a.name] = L, m[a.name + "Content"] = a;
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
|
-
const A =
|
|
65
|
+
const A = O(m) || [];
|
|
66
66
|
return n = {
|
|
67
67
|
initialPipeLength: D,
|
|
68
68
|
pipeRadius: T,
|
|
69
69
|
clampLength: G,
|
|
70
70
|
animationData: A
|
|
71
71
|
}, n;
|
|
72
|
-
}, V = async (n) => await
|
|
72
|
+
}, V = async (n) => await N(n), X = async (n) => await S(n), z = async (n) => {
|
|
73
73
|
const e = await V(n);
|
|
74
74
|
return await X(e);
|
|
75
75
|
};
|
|
76
76
|
export {
|
|
77
|
-
|
|
77
|
+
q as a,
|
|
78
78
|
R as b,
|
|
79
|
-
|
|
79
|
+
H as f,
|
|
80
80
|
g,
|
|
81
|
-
|
|
81
|
+
z as i
|
|
82
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";const p=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs"),x=require("./index-C8fMwErX.cjs"),D=async n=>{const a=n.join("/"),c=sessionStorage.getItem("systemKey");return await p.getItemData(a,c,"")},T=n=>{var s;const a=n==null?void 0:n.compData,c=(s=a==null?void 0:a.find(i=>{const{key:r}=i;return r==="formContent"}))==null?void 0:s.contents,l={};return c==null||c.forEach(i=>{const{prop:r,value:b}=i;l[r]=b}),l},V=async()=>{let n={};const c=await D(["弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["弯管仿真加工分析","加工位姿生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持长度||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},j=async()=>{let n={};const c=await D(["双弯管仿真加工分析","模具筛选安装"]),l=p.getTargetGroup("输入(加工件)",c),s=T(l),i=s.管长||0,r=s.外径||0;console.log("管长",i,"外径",r,s);const b=i,_=r/2,G=await D(["双弯管仿真加工分析","加工工艺生成"]),R=p.getTargetGroup("输入",G),d=T(R),P=d.夹持位置||0;console.log("夹持长度",P,d);const A=Number(P),u={},m=await D(["双弯管仿真加工分析","仿真动画生成"]);m==null||m.forEach(e=>{var y,M,f,w,F,L;if((e==null?void 0:e.comp)==="Table"){let C=[],h=(f=(M=(y=e==null?void 0:e.compData)==null?void 0:y.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:M.contents)==null?void 0:f.map(t=>t==null?void 0:t.label),g=(L=(F=(w=e==null?void 0:e.compData)==null?void 0:w.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:F.contents)==null?void 0:L.map(t=>(t=t==null?void 0:t.filter(o=>!(o!=null&&o.id)),t));g==null||g.forEach(t=>{C.push(p.getValueToObjectValue(t,h==null?void 0:h.filter(o=>o!=="操作")))}),u[e.name]=C,u[e.name+"Content"]=e}});const k=x.cloneDeep(u)||[];return n={initialPipeLength:b,pipeRadius:_,clampLength:A,animationData:k},n},B=async n=>await p.downloadFile(n),S=async n=>await p.readCsv(n),X=async n=>{const a=await B(n);return await S(a)};exports.fetchDoubleRobotAnimationData=j;exports.fetchSingleRobotAnimationData=V;exports.getFormData=T;exports.getMenuData=D;exports.initXYZBCList=X;
|