{"ast":null,"code":"import { DepthCullingState } from \"../../States/depthCullingState.js\";\n/**\n * @internal\n **/\nexport class WebGPUDepthCullingState extends DepthCullingState {\n /**\n * Initializes the state.\n * @param cache\n */\n constructor(cache) {\n super(false);\n this._cache = cache;\n this.reset();\n }\n get zOffset() {\n return this._zOffset;\n }\n set zOffset(value) {\n if (this._zOffset === value) {\n return;\n }\n this._zOffset = value;\n this._isZOffsetDirty = true;\n this._cache.setDepthBiasSlopeScale(value);\n }\n get zOffsetUnits() {\n return this._zOffsetUnits;\n }\n set zOffsetUnits(value) {\n if (this._zOffsetUnits === value) {\n return;\n }\n this._zOffsetUnits = value;\n this._isZOffsetDirty = true;\n this._cache.setDepthBias(value);\n }\n get cullFace() {\n return this._cullFace;\n }\n set cullFace(value) {\n if (this._cullFace === value) {\n return;\n }\n this._cullFace = value;\n this._isCullFaceDirty = true;\n this._cache.setCullFace(value !== null && value !== void 0 ? value : 1);\n }\n get cull() {\n return this._cull;\n }\n set cull(value) {\n if (this._cull === value) {\n return;\n }\n this._cull = value;\n this._isCullDirty = true;\n this._cache.setCullEnabled(!!value);\n }\n get depthFunc() {\n return this._depthFunc;\n }\n set depthFunc(value) {\n if (this._depthFunc === value) {\n return;\n }\n this._depthFunc = value;\n this._isDepthFuncDirty = true;\n this._cache.setDepthCompare(value);\n }\n get depthMask() {\n return this._depthMask;\n }\n set depthMask(value) {\n if (this._depthMask === value) {\n return;\n }\n this._depthMask = value;\n this._isDepthMaskDirty = true;\n this._cache.setDepthWriteEnabled(value);\n }\n get depthTest() {\n return this._depthTest;\n }\n set depthTest(value) {\n if (this._depthTest === value) {\n return;\n }\n this._depthTest = value;\n this._isDepthTestDirty = true;\n this._cache.setDepthTestEnabled(value);\n }\n get frontFace() {\n return this._frontFace;\n }\n set frontFace(value) {\n if (this._frontFace === value) {\n return;\n }\n this._frontFace = value;\n this._isFrontFaceDirty = true;\n this._cache.setFrontFace(value !== null && value !== void 0 ? value : 2);\n }\n reset() {\n super.reset();\n this._cache.resetDepthCullingState();\n }\n apply() {\n // nothing to do\n }\n}","map":{"version":3,"names":["DepthCullingState","WebGPUDepthCullingState","constructor","cache","_cache","reset","zOffset","_zOffset","value","_isZOffsetDirty","setDepthBiasSlopeScale","zOffsetUnits","_zOffsetUnits","setDepthBias","cullFace","_cullFace","_isCullFaceDirty","setCullFace","cull","_cull","_isCullDirty","setCullEnabled","depthFunc","_depthFunc","_isDepthFuncDirty","setDepthCompare","depthMask","_depthMask","_isDepthMaskDirty","setDepthWriteEnabled","depthTest","_depthTest","_isDepthTestDirty","setDepthTestEnabled","frontFace","_frontFace","_isFrontFaceDirty","setFrontFace","resetDepthCullingState","apply"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Engines/WebGPU/webgpuDepthCullingState.js"],"sourcesContent":["import { DepthCullingState } from \"../../States/depthCullingState.js\";\n/**\n * @internal\n **/\nexport class WebGPUDepthCullingState extends DepthCullingState {\n /**\n * Initializes the state.\n * @param cache\n */\n constructor(cache) {\n super(false);\n this._cache = cache;\n this.reset();\n }\n get zOffset() {\n return this._zOffset;\n }\n set zOffset(value) {\n if (this._zOffset === value) {\n return;\n }\n this._zOffset = value;\n this._isZOffsetDirty = true;\n this._cache.setDepthBiasSlopeScale(value);\n }\n get zOffsetUnits() {\n return this._zOffsetUnits;\n }\n set zOffsetUnits(value) {\n if (this._zOffsetUnits === value) {\n return;\n }\n this._zOffsetUnits = value;\n this._isZOffsetDirty = true;\n this._cache.setDepthBias(value);\n }\n get cullFace() {\n return this._cullFace;\n }\n set cullFace(value) {\n if (this._cullFace === value) {\n return;\n }\n this._cullFace = value;\n this._isCullFaceDirty = true;\n this._cache.setCullFace(value ?? 1);\n }\n get cull() {\n return this._cull;\n }\n set cull(value) {\n if (this._cull === value) {\n return;\n }\n this._cull = value;\n this._isCullDirty = true;\n this._cache.setCullEnabled(!!value);\n }\n get depthFunc() {\n return this._depthFunc;\n }\n set depthFunc(value) {\n if (this._depthFunc === value) {\n return;\n }\n this._depthFunc = value;\n this._isDepthFuncDirty = true;\n this._cache.setDepthCompare(value);\n }\n get depthMask() {\n return this._depthMask;\n }\n set depthMask(value) {\n if (this._depthMask === value) {\n return;\n }\n this._depthMask = value;\n this._isDepthMaskDirty = true;\n this._cache.setDepthWriteEnabled(value);\n }\n get depthTest() {\n return this._depthTest;\n }\n set depthTest(value) {\n if (this._depthTest === value) {\n return;\n }\n this._depthTest = value;\n this._isDepthTestDirty = true;\n this._cache.setDepthTestEnabled(value);\n }\n get frontFace() {\n return this._frontFace;\n }\n set frontFace(value) {\n if (this._frontFace === value) {\n return;\n }\n this._frontFace = value;\n this._isFrontFaceDirty = true;\n this._cache.setFrontFace(value ?? 2);\n }\n reset() {\n super.reset();\n this._cache.resetDepthCullingState();\n }\n apply() {\n // nothing to do\n }\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,mCAAmC;AACrE;AACA;AACA;AACA,OAAO,MAAMC,uBAAuB,SAASD,iBAAiB,CAAC;EAC3D;AACJ;AACA;AACA;EACIE,WAAWA,CAACC,KAAK,EAAE;IACf,KAAK,CAAC,KAAK,CAAC;IACZ,IAAI,CAACC,MAAM,GAAGD,KAAK;IACnB,IAAI,CAACE,KAAK,CAAC,CAAC;EAChB;EACA,IAAIC,OAAOA,CAAA,EAAG;IACV,OAAO,IAAI,CAACC,QAAQ;EACxB;EACA,IAAID,OAAOA,CAACE,KAAK,EAAE;IACf,IAAI,IAAI,CAACD,QAAQ,KAAKC,KAAK,EAAE;MACzB;IACJ;IACA,IAAI,CAACD,QAAQ,GAAGC,KAAK;IACrB,IAAI,CAACC,eAAe,GAAG,IAAI;IAC3B,IAAI,CAACL,MAAM,CAACM,sBAAsB,CAACF,KAAK,CAAC;EAC7C;EACA,IAAIG,YAAYA,CAAA,EAAG;IACf,OAAO,IAAI,CAACC,aAAa;EAC7B;EACA,IAAID,YAAYA,CAACH,KAAK,EAAE;IACpB,IAAI,IAAI,CAACI,aAAa,KAAKJ,KAAK,EAAE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