1 |
- {"ast":null,"code":"import { __decorate } from \"../tslib.es6.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\nimport { serialize } from \"../Misc/decorators.js\";\n/**\n * Class that holds the different stencil states of a material\n * Usage example: https://playground.babylonjs.com/#CW5PRI#10\n */\nexport class MaterialStencilState {\n /**\n * Creates a material stencil state instance\n */\n constructor() {\n this.reset();\n }\n /**\n * Resets all the stencil states to default values\n */\n reset() {\n this.enabled = false;\n this.mask = 0xff;\n this.func = 519;\n this.funcRef = 1;\n this.funcMask = 0xff;\n this.opStencilFail = 7680;\n this.opDepthFail = 7680;\n this.opStencilDepthPass = 7681;\n }\n /**\n * Gets or sets the stencil function\n */\n get func() {\n return this._func;\n }\n set func(value) {\n this._func = value;\n }\n /**\n * Gets or sets the stencil function reference\n */\n get funcRef() {\n return this._funcRef;\n }\n set funcRef(value) {\n this._funcRef = value;\n }\n /**\n * Gets or sets the stencil function mask\n */\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n this._funcMask = value;\n }\n /**\n * Gets or sets the operation when the stencil test fails\n */\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n this._opStencilFail = value;\n }\n /**\n * Gets or sets the operation when the depth test fails\n */\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n this._opDepthFail = value;\n }\n /**\n * Gets or sets the operation when the stencil+depth test succeeds\n */\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n this._opStencilDepthPass = value;\n }\n /**\n * Gets or sets the stencil mask\n */\n get mask() {\n return this._mask;\n }\n set mask(value) {\n this._mask = value;\n }\n /**\n * Enables or disables the stencil test\n */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n }\n /**\n * Get the current class name, useful for serialization or dynamic coding.\n * @returns \"MaterialStencilState\"\n */\n getClassName() {\n return \"MaterialStencilState\";\n }\n /**\n * Makes a duplicate of the current configuration into another one.\n * @param stencilState defines stencil state where to copy the info\n */\n copyTo(stencilState) {\n SerializationHelper.Clone(() => stencilState, this);\n }\n /**\n * Serializes this stencil configuration.\n * @returns - An object with the serialized config.\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses a stencil state configuration from a serialized object.\n * @param source - Serialized object.\n * @param scene Defines the scene we are parsing for\n * @param rootUrl Defines the rootUrl to load from\n */\n parse(source, scene, rootUrl) {\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\n }\n}\n__decorate([serialize()], MaterialStencilState.prototype, \"func\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"funcRef\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"funcMask\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"opStencilFail\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"opDepthFail\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"opStencilDepthPass\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"mask\", null);\n__decorate([serialize()], MaterialStencilState.prototype, \"enabled\", null);","map":{"version":3,"names":["__decorate","SerializationHelper","serialize","MaterialStencilState","constructor","reset","enabled","mask","func","funcRef","funcMask","opStencilFail","opDepthFail","opStencilDepthPass","_func","value","_funcRef","_funcMask","_opStencilFail","_opDepthFail","_opStencilDepthPass","_mask","_enabled","getClassName","copyTo","stencilState","Clone","Serialize","parse","source","scene","rootUrl","Parse","prototype"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@babylonjs/core/Materials/materialStencilState.js"],"sourcesContent":["import { __decorate } from \"../tslib.es6.js\";\nimport { SerializationHelper } from \"../Misc/decorators.serialization.js\";\n\nimport { serialize } from \"../Misc/decorators.js\";\n/**\n * Class that holds the different stencil states of a material\n * Usage example: https://playground.babylonjs.com/#CW5PRI#10\n */\nexport class MaterialStencilState {\n /**\n * Creates a material stencil state instance\n */\n constructor() {\n this.reset();\n }\n /**\n * Resets all the stencil states to default values\n */\n reset() {\n this.enabled = false;\n this.mask = 0xff;\n this.func = 519;\n this.funcRef = 1;\n this.funcMask = 0xff;\n this.opStencilFail = 7680;\n this.opDepthFail = 7680;\n this.opStencilDepthPass = 7681;\n }\n /**\n * Gets or sets the stencil function\n */\n get func() {\n return this._func;\n }\n set func(value) {\n this._func = value;\n }\n /**\n * Gets or sets the stencil function reference\n */\n get funcRef() {\n return this._funcRef;\n }\n set funcRef(value) {\n this._funcRef = value;\n }\n /**\n * Gets or sets the stencil function mask\n */\n get funcMask() {\n return this._funcMask;\n }\n set funcMask(value) {\n this._funcMask = value;\n }\n /**\n * Gets or sets the operation when the stencil test fails\n */\n get opStencilFail() {\n return this._opStencilFail;\n }\n set opStencilFail(value) {\n this._opStencilFail = value;\n }\n /**\n * Gets or sets the operation when the depth test fails\n */\n get opDepthFail() {\n return this._opDepthFail;\n }\n set opDepthFail(value) {\n this._opDepthFail = value;\n }\n /**\n * Gets or sets the operation when the stencil+depth test succeeds\n */\n get opStencilDepthPass() {\n return this._opStencilDepthPass;\n }\n set opStencilDepthPass(value) {\n this._opStencilDepthPass = value;\n }\n /**\n * Gets or sets the stencil mask\n */\n get mask() {\n return this._mask;\n }\n set mask(value) {\n this._mask = value;\n }\n /**\n * Enables or disables the stencil test\n */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n this._enabled = value;\n }\n /**\n * Get the current class name, useful for serialization or dynamic coding.\n * @returns \"MaterialStencilState\"\n */\n getClassName() {\n return \"MaterialStencilState\";\n }\n /**\n * Makes a duplicate of the current configuration into another one.\n * @param stencilState defines stencil state where to copy the info\n */\n copyTo(stencilState) {\n SerializationHelper.Clone(() => stencilState, this);\n }\n /**\n * Serializes this stencil configuration.\n * @returns - An object with the serialized config.\n */\n serialize() {\n return SerializationHelper.Serialize(this);\n }\n /**\n * Parses a stencil state configuration from a serialized object.\n * @param source - Serialized object.\n * @param scene Defines the scene we are parsing for\n * @param rootUrl Defines the rootUrl to load from\n */\n parse(source, scene, rootUrl) {\n SerializationHelper.Parse(() => this, source, scene, rootUrl);\n }\n}\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"func\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"funcRef\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"funcMask\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opStencilFail\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opDepthFail\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"opStencilDepthPass\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"mask\", null);\n__decorate([\n serialize()\n], MaterialStencilState.prototype, \"enabled\", null);\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,mBAAmB,QAAQ,qCAAqC;AAEzE,SAASC,SAAS,QAAQ,uBAAuB;AACjD;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,CAAC;EAC9B;AACJ;AACA;EACIC,WAAWA,CAAA,EAAG;IACV,IAAI,CAACC,KAAK,CAAC,CAAC;EAChB;EACA;AACJ;AACA;EACIA,KAAKA,CAAA,EAAG;IACJ,IAAI,CAACC,OAAO,GAAG,KAAK;IACpB,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB,IAAI,CAACC,IAAI,GAAG,GAAG;IACf,IAAI,CAACC,OAAO,GAAG,CAAC;IAChB,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB,IAAI,CAACC,kBAAkB,GAAG,IAAI;EAClC;EACA;AACJ;AACA;EACI,IAAIL,IAAIA,CAAA,EAAG;IACP,OAAO,IAAI,CAACM,KAAK;EACrB;EACA,IAAIN,IAAIA,CAACO,KAAK,EAAE;IACZ,IAAI,CAACD,KAAK,GAAGC,KAAK;EACtB;EACA;AACJ;AACA;EACI,IAAIN,OAAOA,CAAA,EAAG;IACV,OAAO,IAAI,CAACO,QAAQ;EACxB;EAC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