{"ast":null,"code":"import { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { StandardMaterial } from \"@babylonjs/core/Materials/standardMaterial.js\";\n/**\n * Class reading and parsing the MTL file bundled with the obj file.\n */\nexport class MTLFileLoader {\n constructor() {\n /**\n * All material loaded from the mtl will be set here\n */\n this.materials = [];\n }\n /**\n * This function will read the mtl file and create each material described inside\n * This function could be improve by adding :\n * -some component missing (Ni, Tf...)\n * -including the specific options available\n *\n * @param scene defines the scene the material will be created in\n * @param data defines the mtl data to parse\n * @param rootUrl defines the rooturl to use in order to load relative dependencies\n * @param assetContainer defines the asset container to store the material in (can be null)\n */\n parseMTL(scene, data, rootUrl, assetContainer) {\n if (data instanceof ArrayBuffer) {\n return;\n }\n //Split the lines from the file\n const lines = data.split(\"\\n\");\n // whitespace char ie: [ \\t\\r\\n\\f]\n const delimiter_pattern = /\\s+/;\n //Array with RGB colors\n let color;\n //New material\n let material = null;\n //Look at each line\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i].trim();\n // Blank line or comment\n if (line.length === 0 || line.charAt(0) === \"#\") {\n continue;\n }\n //Get the first parameter (keyword)\n const pos = line.indexOf(\" \");\n let key = pos >= 0 ? line.substring(0, pos) : line;\n key = key.toLowerCase();\n //Get the data following the key\n const value = pos >= 0 ? line.substring(pos + 1).trim() : \"\";\n //This mtl keyword will create the new material\n if (key === \"newmtl\") {\n //Check if it is the first material.\n // Materials specifications are described after this keyword.\n if (material) {\n //Add the previous material in the material array.\n this.materials.push(material);\n }\n //Create a new material.\n // value is the name of the material read in the mtl file\n scene._blockEntityCollection = !!assetContainer;\n material = new StandardMaterial(value, scene);\n material._parentContainer = assetContainer;\n scene._blockEntityCollection = false;\n } else if (key === \"kd\" && material) {\n // Diffuse color (color under white light) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set tghe color into the material\n material.diffuseColor = Color3.FromArray(color);\n } else if (key === \"ka\" && material) {\n // Ambient color (color under shadow) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set tghe color into the material\n material.ambientColor = Color3.FromArray(color);\n } else if (key === \"ks\" && material) {\n // Specular color (color when light is reflected from shiny surface) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set the color into the material\n material.specularColor = Color3.FromArray(color);\n } else if (key === \"ke\" && material) {\n // Emissive color using RGB values\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n material.emissiveColor = Color3.FromArray(color);\n } else if (key === \"ns\" && material) {\n //value = \"Integer\"\n material.specularPower = parseFloat(value);\n } else if (key === \"d\" && material) {\n //d is dissolve for current material. It mean alpha for BABYLON\n material.alpha = parseFloat(value);\n //Texture\n //This part can be improved by adding the possible options of texture\n } else if (key === \"map_ka\" && material) {\n // ambient texture map with a loaded image\n //We must first get the folder of the image\n material.ambientTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n } else if (key === \"map_kd\" && material) {\n // Diffuse texture map with a loaded image\n material.diffuseTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n } else if (key === \"map_ks\" && material) {\n // Specular texture map with a loaded image\n //We must first get the folder of the image\n material.specularTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n } else if (key === \"map_ns\") {\n //Specular\n //Specular highlight component\n //We must first get the folder of the image\n //\n //Not supported by BABYLON\n //\n // continue;\n } else if (key === \"map_bump\" && material) {\n //The bump texture\n const values = value.split(delimiter_pattern);\n const bumpMultiplierIndex = values.indexOf(\"-bm\");\n let bumpMultiplier = null;\n if (bumpMultiplierIndex >= 0) {\n bumpMultiplier = values[bumpMultiplierIndex + 1];\n values.splice(bumpMultiplierIndex, 2); // remove\n }\n material.bumpTexture = MTLFileLoader._GetTexture(rootUrl, values.join(\" \"), scene);\n if (material.bumpTexture && bumpMultiplier !== null) {\n material.bumpTexture.level = parseFloat(bumpMultiplier);\n }\n } else if (key === \"map_d\" && material) {\n // The dissolve of the material\n material.opacityTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n //Options for illumination\n } else if (key === \"illum\") {\n //Illumination\n if (value === \"0\") {\n //That mean Kd == Kd\n } else if (value === \"1\") {\n //Color on and Ambient on\n } else if (value === \"2\") {\n //Highlight on\n } else if (value === \"3\") {\n //Reflection on and Ray trace on\n } else if (value === \"4\") {\n //Transparency: Glass on, Reflection: Ray trace on\n } else if (value === \"5\") {\n //Reflection: Fresnel on and Ray trace on\n } else if (value === \"6\") {\n //Transparency: Refraction on, Reflection: Fresnel off and Ray trace on\n } else if (value === \"7\") {\n //Transparency: Refraction on, Reflection: Fresnel on and Ray trace on\n } else if (value === \"8\") {\n //Reflection on and Ray trace off\n } else if (value === \"9\") {\n //Transparency: Glass on, Reflection: Ray trace off\n } else if (value === \"10\") {\n //Casts shadows onto invisible surfaces\n }\n } else {\n // console.log(\"Unhandled expression at line : \" + i +'\\n' + \"with value : \" + line);\n }\n }\n //At the end of the file, add the last material\n if (material) {\n this.materials.push(material);\n }\n }\n /**\n * Gets the texture for the material.\n *\n * If the material is imported from input file,\n * We sanitize the url to ensure it takes the texture from aside the material.\n *\n * @param rootUrl The root url to load from\n * @param value The value stored in the mtl\n * @param scene\n * @returns The Texture\n */\n static _GetTexture(rootUrl, value, scene) {\n if (!value) {\n return null;\n }\n let url = rootUrl;\n // Load from input file.\n if (rootUrl === \"file:\") {\n let lastDelimiter = value.lastIndexOf(\"\\\\\");\n if (lastDelimiter === -1) {\n lastDelimiter = value.lastIndexOf(\"/\");\n }\n if (lastDelimiter > -1) {\n url += value.substr(lastDelimiter + 1);\n } else {\n url += value;\n }\n }\n // Not from input file.\n else {\n url += value;\n }\n return new Texture(url, scene, false, MTLFileLoader.INVERT_TEXTURE_Y);\n }\n}\n/**\n * Invert Y-Axis of referenced textures on load\n */\nMTLFileLoader.INVERT_TEXTURE_Y = true;","map":{"version":3,"names":["Color3","Texture","StandardMaterial","MTLFileLoader","constructor","materials","parseMTL","scene","data","rootUrl","assetContainer","ArrayBuffer","lines","split","delimiter_pattern","color","material","i","length","line","trim","charAt","pos","indexOf","key","substring","toLowerCase","value","push","_blockEntityCollection","_parentContainer","map","parseFloat","diffuseColor","FromArray","ambientColor","specularColor","emissiveColor","specularPower","alpha","ambientTexture","_GetTexture","diffuseTexture","specularTexture","values","bumpMultiplierIndex","bumpMultiplier","splice","bumpTexture","join","level","opacityTexture","url","lastDelimiter","lastIndexOf","substr","INVERT_TEXTURE_Y"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/loaders/OBJ/mtlFileLoader.js"],"sourcesContent":["import { Color3 } from \"@babylonjs/core/Maths/math.color.js\";\nimport { Texture } from \"@babylonjs/core/Materials/Textures/texture.js\";\nimport { StandardMaterial } from \"@babylonjs/core/Materials/standardMaterial.js\";\n/**\n * Class reading and parsing the MTL file bundled with the obj file.\n */\nexport class MTLFileLoader {\n constructor() {\n /**\n * All material loaded from the mtl will be set here\n */\n this.materials = [];\n }\n /**\n * This function will read the mtl file and create each material described inside\n * This function could be improve by adding :\n * -some component missing (Ni, Tf...)\n * -including the specific options available\n *\n * @param scene defines the scene the material will be created in\n * @param data defines the mtl data to parse\n * @param rootUrl defines the rooturl to use in order to load relative dependencies\n * @param assetContainer defines the asset container to store the material in (can be null)\n */\n parseMTL(scene, data, rootUrl, assetContainer) {\n if (data instanceof ArrayBuffer) {\n return;\n }\n //Split the lines from the file\n const lines = data.split(\"\\n\");\n // whitespace char ie: [ \\t\\r\\n\\f]\n const delimiter_pattern = /\\s+/;\n //Array with RGB colors\n let color;\n //New material\n let material = null;\n //Look at each line\n for (let i = 0; i < lines.length; i++) {\n const line = lines[i].trim();\n // Blank line or comment\n if (line.length === 0 || line.charAt(0) === \"#\") {\n continue;\n }\n //Get the first parameter (keyword)\n const pos = line.indexOf(\" \");\n let key = pos >= 0 ? line.substring(0, pos) : line;\n key = key.toLowerCase();\n //Get the data following the key\n const value = pos >= 0 ? line.substring(pos + 1).trim() : \"\";\n //This mtl keyword will create the new material\n if (key === \"newmtl\") {\n //Check if it is the first material.\n // Materials specifications are described after this keyword.\n if (material) {\n //Add the previous material in the material array.\n this.materials.push(material);\n }\n //Create a new material.\n // value is the name of the material read in the mtl file\n scene._blockEntityCollection = !!assetContainer;\n material = new StandardMaterial(value, scene);\n material._parentContainer = assetContainer;\n scene._blockEntityCollection = false;\n }\n else if (key === \"kd\" && material) {\n // Diffuse color (color under white light) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set tghe color into the material\n material.diffuseColor = Color3.FromArray(color);\n }\n else if (key === \"ka\" && material) {\n // Ambient color (color under shadow) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set tghe color into the material\n material.ambientColor = Color3.FromArray(color);\n }\n else if (key === \"ks\" && material) {\n // Specular color (color when light is reflected from shiny surface) using RGB values\n //value = \"r g b\"\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n //color = [r,g,b]\n //Set the color into the material\n material.specularColor = Color3.FromArray(color);\n }\n else if (key === \"ke\" && material) {\n // Emissive color using RGB values\n color = value.split(delimiter_pattern, 3).map(parseFloat);\n material.emissiveColor = Color3.FromArray(color);\n }\n else if (key === \"ns\" && material) {\n //value = \"Integer\"\n material.specularPower = parseFloat(value);\n }\n else if (key === \"d\" && material) {\n //d is dissolve for current material. It mean alpha for BABYLON\n material.alpha = parseFloat(value);\n //Texture\n //This part can be improved by adding the possible options of texture\n }\n else if (key === \"map_ka\" && material) {\n // ambient texture map with a loaded image\n //We must first get the folder of the image\n material.ambientTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n }\n else if (key === \"map_kd\" && material) {\n // Diffuse texture map with a loaded image\n material.diffuseTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n }\n else if (key === \"map_ks\" && material) {\n // Specular texture map with a loaded image\n //We must first get the folder of the image\n material.specularTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n }\n else if (key === \"map_ns\") {\n //Specular\n //Specular highlight component\n //We must first get the folder of the image\n //\n //Not supported by BABYLON\n //\n // continue;\n }\n else if (key === \"map_bump\" && material) {\n //The bump texture\n const values = value.split(delimiter_pattern);\n const bumpMultiplierIndex = values.indexOf(\"-bm\");\n let bumpMultiplier = null;\n if (bumpMultiplierIndex >= 0) {\n bumpMultiplier = values[bumpMultiplierIndex + 1];\n values.splice(bumpMultiplierIndex, 2); // remove\n }\n material.bumpTexture = MTLFileLoader._GetTexture(rootUrl, values.join(\" \"), scene);\n if (material.bumpTexture && bumpMultiplier !== null) {\n material.bumpTexture.level = parseFloat(bumpMultiplier);\n }\n }\n else if (key === \"map_d\" && material) {\n // The dissolve of the material\n material.opacityTexture = MTLFileLoader._GetTexture(rootUrl, value, scene);\n //Options for illumination\n }\n else if (key === \"illum\") {\n //Illumination\n if (value === \"0\") {\n //That mean Kd == Kd\n }\n else if (value === \"1\") {\n //Color on and Ambient on\n }\n else if (value === \"2\") {\n //Highlight on\n }\n else if (value === \"3\") {\n //Reflection on and Ray trace on\n }\n else if (value === \"4\") {\n //Transparency: Glass on, Reflection: Ray trace on\n }\n else if (value === \"5\") {\n //Reflection: Fresnel on and Ray trace on\n }\n else if (value === \"6\") {\n //Transparency: Refraction on, Reflection: Fresnel off and Ray trace on\n }\n else if (value === \"7\") {\n //Transparency: Refraction on, Reflection: Fresnel on and Ray trace on\n }\n else if (value === \"8\") {\n //Reflection on and Ray trace off\n }\n else if (value === \"9\") {\n //Transparency: Glass on, Reflection: Ray trace off\n }\n else if (value === \"10\") {\n //Casts shadows onto invisible surfaces\n }\n }\n else {\n // console.log(\"Unhandled expression at line : \" + i +'\\n' + \"with value : \" + line);\n }\n }\n //At the end of the file, add the last material\n if (material) {\n this.materials.push(material);\n }\n }\n /**\n * Gets the texture for the material.\n *\n * If the material is imported from input file,\n * We sanitize the url to ensure it takes the texture from aside the material.\n *\n * @param rootUrl The root url to load from\n * @param value The value stored in the mtl\n * @param scene\n * @returns The Texture\n */\n static _GetTexture(rootUrl, value, scene) {\n if (!value) {\n return null;\n }\n let url = rootUrl;\n // Load from input file.\n if (rootUrl === \"file:\") {\n let lastDelimiter = value.lastIndexOf(\"\\\\\");\n if (lastDelimiter === -1) {\n lastDelimiter = value.lastIndexOf(\"/\");\n }\n if (lastDelimiter > -1) {\n url += value.substr(lastDelimiter + 1);\n }\n else {\n url += value;\n }\n }\n // Not from input file.\n else {\n url += value;\n }\n return new Texture(url, scene, false, MTLFileLoader.INVERT_TEXTURE_Y);\n }\n}\n/**\n * Invert Y-Axis of referenced textures on load\n */\nMTLFileLoader.INVERT_TEXTURE_Y = true;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,qCAAqC;AAC5D,SAASC,OAAO,QAAQ,+CAA+C;AACvE,SAASC,gBAAgB,QAAQ,+CAA+C;AAChF;AACA;AACA;AACA,OAAO,MAAMC,aAAa,CAAC;EACvBC,WAAWA,CAAA,EAAG;IACV;AACR;AACA;IACQ,IAAI,CAACC,SAAS,GAAG,EAAE;EACvB;EACA;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACIC,QAAQA,CAACC,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,cAAc,EAAE;IAC3C,IAAIF,IAAI,YAAYG,WAAW,EAAE;MAC7B;IACJ;IACA;IACA,MAAMC,KAAK,GAAGJ,IAAI,CAACK,KAAK,CAAC,IAAI,CAAC;IAC9B;IACA,MAAMC,iBAAiB,GAAG,KAAK;IAC/B;IACA,IAAIC,KAAK;IACT;IACA,IAAIC,QAAQ,GAAG,IAAI;IACnB;IACA,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,KAAK,CAACM,MAAM,EAAED,CAAC,EAAE,EAAE;MACnC,MAAME,IAAI,GAAGP,KAAK,CAACK,CAAC,CAAC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K,CAAC4B,MAAM,CAACF,aAAa,GAAG,CAAC,CAAC;MAC1C,CAAC,MACI;QACDD,GAAG,IAAIzB,KAAK;MAChB;IACJ;IACA;IAAA,KACK;MACDyB,GAAG,IAAIzB,KAAK;IAChB;IACA,OAAO,IAAI1B,OAAO,CAACmD,GAAG,EAAE7C,KAAK,EAAE,KAAK,EAAEJ,aAAa,CAACqD,gBAAgB,CAAC;EACzE;AACJ;AACA;AACA;AACA;AACArD,aAAa,CAACqD,gBAAgB,GAAG,IAAI","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}