pixi.js 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/pixi.js +486 -1400
- package/dist/browser/pixi.js.map +1 -1
- package/dist/browser/pixi.min.js +3 -3
- package/dist/browser/pixi.min.js.map +1 -1
- package/dist/browser/pixi.min.mjs +3 -3
- package/dist/browser/pixi.min.mjs.map +1 -1
- package/dist/browser/pixi.mjs +486 -1400
- package/dist/browser/pixi.mjs.map +1 -1
- package/dist/cjs/pixi.js +3 -3
- package/dist/cjs/pixi.min.js +3 -3
- package/dist/esm/pixi.js +3 -3
- package/dist/esm/pixi.min.js +3 -3
- package/package.json +37 -37
package/dist/browser/pixi.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* pixi.js - v6.2.
|
|
3
|
-
* Compiled
|
|
2
|
+
* pixi.js - v6.2.1
|
|
3
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
4
4
|
*
|
|
5
5
|
* pixi.js is licensed under the MIT License.
|
|
6
6
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -420,8 +420,8 @@ var objectAssign = shouldUseNative() ? Object.assign : function (target, source)
|
|
|
420
420
|
};
|
|
421
421
|
|
|
422
422
|
/*!
|
|
423
|
-
* @pixi/polyfill - v6.2.
|
|
424
|
-
* Compiled
|
|
423
|
+
* @pixi/polyfill - v6.2.1
|
|
424
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
425
425
|
*
|
|
426
426
|
* @pixi/polyfill is licensed under the MIT License.
|
|
427
427
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -656,8 +656,8 @@ function isMobile(param) {
|
|
|
656
656
|
}
|
|
657
657
|
|
|
658
658
|
/*!
|
|
659
|
-
* @pixi/settings - v6.2.
|
|
660
|
-
* Compiled
|
|
659
|
+
* @pixi/settings - v6.2.1
|
|
660
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
661
661
|
*
|
|
662
662
|
* @pixi/settings is licensed under the MIT License.
|
|
663
663
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -719,8 +719,8 @@ function canUploadSameBuffer() {
|
|
|
719
719
|
}
|
|
720
720
|
|
|
721
721
|
/*!
|
|
722
|
-
* @pixi/constants - v6.2.
|
|
723
|
-
* Compiled
|
|
722
|
+
* @pixi/constants - v6.2.1
|
|
723
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
724
724
|
*
|
|
725
725
|
* @pixi/constants is licensed under the MIT License.
|
|
726
726
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -3968,8 +3968,8 @@ var url = {
|
|
|
3968
3968
|
};
|
|
3969
3969
|
|
|
3970
3970
|
/*!
|
|
3971
|
-
* @pixi/constants - v6.2.
|
|
3972
|
-
* Compiled
|
|
3971
|
+
* @pixi/constants - v6.2.1
|
|
3972
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
3973
3973
|
*
|
|
3974
3974
|
* @pixi/constants is licensed under the MIT License.
|
|
3975
3975
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -4483,8 +4483,8 @@ var BUFFER_TYPE$1;
|
|
|
4483
4483
|
})(BUFFER_TYPE$1 || (BUFFER_TYPE$1 = {}));
|
|
4484
4484
|
|
|
4485
4485
|
/*!
|
|
4486
|
-
* @pixi/utils - v6.2.
|
|
4487
|
-
* Compiled
|
|
4486
|
+
* @pixi/utils - v6.2.1
|
|
4487
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
4488
4488
|
*
|
|
4489
4489
|
* @pixi/utils is licensed under the MIT License.
|
|
4490
4490
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -4542,7 +4542,7 @@ settings.RETINA_PREFIX = /@([0-9\.]+)x/;
|
|
|
4542
4542
|
settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = false;
|
|
4543
4543
|
|
|
4544
4544
|
var saidHello = false;
|
|
4545
|
-
var VERSION = '6.2.
|
|
4545
|
+
var VERSION = '6.2.1';
|
|
4546
4546
|
/**
|
|
4547
4547
|
* Skips the hello message of renderers that are created after this is run.
|
|
4548
4548
|
*
|
|
@@ -5706,8 +5706,8 @@ var utils = {
|
|
|
5706
5706
|
};
|
|
5707
5707
|
|
|
5708
5708
|
/*!
|
|
5709
|
-
* @pixi/math - v6.2.
|
|
5710
|
-
* Compiled
|
|
5709
|
+
* @pixi/math - v6.2.1
|
|
5710
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
5711
5711
|
*
|
|
5712
5712
|
* @pixi/math is licensed under the MIT License.
|
|
5713
5713
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -5762,64 +5762,33 @@ var SHAPES;
|
|
|
5762
5762
|
*
|
|
5763
5763
|
* @memberof PIXI
|
|
5764
5764
|
* @typedef {object} ISize
|
|
5765
|
-
* @property {number} width - Width component
|
|
5766
|
-
* @property {number} height - Height component
|
|
5767
5765
|
*/
|
|
5768
5766
|
/**
|
|
5769
5767
|
* Rectangle object is an area defined by its position, as indicated by its top-left corner
|
|
5770
5768
|
* point (x, y) and by its width and its height.
|
|
5771
5769
|
*
|
|
5772
|
-
* @class
|
|
5773
5770
|
* @memberof PIXI
|
|
5774
5771
|
*/
|
|
5775
5772
|
var Rectangle = /** @class */ (function () {
|
|
5776
5773
|
/**
|
|
5777
|
-
* @param
|
|
5778
|
-
* @param
|
|
5779
|
-
* @param
|
|
5780
|
-
* @param
|
|
5774
|
+
* @param x - The X coordinate of the upper-left corner of the rectangle
|
|
5775
|
+
* @param y - The Y coordinate of the upper-left corner of the rectangle
|
|
5776
|
+
* @param width - The overall width of the rectangle
|
|
5777
|
+
* @param height - The overall height of the rectangle
|
|
5781
5778
|
*/
|
|
5782
5779
|
function Rectangle(x, y, width, height) {
|
|
5783
5780
|
if (x === void 0) { x = 0; }
|
|
5784
5781
|
if (y === void 0) { y = 0; }
|
|
5785
5782
|
if (width === void 0) { width = 0; }
|
|
5786
5783
|
if (height === void 0) { height = 0; }
|
|
5787
|
-
/**
|
|
5788
|
-
* @member {number}
|
|
5789
|
-
* @default 0
|
|
5790
|
-
*/
|
|
5791
5784
|
this.x = Number(x);
|
|
5792
|
-
/**
|
|
5793
|
-
* @member {number}
|
|
5794
|
-
* @default 0
|
|
5795
|
-
*/
|
|
5796
5785
|
this.y = Number(y);
|
|
5797
|
-
/**
|
|
5798
|
-
* @member {number}
|
|
5799
|
-
* @default 0
|
|
5800
|
-
*/
|
|
5801
5786
|
this.width = Number(width);
|
|
5802
|
-
/**
|
|
5803
|
-
* @member {number}
|
|
5804
|
-
* @default 0
|
|
5805
|
-
*/
|
|
5806
5787
|
this.height = Number(height);
|
|
5807
|
-
/**
|
|
5808
|
-
* The type of the object, mainly used to avoid `instanceof` checks
|
|
5809
|
-
*
|
|
5810
|
-
* @member {number}
|
|
5811
|
-
* @readOnly
|
|
5812
|
-
* @default PIXI.SHAPES.RECT
|
|
5813
|
-
* @see PIXI.SHAPES
|
|
5814
|
-
*/
|
|
5815
5788
|
this.type = SHAPES.RECT;
|
|
5816
5789
|
}
|
|
5817
5790
|
Object.defineProperty(Rectangle.prototype, "left", {
|
|
5818
|
-
/**
|
|
5819
|
-
* returns the left edge of the rectangle
|
|
5820
|
-
*
|
|
5821
|
-
* @member {number}
|
|
5822
|
-
*/
|
|
5791
|
+
/** Returns the left edge of the rectangle. */
|
|
5823
5792
|
get: function () {
|
|
5824
5793
|
return this.x;
|
|
5825
5794
|
},
|
|
@@ -5827,11 +5796,7 @@ var Rectangle = /** @class */ (function () {
|
|
|
5827
5796
|
configurable: true
|
|
5828
5797
|
});
|
|
5829
5798
|
Object.defineProperty(Rectangle.prototype, "right", {
|
|
5830
|
-
/**
|
|
5831
|
-
* returns the right edge of the rectangle
|
|
5832
|
-
*
|
|
5833
|
-
* @member {number}
|
|
5834
|
-
*/
|
|
5799
|
+
/** Returns the right edge of the rectangle. */
|
|
5835
5800
|
get: function () {
|
|
5836
5801
|
return this.x + this.width;
|
|
5837
5802
|
},
|
|
@@ -5839,11 +5804,7 @@ var Rectangle = /** @class */ (function () {
|
|
|
5839
5804
|
configurable: true
|
|
5840
5805
|
});
|
|
5841
5806
|
Object.defineProperty(Rectangle.prototype, "top", {
|
|
5842
|
-
/**
|
|
5843
|
-
* returns the top edge of the rectangle
|
|
5844
|
-
*
|
|
5845
|
-
* @member {number}
|
|
5846
|
-
*/
|
|
5807
|
+
/** Returns the top edge of the rectangle. */
|
|
5847
5808
|
get: function () {
|
|
5848
5809
|
return this.y;
|
|
5849
5810
|
},
|
|
@@ -5851,11 +5812,7 @@ var Rectangle = /** @class */ (function () {
|
|
|
5851
5812
|
configurable: true
|
|
5852
5813
|
});
|
|
5853
5814
|
Object.defineProperty(Rectangle.prototype, "bottom", {
|
|
5854
|
-
/**
|
|
5855
|
-
* returns the bottom edge of the rectangle
|
|
5856
|
-
*
|
|
5857
|
-
* @member {number}
|
|
5858
|
-
*/
|
|
5815
|
+
/** Returns the bottom edge of the rectangle. */
|
|
5859
5816
|
get: function () {
|
|
5860
5817
|
return this.y + this.height;
|
|
5861
5818
|
},
|
|
@@ -5863,14 +5820,7 @@ var Rectangle = /** @class */ (function () {
|
|
|
5863
5820
|
configurable: true
|
|
5864
5821
|
});
|
|
5865
5822
|
Object.defineProperty(Rectangle, "EMPTY", {
|
|
5866
|
-
/**
|
|
5867
|
-
* A constant empty rectangle.
|
|
5868
|
-
*
|
|
5869
|
-
* @static
|
|
5870
|
-
* @constant
|
|
5871
|
-
* @member {PIXI.Rectangle}
|
|
5872
|
-
* @return {PIXI.Rectangle} An empty rectangle
|
|
5873
|
-
*/
|
|
5823
|
+
/** A constant empty rectangle. */
|
|
5874
5824
|
get: function () {
|
|
5875
5825
|
return new Rectangle(0, 0, 0, 0);
|
|
5876
5826
|
},
|
|
@@ -5880,7 +5830,7 @@ var Rectangle = /** @class */ (function () {
|
|
|
5880
5830
|
/**
|
|
5881
5831
|
* Creates a clone of this Rectangle
|
|
5882
5832
|
*
|
|
5883
|
-
* @return
|
|
5833
|
+
* @return a copy of the rectangle
|
|
5884
5834
|
*/
|
|
5885
5835
|
Rectangle.prototype.clone = function () {
|
|
5886
5836
|
return new Rectangle(this.x, this.y, this.width, this.height);
|
|
@@ -5888,8 +5838,8 @@ var Rectangle = /** @class */ (function () {
|
|
|
5888
5838
|
/**
|
|
5889
5839
|
* Copies another rectangle to this one.
|
|
5890
5840
|
*
|
|
5891
|
-
* @param
|
|
5892
|
-
* @return
|
|
5841
|
+
* @param rectangle - The rectangle to copy from.
|
|
5842
|
+
* @return Returns itself.
|
|
5893
5843
|
*/
|
|
5894
5844
|
Rectangle.prototype.copyFrom = function (rectangle) {
|
|
5895
5845
|
this.x = rectangle.x;
|
|
@@ -5901,8 +5851,8 @@ var Rectangle = /** @class */ (function () {
|
|
|
5901
5851
|
/**
|
|
5902
5852
|
* Copies this rectangle to another one.
|
|
5903
5853
|
*
|
|
5904
|
-
* @param
|
|
5905
|
-
* @return
|
|
5854
|
+
* @param rectangle - The rectangle to copy to.
|
|
5855
|
+
* @return Returns given parameter.
|
|
5906
5856
|
*/
|
|
5907
5857
|
Rectangle.prototype.copyTo = function (rectangle) {
|
|
5908
5858
|
rectangle.x = this.x;
|
|
@@ -5914,9 +5864,9 @@ var Rectangle = /** @class */ (function () {
|
|
|
5914
5864
|
/**
|
|
5915
5865
|
* Checks whether the x and y coordinates given are contained within this Rectangle
|
|
5916
5866
|
*
|
|
5917
|
-
* @param
|
|
5918
|
-
* @param
|
|
5919
|
-
* @return
|
|
5867
|
+
* @param x - The X coordinate of the point to test
|
|
5868
|
+
* @param y - The Y coordinate of the point to test
|
|
5869
|
+
* @return Whether the x/y coordinates are within this Rectangle
|
|
5920
5870
|
*/
|
|
5921
5871
|
Rectangle.prototype.contains = function (x, y) {
|
|
5922
5872
|
if (this.width <= 0 || this.height <= 0) {
|
|
@@ -5933,9 +5883,9 @@ var Rectangle = /** @class */ (function () {
|
|
|
5933
5883
|
* Pads the rectangle making it grow in all directions.
|
|
5934
5884
|
* If paddingY is omitted, both paddingX and paddingY will be set to paddingX.
|
|
5935
5885
|
*
|
|
5936
|
-
* @param
|
|
5937
|
-
* @param
|
|
5938
|
-
* @return
|
|
5886
|
+
* @param paddingX - The horizontal padding amount.
|
|
5887
|
+
* @param paddingY - The vertical padding amount.
|
|
5888
|
+
* @return Returns itself.
|
|
5939
5889
|
*/
|
|
5940
5890
|
Rectangle.prototype.pad = function (paddingX, paddingY) {
|
|
5941
5891
|
if (paddingX === void 0) { paddingX = 0; }
|
|
@@ -5949,8 +5899,8 @@ var Rectangle = /** @class */ (function () {
|
|
|
5949
5899
|
/**
|
|
5950
5900
|
* Fits this rectangle around the passed one.
|
|
5951
5901
|
*
|
|
5952
|
-
* @param
|
|
5953
|
-
* @return
|
|
5902
|
+
* @param rectangle - The rectangle to fit.
|
|
5903
|
+
* @return Returns itself.
|
|
5954
5904
|
*/
|
|
5955
5905
|
Rectangle.prototype.fit = function (rectangle) {
|
|
5956
5906
|
var x1 = Math.max(this.x, rectangle.x);
|
|
@@ -5966,9 +5916,9 @@ var Rectangle = /** @class */ (function () {
|
|
|
5966
5916
|
/**
|
|
5967
5917
|
* Enlarges rectangle that way its corners lie on grid
|
|
5968
5918
|
*
|
|
5969
|
-
* @param
|
|
5970
|
-
* @param
|
|
5971
|
-
* @return
|
|
5919
|
+
* @param resolution - resolution
|
|
5920
|
+
* @param eps - precision
|
|
5921
|
+
* @return Returns itself.
|
|
5972
5922
|
*/
|
|
5973
5923
|
Rectangle.prototype.ceil = function (resolution, eps) {
|
|
5974
5924
|
if (resolution === void 0) { resolution = 1; }
|
|
@@ -5984,8 +5934,8 @@ var Rectangle = /** @class */ (function () {
|
|
|
5984
5934
|
/**
|
|
5985
5935
|
* Enlarges this rectangle to include the passed rectangle.
|
|
5986
5936
|
*
|
|
5987
|
-
* @param
|
|
5988
|
-
* @return
|
|
5937
|
+
* @param rectangle - The rectangle to include.
|
|
5938
|
+
* @return Returns itself.
|
|
5989
5939
|
*/
|
|
5990
5940
|
Rectangle.prototype.enlarge = function (rectangle) {
|
|
5991
5941
|
var x1 = Math.min(this.x, rectangle.x);
|
|
@@ -6130,7 +6080,6 @@ var Ellipse = /** @class */ (function () {
|
|
|
6130
6080
|
/**
|
|
6131
6081
|
* A class to define a shape via user defined coordinates.
|
|
6132
6082
|
*
|
|
6133
|
-
* @class
|
|
6134
6083
|
* @memberof PIXI
|
|
6135
6084
|
*/
|
|
6136
6085
|
var Polygon = /** @class */ (function () {
|
|
@@ -6157,32 +6106,14 @@ var Polygon = /** @class */ (function () {
|
|
|
6157
6106
|
}
|
|
6158
6107
|
flat = p;
|
|
6159
6108
|
}
|
|
6160
|
-
/**
|
|
6161
|
-
* An array of the points of this polygon
|
|
6162
|
-
*
|
|
6163
|
-
* @member {number[]}
|
|
6164
|
-
*/
|
|
6165
6109
|
this.points = flat;
|
|
6166
|
-
/**
|
|
6167
|
-
* The type of the object, mainly used to avoid `instanceof` checks
|
|
6168
|
-
*
|
|
6169
|
-
* @member {number}
|
|
6170
|
-
* @readOnly
|
|
6171
|
-
* @default PIXI.SHAPES.POLY
|
|
6172
|
-
* @see PIXI.SHAPES
|
|
6173
|
-
*/
|
|
6174
6110
|
this.type = SHAPES.POLY;
|
|
6175
|
-
/**
|
|
6176
|
-
* `false` after moveTo, `true` after `closePath`. In all other cases it is `true`.
|
|
6177
|
-
* @member {boolean}
|
|
6178
|
-
* @default true
|
|
6179
|
-
*/
|
|
6180
6111
|
this.closeStroke = true;
|
|
6181
6112
|
}
|
|
6182
6113
|
/**
|
|
6183
|
-
* Creates a clone of this polygon
|
|
6114
|
+
* Creates a clone of this polygon.
|
|
6184
6115
|
*
|
|
6185
|
-
* @return
|
|
6116
|
+
* @return - A copy of the polygon.
|
|
6186
6117
|
*/
|
|
6187
6118
|
Polygon.prototype.clone = function () {
|
|
6188
6119
|
var points = this.points.slice();
|
|
@@ -6191,11 +6122,11 @@ var Polygon = /** @class */ (function () {
|
|
|
6191
6122
|
return polygon;
|
|
6192
6123
|
};
|
|
6193
6124
|
/**
|
|
6194
|
-
* Checks whether the x and y coordinates passed to this function are contained within this polygon
|
|
6125
|
+
* Checks whether the x and y coordinates passed to this function are contained within this polygon.
|
|
6195
6126
|
*
|
|
6196
|
-
* @param
|
|
6197
|
-
* @param
|
|
6198
|
-
* @return
|
|
6127
|
+
* @param x - The X coordinate of the point to test.
|
|
6128
|
+
* @param y - The Y coordinate of the point to test.
|
|
6129
|
+
* @return - Whether the x/y coordinates are within this polygon.
|
|
6199
6130
|
*/
|
|
6200
6131
|
Polygon.prototype.contains = function (x, y) {
|
|
6201
6132
|
var inside = false;
|
|
@@ -6299,25 +6230,26 @@ var RoundedRectangle = /** @class */ (function () {
|
|
|
6299
6230
|
}
|
|
6300
6231
|
if (x >= this.x && x <= this.x + this.width) {
|
|
6301
6232
|
if (y >= this.y && y <= this.y + this.height) {
|
|
6302
|
-
|
|
6303
|
-
|
|
6233
|
+
var radius = Math.max(0, Math.min(this.radius, Math.min(this.width, this.height) / 2));
|
|
6234
|
+
if ((y >= this.y + radius && y <= this.y + this.height - radius)
|
|
6235
|
+
|| (x >= this.x + radius && x <= this.x + this.width - radius)) {
|
|
6304
6236
|
return true;
|
|
6305
6237
|
}
|
|
6306
|
-
var dx = x - (this.x +
|
|
6307
|
-
var dy = y - (this.y +
|
|
6308
|
-
var radius2 =
|
|
6238
|
+
var dx = x - (this.x + radius);
|
|
6239
|
+
var dy = y - (this.y + radius);
|
|
6240
|
+
var radius2 = radius * radius;
|
|
6309
6241
|
if ((dx * dx) + (dy * dy) <= radius2) {
|
|
6310
6242
|
return true;
|
|
6311
6243
|
}
|
|
6312
|
-
dx = x - (this.x + this.width -
|
|
6244
|
+
dx = x - (this.x + this.width - radius);
|
|
6313
6245
|
if ((dx * dx) + (dy * dy) <= radius2) {
|
|
6314
6246
|
return true;
|
|
6315
6247
|
}
|
|
6316
|
-
dy = y - (this.y + this.height -
|
|
6248
|
+
dy = y - (this.y + this.height - radius);
|
|
6317
6249
|
if ((dx * dx) + (dy * dy) <= radius2) {
|
|
6318
6250
|
return true;
|
|
6319
6251
|
}
|
|
6320
|
-
dx = x - (this.x +
|
|
6252
|
+
dx = x - (this.x + radius);
|
|
6321
6253
|
if ((dx * dx) + (dy * dy) <= radius2) {
|
|
6322
6254
|
return true;
|
|
6323
6255
|
}
|
|
@@ -7394,8 +7326,8 @@ var Transform = /** @class */ (function () {
|
|
|
7394
7326
|
}());
|
|
7395
7327
|
|
|
7396
7328
|
/*!
|
|
7397
|
-
* @pixi/display - v6.2.
|
|
7398
|
-
* Compiled
|
|
7329
|
+
* @pixi/display - v6.2.1
|
|
7330
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
7399
7331
|
*
|
|
7400
7332
|
* @pixi/display is licensed under the MIT License.
|
|
7401
7333
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -8784,8 +8716,8 @@ var TemporaryDisplayObject = /** @class */ (function (_super) {
|
|
|
8784
8716
|
DisplayObject.prototype.displayObjectUpdateTransform = DisplayObject.prototype.updateTransform;
|
|
8785
8717
|
|
|
8786
8718
|
/*!
|
|
8787
|
-
* @pixi/constants - v6.2.
|
|
8788
|
-
* Compiled
|
|
8719
|
+
* @pixi/constants - v6.2.1
|
|
8720
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
8789
8721
|
*
|
|
8790
8722
|
* @pixi/constants is licensed under the MIT License.
|
|
8791
8723
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -9896,8 +9828,8 @@ var Container = /** @class */ (function (_super) {
|
|
|
9896
9828
|
Container.prototype.containerUpdateTransform = Container.prototype.updateTransform;
|
|
9897
9829
|
|
|
9898
9830
|
/*!
|
|
9899
|
-
* @pixi/accessibility - v6.2.
|
|
9900
|
-
* Compiled
|
|
9831
|
+
* @pixi/accessibility - v6.2.1
|
|
9832
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
9901
9833
|
*
|
|
9902
9834
|
* @pixi/accessibility is licensed under the MIT License.
|
|
9903
9835
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -10441,8 +10373,8 @@ var AccessibilityManager = /** @class */ (function () {
|
|
|
10441
10373
|
}());
|
|
10442
10374
|
|
|
10443
10375
|
/*!
|
|
10444
|
-
* @pixi/ticker - v6.2.
|
|
10445
|
-
* Compiled
|
|
10376
|
+
* @pixi/ticker - v6.2.1
|
|
10377
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
10446
10378
|
*
|
|
10447
10379
|
* @pixi/ticker is licensed under the MIT License.
|
|
10448
10380
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -11185,8 +11117,8 @@ var TickerPlugin = /** @class */ (function () {
|
|
|
11185
11117
|
}());
|
|
11186
11118
|
|
|
11187
11119
|
/*!
|
|
11188
|
-
* @pixi/interaction - v6.2.
|
|
11189
|
-
* Compiled
|
|
11120
|
+
* @pixi/interaction - v6.2.1
|
|
11121
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
11190
11122
|
*
|
|
11191
11123
|
* @pixi/interaction is licensed under the MIT License.
|
|
11192
11124
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -13424,8 +13356,8 @@ var InteractionManager = /** @class */ (function (_super) {
|
|
|
13424
13356
|
}(eventemitter3));
|
|
13425
13357
|
|
|
13426
13358
|
/*!
|
|
13427
|
-
* @pixi/runner - v6.2.
|
|
13428
|
-
* Compiled
|
|
13359
|
+
* @pixi/runner - v6.2.1
|
|
13360
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
13429
13361
|
*
|
|
13430
13362
|
* @pixi/runner is licensed under the MIT License.
|
|
13431
13363
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -13613,8 +13545,8 @@ Object.defineProperties(Runner.prototype, {
|
|
|
13613
13545
|
});
|
|
13614
13546
|
|
|
13615
13547
|
/*!
|
|
13616
|
-
* @pixi/core - v6.2.
|
|
13617
|
-
* Compiled
|
|
13548
|
+
* @pixi/core - v6.2.1
|
|
13549
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
13618
13550
|
*
|
|
13619
13551
|
* @pixi/core is licensed under the MIT License.
|
|
13620
13552
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -13790,73 +13722,28 @@ function __rest(s, e) {
|
|
|
13790
13722
|
*
|
|
13791
13723
|
* Uploading of a base texture to the GPU is required.
|
|
13792
13724
|
*
|
|
13793
|
-
* @class
|
|
13794
13725
|
* @memberof PIXI
|
|
13795
13726
|
*/
|
|
13796
13727
|
var Resource = /** @class */ (function () {
|
|
13797
13728
|
/**
|
|
13798
|
-
* @param
|
|
13799
|
-
* @param
|
|
13729
|
+
* @param width - Width of the resource
|
|
13730
|
+
* @param height - Height of the resource
|
|
13800
13731
|
*/
|
|
13801
13732
|
function Resource(width, height) {
|
|
13802
13733
|
if (width === void 0) { width = 0; }
|
|
13803
13734
|
if (height === void 0) { height = 0; }
|
|
13804
|
-
/**
|
|
13805
|
-
* Internal width of the resource
|
|
13806
|
-
* @member {number}
|
|
13807
|
-
* @protected
|
|
13808
|
-
*/
|
|
13809
13735
|
this._width = width;
|
|
13810
|
-
/**
|
|
13811
|
-
* Internal height of the resource
|
|
13812
|
-
* @member {number}
|
|
13813
|
-
* @protected
|
|
13814
|
-
*/
|
|
13815
13736
|
this._height = height;
|
|
13816
|
-
/**
|
|
13817
|
-
* If resource has been destroyed
|
|
13818
|
-
* @member {boolean}
|
|
13819
|
-
* @readonly
|
|
13820
|
-
* @default false
|
|
13821
|
-
*/
|
|
13822
13737
|
this.destroyed = false;
|
|
13823
|
-
/**
|
|
13824
|
-
* `true` if resource is created by BaseTexture
|
|
13825
|
-
* useful for doing cleanup with BaseTexture destroy
|
|
13826
|
-
* and not cleaning up resources that were created
|
|
13827
|
-
* externally.
|
|
13828
|
-
* @member {boolean}
|
|
13829
|
-
* @protected
|
|
13830
|
-
*/
|
|
13831
13738
|
this.internal = false;
|
|
13832
|
-
/**
|
|
13833
|
-
* Mini-runner for handling resize events
|
|
13834
|
-
* accepts 2 parameters: width, height
|
|
13835
|
-
*
|
|
13836
|
-
* @member {Runner}
|
|
13837
|
-
* @private
|
|
13838
|
-
*/
|
|
13839
13739
|
this.onResize = new Runner('setRealSize');
|
|
13840
|
-
/**
|
|
13841
|
-
* Mini-runner for handling update events
|
|
13842
|
-
*
|
|
13843
|
-
* @member {Runner}
|
|
13844
|
-
* @private
|
|
13845
|
-
*/
|
|
13846
13740
|
this.onUpdate = new Runner('update');
|
|
13847
|
-
/**
|
|
13848
|
-
* Handle internal errors, such as loading errors
|
|
13849
|
-
* accepts 1 param: error
|
|
13850
|
-
*
|
|
13851
|
-
* @member {Runner}
|
|
13852
|
-
* @private
|
|
13853
|
-
*/
|
|
13854
13741
|
this.onError = new Runner('onError');
|
|
13855
13742
|
}
|
|
13856
13743
|
/**
|
|
13857
13744
|
* Bind to a parent BaseTexture
|
|
13858
13745
|
*
|
|
13859
|
-
* @param
|
|
13746
|
+
* @param baseTexture - Parent texture
|
|
13860
13747
|
*/
|
|
13861
13748
|
Resource.prototype.bind = function (baseTexture) {
|
|
13862
13749
|
this.onResize.add(baseTexture);
|
|
@@ -13871,7 +13758,7 @@ var Resource = /** @class */ (function () {
|
|
|
13871
13758
|
/**
|
|
13872
13759
|
* Unbind to a parent BaseTexture
|
|
13873
13760
|
*
|
|
13874
|
-
* @param
|
|
13761
|
+
* @param baseTexture - Parent texture
|
|
13875
13762
|
*/
|
|
13876
13763
|
Resource.prototype.unbind = function (baseTexture) {
|
|
13877
13764
|
this.onResize.remove(baseTexture);
|
|
@@ -13880,8 +13767,9 @@ var Resource = /** @class */ (function () {
|
|
|
13880
13767
|
};
|
|
13881
13768
|
/**
|
|
13882
13769
|
* Trigger a resize event
|
|
13883
|
-
*
|
|
13884
|
-
* @param
|
|
13770
|
+
*
|
|
13771
|
+
* @param width - X dimension
|
|
13772
|
+
* @param height - Y dimension
|
|
13885
13773
|
*/
|
|
13886
13774
|
Resource.prototype.resize = function (width, height) {
|
|
13887
13775
|
if (width !== this._width || height !== this._height) {
|
|
@@ -13893,8 +13781,8 @@ var Resource = /** @class */ (function () {
|
|
|
13893
13781
|
Object.defineProperty(Resource.prototype, "valid", {
|
|
13894
13782
|
/**
|
|
13895
13783
|
* Has been validated
|
|
13784
|
+
*
|
|
13896
13785
|
* @readonly
|
|
13897
|
-
* @member {boolean}
|
|
13898
13786
|
*/
|
|
13899
13787
|
get: function () {
|
|
13900
13788
|
return !!this._width && !!this._height;
|
|
@@ -13902,9 +13790,7 @@ var Resource = /** @class */ (function () {
|
|
|
13902
13790
|
enumerable: false,
|
|
13903
13791
|
configurable: true
|
|
13904
13792
|
});
|
|
13905
|
-
/**
|
|
13906
|
-
* Has been updated trigger event
|
|
13907
|
-
*/
|
|
13793
|
+
/** Has been updated trigger event. */
|
|
13908
13794
|
Resource.prototype.update = function () {
|
|
13909
13795
|
if (!this.destroyed) {
|
|
13910
13796
|
this.onUpdate.emit();
|
|
@@ -13913,8 +13799,9 @@ var Resource = /** @class */ (function () {
|
|
|
13913
13799
|
/**
|
|
13914
13800
|
* This can be overridden to start preloading a resource
|
|
13915
13801
|
* or do any other prepare step.
|
|
13802
|
+
*
|
|
13916
13803
|
* @protected
|
|
13917
|
-
* @return
|
|
13804
|
+
* @return Handle the validate event
|
|
13918
13805
|
*/
|
|
13919
13806
|
Resource.prototype.load = function () {
|
|
13920
13807
|
return Promise.resolve(this);
|
|
@@ -13923,7 +13810,6 @@ var Resource = /** @class */ (function () {
|
|
|
13923
13810
|
/**
|
|
13924
13811
|
* The width of the resource.
|
|
13925
13812
|
*
|
|
13926
|
-
* @member {number}
|
|
13927
13813
|
* @readonly
|
|
13928
13814
|
*/
|
|
13929
13815
|
get: function () {
|
|
@@ -13936,7 +13822,6 @@ var Resource = /** @class */ (function () {
|
|
|
13936
13822
|
/**
|
|
13937
13823
|
* The height of the resource.
|
|
13938
13824
|
*
|
|
13939
|
-
* @member {number}
|
|
13940
13825
|
* @readonly
|
|
13941
13826
|
*/
|
|
13942
13827
|
get: function () {
|
|
@@ -13948,19 +13833,15 @@ var Resource = /** @class */ (function () {
|
|
|
13948
13833
|
/**
|
|
13949
13834
|
* Set the style, optional to override
|
|
13950
13835
|
*
|
|
13951
|
-
* @param
|
|
13952
|
-
* @param
|
|
13953
|
-
* @param
|
|
13954
|
-
* @returns
|
|
13836
|
+
* @param renderer - yeah, renderer!
|
|
13837
|
+
* @param baseTexture - the texture
|
|
13838
|
+
* @param glTexture - texture instance for this webgl context
|
|
13839
|
+
* @returns - `true` is success
|
|
13955
13840
|
*/
|
|
13956
13841
|
Resource.prototype.style = function (_renderer, _baseTexture, _glTexture) {
|
|
13957
13842
|
return false;
|
|
13958
13843
|
};
|
|
13959
|
-
/**
|
|
13960
|
-
* Clean up anything, this happens when destroying is ready.
|
|
13961
|
-
*
|
|
13962
|
-
* @protected
|
|
13963
|
-
*/
|
|
13844
|
+
/** Clean up anything, this happens when destroying is ready. */
|
|
13964
13845
|
Resource.prototype.dispose = function () {
|
|
13965
13846
|
// override
|
|
13966
13847
|
};
|
|
@@ -13982,9 +13863,8 @@ var Resource = /** @class */ (function () {
|
|
|
13982
13863
|
}
|
|
13983
13864
|
};
|
|
13984
13865
|
/**
|
|
13985
|
-
* Abstract, used to auto-detect resource type
|
|
13866
|
+
* Abstract, used to auto-detect resource type.
|
|
13986
13867
|
*
|
|
13987
|
-
* @static
|
|
13988
13868
|
* @param {*} source - The source object
|
|
13989
13869
|
* @param {string} extension - The extension of source, if set
|
|
13990
13870
|
*/
|
|
@@ -13999,15 +13879,14 @@ var Resource = /** @class */ (function () {
|
|
|
13999
13879
|
*/
|
|
14000
13880
|
/**
|
|
14001
13881
|
* Buffer resource with data of typed array.
|
|
14002
|
-
*
|
|
14003
|
-
* @extends PIXI.Resource
|
|
13882
|
+
*
|
|
14004
13883
|
* @memberof PIXI
|
|
14005
13884
|
*/
|
|
14006
13885
|
var BufferResource = /** @class */ (function (_super) {
|
|
14007
13886
|
__extends$2(BufferResource, _super);
|
|
14008
13887
|
/**
|
|
14009
|
-
* @param
|
|
14010
|
-
* @param
|
|
13888
|
+
* @param source - Source buffer
|
|
13889
|
+
* @param options - Options
|
|
14011
13890
|
* @param {number} options.width - Width of the texture
|
|
14012
13891
|
* @param {number} options.height - Height of the texture
|
|
14013
13892
|
*/
|
|
@@ -14018,21 +13897,16 @@ var BufferResource = /** @class */ (function (_super) {
|
|
|
14018
13897
|
throw new Error('BufferResource width or height invalid');
|
|
14019
13898
|
}
|
|
14020
13899
|
_this = _super.call(this, width, height) || this;
|
|
14021
|
-
/**
|
|
14022
|
-
* Source array
|
|
14023
|
-
* Cannot be ClampedUint8Array because it cant be uploaded to WebGL
|
|
14024
|
-
*
|
|
14025
|
-
* @member {Float32Array|Uint8Array|Uint32Array}
|
|
14026
|
-
*/
|
|
14027
13900
|
_this.data = source;
|
|
14028
13901
|
return _this;
|
|
14029
13902
|
}
|
|
14030
13903
|
/**
|
|
14031
13904
|
* Upload the texture to the GPU.
|
|
14032
|
-
*
|
|
14033
|
-
* @param
|
|
14034
|
-
* @param
|
|
14035
|
-
* @
|
|
13905
|
+
*
|
|
13906
|
+
* @param renderer - Upload to the renderer
|
|
13907
|
+
* @param baseTexture - Reference to parent texture
|
|
13908
|
+
* @param glTexture - glTexture
|
|
13909
|
+
* @returns - true is success
|
|
14036
13910
|
*/
|
|
14037
13911
|
BufferResource.prototype.upload = function (renderer, baseTexture, glTexture) {
|
|
14038
13912
|
var gl = renderer.gl;
|
|
@@ -14049,17 +13923,13 @@ var BufferResource = /** @class */ (function (_super) {
|
|
|
14049
13923
|
}
|
|
14050
13924
|
return true;
|
|
14051
13925
|
};
|
|
14052
|
-
/**
|
|
14053
|
-
* Destroy and don't use after this
|
|
14054
|
-
* @override
|
|
14055
|
-
*/
|
|
13926
|
+
/** Destroy and don't use after this. */
|
|
14056
13927
|
BufferResource.prototype.dispose = function () {
|
|
14057
13928
|
this.data = null;
|
|
14058
13929
|
};
|
|
14059
13930
|
/**
|
|
14060
13931
|
* Used to auto-detect the type of resource.
|
|
14061
13932
|
*
|
|
14062
|
-
* @static
|
|
14063
13933
|
* @param {*} source - The source object
|
|
14064
13934
|
* @return {boolean} `true` if <canvas>
|
|
14065
13935
|
*/
|
|
@@ -14548,15 +14418,13 @@ var BaseTexture = /** @class */ (function (_super) {
|
|
|
14548
14418
|
* All resources need to have the same pixel size.
|
|
14549
14419
|
* Parent class for CubeResource and ArrayResource
|
|
14550
14420
|
*
|
|
14551
|
-
* @class
|
|
14552
|
-
* @extends PIXI.Resource
|
|
14553
14421
|
* @memberof PIXI
|
|
14554
14422
|
*/
|
|
14555
14423
|
var AbstractMultiResource = /** @class */ (function (_super) {
|
|
14556
14424
|
__extends$2(AbstractMultiResource, _super);
|
|
14557
14425
|
/**
|
|
14558
|
-
* @param
|
|
14559
|
-
* @param
|
|
14426
|
+
* @param length
|
|
14427
|
+
* @param options - Options to for Resource constructor
|
|
14560
14428
|
* @param {number} [options.width] - Width of the resource
|
|
14561
14429
|
* @param {number} [options.height] - Height of the resource
|
|
14562
14430
|
*/
|
|
@@ -14564,17 +14432,7 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14564
14432
|
var _this = this;
|
|
14565
14433
|
var _a = options || {}, width = _a.width, height = _a.height;
|
|
14566
14434
|
_this = _super.call(this, width, height) || this;
|
|
14567
|
-
/**
|
|
14568
|
-
* Collection of partial baseTextures that correspond to resources
|
|
14569
|
-
* @member {Array<PIXI.BaseTexture>}
|
|
14570
|
-
* @readonly
|
|
14571
|
-
*/
|
|
14572
14435
|
_this.items = [];
|
|
14573
|
-
/**
|
|
14574
|
-
* Dirty IDs for each part
|
|
14575
|
-
* @member {Array<number>}
|
|
14576
|
-
* @readonly
|
|
14577
|
-
*/
|
|
14578
14436
|
_this.itemDirtyIds = [];
|
|
14579
14437
|
for (var i = 0; i < length; i++) {
|
|
14580
14438
|
var partTexture = new BaseTexture();
|
|
@@ -14584,33 +14442,17 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14584
14442
|
// >=0 - texture item uploaded , in sync with items[i].dirtyId
|
|
14585
14443
|
_this.itemDirtyIds.push(-2);
|
|
14586
14444
|
}
|
|
14587
|
-
/**
|
|
14588
|
-
* Number of elements in array
|
|
14589
|
-
*
|
|
14590
|
-
* @member {number}
|
|
14591
|
-
* @readonly
|
|
14592
|
-
*/
|
|
14593
14445
|
_this.length = length;
|
|
14594
|
-
/**
|
|
14595
|
-
* Promise when loading
|
|
14596
|
-
* @member {Promise}
|
|
14597
|
-
* @private
|
|
14598
|
-
* @default null
|
|
14599
|
-
*/
|
|
14600
14446
|
_this._load = null;
|
|
14601
|
-
/**
|
|
14602
|
-
* Bound baseTexture, there can only be one
|
|
14603
|
-
* @member {PIXI.BaseTexture}
|
|
14604
|
-
*/
|
|
14605
14447
|
_this.baseTexture = null;
|
|
14606
14448
|
return _this;
|
|
14607
14449
|
}
|
|
14608
14450
|
/**
|
|
14609
|
-
*
|
|
14610
|
-
*
|
|
14451
|
+
* Used from ArrayResource and CubeResource constructors.
|
|
14452
|
+
*
|
|
14453
|
+
* @param resources - Can be resources, image elements, canvas, etc. ,
|
|
14611
14454
|
* length should be same as constructor length
|
|
14612
|
-
* @param
|
|
14613
|
-
* @protected
|
|
14455
|
+
* @param options - Detect options for resources
|
|
14614
14456
|
*/
|
|
14615
14457
|
AbstractMultiResource.prototype.initFromArray = function (resources, options) {
|
|
14616
14458
|
for (var i = 0; i < this.length; i++) {
|
|
@@ -14628,10 +14470,7 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14628
14470
|
}
|
|
14629
14471
|
}
|
|
14630
14472
|
};
|
|
14631
|
-
/**
|
|
14632
|
-
* Destroy this BaseImageResource
|
|
14633
|
-
* @override
|
|
14634
|
-
*/
|
|
14473
|
+
/** Destroy this BaseImageResource. */
|
|
14635
14474
|
AbstractMultiResource.prototype.dispose = function () {
|
|
14636
14475
|
for (var i = 0, len = this.length; i < len; i++) {
|
|
14637
14476
|
this.items[i].destroy();
|
|
@@ -14643,9 +14482,9 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14643
14482
|
/**
|
|
14644
14483
|
* Set a resource by ID
|
|
14645
14484
|
*
|
|
14646
|
-
* @param
|
|
14647
|
-
* @param
|
|
14648
|
-
* @return
|
|
14485
|
+
* @param resource
|
|
14486
|
+
* @param index - Zero-based index of resource to set
|
|
14487
|
+
* @return - Instance for chaining
|
|
14649
14488
|
*/
|
|
14650
14489
|
AbstractMultiResource.prototype.addResourceAt = function (resource, index) {
|
|
14651
14490
|
if (!this.items[index]) {
|
|
@@ -14658,11 +14497,7 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14658
14497
|
this.items[index].setResource(resource);
|
|
14659
14498
|
return this;
|
|
14660
14499
|
};
|
|
14661
|
-
/**
|
|
14662
|
-
* Set the parent base texture
|
|
14663
|
-
* @member {PIXI.BaseTexture}
|
|
14664
|
-
* @override
|
|
14665
|
-
*/
|
|
14500
|
+
/** Set the parent base texture. */
|
|
14666
14501
|
AbstractMultiResource.prototype.bind = function (baseTexture) {
|
|
14667
14502
|
if (this.baseTexture !== null) {
|
|
14668
14503
|
throw new Error('Only one base texture per TextureArray is allowed');
|
|
@@ -14673,11 +14508,7 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14673
14508
|
this.items[i].on('update', baseTexture.update, baseTexture);
|
|
14674
14509
|
}
|
|
14675
14510
|
};
|
|
14676
|
-
/**
|
|
14677
|
-
* Unset the parent base texture
|
|
14678
|
-
* @member {PIXI.BaseTexture}
|
|
14679
|
-
* @override
|
|
14680
|
-
*/
|
|
14511
|
+
/** Unset the parent base texture. */
|
|
14681
14512
|
AbstractMultiResource.prototype.unbind = function (baseTexture) {
|
|
14682
14513
|
_super.prototype.unbind.call(this, baseTexture);
|
|
14683
14514
|
for (var i = 0; i < this.length; i++) {
|
|
@@ -14687,8 +14518,8 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14687
14518
|
};
|
|
14688
14519
|
/**
|
|
14689
14520
|
* Load all the resources simultaneously
|
|
14690
|
-
*
|
|
14691
|
-
* @return
|
|
14521
|
+
*
|
|
14522
|
+
* @return - When load is resolved
|
|
14692
14523
|
*/
|
|
14693
14524
|
AbstractMultiResource.prototype.load = function () {
|
|
14694
14525
|
var _this = this;
|
|
@@ -14712,16 +14543,14 @@ var AbstractMultiResource = /** @class */ (function (_super) {
|
|
|
14712
14543
|
/**
|
|
14713
14544
|
* A resource that contains a number of sources.
|
|
14714
14545
|
*
|
|
14715
|
-
* @class
|
|
14716
|
-
* @extends PIXI.Resource
|
|
14717
14546
|
* @memberof PIXI
|
|
14718
14547
|
*/
|
|
14719
14548
|
var ArrayResource = /** @class */ (function (_super) {
|
|
14720
14549
|
__extends$2(ArrayResource, _super);
|
|
14721
14550
|
/**
|
|
14722
|
-
* @param
|
|
14551
|
+
* @param source - Number of items in array or the collection
|
|
14723
14552
|
* of image URLs to use. Can also be resources, image elements, canvas, etc.
|
|
14724
|
-
* @param
|
|
14553
|
+
* @param options - Options to apply to {@link PIXI.autoDetectResource}
|
|
14725
14554
|
* @param {number} [options.width] - Width of the resource
|
|
14726
14555
|
* @param {number} [options.height] - Height of the resource
|
|
14727
14556
|
*/
|
|
@@ -14747,9 +14576,9 @@ var ArrayResource = /** @class */ (function (_super) {
|
|
|
14747
14576
|
* Set a baseTexture by ID,
|
|
14748
14577
|
* ArrayResource just takes resource from it, nothing more
|
|
14749
14578
|
*
|
|
14750
|
-
* @param
|
|
14751
|
-
* @param
|
|
14752
|
-
* @return
|
|
14579
|
+
* @param baseTexture
|
|
14580
|
+
* @param index - Zero-based index of resource to set
|
|
14581
|
+
* @return - Instance for chaining
|
|
14753
14582
|
*/
|
|
14754
14583
|
ArrayResource.prototype.addBaseTextureAt = function (baseTexture, index) {
|
|
14755
14584
|
if (baseTexture.resource) {
|
|
@@ -14760,21 +14589,18 @@ var ArrayResource = /** @class */ (function (_super) {
|
|
|
14760
14589
|
}
|
|
14761
14590
|
return this;
|
|
14762
14591
|
};
|
|
14763
|
-
/**
|
|
14764
|
-
* Add binding
|
|
14765
|
-
* @member {PIXI.BaseTexture}
|
|
14766
|
-
* @override
|
|
14767
|
-
*/
|
|
14592
|
+
/** Add binding */
|
|
14768
14593
|
ArrayResource.prototype.bind = function (baseTexture) {
|
|
14769
14594
|
_super.prototype.bind.call(this, baseTexture);
|
|
14770
14595
|
baseTexture.target = TARGETS$1.TEXTURE_2D_ARRAY;
|
|
14771
14596
|
};
|
|
14772
14597
|
/**
|
|
14773
14598
|
* Upload the resources to the GPU.
|
|
14774
|
-
*
|
|
14775
|
-
* @param
|
|
14776
|
-
* @param
|
|
14777
|
-
* @
|
|
14599
|
+
*
|
|
14600
|
+
* @param renderer
|
|
14601
|
+
* @param texture
|
|
14602
|
+
* @param glTexture
|
|
14603
|
+
* @returns - whether texture was uploaded
|
|
14778
14604
|
*/
|
|
14779
14605
|
ArrayResource.prototype.upload = function (renderer, texture, glTexture) {
|
|
14780
14606
|
var _a = this, length = _a.length, itemDirtyIds = _a.itemDirtyIds, items = _a.items;
|
|
@@ -14800,9 +14626,8 @@ var ArrayResource = /** @class */ (function (_super) {
|
|
|
14800
14626
|
}(AbstractMultiResource));
|
|
14801
14627
|
|
|
14802
14628
|
/**
|
|
14803
|
-
* Base for all the image/canvas resources
|
|
14804
|
-
*
|
|
14805
|
-
* @extends PIXI.Resource
|
|
14629
|
+
* Base for all the image/canvas resources.
|
|
14630
|
+
*
|
|
14806
14631
|
* @memberof PIXI
|
|
14807
14632
|
*/
|
|
14808
14633
|
var BaseImageResource = /** @class */ (function (_super) {
|
|
@@ -14816,28 +14641,16 @@ var BaseImageResource = /** @class */ (function (_super) {
|
|
|
14816
14641
|
var width = sourceAny.naturalWidth || sourceAny.videoWidth || sourceAny.width;
|
|
14817
14642
|
var height = sourceAny.naturalHeight || sourceAny.videoHeight || sourceAny.height;
|
|
14818
14643
|
_this = _super.call(this, width, height) || this;
|
|
14819
|
-
/**
|
|
14820
|
-
* The source element
|
|
14821
|
-
* @member {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement}
|
|
14822
|
-
* @readonly
|
|
14823
|
-
*/
|
|
14824
14644
|
_this.source = source;
|
|
14825
|
-
/**
|
|
14826
|
-
* If set to `true`, will force `texImage2D` over `texSubImage2D` for uploading.
|
|
14827
|
-
* Certain types of media (e.g. video) using `texImage2D` is more performant.
|
|
14828
|
-
* @member {boolean}
|
|
14829
|
-
* @default false
|
|
14830
|
-
* @private
|
|
14831
|
-
*/
|
|
14832
14645
|
_this.noSubImage = false;
|
|
14833
14646
|
return _this;
|
|
14834
14647
|
}
|
|
14835
14648
|
/**
|
|
14836
14649
|
* Set cross origin based detecting the url and the crossorigin
|
|
14837
|
-
*
|
|
14838
|
-
* @param
|
|
14839
|
-
* @param
|
|
14840
|
-
* @param
|
|
14650
|
+
*
|
|
14651
|
+
* @param element - Element to apply crossOrigin
|
|
14652
|
+
* @param url - URL to check
|
|
14653
|
+
* @param crossorigin - Cross origin value to use
|
|
14841
14654
|
*/
|
|
14842
14655
|
BaseImageResource.crossOrigin = function (element, url, crossorigin) {
|
|
14843
14656
|
if (crossorigin === undefined && url.indexOf('data:') !== 0) {
|
|
@@ -14849,11 +14662,12 @@ var BaseImageResource = /** @class */ (function (_super) {
|
|
|
14849
14662
|
};
|
|
14850
14663
|
/**
|
|
14851
14664
|
* Upload the texture to the GPU.
|
|
14852
|
-
*
|
|
14853
|
-
* @param
|
|
14854
|
-
* @param
|
|
14665
|
+
*
|
|
14666
|
+
* @param renderer - Upload to the renderer
|
|
14667
|
+
* @param baseTexture - Reference to parent texture
|
|
14668
|
+
* @param glTexture
|
|
14855
14669
|
* @param {HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|SVGElement} [source] - (optional)
|
|
14856
|
-
* @returns
|
|
14670
|
+
* @returns - true is success
|
|
14857
14671
|
*/
|
|
14858
14672
|
BaseImageResource.prototype.upload = function (renderer, baseTexture, glTexture, source) {
|
|
14859
14673
|
var gl = renderer.gl;
|
|
@@ -14888,10 +14702,7 @@ var BaseImageResource = /** @class */ (function (_super) {
|
|
|
14888
14702
|
this.resize(width, height);
|
|
14889
14703
|
_super.prototype.update.call(this);
|
|
14890
14704
|
};
|
|
14891
|
-
/**
|
|
14892
|
-
* Destroy this BaseImageResource
|
|
14893
|
-
* @override
|
|
14894
|
-
*/
|
|
14705
|
+
/** Destroy this {@link BaseImageResource} */
|
|
14895
14706
|
BaseImageResource.prototype.dispose = function () {
|
|
14896
14707
|
this.source = null;
|
|
14897
14708
|
};
|
|
@@ -14903,14 +14714,13 @@ var BaseImageResource = /** @class */ (function (_super) {
|
|
|
14903
14714
|
*/
|
|
14904
14715
|
/**
|
|
14905
14716
|
* Resource type for HTMLCanvasElement.
|
|
14906
|
-
*
|
|
14907
|
-
* @extends PIXI.BaseImageResource
|
|
14717
|
+
*
|
|
14908
14718
|
* @memberof PIXI
|
|
14909
14719
|
*/
|
|
14910
14720
|
var CanvasResource = /** @class */ (function (_super) {
|
|
14911
14721
|
__extends$2(CanvasResource, _super);
|
|
14912
14722
|
/**
|
|
14913
|
-
* @param
|
|
14723
|
+
* @param source - Canvas element to use
|
|
14914
14724
|
*/
|
|
14915
14725
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
14916
14726
|
function CanvasResource(source) {
|
|
@@ -14919,8 +14729,7 @@ var CanvasResource = /** @class */ (function (_super) {
|
|
|
14919
14729
|
/**
|
|
14920
14730
|
* Used to auto-detect the type of resource.
|
|
14921
14731
|
*
|
|
14922
|
-
* @
|
|
14923
|
-
* @param {HTMLCanvasElement|OffscreenCanvas} source - The source object
|
|
14732
|
+
* @param {*} source - The source object
|
|
14924
14733
|
* @return {boolean} `true` if source is HTMLCanvasElement or OffscreenCanvas
|
|
14925
14734
|
*/
|
|
14926
14735
|
CanvasResource.test = function (source) {
|
|
@@ -14937,8 +14746,6 @@ var CanvasResource = /** @class */ (function (_super) {
|
|
|
14937
14746
|
/**
|
|
14938
14747
|
* Resource for a CubeTexture which contains six resources.
|
|
14939
14748
|
*
|
|
14940
|
-
* @class
|
|
14941
|
-
* @extends PIXI.ArrayResource
|
|
14942
14749
|
* @memberof PIXI
|
|
14943
14750
|
*/
|
|
14944
14751
|
var CubeResource = /** @class */ (function (_super) {
|
|
@@ -14946,7 +14753,7 @@ var CubeResource = /** @class */ (function (_super) {
|
|
|
14946
14753
|
/**
|
|
14947
14754
|
* @param {Array<string|PIXI.Resource>} [source] - Collection of URLs or resources
|
|
14948
14755
|
* to use as the sides of the cube.
|
|
14949
|
-
* @param
|
|
14756
|
+
* @param options - ImageResource options
|
|
14950
14757
|
* @param {number} [options.width] - Width of resource
|
|
14951
14758
|
* @param {number} [options.height] - Height of resource
|
|
14952
14759
|
* @param {number} [options.autoLoad=true] - Whether to auto-load resources
|
|
@@ -14963,11 +14770,6 @@ var CubeResource = /** @class */ (function (_super) {
|
|
|
14963
14770
|
for (var i = 0; i < CubeResource.SIDES; i++) {
|
|
14964
14771
|
_this.items[i].target = TARGETS$1.TEXTURE_CUBE_MAP_POSITIVE_X + i;
|
|
14965
14772
|
}
|
|
14966
|
-
/**
|
|
14967
|
-
* In case BaseTextures are supplied, whether to use same resource or bind baseTexture itself
|
|
14968
|
-
* @member {boolean}
|
|
14969
|
-
* @protected
|
|
14970
|
-
*/
|
|
14971
14773
|
_this.linkBaseTexture = linkBaseTexture !== false;
|
|
14972
14774
|
if (source) {
|
|
14973
14775
|
_this.initFromArray(source, options);
|
|
@@ -14978,10 +14780,9 @@ var CubeResource = /** @class */ (function (_super) {
|
|
|
14978
14780
|
return _this;
|
|
14979
14781
|
}
|
|
14980
14782
|
/**
|
|
14981
|
-
* Add binding
|
|
14783
|
+
* Add binding.
|
|
14982
14784
|
*
|
|
14983
|
-
* @
|
|
14984
|
-
* @param {PIXI.BaseTexture} baseTexture - parent base texture
|
|
14785
|
+
* @param baseTexture - parent base texture
|
|
14985
14786
|
*/
|
|
14986
14787
|
CubeResource.prototype.bind = function (baseTexture) {
|
|
14987
14788
|
_super.prototype.bind.call(this, baseTexture);
|
|
@@ -15044,36 +14845,27 @@ var CubeResource = /** @class */ (function (_super) {
|
|
|
15044
14845
|
/**
|
|
15045
14846
|
* Used to auto-detect the type of resource.
|
|
15046
14847
|
*
|
|
15047
|
-
* @
|
|
15048
|
-
* @param {object} source - The source object
|
|
14848
|
+
* @param {*} source - The source object
|
|
15049
14849
|
* @return {boolean} `true` if source is an array of 6 elements
|
|
15050
14850
|
*/
|
|
15051
14851
|
CubeResource.test = function (source) {
|
|
15052
14852
|
return Array.isArray(source) && source.length === CubeResource.SIDES;
|
|
15053
14853
|
};
|
|
15054
|
-
/**
|
|
15055
|
-
* Number of texture sides to store for CubeResources
|
|
15056
|
-
*
|
|
15057
|
-
* @name PIXI.CubeResource.SIDES
|
|
15058
|
-
* @static
|
|
15059
|
-
* @member {number}
|
|
15060
|
-
* @default 6
|
|
15061
|
-
*/
|
|
14854
|
+
/** Number of texture sides to store for CubeResources. */
|
|
15062
14855
|
CubeResource.SIDES = 6;
|
|
15063
14856
|
return CubeResource;
|
|
15064
14857
|
}(AbstractMultiResource));
|
|
15065
14858
|
|
|
15066
14859
|
/**
|
|
15067
14860
|
* Resource type for HTMLImageElement.
|
|
15068
|
-
*
|
|
15069
|
-
* @extends PIXI.BaseImageResource
|
|
14861
|
+
*
|
|
15070
14862
|
* @memberof PIXI
|
|
15071
14863
|
*/
|
|
15072
14864
|
var ImageResource = /** @class */ (function (_super) {
|
|
15073
14865
|
__extends$2(ImageResource, _super);
|
|
15074
14866
|
/**
|
|
15075
|
-
* @param
|
|
15076
|
-
* @param
|
|
14867
|
+
* @param source - image source or URL
|
|
14868
|
+
* @param options
|
|
15077
14869
|
* @param {boolean} [options.autoLoad=true] - start loading process
|
|
15078
14870
|
* @param {boolean} [options.createBitmap=PIXI.settings.CREATE_IMAGE_BITMAP] - whether its required to create
|
|
15079
14871
|
* a bitmap before upload
|
|
@@ -15098,51 +14890,13 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15098
14890
|
_this._width = 0;
|
|
15099
14891
|
_this._height = 0;
|
|
15100
14892
|
}
|
|
15101
|
-
/**
|
|
15102
|
-
* URL of the image source
|
|
15103
|
-
* @member {string}
|
|
15104
|
-
*/
|
|
15105
14893
|
_this.url = source.src;
|
|
15106
|
-
/**
|
|
15107
|
-
* When process is completed
|
|
15108
|
-
* @member {Promise<void>}
|
|
15109
|
-
* @private
|
|
15110
|
-
*/
|
|
15111
14894
|
_this._process = null;
|
|
15112
|
-
/**
|
|
15113
|
-
* If the image should be disposed after upload
|
|
15114
|
-
* @member {boolean}
|
|
15115
|
-
* @default false
|
|
15116
|
-
*/
|
|
15117
14895
|
_this.preserveBitmap = false;
|
|
15118
|
-
/**
|
|
15119
|
-
* If capable, convert the image using createImageBitmap API
|
|
15120
|
-
* @member {boolean}
|
|
15121
|
-
* @default PIXI.settings.CREATE_IMAGE_BITMAP
|
|
15122
|
-
*/
|
|
15123
14896
|
_this.createBitmap = (options.createBitmap !== undefined
|
|
15124
14897
|
? options.createBitmap : settings.CREATE_IMAGE_BITMAP) && !!self.createImageBitmap;
|
|
15125
|
-
/**
|
|
15126
|
-
* Controls texture alphaMode field
|
|
15127
|
-
* Copies from options
|
|
15128
|
-
* Default is `null`, copies option from baseTexture
|
|
15129
|
-
*
|
|
15130
|
-
* @member {PIXI.ALPHA_MODES|null}
|
|
15131
|
-
* @readonly
|
|
15132
|
-
*/
|
|
15133
14898
|
_this.alphaMode = typeof options.alphaMode === 'number' ? options.alphaMode : null;
|
|
15134
|
-
/**
|
|
15135
|
-
* The ImageBitmap element created for HTMLImageElement
|
|
15136
|
-
* @member {ImageBitmap}
|
|
15137
|
-
* @default null
|
|
15138
|
-
*/
|
|
15139
14899
|
_this.bitmap = null;
|
|
15140
|
-
/**
|
|
15141
|
-
* Promise when loading
|
|
15142
|
-
* @member {Promise<void>}
|
|
15143
|
-
* @private
|
|
15144
|
-
* @default null
|
|
15145
|
-
*/
|
|
15146
14900
|
_this._load = null;
|
|
15147
14901
|
if (options.autoLoad !== false) {
|
|
15148
14902
|
_this.load();
|
|
@@ -15150,10 +14904,9 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15150
14904
|
return _this;
|
|
15151
14905
|
}
|
|
15152
14906
|
/**
|
|
15153
|
-
*
|
|
14907
|
+
* Returns a promise when image will be loaded and processed.
|
|
15154
14908
|
*
|
|
15155
|
-
* @param
|
|
15156
|
-
* @returns {Promise<void>}
|
|
14909
|
+
* @param createBitmap - whether process image into bitmap
|
|
15157
14910
|
*/
|
|
15158
14911
|
ImageResource.prototype.load = function (createBitmap) {
|
|
15159
14912
|
var _this = this;
|
|
@@ -15199,7 +14952,7 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15199
14952
|
* Called when we need to convert image into BitmapImage.
|
|
15200
14953
|
* Can be called multiple times, real promise is cached inside.
|
|
15201
14954
|
*
|
|
15202
|
-
* @
|
|
14955
|
+
* @return - Cached promise to fill that bitmap
|
|
15203
14956
|
*/
|
|
15204
14957
|
ImageResource.prototype.process = function () {
|
|
15205
14958
|
var _this = this;
|
|
@@ -15233,9 +14986,9 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15233
14986
|
/**
|
|
15234
14987
|
* Upload the image resource to GPU.
|
|
15235
14988
|
*
|
|
15236
|
-
* @param
|
|
15237
|
-
* @param
|
|
15238
|
-
* @param
|
|
14989
|
+
* @param renderer - Renderer to upload to
|
|
14990
|
+
* @param baseTexture - BaseTexture for this resource
|
|
14991
|
+
* @param glTexture - GLTexture to use
|
|
15239
14992
|
* @returns {boolean} true is success
|
|
15240
14993
|
*/
|
|
15241
14994
|
ImageResource.prototype.upload = function (renderer, baseTexture, glTexture) {
|
|
@@ -15274,10 +15027,7 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15274
15027
|
}
|
|
15275
15028
|
return true;
|
|
15276
15029
|
};
|
|
15277
|
-
/**
|
|
15278
|
-
* Destroys this texture
|
|
15279
|
-
* @override
|
|
15280
|
-
*/
|
|
15030
|
+
/** Destroys this resource. */
|
|
15281
15031
|
ImageResource.prototype.dispose = function () {
|
|
15282
15032
|
this.source.onload = null;
|
|
15283
15033
|
this.source.onerror = null;
|
|
@@ -15292,8 +15042,7 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15292
15042
|
/**
|
|
15293
15043
|
* Used to auto-detect the type of resource.
|
|
15294
15044
|
*
|
|
15295
|
-
* @
|
|
15296
|
-
* @param {string|HTMLImageElement} source - The source object
|
|
15045
|
+
* @param {*} source - The source object
|
|
15297
15046
|
* @return {boolean} `true` if source is string or HTMLImageElement
|
|
15298
15047
|
*/
|
|
15299
15048
|
ImageResource.test = function (source) {
|
|
@@ -15304,14 +15053,13 @@ var ImageResource = /** @class */ (function (_super) {
|
|
|
15304
15053
|
|
|
15305
15054
|
/**
|
|
15306
15055
|
* Resource type for SVG elements and graphics.
|
|
15307
|
-
*
|
|
15308
|
-
* @extends PIXI.BaseImageResource
|
|
15056
|
+
*
|
|
15309
15057
|
* @memberof PIXI
|
|
15310
15058
|
*/
|
|
15311
15059
|
var SVGResource = /** @class */ (function (_super) {
|
|
15312
15060
|
__extends$2(SVGResource, _super);
|
|
15313
15061
|
/**
|
|
15314
|
-
* @param
|
|
15062
|
+
* @param sourceBase64 - Base64 encoded SVG element or URL for SVG file.
|
|
15315
15063
|
* @param {object} [options] - Options to use
|
|
15316
15064
|
* @param {number} [options.scale=1] - Scale to apply to SVG. Overridden by...
|
|
15317
15065
|
* @param {number} [options.width] - Rasterize SVG this wide. Aspect ratio preserved if height not specified.
|
|
@@ -15324,48 +15072,12 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15324
15072
|
_this = _super.call(this, document.createElement('canvas')) || this;
|
|
15325
15073
|
_this._width = 0;
|
|
15326
15074
|
_this._height = 0;
|
|
15327
|
-
/**
|
|
15328
|
-
* Base64 encoded SVG element or URL for SVG file
|
|
15329
|
-
* @readonly
|
|
15330
|
-
* @member {string}
|
|
15331
|
-
*/
|
|
15332
15075
|
_this.svg = sourceBase64;
|
|
15333
|
-
/**
|
|
15334
|
-
* The source scale to apply when rasterizing on load
|
|
15335
|
-
* @readonly
|
|
15336
|
-
* @member {number}
|
|
15337
|
-
*/
|
|
15338
15076
|
_this.scale = options.scale || 1;
|
|
15339
|
-
/**
|
|
15340
|
-
* A width override for rasterization on load
|
|
15341
|
-
* @readonly
|
|
15342
|
-
* @member {number}
|
|
15343
|
-
*/
|
|
15344
15077
|
_this._overrideWidth = options.width;
|
|
15345
|
-
/**
|
|
15346
|
-
* A height override for rasterization on load
|
|
15347
|
-
* @readonly
|
|
15348
|
-
* @member {number}
|
|
15349
|
-
*/
|
|
15350
15078
|
_this._overrideHeight = options.height;
|
|
15351
|
-
/**
|
|
15352
|
-
* Call when completely loaded
|
|
15353
|
-
* @private
|
|
15354
|
-
* @member {function}
|
|
15355
|
-
*/
|
|
15356
15079
|
_this._resolve = null;
|
|
15357
|
-
/**
|
|
15358
|
-
* Cross origin value to use
|
|
15359
|
-
* @private
|
|
15360
|
-
* @member {boolean|string}
|
|
15361
|
-
*/
|
|
15362
15080
|
_this._crossorigin = options.crossorigin;
|
|
15363
|
-
/**
|
|
15364
|
-
* Promise when loading
|
|
15365
|
-
* @member {Promise<void>}
|
|
15366
|
-
* @private
|
|
15367
|
-
* @default null
|
|
15368
|
-
*/
|
|
15369
15081
|
_this._load = null;
|
|
15370
15082
|
if (options.autoLoad !== false) {
|
|
15371
15083
|
_this.load();
|
|
@@ -15394,11 +15106,7 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15394
15106
|
});
|
|
15395
15107
|
return this._load;
|
|
15396
15108
|
};
|
|
15397
|
-
/**
|
|
15398
|
-
* Loads an SVG image from `imageUrl` or `data URL`.
|
|
15399
|
-
*
|
|
15400
|
-
* @private
|
|
15401
|
-
*/
|
|
15109
|
+
/** Loads an SVG image from `imageUrl` or `data URL`. */
|
|
15402
15110
|
SVGResource.prototype._loadSvg = function () {
|
|
15403
15111
|
var _this = this;
|
|
15404
15112
|
var tempImage = new Image();
|
|
@@ -15443,11 +15151,10 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15443
15151
|
};
|
|
15444
15152
|
};
|
|
15445
15153
|
/**
|
|
15446
|
-
* Get size from an svg string using
|
|
15154
|
+
* Get size from an svg string using a regular expression.
|
|
15447
15155
|
*
|
|
15448
|
-
* @
|
|
15449
|
-
* @
|
|
15450
|
-
* @return {PIXI.ISize} image extension
|
|
15156
|
+
* @param svgString - a serialized svg element
|
|
15157
|
+
* @return - image extension
|
|
15451
15158
|
*/
|
|
15452
15159
|
SVGResource.getSize = function (svgString) {
|
|
15453
15160
|
var sizeMatch = SVGResource.SVG_SIZE.exec(svgString);
|
|
@@ -15458,10 +15165,7 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15458
15165
|
}
|
|
15459
15166
|
return size;
|
|
15460
15167
|
};
|
|
15461
|
-
/**
|
|
15462
|
-
* Destroys this texture
|
|
15463
|
-
* @override
|
|
15464
|
-
*/
|
|
15168
|
+
/** Destroys this texture. */
|
|
15465
15169
|
SVGResource.prototype.dispose = function () {
|
|
15466
15170
|
_super.prototype.dispose.call(this);
|
|
15467
15171
|
this._resolve = null;
|
|
@@ -15470,9 +15174,9 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15470
15174
|
/**
|
|
15471
15175
|
* Used to auto-detect the type of resource.
|
|
15472
15176
|
*
|
|
15473
|
-
* @static
|
|
15474
15177
|
* @param {*} source - The source object
|
|
15475
15178
|
* @param {string} extension - The extension of source, if set
|
|
15179
|
+
* @return {boolean} - If the source is a SVG source or data file
|
|
15476
15180
|
*/
|
|
15477
15181
|
SVGResource.test = function (source, extension) {
|
|
15478
15182
|
// url file extension is SVG
|
|
@@ -15483,27 +15187,25 @@ var SVGResource = /** @class */ (function (_super) {
|
|
|
15483
15187
|
|| (typeof source === 'string' && SVGResource.SVG_XML.test(source));
|
|
15484
15188
|
};
|
|
15485
15189
|
/**
|
|
15486
|
-
*
|
|
15190
|
+
* Regular expression for SVG XML document.
|
|
15487
15191
|
*
|
|
15488
15192
|
* @example <?xml version="1.0" encoding="utf-8" ?><!-- image/svg --><svg
|
|
15193
|
+
* @readonly
|
|
15489
15194
|
*/
|
|
15490
15195
|
SVGResource.SVG_XML = /^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m;
|
|
15491
15196
|
/**
|
|
15492
|
-
*
|
|
15197
|
+
* Regular expression for SVG size.
|
|
15493
15198
|
*
|
|
15494
|
-
* @static
|
|
15495
|
-
* @constant {RegExp|string} SVG_SIZE
|
|
15496
|
-
* @memberof PIXI.SVGResource
|
|
15497
15199
|
* @example <svg width="100" height="100"></svg>
|
|
15200
|
+
* @readonly
|
|
15498
15201
|
*/
|
|
15499
15202
|
SVGResource.SVG_SIZE = /<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i; // eslint-disable-line max-len
|
|
15500
15203
|
return SVGResource;
|
|
15501
15204
|
}(BaseImageResource));
|
|
15502
15205
|
|
|
15503
15206
|
/**
|
|
15504
|
-
* Resource type for HTMLVideoElement.
|
|
15505
|
-
*
|
|
15506
|
-
* @extends PIXI.BaseImageResource
|
|
15207
|
+
* Resource type for {@code HTMLVideoElement}.
|
|
15208
|
+
*
|
|
15507
15209
|
* @memberof PIXI
|
|
15508
15210
|
*/
|
|
15509
15211
|
var VideoResource = /** @class */ (function (_super) {
|
|
@@ -15548,44 +15250,12 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15548
15250
|
}
|
|
15549
15251
|
_this = _super.call(this, source) || this;
|
|
15550
15252
|
_this.noSubImage = true;
|
|
15551
|
-
/**
|
|
15552
|
-
* `true` to use PIXI.Ticker.shared to auto update the base texture.
|
|
15553
|
-
*
|
|
15554
|
-
* @type {boolean}
|
|
15555
|
-
* @default true
|
|
15556
|
-
* @private
|
|
15557
|
-
*/
|
|
15558
15253
|
_this._autoUpdate = true;
|
|
15559
|
-
/**
|
|
15560
|
-
* `true` if the instance is currently connected to PIXI.Ticker.shared to auto update the base texture.
|
|
15561
|
-
*
|
|
15562
|
-
* @type {boolean}
|
|
15563
|
-
* @default false
|
|
15564
|
-
* @private
|
|
15565
|
-
*/
|
|
15566
15254
|
_this._isConnectedToTicker = false;
|
|
15567
15255
|
_this._updateFPS = options.updateFPS || 0;
|
|
15568
15256
|
_this._msToNextUpdate = 0;
|
|
15569
|
-
/**
|
|
15570
|
-
* When set to true will automatically play videos used by this texture once
|
|
15571
|
-
* they are loaded. If false, it will not modify the playing state.
|
|
15572
|
-
*
|
|
15573
|
-
* @member {boolean}
|
|
15574
|
-
* @default true
|
|
15575
|
-
*/
|
|
15576
15257
|
_this.autoPlay = options.autoPlay !== false;
|
|
15577
|
-
/**
|
|
15578
|
-
* Promise when loading
|
|
15579
|
-
* @member {Promise<void>}
|
|
15580
|
-
* @private
|
|
15581
|
-
* @default null
|
|
15582
|
-
*/
|
|
15583
15258
|
_this._load = null;
|
|
15584
|
-
/**
|
|
15585
|
-
* Callback when completed with load.
|
|
15586
|
-
* @member {function}
|
|
15587
|
-
* @private
|
|
15588
|
-
*/
|
|
15589
15259
|
_this._resolve = null;
|
|
15590
15260
|
// Bind for listeners
|
|
15591
15261
|
_this._onCanPlay = _this._onCanPlay.bind(_this);
|
|
@@ -15596,9 +15266,9 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15596
15266
|
return _this;
|
|
15597
15267
|
}
|
|
15598
15268
|
/**
|
|
15599
|
-
* Trigger updating of the texture
|
|
15269
|
+
* Trigger updating of the texture.
|
|
15600
15270
|
*
|
|
15601
|
-
* @param
|
|
15271
|
+
* @param deltaTime - time delta since last tick
|
|
15602
15272
|
*/
|
|
15603
15273
|
VideoResource.prototype.update = function (_deltaTime) {
|
|
15604
15274
|
if (!this.destroyed) {
|
|
@@ -15614,7 +15284,6 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15614
15284
|
/**
|
|
15615
15285
|
* Start preloading the video resource.
|
|
15616
15286
|
*
|
|
15617
|
-
* @protected
|
|
15618
15287
|
* @return {Promise<void>} Handle the validate event
|
|
15619
15288
|
*/
|
|
15620
15289
|
VideoResource.prototype.load = function () {
|
|
@@ -15648,11 +15317,7 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15648
15317
|
});
|
|
15649
15318
|
return this._load;
|
|
15650
15319
|
};
|
|
15651
|
-
/**
|
|
15652
|
-
* Handle video error events.
|
|
15653
|
-
*
|
|
15654
|
-
* @private
|
|
15655
|
-
*/
|
|
15320
|
+
/** Handle video error events. */
|
|
15656
15321
|
VideoResource.prototype._onError = function (event) {
|
|
15657
15322
|
this.source.removeEventListener('error', this._onError, true);
|
|
15658
15323
|
this.onError.emit(event);
|
|
@@ -15660,8 +15325,7 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15660
15325
|
/**
|
|
15661
15326
|
* Returns true if the underlying source is playing.
|
|
15662
15327
|
*
|
|
15663
|
-
* @
|
|
15664
|
-
* @return {boolean} True if playing.
|
|
15328
|
+
* @return - True if playing.
|
|
15665
15329
|
*/
|
|
15666
15330
|
VideoResource.prototype._isSourcePlaying = function () {
|
|
15667
15331
|
var source = this.source;
|
|
@@ -15670,18 +15334,13 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15670
15334
|
/**
|
|
15671
15335
|
* Returns true if the underlying source is ready for playing.
|
|
15672
15336
|
*
|
|
15673
|
-
* @
|
|
15674
|
-
* @return {boolean} True if ready.
|
|
15337
|
+
* @return - True if ready.
|
|
15675
15338
|
*/
|
|
15676
15339
|
VideoResource.prototype._isSourceReady = function () {
|
|
15677
15340
|
var source = this.source;
|
|
15678
15341
|
return source.readyState === 3 || source.readyState === 4;
|
|
15679
15342
|
};
|
|
15680
|
-
/**
|
|
15681
|
-
* Runs the update loop when the video is ready to play
|
|
15682
|
-
*
|
|
15683
|
-
* @private
|
|
15684
|
-
*/
|
|
15343
|
+
/** Runs the update loop when the video is ready to play. */
|
|
15685
15344
|
VideoResource.prototype._onPlayStart = function () {
|
|
15686
15345
|
// Just in case the video has not received its can play even yet..
|
|
15687
15346
|
if (!this.valid) {
|
|
@@ -15692,22 +15351,14 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15692
15351
|
this._isConnectedToTicker = true;
|
|
15693
15352
|
}
|
|
15694
15353
|
};
|
|
15695
|
-
/**
|
|
15696
|
-
* Fired when a pause event is triggered, stops the update loop
|
|
15697
|
-
*
|
|
15698
|
-
* @private
|
|
15699
|
-
*/
|
|
15354
|
+
/** Fired when a pause event is triggered, stops the update loop. */
|
|
15700
15355
|
VideoResource.prototype._onPlayStop = function () {
|
|
15701
15356
|
if (this._isConnectedToTicker) {
|
|
15702
15357
|
Ticker.shared.remove(this.update, this);
|
|
15703
15358
|
this._isConnectedToTicker = false;
|
|
15704
15359
|
}
|
|
15705
15360
|
};
|
|
15706
|
-
/**
|
|
15707
|
-
* Fired when the video is loaded and ready to play
|
|
15708
|
-
*
|
|
15709
|
-
* @private
|
|
15710
|
-
*/
|
|
15361
|
+
/** Fired when the video is loaded and ready to play. */
|
|
15711
15362
|
VideoResource.prototype._onCanPlay = function () {
|
|
15712
15363
|
var source = this.source;
|
|
15713
15364
|
source.removeEventListener('canplay', this._onCanPlay);
|
|
@@ -15726,10 +15377,7 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15726
15377
|
source.play();
|
|
15727
15378
|
}
|
|
15728
15379
|
};
|
|
15729
|
-
/**
|
|
15730
|
-
* Destroys this texture
|
|
15731
|
-
* @override
|
|
15732
|
-
*/
|
|
15380
|
+
/** Destroys this texture. */
|
|
15733
15381
|
VideoResource.prototype.dispose = function () {
|
|
15734
15382
|
if (this._isConnectedToTicker) {
|
|
15735
15383
|
Ticker.shared.remove(this.update, this);
|
|
@@ -15745,11 +15393,7 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15745
15393
|
_super.prototype.dispose.call(this);
|
|
15746
15394
|
};
|
|
15747
15395
|
Object.defineProperty(VideoResource.prototype, "autoUpdate", {
|
|
15748
|
-
/**
|
|
15749
|
-
* Should the base texture automatically update itself, set to true by default
|
|
15750
|
-
*
|
|
15751
|
-
* @member {boolean}
|
|
15752
|
-
*/
|
|
15396
|
+
/** Should the base texture automatically update itself, set to true by default. */
|
|
15753
15397
|
get: function () {
|
|
15754
15398
|
return this._autoUpdate;
|
|
15755
15399
|
},
|
|
@@ -15773,8 +15417,6 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15773
15417
|
/**
|
|
15774
15418
|
* How many times a second to update the texture from the video. Leave at 0 to update at every render.
|
|
15775
15419
|
* A lower fps can help performance, as updating the texture at 60fps on a 30ps video may not be efficient.
|
|
15776
|
-
*
|
|
15777
|
-
* @member {number}
|
|
15778
15420
|
*/
|
|
15779
15421
|
get: function () {
|
|
15780
15422
|
return this._updateFPS;
|
|
@@ -15790,7 +15432,6 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15790
15432
|
/**
|
|
15791
15433
|
* Used to auto-detect the type of resource.
|
|
15792
15434
|
*
|
|
15793
|
-
* @static
|
|
15794
15435
|
* @param {*} source - The source object
|
|
15795
15436
|
* @param {string} extension - The extension of source, if set
|
|
15796
15437
|
* @return {boolean} `true` if video source
|
|
@@ -15801,17 +15442,13 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15801
15442
|
};
|
|
15802
15443
|
/**
|
|
15803
15444
|
* List of common video file extensions supported by VideoResource.
|
|
15804
|
-
*
|
|
15805
|
-
* @member {Array<string>}
|
|
15806
|
-
* @static
|
|
15445
|
+
*
|
|
15807
15446
|
* @readonly
|
|
15808
15447
|
*/
|
|
15809
15448
|
VideoResource.TYPES = ['mp4', 'm4v', 'webm', 'ogg', 'ogv', 'h264', 'avi', 'mov'];
|
|
15810
15449
|
/**
|
|
15811
15450
|
* Map of video MIME types that can't be directly derived from file extensions.
|
|
15812
|
-
*
|
|
15813
|
-
* @member {object}
|
|
15814
|
-
* @static
|
|
15451
|
+
*
|
|
15815
15452
|
* @readonly
|
|
15816
15453
|
*/
|
|
15817
15454
|
VideoResource.MIME_TYPES = {
|
|
@@ -15824,14 +15461,13 @@ var VideoResource = /** @class */ (function (_super) {
|
|
|
15824
15461
|
|
|
15825
15462
|
/**
|
|
15826
15463
|
* Resource type for ImageBitmap.
|
|
15827
|
-
*
|
|
15828
|
-
* @extends PIXI.BaseImageResource
|
|
15464
|
+
*
|
|
15829
15465
|
* @memberof PIXI
|
|
15830
15466
|
*/
|
|
15831
15467
|
var ImageBitmapResource = /** @class */ (function (_super) {
|
|
15832
15468
|
__extends$2(ImageBitmapResource, _super);
|
|
15833
15469
|
/**
|
|
15834
|
-
* @param
|
|
15470
|
+
* @param source - Image element to use
|
|
15835
15471
|
*/
|
|
15836
15472
|
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
|
|
15837
15473
|
function ImageBitmapResource(source) {
|
|
@@ -15840,8 +15476,7 @@ var ImageBitmapResource = /** @class */ (function (_super) {
|
|
|
15840
15476
|
/**
|
|
15841
15477
|
* Used to auto-detect the type of resource.
|
|
15842
15478
|
*
|
|
15843
|
-
* @
|
|
15844
|
-
* @param {ImageBitmap} source - The source object
|
|
15479
|
+
* @param {*} source - The source object
|
|
15845
15480
|
* @return {boolean} `true` if source is an ImageBitmap
|
|
15846
15481
|
*/
|
|
15847
15482
|
ImageBitmapResource.test = function (source) {
|
|
@@ -15871,8 +15506,7 @@ var _resources = {
|
|
|
15871
15506
|
|
|
15872
15507
|
/**
|
|
15873
15508
|
* Resource type for DepthTexture.
|
|
15874
|
-
*
|
|
15875
|
-
* @extends PIXI.BufferResource
|
|
15509
|
+
*
|
|
15876
15510
|
* @memberof PIXI
|
|
15877
15511
|
*/
|
|
15878
15512
|
var DepthResource = /** @class */ (function (_super) {
|
|
@@ -15882,10 +15516,11 @@ var DepthResource = /** @class */ (function (_super) {
|
|
|
15882
15516
|
}
|
|
15883
15517
|
/**
|
|
15884
15518
|
* Upload the texture to the GPU.
|
|
15885
|
-
*
|
|
15886
|
-
* @param
|
|
15887
|
-
* @param
|
|
15888
|
-
* @
|
|
15519
|
+
*
|
|
15520
|
+
* @param renderer - Upload to the renderer
|
|
15521
|
+
* @param baseTexture - Reference to parent texture
|
|
15522
|
+
* @param glTexture - glTexture
|
|
15523
|
+
* @return - true is success
|
|
15889
15524
|
*/
|
|
15890
15525
|
DepthResource.prototype.upload = function (renderer, baseTexture, glTexture) {
|
|
15891
15526
|
var gl = renderer.gl;
|
|
@@ -17209,17 +16844,17 @@ var RenderTexturePool = /** @class */ (function () {
|
|
|
17209
16844
|
* This does not contain the actual data, but instead has a buffer id that maps to a {@link PIXI.Buffer}
|
|
17210
16845
|
* This can include anything from positions, uvs, normals, colors etc.
|
|
17211
16846
|
*
|
|
17212
|
-
* @class
|
|
17213
16847
|
* @memberof PIXI
|
|
17214
16848
|
*/
|
|
17215
16849
|
var Attribute = /** @class */ (function () {
|
|
17216
16850
|
/**
|
|
17217
|
-
* @param
|
|
17218
|
-
* @param
|
|
17219
|
-
* @param
|
|
16851
|
+
* @param buffer - the id of the buffer that this attribute will look for
|
|
16852
|
+
* @param size - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2.
|
|
16853
|
+
* @param normalized - should the data be normalized.
|
|
17220
16854
|
* @param {PIXI.TYPES} [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available
|
|
17221
|
-
* @param
|
|
17222
|
-
* @param
|
|
16855
|
+
* @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data)
|
|
16856
|
+
* @param [start=0] - How far into the array to start reading values (used for interleaving data)
|
|
16857
|
+
* @param [instance=false] - Whether the geometry is instanced.
|
|
17223
16858
|
*/
|
|
17224
16859
|
function Attribute(buffer, size, normalized, type, stride, start, instance) {
|
|
17225
16860
|
if (size === void 0) { size = 0; }
|
|
@@ -17233,23 +16868,19 @@ var Attribute = /** @class */ (function () {
|
|
|
17233
16868
|
this.start = start;
|
|
17234
16869
|
this.instance = instance;
|
|
17235
16870
|
}
|
|
17236
|
-
/**
|
|
17237
|
-
* Destroys the Attribute.
|
|
17238
|
-
*/
|
|
16871
|
+
/** Destroys the Attribute. */
|
|
17239
16872
|
Attribute.prototype.destroy = function () {
|
|
17240
16873
|
this.buffer = null;
|
|
17241
16874
|
};
|
|
17242
16875
|
/**
|
|
17243
16876
|
* Helper function that creates an Attribute based on the information provided
|
|
17244
16877
|
*
|
|
17245
|
-
* @
|
|
17246
|
-
* @param
|
|
17247
|
-
* @param
|
|
17248
|
-
* @param
|
|
17249
|
-
* @param
|
|
17250
|
-
* @
|
|
17251
|
-
*
|
|
17252
|
-
* @returns {PIXI.Attribute} A new {@link PIXI.Attribute} based on the information provided
|
|
16878
|
+
* @param buffer - the id of the buffer that this attribute will look for
|
|
16879
|
+
* @param [size=0] - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2
|
|
16880
|
+
* @param [normalized=false] - should the data be normalized.
|
|
16881
|
+
* @param [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {@link PIXI.TYPES} to see the ones available
|
|
16882
|
+
* @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data)
|
|
16883
|
+
* @returns - A new {@link PIXI.Attribute} based on the information provided
|
|
17253
16884
|
*/
|
|
17254
16885
|
Attribute.from = function (buffer, size, normalized, type, stride) {
|
|
17255
16886
|
return new Attribute(buffer, size, normalized, type, stride);
|
|
@@ -17261,30 +16892,18 @@ var UID = 0;
|
|
|
17261
16892
|
/**
|
|
17262
16893
|
* A wrapper for data so that it can be used and uploaded by WebGL
|
|
17263
16894
|
*
|
|
17264
|
-
* @class
|
|
17265
16895
|
* @memberof PIXI
|
|
17266
16896
|
*/
|
|
17267
16897
|
var Buffer = /** @class */ (function () {
|
|
17268
16898
|
/**
|
|
17269
16899
|
* @param {ArrayBuffer| SharedArrayBuffer|ArrayBufferView} data - the data to store in the buffer.
|
|
17270
|
-
* @param
|
|
17271
|
-
* @param
|
|
16900
|
+
* @param _static - `true` for static buffer
|
|
16901
|
+
* @param index - `true` for index buffer
|
|
17272
16902
|
*/
|
|
17273
16903
|
function Buffer(data, _static, index) {
|
|
17274
16904
|
if (_static === void 0) { _static = true; }
|
|
17275
16905
|
if (index === void 0) { index = false; }
|
|
17276
|
-
/**
|
|
17277
|
-
* The data in the buffer, as a typed array
|
|
17278
|
-
*
|
|
17279
|
-
* @member {ArrayBuffer| SharedArrayBuffer | ArrayBufferView}
|
|
17280
|
-
*/
|
|
17281
16906
|
this.data = (data || new Float32Array(1));
|
|
17282
|
-
/**
|
|
17283
|
-
* A map of renderer IDs to webgl buffer
|
|
17284
|
-
*
|
|
17285
|
-
* @private
|
|
17286
|
-
* @member {object<number, GLBuffer>}
|
|
17287
|
-
*/
|
|
17288
16907
|
this._glBuffers = {};
|
|
17289
16908
|
this._updateID = 0;
|
|
17290
16909
|
this.index = index;
|
|
@@ -17294,7 +16913,7 @@ var Buffer = /** @class */ (function () {
|
|
|
17294
16913
|
}
|
|
17295
16914
|
// TODO could explore flagging only a partial upload?
|
|
17296
16915
|
/**
|
|
17297
|
-
*
|
|
16916
|
+
* Flags this buffer as requiring an upload to the GPU.
|
|
17298
16917
|
* @param {ArrayBuffer|SharedArrayBuffer|ArrayBufferView|number[]} [data] - the data to update in the buffer.
|
|
17299
16918
|
*/
|
|
17300
16919
|
Buffer.prototype.update = function (data) {
|
|
@@ -17304,15 +16923,11 @@ var Buffer = /** @class */ (function () {
|
|
|
17304
16923
|
this.data = data || this.data;
|
|
17305
16924
|
this._updateID++;
|
|
17306
16925
|
};
|
|
17307
|
-
/**
|
|
17308
|
-
* disposes WebGL resources that are connected to this geometry
|
|
17309
|
-
*/
|
|
16926
|
+
/** Disposes WebGL resources that are connected to this geometry. */
|
|
17310
16927
|
Buffer.prototype.dispose = function () {
|
|
17311
16928
|
this.disposeRunner.emit(this, false);
|
|
17312
16929
|
};
|
|
17313
|
-
/**
|
|
17314
|
-
* Destroys the buffer
|
|
17315
|
-
*/
|
|
16930
|
+
/** Destroys the buffer. */
|
|
17316
16931
|
Buffer.prototype.destroy = function () {
|
|
17317
16932
|
this.dispose();
|
|
17318
16933
|
this.data = null;
|
|
@@ -17338,9 +16953,8 @@ var Buffer = /** @class */ (function () {
|
|
|
17338
16953
|
/**
|
|
17339
16954
|
* Helper function that creates a buffer based on an array or TypedArray
|
|
17340
16955
|
*
|
|
17341
|
-
* @static
|
|
17342
16956
|
* @param {ArrayBufferView | number[]} data - the TypedArray that the buffer will store. If this is a regular Array it will be converted to a Float32Array.
|
|
17343
|
-
* @return
|
|
16957
|
+
* @return - A new Buffer based on the data provided.
|
|
17344
16958
|
*/
|
|
17345
16959
|
Buffer.from = function (data) {
|
|
17346
16960
|
if (data instanceof Array) {
|
|
@@ -17412,15 +17026,14 @@ var map$1$1 = {
|
|
|
17412
17026
|
* geometry.addAttribute('positions', [0, 0, 100, 0, 100, 100, 0, 100], 2);
|
|
17413
17027
|
* geometry.addAttribute('uvs', [0,0,1,0,1,1,0,1],2)
|
|
17414
17028
|
* geometry.addIndex([0,1,2,1,3,2])
|
|
17415
|
-
*
|
|
17416
17029
|
* ```
|
|
17417
|
-
*
|
|
17030
|
+
*
|
|
17418
17031
|
* @memberof PIXI
|
|
17419
17032
|
*/
|
|
17420
17033
|
var Geometry = /** @class */ (function () {
|
|
17421
17034
|
/**
|
|
17422
|
-
* @param
|
|
17423
|
-
* @param
|
|
17035
|
+
* @param buffers - An array of buffers. optional.
|
|
17036
|
+
* @param attributes - Of the geometry, optional structure of the attributes layout
|
|
17424
17037
|
*/
|
|
17425
17038
|
function Geometry(buffers, attributes) {
|
|
17426
17039
|
if (buffers === void 0) { buffers = []; }
|
|
@@ -17428,44 +17041,28 @@ var Geometry = /** @class */ (function () {
|
|
|
17428
17041
|
this.buffers = buffers;
|
|
17429
17042
|
this.indexBuffer = null;
|
|
17430
17043
|
this.attributes = attributes;
|
|
17431
|
-
/**
|
|
17432
|
-
* A map of renderer IDs to webgl VAOs
|
|
17433
|
-
*
|
|
17434
|
-
* @protected
|
|
17435
|
-
* @type {object}
|
|
17436
|
-
*/
|
|
17437
17044
|
this.glVertexArrayObjects = {};
|
|
17438
17045
|
this.id = UID$1++;
|
|
17439
17046
|
this.instanced = false;
|
|
17440
|
-
/**
|
|
17441
|
-
* Number of instances in this geometry, pass it to `GeometrySystem.draw()`
|
|
17442
|
-
* @member {number}
|
|
17443
|
-
* @default 1
|
|
17444
|
-
*/
|
|
17445
17047
|
this.instanceCount = 1;
|
|
17446
17048
|
this.disposeRunner = new Runner('disposeGeometry');
|
|
17447
|
-
/**
|
|
17448
|
-
* Count of existing (not destroyed) meshes that reference this geometry
|
|
17449
|
-
* @member {number}
|
|
17450
|
-
*/
|
|
17451
17049
|
this.refCount = 0;
|
|
17452
17050
|
}
|
|
17453
17051
|
/**
|
|
17454
|
-
|
|
17455
|
-
|
|
17456
|
-
|
|
17457
|
-
|
|
17458
|
-
|
|
17459
|
-
|
|
17460
|
-
|
|
17461
|
-
|
|
17462
|
-
|
|
17463
|
-
|
|
17464
|
-
|
|
17465
|
-
|
|
17466
|
-
|
|
17467
|
-
|
|
17468
|
-
*/
|
|
17052
|
+
*
|
|
17053
|
+
* Adds an attribute to the geometry
|
|
17054
|
+
* Note: `stride` and `start` should be `undefined` if you dont know them, not 0!
|
|
17055
|
+
*
|
|
17056
|
+
* @param id - the name of the attribute (matching up to a shader)
|
|
17057
|
+
* @param {PIXI.Buffer|number[]} buffer - the buffer that holds the data of the attribute . You can also provide an Array and a buffer will be created from it.
|
|
17058
|
+
* @param size - the size of the attribute. If you have 2 floats per vertex (eg position x and y) this would be 2
|
|
17059
|
+
* @param normalized - should the data be normalized.
|
|
17060
|
+
* @param [type=PIXI.TYPES.FLOAT] - what type of number is the attribute. Check {PIXI.TYPES} to see the ones available
|
|
17061
|
+
* @param [stride=0] - How far apart, in bytes, the start of each value is. (used for interleaving data)
|
|
17062
|
+
* @param [start=0] - How far into the array to start reading values (used for interleaving data)
|
|
17063
|
+
* @param instance - Instancing flag
|
|
17064
|
+
* @return - Returns self, useful for chaining.
|
|
17065
|
+
*/
|
|
17469
17066
|
Geometry.prototype.addAttribute = function (id, buffer, size, normalized, type, stride, start, instance) {
|
|
17470
17067
|
if (size === void 0) { size = 0; }
|
|
17471
17068
|
if (normalized === void 0) { normalized = false; }
|
|
@@ -17499,19 +17096,19 @@ var Geometry = /** @class */ (function () {
|
|
|
17499
17096
|
return this;
|
|
17500
17097
|
};
|
|
17501
17098
|
/**
|
|
17502
|
-
*
|
|
17099
|
+
* Returns the requested attribute.
|
|
17503
17100
|
*
|
|
17504
|
-
* @param
|
|
17505
|
-
* @return
|
|
17101
|
+
* @param id - The name of the attribute required
|
|
17102
|
+
* @return - The attribute requested.
|
|
17506
17103
|
*/
|
|
17507
17104
|
Geometry.prototype.getAttribute = function (id) {
|
|
17508
17105
|
return this.attributes[id];
|
|
17509
17106
|
};
|
|
17510
17107
|
/**
|
|
17511
|
-
*
|
|
17108
|
+
* Returns the requested buffer.
|
|
17512
17109
|
*
|
|
17513
|
-
* @param
|
|
17514
|
-
* @return
|
|
17110
|
+
* @param id - The name of the buffer required.
|
|
17111
|
+
* @return - The buffer requested.
|
|
17515
17112
|
*/
|
|
17516
17113
|
Geometry.prototype.getBuffer = function (id) {
|
|
17517
17114
|
return this.buffers[this.getAttribute(id).buffer];
|
|
@@ -17521,8 +17118,8 @@ var Geometry = /** @class */ (function () {
|
|
|
17521
17118
|
* Adds an index buffer to the geometry
|
|
17522
17119
|
* The index buffer contains integers, three for each triangle in the geometry, which reference the various attribute buffers (position, colour, UV coordinates, other UV coordinates, normal, …). There is only ONE index buffer.
|
|
17523
17120
|
*
|
|
17524
|
-
* @param {PIXI.Buffer|number[]} [buffer] -
|
|
17525
|
-
* @return
|
|
17121
|
+
* @param {PIXI.Buffer|number[]} [buffer] - The buffer that holds the data of the index buffer. You can also provide an Array and a buffer will be created from it.
|
|
17122
|
+
* @return - Returns self, useful for chaining.
|
|
17526
17123
|
*/
|
|
17527
17124
|
Geometry.prototype.addIndex = function (buffer) {
|
|
17528
17125
|
if (!(buffer instanceof Buffer)) {
|
|
@@ -17540,18 +17137,18 @@ var Geometry = /** @class */ (function () {
|
|
|
17540
17137
|
return this;
|
|
17541
17138
|
};
|
|
17542
17139
|
/**
|
|
17543
|
-
*
|
|
17140
|
+
* Returns the index buffer
|
|
17544
17141
|
*
|
|
17545
|
-
* @return
|
|
17142
|
+
* @return - The index buffer.
|
|
17546
17143
|
*/
|
|
17547
17144
|
Geometry.prototype.getIndex = function () {
|
|
17548
17145
|
return this.indexBuffer;
|
|
17549
17146
|
};
|
|
17550
17147
|
/**
|
|
17551
|
-
*
|
|
17148
|
+
* This function modifies the structure so that all current attributes become interleaved into a single buffer
|
|
17552
17149
|
* This can be useful if your model remains static as it offers a little performance boost
|
|
17553
17150
|
*
|
|
17554
|
-
* @return
|
|
17151
|
+
* @return - Returns self, useful for chaining.
|
|
17555
17152
|
*/
|
|
17556
17153
|
Geometry.prototype.interleave = function () {
|
|
17557
17154
|
// a simple check to see if buffers are already interleaved..
|
|
@@ -17581,6 +17178,7 @@ var Geometry = /** @class */ (function () {
|
|
|
17581
17178
|
}
|
|
17582
17179
|
return this;
|
|
17583
17180
|
};
|
|
17181
|
+
/** Get the size of the geometries, in vertices. */
|
|
17584
17182
|
Geometry.prototype.getSize = function () {
|
|
17585
17183
|
for (var i in this.attributes) {
|
|
17586
17184
|
var attribute = this.attributes[i];
|
|
@@ -17589,15 +17187,11 @@ var Geometry = /** @class */ (function () {
|
|
|
17589
17187
|
}
|
|
17590
17188
|
return 0;
|
|
17591
17189
|
};
|
|
17592
|
-
/**
|
|
17593
|
-
* disposes WebGL resources that are connected to this geometry
|
|
17594
|
-
*/
|
|
17190
|
+
/** Disposes WebGL resources that are connected to this geometry. */
|
|
17595
17191
|
Geometry.prototype.dispose = function () {
|
|
17596
17192
|
this.disposeRunner.emit(this, false);
|
|
17597
17193
|
};
|
|
17598
|
-
/**
|
|
17599
|
-
* Destroys the geometry.
|
|
17600
|
-
*/
|
|
17194
|
+
/** Destroys the geometry. */
|
|
17601
17195
|
Geometry.prototype.destroy = function () {
|
|
17602
17196
|
this.dispose();
|
|
17603
17197
|
this.buffers = null;
|
|
@@ -17605,9 +17199,9 @@ var Geometry = /** @class */ (function () {
|
|
|
17605
17199
|
this.attributes = null;
|
|
17606
17200
|
};
|
|
17607
17201
|
/**
|
|
17608
|
-
*
|
|
17202
|
+
* Returns a clone of the geometry.
|
|
17609
17203
|
*
|
|
17610
|
-
* @returns
|
|
17204
|
+
* @returns - A new clone of this geometry.
|
|
17611
17205
|
*/
|
|
17612
17206
|
Geometry.prototype.clone = function () {
|
|
17613
17207
|
var geometry = new Geometry();
|
|
@@ -17625,11 +17219,12 @@ var Geometry = /** @class */ (function () {
|
|
|
17625
17219
|
return geometry;
|
|
17626
17220
|
};
|
|
17627
17221
|
/**
|
|
17628
|
-
*
|
|
17629
|
-
* geometry attribute styles must match for this operation to work
|
|
17222
|
+
* Merges an array of geometries into a new single one.
|
|
17630
17223
|
*
|
|
17631
|
-
*
|
|
17632
|
-
*
|
|
17224
|
+
* Geometry attribute styles must match for this operation to work.
|
|
17225
|
+
*
|
|
17226
|
+
* @param geometries - array of geometries to merge
|
|
17227
|
+
* @return - Shiny new geometry!
|
|
17633
17228
|
*/
|
|
17634
17229
|
Geometry.merge = function (geometries) {
|
|
17635
17230
|
// todo add a geometry check!
|
|
@@ -17937,81 +17532,25 @@ var UniformGroup = /** @class */ (function () {
|
|
|
17937
17532
|
/**
|
|
17938
17533
|
* System plugin to the renderer to manage filter states.
|
|
17939
17534
|
*
|
|
17940
|
-
* @
|
|
17941
|
-
* @private
|
|
17535
|
+
* @ignore
|
|
17942
17536
|
*/
|
|
17943
17537
|
var FilterState = /** @class */ (function () {
|
|
17944
17538
|
function FilterState() {
|
|
17945
17539
|
this.renderTexture = null;
|
|
17946
|
-
/**
|
|
17947
|
-
* Target of the filters
|
|
17948
|
-
* We store for case when custom filter wants to know the element it was applied on
|
|
17949
|
-
* @member {PIXI.DisplayObject}
|
|
17950
|
-
* @private
|
|
17951
|
-
*/
|
|
17952
17540
|
this.target = null;
|
|
17953
|
-
/**
|
|
17954
|
-
* Compatibility with PixiJS v4 filters
|
|
17955
|
-
* @member {boolean}
|
|
17956
|
-
* @default false
|
|
17957
|
-
* @private
|
|
17958
|
-
*/
|
|
17959
17541
|
this.legacy = false;
|
|
17960
|
-
/**
|
|
17961
|
-
* Resolution of filters
|
|
17962
|
-
* @member {number}
|
|
17963
|
-
* @default 1
|
|
17964
|
-
* @private
|
|
17965
|
-
*/
|
|
17966
17542
|
this.resolution = 1;
|
|
17967
|
-
/**
|
|
17968
|
-
* Number of samples
|
|
17969
|
-
* @member {PIXI.MSAA_QUALITY}
|
|
17970
|
-
* @default MSAA_QUALITY.NONE
|
|
17971
|
-
* @private
|
|
17972
|
-
*/
|
|
17973
17543
|
this.multisample = MSAA_QUALITY$1.NONE;
|
|
17974
17544
|
// next three fields are created only for root
|
|
17975
17545
|
// re-assigned for everything else
|
|
17976
|
-
/**
|
|
17977
|
-
* Source frame
|
|
17978
|
-
* @member {PIXI.Rectangle}
|
|
17979
|
-
* @private
|
|
17980
|
-
*/
|
|
17981
17546
|
this.sourceFrame = new Rectangle();
|
|
17982
|
-
/**
|
|
17983
|
-
* Destination frame
|
|
17984
|
-
* @member {PIXI.Rectangle}
|
|
17985
|
-
* @private
|
|
17986
|
-
*/
|
|
17987
17547
|
this.destinationFrame = new Rectangle();
|
|
17988
|
-
/**
|
|
17989
|
-
* Original render-target source frame
|
|
17990
|
-
* @private
|
|
17991
|
-
*/
|
|
17992
17548
|
this.bindingSourceFrame = new Rectangle();
|
|
17993
|
-
/**
|
|
17994
|
-
* Original render-target destination frame
|
|
17995
|
-
* @private
|
|
17996
|
-
*/
|
|
17997
17549
|
this.bindingDestinationFrame = new Rectangle();
|
|
17998
|
-
/**
|
|
17999
|
-
* Collection of filters
|
|
18000
|
-
* @member {PIXI.Filter[]}
|
|
18001
|
-
* @private
|
|
18002
|
-
*/
|
|
18003
17550
|
this.filters = [];
|
|
18004
|
-
/**
|
|
18005
|
-
* Projection system transform saved by link.
|
|
18006
|
-
* @member {PIXI.Matrix}
|
|
18007
|
-
* @private
|
|
18008
|
-
*/
|
|
18009
17551
|
this.transform = null;
|
|
18010
17552
|
}
|
|
18011
|
-
/**
|
|
18012
|
-
* clears the state
|
|
18013
|
-
* @private
|
|
18014
|
-
*/
|
|
17553
|
+
/** Clears the state */
|
|
18015
17554
|
FilterState.prototype.clear = function () {
|
|
18016
17555
|
this.target = null;
|
|
18017
17556
|
this.filters = null;
|
|
@@ -18046,64 +17585,22 @@ var tempMatrix = new Matrix();
|
|
|
18046
17585
|
* * **pop**: Use {@link PIXI.FilterSystem#pop} to pop & execute the filters you initially pushed. It will apply them
|
|
18047
17586
|
* serially and output to the bounds of the filter-target.
|
|
18048
17587
|
*
|
|
18049
|
-
* @class
|
|
18050
17588
|
* @memberof PIXI
|
|
18051
|
-
* @extends PIXI.System
|
|
18052
17589
|
*/
|
|
18053
17590
|
var FilterSystem = /** @class */ (function () {
|
|
18054
17591
|
/**
|
|
18055
|
-
* @param
|
|
17592
|
+
* @param renderer - The renderer this System works for.
|
|
18056
17593
|
*/
|
|
18057
17594
|
function FilterSystem(renderer) {
|
|
18058
17595
|
this.renderer = renderer;
|
|
18059
|
-
/**
|
|
18060
|
-
* List of filters for the FilterSystem
|
|
18061
|
-
* @member {Object[]}
|
|
18062
|
-
* @readonly
|
|
18063
|
-
*/
|
|
18064
17596
|
this.defaultFilterStack = [{}];
|
|
18065
|
-
/**
|
|
18066
|
-
* stores a bunch of PO2 textures used for filtering
|
|
18067
|
-
* @member {Object}
|
|
18068
|
-
*/
|
|
18069
17597
|
this.texturePool = new RenderTexturePool();
|
|
18070
17598
|
this.texturePool.setScreenSize(renderer.view);
|
|
18071
|
-
/**
|
|
18072
|
-
* a pool for storing filter states, save us creating new ones each tick
|
|
18073
|
-
* @member {Object[]}
|
|
18074
|
-
*/
|
|
18075
17599
|
this.statePool = [];
|
|
18076
|
-
/**
|
|
18077
|
-
* A very simple geometry used when drawing a filter effect to the screen
|
|
18078
|
-
* @member {PIXI.Quad}
|
|
18079
|
-
*/
|
|
18080
17600
|
this.quad = new Quad();
|
|
18081
|
-
/**
|
|
18082
|
-
* Quad UVs
|
|
18083
|
-
* @member {PIXI.QuadUv}
|
|
18084
|
-
*/
|
|
18085
17601
|
this.quadUv = new QuadUv();
|
|
18086
|
-
/**
|
|
18087
|
-
* Temporary rect for maths
|
|
18088
|
-
* @type {PIXI.Rectangle}
|
|
18089
|
-
*/
|
|
18090
17602
|
this.tempRect = new Rectangle();
|
|
18091
|
-
/**
|
|
18092
|
-
* Active state
|
|
18093
|
-
* @member {object}
|
|
18094
|
-
*/
|
|
18095
17603
|
this.activeState = {};
|
|
18096
|
-
/**
|
|
18097
|
-
* This uniform group is attached to filter uniforms when used
|
|
18098
|
-
* @member {PIXI.UniformGroup}
|
|
18099
|
-
* @property {PIXI.Rectangle} outputFrame
|
|
18100
|
-
* @property {Float32Array} inputSize
|
|
18101
|
-
* @property {Float32Array} inputPixel
|
|
18102
|
-
* @property {Float32Array} inputClamp
|
|
18103
|
-
* @property {Number} resolution
|
|
18104
|
-
* @property {Float32Array} filterArea
|
|
18105
|
-
* @property {Float32Array} filterClamp
|
|
18106
|
-
*/
|
|
18107
17604
|
this.globalUniforms = new UniformGroup({
|
|
18108
17605
|
outputFrame: new Rectangle(),
|
|
18109
17606
|
inputSize: new Float32Array(4),
|
|
@@ -18114,17 +17611,7 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18114
17611
|
filterArea: new Float32Array(4),
|
|
18115
17612
|
filterClamp: new Float32Array(4),
|
|
18116
17613
|
}, true);
|
|
18117
|
-
/**
|
|
18118
|
-
* Whether to clear output renderTexture in AUTO/BLIT mode. See {@link PIXI.CLEAR_MODES}
|
|
18119
|
-
* @member {boolean}
|
|
18120
|
-
*/
|
|
18121
17614
|
this.forceClear = false;
|
|
18122
|
-
/**
|
|
18123
|
-
* Old padding behavior is to use the max amount instead of sum padding.
|
|
18124
|
-
* Use this flag if you need the old behavior.
|
|
18125
|
-
* @member {boolean}
|
|
18126
|
-
* @default false
|
|
18127
|
-
*/
|
|
18128
17615
|
this.useMaxPadding = false;
|
|
18129
17616
|
}
|
|
18130
17617
|
/**
|
|
@@ -18132,9 +17619,10 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18132
17619
|
* input render-texture for the rest of the filtering pipeline.
|
|
18133
17620
|
*
|
|
18134
17621
|
* @param {PIXI.DisplayObject} target - The target of the filter to render.
|
|
18135
|
-
* @param
|
|
17622
|
+
* @param filters - The filters to apply.
|
|
18136
17623
|
*/
|
|
18137
17624
|
FilterSystem.prototype.push = function (target, filters) {
|
|
17625
|
+
var _a, _b;
|
|
18138
17626
|
var renderer = this.renderer;
|
|
18139
17627
|
var filterStack = this.defaultFilterStack;
|
|
18140
17628
|
var state = this.statePool.pop() || new FilterState();
|
|
@@ -18143,7 +17631,9 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18143
17631
|
var multisample = filters[0].multisample;
|
|
18144
17632
|
var padding = filters[0].padding;
|
|
18145
17633
|
var autoFit = filters[0].autoFit;
|
|
18146
|
-
|
|
17634
|
+
// We don't know whether it's a legacy filter until it was bound for the first time,
|
|
17635
|
+
// therefore we have to assume that it is if legacy is undefined.
|
|
17636
|
+
var legacy = (_a = filters[0].legacy) !== null && _a !== void 0 ? _a : true;
|
|
18147
17637
|
for (var i = 1; i < filters.length; i++) {
|
|
18148
17638
|
var filter = filters[i];
|
|
18149
17639
|
// let's use the lowest resolution
|
|
@@ -18158,7 +17648,7 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18158
17648
|
: padding + filter.padding;
|
|
18159
17649
|
// only auto fit if all filters are autofit
|
|
18160
17650
|
autoFit = autoFit && filter.autoFit;
|
|
18161
|
-
legacy = legacy || filter.legacy;
|
|
17651
|
+
legacy = legacy || ((_b = filter.legacy) !== null && _b !== void 0 ? _b : true);
|
|
18162
17652
|
}
|
|
18163
17653
|
if (filterStack.length === 1) {
|
|
18164
17654
|
this.defaultFilterStack[0].renderTexture = renderTextureSystem.current;
|
|
@@ -18197,9 +17687,7 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18197
17687
|
renderTextureSystem.bind(state.renderTexture, state.sourceFrame, destinationFrame);
|
|
18198
17688
|
renderer.framebuffer.clear(0, 0, 0, 0);
|
|
18199
17689
|
};
|
|
18200
|
-
/**
|
|
18201
|
-
* Pops off the filter and applies it.
|
|
18202
|
-
*/
|
|
17690
|
+
/** Pops off the filter and applies it. */
|
|
18203
17691
|
FilterSystem.prototype.pop = function () {
|
|
18204
17692
|
var filterStack = this.defaultFilterStack;
|
|
18205
17693
|
var state = filterStack.pop();
|
|
@@ -18268,8 +17756,8 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18268
17756
|
/**
|
|
18269
17757
|
* Binds a renderTexture with corresponding `filterFrame`, clears it if mode corresponds.
|
|
18270
17758
|
*
|
|
18271
|
-
* @param
|
|
18272
|
-
* @param
|
|
17759
|
+
* @param filterTexture - renderTexture to bind, should belong to filter pool or filter stack
|
|
17760
|
+
* @param clearMode - clearMode, by default its CLEAR/YES. See {@link PIXI.CLEAR_MODES}
|
|
18273
17761
|
*/
|
|
18274
17762
|
FilterSystem.prototype.bindAndClear = function (filterTexture, clearMode) {
|
|
18275
17763
|
if (clearMode === void 0) { clearMode = CLEAR_MODES$1.CLEAR; }
|
|
@@ -18309,12 +17797,14 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18309
17797
|
}
|
|
18310
17798
|
};
|
|
18311
17799
|
/**
|
|
18312
|
-
* Draws a filter.
|
|
17800
|
+
* Draws a filter using the default rendering process.
|
|
18313
17801
|
*
|
|
18314
|
-
*
|
|
18315
|
-
*
|
|
18316
|
-
* @param
|
|
18317
|
-
* @param
|
|
17802
|
+
* This should be called only by {@link Filter#apply}.
|
|
17803
|
+
*
|
|
17804
|
+
* @param filter - The filter to draw.
|
|
17805
|
+
* @param input - The input render target.
|
|
17806
|
+
* @param output - The target to output to.
|
|
17807
|
+
* @param clearMode - Should the output be cleared before rendering to it
|
|
18318
17808
|
*/
|
|
18319
17809
|
FilterSystem.prototype.applyFilter = function (filter, input, output, clearMode) {
|
|
18320
17810
|
var renderer = this.renderer;
|
|
@@ -18345,9 +17835,9 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18345
17835
|
*
|
|
18346
17836
|
* Use `outputMatrix * vTextureCoord` in the shader.
|
|
18347
17837
|
*
|
|
18348
|
-
* @param
|
|
17838
|
+
* @param outputMatrix - The matrix to output to.
|
|
18349
17839
|
* @param {PIXI.Sprite} sprite - The sprite to map to.
|
|
18350
|
-
* @return
|
|
17840
|
+
* @return The mapped matrix.
|
|
18351
17841
|
*/
|
|
18352
17842
|
FilterSystem.prototype.calculateSpriteMatrix = function (outputMatrix, sprite) {
|
|
18353
17843
|
var _a = this.activeState, sourceFrame = _a.sourceFrame, destinationFrame = _a.destinationFrame;
|
|
@@ -18360,9 +17850,7 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18360
17850
|
mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);
|
|
18361
17851
|
return mappedMatrix;
|
|
18362
17852
|
};
|
|
18363
|
-
/**
|
|
18364
|
-
* Destroys this Filter System.
|
|
18365
|
-
*/
|
|
17853
|
+
/** Destroys this Filter System. */
|
|
18366
17854
|
FilterSystem.prototype.destroy = function () {
|
|
18367
17855
|
this.renderer = null;
|
|
18368
17856
|
// Those textures has to be destroyed by RenderTextureSystem or FramebufferSystem
|
|
@@ -18371,12 +17859,11 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18371
17859
|
/**
|
|
18372
17860
|
* Gets a Power-of-Two render texture or fullScreen texture
|
|
18373
17861
|
*
|
|
18374
|
-
* @
|
|
18375
|
-
* @param
|
|
18376
|
-
* @param
|
|
18377
|
-
* @param
|
|
18378
|
-
* @
|
|
18379
|
-
* @return {PIXI.RenderTexture} The new render texture.
|
|
17862
|
+
* @param minWidth - The minimum width of the render texture in real pixels.
|
|
17863
|
+
* @param minHeight - The minimum height of the render texture in real pixels.
|
|
17864
|
+
* @param resolution - The resolution of the render texture.
|
|
17865
|
+
* @param multisample - Number of samples of the render texture.
|
|
17866
|
+
* @return - The new render texture.
|
|
18380
17867
|
*/
|
|
18381
17868
|
FilterSystem.prototype.getOptimalFilterTexture = function (minWidth, minHeight, resolution, multisample) {
|
|
18382
17869
|
if (resolution === void 0) { resolution = 1; }
|
|
@@ -18387,10 +17874,9 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18387
17874
|
* Gets extra render texture to use inside current filter
|
|
18388
17875
|
* To be compliant with older filters, you can use params in any order
|
|
18389
17876
|
*
|
|
18390
|
-
* @param
|
|
18391
|
-
* @param
|
|
18392
|
-
* @param
|
|
18393
|
-
* @returns {PIXI.RenderTexture}
|
|
17877
|
+
* @param input - renderTexture from which size and resolution will be copied
|
|
17878
|
+
* @param resolution - override resolution of the renderTexture
|
|
17879
|
+
* @param multisample - number of samples of the renderTexture
|
|
18394
17880
|
*/
|
|
18395
17881
|
FilterSystem.prototype.getFilterTexture = function (input, resolution, multisample) {
|
|
18396
17882
|
if (typeof input === 'number') {
|
|
@@ -18406,26 +17892,22 @@ var FilterSystem = /** @class */ (function () {
|
|
|
18406
17892
|
/**
|
|
18407
17893
|
* Frees a render texture back into the pool.
|
|
18408
17894
|
*
|
|
18409
|
-
* @param
|
|
17895
|
+
* @param renderTexture - The renderTarget to free
|
|
18410
17896
|
*/
|
|
18411
17897
|
FilterSystem.prototype.returnFilterTexture = function (renderTexture) {
|
|
18412
17898
|
this.texturePool.returnTexture(renderTexture);
|
|
18413
17899
|
};
|
|
18414
|
-
/**
|
|
18415
|
-
* Empties the texture pool.
|
|
18416
|
-
*/
|
|
17900
|
+
/** Empties the texture pool. */
|
|
18417
17901
|
FilterSystem.prototype.emptyPool = function () {
|
|
18418
17902
|
this.texturePool.clear(true);
|
|
18419
17903
|
};
|
|
18420
|
-
/**
|
|
18421
|
-
* calls `texturePool.resize()`, affects fullScreen renderTextures
|
|
18422
|
-
*/
|
|
17904
|
+
/** Calls `texturePool.resize()`, affects fullScreen renderTextures. */
|
|
18423
17905
|
FilterSystem.prototype.resize = function () {
|
|
18424
17906
|
this.texturePool.setScreenSize(this.renderer.view);
|
|
18425
17907
|
};
|
|
18426
17908
|
/**
|
|
18427
|
-
* @param
|
|
18428
|
-
* @param
|
|
17909
|
+
* @param matrix - first param
|
|
17910
|
+
* @param rect - second param
|
|
18429
17911
|
*/
|
|
18430
17912
|
FilterSystem.prototype.transformAABB = function (matrix, rect) {
|
|
18431
17913
|
var lt = tempPoints[0];
|
|
@@ -19389,46 +18871,20 @@ var byteSizeMap$1 = { 5126: 4, 5123: 2, 5121: 1 };
|
|
|
19389
18871
|
/**
|
|
19390
18872
|
* System plugin to the renderer to manage geometry.
|
|
19391
18873
|
*
|
|
19392
|
-
* @class
|
|
19393
|
-
* @extends PIXI.System
|
|
19394
18874
|
* @memberof PIXI
|
|
19395
18875
|
*/
|
|
19396
18876
|
var GeometrySystem = /** @class */ (function () {
|
|
19397
|
-
/**
|
|
19398
|
-
* @param {PIXI.Renderer} renderer - The renderer this System works for.
|
|
19399
|
-
*/
|
|
18877
|
+
/** @param renderer - The renderer this System works for. */
|
|
19400
18878
|
function GeometrySystem(renderer) {
|
|
19401
18879
|
this.renderer = renderer;
|
|
19402
18880
|
this._activeGeometry = null;
|
|
19403
18881
|
this._activeVao = null;
|
|
19404
|
-
/**
|
|
19405
|
-
* `true` if we has `*_vertex_array_object` extension
|
|
19406
|
-
* @member {boolean}
|
|
19407
|
-
* @readonly
|
|
19408
|
-
*/
|
|
19409
18882
|
this.hasVao = true;
|
|
19410
|
-
/**
|
|
19411
|
-
* `true` if has `ANGLE_instanced_arrays` extension
|
|
19412
|
-
* @member {boolean}
|
|
19413
|
-
* @readonly
|
|
19414
|
-
*/
|
|
19415
18883
|
this.hasInstance = true;
|
|
19416
|
-
/**
|
|
19417
|
-
* `true` if support `gl.UNSIGNED_INT` in `gl.drawElements` or `gl.drawElementsInstanced`
|
|
19418
|
-
* @member {boolean}
|
|
19419
|
-
* @readonly
|
|
19420
|
-
*/
|
|
19421
18884
|
this.canUseUInt32ElementIndex = false;
|
|
19422
|
-
/**
|
|
19423
|
-
* Cache for all geometries by id, used in case renderer gets destroyed or for profiling
|
|
19424
|
-
* @member {object}
|
|
19425
|
-
* @readonly
|
|
19426
|
-
*/
|
|
19427
18885
|
this.managedGeometries = {};
|
|
19428
18886
|
}
|
|
19429
|
-
/**
|
|
19430
|
-
* Sets up the renderer context and necessary buffers.
|
|
19431
|
-
*/
|
|
18887
|
+
/** Sets up the renderer context and necessary buffers. */
|
|
19432
18888
|
GeometrySystem.prototype.contextChange = function () {
|
|
19433
18889
|
this.disposeAll(true);
|
|
19434
18890
|
var gl = this.gl = this.renderer.gl;
|
|
@@ -19487,8 +18943,8 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19487
18943
|
/**
|
|
19488
18944
|
* Binds geometry so that is can be drawn. Creating a Vao if required
|
|
19489
18945
|
*
|
|
19490
|
-
* @param
|
|
19491
|
-
* @param
|
|
18946
|
+
* @param geometry - Instance of geometry to bind.
|
|
18947
|
+
* @param shader - Instance of shader to use vao for.
|
|
19492
18948
|
*/
|
|
19493
18949
|
GeometrySystem.prototype.bind = function (geometry, shader) {
|
|
19494
18950
|
shader = shader || this.renderer.shader.shader;
|
|
@@ -19521,16 +18977,11 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19521
18977
|
// maybe look to add an 'autoupdate' to geometry?
|
|
19522
18978
|
this.updateBuffers();
|
|
19523
18979
|
};
|
|
19524
|
-
/**
|
|
19525
|
-
* Reset and unbind any active VAO and geometry
|
|
19526
|
-
*/
|
|
18980
|
+
/** Reset and unbind any active VAO and geometry. */
|
|
19527
18981
|
GeometrySystem.prototype.reset = function () {
|
|
19528
18982
|
this.unbind();
|
|
19529
18983
|
};
|
|
19530
|
-
/**
|
|
19531
|
-
* Update buffers
|
|
19532
|
-
* @protected
|
|
19533
|
-
*/
|
|
18984
|
+
/** Update buffers of the currently bound geometry. */
|
|
19534
18985
|
GeometrySystem.prototype.updateBuffers = function () {
|
|
19535
18986
|
var geometry = this._activeGeometry;
|
|
19536
18987
|
var bufferSystem = this.renderer.buffer;
|
|
@@ -19541,9 +18992,9 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19541
18992
|
};
|
|
19542
18993
|
/**
|
|
19543
18994
|
* Check compatibility between a geometry and a program
|
|
19544
|
-
*
|
|
19545
|
-
* @param
|
|
19546
|
-
* @param
|
|
18995
|
+
*
|
|
18996
|
+
* @param geometry - Geometry instance.
|
|
18997
|
+
* @param program - Program instance.
|
|
19547
18998
|
*/
|
|
19548
18999
|
GeometrySystem.prototype.checkCompatibility = function (geometry, program) {
|
|
19549
19000
|
// geometry must have at least all the attributes that the shader requires.
|
|
@@ -19558,10 +19009,9 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19558
19009
|
/**
|
|
19559
19010
|
* Takes a geometry and program and generates a unique signature for them.
|
|
19560
19011
|
*
|
|
19561
|
-
* @param
|
|
19562
|
-
* @param
|
|
19563
|
-
* @
|
|
19564
|
-
* @protected
|
|
19012
|
+
* @param geometry - To get signature from.
|
|
19013
|
+
* @param program - To test geometry against.
|
|
19014
|
+
* @return - Unique signature of the geometry and program
|
|
19565
19015
|
*/
|
|
19566
19016
|
GeometrySystem.prototype.getSignature = function (geometry, program) {
|
|
19567
19017
|
var attribs = geometry.attributes;
|
|
@@ -19569,7 +19019,7 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19569
19019
|
var strings = ['g', geometry.id];
|
|
19570
19020
|
for (var i in attribs) {
|
|
19571
19021
|
if (shaderAttributes[i]) {
|
|
19572
|
-
strings.push(i);
|
|
19022
|
+
strings.push(i, shaderAttributes[i].location);
|
|
19573
19023
|
}
|
|
19574
19024
|
}
|
|
19575
19025
|
return strings.join('-');
|
|
@@ -19579,10 +19029,9 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19579
19029
|
* If vao is created, it is bound automatically. We use a shader to infer what and how to set up the
|
|
19580
19030
|
* attribute locations.
|
|
19581
19031
|
*
|
|
19582
|
-
* @
|
|
19583
|
-
* @param
|
|
19584
|
-
* @param
|
|
19585
|
-
* @param {boolean} [incRefCount=false] - Increment refCount of all geometry buffers
|
|
19032
|
+
* @param geometry - Instance of geometry to to generate Vao for.
|
|
19033
|
+
* @param shader - Instance of the shader.
|
|
19034
|
+
* @param incRefCount - Increment refCount of all geometry buffers.
|
|
19586
19035
|
*/
|
|
19587
19036
|
GeometrySystem.prototype.initGeometryVao = function (geometry, shader, incRefCount) {
|
|
19588
19037
|
if (incRefCount === void 0) { incRefCount = true; }
|
|
@@ -19656,9 +19105,10 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19656
19105
|
return vao;
|
|
19657
19106
|
};
|
|
19658
19107
|
/**
|
|
19659
|
-
* Disposes geometry
|
|
19660
|
-
*
|
|
19661
|
-
* @param
|
|
19108
|
+
* Disposes geometry.
|
|
19109
|
+
*
|
|
19110
|
+
* @param geometry - Geometry with buffers. Only VAO will be disposed
|
|
19111
|
+
* @param [contextLost=false] - If context was lost, we suppress deleteVertexArray
|
|
19662
19112
|
*/
|
|
19663
19113
|
GeometrySystem.prototype.disposeGeometry = function (geometry, contextLost) {
|
|
19664
19114
|
var _a;
|
|
@@ -19704,8 +19154,9 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19704
19154
|
delete geometry.glVertexArrayObjects[this.CONTEXT_UID];
|
|
19705
19155
|
};
|
|
19706
19156
|
/**
|
|
19707
|
-
*
|
|
19708
|
-
*
|
|
19157
|
+
* Dispose all WebGL resources of all managed geometries.
|
|
19158
|
+
*
|
|
19159
|
+
* @param [contextLost=false] - If context was lost, we suppress `gl.delete` calls
|
|
19709
19160
|
*/
|
|
19710
19161
|
GeometrySystem.prototype.disposeAll = function (contextLost) {
|
|
19711
19162
|
var all = Object.keys(this.managedGeometries);
|
|
@@ -19714,11 +19165,10 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19714
19165
|
}
|
|
19715
19166
|
};
|
|
19716
19167
|
/**
|
|
19717
|
-
* Activate vertex array object
|
|
19168
|
+
* Activate vertex array object.
|
|
19718
19169
|
*
|
|
19719
|
-
* @
|
|
19720
|
-
* @param
|
|
19721
|
-
* @param {PIXI.Program} program - Shader program instance
|
|
19170
|
+
* @param geometry - Geometry instance.
|
|
19171
|
+
* @param program - Shader program instance.
|
|
19722
19172
|
*/
|
|
19723
19173
|
GeometrySystem.prototype.activateVao = function (geometry, program) {
|
|
19724
19174
|
var gl = this.gl;
|
|
@@ -19759,12 +19209,15 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19759
19209
|
}
|
|
19760
19210
|
};
|
|
19761
19211
|
/**
|
|
19762
|
-
*
|
|
19212
|
+
* Draws the currently bound geometry.
|
|
19763
19213
|
*
|
|
19764
|
-
* @param
|
|
19765
|
-
* @param
|
|
19766
|
-
*
|
|
19767
|
-
* @param
|
|
19214
|
+
* @param type - The type primitive to render.
|
|
19215
|
+
* @param size - The number of elements to be rendered. If not specified, all vertices after the
|
|
19216
|
+
* starting vertex will be drawn.
|
|
19217
|
+
* @param start - The starting vertex in the geometry to start drawing from. If not specified,
|
|
19218
|
+
* drawing will start from the first vertex.
|
|
19219
|
+
* @param instanceCount - The number of instances of the set of elements to execute. If not specified,
|
|
19220
|
+
* all instances will be drawn.
|
|
19768
19221
|
*/
|
|
19769
19222
|
GeometrySystem.prototype.draw = function (type, size, start, instanceCount) {
|
|
19770
19223
|
var gl = this.gl;
|
|
@@ -19798,18 +19251,12 @@ var GeometrySystem = /** @class */ (function () {
|
|
|
19798
19251
|
}
|
|
19799
19252
|
return this;
|
|
19800
19253
|
};
|
|
19801
|
-
/**
|
|
19802
|
-
* Unbind/reset everything
|
|
19803
|
-
* @protected
|
|
19804
|
-
*/
|
|
19254
|
+
/** Unbind/reset everything. */
|
|
19805
19255
|
GeometrySystem.prototype.unbind = function () {
|
|
19806
19256
|
this.gl.bindVertexArray(null);
|
|
19807
19257
|
this._activeVao = null;
|
|
19808
19258
|
this._activeGeometry = null;
|
|
19809
19259
|
};
|
|
19810
|
-
/**
|
|
19811
|
-
* @ignore
|
|
19812
|
-
*/
|
|
19813
19260
|
GeometrySystem.prototype.destroy = function () {
|
|
19814
19261
|
this.renderer = null;
|
|
19815
19262
|
};
|
|
@@ -20957,53 +20404,24 @@ var defaultFragment$1 = "varying vec2 vTextureCoord;\n\nuniform sampler2D uSampl
|
|
|
20957
20404
|
* Since PixiJS only had a handful of built-in filters, additional filters can be downloaded
|
|
20958
20405
|
* {@link https://github.com/pixijs/pixi-filters here} from the PixiJS Filters repository.
|
|
20959
20406
|
*
|
|
20960
|
-
* @class
|
|
20961
20407
|
* @memberof PIXI
|
|
20962
|
-
* @extends PIXI.Shader
|
|
20963
20408
|
*/
|
|
20964
20409
|
var Filter = /** @class */ (function (_super) {
|
|
20965
20410
|
__extends$2(Filter, _super);
|
|
20966
20411
|
/**
|
|
20967
|
-
* @param
|
|
20968
|
-
* @param
|
|
20969
|
-
* @param
|
|
20412
|
+
* @param vertexSrc - The source of the vertex shader.
|
|
20413
|
+
* @param fragmentSrc - The source of the fragment shader.
|
|
20414
|
+
* @param uniforms - Custom uniforms to use to augment the built-in ones.
|
|
20970
20415
|
*/
|
|
20971
20416
|
function Filter(vertexSrc, fragmentSrc, uniforms) {
|
|
20972
20417
|
var _this = this;
|
|
20973
20418
|
var program = Program.from(vertexSrc || Filter.defaultVertexSrc, fragmentSrc || Filter.defaultFragmentSrc);
|
|
20974
20419
|
_this = _super.call(this, program, uniforms) || this;
|
|
20975
|
-
/**
|
|
20976
|
-
* The padding of the filter. Some filters require extra space to breath such as a blur.
|
|
20977
|
-
* Increasing this will add extra width and height to the bounds of the object that the
|
|
20978
|
-
* filter is applied to.
|
|
20979
|
-
*
|
|
20980
|
-
* @member {number}
|
|
20981
|
-
*/
|
|
20982
20420
|
_this.padding = 0;
|
|
20983
20421
|
_this.resolution = settings.FILTER_RESOLUTION;
|
|
20984
|
-
/**
|
|
20985
|
-
* The samples of the filter.
|
|
20986
|
-
*
|
|
20987
|
-
* @member {PIXI.MSAA_QUALITY}
|
|
20988
|
-
*/
|
|
20989
20422
|
_this.multisample = settings.FILTER_MULTISAMPLE;
|
|
20990
|
-
/**
|
|
20991
|
-
* If enabled is true the filter is applied, if false it will not.
|
|
20992
|
-
*
|
|
20993
|
-
* @member {boolean}
|
|
20994
|
-
*/
|
|
20995
20423
|
_this.enabled = true;
|
|
20996
|
-
/**
|
|
20997
|
-
* If enabled, PixiJS will fit the filter area into boundaries for better performance.
|
|
20998
|
-
* Switch it off if it does not work for specific shader.
|
|
20999
|
-
*
|
|
21000
|
-
* @member {boolean}
|
|
21001
|
-
*/
|
|
21002
20424
|
_this.autoFit = true;
|
|
21003
|
-
/**
|
|
21004
|
-
* The WebGL state the filter requires to render
|
|
21005
|
-
* @member {PIXI.State}
|
|
21006
|
-
*/
|
|
21007
20425
|
_this.state = new State();
|
|
21008
20426
|
return _this;
|
|
21009
20427
|
}
|
|
@@ -21025,9 +20443,8 @@ var Filter = /** @class */ (function (_super) {
|
|
|
21025
20443
|
};
|
|
21026
20444
|
Object.defineProperty(Filter.prototype, "blendMode", {
|
|
21027
20445
|
/**
|
|
21028
|
-
* Sets the
|
|
20446
|
+
* Sets the blend mode of the filter.
|
|
21029
20447
|
*
|
|
21030
|
-
* @member {number}
|
|
21031
20448
|
* @default PIXI.BLEND_MODES.NORMAL
|
|
21032
20449
|
*/
|
|
21033
20450
|
get: function () {
|
|
@@ -21043,8 +20460,6 @@ var Filter = /** @class */ (function (_super) {
|
|
|
21043
20460
|
/**
|
|
21044
20461
|
* The resolution of the filter. Setting this to be lower will lower the quality but
|
|
21045
20462
|
* increase the performance of the filter.
|
|
21046
|
-
*
|
|
21047
|
-
* @member {number}
|
|
21048
20463
|
*/
|
|
21049
20464
|
get: function () {
|
|
21050
20465
|
return this._resolution;
|
|
@@ -21059,8 +20474,6 @@ var Filter = /** @class */ (function (_super) {
|
|
|
21059
20474
|
/**
|
|
21060
20475
|
* The default vertex shader source
|
|
21061
20476
|
*
|
|
21062
|
-
* @static
|
|
21063
|
-
* @type {string}
|
|
21064
20477
|
* @constant
|
|
21065
20478
|
*/
|
|
21066
20479
|
get: function () {
|
|
@@ -21073,8 +20486,6 @@ var Filter = /** @class */ (function (_super) {
|
|
|
21073
20486
|
/**
|
|
21074
20487
|
* The default fragment shader source
|
|
21075
20488
|
*
|
|
21076
|
-
* @static
|
|
21077
|
-
* @type {string}
|
|
21078
20489
|
* @constant
|
|
21079
20490
|
*/
|
|
21080
20491
|
get: function () {
|
|
@@ -21256,15 +20667,11 @@ var TextureMatrix = /** @class */ (function () {
|
|
|
21256
20667
|
*
|
|
21257
20668
|
* WebGL only.
|
|
21258
20669
|
*
|
|
21259
|
-
* @class
|
|
21260
|
-
* @extends PIXI.Filter
|
|
21261
20670
|
* @memberof PIXI
|
|
21262
20671
|
*/
|
|
21263
20672
|
var SpriteMaskFilter = /** @class */ (function (_super) {
|
|
21264
20673
|
__extends$2(SpriteMaskFilter, _super);
|
|
21265
|
-
/**
|
|
21266
|
-
* @ignore
|
|
21267
|
-
*/
|
|
20674
|
+
/** @ignore */
|
|
21268
20675
|
function SpriteMaskFilter(vertexSrc, fragmentSrc, uniforms) {
|
|
21269
20676
|
var _this = this;
|
|
21270
20677
|
var sprite = null;
|
|
@@ -21275,19 +20682,16 @@ var SpriteMaskFilter = /** @class */ (function (_super) {
|
|
|
21275
20682
|
uniforms = undefined;
|
|
21276
20683
|
}
|
|
21277
20684
|
_this = _super.call(this, vertexSrc || vertex, fragmentSrc || fragment, uniforms) || this;
|
|
21278
|
-
/**
|
|
21279
|
-
* Sprite mask
|
|
21280
|
-
* @member {PIXI.Sprite}
|
|
21281
|
-
*/
|
|
21282
20685
|
_this.maskSprite = sprite;
|
|
21283
|
-
/**
|
|
21284
|
-
* Mask matrix
|
|
21285
|
-
* @member {PIXI.Matrix}
|
|
21286
|
-
*/
|
|
21287
20686
|
_this.maskMatrix = new Matrix();
|
|
21288
20687
|
return _this;
|
|
21289
20688
|
}
|
|
21290
20689
|
Object.defineProperty(SpriteMaskFilter.prototype, "maskSprite", {
|
|
20690
|
+
/**
|
|
20691
|
+
* Sprite mask
|
|
20692
|
+
*
|
|
20693
|
+
* @type {PIXI.DisplayObject}
|
|
20694
|
+
*/
|
|
21291
20695
|
get: function () {
|
|
21292
20696
|
return this._maskSprite;
|
|
21293
20697
|
},
|
|
@@ -21303,10 +20707,10 @@ var SpriteMaskFilter = /** @class */ (function (_super) {
|
|
|
21303
20707
|
/**
|
|
21304
20708
|
* Applies the filter
|
|
21305
20709
|
*
|
|
21306
|
-
* @param
|
|
21307
|
-
* @param
|
|
21308
|
-
* @param
|
|
21309
|
-
* @param
|
|
20710
|
+
* @param filterManager - The renderer to retrieve the filter from
|
|
20711
|
+
* @param input - The input render target.
|
|
20712
|
+
* @param output - The target to output to.
|
|
20713
|
+
* @param clearMode - Should the output be cleared before rendering to it.
|
|
21310
20714
|
*/
|
|
21311
20715
|
SpriteMaskFilter.prototype.apply = function (filterManager, input, output, clearMode) {
|
|
21312
20716
|
var maskSprite = this._maskSprite;
|
|
@@ -21768,6 +21172,8 @@ var StencilSystem = /** @class */ (function (_super) {
|
|
|
21768
21172
|
if (prevMaskCount === 0) {
|
|
21769
21173
|
// force use stencil texture in current framebuffer
|
|
21770
21174
|
this.renderer.framebuffer.forceStencil();
|
|
21175
|
+
gl.clearStencil(0);
|
|
21176
|
+
gl.clear(gl.STENCIL_BUFFER_BIT);
|
|
21771
21177
|
gl.enable(gl.STENCIL_TEST);
|
|
21772
21178
|
}
|
|
21773
21179
|
maskData._stencilCounter++;
|
|
@@ -21791,8 +21197,6 @@ var StencilSystem = /** @class */ (function (_super) {
|
|
|
21791
21197
|
if (this.getStackLength() === 0) {
|
|
21792
21198
|
// the stack is empty!
|
|
21793
21199
|
gl.disable(gl.STENCIL_TEST);
|
|
21794
|
-
gl.clearStencil(0);
|
|
21795
|
-
gl.clear(gl.STENCIL_BUFFER_BIT);
|
|
21796
21200
|
}
|
|
21797
21201
|
else {
|
|
21798
21202
|
// Decrement the reference stencil value where the popped mask overlaps with the other ones
|
|
@@ -25146,8 +24550,8 @@ for (var name in _systems) {
|
|
|
25146
24550
|
}
|
|
25147
24551
|
|
|
25148
24552
|
/*!
|
|
25149
|
-
* @pixi/app - v6.2.
|
|
25150
|
-
* Compiled
|
|
24553
|
+
* @pixi/app - v6.2.1
|
|
24554
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
25151
24555
|
*
|
|
25152
24556
|
* @pixi/app is licensed under the MIT License.
|
|
25153
24557
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -25411,8 +24815,8 @@ var ResizePlugin = /** @class */ (function () {
|
|
|
25411
24815
|
Application.registerPlugin(ResizePlugin);
|
|
25412
24816
|
|
|
25413
24817
|
/*!
|
|
25414
|
-
* @pixi/extract - v6.2.
|
|
25415
|
-
* Compiled
|
|
24818
|
+
* @pixi/extract - v6.2.1
|
|
24819
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
25416
24820
|
*
|
|
25417
24821
|
* @pixi/extract is licensed under the MIT License.
|
|
25418
24822
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -25619,8 +25023,8 @@ var Extract = /** @class */ (function () {
|
|
|
25619
25023
|
}());
|
|
25620
25024
|
|
|
25621
25025
|
/*!
|
|
25622
|
-
* @pixi/loaders - v6.2.
|
|
25623
|
-
* Compiled
|
|
25026
|
+
* @pixi/loaders - v6.2.1
|
|
25027
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
25624
25028
|
*
|
|
25625
25029
|
* @pixi/loaders is licensed under the MIT License.
|
|
25626
25030
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -27637,8 +27041,8 @@ Loader.registerPlugin({ use: parsing });
|
|
|
27637
27041
|
Loader.registerPlugin(TextureLoader);
|
|
27638
27042
|
|
|
27639
27043
|
/*!
|
|
27640
|
-
* @pixi/compressed-textures - v6.2.
|
|
27641
|
-
* Compiled
|
|
27044
|
+
* @pixi/compressed-textures - v6.2.1
|
|
27045
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
27642
27046
|
*
|
|
27643
27047
|
* @pixi/compressed-textures is licensed under the MIT License.
|
|
27644
27048
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -28860,8 +28264,8 @@ var KTXLoader = /** @class */ (function () {
|
|
|
28860
28264
|
}());
|
|
28861
28265
|
|
|
28862
28266
|
/*!
|
|
28863
|
-
* @pixi/particle-container - v6.2.
|
|
28864
|
-
* Compiled
|
|
28267
|
+
* @pixi/particle-container - v6.2.1
|
|
28268
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
28865
28269
|
*
|
|
28866
28270
|
* @pixi/particle-container is licensed under the MIT License.
|
|
28867
28271
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -29663,8 +29067,8 @@ var ParticleRenderer = /** @class */ (function (_super) {
|
|
|
29663
29067
|
}(ObjectRenderer));
|
|
29664
29068
|
|
|
29665
29069
|
/*!
|
|
29666
|
-
* @pixi/graphics - v6.2.
|
|
29667
|
-
* Compiled
|
|
29070
|
+
* @pixi/graphics - v6.2.1
|
|
29071
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
29668
29072
|
*
|
|
29669
29073
|
* @pixi/graphics is licensed under the MIT License.
|
|
29670
29074
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -32707,8 +32111,8 @@ var graphicsUtils = {
|
|
|
32707
32111
|
};
|
|
32708
32112
|
|
|
32709
32113
|
/*!
|
|
32710
|
-
* @pixi/sprite - v6.2.
|
|
32711
|
-
* Compiled
|
|
32114
|
+
* @pixi/sprite - v6.2.1
|
|
32115
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
32712
32116
|
*
|
|
32713
32117
|
* @pixi/sprite is licensed under the MIT License.
|
|
32714
32118
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -33159,8 +32563,8 @@ var Sprite = /** @class */ (function (_super) {
|
|
|
33159
32563
|
}(Container));
|
|
33160
32564
|
|
|
33161
32565
|
/*!
|
|
33162
|
-
* @pixi/text - v6.2.
|
|
33163
|
-
* Compiled
|
|
32566
|
+
* @pixi/text - v6.2.1
|
|
32567
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
33164
32568
|
*
|
|
33165
32569
|
* @pixi/text is licensed under the MIT License.
|
|
33166
32570
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -34536,11 +33940,6 @@ var defaultDestroyOptions = {
|
|
|
34536
33940
|
children: false,
|
|
34537
33941
|
baseTexture: true,
|
|
34538
33942
|
};
|
|
34539
|
-
// Checking that we can use moddern canvas2D api
|
|
34540
|
-
// https://developer.chrome.com/origintrials/#/view_trial/3585991203293757441
|
|
34541
|
-
// note: this is unstable API, Chrome less 94 use a `textLetterSpacing`, newest use a letterSpacing
|
|
34542
|
-
// eslint-disable-next-line max-len
|
|
34543
|
-
var supportLetterSpacing = 'letterSpacing' in CanvasRenderingContext2D.prototype || 'textLetterSpacing' in CanvasRenderingContext2D.prototype;
|
|
34544
33943
|
/**
|
|
34545
33944
|
* A Text Object will create a line or multiple lines of text.
|
|
34546
33945
|
*
|
|
@@ -34720,6 +34119,12 @@ var Text = /** @class */ (function (_super) {
|
|
|
34720
34119
|
var style = this._style;
|
|
34721
34120
|
// letterSpacing of 0 means normal
|
|
34722
34121
|
var letterSpacing = style.letterSpacing;
|
|
34122
|
+
// Checking that we can use moddern canvas2D api
|
|
34123
|
+
// https://developer.chrome.com/origintrials/#/view_trial/3585991203293757441
|
|
34124
|
+
// note: this is unstable API, Chrome less 94 use a `textLetterSpacing`, newest use a letterSpacing
|
|
34125
|
+
// eslint-disable-next-line max-len
|
|
34126
|
+
var supportLetterSpacing = 'letterSpacing' in CanvasRenderingContext2D.prototype
|
|
34127
|
+
|| 'textLetterSpacing' in CanvasRenderingContext2D.prototype;
|
|
34723
34128
|
if (letterSpacing === 0 || supportLetterSpacing) {
|
|
34724
34129
|
if (supportLetterSpacing) {
|
|
34725
34130
|
this.context.letterSpacing = letterSpacing;
|
|
@@ -35054,8 +34459,8 @@ var Text = /** @class */ (function (_super) {
|
|
|
35054
34459
|
}(Sprite));
|
|
35055
34460
|
|
|
35056
34461
|
/*!
|
|
35057
|
-
* @pixi/prepare - v6.2.
|
|
35058
|
-
* Compiled
|
|
34462
|
+
* @pixi/prepare - v6.2.1
|
|
34463
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
35059
34464
|
*
|
|
35060
34465
|
* @pixi/prepare is licensed under the MIT License.
|
|
35061
34466
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -35580,36 +34985,22 @@ var Prepare = /** @class */ (function (_super) {
|
|
|
35580
34985
|
* TimeLimiter limits the number of items handled by a {@link PIXI.BasePrepare} to a specified
|
|
35581
34986
|
* number of milliseconds per frame.
|
|
35582
34987
|
*
|
|
35583
|
-
* @class
|
|
35584
34988
|
* @memberof PIXI
|
|
35585
34989
|
*/
|
|
35586
34990
|
var TimeLimiter = /** @class */ (function () {
|
|
35587
|
-
/**
|
|
35588
|
-
* @param {number} maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame.
|
|
35589
|
-
*/
|
|
34991
|
+
/** @param maxMilliseconds - The maximum milliseconds that can be spent preparing items each frame. */
|
|
35590
34992
|
function TimeLimiter(maxMilliseconds) {
|
|
35591
|
-
/**
|
|
35592
|
-
* The maximum milliseconds that can be spent preparing items each frame.
|
|
35593
|
-
* @type {number}
|
|
35594
|
-
* @private
|
|
35595
|
-
*/
|
|
35596
34993
|
this.maxMilliseconds = maxMilliseconds;
|
|
35597
|
-
/**
|
|
35598
|
-
* The start time of the current frame.
|
|
35599
|
-
* @type {number}
|
|
35600
|
-
* @private
|
|
35601
|
-
*/
|
|
35602
34994
|
this.frameStart = 0;
|
|
35603
34995
|
}
|
|
35604
|
-
/**
|
|
35605
|
-
* Resets any counting properties to start fresh on a new frame.
|
|
35606
|
-
*/
|
|
34996
|
+
/** Resets any counting properties to start fresh on a new frame. */
|
|
35607
34997
|
TimeLimiter.prototype.beginFrame = function () {
|
|
35608
34998
|
this.frameStart = Date.now();
|
|
35609
34999
|
};
|
|
35610
35000
|
/**
|
|
35611
35001
|
* Checks to see if another item can be uploaded. This should only be called once per item.
|
|
35612
|
-
*
|
|
35002
|
+
*
|
|
35003
|
+
* @return - If the item is allowed to be uploaded.
|
|
35613
35004
|
*/
|
|
35614
35005
|
TimeLimiter.prototype.allowedToUpload = function () {
|
|
35615
35006
|
return Date.now() - this.frameStart < this.maxMilliseconds;
|
|
@@ -35618,8 +35009,8 @@ var TimeLimiter = /** @class */ (function () {
|
|
|
35618
35009
|
}());
|
|
35619
35010
|
|
|
35620
35011
|
/*!
|
|
35621
|
-
* @pixi/spritesheet - v6.2.
|
|
35622
|
-
* Compiled
|
|
35012
|
+
* @pixi/spritesheet - v6.2.1
|
|
35013
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
35623
35014
|
*
|
|
35624
35015
|
* @pixi/spritesheet is licensed under the MIT License.
|
|
35625
35016
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -35932,8 +35323,8 @@ var SpritesheetLoader = /** @class */ (function () {
|
|
|
35932
35323
|
}());
|
|
35933
35324
|
|
|
35934
35325
|
/*!
|
|
35935
|
-
* @pixi/sprite-tiling - v6.2.
|
|
35936
|
-
* Compiled
|
|
35326
|
+
* @pixi/sprite-tiling - v6.2.1
|
|
35327
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
35937
35328
|
*
|
|
35938
35329
|
* @pixi/sprite-tiling is licensed under the MIT License.
|
|
35939
35330
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -36293,8 +35684,8 @@ var TilingSpriteRenderer = /** @class */ (function (_super) {
|
|
|
36293
35684
|
}(ObjectRenderer));
|
|
36294
35685
|
|
|
36295
35686
|
/*!
|
|
36296
|
-
* @pixi/mesh - v6.2.
|
|
36297
|
-
* Compiled
|
|
35687
|
+
* @pixi/mesh - v6.2.1
|
|
35688
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
36298
35689
|
*
|
|
36299
35690
|
* @pixi/mesh is licensed under the MIT License.
|
|
36300
35691
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -36391,7 +35782,7 @@ var tempPolygon = new Polygon();
|
|
|
36391
35782
|
*
|
|
36392
35783
|
* This class empowers you to have maximum flexibility to render any kind of WebGL visuals you can think of.
|
|
36393
35784
|
* This class assumes a certain level of WebGL knowledge.
|
|
36394
|
-
* If you know a bit this should abstract enough away to make
|
|
35785
|
+
* If you know a bit this should abstract enough away to make your life easier!
|
|
36395
35786
|
*
|
|
36396
35787
|
* Pretty much ALL WebGL can be broken down into the following:
|
|
36397
35788
|
* - Geometry - The structure and data for the mesh. This can include anything from positions, uvs, normals, colors etc..
|
|
@@ -36400,92 +35791,32 @@ var tempPolygon = new Polygon();
|
|
|
36400
35791
|
*
|
|
36401
35792
|
* Through a combination of the above elements you can render anything you want, 2D or 3D!
|
|
36402
35793
|
*
|
|
36403
|
-
* @class
|
|
36404
|
-
* @extends PIXI.Container
|
|
36405
35794
|
* @memberof PIXI
|
|
36406
35795
|
*/
|
|
36407
35796
|
var Mesh = /** @class */ (function (_super) {
|
|
36408
35797
|
__extends$a(Mesh, _super);
|
|
36409
35798
|
/**
|
|
36410
|
-
* @param
|
|
36411
|
-
* @param {PIXI.MeshMaterial} shader -
|
|
36412
|
-
* @param
|
|
35799
|
+
* @param geometry - The geometry the mesh will use.
|
|
35800
|
+
* @param {PIXI.MeshMaterial} shader - The shader the mesh will use.
|
|
35801
|
+
* @param state - The state that the WebGL context is required to be in to render the mesh
|
|
36413
35802
|
* if no state is provided, uses {@link PIXI.State.for2d} to create a 2D state for PixiJS.
|
|
36414
|
-
* @param
|
|
35803
|
+
* @param drawMode - The drawMode, can be any of the {@link PIXI.DRAW_MODES} constants.
|
|
36415
35804
|
*/
|
|
36416
35805
|
function Mesh(geometry, shader, state, drawMode) {
|
|
36417
35806
|
if (drawMode === void 0) { drawMode = DRAW_MODES$1.TRIANGLES; }
|
|
36418
35807
|
var _this = _super.call(this) || this;
|
|
36419
35808
|
_this.geometry = geometry;
|
|
36420
|
-
/**
|
|
36421
|
-
* Represents the vertex and fragment shaders that processes the geometry and runs on the GPU.
|
|
36422
|
-
* Can be shared between multiple Mesh objects.
|
|
36423
|
-
* @member {PIXI.Shader|PIXI.MeshMaterial}
|
|
36424
|
-
*/
|
|
36425
35809
|
_this.shader = shader;
|
|
36426
|
-
/**
|
|
36427
|
-
* Represents the WebGL state the Mesh required to render, excludes shader and geometry. E.g.,
|
|
36428
|
-
* blend mode, culling, depth testing, direction of rendering triangles, backface, etc.
|
|
36429
|
-
* @member {PIXI.State}
|
|
36430
|
-
*/
|
|
36431
35810
|
_this.state = state || State.for2d();
|
|
36432
|
-
/**
|
|
36433
|
-
* The way the Mesh should be drawn, can be any of the {@link PIXI.DRAW_MODES} constants.
|
|
36434
|
-
*
|
|
36435
|
-
* @member {number}
|
|
36436
|
-
* @see PIXI.DRAW_MODES
|
|
36437
|
-
*/
|
|
36438
35811
|
_this.drawMode = drawMode;
|
|
36439
|
-
/**
|
|
36440
|
-
* Typically the index of the IndexBuffer where to start drawing.
|
|
36441
|
-
* @member {number}
|
|
36442
|
-
* @default 0
|
|
36443
|
-
*/
|
|
36444
35812
|
_this.start = 0;
|
|
36445
|
-
/**
|
|
36446
|
-
* How much of the geometry to draw, by default `0` renders everything.
|
|
36447
|
-
* @member {number}
|
|
36448
|
-
* @default 0
|
|
36449
|
-
*/
|
|
36450
35813
|
_this.size = 0;
|
|
36451
|
-
/**
|
|
36452
|
-
* these are used as easy access for batching
|
|
36453
|
-
* @member {Float32Array}
|
|
36454
|
-
* @private
|
|
36455
|
-
*/
|
|
36456
35814
|
_this.uvs = null;
|
|
36457
|
-
/**
|
|
36458
|
-
* these are used as easy access for batching
|
|
36459
|
-
* @member {Uint16Array}
|
|
36460
|
-
* @private
|
|
36461
|
-
*/
|
|
36462
35815
|
_this.indices = null;
|
|
36463
|
-
/**
|
|
36464
|
-
* this is the caching layer used by the batcher
|
|
36465
|
-
* @member {Float32Array}
|
|
36466
|
-
* @private
|
|
36467
|
-
*/
|
|
36468
35816
|
_this.vertexData = new Float32Array(1);
|
|
36469
|
-
/**
|
|
36470
|
-
* If geometry is changed used to decide to re-transform
|
|
36471
|
-
* the vertexData.
|
|
36472
|
-
* @member {number}
|
|
36473
|
-
* @private
|
|
36474
|
-
*/
|
|
36475
35817
|
_this.vertexDirty = -1;
|
|
36476
35818
|
_this._transformID = -1;
|
|
36477
|
-
/**
|
|
36478
|
-
* Internal roundPixels field
|
|
36479
|
-
*
|
|
36480
|
-
* @member {boolean}
|
|
36481
|
-
* @private
|
|
36482
|
-
*/
|
|
36483
35819
|
_this._roundPixels = settings.ROUND_PIXELS;
|
|
36484
|
-
/**
|
|
36485
|
-
* Batched UV's are cached for atlas textures
|
|
36486
|
-
* @member {PIXI.MeshBatchUvs}
|
|
36487
|
-
* @private
|
|
36488
|
-
*/
|
|
36489
35820
|
_this.batchUvs = null;
|
|
36490
35821
|
return _this;
|
|
36491
35822
|
}
|
|
@@ -36494,7 +35825,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36494
35825
|
* Includes vertex positions, face indices, normals, colors, UVs, and
|
|
36495
35826
|
* custom attributes within buffers, reducing the cost of passing all
|
|
36496
35827
|
* this data to the GPU. Can be shared between multiple Mesh objects.
|
|
36497
|
-
* @member {PIXI.Geometry}
|
|
36498
35828
|
*/
|
|
36499
35829
|
get: function () {
|
|
36500
35830
|
return this._geometry;
|
|
@@ -36521,7 +35851,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36521
35851
|
Object.defineProperty(Mesh.prototype, "uvBuffer", {
|
|
36522
35852
|
/**
|
|
36523
35853
|
* To change mesh uv's, change its uvBuffer data and increment its _updateID.
|
|
36524
|
-
*
|
|
35854
|
+
*
|
|
36525
35855
|
* @readonly
|
|
36526
35856
|
*/
|
|
36527
35857
|
get: function () {
|
|
@@ -36534,7 +35864,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36534
35864
|
/**
|
|
36535
35865
|
* To change mesh vertices, change its uvBuffer data and increment its _updateID.
|
|
36536
35866
|
* Incrementing _updateID is optional because most of Mesh objects do it anyway.
|
|
36537
|
-
*
|
|
35867
|
+
*
|
|
36538
35868
|
* @readonly
|
|
36539
35869
|
*/
|
|
36540
35870
|
get: function () {
|
|
@@ -36547,10 +35877,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36547
35877
|
get: function () {
|
|
36548
35878
|
return this.shader;
|
|
36549
35879
|
},
|
|
36550
|
-
/**
|
|
36551
|
-
* Alias for {@link PIXI.Mesh#shader}.
|
|
36552
|
-
* @member {PIXI.MeshMaterial}
|
|
36553
|
-
*/
|
|
35880
|
+
/** Alias for {@link PIXI.Mesh#shader}. */
|
|
36554
35881
|
set: function (value) {
|
|
36555
35882
|
this.shader = value;
|
|
36556
35883
|
},
|
|
@@ -36565,9 +35892,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36565
35892
|
* The blend mode to be applied to the Mesh. Apply a value of
|
|
36566
35893
|
* `PIXI.BLEND_MODES.NORMAL` to reset the blend mode.
|
|
36567
35894
|
*
|
|
36568
|
-
* @member {number}
|
|
36569
35895
|
* @default PIXI.BLEND_MODES.NORMAL;
|
|
36570
|
-
* @see PIXI.BLEND_MODES
|
|
36571
35896
|
*/
|
|
36572
35897
|
set: function (value) {
|
|
36573
35898
|
this.state.blendMode = value;
|
|
@@ -36585,7 +35910,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36585
35910
|
* The main disadvantage is movement of objects may appear less smooth.
|
|
36586
35911
|
* To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
|
|
36587
35912
|
*
|
|
36588
|
-
* @member {boolean}
|
|
36589
35913
|
* @default false
|
|
36590
35914
|
*/
|
|
36591
35915
|
set: function (value) {
|
|
@@ -36603,7 +35927,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36603
35927
|
* `0xFFFFFF` will remove any tint effect.
|
|
36604
35928
|
*
|
|
36605
35929
|
* Null for non-MeshMaterial shaders
|
|
36606
|
-
*
|
|
35930
|
+
*
|
|
36607
35931
|
* @default 0xFFFFFF
|
|
36608
35932
|
*/
|
|
36609
35933
|
get: function () {
|
|
@@ -36620,7 +35944,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36620
35944
|
* The texture that the Mesh uses.
|
|
36621
35945
|
*
|
|
36622
35946
|
* Null for non-MeshMaterial shaders
|
|
36623
|
-
* @member {PIXI.Texture}
|
|
36624
35947
|
*/
|
|
36625
35948
|
get: function () {
|
|
36626
35949
|
return 'texture' in this.shader ? this.shader.texture : null;
|
|
@@ -36633,8 +35956,8 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36633
35956
|
});
|
|
36634
35957
|
/**
|
|
36635
35958
|
* Standard renderer draw.
|
|
36636
|
-
*
|
|
36637
|
-
* @param
|
|
35959
|
+
*
|
|
35960
|
+
* @param renderer - Instance to renderer.
|
|
36638
35961
|
*/
|
|
36639
35962
|
Mesh.prototype._render = function (renderer) {
|
|
36640
35963
|
// set properties for batching..
|
|
@@ -36653,8 +35976,8 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36653
35976
|
};
|
|
36654
35977
|
/**
|
|
36655
35978
|
* Standard non-batching way of rendering.
|
|
36656
|
-
*
|
|
36657
|
-
* @param
|
|
35979
|
+
*
|
|
35980
|
+
* @param renderer - Instance to renderer.
|
|
36658
35981
|
*/
|
|
36659
35982
|
Mesh.prototype._renderDefault = function (renderer) {
|
|
36660
35983
|
var shader = this.shader;
|
|
@@ -36675,8 +35998,8 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36675
35998
|
};
|
|
36676
35999
|
/**
|
|
36677
36000
|
* Rendering by using the Batch system.
|
|
36678
|
-
*
|
|
36679
|
-
* @param
|
|
36001
|
+
*
|
|
36002
|
+
* @param renderer - Instance to renderer.
|
|
36680
36003
|
*/
|
|
36681
36004
|
Mesh.prototype._renderToBatch = function (renderer) {
|
|
36682
36005
|
var geometry = this.geometry;
|
|
@@ -36694,9 +36017,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36694
36017
|
renderer.batch.setObjectRenderer(renderer.plugins[pluginName]);
|
|
36695
36018
|
renderer.plugins[pluginName].render(this);
|
|
36696
36019
|
};
|
|
36697
|
-
/**
|
|
36698
|
-
* Updates vertexData field based on transform and vertices
|
|
36699
|
-
*/
|
|
36020
|
+
/** Updates vertexData field based on transform and vertices. */
|
|
36700
36021
|
Mesh.prototype.calculateVertices = function () {
|
|
36701
36022
|
var geometry = this.geometry;
|
|
36702
36023
|
var verticesBuffer = geometry.buffers[0];
|
|
@@ -36731,9 +36052,7 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36731
36052
|
}
|
|
36732
36053
|
this.vertexDirty = vertexDirtyId;
|
|
36733
36054
|
};
|
|
36734
|
-
/**
|
|
36735
|
-
* Updates uv field based on from geometry uv's or batchUvs
|
|
36736
|
-
*/
|
|
36055
|
+
/** Updates uv field based on from geometry uv's or batchUvs. */
|
|
36737
36056
|
Mesh.prototype.calculateUvs = function () {
|
|
36738
36057
|
var geomUvs = this.geometry.buffers[1];
|
|
36739
36058
|
var shader = this.shader;
|
|
@@ -36751,8 +36070,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36751
36070
|
/**
|
|
36752
36071
|
* Updates the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.
|
|
36753
36072
|
* there must be a aVertexPosition attribute present in the geometry for bounds to be calculated correctly.
|
|
36754
|
-
*
|
|
36755
|
-
* @protected
|
|
36756
36073
|
*/
|
|
36757
36074
|
Mesh.prototype._calculateBounds = function () {
|
|
36758
36075
|
this.calculateVertices();
|
|
@@ -36761,8 +36078,8 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36761
36078
|
/**
|
|
36762
36079
|
* Tests if a point is inside this mesh. Works only for PIXI.DRAW_MODES.TRIANGLES.
|
|
36763
36080
|
*
|
|
36764
|
-
* @param
|
|
36765
|
-
* @return
|
|
36081
|
+
* @param point - The point to test.
|
|
36082
|
+
* @return - The result of the test.
|
|
36766
36083
|
*/
|
|
36767
36084
|
Mesh.prototype.containsPoint = function (point) {
|
|
36768
36085
|
if (!this.getBounds().contains(point.x, point.y)) {
|
|
@@ -36790,14 +36107,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36790
36107
|
}
|
|
36791
36108
|
return false;
|
|
36792
36109
|
};
|
|
36793
|
-
/**
|
|
36794
|
-
* Destroys the Mesh object.
|
|
36795
|
-
*
|
|
36796
|
-
* @param {object|boolean} [options] - Options parameter. A boolean will act as if all
|
|
36797
|
-
* options have been set to that value
|
|
36798
|
-
* @param {boolean} [options.children=false] - if set to true, all the children will have
|
|
36799
|
-
* their destroy method called as well. 'options' will be passed on to those calls.
|
|
36800
|
-
*/
|
|
36801
36110
|
Mesh.prototype.destroy = function (options) {
|
|
36802
36111
|
_super.prototype.destroy.call(this, options);
|
|
36803
36112
|
if (this._cachedTexture) {
|
|
@@ -36814,9 +36123,6 @@ var Mesh = /** @class */ (function (_super) {
|
|
|
36814
36123
|
/**
|
|
36815
36124
|
* The maximum number of vertices to consider batchable. Generally, the complexity
|
|
36816
36125
|
* of the geometry.
|
|
36817
|
-
* @memberof PIXI.Mesh
|
|
36818
|
-
* @static
|
|
36819
|
-
* @member {number} BATCHABLE_SIZE
|
|
36820
36126
|
*/
|
|
36821
36127
|
Mesh.BATCHABLE_SIZE = 100;
|
|
36822
36128
|
return Mesh;
|
|
@@ -37024,8 +36330,8 @@ var MeshGeometry = /** @class */ (function (_super) {
|
|
|
37024
36330
|
}(Geometry));
|
|
37025
36331
|
|
|
37026
36332
|
/*!
|
|
37027
|
-
* @pixi/text-bitmap - v6.2.
|
|
37028
|
-
* Compiled
|
|
36333
|
+
* @pixi/text-bitmap - v6.2.1
|
|
36334
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
37029
36335
|
*
|
|
37030
36336
|
* @pixi/text-bitmap is licensed under the MIT License.
|
|
37031
36337
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -37064,82 +36370,23 @@ function __extends$b(d, b) {
|
|
|
37064
36370
|
/**
|
|
37065
36371
|
* Normalized parsed data from .fnt files.
|
|
37066
36372
|
*
|
|
37067
|
-
* @class
|
|
37068
36373
|
* @memberof PIXI
|
|
37069
36374
|
*/
|
|
37070
36375
|
var BitmapFontData = /** @class */ (function () {
|
|
37071
36376
|
function BitmapFontData() {
|
|
37072
|
-
/**
|
|
37073
|
-
* @member {PIXI.IBitmapFontDataInfo[]}
|
|
37074
|
-
* @readOnly
|
|
37075
|
-
*/
|
|
37076
36377
|
this.info = [];
|
|
37077
|
-
/**
|
|
37078
|
-
* @member {PIXI.IBitmapFontDataCommon[]}
|
|
37079
|
-
* @readOnly
|
|
37080
|
-
*/
|
|
37081
36378
|
this.common = [];
|
|
37082
|
-
/**
|
|
37083
|
-
* @member {PIXI.IBitmapFontDataPage[]}
|
|
37084
|
-
* @readOnly
|
|
37085
|
-
*/
|
|
37086
36379
|
this.page = [];
|
|
37087
|
-
/**
|
|
37088
|
-
* @member {PIXI.IBitmapFontDataChar[]}
|
|
37089
|
-
* @readOnly
|
|
37090
|
-
*/
|
|
37091
36380
|
this.char = [];
|
|
37092
|
-
/**
|
|
37093
|
-
* @member {PIXI.IBitmapFontDataKerning[]}
|
|
37094
|
-
* @readOnly
|
|
37095
|
-
*/
|
|
37096
36381
|
this.kerning = [];
|
|
37097
36382
|
this.distanceField = [];
|
|
37098
36383
|
}
|
|
37099
36384
|
return BitmapFontData;
|
|
37100
36385
|
}());
|
|
37101
|
-
/**
|
|
37102
|
-
* @memberof PIXI
|
|
37103
|
-
* @typedef {object} IBitmapFontDataInfo
|
|
37104
|
-
* @property {string} face
|
|
37105
|
-
* @property {number} size
|
|
37106
|
-
*/
|
|
37107
|
-
/**
|
|
37108
|
-
* @memberof PIXI
|
|
37109
|
-
* @typedef {object} IBitmapFontDataCommon
|
|
37110
|
-
* @property {number} lineHeight
|
|
37111
|
-
*/
|
|
37112
|
-
/**
|
|
37113
|
-
* @memberof PIXI
|
|
37114
|
-
* @typedef {object} IBitmapFontDataPage
|
|
37115
|
-
* @property {number} id
|
|
37116
|
-
* @property {string} file
|
|
37117
|
-
*/
|
|
37118
|
-
/**
|
|
37119
|
-
* @memberof PIXI
|
|
37120
|
-
* @typedef {object} IBitmapFontDataChar
|
|
37121
|
-
* @property {string} id
|
|
37122
|
-
* @property {number} page
|
|
37123
|
-
* @property {number} x
|
|
37124
|
-
* @property {number} y
|
|
37125
|
-
* @property {number} width
|
|
37126
|
-
* @property {number} height
|
|
37127
|
-
* @property {number} xoffset
|
|
37128
|
-
* @property {number} yoffset
|
|
37129
|
-
* @property {number} xadvance
|
|
37130
|
-
*/
|
|
37131
|
-
/**
|
|
37132
|
-
* @memberof PIXI
|
|
37133
|
-
* @typedef {object} IBitmapFontDataKerning
|
|
37134
|
-
* @property {number} first
|
|
37135
|
-
* @property {number} second
|
|
37136
|
-
* @property {number} amount
|
|
37137
|
-
*/
|
|
37138
36386
|
|
|
37139
36387
|
/**
|
|
37140
36388
|
* BitmapFont format that's Text-based.
|
|
37141
36389
|
*
|
|
37142
|
-
* @class
|
|
37143
36390
|
* @private
|
|
37144
36391
|
*/
|
|
37145
36392
|
var TextFormat = /** @class */ (function () {
|
|
@@ -37148,10 +36395,8 @@ var TextFormat = /** @class */ (function () {
|
|
|
37148
36395
|
/**
|
|
37149
36396
|
* Check if resource refers to txt font data.
|
|
37150
36397
|
*
|
|
37151
|
-
* @
|
|
37152
|
-
* @
|
|
37153
|
-
* @param {any} data
|
|
37154
|
-
* @return {boolean} True if resource could be treated as font data, false otherwise.
|
|
36398
|
+
* @param data
|
|
36399
|
+
* @return - True if resource could be treated as font data, false otherwise.
|
|
37155
36400
|
*/
|
|
37156
36401
|
TextFormat.test = function (data) {
|
|
37157
36402
|
return typeof data === 'string' && data.indexOf('info face=') === 0;
|
|
@@ -37159,10 +36404,8 @@ var TextFormat = /** @class */ (function () {
|
|
|
37159
36404
|
/**
|
|
37160
36405
|
* Convert text font data to a javascript object.
|
|
37161
36406
|
*
|
|
37162
|
-
* @
|
|
37163
|
-
* @
|
|
37164
|
-
* @param {string} txt - Raw string data to be converted
|
|
37165
|
-
* @return {PIXI.BitmapFontData} Parsed font data
|
|
36407
|
+
* @param txt - Raw string data to be converted
|
|
36408
|
+
* @return - Parsed font data
|
|
37166
36409
|
*/
|
|
37167
36410
|
TextFormat.parse = function (txt) {
|
|
37168
36411
|
// Retrieve data item
|
|
@@ -37239,7 +36482,6 @@ var TextFormat = /** @class */ (function () {
|
|
|
37239
36482
|
/**
|
|
37240
36483
|
* BitmapFont format that's XML-based.
|
|
37241
36484
|
*
|
|
37242
|
-
* @class
|
|
37243
36485
|
* @private
|
|
37244
36486
|
*/
|
|
37245
36487
|
var XMLFormat = /** @class */ (function () {
|
|
@@ -37248,10 +36490,8 @@ var XMLFormat = /** @class */ (function () {
|
|
|
37248
36490
|
/**
|
|
37249
36491
|
* Check if resource refers to xml font data.
|
|
37250
36492
|
*
|
|
37251
|
-
* @
|
|
37252
|
-
* @
|
|
37253
|
-
* @param {any} data
|
|
37254
|
-
* @return {boolean} True if resource could be treated as font data, false otherwise.
|
|
36493
|
+
* @param data
|
|
36494
|
+
* @return - True if resource could be treated as font data, false otherwise.
|
|
37255
36495
|
*/
|
|
37256
36496
|
XMLFormat.test = function (data) {
|
|
37257
36497
|
return data instanceof XMLDocument
|
|
@@ -37261,10 +36501,8 @@ var XMLFormat = /** @class */ (function () {
|
|
|
37261
36501
|
/**
|
|
37262
36502
|
* Convert the XML into BitmapFontData that we can use.
|
|
37263
36503
|
*
|
|
37264
|
-
* @
|
|
37265
|
-
* @
|
|
37266
|
-
* @param {XMLDocument} xml
|
|
37267
|
-
* @return {BitmapFontData} Data to use for BitmapFont
|
|
36504
|
+
* @param xml
|
|
36505
|
+
* @return - Data to use for BitmapFont
|
|
37268
36506
|
*/
|
|
37269
36507
|
XMLFormat.parse = function (xml) {
|
|
37270
36508
|
var data = new BitmapFontData();
|
|
@@ -37326,7 +36564,6 @@ var XMLFormat = /** @class */ (function () {
|
|
|
37326
36564
|
/**
|
|
37327
36565
|
* BitmapFont format that's XML-based.
|
|
37328
36566
|
*
|
|
37329
|
-
* @class
|
|
37330
36567
|
* @private
|
|
37331
36568
|
*/
|
|
37332
36569
|
var XMLStringFormat = /** @class */ (function () {
|
|
@@ -37335,10 +36572,8 @@ var XMLStringFormat = /** @class */ (function () {
|
|
|
37335
36572
|
/**
|
|
37336
36573
|
* Check if resource refers to text xml font data.
|
|
37337
36574
|
*
|
|
37338
|
-
* @
|
|
37339
|
-
* @
|
|
37340
|
-
* @param {any} data
|
|
37341
|
-
* @return {boolean} True if resource could be treated as font data, false otherwise.
|
|
36575
|
+
* @param data
|
|
36576
|
+
* @return - True if resource could be treated as font data, false otherwise.
|
|
37342
36577
|
*/
|
|
37343
36578
|
XMLStringFormat.test = function (data) {
|
|
37344
36579
|
if (typeof data === 'string' && data.indexOf('<font>') > -1) {
|
|
@@ -37350,10 +36585,8 @@ var XMLStringFormat = /** @class */ (function () {
|
|
|
37350
36585
|
/**
|
|
37351
36586
|
* Convert the text XML into BitmapFontData that we can use.
|
|
37352
36587
|
*
|
|
37353
|
-
* @
|
|
37354
|
-
* @
|
|
37355
|
-
* @param {string} xmlTxt
|
|
37356
|
-
* @return {BitmapFontData} Data to use for BitmapFont
|
|
36588
|
+
* @param xmlTxt
|
|
36589
|
+
* @return - Data to use for BitmapFont
|
|
37357
36590
|
*/
|
|
37358
36591
|
XMLStringFormat.parse = function (xmlTxt) {
|
|
37359
36592
|
var xml = new self.DOMParser().parseFromString(xmlTxt, 'text/xml');
|
|
@@ -37977,15 +37210,13 @@ var charRenderDataPool = [];
|
|
|
37977
37210
|
* });
|
|
37978
37211
|
* ```
|
|
37979
37212
|
*
|
|
37980
|
-
* @class
|
|
37981
|
-
* @extends PIXI.Container
|
|
37982
37213
|
* @memberof PIXI
|
|
37983
37214
|
*/
|
|
37984
37215
|
var BitmapText = /** @class */ (function (_super) {
|
|
37985
37216
|
__extends$b(BitmapText, _super);
|
|
37986
37217
|
/**
|
|
37987
|
-
* @param
|
|
37988
|
-
* @param
|
|
37218
|
+
* @param text - A string that you would like the text to display.
|
|
37219
|
+
* @param style - The style parameters.
|
|
37989
37220
|
* @param {string} style.fontName - The installed BitmapFont name.
|
|
37990
37221
|
* @param {number} [style.fontSize] - The size of the font in pixels, e.g. 24. If undefined,
|
|
37991
37222
|
*. this will default to the BitmapFont size.
|
|
@@ -37998,116 +37229,31 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
37998
37229
|
function BitmapText(text, style) {
|
|
37999
37230
|
if (style === void 0) { style = {}; }
|
|
38000
37231
|
var _this = _super.call(this) || this;
|
|
37232
|
+
/**
|
|
37233
|
+
* Private tracker for the current tint.
|
|
37234
|
+
*
|
|
37235
|
+
* @private
|
|
37236
|
+
*/
|
|
38001
37237
|
_this._tint = 0xFFFFFF;
|
|
38002
37238
|
// Apply the defaults
|
|
38003
37239
|
var _a = Object.assign({}, BitmapText.styleDefaults, style), align = _a.align, tint = _a.tint, maxWidth = _a.maxWidth, letterSpacing = _a.letterSpacing, fontName = _a.fontName, fontSize = _a.fontSize;
|
|
38004
37240
|
if (!BitmapFont.available[fontName]) {
|
|
38005
37241
|
throw new Error("Missing BitmapFont \"" + fontName + "\"");
|
|
38006
37242
|
}
|
|
38007
|
-
/**
|
|
38008
|
-
* Collection of page mesh data.
|
|
38009
|
-
*
|
|
38010
|
-
* @member {object}
|
|
38011
|
-
* @private
|
|
38012
|
-
*/
|
|
38013
37243
|
_this._activePagesMeshData = [];
|
|
38014
|
-
/**
|
|
38015
|
-
* Private tracker for the width of the overall text
|
|
38016
|
-
*
|
|
38017
|
-
* @member {number}
|
|
38018
|
-
* @private
|
|
38019
|
-
*/
|
|
38020
37244
|
_this._textWidth = 0;
|
|
38021
|
-
/**
|
|
38022
|
-
* Private tracker for the height of the overall text
|
|
38023
|
-
*
|
|
38024
|
-
* @member {number}
|
|
38025
|
-
* @private
|
|
38026
|
-
*/
|
|
38027
37245
|
_this._textHeight = 0;
|
|
38028
|
-
/**
|
|
38029
|
-
* Private tracker for the current text align.
|
|
38030
|
-
*
|
|
38031
|
-
* @member {string}
|
|
38032
|
-
* @private
|
|
38033
|
-
*/
|
|
38034
37246
|
_this._align = align;
|
|
38035
|
-
/**
|
|
38036
|
-
* Private tracker for the current tint.
|
|
38037
|
-
*
|
|
38038
|
-
* @member {number}
|
|
38039
|
-
* @private
|
|
38040
|
-
*/
|
|
38041
37247
|
_this._tint = tint;
|
|
38042
|
-
/**
|
|
38043
|
-
* Private tracker for the current font name.
|
|
38044
|
-
*
|
|
38045
|
-
* @member {string}
|
|
38046
|
-
* @private
|
|
38047
|
-
*/
|
|
38048
37248
|
_this._fontName = fontName;
|
|
38049
|
-
/**
|
|
38050
|
-
* Private tracker for the current font size.
|
|
38051
|
-
*
|
|
38052
|
-
* @member {number}
|
|
38053
|
-
* @private
|
|
38054
|
-
*/
|
|
38055
37249
|
_this._fontSize = fontSize || BitmapFont.available[fontName].size;
|
|
38056
|
-
/**
|
|
38057
|
-
* Private tracker for the current text.
|
|
38058
|
-
*
|
|
38059
|
-
* @member {string}
|
|
38060
|
-
* @private
|
|
38061
|
-
*/
|
|
38062
37250
|
_this._text = text;
|
|
38063
|
-
/**
|
|
38064
|
-
* The max width of this bitmap text in pixels. If the text provided is longer than the
|
|
38065
|
-
* value provided, line breaks will be automatically inserted in the last whitespace.
|
|
38066
|
-
* Disable by setting value to 0
|
|
38067
|
-
*
|
|
38068
|
-
* @member {number}
|
|
38069
|
-
* @private
|
|
38070
|
-
*/
|
|
38071
37251
|
_this._maxWidth = maxWidth;
|
|
38072
|
-
/**
|
|
38073
|
-
* The max line height. This is useful when trying to use the total height of the Text,
|
|
38074
|
-
* ie: when trying to vertically align. (Internally used)
|
|
38075
|
-
*
|
|
38076
|
-
* @member {number}
|
|
38077
|
-
* @private
|
|
38078
|
-
*/
|
|
38079
37252
|
_this._maxLineHeight = 0;
|
|
38080
|
-
/**
|
|
38081
|
-
* Letter spacing. This is useful for setting the space between characters.
|
|
38082
|
-
* @member {number}
|
|
38083
|
-
* @private
|
|
38084
|
-
*/
|
|
38085
37253
|
_this._letterSpacing = letterSpacing;
|
|
38086
|
-
/**
|
|
38087
|
-
* Text anchor. read-only
|
|
38088
|
-
*
|
|
38089
|
-
* @member {PIXI.ObservablePoint}
|
|
38090
|
-
* @private
|
|
38091
|
-
*/
|
|
38092
37254
|
_this._anchor = new ObservablePoint(function () { _this.dirty = true; }, _this, 0, 0);
|
|
38093
|
-
/**
|
|
38094
|
-
* If true PixiJS will Math.floor() x/y values when rendering
|
|
38095
|
-
*
|
|
38096
|
-
* @member {boolean}
|
|
38097
|
-
* @default PIXI.settings.ROUND_PIXELS
|
|
38098
|
-
*/
|
|
38099
37255
|
_this._roundPixels = settings.ROUND_PIXELS;
|
|
38100
|
-
/**
|
|
38101
|
-
* Set to `true` if the BitmapText needs to be redrawn.
|
|
38102
|
-
*
|
|
38103
|
-
* @member {boolean}
|
|
38104
|
-
*/
|
|
38105
37256
|
_this.dirty = true;
|
|
38106
|
-
/**
|
|
38107
|
-
* Cached char texture is destroyed when BitmapText is destroyed
|
|
38108
|
-
* @member {Record<number, Texture>}
|
|
38109
|
-
* @private
|
|
38110
|
-
*/
|
|
38111
37257
|
_this._textureCache = {};
|
|
38112
37258
|
return _this;
|
|
38113
37259
|
}
|
|
@@ -38383,11 +37529,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38383
37529
|
charRenderDataPool.push(chars[i]);
|
|
38384
37530
|
}
|
|
38385
37531
|
};
|
|
38386
|
-
/**
|
|
38387
|
-
* Updates the transform of this object
|
|
38388
|
-
*
|
|
38389
|
-
* @private
|
|
38390
|
-
*/
|
|
38391
37532
|
BitmapText.prototype.updateTransform = function () {
|
|
38392
37533
|
this.validate();
|
|
38393
37534
|
this.containerUpdateTransform();
|
|
@@ -38412,7 +37553,7 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38412
37553
|
/**
|
|
38413
37554
|
* Validates text before calling parent's getLocalBounds
|
|
38414
37555
|
*
|
|
38415
|
-
* @return
|
|
37556
|
+
* @return - The rectangular bounding area
|
|
38416
37557
|
*/
|
|
38417
37558
|
BitmapText.prototype.getLocalBounds = function () {
|
|
38418
37559
|
this.validate();
|
|
@@ -38433,7 +37574,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38433
37574
|
/**
|
|
38434
37575
|
* The tint of the BitmapText object.
|
|
38435
37576
|
*
|
|
38436
|
-
* @member {number}
|
|
38437
37577
|
* @default 0xffffff
|
|
38438
37578
|
*/
|
|
38439
37579
|
get: function () {
|
|
@@ -38470,11 +37610,7 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38470
37610
|
configurable: true
|
|
38471
37611
|
});
|
|
38472
37612
|
Object.defineProperty(BitmapText.prototype, "fontName", {
|
|
38473
|
-
/**
|
|
38474
|
-
* The name of the BitmapFont.
|
|
38475
|
-
*
|
|
38476
|
-
* @member {string}
|
|
38477
|
-
*/
|
|
37613
|
+
/** The name of the BitmapFont. */
|
|
38478
37614
|
get: function () {
|
|
38479
37615
|
return this._fontName;
|
|
38480
37616
|
},
|
|
@@ -38491,11 +37627,7 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38491
37627
|
configurable: true
|
|
38492
37628
|
});
|
|
38493
37629
|
Object.defineProperty(BitmapText.prototype, "fontSize", {
|
|
38494
|
-
/**
|
|
38495
|
-
* The size of the font to display.
|
|
38496
|
-
*
|
|
38497
|
-
* @member {number}
|
|
38498
|
-
*/
|
|
37630
|
+
/** The size of the font to display. */
|
|
38499
37631
|
get: function () {
|
|
38500
37632
|
return this._fontSize;
|
|
38501
37633
|
},
|
|
@@ -38517,8 +37649,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38517
37649
|
* Setting the anchor to `(0.5,0.5)` means the text's origin is centered.
|
|
38518
37650
|
*
|
|
38519
37651
|
* Setting the anchor to `(1,1)` would mean the text's origin point will be the bottom right corner.
|
|
38520
|
-
*
|
|
38521
|
-
* @member {PIXI.Point | number}
|
|
38522
37652
|
*/
|
|
38523
37653
|
get: function () {
|
|
38524
37654
|
return this._anchor;
|
|
@@ -38535,11 +37665,7 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38535
37665
|
configurable: true
|
|
38536
37666
|
});
|
|
38537
37667
|
Object.defineProperty(BitmapText.prototype, "text", {
|
|
38538
|
-
/**
|
|
38539
|
-
* The text of the BitmapText object.
|
|
38540
|
-
*
|
|
38541
|
-
* @member {string}
|
|
38542
|
-
*/
|
|
37668
|
+
/** The text of the BitmapText object. */
|
|
38543
37669
|
get: function () {
|
|
38544
37670
|
return this._text;
|
|
38545
37671
|
},
|
|
@@ -38559,8 +37685,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38559
37685
|
* The max width of this bitmap text in pixels. If the text provided is longer than the
|
|
38560
37686
|
* value provided, line breaks will be automatically inserted in the last whitespace.
|
|
38561
37687
|
* Disable by setting the value to 0.
|
|
38562
|
-
*
|
|
38563
|
-
* @member {number}
|
|
38564
37688
|
*/
|
|
38565
37689
|
get: function () {
|
|
38566
37690
|
return this._maxWidth;
|
|
@@ -38580,7 +37704,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38580
37704
|
* The max line height. This is useful when trying to use the total height of the Text,
|
|
38581
37705
|
* i.e. when trying to vertically align.
|
|
38582
37706
|
*
|
|
38583
|
-
* @member {number}
|
|
38584
37707
|
* @readonly
|
|
38585
37708
|
*/
|
|
38586
37709
|
get: function () {
|
|
@@ -38595,7 +37718,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38595
37718
|
* The width of the overall text, different from fontSize,
|
|
38596
37719
|
* which is defined in the style object.
|
|
38597
37720
|
*
|
|
38598
|
-
* @member {number}
|
|
38599
37721
|
* @readonly
|
|
38600
37722
|
*/
|
|
38601
37723
|
get: function () {
|
|
@@ -38606,11 +37728,7 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38606
37728
|
configurable: true
|
|
38607
37729
|
});
|
|
38608
37730
|
Object.defineProperty(BitmapText.prototype, "letterSpacing", {
|
|
38609
|
-
/**
|
|
38610
|
-
* Additional space between characters.
|
|
38611
|
-
*
|
|
38612
|
-
* @member {number}
|
|
38613
|
-
*/
|
|
37731
|
+
/** Additional space between characters. */
|
|
38614
37732
|
get: function () {
|
|
38615
37733
|
return this._letterSpacing;
|
|
38616
37734
|
},
|
|
@@ -38630,7 +37748,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38630
37748
|
* The main disadvantage is movement of objects may appear less smooth.
|
|
38631
37749
|
* To set the global default, change {@link PIXI.settings.ROUND_PIXELS}
|
|
38632
37750
|
*
|
|
38633
|
-
* @member {boolean}
|
|
38634
37751
|
* @default PIXI.settings.ROUND_PIXELS
|
|
38635
37752
|
*/
|
|
38636
37753
|
get: function () {
|
|
@@ -38650,7 +37767,6 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38650
37767
|
* The height of the overall text, different from fontSize,
|
|
38651
37768
|
* which is defined in the style object.
|
|
38652
37769
|
*
|
|
38653
|
-
* @member {number}
|
|
38654
37770
|
* @readonly
|
|
38655
37771
|
*/
|
|
38656
37772
|
get: function () {
|
|
@@ -38682,9 +37798,8 @@ var BitmapText = /** @class */ (function (_super) {
|
|
|
38682
37798
|
/**
|
|
38683
37799
|
* {@link PIXI.Loader Loader} middleware for loading
|
|
38684
37800
|
* bitmap-based fonts suitable for using with {@link PIXI.BitmapText}.
|
|
38685
|
-
*
|
|
37801
|
+
*
|
|
38686
37802
|
* @memberof PIXI
|
|
38687
|
-
* @implements PIXI.ILoaderPlugin
|
|
38688
37803
|
*/
|
|
38689
37804
|
var BitmapFontLoader = /** @class */ (function () {
|
|
38690
37805
|
function BitmapFontLoader() {
|
|
@@ -38699,6 +37814,7 @@ var BitmapFontLoader = /** @class */ (function () {
|
|
|
38699
37814
|
};
|
|
38700
37815
|
/**
|
|
38701
37816
|
* Called after a resource is loaded.
|
|
37817
|
+
*
|
|
38702
37818
|
* @see PIXI.Loader.loaderMiddleware
|
|
38703
37819
|
* @param {PIXI.LoaderResource} resource
|
|
38704
37820
|
* @param {function} next
|
|
@@ -38756,13 +37872,7 @@ var BitmapFontLoader = /** @class */ (function () {
|
|
|
38756
37872
|
}
|
|
38757
37873
|
}
|
|
38758
37874
|
};
|
|
38759
|
-
/**
|
|
38760
|
-
* Get folder path from a resource
|
|
38761
|
-
* @private
|
|
38762
|
-
* @param {PIXI.Loader} loader
|
|
38763
|
-
* @param {PIXI.LoaderResource} resource
|
|
38764
|
-
* @return {string}
|
|
38765
|
-
*/
|
|
37875
|
+
/** Get folder path from a resource. */
|
|
38766
37876
|
BitmapFontLoader.getBaseUrl = function (loader, resource) {
|
|
38767
37877
|
var resUrl = !resource.isDataUrl ? BitmapFontLoader.dirname(resource.url) : '';
|
|
38768
37878
|
if (resource.isDataUrl) {
|
|
@@ -38786,7 +37896,7 @@ var BitmapFontLoader = /** @class */ (function () {
|
|
|
38786
37896
|
};
|
|
38787
37897
|
/**
|
|
38788
37898
|
* Replacement for NodeJS's path.dirname
|
|
38789
|
-
*
|
|
37899
|
+
*
|
|
38790
37900
|
* @param {string} url - Path to get directory for
|
|
38791
37901
|
*/
|
|
38792
37902
|
BitmapFontLoader.dirname = function (url) {
|
|
@@ -38808,8 +37918,8 @@ var BitmapFontLoader = /** @class */ (function () {
|
|
|
38808
37918
|
}());
|
|
38809
37919
|
|
|
38810
37920
|
/*!
|
|
38811
|
-
* @pixi/filter-alpha - v6.2.
|
|
38812
|
-
* Compiled
|
|
37921
|
+
* @pixi/filter-alpha - v6.2.1
|
|
37922
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
38813
37923
|
*
|
|
38814
37924
|
* @pixi/filter-alpha is licensed under the MIT License.
|
|
38815
37925
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -38891,8 +38001,8 @@ var AlphaFilter = /** @class */ (function (_super) {
|
|
|
38891
38001
|
}(Filter));
|
|
38892
38002
|
|
|
38893
38003
|
/*!
|
|
38894
|
-
* @pixi/filter-blur - v6.2.
|
|
38895
|
-
* Compiled
|
|
38004
|
+
* @pixi/filter-blur - v6.2.1
|
|
38005
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
38896
38006
|
*
|
|
38897
38007
|
* @pixi/filter-blur is licensed under the MIT License.
|
|
38898
38008
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -38989,8 +38099,8 @@ function generateBlurFragSource(kernelSize) {
|
|
|
38989
38099
|
}
|
|
38990
38100
|
|
|
38991
38101
|
/*!
|
|
38992
|
-
* @pixi/constants - v6.2.
|
|
38993
|
-
* Compiled
|
|
38102
|
+
* @pixi/constants - v6.2.1
|
|
38103
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
38994
38104
|
*
|
|
38995
38105
|
* @pixi/constants is licensed under the MIT License.
|
|
38996
38106
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -39789,8 +38899,8 @@ var BlurFilter = /** @class */ (function (_super) {
|
|
|
39789
38899
|
}(Filter));
|
|
39790
38900
|
|
|
39791
38901
|
/*!
|
|
39792
|
-
* @pixi/filter-color-matrix - v6.2.
|
|
39793
|
-
* Compiled
|
|
38902
|
+
* @pixi/filter-color-matrix - v6.2.1
|
|
38903
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
39794
38904
|
*
|
|
39795
38905
|
* @pixi/filter-color-matrix is licensed under the MIT License.
|
|
39796
38906
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -39838,8 +38948,6 @@ var fragment$4 = "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nunif
|
|
|
39838
38948
|
* colorMatrix.contrast(2);
|
|
39839
38949
|
* ```
|
|
39840
38950
|
* @author Clément Chenebault <clement@goodboydigital.com>
|
|
39841
|
-
* @class
|
|
39842
|
-
* @extends PIXI.Filter
|
|
39843
38951
|
* @memberof PIXI.filters
|
|
39844
38952
|
*/
|
|
39845
38953
|
var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
@@ -39861,7 +38969,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39861
38969
|
* Transforms current matrix and set the new one
|
|
39862
38970
|
*
|
|
39863
38971
|
* @param {number[]} matrix - 5x4 matrix
|
|
39864
|
-
* @param
|
|
38972
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39865
38973
|
* just set the current matrix with @param matrix
|
|
39866
38974
|
*/
|
|
39867
38975
|
ColorMatrixFilter.prototype._loadMatrix = function (matrix, multiply) {
|
|
@@ -39878,9 +38986,9 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39878
38986
|
* Multiplies two mat5's
|
|
39879
38987
|
*
|
|
39880
38988
|
* @private
|
|
39881
|
-
* @param
|
|
39882
|
-
* @param
|
|
39883
|
-
* @param
|
|
38989
|
+
* @param out - 5x4 matrix the receiving matrix
|
|
38990
|
+
* @param a - 5x4 matrix the first operand
|
|
38991
|
+
* @param b - 5x4 matrix the second operand
|
|
39884
38992
|
* @returns {number[]} 5x4 matrix
|
|
39885
38993
|
*/
|
|
39886
38994
|
ColorMatrixFilter.prototype._multiply = function (out, a, b) {
|
|
@@ -39913,7 +39021,6 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39913
39021
|
/**
|
|
39914
39022
|
* Create a Float32 Array and normalize the offset component to 0-1
|
|
39915
39023
|
*
|
|
39916
|
-
* @private
|
|
39917
39024
|
* @param {number[]} matrix - 5x4 matrix
|
|
39918
39025
|
* @return {number[]} 5x4 matrix with all values between 0-1
|
|
39919
39026
|
*/
|
|
@@ -39929,8 +39036,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39929
39036
|
/**
|
|
39930
39037
|
* Adjusts brightness
|
|
39931
39038
|
*
|
|
39932
|
-
* @param
|
|
39933
|
-
* @param
|
|
39039
|
+
* @param b - value of the brigthness (0-1, where 0 is black)
|
|
39040
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39934
39041
|
* just set the current matrix with @param matrix
|
|
39935
39042
|
*/
|
|
39936
39043
|
ColorMatrixFilter.prototype.brightness = function (b, multiply) {
|
|
@@ -39946,8 +39053,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39946
39053
|
* This can be used to achieve a tinting effect on Containers similar to the tint field of some
|
|
39947
39054
|
* display objects like Sprite, Text, Graphics, and Mesh.
|
|
39948
39055
|
*
|
|
39949
|
-
* @param
|
|
39950
|
-
* @param
|
|
39056
|
+
* @param color - Color of the tint. This is a hex value.
|
|
39057
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39951
39058
|
* just set the current matrix with @param matrix
|
|
39952
39059
|
*/
|
|
39953
39060
|
ColorMatrixFilter.prototype.tint = function (color, multiply) {
|
|
@@ -39964,8 +39071,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39964
39071
|
/**
|
|
39965
39072
|
* Set the matrices in grey scales
|
|
39966
39073
|
*
|
|
39967
|
-
* @param
|
|
39968
|
-
* @param
|
|
39074
|
+
* @param scale - value of the grey (0-1, where 0 is black)
|
|
39075
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39969
39076
|
* just set the current matrix with @param matrix
|
|
39970
39077
|
*/
|
|
39971
39078
|
ColorMatrixFilter.prototype.greyscale = function (scale, multiply) {
|
|
@@ -39979,7 +39086,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39979
39086
|
/**
|
|
39980
39087
|
* Set the black and white matrice.
|
|
39981
39088
|
*
|
|
39982
|
-
* @param
|
|
39089
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39983
39090
|
* just set the current matrix with @param matrix
|
|
39984
39091
|
*/
|
|
39985
39092
|
ColorMatrixFilter.prototype.blackAndWhite = function (multiply) {
|
|
@@ -39993,8 +39100,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
39993
39100
|
/**
|
|
39994
39101
|
* Set the hue property of the color
|
|
39995
39102
|
*
|
|
39996
|
-
* @param
|
|
39997
|
-
* @param
|
|
39103
|
+
* @param rotation - in degrees
|
|
39104
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
39998
39105
|
* just set the current matrix with @param matrix
|
|
39999
39106
|
*/
|
|
40000
39107
|
ColorMatrixFilter.prototype.hue = function (rotation, multiply) {
|
|
@@ -40037,8 +39144,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40037
39144
|
* Increase contrast : shadows darker and highlights brighter
|
|
40038
39145
|
* Decrease contrast : bring the shadows up and the highlights down
|
|
40039
39146
|
*
|
|
40040
|
-
* @param
|
|
40041
|
-
* @param
|
|
39147
|
+
* @param amount - value of the contrast (0-1)
|
|
39148
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40042
39149
|
* just set the current matrix with @param matrix
|
|
40043
39150
|
*/
|
|
40044
39151
|
ColorMatrixFilter.prototype.contrast = function (amount, multiply) {
|
|
@@ -40055,8 +39162,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40055
39162
|
* Set the saturation matrix, increase the separation between colors
|
|
40056
39163
|
* Increase saturation : increase contrast, brightness, and sharpness
|
|
40057
39164
|
*
|
|
40058
|
-
* @param
|
|
40059
|
-
* @param
|
|
39165
|
+
* @param amount - The saturation amount (0-1)
|
|
39166
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40060
39167
|
* just set the current matrix with @param matrix
|
|
40061
39168
|
*/
|
|
40062
39169
|
ColorMatrixFilter.prototype.saturate = function (amount, multiply) {
|
|
@@ -40074,7 +39181,6 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40074
39181
|
* Desaturate image (remove color)
|
|
40075
39182
|
*
|
|
40076
39183
|
* Call the saturate function
|
|
40077
|
-
*
|
|
40078
39184
|
*/
|
|
40079
39185
|
ColorMatrixFilter.prototype.desaturate = function () {
|
|
40080
39186
|
this.saturate(-1);
|
|
@@ -40082,7 +39188,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40082
39188
|
/**
|
|
40083
39189
|
* Negative image (inverse of classic rgb matrix)
|
|
40084
39190
|
*
|
|
40085
|
-
* @param
|
|
39191
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40086
39192
|
* just set the current matrix with @param matrix
|
|
40087
39193
|
*/
|
|
40088
39194
|
ColorMatrixFilter.prototype.negative = function (multiply) {
|
|
@@ -40096,7 +39202,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40096
39202
|
/**
|
|
40097
39203
|
* Sepia image
|
|
40098
39204
|
*
|
|
40099
|
-
* @param
|
|
39205
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40100
39206
|
* just set the current matrix with @param matrix
|
|
40101
39207
|
*/
|
|
40102
39208
|
ColorMatrixFilter.prototype.sepia = function (multiply) {
|
|
@@ -40110,7 +39216,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40110
39216
|
/**
|
|
40111
39217
|
* Color motion picture process invented in 1916 (thanks Dominic Szablewski)
|
|
40112
39218
|
*
|
|
40113
|
-
* @param
|
|
39219
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40114
39220
|
* just set the current matrix with @param matrix
|
|
40115
39221
|
*/
|
|
40116
39222
|
ColorMatrixFilter.prototype.technicolor = function (multiply) {
|
|
@@ -40124,7 +39230,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40124
39230
|
/**
|
|
40125
39231
|
* Polaroid filter
|
|
40126
39232
|
*
|
|
40127
|
-
* @param
|
|
39233
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40128
39234
|
* just set the current matrix with @param matrix
|
|
40129
39235
|
*/
|
|
40130
39236
|
ColorMatrixFilter.prototype.polaroid = function (multiply) {
|
|
@@ -40138,7 +39244,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40138
39244
|
/**
|
|
40139
39245
|
* Filter who transforms : Red -> Blue and Blue -> Red
|
|
40140
39246
|
*
|
|
40141
|
-
* @param
|
|
39247
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40142
39248
|
* just set the current matrix with @param matrix
|
|
40143
39249
|
*/
|
|
40144
39250
|
ColorMatrixFilter.prototype.toBGR = function (multiply) {
|
|
@@ -40152,7 +39258,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40152
39258
|
/**
|
|
40153
39259
|
* Color reversal film introduced by Eastman Kodak in 1935. (thanks Dominic Szablewski)
|
|
40154
39260
|
*
|
|
40155
|
-
* @param
|
|
39261
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40156
39262
|
* just set the current matrix with @param matrix
|
|
40157
39263
|
*/
|
|
40158
39264
|
ColorMatrixFilter.prototype.kodachrome = function (multiply) {
|
|
@@ -40166,7 +39272,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40166
39272
|
/**
|
|
40167
39273
|
* Brown delicious browni filter (thanks Dominic Szablewski)
|
|
40168
39274
|
*
|
|
40169
|
-
* @param
|
|
39275
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40170
39276
|
* just set the current matrix with @param matrix
|
|
40171
39277
|
*/
|
|
40172
39278
|
ColorMatrixFilter.prototype.browni = function (multiply) {
|
|
@@ -40180,7 +39286,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40180
39286
|
/**
|
|
40181
39287
|
* Vintage filter (thanks Dominic Szablewski)
|
|
40182
39288
|
*
|
|
40183
|
-
* @param
|
|
39289
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40184
39290
|
* just set the current matrix with @param matrix
|
|
40185
39291
|
*/
|
|
40186
39292
|
ColorMatrixFilter.prototype.vintage = function (multiply) {
|
|
@@ -40194,11 +39300,11 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40194
39300
|
/**
|
|
40195
39301
|
* We don't know exactly what it does, kind of gradient map, but funny to play with!
|
|
40196
39302
|
*
|
|
40197
|
-
* @param
|
|
40198
|
-
* @param
|
|
40199
|
-
* @param
|
|
40200
|
-
* @param
|
|
40201
|
-
* @param
|
|
39303
|
+
* @param desaturation - Tone values.
|
|
39304
|
+
* @param toned - Tone values.
|
|
39305
|
+
* @param lightColor - Tone values, example: `0xFFE580`
|
|
39306
|
+
* @param darkColor - Tone values, example: `0xFFE580`
|
|
39307
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40202
39308
|
* just set the current matrix with @param matrix
|
|
40203
39309
|
*/
|
|
40204
39310
|
ColorMatrixFilter.prototype.colorTone = function (desaturation, toned, lightColor, darkColor, multiply) {
|
|
@@ -40222,8 +39328,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40222
39328
|
/**
|
|
40223
39329
|
* Night effect
|
|
40224
39330
|
*
|
|
40225
|
-
* @param
|
|
40226
|
-
* @param
|
|
39331
|
+
* @param intensity - The intensity of the night effect.
|
|
39332
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40227
39333
|
* just set the current matrix with @param matrix
|
|
40228
39334
|
*/
|
|
40229
39335
|
ColorMatrixFilter.prototype.night = function (intensity, multiply) {
|
|
@@ -40240,8 +39346,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40240
39346
|
*
|
|
40241
39347
|
* Erase the current matrix by setting a new indepent one
|
|
40242
39348
|
*
|
|
40243
|
-
* @param
|
|
40244
|
-
* @param
|
|
39349
|
+
* @param amount - how much the predator feels his future victim
|
|
39350
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40245
39351
|
* just set the current matrix with @param matrix
|
|
40246
39352
|
*/
|
|
40247
39353
|
ColorMatrixFilter.prototype.predator = function (amount, multiply) {
|
|
@@ -40273,7 +39379,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40273
39379
|
*
|
|
40274
39380
|
* Multiply the current matrix
|
|
40275
39381
|
*
|
|
40276
|
-
* @param
|
|
39382
|
+
* @param multiply - if true, current matrix and matrix are multiplied. If false,
|
|
40277
39383
|
* just set the current matrix with @param matrix
|
|
40278
39384
|
*/
|
|
40279
39385
|
ColorMatrixFilter.prototype.lsd = function (multiply) {
|
|
@@ -40284,10 +39390,7 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40284
39390
|
0, 0, 0, 1, 0 ];
|
|
40285
39391
|
this._loadMatrix(matrix, multiply);
|
|
40286
39392
|
};
|
|
40287
|
-
/**
|
|
40288
|
-
* Erase the current matrix by setting the default one
|
|
40289
|
-
*
|
|
40290
|
-
*/
|
|
39393
|
+
/** Erase the current matrix by setting the default one. */
|
|
40291
39394
|
ColorMatrixFilter.prototype.reset = function () {
|
|
40292
39395
|
var matrix = [
|
|
40293
39396
|
1, 0, 0, 0, 0,
|
|
@@ -40320,7 +39423,6 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40320
39423
|
* When the value is 1, the result color is used.
|
|
40321
39424
|
* When in the range (0, 1) the color is interpolated between the original and result by this amount.
|
|
40322
39425
|
*
|
|
40323
|
-
* @member {number}
|
|
40324
39426
|
* @default 1
|
|
40325
39427
|
*/
|
|
40326
39428
|
get: function () {
|
|
@@ -40338,8 +39440,8 @@ var ColorMatrixFilter = /** @class */ (function (_super) {
|
|
|
40338
39440
|
ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;
|
|
40339
39441
|
|
|
40340
39442
|
/*!
|
|
40341
|
-
* @pixi/filter-displacement - v6.2.
|
|
40342
|
-
* Compiled
|
|
39443
|
+
* @pixi/filter-displacement - v6.2.1
|
|
39444
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
40343
39445
|
*
|
|
40344
39446
|
* @pixi/filter-displacement is licensed under the MIT License.
|
|
40345
39447
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -40392,15 +39494,13 @@ var vertex$3 = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix
|
|
|
40392
39494
|
* For example, if a displacement map pixel has `red = 1` and the filter scale is `20`,
|
|
40393
39495
|
* this filter will output the pixel approximately 20 pixels to the right of the original.
|
|
40394
39496
|
*
|
|
40395
|
-
* @class
|
|
40396
|
-
* @extends PIXI.Filter
|
|
40397
39497
|
* @memberof PIXI.filters
|
|
40398
39498
|
*/
|
|
40399
39499
|
var DisplacementFilter = /** @class */ (function (_super) {
|
|
40400
39500
|
__extends$f(DisplacementFilter, _super);
|
|
40401
39501
|
/**
|
|
40402
39502
|
* @param {PIXI.Sprite} sprite - The sprite used for the displacement map. (make sure its added to the scene!)
|
|
40403
|
-
* @param
|
|
39503
|
+
* @param scale - The scale of the displacement
|
|
40404
39504
|
*/
|
|
40405
39505
|
function DisplacementFilter(sprite, scale) {
|
|
40406
39506
|
var _this = this;
|
|
@@ -40427,10 +39527,10 @@ var DisplacementFilter = /** @class */ (function (_super) {
|
|
|
40427
39527
|
/**
|
|
40428
39528
|
* Applies the filter.
|
|
40429
39529
|
*
|
|
40430
|
-
* @param
|
|
40431
|
-
* @param
|
|
40432
|
-
* @param
|
|
40433
|
-
* @param
|
|
39530
|
+
* @param filterManager - The manager.
|
|
39531
|
+
* @param input - The input target.
|
|
39532
|
+
* @param output - The output target.
|
|
39533
|
+
* @param clearMode - clearMode.
|
|
40434
39534
|
*/
|
|
40435
39535
|
DisplacementFilter.prototype.apply = function (filterManager, input, output, clearMode) {
|
|
40436
39536
|
// fill maskMatrix with _normalized sprite texture coords_
|
|
@@ -40451,11 +39551,7 @@ var DisplacementFilter = /** @class */ (function (_super) {
|
|
|
40451
39551
|
filterManager.applyFilter(this, input, output, clearMode);
|
|
40452
39552
|
};
|
|
40453
39553
|
Object.defineProperty(DisplacementFilter.prototype, "map", {
|
|
40454
|
-
/**
|
|
40455
|
-
* The texture used for the displacement map. Must be power of 2 sized texture.
|
|
40456
|
-
*
|
|
40457
|
-
* @member {PIXI.Texture}
|
|
40458
|
-
*/
|
|
39554
|
+
/** The texture used for the displacement map. Must be power of 2 sized texture. */
|
|
40459
39555
|
get: function () {
|
|
40460
39556
|
return this.uniforms.mapSampler;
|
|
40461
39557
|
},
|
|
@@ -40469,8 +39565,8 @@ var DisplacementFilter = /** @class */ (function (_super) {
|
|
|
40469
39565
|
}(Filter));
|
|
40470
39566
|
|
|
40471
39567
|
/*!
|
|
40472
|
-
* @pixi/filter-fxaa - v6.2.
|
|
40473
|
-
* Compiled
|
|
39568
|
+
* @pixi/filter-fxaa - v6.2.1
|
|
39569
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
40474
39570
|
*
|
|
40475
39571
|
* @pixi/filter-fxaa is licensed under the MIT License.
|
|
40476
39572
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -40515,10 +39611,7 @@ var fragment$6 = "varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_r
|
|
|
40515
39611
|
*
|
|
40516
39612
|
* @see https://github.com/mitsuhiko/webgl-meincraft
|
|
40517
39613
|
*
|
|
40518
|
-
* @class
|
|
40519
|
-
* @extends PIXI.Filter
|
|
40520
39614
|
* @memberof PIXI.filters
|
|
40521
|
-
*
|
|
40522
39615
|
*/
|
|
40523
39616
|
var FXAAFilter = /** @class */ (function (_super) {
|
|
40524
39617
|
__extends$g(FXAAFilter, _super);
|
|
@@ -40530,8 +39623,8 @@ var FXAAFilter = /** @class */ (function (_super) {
|
|
|
40530
39623
|
}(Filter));
|
|
40531
39624
|
|
|
40532
39625
|
/*!
|
|
40533
|
-
* @pixi/filter-noise - v6.2.
|
|
40534
|
-
* Compiled
|
|
39626
|
+
* @pixi/filter-noise - v6.2.1
|
|
39627
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
40535
39628
|
*
|
|
40536
39629
|
* @pixi/filter-noise is licensed under the MIT License.
|
|
40537
39630
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -40573,8 +39666,6 @@ var fragment$7 = "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying
|
|
|
40573
39666
|
*
|
|
40574
39667
|
* original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js
|
|
40575
39668
|
*
|
|
40576
|
-
* @class
|
|
40577
|
-
* @extends PIXI.Filter
|
|
40578
39669
|
* @memberof PIXI.filters
|
|
40579
39670
|
* @author Vico @vicocotea
|
|
40580
39671
|
*/
|
|
@@ -40599,7 +39690,6 @@ var NoiseFilter = /** @class */ (function (_super) {
|
|
|
40599
39690
|
/**
|
|
40600
39691
|
* The amount of noise to apply, this value should be in the range (0, 1].
|
|
40601
39692
|
*
|
|
40602
|
-
* @member {number}
|
|
40603
39693
|
* @default 0.5
|
|
40604
39694
|
*/
|
|
40605
39695
|
get: function () {
|
|
@@ -40612,11 +39702,7 @@ var NoiseFilter = /** @class */ (function (_super) {
|
|
|
40612
39702
|
configurable: true
|
|
40613
39703
|
});
|
|
40614
39704
|
Object.defineProperty(NoiseFilter.prototype, "seed", {
|
|
40615
|
-
/**
|
|
40616
|
-
* A seed value to apply to the random noise generation. `Math.random()` is a good value to use.
|
|
40617
|
-
*
|
|
40618
|
-
* @member {number}
|
|
40619
|
-
*/
|
|
39705
|
+
/** A seed value to apply to the random noise generation. `Math.random()` is a good value to use. */
|
|
40620
39706
|
get: function () {
|
|
40621
39707
|
return this.uniforms.uSeed;
|
|
40622
39708
|
},
|
|
@@ -40630,16 +39716,16 @@ var NoiseFilter = /** @class */ (function (_super) {
|
|
|
40630
39716
|
}(Filter));
|
|
40631
39717
|
|
|
40632
39718
|
/*!
|
|
40633
|
-
* @pixi/mixin-cache-as-bitmap - v6.2.
|
|
40634
|
-
* Compiled
|
|
39719
|
+
* @pixi/mixin-cache-as-bitmap - v6.2.1
|
|
39720
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
40635
39721
|
*
|
|
40636
39722
|
* @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
|
|
40637
39723
|
* http://www.opensource.org/licenses/mit-license
|
|
40638
39724
|
*/
|
|
40639
39725
|
|
|
40640
39726
|
/*!
|
|
40641
|
-
* @pixi/constants - v6.2.
|
|
40642
|
-
* Compiled
|
|
39727
|
+
* @pixi/constants - v6.2.1
|
|
39728
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
40643
39729
|
*
|
|
40644
39730
|
* @pixi/constants is licensed under the MIT License.
|
|
40645
39731
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -41333,7 +40419,7 @@ DisplayObject.prototype._initCachedDisplayObject = function _initCachedDisplayOb
|
|
|
41333
40419
|
// TODO pass an object to clone too? saves having to create a new one each time!
|
|
41334
40420
|
var bounds = this.getLocalBounds(null, true).clone();
|
|
41335
40421
|
// add some padding!
|
|
41336
|
-
if (this.filters) {
|
|
40422
|
+
if (this.filters && this.filters.length) {
|
|
41337
40423
|
var padding = this.filters[0].padding;
|
|
41338
40424
|
bounds.pad(padding);
|
|
41339
40425
|
}
|
|
@@ -41529,8 +40615,8 @@ DisplayObject.prototype._cacheAsBitmapDestroy = function _cacheAsBitmapDestroy(o
|
|
|
41529
40615
|
};
|
|
41530
40616
|
|
|
41531
40617
|
/*!
|
|
41532
|
-
* @pixi/mixin-get-child-by-name - v6.2.
|
|
41533
|
-
* Compiled
|
|
40618
|
+
* @pixi/mixin-get-child-by-name - v6.2.1
|
|
40619
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
41534
40620
|
*
|
|
41535
40621
|
* @pixi/mixin-get-child-by-name is licensed under the MIT License.
|
|
41536
40622
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -41576,8 +40662,8 @@ Container.prototype.getChildByName = function getChildByName(name, deep) {
|
|
|
41576
40662
|
};
|
|
41577
40663
|
|
|
41578
40664
|
/*!
|
|
41579
|
-
* @pixi/mixin-get-global-position - v6.2.
|
|
41580
|
-
* Compiled
|
|
40665
|
+
* @pixi/mixin-get-global-position - v6.2.1
|
|
40666
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
41581
40667
|
*
|
|
41582
40668
|
* @pixi/mixin-get-global-position is licensed under the MIT License.
|
|
41583
40669
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -41608,8 +40694,8 @@ DisplayObject.prototype.getGlobalPosition = function getGlobalPosition(point, sk
|
|
|
41608
40694
|
};
|
|
41609
40695
|
|
|
41610
40696
|
/*!
|
|
41611
|
-
* @pixi/mesh-extras - v6.2.
|
|
41612
|
-
* Compiled
|
|
40697
|
+
* @pixi/mesh-extras - v6.2.1
|
|
40698
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
41613
40699
|
*
|
|
41614
40700
|
* @pixi/mesh-extras is licensed under the MIT License.
|
|
41615
40701
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -42263,8 +41349,8 @@ var NineSlicePlane = /** @class */ (function (_super) {
|
|
|
42263
41349
|
}(SimplePlane));
|
|
42264
41350
|
|
|
42265
41351
|
/*!
|
|
42266
|
-
* @pixi/sprite-animated - v6.2.
|
|
42267
|
-
* Compiled
|
|
41352
|
+
* @pixi/sprite-animated - v6.2.1
|
|
41353
|
+
* Compiled Tue, 21 Dec 2021 19:56:15 UTC
|
|
42268
41354
|
*
|
|
42269
41355
|
* @pixi/sprite-animated is licensed under the MIT License.
|
|
42270
41356
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -42636,7 +41722,7 @@ Application.registerPlugin(AppLoaderPlugin);
|
|
|
42636
41722
|
* @name VERSION
|
|
42637
41723
|
* @type {string}
|
|
42638
41724
|
*/
|
|
42639
|
-
var VERSION$1 = '6.2.
|
|
41725
|
+
var VERSION$1 = '6.2.1';
|
|
42640
41726
|
/**
|
|
42641
41727
|
* @namespace PIXI
|
|
42642
41728
|
*/
|