1 | "use strict";
|
2 | var constants = require("@pixi/constants"), Filter = require("../filters/Filter.js");
|
3 | class MaskData {
|
4 | |
5 |
|
6 |
|
7 |
|
8 | constructor(maskObject = null) {
|
9 | this.type = constants.MASK_TYPES.NONE, this.autoDetect = !0, this.maskObject = maskObject || null, this.pooled = !1, this.isMaskData = !0, this.resolution = null, this.multisample = Filter.Filter.defaultMultisample, this.enabled = !0, this.colorMask = 15, this._filters = null, this._stencilCounter = 0, this._scissorCounter = 0, this._scissorRect = null, this._scissorRectLocal = null, this._colorMask = 15, this._target = null;
|
10 | }
|
11 | |
12 |
|
13 |
|
14 |
|
15 |
|
16 | get filter() {
|
17 | return this._filters ? this._filters[0] : null;
|
18 | }
|
19 | set filter(value) {
|
20 | value ? this._filters ? this._filters[0] = value : this._filters = [value] : this._filters = null;
|
21 | }
|
22 |
|
23 | reset() {
|
24 | this.pooled && (this.maskObject = null, this.type = constants.MASK_TYPES.NONE, this.autoDetect = !0), this._target = null, this._scissorRectLocal = null;
|
25 | }
|
26 | |
27 |
|
28 |
|
29 |
|
30 | copyCountersOrReset(maskAbove) {
|
31 | maskAbove ? (this._stencilCounter = maskAbove._stencilCounter, this._scissorCounter = maskAbove._scissorCounter, this._scissorRect = maskAbove._scissorRect) : (this._stencilCounter = 0, this._scissorCounter = 0, this._scissorRect = null);
|
32 | }
|
33 | }
|
34 | exports.MaskData = MaskData;
|
35 |
|