70dd039fc79d7a7949e6a5803e98e1be375149364a4de3d598d99f6013933916.json 9.9 KB

1
  1. {"ast":null,"code":"import { StencilStateComposer } from \"../../States/stencilStateComposer.js\";\n/**\n * @internal\n **/\nexport class WebGPUStencilStateComposer extends StencilStateComposer {\n constructor(cache) {\n super(false);\n this._cache = cache;\n this.reset();\n }\n get func() {\n return this._func;\n }\n set func(value) {\n if (this._func === value) {\n return;\n }\n this._func = value;\n this._cache.setStencilCompare(value);\n }\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n if (this._funcMask === value) {\n return;\n }\n this._funcMask = value;\n this._cache.setStencilReadMask(value);\n }\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n if (this._opStencilFail === value) {\n return;\n }\n this._opStencilFail = value;\n this._cache.setStencilFailOp(value);\n }\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n if (this._opDepthFail === value) {\n return;\n }\n this._opDepthFail = value;\n this._cache.setStencilDepthFailOp(value);\n }\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n if (this._opStencilDepthPass === value) {\n return;\n }\n this._opStencilDepthPass = value;\n this._cache.setStencilPassOp(value);\n }\n get mask() {\n return this._mask;\n }\n set mask(value) {\n if (this._mask === value) {\n return;\n }\n this._mask = value;\n this._cache.setStencilWriteMask(value);\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n if (this._enabled === value) {\n return;\n }\n this._enabled = value;\n this._cache.setStencilEnabled(value);\n }\n reset() {\n super.reset();\n this._cache.resetStencilState();\n }\n apply() {\n var _this$stencilMaterial;\n const stencilMaterialEnabled = (_this$stencilMaterial = this.stencilMaterial) === null || _this$stencilMaterial === void 0 ? void 0 : _this$stencilMaterial.enabled;\n this.enabled = stencilMaterialEnabled ? this.stencilMaterial.enabled : this.stencilGlobal.enabled;\n if (!this.enabled) {\n return;\n }\n this.func = stencilMaterialEnabled ? this.stencilMaterial.func : this.stencilGlobal.func;\n this.funcRef = stencilMaterialEnabled ? this.stencilMaterial.funcRef : this.stencilGlobal.funcRef;\n this.funcMask = stencilMaterialEnabled ? this.stencilMaterial.funcMask : this.stencilGlobal.funcMask;\n this.opStencilFail = stencilMaterialEnabled ? this.stencilMaterial.opStencilFail : this.stencilGlobal.opStencilFail;\n this.opDepthFail = stencilMaterialEnabled ? this.stencilMaterial.opDepthFail : this.stencilGlobal.opDepthFail;\n this.opStencilDepthPass = stencilMaterialEnabled ? this.stencilMaterial.opStencilDepthPass : this.stencilGlobal.opStencilDepthPass;\n this.mask = stencilMaterialEnabled ? this.stencilMaterial.mask : this.stencilGlobal.mask;\n }\n}","map":{"version":3,"names":["StencilStateComposer","WebGPUStencilStateComposer","constructor","cache","_cache","reset","func","_func","value","setStencilCompare","funcMask","_funcMask","setStencilReadMask","opStencilFail","_opStencilFail","setStencilFailOp","opDepthFail","_opDepthFail","setStencilDepthFailOp","opStencilDepthPass","_opStencilDepthPass","setStencilPassOp","mask","_mask","setStencilWriteMask","enabled","_enabled","setStencilEnabled","resetStencilState","apply","_this$stencilMaterial","stencilMaterialEnabled","stencilMaterial","stencilGlobal","funcRef"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/WebGPU/webgpuStencilStateComposer.js"],"sourcesContent":["import { StencilStateComposer } from \"../../States/stencilStateComposer.js\";\n/**\n * @internal\n **/\nexport class WebGPUStencilStateComposer extends StencilStateComposer {\n constructor(cache) {\n super(false);\n this._cache = cache;\n this.reset();\n }\n get func() {\n return this._func;\n }\n set func(value) {\n if (this._func === value) {\n return;\n }\n this._func = value;\n this._cache.setStencilCompare(value);\n }\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n if (this._funcMask === value) {\n return;\n }\n this._funcMask = value;\n this._cache.setStencilReadMask(value);\n }\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n if (this._opStencilFail === value) {\n return;\n }\n this._opStencilFail = value;\n this._cache.setStencilFailOp(value);\n }\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n if (this._opDepthFail === value) {\n return;\n }\n this._opDepthFail = value;\n this._cache.setStencilDepthFailOp(value);\n }\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n if (this._opStencilDepthPass === value) {\n return;\n }\n this._opStencilDepthPass = value;\n this._cache.setStencilPassOp(value);\n }\n get mask() {\n return this._mask;\n }\n set mask(value) {\n if (this._mask === value) {\n return;\n }\n this._mask = value;\n this._cache.setStencilWriteMask(value);\n }\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n if (this._enabled === value) {\n return;\n }\n this._enabled = value;\n this._cache.setStencilEnabled(value);\n }\n reset() {\n super.reset();\n this._cache.resetStencilState();\n }\n apply() {\n const stencilMaterialEnabled = this.stencilMaterial?.enabled;\n this.enabled = stencilMaterialEnabled ? this.stencilMaterial.enabled : this.stencilGlobal.enabled;\n if (!this.enabled) {\n return;\n }\n this.func = stencilMaterialEnabled ? this.stencilMaterial.func : this.stencilGlobal.func;\n this.funcRef = stencilMaterialEnabled ? this.stencilMaterial.funcRef : this.stencilGlobal.funcRef;\n this.funcMask = stencilMaterialEnabled ? this.stencilMaterial.funcMask : this.stencilGlobal.funcMask;\n this.opStencilFail = stencilMaterialEnabled ? this.stencilMaterial.opStencilFail : this.stencilGlobal.opStencilFail;\n this.opDepthFail = stencilMaterialEnabled ? this.stencilMaterial.opDepthFail : this.stencilGlobal.opDepthFail;\n this.opStencilDepthPass = stencilMaterialEnabled ? this.stencilMaterial.opStencilDepthPass : this.stencilGlobal.opStencilDepthPass;\n this.mask = stencilMaterialEnabled ? this.stencilMaterial.mask : this.stencilGlobal.mask;\n }\n}\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,sCAAsC;AAC3E;AACA;AACA;AACA,OAAO,MAAMC,0BAA0B,SAASD,oBAAoB,CAAC;EACjEE,WAAWA,CAACC,KAAK,EAAE;IACf,KAA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