1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="455e47e1-0331-4dcd-bae8-bd1717fbdc2e",e._sentryDebugIdIdentifier="sentry-dbid-455e47e1-0331-4dcd-bae8-bd1717fbdc2e")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8524],{58524:(e,t,s)=>{s.r(t),s.d(t,{MTLLoader:()=>r});var a=s(7978);class r extends a.aHM{load(e,t,s,r){let i=this,o=""===this.path?a.r6x.extractUrlBase(e):this.path,n=new a.Y9S(this.manager);n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(e,function(s){try{t(i.parse(s,o))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}},s,r)}setMaterialOptions(e){return this.materialOptions=e,this}parse(e,t){let s=e.split("\n"),a={},r=/\s+/,o={};for(let e=0;e<s.length;e++){let t=s[e];if(0===(t=t.trim()).length||"#"===t.charAt(0))continue;let i=t.indexOf(" "),n=i>=0?t.substring(0,i):t;n=n.toLowerCase();let l=i>=0?t.substring(i+1):"";if(l=l.trim(),"newmtl"===n)a={name:l},o[l]=a;else if("ka"===n||"kd"===n||"ks"===n||"ke"===n){let e=l.split(r,3);a[n]=[parseFloat(e[0]),parseFloat(e[1]),parseFloat(e[2])]}else a[n]=l}let n=new i(this.resourcePath||t,this.materialOptions);return n.setCrossOrigin(this.crossOrigin),n.setManager(this.manager),n.setMaterials(o),n}constructor(e){super(e)}}class i{setCrossOrigin(e){return this.crossOrigin=e,this}setManager(e){this.manager=e}setMaterials(e){this.materialsInfo=this.convert(e),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(e){if(!this.options)return e;let t={};for(let s in e){let a=e[s],r={};for(let e in t[s]=r,a){let t=!0,s=a[e],i=e.toLowerCase();switch(i){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(s=[s[0]/255,s[1]/255,s[2]/255]),this.options&&this.options.ignoreZeroRGBs&&0===s[0]&&0===s[1]&&0===s[2]&&(t=!1)}t&&(r[i]=s)}}return t}preload(){for(let e in this.materialsInfo)this.create(e)}getIndex(e){return this.nameLookup[e]}getAsArray(){let e=0;for(let t in this.materialsInfo)this.materialsArray[e]=this.create(t),this.nameLookup[t]=e,e++;return this.materialsArray}create(e){return void 0===this.materials[e]&&this.createMaterial_(e),this.materials[e]}createMaterial_(e){let t=this,s=this.materialsInfo[e],r={name:e,side:this.side};function i(e,s){var i,o;if(r[e])return;let n=t.getTextureParams(s,r),l=t.loadTexture((i=t.baseUrl,"string"!=typeof(o=n.url)||""===o?"":/^https?:\/\//i.test(o)?o:i+o));l.repeat.copy(n.scale),l.offset.copy(n.offset),l.wrapS=t.wrap,l.wrapT=t.wrap,("map"===e||"emissiveMap"===e)&&(l.colorSpace=a.er$),r[e]=l}for(let e in s){let t;let o=s[e];if(""!==o)switch(e.toLowerCase()){case"kd":r.color=a.ppV.colorSpaceToWorking(new a.Q1f().fromArray(o),a.er$);break;case"ks":r.specular=a.ppV.colorSpaceToWorking(new a.Q1f().fromArray(o),a.er$);break;case"ke":r.emissive=a.ppV.colorSpaceToWorking(new a.Q1f().fromArray(o),a.er$);break;case"map_kd":i("map",o);break;case"map_ks":i("specularMap",o);break;case"map_ke":i("emissiveMap",o);break;case"norm":i("normalMap",o);break;case"map_bump":case"bump":i("bumpMap",o);break;case"disp":i("displacementMap",o);break;case"map_d":i("alphaMap",o),r.transparent=!0;break;case"ns":r.shininess=parseFloat(o);break;case"d":(t=parseFloat(o))<1&&(r.opacity=t,r.transparent=!0);break;case"tr":t=parseFloat(o),this.options&&this.options.invertTrProperty&&(t=1-t),t>0&&(r.opacity=1-t,r.transparent=!0)}}return this.materials[e]=new a.tXL(r),this.materials[e]}getTextureParams(e,t){let s;let r={scale:new a.I9Y(1,1),offset:new a.I9Y(0,0)},i=e.split(/\s+/);return(s=i.indexOf("-bm"))>=0&&(t.bumpScale=parseFloat(i[s+1]),i.splice(s,2)),(s=i.indexOf("-mm"))>=0&&(t.displacementBias=parseFloat(i[s+1]),t.displacementScale=parseFloat(i[s+2]),i.splice(s,3)),(s=i.indexOf("-s"))>=0&&(r.scale.set(parseFloat(i[s+1]),parseFloat(i[s+2])),i.splice(s,4)),(s=i.indexOf("-o"))>=0&&(r.offset.set(parseFloat(i[s+1]),parseFloat(i[s+2])),i.splice(s,4)),r.url=i.join(" ").trim(),r}loadTexture(e,t,s,r,i){let o=void 0!==this.manager?this.manager:a.h_9,n=o.getHandler(e);null===n&&(n=new a.Tap(o)),n.setCrossOrigin&&n.setCrossOrigin(this.crossOrigin);let l=n.load(e,s,r,i);return void 0!==t&&(l.mapping=t),l}constructor(e="",t={}){this.baseUrl=e,this.options=t,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=void 0!==this.options.side?this.options.side:a.hB5,this.wrap=void 0!==this.options.wrap?this.options.wrap:a.GJx}}}}]);
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.