@alxxsck/ai-assistant 1.4.0 → 1.7.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/README.md +24 -10
- package/dist/App.d.ts +6 -0
- package/dist/{Avatar-B6ktAPlH.js → Avatar-_GvrPzkn.js} +296 -295
- package/dist/{OrbitControls-BE3BANZi.js → OrbitControls-BCIW0o5s.js} +1 -1
- package/dist/api/messages.api.d.ts +1 -1
- package/dist/api/messages.api.types.d.ts +6 -0
- package/dist/api/voice.api.d.ts +3 -2
- package/dist/api/voice.api.types.d.ts +11 -13
- package/dist/avatar/AnimationManager.d.ts +0 -2
- package/dist/bridge-ai-chat-widget.es.js +7893 -4449
- package/dist/domain/command/CommandRuntime.d.ts +1 -1
- package/dist/domain/command/command.errors.d.ts +2 -2
- package/dist/domain/command/command.types.d.ts +0 -1
- package/dist/domain/message/cable/widget-frame.d.ts +1 -1
- package/dist/domain/message/cable/widget-message.d.ts +2 -1
- package/dist/domain/message/message-stream.d.ts +10 -0
- package/dist/domain/message/message.store.d.ts +24 -1
- package/dist/domain/voice/voice.store.d.ts +4 -4
- package/dist/index.d.ts +7 -0
- package/dist/index.types.d.ts +1 -1
- package/dist/lib/retrieveContent.d.ts +2 -1
- package/dist/ui/components/ChatMessage.d.ts +1 -1
- package/dist/ui/components/ChatTypingIndicator.d.ts +4 -2
- package/dist/ui/components/OptimisticCustomerMessage.d.ts +6 -0
- package/dist/ui/components/PendingAssistantMessage.d.ts +6 -0
- package/dist/ui/components/StreamingMessageText.d.ts +10 -0
- package/dist/ui/hooks/usePinnedAutoScroll.d.ts +10 -0
- package/dist/ui/hooks/useSmoothStreamingText.d.ts +7 -0
- package/dist/ui/streaming/smooth-text.d.ts +21 -0
- package/package.json +2 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var Fr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
|
-
const Dl = "182", rS = { ROTATE: 0, DOLLY: 1, PAN: 2 }, sS = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, kf = 0, Sc = 1, Vf = 2,
|
|
2
|
+
const Dl = "182", rS = { ROTATE: 0, DOLLY: 1, PAN: 2 }, sS = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, kf = 0, Sc = 1, Vf = 2, $s = 1, Wu = 2, Hr = 3, di = 0, Jt = 1, Zn = 2, $n = 0, ur = 1, Mc = 2, Tc = 3, bc = 4, zf = 5, Pi = 100, Gf = 101, Hf = 102, Wf = 103, Xf = 104, qf = 200, Yf = 201, Kf = 202, Zf = 203, Ao = 204, Eo = 205, $f = 206, jf = 207, Jf = 208, Qf = 209, ed = 210, td = 211, nd = 212, id = 213, rd = 214, wo = 0, Ro = 1, Co = 2, dr = 3, Po = 4, Io = 5, Do = 6, Lo = 7, ga = 0, sd = 1, ad = 2, Un = 0, Xu = 1, qu = 2, Yu = 3, Ku = 4, Zu = 5, $u = 6, ju = 7, Ac = "attached", od = "detached", Ju = 300, Bi = 301, pr = 302, sa = 303, Fo = 304, va = 306, wt = 1e3, En = 1001, Uo = 1002, Lt = 1003, ld = 1004, Ms = 1005, Vt = 1006, Ia = 1007, Di = 1008, sn = 1009, Qu = 1010, eh = 1011, ns = 1012, Ll = 1013, Bn = 1014, wn = 1015, Jn = 1016, Fl = 1017, Ul = 1018, is = 1020, th = 35902, nh = 35899, ih = 1021, rh = 1022, mn = 1023, Qn = 1026, Li = 1027, sh = 1028, Nl = 1029, mr = 1030, Ol = 1031, Bl = 1033, js = 33776, Js = 33777, Qs = 33778, ea = 33779, No = 35840, Oo = 35841, Bo = 35842, ko = 35843, Vo = 36196, zo = 37492, Go = 37496, Ho = 37488, Wo = 37489, Xo = 37490, qo = 37491, Yo = 37808, Ko = 37809, Zo = 37810, $o = 37811, jo = 37812, Jo = 37813, Qo = 37814, el = 37815, tl = 37816, nl = 37817, il = 37818, rl = 37819, sl = 37820, al = 37821, ol = 36492, ll = 36494, cl = 36495, ul = 36283, hl = 36284, fl = 36285, dl = 36286, ah = 2200, cd = 2201, ud = 2202, aa = 2300, pl = 2301, Da = 2302, sr = 2400, ar = 2401, oa = 2402, kl = 2500, hd = 2501, fd = 3200, xa = 0, dd = 1, ci = "", Fe = "srgb", _r = "srgb-linear", la = "linear", nt = "srgb", Gi = 7680, Ec = 519, pd = 512, md = 513, _d = 514, Vl = 515, gd = 516, vd = 517, zl = 518, xd = 519, wc = 35044, Rc = "300 es", Fn = 2e3, ca = 2001;
|
|
3
3
|
function oh(s) {
|
|
4
4
|
for (let e = s.length - 1; e >= 0; --e)
|
|
5
5
|
if (s[e] >= 65535) return !0;
|
|
@@ -2637,7 +2637,7 @@ function kd() {
|
|
|
2637
2637
|
*/
|
|
2638
2638
|
spaces: {},
|
|
2639
2639
|
convert: function(i, r, a) {
|
|
2640
|
-
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer === nt && (i.r =
|
|
2640
|
+
return this.enabled === !1 || r === a || !r || !a || (this.spaces[r].transfer === nt && (i.r = jn(i.r), i.g = jn(i.g), i.b = jn(i.b)), this.spaces[r].primaries !== this.spaces[a].primaries && (i.applyMatrix3(this.spaces[r].toXYZ), i.applyMatrix3(this.spaces[a].fromXYZ)), this.spaces[a].transfer === nt && (i.r = hr(i.r), i.g = hr(i.g), i.b = hr(i.b))), i;
|
|
2641
2641
|
},
|
|
2642
2642
|
workingToColorSpace: function(i, r) {
|
|
2643
2643
|
return this.convert(i, this.workingColorSpace, r);
|
|
@@ -2701,7 +2701,7 @@ function kd() {
|
|
|
2701
2701
|
}), s;
|
|
2702
2702
|
}
|
|
2703
2703
|
const Oe = /* @__PURE__ */ kd();
|
|
2704
|
-
function
|
|
2704
|
+
function jn(s) {
|
|
2705
2705
|
return s < 0.04045 ? s * 0.0773993808 : Math.pow(s * 0.9478672986 + 0.0521327014, 2.4);
|
|
2706
2706
|
}
|
|
2707
2707
|
function hr(s) {
|
|
@@ -2743,12 +2743,12 @@ class Vd {
|
|
|
2743
2743
|
n.drawImage(e, 0, 0, e.width, e.height);
|
|
2744
2744
|
const i = n.getImageData(0, 0, e.width, e.height), r = i.data;
|
|
2745
2745
|
for (let a = 0; a < r.length; a++)
|
|
2746
|
-
r[a] =
|
|
2746
|
+
r[a] = jn(r[a] / 255) * 255;
|
|
2747
2747
|
return n.putImageData(i, 0, 0), t;
|
|
2748
2748
|
} else if (e.data) {
|
|
2749
2749
|
const t = e.data.slice(0);
|
|
2750
2750
|
for (let n = 0; n < t.length; n++)
|
|
2751
|
-
t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[n] = Math.floor(
|
|
2751
|
+
t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[n] = Math.floor(jn(t[n] / 255) * 255) : t[n] = jn(t[n]);
|
|
2752
2752
|
return {
|
|
2753
2753
|
data: t,
|
|
2754
2754
|
width: e.width,
|
|
@@ -5669,7 +5669,7 @@ class ch {
|
|
|
5669
5669
|
}
|
|
5670
5670
|
}
|
|
5671
5671
|
let Kd = 0;
|
|
5672
|
-
const Oc = /* @__PURE__ */ new U(), Ki = /* @__PURE__ */ new Dt(), Wn = /* @__PURE__ */ new be(), Cs = /* @__PURE__ */ new U(), Or = /* @__PURE__ */ new U(), Zd = /* @__PURE__ */ new U(),
|
|
5672
|
+
const Oc = /* @__PURE__ */ new U(), Ki = /* @__PURE__ */ new Dt(), Wn = /* @__PURE__ */ new be(), Cs = /* @__PURE__ */ new U(), Or = /* @__PURE__ */ new U(), Zd = /* @__PURE__ */ new U(), $d = /* @__PURE__ */ new Dt(), Bc = /* @__PURE__ */ new U(1, 0, 0), kc = /* @__PURE__ */ new U(0, 1, 0), Vc = /* @__PURE__ */ new U(0, 0, 1), zc = { type: "added" }, jd = { type: "removed" }, Zi = { type: "childadded", child: null }, Ga = { type: "childremoved", child: null };
|
|
5673
5673
|
class pt extends gi {
|
|
5674
5674
|
/**
|
|
5675
5675
|
* Constructs a new 3D object.
|
|
@@ -6003,7 +6003,7 @@ class pt extends gi {
|
|
|
6003
6003
|
return this;
|
|
6004
6004
|
}
|
|
6005
6005
|
const t = this.children.indexOf(e);
|
|
6006
|
-
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(
|
|
6006
|
+
return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(jd), Ga.child = e, this.dispatchEvent(Ga), Ga.child = null), this;
|
|
6007
6007
|
}
|
|
6008
6008
|
/**
|
|
6009
6009
|
* Removes this 3D object from its current parent.
|
|
@@ -6115,7 +6115,7 @@ class pt extends gi {
|
|
|
6115
6115
|
* @return {Vector3} The 3D object's scale in world space.
|
|
6116
6116
|
*/
|
|
6117
6117
|
getWorldScale(e) {
|
|
6118
|
-
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Or,
|
|
6118
|
+
return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Or, $d, e), e;
|
|
6119
6119
|
}
|
|
6120
6120
|
/**
|
|
6121
6121
|
* Returns a vector representing the ("look") direction of the 3D object in world space.
|
|
@@ -6327,7 +6327,7 @@ class pt extends gi {
|
|
|
6327
6327
|
pt.DEFAULT_UP = /* @__PURE__ */ new U(0, 1, 0);
|
|
6328
6328
|
pt.DEFAULT_MATRIX_AUTO_UPDATE = !0;
|
|
6329
6329
|
pt.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
|
|
6330
|
-
const Sn = /* @__PURE__ */ new U(), Xn = /* @__PURE__ */ new U(), Ha = /* @__PURE__ */ new U(), qn = /* @__PURE__ */ new U(),
|
|
6330
|
+
const Sn = /* @__PURE__ */ new U(), Xn = /* @__PURE__ */ new U(), Ha = /* @__PURE__ */ new U(), qn = /* @__PURE__ */ new U(), $i = /* @__PURE__ */ new U(), ji = /* @__PURE__ */ new U(), Gc = /* @__PURE__ */ new U(), Wa = /* @__PURE__ */ new U(), Xa = /* @__PURE__ */ new U(), qa = /* @__PURE__ */ new U(), Ya = /* @__PURE__ */ new Je(), Ka = /* @__PURE__ */ new Je(), Za = /* @__PURE__ */ new Je();
|
|
6331
6331
|
class bn {
|
|
6332
6332
|
/**
|
|
6333
6333
|
* Constructs a new triangle.
|
|
@@ -6580,29 +6580,29 @@ class bn {
|
|
|
6580
6580
|
closestPointToPoint(e, t) {
|
|
6581
6581
|
const n = this.a, i = this.b, r = this.c;
|
|
6582
6582
|
let a, o;
|
|
6583
|
-
|
|
6584
|
-
const c =
|
|
6583
|
+
$i.subVectors(i, n), ji.subVectors(r, n), Wa.subVectors(e, n);
|
|
6584
|
+
const c = $i.dot(Wa), u = ji.dot(Wa);
|
|
6585
6585
|
if (c <= 0 && u <= 0)
|
|
6586
6586
|
return t.copy(n);
|
|
6587
6587
|
Xa.subVectors(e, i);
|
|
6588
|
-
const d =
|
|
6588
|
+
const d = $i.dot(Xa), l = ji.dot(Xa);
|
|
6589
6589
|
if (d >= 0 && l <= d)
|
|
6590
6590
|
return t.copy(i);
|
|
6591
6591
|
const h = c * l - d * u;
|
|
6592
6592
|
if (h <= 0 && c >= 0 && d <= 0)
|
|
6593
|
-
return a = c / (c - d), t.copy(n).addScaledVector(
|
|
6593
|
+
return a = c / (c - d), t.copy(n).addScaledVector($i, a);
|
|
6594
6594
|
qa.subVectors(e, r);
|
|
6595
|
-
const f =
|
|
6595
|
+
const f = $i.dot(qa), p = ji.dot(qa);
|
|
6596
6596
|
if (p >= 0 && f <= p)
|
|
6597
6597
|
return t.copy(r);
|
|
6598
6598
|
const g = f * u - c * p;
|
|
6599
6599
|
if (g <= 0 && u >= 0 && p <= 0)
|
|
6600
|
-
return o = u / (u - p), t.copy(n).addScaledVector(
|
|
6600
|
+
return o = u / (u - p), t.copy(n).addScaledVector(ji, o);
|
|
6601
6601
|
const _ = d * p - f * l;
|
|
6602
6602
|
if (_ <= 0 && l - d >= 0 && f - p >= 0)
|
|
6603
6603
|
return Gc.subVectors(r, i), o = (l - d) / (l - d + (f - p)), t.copy(i).addScaledVector(Gc, o);
|
|
6604
6604
|
const m = 1 / (_ + g + h);
|
|
6605
|
-
return a = g * m, o = h * m, t.copy(n).addScaledVector(
|
|
6605
|
+
return a = g * m, o = h * m, t.copy(n).addScaledVector($i, a).addScaledVector(ji, o);
|
|
6606
6606
|
}
|
|
6607
6607
|
/**
|
|
6608
6608
|
* Returns `true` if this triangle is equal with the given one.
|
|
@@ -6764,7 +6764,7 @@ const uh = {
|
|
|
6764
6764
|
yellow: 16776960,
|
|
6765
6765
|
yellowgreen: 10145074
|
|
6766
6766
|
}, ai = { h: 0, s: 0, l: 0 }, Ps = { h: 0, s: 0, l: 0 };
|
|
6767
|
-
function
|
|
6767
|
+
function $a(s, e, t) {
|
|
6768
6768
|
return t < 0 && (t += 1), t > 1 && (t -= 1), t < 1 / 6 ? s + (e - s) * 6 * t : t < 1 / 2 ? e : t < 2 / 3 ? s + (e - s) * 6 * (2 / 3 - t) : s;
|
|
6769
6769
|
}
|
|
6770
6770
|
class Ie {
|
|
@@ -6844,7 +6844,7 @@ class Ie {
|
|
|
6844
6844
|
this.r = this.g = this.b = n;
|
|
6845
6845
|
else {
|
|
6846
6846
|
const r = n <= 0.5 ? n * (1 + t) : n + t - n * t, a = 2 * n - r;
|
|
6847
|
-
this.r =
|
|
6847
|
+
this.r = $a(a, r, e + 1 / 3), this.g = $a(a, r, e), this.b = $a(a, r, e - 1 / 3);
|
|
6848
6848
|
}
|
|
6849
6849
|
return Oe.colorSpaceToWorking(this, i), this;
|
|
6850
6850
|
}
|
|
@@ -6955,7 +6955,7 @@ class Ie {
|
|
|
6955
6955
|
* @return {Color} A reference to this color.
|
|
6956
6956
|
*/
|
|
6957
6957
|
copySRGBToLinear(e) {
|
|
6958
|
-
return this.r =
|
|
6958
|
+
return this.r = jn(e.r), this.g = jn(e.g), this.b = jn(e.b), this;
|
|
6959
6959
|
}
|
|
6960
6960
|
/**
|
|
6961
6961
|
* Copies the given color into this color, and then converts this color from
|
|
@@ -7782,7 +7782,7 @@ class Bt extends On {
|
|
|
7782
7782
|
}
|
|
7783
7783
|
}
|
|
7784
7784
|
let ep = 0;
|
|
7785
|
-
const hn = /* @__PURE__ */ new be(),
|
|
7785
|
+
const hn = /* @__PURE__ */ new be(), ja = /* @__PURE__ */ new pt(), Ji = /* @__PURE__ */ new U(), rn = /* @__PURE__ */ new wr(), Br = /* @__PURE__ */ new wr(), It = /* @__PURE__ */ new U();
|
|
7786
7786
|
class on extends gi {
|
|
7787
7787
|
/**
|
|
7788
7788
|
* Constructs a new geometry.
|
|
@@ -7988,7 +7988,7 @@ class on extends gi {
|
|
|
7988
7988
|
* @return {BufferGeometry} A reference to this instance.
|
|
7989
7989
|
*/
|
|
7990
7990
|
lookAt(e) {
|
|
7991
|
-
return
|
|
7991
|
+
return ja.lookAt(e), ja.updateMatrix(), this.applyMatrix4(ja.matrix), this;
|
|
7992
7992
|
}
|
|
7993
7993
|
/**
|
|
7994
7994
|
* Center the geometry based on its bounding box.
|
|
@@ -8479,8 +8479,8 @@ class gs extends on {
|
|
|
8479
8479
|
}
|
|
8480
8480
|
for (let se = 0; se < I; se++)
|
|
8481
8481
|
for (let he = 0; he < R; he++) {
|
|
8482
|
-
const Ue = h + he + H * se, Pe = h + he + H * (se + 1), lt = h + (he + 1) + H * (se + 1),
|
|
8483
|
-
c.push(Ue, Pe,
|
|
8482
|
+
const Ue = h + he + H * se, Pe = h + he + H * (se + 1), lt = h + (he + 1) + H * (se + 1), $e = h + (he + 1) + H * se;
|
|
8483
|
+
c.push(Ue, Pe, $e), c.push(Pe, lt, $e), Z += 6;
|
|
8484
8484
|
}
|
|
8485
8485
|
o.addGroup(f, Z, y), f += Z, h += z;
|
|
8486
8486
|
}
|
|
@@ -8965,7 +8965,7 @@ class mh extends Nn {
|
|
|
8965
8965
|
vertexShader: n.vertexShader,
|
|
8966
8966
|
fragmentShader: n.fragmentShader,
|
|
8967
8967
|
side: Jt,
|
|
8968
|
-
blending:
|
|
8968
|
+
blending: $n
|
|
8969
8969
|
});
|
|
8970
8970
|
r.uniforms.tEquirect.value = t;
|
|
8971
8971
|
const a = new vn(i, r), o = t.minFilter;
|
|
@@ -9124,7 +9124,7 @@ class lp extends pt {
|
|
|
9124
9124
|
return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
|
|
9125
9125
|
}
|
|
9126
9126
|
}
|
|
9127
|
-
const Kc = /* @__PURE__ */ new U(), Zc = /* @__PURE__ */ new Je(),
|
|
9127
|
+
const Kc = /* @__PURE__ */ new U(), Zc = /* @__PURE__ */ new Je(), $c = /* @__PURE__ */ new Je(), cp = /* @__PURE__ */ new U(), jc = /* @__PURE__ */ new be(), ks = /* @__PURE__ */ new U(), eo = /* @__PURE__ */ new Rr(), Jc = /* @__PURE__ */ new be(), to = /* @__PURE__ */ new Wl();
|
|
9128
9128
|
class up extends vn {
|
|
9129
9129
|
/**
|
|
9130
9130
|
* Constructs a new skinned mesh.
|
|
@@ -9213,12 +9213,12 @@ class up extends vn {
|
|
|
9213
9213
|
*/
|
|
9214
9214
|
applyBoneTransform(e, t) {
|
|
9215
9215
|
const n = this.skeleton, i = this.geometry;
|
|
9216
|
-
Zc.fromBufferAttribute(i.attributes.skinIndex, e),
|
|
9216
|
+
Zc.fromBufferAttribute(i.attributes.skinIndex, e), $c.fromBufferAttribute(i.attributes.skinWeight, e), Kc.copy(t).applyMatrix4(this.bindMatrix), t.set(0, 0, 0);
|
|
9217
9217
|
for (let r = 0; r < 4; r++) {
|
|
9218
|
-
const a =
|
|
9218
|
+
const a = $c.getComponent(r);
|
|
9219
9219
|
if (a !== 0) {
|
|
9220
9220
|
const o = Zc.getComponent(r);
|
|
9221
|
-
|
|
9221
|
+
jc.multiplyMatrices(n.bones[o].matrixWorld, n.boneInverses[o]), t.addScaledVector(cp.copy(Kc).applyMatrix4(jc), a);
|
|
9222
9222
|
}
|
|
9223
9223
|
}
|
|
9224
9224
|
return t.applyMatrix4(this.bindMatrixInverse);
|
|
@@ -11595,7 +11595,7 @@ function Xp(s) {
|
|
|
11595
11595
|
}
|
|
11596
11596
|
return e.parse !== void 0 ? e.parse(s) : new e(s.name, s.times, s.values, s.interpolation);
|
|
11597
11597
|
}
|
|
11598
|
-
const
|
|
11598
|
+
const $r = {
|
|
11599
11599
|
/**
|
|
11600
11600
|
* Whether caching is enabled or not.
|
|
11601
11601
|
*
|
|
@@ -11651,7 +11651,7 @@ const jr = {
|
|
|
11651
11651
|
this.files = {};
|
|
11652
11652
|
}
|
|
11653
11653
|
};
|
|
11654
|
-
class
|
|
11654
|
+
class $l {
|
|
11655
11655
|
/**
|
|
11656
11656
|
* Constructs a new loading manager.
|
|
11657
11657
|
*
|
|
@@ -11700,7 +11700,7 @@ class jl {
|
|
|
11700
11700
|
return this._abortController || (this._abortController = new AbortController()), this._abortController;
|
|
11701
11701
|
}
|
|
11702
11702
|
}
|
|
11703
|
-
const qp = /* @__PURE__ */ new
|
|
11703
|
+
const qp = /* @__PURE__ */ new $l();
|
|
11704
11704
|
class pi {
|
|
11705
11705
|
/**
|
|
11706
11706
|
* Constructs a new loader.
|
|
@@ -11831,7 +11831,7 @@ class Kp extends pi {
|
|
|
11831
11831
|
*/
|
|
11832
11832
|
load(e, t, n, i) {
|
|
11833
11833
|
e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
11834
|
-
const r =
|
|
11834
|
+
const r = $r.get(`file:${e}`);
|
|
11835
11835
|
if (r !== void 0)
|
|
11836
11836
|
return this.manager.itemStart(e), setTimeout(() => {
|
|
11837
11837
|
t && t(r), this.manager.itemEnd(e);
|
|
@@ -11904,7 +11904,7 @@ class Kp extends pi {
|
|
|
11904
11904
|
}
|
|
11905
11905
|
}
|
|
11906
11906
|
}).then((u) => {
|
|
11907
|
-
|
|
11907
|
+
$r.add(`file:${e}`, u);
|
|
11908
11908
|
const d = Yn[e];
|
|
11909
11909
|
delete Yn[e];
|
|
11910
11910
|
for (let l = 0, h = d.length; l < h; l++) {
|
|
@@ -11976,7 +11976,7 @@ class Eh extends pi {
|
|
|
11976
11976
|
*/
|
|
11977
11977
|
load(e, t, n, i) {
|
|
11978
11978
|
this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
|
|
11979
|
-
const r = this, a =
|
|
11979
|
+
const r = this, a = $r.get(`image:${e}`);
|
|
11980
11980
|
if (a !== void 0) {
|
|
11981
11981
|
if (a.complete === !0)
|
|
11982
11982
|
r.manager.itemStart(e), setTimeout(function() {
|
|
@@ -11999,7 +11999,7 @@ class Eh extends pi {
|
|
|
11999
11999
|
tr.delete(this), r.manager.itemEnd(e);
|
|
12000
12000
|
}
|
|
12001
12001
|
function u(l) {
|
|
12002
|
-
d(), i && i(l),
|
|
12002
|
+
d(), i && i(l), $r.remove(`image:${e}`);
|
|
12003
12003
|
const h = tr.get(this) || [];
|
|
12004
12004
|
for (let f = 0; f < h.length; f++) {
|
|
12005
12005
|
const p = h[f];
|
|
@@ -12010,7 +12010,7 @@ class Eh extends pi {
|
|
|
12010
12010
|
function d() {
|
|
12011
12011
|
o.removeEventListener("load", c, !1), o.removeEventListener("error", u, !1);
|
|
12012
12012
|
}
|
|
12013
|
-
return o.addEventListener("load", c, !1), o.addEventListener("error", u, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin),
|
|
12013
|
+
return o.addEventListener("load", c, !1), o.addEventListener("error", u, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin), $r.add(`image:${e}`, o), r.manager.itemStart(e), o.src = e, o;
|
|
12014
12014
|
}
|
|
12015
12015
|
}
|
|
12016
12016
|
class Zp extends pi {
|
|
@@ -12106,7 +12106,7 @@ class Ma extends pt {
|
|
|
12106
12106
|
}
|
|
12107
12107
|
}
|
|
12108
12108
|
const so = /* @__PURE__ */ new be(), au = /* @__PURE__ */ new U(), ou = /* @__PURE__ */ new U();
|
|
12109
|
-
class
|
|
12109
|
+
class jl {
|
|
12110
12110
|
/**
|
|
12111
12111
|
* Constructs a new light shadow.
|
|
12112
12112
|
*
|
|
@@ -12229,7 +12229,7 @@ class $l {
|
|
|
12229
12229
|
return this.intensity !== 1 && (e.intensity = this.intensity), this.bias !== 0 && (e.bias = this.bias), this.normalBias !== 0 && (e.normalBias = this.normalBias), this.radius !== 1 && (e.radius = this.radius), (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (e.mapSize = this.mapSize.toArray()), e.camera = this.camera.toJSON(!1).object, delete e.camera.matrix, e;
|
|
12230
12230
|
}
|
|
12231
12231
|
}
|
|
12232
|
-
class
|
|
12232
|
+
class $p extends jl {
|
|
12233
12233
|
/**
|
|
12234
12234
|
* Constructs a new spot light shadow.
|
|
12235
12235
|
*/
|
|
@@ -12244,7 +12244,7 @@ class jp extends $l {
|
|
|
12244
12244
|
return super.copy(e), this.focus = e.focus, this;
|
|
12245
12245
|
}
|
|
12246
12246
|
}
|
|
12247
|
-
class
|
|
12247
|
+
class jp extends Ma {
|
|
12248
12248
|
/**
|
|
12249
12249
|
* Constructs a new spot light.
|
|
12250
12250
|
*
|
|
@@ -12256,7 +12256,7 @@ class $p extends Ma {
|
|
|
12256
12256
|
* @param {number} [decay=2] - The amount the light dims along the distance of the light.
|
|
12257
12257
|
*/
|
|
12258
12258
|
constructor(e, t, n = 0, i = Math.PI / 3, r = 0, a = 2) {
|
|
12259
|
-
super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(pt.DEFAULT_UP), this.updateMatrix(), this.target = new pt(), this.distance = n, this.angle = i, this.penumbra = r, this.decay = a, this.map = null, this.shadow = new
|
|
12259
|
+
super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(pt.DEFAULT_UP), this.updateMatrix(), this.target = new pt(), this.distance = n, this.angle = i, this.penumbra = r, this.decay = a, this.map = null, this.shadow = new $p();
|
|
12260
12260
|
}
|
|
12261
12261
|
/**
|
|
12262
12262
|
* The light's power. Power is the luminous power of the light measured in lumens (lm).
|
|
@@ -12281,7 +12281,7 @@ class $p extends Ma {
|
|
|
12281
12281
|
return t.object.distance = this.distance, t.object.angle = this.angle, t.object.decay = this.decay, t.object.penumbra = this.penumbra, t.object.target = this.target.uuid, this.map && this.map.isTexture && (t.object.map = this.map.toJSON(e).uuid), t.object.shadow = this.shadow.toJSON(), t;
|
|
12282
12282
|
}
|
|
12283
12283
|
}
|
|
12284
|
-
class Jp extends
|
|
12284
|
+
class Jp extends jl {
|
|
12285
12285
|
/**
|
|
12286
12286
|
* Constructs a new point light shadow.
|
|
12287
12287
|
*/
|
|
@@ -12388,7 +12388,7 @@ class Jl extends ph {
|
|
|
12388
12388
|
return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
|
|
12389
12389
|
}
|
|
12390
12390
|
}
|
|
12391
|
-
class Qp extends
|
|
12391
|
+
class Qp extends jl {
|
|
12392
12392
|
/**
|
|
12393
12393
|
* Constructs a new directional light shadow.
|
|
12394
12394
|
*/
|
|
@@ -13810,7 +13810,7 @@ function cu(s, e, t, n) {
|
|
|
13810
13810
|
case Bl:
|
|
13811
13811
|
return s * e * 4 / i.components * i.byteLength;
|
|
13812
13812
|
// https://registry.khronos.org/webgl/extensions/WEBGL_compressed_texture_s3tc_srgb/
|
|
13813
|
-
case
|
|
13813
|
+
case js:
|
|
13814
13814
|
case Js:
|
|
13815
13815
|
return Math.floor((s + 3) / 4) * Math.floor((e + 3) / 4) * 8;
|
|
13816
13816
|
case Qs:
|
|
@@ -13840,9 +13840,9 @@ function cu(s, e, t, n) {
|
|
|
13840
13840
|
return Math.floor((s + 4) / 5) * Math.floor((e + 3) / 4) * 16;
|
|
13841
13841
|
case Zo:
|
|
13842
13842
|
return Math.floor((s + 4) / 5) * Math.floor((e + 4) / 5) * 16;
|
|
13843
|
-
case jo:
|
|
13844
|
-
return Math.floor((s + 5) / 6) * Math.floor((e + 4) / 5) * 16;
|
|
13845
13843
|
case $o:
|
|
13844
|
+
return Math.floor((s + 5) / 6) * Math.floor((e + 4) / 5) * 16;
|
|
13845
|
+
case jo:
|
|
13846
13846
|
return Math.floor((s + 5) / 6) * Math.floor((e + 5) / 6) * 16;
|
|
13847
13847
|
case Jo:
|
|
13848
13848
|
return Math.floor((s + 7) / 8) * Math.floor((e + 4) / 5) * 16;
|
|
@@ -14518,7 +14518,7 @@ vec4 sRGBTransferEOTF( in vec4 value ) {
|
|
|
14518
14518
|
}
|
|
14519
14519
|
vec4 sRGBTransferOETF( in vec4 value ) {
|
|
14520
14520
|
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
|
|
14521
|
-
}`,
|
|
14521
|
+
}`, $m = `#ifdef USE_ENVMAP
|
|
14522
14522
|
#ifdef ENV_WORLDPOS
|
|
14523
14523
|
vec3 cameraToFrag;
|
|
14524
14524
|
if ( isOrthographic ) {
|
|
@@ -14547,7 +14547,7 @@ vec4 sRGBTransferOETF( in vec4 value ) {
|
|
|
14547
14547
|
#elif defined( ENVMAP_BLENDING_ADD )
|
|
14548
14548
|
outgoingLight += envColor.xyz * specularStrength * reflectivity;
|
|
14549
14549
|
#endif
|
|
14550
|
-
#endif`,
|
|
14550
|
+
#endif`, jm = `#ifdef USE_ENVMAP
|
|
14551
14551
|
uniform float envMapIntensity;
|
|
14552
14552
|
uniform float flipEnvMap;
|
|
14553
14553
|
uniform mat3 envMapRotation;
|
|
@@ -15700,14 +15700,14 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const
|
|
|
15700
15700
|
mvPosition = modelViewMatrix * mvPosition;
|
|
15701
15701
|
gl_Position = projectionMatrix * mvPosition;`, Z_ = `#ifdef DITHERING
|
|
15702
15702
|
gl_FragColor.rgb = dithering( gl_FragColor.rgb );
|
|
15703
|
-
#endif`,
|
|
15703
|
+
#endif`, $_ = `#ifdef DITHERING
|
|
15704
15704
|
vec3 dithering( vec3 color ) {
|
|
15705
15705
|
float grid_position = rand( gl_FragCoord.xy );
|
|
15706
15706
|
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
|
|
15707
15707
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
|
|
15708
15708
|
return color + dither_shift_RGB;
|
|
15709
15709
|
}
|
|
15710
|
-
#endif`,
|
|
15710
|
+
#endif`, j_ = `float roughnessFactor = roughness;
|
|
15711
15711
|
#ifdef USE_ROUGHNESSMAP
|
|
15712
15712
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );
|
|
15713
15713
|
roughnessFactor *= texelRoughness.g;
|
|
@@ -17563,7 +17563,7 @@ void main() {
|
|
|
17563
17563
|
#include <logdepthbuf_vertex>
|
|
17564
17564
|
#include <clipping_planes_vertex>
|
|
17565
17565
|
#include <fog_vertex>
|
|
17566
|
-
}`,
|
|
17566
|
+
}`, $g = `uniform vec3 diffuse;
|
|
17567
17567
|
uniform float opacity;
|
|
17568
17568
|
#include <common>
|
|
17569
17569
|
#include <uv_pars_fragment>
|
|
@@ -17621,8 +17621,8 @@ void main() {
|
|
|
17621
17621
|
emissivemap_pars_fragment: Ym,
|
|
17622
17622
|
colorspace_fragment: Km,
|
|
17623
17623
|
colorspace_pars_fragment: Zm,
|
|
17624
|
-
envmap_fragment:
|
|
17625
|
-
envmap_common_pars_fragment:
|
|
17624
|
+
envmap_fragment: $m,
|
|
17625
|
+
envmap_common_pars_fragment: jm,
|
|
17626
17626
|
envmap_pars_fragment: Jm,
|
|
17627
17627
|
envmap_pars_vertex: Qm,
|
|
17628
17628
|
envmap_physical_pars_fragment: u_,
|
|
@@ -17675,8 +17675,8 @@ void main() {
|
|
|
17675
17675
|
premultiplied_alpha_fragment: Y_,
|
|
17676
17676
|
project_vertex: K_,
|
|
17677
17677
|
dithering_fragment: Z_,
|
|
17678
|
-
dithering_pars_fragment:
|
|
17679
|
-
roughnessmap_fragment:
|
|
17678
|
+
dithering_pars_fragment: $_,
|
|
17679
|
+
roughnessmap_fragment: j_,
|
|
17680
17680
|
roughnessmap_pars_fragment: J_,
|
|
17681
17681
|
shadowmap_pars_fragment: Q_,
|
|
17682
17682
|
shadowmap_pars_vertex: eg,
|
|
@@ -17729,7 +17729,7 @@ void main() {
|
|
|
17729
17729
|
shadow_vert: Yg,
|
|
17730
17730
|
shadow_frag: Kg,
|
|
17731
17731
|
sprite_vert: Zg,
|
|
17732
|
-
sprite_frag:
|
|
17732
|
+
sprite_frag: $g
|
|
17733
17733
|
}, le = {
|
|
17734
17734
|
common: {
|
|
17735
17735
|
diffuse: { value: /* @__PURE__ */ new Ie(16777215) },
|
|
@@ -18170,7 +18170,7 @@ Dn.physical = {
|
|
|
18170
18170
|
vertexShader: Be.meshphysical_vert,
|
|
18171
18171
|
fragmentShader: Be.meshphysical_frag
|
|
18172
18172
|
};
|
|
18173
|
-
const qs = { r: 0, b: 0, g: 0 }, wi = /* @__PURE__ */ new Rt(),
|
|
18173
|
+
const qs = { r: 0, b: 0, g: 0 }, wi = /* @__PURE__ */ new Rt(), jg = /* @__PURE__ */ new be();
|
|
18174
18174
|
function Jg(s, e, t, n, i, r, a) {
|
|
18175
18175
|
const o = new Ie(0);
|
|
18176
18176
|
let c = r === !0 ? 0 : 1, u, d, l = null, h = 0, f = null;
|
|
@@ -18206,7 +18206,7 @@ function Jg(s, e, t, n, i, r, a) {
|
|
|
18206
18206
|
get: function() {
|
|
18207
18207
|
return this.uniforms.envMap.value;
|
|
18208
18208
|
}
|
|
18209
|
-
}), i.update(d)), wi.copy(M.backgroundRotation), wi.x *= -1, wi.y *= -1, wi.z *= -1, A.isCubeTexture && A.isRenderTargetTexture === !1 && (wi.y *= -1, wi.z *= -1), d.material.uniforms.envMap.value = A, d.material.uniforms.flipEnvMap.value = A.isCubeTexture && A.isRenderTargetTexture === !1 ? -1 : 1, d.material.uniforms.backgroundBlurriness.value = M.backgroundBlurriness, d.material.uniforms.backgroundIntensity.value = M.backgroundIntensity, d.material.uniforms.backgroundRotation.value.setFromMatrix4(
|
|
18209
|
+
}), i.update(d)), wi.copy(M.backgroundRotation), wi.x *= -1, wi.y *= -1, wi.z *= -1, A.isCubeTexture && A.isRenderTargetTexture === !1 && (wi.y *= -1, wi.z *= -1), d.material.uniforms.envMap.value = A, d.material.uniforms.flipEnvMap.value = A.isCubeTexture && A.isRenderTargetTexture === !1 ? -1 : 1, d.material.uniforms.backgroundBlurriness.value = M.backgroundBlurriness, d.material.uniforms.backgroundIntensity.value = M.backgroundIntensity, d.material.uniforms.backgroundRotation.value.setFromMatrix4(jg.makeRotationFromEuler(wi)), d.material.toneMapped = Oe.getTransfer(A.colorSpace) !== nt, (l !== A || h !== A.version || f !== s.toneMapping) && (d.material.needsUpdate = !0, l = A, h = A.version, f = s.toneMapping), d.layers.enableAll(), x.unshift(d, d.geometry, d.material, 0, 0, null)) : A && A.isTexture && (u === void 0 && (u = new vn(
|
|
18210
18210
|
new ya(2, 2),
|
|
18211
18211
|
new kn({
|
|
18212
18212
|
name: "BackgroundMaterial",
|
|
@@ -18348,13 +18348,13 @@ function Qg(s, e) {
|
|
|
18348
18348
|
if (te === void 0 && (z === "instanceMatrix" && b.instanceMatrix && (te = b.instanceMatrix), z === "instanceColor" && b.instanceColor && (te = b.instanceColor)), te !== void 0) {
|
|
18349
18349
|
const se = te.normalized, he = te.itemSize, Ue = e.get(te);
|
|
18350
18350
|
if (Ue === void 0) continue;
|
|
18351
|
-
const Pe = Ue.buffer, lt = Ue.type,
|
|
18351
|
+
const Pe = Ue.buffer, lt = Ue.type, $e = Ue.bytesPerElement, Y = lt === s.INT || lt === s.UNSIGNED_INT || te.gpuType === Ll;
|
|
18352
18352
|
if (te.isInterleavedBufferAttribute) {
|
|
18353
|
-
const
|
|
18354
|
-
if (
|
|
18353
|
+
const j = te.data, de = j.stride, De = te.offset;
|
|
18354
|
+
if (j.isInstancedInterleavedBuffer) {
|
|
18355
18355
|
for (let _e = 0; _e < Z.locationSize; _e++)
|
|
18356
|
-
m(Z.location + _e,
|
|
18357
|
-
b.isInstancedMesh !== !0 && N._maxInstanceCount === void 0 && (N._maxInstanceCount =
|
|
18356
|
+
m(Z.location + _e, j.meshPerAttribute);
|
|
18357
|
+
b.isInstancedMesh !== !0 && N._maxInstanceCount === void 0 && (N._maxInstanceCount = j.meshPerAttribute * j.count);
|
|
18358
18358
|
} else
|
|
18359
18359
|
for (let _e = 0; _e < Z.locationSize; _e++)
|
|
18360
18360
|
_(Z.location + _e);
|
|
@@ -18365,27 +18365,27 @@ function Qg(s, e) {
|
|
|
18365
18365
|
he / Z.locationSize,
|
|
18366
18366
|
lt,
|
|
18367
18367
|
se,
|
|
18368
|
-
de *
|
|
18369
|
-
(De + he / Z.locationSize * _e) *
|
|
18368
|
+
de * $e,
|
|
18369
|
+
(De + he / Z.locationSize * _e) * $e,
|
|
18370
18370
|
Y
|
|
18371
18371
|
);
|
|
18372
18372
|
} else {
|
|
18373
18373
|
if (te.isInstancedBufferAttribute) {
|
|
18374
|
-
for (let
|
|
18375
|
-
m(Z.location +
|
|
18374
|
+
for (let j = 0; j < Z.locationSize; j++)
|
|
18375
|
+
m(Z.location + j, te.meshPerAttribute);
|
|
18376
18376
|
b.isInstancedMesh !== !0 && N._maxInstanceCount === void 0 && (N._maxInstanceCount = te.meshPerAttribute * te.count);
|
|
18377
18377
|
} else
|
|
18378
|
-
for (let
|
|
18379
|
-
_(Z.location +
|
|
18378
|
+
for (let j = 0; j < Z.locationSize; j++)
|
|
18379
|
+
_(Z.location + j);
|
|
18380
18380
|
s.bindBuffer(s.ARRAY_BUFFER, Pe);
|
|
18381
|
-
for (let
|
|
18381
|
+
for (let j = 0; j < Z.locationSize; j++)
|
|
18382
18382
|
x(
|
|
18383
|
-
Z.location +
|
|
18383
|
+
Z.location + j,
|
|
18384
18384
|
he / Z.locationSize,
|
|
18385
18385
|
lt,
|
|
18386
18386
|
se,
|
|
18387
|
-
he *
|
|
18388
|
-
he / Z.locationSize *
|
|
18387
|
+
he * $e,
|
|
18388
|
+
he / Z.locationSize * j * $e,
|
|
18389
18389
|
Y
|
|
18390
18390
|
);
|
|
18391
18391
|
}
|
|
@@ -19045,7 +19045,7 @@ function o0(s, e, t) {
|
|
|
19045
19045
|
}
|
|
19046
19046
|
`
|
|
19047
19047
|
),
|
|
19048
|
-
blending:
|
|
19048
|
+
blending: $n,
|
|
19049
19049
|
depthTest: !1,
|
|
19050
19050
|
depthWrite: !1
|
|
19051
19051
|
});
|
|
@@ -19134,7 +19134,7 @@ function l0(s, e, t) {
|
|
|
19134
19134
|
}
|
|
19135
19135
|
`
|
|
19136
19136
|
),
|
|
19137
|
-
blending:
|
|
19137
|
+
blending: $n,
|
|
19138
19138
|
depthTest: !1,
|
|
19139
19139
|
depthWrite: !1
|
|
19140
19140
|
});
|
|
@@ -19169,7 +19169,7 @@ function pu() {
|
|
|
19169
19169
|
}
|
|
19170
19170
|
`
|
|
19171
19171
|
),
|
|
19172
|
-
blending:
|
|
19172
|
+
blending: $n,
|
|
19173
19173
|
depthTest: !1,
|
|
19174
19174
|
depthWrite: !1
|
|
19175
19175
|
});
|
|
@@ -19202,7 +19202,7 @@ function mu() {
|
|
|
19202
19202
|
}
|
|
19203
19203
|
`
|
|
19204
19204
|
),
|
|
19205
|
-
blending:
|
|
19205
|
+
blending: $n,
|
|
19206
19206
|
depthTest: !1,
|
|
19207
19207
|
depthWrite: !1
|
|
19208
19208
|
});
|
|
@@ -19545,8 +19545,8 @@ const _0 = {
|
|
|
19545
19545
|
[qu]: "REINHARD_TONE_MAPPING",
|
|
19546
19546
|
[Yu]: "CINEON_TONE_MAPPING",
|
|
19547
19547
|
[Ku]: "ACES_FILMIC_TONE_MAPPING",
|
|
19548
|
-
[
|
|
19549
|
-
[
|
|
19548
|
+
[$u]: "AGX_TONE_MAPPING",
|
|
19549
|
+
[ju]: "NEUTRAL_TONE_MAPPING",
|
|
19550
19550
|
[Zu]: "CUSTOM_TONE_MAPPING"
|
|
19551
19551
|
};
|
|
19552
19552
|
function g0(s, e, t, n, i) {
|
|
@@ -19966,10 +19966,10 @@ function K0(s, e) {
|
|
|
19966
19966
|
function Z0(s, e) {
|
|
19967
19967
|
s.uniform1uiv(this.addr, e);
|
|
19968
19968
|
}
|
|
19969
|
-
function
|
|
19969
|
+
function $0(s, e) {
|
|
19970
19970
|
s.uniform2uiv(this.addr, e);
|
|
19971
19971
|
}
|
|
19972
|
-
function
|
|
19972
|
+
function j0(s, e) {
|
|
19973
19973
|
s.uniform3uiv(this.addr, e);
|
|
19974
19974
|
}
|
|
19975
19975
|
function J0(s, e) {
|
|
@@ -20044,10 +20044,10 @@ function iv(s) {
|
|
|
20044
20044
|
return Z0;
|
|
20045
20045
|
// UINT
|
|
20046
20046
|
case 36294:
|
|
20047
|
-
return
|
|
20047
|
+
return $0;
|
|
20048
20048
|
// _VEC2
|
|
20049
20049
|
case 36295:
|
|
20050
|
-
return
|
|
20050
|
+
return j0;
|
|
20051
20051
|
// _VEC3
|
|
20052
20052
|
case 36296:
|
|
20053
20053
|
return J0;
|
|
@@ -20220,8 +20220,8 @@ const dv = {
|
|
|
20220
20220
|
[qu]: "Reinhard",
|
|
20221
20221
|
[Yu]: "Cineon",
|
|
20222
20222
|
[Ku]: "ACESFilmic",
|
|
20223
|
-
[
|
|
20224
|
-
[
|
|
20223
|
+
[$u]: "AgX",
|
|
20224
|
+
[ju]: "Neutral",
|
|
20225
20225
|
[Zu]: "Custom"
|
|
20226
20226
|
};
|
|
20227
20227
|
function pv(s, e) {
|
|
@@ -20330,7 +20330,7 @@ function Ru(s) {
|
|
|
20330
20330
|
#define LOW_PRECISION`), e;
|
|
20331
20331
|
}
|
|
20332
20332
|
const bv = {
|
|
20333
|
-
[
|
|
20333
|
+
[$s]: "SHADOWMAP_TYPE_PCF",
|
|
20334
20334
|
[Hr]: "SHADOWMAP_TYPE_VSM"
|
|
20335
20335
|
};
|
|
20336
20336
|
function Av(s) {
|
|
@@ -20746,15 +20746,15 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20746
20746
|
const se = H.morphAttributes.position || H.morphAttributes.normal || H.morphAttributes.color, he = se !== void 0 ? se.length : 0;
|
|
20747
20747
|
let Ue = 0;
|
|
20748
20748
|
H.morphAttributes.position !== void 0 && (Ue = 1), H.morphAttributes.normal !== void 0 && (Ue = 2), H.morphAttributes.color !== void 0 && (Ue = 3);
|
|
20749
|
-
let Pe, lt,
|
|
20749
|
+
let Pe, lt, $e, Y;
|
|
20750
20750
|
if (te) {
|
|
20751
20751
|
const et = Dn[te];
|
|
20752
20752
|
Pe = et.vertexShader, lt = et.fragmentShader;
|
|
20753
20753
|
} else
|
|
20754
|
-
Pe = y.vertexShader, lt = y.fragmentShader, c.update(y),
|
|
20755
|
-
const
|
|
20754
|
+
Pe = y.vertexShader, lt = y.fragmentShader, c.update(y), $e = c.getVertexShaderID(y), Y = c.getFragmentShaderID(y);
|
|
20755
|
+
const j = s.getRenderTarget(), de = s.state.buffers.depth.getReversed(), De = N.isInstancedMesh === !0, _e = N.isBatchedMesh === !0, Xe = !!y.map, St = !!y.matcap, We = !!z, Qe = !!y.aoMap, rt = !!y.lightMap, Ve = !!y.bumpMap, Tt = !!y.normalMap, P = !!y.displacementMap, bt = !!y.emissiveMap, je = !!y.metalnessMap, ct = !!y.roughnessMap, xe = y.anisotropy > 0, w = y.clearcoat > 0, v = y.dispersion > 0, L = y.iridescence > 0, q = y.sheen > 0, $ = y.transmission > 0, X = xe && !!y.anisotropyMap, Se = w && !!y.clearcoatMap, ie = w && !!y.clearcoatNormalMap, ve = w && !!y.clearcoatRoughnessMap, Ce = L && !!y.iridescenceMap, Q = L && !!y.iridescenceThicknessMap, ae = q && !!y.sheenColorMap, ge = q && !!y.sheenRoughnessMap, ye = !!y.specularMap, re = !!y.specularColorMap, ze = !!y.specularIntensityMap, D = $ && !!y.transmissionMap, ue = $ && !!y.thicknessMap, ee = !!y.gradientMap, fe = !!y.alphaMap, J = y.alphaTest > 0, K = !!y.alphaHash, ne = !!y.extensions;
|
|
20756
20756
|
let Le = Un;
|
|
20757
|
-
y.toneMapped && (
|
|
20757
|
+
y.toneMapped && (j === null || j.isXRRenderTarget === !0) && (Le = s.toneMapping);
|
|
20758
20758
|
const ut = {
|
|
20759
20759
|
shaderID: te,
|
|
20760
20760
|
shaderType: y.type,
|
|
@@ -20762,7 +20762,7 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20762
20762
|
vertexShader: Pe,
|
|
20763
20763
|
fragmentShader: lt,
|
|
20764
20764
|
defines: y.defines,
|
|
20765
|
-
customVertexShaderID:
|
|
20765
|
+
customVertexShaderID: $e,
|
|
20766
20766
|
customFragmentShaderID: Y,
|
|
20767
20767
|
isRawShaderMaterial: y.isRawShaderMaterial === !0,
|
|
20768
20768
|
glslVersion: y.glslVersion,
|
|
@@ -20772,7 +20772,7 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20772
20772
|
instancing: De,
|
|
20773
20773
|
instancingColor: De && N.instanceColor !== null,
|
|
20774
20774
|
instancingMorph: De && N.morphTexture !== null,
|
|
20775
|
-
outputColorSpace:
|
|
20775
|
+
outputColorSpace: j === null ? s.outputColorSpace : j.isXRRenderTarget === !0 ? j.texture.colorSpace : _r,
|
|
20776
20776
|
alphaToCoverage: !!y.alphaToCoverage,
|
|
20777
20777
|
map: Xe,
|
|
20778
20778
|
matcap: St,
|
|
@@ -20787,7 +20787,7 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20787
20787
|
emissiveMap: bt,
|
|
20788
20788
|
normalMapObjectSpace: Tt && y.normalMapType === dd,
|
|
20789
20789
|
normalMapTangentSpace: Tt && y.normalMapType === xa,
|
|
20790
|
-
metalnessMap:
|
|
20790
|
+
metalnessMap: je,
|
|
20791
20791
|
roughnessMap: ct,
|
|
20792
20792
|
anisotropy: xe,
|
|
20793
20793
|
anisotropyMap: X,
|
|
@@ -20805,7 +20805,7 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20805
20805
|
specularMap: ye,
|
|
20806
20806
|
specularColorMap: re,
|
|
20807
20807
|
specularIntensityMap: ze,
|
|
20808
|
-
transmission:
|
|
20808
|
+
transmission: $,
|
|
20809
20809
|
transmissionMap: D,
|
|
20810
20810
|
thicknessMap: ue,
|
|
20811
20811
|
gradientMap: ee,
|
|
@@ -20822,7 +20822,7 @@ function Ov(s, e, t, n, i, r, a) {
|
|
|
20822
20822
|
normalMapUv: Tt && g(y.normalMap.channel),
|
|
20823
20823
|
displacementMapUv: P && g(y.displacementMap.channel),
|
|
20824
20824
|
emissiveMapUv: bt && g(y.emissiveMap.channel),
|
|
20825
|
-
metalnessMapUv:
|
|
20825
|
+
metalnessMapUv: je && g(y.metalnessMap.channel),
|
|
20826
20826
|
roughnessMapUv: ct && g(y.roughnessMap.channel),
|
|
20827
20827
|
anisotropyMapUv: X && g(y.anisotropyMap.channel),
|
|
20828
20828
|
clearcoatMapUv: Se && g(y.clearcoatMap.channel),
|
|
@@ -21333,7 +21333,7 @@ void main() {
|
|
|
21333
21333
|
/* @__PURE__ */ new U(0, -1, 0),
|
|
21334
21334
|
/* @__PURE__ */ new U(0, 0, 1),
|
|
21335
21335
|
/* @__PURE__ */ new U(0, 0, -1)
|
|
21336
|
-
],
|
|
21336
|
+
], $v = [
|
|
21337
21337
|
/* @__PURE__ */ new U(0, -1, 0),
|
|
21338
21338
|
/* @__PURE__ */ new U(0, -1, 0),
|
|
21339
21339
|
/* @__PURE__ */ new U(0, 0, 1),
|
|
@@ -21341,7 +21341,7 @@ void main() {
|
|
|
21341
21341
|
/* @__PURE__ */ new U(0, -1, 0),
|
|
21342
21342
|
/* @__PURE__ */ new U(0, -1, 0)
|
|
21343
21343
|
], Du = /* @__PURE__ */ new be(), zr = /* @__PURE__ */ new U(), ho = /* @__PURE__ */ new U();
|
|
21344
|
-
function
|
|
21344
|
+
function jv(s, e, t) {
|
|
21345
21345
|
let n = new Kl();
|
|
21346
21346
|
const i = new Ye(), r = new Ye(), a = new Je(), o = new Bp(), c = new kp(), u = {}, d = t.maxTextureSize, l = { [di]: Jt, [Jt]: di, [Zn]: Zn }, h = new kn({
|
|
21347
21347
|
defines: {
|
|
@@ -21365,13 +21365,13 @@ function $v(s, e, t) {
|
|
|
21365
21365
|
)
|
|
21366
21366
|
);
|
|
21367
21367
|
const g = new vn(p, h), _ = this;
|
|
21368
|
-
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type =
|
|
21368
|
+
this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = $s;
|
|
21369
21369
|
let m = this.type;
|
|
21370
21370
|
this.render = function(E, R, I) {
|
|
21371
21371
|
if (_.enabled === !1 || _.autoUpdate === !1 && _.needsUpdate === !1 || E.length === 0) return;
|
|
21372
|
-
E.type === Wu && (Te("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), E.type =
|
|
21372
|
+
E.type === Wu && (Te("WebGLShadowMap: PCFSoftShadowMap has been deprecated. Using PCFShadowMap instead."), E.type = $s);
|
|
21373
21373
|
const y = s.getRenderTarget(), b = s.getActiveCubeFace(), C = s.getActiveMipmapLevel(), B = s.state;
|
|
21374
|
-
B.setBlending(
|
|
21374
|
+
B.setBlending($n), B.buffers.depth.getReversed() === !0 ? B.buffers.color.setClear(0, 0, 0, 0) : B.buffers.color.setClear(1, 1, 1, 1), B.buffers.depth.setTest(!0), B.setScissorTest(!1);
|
|
21375
21375
|
const N = m !== this.type;
|
|
21376
21376
|
N && R.traverse(function(V) {
|
|
21377
21377
|
V.material && (Array.isArray(V.material) ? V.material.forEach((H) => H.needsUpdate = !0) : V.material.needsUpdate = !0);
|
|
@@ -21401,7 +21401,7 @@ function $v(s, e, t) {
|
|
|
21401
21401
|
} else {
|
|
21402
21402
|
k.isPointLight ? (z.map = new mh(i.x), z.map.depthTexture = new _p(i.x, Bn)) : (z.map = new Nn(i.x, i.y), z.map.depthTexture = new as(i.x, i.y, Bn)), z.map.depthTexture.name = k.name + ".shadowMap", z.map.depthTexture.format = Qn;
|
|
21403
21403
|
const se = s.state.buffers.depth.getReversed();
|
|
21404
|
-
this.type ===
|
|
21404
|
+
this.type === $s ? (z.map.depthTexture.compareFunction = se ? zl : Vl, z.map.depthTexture.minFilter = Vt, z.map.depthTexture.magFilter = Vt) : (z.map.depthTexture.compareFunction = null, z.map.depthTexture.minFilter = Lt, z.map.depthTexture.magFilter = Lt);
|
|
21405
21405
|
}
|
|
21406
21406
|
z.camera.updateProjectionMatrix();
|
|
21407
21407
|
}
|
|
@@ -21421,7 +21421,7 @@ function $v(s, e, t) {
|
|
|
21421
21421
|
}
|
|
21422
21422
|
if (k.isPointLight) {
|
|
21423
21423
|
const he = z.camera, Ue = z.matrix, Pe = k.distance || he.far;
|
|
21424
|
-
Pe !== he.far && (he.far = Pe, he.updateProjectionMatrix()), zr.setFromMatrixPosition(k.matrixWorld), he.position.copy(zr), ho.copy(he.position), ho.add(Zv[se]), he.up.copy(
|
|
21424
|
+
Pe !== he.far && (he.far = Pe, he.updateProjectionMatrix()), zr.setFromMatrixPosition(k.matrixWorld), he.position.copy(zr), ho.copy(he.position), ho.add(Zv[se]), he.up.copy($v[se]), he.lookAt(ho), he.updateMatrixWorld(), Ue.makeTranslation(-zr.x, -zr.y, -zr.z), Du.multiplyMatrices(he.projectionMatrix, he.matrixWorldInverse), z._frustum.setFromProjectionMatrix(Du, he.coordinateSystem, he.reversedDepth);
|
|
21425
21425
|
} else
|
|
21426
21426
|
z.updateMatrices(k);
|
|
21427
21427
|
n = z.getFrustum(), M(R, I, z.camera, k, this.type);
|
|
@@ -21532,7 +21532,7 @@ function Qv(s, e) {
|
|
|
21532
21532
|
return ue;
|
|
21533
21533
|
},
|
|
21534
21534
|
setTest: function(K) {
|
|
21535
|
-
K ?
|
|
21535
|
+
K ? j(s.DEPTH_TEST) : de(s.DEPTH_TEST);
|
|
21536
21536
|
},
|
|
21537
21537
|
setMask: function(K) {
|
|
21538
21538
|
ee !== K && !D && (s.depthMask(K), ee = K);
|
|
@@ -21585,7 +21585,7 @@ function Qv(s, e) {
|
|
|
21585
21585
|
let D = !1, ue = null, ee = null, fe = null, J = null, K = null, ne = null, Le = null, ut = null;
|
|
21586
21586
|
return {
|
|
21587
21587
|
setTest: function(et) {
|
|
21588
|
-
D || (et ?
|
|
21588
|
+
D || (et ? j(s.STENCIL_TEST) : de(s.STENCIL_TEST));
|
|
21589
21589
|
},
|
|
21590
21590
|
setMask: function(et) {
|
|
21591
21591
|
ue !== et && !D && (s.stencilMask(et), ue = et);
|
|
@@ -21615,7 +21615,7 @@ function Qv(s, e) {
|
|
|
21615
21615
|
Z.indexOf("WebGL") !== -1 ? (z = parseFloat(/^WebGL (\d)/.exec(Z)[1]), k = z >= 1) : Z.indexOf("OpenGL ES") !== -1 && (z = parseFloat(/^OpenGL ES (\d)/.exec(Z)[1]), k = z >= 2);
|
|
21616
21616
|
let te = null, se = {};
|
|
21617
21617
|
const he = s.getParameter(s.SCISSOR_BOX), Ue = s.getParameter(s.VIEWPORT), Pe = new Je().fromArray(he), lt = new Je().fromArray(Ue);
|
|
21618
|
-
function
|
|
21618
|
+
function $e(D, ue, ee, fe) {
|
|
21619
21619
|
const J = new Uint8Array(4), K = s.createTexture();
|
|
21620
21620
|
s.bindTexture(D, K), s.texParameteri(D, s.TEXTURE_MIN_FILTER, s.NEAREST), s.texParameteri(D, s.TEXTURE_MAG_FILTER, s.NEAREST);
|
|
21621
21621
|
for (let ne = 0; ne < ee; ne++)
|
|
@@ -21623,8 +21623,8 @@ function Qv(s, e) {
|
|
|
21623
21623
|
return K;
|
|
21624
21624
|
}
|
|
21625
21625
|
const Y = {};
|
|
21626
|
-
Y[s.TEXTURE_2D] =
|
|
21627
|
-
function
|
|
21626
|
+
Y[s.TEXTURE_2D] = $e(s.TEXTURE_2D, s.TEXTURE_2D, 1), Y[s.TEXTURE_CUBE_MAP] = $e(s.TEXTURE_CUBE_MAP, s.TEXTURE_CUBE_MAP_POSITIVE_X, 6), Y[s.TEXTURE_2D_ARRAY] = $e(s.TEXTURE_2D_ARRAY, s.TEXTURE_2D_ARRAY, 1, 1), Y[s.TEXTURE_3D] = $e(s.TEXTURE_3D, s.TEXTURE_3D, 1, 1), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), j(s.DEPTH_TEST), a.setFunc(dr), Ve(!1), Tt(Sc), j(s.CULL_FACE), Qe($n);
|
|
21627
|
+
function j(D) {
|
|
21628
21628
|
d[D] !== !0 && (s.enable(D), d[D] = !0);
|
|
21629
21629
|
}
|
|
21630
21630
|
function de(D) {
|
|
@@ -21663,22 +21663,22 @@ function Qv(s, e) {
|
|
|
21663
21663
|
[Ao]: s.SRC_ALPHA,
|
|
21664
21664
|
[ed]: s.SRC_ALPHA_SATURATE,
|
|
21665
21665
|
[Jf]: s.DST_COLOR,
|
|
21666
|
-
[
|
|
21666
|
+
[$f]: s.DST_ALPHA,
|
|
21667
21667
|
[Zf]: s.ONE_MINUS_SRC_COLOR,
|
|
21668
21668
|
[Eo]: s.ONE_MINUS_SRC_ALPHA,
|
|
21669
21669
|
[Qf]: s.ONE_MINUS_DST_COLOR,
|
|
21670
|
-
[
|
|
21670
|
+
[jf]: s.ONE_MINUS_DST_ALPHA,
|
|
21671
21671
|
[td]: s.CONSTANT_COLOR,
|
|
21672
21672
|
[nd]: s.ONE_MINUS_CONSTANT_COLOR,
|
|
21673
21673
|
[id]: s.CONSTANT_ALPHA,
|
|
21674
21674
|
[rd]: s.ONE_MINUS_CONSTANT_ALPHA
|
|
21675
21675
|
};
|
|
21676
21676
|
function Qe(D, ue, ee, fe, J, K, ne, Le, ut, et) {
|
|
21677
|
-
if (D ===
|
|
21677
|
+
if (D === $n) {
|
|
21678
21678
|
g === !0 && (de(s.BLEND), g = !1);
|
|
21679
21679
|
return;
|
|
21680
21680
|
}
|
|
21681
|
-
if (g === !1 && (
|
|
21681
|
+
if (g === !1 && (j(s.BLEND), g = !0), D !== zf) {
|
|
21682
21682
|
if (D !== _ || et !== y) {
|
|
21683
21683
|
if ((m !== Pi || M !== Pi) && (s.blendEquation(s.FUNC_ADD), m = Pi, M = Pi), et)
|
|
21684
21684
|
switch (D) {
|
|
@@ -21723,26 +21723,26 @@ function Qv(s, e) {
|
|
|
21723
21723
|
J = J || ue, K = K || ee, ne = ne || fe, (ue !== m || J !== M) && (s.blendEquationSeparate(St[ue], St[J]), m = ue, M = J), (ee !== S || fe !== x || K !== A || ne !== E) && (s.blendFuncSeparate(We[ee], We[fe], We[K], We[ne]), S = ee, x = fe, A = K, E = ne), (Le.equals(R) === !1 || ut !== I) && (s.blendColor(Le.r, Le.g, Le.b, ut), R.copy(Le), I = ut), _ = D, y = !1;
|
|
21724
21724
|
}
|
|
21725
21725
|
function rt(D, ue) {
|
|
21726
|
-
D.side === Zn ? de(s.CULL_FACE) :
|
|
21726
|
+
D.side === Zn ? de(s.CULL_FACE) : j(s.CULL_FACE);
|
|
21727
21727
|
let ee = D.side === Jt;
|
|
21728
|
-
ue && (ee = !ee), Ve(ee), D.blending === ur && D.transparent === !1 ? Qe(
|
|
21728
|
+
ue && (ee = !ee), Ve(ee), D.blending === ur && D.transparent === !1 ? Qe($n) : Qe(D.blending, D.blendEquation, D.blendSrc, D.blendDst, D.blendEquationAlpha, D.blendSrcAlpha, D.blendDstAlpha, D.blendColor, D.blendAlpha, D.premultipliedAlpha), a.setFunc(D.depthFunc), a.setTest(D.depthTest), a.setMask(D.depthWrite), r.setMask(D.colorWrite);
|
|
21729
21729
|
const fe = D.stencilWrite;
|
|
21730
|
-
o.setTest(fe), fe && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), bt(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ?
|
|
21730
|
+
o.setTest(fe), fe && (o.setMask(D.stencilWriteMask), o.setFunc(D.stencilFunc, D.stencilRef, D.stencilFuncMask), o.setOp(D.stencilFail, D.stencilZFail, D.stencilZPass)), bt(D.polygonOffset, D.polygonOffsetFactor, D.polygonOffsetUnits), D.alphaToCoverage === !0 ? j(s.SAMPLE_ALPHA_TO_COVERAGE) : de(s.SAMPLE_ALPHA_TO_COVERAGE);
|
|
21731
21731
|
}
|
|
21732
21732
|
function Ve(D) {
|
|
21733
21733
|
b !== D && (D ? s.frontFace(s.CW) : s.frontFace(s.CCW), b = D);
|
|
21734
21734
|
}
|
|
21735
21735
|
function Tt(D) {
|
|
21736
|
-
D !== kf ? (
|
|
21736
|
+
D !== kf ? (j(s.CULL_FACE), D !== C && (D === Sc ? s.cullFace(s.BACK) : D === Vf ? s.cullFace(s.FRONT) : s.cullFace(s.FRONT_AND_BACK))) : de(s.CULL_FACE), C = D;
|
|
21737
21737
|
}
|
|
21738
21738
|
function P(D) {
|
|
21739
21739
|
D !== B && (k && s.lineWidth(D), B = D);
|
|
21740
21740
|
}
|
|
21741
21741
|
function bt(D, ue, ee) {
|
|
21742
|
-
D ? (
|
|
21742
|
+
D ? (j(s.POLYGON_OFFSET_FILL), (N !== ue || V !== ee) && (s.polygonOffset(ue, ee), N = ue, V = ee)) : de(s.POLYGON_OFFSET_FILL);
|
|
21743
21743
|
}
|
|
21744
|
-
function
|
|
21745
|
-
D ?
|
|
21744
|
+
function je(D) {
|
|
21745
|
+
D ? j(s.SCISSOR_TEST) : de(s.SCISSOR_TEST);
|
|
21746
21746
|
}
|
|
21747
21747
|
function ct(D) {
|
|
21748
21748
|
D === void 0 && (D = s.TEXTURE0 + H - 1), te !== D && (s.activeTexture(D), te = D);
|
|
@@ -21777,7 +21777,7 @@ function Qv(s, e) {
|
|
|
21777
21777
|
Re("WebGLState:", D);
|
|
21778
21778
|
}
|
|
21779
21779
|
}
|
|
21780
|
-
function
|
|
21780
|
+
function $() {
|
|
21781
21781
|
try {
|
|
21782
21782
|
s.texSubImage3D(...arguments);
|
|
21783
21783
|
} catch (D) {
|
|
@@ -21851,7 +21851,7 @@ function Qv(s, e) {
|
|
|
21851
21851
|
depth: a,
|
|
21852
21852
|
stencil: o
|
|
21853
21853
|
},
|
|
21854
|
-
enable:
|
|
21854
|
+
enable: j,
|
|
21855
21855
|
disable: de,
|
|
21856
21856
|
bindFramebuffer: De,
|
|
21857
21857
|
drawBuffers: _e,
|
|
@@ -21862,7 +21862,7 @@ function Qv(s, e) {
|
|
|
21862
21862
|
setCullFace: Tt,
|
|
21863
21863
|
setLineWidth: P,
|
|
21864
21864
|
setPolygonOffset: bt,
|
|
21865
|
-
setScissorTest:
|
|
21865
|
+
setScissorTest: je,
|
|
21866
21866
|
activeTexture: ct,
|
|
21867
21867
|
bindTexture: xe,
|
|
21868
21868
|
unbindTexture: w,
|
|
@@ -21875,7 +21875,7 @@ function Qv(s, e) {
|
|
|
21875
21875
|
texStorage2D: ie,
|
|
21876
21876
|
texStorage3D: ve,
|
|
21877
21877
|
texSubImage2D: q,
|
|
21878
|
-
texSubImage3D:
|
|
21878
|
+
texSubImage3D: $,
|
|
21879
21879
|
compressedTexSubImage2D: X,
|
|
21880
21880
|
compressedTexSubImage3D: Se,
|
|
21881
21881
|
scissor: ae,
|
|
@@ -21897,15 +21897,15 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
21897
21897
|
}
|
|
21898
21898
|
function g(w, v, L) {
|
|
21899
21899
|
let q = 1;
|
|
21900
|
-
const
|
|
21901
|
-
if ((
|
|
21900
|
+
const $ = xe(w);
|
|
21901
|
+
if (($.width > L || $.height > L) && (q = L / Math.max($.width, $.height)), q < 1)
|
|
21902
21902
|
if (typeof HTMLImageElement < "u" && w instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && w instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && w instanceof ImageBitmap || typeof VideoFrame < "u" && w instanceof VideoFrame) {
|
|
21903
|
-
const X = Math.floor(q *
|
|
21903
|
+
const X = Math.floor(q * $.width), Se = Math.floor(q * $.height);
|
|
21904
21904
|
l === void 0 && (l = p(X, Se));
|
|
21905
21905
|
const ie = v ? p(X, Se) : l;
|
|
21906
|
-
return ie.width = X, ie.height = Se, ie.getContext("2d").drawImage(w, 0, 0, X, Se), Te("WebGLRenderer: Texture has been resized from (" +
|
|
21906
|
+
return ie.width = X, ie.height = Se, ie.getContext("2d").drawImage(w, 0, 0, X, Se), Te("WebGLRenderer: Texture has been resized from (" + $.width + "x" + $.height + ") to (" + X + "x" + Se + ")."), ie;
|
|
21907
21907
|
} else
|
|
21908
|
-
return "data" in w && Te("WebGLRenderer: Image in DataTexture is too big (" +
|
|
21908
|
+
return "data" in w && Te("WebGLRenderer: Image in DataTexture is too big (" + $.width + "x" + $.height + ")."), w;
|
|
21909
21909
|
return w;
|
|
21910
21910
|
}
|
|
21911
21911
|
function _(w) {
|
|
@@ -21917,14 +21917,14 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
21917
21917
|
function S(w) {
|
|
21918
21918
|
return w.isWebGLCubeRenderTarget ? s.TEXTURE_CUBE_MAP : w.isWebGL3DRenderTarget ? s.TEXTURE_3D : w.isWebGLArrayRenderTarget || w.isCompressedArrayTexture ? s.TEXTURE_2D_ARRAY : s.TEXTURE_2D;
|
|
21919
21919
|
}
|
|
21920
|
-
function x(w, v, L, q,
|
|
21920
|
+
function x(w, v, L, q, $ = !1) {
|
|
21921
21921
|
if (w !== null) {
|
|
21922
21922
|
if (s[w] !== void 0) return s[w];
|
|
21923
21923
|
Te("WebGLRenderer: Attempt to use non-existing WebGL internal format '" + w + "'");
|
|
21924
21924
|
}
|
|
21925
21925
|
let X = v;
|
|
21926
21926
|
if (v === s.RED && (L === s.FLOAT && (X = s.R32F), L === s.HALF_FLOAT && (X = s.R16F), L === s.UNSIGNED_BYTE && (X = s.R8)), v === s.RED_INTEGER && (L === s.UNSIGNED_BYTE && (X = s.R8UI), L === s.UNSIGNED_SHORT && (X = s.R16UI), L === s.UNSIGNED_INT && (X = s.R32UI), L === s.BYTE && (X = s.R8I), L === s.SHORT && (X = s.R16I), L === s.INT && (X = s.R32I)), v === s.RG && (L === s.FLOAT && (X = s.RG32F), L === s.HALF_FLOAT && (X = s.RG16F), L === s.UNSIGNED_BYTE && (X = s.RG8)), v === s.RG_INTEGER && (L === s.UNSIGNED_BYTE && (X = s.RG8UI), L === s.UNSIGNED_SHORT && (X = s.RG16UI), L === s.UNSIGNED_INT && (X = s.RG32UI), L === s.BYTE && (X = s.RG8I), L === s.SHORT && (X = s.RG16I), L === s.INT && (X = s.RG32I)), v === s.RGB_INTEGER && (L === s.UNSIGNED_BYTE && (X = s.RGB8UI), L === s.UNSIGNED_SHORT && (X = s.RGB16UI), L === s.UNSIGNED_INT && (X = s.RGB32UI), L === s.BYTE && (X = s.RGB8I), L === s.SHORT && (X = s.RGB16I), L === s.INT && (X = s.RGB32I)), v === s.RGBA_INTEGER && (L === s.UNSIGNED_BYTE && (X = s.RGBA8UI), L === s.UNSIGNED_SHORT && (X = s.RGBA16UI), L === s.UNSIGNED_INT && (X = s.RGBA32UI), L === s.BYTE && (X = s.RGBA8I), L === s.SHORT && (X = s.RGBA16I), L === s.INT && (X = s.RGBA32I)), v === s.RGB && (L === s.UNSIGNED_INT_5_9_9_9_REV && (X = s.RGB9_E5), L === s.UNSIGNED_INT_10F_11F_11F_REV && (X = s.R11F_G11F_B10F)), v === s.RGBA) {
|
|
21927
|
-
const Se =
|
|
21927
|
+
const Se = $ ? la : Oe.getTransfer(q);
|
|
21928
21928
|
L === s.FLOAT && (X = s.RGBA32F), L === s.HALF_FLOAT && (X = s.RGBA16F), L === s.UNSIGNED_BYTE && (X = Se === nt ? s.SRGB8_ALPHA8 : s.RGBA8), L === s.UNSIGNED_SHORT_4_4_4_4 && (X = s.RGBA4), L === s.UNSIGNED_SHORT_5_5_5_1 && (X = s.RGB5_A1);
|
|
21929
21929
|
}
|
|
21930
21930
|
return (X === s.R16F || X === s.R32F || X === s.RG16F || X === s.RG32F || X === s.RGBA16F || X === s.RGBA32F) && e.get("EXT_color_buffer_float"), X;
|
|
@@ -21949,8 +21949,8 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
21949
21949
|
if (v.__webglInit === void 0) return;
|
|
21950
21950
|
const L = w.source, q = h.get(L);
|
|
21951
21951
|
if (q) {
|
|
21952
|
-
const
|
|
21953
|
-
|
|
21952
|
+
const $ = q[v.__cacheKey];
|
|
21953
|
+
$.usedTimes--, $.usedTimes === 0 && y(w), Object.keys(q).length === 0 && h.delete(L);
|
|
21954
21954
|
}
|
|
21955
21955
|
n.remove(w);
|
|
21956
21956
|
}
|
|
@@ -21965,7 +21965,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
21965
21965
|
if (w.depthTexture && (w.depthTexture.dispose(), n.remove(w.depthTexture)), w.isWebGLCubeRenderTarget)
|
|
21966
21966
|
for (let q = 0; q < 6; q++) {
|
|
21967
21967
|
if (Array.isArray(v.__webglFramebuffer[q]))
|
|
21968
|
-
for (let
|
|
21968
|
+
for (let $ = 0; $ < v.__webglFramebuffer[q].length; $++) s.deleteFramebuffer(v.__webglFramebuffer[q][$]);
|
|
21969
21969
|
else
|
|
21970
21970
|
s.deleteFramebuffer(v.__webglFramebuffer[q]);
|
|
21971
21971
|
v.__webglDepthbuffer && s.deleteRenderbuffer(v.__webglDepthbuffer[q]);
|
|
@@ -21981,7 +21981,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
21981
21981
|
v.__webglDepthRenderbuffer && s.deleteRenderbuffer(v.__webglDepthRenderbuffer);
|
|
21982
21982
|
}
|
|
21983
21983
|
const L = w.textures;
|
|
21984
|
-
for (let q = 0,
|
|
21984
|
+
for (let q = 0, $ = L.length; q < $; q++) {
|
|
21985
21985
|
const X = n.get(L[q]);
|
|
21986
21986
|
X.__webglTexture && (s.deleteTexture(X.__webglTexture), a.memory.textures--), n.remove(L[q]);
|
|
21987
21987
|
}
|
|
@@ -22001,7 +22001,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22001
22001
|
}
|
|
22002
22002
|
function H(w, v) {
|
|
22003
22003
|
const L = n.get(w);
|
|
22004
|
-
if (w.isVideoTexture &&
|
|
22004
|
+
if (w.isVideoTexture && je(w), w.isRenderTargetTexture === !1 && w.isExternalTexture !== !0 && w.version > 0 && L.__version !== w.version) {
|
|
22005
22005
|
const q = w.image;
|
|
22006
22006
|
if (q === null)
|
|
22007
22007
|
Te("WebGLRenderer: Texture marked for update but no image data found.");
|
|
@@ -22033,7 +22033,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22033
22033
|
function Z(w, v) {
|
|
22034
22034
|
const L = n.get(w);
|
|
22035
22035
|
if (w.isCubeDepthTexture !== !0 && w.version > 0 && L.__version !== w.version) {
|
|
22036
|
-
|
|
22036
|
+
j(L, w, v);
|
|
22037
22037
|
return;
|
|
22038
22038
|
}
|
|
22039
22039
|
t.bindTexture(s.TEXTURE_CUBE_MAP, L.__webglTexture, s.TEXTURE0 + v);
|
|
@@ -22072,23 +22072,23 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22072
22072
|
let L = !1;
|
|
22073
22073
|
w.__webglInit === void 0 && (w.__webglInit = !0, v.addEventListener("dispose", E));
|
|
22074
22074
|
const q = v.source;
|
|
22075
|
-
let
|
|
22076
|
-
|
|
22075
|
+
let $ = h.get(q);
|
|
22076
|
+
$ === void 0 && ($ = {}, h.set(q, $));
|
|
22077
22077
|
const X = V(v);
|
|
22078
22078
|
if (X !== w.__cacheKey) {
|
|
22079
|
-
|
|
22079
|
+
$[X] === void 0 && ($[X] = {
|
|
22080
22080
|
texture: s.createTexture(),
|
|
22081
22081
|
usedTimes: 0
|
|
22082
|
-
}, a.memory.textures++, L = !0),
|
|
22083
|
-
const Se =
|
|
22084
|
-
Se !== void 0 && (
|
|
22082
|
+
}, a.memory.textures++, L = !0), $[X].usedTimes++;
|
|
22083
|
+
const Se = $[w.__cacheKey];
|
|
22084
|
+
Se !== void 0 && ($[w.__cacheKey].usedTimes--, Se.usedTimes === 0 && y(v)), w.__cacheKey = X, w.__webglTexture = $[X].texture;
|
|
22085
22085
|
}
|
|
22086
22086
|
return L;
|
|
22087
22087
|
}
|
|
22088
22088
|
function lt(w, v, L) {
|
|
22089
22089
|
return Math.floor(Math.floor(w / L) / v);
|
|
22090
22090
|
}
|
|
22091
|
-
function
|
|
22091
|
+
function $e(w, v, L, q) {
|
|
22092
22092
|
const X = w.updateRanges;
|
|
22093
22093
|
if (X.length === 0)
|
|
22094
22094
|
t.texSubImage2D(s.TEXTURE_2D, 0, 0, 0, v.width, v.height, L, q, v.data);
|
|
@@ -22115,10 +22115,10 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22115
22115
|
function Y(w, v, L) {
|
|
22116
22116
|
let q = s.TEXTURE_2D;
|
|
22117
22117
|
(v.isDataArrayTexture || v.isCompressedArrayTexture) && (q = s.TEXTURE_2D_ARRAY), v.isData3DTexture && (q = s.TEXTURE_3D);
|
|
22118
|
-
const
|
|
22118
|
+
const $ = Pe(w, v), X = v.source;
|
|
22119
22119
|
t.bindTexture(q, w.__webglTexture, s.TEXTURE0 + L);
|
|
22120
22120
|
const Se = n.get(X);
|
|
22121
|
-
if (X.version !== Se.__version ||
|
|
22121
|
+
if (X.version !== Se.__version || $ === !0) {
|
|
22122
22122
|
t.activeTexture(s.TEXTURE0 + L);
|
|
22123
22123
|
const ie = Oe.getPrimaries(Oe.workingColorSpace), ve = v.colorSpace === ci ? null : Oe.getPrimaries(v.colorSpace), Ce = v.colorSpace === ci || ie === ve ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
22124
22124
|
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, v.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, v.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, v.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, Ce);
|
|
@@ -22128,7 +22128,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22128
22128
|
let ye = x(v.internalFormat, ae, ge, v.colorSpace, v.isVideoTexture);
|
|
22129
22129
|
Ue(q, v);
|
|
22130
22130
|
let re;
|
|
22131
|
-
const ze = v.mipmaps, D = v.isVideoTexture !== !0, ue = Se.__version === void 0 ||
|
|
22131
|
+
const ze = v.mipmaps, D = v.isVideoTexture !== !0, ue = Se.__version === void 0 || $ === !0, ee = X.dataReady, fe = A(v, Q);
|
|
22132
22132
|
if (v.isDepthTexture)
|
|
22133
22133
|
ye = M(v.format === Li, v.type), ue && (D ? t.texStorage2D(s.TEXTURE_2D, 1, ye, Q.width, Q.height) : t.texImage2D(s.TEXTURE_2D, 0, ye, Q.width, Q.height, 0, ae, ge, null));
|
|
22134
22134
|
else if (v.isDataTexture)
|
|
@@ -22138,7 +22138,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22138
22138
|
re = ze[J], D ? ee && t.texSubImage2D(s.TEXTURE_2D, J, 0, 0, re.width, re.height, ae, ge, re.data) : t.texImage2D(s.TEXTURE_2D, J, ye, re.width, re.height, 0, ae, ge, re.data);
|
|
22139
22139
|
v.generateMipmaps = !1;
|
|
22140
22140
|
} else
|
|
22141
|
-
D ? (ue && t.texStorage2D(s.TEXTURE_2D, fe, ye, Q.width, Q.height), ee &&
|
|
22141
|
+
D ? (ue && t.texStorage2D(s.TEXTURE_2D, fe, ye, Q.width, Q.height), ee && $e(v, Q, ae, ge)) : t.texImage2D(s.TEXTURE_2D, 0, ye, Q.width, Q.height, 0, ae, ge, Q.data);
|
|
22142
22142
|
else if (v.isCompressedTexture)
|
|
22143
22143
|
if (v.isCompressedArrayTexture) {
|
|
22144
22144
|
D && ue && t.texStorage3D(s.TEXTURE_2D_ARRAY, fe, ye, ze[0].width, ze[0].height, Q.depth);
|
|
@@ -22218,19 +22218,19 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22218
22218
|
}
|
|
22219
22219
|
w.__version = v.version;
|
|
22220
22220
|
}
|
|
22221
|
-
function
|
|
22221
|
+
function j(w, v, L) {
|
|
22222
22222
|
if (v.image.length !== 6) return;
|
|
22223
|
-
const q = Pe(w, v),
|
|
22223
|
+
const q = Pe(w, v), $ = v.source;
|
|
22224
22224
|
t.bindTexture(s.TEXTURE_CUBE_MAP, w.__webglTexture, s.TEXTURE0 + L);
|
|
22225
|
-
const X = n.get(
|
|
22226
|
-
if (
|
|
22225
|
+
const X = n.get($);
|
|
22226
|
+
if ($.version !== X.__version || q === !0) {
|
|
22227
22227
|
t.activeTexture(s.TEXTURE0 + L);
|
|
22228
22228
|
const Se = Oe.getPrimaries(Oe.workingColorSpace), ie = v.colorSpace === ci ? null : Oe.getPrimaries(v.colorSpace), ve = v.colorSpace === ci || Se === ie ? s.NONE : s.BROWSER_DEFAULT_WEBGL;
|
|
22229
22229
|
s.pixelStorei(s.UNPACK_FLIP_Y_WEBGL, v.flipY), s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL, v.premultiplyAlpha), s.pixelStorei(s.UNPACK_ALIGNMENT, v.unpackAlignment), s.pixelStorei(s.UNPACK_COLORSPACE_CONVERSION_WEBGL, ve);
|
|
22230
22230
|
const Ce = v.isCompressedTexture || v.image[0].isCompressedTexture, Q = v.image[0] && v.image[0].isDataTexture, ae = [];
|
|
22231
22231
|
for (let K = 0; K < 6; K++)
|
|
22232
22232
|
!Ce && !Q ? ae[K] = g(v.image[K], !0, i.maxCubemapSize) : ae[K] = Q ? v.image[K].image : v.image[K], ae[K] = ct(v, ae[K]);
|
|
22233
|
-
const ge = ae[0], ye = r.convert(v.format, v.colorSpace), re = r.convert(v.type), ze = x(v.internalFormat, ye, re, v.colorSpace), D = v.isVideoTexture !== !0, ue = X.__version === void 0 || q === !0, ee =
|
|
22233
|
+
const ge = ae[0], ye = r.convert(v.format, v.colorSpace), re = r.convert(v.type), ze = x(v.internalFormat, ye, re, v.colorSpace), D = v.isVideoTexture !== !0, ue = X.__version === void 0 || q === !0, ee = $.dataReady;
|
|
22234
22234
|
let fe = A(v, ge);
|
|
22235
22235
|
Ue(s.TEXTURE_CUBE_MAP, v);
|
|
22236
22236
|
let J;
|
|
@@ -22264,26 +22264,26 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22264
22264
|
}
|
|
22265
22265
|
}
|
|
22266
22266
|
}
|
|
22267
|
-
_(v) && m(s.TEXTURE_CUBE_MAP), X.__version =
|
|
22267
|
+
_(v) && m(s.TEXTURE_CUBE_MAP), X.__version = $.version, v.onUpdate && v.onUpdate(v);
|
|
22268
22268
|
}
|
|
22269
22269
|
w.__version = v.version;
|
|
22270
22270
|
}
|
|
22271
|
-
function de(w, v, L, q,
|
|
22271
|
+
function de(w, v, L, q, $, X) {
|
|
22272
22272
|
const Se = r.convert(L.format, L.colorSpace), ie = r.convert(L.type), ve = x(L.internalFormat, Se, ie, L.colorSpace), Ce = n.get(v), Q = n.get(L);
|
|
22273
22273
|
if (Q.__renderTarget = v, !Ce.__hasExternalTextures) {
|
|
22274
22274
|
const ae = Math.max(1, v.width >> X), ge = Math.max(1, v.height >> X);
|
|
22275
|
-
|
|
22275
|
+
$ === s.TEXTURE_3D || $ === s.TEXTURE_2D_ARRAY ? t.texImage3D($, X, ve, ae, ge, v.depth, 0, Se, ie, null) : t.texImage2D($, X, ve, ae, ge, 0, Se, ie, null);
|
|
22276
22276
|
}
|
|
22277
|
-
t.bindFramebuffer(s.FRAMEBUFFER, w), bt(v) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, q,
|
|
22277
|
+
t.bindFramebuffer(s.FRAMEBUFFER, w), bt(v) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, q, $, Q.__webglTexture, 0, P(v)) : ($ === s.TEXTURE_2D || $ >= s.TEXTURE_CUBE_MAP_POSITIVE_X && $ <= s.TEXTURE_CUBE_MAP_NEGATIVE_Z) && s.framebufferTexture2D(s.FRAMEBUFFER, q, $, Q.__webglTexture, X), t.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
22278
22278
|
}
|
|
22279
22279
|
function De(w, v, L) {
|
|
22280
22280
|
if (s.bindRenderbuffer(s.RENDERBUFFER, w), v.depthBuffer) {
|
|
22281
|
-
const q = v.depthTexture,
|
|
22281
|
+
const q = v.depthTexture, $ = q && q.isDepthTexture ? q.type : null, X = M(v.stencilBuffer, $), Se = v.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT;
|
|
22282
22282
|
bt(v) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, P(v), X, v.width, v.height) : L ? s.renderbufferStorageMultisample(s.RENDERBUFFER, P(v), X, v.width, v.height) : s.renderbufferStorage(s.RENDERBUFFER, X, v.width, v.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, Se, s.RENDERBUFFER, w);
|
|
22283
22283
|
} else {
|
|
22284
22284
|
const q = v.textures;
|
|
22285
|
-
for (let
|
|
22286
|
-
const X = q[
|
|
22285
|
+
for (let $ = 0; $ < q.length; $++) {
|
|
22286
|
+
const X = q[$], Se = r.convert(X.format, X.colorSpace), ie = r.convert(X.type), ve = x(X.internalFormat, Se, ie, X.colorSpace);
|
|
22287
22287
|
bt(v) ? o.renderbufferStorageMultisampleEXT(s.RENDERBUFFER, P(v), ve, v.width, v.height) : L ? s.renderbufferStorageMultisample(s.RENDERBUFFER, P(v), ve, v.width, v.height) : s.renderbufferStorage(s.RENDERBUFFER, ve, v.width, v.height);
|
|
22288
22288
|
}
|
|
22289
22289
|
}
|
|
@@ -22293,10 +22293,10 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22293
22293
|
const q = v.isWebGLCubeRenderTarget === !0;
|
|
22294
22294
|
if (t.bindFramebuffer(s.FRAMEBUFFER, w), !(v.depthTexture && v.depthTexture.isDepthTexture))
|
|
22295
22295
|
throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
|
|
22296
|
-
const
|
|
22297
|
-
if (
|
|
22298
|
-
if (
|
|
22299
|
-
|
|
22296
|
+
const $ = n.get(v.depthTexture);
|
|
22297
|
+
if ($.__renderTarget = v, (!$.__webglTexture || v.depthTexture.image.width !== v.width || v.depthTexture.image.height !== v.height) && (v.depthTexture.image.width = v.width, v.depthTexture.image.height = v.height, v.depthTexture.needsUpdate = !0), q) {
|
|
22298
|
+
if ($.__webglInit === void 0 && ($.__webglInit = !0, v.depthTexture.addEventListener("dispose", E)), $.__webglTexture === void 0) {
|
|
22299
|
+
$.__webglTexture = s.createTexture(), t.bindTexture(s.TEXTURE_CUBE_MAP, $.__webglTexture), Ue(s.TEXTURE_CUBE_MAP, v.depthTexture);
|
|
22300
22300
|
const Ce = r.convert(v.depthTexture.format), Q = r.convert(v.depthTexture.type);
|
|
22301
22301
|
let ae;
|
|
22302
22302
|
v.depthTexture.format === Qn ? ae = s.DEPTH_COMPONENT24 : v.depthTexture.format === Li && (ae = s.DEPTH24_STENCIL8);
|
|
@@ -22305,7 +22305,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22305
22305
|
}
|
|
22306
22306
|
} else
|
|
22307
22307
|
H(v.depthTexture, 0);
|
|
22308
|
-
const X =
|
|
22308
|
+
const X = $.__webglTexture, Se = P(v), ie = q ? s.TEXTURE_CUBE_MAP_POSITIVE_X + L : s.TEXTURE_2D, ve = v.depthTexture.format === Li ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT;
|
|
22309
22309
|
if (v.depthTexture.format === Qn)
|
|
22310
22310
|
bt(v) ? o.framebufferTexture2DMultisampleEXT(s.FRAMEBUFFER, ve, ie, X, 0, Se) : s.framebufferTexture2D(s.FRAMEBUFFER, ve, ie, X, 0);
|
|
22311
22311
|
else if (v.depthTexture.format === Li)
|
|
@@ -22318,10 +22318,10 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22318
22318
|
if (v.__boundDepthTexture !== w.depthTexture) {
|
|
22319
22319
|
const q = w.depthTexture;
|
|
22320
22320
|
if (v.__depthDisposeCallback && v.__depthDisposeCallback(), q) {
|
|
22321
|
-
const
|
|
22322
|
-
delete v.__boundDepthTexture, delete v.__depthDisposeCallback, q.removeEventListener("dispose",
|
|
22321
|
+
const $ = () => {
|
|
22322
|
+
delete v.__boundDepthTexture, delete v.__depthDisposeCallback, q.removeEventListener("dispose", $);
|
|
22323
22323
|
};
|
|
22324
|
-
q.addEventListener("dispose",
|
|
22324
|
+
q.addEventListener("dispose", $), v.__depthDisposeCallback = $;
|
|
22325
22325
|
}
|
|
22326
22326
|
v.__boundDepthTexture = q;
|
|
22327
22327
|
}
|
|
@@ -22339,16 +22339,16 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22339
22339
|
if (t.bindFramebuffer(s.FRAMEBUFFER, v.__webglFramebuffer[q]), v.__webglDepthbuffer[q] === void 0)
|
|
22340
22340
|
v.__webglDepthbuffer[q] = s.createRenderbuffer(), De(v.__webglDepthbuffer[q], w, !1);
|
|
22341
22341
|
else {
|
|
22342
|
-
const
|
|
22343
|
-
s.bindRenderbuffer(s.RENDERBUFFER, X), s.framebufferRenderbuffer(s.FRAMEBUFFER,
|
|
22342
|
+
const $ = w.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, X = v.__webglDepthbuffer[q];
|
|
22343
|
+
s.bindRenderbuffer(s.RENDERBUFFER, X), s.framebufferRenderbuffer(s.FRAMEBUFFER, $, s.RENDERBUFFER, X);
|
|
22344
22344
|
}
|
|
22345
22345
|
} else {
|
|
22346
22346
|
const q = w.texture.mipmaps;
|
|
22347
22347
|
if (q && q.length > 0 ? t.bindFramebuffer(s.FRAMEBUFFER, v.__webglFramebuffer[0]) : t.bindFramebuffer(s.FRAMEBUFFER, v.__webglFramebuffer), v.__webglDepthbuffer === void 0)
|
|
22348
22348
|
v.__webglDepthbuffer = s.createRenderbuffer(), De(v.__webglDepthbuffer, w, !1);
|
|
22349
22349
|
else {
|
|
22350
|
-
const
|
|
22351
|
-
s.bindRenderbuffer(s.RENDERBUFFER, X), s.framebufferRenderbuffer(s.FRAMEBUFFER,
|
|
22350
|
+
const $ = w.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, X = v.__webglDepthbuffer;
|
|
22351
|
+
s.bindRenderbuffer(s.RENDERBUFFER, X), s.framebufferRenderbuffer(s.FRAMEBUFFER, $, s.RENDERBUFFER, X);
|
|
22352
22352
|
}
|
|
22353
22353
|
}
|
|
22354
22354
|
t.bindFramebuffer(s.FRAMEBUFFER, null);
|
|
@@ -22360,7 +22360,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22360
22360
|
function We(w) {
|
|
22361
22361
|
const v = w.texture, L = n.get(w), q = n.get(v);
|
|
22362
22362
|
w.addEventListener("dispose", R);
|
|
22363
|
-
const
|
|
22363
|
+
const $ = w.textures, X = w.isWebGLCubeRenderTarget === !0, Se = $.length > 1;
|
|
22364
22364
|
if (Se || (q.__webglTexture === void 0 && (q.__webglTexture = s.createTexture()), q.__version = v.version, a.memory.textures++), X) {
|
|
22365
22365
|
L.__webglFramebuffer = [];
|
|
22366
22366
|
for (let ie = 0; ie < 6; ie++)
|
|
@@ -22378,14 +22378,14 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22378
22378
|
} else
|
|
22379
22379
|
L.__webglFramebuffer = s.createFramebuffer();
|
|
22380
22380
|
if (Se)
|
|
22381
|
-
for (let ie = 0, ve =
|
|
22382
|
-
const Ce = n.get(
|
|
22381
|
+
for (let ie = 0, ve = $.length; ie < ve; ie++) {
|
|
22382
|
+
const Ce = n.get($[ie]);
|
|
22383
22383
|
Ce.__webglTexture === void 0 && (Ce.__webglTexture = s.createTexture(), a.memory.textures++);
|
|
22384
22384
|
}
|
|
22385
22385
|
if (w.samples > 0 && bt(w) === !1) {
|
|
22386
22386
|
L.__webglMultisampledFramebuffer = s.createFramebuffer(), L.__webglColorRenderbuffer = [], t.bindFramebuffer(s.FRAMEBUFFER, L.__webglMultisampledFramebuffer);
|
|
22387
|
-
for (let ie = 0; ie <
|
|
22388
|
-
const ve =
|
|
22387
|
+
for (let ie = 0; ie < $.length; ie++) {
|
|
22388
|
+
const ve = $[ie];
|
|
22389
22389
|
L.__webglColorRenderbuffer[ie] = s.createRenderbuffer(), s.bindRenderbuffer(s.RENDERBUFFER, L.__webglColorRenderbuffer[ie]);
|
|
22390
22390
|
const Ce = r.convert(ve.format, ve.colorSpace), Q = r.convert(ve.type), ae = x(ve.internalFormat, Ce, Q, ve.colorSpace, w.isXRRenderTarget === !0), ge = P(w);
|
|
22391
22391
|
s.renderbufferStorageMultisample(s.RENDERBUFFER, ge, ae, w.width, w.height), s.framebufferRenderbuffer(s.FRAMEBUFFER, s.COLOR_ATTACHMENT0 + ie, s.RENDERBUFFER, L.__webglColorRenderbuffer[ie]);
|
|
@@ -22403,8 +22403,8 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22403
22403
|
de(L.__webglFramebuffer[ie], w, v, s.COLOR_ATTACHMENT0, s.TEXTURE_CUBE_MAP_POSITIVE_X + ie, 0);
|
|
22404
22404
|
_(v) && m(s.TEXTURE_CUBE_MAP), t.unbindTexture();
|
|
22405
22405
|
} else if (Se) {
|
|
22406
|
-
for (let ie = 0, ve =
|
|
22407
|
-
const Ce =
|
|
22406
|
+
for (let ie = 0, ve = $.length; ie < ve; ie++) {
|
|
22407
|
+
const Ce = $[ie], Q = n.get(Ce);
|
|
22408
22408
|
let ae = s.TEXTURE_2D;
|
|
22409
22409
|
(w.isWebGL3DRenderTarget || w.isWebGLArrayRenderTarget) && (ae = w.isWebGL3DRenderTarget ? s.TEXTURE_3D : s.TEXTURE_2D_ARRAY), t.bindTexture(ae, Q.__webglTexture), Ue(ae, Ce), de(L.__webglFramebuffer, w, Ce, s.COLOR_ATTACHMENT0 + ie, ae, 0), _(Ce) && m(ae);
|
|
22410
22410
|
}
|
|
@@ -22423,9 +22423,9 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22423
22423
|
function Qe(w) {
|
|
22424
22424
|
const v = w.textures;
|
|
22425
22425
|
for (let L = 0, q = v.length; L < q; L++) {
|
|
22426
|
-
const
|
|
22427
|
-
if (_(
|
|
22428
|
-
const X = S(w), Se = n.get(
|
|
22426
|
+
const $ = v[L];
|
|
22427
|
+
if (_($)) {
|
|
22428
|
+
const X = S(w), Se = n.get($).__webglTexture;
|
|
22429
22429
|
t.bindTexture(X, Se), m(X), t.unbindTexture();
|
|
22430
22430
|
}
|
|
22431
22431
|
}
|
|
@@ -22435,7 +22435,7 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22435
22435
|
if (w.samples > 0) {
|
|
22436
22436
|
if (bt(w) === !1) {
|
|
22437
22437
|
const v = w.textures, L = w.width, q = w.height;
|
|
22438
|
-
let
|
|
22438
|
+
let $ = s.COLOR_BUFFER_BIT;
|
|
22439
22439
|
const X = w.stencilBuffer ? s.DEPTH_STENCIL_ATTACHMENT : s.DEPTH_ATTACHMENT, Se = n.get(w), ie = v.length > 1;
|
|
22440
22440
|
if (ie)
|
|
22441
22441
|
for (let Ce = 0; Ce < v.length; Ce++)
|
|
@@ -22444,12 +22444,12 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22444
22444
|
const ve = w.texture.mipmaps;
|
|
22445
22445
|
ve && ve.length > 0 ? t.bindFramebuffer(s.DRAW_FRAMEBUFFER, Se.__webglFramebuffer[0]) : t.bindFramebuffer(s.DRAW_FRAMEBUFFER, Se.__webglFramebuffer);
|
|
22446
22446
|
for (let Ce = 0; Ce < v.length; Ce++) {
|
|
22447
|
-
if (w.resolveDepthBuffer && (w.depthBuffer && (
|
|
22447
|
+
if (w.resolveDepthBuffer && (w.depthBuffer && ($ |= s.DEPTH_BUFFER_BIT), w.stencilBuffer && w.resolveStencilBuffer && ($ |= s.STENCIL_BUFFER_BIT)), ie) {
|
|
22448
22448
|
s.framebufferRenderbuffer(s.READ_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.RENDERBUFFER, Se.__webglColorRenderbuffer[Ce]);
|
|
22449
22449
|
const Q = n.get(v[Ce]).__webglTexture;
|
|
22450
22450
|
s.framebufferTexture2D(s.DRAW_FRAMEBUFFER, s.COLOR_ATTACHMENT0, s.TEXTURE_2D, Q, 0);
|
|
22451
22451
|
}
|
|
22452
|
-
s.blitFramebuffer(0, 0, L, q, 0, 0, L, q,
|
|
22452
|
+
s.blitFramebuffer(0, 0, L, q, 0, 0, L, q, $, s.NEAREST), c === !0 && (rt.length = 0, Ve.length = 0, rt.push(s.COLOR_ATTACHMENT0 + Ce), w.depthBuffer && w.resolveDepthBuffer === !1 && (rt.push(X), Ve.push(X), s.invalidateFramebuffer(s.DRAW_FRAMEBUFFER, Ve)), s.invalidateFramebuffer(s.READ_FRAMEBUFFER, rt));
|
|
22453
22453
|
}
|
|
22454
22454
|
if (t.bindFramebuffer(s.READ_FRAMEBUFFER, null), t.bindFramebuffer(s.DRAW_FRAMEBUFFER, null), ie)
|
|
22455
22455
|
for (let Ce = 0; Ce < v.length; Ce++) {
|
|
@@ -22471,13 +22471,13 @@ function ex(s, e, t, n, i, r, a) {
|
|
|
22471
22471
|
const v = n.get(w);
|
|
22472
22472
|
return w.samples > 0 && e.has("WEBGL_multisampled_render_to_texture") === !0 && v.__useRenderToTexture !== !1;
|
|
22473
22473
|
}
|
|
22474
|
-
function
|
|
22474
|
+
function je(w) {
|
|
22475
22475
|
const v = a.render.frame;
|
|
22476
22476
|
d.get(w) !== v && (d.set(w, v), w.update());
|
|
22477
22477
|
}
|
|
22478
22478
|
function ct(w, v) {
|
|
22479
|
-
const L = w.colorSpace, q = w.format,
|
|
22480
|
-
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !== _r && L !== ci && (Oe.getTransfer(L) === nt ? (q !== mn ||
|
|
22479
|
+
const L = w.colorSpace, q = w.format, $ = w.type;
|
|
22480
|
+
return w.isCompressedTexture === !0 || w.isVideoTexture === !0 || L !== _r && L !== ci && (Oe.getTransfer(L) === nt ? (q !== mn || $ !== sn) && Te("WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : Re("WebGLTextures: Unsupported texture color space:", L)), v;
|
|
22481
22481
|
}
|
|
22482
22482
|
function xe(w) {
|
|
22483
22483
|
return typeof HTMLImageElement < "u" && w instanceof HTMLImageElement ? (u.width = w.naturalWidth || w.width, u.height = w.naturalHeight || w.height) : typeof VideoFrame < "u" && w instanceof VideoFrame ? (u.width = w.displayWidth, u.height = w.displayHeight) : (u.width = w.width, u.height = w.height), u;
|
|
@@ -22512,17 +22512,17 @@ function tx(s, e) {
|
|
|
22512
22512
|
if (n === mr) return s.RG;
|
|
22513
22513
|
if (n === Ol) return s.RG_INTEGER;
|
|
22514
22514
|
if (n === Bl) return s.RGBA_INTEGER;
|
|
22515
|
-
if (n ===
|
|
22515
|
+
if (n === js || n === Js || n === Qs || n === ea)
|
|
22516
22516
|
if (a === nt)
|
|
22517
22517
|
if (r = e.get("WEBGL_compressed_texture_s3tc_srgb"), r !== null) {
|
|
22518
|
-
if (n ===
|
|
22518
|
+
if (n === js) return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;
|
|
22519
22519
|
if (n === Js) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
|
|
22520
22520
|
if (n === Qs) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
|
|
22521
22521
|
if (n === ea) return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
|
|
22522
22522
|
} else
|
|
22523
22523
|
return null;
|
|
22524
22524
|
else if (r = e.get("WEBGL_compressed_texture_s3tc"), r !== null) {
|
|
22525
|
-
if (n ===
|
|
22525
|
+
if (n === js) return r.COMPRESSED_RGB_S3TC_DXT1_EXT;
|
|
22526
22526
|
if (n === Js) return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;
|
|
22527
22527
|
if (n === Qs) return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;
|
|
22528
22528
|
if (n === ea) return r.COMPRESSED_RGBA_S3TC_DXT5_EXT;
|
|
@@ -22546,13 +22546,13 @@ function tx(s, e) {
|
|
|
22546
22546
|
if (n === qo) return r.COMPRESSED_SIGNED_RG11_EAC;
|
|
22547
22547
|
} else
|
|
22548
22548
|
return null;
|
|
22549
|
-
if (n === Yo || n === Ko || n === Zo || n ===
|
|
22549
|
+
if (n === Yo || n === Ko || n === Zo || n === $o || n === jo || n === Jo || n === Qo || n === el || n === tl || n === nl || n === il || n === rl || n === sl || n === al)
|
|
22550
22550
|
if (r = e.get("WEBGL_compressed_texture_astc"), r !== null) {
|
|
22551
22551
|
if (n === Yo) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR : r.COMPRESSED_RGBA_ASTC_4x4_KHR;
|
|
22552
22552
|
if (n === Ko) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR : r.COMPRESSED_RGBA_ASTC_5x4_KHR;
|
|
22553
22553
|
if (n === Zo) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR : r.COMPRESSED_RGBA_ASTC_5x5_KHR;
|
|
22554
|
-
if (n ===
|
|
22555
|
-
if (n ===
|
|
22554
|
+
if (n === $o) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR : r.COMPRESSED_RGBA_ASTC_6x5_KHR;
|
|
22555
|
+
if (n === jo) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR : r.COMPRESSED_RGBA_ASTC_6x6_KHR;
|
|
22556
22556
|
if (n === Jo) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR : r.COMPRESSED_RGBA_ASTC_8x5_KHR;
|
|
22557
22557
|
if (n === Qo) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR : r.COMPRESSED_RGBA_ASTC_8x6_KHR;
|
|
22558
22558
|
if (n === el) return a === nt ? r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR : r.COMPRESSED_RGBA_ASTC_8x8_KHR;
|
|
@@ -22685,32 +22685,32 @@ class sx extends gi {
|
|
|
22685
22685
|
const C = [y, b], B = new tm();
|
|
22686
22686
|
let N = null, V = null;
|
|
22687
22687
|
this.cameraAutoUpdate = !0, this.enabled = !1, this.isPresenting = !1, this.getController = function(Y) {
|
|
22688
|
-
let
|
|
22689
|
-
return
|
|
22688
|
+
let j = A[Y];
|
|
22689
|
+
return j === void 0 && (j = new Qa(), A[Y] = j), j.getTargetRaySpace();
|
|
22690
22690
|
}, this.getControllerGrip = function(Y) {
|
|
22691
|
-
let
|
|
22692
|
-
return
|
|
22691
|
+
let j = A[Y];
|
|
22692
|
+
return j === void 0 && (j = new Qa(), A[Y] = j), j.getGripSpace();
|
|
22693
22693
|
}, this.getHand = function(Y) {
|
|
22694
|
-
let
|
|
22695
|
-
return
|
|
22694
|
+
let j = A[Y];
|
|
22695
|
+
return j === void 0 && (j = new Qa(), A[Y] = j), j.getHandSpace();
|
|
22696
22696
|
};
|
|
22697
22697
|
function H(Y) {
|
|
22698
|
-
const
|
|
22699
|
-
if (
|
|
22698
|
+
const j = E.indexOf(Y.inputSource);
|
|
22699
|
+
if (j === -1)
|
|
22700
22700
|
return;
|
|
22701
|
-
const de = A[
|
|
22701
|
+
const de = A[j];
|
|
22702
22702
|
de !== void 0 && (de.update(Y.inputSource, Y.frame, u || a), de.dispatchEvent({ type: Y.type, data: Y.inputSource }));
|
|
22703
22703
|
}
|
|
22704
22704
|
function k() {
|
|
22705
22705
|
i.removeEventListener("select", H), i.removeEventListener("selectstart", H), i.removeEventListener("selectend", H), i.removeEventListener("squeeze", H), i.removeEventListener("squeezestart", H), i.removeEventListener("squeezeend", H), i.removeEventListener("end", k), i.removeEventListener("inputsourceschange", z);
|
|
22706
22706
|
for (let Y = 0; Y < A.length; Y++) {
|
|
22707
|
-
const
|
|
22708
|
-
|
|
22707
|
+
const j = E[Y];
|
|
22708
|
+
j !== null && (E[Y] = null, A[Y].disconnect(j));
|
|
22709
22709
|
}
|
|
22710
22710
|
N = null, V = null, _.reset();
|
|
22711
22711
|
for (const Y in m)
|
|
22712
22712
|
delete m[Y];
|
|
22713
|
-
e.setRenderTarget(x), f = null, h = null, l = null, i = null, M = null,
|
|
22713
|
+
e.setRenderTarget(x), f = null, h = null, l = null, i = null, M = null, $e.stop(), n.isPresenting = !1, e.setPixelRatio(I), e.setSize(R.width, R.height, !1), n.dispatchEvent({ type: "sessionend" });
|
|
22714
22714
|
}
|
|
22715
22715
|
this.setFramebufferScaleFactor = function(Y) {
|
|
22716
22716
|
r = Y, n.isPresenting === !0 && Te("WebXRManager: Cannot change framebuffer scale while presenting.");
|
|
@@ -22773,7 +22773,7 @@ class sx extends gi {
|
|
|
22773
22773
|
}
|
|
22774
22774
|
);
|
|
22775
22775
|
}
|
|
22776
|
-
M.isXRRenderTarget = !0, this.setFoveation(c), u = null, a = await i.requestReferenceSpace(o),
|
|
22776
|
+
M.isXRRenderTarget = !0, this.setFoveation(c), u = null, a = await i.requestReferenceSpace(o), $e.setContext(i), $e.start(), n.isPresenting = !0, n.dispatchEvent({ type: "sessionstart" });
|
|
22777
22777
|
}
|
|
22778
22778
|
}, this.getEnvironmentBlendMode = function() {
|
|
22779
22779
|
if (i !== null)
|
|
@@ -22782,12 +22782,12 @@ class sx extends gi {
|
|
|
22782
22782
|
return _.getDepthTexture();
|
|
22783
22783
|
};
|
|
22784
22784
|
function z(Y) {
|
|
22785
|
-
for (let
|
|
22786
|
-
const de = Y.removed[
|
|
22785
|
+
for (let j = 0; j < Y.removed.length; j++) {
|
|
22786
|
+
const de = Y.removed[j], De = E.indexOf(de);
|
|
22787
22787
|
De >= 0 && (E[De] = null, A[De].disconnect(de));
|
|
22788
22788
|
}
|
|
22789
|
-
for (let
|
|
22790
|
-
const de = Y.added[
|
|
22789
|
+
for (let j = 0; j < Y.added.length; j++) {
|
|
22790
|
+
const de = Y.added[j];
|
|
22791
22791
|
let De = E.indexOf(de);
|
|
22792
22792
|
if (De === -1) {
|
|
22793
22793
|
for (let Xe = 0; Xe < A.length; Xe++)
|
|
@@ -22805,23 +22805,23 @@ class sx extends gi {
|
|
|
22805
22805
|
}
|
|
22806
22806
|
}
|
|
22807
22807
|
const Z = new U(), te = new U();
|
|
22808
|
-
function se(Y,
|
|
22809
|
-
Z.setFromMatrixPosition(
|
|
22810
|
-
const De = Z.distanceTo(te), _e =
|
|
22811
|
-
if (
|
|
22812
|
-
Y.projectionMatrix.copy(
|
|
22808
|
+
function se(Y, j, de) {
|
|
22809
|
+
Z.setFromMatrixPosition(j.matrixWorld), te.setFromMatrixPosition(de.matrixWorld);
|
|
22810
|
+
const De = Z.distanceTo(te), _e = j.projectionMatrix.elements, Xe = de.projectionMatrix.elements, St = _e[14] / (_e[10] - 1), We = _e[14] / (_e[10] + 1), Qe = (_e[9] + 1) / _e[5], rt = (_e[9] - 1) / _e[5], Ve = (_e[8] - 1) / _e[0], Tt = (Xe[8] + 1) / Xe[0], P = St * Ve, bt = St * Tt, je = De / (-Ve + Tt), ct = je * -Ve;
|
|
22811
|
+
if (j.matrixWorld.decompose(Y.position, Y.quaternion, Y.scale), Y.translateX(ct), Y.translateZ(je), Y.matrixWorld.compose(Y.position, Y.quaternion, Y.scale), Y.matrixWorldInverse.copy(Y.matrixWorld).invert(), _e[10] === -1)
|
|
22812
|
+
Y.projectionMatrix.copy(j.projectionMatrix), Y.projectionMatrixInverse.copy(j.projectionMatrixInverse);
|
|
22813
22813
|
else {
|
|
22814
|
-
const xe = St +
|
|
22815
|
-
Y.projectionMatrix.makePerspective(v, L, q,
|
|
22814
|
+
const xe = St + je, w = We + je, v = P - ct, L = bt + (De - ct), q = Qe * We / w * xe, $ = rt * We / w * xe;
|
|
22815
|
+
Y.projectionMatrix.makePerspective(v, L, q, $, xe, w), Y.projectionMatrixInverse.copy(Y.projectionMatrix).invert();
|
|
22816
22816
|
}
|
|
22817
22817
|
}
|
|
22818
|
-
function he(Y,
|
|
22819
|
-
|
|
22818
|
+
function he(Y, j) {
|
|
22819
|
+
j === null ? Y.matrixWorld.copy(Y.matrix) : Y.matrixWorld.multiplyMatrices(j.matrixWorld, Y.matrix), Y.matrixWorldInverse.copy(Y.matrixWorld).invert();
|
|
22820
22820
|
}
|
|
22821
22821
|
this.updateCamera = function(Y) {
|
|
22822
22822
|
if (i === null) return;
|
|
22823
|
-
let
|
|
22824
|
-
_.texture !== null && (_.depthNear > 0 && (
|
|
22823
|
+
let j = Y.near, de = Y.far;
|
|
22824
|
+
_.texture !== null && (_.depthNear > 0 && (j = _.depthNear), _.depthFar > 0 && (de = _.depthFar)), B.near = b.near = y.near = j, B.far = b.far = y.far = de, (N !== B.near || V !== B.far) && (i.updateRenderState({
|
|
22825
22825
|
depthNear: B.near,
|
|
22826
22826
|
depthFar: B.far
|
|
22827
22827
|
}), N = B.near, V = B.far), B.layers.mask = Y.layers.mask | 6, y.layers.mask = B.layers.mask & 3, b.layers.mask = B.layers.mask & 5;
|
|
@@ -22831,8 +22831,8 @@ class sx extends gi {
|
|
|
22831
22831
|
he(_e[Xe], De);
|
|
22832
22832
|
_e.length === 2 ? se(B, y, b) : B.projectionMatrix.copy(y.projectionMatrix), Ue(Y, B, De);
|
|
22833
22833
|
};
|
|
22834
|
-
function Ue(Y,
|
|
22835
|
-
de === null ? Y.matrix.copy(
|
|
22834
|
+
function Ue(Y, j, de) {
|
|
22835
|
+
de === null ? Y.matrix.copy(j.matrixWorld) : (Y.matrix.copy(de.matrixWorld), Y.matrix.invert(), Y.matrix.multiply(j.matrixWorld)), Y.matrix.decompose(Y.position, Y.quaternion, Y.scale), Y.updateMatrixWorld(!0), Y.projectionMatrix.copy(j.projectionMatrix), Y.projectionMatrixInverse.copy(j.projectionMatrixInverse), Y.isPerspectiveCamera && (Y.fov = gr * 2 * Math.atan(1 / Y.projectionMatrix.elements[5]), Y.zoom = 1);
|
|
22836
22836
|
}
|
|
22837
22837
|
this.getCamera = function() {
|
|
22838
22838
|
return B;
|
|
@@ -22849,8 +22849,8 @@ class sx extends gi {
|
|
|
22849
22849
|
return m[Y];
|
|
22850
22850
|
};
|
|
22851
22851
|
let Pe = null;
|
|
22852
|
-
function lt(Y,
|
|
22853
|
-
if (d =
|
|
22852
|
+
function lt(Y, j) {
|
|
22853
|
+
if (d = j.getViewerPose(u || a), p = j, d !== null) {
|
|
22854
22854
|
const de = d.views;
|
|
22855
22855
|
f !== null && (e.setRenderTargetFramebuffer(M, f.framebuffer), e.setRenderTarget(M));
|
|
22856
22856
|
let De = !1;
|
|
@@ -22892,12 +22892,12 @@ class sx extends gi {
|
|
|
22892
22892
|
}
|
|
22893
22893
|
for (let de = 0; de < A.length; de++) {
|
|
22894
22894
|
const De = E[de], _e = A[de];
|
|
22895
|
-
De !== null && _e !== void 0 && _e.update(De,
|
|
22895
|
+
De !== null && _e !== void 0 && _e.update(De, j, u || a);
|
|
22896
22896
|
}
|
|
22897
|
-
Pe && Pe(Y,
|
|
22897
|
+
Pe && Pe(Y, j), j.detectedPlanes && n.dispatchEvent({ type: "planesdetected", data: j }), p = null;
|
|
22898
22898
|
}
|
|
22899
|
-
const
|
|
22900
|
-
|
|
22899
|
+
const $e = new Ph();
|
|
22900
|
+
$e.setAnimationLoop(lt), this.setAnimationLoop = function(Y) {
|
|
22901
22901
|
Pe = Y;
|
|
22902
22902
|
}, this.dispose = function() {
|
|
22903
22903
|
};
|
|
@@ -23640,8 +23640,8 @@ class hx {
|
|
|
23640
23640
|
const k = new Je(), z = new Je();
|
|
23641
23641
|
let Z = null;
|
|
23642
23642
|
const te = new Ie(0);
|
|
23643
|
-
let se = 0, he = t.width, Ue = t.height, Pe = 1, lt = null,
|
|
23644
|
-
const Y = new Je(0, 0, he, Ue),
|
|
23643
|
+
let se = 0, he = t.width, Ue = t.height, Pe = 1, lt = null, $e = null;
|
|
23644
|
+
const Y = new Je(0, 0, he, Ue), j = new Je(0, 0, he, Ue);
|
|
23645
23645
|
let de = !1;
|
|
23646
23646
|
const De = new Kl();
|
|
23647
23647
|
let _e = !1, Xe = !1;
|
|
@@ -23673,9 +23673,9 @@ class hx {
|
|
|
23673
23673
|
} catch (T) {
|
|
23674
23674
|
throw Re("WebGLRenderer: " + T.message), T;
|
|
23675
23675
|
}
|
|
23676
|
-
let
|
|
23676
|
+
let je, ct, xe, w, v, L, q, $, X, Se, ie, ve, Ce, Q, ae, ge, ye, re, ze, D, ue, ee, fe, J;
|
|
23677
23677
|
function K() {
|
|
23678
|
-
|
|
23678
|
+
je = new u0(P), je.init(), ee = new tx(P, je), ct = new t0(P, je, e, ee), xe = new Qv(P, je), ct.reversedDepthBuffer && h && xe.buffers.depth.setReversed(!0), w = new d0(P), v = new Bv(), L = new ex(P, je, xe, v, ct, ee, w), q = new i0(y), $ = new c0(y), X = new gm(P), fe = new Qg(P, X), Se = new h0(P, X, w, fe), ie = new m0(P, Se, X, w), ze = new p0(P, ct, L), ge = new n0(v), ve = new Ov(y, q, $, je, ct, fe, ge), Ce = new ox(y, v), Q = new Vv(), ae = new qv(je), re = new Jg(y, q, $, xe, ie, p, c), ye = new jv(y, ie, ct), J = new lx(P, w, ct, xe), D = new e0(P, je, w), ue = new f0(P, je, w), w.programs = ve.programs, y.capabilities = ct, y.extensions = je, y.properties = v, y.renderLists = Q, y.shadowMap = ye, y.state = xe, y.info = w;
|
|
23679
23679
|
}
|
|
23680
23680
|
K(), g !== sn && (I = new g0(g, t.width, t.height, i, r));
|
|
23681
23681
|
const ne = new sx(y, P);
|
|
@@ -23684,10 +23684,10 @@ class hx {
|
|
|
23684
23684
|
}, this.getContextAttributes = function() {
|
|
23685
23685
|
return P.getContextAttributes();
|
|
23686
23686
|
}, this.forceContextLoss = function() {
|
|
23687
|
-
const T =
|
|
23687
|
+
const T = je.get("WEBGL_lose_context");
|
|
23688
23688
|
T && T.loseContext();
|
|
23689
23689
|
}, this.forceContextRestore = function() {
|
|
23690
|
-
const T =
|
|
23690
|
+
const T = je.get("WEBGL_lose_context");
|
|
23691
23691
|
T && T.restoreContext();
|
|
23692
23692
|
}, this.getPixelRatio = function() {
|
|
23693
23693
|
return Pe;
|
|
@@ -23725,9 +23725,9 @@ class hx {
|
|
|
23725
23725
|
}, this.setViewport = function(T, F, W, G) {
|
|
23726
23726
|
T.isVector4 ? Y.set(T.x, T.y, T.z, T.w) : Y.set(T, F, W, G), xe.viewport(k.copy(Y).multiplyScalar(Pe).round());
|
|
23727
23727
|
}, this.getScissor = function(T) {
|
|
23728
|
-
return T.copy(
|
|
23728
|
+
return T.copy(j);
|
|
23729
23729
|
}, this.setScissor = function(T, F, W, G) {
|
|
23730
|
-
T.isVector4 ?
|
|
23730
|
+
T.isVector4 ? j.set(T.x, T.y, T.z, T.w) : j.set(T, F, W, G), xe.scissor(z.copy(j).multiplyScalar(Pe).round());
|
|
23731
23731
|
}, this.getScissorTest = function() {
|
|
23732
23732
|
return de;
|
|
23733
23733
|
}, this.setScissorTest = function(T) {
|
|
@@ -23735,7 +23735,7 @@ class hx {
|
|
|
23735
23735
|
}, this.setOpaqueSort = function(T) {
|
|
23736
23736
|
lt = T;
|
|
23737
23737
|
}, this.setTransparentSort = function(T) {
|
|
23738
|
-
|
|
23738
|
+
$e = T;
|
|
23739
23739
|
}, this.getClearColor = function(T) {
|
|
23740
23740
|
return T.copy(re.getClearColor());
|
|
23741
23741
|
}, this.setClearColor = function() {
|
|
@@ -23766,7 +23766,7 @@ class hx {
|
|
|
23766
23766
|
}, this.clearStencil = function() {
|
|
23767
23767
|
this.clear(!1, !1, !0);
|
|
23768
23768
|
}, this.dispose = function() {
|
|
23769
|
-
t.removeEventListener("webglcontextlost", Le, !1), t.removeEventListener("webglcontextrestored", ut, !1), t.removeEventListener("webglcontextcreationerror", et, !1), re.dispose(), Q.dispose(), ae.dispose(), v.dispose(), q.dispose(),
|
|
23769
|
+
t.removeEventListener("webglcontextlost", Le, !1), t.removeEventListener("webglcontextrestored", ut, !1), t.removeEventListener("webglcontextcreationerror", et, !1), re.dispose(), Q.dispose(), ae.dispose(), v.dispose(), q.dispose(), $.dispose(), ie.dispose(), fe.dispose(), J.dispose(), ve.dispose(), ne.dispose(), ne.removeEventListener("sessionstart", pc), ne.removeEventListener("sessionend", mc), Si.stop();
|
|
23770
23770
|
};
|
|
23771
23771
|
function Le(T) {
|
|
23772
23772
|
T.preventDefault(), Pc("WebGLRenderer: Context Lost."), b = !0;
|
|
@@ -23817,7 +23817,7 @@ class hx {
|
|
|
23817
23817
|
if (O.isBatchedMesh)
|
|
23818
23818
|
if (O._multiDrawInstances !== null)
|
|
23819
23819
|
ss("WebGLRenderer: renderMultiDrawInstances has been deprecated and will be removed in r184. Append to renderMultiDraw arguments and use indirection."), st.renderMultiDrawInstances(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount, O._multiDrawInstances);
|
|
23820
|
-
else if (
|
|
23820
|
+
else if (je.get("WEBGL_multi_draw"))
|
|
23821
23821
|
st.renderMultiDraw(O._multiDrawStarts, O._multiDrawCounts, O._multiDrawCount);
|
|
23822
23822
|
else {
|
|
23823
23823
|
const Ee = O._multiDrawStarts, tt = O._multiDrawCounts, Ze = O._multiDrawCount, en = me ? X.get(me).bytesPerElement : 1, zi = v.get(G).currentProgram.getUniforms();
|
|
@@ -23867,7 +23867,7 @@ class hx {
|
|
|
23867
23867
|
}
|
|
23868
23868
|
setTimeout(oe, 10);
|
|
23869
23869
|
}
|
|
23870
|
-
|
|
23870
|
+
je.get("KHR_parallel_shader_compile") !== null ? oe() : setTimeout(oe, 10);
|
|
23871
23871
|
});
|
|
23872
23872
|
};
|
|
23873
23873
|
let Ra = null;
|
|
@@ -23894,7 +23894,7 @@ class hx {
|
|
|
23894
23894
|
const pe = y.xr.getDepthSensingMesh();
|
|
23895
23895
|
pe !== null && Ca(pe, F, -1 / 0, y.sortObjects);
|
|
23896
23896
|
}
|
|
23897
|
-
Ca(T, F, 0, y.sortObjects), M.finish(), y.sortObjects === !0 && M.sort(lt,
|
|
23897
|
+
Ca(T, F, 0, y.sortObjects), M.finish(), y.sortObjects === !0 && M.sort(lt, $e), Ve = ne.enabled === !1 || ne.isPresenting === !1 || ne.hasDepthSensing() === !1, Ve && re.addToRenderList(M, T), this.info.render.frame++, _e === !0 && ge.beginShadows();
|
|
23898
23898
|
const O = A.state.shadowsArray;
|
|
23899
23899
|
if (ye.render(O, T, F), _e === !0 && ge.endShadows(), this.info.autoReset === !0 && this.info.reset(), (G && I.hasRenderPass()) === !1) {
|
|
23900
23900
|
const pe = M.opaque, ce = M.transmissive;
|
|
@@ -23953,7 +23953,7 @@ class hx {
|
|
|
23953
23953
|
if ((W.isScene === !0 ? W.overrideMaterial : null) !== null)
|
|
23954
23954
|
return;
|
|
23955
23955
|
if (A.state.transmissionRenderTarget[G.id] === void 0) {
|
|
23956
|
-
const He =
|
|
23956
|
+
const He = je.has("EXT_color_buffer_half_float") || je.has("EXT_color_buffer_float");
|
|
23957
23957
|
A.state.transmissionRenderTarget[G.id] = new Nn(1, 1, {
|
|
23958
23958
|
generateMipmaps: !0,
|
|
23959
23959
|
type: He ? Jn : sn,
|
|
@@ -23972,7 +23972,7 @@ class hx {
|
|
|
23972
23972
|
const we = y.toneMapping;
|
|
23973
23973
|
y.toneMapping = Un;
|
|
23974
23974
|
const Ae = G.viewport;
|
|
23975
|
-
if (G.viewport !== void 0 && (G.viewport = void 0), A.setupLightsView(G), _e === !0 && ge.setGlobalState(y.clippingPlanes, G), ys(T, W, G), L.updateMultisampleRenderTarget(oe), L.updateRenderTargetMipmap(oe),
|
|
23975
|
+
if (G.viewport !== void 0 && (G.viewport = void 0), A.setupLightsView(G), _e === !0 && ge.setGlobalState(y.clippingPlanes, G), ys(T, W, G), L.updateMultisampleRenderTarget(oe), L.updateRenderTargetMipmap(oe), je.has("WEBGL_multisampled_render_to_texture") === !1) {
|
|
23976
23976
|
let He = !1;
|
|
23977
23977
|
for (let it = 0, vt = F.length; it < vt; it++) {
|
|
23978
23978
|
const xt = F[it], { object: st, geometry: Ee, material: tt, group: Ze } = xt;
|
|
@@ -24000,7 +24000,7 @@ class hx {
|
|
|
24000
24000
|
F.isScene !== !0 && (F = rt);
|
|
24001
24001
|
const G = v.get(T), O = A.state.lights, oe = A.state.shadowsArray, pe = O.state.version, ce = ve.getParameters(T, O.state, oe, F, W), me = ve.getProgramCacheKey(ce);
|
|
24002
24002
|
let Me = G.programs;
|
|
24003
|
-
G.environment = T.isMeshStandardMaterial ? F.environment : null, G.fog = F.fog, G.envMap = (T.isMeshStandardMaterial ?
|
|
24003
|
+
G.environment = T.isMeshStandardMaterial ? F.environment : null, G.fog = F.fog, G.envMap = (T.isMeshStandardMaterial ? $ : q).get(T.envMap || G.environment), G.envMapRotation = G.environment !== null && T.envMap === null ? F.environmentRotation : T.envMapRotation, Me === void 0 && (T.addEventListener("dispose", Cn), Me = /* @__PURE__ */ new Map(), G.programs = Me);
|
|
24004
24004
|
let we = Me.get(me);
|
|
24005
24005
|
if (we !== void 0) {
|
|
24006
24006
|
if (G.currentProgram === we && G.lightsStateVersion === pe)
|
|
@@ -24023,7 +24023,7 @@ class hx {
|
|
|
24023
24023
|
}
|
|
24024
24024
|
function Lf(T, F, W, G, O) {
|
|
24025
24025
|
F.isScene !== !0 && (F = rt), L.resetTextureUnits();
|
|
24026
|
-
const oe = F.fog, pe = G.isMeshStandardMaterial ? F.environment : null, ce = N === null ? y.outputColorSpace : N.isXRRenderTarget === !0 ? N.texture.colorSpace : _r, me = (G.isMeshStandardMaterial ?
|
|
24026
|
+
const oe = F.fog, pe = G.isMeshStandardMaterial ? F.environment : null, ce = N === null ? y.outputColorSpace : N.isXRRenderTarget === !0 ? N.texture.colorSpace : _r, me = (G.isMeshStandardMaterial ? $ : q).get(G.envMap || pe), Me = G.vertexColors === !0 && !!W.attributes.color && W.attributes.color.itemSize === 4, we = !!W.attributes.tangent && (!!G.normalMap || G.anisotropy > 0), Ae = !!W.morphAttributes.position, He = !!W.morphAttributes.normal, it = !!W.morphAttributes.color;
|
|
24027
24027
|
let vt = Un;
|
|
24028
24028
|
G.toneMapped && (N === null || N.isXRRenderTarget === !0) && (vt = y.toneMapping);
|
|
24029
24029
|
const xt = W.morphAttributes.position || W.morphAttributes.normal || W.morphAttributes.color, st = xt !== void 0 ? xt.length : 0, Ee = v.get(G), tt = A.state.lights;
|
|
@@ -24036,11 +24036,11 @@ class hx {
|
|
|
24036
24036
|
let en = Ee.currentProgram;
|
|
24037
24037
|
Ze === !0 && (en = Ss(G, F, O));
|
|
24038
24038
|
let zi = !1, tn = !1, Lr = !1;
|
|
24039
|
-
const ht = en.getUniforms(),
|
|
24039
|
+
const ht = en.getUniforms(), $t = Ee.uniforms;
|
|
24040
24040
|
if (xe.useProgram(en.program) && (zi = !0, tn = !0, Lr = !0), G.id !== V && (V = G.id, tn = !0), zi || H !== T) {
|
|
24041
24041
|
xe.buffers.depth.getReversed() && T.reversedDepth !== !0 && (T._reversedDepth = !0, T.updateProjectionMatrix()), ht.setValue(P, "projectionMatrix", T.projectionMatrix), ht.setValue(P, "viewMatrix", T.matrixWorldInverse);
|
|
24042
|
-
const
|
|
24043
|
-
|
|
24042
|
+
const jt = ht.map.cameraPosition;
|
|
24043
|
+
jt !== void 0 && jt.setValue(P, We.setFromMatrixPosition(T.matrixWorld)), ct.logarithmicDepthBuffer && ht.setValue(
|
|
24044
24044
|
P,
|
|
24045
24045
|
"logDepthBufFC",
|
|
24046
24046
|
2 / (Math.log(T.far + 1) / Math.LN2)
|
|
@@ -24053,10 +24053,10 @@ class hx {
|
|
|
24053
24053
|
}
|
|
24054
24054
|
O.isBatchedMesh && (ht.setOptional(P, O, "batchingTexture"), ht.setValue(P, "batchingTexture", O._matricesTexture, L), ht.setOptional(P, O, "batchingIdTexture"), ht.setValue(P, "batchingIdTexture", O._indirectTexture, L), ht.setOptional(P, O, "batchingColorTexture"), O._colorsTexture !== null && ht.setValue(P, "batchingColorTexture", O._colorsTexture, L));
|
|
24055
24055
|
const un = W.morphAttributes;
|
|
24056
|
-
if ((un.position !== void 0 || un.normal !== void 0 || un.color !== void 0) && ze.update(O, W, en), (tn || Ee.receiveShadow !== O.receiveShadow) && (Ee.receiveShadow = O.receiveShadow, ht.setValue(P, "receiveShadow", O.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && (
|
|
24056
|
+
if ((un.position !== void 0 || un.normal !== void 0 || un.color !== void 0) && ze.update(O, W, en), (tn || Ee.receiveShadow !== O.receiveShadow) && (Ee.receiveShadow = O.receiveShadow, ht.setValue(P, "receiveShadow", O.receiveShadow)), G.isMeshGouraudMaterial && G.envMap !== null && ($t.envMap.value = me, $t.flipEnvMap.value = me.isCubeTexture && me.isRenderTargetTexture === !1 ? -1 : 1), G.isMeshStandardMaterial && G.envMap === null && F.environment !== null && ($t.envMapIntensity.value = F.environmentIntensity), $t.dfgLUT !== void 0 && ($t.dfgLUT.value = ux()), tn && (ht.setValue(P, "toneMappingExposure", y.toneMappingExposure), Ee.needsLights && Ff($t, Lr), oe && G.fog === !0 && Ce.refreshFogUniforms($t, oe), Ce.refreshMaterialUniforms($t, G, Pe, Ue, A.state.transmissionRenderTarget[T.id]), ta.upload(P, xc(Ee), $t, L)), G.isShaderMaterial && G.uniformsNeedUpdate === !0 && (ta.upload(P, xc(Ee), $t, L), G.uniformsNeedUpdate = !1), G.isSpriteMaterial && ht.setValue(P, "center", O.center), ht.setValue(P, "modelViewMatrix", O.modelViewMatrix), ht.setValue(P, "normalMatrix", O.normalMatrix), ht.setValue(P, "modelMatrix", O.matrixWorld), G.isShaderMaterial || G.isRawShaderMaterial) {
|
|
24057
24057
|
const Ht = G.uniformsGroups;
|
|
24058
|
-
for (let
|
|
24059
|
-
const Mi = Ht[
|
|
24058
|
+
for (let jt = 0, Pa = Ht.length; jt < Pa; jt++) {
|
|
24059
|
+
const Mi = Ht[jt];
|
|
24060
24060
|
J.update(Mi, en), J.bind(Mi, en);
|
|
24061
24061
|
}
|
|
24062
24062
|
}
|
|
@@ -24107,7 +24107,7 @@ class hx {
|
|
|
24107
24107
|
const Me = v.get(T).__webglFramebuffer;
|
|
24108
24108
|
T.isWebGLCubeRenderTarget ? (Array.isArray(Me[F]) ? G = Me[F][W] : G = Me[F], O = !0) : T.samples > 0 && L.useMultisampledRTT(T) === !1 ? G = v.get(T).__webglMultisampledFramebuffer : Array.isArray(Me) ? G = Me[W] : G = Me, k.copy(T.viewport), z.copy(T.scissor), Z = T.scissorTest;
|
|
24109
24109
|
} else
|
|
24110
|
-
k.copy(Y).multiplyScalar(Pe).floor(), z.copy(
|
|
24110
|
+
k.copy(Y).multiplyScalar(Pe).floor(), z.copy(j).multiplyScalar(Pe).floor(), Z = de;
|
|
24111
24111
|
if (W !== 0 && (G = Nf), xe.bindFramebuffer(P.FRAMEBUFFER, G) && xe.drawBuffers(T, G), xe.viewport(k), xe.scissor(z), xe.setScissorTest(Z), O) {
|
|
24112
24112
|
const ce = v.get(T.texture);
|
|
24113
24113
|
P.framebufferTexture2D(P.FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_CUBE_MAP_POSITIVE_X + F, ce.__webglTexture, W);
|
|
@@ -24187,21 +24187,21 @@ class hx {
|
|
|
24187
24187
|
F.isData3DTexture ? (L.setTexture3D(F, 0), tt = P.TEXTURE_3D) : F.isDataArrayTexture || F.isCompressedArrayTexture ? (L.setTexture2DArray(F, 0), tt = P.TEXTURE_2D_ARRAY) : (L.setTexture2D(F, 0), tt = P.TEXTURE_2D), P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL, F.flipY), P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL, F.premultiplyAlpha), P.pixelStorei(P.UNPACK_ALIGNMENT, F.unpackAlignment);
|
|
24188
24188
|
const Ze = P.getParameter(P.UNPACK_ROW_LENGTH), en = P.getParameter(P.UNPACK_IMAGE_HEIGHT), zi = P.getParameter(P.UNPACK_SKIP_PIXELS), tn = P.getParameter(P.UNPACK_SKIP_ROWS), Lr = P.getParameter(P.UNPACK_SKIP_IMAGES);
|
|
24189
24189
|
P.pixelStorei(P.UNPACK_ROW_LENGTH, xt.width), P.pixelStorei(P.UNPACK_IMAGE_HEIGHT, xt.height), P.pixelStorei(P.UNPACK_SKIP_PIXELS, Me), P.pixelStorei(P.UNPACK_SKIP_ROWS, we), P.pixelStorei(P.UNPACK_SKIP_IMAGES, Ae);
|
|
24190
|
-
const ht = T.isDataArrayTexture || T.isData3DTexture,
|
|
24190
|
+
const ht = T.isDataArrayTexture || T.isData3DTexture, $t = F.isDataArrayTexture || F.isData3DTexture;
|
|
24191
24191
|
if (T.isDepthTexture) {
|
|
24192
|
-
const un = v.get(T), Ht = v.get(F),
|
|
24193
|
-
xe.bindFramebuffer(P.READ_FRAMEBUFFER,
|
|
24192
|
+
const un = v.get(T), Ht = v.get(F), jt = v.get(un.__renderTarget), Pa = v.get(Ht.__renderTarget);
|
|
24193
|
+
xe.bindFramebuffer(P.READ_FRAMEBUFFER, jt.__webglFramebuffer), xe.bindFramebuffer(P.DRAW_FRAMEBUFFER, Pa.__webglFramebuffer);
|
|
24194
24194
|
for (let Mi = 0; Mi < me; Mi++)
|
|
24195
24195
|
ht && (P.framebufferTextureLayer(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, v.get(T).__webglTexture, O, Ae + Mi), P.framebufferTextureLayer(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, v.get(F).__webglTexture, oe, vt + Mi)), P.blitFramebuffer(Me, we, pe, ce, He, it, pe, ce, P.DEPTH_BUFFER_BIT, P.NEAREST);
|
|
24196
24196
|
xe.bindFramebuffer(P.READ_FRAMEBUFFER, null), xe.bindFramebuffer(P.DRAW_FRAMEBUFFER, null);
|
|
24197
24197
|
} else if (O !== 0 || T.isRenderTargetTexture || v.has(T)) {
|
|
24198
24198
|
const un = v.get(T), Ht = v.get(F);
|
|
24199
24199
|
xe.bindFramebuffer(P.READ_FRAMEBUFFER, Of), xe.bindFramebuffer(P.DRAW_FRAMEBUFFER, Bf);
|
|
24200
|
-
for (let
|
|
24201
|
-
ht ? P.framebufferTextureLayer(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, un.__webglTexture, O, Ae +
|
|
24200
|
+
for (let jt = 0; jt < me; jt++)
|
|
24201
|
+
ht ? P.framebufferTextureLayer(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, un.__webglTexture, O, Ae + jt) : P.framebufferTexture2D(P.READ_FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, un.__webglTexture, O), $t ? P.framebufferTextureLayer(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, Ht.__webglTexture, oe, vt + jt) : P.framebufferTexture2D(P.DRAW_FRAMEBUFFER, P.COLOR_ATTACHMENT0, P.TEXTURE_2D, Ht.__webglTexture, oe), O !== 0 ? P.blitFramebuffer(Me, we, pe, ce, He, it, pe, ce, P.COLOR_BUFFER_BIT, P.NEAREST) : $t ? P.copyTexSubImage3D(tt, oe, He, it, vt + jt, Me, we, pe, ce) : P.copyTexSubImage2D(tt, oe, He, it, Me, we, pe, ce);
|
|
24202
24202
|
xe.bindFramebuffer(P.READ_FRAMEBUFFER, null), xe.bindFramebuffer(P.DRAW_FRAMEBUFFER, null);
|
|
24203
24203
|
} else
|
|
24204
|
-
|
|
24204
|
+
$t ? T.isDataTexture || T.isData3DTexture ? P.texSubImage3D(tt, oe, He, it, vt, pe, ce, me, st, Ee, xt.data) : F.isCompressedArrayTexture ? P.compressedTexSubImage3D(tt, oe, He, it, vt, pe, ce, me, st, xt.data) : P.texSubImage3D(tt, oe, He, it, vt, pe, ce, me, st, Ee, xt) : T.isDataTexture ? P.texSubImage2D(P.TEXTURE_2D, oe, He, it, pe, ce, st, Ee, xt.data) : T.isCompressedTexture ? P.compressedTexSubImage2D(P.TEXTURE_2D, oe, He, it, xt.width, xt.height, st, xt.data) : P.texSubImage2D(P.TEXTURE_2D, oe, He, it, pe, ce, st, Ee, xt);
|
|
24205
24205
|
P.pixelStorei(P.UNPACK_ROW_LENGTH, Ze), P.pixelStorei(P.UNPACK_IMAGE_HEIGHT, en), P.pixelStorei(P.UNPACK_SKIP_PIXELS, zi), P.pixelStorei(P.UNPACK_SKIP_ROWS, tn), P.pixelStorei(P.UNPACK_SKIP_IMAGES, Lr), oe === 0 && F.generateMipmaps && P.generateMipmap(tt), xe.unbindTexture();
|
|
24206
24206
|
}, this.initRenderTarget = function(T) {
|
|
24207
24207
|
v.get(T).__webglFramebuffer === void 0 && L.setupRenderTarget(T);
|
|
@@ -24321,7 +24321,7 @@ for (var ft = 0; ft < 32768; ++ft) {
|
|
|
24321
24321
|
var li = (ft & 43690) >> 1 | (ft & 21845) << 1;
|
|
24322
24322
|
li = (li & 52428) >> 2 | (li & 13107) << 2, li = (li & 61680) >> 4 | (li & 3855) << 4, Sl[ft] = ((li & 65280) >> 8 | (li & 255) << 8) >> 1;
|
|
24323
24323
|
}
|
|
24324
|
-
var
|
|
24324
|
+
var jr = (function(s, e, t) {
|
|
24325
24325
|
for (var n = s.length, i = 0, r = new lr(e); i < n; ++i)
|
|
24326
24326
|
s[i] && ++r[s[i] - 1];
|
|
24327
24327
|
var a = new lr(e);
|
|
@@ -24351,7 +24351,7 @@ for (var ft = 280; ft < 288; ++ft)
|
|
|
24351
24351
|
var Vh = new pn(32);
|
|
24352
24352
|
for (var ft = 0; ft < 32; ++ft)
|
|
24353
24353
|
Vh[ft] = 5;
|
|
24354
|
-
var gx = /* @__PURE__ */
|
|
24354
|
+
var gx = /* @__PURE__ */ jr(vs, 9, 1), vx = /* @__PURE__ */ jr(Vh, 5, 1), fo = function(s) {
|
|
24355
24355
|
for (var e = s[0], t = 1; t < s.length; ++t)
|
|
24356
24356
|
s[t] > e && (e = s[t]);
|
|
24357
24357
|
return e;
|
|
@@ -24412,7 +24412,7 @@ var gx = /* @__PURE__ */ $r(vs, 9, 1), vx = /* @__PURE__ */ $r(Vh, 5, 1), fo = f
|
|
|
24412
24412
|
for (var y = new pn(I), b = new pn(19), C = 0; C < R; ++C)
|
|
24413
24413
|
b[dx[C]] = Mn(s, l + C * 3, 7);
|
|
24414
24414
|
l += R * 3;
|
|
24415
|
-
for (var B = fo(b), N = (1 << B) - 1, V =
|
|
24415
|
+
for (var B = fo(b), N = (1 << B) - 1, V = jr(b, B, 1), C = 0; C < I; ) {
|
|
24416
24416
|
var H = V[Mn(s, l, N)];
|
|
24417
24417
|
l += H & 15;
|
|
24418
24418
|
var x = H >> 4;
|
|
@@ -24425,7 +24425,7 @@ var gx = /* @__PURE__ */ $r(vs, 9, 1), vx = /* @__PURE__ */ $r(Vh, 5, 1), fo = f
|
|
|
24425
24425
|
}
|
|
24426
24426
|
}
|
|
24427
24427
|
var Z = y.subarray(0, E), te = y.subarray(E);
|
|
24428
|
-
g = fo(Z), _ = fo(te), f =
|
|
24428
|
+
g = fo(Z), _ = fo(te), f = jr(Z, g, 1), p = jr(te, _, 1);
|
|
24429
24429
|
} else
|
|
24430
24430
|
Tn(1);
|
|
24431
24431
|
else {
|
|
@@ -24457,15 +24457,15 @@ var gx = /* @__PURE__ */ $r(vs, 9, 1), vx = /* @__PURE__ */ $r(Vh, 5, 1), fo = f
|
|
|
24457
24457
|
} else {
|
|
24458
24458
|
var lt = Pe - 254;
|
|
24459
24459
|
if (Pe > 264) {
|
|
24460
|
-
var C = Pe - 257,
|
|
24461
|
-
lt = Mn(s, l, (1 <<
|
|
24460
|
+
var C = Pe - 257, $e = Uh[C];
|
|
24461
|
+
lt = Mn(s, l, (1 << $e) - 1) + kh[C], l += $e;
|
|
24462
24462
|
}
|
|
24463
|
-
var Y = p[po(s, l) & he],
|
|
24463
|
+
var Y = p[po(s, l) & he], j = Y >> 4;
|
|
24464
24464
|
Y || Tn(3), l += Y & 15;
|
|
24465
|
-
var te = _x[
|
|
24466
|
-
if (
|
|
24467
|
-
var
|
|
24468
|
-
te += po(s, l) & (1 <<
|
|
24465
|
+
var te = _x[j];
|
|
24466
|
+
if (j > 3) {
|
|
24467
|
+
var $e = Nh[j];
|
|
24468
|
+
te += po(s, l) & (1 << $e) - 1, l += $e;
|
|
24469
24469
|
}
|
|
24470
24470
|
if (l > m) {
|
|
24471
24471
|
c && Tn(0);
|
|
@@ -25136,7 +25136,7 @@ class Nx {
|
|
|
25136
25136
|
let u = Math.PI / 3;
|
|
25137
25137
|
n.InnerAngle !== void 0 && (u = Yt.degToRad(n.InnerAngle.value));
|
|
25138
25138
|
let d = 0;
|
|
25139
|
-
n.OuterAngle !== void 0 && (d = Yt.degToRad(n.OuterAngle.value), d = Math.max(d, 1)), t = new
|
|
25139
|
+
n.OuterAngle !== void 0 && (d = Yt.degToRad(n.OuterAngle.value), d = Math.max(d, 1)), t = new jp(r, a, o, u, d, c);
|
|
25140
25140
|
break;
|
|
25141
25141
|
default:
|
|
25142
25142
|
console.warn("THREE.FBXLoader: Unknown light type " + n.LightType.value + ", defaulting to a PointLight."), t = new lu(r, a);
|
|
@@ -27426,7 +27426,7 @@ var Sr = {
|
|
|
27426
27426
|
duration: 0.5,
|
|
27427
27427
|
overwrite: !1,
|
|
27428
27428
|
delay: 0
|
|
27429
|
-
}, tc, Ut, dt, _n = 1e8, ot = 1 / _n, Ml = Math.PI * 2, Kx = Ml / 4, Zx = 0, Yh = Math.sqrt,
|
|
27429
|
+
}, tc, Ut, dt, _n = 1e8, ot = 1 / _n, Ml = Math.PI * 2, Kx = Ml / 4, Zx = 0, Yh = Math.sqrt, $x = Math.cos, jx = Math.sin, Gt = function(e) {
|
|
27430
27430
|
return typeof e == "string";
|
|
27431
27431
|
}, yt = function(e) {
|
|
27432
27432
|
return typeof e == "function";
|
|
@@ -27443,7 +27443,7 @@ var Sr = {
|
|
|
27443
27443
|
}, Zs = function(e) {
|
|
27444
27444
|
return yt(e) || Gt(e);
|
|
27445
27445
|
}, Zh = typeof ArrayBuffer == "function" && ArrayBuffer.isView || function() {
|
|
27446
|
-
}, zt = Array.isArray, Jx = /random\([^)]+\)/g, Qx = /,\s*/g, Nu = /(?:-?\.?\d|\.)+/gi, ey = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,
|
|
27446
|
+
}, zt = Array.isArray, Jx = /random\([^)]+\)/g, Qx = /,\s*/g, Nu = /(?:-?\.?\d|\.)+/gi, ey = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, $h = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, vo = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, ty = /[+-]=-?[.\d]+/, ny = /[^,'"\[\]\s]+/gi, iy = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, _t, In, Tl, ic, ln = {}, fa = {}, jh, Jh = function(e) {
|
|
27447
27447
|
return (fa = Tr(e, ln)) && kt;
|
|
27448
27448
|
}, Qh = function(e, t) {
|
|
27449
27449
|
return console.warn("Invalid property", e, "set to", t, "Missing plugin? gsap.registerPlugin()");
|
|
@@ -27858,7 +27858,7 @@ var Sr = {
|
|
|
27858
27858
|
}, Sf = function(e) {
|
|
27859
27859
|
var t = [], n = [], i = -1;
|
|
27860
27860
|
return e.split(fr).forEach(function(r) {
|
|
27861
|
-
var a = r.match(
|
|
27861
|
+
var a = r.match($h) || [];
|
|
27862
27862
|
t.push.apply(t, a), n.push(i += a.length + 1);
|
|
27863
27863
|
}), t.c = n, t;
|
|
27864
27864
|
}, Gu = function(e, t, n) {
|
|
@@ -27868,7 +27868,7 @@ var Sr = {
|
|
|
27868
27868
|
if (r = r.map(function(h) {
|
|
27869
27869
|
return (h = yf(h, t, 1)) && a + (t ? h[0] + "," + h[1] + "%," + h[2] + "%," + h[3] : h.join(",")) + ")";
|
|
27870
27870
|
}), n && (d = Sf(e), c = n.c, c.join(i) !== d.c.join(i)))
|
|
27871
|
-
for (u = e.replace(fr, "1").split(
|
|
27871
|
+
for (u = e.replace(fr, "1").split($h), l = u.length - 1; o < l; o++)
|
|
27872
27872
|
i += u[o] + (~c.indexOf(o) ? r.shift() || a + "0,0,0,0)" : (d.length ? d : r.length ? r : n).shift());
|
|
27873
27873
|
if (!u)
|
|
27874
27874
|
for (u = e.split(fr), l = u.length - 1; o < l; o++)
|
|
@@ -27900,7 +27900,7 @@ var Sr = {
|
|
|
27900
27900
|
return h / (1e3 / (_ || 60));
|
|
27901
27901
|
},
|
|
27902
27902
|
wake: function() {
|
|
27903
|
-
|
|
27903
|
+
jh && (!Tl && nc() && (In = Tl = window, ic = In.document || {}, ln.gsap = kt, (In.gsapVersions || (In.gsapVersions = [])).push(kt.version), Jh(fa || In.GreenSockGlobals || !In.gsap && In || {}), vf.forEach(xf)), d = typeof requestAnimationFrame < "u" && requestAnimationFrame, c && l.sleep(), u = d || function(_) {
|
|
27904
27904
|
return setTimeout(_, a - l.time * 1e3 + 1 | 0);
|
|
27905
27905
|
}, ms = 1, p(2));
|
|
27906
27906
|
},
|
|
@@ -27967,7 +27967,7 @@ var Sr = {
|
|
|
27967
27967
|
};
|
|
27968
27968
|
}, So = function s(e, t, n) {
|
|
27969
27969
|
var i = t >= 1 ? t : 1, r = (n || (e ? 0.3 : 0.45)) / (t < 1 ? t : 1), a = r / Ml * (Math.asin(1 / i) || 0), o = function(d) {
|
|
27970
|
-
return d === 1 ? 1 : i * Math.pow(2, -10 * d) *
|
|
27970
|
+
return d === 1 ? 1 : i * Math.pow(2, -10 * d) * jx((d - a) * r) + 1;
|
|
27971
27971
|
}, c = e === "out" ? o : e === "in" ? function(u) {
|
|
27972
27972
|
return 1 - o(1 - u);
|
|
27973
27973
|
} : bf(o);
|
|
@@ -28014,7 +28014,7 @@ Vi("Circ", function(s) {
|
|
|
28014
28014
|
return -(Yh(1 - s * s) - 1);
|
|
28015
28015
|
});
|
|
28016
28016
|
Vi("Sine", function(s) {
|
|
28017
|
-
return s === 1 ? 1 :
|
|
28017
|
+
return s === 1 ? 1 : -$x(s * Kx) + 1;
|
|
28018
28018
|
});
|
|
28019
28019
|
Vi("Back", Mo("in"), Mo("out"), Mo());
|
|
28020
28020
|
qe.SteppedEase = qe.steps = ln.SteppedEase = {
|
|
@@ -28928,15 +28928,15 @@ An.add(Zt.updateRoot);
|
|
|
28928
28928
|
cr = _a.to({}, {
|
|
28929
28929
|
duration: 0
|
|
28930
28930
|
});
|
|
28931
|
-
var
|
|
28931
|
+
var $y = function(e, t) {
|
|
28932
28932
|
for (var n = e._pt; n && n.p !== t && n.op !== t && n.fp !== t; )
|
|
28933
28933
|
n = n._next;
|
|
28934
28934
|
return n;
|
|
28935
|
-
},
|
|
28935
|
+
}, jy = function(e, t) {
|
|
28936
28936
|
var n = e._targets, i, r, a;
|
|
28937
28937
|
for (i in t)
|
|
28938
28938
|
for (r = n.length; r--; )
|
|
28939
|
-
a = e._ptLookup[r][i], a && (a = a.d) && (a._pt && (a =
|
|
28939
|
+
a = e._ptLookup[r][i], a && (a = a.d) && (a._pt && (a = $y(a, i)), a && a.modifier && a.modifier(t[i], e, n[r], i));
|
|
28940
28940
|
}, bo = function(e, t) {
|
|
28941
28941
|
return {
|
|
28942
28942
|
name: e,
|
|
@@ -28954,7 +28954,7 @@ var jy = function(e, t) {
|
|
|
28954
28954
|
c[u] = t(r[u]);
|
|
28955
28955
|
r = c;
|
|
28956
28956
|
}
|
|
28957
|
-
|
|
28957
|
+
jy(o, r);
|
|
28958
28958
|
};
|
|
28959
28959
|
}
|
|
28960
28960
|
};
|
|
@@ -28979,7 +28979,7 @@ var jy = function(e, t) {
|
|
|
28979
28979
|
}
|
|
28980
28980
|
}, bo("roundProps", Cl), bo("modifiers"), bo("snap", pf)) || _a;
|
|
28981
28981
|
Et.version = Zt.version = kt.version = "3.14.2";
|
|
28982
|
-
|
|
28982
|
+
jh = 1;
|
|
28983
28983
|
nc() && Er();
|
|
28984
28984
|
qe.Power0;
|
|
28985
28985
|
qe.Power1;
|
|
@@ -29160,10 +29160,8 @@ class nS {
|
|
|
29160
29160
|
visemeData;
|
|
29161
29161
|
mixer;
|
|
29162
29162
|
actions = /* @__PURE__ */ new Map();
|
|
29163
|
-
loadingManager = new
|
|
29163
|
+
loadingManager = new $l();
|
|
29164
29164
|
fbxLoader = new Gh(this.loadingManager);
|
|
29165
|
-
totalAnimations = 0;
|
|
29166
|
-
loadedAnimations = 0;
|
|
29167
29165
|
async init() {
|
|
29168
29166
|
this.mixer = new mm(this.model), this.mixer.addEventListener("finished", (n) => {
|
|
29169
29167
|
n.action !== this.actions.get("idle_1")?.animation && this.fadeToAction("idle_1");
|
|
@@ -29177,9 +29175,9 @@ class nS {
|
|
|
29177
29175
|
)
|
|
29178
29176
|
).then(() => {
|
|
29179
29177
|
this.actions.get("idle_1")?.animation.play(), this.activeActionName = "idle_1";
|
|
29180
|
-
}),
|
|
29178
|
+
}), await Promise.all(
|
|
29181
29179
|
t.lazy_load_animations.map((n) => this.loadAnimationLazy(n))
|
|
29182
|
-
);
|
|
29180
|
+
), this.avatar.onAllAssetsLoaded();
|
|
29183
29181
|
}
|
|
29184
29182
|
async loadAnimationMandatoryInitial(e) {
|
|
29185
29183
|
const t = await this.avatar.initialAssetsfbxLoader.loadAsync(
|
|
@@ -29206,17 +29204,18 @@ class nS {
|
|
|
29206
29204
|
this.actions.set(t.name, {
|
|
29207
29205
|
animation: i,
|
|
29208
29206
|
blendShapeScenario: r
|
|
29209
|
-
}), this.avatar.onAnimationLoaded(t.name)
|
|
29207
|
+
}), this.avatar.onAnimationLoaded(t.name);
|
|
29210
29208
|
}
|
|
29211
29209
|
fadeDuration = 0.2;
|
|
29212
29210
|
hasAction(e) {
|
|
29213
29211
|
return this.actions.has(e);
|
|
29214
29212
|
}
|
|
29215
29213
|
fadeToAction(e) {
|
|
29216
|
-
const t = this.actions.get(
|
|
29217
|
-
|
|
29214
|
+
const t = this.actions.get(e);
|
|
29215
|
+
if (!t)
|
|
29216
|
+
throw new Error(`Animation action is not loaded: ${e}`);
|
|
29218
29217
|
const n = this.actions.get(this.activeActionName);
|
|
29219
|
-
|
|
29218
|
+
this.activeActionName = e, n !== t && (n?.animation.fadeOut(this.fadeDuration), n?.blendShapeScenario?.stop()), t.animation.reset().setEffectiveTimeScale(1).setEffectiveWeight(1).fadeIn(this.fadeDuration).play(), t.blendShapeScenario?.play();
|
|
29220
29219
|
}
|
|
29221
29220
|
applyActiveActionBlendShapeScenario() {
|
|
29222
29221
|
this.actions.get(this.activeActionName).blendShapeScenario?.play();
|
|
@@ -29309,7 +29308,7 @@ class iS extends EventTarget {
|
|
|
29309
29308
|
powerPreference: "high-performance",
|
|
29310
29309
|
logarithmicDepthBuffer: !0,
|
|
29311
29310
|
alpha: !0
|
|
29312
|
-
}), this.renderer.outputColorSpace = Fe, this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Wu, this.init();
|
|
29311
|
+
}), this.renderer.outputColorSpace = Fe, this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.shadowMap.enabled = !0, this.renderer.shadowMap.type = Wu, this.init().catch(this.api.onAvatarLoadFailed);
|
|
29313
29312
|
}
|
|
29314
29313
|
initialAssetsfbxLoader;
|
|
29315
29314
|
head;
|
|
@@ -29343,7 +29342,7 @@ class iS extends EventTarget {
|
|
|
29343
29342
|
loadingManager;
|
|
29344
29343
|
sounds = {};
|
|
29345
29344
|
async init() {
|
|
29346
|
-
this.loadingManager = new
|
|
29345
|
+
this.loadingManager = new $l();
|
|
29347
29346
|
const e = 23;
|
|
29348
29347
|
this.loadingManager.onProgress = (V, H) => {
|
|
29349
29348
|
const k = H / e, z = new CustomEvent("loading_progress", {
|
|
@@ -29467,8 +29466,10 @@ class iS extends EventTarget {
|
|
|
29467
29466
|
this.body = H;
|
|
29468
29467
|
return;
|
|
29469
29468
|
}
|
|
29470
|
-
}), this.hair.material = E, this.head.material = [b, C], this.body.material = [m, _], this.animationManager = new nS(V, this), this.animationManager.init(), this.animationManager.setVisemeData(), this.animate(), this.onResize(), this.config.avatarDebug && (this.addDebugGui(), this.initDebugControls(c));
|
|
29471
|
-
}
|
|
29469
|
+
}), this.hair.material = E, this.head.material = [b, C], this.body.material = [m, _], this.animationManager = new nS(V, this), this.animationManager.init().catch(this.api.onAvatarLoadFailed), this.animationManager.setVisemeData(), this.animate(), this.onResize(), this.config.avatarDebug && (this.addDebugGui(), this.initDebugControls(c));
|
|
29470
|
+
},
|
|
29471
|
+
void 0,
|
|
29472
|
+
this.api.onAvatarLoadFailed
|
|
29472
29473
|
);
|
|
29473
29474
|
}
|
|
29474
29475
|
initSounds(e) {
|
|
@@ -29592,7 +29593,7 @@ class iS extends EventTarget {
|
|
|
29592
29593
|
this.api.onAvatarReady(this.externalLaunchAnimationAction);
|
|
29593
29594
|
};
|
|
29594
29595
|
async initDebugControls(e) {
|
|
29595
|
-
const { OrbitControls: t } = await import("./OrbitControls-
|
|
29596
|
+
const { OrbitControls: t } = await import("./OrbitControls-BCIW0o5s.js");
|
|
29596
29597
|
this.controls = new t(e, this.renderer.domElement);
|
|
29597
29598
|
}
|
|
29598
29599
|
async addDebugGui() {
|