{"ast":null,"code":"import { ThinWebGPUEngine } from \"../../thinWebGPUEngine.js\";\nimport { InternalTexture } from \"../../../Materials/Textures/internalTexture.js\";\nThinWebGPUEngine.prototype.createRenderTargetCubeTexture = function (size, options) {\n var _fullOptions$label;\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\n const fullOptions = {\n generateMipMaps: true,\n generateDepthBuffer: true,\n generateStencilBuffer: false,\n type: 0,\n samplingMode: 3,\n format: 5,\n samples: 1,\n ...options\n };\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\n rtWrapper.label = (_fullOptions$label = fullOptions.label) !== null && _fullOptions$label !== void 0 ? _fullOptions$label : \"RenderTargetWrapper\";\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer;\n const texture = new InternalTexture(this, 5 /* InternalTextureSource.RenderTarget */);\n texture.width = size;\n texture.height = size;\n texture.depth = 0;\n texture.isReady = true;\n texture.isCube = true;\n texture.samples = fullOptions.samples;\n texture.generateMipMaps = fullOptions.generateMipMaps;\n texture.samplingMode = fullOptions.samplingMode;\n texture.type = fullOptions.type;\n texture.format = fullOptions.format;\n this._internalTexturesCache.push(texture);\n rtWrapper.setTextures(texture);\n if (rtWrapper._generateDepthBuffer || rtWrapper._generateStencilBuffer) {\n rtWrapper.createDepthStencilTexture(0, fullOptions.samplingMode === undefined || fullOptions.samplingMode === 2 || fullOptions.samplingMode === 2 || fullOptions.samplingMode === 3 || fullOptions.samplingMode === 3 || fullOptions.samplingMode === 5 || fullOptions.samplingMode === 6 || fullOptions.samplingMode === 7 || fullOptions.samplingMode === 11, rtWrapper._generateStencilBuffer, rtWrapper.samples);\n }\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\n texture.generateMipMaps = true;\n }\n this._textureHelper.createGPUTextureForInternalTexture(texture);\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\n texture.generateMipMaps = false;\n }\n return rtWrapper;\n};","map":{"version":3,"names":["ThinWebGPUEngine","InternalTexture","prototype","createRenderTargetCubeTexture","size","options","_fullOptions$label","rtWrapper","_createHardwareRenderTargetWrapper","fullOptions","generateMipMaps","generateDepthBuffer","generateStencilBuffer","type","samplingMode","format","samples","label","_generateDepthBuffer","_generateStencilBuffer","texture","width","height","depth","isReady","isCube","_internalTexturesCache","push","setTextures","createDepthStencilTexture","undefined","createMipMaps","_textureHelper","createGPUTextureForInternalTexture"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/WebGPU/Extensions/engine.renderTargetCube.js"],"sourcesContent":["import { ThinWebGPUEngine } from \"../../thinWebGPUEngine.js\";\nimport { InternalTexture } from \"../../../Materials/Textures/internalTexture.js\";\n\nThinWebGPUEngine.prototype.createRenderTargetCubeTexture = function (size, options) {\n const rtWrapper = this._createHardwareRenderTargetWrapper(false, true, size);\n const fullOptions = {\n generateMipMaps: true,\n generateDepthBuffer: true,\n generateStencilBuffer: false,\n type: 0,\n samplingMode: 3,\n format: 5,\n samples: 1,\n ...options,\n };\n fullOptions.generateStencilBuffer = fullOptions.generateDepthBuffer && fullOptions.generateStencilBuffer;\n rtWrapper.label = fullOptions.label ?? \"RenderTargetWrapper\";\n rtWrapper._generateDepthBuffer = fullOptions.generateDepthBuffer;\n rtWrapper._generateStencilBuffer = fullOptions.generateStencilBuffer;\n const texture = new InternalTexture(this, 5 /* InternalTextureSource.RenderTarget */);\n texture.width = size;\n texture.height = size;\n texture.depth = 0;\n texture.isReady = true;\n texture.isCube = true;\n texture.samples = fullOptions.samples;\n texture.generateMipMaps = fullOptions.generateMipMaps;\n texture.samplingMode = fullOptions.samplingMode;\n texture.type = fullOptions.type;\n texture.format = fullOptions.format;\n this._internalTexturesCache.push(texture);\n rtWrapper.setTextures(texture);\n if (rtWrapper._generateDepthBuffer || rtWrapper._generateStencilBuffer) {\n rtWrapper.createDepthStencilTexture(0, fullOptions.samplingMode === undefined ||\n fullOptions.samplingMode === 2 ||\n fullOptions.samplingMode === 2 ||\n fullOptions.samplingMode === 3 ||\n fullOptions.samplingMode === 3 ||\n fullOptions.samplingMode === 5 ||\n fullOptions.samplingMode === 6 ||\n fullOptions.samplingMode === 7 ||\n fullOptions.samplingMode === 11, rtWrapper._generateStencilBuffer, rtWrapper.samples);\n }\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\n texture.generateMipMaps = true;\n }\n this._textureHelper.createGPUTextureForInternalTexture(texture);\n if (options && options.createMipMaps && !fullOptions.generateMipMaps) {\n texture.generateMipMaps = false;\n }\n return rtWrapper;\n};\n"],"mappings":"AAAA,SAASA,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,eAAe,QAAQ,gDAAgD;AAEhFD,gBAAgB,CAACE,SAAS,CAACC,6BAA6B,GAAG,UAAUC,IAAI,EAAEC,OAAO,EAAE;EAAA,IAAAC,kBAAA;EAChF,MAAMC,SAAS,GAAG,IAAI,CAACC,kCAAkC,CAAC,KAAK,EAAE,IAAI,EAAEJ,IAAI,CAAC;EAC5E,MAAMK,WAAW,GAAG;IAChBC,eAAe,EAAE,IAAI;IACrBC,mBAAmB,EAAE,IAAI;IACzBC,qBAAqB,EAAE,KAAK;IAC5BC,IAAI,EAAE,CAAC;IACPC,YAAY,EAAE,CAAC;IACfC,MAAM,EAAE,CAAC;IACTC,OAAO,EAAE,CAAC;IACV,GAAGX;EACP,CAAC;EACDI,WAAW,CAACG,qBAAqB,GAAGH,WAAW,CAACE,mBAAmB,IAAIF,WAAW,CAACG,qBAAqB;EACxGL,SAAS,CAACU,KAAK,IAAAX,kBAAA,GAAGG,WAAW,CAACQ,KAAK,cAAAX,kBAAA,cAAAA,kBAAA,GAAI,qBAAqB;EAC5DC,SAAS,CAACW,oBAAoB,GAAGT,WAAW,CAACE,mBAAmB;EAChEJ,SAAS,CAACY,sBAAsB,GAAGV,WAAW,CAACG,qBAAqB;EACpE,MAAMQ,OAAO,GAAG,IAAInB,eAAe,CAAC,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