pixi.js 7.0.0-alpha.3 → 7.0.0-beta.3

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
- * pixi.js - v7.0.0-alpha.3
3
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
2
+ * pixi.js - v7.0.0-beta.3
3
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
4
4
  *
5
5
  * pixi.js is licensed under the MIT License.
6
6
  * http://www.opensource.org/licenses/mit-license
@@ -9,262 +9,8 @@ var PIXI = (function (exports) {
9
9
  'use strict';
10
10
 
11
11
  /*!
12
- * @pixi/settings - v7.0.0-alpha.3
13
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14
- *
15
- * @pixi/settings is licensed under the MIT License.
16
- * http://www.opensource.org/licenses/mit-license
17
- */
18
- /*!
19
- * @pixi/constants - v7.0.0-alpha.3
20
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
21
- *
22
- * @pixi/constants is licensed under the MIT License.
23
- * http://www.opensource.org/licenses/mit-license
24
- */
25
- var SCALE_MODES$1 = /* @__PURE__ */ ((SCALE_MODES2) => {
26
- SCALE_MODES2[SCALE_MODES2["NEAREST"] = 0] = "NEAREST";
27
- SCALE_MODES2[SCALE_MODES2["LINEAR"] = 1] = "LINEAR";
28
- return SCALE_MODES2;
29
- })(SCALE_MODES$1 || {});
30
- var WRAP_MODES$1 = /* @__PURE__ */ ((WRAP_MODES2) => {
31
- WRAP_MODES2[WRAP_MODES2["CLAMP"] = 33071] = "CLAMP";
32
- WRAP_MODES2[WRAP_MODES2["REPEAT"] = 10497] = "REPEAT";
33
- WRAP_MODES2[WRAP_MODES2["MIRRORED_REPEAT"] = 33648] = "MIRRORED_REPEAT";
34
- return WRAP_MODES2;
35
- })(WRAP_MODES$1 || {});
36
- var MIPMAP_MODES$1 = /* @__PURE__ */ ((MIPMAP_MODES2) => {
37
- MIPMAP_MODES2[MIPMAP_MODES2["OFF"] = 0] = "OFF";
38
- MIPMAP_MODES2[MIPMAP_MODES2["POW2"] = 1] = "POW2";
39
- MIPMAP_MODES2[MIPMAP_MODES2["ON"] = 2] = "ON";
40
- MIPMAP_MODES2[MIPMAP_MODES2["ON_MANUAL"] = 3] = "ON_MANUAL";
41
- return MIPMAP_MODES2;
42
- })(MIPMAP_MODES$1 || {});
43
- var GC_MODES$1 = /* @__PURE__ */ ((GC_MODES2) => {
44
- GC_MODES2[GC_MODES2["AUTO"] = 0] = "AUTO";
45
- GC_MODES2[GC_MODES2["MANUAL"] = 1] = "MANUAL";
46
- return GC_MODES2;
47
- })(GC_MODES$1 || {});
48
- var PRECISION$1 = /* @__PURE__ */ ((PRECISION2) => {
49
- PRECISION2["LOW"] = "lowp";
50
- PRECISION2["MEDIUM"] = "mediump";
51
- PRECISION2["HIGH"] = "highp";
52
- return PRECISION2;
53
- })(PRECISION$1 || {});
54
- var MSAA_QUALITY$1 = /* @__PURE__ */ ((MSAA_QUALITY2) => {
55
- MSAA_QUALITY2[MSAA_QUALITY2["NONE"] = 0] = "NONE";
56
- MSAA_QUALITY2[MSAA_QUALITY2["LOW"] = 2] = "LOW";
57
- MSAA_QUALITY2[MSAA_QUALITY2["MEDIUM"] = 4] = "MEDIUM";
58
- MSAA_QUALITY2[MSAA_QUALITY2["HIGH"] = 8] = "HIGH";
59
- return MSAA_QUALITY2;
60
- })(MSAA_QUALITY$1 || {});
61
-
62
- const BrowserAdapter = {
63
- createCanvas: (width, height) => {
64
- const canvas = document.createElement("canvas");
65
- canvas.width = width;
66
- canvas.height = height;
67
- return canvas;
68
- },
69
- getWebGLRenderingContext: () => WebGLRenderingContext,
70
- getNavigator: () => navigator,
71
- getBaseUrl: () => document.baseURI ?? window.location.href,
72
- fetch: (url, options) => fetch(url, options)
73
- };
74
-
75
- var appleIphone = /iPhone/i;
76
- var appleIpod = /iPod/i;
77
- var appleTablet = /iPad/i;
78
- var appleUniversal = /\biOS-universal(?:.+)Mac\b/i;
79
- var androidPhone = /\bAndroid(?:.+)Mobile\b/i;
80
- var androidTablet = /Android/i;
81
- var amazonPhone = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i;
82
- var amazonTablet = /Silk/i;
83
- var windowsPhone = /Windows Phone/i;
84
- var windowsTablet = /\bWindows(?:.+)ARM\b/i;
85
- var otherBlackBerry = /BlackBerry/i;
86
- var otherBlackBerry10 = /BB10/i;
87
- var otherOpera = /Opera Mini/i;
88
- var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i;
89
- var otherFirefox = /Mobile(?:.+)Firefox\b/i;
90
- var isAppleTabletOnIos13 = function (navigator) {
91
- return (typeof navigator !== 'undefined' &&
92
- navigator.platform === 'MacIntel' &&
93
- typeof navigator.maxTouchPoints === 'number' &&
94
- navigator.maxTouchPoints > 1 &&
95
- typeof MSStream === 'undefined');
96
- };
97
- function createMatch(userAgent) {
98
- return function (regex) { return regex.test(userAgent); };
99
- }
100
- function isMobile$1(param) {
101
- var nav = {
102
- userAgent: '',
103
- platform: '',
104
- maxTouchPoints: 0
105
- };
106
- if (!param && typeof navigator !== 'undefined') {
107
- nav = {
108
- userAgent: navigator.userAgent,
109
- platform: navigator.platform,
110
- maxTouchPoints: navigator.maxTouchPoints || 0
111
- };
112
- }
113
- else if (typeof param === 'string') {
114
- nav.userAgent = param;
115
- }
116
- else if (param && param.userAgent) {
117
- nav = {
118
- userAgent: param.userAgent,
119
- platform: param.platform,
120
- maxTouchPoints: param.maxTouchPoints || 0
121
- };
122
- }
123
- var userAgent = nav.userAgent;
124
- var tmp = userAgent.split('[FBAN');
125
- if (typeof tmp[1] !== 'undefined') {
126
- userAgent = tmp[0];
127
- }
128
- tmp = userAgent.split('Twitter');
129
- if (typeof tmp[1] !== 'undefined') {
130
- userAgent = tmp[0];
131
- }
132
- var match = createMatch(userAgent);
133
- var result = {
134
- apple: {
135
- phone: match(appleIphone) && !match(windowsPhone),
136
- ipod: match(appleIpod),
137
- tablet: !match(appleIphone) &&
138
- (match(appleTablet) || isAppleTabletOnIos13(nav)) &&
139
- !match(windowsPhone),
140
- universal: match(appleUniversal),
141
- device: (match(appleIphone) ||
142
- match(appleIpod) ||
143
- match(appleTablet) ||
144
- match(appleUniversal) ||
145
- isAppleTabletOnIos13(nav)) &&
146
- !match(windowsPhone)
147
- },
148
- amazon: {
149
- phone: match(amazonPhone),
150
- tablet: !match(amazonPhone) && match(amazonTablet),
151
- device: match(amazonPhone) || match(amazonTablet)
152
- },
153
- android: {
154
- phone: (!match(windowsPhone) && match(amazonPhone)) ||
155
- (!match(windowsPhone) && match(androidPhone)),
156
- tablet: !match(windowsPhone) &&
157
- !match(amazonPhone) &&
158
- !match(androidPhone) &&
159
- (match(amazonTablet) || match(androidTablet)),
160
- device: (!match(windowsPhone) &&
161
- (match(amazonPhone) ||
162
- match(amazonTablet) ||
163
- match(androidPhone) ||
164
- match(androidTablet))) ||
165
- match(/\bokhttp\b/i)
166
- },
167
- windows: {
168
- phone: match(windowsPhone),
169
- tablet: match(windowsTablet),
170
- device: match(windowsPhone) || match(windowsTablet)
171
- },
172
- other: {
173
- blackberry: match(otherBlackBerry),
174
- blackberry10: match(otherBlackBerry10),
175
- opera: match(otherOpera),
176
- firefox: match(otherFirefox),
177
- chrome: match(otherChrome),
178
- device: match(otherBlackBerry) ||
179
- match(otherBlackBerry10) ||
180
- match(otherOpera) ||
181
- match(otherFirefox) ||
182
- match(otherChrome)
183
- },
184
- any: false,
185
- phone: false,
186
- tablet: false
187
- };
188
- result.any =
189
- result.apple.device ||
190
- result.android.device ||
191
- result.windows.device ||
192
- result.other.device;
193
- result.phone =
194
- result.apple.phone || result.android.phone || result.windows.phone;
195
- result.tablet =
196
- result.apple.tablet || result.android.tablet || result.windows.tablet;
197
- return result;
198
- }
199
-
200
- const isMobile = isMobile$1(globalThis.navigator);
201
-
202
- function canUploadSameBuffer() {
203
- return !isMobile.apple.device;
204
- }
205
-
206
- function maxRecommendedTextures(max) {
207
- let allowMax = true;
208
- if (isMobile.tablet || isMobile.phone) {
209
- if (isMobile.apple.device) {
210
- const match = navigator.userAgent.match(/OS (\d+)_(\d+)?/);
211
- if (match) {
212
- const majorVersion = parseInt(match[1], 10);
213
- if (majorVersion < 11) {
214
- allowMax = false;
215
- }
216
- }
217
- }
218
- if (isMobile.android.device) {
219
- const match = navigator.userAgent.match(/Android\s([0-9.]*)/);
220
- if (match) {
221
- const majorVersion = parseInt(match[1], 10);
222
- if (majorVersion < 7) {
223
- allowMax = false;
224
- }
225
- }
226
- }
227
- }
228
- return allowMax ? max : 4;
229
- }
230
-
231
- const settings = {
232
- ADAPTER: BrowserAdapter,
233
- MIPMAP_TEXTURES: MIPMAP_MODES$1.POW2,
234
- ANISOTROPIC_LEVEL: 0,
235
- RESOLUTION: 1,
236
- FILTER_RESOLUTION: 1,
237
- FILTER_MULTISAMPLE: MSAA_QUALITY$1.NONE,
238
- SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),
239
- SPRITE_BATCH_SIZE: 4096,
240
- RENDER_OPTIONS: {
241
- view: null,
242
- antialias: false,
243
- autoDensity: false,
244
- backgroundColor: 0,
245
- backgroundAlpha: 1,
246
- useContextAlpha: true,
247
- clearBeforeRender: true,
248
- preserveDrawingBuffer: false,
249
- width: 800,
250
- height: 600,
251
- legacy: false
252
- },
253
- GC_MODE: GC_MODES$1.AUTO,
254
- GC_MAX_IDLE: 60 * 60,
255
- GC_MAX_CHECK_COUNT: 60 * 10,
256
- WRAP_MODE: WRAP_MODES$1.CLAMP,
257
- SCALE_MODE: SCALE_MODES$1.LINEAR,
258
- PRECISION_VERTEX: PRECISION$1.HIGH,
259
- PRECISION_FRAGMENT: isMobile.apple.device ? PRECISION$1.HIGH : PRECISION$1.MEDIUM,
260
- CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),
261
- CREATE_IMAGE_BITMAP: false,
262
- ROUND_PIXELS: false
263
- };
264
-
265
- /*!
266
- * @pixi/constants - v7.0.0-alpha.3
267
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
12
+ * @pixi/constants - v7.0.0-beta.3
13
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
268
14
  *
269
15
  * @pixi/constants is licensed under the MIT License.
270
16
  * http://www.opensource.org/licenses/mit-license
@@ -462,8 +208,221 @@ var PIXI = (function (exports) {
462
208
  })(BUFFER_TYPE || {});
463
209
 
464
210
  /*!
465
- * @pixi/extensions - v7.0.0-alpha.3
466
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
211
+ * @pixi/settings - v7.0.0-beta.3
212
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
213
+ *
214
+ * @pixi/settings is licensed under the MIT License.
215
+ * http://www.opensource.org/licenses/mit-license
216
+ */
217
+
218
+ const BrowserAdapter = {
219
+ createCanvas: (width, height) => {
220
+ const canvas = document.createElement("canvas");
221
+ canvas.width = width;
222
+ canvas.height = height;
223
+ return canvas;
224
+ },
225
+ getWebGLRenderingContext: () => WebGLRenderingContext,
226
+ getNavigator: () => navigator,
227
+ getBaseUrl: () => document.baseURI ?? window.location.href,
228
+ getFontFaceSet: () => document.fonts,
229
+ fetch: (url, options) => fetch(url, options)
230
+ };
231
+
232
+ var appleIphone = /iPhone/i;
233
+ var appleIpod = /iPod/i;
234
+ var appleTablet = /iPad/i;
235
+ var appleUniversal = /\biOS-universal(?:.+)Mac\b/i;
236
+ var androidPhone = /\bAndroid(?:.+)Mobile\b/i;
237
+ var androidTablet = /Android/i;
238
+ var amazonPhone = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i;
239
+ var amazonTablet = /Silk/i;
240
+ var windowsPhone = /Windows Phone/i;
241
+ var windowsTablet = /\bWindows(?:.+)ARM\b/i;
242
+ var otherBlackBerry = /BlackBerry/i;
243
+ var otherBlackBerry10 = /BB10/i;
244
+ var otherOpera = /Opera Mini/i;
245
+ var otherChrome = /\b(CriOS|Chrome)(?:.+)Mobile/i;
246
+ var otherFirefox = /Mobile(?:.+)Firefox\b/i;
247
+ var isAppleTabletOnIos13 = function (navigator) {
248
+ return (typeof navigator !== 'undefined' &&
249
+ navigator.platform === 'MacIntel' &&
250
+ typeof navigator.maxTouchPoints === 'number' &&
251
+ navigator.maxTouchPoints > 1 &&
252
+ typeof MSStream === 'undefined');
253
+ };
254
+ function createMatch(userAgent) {
255
+ return function (regex) { return regex.test(userAgent); };
256
+ }
257
+ function isMobile$1(param) {
258
+ var nav = {
259
+ userAgent: '',
260
+ platform: '',
261
+ maxTouchPoints: 0
262
+ };
263
+ if (!param && typeof navigator !== 'undefined') {
264
+ nav = {
265
+ userAgent: navigator.userAgent,
266
+ platform: navigator.platform,
267
+ maxTouchPoints: navigator.maxTouchPoints || 0
268
+ };
269
+ }
270
+ else if (typeof param === 'string') {
271
+ nav.userAgent = param;
272
+ }
273
+ else if (param && param.userAgent) {
274
+ nav = {
275
+ userAgent: param.userAgent,
276
+ platform: param.platform,
277
+ maxTouchPoints: param.maxTouchPoints || 0
278
+ };
279
+ }
280
+ var userAgent = nav.userAgent;
281
+ var tmp = userAgent.split('[FBAN');
282
+ if (typeof tmp[1] !== 'undefined') {
283
+ userAgent = tmp[0];
284
+ }
285
+ tmp = userAgent.split('Twitter');
286
+ if (typeof tmp[1] !== 'undefined') {
287
+ userAgent = tmp[0];
288
+ }
289
+ var match = createMatch(userAgent);
290
+ var result = {
291
+ apple: {
292
+ phone: match(appleIphone) && !match(windowsPhone),
293
+ ipod: match(appleIpod),
294
+ tablet: !match(appleIphone) &&
295
+ (match(appleTablet) || isAppleTabletOnIos13(nav)) &&
296
+ !match(windowsPhone),
297
+ universal: match(appleUniversal),
298
+ device: (match(appleIphone) ||
299
+ match(appleIpod) ||
300
+ match(appleTablet) ||
301
+ match(appleUniversal) ||
302
+ isAppleTabletOnIos13(nav)) &&
303
+ !match(windowsPhone)
304
+ },
305
+ amazon: {
306
+ phone: match(amazonPhone),
307
+ tablet: !match(amazonPhone) && match(amazonTablet),
308
+ device: match(amazonPhone) || match(amazonTablet)
309
+ },
310
+ android: {
311
+ phone: (!match(windowsPhone) && match(amazonPhone)) ||
312
+ (!match(windowsPhone) && match(androidPhone)),
313
+ tablet: !match(windowsPhone) &&
314
+ !match(amazonPhone) &&
315
+ !match(androidPhone) &&
316
+ (match(amazonTablet) || match(androidTablet)),
317
+ device: (!match(windowsPhone) &&
318
+ (match(amazonPhone) ||
319
+ match(amazonTablet) ||
320
+ match(androidPhone) ||
321
+ match(androidTablet))) ||
322
+ match(/\bokhttp\b/i)
323
+ },
324
+ windows: {
325
+ phone: match(windowsPhone),
326
+ tablet: match(windowsTablet),
327
+ device: match(windowsPhone) || match(windowsTablet)
328
+ },
329
+ other: {
330
+ blackberry: match(otherBlackBerry),
331
+ blackberry10: match(otherBlackBerry10),
332
+ opera: match(otherOpera),
333
+ firefox: match(otherFirefox),
334
+ chrome: match(otherChrome),
335
+ device: match(otherBlackBerry) ||
336
+ match(otherBlackBerry10) ||
337
+ match(otherOpera) ||
338
+ match(otherFirefox) ||
339
+ match(otherChrome)
340
+ },
341
+ any: false,
342
+ phone: false,
343
+ tablet: false
344
+ };
345
+ result.any =
346
+ result.apple.device ||
347
+ result.android.device ||
348
+ result.windows.device ||
349
+ result.other.device;
350
+ result.phone =
351
+ result.apple.phone || result.android.phone || result.windows.phone;
352
+ result.tablet =
353
+ result.apple.tablet || result.android.tablet || result.windows.tablet;
354
+ return result;
355
+ }
356
+
357
+ const isMobile = isMobile$1(globalThis.navigator);
358
+
359
+ function canUploadSameBuffer() {
360
+ return !isMobile.apple.device;
361
+ }
362
+
363
+ function maxRecommendedTextures(max) {
364
+ let allowMax = true;
365
+ if (isMobile.tablet || isMobile.phone) {
366
+ if (isMobile.apple.device) {
367
+ const match = navigator.userAgent.match(/OS (\d+)_(\d+)?/);
368
+ if (match) {
369
+ const majorVersion = parseInt(match[1], 10);
370
+ if (majorVersion < 11) {
371
+ allowMax = false;
372
+ }
373
+ }
374
+ }
375
+ if (isMobile.android.device) {
376
+ const match = navigator.userAgent.match(/Android\s([0-9.]*)/);
377
+ if (match) {
378
+ const majorVersion = parseInt(match[1], 10);
379
+ if (majorVersion < 7) {
380
+ allowMax = false;
381
+ }
382
+ }
383
+ }
384
+ }
385
+ return allowMax ? max : 4;
386
+ }
387
+
388
+ const settings = {
389
+ ADAPTER: BrowserAdapter,
390
+ MIPMAP_TEXTURES: MIPMAP_MODES.POW2,
391
+ ANISOTROPIC_LEVEL: 0,
392
+ RESOLUTION: 1,
393
+ FILTER_RESOLUTION: 1,
394
+ FILTER_MULTISAMPLE: MSAA_QUALITY.NONE,
395
+ SPRITE_MAX_TEXTURES: maxRecommendedTextures(32),
396
+ SPRITE_BATCH_SIZE: 4096,
397
+ RENDER_OPTIONS: {
398
+ view: null,
399
+ antialias: false,
400
+ autoDensity: false,
401
+ backgroundColor: 0,
402
+ backgroundAlpha: 1,
403
+ useContextAlpha: true,
404
+ clearBeforeRender: true,
405
+ preserveDrawingBuffer: false,
406
+ width: 800,
407
+ height: 600,
408
+ legacy: false,
409
+ hello: false
410
+ },
411
+ GC_MODE: GC_MODES.AUTO,
412
+ GC_MAX_IDLE: 60 * 60,
413
+ GC_MAX_CHECK_COUNT: 60 * 10,
414
+ WRAP_MODE: WRAP_MODES.CLAMP,
415
+ SCALE_MODE: SCALE_MODES.LINEAR,
416
+ PRECISION_VERTEX: PRECISION.HIGH,
417
+ PRECISION_FRAGMENT: isMobile.apple.device ? PRECISION.HIGH : PRECISION.MEDIUM,
418
+ CAN_UPLOAD_SAME_BUFFER: canUploadSameBuffer(),
419
+ CREATE_IMAGE_BITMAP: false,
420
+ ROUND_PIXELS: false
421
+ };
422
+
423
+ /*!
424
+ * @pixi/extensions - v7.0.0-beta.3
425
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
467
426
  *
468
427
  * @pixi/extensions is licensed under the MIT License.
469
428
  * http://www.opensource.org/licenses/mit-license
@@ -561,8 +520,8 @@ var PIXI = (function (exports) {
561
520
  };
562
521
 
563
522
  /*!
564
- * @pixi/math - v7.0.0-alpha.3
565
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
523
+ * @pixi/math - v7.0.0-beta.3
524
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
566
525
  *
567
526
  * @pixi/math is licensed under the MIT License.
568
527
  * http://www.opensource.org/licenses/mit-license
@@ -1360,8 +1319,8 @@ var PIXI = (function (exports) {
1360
1319
  Transform.IDENTITY = new _Transform();
1361
1320
 
1362
1321
  /*!
1363
- * @pixi/runner - v7.0.0-alpha.3
1364
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
1322
+ * @pixi/runner - v7.0.0-beta.3
1323
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
1365
1324
  *
1366
1325
  * @pixi/runner is licensed under the MIT License.
1367
1326
  * http://www.opensource.org/licenses/mit-license
@@ -1434,8 +1393,8 @@ var PIXI = (function (exports) {
1434
1393
  });
1435
1394
 
1436
1395
  /*!
1437
- * @pixi/ticker - v7.0.0-alpha.3
1438
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
1396
+ * @pixi/ticker - v7.0.0-beta.3
1397
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
1439
1398
  *
1440
1399
  * @pixi/ticker is licensed under the MIT License.
1441
1400
  * http://www.opensource.org/licenses/mit-license
@@ -4251,8 +4210,8 @@ var PIXI = (function (exports) {
4251
4210
  };
4252
4211
 
4253
4212
  /*!
4254
- * @pixi/utils - v7.0.0-alpha.3
4255
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
4213
+ * @pixi/utils - v7.0.0-beta.3
4214
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
4256
4215
  *
4257
4216
  * @pixi/utils is licensed under the MIT License.
4258
4217
  * http://www.opensource.org/licenses/mit-license
@@ -4649,36 +4608,36 @@ var PIXI = (function (exports) {
4649
4608
  settings.RETINA_PREFIX = /@([0-9\.]+)x/;
4650
4609
  settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT = false;
4651
4610
 
4652
- let saidHello = false;
4653
- const VERSION$1 = "7.0.0-alpha.3";
4654
- function skipHello() {
4655
- saidHello = true;
4656
- }
4657
- function sayHello(type) {
4658
- if (saidHello) {
4611
+ const warnings = {};
4612
+ function deprecation(version, message, ignoreDepth = 3) {
4613
+ if (warnings[message]) {
4659
4614
  return;
4660
4615
  }
4661
- if (settings.ADAPTER.getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
4662
- const args = [
4663
- `
4664
- %c %c %c PixiJS ${VERSION$1} - \u2730 ${type} \u2730 %c %c http://www.pixijs.com/ %c %c \u2665%c\u2665%c\u2665
4665
-
4666
- `,
4667
- "background: #ff66a5; padding:5px 0;",
4668
- "background: #ff66a5; padding:5px 0;",
4669
- "color: #ff66a5; background: #030307; padding:5px 0;",
4670
- "background: #ff66a5; padding:5px 0;",
4671
- "background: #ffc3dc; padding:5px 0;",
4672
- "background: #ff66a5; padding:5px 0;",
4673
- "color: #ff2424; background: #fff; padding:5px 0;",
4674
- "color: #ff2424; background: #fff; padding:5px 0;",
4675
- "color: #ff2424; background: #fff; padding:5px 0;"
4676
- ];
4677
- globalThis.console.log(...args);
4678
- } else if (globalThis.console) {
4679
- globalThis.console.log(`PixiJS ${VERSION$1} - ${type} - http://www.pixijs.com/`);
4616
+ let stack = new Error().stack;
4617
+ if (typeof stack === "undefined") {
4618
+ console.warn("PixiJS Deprecation Warning: ", `${message}
4619
+ Deprecated since v${version}`);
4620
+ } else {
4621
+ stack = stack.split("\n").splice(ignoreDepth).join("\n");
4622
+ if (console.groupCollapsed) {
4623
+ console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", `${message}
4624
+ Deprecated since v${version}`);
4625
+ console.warn(stack);
4626
+ console.groupEnd();
4627
+ } else {
4628
+ console.warn("PixiJS Deprecation Warning: ", `${message}
4629
+ Deprecated since v${version}`);
4630
+ console.warn(stack);
4631
+ }
4680
4632
  }
4681
- saidHello = true;
4633
+ warnings[message] = true;
4634
+ }
4635
+
4636
+ function skipHello() {
4637
+ deprecation("7.0.0", "skipHello is deprecated, please use PIXI.settings.RENDER_OPTIONS.hello");
4638
+ }
4639
+ function sayHello() {
4640
+ deprecation("7.0.0", `sayHello is deprecated, please use Renderer's "hello" option`);
4682
4641
  }
4683
4642
 
4684
4643
  let supported;
@@ -5028,6 +4987,10 @@ var PIXI = (function (exports) {
5028
4987
  if (string[0] === "#") {
5029
4988
  string = string.slice(1);
5030
4989
  }
4990
+ if (string.length === 3) {
4991
+ const [r, g, b] = string;
4992
+ string = r + r + g + g + b + b;
4993
+ }
5031
4994
  }
5032
4995
  return parseInt(string, 16);
5033
4996
  }
@@ -5220,31 +5183,6 @@ var PIXI = (function (exports) {
5220
5183
  return ++nextUid;
5221
5184
  }
5222
5185
 
5223
- const warnings = {};
5224
- function deprecation(version, message, ignoreDepth = 3) {
5225
- if (warnings[message]) {
5226
- return;
5227
- }
5228
- let stack = new Error().stack;
5229
- if (typeof stack === "undefined") {
5230
- console.warn("PixiJS Deprecation Warning: ", `${message}
5231
- Deprecated since v${version}`);
5232
- } else {
5233
- stack = stack.split("\n").splice(ignoreDepth).join("\n");
5234
- if (console.groupCollapsed) {
5235
- console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s", "color:#614108;background:#fffbe6", "font-weight:normal;color:#614108;background:#fffbe6", `${message}
5236
- Deprecated since v${version}`);
5237
- console.warn(stack);
5238
- console.groupEnd();
5239
- } else {
5240
- console.warn("PixiJS Deprecation Warning: ", `${message}
5241
- Deprecated since v${version}`);
5242
- console.warn(stack);
5243
- }
5244
- }
5245
- warnings[message] = true;
5246
- }
5247
-
5248
5186
  const ProgramCache = {};
5249
5187
  const TextureCache = /* @__PURE__ */ Object.create(null);
5250
5188
  const BaseTextureCache = /* @__PURE__ */ Object.create(null);
@@ -5438,8 +5376,8 @@ Deprecated since v${version}`);
5438
5376
  };
5439
5377
 
5440
5378
  /*!
5441
- * @pixi/core - v7.0.0-alpha.3
5442
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
5379
+ * @pixi/core - v7.0.0-beta.3
5380
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
5443
5381
  *
5444
5382
  * @pixi/core is licensed under the MIT License.
5445
5383
  * http://www.opensource.org/licenses/mit-license
@@ -5779,7 +5717,7 @@ Deprecated since v${version}`);
5779
5717
  buffer = buffer || new Float32Array(width * height * 4);
5780
5718
  const resource = new BufferResource(buffer, { width, height });
5781
5719
  const type = buffer instanceof Float32Array ? TYPES.FLOAT : TYPES.UNSIGNED_BYTE;
5782
- return new _BaseTexture(resource, Object.assign(defaultBufferOptions, options || { width, height, type }));
5720
+ return new _BaseTexture(resource, Object.assign({}, defaultBufferOptions, options || { width, height, type }));
5783
5721
  }
5784
5722
  static addToCache(baseTexture, id) {
5785
5723
  if (id) {
@@ -5963,11 +5901,11 @@ Deprecated since v${version}`);
5963
5901
  const width = baseTexture.realWidth;
5964
5902
  const height = baseTexture.realHeight;
5965
5903
  source = source || this.source;
5966
- if (source instanceof HTMLImageElement) {
5904
+ if (typeof HTMLImageElement !== "undefined" && source instanceof HTMLImageElement) {
5967
5905
  if (!source.complete || source.naturalWidth === 0) {
5968
5906
  return false;
5969
5907
  }
5970
- } else if (source instanceof HTMLVideoElement) {
5908
+ } else if (typeof HTMLVideoElement !== "undefined" && source instanceof HTMLVideoElement) {
5971
5909
  if (source.readyState <= 1) {
5972
5910
  return false;
5973
5911
  }
@@ -6082,7 +6020,7 @@ Deprecated since v${version}`);
6082
6020
  class ImageResource extends BaseImageResource {
6083
6021
  constructor(source, options) {
6084
6022
  options = options || {};
6085
- if (!(source instanceof HTMLImageElement)) {
6023
+ if (typeof source === "string") {
6086
6024
  const imageElement = new Image();
6087
6025
  BaseImageResource.crossOrigin(imageElement, source, options.crossorigin);
6088
6026
  imageElement.src = source;
@@ -6153,7 +6091,7 @@ Deprecated since v${version}`);
6153
6091
  this._process = fetch(source.src, {
6154
6092
  mode: cors ? "cors" : "no-cors"
6155
6093
  }).then((r) => r.blob()).then((blob) => createImageBitmap(blob, 0, 0, source.width, source.height, {
6156
- premultiplyAlpha: this.alphaMode === ALPHA_MODES.UNPACK ? "premultiply" : "none"
6094
+ premultiplyAlpha: this.alphaMode === null || this.alphaMode === ALPHA_MODES.UNPACK ? "premultiply" : "none"
6157
6095
  })).then((bitmap) => {
6158
6096
  if (this.destroyed) {
6159
6097
  return Promise.reject();
@@ -6210,7 +6148,7 @@ Deprecated since v${version}`);
6210
6148
  this._load = null;
6211
6149
  }
6212
6150
  static test(source) {
6213
- return typeof source === "string" || source instanceof HTMLImageElement;
6151
+ return typeof HTMLImageElement !== "undefined" && (typeof source === "string" || source instanceof HTMLImageElement);
6214
6152
  }
6215
6153
  }
6216
6154
 
@@ -6480,15 +6418,87 @@ Deprecated since v${version}`);
6480
6418
  };
6481
6419
 
6482
6420
  class ImageBitmapResource extends BaseImageResource {
6483
- constructor(source) {
6484
- super(source);
6421
+ constructor(source, options) {
6422
+ var __super = (...args) => {
6423
+ super(...args);
6424
+ };
6425
+ options = options || {};
6426
+ if (typeof source === "string") {
6427
+ __super(ImageBitmapResource.EMPTY);
6428
+ this.url = source;
6429
+ } else {
6430
+ __super(source);
6431
+ this.url = null;
6432
+ }
6433
+ this.crossOrigin = options.crossOrigin ?? true;
6434
+ this.alphaMode = typeof options.alphaMode === "number" ? options.alphaMode : null;
6435
+ this._load = null;
6436
+ if (options.autoLoad !== false) {
6437
+ this.load();
6438
+ }
6439
+ }
6440
+ load() {
6441
+ if (this._load) {
6442
+ return this._load;
6443
+ }
6444
+ this._load = new Promise(async (resolve, reject) => {
6445
+ if (this.url === null) {
6446
+ resolve(this);
6447
+ return;
6448
+ }
6449
+ try {
6450
+ const response = await settings.ADAPTER.fetch(this.url, {
6451
+ mode: this.crossOrigin ? "cors" : "no-cors"
6452
+ });
6453
+ if (this.destroyed)
6454
+ return;
6455
+ const imageBlob = await response.blob();
6456
+ if (this.destroyed)
6457
+ return;
6458
+ const imageBitmap = await createImageBitmap(imageBlob, {
6459
+ premultiplyAlpha: this.alphaMode === null || this.alphaMode === ALPHA_MODES.UNPACK ? "premultiply" : "none"
6460
+ });
6461
+ if (this.destroyed)
6462
+ return;
6463
+ this.source = imageBitmap;
6464
+ this.update();
6465
+ resolve(this);
6466
+ } catch (e) {
6467
+ if (this.destroyed)
6468
+ return;
6469
+ reject(e);
6470
+ this.onError.emit(e);
6471
+ }
6472
+ });
6473
+ return this._load;
6474
+ }
6475
+ upload(renderer, baseTexture, glTexture) {
6476
+ if (!(this.source instanceof ImageBitmap)) {
6477
+ this.load();
6478
+ return false;
6479
+ }
6480
+ if (typeof this.alphaMode === "number") {
6481
+ baseTexture.alphaMode = this.alphaMode;
6482
+ }
6483
+ return super.upload(renderer, baseTexture, glTexture);
6484
+ }
6485
+ dispose() {
6486
+ if (this.source instanceof ImageBitmap) {
6487
+ this.source.close();
6488
+ }
6489
+ super.dispose();
6490
+ this._load = null;
6485
6491
  }
6486
6492
  static test(source) {
6487
- return !!globalThis.createImageBitmap && typeof ImageBitmap !== "undefined" && source instanceof ImageBitmap;
6493
+ return !!globalThis.createImageBitmap && typeof ImageBitmap !== "undefined" && (typeof source === "string" || source instanceof ImageBitmap);
6494
+ }
6495
+ static get EMPTY() {
6496
+ ImageBitmapResource._EMPTY = ImageBitmapResource._EMPTY ?? settings.ADAPTER.createCanvas(0, 0);
6497
+ return ImageBitmapResource._EMPTY;
6488
6498
  }
6489
6499
  }
6490
6500
 
6491
- INSTALLED.push(ImageResource, ImageBitmapResource, CanvasResource, VideoResource, SVGResource, BufferResource, CubeResource, ArrayResource);
6501
+ INSTALLED.push(ImageBitmapResource, ImageResource, CanvasResource, VideoResource, SVGResource, BufferResource, CubeResource, ArrayResource);
6492
6502
 
6493
6503
  class DepthResource extends BufferResource {
6494
6504
  upload(renderer, baseTexture, glTexture) {
@@ -7925,8 +7935,11 @@ Deprecated since v${version}`);
7925
7935
  this.renderer.gl = gl;
7926
7936
  this.renderer.CONTEXT_UID = CONTEXT_UID_COUNTER++;
7927
7937
  this.renderer.runners.contextChange.emit(gl);
7928
- this.renderer.view.addEventListener("webglcontextlost", this.handleContextLost, false);
7929
- this.renderer.view.addEventListener("webglcontextrestored", this.handleContextRestored, false);
7938
+ const view = this.renderer.view;
7939
+ if (view.addEventListener !== void 0) {
7940
+ view.addEventListener("webglcontextlost", this.handleContextLost, false);
7941
+ view.addEventListener("webglcontextrestored", this.handleContextRestored, false);
7942
+ }
7930
7943
  }
7931
7944
  initFromOptions(options) {
7932
7945
  const gl = this.createContext(this.renderer.view, options);
@@ -7990,8 +8003,10 @@ Deprecated since v${version}`);
7990
8003
  destroy() {
7991
8004
  const view = this.renderer.view;
7992
8005
  this.renderer = null;
7993
- view.removeEventListener("webglcontextlost", this.handleContextLost);
7994
- view.removeEventListener("webglcontextrestored", this.handleContextRestored);
8006
+ if (view.removeEventListener !== void 0) {
8007
+ view.removeEventListener("webglcontextlost", this.handleContextLost);
8008
+ view.removeEventListener("webglcontextrestored", this.handleContextRestored);
8009
+ }
7995
8010
  this.gl.useProgram(null);
7996
8011
  if (this.extensions.loseContext) {
7997
8012
  this.extensions.loseContext.loseContext();
@@ -8542,9 +8557,10 @@ Deprecated since v${version}`);
8542
8557
  }
8543
8558
  }
8544
8559
  this.activateVao(geometry, program);
8545
- this._activeVao = vao;
8546
8560
  vaoObjectHash[program.id] = vao;
8547
8561
  vaoObjectHash[signature] = vao;
8562
+ gl.bindVertexArray(null);
8563
+ bufferSystem.unbind(BUFFER_TYPE.ARRAY_BUFFER);
8548
8564
  return vao;
8549
8565
  }
8550
8566
  disposeGeometry(geometry, contextLost) {
@@ -9372,12 +9388,14 @@ ${src}`;
9372
9388
  let UID$1 = 0;
9373
9389
  const nameCache = {};
9374
9390
  class Program {
9375
- constructor(vertexSrc, fragmentSrc, name = "pixi-shader") {
9391
+ constructor(vertexSrc, fragmentSrc, name = "pixi-shader", extra = {}) {
9392
+ this.extra = {};
9376
9393
  this.id = UID$1++;
9377
9394
  this.vertexSrc = vertexSrc || Program.defaultVertexSrc;
9378
9395
  this.fragmentSrc = fragmentSrc || Program.defaultFragmentSrc;
9379
9396
  this.vertexSrc = this.vertexSrc.trim();
9380
9397
  this.fragmentSrc = this.fragmentSrc.trim();
9398
+ this.extra = extra;
9381
9399
  if (this.vertexSrc.substring(0, 8) !== "#version") {
9382
9400
  name = name.replace(/\s+/g, "-");
9383
9401
  if (nameCache[name]) {
@@ -10463,6 +10481,14 @@ ${this.fragmentSrc}`;
10463
10481
  const webGLProgram = gl.createProgram();
10464
10482
  gl.attachShader(webGLProgram, glVertShader);
10465
10483
  gl.attachShader(webGLProgram, glFragShader);
10484
+ const transformFeedbackVaryings = program.extra?.transformFeedbackVaryings;
10485
+ if (transformFeedbackVaryings) {
10486
+ if (typeof gl.transformFeedbackVaryings !== "function") {
10487
+ console.warn(`TransformFeedback is not supported but TransformFeedbackVaryings are given.`);
10488
+ } else {
10489
+ gl.transformFeedbackVaryings(webGLProgram, transformFeedbackVaryings.names, transformFeedbackVaryings.bufferMode === "separate" ? gl.SEPARATE_ATTRIBS : gl.INTERLEAVED_ATTRIBS);
10490
+ }
10491
+ }
10466
10492
  gl.linkProgram(webGLProgram);
10467
10493
  if (!gl.getProgramParameter(webGLProgram, gl.LINK_STATUS)) {
10468
10494
  logProgramError(gl, webGLProgram, glVertShader, glFragShader);
@@ -11258,7 +11284,9 @@ ${this.fragmentSrc}`;
11258
11284
  }
11259
11285
  init(options) {
11260
11286
  this.clearBeforeRender = options.clearBeforeRender;
11261
- this.color = options.color || this._backgroundColor;
11287
+ if (options.color) {
11288
+ this.color = typeof options.color === "string" ? string2hex(options.color) : options.color;
11289
+ }
11262
11290
  this.alpha = options.alpha;
11263
11291
  }
11264
11292
  get color() {
@@ -11318,8 +11346,8 @@ ${this.fragmentSrc}`;
11318
11346
  this.renderer.runners.resize.emit(this.screen.width, this.screen.height);
11319
11347
  }
11320
11348
  destroy(removeView) {
11321
- if (removeView && this.element.parentNode) {
11322
- this.element.parentNode.removeChild(this.element);
11349
+ if (removeView) {
11350
+ this.element.parentNode?.removeChild(this.element);
11323
11351
  }
11324
11352
  this.renderer = null;
11325
11353
  this.element = null;
@@ -11440,7 +11468,9 @@ ${this.fragmentSrc}`;
11440
11468
  run(options) {
11441
11469
  const renderer = this.renderer;
11442
11470
  renderer.emitWithCustomOptions(renderer.runners.init, options);
11443
- sayHello(renderer.rendererLogId);
11471
+ if (options.hello) {
11472
+ console.log(`PixiJS ${"7.0.0-beta.3"} - ${renderer.rendererLogId} - https://pixijs.com`);
11473
+ }
11444
11474
  renderer.resize(this.renderer.screen.width, this.renderer.screen.height);
11445
11475
  }
11446
11476
  destroy() {
@@ -11455,6 +11485,88 @@ ${this.fragmentSrc}`;
11455
11485
  };
11456
11486
  extensions$1.add(StartupSystem);
11457
11487
 
11488
+ class TransformFeedbackSystem {
11489
+ constructor(renderer) {
11490
+ this.renderer = renderer;
11491
+ }
11492
+ contextChange() {
11493
+ this.gl = this.renderer.gl;
11494
+ this.CONTEXT_UID = this.renderer.CONTEXT_UID;
11495
+ }
11496
+ bind(transformFeedback) {
11497
+ const { gl, CONTEXT_UID } = this;
11498
+ const glTransformFeedback = transformFeedback._glTransformFeedbacks[CONTEXT_UID] || this.createGLTransformFeedback(transformFeedback);
11499
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, glTransformFeedback);
11500
+ }
11501
+ unbind() {
11502
+ const { gl } = this;
11503
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null);
11504
+ }
11505
+ beginTransformFeedback(drawMode, shader) {
11506
+ const { gl, renderer } = this;
11507
+ if (shader) {
11508
+ renderer.shader.bind(shader);
11509
+ }
11510
+ gl.beginTransformFeedback(drawMode);
11511
+ }
11512
+ endTransformFeedback() {
11513
+ const { gl } = this;
11514
+ gl.endTransformFeedback();
11515
+ }
11516
+ createGLTransformFeedback(tf) {
11517
+ const { gl, renderer, CONTEXT_UID } = this;
11518
+ const glTransformFeedback = gl.createTransformFeedback();
11519
+ tf._glTransformFeedbacks[CONTEXT_UID] = glTransformFeedback;
11520
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, glTransformFeedback);
11521
+ for (let i = 0; i < tf.buffers.length; i++) {
11522
+ const buffer = tf.buffers[i];
11523
+ if (!buffer)
11524
+ continue;
11525
+ renderer.buffer.update(buffer);
11526
+ buffer._glBuffers[CONTEXT_UID].refCount++;
11527
+ gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, i, buffer._glBuffers[CONTEXT_UID].buffer || null);
11528
+ }
11529
+ gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null);
11530
+ tf.disposeRunner.add(this);
11531
+ return glTransformFeedback;
11532
+ }
11533
+ disposeTransformFeedback(tf, contextLost) {
11534
+ const glTF = tf._glTransformFeedbacks[this.CONTEXT_UID];
11535
+ const gl = this.gl;
11536
+ tf.disposeRunner.remove(this);
11537
+ const bufferSystem = this.renderer.buffer;
11538
+ if (bufferSystem) {
11539
+ for (let i = 0; i < tf.buffers.length; i++) {
11540
+ const buffer = tf.buffers[i];
11541
+ if (!buffer)
11542
+ continue;
11543
+ const buf = buffer._glBuffers[this.CONTEXT_UID];
11544
+ if (buf) {
11545
+ buf.refCount--;
11546
+ if (buf.refCount === 0 && !contextLost) {
11547
+ bufferSystem.dispose(buffer, contextLost);
11548
+ }
11549
+ }
11550
+ }
11551
+ }
11552
+ if (!glTF) {
11553
+ return;
11554
+ }
11555
+ if (!contextLost) {
11556
+ gl.deleteTransformFeedback(glTF);
11557
+ }
11558
+ delete tf._glTransformFeedbacks[this.CONTEXT_UID];
11559
+ }
11560
+ destroy() {
11561
+ this.renderer = null;
11562
+ }
11563
+ }
11564
+ TransformFeedbackSystem.extension = {
11565
+ type: ExtensionType.RendererSystem,
11566
+ name: "transformFeedback"
11567
+ };
11568
+ extensions$1.add(TransformFeedbackSystem);
11569
+
11458
11570
  const renderers = [];
11459
11571
  extensions$1.handleByList(ExtensionType.Renderer, renderers);
11460
11572
  function autoDetectRenderer(options) {
@@ -11497,6 +11609,7 @@ ${this.fragmentSrc}`;
11497
11609
  "buffer",
11498
11610
  "geometry",
11499
11611
  "framebuffer",
11612
+ "transformFeedback",
11500
11613
  "mask",
11501
11614
  "scissor",
11502
11615
  "stencil",
@@ -11511,10 +11624,11 @@ ${this.fragmentSrc}`;
11511
11624
  };
11512
11625
  this.setup(systemConfig);
11513
11626
  const startupOptions = {
11627
+ hello: options.hello,
11514
11628
  _plugin: _Renderer.__plugins,
11515
11629
  background: {
11516
11630
  alpha: options.backgroundAlpha,
11517
- color: options.backgroundColor,
11631
+ color: options.background ?? options.backgroundColor,
11518
11632
  clearBeforeRender: options.clearBeforeRender
11519
11633
  },
11520
11634
  _view: {
@@ -12125,6 +12239,20 @@ ${this.fragmentSrc}`;
12125
12239
  BatchRenderer._textureArrayPool = [];
12126
12240
  extensions$1.add(BatchRenderer);
12127
12241
 
12242
+ class TransformFeedback {
12243
+ constructor() {
12244
+ this._glTransformFeedbacks = {};
12245
+ this.buffers = [];
12246
+ this.disposeRunner = new Runner("disposeTransformFeedback");
12247
+ }
12248
+ bindBuffer(index, buffer) {
12249
+ this.buffers[index] = buffer;
12250
+ }
12251
+ destroy() {
12252
+ this.disposeRunner.emit(this, false);
12253
+ }
12254
+ }
12255
+
12128
12256
  class GLBuffer {
12129
12257
  constructor(buffer) {
12130
12258
  this.buffer = buffer || null;
@@ -12153,6 +12281,10 @@ ${this.fragmentSrc}`;
12153
12281
  const glBuffer = buffer._glBuffers[CONTEXT_UID] || this.createGLBuffer(buffer);
12154
12282
  gl.bindBuffer(buffer.type, glBuffer.buffer);
12155
12283
  }
12284
+ unbind(type) {
12285
+ const { gl } = this;
12286
+ gl.bindBuffer(type, null);
12287
+ }
12156
12288
  bindBufferBase(buffer, index) {
12157
12289
  const { gl, CONTEXT_UID } = this;
12158
12290
  if (this.boundBufferBases[index] !== buffer) {
@@ -12169,7 +12301,7 @@ ${this.fragmentSrc}`;
12169
12301
  }
12170
12302
  update(buffer) {
12171
12303
  const { gl, CONTEXT_UID } = this;
12172
- const glBuffer = buffer._glBuffers[CONTEXT_UID];
12304
+ const glBuffer = buffer._glBuffers[CONTEXT_UID] || this.createGLBuffer(buffer);
12173
12305
  if (buffer._updateID === glBuffer.updateID) {
12174
12306
  return;
12175
12307
  }
@@ -12314,11 +12446,11 @@ ${this.fragmentSrc}`;
12314
12446
  };
12315
12447
  extensions$1.add(ObjectRendererSystem);
12316
12448
 
12317
- const VERSION = "7.0.0-alpha.3";
12449
+ const VERSION = "7.0.0-beta.3";
12318
12450
 
12319
12451
  /*!
12320
- * @pixi/filter-alpha - v7.0.0-alpha.3
12321
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
12452
+ * @pixi/filter-alpha - v7.0.0-beta.3
12453
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
12322
12454
  *
12323
12455
  * @pixi/filter-alpha is licensed under the MIT License.
12324
12456
  * http://www.opensource.org/licenses/mit-license
@@ -12340,8 +12472,8 @@ ${this.fragmentSrc}`;
12340
12472
  }
12341
12473
 
12342
12474
  /*!
12343
- * @pixi/filter-blur - v7.0.0-alpha.3
12344
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
12475
+ * @pixi/filter-blur - v7.0.0-beta.3
12476
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
12345
12477
  *
12346
12478
  * @pixi/filter-blur is licensed under the MIT License.
12347
12479
  * http://www.opensource.org/licenses/mit-license
@@ -12578,8 +12710,8 @@ ${this.fragmentSrc}`;
12578
12710
  }
12579
12711
 
12580
12712
  /*!
12581
- * @pixi/filter-color-matrix - v7.0.0-alpha.3
12582
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
12713
+ * @pixi/filter-color-matrix - v7.0.0-beta.3
12714
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
12583
12715
  *
12584
12716
  * @pixi/filter-color-matrix is licensed under the MIT License.
12585
12717
  * http://www.opensource.org/licenses/mit-license
@@ -13208,8 +13340,8 @@ ${this.fragmentSrc}`;
13208
13340
  ColorMatrixFilter.prototype.grayscale = ColorMatrixFilter.prototype.greyscale;
13209
13341
 
13210
13342
  /*!
13211
- * @pixi/filter-displacement - v7.0.0-alpha.3
13212
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
13343
+ * @pixi/filter-displacement - v7.0.0-beta.3
13344
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
13213
13345
  *
13214
13346
  * @pixi/filter-displacement is licensed under the MIT License.
13215
13347
  * http://www.opensource.org/licenses/mit-license
@@ -13260,8 +13392,8 @@ ${this.fragmentSrc}`;
13260
13392
  }
13261
13393
 
13262
13394
  /*!
13263
- * @pixi/filter-fxaa - v7.0.0-alpha.3
13264
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
13395
+ * @pixi/filter-fxaa - v7.0.0-beta.3
13396
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
13265
13397
  *
13266
13398
  * @pixi/filter-fxaa is licensed under the MIT License.
13267
13399
  * http://www.opensource.org/licenses/mit-license
@@ -13278,8 +13410,8 @@ ${this.fragmentSrc}`;
13278
13410
  }
13279
13411
 
13280
13412
  /*!
13281
- * @pixi/filter-noise - v7.0.0-alpha.3
13282
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
13413
+ * @pixi/filter-noise - v7.0.0-beta.3
13414
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
13283
13415
  *
13284
13416
  * @pixi/filter-noise is licensed under the MIT License.
13285
13417
  * http://www.opensource.org/licenses/mit-license
@@ -13311,8 +13443,8 @@ ${this.fragmentSrc}`;
13311
13443
  }
13312
13444
 
13313
13445
  /*!
13314
- * @pixi/display - v7.0.0-alpha.3
13315
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
13446
+ * @pixi/display - v7.0.0-beta.3
13447
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
13316
13448
  *
13317
13449
  * @pixi/display is licensed under the MIT License.
13318
13450
  * http://www.opensource.org/licenses/mit-license
@@ -13687,6 +13819,9 @@ ${this.fragmentSrc}`;
13687
13819
  container.addChild(this);
13688
13820
  return container;
13689
13821
  }
13822
+ removeFromParent() {
13823
+ this.parent?.removeChild(this);
13824
+ }
13690
13825
  setTransform(x = 0, y = 0, scaleX = 1, scaleY = 1, rotation = 0, skewX = 0, skewY = 0, pivotX = 0, pivotY = 0) {
13691
13826
  this.position.x = x;
13692
13827
  this.position.y = y;
@@ -13700,9 +13835,7 @@ ${this.fragmentSrc}`;
13700
13835
  return this;
13701
13836
  }
13702
13837
  destroy(_options) {
13703
- if (this.parent) {
13704
- this.parent.removeChild(this);
13705
- }
13838
+ this.removeFromParent();
13706
13839
  this._destroyed = true;
13707
13840
  this.transform = null;
13708
13841
  this.parent = null;
@@ -14174,8 +14307,8 @@ ${this.fragmentSrc}`;
14174
14307
  Container.prototype.containerUpdateTransform = Container.prototype.updateTransform;
14175
14308
 
14176
14309
  /*!
14177
- * @pixi/sprite - v7.0.0-alpha.3
14178
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14310
+ * @pixi/sprite - v7.0.0-beta.3
14311
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
14179
14312
  *
14180
14313
  * @pixi/sprite is licensed under the MIT License.
14181
14314
  * http://www.opensource.org/licenses/mit-license
@@ -14433,8 +14566,8 @@ ${this.fragmentSrc}`;
14433
14566
  }
14434
14567
 
14435
14568
  /*!
14436
- * @pixi/mixin-cache-as-bitmap - v7.0.0-alpha.3
14437
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14569
+ * @pixi/mixin-cache-as-bitmap - v7.0.0-beta.3
14570
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
14438
14571
  *
14439
14572
  * @pixi/mixin-cache-as-bitmap is licensed under the MIT License.
14440
14573
  * http://www.opensource.org/licenses/mit-license
@@ -14680,8 +14813,8 @@ ${this.fragmentSrc}`;
14680
14813
  };
14681
14814
 
14682
14815
  /*!
14683
- * @pixi/mixin-get-child-by-name - v7.0.0-alpha.3
14684
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14816
+ * @pixi/mixin-get-child-by-name - v7.0.0-beta.3
14817
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
14685
14818
  *
14686
14819
  * @pixi/mixin-get-child-by-name is licensed under the MIT License.
14687
14820
  * http://www.opensource.org/licenses/mit-license
@@ -14710,8 +14843,8 @@ ${this.fragmentSrc}`;
14710
14843
  };
14711
14844
 
14712
14845
  /*!
14713
- * @pixi/mixin-get-global-position - v7.0.0-alpha.3
14714
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14846
+ * @pixi/mixin-get-global-position - v7.0.0-beta.3
14847
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
14715
14848
  *
14716
14849
  * @pixi/mixin-get-global-position is licensed under the MIT License.
14717
14850
  * http://www.opensource.org/licenses/mit-license
@@ -14728,8 +14861,8 @@ ${this.fragmentSrc}`;
14728
14861
  };
14729
14862
 
14730
14863
  /*!
14731
- * @pixi/events - v7.0.0-alpha.3
14732
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
14864
+ * @pixi/events - v7.0.0-beta.3
14865
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
14733
14866
  *
14734
14867
  * @pixi/events is licensed under the MIT License.
14735
14868
  * http://www.opensource.org/licenses/mit-license
@@ -15559,11 +15692,13 @@ ${this.fragmentSrc}`;
15559
15692
  return;
15560
15693
  }
15561
15694
  const style = this.domElement.style;
15562
- if (globalThis.navigator.msPointerEnabled) {
15563
- style.msContentZooming = "none";
15564
- style.msTouchAction = "none";
15565
- } else if (this.supportsPointerEvents) {
15566
- style.touchAction = "none";
15695
+ if (style) {
15696
+ if (globalThis.navigator.msPointerEnabled) {
15697
+ style.msContentZooming = "none";
15698
+ style.msTouchAction = "none";
15699
+ } else if (this.supportsPointerEvents) {
15700
+ style.touchAction = "none";
15701
+ }
15567
15702
  }
15568
15703
  if (this.supportsPointerEvents) {
15569
15704
  globalThis.document.addEventListener("pointermove", this.onPointerMove, true);
@@ -15767,6 +15902,7 @@ ${this.fragmentSrc}`;
15767
15902
  event.page.x = nativeEvent.pageX;
15768
15903
  event.page.y = nativeEvent.pageY;
15769
15904
  event.relatedTarget = null;
15905
+ event.shiftKey = nativeEvent.shiftKey;
15770
15906
  }
15771
15907
  }
15772
15908
  EventSystem.extension = {
@@ -15810,8 +15946,8 @@ ${this.fragmentSrc}`;
15810
15946
  DisplayObject.mixin(FederatedDisplayObject);
15811
15947
 
15812
15948
  /*!
15813
- * @pixi/accessibility - v7.0.0-alpha.3
15814
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
15949
+ * @pixi/accessibility - v7.0.0-beta.3
15950
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
15815
15951
  *
15816
15952
  * @pixi/accessibility is licensed under the MIT License.
15817
15953
  * http://www.opensource.org/licenses/mit-license
@@ -15947,13 +16083,13 @@ ${this.fragmentSrc}`;
15947
16083
  if (this.renderer.lastObjectRendered) {
15948
16084
  this.updateAccessibleObjects(this.renderer.lastObjectRendered);
15949
16085
  }
15950
- const { left, top, width, height } = this.renderer.view.getBoundingClientRect();
16086
+ const { x, y, width, height } = this.renderer.view.getBoundingClientRect();
15951
16087
  const { width: viewWidth, height: viewHeight, resolution } = this.renderer;
15952
16088
  const sx = width / viewWidth * resolution;
15953
16089
  const sy = height / viewHeight * resolution;
15954
16090
  let div = this.div;
15955
- div.style.left = `${left}px`;
15956
- div.style.top = `${top}px`;
16091
+ div.style.left = `${x}px`;
16092
+ div.style.top = `${y}px`;
15957
16093
  div.style.width = `${viewWidth}px`;
15958
16094
  div.style.height = `${viewHeight}px`;
15959
16095
  for (let i = 0; i < this.children.length; i++) {
@@ -16115,8 +16251,8 @@ ${this.fragmentSrc}`;
16115
16251
  extensions$1.add(AccessibilityManager);
16116
16252
 
16117
16253
  /*!
16118
- * @pixi/app - v7.0.0-alpha.3
16119
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
16254
+ * @pixi/app - v7.0.0-beta.3
16255
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
16120
16256
  *
16121
16257
  * @pixi/app is licensed under the MIT License.
16122
16258
  * http://www.opensource.org/licenses/mit-license
@@ -16220,8 +16356,8 @@ ${this.fragmentSrc}`;
16220
16356
  extensions$1.add(ResizePlugin);
16221
16357
 
16222
16358
  /*!
16223
- * @pixi/assets - v7.0.0-alpha.3
16224
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
16359
+ * @pixi/assets - v7.0.0-beta.3
16360
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
16225
16361
  *
16226
16362
  * @pixi/assets is licensed under the MIT License.
16227
16363
  * http://www.opensource.org/licenses/mit-license
@@ -16963,10 +17099,11 @@ ${e}`);
16963
17099
  return validFonts.includes(extension);
16964
17100
  },
16965
17101
  async load(url, options) {
16966
- if (!window.navigator.onLine) {
17102
+ if (!globalThis.navigator.onLine) {
16967
17103
  throw new Error("[loadWebFont] Cannot load font - navigator is offline");
16968
17104
  }
16969
- if ("FontFace" in window) {
17105
+ const fonts = settings.ADAPTER.getFontFaceSet();
17106
+ if (fonts) {
16970
17107
  const fontFaces = [];
16971
17108
  const name = options.data?.family ?? getFontFamilyName(url);
16972
17109
  const weights = options.data?.weights?.filter((weight) => validWeights.includes(weight)) ?? ["normal"];
@@ -16978,7 +17115,7 @@ ${e}`);
16978
17115
  weight
16979
17116
  });
16980
17117
  await font.load();
16981
- document.fonts.add(font);
17118
+ fonts.add(font);
16982
17119
  fontFaces.push(font);
16983
17120
  }
16984
17121
  return fontFaces.length === 1 ? fontFaces[0] : fontFaces;
@@ -16987,7 +17124,7 @@ ${e}`);
16987
17124
  return null;
16988
17125
  },
16989
17126
  unload(font) {
16990
- (Array.isArray(font) ? font : [font]).forEach((t) => document.fonts.delete(t));
17127
+ (Array.isArray(font) ? font : [font]).forEach((t) => settings.ADAPTER.getFontFaceSet().delete(t));
16991
17128
  }
16992
17129
  };
16993
17130
  extensions$1.add(loadWebFont);
@@ -17137,7 +17274,7 @@ ${e}`);
17137
17274
  },
17138
17275
  async load(url, asset, loader) {
17139
17276
  let src = null;
17140
- if (window.createImageBitmap) {
17277
+ if (globalThis.createImageBitmap) {
17141
17278
  src = this.config.preferWorkers ? await WorkerManager.loadImageBitmap(url) : await loadImageBitmap(url);
17142
17279
  } else {
17143
17280
  src = await new Promise((resolve) => {
@@ -17255,8 +17392,8 @@ ${e}`);
17255
17392
  extensions$1.add(detectDefaults);
17256
17393
 
17257
17394
  /*!
17258
- * @pixi/compressed-textures - v7.0.0-alpha.3
17259
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
17395
+ * @pixi/compressed-textures - v7.0.0-beta.3
17396
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
17260
17397
  *
17261
17398
  * @pixi/compressed-textures is licensed under the MIT License.
17262
17399
  * http://www.opensource.org/licenses/mit-license
@@ -17289,6 +17426,7 @@ ${e}`);
17289
17426
  INTERNAL_FORMATS2[INTERNAL_FORMATS2["COMPRESSED_RGB_ATC_WEBGL"] = 35986] = "COMPRESSED_RGB_ATC_WEBGL";
17290
17427
  INTERNAL_FORMATS2[INTERNAL_FORMATS2["COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL"] = 35986] = "COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL";
17291
17428
  INTERNAL_FORMATS2[INTERNAL_FORMATS2["COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"] = 34798] = "COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL";
17429
+ INTERNAL_FORMATS2[INTERNAL_FORMATS2["COMPRESSED_RGBA_ASTC_4x4_KHR"] = 37808] = "COMPRESSED_RGBA_ASTC_4x4_KHR";
17292
17430
  return INTERNAL_FORMATS2;
17293
17431
  })(INTERNAL_FORMATS || {});
17294
17432
  const INTERNAL_FORMAT_TO_BYTES_PER_PIXEL = {
@@ -17317,7 +17455,8 @@ ${e}`);
17317
17455
  [36196 /* COMPRESSED_RGB_ETC1_WEBGL */]: 0.5,
17318
17456
  [35986 /* COMPRESSED_RGB_ATC_WEBGL */]: 0.5,
17319
17457
  [35986 /* COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL */]: 1,
17320
- [34798 /* COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL */]: 1
17458
+ [34798 /* COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL */]: 1,
17459
+ [37808 /* COMPRESSED_RGBA_ASTC_4x4_KHR */]: 1
17321
17460
  };
17322
17461
 
17323
17462
  class BlobResource extends BufferResource {
@@ -17942,8 +18081,8 @@ ${e}`);
17942
18081
  extensions$1.add(resolveCompressedTextureUrl);
17943
18082
 
17944
18083
  /*!
17945
- * @pixi/extract - v7.0.0-alpha.3
17946
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
18084
+ * @pixi/extract - v7.0.0-beta.3
18085
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
17947
18086
  *
17948
18087
  * @pixi/extract is licensed under the MIT License.
17949
18088
  * http://www.opensource.org/licenses/mit-license
@@ -17955,13 +18094,25 @@ ${e}`);
17955
18094
  constructor(renderer) {
17956
18095
  this.renderer = renderer;
17957
18096
  }
17958
- image(target, format, quality) {
18097
+ async image(target, format, quality) {
17959
18098
  const image = new Image();
17960
- image.src = this.base64(target, format, quality);
18099
+ image.src = await this.base64(target, format, quality);
17961
18100
  return image;
17962
18101
  }
17963
- base64(target, format, quality) {
17964
- return this.canvas(target).toDataURL(format, quality);
18102
+ async base64(target, format, quality) {
18103
+ const canvas = this.canvas(target);
18104
+ if (canvas.toDataURL !== void 0) {
18105
+ return canvas.toDataURL(format, quality);
18106
+ }
18107
+ if (canvas.convertToBlob !== void 0) {
18108
+ const blob = await canvas.convertToBlob({ type: format, quality });
18109
+ return await new Promise((resolve) => {
18110
+ const reader = new FileReader();
18111
+ reader.onload = () => resolve(reader.result);
18112
+ reader.readAsDataURL(blob);
18113
+ });
18114
+ }
18115
+ throw new Error("Extract.base64() requires ICanvas.toDataURL or ICanvas.convertToBlob to be implemented");
17965
18116
  }
17966
18117
  canvas(target, frame) {
17967
18118
  const renderer = this.renderer;
@@ -18076,8 +18227,8 @@ ${e}`);
18076
18227
  extensions$1.add(Extract);
18077
18228
 
18078
18229
  /*!
18079
- * @pixi/graphics - v7.0.0-alpha.3
18080
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
18230
+ * @pixi/graphics - v7.0.0-beta.3
18231
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
18081
18232
  *
18082
18233
  * @pixi/graphics is licensed under the MIT License.
18083
18234
  * http://www.opensource.org/licenses/mit-license
@@ -19841,8 +19992,8 @@ ${e}`);
19841
19992
  };
19842
19993
 
19843
19994
  /*!
19844
- * @pixi/mesh - v7.0.0-alpha.3
19845
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
19995
+ * @pixi/mesh - v7.0.0-beta.3
19996
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
19846
19997
  *
19847
19998
  * @pixi/mesh is licensed under the MIT License.
19848
19999
  * http://www.opensource.org/licenses/mit-license
@@ -20166,8 +20317,8 @@ ${e}`);
20166
20317
  }
20167
20318
 
20168
20319
  /*!
20169
- * @pixi/mesh-extras - v7.0.0-alpha.3
20170
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
20320
+ * @pixi/mesh-extras - v7.0.0-beta.3
20321
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
20171
20322
  *
20172
20323
  * @pixi/mesh-extras is licensed under the MIT License.
20173
20324
  * http://www.opensource.org/licenses/mit-license
@@ -20524,8 +20675,8 @@ ${e}`);
20524
20675
  }
20525
20676
 
20526
20677
  /*!
20527
- * @pixi/particle-container - v7.0.0-alpha.3
20528
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
20678
+ * @pixi/particle-container - v7.0.0-beta.3
20679
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
20529
20680
  *
20530
20681
  * @pixi/particle-container is licensed under the MIT License.
20531
20682
  * http://www.opensource.org/licenses/mit-license
@@ -20929,8 +21080,8 @@ ${e}`);
20929
21080
  extensions$1.add(ParticleRenderer);
20930
21081
 
20931
21082
  /*!
20932
- * @pixi/text - v7.0.0-alpha.3
20933
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
21083
+ * @pixi/text - v7.0.0-beta.3
21084
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
20934
21085
  *
20935
21086
  * @pixi/text is licensed under the MIT License.
20936
21087
  * http://www.opensource.org/licenses/mit-license
@@ -21994,8 +22145,8 @@ ${e}`);
21994
22145
  Text.experimentalLetterSpacing = false;
21995
22146
 
21996
22147
  /*!
21997
- * @pixi/prepare - v7.0.0-alpha.3
21998
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
22148
+ * @pixi/prepare - v7.0.0-beta.3
22149
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
21999
22150
  *
22000
22151
  * @pixi/prepare is licensed under the MIT License.
22001
22152
  * http://www.opensource.org/licenses/mit-license
@@ -22267,8 +22418,8 @@ ${e}`);
22267
22418
  }
22268
22419
 
22269
22420
  /*!
22270
- * @pixi/spritesheet - v7.0.0-alpha.3
22271
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
22421
+ * @pixi/spritesheet - v7.0.0-beta.3
22422
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
22272
22423
  *
22273
22424
  * @pixi/spritesheet is licensed under the MIT License.
22274
22425
  * http://www.opensource.org/licenses/mit-license
@@ -22480,8 +22631,8 @@ ${e}`);
22480
22631
  extensions$1.add(spritesheetAsset);
22481
22632
 
22482
22633
  /*!
22483
- * @pixi/sprite-animated - v7.0.0-alpha.3
22484
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
22634
+ * @pixi/sprite-animated - v7.0.0-beta.3
22635
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
22485
22636
  *
22486
22637
  * @pixi/sprite-animated is licensed under the MIT License.
22487
22638
  * http://www.opensource.org/licenses/mit-license
@@ -22676,8 +22827,8 @@ ${e}`);
22676
22827
  }
22677
22828
 
22678
22829
  /*!
22679
- * @pixi/sprite-tiling - v7.0.0-alpha.3
22680
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
22830
+ * @pixi/sprite-tiling - v7.0.0-beta.3
22831
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
22681
22832
  *
22682
22833
  * @pixi/sprite-tiling is licensed under the MIT License.
22683
22834
  * http://www.opensource.org/licenses/mit-license
@@ -22875,8 +23026,8 @@ ${e}`);
22875
23026
  extensions$1.add(TilingSpriteRenderer);
22876
23027
 
22877
23028
  /*!
22878
- * @pixi/text-bitmap - v7.0.0-alpha.3
22879
- * Compiled Fri, 23 Sep 2022 14:33:14 UTC
23029
+ * @pixi/text-bitmap - v7.0.0-beta.3
23030
+ * Compiled Thu, 13 Oct 2022 15:35:43 UTC
22880
23031
  *
22881
23032
  * @pixi/text-bitmap is licensed under the MIT License.
22882
23033
  * http://www.opensource.org/licenses/mit-license
@@ -23403,7 +23554,7 @@ ${e}`);
23403
23554
  };
23404
23555
  BitmapFont.available = {};
23405
23556
 
23406
- var msdfFrag = "// Pixi texture info\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\n\r\n// Tint\r\nuniform vec4 uColor;\r\n\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r\nuniform float uFWidth;\r\n\r\nvoid main(void) {\r\n\r\n // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r\n vec4 texColor = texture2D(uSampler, vTextureCoord);\r\n\r\n // MSDF\r\n float median = texColor.r + texColor.g + texColor.b -\r\n min(texColor.r, min(texColor.g, texColor.b)) -\r\n max(texColor.r, max(texColor.g, texColor.b));\r\n // SDF\r\n median = min(median, texColor.a);\r\n\r\n float screenPxDistance = uFWidth * (median - 0.5);\r\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n";
23557
+ var msdfFrag = "// Pixi texture info\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\n\r\n// Tint\r\nuniform vec4 uColor;\r\n\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r\nuniform float uFWidth;\r\n\r\nvoid main(void) {\r\n\r\n // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r\n vec4 texColor = texture2D(uSampler, vTextureCoord);\r\n\r\n // MSDF\r\n float median = texColor.r + texColor.g + texColor.b -\r\n min(texColor.r, min(texColor.g, texColor.b)) -\r\n max(texColor.r, max(texColor.g, texColor.b));\r\n // SDF\r\n median = min(median, texColor.a);\r\n\r\n float screenPxDistance = uFWidth * (median - 0.5);\r\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r\n if (median < 0.01) {\r\n alpha = 0.0;\r\n } else if (median > 0.99) {\r\n alpha = 1.0;\r\n }\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n";
23407
23558
 
23408
23559
  var msdfVert = "// Mesh material default fragment\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTextureMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n";
23409
23560
 
@@ -23543,9 +23694,7 @@ ${e}`);
23543
23694
  const pagesMeshData = {};
23544
23695
  const newPagesMeshData = [];
23545
23696
  const activePagesMeshData = this._activePagesMeshData;
23546
- for (let i = 0; i < activePagesMeshData.length; i++) {
23547
- pageMeshDataPool.push(activePagesMeshData[i]);
23548
- }
23697
+ pageMeshDataPool.push(...activePagesMeshData);
23549
23698
  for (let i = 0; i < lenChars; i++) {
23550
23699
  const texture = chars[i].texture;
23551
23700
  const baseTextureUid = texture.baseTexture.uid;
@@ -23705,7 +23854,7 @@ ${e}`);
23705
23854
  const fontScale = this._fontSize / size;
23706
23855
  const resolution = renderer._view.resolution;
23707
23856
  for (const mesh of this._activePagesMeshData) {
23708
- mesh.mesh.shader.uniforms.uFWidth = Math.min(worldScale * distanceFieldRange * fontScale * resolution, 1);
23857
+ mesh.mesh.shader.uniforms.uFWidth = worldScale * distanceFieldRange * fontScale * resolution;
23709
23858
  }
23710
23859
  }
23711
23860
  super._render(renderer);
@@ -23835,6 +23984,13 @@ ${e}`);
23835
23984
  }
23836
23985
  destroy(options) {
23837
23986
  const { _textureCache } = this;
23987
+ const data = BitmapFont.available[this._fontName];
23988
+ const pageMeshDataPool = data.distanceFieldType === "none" ? pageMeshDataDefaultPageMeshData : pageMeshDataMSDFPageMeshData;
23989
+ pageMeshDataPool.push(...this._activePagesMeshData);
23990
+ this._activePagesMeshData = [];
23991
+ pageMeshDataPool.filter((page) => _textureCache[page.mesh.texture.baseTexture.uid]).forEach((page) => {
23992
+ page.mesh.texture = Texture.EMPTY;
23993
+ });
23838
23994
  for (const id in _textureCache) {
23839
23995
  const texture = _textureCache[id];
23840
23996
  texture.destroy();
@@ -24062,6 +24218,8 @@ ${e}`);
24062
24218
  exports.TilingSpriteRenderer = TilingSpriteRenderer;
24063
24219
  exports.TimeLimiter = TimeLimiter;
24064
24220
  exports.Transform = Transform;
24221
+ exports.TransformFeedback = TransformFeedback;
24222
+ exports.TransformFeedbackSystem = TransformFeedbackSystem;
24065
24223
  exports.UPDATE_PRIORITY = UPDATE_PRIORITY;
24066
24224
  exports.UniformGroup = UniformGroup;
24067
24225
  exports.VERSION = VERSION;