1 |
- {"ast":null,"code":"import { GetTGAHeader, UploadContent } from \"../../../Misc/tga.js\";\n/**\n * Implementation of the TGA Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _TGATextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n */\n loadCubeData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in Cube.\";\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n */\n loadData(data, texture, callback) {\n const bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n const header = GetTGAHeader(bytes);\n callback(header.width, header.height, texture.generateMipMaps, false, () => {\n UploadContent(texture, bytes);\n });\n }\n}","map":{"version":3,"names":["GetTGAHeader","UploadContent","_TGATextureLoader","constructor","supportCascades","loadCubeData","loadData","data","texture","callback","bytes","Uint8Array","buffer","byteOffset","byteLength","header","width","height","generateMipMaps"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Textures/Loaders/tgaTextureLoader.js"],"sourcesContent":["import { GetTGAHeader, UploadContent } from \"../../../Misc/tga.js\";\n/**\n * Implementation of the TGA Texture Loader.\n * @internal\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport class _TGATextureLoader {\n constructor() {\n /**\n * Defines whether the loader supports cascade loading the different faces.\n */\n this.supportCascades = false;\n }\n /**\n * Uploads the cube texture data to the WebGL texture. It has already been bound.\n */\n loadCubeData() {\n // eslint-disable-next-line no-throw-literal\n throw \".env not supported in Cube.\";\n }\n /**\n * Uploads the 2D texture data to the WebGL texture. It has already been bound once in the callback.\n * @param data contains the texture data\n * @param texture defines the BabylonJS internal texture\n * @param callback defines the method to call once ready to upload\n */\n loadData(data, texture, callback) {\n const bytes = new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n const header = GetTGAHeader(bytes);\n callback(header.width, header.height, texture.generateMipMaps, false, () => {\n UploadContent(texture, bytes);\n });\n }\n}\n"],"mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,sBAAsB;AAClE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,CAAC;EAC3BC,WAAWA,CAAA,EAAG;IACV;AACR;AACA;IACQ,IAAI,CAACC,eAAe,GAAG,KAAK;EAChC;EACA;AACJ;AACA;EACIC,YAAYA,CAAA,EAAG;IACX;IACA,MAAM,6BAA6B;EACvC;EACA;AACJ;AACA;AACA;AACA;AACA;EACIC,QAAQA,CAACC,IAAI,EAAEC,OAAO,EAAEC,QAAQ,EAAE;IAC9B,MAAMC,KAAK,GAAG,IAAIC,UAAU,CAACJ,IAAI,CAACK,MAAM,EAAEL,IAAI,CAACM,UAAU,EAAEN,IAAI,CAACO,UAAU,CAAC;IAC3E,MAAMC,MAAM,GAAGf,YAAY,CAACU,KAAK,CAAC;IAClCD,QAAQ,CAACM,MAAM,CAACC,KAAK,EAAED,MAAM,CAACE,MAAM,EAAET,OAAO,CAACU,eAAe,EAAE,KAAK,EAAE,MAAM;MACxEjB,aAAa,CAACO,OAAO,EAAEE,KAAK,CAAC;IACjC,CAAC,CAAC;EACN;AACJ","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}
|