PageSourceSearch

https://elysiatools.com/_next/static/chunks/2519.fc693a105cc89ea2.js

js elysiatools.com collected 2026-10-02 00:18:44 UTC 8,699 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2519],{2519:(e,t,s)=>{s.d(t,{OBJLoader:()=>g});var i=s(7720);let r=/^[og]\s*(.+)?/,o=/^mtllib /,n=/^usemtl /,l=/^usemap /,a=/\s+/,h=new i.Pq0,c=new i.Pq0,u=new i.Pq0,p=new i.Pq0,m=new i.Pq0,d=new i.Q1f;function f(){let e={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(e,t){if(this.object&&!1===this.object.fromDeclaration){this.object.name=e,this.object.fromDeclaration=!1!==t;return}let s=this.object&&"function"==typeof this.object.currentMaterial?this.object.currentMaterial():void 0;if(this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0),this.object={name:e||"",fromDeclaration:!1!==t,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(e,t){let s=this._finalize(!1);s&&(s.inherited||s.groupCount<=0)&&this.materials.splice(s.index,1);let i={index:this.materials.length,name:e||"",mtllib:Array.isArray(t)&&t.length>0?t[t.length-1]:"",smooth:void 0!==s?s.smooth:this.smooth,groupStart:void 0!==s?s.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){let t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(i),i},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){let t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},s&&s.name&&"function"==typeof s.clone){let e=s.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){let s=parseInt(e,10);return(s>=0?s-1:s+t/3)*3},parseNormalIndex:function(e,t){let s=parseInt(e,10);return(s>=0?s-1:s+t/3)*3},parseUVIndex:function(e,t){let s=parseInt(e,10);return(s>=0?s-1:s+t/2)*2},addVertex:function(e,t,s){let i=this.vertices,r=this.object.geometry.vertices;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[s+0],i[s+1],i[s+2])},addVertexPoint:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){let t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,s){let i=this.normals,r=this.object.geometry.normals;r.push(i[e+0],i[e+1],i[e+2]),r.push(i[t+0],i[t+1],i[t+2]),r.push(i[s+0],i[s+1],i[s+2])},addFaceNormal:function(e,t,s){let i=this.vertices,r=this.object.geometry.normals;h.fromArray(i,e),c.fromArray(i,t),u.fromArray(i,s),m.subVectors(u,c),p.subVectors(h,c),m.cross(p),m.normalize(),r.push(m.x,m.y,m.z),r.push(m.x,m.y,m.z),r.push(m.x,m.y,m.z)},addColor:function(e,t,s){let i=this.colors,r=this.object.geometry.colors;void 0!==i[e]&&r.push(i[e+0],i[e+1],i[e+2]),void 0!==i[t]&&r.push(i[t+0],i[t+1],i[t+2]),void 0!==i[s]&&r.push(i[s+0],i[s+1],i[s+2])},addUV:function(e,t,s){let i=this.uvs,r=this.object.geometry.uvs;r.push(i[e+0],i[e+1]),r.push(i[t+0],i[t+1]),r.push(i[s+0],i[s+1])},addDefaultUV:function(){let e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){let t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,s,i,r,o,n,l,a){let h=this.vertices.length,c=this.parseVertexIndex(e,h),u=this.parseVertexIndex(t,h),p=this.parseVertexIndex(s,h);if(this.addVertex(c,u,p),this.addColor(c,u,p),void 0!==n&&""!==n){let e=this.normals.length;c=this.parseNormalIndex(n,e),u=this.parseNormalIndex(l,e),p=this.parseNormalIndex(a,e),this.addNormal(c,u,p)}else this.addFaceNormal(c,u,p);if(void 0!==i&&""!==i){let e=this.uvs.length;c=this.parseUVIndex(i,e),u=this.parseUVIndex(r,e),p=this.parseUVIndex(o,e),this.addUV(c,u,p),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";let t=this.vertices.length;for(let s=0,i=e.length;s<i;s++){let i=this.parseVertexIndex(e[s],t);
1this.addVertexPoint(i),this.addColor(i)}},addLineGeometry:function(e,t){this.object.geometry.type="Line";let s=this.vertices.length,i=this.uvs.length;for(let t=0,i=e.length;t<i;t++)this.addVertexLine(this.parseVertexIndex(e[t],s));for(let e=0,s=t.length;e<s;e++)this.addUVLine(this.parseUVIndex(t[e],i))}};return e.startObject("",!1),e}class g extends i.aHM{constructor(e){super(e),this.materials=null}load(e,t,s,r){let o=this,n=new i.Y9S(this.manager);n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(e,function(s){try{t(o.parse(s))}catch(t){r?r(t):console.error(t),o.manager.itemError(e)}},s,r)}setMaterials(e){return this.materials=e,this}parse(e){let t=new f;-1!==e.indexOf("\r\n")&&(e=e.replace(/\r\n/g,"\n")),-1!==e.indexOf("\\\n")&&(e=e.replace(/\\\n/g,""));let s=e.split("\n"),h=[];for(let e=0,c=s.length;e<c;e++){let c=s[e].trimStart();if(0===c.length)continue;let u=c.charAt(0);if("#"!==u)if("v"===u){let e=c.split(a);switch(e[0]){case"v":t.vertices.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3])),e.length>=7?(d.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6]),i.er$),t.colors.push(d.r,d.g,d.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===u){let e=c.slice(1).trim().split(a),s=[];for(let t=0,i=e.length;t<i;t++){let i=e[t];if(i.length>0){let e=i.split("/");s.push(e)}}let i=s[0];for(let e=1,r=s.length-1;e<r;e++){let r=s[e],o=s[e+1];t.addFace(i[0],r[0],o[0],i[1],r[1],o[1],i[2],r[2],o[2])}}else if("l"===u){let e=c.substring(1).trim().split(" "),s=[],i=[];if(-1===c.indexOf("/"))s=e;else for(let t=0,r=e.length;t<r;t++){let r=e[t].split("/");""!==r[0]&&s.push(r[0]),""!==r[1]&&i.push(r[1])}t.addLineGeometry(s,i)}else if("p"===u){let e=c.slice(1).trim().split(" ");t.addPointGeometry(e)}else if(null!==(h=r.exec(c))){let e=(" "+h[0].slice(1).trim()).slice(1);t.startObject(e)}else if(n.test(c))t.object.startMaterial(c.substring(7).trim(),t.materialLibraries);else if(o.test(c))t.materialLibraries.push(c.substring(7).trim());else if(l.test(c))console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');else if("s"===u){if((h=c.split(" ")).length>1){let e=h[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;let e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===c)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+c+'"')}}t.finalize();let c=new i.YJl;if(c.materialLibraries=[].concat(t.materialLibraries),!0==(1!==t.objects.length||0!==t.objects[0].geometry.vertices.length))for(let e=0,s=t.objects.length;e<s;e++){let s,r=t.objects[e],o=r.geometry,n=r.materials,l="Line"===o.type,a="Points"===o.type,h=!1;if(0===o.vertices.length)continue;let u=new i.LoY;u.setAttribute("position",new i.qtW(o.vertices,3)),o.normals.length>0&&u.setAttribute("normal",new i.qtW(o.normals,3)),o.colors.length>0&&(h=!0,u.setAttribute("color",new i.qtW(o.colors,3))),!0===o.hasUVIndices&&u.setAttribute("uv",new i.qtW(o.uvs,2));let p=[];for(let e=0,s=n.length;e<s;e++){let s=n[e],r=s.name+"_"+s.smooth+"_"+h,o=t.materials[r];if(null!==this.materials)if(o=this.materials.create(s.name),!l||!o||o instanceof i.mrM){if(a&&o&&!(o instanceof i.BH$)){let e=new i.BH$({size:10,sizeAttenuation:!1});i.imn.prototype.copy.call(e,o),e.color.copy(o.color),e.map=o.map,o=e}}else{let e=new i.mrM;i.imn.prototype.copy.call(e,o),e.color.copy(o.color),o=e}void 0===o&&((o=l?new i.mrM:a?new i.BH$({size:1,sizeAttenuation:!1}):new i.tXL).name=s.name,o.flatShading=!s.smooth,o.vertexColors=h,t.materials[r]=o),p.push(o)}if(p.length>1){for(let e=0,t=n.length;e<t;e++){let t=n[e];u.addGroup(t.groupStart,t.groupCount,e)}s=l?new i.DXC(u,p):a?new i.ONl(u,p):new i.eaF(u,p)}else s=l?new i.DXC(u,p[0]):a?new i.ONl(u,p[0]):new i.eaF(u,p[0]);s.name=r.name,c.add(s)}else if(t.vertices.length>0){let e=new i.BH$({size:1,sizeAttenuation:!1}),s=new i.LoY;s.setAttribute("position",new i.qtW(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(s.setAttribute("color",new i.qtW(t.colors,3)),e.vertexColors=!0);let r=new i.ONl(s,e);c.add(r)}return c}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.