{"ast":null,"code":"import { Observable } from \"../../Misc/observable.js\";\nimport { TextureSampler } from \"./textureSampler.js\";\n\n/**\n * Defines the source of the internal texture\n */\nexport var InternalTextureSource;\n(function (InternalTextureSource) {\n /**\n * The source of the texture data is unknown\n */\n InternalTextureSource[InternalTextureSource[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * Texture data comes from an URL\n */\n InternalTextureSource[InternalTextureSource[\"Url\"] = 1] = \"Url\";\n /**\n * Texture data is only used for temporary storage\n */\n InternalTextureSource[InternalTextureSource[\"Temp\"] = 2] = \"Temp\";\n /**\n * Texture data comes from raw data (ArrayBuffer)\n */\n InternalTextureSource[InternalTextureSource[\"Raw\"] = 3] = \"Raw\";\n /**\n * Texture content is dynamic (video or dynamic texture)\n */\n InternalTextureSource[InternalTextureSource[\"Dynamic\"] = 4] = \"Dynamic\";\n /**\n * Texture content is generated by rendering to it\n */\n InternalTextureSource[InternalTextureSource[\"RenderTarget\"] = 5] = \"RenderTarget\";\n /**\n * Texture content is part of a multi render target process\n */\n InternalTextureSource[InternalTextureSource[\"MultiRenderTarget\"] = 6] = \"MultiRenderTarget\";\n /**\n * Texture data comes from a cube data file\n */\n InternalTextureSource[InternalTextureSource[\"Cube\"] = 7] = \"Cube\";\n /**\n * Texture data comes from a raw cube data\n */\n InternalTextureSource[InternalTextureSource[\"CubeRaw\"] = 8] = \"CubeRaw\";\n /**\n * Texture data come from a prefiltered cube data file\n */\n InternalTextureSource[InternalTextureSource[\"CubePrefiltered\"] = 9] = \"CubePrefiltered\";\n /**\n * Texture content is raw 3D data\n */\n InternalTextureSource[InternalTextureSource[\"Raw3D\"] = 10] = \"Raw3D\";\n /**\n * Texture content is raw 2D array data\n */\n InternalTextureSource[InternalTextureSource[\"Raw2DArray\"] = 11] = \"Raw2DArray\";\n /**\n * Texture content is a depth/stencil texture\n */\n InternalTextureSource[InternalTextureSource[\"DepthStencil\"] = 12] = \"DepthStencil\";\n /**\n * Texture data comes from a raw cube data encoded with RGBD\n */\n InternalTextureSource[InternalTextureSource[\"CubeRawRGBD\"] = 13] = \"CubeRawRGBD\";\n /**\n * Texture content is a depth texture\n */\n InternalTextureSource[InternalTextureSource[\"Depth\"] = 14] = \"Depth\";\n})(InternalTextureSource || (InternalTextureSource = {}));\n/**\n * Checks if a given format is a depth texture format\n * @param format Format to check\n * @returns True if the format is a depth texture format\n */\nexport function IsDepthTexture(format) {\n return format === 13 || format === 14 || format === 15 || format === 16 || format === 17 || format === 18 || format === 19;\n}\n/**\n * Gets the type of a depth texture for a given format\n * @param format Format of the texture\n * @returns The type of the depth texture\n */\nexport function GetTypeForDepthTexture(format) {\n switch (format) {\n case 13:\n case 17:\n case 18:\n case 14:\n case 16:\n return 1;\n case 15:\n return 5;\n case 19:\n return 0;\n }\n return 0;\n}\n/**\n * Checks if a given format has a stencil aspect\n * @param format Format to check\n * @returns True if the format has a stencil aspect\n */\nexport function HasStencilAspect(format) {\n return format === 13 || format === 17 || format === 18 || format === 19;\n}\n/**\n * Class used to store data associated with WebGL texture data for the engine\n * This class should not be used directly\n */\nexport class InternalTexture extends TextureSampler {\n /**\n * Gets a boolean indicating if the texture uses mipmaps\n * TODO implements useMipMaps as a separate setting from generateMipMaps\n */\n get useMipMaps() {\n return this.generateMipMaps;\n }\n set useMipMaps(value) {\n this.generateMipMaps = value;\n }\n /** Gets the unique id of the internal texture */\n get uniqueId() {\n return this._uniqueId;\n }\n /** @internal */\n _setUniqueId(id) {\n this._uniqueId = id;\n }\n /**\n * Gets the Engine the texture belongs to.\n * @returns The babylon engine\n */\n getEngine() {\n return this._engine;\n }\n /**\n * Gets the data source type of the texture\n */\n get source() {\n return this._source;\n }\n /**\n * Creates a new InternalTexture\n * @param engine defines the engine to use\n * @param source defines the type of data that will be used\n * @param delayAllocation if the texture allocation should be delayed (default: false)\n */\n constructor(engine, source, delayAllocation = false) {\n super();\n /**\n * Defines if the texture is ready\n */\n this.isReady = false;\n /**\n * Defines if the texture is a cube texture\n */\n this.isCube = false;\n /**\n * Defines if the texture contains 3D data\n */\n this.is3D = false;\n /**\n * Defines if the texture contains 2D array data\n */\n this.is2DArray = false;\n /**\n * Defines if the texture contains multiview data\n */\n this.isMultiview = false;\n /**\n * Gets the URL used to load this texture\n */\n this.url = \"\";\n /**\n * Gets a boolean indicating if the texture needs mipmaps generation\n */\n this.generateMipMaps = false;\n /**\n * Gets the number of samples used by the texture (WebGL2+ only)\n */\n this.samples = 0;\n /**\n * Gets the type of the texture (int, float...)\n */\n this.type = -1;\n /**\n * Gets the format of the texture (RGB, RGBA...)\n */\n this.format = -1;\n /**\n * Observable called when the texture is loaded\n */\n this.onLoadedObservable = new Observable();\n /**\n * Observable called when the texture load is raising an error\n */\n this.onErrorObservable = new Observable();\n /**\n * If this callback is defined it will be called instead of the default _rebuild function\n */\n this.onRebuildCallback = null;\n /**\n * Gets the width of the texture\n */\n this.width = 0;\n /**\n * Gets the height of the texture\n */\n this.height = 0;\n /**\n * Gets the depth of the texture\n */\n this.depth = 0;\n /**\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseWidth = 0;\n /**\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseHeight = 0;\n /**\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseDepth = 0;\n /**\n * Gets a boolean indicating if the texture is inverted on Y axis\n */\n this.invertY = false;\n // Private\n /** @internal */\n this._invertVScale = false;\n /** @internal */\n this._associatedChannel = -1;\n /** @internal */\n this._source = 0 /* InternalTextureSource.Unknown */;\n /** @internal */\n this._buffer = null;\n /** @internal */\n this._bufferView = null;\n /** @internal */\n this._bufferViewArray = null;\n /** @internal */\n this._bufferViewArrayArray = null;\n /** @internal */\n this._size = 0;\n /** @internal */\n this._extension = \"\";\n /** @internal */\n this._files = null;\n /** @internal */\n this._workingCanvas = null;\n /** @internal */\n this._workingContext = null;\n /** @internal */\n this._cachedCoordinatesMode = null;\n /** @internal */\n this._isDisabled = false;\n /** @internal */\n this._compression = null;\n /** @internal */\n this._sphericalPolynomial = null;\n /** @internal */\n this._sphericalPolynomialPromise = null;\n /** @internal */\n this._sphericalPolynomialComputed = false;\n /** @internal */\n this._lodGenerationScale = 0;\n /** @internal */\n this._lodGenerationOffset = 0;\n /** @internal */\n this._useSRGBBuffer = false;\n /** @internal */\n this._creationFlags = 0;\n // The following three fields helps sharing generated fixed LODs for texture filtering\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\n // They are at the level of the gl texture to benefit from the cache.\n /** @internal */\n this._lodTextureHigh = null;\n /** @internal */\n this._lodTextureMid = null;\n /** @internal */\n this._lodTextureLow = null;\n /** @internal */\n this._isRGBD = false;\n /** @internal */\n this._linearSpecularLOD = false;\n /** @internal */\n this._irradianceTexture = null;\n /** @internal */\n this._hardwareTexture = null;\n /** @internal */\n this._maxLodLevel = null;\n /** @internal */\n this._references = 1;\n /** @internal */\n this._gammaSpace = null;\n /** @internal */\n this._premulAlpha = false;\n /** @internal */\n this._dynamicTextureSource = null;\n /** @internal */\n this._autoMSAAManagement = false;\n this._engine = engine;\n this._source = source;\n this._uniqueId = InternalTexture._Counter++;\n if (!delayAllocation) {\n this._hardwareTexture = engine._createHardwareTexture();\n }\n }\n /**\n * Increments the number of references (ie. the number of Texture that point to it)\n */\n incrementReferences() {\n this._references++;\n }\n /**\n * Change the size of the texture (not the size of the content)\n * @param width defines the new width\n * @param height defines the new height\n * @param depth defines the new depth (1 by default)\n */\n updateSize(width, height, depth = 1) {\n this._engine.updateTextureDimensions(this, width, height, depth);\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.baseWidth = width;\n this.baseHeight = height;\n this.baseDepth = depth;\n this._size = width * height * depth;\n }\n /** @internal */\n _rebuild() {\n var _this$_originalUrl, _this$_originalFormat;\n this.isReady = false;\n this._cachedCoordinatesMode = null;\n this._cachedWrapU = null;\n this._cachedWrapV = null;\n this._cachedWrapR = null;\n this._cachedAnisotropicFilteringLevel = null;\n if (this.onRebuildCallback) {\n const data = this.onRebuildCallback(this);\n const swapAndSetIsReady = proxyInternalTexture => {\n proxyInternalTexture._swapAndDie(this, false);\n this.isReady = data.isReady;\n };\n if (data.isAsync) {\n data.proxy.then(swapAndSetIsReady);\n } else {\n swapAndSetIsReady(data.proxy);\n }\n return;\n }\n let proxy;\n switch (this.source) {\n case 2 /* InternalTextureSource.Temp */:\n break;\n case 1 /* InternalTextureSource.Url */:\n proxy = this._engine.createTexture((_this$_originalUrl = this._originalUrl) !== null && _this$_originalUrl !== void 0 ? _this$_originalUrl : this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode,\n // Do not use Proxy here as it could be fully synchronous\n // and proxy would be undefined.\n temp => {\n temp._swapAndDie(this, false);\n this.isReady = true;\n }, null, this._buffer, undefined, this.format, this._extension, undefined, undefined, undefined, this._useSRGBBuffer);\n return;\n case 3 /* InternalTextureSource.Raw */:\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type, this._creationFlags, this._useSRGBBuffer);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 10 /* InternalTextureSource.Raw3D */:\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 11 /* InternalTextureSource.Raw2DArray */:\n proxy = this._engine.createRawTexture2DArray(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 4 /* InternalTextureSource.Dynamic */:\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\n proxy._swapAndDie(this, false);\n if (this._dynamicTextureSource) {\n this._engine.updateDynamicTexture(this, this._dynamicTextureSource, this.invertY, this._premulAlpha, this.format, true);\n }\n // The engine will make sure to update content so no need to flag it as isReady = true\n break;\n case 7 /* InternalTextureSource.Cube */:\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, () => {\n proxy._swapAndDie(this, false);\n this.isReady = true;\n }, null, this.format, this._extension, false, 0, 0, null, undefined, this._useSRGBBuffer, ArrayBuffer.isView(this._buffer) ? this._buffer : null);\n return;\n case 8 /* InternalTextureSource.CubeRaw */:\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, (_this$_originalFormat = this._originalFormat) !== null && _this$_originalFormat !== void 0 ? _this$_originalFormat : this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 13 /* InternalTextureSource.CubeRawRGBD */:\n // This case is being handeled by the environment texture tools and is not a part of the rebuild process.\n // To use CubeRawRGBD use updateRGBDAsync on the cube texture.\n return;\n case 9 /* InternalTextureSource.CubePrefiltered */:\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, proxy => {\n if (proxy) {\n proxy._swapAndDie(this, false);\n }\n this.isReady = true;\n }, null, this.format, this._extension);\n proxy._sphericalPolynomial = this._sphericalPolynomial;\n return;\n case 12 /* InternalTextureSource.DepthStencil */:\n case 14 /* InternalTextureSource.Depth */:\n {\n // Will be handled at the RenderTargetWrapper level\n break;\n }\n }\n }\n /**\n * @internal\n */\n _swapAndDie(target, swapAll = true) {\n var _this$_hardwareTextur;\n // TODO what about refcount on target?\n (_this$_hardwareTextur = this._hardwareTexture) === null || _this$_hardwareTextur === void 0 || _this$_hardwareTextur.setUsage(target._source, this.generateMipMaps, this.is2DArray, this.isCube, this.is3D, this.width, this.height, this.depth);\n target._hardwareTexture = this._hardwareTexture;\n if (swapAll) {\n target._isRGBD = this._isRGBD;\n }\n if (this._lodTextureHigh) {\n if (target._lodTextureHigh) {\n target._lodTextureHigh.dispose();\n }\n target._lodTextureHigh = this._lodTextureHigh;\n }\n if (this._lodTextureMid) {\n if (target._lodTextureMid) {\n target._lodTextureMid.dispose();\n }\n target._lodTextureMid = this._lodTextureMid;\n }\n if (this._lodTextureLow) {\n if (target._lodTextureLow) {\n target._lodTextureLow.dispose();\n }\n target._lodTextureLow = this._lodTextureLow;\n }\n if (this._irradianceTexture) {\n if (target._irradianceTexture) {\n target._irradianceTexture.dispose();\n }\n target._irradianceTexture = this._irradianceTexture;\n }\n const cache = this._engine.getLoadedTexturesCache();\n let index = cache.indexOf(this);\n if (index !== -1) {\n cache.splice(index, 1);\n }\n index = cache.indexOf(target);\n if (index === -1) {\n cache.push(target);\n }\n }\n /**\n * Dispose the current allocated resources\n */\n dispose() {\n this._references--;\n this.onLoadedObservable.clear();\n this.onErrorObservable.clear();\n if (this._references === 0) {\n this._engine._releaseTexture(this);\n this._hardwareTexture = null;\n this._dynamicTextureSource = null;\n }\n }\n}\n/** @internal */\nInternalTexture._Counter = 0;","map":{"version":3,"names":["Observable","TextureSampler","InternalTextureSource","IsDepthTexture","format","GetTypeForDepthTexture","HasStencilAspect","InternalTexture","useMipMaps","generateMipMaps","value","uniqueId","_uniqueId","_setUniqueId","id","getEngine","_engine","source","_source","constructor","engine","delayAllocation","isReady","isCube","is3D","is2DArray","isMultiview","url","samples","type","onLoadedObservable","onErrorObservable","onRebuildCallback","width","height","depth","baseWidth","baseHeight","baseDepth","invertY","_invertVScale","_associatedChannel","_buffer","_bufferView","_bufferViewArray","_bufferViewArrayArray","_size","_extension","_files","_workingCanvas","_workingContext","_cachedCoordinatesMode","_isDisabled","_compression","_sphericalPolynomial","_sphericalPolynomialPromise","_sphericalPolynomialComputed","_lodGenerationScale","_lodGenerationOffset","_useSRGBBuffer","_creationFlags","_lodTextureHigh","_lodTextureMid","_lodTextureLow","_isRGBD","_linearSpecularLOD","_irradianceTexture","_hardwareTexture","_maxLodLevel","_references","_gammaSpace","_premulAlpha","_dynamicTextureSource","_autoMSAAManagement","_Counter","_createHardwareTexture","incrementReferences","updateSize","updateTextureDimensions","_rebuild","_this$_originalUrl","_this$_originalFormat","_cachedWrapU","_cachedWrapV","_cachedWrapR","_cachedAnisotropicFilteringLevel","data","swapAndSetIsReady","proxyInternalTexture","_swapAndDie","isAsync","proxy","then","createTexture","_originalUrl","samplingMode","temp","undefined","createRawTexture","createRawTexture3D","createRawTexture2DArray","createDynamicTexture","updateDynamicTexture","createCubeTexture","ArrayBuffer","isView","createRawCubeTexture","_originalFormat","createPrefilteredCubeTexture","target","swapAll","_this$_hardwareTextur","setUsage","dispose","cache","getLoadedTexturesCache","index","indexOf","splice","push","clear","_releaseTexture"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/Textures/internalTexture.js"],"sourcesContent":["import { Observable } from \"../../Misc/observable.js\";\nimport { TextureSampler } from \"./textureSampler.js\";\n\n/**\n * Defines the source of the internal texture\n */\nexport var InternalTextureSource;\n(function (InternalTextureSource) {\n /**\n * The source of the texture data is unknown\n */\n InternalTextureSource[InternalTextureSource[\"Unknown\"] = 0] = \"Unknown\";\n /**\n * Texture data comes from an URL\n */\n InternalTextureSource[InternalTextureSource[\"Url\"] = 1] = \"Url\";\n /**\n * Texture data is only used for temporary storage\n */\n InternalTextureSource[InternalTextureSource[\"Temp\"] = 2] = \"Temp\";\n /**\n * Texture data comes from raw data (ArrayBuffer)\n */\n InternalTextureSource[InternalTextureSource[\"Raw\"] = 3] = \"Raw\";\n /**\n * Texture content is dynamic (video or dynamic texture)\n */\n InternalTextureSource[InternalTextureSource[\"Dynamic\"] = 4] = \"Dynamic\";\n /**\n * Texture content is generated by rendering to it\n */\n InternalTextureSource[InternalTextureSource[\"RenderTarget\"] = 5] = \"RenderTarget\";\n /**\n * Texture content is part of a multi render target process\n */\n InternalTextureSource[InternalTextureSource[\"MultiRenderTarget\"] = 6] = \"MultiRenderTarget\";\n /**\n * Texture data comes from a cube data file\n */\n InternalTextureSource[InternalTextureSource[\"Cube\"] = 7] = \"Cube\";\n /**\n * Texture data comes from a raw cube data\n */\n InternalTextureSource[InternalTextureSource[\"CubeRaw\"] = 8] = \"CubeRaw\";\n /**\n * Texture data come from a prefiltered cube data file\n */\n InternalTextureSource[InternalTextureSource[\"CubePrefiltered\"] = 9] = \"CubePrefiltered\";\n /**\n * Texture content is raw 3D data\n */\n InternalTextureSource[InternalTextureSource[\"Raw3D\"] = 10] = \"Raw3D\";\n /**\n * Texture content is raw 2D array data\n */\n InternalTextureSource[InternalTextureSource[\"Raw2DArray\"] = 11] = \"Raw2DArray\";\n /**\n * Texture content is a depth/stencil texture\n */\n InternalTextureSource[InternalTextureSource[\"DepthStencil\"] = 12] = \"DepthStencil\";\n /**\n * Texture data comes from a raw cube data encoded with RGBD\n */\n InternalTextureSource[InternalTextureSource[\"CubeRawRGBD\"] = 13] = \"CubeRawRGBD\";\n /**\n * Texture content is a depth texture\n */\n InternalTextureSource[InternalTextureSource[\"Depth\"] = 14] = \"Depth\";\n})(InternalTextureSource || (InternalTextureSource = {}));\n/**\n * Checks if a given format is a depth texture format\n * @param format Format to check\n * @returns True if the format is a depth texture format\n */\nexport function IsDepthTexture(format) {\n return (format === 13 ||\n format === 14 ||\n format === 15 ||\n format === 16 ||\n format === 17 ||\n format === 18 ||\n format === 19);\n}\n/**\n * Gets the type of a depth texture for a given format\n * @param format Format of the texture\n * @returns The type of the depth texture\n */\nexport function GetTypeForDepthTexture(format) {\n switch (format) {\n case 13:\n case 17:\n case 18:\n case 14:\n case 16:\n return 1;\n case 15:\n return 5;\n case 19:\n return 0;\n }\n return 0;\n}\n/**\n * Checks if a given format has a stencil aspect\n * @param format Format to check\n * @returns True if the format has a stencil aspect\n */\nexport function HasStencilAspect(format) {\n return (format === 13 ||\n format === 17 ||\n format === 18 ||\n format === 19);\n}\n/**\n * Class used to store data associated with WebGL texture data for the engine\n * This class should not be used directly\n */\nexport class InternalTexture extends TextureSampler {\n /**\n * Gets a boolean indicating if the texture uses mipmaps\n * TODO implements useMipMaps as a separate setting from generateMipMaps\n */\n get useMipMaps() {\n return this.generateMipMaps;\n }\n set useMipMaps(value) {\n this.generateMipMaps = value;\n }\n /** Gets the unique id of the internal texture */\n get uniqueId() {\n return this._uniqueId;\n }\n /** @internal */\n _setUniqueId(id) {\n this._uniqueId = id;\n }\n /**\n * Gets the Engine the texture belongs to.\n * @returns The babylon engine\n */\n getEngine() {\n return this._engine;\n }\n /**\n * Gets the data source type of the texture\n */\n get source() {\n return this._source;\n }\n /**\n * Creates a new InternalTexture\n * @param engine defines the engine to use\n * @param source defines the type of data that will be used\n * @param delayAllocation if the texture allocation should be delayed (default: false)\n */\n constructor(engine, source, delayAllocation = false) {\n super();\n /**\n * Defines if the texture is ready\n */\n this.isReady = false;\n /**\n * Defines if the texture is a cube texture\n */\n this.isCube = false;\n /**\n * Defines if the texture contains 3D data\n */\n this.is3D = false;\n /**\n * Defines if the texture contains 2D array data\n */\n this.is2DArray = false;\n /**\n * Defines if the texture contains multiview data\n */\n this.isMultiview = false;\n /**\n * Gets the URL used to load this texture\n */\n this.url = \"\";\n /**\n * Gets a boolean indicating if the texture needs mipmaps generation\n */\n this.generateMipMaps = false;\n /**\n * Gets the number of samples used by the texture (WebGL2+ only)\n */\n this.samples = 0;\n /**\n * Gets the type of the texture (int, float...)\n */\n this.type = -1;\n /**\n * Gets the format of the texture (RGB, RGBA...)\n */\n this.format = -1;\n /**\n * Observable called when the texture is loaded\n */\n this.onLoadedObservable = new Observable();\n /**\n * Observable called when the texture load is raising an error\n */\n this.onErrorObservable = new Observable();\n /**\n * If this callback is defined it will be called instead of the default _rebuild function\n */\n this.onRebuildCallback = null;\n /**\n * Gets the width of the texture\n */\n this.width = 0;\n /**\n * Gets the height of the texture\n */\n this.height = 0;\n /**\n * Gets the depth of the texture\n */\n this.depth = 0;\n /**\n * Gets the initial width of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseWidth = 0;\n /**\n * Gets the initial height of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseHeight = 0;\n /**\n * Gets the initial depth of the texture (It could be rescaled if the current system does not support non power of two textures)\n */\n this.baseDepth = 0;\n /**\n * Gets a boolean indicating if the texture is inverted on Y axis\n */\n this.invertY = false;\n // Private\n /** @internal */\n this._invertVScale = false;\n /** @internal */\n this._associatedChannel = -1;\n /** @internal */\n this._source = 0 /* InternalTextureSource.Unknown */;\n /** @internal */\n this._buffer = null;\n /** @internal */\n this._bufferView = null;\n /** @internal */\n this._bufferViewArray = null;\n /** @internal */\n this._bufferViewArrayArray = null;\n /** @internal */\n this._size = 0;\n /** @internal */\n this._extension = \"\";\n /** @internal */\n this._files = null;\n /** @internal */\n this._workingCanvas = null;\n /** @internal */\n this._workingContext = null;\n /** @internal */\n this._cachedCoordinatesMode = null;\n /** @internal */\n this._isDisabled = false;\n /** @internal */\n this._compression = null;\n /** @internal */\n this._sphericalPolynomial = null;\n /** @internal */\n this._sphericalPolynomialPromise = null;\n /** @internal */\n this._sphericalPolynomialComputed = false;\n /** @internal */\n this._lodGenerationScale = 0;\n /** @internal */\n this._lodGenerationOffset = 0;\n /** @internal */\n this._useSRGBBuffer = false;\n /** @internal */\n this._creationFlags = 0;\n // The following three fields helps sharing generated fixed LODs for texture filtering\n // In environment not supporting the textureLOD extension like EDGE. They are for internal use only.\n // They are at the level of the gl texture to benefit from the cache.\n /** @internal */\n this._lodTextureHigh = null;\n /** @internal */\n this._lodTextureMid = null;\n /** @internal */\n this._lodTextureLow = null;\n /** @internal */\n this._isRGBD = false;\n /** @internal */\n this._linearSpecularLOD = false;\n /** @internal */\n this._irradianceTexture = null;\n /** @internal */\n this._hardwareTexture = null;\n /** @internal */\n this._maxLodLevel = null;\n /** @internal */\n this._references = 1;\n /** @internal */\n this._gammaSpace = null;\n /** @internal */\n this._premulAlpha = false;\n /** @internal */\n this._dynamicTextureSource = null;\n /** @internal */\n this._autoMSAAManagement = false;\n this._engine = engine;\n this._source = source;\n this._uniqueId = InternalTexture._Counter++;\n if (!delayAllocation) {\n this._hardwareTexture = engine._createHardwareTexture();\n }\n }\n /**\n * Increments the number of references (ie. the number of Texture that point to it)\n */\n incrementReferences() {\n this._references++;\n }\n /**\n * Change the size of the texture (not the size of the content)\n * @param width defines the new width\n * @param height defines the new height\n * @param depth defines the new depth (1 by default)\n */\n updateSize(width, height, depth = 1) {\n this._engine.updateTextureDimensions(this, width, height, depth);\n this.width = width;\n this.height = height;\n this.depth = depth;\n this.baseWidth = width;\n this.baseHeight = height;\n this.baseDepth = depth;\n this._size = width * height * depth;\n }\n /** @internal */\n _rebuild() {\n this.isReady = false;\n this._cachedCoordinatesMode = null;\n this._cachedWrapU = null;\n this._cachedWrapV = null;\n this._cachedWrapR = null;\n this._cachedAnisotropicFilteringLevel = null;\n if (this.onRebuildCallback) {\n const data = this.onRebuildCallback(this);\n const swapAndSetIsReady = (proxyInternalTexture) => {\n proxyInternalTexture._swapAndDie(this, false);\n this.isReady = data.isReady;\n };\n if (data.isAsync) {\n data.proxy.then(swapAndSetIsReady);\n }\n else {\n swapAndSetIsReady(data.proxy);\n }\n return;\n }\n let proxy;\n switch (this.source) {\n case 2 /* InternalTextureSource.Temp */:\n break;\n case 1 /* InternalTextureSource.Url */:\n proxy = this._engine.createTexture(this._originalUrl ?? this.url, !this.generateMipMaps, this.invertY, null, this.samplingMode, \n // Do not use Proxy here as it could be fully synchronous\n // and proxy would be undefined.\n (temp) => {\n temp._swapAndDie(this, false);\n this.isReady = true;\n }, null, this._buffer, undefined, this.format, this._extension, undefined, undefined, undefined, this._useSRGBBuffer);\n return;\n case 3 /* InternalTextureSource.Raw */:\n proxy = this._engine.createRawTexture(this._bufferView, this.baseWidth, this.baseHeight, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type, this._creationFlags, this._useSRGBBuffer);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 10 /* InternalTextureSource.Raw3D */:\n proxy = this._engine.createRawTexture3D(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 11 /* InternalTextureSource.Raw2DArray */:\n proxy = this._engine.createRawTexture2DArray(this._bufferView, this.baseWidth, this.baseHeight, this.baseDepth, this.format, this.generateMipMaps, this.invertY, this.samplingMode, this._compression, this.type);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 4 /* InternalTextureSource.Dynamic */:\n proxy = this._engine.createDynamicTexture(this.baseWidth, this.baseHeight, this.generateMipMaps, this.samplingMode);\n proxy._swapAndDie(this, false);\n if (this._dynamicTextureSource) {\n this._engine.updateDynamicTexture(this, this._dynamicTextureSource, this.invertY, this._premulAlpha, this.format, true);\n }\n // The engine will make sure to update content so no need to flag it as isReady = true\n break;\n case 7 /* InternalTextureSource.Cube */:\n proxy = this._engine.createCubeTexture(this.url, null, this._files, !this.generateMipMaps, () => {\n proxy._swapAndDie(this, false);\n this.isReady = true;\n }, null, this.format, this._extension, false, 0, 0, null, undefined, this._useSRGBBuffer, ArrayBuffer.isView(this._buffer) ? this._buffer : null);\n return;\n case 8 /* InternalTextureSource.CubeRaw */:\n proxy = this._engine.createRawCubeTexture(this._bufferViewArray, this.width, this._originalFormat ?? this.format, this.type, this.generateMipMaps, this.invertY, this.samplingMode, this._compression);\n proxy._swapAndDie(this, false);\n this.isReady = true;\n break;\n case 13 /* InternalTextureSource.CubeRawRGBD */:\n // This case is being handeled by the environment texture tools and is not a part of the rebuild process.\n // To use CubeRawRGBD use updateRGBDAsync on the cube texture.\n return;\n case 9 /* InternalTextureSource.CubePrefiltered */:\n proxy = this._engine.createPrefilteredCubeTexture(this.url, null, this._lodGenerationScale, this._lodGenerationOffset, (proxy) => {\n if (proxy) {\n proxy._swapAndDie(this, false);\n }\n this.isReady = true;\n }, null, this.format, this._extension);\n proxy._sphericalPolynomial = this._sphericalPolynomial;\n return;\n case 12 /* InternalTextureSource.DepthStencil */:\n case 14 /* InternalTextureSource.Depth */: {\n // Will be handled at the RenderTargetWrapper level\n break;\n }\n }\n }\n /**\n * @internal\n */\n _swapAndDie(target, swapAll = true) {\n // TODO what about refcount on target?\n this._hardwareTexture?.setUsage(target._source, this.generateMipMaps, this.is2DArray, this.isCube, this.is3D, this.width, this.height, this.depth);\n target._hardwareTexture = this._hardwareTexture;\n if (swapAll) {\n target._isRGBD = this._isRGBD;\n }\n if (this._lodTextureHigh) {\n if (target._lodTextureHigh) {\n target._lodTextureHigh.dispose();\n }\n target._lodTextureHigh = this._lodTextureHigh;\n }\n if (this._lodTextureMid) {\n if (target._lodTextureMid) {\n target._lodTextureMid.dispose();\n }\n target._lodTextureMid = this._lodTextureMid;\n }\n if (this._lodTextureLow) {\n if (target._lodTextureLow) {\n target._lodTextureLow.dispose();\n }\n target._lodTextureLow = this._lodTextureLow;\n }\n if (this._irradianceTexture) {\n if (target._irradianceTexture) {\n target._irradianceTexture.dispose();\n }\n target._irradianceTexture = this._irradianceTexture;\n }\n const cache = this._engine.getLoadedTexturesCache();\n let index = cache.indexOf(this);\n if (index !== -1) {\n cache.splice(index, 1);\n }\n index = cache.indexOf(target);\n if (index === -1) {\n cache.push(target);\n }\n }\n /**\n * Dispose the current allocated resources\n */\n dispose() {\n this._references--;\n this.onLoadedObservable.clear();\n this.onErrorObservable.clear();\n if (this._references === 0) {\n this._engine._releaseTexture(this);\n this._hardwareTexture = null;\n this._dynamicTextureSource = null;\n }\n }\n}\n/** @internal */\nInternalTexture._Counter = 0;\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,0BAA0B;AACrD,SAASC,cAAc,QAAQ,qBAAqB;;AAEpD;AACA;AACA;AACA,OAAO,IAAIC,qBAAqB;AAChC,CAAC,UAAUA,qBAAqB,EAAE;EAC9B;AACJ;AACA;EACIA,qBAAqB,CAACA,qBAAqB,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS;EACvE;AACJ;AACA;EACIA,qBAAqB,CAACA,qBAAqB,CAAC,KAAK,CAAC,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