wuepgg3-track 2.0.4 → 2.0.6

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,58 +1,6 @@
1
- import { q as Le, G as ae, t as ne, u as He, k as ie, M as v, v as oe, E as u, e as O, x as S, y as ze, z as F, F as b, R as L, H as le, I as We, s as m, S as f, h as B, w as H, J, K as Ve, b as X, B as k, i as U, L as M, j as T, N as w, O as Ne, a as je, Q as ue, V as de, W as ce, X as he, C as P, Y as $e, Z as A, D as z, _ as qe, P as Ke, c as Ye, T as Q, $ as Z, a0 as Je, a1 as Xe, a2 as Qe } from "./index-CyClmTrp.mjs";
2
- import { S as fe, B as pe, c as Ze } from "./colorToUniform-zJcCVLeu.mjs";
3
- const me = class I extends Le {
4
- /**
5
- * @param options - The optional parameters of this filter.
6
- */
7
- constructor(e) {
8
- e = { ...I.defaultOptions, ...e }, super(e), this.enabled = !0, this._state = fe.for2d(), this.blendMode = e.blendMode, this.padding = e.padding, typeof e.antialias == "boolean" ? this.antialias = e.antialias ? "on" : "off" : this.antialias = e.antialias, this.resolution = e.resolution, this.blendRequired = e.blendRequired, this.clipToViewport = e.clipToViewport, this.addResource("uTexture", 0, 1);
9
- }
10
- /**
11
- * Applies the filter
12
- * @param filterManager - The renderer to retrieve the filter from
13
- * @param input - The input render target.
14
- * @param output - The target to output to.
15
- * @param clearMode - Should the output be cleared before rendering to it
16
- */
17
- apply(e, t, r, s) {
18
- e.applyFilter(this, t, r, s);
19
- }
20
- /**
21
- * Get the blend mode of the filter.
22
- * @default "normal"
23
- */
24
- get blendMode() {
25
- return this._state.blendMode;
26
- }
27
- /** Sets the blend mode of the filter. */
28
- set blendMode(e) {
29
- this._state.blendMode = e;
30
- }
31
- /**
32
- * A short hand function to create a filter based of a vertex and fragment shader src.
33
- * @param options
34
- * @returns A shiny new PixiJS filter!
35
- */
36
- static from(e) {
37
- const { gpu: t, gl: r, ...s } = e;
38
- let n, i;
39
- return t && (n = ae.from(t)), r && (i = ne.from(r)), new I({
40
- gpuProgram: n,
41
- glProgram: i,
42
- ...s
43
- });
44
- }
45
- };
46
- me.defaultOptions = {
47
- blendMode: "normal",
48
- resolution: 1,
49
- padding: 0,
50
- antialias: "off",
51
- blendRequired: !1,
52
- clipToViewport: !0
53
- };
54
- let et = me;
55
- var tt = `in vec2 vMaskCoord;
1
+ import { u as Ee, m as ae, M as v, G as De, a as Oe, v as ne, E as u, e as D, x as S, y as Fe, z as O, F as b, R as F, H as ie, I as Le, t as m, c as f, j as B, w as L, J as Y, K as He, d as J, B as k, k as U, L as ze, N as M, l as T, O as w, Q as We, b as Ve, V as oe, W as le, X as ue, Y as de, C as P, Z as Ne, _ as A, $ as X, D as H, a0 as je, P as $e, h as qe, T as Q, a1 as Z, a2 as Ke, a3 as Ye, a4 as Je } from "./index-qbfgPm_j.mjs";
2
+ import { F as Xe, S as Qe, B as ce, c as Ze } from "./colorToUniform-CSn0Emyh.mjs";
3
+ var et = `in vec2 vMaskCoord;
56
4
  in vec2 vTextureCoord;
57
5
 
58
6
  uniform sampler2D uTexture;
@@ -86,7 +34,7 @@ void main(void)
86
34
 
87
35
  finalColor = original * a;
88
36
  }
89
- `, rt = `in vec2 aPosition;
37
+ `, tt = `in vec2 aPosition;
90
38
 
91
39
  out vec2 vTextureCoord;
92
40
  out vec2 vMaskCoord;
@@ -222,14 +170,14 @@ fn mainFragment(
222
170
  return source * a;
223
171
  }
224
172
  `;
225
- class st extends et {
173
+ class rt extends Xe {
226
174
  constructor(e) {
227
- const { sprite: t, ...r } = e, s = new He(t.texture), n = new ie({
175
+ const { sprite: t, ...r } = e, s = new Ee(t.texture), n = new ae({
228
176
  uFilterMatrix: { value: new v(), type: "mat3x3<f32>" },
229
177
  uMaskClamp: { value: s.uClampFrame, type: "vec4<f32>" },
230
178
  uAlpha: { value: 1, type: "f32" },
231
179
  uInverse: { value: e.inverse ? 1 : 0, type: "f32" }
232
- }), i = ae.from({
180
+ }), i = De.from({
233
181
  vertex: {
234
182
  source: ee,
235
183
  entryPoint: "mainVertex"
@@ -238,9 +186,9 @@ class st extends et {
238
186
  source: ee,
239
187
  entryPoint: "mainFragment"
240
188
  }
241
- }), o = ne.from({
242
- vertex: rt,
243
- fragment: tt,
189
+ }), o = Oe.from({
190
+ vertex: tt,
191
+ fragment: et,
244
192
  name: "mask-filter"
245
193
  });
246
194
  super({
@@ -267,17 +215,17 @@ class st extends et {
267
215
  ).prepend(this._textureMatrix.mapCoord), this.resources.uMaskTexture = this.sprite.texture.source, e.applyFilter(this, t, r, s);
268
216
  }
269
217
  }
270
- const W = class ve {
218
+ const z = class he {
271
219
  constructor(e, t) {
272
220
  var r, s;
273
- this.state = fe.for2d(), this._batchersByInstructionSet = /* @__PURE__ */ Object.create(null), this._activeBatches = /* @__PURE__ */ Object.create(null), this.renderer = e, this._adaptor = t, (s = (r = this._adaptor).init) == null || s.call(r, this);
221
+ this.state = Qe.for2d(), this._batchersByInstructionSet = /* @__PURE__ */ Object.create(null), this._activeBatches = /* @__PURE__ */ Object.create(null), this.renderer = e, this._adaptor = t, (s = (r = this._adaptor).init) == null || s.call(r, this);
274
222
  }
275
223
  static getBatcher(e) {
276
224
  return new this._availableBatchers[e]();
277
225
  }
278
226
  buildStart(e) {
279
227
  let t = this._batchersByInstructionSet[e.uid];
280
- t || (t = this._batchersByInstructionSet[e.uid] = /* @__PURE__ */ Object.create(null), t.default || (t.default = new oe({
228
+ t || (t = this._batchersByInstructionSet[e.uid] = /* @__PURE__ */ Object.create(null), t.default || (t.default = new ne({
281
229
  maxTextures: this.renderer.limits.maxBatchableTextures
282
230
  }))), this._activeBatches = t, this._activeBatch = this._activeBatches.default;
283
231
  for (const r in this._activeBatches)
@@ -287,7 +235,7 @@ const W = class ve {
287
235
  if (this._activeBatch.name !== e.batcherName) {
288
236
  this._activeBatch.break(t);
289
237
  let r = this._activeBatches[e.batcherName];
290
- r || (r = this._activeBatches[e.batcherName] = ve.getBatcher(e.batcherName), r.begin()), this._activeBatch = r;
238
+ r || (r = this._activeBatches[e.batcherName] = he.getBatcher(e.batcherName), r.begin()), this._activeBatch = r;
291
239
  }
292
240
  this._activeBatch.add(e);
293
241
  }
@@ -323,7 +271,7 @@ const W = class ve {
323
271
  this._activeBatches = null;
324
272
  }
325
273
  };
326
- W.extension = {
274
+ z.extension = {
327
275
  type: [
328
276
  u.WebGLPipes,
329
277
  u.WebGPUPipes,
@@ -331,11 +279,11 @@ W.extension = {
331
279
  ],
332
280
  name: "batch"
333
281
  };
334
- W._availableBatchers = /* @__PURE__ */ Object.create(null);
335
- let ge = W;
336
- O.handleByMap(u.Batcher, ge._availableBatchers);
337
- O.add(oe);
338
- const Ut = {
282
+ z._availableBatchers = /* @__PURE__ */ Object.create(null);
283
+ let fe = z;
284
+ D.handleByMap(u.Batcher, fe._availableBatchers);
285
+ D.add(ne);
286
+ const Bt = {
339
287
  name: "texture-bit",
340
288
  vertex: {
341
289
  header: (
@@ -373,7 +321,7 @@ const Ut = {
373
321
  `
374
322
  )
375
323
  }
376
- }, At = {
324
+ }, Ut = {
377
325
  name: "texture-bit",
378
326
  vertex: {
379
327
  header: (
@@ -405,11 +353,11 @@ const Ut = {
405
353
  `
406
354
  )
407
355
  }
408
- }, at = new F();
409
- class nt extends le {
356
+ }, st = new O();
357
+ class at extends ie {
410
358
  constructor() {
411
- super(), this.filters = [new st({
412
- sprite: new We(m.EMPTY),
359
+ super(), this.filters = [new rt({
360
+ sprite: new Le(m.EMPTY),
413
361
  inverse: !1,
414
362
  resolution: "inherit",
415
363
  antialias: "inherit"
@@ -428,7 +376,7 @@ class nt extends le {
428
376
  this.filters[0].inverse = e;
429
377
  }
430
378
  }
431
- class xe {
379
+ class pe {
432
380
  constructor(e) {
433
381
  this._activeMaskStage = [], this._renderer = e;
434
382
  }
@@ -470,10 +418,10 @@ class xe {
470
418
  execute(e) {
471
419
  const t = this._renderer, r = e.mask.renderMaskToTexture;
472
420
  if (e.action === "pushMaskBegin") {
473
- const s = S.get(nt);
421
+ const s = S.get(at);
474
422
  if (s.inverse = e.inverse, r) {
475
423
  e.mask.mask.measurable = !0;
476
- const n = ze(e.mask.mask, !0, at);
424
+ const n = Fe(e.mask.mask, !0, st);
477
425
  e.mask.mask.measurable = !1, n.ceil();
478
426
  const i = t.renderTarget.renderTarget.colorTexture.source, o = b.getOptimalTexture(
479
427
  n.width,
@@ -498,7 +446,7 @@ class xe {
498
446
  });
499
447
  } else if (e.action === "pushMaskEnd") {
500
448
  const s = this._activeMaskStage[this._activeMaskStage.length - 1];
501
- r && (t.type === L.WEBGL && t.renderTarget.finishRenderPass(), t.renderTarget.pop(), t.globalUniforms.pop()), t.filter.push({
449
+ r && (t.type === F.WEBGL && t.renderTarget.finishRenderPass(), t.renderTarget.pop(), t.globalUniforms.pop()), t.filter.push({
502
450
  renderPipeId: "filter",
503
451
  action: "pushFilter",
504
452
  container: s.maskedContainer,
@@ -515,7 +463,7 @@ class xe {
515
463
  this._renderer = null, this._activeMaskStage = null;
516
464
  }
517
465
  }
518
- xe.extension = {
466
+ pe.extension = {
519
467
  type: [
520
468
  u.WebGLPipes,
521
469
  u.WebGPUPipes,
@@ -523,7 +471,7 @@ xe.extension = {
523
471
  ],
524
472
  name: "alphaMask"
525
473
  };
526
- class _e {
474
+ class me {
527
475
  constructor(e) {
528
476
  this._colorStack = [], this._colorStackIndex = 0, this._currentColor = 0, this._renderer = e;
529
477
  }
@@ -556,10 +504,10 @@ class _e {
556
504
  this._renderer.colorMask.setMask(e.colorMask);
557
505
  }
558
506
  destroy() {
559
- this._colorStack = null;
507
+ this._renderer = null, this._colorStack = null;
560
508
  }
561
509
  }
562
- _e.extension = {
510
+ me.extension = {
563
511
  type: [
564
512
  u.WebGLPipes,
565
513
  u.WebGPUPipes,
@@ -567,7 +515,7 @@ _e.extension = {
567
515
  ],
568
516
  name: "colorMask"
569
517
  };
570
- class be {
518
+ class ve {
571
519
  constructor(e) {
572
520
  this._maskStackHash = {}, this._maskHash = /* @__PURE__ */ new WeakMap(), this._renderer = e;
573
521
  }
@@ -630,7 +578,7 @@ class be {
630
578
  this._renderer = null, this._maskStackHash = null, this._maskHash = null;
631
579
  }
632
580
  }
633
- be.extension = {
581
+ ve.extension = {
634
582
  type: [
635
583
  u.WebGLPipes,
636
584
  u.WebGPUPipes,
@@ -638,14 +586,14 @@ be.extension = {
638
586
  ],
639
587
  name: "stencilMask"
640
588
  };
641
- function It(a, e) {
589
+ function At(a, e) {
642
590
  for (const t in a.attributes) {
643
591
  const r = a.attributes[t], s = e[t];
644
- s ? (r.format ?? (r.format = s.format), r.offset ?? (r.offset = s.offset), r.instance ?? (r.instance = s.instance)) : H(`Attribute ${t} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`);
592
+ s ? (r.format ?? (r.format = s.format), r.offset ?? (r.offset = s.offset), r.instance ?? (r.instance = s.instance)) : L(`Attribute ${t} is not present in the shader, but is present in the geometry. Unable to infer attribute details.`);
645
593
  }
646
- it(a);
594
+ nt(a);
647
595
  }
648
- function it(a) {
596
+ function nt(a) {
649
597
  const { buffers: e, attributes: t } = a, r = {}, s = {};
650
598
  for (const n in e) {
651
599
  const i = e[n];
@@ -653,20 +601,20 @@ function it(a) {
653
601
  }
654
602
  for (const n in t) {
655
603
  const i = t[n];
656
- r[i.buffer.uid] += J(i.format).stride;
604
+ r[i.buffer.uid] += Y(i.format).stride;
657
605
  }
658
606
  for (const n in t) {
659
607
  const i = t[n];
660
- i.stride ?? (i.stride = r[i.buffer.uid]), i.start ?? (i.start = s[i.buffer.uid]), s[i.buffer.uid] += J(i.format).stride;
608
+ i.stride ?? (i.stride = r[i.buffer.uid]), i.start ?? (i.start = s[i.buffer.uid]), s[i.buffer.uid] += Y(i.format).stride;
661
609
  }
662
610
  }
663
- const x = [];
664
- x[f.NONE] = void 0;
665
- x[f.DISABLED] = {
611
+ const _ = [];
612
+ _[f.NONE] = void 0;
613
+ _[f.DISABLED] = {
666
614
  stencilWriteMask: 0,
667
615
  stencilReadMask: 0
668
616
  };
669
- x[f.RENDERING_MASK_ADD] = {
617
+ _[f.RENDERING_MASK_ADD] = {
670
618
  stencilFront: {
671
619
  compare: "equal",
672
620
  passOp: "increment-clamp"
@@ -676,7 +624,7 @@ x[f.RENDERING_MASK_ADD] = {
676
624
  passOp: "increment-clamp"
677
625
  }
678
626
  };
679
- x[f.RENDERING_MASK_REMOVE] = {
627
+ _[f.RENDERING_MASK_REMOVE] = {
680
628
  stencilFront: {
681
629
  compare: "equal",
682
630
  passOp: "decrement-clamp"
@@ -686,7 +634,7 @@ x[f.RENDERING_MASK_REMOVE] = {
686
634
  passOp: "decrement-clamp"
687
635
  }
688
636
  };
689
- x[f.MASK_ACTIVE] = {
637
+ _[f.MASK_ACTIVE] = {
690
638
  stencilWriteMask: 0,
691
639
  stencilFront: {
692
640
  compare: "equal",
@@ -697,7 +645,7 @@ x[f.MASK_ACTIVE] = {
697
645
  passOp: "keep"
698
646
  }
699
647
  };
700
- x[f.INVERSE_MASK_ACTIVE] = {
648
+ _[f.INVERSE_MASK_ACTIVE] = {
701
649
  stencilWriteMask: 0,
702
650
  stencilFront: {
703
651
  compare: "not-equal",
@@ -708,7 +656,7 @@ x[f.INVERSE_MASK_ACTIVE] = {
708
656
  passOp: "keep"
709
657
  }
710
658
  };
711
- class Gt {
659
+ class It {
712
660
  constructor(e) {
713
661
  this._syncFunctionHash = /* @__PURE__ */ Object.create(null), this._adaptor = e, this._systemCheck();
714
662
  }
@@ -718,12 +666,12 @@ class Gt {
718
666
  * @private
719
667
  */
720
668
  _systemCheck() {
721
- if (!Ve())
669
+ if (!He())
722
670
  throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.");
723
671
  }
724
672
  ensureUniformGroup(e) {
725
673
  const t = this.getUniformGroupData(e);
726
- e.buffer || (e.buffer = new X({
674
+ e.buffer || (e.buffer = new J({
727
675
  data: new Float32Array(t.layout.size / 4),
728
676
  usage: k.UNIFORM | k.COPY_DST
729
677
  }));
@@ -748,7 +696,7 @@ class Gt {
748
696
  }
749
697
  syncUniformGroup(e, t, r) {
750
698
  const s = this.getUniformGroupData(e);
751
- e.buffer || (e.buffer = new X({
699
+ e.buffer || (e.buffer = new J({
752
700
  data: new Float32Array(s.layout.size / 4),
753
701
  usage: k.UNIFORM | k.COPY_DST
754
702
  }));
@@ -874,7 +822,7 @@ const C = [
874
822
  `
875
823
  }
876
824
  ];
877
- function Dt(a, e, t, r) {
825
+ function Gt(a, e, t, r) {
878
826
  const s = [`
879
827
  var v = null;
880
828
  var v2 = null;
@@ -929,7 +877,7 @@ function g(a, e) {
929
877
  }
930
878
  `;
931
879
  }
932
- const ot = {
880
+ const it = {
933
881
  f32: `
934
882
  data[offset] = v;`,
935
883
  i32: `
@@ -984,7 +932,7 @@ const ot = {
984
932
  "mat2x4<f32>": g(2, 4),
985
933
  "mat3x4<f32>": g(3, 4)
986
934
  }, Et = {
987
- ...ot,
935
+ ...it,
988
936
  "mat2x2<f32>": `
989
937
  data[offset] = v[0];
990
938
  data[offset + 1] = v[1];
@@ -992,35 +940,36 @@ const ot = {
992
940
  data[offset + 3] = v[3];
993
941
  `
994
942
  };
995
- function lt(a, e, t, r, s, n) {
943
+ function ot(a, e, t, r, s, n) {
996
944
  const i = n ? 1 : -1;
997
945
  return a.identity(), a.a = 1 / r * 2, a.d = i * (1 / s * 2), a.tx = -1 - e * a.a, a.ty = -i - t * a.d, a;
998
946
  }
999
- const _ = /* @__PURE__ */ new Map();
1000
- function Te(a, e) {
1001
- if (!_.has(a)) {
947
+ const x = /* @__PURE__ */ new Map();
948
+ ze.register(x);
949
+ function ge(a, e) {
950
+ if (!x.has(a)) {
1002
951
  const t = new m({
1003
952
  source: new U({
1004
953
  resource: a,
1005
954
  ...e
1006
955
  })
1007
956
  }), r = () => {
1008
- _.get(a) === t && _.delete(a);
957
+ x.get(a) === t && x.delete(a);
1009
958
  };
1010
- t.once("destroy", r), t.source.once("destroy", r), _.set(a, t);
959
+ t.once("destroy", r), t.source.once("destroy", r), x.set(a, t);
1011
960
  }
1012
- return _.get(a);
961
+ return x.get(a);
1013
962
  }
1014
- function ut(a) {
963
+ function lt(a) {
1015
964
  const e = a.colorTexture.source.resource;
1016
965
  return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement && document.body.contains(e);
1017
966
  }
1018
- const ye = class ke {
967
+ const xe = class _e {
1019
968
  /**
1020
969
  * @param [descriptor] - Options for creating a render target.
1021
970
  */
1022
971
  constructor(e = {}) {
1023
- if (this.uid = M("renderTarget"), this.colorTextures = [], this.dirtyId = 0, this.isRoot = !1, this._size = new Float32Array(2), this._managedColorTextures = !1, e = { ...ke.defaultOptions, ...e }, this.stencil = e.stencil, this.depth = e.depth, this.isRoot = e.isRoot, typeof e.colorTextures == "number") {
972
+ if (this.uid = M("renderTarget"), this.colorTextures = [], this.dirtyId = 0, this.isRoot = !1, this._size = new Float32Array(2), this._managedColorTextures = !1, e = { ..._e.defaultOptions, ...e }, this.stencil = e.stencil, this.depth = e.depth, this.isRoot = e.isRoot, typeof e.colorTextures == "number") {
1024
973
  this._managedColorTextures = !0;
1025
974
  for (let t = 0; t < e.colorTextures; t++)
1026
975
  this.colorTextures.push(
@@ -1091,7 +1040,7 @@ const ye = class ke {
1091
1040
  }), this.depthStencilTexture && (this.depthStencilTexture.destroy(), delete this.depthStencilTexture);
1092
1041
  }
1093
1042
  };
1094
- ye.defaultOptions = {
1043
+ xe.defaultOptions = {
1095
1044
  /** the width of the RenderTarget */
1096
1045
  width: 0,
1097
1046
  /** the height of the RenderTarget */
@@ -1110,10 +1059,10 @@ ye.defaultOptions = {
1110
1059
  /** is this a root element, true if this is gl context owners render target */
1111
1060
  isRoot: !1
1112
1061
  };
1113
- let G = ye;
1114
- class Ot {
1062
+ let I = xe;
1063
+ class Dt {
1115
1064
  constructor(e) {
1116
- this.rootViewPort = new w(), this.viewport = new w(), this.onRenderTargetChange = new Ne("onRenderTargetChange"), this.projectionMatrix = new v(), this.defaultClearColor = [0, 0, 0, 0], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._renderer = e, e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash");
1065
+ this.rootViewPort = new w(), this.viewport = new w(), this.onRenderTargetChange = new We("onRenderTargetChange"), this.projectionMatrix = new v(), this.defaultClearColor = [0, 0, 0, 0], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._renderer = e, e.renderableGC.addManagedHash(this, "_gpuRenderTargetHash");
1117
1066
  }
1118
1067
  /** called when dev wants to finish a render pass */
1119
1068
  finishRenderPass() {
@@ -1139,7 +1088,7 @@ class Ot {
1139
1088
  t,
1140
1089
  r,
1141
1090
  s
1142
- ), this.rootViewPort.copyFrom(this.viewport), this.rootRenderTarget = this.renderTarget, this.renderingToScreen = ut(this.rootRenderTarget), (i = (n = this.adaptor).prerender) == null || i.call(n, this.rootRenderTarget);
1091
+ ), this.rootViewPort.copyFrom(this.viewport), this.rootRenderTarget = this.renderTarget, this.renderingToScreen = lt(this.rootRenderTarget), (i = (n = this.adaptor).prerender) == null || i.call(n, this.rootRenderTarget);
1143
1092
  }
1144
1093
  postrender() {
1145
1094
  var e, t;
@@ -1168,7 +1117,7 @@ class Ot {
1168
1117
  d.x = s.x * p + 0.5 | 0, d.y = s.y * p + 0.5 | 0, d.width = s.width * p + 0.5 | 0, d.height = s.height * p + 0.5 | 0;
1169
1118
  } else
1170
1119
  d.x = 0, d.y = 0, d.width = c, d.height = h;
1171
- return lt(
1120
+ return ot(
1172
1121
  this.projectionMatrix,
1173
1122
  0,
1174
1123
  0,
@@ -1283,7 +1232,7 @@ class Ot {
1283
1232
  }
1284
1233
  _initRenderTarget(e) {
1285
1234
  let t = null;
1286
- return U.test(e) && (e = Te(e).source), e instanceof G ? t = e : e instanceof T && (t = new G({
1235
+ return U.test(e) && (e = ge(e).source), e instanceof I ? t = e : e instanceof T && (t = new I({
1287
1236
  colorTextures: [e]
1288
1237
  }), e.source instanceof U && (t.isRoot = !0), e.once("destroy", () => {
1289
1238
  t.destroy(), this._renderSurfaceToRenderTargetHash.delete(e);
@@ -1298,7 +1247,7 @@ class Ot {
1298
1247
  this.renderTarget = null, this.renderSurface = null;
1299
1248
  }
1300
1249
  }
1301
- class Ft extends je {
1250
+ class Ot extends Ve {
1302
1251
  /**
1303
1252
  * Create a new Buffer Resource.
1304
1253
  * @param options - The options for the buffer resource
@@ -1323,7 +1272,7 @@ class Ft extends je {
1323
1272
  this.destroyed = !0, e && this.buffer.destroy(), this.emit("change", this), this.buffer = null;
1324
1273
  }
1325
1274
  }
1326
- class Ce {
1275
+ class be {
1327
1276
  constructor(e) {
1328
1277
  this._renderer = e;
1329
1278
  }
@@ -1344,7 +1293,7 @@ class Ce {
1344
1293
  this._renderer = null;
1345
1294
  }
1346
1295
  }
1347
- Ce.extension = {
1296
+ be.extension = {
1348
1297
  type: [
1349
1298
  u.WebGLPipes,
1350
1299
  u.WebGPUPipes,
@@ -1352,15 +1301,15 @@ Ce.extension = {
1352
1301
  ],
1353
1302
  name: "customRender"
1354
1303
  };
1355
- function D(a, e) {
1304
+ function G(a, e) {
1356
1305
  const t = a.instructionSet, r = t.instructions;
1357
1306
  for (let s = 0; s < t.instructionSize; s++) {
1358
1307
  const n = r[s];
1359
1308
  e[n.renderPipeId].execute(n);
1360
1309
  }
1361
1310
  }
1362
- const dt = new v();
1363
- class Me {
1311
+ const ut = new v();
1312
+ class Te {
1364
1313
  constructor(e) {
1365
1314
  this._renderer = e;
1366
1315
  }
@@ -1377,20 +1326,21 @@ class Me {
1377
1326
  this._renderer.renderPipes.batch.break(t), e._batchableRenderGroup && (S.return(e._batchableRenderGroup), e._batchableRenderGroup = null), t.add(e);
1378
1327
  }
1379
1328
  _addRenderableCacheAsTexture(e, t) {
1380
- const r = e._batchableRenderGroup ?? (e._batchableRenderGroup = S.get(pe));
1381
- r.renderable = e.root, r.transform = e.root.relativeGroupTransform, r.texture = e.texture, r.bounds = e._textureBounds, t.add(e), this._renderer.renderPipes.batch.addToBatch(r, t);
1329
+ const r = e._batchableRenderGroup ?? (e._batchableRenderGroup = S.get(ce));
1330
+ r.renderable = e.root, r.transform = e.root.relativeGroupTransform, r.texture = e.texture, r.bounds = e._textureBounds, t.add(e), this._renderer.renderPipes.blendMode.pushBlendMode(e, e.root.groupBlendMode, t), this._renderer.renderPipes.batch.addToBatch(r, t), this._renderer.renderPipes.blendMode.popBlendMode(t);
1382
1331
  }
1383
1332
  _executeCacheAsTexture(e) {
1384
1333
  if (e.textureNeedsUpdate) {
1385
1334
  e.textureNeedsUpdate = !1;
1386
- const t = dt.identity().translate(
1335
+ const t = ut.identity().translate(
1387
1336
  -e._textureBounds.x,
1388
1337
  -e._textureBounds.y
1389
1338
  );
1390
1339
  this._renderer.renderTarget.push(e.texture, !0, null, e.texture.frame), this._renderer.globalUniforms.push({
1391
1340
  worldTransformMatrix: t,
1392
- worldColor: 4294967295
1393
- }), D(e, this._renderer.renderPipes), this._renderer.renderTarget.finishRenderPass(), this._renderer.renderTarget.pop(), this._renderer.globalUniforms.pop();
1341
+ worldColor: 4294967295,
1342
+ offset: { x: 0, y: 0 }
1343
+ }), G(e, this._renderer.renderPipes), this._renderer.renderTarget.finishRenderPass(), this._renderer.renderTarget.pop(), this._renderer.globalUniforms.pop();
1394
1344
  }
1395
1345
  e._batchableRenderGroup._batcher.updateElement(e._batchableRenderGroup), e._batchableRenderGroup._batcher.geometry.buffers[0].update();
1396
1346
  }
@@ -1398,10 +1348,10 @@ class Me {
1398
1348
  this._renderer.globalUniforms.push({
1399
1349
  worldTransformMatrix: e.inverseParentTextureTransform,
1400
1350
  worldColor: e.worldColorAlpha
1401
- }), D(e, this._renderer.renderPipes), this._renderer.globalUniforms.pop();
1351
+ }), G(e, this._renderer.renderPipes), this._renderer.globalUniforms.pop();
1402
1352
  }
1403
1353
  }
1404
- Me.extension = {
1354
+ Te.extension = {
1405
1355
  type: [
1406
1356
  u.WebGLPipes,
1407
1357
  u.WebGPUPipes,
@@ -1414,23 +1364,23 @@ function E(a, e) {
1414
1364
  for (let t = e; t < a.length && a[t]; t++)
1415
1365
  a[t] = null;
1416
1366
  }
1417
- const ct = new P(), te = de | ce | he;
1418
- function Se(a, e = !1) {
1419
- ht(a);
1367
+ const dt = new P(), te = le | ue | de;
1368
+ function ye(a, e = !1) {
1369
+ ct(a);
1420
1370
  const t = a.childrenToUpdate, r = a.updateTick++;
1421
1371
  for (const s in t) {
1422
1372
  const n = Number(s), i = t[s], o = i.list, l = i.index;
1423
1373
  for (let d = 0; d < l; d++) {
1424
1374
  const c = o[d];
1425
- c.parentRenderGroup === a && c.relativeRenderGroupDepth === n && we(c, r, 0);
1375
+ c.parentRenderGroup === a && c.relativeRenderGroupDepth === n && ke(c, r, 0);
1426
1376
  }
1427
1377
  E(o, l), i.index = 0;
1428
1378
  }
1429
1379
  if (e)
1430
1380
  for (let s = 0; s < a.renderGroupChildren.length; s++)
1431
- Se(a.renderGroupChildren[s], e);
1381
+ ye(a.renderGroupChildren[s], e);
1432
1382
  }
1433
- function ht(a) {
1383
+ function ct(a) {
1434
1384
  const e = a.root;
1435
1385
  let t;
1436
1386
  if (a.renderGroupParent) {
@@ -1438,7 +1388,7 @@ function ht(a) {
1438
1388
  a.worldTransform.appendFrom(
1439
1389
  e.relativeGroupTransform,
1440
1390
  r.worldTransform
1441
- ), a.worldColor = ue(
1391
+ ), a.worldColor = oe(
1442
1392
  e.groupColor,
1443
1393
  r.worldColor
1444
1394
  ), t = e.groupAlpha * r.worldAlpha;
@@ -1446,7 +1396,7 @@ function ht(a) {
1446
1396
  a.worldTransform.copyFrom(e.localTransform), a.worldColor = e.localColor, t = e.localAlpha;
1447
1397
  t = t < 0 ? 0 : t > 1 ? 1 : t, a.worldAlpha = t, a.worldColorAlpha = a.worldColor + ((t * 255 | 0) << 24);
1448
1398
  }
1449
- function we(a, e, t) {
1399
+ function ke(a, e, t) {
1450
1400
  if (e === a.updateTick)
1451
1401
  return;
1452
1402
  a.updateTick = e, a.didChange = !1;
@@ -1456,62 +1406,60 @@ function we(a, e, t) {
1456
1406
  if (s && !s.renderGroup ? (t |= a._updateFlags, a.relativeGroupTransform.appendFrom(
1457
1407
  r,
1458
1408
  s.relativeGroupTransform
1459
- ), t & te && re(a, s, t)) : (t = a._updateFlags, a.relativeGroupTransform.copyFrom(r), t & te && re(a, ct, t)), !a.renderGroup) {
1409
+ ), t & te && re(a, s, t)) : (t = a._updateFlags, a.relativeGroupTransform.copyFrom(r), t & te && re(a, dt, t)), !a.renderGroup) {
1460
1410
  const n = a.children, i = n.length;
1461
1411
  for (let d = 0; d < i; d++)
1462
- we(n[d], e, t);
1412
+ ke(n[d], e, t);
1463
1413
  const o = a.parentRenderGroup, l = a;
1464
1414
  l.renderPipeId && !o.structureDidChange && o.updateRenderable(l);
1465
1415
  }
1466
1416
  }
1467
1417
  function re(a, e, t) {
1468
- if (t & ce) {
1469
- a.groupColor = ue(
1418
+ if (t & ue) {
1419
+ a.groupColor = oe(
1470
1420
  a.localColor,
1471
1421
  e.groupColor
1472
1422
  );
1473
1423
  let r = a.localAlpha * e.groupAlpha;
1474
1424
  r = r < 0 ? 0 : r > 1 ? 1 : r, a.groupAlpha = r, a.groupColorAlpha = a.groupColor + ((r * 255 | 0) << 24);
1475
1425
  }
1476
- t & he && (a.groupBlendMode = a.localBlendMode === "inherit" ? e.groupBlendMode : a.localBlendMode), t & de && (a.globalDisplayStatus = a.localDisplayStatus & e.globalDisplayStatus), a._updateFlags = 0;
1426
+ t & de && (a.groupBlendMode = a.localBlendMode === "inherit" ? e.groupBlendMode : a.localBlendMode), t & le && (a.globalDisplayStatus = a.localDisplayStatus & e.globalDisplayStatus), a._updateFlags = 0;
1477
1427
  }
1478
- function ft(a, e) {
1479
- const { list: t, index: r } = a.childrenRenderablesToUpdate;
1480
- let s = !1;
1481
- for (let n = 0; n < r; n++) {
1482
- const i = t[n];
1483
- if (s = e[i.renderPipeId].validateRenderable(i), s)
1428
+ function ht(a, e) {
1429
+ const { list: t } = a.childrenRenderablesToUpdate;
1430
+ let r = !1;
1431
+ for (let s = 0; s < a.childrenRenderablesToUpdate.index; s++) {
1432
+ const n = t[s];
1433
+ if (r = e[n.renderPipeId].validateRenderable(n), r)
1484
1434
  break;
1485
1435
  }
1486
- return a.structureDidChange = s, s;
1436
+ return a.structureDidChange = r, r;
1487
1437
  }
1488
- const pt = new v();
1489
- class Pe {
1438
+ const ft = new v();
1439
+ class Ce {
1490
1440
  constructor(e) {
1491
1441
  this._renderer = e;
1492
1442
  }
1493
1443
  render({ container: e, transform: t }) {
1494
1444
  const r = e.parent, s = e.renderGroup.renderGroupParent;
1495
1445
  e.parent = null, e.renderGroup.renderGroupParent = null;
1496
- const n = this._renderer;
1497
- let i = pt;
1498
- t && (i = i.copyFrom(e.renderGroup.localTransform), e.renderGroup.localTransform.copyFrom(t));
1446
+ const n = this._renderer, i = ft;
1447
+ t && (i.copyFrom(e.renderGroup.localTransform), e.renderGroup.localTransform.copyFrom(t));
1499
1448
  const o = n.renderPipes;
1500
1449
  this._updateCachedRenderGroups(e.renderGroup, null), this._updateRenderGroups(e.renderGroup), n.globalUniforms.start({
1501
1450
  worldTransformMatrix: t ? e.renderGroup.localTransform : e.renderGroup.worldTransform,
1502
1451
  worldColor: e.renderGroup.worldColorAlpha
1503
- }), D(e.renderGroup, o), o.uniformBatch && o.uniformBatch.renderEnd(), t && e.renderGroup.localTransform.copyFrom(i), e.parent = r, e.renderGroup.renderGroupParent = s;
1452
+ }), G(e.renderGroup, o), o.uniformBatch && o.uniformBatch.renderEnd(), t && e.renderGroup.localTransform.copyFrom(i), e.parent = r, e.renderGroup.renderGroupParent = s;
1504
1453
  }
1505
1454
  destroy() {
1506
1455
  this._renderer = null;
1507
1456
  }
1508
1457
  _updateCachedRenderGroups(e, t) {
1509
- if (e.isCachedAsTexture) {
1510
- if (!e.updateCacheTexture)
1458
+ if (e._parentCacheAsTextureRenderGroup = t, e.isCachedAsTexture) {
1459
+ if (!e.textureNeedsUpdate)
1511
1460
  return;
1512
1461
  t = e;
1513
1462
  }
1514
- e._parentCacheAsTextureRenderGroup = t;
1515
1463
  for (let r = e.renderGroupChildren.length - 1; r >= 0; r--)
1516
1464
  this._updateCachedRenderGroups(e.renderGroupChildren[r], t);
1517
1465
  if (e.invalidateMatrices(), e.isCachedAsTexture) {
@@ -1526,13 +1474,13 @@ class Pe {
1526
1474
  i,
1527
1475
  o
1528
1476
  );
1529
- d._source.style = new $e({ scaleMode: l }), e.texture = d, e._textureBounds || (e._textureBounds = new F()), e._textureBounds.copyFrom(r), s !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
1477
+ d._source.style = new Ne({ scaleMode: l }), e.texture = d, e._textureBounds || (e._textureBounds = new O()), e._textureBounds.copyFrom(r), s !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
1530
1478
  }
1531
1479
  } else e.texture && (b.returnTexture(e.texture, !0), e.texture = null);
1532
1480
  }
1533
1481
  _updateRenderGroups(e) {
1534
1482
  const t = this._renderer, r = t.renderPipes;
1535
- if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ? E(e.childrenRenderablesToUpdate.list, 0) : ft(e, r), Se(e), e.structureDidChange ? (e.structureDidChange = !1, this._buildInstructions(e, t)) : this._updateRenderables(e), e.childrenRenderablesToUpdate.index = 0, t.renderPipes.batch.upload(e.instructionSet), !(e.isCachedAsTexture && !e.textureNeedsUpdate))
1483
+ if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ? E(e.childrenRenderablesToUpdate.list, 0) : ht(e, r), ye(e), e.structureDidChange ? (e.structureDidChange = !1, this._buildInstructions(e, t)) : this._updateRenderables(e), e.childrenRenderablesToUpdate.index = 0, t.renderPipes.batch.upload(e.instructionSet), !(e.isCachedAsTexture && !e.textureNeedsUpdate))
1536
1484
  for (let s = 0; s < e.renderGroupChildren.length; s++)
1537
1485
  this._updateRenderGroups(e.renderGroupChildren[s]);
1538
1486
  }
@@ -1551,7 +1499,7 @@ class Pe {
1551
1499
  i.batch.buildStart(s), i.blendMode.buildStart(), i.colorMask.buildStart(), r.sortableChildren && r.sortChildren(), r.collectRenderablesWithEffects(s, n, null), i.batch.buildEnd(s), i.blendMode.buildEnd(s);
1552
1500
  }
1553
1501
  }
1554
- Pe.extension = {
1502
+ Ce.extension = {
1555
1503
  type: [
1556
1504
  u.WebGLSystem,
1557
1505
  u.WebGPUSystem,
@@ -1559,7 +1507,7 @@ Pe.extension = {
1559
1507
  ],
1560
1508
  name: "renderGroup"
1561
1509
  };
1562
- class Re {
1510
+ class Me {
1563
1511
  constructor(e) {
1564
1512
  this._renderer = e;
1565
1513
  }
@@ -1585,14 +1533,14 @@ class Re {
1585
1533
  return e._gpuData[this._renderer.uid] || this._initGPUSprite(e);
1586
1534
  }
1587
1535
  _initGPUSprite(e) {
1588
- const t = new pe();
1536
+ const t = new ce();
1589
1537
  return t.renderable = e, t.transform = e.groupTransform, t.texture = e._texture, t.bounds = e.visualBounds, t.roundPixels = this._renderer._roundPixels | e._roundPixels, e._gpuData[this._renderer.uid] = t, t;
1590
1538
  }
1591
1539
  destroy() {
1592
1540
  this._renderer = null;
1593
1541
  }
1594
1542
  }
1595
- Re.extension = {
1543
+ Me.extension = {
1596
1544
  type: [
1597
1545
  u.WebGLPipes,
1598
1546
  u.WebGPUPipes,
@@ -1600,7 +1548,7 @@ Re.extension = {
1600
1548
  ],
1601
1549
  name: "sprite"
1602
1550
  };
1603
- const V = class Be {
1551
+ const W = class Se {
1604
1552
  constructor() {
1605
1553
  this.clearBeforeRender = !0, this._backgroundColor = new A(0), this.color = this._backgroundColor, this.alpha = 1;
1606
1554
  }
@@ -1609,14 +1557,14 @@ const V = class Be {
1609
1557
  * @param options - the options for the background colors
1610
1558
  */
1611
1559
  init(e) {
1612
- e = { ...Be.defaultOptions, ...e }, this.clearBeforeRender = e.clearBeforeRender, this.color = e.background || e.backgroundColor || this._backgroundColor, this.alpha = e.backgroundAlpha, this._backgroundColor.setAlpha(e.backgroundAlpha);
1560
+ e = { ...Se.defaultOptions, ...e }, this.clearBeforeRender = e.clearBeforeRender, this.color = e.background || e.backgroundColor || this._backgroundColor, this.alpha = e.backgroundAlpha, this._backgroundColor.setAlpha(e.backgroundAlpha);
1613
1561
  }
1614
1562
  /** The background color to fill if not transparent */
1615
1563
  get color() {
1616
1564
  return this._backgroundColor;
1617
1565
  }
1618
1566
  set color(e) {
1619
- A.shared.setValue(e).alpha < 1 && this._backgroundColor.alpha === 1 && H(
1567
+ A.shared.setValue(e).alpha < 1 && this._backgroundColor.alpha === 1 && L(
1620
1568
  "Cannot set a transparent background on an opaque canvas. To enable transparency, set backgroundAlpha < 1 when initializing your Application."
1621
1569
  ), this._backgroundColor.setValue(e);
1622
1570
  }
@@ -1638,7 +1586,7 @@ const V = class Be {
1638
1586
  destroy() {
1639
1587
  }
1640
1588
  };
1641
- V.extension = {
1589
+ W.extension = {
1642
1590
  type: [
1643
1591
  u.WebGLSystem,
1644
1592
  u.WebGPUSystem,
@@ -1647,7 +1595,7 @@ V.extension = {
1647
1595
  name: "background",
1648
1596
  priority: 0
1649
1597
  };
1650
- V.defaultOptions = {
1598
+ W.defaultOptions = {
1651
1599
  /**
1652
1600
  * {@link WebGLOptions.backgroundAlpha}
1653
1601
  * @default 1
@@ -1664,55 +1612,80 @@ V.defaultOptions = {
1664
1612
  */
1665
1613
  clearBeforeRender: !0
1666
1614
  };
1667
- let mt = V;
1615
+ let pt = W;
1668
1616
  const y = {};
1669
- O.handle(u.BlendMode, (a) => {
1617
+ D.handle(u.BlendMode, (a) => {
1670
1618
  if (!a.name)
1671
1619
  throw new Error("BlendMode extension must have a name property");
1672
1620
  y[a.name] = a.ref;
1673
1621
  }, (a) => {
1674
1622
  delete y[a.name];
1675
1623
  });
1676
- class Ue {
1624
+ class we {
1677
1625
  constructor(e) {
1678
- this._isAdvanced = !1, this._filterHash = /* @__PURE__ */ Object.create(null), this._renderer = e, this._renderer.runners.prerender.add(this);
1626
+ this._blendModeStack = [], this._isAdvanced = !1, this._filterHash = /* @__PURE__ */ Object.create(null), this._renderer = e, this._renderer.runners.prerender.add(this);
1679
1627
  }
1680
1628
  prerender() {
1681
1629
  this._activeBlendMode = "normal", this._isAdvanced = !1;
1682
1630
  }
1683
1631
  /**
1684
- * This ensures that a blendMode switch is added to the instruction set if the blend mode has changed.
1685
- * @param renderable - The renderable we are adding to the instruction set
1686
- * @param blendMode - The blend mode of the renderable
1687
- * @param instructionSet - The instruction set we are adding to
1632
+ * Push a blend mode onto the internal stack and apply it to the instruction set if needed.
1633
+ * @param renderable - The renderable or {@link RenderGroup} associated with the change.
1634
+ * @param blendMode - The blend mode to activate.
1635
+ * @param instructionSet - The instruction set being built.
1636
+ */
1637
+ pushBlendMode(e, t, r) {
1638
+ this._blendModeStack.push(t), this.setBlendMode(e, t, r);
1639
+ }
1640
+ /**
1641
+ * Pop the last blend mode from the stack and apply the new top-of-stack mode.
1642
+ * @param instructionSet - The instruction set being built.
1643
+ */
1644
+ popBlendMode(e) {
1645
+ this._blendModeStack.pop();
1646
+ const t = this._blendModeStack[this._activeBlendMode.length - 1] ?? "normal";
1647
+ this.setBlendMode(null, t, e);
1648
+ }
1649
+ /**
1650
+ * Ensure a blend mode switch is added to the instruction set when the mode changes.
1651
+ * If an advanced blend mode is active, subsequent renderables will be collected so they can be
1652
+ * rendered within a single filter pass.
1653
+ * @param renderable - The renderable or {@link RenderGroup} to associate with the change, or null when unwinding.
1654
+ * @param blendMode - The target blend mode.
1655
+ * @param instructionSet - The instruction set being built.
1688
1656
  */
1689
1657
  setBlendMode(e, t, r) {
1658
+ var n;
1659
+ const s = e instanceof X;
1690
1660
  if (this._activeBlendMode === t) {
1691
- this._isAdvanced && this._renderableList.push(e);
1661
+ this._isAdvanced && e && !s && ((n = this._renderableList) == null || n.push(e));
1692
1662
  return;
1693
1663
  }
1694
- this._activeBlendMode = t, this._isAdvanced && this._endAdvancedBlendMode(r), this._isAdvanced = !!y[t], this._isAdvanced && (this._beginAdvancedBlendMode(r), this._renderableList.push(e));
1664
+ this._isAdvanced && this._endAdvancedBlendMode(r), this._activeBlendMode = t, e && (this._isAdvanced = !!y[t], this._isAdvanced && this._beginAdvancedBlendMode(e, r));
1695
1665
  }
1696
- _beginAdvancedBlendMode(e) {
1697
- this._renderer.renderPipes.batch.break(e);
1698
- const t = this._activeBlendMode;
1699
- if (!y[t]) {
1700
- H(`Unable to assign BlendMode: '${t}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
1666
+ _beginAdvancedBlendMode(e, t) {
1667
+ this._renderer.renderPipes.batch.break(t);
1668
+ const r = this._activeBlendMode;
1669
+ if (!y[r]) {
1670
+ L(`Unable to assign BlendMode: '${r}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
1701
1671
  return;
1702
1672
  }
1703
- let r = this._filterHash[t];
1704
- r || (r = this._filterHash[t] = new le(), r.filters = [new y[t]()]);
1705
- const s = {
1673
+ const s = this._ensureFilterEffect(r), n = e instanceof X, i = {
1706
1674
  renderPipeId: "filter",
1707
1675
  action: "pushFilter",
1708
- renderables: [],
1709
- filterEffect: r,
1676
+ filterEffect: s,
1677
+ renderables: n ? null : [e],
1678
+ container: n ? e.root : null,
1710
1679
  canBundle: !1
1711
1680
  };
1712
- this._renderableList = s.renderables, e.add(s);
1681
+ this._renderableList = i.renderables, t.add(i);
1682
+ }
1683
+ _ensureFilterEffect(e) {
1684
+ let t = this._filterHash[e];
1685
+ return t || (t = this._filterHash[e] = new ie(), t.filters = [new y[e]()]), t;
1713
1686
  }
1714
1687
  _endAdvancedBlendMode(e) {
1715
- this._renderableList = null, this._renderer.renderPipes.batch.break(e), e.add({
1688
+ this._isAdvanced = !1, this._renderableList = null, this._renderer.renderPipes.batch.break(e), e.add({
1716
1689
  renderPipeId: "filter",
1717
1690
  action: "popFilter",
1718
1691
  canBundle: !1
@@ -1742,7 +1715,7 @@ class Ue {
1742
1715
  this._filterHash = null;
1743
1716
  }
1744
1717
  }
1745
- Ue.extension = {
1718
+ we.extension = {
1746
1719
  type: [
1747
1720
  u.WebGLPipes,
1748
1721
  u.WebGPUPipes,
@@ -1754,7 +1727,7 @@ const R = {
1754
1727
  png: "image/png",
1755
1728
  jpg: "image/jpeg",
1756
1729
  webp: "image/webp"
1757
- }, N = class Ae {
1730
+ }, V = class Pe {
1758
1731
  /** @param renderer - The renderer this System works for. */
1759
1732
  constructor(e) {
1760
1733
  this._renderer = e;
@@ -1801,7 +1774,7 @@ const R = {
1801
1774
  * @category rendering
1802
1775
  */
1803
1776
  async image(e) {
1804
- const t = z.get().createImage();
1777
+ const t = H.get().createImage();
1805
1778
  return t.src = await this.base64(e), t;
1806
1779
  }
1807
1780
  /**
@@ -1839,7 +1812,7 @@ const R = {
1839
1812
  async base64(e) {
1840
1813
  e = this._normalizeOptions(
1841
1814
  e,
1842
- Ae.defaultImageOptions
1815
+ Pe.defaultImageOptions
1843
1816
  );
1844
1817
  const { format: t, quality: r } = e, s = this.canvas(e);
1845
1818
  if (s.toBlob !== void 0)
@@ -2075,21 +2048,21 @@ const R = {
2075
2048
  this._renderer = null;
2076
2049
  }
2077
2050
  };
2078
- N.extension = {
2051
+ V.extension = {
2079
2052
  type: [
2080
2053
  u.WebGLSystem,
2081
2054
  u.WebGPUSystem
2082
2055
  ],
2083
2056
  name: "extract"
2084
2057
  };
2085
- N.defaultImageOptions = {
2058
+ V.defaultImageOptions = {
2086
2059
  format: "png",
2087
2060
  quality: 1
2088
2061
  };
2089
- let vt = N;
2090
- class j extends m {
2062
+ let mt = V;
2063
+ class N extends m {
2091
2064
  static create(e) {
2092
- return new j({
2065
+ return new N({
2093
2066
  source: new T(e)
2094
2067
  });
2095
2068
  }
@@ -2104,8 +2077,8 @@ class j extends m {
2104
2077
  return this.source.resize(e, t, r), this;
2105
2078
  }
2106
2079
  }
2107
- const gt = new w(), xt = new F(), _t = [0, 0, 0, 0];
2108
- class Ie {
2080
+ const vt = new w(), gt = new O(), xt = [0, 0, 0, 0];
2081
+ class Re {
2109
2082
  constructor(e) {
2110
2083
  this._renderer = e;
2111
2084
  }
@@ -2155,10 +2128,10 @@ class Ie {
2155
2128
  });
2156
2129
  const t = e.resolution || this._renderer.resolution, r = e.antialias || this._renderer.view.antialias, s = e.target;
2157
2130
  let n = e.clearColor;
2158
- n ? n = Array.isArray(n) && n.length === 4 ? n : A.shared.setValue(n).toArray() : n = _t;
2159
- const i = ((d = e.frame) == null ? void 0 : d.copyTo(gt)) || qe(s, xt).rectangle;
2131
+ n ? n = Array.isArray(n) && n.length === 4 ? n : A.shared.setValue(n).toArray() : n = xt;
2132
+ const i = ((d = e.frame) == null ? void 0 : d.copyTo(vt)) || je(s, gt).rectangle;
2160
2133
  i.width = Math.max(i.width, 1 / t) | 0, i.height = Math.max(i.height, 1 / t) | 0;
2161
- const o = j.create({
2134
+ const o = N.create({
2162
2135
  ...e.textureSourceOptions,
2163
2136
  width: i.width,
2164
2137
  height: i.height,
@@ -2176,14 +2149,14 @@ class Ie {
2176
2149
  this._renderer = null;
2177
2150
  }
2178
2151
  }
2179
- Ie.extension = {
2152
+ Re.extension = {
2180
2153
  type: [
2181
2154
  u.WebGLSystem,
2182
2155
  u.WebGPUSystem
2183
2156
  ],
2184
2157
  name: "textureGenerator"
2185
2158
  };
2186
- class Ge {
2159
+ class Be {
2187
2160
  constructor(e) {
2188
2161
  this._stackIndex = 0, this._globalUniformDataStack = [], this._uniformsPool = [], this._activeUniforms = [], this._bindGroupPool = [], this._activeBindGroups = [], this._renderer = e;
2189
2162
  }
@@ -2208,7 +2181,7 @@ class Ge {
2208
2181
  const i = this._renderer.renderTarget.renderTarget, o = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
2209
2182
  worldTransformMatrix: new v(),
2210
2183
  worldColor: 4294967295,
2211
- offset: new Ke()
2184
+ offset: new $e()
2212
2185
  }, l = {
2213
2186
  projectionMatrix: t || this._renderer.renderTarget.projectionMatrix,
2214
2187
  resolution: e || i.size,
@@ -2225,13 +2198,13 @@ class Ge {
2225
2198
  0
2226
2199
  ), d.update();
2227
2200
  let h;
2228
- this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new Ye(), this._activeBindGroups.push(h), h.setResource(d, 0)), l.bindGroup = h, this._currentGlobalUniformData = l;
2201
+ this._renderer.renderPipes.uniformBatch ? h = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(d, !1) : (h = this._bindGroupPool.pop() || new qe(), this._activeBindGroups.push(h), h.setResource(d, 0)), l.bindGroup = h, this._currentGlobalUniformData = l;
2229
2202
  }
2230
2203
  push(e) {
2231
2204
  this.bind(e), this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;
2232
2205
  }
2233
2206
  pop() {
2234
- this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1], this._renderer.type === L.WEBGL && this._currentGlobalUniformData.bindGroup.resources[0].update();
2207
+ this._currentGlobalUniformData = this._globalUniformDataStack[--this._stackIndex - 1], this._renderer.type === F.WEBGL && this._currentGlobalUniformData.bindGroup.resources[0].update();
2235
2208
  }
2236
2209
  get bindGroup() {
2237
2210
  return this._currentGlobalUniformData.bindGroup;
@@ -2243,7 +2216,7 @@ class Ge {
2243
2216
  return this._currentGlobalUniformData.bindGroup.resources[0];
2244
2217
  }
2245
2218
  _createUniforms() {
2246
- return new ie({
2219
+ return new ae({
2247
2220
  uProjectionMatrix: { value: new v(), type: "mat3x3<f32>" },
2248
2221
  uWorldTransformMatrix: { value: new v(), type: "mat3x3<f32>" },
2249
2222
  // TODO - someone smart - set this to be a unorm8x4 rather than a vec4<f32>
@@ -2254,10 +2227,10 @@ class Ge {
2254
2227
  });
2255
2228
  }
2256
2229
  destroy() {
2257
- this._renderer = null;
2230
+ this._renderer = null, this._globalUniformDataStack.length = 0, this._uniformsPool.length = 0, this._activeUniforms.length = 0, this._bindGroupPool.length = 0, this._activeBindGroups.length = 0, this._currentGlobalUniformData = null;
2258
2231
  }
2259
2232
  }
2260
- Ge.extension = {
2233
+ Be.extension = {
2261
2234
  type: [
2262
2235
  u.WebGLSystem,
2263
2236
  u.WebGPUSystem,
@@ -2265,8 +2238,8 @@ Ge.extension = {
2265
2238
  ],
2266
2239
  name: "globalUniforms"
2267
2240
  };
2268
- let bt = 1;
2269
- class De {
2241
+ let _t = 1;
2242
+ class Ue {
2270
2243
  constructor() {
2271
2244
  this._tasks = [], this._offset = 0;
2272
2245
  }
@@ -2282,7 +2255,7 @@ class De {
2282
2255
  * @returns The unique identifier for the scheduled task.
2283
2256
  */
2284
2257
  repeat(e, t, r = !0) {
2285
- const s = bt++;
2258
+ const s = _t++;
2286
2259
  let n = 0;
2287
2260
  return r && (this._offset += 1e3, n = this._offset), this._tasks.push({
2288
2261
  func: e,
@@ -2327,7 +2300,7 @@ class De {
2327
2300
  Q.system.remove(this._update, this), this._tasks.length = 0;
2328
2301
  }
2329
2302
  }
2330
- De.extension = {
2303
+ Ue.extension = {
2331
2304
  type: [
2332
2305
  u.WebGLSystem,
2333
2306
  u.WebGPUSystem,
@@ -2337,9 +2310,9 @@ De.extension = {
2337
2310
  priority: 0
2338
2311
  };
2339
2312
  let se = !1;
2340
- function Tt(a) {
2313
+ function bt(a) {
2341
2314
  if (!se) {
2342
- if (z.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
2315
+ if (H.get().getNavigator().userAgent.toLowerCase().indexOf("chrome") > -1) {
2343
2316
  const e = [
2344
2317
  `%c %c %c %c %c PixiJS %c v${Z} (${a}) http://www.pixijs.com/
2345
2318
 
@@ -2356,7 +2329,7 @@ function Tt(a) {
2356
2329
  se = !0;
2357
2330
  }
2358
2331
  }
2359
- class $ {
2332
+ class j {
2360
2333
  constructor(e) {
2361
2334
  this._renderer = e;
2362
2335
  }
@@ -2367,11 +2340,11 @@ class $ {
2367
2340
  init(e) {
2368
2341
  if (e.hello) {
2369
2342
  let t = this._renderer.name;
2370
- this._renderer.type === L.WEBGL && (t += ` ${this._renderer.context.webGLVersion}`), Tt(t);
2343
+ this._renderer.type === F.WEBGL && (t += ` ${this._renderer.context.webGLVersion}`), bt(t);
2371
2344
  }
2372
2345
  }
2373
2346
  }
2374
- $.extension = {
2347
+ j.extension = {
2375
2348
  type: [
2376
2349
  u.WebGLSystem,
2377
2350
  u.WebGPUSystem,
@@ -2380,11 +2353,11 @@ $.extension = {
2380
2353
  name: "hello",
2381
2354
  priority: -2
2382
2355
  };
2383
- $.defaultOptions = {
2356
+ j.defaultOptions = {
2384
2357
  /** {@link WebGLOptions.hello} */
2385
2358
  hello: !1
2386
2359
  };
2387
- function yt(a) {
2360
+ function Tt(a) {
2388
2361
  let e = !1;
2389
2362
  for (const r in a)
2390
2363
  if (a[r] == null) {
@@ -2400,14 +2373,14 @@ function yt(a) {
2400
2373
  }
2401
2374
  return t;
2402
2375
  }
2403
- function kt(a) {
2376
+ function yt(a) {
2404
2377
  let e = 0;
2405
2378
  for (let t = 0; t < a.length; t++)
2406
2379
  a[t] == null ? e++ : a[t - e] = a[t];
2407
2380
  return a.length -= e, a;
2408
2381
  }
2409
- let Ct = 0;
2410
- const q = class Ee {
2382
+ let kt = 0;
2383
+ const $ = class Ae {
2411
2384
  /**
2412
2385
  * Creates a new RenderableGCSystem instance.
2413
2386
  * @param renderer - The renderer this garbage collection system works for
@@ -2420,7 +2393,7 @@ const q = class Ee {
2420
2393
  * @param options - Configuration options for the renderer
2421
2394
  */
2422
2395
  init(e) {
2423
- e = { ...Ee.defaultOptions, ...e }, this.maxUnusedTime = e.renderableGCMaxUnusedTime, this._frequency = e.renderableGCFrequency, this.enabled = e.renderableGCActive;
2396
+ e = { ...Ae.defaultOptions, ...e }, this.maxUnusedTime = e.renderableGCMaxUnusedTime, this._frequency = e.renderableGCFrequency, this.enabled = e.renderableGCActive;
2424
2397
  }
2425
2398
  /**
2426
2399
  * Gets whether the garbage collection system is currently enabled.
@@ -2442,13 +2415,13 @@ const q = class Ee {
2442
2415
  ), this._hashHandler = this._renderer.scheduler.repeat(
2443
2416
  () => {
2444
2417
  for (const t of this._managedHashes)
2445
- t.context[t.hash] = yt(t.context[t.hash]);
2418
+ t.context[t.hash] = Tt(t.context[t.hash]);
2446
2419
  },
2447
2420
  this._frequency
2448
2421
  ), this._arrayHandler = this._renderer.scheduler.repeat(
2449
2422
  () => {
2450
2423
  for (const t of this._managedArrays)
2451
- kt(t.context[t.hash]);
2424
+ yt(t.context[t.hash]);
2452
2425
  },
2453
2426
  this._frequency
2454
2427
  )) : (this._renderer.scheduler.cancel(this._handler), this._renderer.scheduler.cancel(this._hashHandler), this._renderer.scheduler.cancel(this._arrayHandler)));
@@ -2477,7 +2450,7 @@ const q = class Ee {
2477
2450
  prerender({
2478
2451
  container: e
2479
2452
  }) {
2480
- this._now = performance.now(), e.renderGroup.gcTick = Ct++, this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick);
2453
+ this._now = performance.now(), e.renderGroup.gcTick = kt++, this._updateInstructionGCTick(e.renderGroup, e.renderGroup.gcTick);
2481
2454
  }
2482
2455
  /**
2483
2456
  * Starts tracking a renderable for garbage collection.
@@ -2535,7 +2508,7 @@ const q = class Ee {
2535
2508
  this._updateInstructionGCTick(r, t);
2536
2509
  }
2537
2510
  };
2538
- q.extension = {
2511
+ $.extension = {
2539
2512
  type: [
2540
2513
  u.WebGLSystem,
2541
2514
  u.WebGPUSystem
@@ -2543,7 +2516,7 @@ q.extension = {
2543
2516
  name: "renderableGC",
2544
2517
  priority: 0
2545
2518
  };
2546
- q.defaultOptions = {
2519
+ $.defaultOptions = {
2547
2520
  /** Enable/disable the garbage collector */
2548
2521
  renderableGCActive: !0,
2549
2522
  /** Time in ms before an unused resource is collected (default 1 minute) */
@@ -2551,14 +2524,14 @@ q.defaultOptions = {
2551
2524
  /** How often to run garbage collection in ms (default 30 seconds) */
2552
2525
  renderableGCFrequency: 3e4
2553
2526
  };
2554
- let Mt = q;
2555
- const K = class Oe {
2527
+ let Ct = $;
2528
+ const q = class Ie {
2556
2529
  /** @param renderer - The renderer this System works for. */
2557
2530
  constructor(e) {
2558
2531
  this._renderer = e, this.count = 0, this.checkCount = 0;
2559
2532
  }
2560
2533
  init(e) {
2561
- e = { ...Oe.defaultOptions, ...e }, this.checkCountMax = e.textureGCCheckCountMax, this.maxIdle = e.textureGCAMaxIdle ?? e.textureGCMaxIdle, this.active = e.textureGCActive;
2534
+ e = { ...Ie.defaultOptions, ...e }, this.checkCountMax = e.textureGCCheckCountMax, this.maxIdle = e.textureGCAMaxIdle ?? e.textureGCMaxIdle, this.active = e.textureGCActive;
2562
2535
  }
2563
2536
  /**
2564
2537
  * Checks to see when the last time a texture was used.
@@ -2582,14 +2555,14 @@ const K = class Oe {
2582
2555
  this._renderer = null;
2583
2556
  }
2584
2557
  };
2585
- K.extension = {
2558
+ q.extension = {
2586
2559
  type: [
2587
2560
  u.WebGLSystem,
2588
2561
  u.WebGPUSystem
2589
2562
  ],
2590
2563
  name: "textureGC"
2591
2564
  };
2592
- K.defaultOptions = {
2565
+ q.defaultOptions = {
2593
2566
  /**
2594
2567
  * If set to true, this will enable the garbage collector on the GPU.
2595
2568
  * @default true
@@ -2611,8 +2584,8 @@ K.defaultOptions = {
2611
2584
  */
2612
2585
  textureGCCheckCountMax: 600
2613
2586
  };
2614
- let St = K;
2615
- const Y = class Fe {
2587
+ let Mt = q;
2588
+ const K = class Ge {
2616
2589
  /**
2617
2590
  * Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.
2618
2591
  * This is only supported for HTMLCanvasElement and will be ignored if the canvas is an OffscreenCanvas.
@@ -2641,9 +2614,9 @@ const Y = class Fe {
2641
2614
  */
2642
2615
  init(e) {
2643
2616
  e = {
2644
- ...Fe.defaultOptions,
2617
+ ...Ge.defaultOptions,
2645
2618
  ...e
2646
- }, e.view && (Je(Xe, "ViewSystem.view has been renamed to ViewSystem.canvas"), e.canvas = e.view), this.screen = new w(0, 0, e.width, e.height), this.canvas = e.canvas || z.get().createCanvas(), this.antialias = !!e.antialias, this.texture = Te(this.canvas, e), this.renderTarget = new G({
2619
+ }, e.view && (Ke(Ye, "ViewSystem.view has been renamed to ViewSystem.canvas"), e.canvas = e.view), this.screen = new w(0, 0, e.width, e.height), this.canvas = e.canvas || H.get().createCanvas(), this.antialias = !!e.antialias, this.texture = ge(this.canvas, e), this.renderTarget = new I({
2647
2620
  colorTextures: [this.texture],
2648
2621
  depth: !!e.depth,
2649
2622
  isRoot: !0
@@ -2667,10 +2640,10 @@ const Y = class Fe {
2667
2640
  * viewSystem.destroy({ removeView: true });
2668
2641
  */
2669
2642
  destroy(e = !1) {
2670
- (typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);
2643
+ (typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas), this.texture.destroy();
2671
2644
  }
2672
2645
  };
2673
- Y.extension = {
2646
+ K.extension = {
2674
2647
  type: [
2675
2648
  u.WebGLSystem,
2676
2649
  u.WebGPUSystem,
@@ -2679,7 +2652,7 @@ Y.extension = {
2679
2652
  name: "view",
2680
2653
  priority: 0
2681
2654
  };
2682
- Y.defaultOptions = {
2655
+ K.defaultOptions = {
2683
2656
  /**
2684
2657
  * {@link WebGLOptions.width}
2685
2658
  * @default 800
@@ -2701,41 +2674,41 @@ Y.defaultOptions = {
2701
2674
  */
2702
2675
  antialias: !1
2703
2676
  };
2704
- let wt = Y;
2705
- const Lt = [
2706
- mt,
2707
- Ge,
2708
- $,
2709
- wt,
2710
- Pe,
2677
+ let St = K;
2678
+ const Ft = [
2679
+ pt,
2680
+ Be,
2681
+ j,
2711
2682
  St,
2712
- Ie,
2713
- vt,
2714
- Qe,
2683
+ Ce,
2715
2684
  Mt,
2716
- De
2717
- ], Ht = [
2718
- Ue,
2719
- ge,
2720
2685
  Re,
2686
+ mt,
2687
+ Je,
2688
+ Ct,
2689
+ Ue
2690
+ ], Lt = [
2691
+ we,
2692
+ fe,
2721
2693
  Me,
2722
- xe,
2723
- be,
2724
- _e,
2725
- Ce
2694
+ Te,
2695
+ pe,
2696
+ ve,
2697
+ me,
2698
+ be
2726
2699
  ];
2727
2700
  export {
2728
- Ft as B,
2729
- x as G,
2730
- Ot as R,
2731
- Lt as S,
2732
- Gt as U,
2733
- Ht as a,
2734
- ot as b,
2735
- Dt as c,
2701
+ Ot as B,
2702
+ _ as G,
2703
+ Dt as R,
2704
+ Ft as S,
2705
+ It as U,
2706
+ Lt as a,
2707
+ it as b,
2708
+ Gt as c,
2736
2709
  C as d,
2737
- It as e,
2738
- At as f,
2739
- Ut as t,
2710
+ At as e,
2711
+ Ut as f,
2712
+ Bt as t,
2740
2713
  Et as u
2741
2714
  };