holostaff-widget 2.1.5 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BufferResource-OZ5Ul2Z8.js → BufferResource-C1ruXQTX.js} +13 -13
- package/dist/{BufferResource-OZ5Ul2Z8.js.map → BufferResource-C1ruXQTX.js.map} +1 -1
- package/dist/{CanvasRenderer-CD425hkf.js → CanvasRenderer-DbChYDOl.js} +22 -22
- package/dist/{CanvasRenderer-CD425hkf.js.map → CanvasRenderer-DbChYDOl.js.map} +1 -1
- package/dist/Filter-D2L1V9fN.js +57 -0
- package/dist/Filter-D2L1V9fN.js.map +1 -0
- package/dist/{RenderTargetSystem-DCdLBRV6.js → RenderTargetSystem-DPwhMcpZ.js} +70 -69
- package/dist/{RenderTargetSystem-DCdLBRV6.js.map → RenderTargetSystem-DPwhMcpZ.js.map} +1 -1
- package/dist/{WebGLRenderer-Dzf9OyZQ.js → WebGLRenderer-Cp6XondT.js} +22 -22
- package/dist/{WebGLRenderer-Dzf9OyZQ.js.map → WebGLRenderer-Cp6XondT.js.map} +1 -1
- package/dist/{WebGPURenderer-CYMkZfQR.js → WebGPURenderer-BDmK_KWD.js} +9 -9
- package/dist/{WebGPURenderer-CYMkZfQR.js.map → WebGPURenderer-BDmK_KWD.js.map} +1 -1
- package/dist/{browserAll-D-2sjrzE.js → browserAll-CjLyYNcB.js} +3 -3
- package/dist/{browserAll-D-2sjrzE.js.map → browserAll-CjLyYNcB.js.map} +1 -1
- package/dist/hs-widget.es.js +1 -1
- package/dist/hs-widget.umd.js +40 -78
- package/dist/hs-widget.umd.js.map +1 -1
- package/dist/{index-BFRj2AUJ.js → index-CgKgBdpC.js} +1329 -1441
- package/dist/index-CgKgBdpC.js.map +1 -0
- package/dist/{webworkerAll-BpL8oe51.js → webworkerAll-BGJHmEXB.js} +11 -10
- package/dist/{webworkerAll-BpL8oe51.js.map → webworkerAll-BGJHmEXB.js.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BFRj2AUJ.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { W as Ve, K as oe, M as m, G as Ne, b as je, a as $e, X as le, i as l, p as W, Y as w, Z as qe, _ as z, $ as T, R as V, a0 as de, a1 as Ke, T as f, c as g, I as D, a2 as ue, w as ce, a3 as ee, a4 as he, a5 as pe, a6 as fe, a7 as me, t as P, a8 as Ye, C as E, D as N, J as y, a9 as B, aa as Je, P as Xe, ab as Ze, z as Qe, q as te, ac as re, ad as p, e as et, o as O, ae as tt, af as rt, ag as st, ah as nt } from "./index-CgKgBdpC.js";
|
|
2
|
+
import { F as at } from "./Filter-D2L1V9fN.js";
|
|
2
3
|
var it = `in vec2 vMaskCoord;
|
|
3
4
|
in vec2 vTextureCoord;
|
|
4
5
|
|
|
@@ -169,14 +170,14 @@ fn mainFragment(
|
|
|
169
170
|
return source * a;
|
|
170
171
|
}
|
|
171
172
|
`;
|
|
172
|
-
class lt extends
|
|
173
|
+
class lt extends at {
|
|
173
174
|
constructor(e) {
|
|
174
|
-
const { sprite: t, ...r } = e, s = new
|
|
175
|
+
const { sprite: t, ...r } = e, s = new Ve(t.texture), n = new oe({
|
|
175
176
|
uFilterMatrix: { value: new m(), type: "mat3x3<f32>" },
|
|
176
177
|
uMaskClamp: { value: s.uClampFrame, type: "vec4<f32>" },
|
|
177
178
|
uAlpha: { value: 1, type: "f32" },
|
|
178
179
|
uInverse: { value: e.inverse ? 1 : 0, type: "f32" }
|
|
179
|
-
}), i =
|
|
180
|
+
}), i = Ne.from({
|
|
180
181
|
vertex: {
|
|
181
182
|
source: se,
|
|
182
183
|
entryPoint: "mainVertex"
|
|
@@ -185,7 +186,7 @@ class lt extends Ve {
|
|
|
185
186
|
source: se,
|
|
186
187
|
entryPoint: "mainFragment"
|
|
187
188
|
}
|
|
188
|
-
}), o =
|
|
189
|
+
}), o = je.from({
|
|
189
190
|
vertex: ot,
|
|
190
191
|
fragment: it,
|
|
191
192
|
name: "mask-filter"
|
|
@@ -217,7 +218,7 @@ class lt extends Ve {
|
|
|
217
218
|
const j = class ge {
|
|
218
219
|
constructor(e, t) {
|
|
219
220
|
var r, s;
|
|
220
|
-
this.state =
|
|
221
|
+
this.state = $e.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
222
|
}
|
|
222
223
|
static getBatcher(e) {
|
|
223
224
|
return new this._availableBatchers[e]();
|
|
@@ -286,7 +287,7 @@ const dt = new z();
|
|
|
286
287
|
class ut extends de {
|
|
287
288
|
constructor() {
|
|
288
289
|
super(), this.filters = [new lt({
|
|
289
|
-
sprite: new
|
|
290
|
+
sprite: new Ke(f.EMPTY),
|
|
290
291
|
inverse: !1,
|
|
291
292
|
resolution: "inherit",
|
|
292
293
|
antialias: "inherit"
|
|
@@ -350,7 +351,7 @@ class xe {
|
|
|
350
351
|
const s = w.get(ut);
|
|
351
352
|
if (s.inverse = e.inverse, r) {
|
|
352
353
|
e.mask.mask.measurable = !0;
|
|
353
|
-
const n =
|
|
354
|
+
const n = qe(e.mask.mask, !0, dt);
|
|
354
355
|
e.mask.mask.measurable = !1, n.ceil();
|
|
355
356
|
const i = t.renderTarget.renderTarget.colorTexture.source, o = T.getOptimalTexture(
|
|
356
357
|
n.width,
|
|
@@ -513,7 +514,7 @@ Te.extension = {
|
|
|
513
514
|
],
|
|
514
515
|
name: "stencilMask"
|
|
515
516
|
};
|
|
516
|
-
class
|
|
517
|
+
class ye {
|
|
517
518
|
constructor(e) {
|
|
518
519
|
this._renderer = e;
|
|
519
520
|
}
|
|
@@ -534,7 +535,7 @@ class ve {
|
|
|
534
535
|
this._renderer = null;
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
|
-
|
|
538
|
+
ye.extension = {
|
|
538
539
|
type: [
|
|
539
540
|
l.WebGLPipes,
|
|
540
541
|
l.WebGPUPipes,
|
|
@@ -549,7 +550,7 @@ function L(a, e) {
|
|
|
549
550
|
e[n.renderPipeId].execute(n);
|
|
550
551
|
}
|
|
551
552
|
}
|
|
552
|
-
class
|
|
553
|
+
class ve {
|
|
553
554
|
constructor(e) {
|
|
554
555
|
this._renderer = e;
|
|
555
556
|
}
|
|
@@ -591,7 +592,7 @@ class ye {
|
|
|
591
592
|
}), L(e, this._renderer.renderPipes), this._renderer.globalUniforms.pop();
|
|
592
593
|
}
|
|
593
594
|
}
|
|
594
|
-
|
|
595
|
+
ve.extension = {
|
|
595
596
|
type: [
|
|
596
597
|
l.WebGLPipes,
|
|
597
598
|
l.WebGPUPipes,
|
|
@@ -640,13 +641,13 @@ Ce.extension = {
|
|
|
640
641
|
],
|
|
641
642
|
name: "sprite"
|
|
642
643
|
};
|
|
643
|
-
const
|
|
644
|
+
const v = {};
|
|
644
645
|
W.handle(l.BlendMode, (a) => {
|
|
645
646
|
if (!a.name)
|
|
646
647
|
throw new Error("BlendMode extension must have a name property");
|
|
647
|
-
|
|
648
|
+
v[a.name] = a.ref;
|
|
648
649
|
}, (a) => {
|
|
649
|
-
delete
|
|
650
|
+
delete v[a.name];
|
|
650
651
|
});
|
|
651
652
|
class ke {
|
|
652
653
|
constructor(e) {
|
|
@@ -688,12 +689,12 @@ class ke {
|
|
|
688
689
|
this._isAdvanced && e && !s && ((n = this._renderableList) == null || n.push(e));
|
|
689
690
|
return;
|
|
690
691
|
}
|
|
691
|
-
this._isAdvanced && this._endAdvancedBlendMode(r), this._activeBlendMode = t, e && (this._isAdvanced = !!
|
|
692
|
+
this._isAdvanced && this._endAdvancedBlendMode(r), this._activeBlendMode = t, e && (this._isAdvanced = !!v[t], this._isAdvanced && this._beginAdvancedBlendMode(e, r));
|
|
692
693
|
}
|
|
693
694
|
_beginAdvancedBlendMode(e, t) {
|
|
694
695
|
this._renderer.renderPipes.batch.break(t);
|
|
695
696
|
const r = this._activeBlendMode;
|
|
696
|
-
if (!
|
|
697
|
+
if (!v[r]) {
|
|
697
698
|
ce(`Unable to assign BlendMode: '${r}'. You may want to include: import 'pixi.js/advanced-blend-modes'`);
|
|
698
699
|
return;
|
|
699
700
|
}
|
|
@@ -709,7 +710,7 @@ class ke {
|
|
|
709
710
|
}
|
|
710
711
|
_ensureFilterEffect(e) {
|
|
711
712
|
let t = this._filterHash[e];
|
|
712
|
-
return t || (t = this._filterHash[e] = new de(), t.filters = [new
|
|
713
|
+
return t || (t = this._filterHash[e] = new de(), t.filters = [new v[e]()]), t;
|
|
713
714
|
}
|
|
714
715
|
_endAdvancedBlendMode(e) {
|
|
715
716
|
this._isAdvanced = !1, this._renderableList = null, this._renderer.renderPipes.batch.break(e), e.add({
|
|
@@ -750,7 +751,7 @@ ke.extension = {
|
|
|
750
751
|
],
|
|
751
752
|
name: "blendMode"
|
|
752
753
|
};
|
|
753
|
-
function
|
|
754
|
+
function F(a, e) {
|
|
754
755
|
e || (e = 0);
|
|
755
756
|
for (let t = e; t < a.length && a[t]; t++)
|
|
756
757
|
a[t] = null;
|
|
@@ -765,7 +766,7 @@ function Me(a, e = !1) {
|
|
|
765
766
|
const h = o[c];
|
|
766
767
|
h.parentRenderGroup === a && h.relativeRenderGroupDepth === n && Re(h, r, 0);
|
|
767
768
|
}
|
|
768
|
-
|
|
769
|
+
F(o, d), i.index = 0;
|
|
769
770
|
}
|
|
770
771
|
if (e)
|
|
771
772
|
for (let s = 0; s < a.renderGroupChildren.length; s++)
|
|
@@ -861,13 +862,13 @@ class Se {
|
|
|
861
862
|
n,
|
|
862
863
|
i
|
|
863
864
|
);
|
|
864
|
-
c._source.style = new
|
|
865
|
+
c._source.style = new Ye({ scaleMode: o }), e.texture = c, e._textureBounds || (e._textureBounds = new z()), e._textureBounds.copyFrom(r), d !== e.texture && e.renderGroupParent && (e.renderGroupParent.structureDidChange = !0);
|
|
865
866
|
}
|
|
866
867
|
} else e.texture && (T.returnTexture(e.texture, !0), e.texture = null);
|
|
867
868
|
}
|
|
868
869
|
_updateRenderGroups(e) {
|
|
869
870
|
const t = this._renderer, r = t.renderPipes;
|
|
870
|
-
if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ?
|
|
871
|
+
if (e.runOnRender(t), e.instructionSet.renderPipes = r, e.structureDidChange ? F(e.childrenRenderablesToUpdate.list, 0) : pt(e, r), Me(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))
|
|
871
872
|
for (let s = 0; s < e.renderGroupChildren.length; s++)
|
|
872
873
|
this._updateRenderGroups(e.renderGroupChildren[s]);
|
|
873
874
|
}
|
|
@@ -877,7 +878,7 @@ class Se {
|
|
|
877
878
|
const n = t[s];
|
|
878
879
|
n.didViewUpdate && e.updateRenderable(n);
|
|
879
880
|
}
|
|
880
|
-
|
|
881
|
+
F(t, r);
|
|
881
882
|
}
|
|
882
883
|
_buildInstructions(e, t) {
|
|
883
884
|
const r = e.root, s = e.instructionSet;
|
|
@@ -1309,7 +1310,7 @@ class K extends f {
|
|
|
1309
1310
|
static create(e) {
|
|
1310
1311
|
const { dynamic: t, ...r } = e;
|
|
1311
1312
|
return new K({
|
|
1312
|
-
source: new
|
|
1313
|
+
source: new y(r),
|
|
1313
1314
|
dynamic: t ?? !1
|
|
1314
1315
|
});
|
|
1315
1316
|
}
|
|
@@ -1419,7 +1420,7 @@ function Tt(a) {
|
|
|
1419
1420
|
}
|
|
1420
1421
|
return t;
|
|
1421
1422
|
}
|
|
1422
|
-
function
|
|
1423
|
+
function yt(a) {
|
|
1423
1424
|
let e = 0;
|
|
1424
1425
|
for (let t = 0; t < a.length; t++)
|
|
1425
1426
|
a[t] == null ? e++ : a[t - e] = a[t];
|
|
@@ -1463,7 +1464,7 @@ const Y = class Ge {
|
|
|
1463
1464
|
() => {
|
|
1464
1465
|
for (const t of this._managedCollections) {
|
|
1465
1466
|
const { context: r, collection: s, type: n } = t;
|
|
1466
|
-
n === "hash" ? r[s] = Tt(r[s]) : r[s] =
|
|
1467
|
+
n === "hash" ? r[s] = Tt(r[s]) : r[s] = yt(r[s]);
|
|
1467
1468
|
}
|
|
1468
1469
|
},
|
|
1469
1470
|
this._frequency
|
|
@@ -1638,7 +1639,7 @@ Y.defaultOptions = {
|
|
|
1638
1639
|
/** How often to run garbage collection in ms (default 30 seconds) */
|
|
1639
1640
|
gcFrequency: 3e4
|
|
1640
1641
|
};
|
|
1641
|
-
let
|
|
1642
|
+
let vt = Y;
|
|
1642
1643
|
class Ue {
|
|
1643
1644
|
constructor(e) {
|
|
1644
1645
|
this._stackIndex = 0, this._globalUniformDataStack = [], this._uniformsPool = [], this._activeUniforms = [], this._bindGroupPool = [], this._activeBindGroups = [], this._renderer = e;
|
|
@@ -1664,7 +1665,7 @@ class Ue {
|
|
|
1664
1665
|
const i = this._renderer.renderTarget.renderTarget, o = this._stackIndex ? this._globalUniformDataStack[this._stackIndex - 1] : {
|
|
1665
1666
|
worldTransformMatrix: new m(),
|
|
1666
1667
|
worldColor: 4294967295,
|
|
1667
|
-
offset: new
|
|
1668
|
+
offset: new Xe()
|
|
1668
1669
|
}, d = {
|
|
1669
1670
|
projectionMatrix: t || this._renderer.renderTarget.projectionMatrix,
|
|
1670
1671
|
resolution: e || i.size,
|
|
@@ -1681,7 +1682,7 @@ class Ue {
|
|
|
1681
1682
|
0
|
|
1682
1683
|
), c.update();
|
|
1683
1684
|
let u;
|
|
1684
|
-
this._renderer.renderPipes.uniformBatch ? u = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(c, !1) : (u = this._bindGroupPool.pop() || new
|
|
1685
|
+
this._renderer.renderPipes.uniformBatch ? u = this._renderer.renderPipes.uniformBatch.getUniformBindGroup(c, !1) : (u = this._bindGroupPool.pop() || new Qe(), this._activeBindGroups.push(u), u.setResource(c, 0)), d.bindGroup = u, this._currentGlobalUniformData = d;
|
|
1685
1686
|
}
|
|
1686
1687
|
push(e) {
|
|
1687
1688
|
this.bind(e), this._globalUniformDataStack[this._stackIndex++] = this._currentGlobalUniformData;
|
|
@@ -1812,7 +1813,7 @@ function kt(a) {
|
|
|
1812
1813
|
ie = !0;
|
|
1813
1814
|
}
|
|
1814
1815
|
}
|
|
1815
|
-
class
|
|
1816
|
+
class J {
|
|
1816
1817
|
constructor(e) {
|
|
1817
1818
|
this._renderer = e;
|
|
1818
1819
|
}
|
|
@@ -1827,7 +1828,7 @@ class X {
|
|
|
1827
1828
|
}
|
|
1828
1829
|
}
|
|
1829
1830
|
}
|
|
1830
|
-
|
|
1831
|
+
J.extension = {
|
|
1831
1832
|
type: [
|
|
1832
1833
|
l.WebGLSystem,
|
|
1833
1834
|
l.WebGPUSystem,
|
|
@@ -1836,11 +1837,11 @@ X.extension = {
|
|
|
1836
1837
|
name: "hello",
|
|
1837
1838
|
priority: -2
|
|
1838
1839
|
};
|
|
1839
|
-
|
|
1840
|
+
J.defaultOptions = {
|
|
1840
1841
|
/** {@link WebGLOptions.hello} */
|
|
1841
1842
|
hello: !1
|
|
1842
1843
|
};
|
|
1843
|
-
const
|
|
1844
|
+
const X = class Ie {
|
|
1844
1845
|
/**
|
|
1845
1846
|
* Creates a new RenderableGCSystem instance.
|
|
1846
1847
|
* @param renderer - The renderer this garbage collection system works for
|
|
@@ -1906,7 +1907,7 @@ const J = class Ie {
|
|
|
1906
1907
|
this._renderer = null;
|
|
1907
1908
|
}
|
|
1908
1909
|
};
|
|
1909
|
-
|
|
1910
|
+
X.extension = {
|
|
1910
1911
|
type: [
|
|
1911
1912
|
l.WebGLSystem,
|
|
1912
1913
|
l.WebGPUSystem,
|
|
@@ -1915,7 +1916,7 @@ J.extension = {
|
|
|
1915
1916
|
name: "renderableGC",
|
|
1916
1917
|
priority: 0
|
|
1917
1918
|
};
|
|
1918
|
-
|
|
1919
|
+
X.defaultOptions = {
|
|
1919
1920
|
/** Enable/disable the garbage collector */
|
|
1920
1921
|
renderableGCActive: !0,
|
|
1921
1922
|
/** Time in ms before an unused resource is collected (default 1 minute) */
|
|
@@ -1923,8 +1924,8 @@ J.defaultOptions = {
|
|
|
1923
1924
|
/** How often to run garbage collection in ms (default 30 seconds) */
|
|
1924
1925
|
renderableGCFrequency: 3e4
|
|
1925
1926
|
};
|
|
1926
|
-
let Mt =
|
|
1927
|
-
const
|
|
1927
|
+
let Mt = X;
|
|
1928
|
+
const Z = class S {
|
|
1928
1929
|
/**
|
|
1929
1930
|
* Frame count since started.
|
|
1930
1931
|
* @readonly
|
|
@@ -1997,14 +1998,14 @@ const Q = class S {
|
|
|
1997
1998
|
this._renderer = null;
|
|
1998
1999
|
}
|
|
1999
2000
|
};
|
|
2000
|
-
|
|
2001
|
+
Z.extension = {
|
|
2001
2002
|
type: [
|
|
2002
2003
|
l.WebGLSystem,
|
|
2003
2004
|
l.WebGPUSystem
|
|
2004
2005
|
],
|
|
2005
2006
|
name: "textureGC"
|
|
2006
2007
|
};
|
|
2007
|
-
|
|
2008
|
+
Z.defaultOptions = {
|
|
2008
2009
|
/**
|
|
2009
2010
|
* If set to true, this will enable the garbage collector on the GPU.
|
|
2010
2011
|
* @default true
|
|
@@ -2026,17 +2027,17 @@ Q.defaultOptions = {
|
|
|
2026
2027
|
*/
|
|
2027
2028
|
textureGCCheckCountMax: 600
|
|
2028
2029
|
};
|
|
2029
|
-
let Rt =
|
|
2030
|
+
let Rt = Z;
|
|
2030
2031
|
const De = class Ee {
|
|
2031
2032
|
/**
|
|
2032
2033
|
* @param [descriptor] - Options for creating a render target.
|
|
2033
2034
|
*/
|
|
2034
2035
|
constructor(e = {}) {
|
|
2035
|
-
if (this.uid =
|
|
2036
|
+
if (this.uid = et("renderTarget"), this.colorTextures = [], this.dirtyId = 0, this.isRoot = !1, this._size = new Float32Array(2), this._managedColorTextures = !1, e = { ...Ee.defaultOptions, ...e }, this.stencil = e.stencil, this.depth = e.depth, this.isRoot = e.isRoot, typeof e.colorTextures == "number") {
|
|
2036
2037
|
this._managedColorTextures = !0;
|
|
2037
2038
|
for (let t = 0; t < e.colorTextures; t++)
|
|
2038
2039
|
this.colorTextures.push(
|
|
2039
|
-
new
|
|
2040
|
+
new y({
|
|
2040
2041
|
width: e.width,
|
|
2041
2042
|
height: e.height,
|
|
2042
2043
|
resolution: e.resolution,
|
|
@@ -2048,7 +2049,7 @@ const De = class Ee {
|
|
|
2048
2049
|
const t = this.colorTexture.source;
|
|
2049
2050
|
this.resize(t.width, t.height, t._resolution);
|
|
2050
2051
|
}
|
|
2051
|
-
this.colorTexture.source.on("resize", this.onSourceResize, this), (e.depthStencilTexture || this.stencil) && (e.depthStencilTexture instanceof f || e.depthStencilTexture instanceof
|
|
2052
|
+
this.colorTexture.source.on("resize", this.onSourceResize, this), (e.depthStencilTexture || this.stencil) && (e.depthStencilTexture instanceof f || e.depthStencilTexture instanceof y ? this.depthStencilTexture = e.depthStencilTexture.source : this.ensureDepthStencilTexture());
|
|
2052
2053
|
}
|
|
2053
2054
|
get size() {
|
|
2054
2055
|
const e = this._size;
|
|
@@ -2081,7 +2082,7 @@ const De = class Ee {
|
|
|
2081
2082
|
* @internal
|
|
2082
2083
|
*/
|
|
2083
2084
|
ensureDepthStencilTexture() {
|
|
2084
|
-
this.depthStencilTexture || (this.depthStencilTexture = new
|
|
2085
|
+
this.depthStencilTexture || (this.depthStencilTexture = new y({
|
|
2085
2086
|
width: this.width,
|
|
2086
2087
|
height: this.height,
|
|
2087
2088
|
resolution: this.resolution,
|
|
@@ -2122,9 +2123,9 @@ De.defaultOptions = {
|
|
|
2122
2123
|
/** is this a root element, true if this is gl context owners render target */
|
|
2123
2124
|
isRoot: !1
|
|
2124
2125
|
};
|
|
2125
|
-
let
|
|
2126
|
+
let H = De;
|
|
2126
2127
|
const b = /* @__PURE__ */ new Map();
|
|
2127
|
-
|
|
2128
|
+
tt.register(b);
|
|
2128
2129
|
function Oe(a, e) {
|
|
2129
2130
|
if (!b.has(a)) {
|
|
2130
2131
|
const t = new f({
|
|
@@ -2139,7 +2140,7 @@ function Oe(a, e) {
|
|
|
2139
2140
|
}
|
|
2140
2141
|
return b.get(a);
|
|
2141
2142
|
}
|
|
2142
|
-
const
|
|
2143
|
+
const Q = class Le {
|
|
2143
2144
|
/**
|
|
2144
2145
|
* Whether CSS dimensions of canvas view should be resized to screen dimensions automatically.
|
|
2145
2146
|
* This is only supported for HTMLCanvasElement and will be ignored if the canvas is an OffscreenCanvas.
|
|
@@ -2170,7 +2171,7 @@ const Z = class Le {
|
|
|
2170
2171
|
e = {
|
|
2171
2172
|
...Le.defaultOptions,
|
|
2172
2173
|
...e
|
|
2173
|
-
}, e.view && (p(
|
|
2174
|
+
}, e.view && (p(rt, "ViewSystem.view has been renamed to ViewSystem.canvas"), e.canvas = e.view), this.screen = new B(0, 0, e.width, e.height), this.canvas = e.canvas || N.get().createCanvas(), this.antialias = !!e.antialias, this.texture = Oe(this.canvas, e), this.renderTarget = new H({
|
|
2174
2175
|
colorTextures: [this.texture],
|
|
2175
2176
|
depth: !!e.depth,
|
|
2176
2177
|
isRoot: !0
|
|
@@ -2197,7 +2198,7 @@ const Z = class Le {
|
|
|
2197
2198
|
(typeof e == "boolean" ? e : !!(e != null && e.removeView)) && this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas), this.texture.destroy();
|
|
2198
2199
|
}
|
|
2199
2200
|
};
|
|
2200
|
-
|
|
2201
|
+
Q.extension = {
|
|
2201
2202
|
type: [
|
|
2202
2203
|
l.WebGLSystem,
|
|
2203
2204
|
l.WebGPUSystem,
|
|
@@ -2206,7 +2207,7 @@ Z.extension = {
|
|
|
2206
2207
|
name: "view",
|
|
2207
2208
|
priority: 0
|
|
2208
2209
|
};
|
|
2209
|
-
|
|
2210
|
+
Q.defaultOptions = {
|
|
2210
2211
|
/**
|
|
2211
2212
|
* {@link WebGLOptions.width}
|
|
2212
2213
|
* @default 800
|
|
@@ -2228,29 +2229,29 @@ Z.defaultOptions = {
|
|
|
2228
2229
|
*/
|
|
2229
2230
|
antialias: !1
|
|
2230
2231
|
};
|
|
2231
|
-
let St =
|
|
2232
|
-
const
|
|
2232
|
+
let St = Q;
|
|
2233
|
+
const Ut = [
|
|
2233
2234
|
mt,
|
|
2234
2235
|
Ue,
|
|
2235
|
-
|
|
2236
|
+
J,
|
|
2236
2237
|
St,
|
|
2237
2238
|
Se,
|
|
2238
|
-
|
|
2239
|
+
vt,
|
|
2239
2240
|
Rt,
|
|
2240
2241
|
Be,
|
|
2241
2242
|
gt,
|
|
2242
|
-
|
|
2243
|
+
st,
|
|
2243
2244
|
Mt,
|
|
2244
2245
|
Ae
|
|
2245
|
-
],
|
|
2246
|
+
], At = [
|
|
2246
2247
|
ke,
|
|
2247
2248
|
_e,
|
|
2248
2249
|
Ce,
|
|
2249
|
-
|
|
2250
|
+
ve,
|
|
2250
2251
|
xe,
|
|
2251
2252
|
Te,
|
|
2252
2253
|
be,
|
|
2253
|
-
|
|
2254
|
+
ye
|
|
2254
2255
|
];
|
|
2255
2256
|
function wt(a, e, t, r, s, n) {
|
|
2256
2257
|
const i = n ? 1 : -1;
|
|
@@ -2260,9 +2261,9 @@ function Pt(a) {
|
|
|
2260
2261
|
const e = a.colorTexture.source.resource;
|
|
2261
2262
|
return globalThis.HTMLCanvasElement && e instanceof HTMLCanvasElement && document.body.contains(e);
|
|
2262
2263
|
}
|
|
2263
|
-
class
|
|
2264
|
+
class It {
|
|
2264
2265
|
constructor(e) {
|
|
2265
|
-
this.rootViewPort = new B(), this.viewport = new B(), this.mipLevel = 0, this.layer = 0, this.onRenderTargetChange = new
|
|
2266
|
+
this.rootViewPort = new B(), this.viewport = new B(), this.mipLevel = 0, this.layer = 0, this.onRenderTargetChange = new nt("onRenderTargetChange"), this.projectionMatrix = new m(), this.defaultClearColor = [0, 0, 0, 0], this._renderSurfaceToRenderTargetHash = /* @__PURE__ */ new Map(), this._gpuRenderTargetHash = /* @__PURE__ */ Object.create(null), this._renderTargetStack = [], this._renderer = e, e.gc.addCollection(this, "_gpuRenderTargetHash", "hash");
|
|
2266
2267
|
}
|
|
2267
2268
|
/** called when dev wants to finish a render pass */
|
|
2268
2269
|
finishRenderPass() {
|
|
@@ -2337,8 +2338,8 @@ class At {
|
|
|
2337
2338
|
this.mipLevel = n | 0, this.layer = i | 0;
|
|
2338
2339
|
const _ = Math.max(h.pixelWidth >> n, 1), x = Math.max(h.pixelHeight >> n, 1);
|
|
2339
2340
|
if (!s && e instanceof f && (s = e.frame), s) {
|
|
2340
|
-
const C = h._resolution, k = 1 << Math.max(n | 0, 0),
|
|
2341
|
-
let M = Math.floor(
|
|
2341
|
+
const C = h._resolution, k = 1 << Math.max(n | 0, 0), Fe = s.x * C + 0.5 | 0, He = s.y * C + 0.5 | 0, We = s.width * C + 0.5 | 0, ze = s.height * C + 0.5 | 0;
|
|
2342
|
+
let M = Math.floor(Fe / k), R = Math.floor(He / k), U = Math.ceil(We / k), A = Math.ceil(ze / k);
|
|
2342
2343
|
M = Math.min(Math.max(M, 0), _ - 1), R = Math.min(Math.max(R, 0), x - 1), U = Math.min(Math.max(U, 1), _ - M), A = Math.min(Math.max(A, 1), x - R), u.x = M, u.y = R, u.width = U, u.height = A;
|
|
2343
2344
|
} else
|
|
2344
2345
|
u.x = 0, u.y = 0, u.width = _, u.height = x;
|
|
@@ -2471,7 +2472,7 @@ class At {
|
|
|
2471
2472
|
}
|
|
2472
2473
|
_initRenderTarget(e) {
|
|
2473
2474
|
let t = null;
|
|
2474
|
-
return O.test(e) && (e = Oe(e).source), e instanceof
|
|
2475
|
+
return O.test(e) && (e = Oe(e).source), e instanceof H ? t = e : e instanceof y && (t = new H({
|
|
2475
2476
|
colorTextures: [e]
|
|
2476
2477
|
}), e.source instanceof O && (t.isRoot = !0), e.once("destroy", () => {
|
|
2477
2478
|
t.destroy(), this._renderSurfaceToRenderTargetHash.delete(e);
|
|
@@ -2489,12 +2490,12 @@ class At {
|
|
|
2489
2490
|
export {
|
|
2490
2491
|
xe as A,
|
|
2491
2492
|
ke as B,
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2493
|
+
ye as C,
|
|
2494
|
+
It as R,
|
|
2495
|
+
Ut as S,
|
|
2495
2496
|
_e as a,
|
|
2496
2497
|
Ce as b,
|
|
2497
|
-
|
|
2498
|
-
|
|
2498
|
+
ve as c,
|
|
2499
|
+
At as d
|
|
2499
2500
|
};
|
|
2500
|
-
//# sourceMappingURL=RenderTargetSystem-
|
|
2501
|
+
//# sourceMappingURL=RenderTargetSystem-DPwhMcpZ.js.map
|