@netless/app-slide 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs.js +3 -3
- package/dist/main.cjs.js.map +1 -1
- package/dist/main.es.js +334 -334
- package/dist/main.es.js.map +1 -1
- package/dist/main.iife.js +3 -3
- package/dist/main.iife.js.map +1 -1
- package/package.json +2 -2
package/dist/main.es.js
CHANGED
|
@@ -944,7 +944,7 @@ var Slide = function(t) {
|
|
|
944
944
|
} else
|
|
945
945
|
n2 = o.reject("Invalid arguments");
|
|
946
946
|
return a(n2, e4), n2;
|
|
947
|
-
} }, A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", P = /^~~local_forage_type~([^~]+)~/,
|
|
947
|
+
} }, A = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", P = /^~~local_forage_type~([^~]+)~/, I = "__lfsc__:".length, R = I + "arbf".length, C = Object.prototype.toString;
|
|
948
948
|
function L(t3) {
|
|
949
949
|
var e4, i3, n2, r2, s2, o2 = 0.75 * t3.length, a2 = t3.length, l2 = 0;
|
|
950
950
|
t3[t3.length - 1] === "=" && (o2--, t3[t3.length - 2] === "=" && o2--);
|
|
@@ -977,9 +977,9 @@ var Slide = function(t) {
|
|
|
977
977
|
console.error("Couldn't convert value into a JSON string: ", t3), e4(null, i4);
|
|
978
978
|
}
|
|
979
979
|
}, deserialize: function(t3) {
|
|
980
|
-
if (t3.substring(0,
|
|
980
|
+
if (t3.substring(0, I) !== "__lfsc__:")
|
|
981
981
|
return JSON.parse(t3);
|
|
982
|
-
var e4, i3 = t3.substring(
|
|
982
|
+
var e4, i3 = t3.substring(R), n2 = t3.substring(I, R);
|
|
983
983
|
if (n2 === "blob" && P.test(i3)) {
|
|
984
984
|
var r2 = i3.match(P);
|
|
985
985
|
e4 = r2[1], i3 = i3.substring(r2[0].length);
|
|
@@ -1691,23 +1691,23 @@ var Slide = function(t) {
|
|
|
1691
1691
|
(P = y2.indexOf(u[A])) !== -1 && (M === -1 || P < M) && (M = P);
|
|
1692
1692
|
}
|
|
1693
1693
|
M === -1 && (M = y2.length), this.host = y2.slice(0, M), y2 = y2.slice(M), this.parseHost(), this.hostname = this.hostname || "";
|
|
1694
|
-
var
|
|
1695
|
-
if (!
|
|
1696
|
-
for (var
|
|
1697
|
-
var L =
|
|
1694
|
+
var I = this.hostname[0] === "[" && this.hostname[this.hostname.length - 1] === "]";
|
|
1695
|
+
if (!I)
|
|
1696
|
+
for (var R = this.hostname.split(/\./), C = (A = 0, R.length); A < C; A++) {
|
|
1697
|
+
var L = R[A];
|
|
1698
1698
|
if (L && !L.match(p)) {
|
|
1699
1699
|
for (var N = "", O = 0, D = L.length; O < D; O++)
|
|
1700
1700
|
L.charCodeAt(O) > 127 ? N += "x" : N += L[O];
|
|
1701
1701
|
if (!N.match(p)) {
|
|
1702
|
-
var F =
|
|
1702
|
+
var F = R.slice(0, A), U = R.slice(A + 1), k = L.match(f);
|
|
1703
1703
|
k && (F.push(k[1]), U.unshift(k[2])), U.length && (y2 = "/" + U.join(".") + y2), this.hostname = F.join(".");
|
|
1704
1704
|
break;
|
|
1705
1705
|
}
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
|
-
this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(),
|
|
1708
|
+
this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), I || (this.hostname = n.toASCII(this.hostname));
|
|
1709
1709
|
var B = this.port ? ":" + this.port : "", G = this.hostname || "";
|
|
1710
|
-
this.host = G + B, this.href += this.host,
|
|
1710
|
+
this.host = G + B, this.href += this.host, I && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), y2[0] !== "/" && (y2 = "/" + y2));
|
|
1711
1711
|
}
|
|
1712
1712
|
if (!m[T])
|
|
1713
1713
|
for (A = 0, C = c.length; A < C; A++) {
|
|
@@ -1783,7 +1783,7 @@ var Slide = function(t) {
|
|
|
1783
1783
|
E || (E = []), E.pop(), E = E.concat(f2), i2.search = t2.search, i2.query = t2.query;
|
|
1784
1784
|
else if (!r.isNullOrUndefined(t2.search)) {
|
|
1785
1785
|
if (w)
|
|
1786
|
-
i2.hostname = i2.host = E.shift(), (
|
|
1786
|
+
i2.hostname = i2.host = E.shift(), (I = !!(i2.host && i2.host.indexOf("@") > 0) && i2.host.split("@")) && (i2.auth = I.shift(), i2.host = i2.hostname = I.shift());
|
|
1787
1787
|
return i2.search = t2.search, i2.query = t2.query, r.isNull(i2.pathname) && r.isNull(i2.search) || (i2.path = (i2.pathname ? i2.pathname : "") + (i2.search ? i2.search : "")), i2.href = i2.format(), i2;
|
|
1788
1788
|
}
|
|
1789
1789
|
if (!E.length)
|
|
@@ -1794,9 +1794,9 @@ var Slide = function(t) {
|
|
|
1794
1794
|
for (; A--; A)
|
|
1795
1795
|
E.unshift("..");
|
|
1796
1796
|
!b || E[0] === "" || E[0] && E[0].charAt(0) === "/" || E.unshift(""), M && E.join("/").substr(-1) !== "/" && E.push("");
|
|
1797
|
-
var
|
|
1798
|
-
w && (i2.hostname = i2.host =
|
|
1799
|
-
return (b = b || i2.host && E.length) && !
|
|
1797
|
+
var I, R = E[0] === "" || E[0] && E[0].charAt(0) === "/";
|
|
1798
|
+
w && (i2.hostname = i2.host = R ? "" : E.length ? E.shift() : "", (I = !!(i2.host && i2.host.indexOf("@") > 0) && i2.host.split("@")) && (i2.auth = I.shift(), i2.host = i2.hostname = I.shift()));
|
|
1799
|
+
return (b = b || i2.host && E.length) && !R && E.unshift(""), E.length ? i2.pathname = E.join("/") : (i2.pathname = null, i2.path = null), r.isNull(i2.pathname) && r.isNull(i2.search) || (i2.path = (i2.pathname ? i2.pathname : "") + (i2.search ? i2.search : "")), i2.auth = t2.auth || i2.auth, i2.slashes = i2.slashes || t2.slashes, i2.href = i2.format(), i2;
|
|
1800
1800
|
}, s.prototype.parseHost = function() {
|
|
1801
1801
|
var t2 = this.host, e2 = a.exec(t2);
|
|
1802
1802
|
e2 && ((e2 = e2[0]) !== ":" && (this.port = e2.substr(1)), t2 = t2.substr(0, t2.length - e2.length)), t2 && (this.hostname = t2);
|
|
@@ -3880,42 +3880,42 @@ var Slide = function(t) {
|
|
|
3880
3880
|
t.exports = n;
|
|
3881
3881
|
}, function(t, e, i) {
|
|
3882
3882
|
var n = i(38), r = i(162), s = i(52), o = i(164), a = i(165), l = i(168), h = i(169), c = i(170), u = i(171), d = i(43), p = i(172), f = i(19), m = i(173), g = i(174), v = i(179), _ = i(18), y = i(27), x = i(181), b = i(7), T = i(183), E = i(26), w = i(31), S = {};
|
|
3883
|
-
S["[object Arguments]"] = S["[object Array]"] = S["[object ArrayBuffer]"] = S["[object DataView]"] = S["[object Boolean]"] = S["[object Date]"] = S["[object Float32Array]"] = S["[object Float64Array]"] = S["[object Int8Array]"] = S["[object Int16Array]"] = S["[object Int32Array]"] = S["[object Map]"] = S["[object Number]"] = S["[object Object]"] = S["[object RegExp]"] = S["[object Set]"] = S["[object String]"] = S["[object Symbol]"] = S["[object Uint8Array]"] = S["[object Uint8ClampedArray]"] = S["[object Uint16Array]"] = S["[object Uint32Array]"] = true, S["[object Error]"] = S["[object Function]"] = S["[object WeakMap]"] = false, t.exports = function t2(e2, i2, M, A, P,
|
|
3884
|
-
var
|
|
3885
|
-
if (M && (
|
|
3886
|
-
return
|
|
3883
|
+
S["[object Arguments]"] = S["[object Array]"] = S["[object ArrayBuffer]"] = S["[object DataView]"] = S["[object Boolean]"] = S["[object Date]"] = S["[object Float32Array]"] = S["[object Float64Array]"] = S["[object Int8Array]"] = S["[object Int16Array]"] = S["[object Int32Array]"] = S["[object Map]"] = S["[object Number]"] = S["[object Object]"] = S["[object RegExp]"] = S["[object Set]"] = S["[object String]"] = S["[object Symbol]"] = S["[object Uint8Array]"] = S["[object Uint8ClampedArray]"] = S["[object Uint16Array]"] = S["[object Uint32Array]"] = true, S["[object Error]"] = S["[object Function]"] = S["[object WeakMap]"] = false, t.exports = function t2(e2, i2, M, A, P, I) {
|
|
3884
|
+
var R, C = 1 & i2, L = 2 & i2, N = 4 & i2;
|
|
3885
|
+
if (M && (R = P ? M(e2, A, P, I) : M(e2)), R !== void 0)
|
|
3886
|
+
return R;
|
|
3887
3887
|
if (!b(e2))
|
|
3888
3888
|
return e2;
|
|
3889
3889
|
var O = _(e2);
|
|
3890
3890
|
if (O) {
|
|
3891
|
-
if (
|
|
3892
|
-
return h(e2,
|
|
3891
|
+
if (R = m(e2), !C)
|
|
3892
|
+
return h(e2, R);
|
|
3893
3893
|
} else {
|
|
3894
3894
|
var D = f(e2), F = D == "[object Function]" || D == "[object GeneratorFunction]";
|
|
3895
3895
|
if (y(e2))
|
|
3896
3896
|
return l(e2, C);
|
|
3897
3897
|
if (D == "[object Object]" || D == "[object Arguments]" || F && !P) {
|
|
3898
|
-
if (
|
|
3899
|
-
return L ? u(e2, a(
|
|
3898
|
+
if (R = L || F ? {} : v(e2), !C)
|
|
3899
|
+
return L ? u(e2, a(R, e2)) : c(e2, o(R, e2));
|
|
3900
3900
|
} else {
|
|
3901
3901
|
if (!S[D])
|
|
3902
3902
|
return P ? e2 : {};
|
|
3903
|
-
|
|
3903
|
+
R = g(e2, D, C);
|
|
3904
3904
|
}
|
|
3905
3905
|
}
|
|
3906
|
-
|
|
3907
|
-
var U =
|
|
3906
|
+
I || (I = new n());
|
|
3907
|
+
var U = I.get(e2);
|
|
3908
3908
|
if (U)
|
|
3909
3909
|
return U;
|
|
3910
|
-
|
|
3911
|
-
|
|
3910
|
+
I.set(e2, R), T(e2) ? e2.forEach(function(n2) {
|
|
3911
|
+
R.add(t2(n2, i2, M, n2, e2, I));
|
|
3912
3912
|
}) : x(e2) && e2.forEach(function(n2, r2) {
|
|
3913
|
-
|
|
3913
|
+
R.set(r2, t2(n2, i2, M, r2, e2, I));
|
|
3914
3914
|
});
|
|
3915
3915
|
var k = O ? void 0 : (N ? L ? p : d : L ? w : E)(e2);
|
|
3916
3916
|
return r(k || e2, function(n2, r2) {
|
|
3917
|
-
k && (n2 = e2[r2 = n2]), s(
|
|
3918
|
-
}),
|
|
3917
|
+
k && (n2 = e2[r2 = n2]), s(R, r2, t2(n2, i2, M, r2, e2, I));
|
|
3918
|
+
}), R;
|
|
3919
3919
|
};
|
|
3920
3920
|
}, function(t, e) {
|
|
3921
3921
|
t.exports = function(t2, e2) {
|
|
@@ -4110,7 +4110,7 @@ var Slide = function(t) {
|
|
|
4110
4110
|
i.r(n), i.d(n, "isMobile", function() {
|
|
4111
4111
|
return ac;
|
|
4112
4112
|
}), i.d(n, "EventEmitter", function() {
|
|
4113
|
-
return
|
|
4113
|
+
return Ic.a;
|
|
4114
4114
|
}), i.d(n, "earcut", function() {
|
|
4115
4115
|
return Cc.a;
|
|
4116
4116
|
}), i.d(n, "BaseTextureCache", function() {
|
|
@@ -4236,13 +4236,13 @@ var Slide = function(t) {
|
|
|
4236
4236
|
}), i.d(r, "Point", function() {
|
|
4237
4237
|
return wu;
|
|
4238
4238
|
}), i.d(r, "Polygon", function() {
|
|
4239
|
-
return
|
|
4239
|
+
return Iu;
|
|
4240
4240
|
}), i.d(r, "RAD_TO_DEG", function() {
|
|
4241
4241
|
return Tu;
|
|
4242
4242
|
}), i.d(r, "Rectangle", function() {
|
|
4243
4243
|
return Mu;
|
|
4244
4244
|
}), i.d(r, "RoundedRectangle", function() {
|
|
4245
|
-
return
|
|
4245
|
+
return Ru;
|
|
4246
4246
|
}), i.d(r, "SHAPES", function() {
|
|
4247
4247
|
return xu;
|
|
4248
4248
|
}), i.d(r, "Transform", function() {
|
|
@@ -4270,11 +4270,11 @@ var Slide = function(t) {
|
|
|
4270
4270
|
}), i.d(r, "AbstractRenderer", function() {
|
|
4271
4271
|
return Ef;
|
|
4272
4272
|
}), i.d(r, "ArrayResource", function() {
|
|
4273
|
-
return
|
|
4273
|
+
return Id;
|
|
4274
4274
|
}), i.d(r, "Attribute", function() {
|
|
4275
4275
|
return Yd;
|
|
4276
4276
|
}), i.d(r, "BaseImageResource", function() {
|
|
4277
|
-
return
|
|
4277
|
+
return Rd;
|
|
4278
4278
|
}), i.d(r, "BaseRenderTexture", function() {
|
|
4279
4279
|
return Gd;
|
|
4280
4280
|
}), i.d(r, "BaseTexture", function() {
|
|
@@ -4372,7 +4372,7 @@ var Slide = function(t) {
|
|
|
4372
4372
|
}), i.d(r, "StencilSystem", function() {
|
|
4373
4373
|
return Qp;
|
|
4374
4374
|
}), i.d(r, "System", function() {
|
|
4375
|
-
return
|
|
4375
|
+
return Rf;
|
|
4376
4376
|
}), i.d(r, "Texture", function() {
|
|
4377
4377
|
return Vd;
|
|
4378
4378
|
}), i.d(r, "TextureGCSystem", function() {
|
|
@@ -4398,7 +4398,7 @@ var Slide = function(t) {
|
|
|
4398
4398
|
}), i.d(r, "createUBOElements", function() {
|
|
4399
4399
|
return lf;
|
|
4400
4400
|
}), i.d(r, "defaultFilterVertex", function() {
|
|
4401
|
-
return
|
|
4401
|
+
return If;
|
|
4402
4402
|
}), i.d(r, "defaultVertex", function() {
|
|
4403
4403
|
return Pf;
|
|
4404
4404
|
}), i.d(r, "generateProgram", function() {
|
|
@@ -5368,7 +5368,7 @@ var Slide = function(t) {
|
|
|
5368
5368
|
}
|
|
5369
5369
|
}
|
|
5370
5370
|
P.prototype.isQuaternion = true;
|
|
5371
|
-
class
|
|
5371
|
+
class I {
|
|
5372
5372
|
constructor(t2 = 0, e2 = 0, i2 = 0) {
|
|
5373
5373
|
this.x = t2, this.y = e2, this.z = i2;
|
|
5374
5374
|
}
|
|
@@ -5558,10 +5558,10 @@ var Slide = function(t) {
|
|
|
5558
5558
|
return this.copy(t2).multiplyScalar(i2);
|
|
5559
5559
|
}
|
|
5560
5560
|
projectOnPlane(t2) {
|
|
5561
|
-
return
|
|
5561
|
+
return R.copy(this).projectOnVector(t2), this.sub(R);
|
|
5562
5562
|
}
|
|
5563
5563
|
reflect(t2) {
|
|
5564
|
-
return this.sub(
|
|
5564
|
+
return this.sub(R.copy(t2).multiplyScalar(2 * this.dot(t2)));
|
|
5565
5565
|
}
|
|
5566
5566
|
angleTo(t2) {
|
|
5567
5567
|
const e2 = Math.sqrt(this.lengthSq() * t2.lengthSq());
|
|
@@ -5623,10 +5623,10 @@ var Slide = function(t) {
|
|
|
5623
5623
|
return this.x = Math.random(), this.y = Math.random(), this.z = Math.random(), this;
|
|
5624
5624
|
}
|
|
5625
5625
|
}
|
|
5626
|
-
|
|
5627
|
-
const
|
|
5626
|
+
I.prototype.isVector3 = true;
|
|
5627
|
+
const R = new I(), C = new P();
|
|
5628
5628
|
class L {
|
|
5629
|
-
constructor(t2 = new
|
|
5629
|
+
constructor(t2 = new I(1 / 0, 1 / 0, 1 / 0), e2 = new I(-1 / 0, -1 / 0, -1 / 0)) {
|
|
5630
5630
|
this.min = t2, this.max = e2;
|
|
5631
5631
|
}
|
|
5632
5632
|
set(t2, e2) {
|
|
@@ -5749,7 +5749,7 @@ var Slide = function(t) {
|
|
|
5749
5749
|
}
|
|
5750
5750
|
}
|
|
5751
5751
|
L.prototype.isBox3 = true;
|
|
5752
|
-
const N = [new
|
|
5752
|
+
const N = [new I(), new I(), new I(), new I(), new I(), new I(), new I(), new I()], O = new I(), D = new L(), F = new I(), U = new I(), k = new I(), B = new I(), G = new I(), H = new I(), j = new I(), z = new I(), V = new I(), W = new I();
|
|
5753
5753
|
function X(t2, e2, i2, n2, r2) {
|
|
5754
5754
|
for (let s2 = 0, o2 = t2.length - 3; s2 <= o2; s2 += 3) {
|
|
5755
5755
|
W.fromArray(t2, s2);
|
|
@@ -5759,9 +5759,9 @@ var Slide = function(t) {
|
|
|
5759
5759
|
}
|
|
5760
5760
|
return true;
|
|
5761
5761
|
}
|
|
5762
|
-
const Y = new L(), q = new
|
|
5762
|
+
const Y = new L(), q = new I(), Z = new I(), J = new I();
|
|
5763
5763
|
class K {
|
|
5764
|
-
constructor(t2 = new
|
|
5764
|
+
constructor(t2 = new I(), e2 = -1) {
|
|
5765
5765
|
this.center = t2, this.radius = e2;
|
|
5766
5766
|
}
|
|
5767
5767
|
set(t2, e2) {
|
|
@@ -5832,9 +5832,9 @@ var Slide = function(t) {
|
|
|
5832
5832
|
return new this.constructor().copy(this);
|
|
5833
5833
|
}
|
|
5834
5834
|
}
|
|
5835
|
-
const $ = new
|
|
5835
|
+
const $ = new I(), Q = new I(), tt = new I(), et = new I(), it = new I(), nt = new I(), rt = new I();
|
|
5836
5836
|
class st {
|
|
5837
|
-
constructor(t2 = new
|
|
5837
|
+
constructor(t2 = new I(), e2 = new I(0, 0, -1)) {
|
|
5838
5838
|
this.origin = t2, this.direction = e2;
|
|
5839
5839
|
}
|
|
5840
5840
|
set(t2, e2) {
|
|
@@ -6028,8 +6028,8 @@ var Slide = function(t) {
|
|
|
6028
6028
|
return this.multiplyMatrices(t2, this);
|
|
6029
6029
|
}
|
|
6030
6030
|
multiplyMatrices(t2, e2) {
|
|
6031
|
-
const i2 = t2.elements, n2 = e2.elements, r2 = this.elements, s2 = i2[0], o2 = i2[4], a2 = i2[8], l2 = i2[12], h2 = i2[1], c2 = i2[5], u2 = i2[9], d2 = i2[13], p2 = i2[2], f2 = i2[6], m2 = i2[10], g2 = i2[14], v2 = i2[3], _2 = i2[7], y2 = i2[11], x2 = i2[15], b2 = n2[0], T2 = n2[4], E2 = n2[8], w2 = n2[12], S2 = n2[1], M2 = n2[5], A2 = n2[9], P2 = n2[13],
|
|
6032
|
-
return r2[0] = s2 * b2 + o2 * S2 + a2 *
|
|
6031
|
+
const i2 = t2.elements, n2 = e2.elements, r2 = this.elements, s2 = i2[0], o2 = i2[4], a2 = i2[8], l2 = i2[12], h2 = i2[1], c2 = i2[5], u2 = i2[9], d2 = i2[13], p2 = i2[2], f2 = i2[6], m2 = i2[10], g2 = i2[14], v2 = i2[3], _2 = i2[7], y2 = i2[11], x2 = i2[15], b2 = n2[0], T2 = n2[4], E2 = n2[8], w2 = n2[12], S2 = n2[1], M2 = n2[5], A2 = n2[9], P2 = n2[13], I2 = n2[2], R2 = n2[6], C2 = n2[10], L2 = n2[14], N2 = n2[3], O2 = n2[7], D2 = n2[11], F2 = n2[15];
|
|
6032
|
+
return r2[0] = s2 * b2 + o2 * S2 + a2 * I2 + l2 * N2, r2[4] = s2 * T2 + o2 * M2 + a2 * R2 + l2 * O2, r2[8] = s2 * E2 + o2 * A2 + a2 * C2 + l2 * D2, r2[12] = s2 * w2 + o2 * P2 + a2 * L2 + l2 * F2, r2[1] = h2 * b2 + c2 * S2 + u2 * I2 + d2 * N2, r2[5] = h2 * T2 + c2 * M2 + u2 * R2 + d2 * O2, r2[9] = h2 * E2 + c2 * A2 + u2 * C2 + d2 * D2, r2[13] = h2 * w2 + c2 * P2 + u2 * L2 + d2 * F2, r2[2] = p2 * b2 + f2 * S2 + m2 * I2 + g2 * N2, r2[6] = p2 * T2 + f2 * M2 + m2 * R2 + g2 * O2, r2[10] = p2 * E2 + f2 * A2 + m2 * C2 + g2 * D2, r2[14] = p2 * w2 + f2 * P2 + m2 * L2 + g2 * F2, r2[3] = v2 * b2 + _2 * S2 + y2 * I2 + x2 * N2, r2[7] = v2 * T2 + _2 * M2 + y2 * R2 + x2 * O2, r2[11] = v2 * E2 + _2 * A2 + y2 * C2 + x2 * D2, r2[15] = v2 * w2 + _2 * P2 + y2 * L2 + x2 * F2, this;
|
|
6033
6033
|
}
|
|
6034
6034
|
multiplyScalar(t2) {
|
|
6035
6035
|
const e2 = this.elements;
|
|
@@ -6127,7 +6127,7 @@ var Slide = function(t) {
|
|
|
6127
6127
|
}
|
|
6128
6128
|
}
|
|
6129
6129
|
ot.prototype.isMatrix4 = true;
|
|
6130
|
-
const at = new
|
|
6130
|
+
const at = new I(), lt = new ot(), ht = new I(0, 0, 0), ct = new I(1, 1, 1), ut = new I(), dt = new I(), pt = new I(), ft = new ot(), mt = new P();
|
|
6131
6131
|
class gt {
|
|
6132
6132
|
constructor(t2 = 0, e2 = 0, i2 = 0, n2 = gt.DefaultOrder) {
|
|
6133
6133
|
this._x = t2, this._y = e2, this._z = i2, this._order = n2;
|
|
@@ -6210,7 +6210,7 @@ var Slide = function(t) {
|
|
|
6210
6210
|
return t2[e2] = this._x, t2[e2 + 1] = this._y, t2[e2 + 2] = this._z, t2[e2 + 3] = this._order, t2;
|
|
6211
6211
|
}
|
|
6212
6212
|
toVector3(t2) {
|
|
6213
|
-
return t2 ? t2.set(this._x, this._y, this._z) : new
|
|
6213
|
+
return t2 ? t2.set(this._x, this._y, this._z) : new I(this._x, this._y, this._z);
|
|
6214
6214
|
}
|
|
6215
6215
|
_onChange(t2) {
|
|
6216
6216
|
return this._onChangeCallback = t2, this;
|
|
@@ -6246,11 +6246,11 @@ var Slide = function(t) {
|
|
|
6246
6246
|
}
|
|
6247
6247
|
}
|
|
6248
6248
|
let _t = 0;
|
|
6249
|
-
const yt = new
|
|
6249
|
+
const yt = new I(), xt = new P(), bt = new ot(), Tt = new I(), Et = new I(), wt = new I(), St = new P(), Mt = new I(1, 0, 0), At = new I(0, 1, 0), Pt = new I(0, 0, 1), It = { type: "added" }, Rt = { type: "removed" };
|
|
6250
6250
|
class Ct extends l {
|
|
6251
6251
|
constructor() {
|
|
6252
6252
|
super(), Object.defineProperty(this, "id", { value: _t++ }), this.uuid = d(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = Ct.DefaultUp.clone();
|
|
6253
|
-
const t2 = new
|
|
6253
|
+
const t2 = new I(), e2 = new gt(), i2 = new P(), n2 = new I(1, 1, 1);
|
|
6254
6254
|
e2._onChange(function() {
|
|
6255
6255
|
i2.setFromEuler(e2, false);
|
|
6256
6256
|
}), i2._onChange(function() {
|
|
@@ -6323,7 +6323,7 @@ var Slide = function(t) {
|
|
|
6323
6323
|
this.add(arguments[t3]);
|
|
6324
6324
|
return this;
|
|
6325
6325
|
}
|
|
6326
|
-
return t2 === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", t2), this) : (t2 && t2.isObject3D ? (t2.parent !== null && t2.parent.remove(t2), t2.parent = this, this.children.push(t2), t2.dispatchEvent(
|
|
6326
|
+
return t2 === this ? (console.error("THREE.Object3D.add: object can't be added as a child of itself.", t2), this) : (t2 && t2.isObject3D ? (t2.parent !== null && t2.parent.remove(t2), t2.parent = this, this.children.push(t2), t2.dispatchEvent(It)) : console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.", t2), this);
|
|
6327
6327
|
}
|
|
6328
6328
|
remove(t2) {
|
|
6329
6329
|
if (arguments.length > 1) {
|
|
@@ -6332,7 +6332,7 @@ var Slide = function(t) {
|
|
|
6332
6332
|
return this;
|
|
6333
6333
|
}
|
|
6334
6334
|
const e2 = this.children.indexOf(t2);
|
|
6335
|
-
return e2 !== -1 && (t2.parent = null, this.children.splice(e2, 1), t2.dispatchEvent(
|
|
6335
|
+
return e2 !== -1 && (t2.parent = null, this.children.splice(e2, 1), t2.dispatchEvent(Rt)), this;
|
|
6336
6336
|
}
|
|
6337
6337
|
removeFromParent() {
|
|
6338
6338
|
const t2 = this.parent;
|
|
@@ -6341,7 +6341,7 @@ var Slide = function(t) {
|
|
|
6341
6341
|
clear() {
|
|
6342
6342
|
for (let t2 = 0; t2 < this.children.length; t2++) {
|
|
6343
6343
|
const e2 = this.children[t2];
|
|
6344
|
-
e2.parent = null, e2.dispatchEvent(
|
|
6344
|
+
e2.parent = null, e2.dispatchEvent(Rt);
|
|
6345
6345
|
}
|
|
6346
6346
|
return this.children.length = 0, this;
|
|
6347
6347
|
}
|
|
@@ -6483,10 +6483,10 @@ var Slide = function(t) {
|
|
|
6483
6483
|
return this;
|
|
6484
6484
|
}
|
|
6485
6485
|
}
|
|
6486
|
-
Ct.DefaultUp = new
|
|
6487
|
-
const Lt = new
|
|
6486
|
+
Ct.DefaultUp = new I(0, 1, 0), Ct.DefaultMatrixAutoUpdate = true, Ct.prototype.isObject3D = true;
|
|
6487
|
+
const Lt = new I(), Nt = new I(), Ot = new I(), Dt = new I(), Ft = new I(), Ut = new I(), kt = new I(), Bt = new I(), Gt = new I(), Ht = new I();
|
|
6488
6488
|
class jt {
|
|
6489
|
-
constructor(t2 = new
|
|
6489
|
+
constructor(t2 = new I(), e2 = new I(), i2 = new I()) {
|
|
6490
6490
|
this.a = t2, this.b = e2, this.c = i2;
|
|
6491
6491
|
}
|
|
6492
6492
|
static getNormal(t2, e2, i2, n2) {
|
|
@@ -6841,7 +6841,7 @@ var Slide = function(t) {
|
|
|
6841
6841
|
}
|
|
6842
6842
|
}
|
|
6843
6843
|
$t.prototype.isMeshBasicMaterial = true;
|
|
6844
|
-
const Qt = new
|
|
6844
|
+
const Qt = new I(), te = new _();
|
|
6845
6845
|
class ee {
|
|
6846
6846
|
constructor(t2, e2, i2) {
|
|
6847
6847
|
if (Array.isArray(t2))
|
|
@@ -6891,7 +6891,7 @@ var Slide = function(t) {
|
|
|
6891
6891
|
let i2 = 0;
|
|
6892
6892
|
for (let n2 = 0, r2 = t2.length; n2 < r2; n2++) {
|
|
6893
6893
|
let r3 = t2[n2];
|
|
6894
|
-
r3 === void 0 && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", n2), r3 = new
|
|
6894
|
+
r3 === void 0 && (console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined", n2), r3 = new I()), e2[i2++] = r3.x, e2[i2++] = r3.y, e2[i2++] = r3.z;
|
|
6895
6895
|
}
|
|
6896
6896
|
return this;
|
|
6897
6897
|
}
|
|
@@ -7010,7 +7010,7 @@ var Slide = function(t) {
|
|
|
7010
7010
|
return e2;
|
|
7011
7011
|
}
|
|
7012
7012
|
let ae = 0;
|
|
7013
|
-
const le = new ot(), he = new Ct(), ce = new
|
|
7013
|
+
const le = new ot(), he = new Ct(), ce = new I(), ue = new L(), de = new L(), pe = new I();
|
|
7014
7014
|
class fe extends l {
|
|
7015
7015
|
constructor() {
|
|
7016
7016
|
super(), Object.defineProperty(this, "id", { value: ae++ }), this.uuid = d(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = false, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
@@ -7089,7 +7089,7 @@ var Slide = function(t) {
|
|
|
7089
7089
|
this.boundingBox === null && (this.boundingBox = new L());
|
|
7090
7090
|
const t2 = this.attributes.position, e2 = this.morphAttributes.position;
|
|
7091
7091
|
if (t2 && t2.isGLBufferAttribute)
|
|
7092
|
-
return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', this), void this.boundingBox.set(new
|
|
7092
|
+
return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".', this), void this.boundingBox.set(new I(-1 / 0, -1 / 0, -1 / 0), new I(1 / 0, 1 / 0, 1 / 0));
|
|
7093
7093
|
if (t2 !== void 0) {
|
|
7094
7094
|
if (this.boundingBox.setFromBufferAttribute(t2), e2)
|
|
7095
7095
|
for (let t3 = 0, i2 = e2.length; t3 < i2; t3++) {
|
|
@@ -7104,7 +7104,7 @@ var Slide = function(t) {
|
|
|
7104
7104
|
this.boundingSphere === null && (this.boundingSphere = new K());
|
|
7105
7105
|
const t2 = this.attributes.position, e2 = this.morphAttributes.position;
|
|
7106
7106
|
if (t2 && t2.isGLBufferAttribute)
|
|
7107
|
-
return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this), void this.boundingSphere.set(new
|
|
7107
|
+
return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".', this), void this.boundingSphere.set(new I(), 1 / 0);
|
|
7108
7108
|
if (t2) {
|
|
7109
7109
|
const i2 = this.boundingSphere.center;
|
|
7110
7110
|
if (ue.setFromBufferAttribute(t2), e2)
|
|
@@ -7135,8 +7135,8 @@ var Slide = function(t) {
|
|
|
7135
7135
|
e2.tangent === void 0 && this.setAttribute("tangent", new ee(new Float32Array(4 * o2), 4));
|
|
7136
7136
|
const a2 = e2.tangent.array, l2 = [], h2 = [];
|
|
7137
7137
|
for (let t3 = 0; t3 < o2; t3++)
|
|
7138
|
-
l2[t3] = new
|
|
7139
|
-
const c2 = new
|
|
7138
|
+
l2[t3] = new I(), h2[t3] = new I();
|
|
7139
|
+
const c2 = new I(), u2 = new I(), d2 = new I(), p2 = new _(), f2 = new _(), m2 = new _(), g2 = new I(), v2 = new I();
|
|
7140
7140
|
function y2(t3, e3, i3) {
|
|
7141
7141
|
c2.fromArray(n2, 3 * t3), u2.fromArray(n2, 3 * e3), d2.fromArray(n2, 3 * i3), p2.fromArray(s2, 2 * t3), f2.fromArray(s2, 2 * e3), m2.fromArray(s2, 2 * i3), u2.sub(c2), d2.sub(c2), f2.sub(p2), m2.sub(p2);
|
|
7142
7142
|
const r3 = 1 / (f2.x * m2.y - m2.x * f2.y);
|
|
@@ -7149,7 +7149,7 @@ var Slide = function(t) {
|
|
|
7149
7149
|
for (let t4 = n3, r3 = n3 + e4.count; t4 < r3; t4 += 3)
|
|
7150
7150
|
y2(i2[t4 + 0], i2[t4 + 1], i2[t4 + 2]);
|
|
7151
7151
|
}
|
|
7152
|
-
const b2 = new
|
|
7152
|
+
const b2 = new I(), T2 = new I(), E2 = new I(), w2 = new I();
|
|
7153
7153
|
function S2(t3) {
|
|
7154
7154
|
E2.fromArray(r2, 3 * t3), w2.copy(E2);
|
|
7155
7155
|
const e3 = l2[t3];
|
|
@@ -7172,7 +7172,7 @@ var Slide = function(t) {
|
|
|
7172
7172
|
else
|
|
7173
7173
|
for (let t3 = 0, e3 = i2.count; t3 < e3; t3++)
|
|
7174
7174
|
i2.setXYZ(t3, 0, 0, 0);
|
|
7175
|
-
const n2 = new
|
|
7175
|
+
const n2 = new I(), r2 = new I(), s2 = new I(), o2 = new I(), a2 = new I(), l2 = new I(), h2 = new I(), c2 = new I();
|
|
7176
7176
|
if (t2)
|
|
7177
7177
|
for (let u2 = 0, d2 = t2.count; u2 < d2; u2 += 3) {
|
|
7178
7178
|
const d3 = t2.getX(u2 + 0), p2 = t2.getX(u2 + 1), f2 = t2.getX(u2 + 2);
|
|
@@ -7307,7 +7307,7 @@ var Slide = function(t) {
|
|
|
7307
7307
|
}
|
|
7308
7308
|
}
|
|
7309
7309
|
fe.prototype.isBufferGeometry = true;
|
|
7310
|
-
const me = new ot(), ge = new st(), ve = new K(), _e = new
|
|
7310
|
+
const me = new ot(), ge = new st(), ve = new K(), _e = new I(), ye = new I(), xe = new I(), be = new I(), Te = new I(), Ee = new I(), we = new I(), Se = new I(), Me = new I(), Ae = new _(), Pe = new _(), Ie = new _(), Re = new I(), Ce = new I();
|
|
7311
7311
|
class Le extends Ct {
|
|
7312
7312
|
constructor(t2 = new fe(), e2 = new $t()) {
|
|
7313
7313
|
super(), this.type = "Mesh", this.geometry = t2, this.material = e2, this.updateMorphTargets();
|
|
@@ -7396,10 +7396,10 @@ var Slide = function(t) {
|
|
|
7396
7396
|
Ce.copy(a3), Ce.applyMatrix4(t3.matrixWorld);
|
|
7397
7397
|
const h3 = i3.ray.origin.distanceTo(Ce);
|
|
7398
7398
|
return h3 < i3.near || h3 > i3.far ? null : { distance: h3, point: Ce.clone(), object: t3 };
|
|
7399
|
-
}(t2, e2, i2, n2, _e, ye, xe,
|
|
7399
|
+
}(t2, e2, i2, n2, _e, ye, xe, Re);
|
|
7400
7400
|
if (p2) {
|
|
7401
|
-
a2 && (Ae.fromBufferAttribute(a2, h2), Pe.fromBufferAttribute(a2, c2),
|
|
7402
|
-
const t3 = { a: h2, b: c2, c: u2, normal: new
|
|
7401
|
+
a2 && (Ae.fromBufferAttribute(a2, h2), Pe.fromBufferAttribute(a2, c2), Ie.fromBufferAttribute(a2, u2), p2.uv = jt.getUV(Re, _e, ye, xe, Ae, Pe, Ie, new _())), l2 && (Ae.fromBufferAttribute(l2, h2), Pe.fromBufferAttribute(l2, c2), Ie.fromBufferAttribute(l2, u2), p2.uv2 = jt.getUV(Re, _e, ye, xe, Ae, Pe, Ie, new _()));
|
|
7402
|
+
const t3 = { a: h2, b: c2, c: u2, normal: new I(), materialIndex: 0 };
|
|
7403
7403
|
jt.getNormal(_e, ye, xe, t3.normal), p2.face = t3;
|
|
7404
7404
|
}
|
|
7405
7405
|
return p2;
|
|
@@ -7415,7 +7415,7 @@ var Slide = function(t) {
|
|
|
7415
7415
|
function p2(t3, e3, i3, n3, r3, s3, p3, f2, m2, g2, v2) {
|
|
7416
7416
|
const _2 = s3 / m2, y2 = p3 / g2, x2 = s3 / 2, b2 = p3 / 2, T2 = f2 / 2, E2 = m2 + 1, w2 = g2 + 1;
|
|
7417
7417
|
let S2 = 0, M2 = 0;
|
|
7418
|
-
const A2 = new
|
|
7418
|
+
const A2 = new I();
|
|
7419
7419
|
for (let s4 = 0; s4 < w2; s4++) {
|
|
7420
7420
|
const o3 = s4 * y2 - b2;
|
|
7421
7421
|
for (let a3 = 0; a3 < E2; a3++) {
|
|
@@ -7555,17 +7555,17 @@ var Slide = function(t) {
|
|
|
7555
7555
|
return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");
|
|
7556
7556
|
this.renderTarget = i2;
|
|
7557
7557
|
const n2 = new Ge(90, 1, t2, e2);
|
|
7558
|
-
n2.layers = this.layers, n2.up.set(0, -1, 0), n2.lookAt(new
|
|
7558
|
+
n2.layers = this.layers, n2.up.set(0, -1, 0), n2.lookAt(new I(1, 0, 0)), this.add(n2);
|
|
7559
7559
|
const r2 = new Ge(90, 1, t2, e2);
|
|
7560
|
-
r2.layers = this.layers, r2.up.set(0, -1, 0), r2.lookAt(new
|
|
7560
|
+
r2.layers = this.layers, r2.up.set(0, -1, 0), r2.lookAt(new I(-1, 0, 0)), this.add(r2);
|
|
7561
7561
|
const s2 = new Ge(90, 1, t2, e2);
|
|
7562
|
-
s2.layers = this.layers, s2.up.set(0, 0, 1), s2.lookAt(new
|
|
7562
|
+
s2.layers = this.layers, s2.up.set(0, 0, 1), s2.lookAt(new I(0, 1, 0)), this.add(s2);
|
|
7563
7563
|
const o2 = new Ge(90, 1, t2, e2);
|
|
7564
|
-
o2.layers = this.layers, o2.up.set(0, 0, -1), o2.lookAt(new
|
|
7564
|
+
o2.layers = this.layers, o2.up.set(0, 0, -1), o2.lookAt(new I(0, -1, 0)), this.add(o2);
|
|
7565
7565
|
const a2 = new Ge(90, 1, t2, e2);
|
|
7566
|
-
a2.layers = this.layers, a2.up.set(0, -1, 0), a2.lookAt(new
|
|
7566
|
+
a2.layers = this.layers, a2.up.set(0, -1, 0), a2.lookAt(new I(0, 0, 1)), this.add(a2);
|
|
7567
7567
|
const l2 = new Ge(90, 1, t2, e2);
|
|
7568
|
-
l2.layers = this.layers, l2.up.set(0, -1, 0), l2.lookAt(new
|
|
7568
|
+
l2.layers = this.layers, l2.up.set(0, -1, 0), l2.lookAt(new I(0, 0, -1)), this.add(l2);
|
|
7569
7569
|
}
|
|
7570
7570
|
update(t2, e2) {
|
|
7571
7571
|
this.parent === null && this.updateMatrixWorld();
|
|
@@ -7607,9 +7607,9 @@ var Slide = function(t) {
|
|
|
7607
7607
|
}
|
|
7608
7608
|
}
|
|
7609
7609
|
ze.prototype.isWebGLCubeRenderTarget = true;
|
|
7610
|
-
const Ve = new
|
|
7610
|
+
const Ve = new I(), We = new I(), Xe = new y();
|
|
7611
7611
|
class Ye {
|
|
7612
|
-
constructor(t2 = new
|
|
7612
|
+
constructor(t2 = new I(1, 0, 0), e2 = 0) {
|
|
7613
7613
|
this.normal = t2, this.constant = e2;
|
|
7614
7614
|
}
|
|
7615
7615
|
set(t2, e2) {
|
|
@@ -7679,7 +7679,7 @@ var Slide = function(t) {
|
|
|
7679
7679
|
}
|
|
7680
7680
|
}
|
|
7681
7681
|
Ye.prototype.isPlane = true;
|
|
7682
|
-
const qe = new K(), Ze = new
|
|
7682
|
+
const qe = new K(), Ze = new I();
|
|
7683
7683
|
class Je {
|
|
7684
7684
|
constructor(t2 = new Ye(), e2 = new Ye(), i2 = new Ye(), n2 = new Ye(), r2 = new Ye(), s2 = new Ye()) {
|
|
7685
7685
|
this.planes = [t2, e2, i2, n2, r2, s2];
|
|
@@ -7796,7 +7796,7 @@ var Slide = function(t) {
|
|
|
7796
7796
|
return new Qe(t2.width, t2.height, t2.widthSegments, t2.heightSegments);
|
|
7797
7797
|
}
|
|
7798
7798
|
}
|
|
7799
|
-
const ti = { alphamap_fragment: "#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif", alphatest_fragment: "#ifdef ALPHATEST\n if ( diffuseColor.a < ALPHATEST ) discard;\n#endif", aomap_fragment: "#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n #endif\n#endif", aomap_pars_fragment: "#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif", begin_vertex: "vec3 transformed = vec3( position );", beginnormal_vertex: "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif", bsdfs: "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n return vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n#else\n if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n }\n return 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n float fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n return ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n return Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n return 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( incidentLight.direction + viewDir );\n float dotNL = saturate( dot( normal, incidentLight.direction ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n vec3 F = F_Schlick( specularColor, dotLH );\n float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n vec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n return specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n vec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n vec3 FssEss = F * brdf.x + brdf.y;\n float Ess = brdf.x + brdf.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n float dotNH = saturate( dot( geometry.normal, halfDir ) );\n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n vec3 F = F_Schlick( specularColor, dotLH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n return sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n float invAlpha = 1.0 / roughness;\n float cos2h = NoH * NoH;\n float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n vec3 N = geometry.normal;\n vec3 V = geometry.viewDir;\n vec3 H = normalize( V + L );\n float dotNH = saturate( dot( N, H ) );\n return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vUv );\n vec2 dSTdy = dFdy( vUv );\n float Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif", clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n#endif", clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif", clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif", clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif", color_fragment: "#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif", color_pars_fragment: "#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif", color_pars_vertex: "#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n varying vec3 vColor;\n#endif", color_vertex: "#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif", common: "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n#ifdef CLEARCOAT\n vec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n float distance = dot( planeNormal, point - pointOnPlane );\n return - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n return sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n return dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}", cube_uv_reflection_fragment: "#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_maxMipLevel 8.0\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_maxTileSize 256.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n vec2 f = fract( uv );\n uv += 0.5 - f;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if ( mipInt < cubeUV_maxMipLevel ) {\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n vec3 tm = mix( tl, tr, f.x );\n vec3 bm = mix( bl, br, f.x );\n return mix( tm, bm, f.y );\n }\n #define r0 1.0\n #define v0 0.339\n #define m0 - 2.0\n #define r1 0.8\n #define v1 0.276\n #define m1 - 1.0\n #define r4 0.4\n #define v4 0.046\n #define m4 2.0\n #define r5 0.305\n #define v5 0.016\n #define m5 3.0\n #define r6 0.21\n #define v6 0.0038\n #define m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= r1 ) {\n mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n } else if ( roughness >= r4 ) {\n mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n } else if ( roughness >= r5 ) {\n mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n } else if ( roughness >= r6 ) {\n mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif", defaultnormal_vertex: "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n mat3 m = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n transformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif", displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif", displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif", emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vUv );\n emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif", emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif", encodings_fragment: "gl_FragColor = linearToOutputTexel( gl_FragColor );", encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n 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 );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n float maxComponent = max( max( value.r, value.g ), value.b );\n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.r, max( value.g, value.b ) );\n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n M = ceil( M * 255.0 ) / 255.0;\n return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.r, max( value.g, value.b ) );\n float D = max( maxRange / maxRGB, 1.0 );\n D = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n vec4 vResult;\n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n vResult.w = fract( Le );\n vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n float Le = value.z * 255.0 + value.w;\n vec3 Xp_Y_XYZp;\n Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n return vec4( max( vRGB, 0.0 ), 1.0 );\n}", envmap_fragment: "#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifndef ENVMAP_TYPE_CUBE_UV\n envColor = envMapTexelToLinear( envColor );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif", envmap_common_pars_fragment: "#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform int maxMipLevel;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif", envmap_pars_fragment: "#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif", envmap_pars_vertex: "#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif", envmap_physical_pars_fragment: "#if defined( USE_ENVMAP )\n #ifdef ENVMAP_MODE_REFRACTION\n uniform float refractionRatio;\n #endif\n vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n #ifdef ENVMAP_TYPE_CUBE\n vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n #ifdef TEXTURE_LOD_EXT\n vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n #else\n vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n #endif\n envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n #else\n vec4 envMapColor = vec4( 0.0 );\n #endif\n return PI * envMapColor.rgb * envMapIntensity;\n }\n float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n float maxMIPLevelScalar = float( maxMIPLevel );\n float sigma = PI * roughness * roughness / ( 1.0 + roughness );\n float desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n }\n vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( -viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n #else\n vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n #endif\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n #ifdef ENVMAP_TYPE_CUBE\n vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n #ifdef TEXTURE_LOD_EXT\n vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n #else\n vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n #endif\n envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n #endif\n return envMapColor.rgb * envMapIntensity;\n }\n#endif", envmap_vertex: "#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif", fog_vertex: "#ifdef USE_FOG\n fogDepth = - mvPosition.z;\n#endif", fog_pars_vertex: "#ifdef USE_FOG\n varying float fogDepth;\n#endif", fog_fragment: "#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif", fog_pars_fragment: "#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float fogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif", gradientmap_pars_fragment: "#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return texture2D( gradientMap, coord ).rgb;\n #else\n return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n #endif\n}", lightmap_fragment: "#ifdef USE_LIGHTMAP\n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif", lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif", lights_lambert_vertex: "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n vLightBack = vec3( 0.0 );\n vIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n vIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n #ifdef DOUBLE_SIDED\n vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n #endif\n }\n #pragma unroll_loop_end\n#endif", lights_pars_begin: "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n return irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n directLight.color = directionalLight.color;\n directLight.direction = directionalLight.direction;\n directLight.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n return irradiance;\n }\n#endif", lights_toon_fragment: "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;", lights_toon_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material ) (0)", lights_phong_fragment: "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;", lights_phong_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material ) (0)", lights_physical_fragment: "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheen;\n#endif", lights_physical_pars_fragment: "struct PhysicalMaterial {\n vec3 diffuseColor;\n float specularRoughness;\n vec3 specularColor;\n#ifdef CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n vec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometry.normal;\n vec3 viewDir = geometry.viewDir;\n vec3 position = geometry.position;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.specularRoughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n #ifdef CLEARCOAT\n float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = ccDotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n ccIrradiance *= PI;\n #endif\n float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n #else\n float clearcoatDHR = 0.0;\n #endif\n #ifdef USE_SHEEN\n reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n material.specularRoughness,\n directLight.direction,\n geometry,\n material.sheenColor\n );\n #else\n reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n #endif\n reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef CLEARCOAT\n float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n float ccDotNL = ccDotNV;\n float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n #else\n float clearcoatDHR = 0.0;\n #endif\n float clearcoatInv = 1.0 - clearcoatDHR;\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}", lights_fragment_begin: "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n geometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n irradiance += getLightProbeIrradiance( lightProbe, geometry );\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif", lights_fragment_maps: "#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n lightMapIrradiance *= PI;\n #endif\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n #ifdef CLEARCOAT\n clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n #endif\n#endif", lights_fragment_end: "#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif", logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif", logdepthbuf_pars_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif", logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n varying float vFragDepth;\n varying float vIsPerspective;\n #else\n uniform float logDepthBufFC;\n #endif\n#endif", logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n #else\n if ( isPerspectiveMatrix( projectionMatrix ) ) {\n gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n gl_Position.z *= gl_Position.w;\n }\n #endif\n#endif", map_fragment: "#ifdef USE_MAP\n vec4 texelColor = texture2D( map, vUv );\n texelColor = mapTexelToLinear( texelColor );\n diffuseColor *= texelColor;\n#endif", map_pars_fragment: "#ifdef USE_MAP\n uniform sampler2D map;\n#endif", map_particle_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n vec4 mapTexel = texture2D( map, uv );\n diffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif", map_particle_pars_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif", metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vUv );\n metalnessFactor *= texelMetalness.b;\n#endif", metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif", morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif", morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n uniform float morphTargetBaseInfluence;\n #ifndef USE_MORPHNORMALS\n uniform float morphTargetInfluences[ 8 ];\n #else\n uniform float morphTargetInfluences[ 4 ];\n #endif\n#endif", morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n transformed += morphTarget0 * morphTargetInfluences[ 0 ];\n transformed += morphTarget1 * morphTargetInfluences[ 1 ];\n transformed += morphTarget2 * morphTargetInfluences[ 2 ];\n transformed += morphTarget3 * morphTargetInfluences[ 3 ];\n #ifndef USE_MORPHNORMALS\n transformed += morphTarget4 * morphTargetInfluences[ 4 ];\n transformed += morphTarget5 * morphTargetInfluences[ 5 ];\n transformed += morphTarget6 * morphTargetInfluences[ 6 ];\n transformed += morphTarget7 * morphTargetInfluences[ 7 ];\n #endif\n#endif", normal_fragment_begin: "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n #ifdef USE_TANGENT\n vec3 tangent = normalize( vTangent );\n vec3 bitangent = normalize( vBitangent );\n #ifdef DOUBLE_SIDED\n tangent = tangent * faceDirection;\n bitangent = bitangent * faceDirection;\n #endif\n #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n mat3 vTBN = mat3( tangent, bitangent, normal );\n #endif\n #endif\n#endif\nvec3 geometryNormal = normal;", normal_fragment_maps: "#ifdef OBJECTSPACE_NORMALMAP\n normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n #ifdef USE_TANGENT\n normal = normalize( vTBN * mapN );\n #else\n normal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n #endif\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif", normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( vUv.st );\n vec2 st1 = dFdy( vUv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n }\n#endif", clearcoat_normal_fragment_begin: "#ifdef CLEARCOAT\n vec3 clearcoatNormal = geometryNormal;\n#endif", clearcoat_normal_fragment_maps: "#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n #ifdef USE_TANGENT\n clearcoatNormal = normalize( vTBN * clearcoatMapN );\n #else\n clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n #endif\n#endif", clearcoat_pars_fragment: "#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif", packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * PackFactors ), v );\n r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}", premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif", project_vertex: "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;", dithering_fragment: "#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif", dithering_pars_fragment: "#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif", roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n roughnessFactor *= texelRoughness.g;\n#endif", roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif", shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n bool inFrustum = all( inFrustumVec );\n bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n bool frustumTest = all( frustumTestVec );\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return shadow;\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n vec3 lightToPosition = shadowCoord.xyz;\n float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n return (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n#endif", shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif", shadowmap_vertex: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n #endif\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif", shadowmask_pars_fragment: "float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}", skinbase_vertex: "#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif", skinning_pars_vertex: "#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n #ifdef BONE_TEXTURE\n uniform highp sampler2D boneTexture;\n uniform int boneTextureSize;\n mat4 getBoneMatrix( const in float i ) {\n float j = i * 4.0;\n float x = mod( j, float( boneTextureSize ) );\n float y = floor( j / float( boneTextureSize ) );\n float dx = 1.0 / float( boneTextureSize );\n float dy = 1.0 / float( boneTextureSize );\n y = dy * ( y + 0.5 );\n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n mat4 bone = mat4( v1, v2, v3, v4 );\n return bone;\n }\n #else\n uniform mat4 boneMatrices[ MAX_BONES ];\n mat4 getBoneMatrix( const in float i ) {\n mat4 bone = boneMatrices[ int(i) ];\n return bone;\n }\n #endif\n#endif", skinning_vertex: "#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif", skinnormal_vertex: "#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif", specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif", specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif", tonemapping_fragment: "#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif", tonemapping_pars_fragment: "#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }", transmission_fragment: "#ifdef USE_TRANSMISSION\n float transmissionFactor = transmission;\n float thicknessFactor = thickness;\n #ifdef USE_TRANSMISSIONMAP\n transmissionFactor *= texture2D( transmissionMap, vUv ).r;\n #endif\n #ifdef USE_THICKNESSNMAP\n thicknessFactor *= texture2D( thicknessMap, vUv ).g;\n #endif\n vec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n vec3 v = normalize( cameraPosition - pos );\n float ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n vec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n normal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n attenuationColor, attenuationDistance );\n totalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif", transmission_pars_fragment: "#ifdef USE_TRANSMISSION\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec4 vWorldPosition;\n vec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n vec3 modelScale;\n modelScale.x = length(vec3(modelMatrix[0].xyz));\n modelScale.y = length(vec3(modelMatrix[1].xyz));\n modelScale.z = length(vec3(modelMatrix[2].xyz));\n return normalize(refractionVector) * thickness * modelScale;\n }\n float applyIorToRoughness(float roughness, float ior) {\n return roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n }\n vec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n float framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n return texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n }\n vec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n if (attenuationDistance == 0.0) {\n return radiance;\n } else {\n vec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n vec3 transmittance = exp(-attenuationCoefficient * transmissionDistance); return transmittance * radiance;\n }\n }\n vec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n vec3 attenuationColor, float attenuationDistance) {\n vec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n vec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n return (1.0 - specularColor) * attenuatedColor * baseColor;\n }\n#endif", uv_pars_fragment: "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n varying vec2 vUv;\n#endif", uv_pars_vertex: "#ifdef USE_UV\n #ifdef UVS_VERTEX_ONLY\n vec2 vUv;\n #else\n varying vec2 vUv;\n #endif\n uniform mat3 uvTransform;\n#endif", uv_vertex: "#ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif", uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n varying vec2 vUv2;\n#endif", uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n attribute vec2 uv2;\n varying vec2 vUv2;\n uniform mat3 uv2Transform;\n#endif", uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif", worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif", background_frag: "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n gl_FragColor = mapTexelToLinear( texColor );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", background_vert: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}", cube_frag: "#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n vec3 vReflect = vWorldDirection;\n #include <envmap_fragment>\n gl_FragColor = envColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", cube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}", depth_frag: "#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( 1.0 );\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <logdepthbuf_fragment>\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #endif\n}", depth_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}", distanceRGBA_frag: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( 1.0 );\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}", distanceRGBA_vert: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}", equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n vec4 texColor = texture2D( tEquirect, sampleUV );\n gl_FragColor = mapTexelToLinear( texColor );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", equirect_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}", linedashed_frag: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}", linedashed_vert: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <color_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}", meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n \n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshbasic_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <skinbase_vertex>\n #ifdef USE_ENVMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}", meshlambert_frag: "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n varying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n #include <emissivemap_fragment>\n #ifdef DOUBLE_SIDED\n reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n #else\n reflectedLight.indirectDiffuse += vIndirectFront;\n #endif\n #include <lightmap_fragment>\n reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n #ifdef DOUBLE_SIDED\n reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n #else\n reflectedLight.directDiffuse = vLightFront;\n #endif\n reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n varying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <lights_lambert_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshmatcap_frag: "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n matcapColor = matcapTexelToLinear( matcapColor );\n #else\n vec4 matcapColor = vec4( 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshmatcap_vert: "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}", meshtoon_frag: "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshtoon_vert: "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshphong_frag: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshphysical_frag: "#define STANDARD\n#ifdef PHYSICAL\n #define REFLECTIVITY\n #define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform vec3 attenuationColor;\n uniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n uniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshphysical_vert: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#ifdef USE_TRANSMISSION\n varying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition;\n#endif\n}", normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}", normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n vViewPosition = - mvPosition.xyz;\n#endif\n}", points_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}", points_vert: "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <color_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}", shadow_frag: "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n}", shadow_vert: "#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <begin_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", sprite_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n}", sprite_vert: "uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}" }, ei = { common: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, map: { value: null }, uvTransform: { value: new y() }, uv2Transform: { value: new y() }, alphaMap: { value: null } }, specularmap: { specularMap: { value: null } }, envmap: { envMap: { value: null }, flipEnvMap: { value: -1 }, reflectivity: { value: 1 }, refractionRatio: { value: 0.98 }, maxMipLevel: { value: 0 } }, aomap: { aoMap: { value: null }, aoMapIntensity: { value: 1 } }, lightmap: { lightMap: { value: null }, lightMapIntensity: { value: 1 } }, emissivemap: { emissiveMap: { value: null } }, bumpmap: { bumpMap: { value: null }, bumpScale: { value: 1 } }, normalmap: { normalMap: { value: null }, normalScale: { value: new _(1, 1) } }, displacementmap: { displacementMap: { value: null }, displacementScale: { value: 1 }, displacementBias: { value: 0 } }, roughnessmap: { roughnessMap: { value: null } }, metalnessmap: { metalnessMap: { value: null } }, gradientmap: { gradientMap: { value: null } }, fog: { fogDensity: { value: 25e-5 }, fogNear: { value: 1 }, fogFar: { value: 2e3 }, fogColor: { value: new Kt(16777215) } }, lights: { ambientLightColor: { value: [] }, lightProbe: { value: [] }, directionalLights: { value: [], properties: { direction: {}, color: {} } }, directionalLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} } }, directionalShadowMap: { value: [] }, directionalShadowMatrix: { value: [] }, spotLights: { value: [], properties: { color: {}, position: {}, direction: {}, distance: {}, coneCos: {}, penumbraCos: {}, decay: {} } }, spotLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} } }, spotShadowMap: { value: [] }, spotShadowMatrix: { value: [] }, pointLights: { value: [], properties: { color: {}, position: {}, decay: {}, distance: {} } }, pointLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {}, shadowCameraNear: {}, shadowCameraFar: {} } }, pointShadowMap: { value: [] }, pointShadowMatrix: { value: [] }, hemisphereLights: { value: [], properties: { direction: {}, skyColor: {}, groundColor: {} } }, rectAreaLights: { value: [], properties: { color: {}, position: {}, width: {}, height: {} } }, ltc_1: { value: null }, ltc_2: { value: null } }, points: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, size: { value: 1 }, scale: { value: 1 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new y() } }, sprite: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, center: { value: new _(0.5, 0.5) }, rotation: { value: 0 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new y() } } }, ii = { basic: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.fog]), vertexShader: ti.meshbasic_vert, fragmentShader: ti.meshbasic_frag }, lambert: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.fog, ei.lights, { emissive: { value: new Kt(0) } }]), vertexShader: ti.meshlambert_vert, fragmentShader: ti.meshlambert_frag }, phong: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) }, specular: { value: new Kt(1118481) }, shininess: { value: 30 } }]), vertexShader: ti.meshphong_vert, fragmentShader: ti.meshphong_frag }, standard: { uniforms: Fe([ei.common, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.roughnessmap, ei.metalnessmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) }, roughness: { value: 1 }, metalness: { value: 0 }, envMapIntensity: { value: 1 } }]), vertexShader: ti.meshphysical_vert, fragmentShader: ti.meshphysical_frag }, toon: { uniforms: Fe([ei.common, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.gradientmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) } }]), vertexShader: ti.meshtoon_vert, fragmentShader: ti.meshtoon_frag }, matcap: { uniforms: Fe([ei.common, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.fog, { matcap: { value: null } }]), vertexShader: ti.meshmatcap_vert, fragmentShader: ti.meshmatcap_frag }, points: { uniforms: Fe([ei.points, ei.fog]), vertexShader: ti.points_vert, fragmentShader: ti.points_frag }, dashed: { uniforms: Fe([ei.common, ei.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: ti.linedashed_vert, fragmentShader: ti.linedashed_frag }, depth: { uniforms: Fe([ei.common, ei.displacementmap]), vertexShader: ti.depth_vert, fragmentShader: ti.depth_frag }, normal: { uniforms: Fe([ei.common, ei.bumpmap, ei.normalmap, ei.displacementmap, { opacity: { value: 1 } }]), vertexShader: ti.normal_vert, fragmentShader: ti.normal_frag }, sprite: { uniforms: Fe([ei.sprite, ei.fog]), vertexShader: ti.sprite_vert, fragmentShader: ti.sprite_frag }, background: { uniforms: { uvTransform: { value: new y() }, t2D: { value: null } }, vertexShader: ti.background_vert, fragmentShader: ti.background_frag }, cube: { uniforms: Fe([ei.envmap, { opacity: { value: 1 } }]), vertexShader: ti.cube_vert, fragmentShader: ti.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: ti.equirect_vert, fragmentShader: ti.equirect_frag }, distanceRGBA: { uniforms: Fe([ei.common, ei.displacementmap, { referencePosition: { value: new R() }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: ti.distanceRGBA_vert, fragmentShader: ti.distanceRGBA_frag }, shadow: { uniforms: Fe([ei.lights, ei.fog, { color: { value: new Kt(0) }, opacity: { value: 1 } }]), vertexShader: ti.shadow_vert, fragmentShader: ti.shadow_frag } };
|
|
7799
|
+
const ti = { alphamap_fragment: "#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif", alphatest_fragment: "#ifdef ALPHATEST\n if ( diffuseColor.a < ALPHATEST ) discard;\n#endif", aomap_fragment: "#ifdef USE_AOMAP\n float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n reflectedLight.indirectDiffuse *= ambientOcclusion;\n #if defined( USE_ENVMAP ) && defined( STANDARD )\n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n #endif\n#endif", aomap_pars_fragment: "#ifdef USE_AOMAP\n uniform sampler2D aoMap;\n uniform float aoMapIntensity;\n#endif", begin_vertex: "vec3 transformed = vec3( position );", beginnormal_vertex: "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n vec3 objectTangent = vec3( tangent.xyz );\n#endif", bsdfs: "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n return vec2( -1.04, 1.04 ) * a004 + r.zw;\n}\nfloat punctualLightIntensityToIrradianceFactor( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n#else\n if( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n return pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n }\n return 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotVH ) {\n float fresnel = exp2( ( -5.55473 * dotVH - 6.98316 ) * dotVH );\n return ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n float fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n vec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n return Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n float gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n return 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_Specular_GGX( const in IncidentLight incidentLight, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( incidentLight.direction + viewDir );\n float dotNL = saturate( dot( normal, incidentLight.direction ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n vec3 F = F_Schlick( specularColor, dotLH );\n float G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\nvec3 BRDF_Specular_GGX_Environment( const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n vec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n return specularColor * brdf.x + brdf.y;\n}\nvoid BRDF_Specular_Multiscattering_Environment( const in GeometricContext geometry, const in vec3 specularColor, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n vec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n vec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n vec3 FssEss = F * brdf.x + brdf.y;\n float Ess = brdf.x + brdf.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n return 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_Specular_BlinnPhong( const in IncidentLight incidentLight, const in GeometricContext geometry, const in vec3 specularColor, const in float shininess ) {\n vec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n float dotNH = saturate( dot( geometry.normal, halfDir ) );\n float dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n vec3 F = F_Schlick( specularColor, dotLH );\n float G = G_BlinnPhong_Implicit( );\n float D = D_BlinnPhong( shininess, dotNH );\n return F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n return ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n return sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n float invAlpha = 1.0 / roughness;\n float cos2h = NoH * NoH;\n float sin2h = max(1.0 - cos2h, 0.0078125); return (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n return saturate(1.0 / (4.0 * (NoL + NoV - NoL * NoV)));\n}\nvec3 BRDF_Specular_Sheen( const in float roughness, const in vec3 L, const in GeometricContext geometry, vec3 specularColor ) {\n vec3 N = geometry.normal;\n vec3 V = geometry.viewDir;\n vec3 H = normalize( V + L );\n float dotNH = saturate( dot( N, H ) );\n return specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n uniform sampler2D bumpMap;\n uniform float bumpScale;\n vec2 dHdxy_fwd() {\n vec2 dSTdx = dFdx( vUv );\n vec2 dSTdy = dFdy( vUv );\n float Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n return vec2( dBx, dBy );\n }\n vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n vec3 vN = surf_norm;\n vec3 R1 = cross( vSigmaY, vN );\n vec3 R2 = cross( vN, vSigmaX );\n float fDet = dot( vSigmaX, R1 ) * faceDirection;\n vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n return normalize( abs( fDet ) * surf_norm - vGrad );\n }\n#endif", clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n vec4 plane;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n#endif", clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif", clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif", clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif", color_fragment: "#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif", color_pars_fragment: "#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif", color_pars_vertex: "#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n varying vec3 vColor;\n#endif", color_vertex: "#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif", common: "#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement(a) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\nstruct GeometricContext {\n vec3 position;\n vec3 normal;\n vec3 viewDir;\n#ifdef CLEARCOAT\n vec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n float distance = dot( planeNormal, point - pointOnPlane );\n return - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n return sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n return lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n return dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}", cube_uv_reflection_fragment: "#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_maxMipLevel 8.0\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_maxTileSize 256.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 );\n vec2 f = fract( uv );\n uv += 0.5 - f;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n if ( mipInt < cubeUV_maxMipLevel ) {\n uv.y += 2.0 * cubeUV_maxTileSize;\n }\n uv.y += filterInt * 2.0 * cubeUV_minTileSize;\n uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n uv *= texelSize;\n vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.x += texelSize;\n vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.y += texelSize;\n vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n uv.x -= texelSize;\n vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb;\n vec3 tm = mix( tl, tr, f.x );\n vec3 bm = mix( bl, br, f.x );\n return mix( tm, bm, f.y );\n }\n #define r0 1.0\n #define v0 0.339\n #define m0 - 2.0\n #define r1 0.8\n #define v1 0.276\n #define m1 - 1.0\n #define r4 0.4\n #define v4 0.046\n #define m4 2.0\n #define r5 0.305\n #define v5 0.016\n #define m5 3.0\n #define r6 0.21\n #define v6 0.0038\n #define m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= r1 ) {\n mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n } else if ( roughness >= r4 ) {\n mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n } else if ( roughness >= r5 ) {\n mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n } else if ( roughness >= r6 ) {\n mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif", defaultnormal_vertex: "vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n mat3 m = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n transformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif", displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif", displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif", emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vUv );\n emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif", emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif", encodings_fragment: "gl_FragColor = linearToOutputTexel( gl_FragColor );", encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n return value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 LinearTosRGB( in vec4 value ) {\n 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 );\n}\nvec4 RGBEToLinear( in vec4 value ) {\n return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n float maxComponent = max( max( value.r, value.g ), value.b );\n float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.r, max( value.g, value.b ) );\n float M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n M = ceil( M * 255.0 ) / 255.0;\n return vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n float maxRGB = max( value.r, max( value.g, value.b ) );\n float D = max( maxRange / maxRGB, 1.0 );\n D = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D );\n}\nconst mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 );\nvec4 LinearToLogLuv( in vec4 value ) {\n vec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n vec4 vResult;\n vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n vResult.w = fract( Le );\n vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n return vResult;\n}\nconst mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 );\nvec4 LogLuvToLinear( in vec4 value ) {\n float Le = value.z * 255.0 + value.w;\n vec3 Xp_Y_XYZp;\n Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n return vec4( max( vRGB, 0.0 ), 1.0 );\n}", envmap_fragment: "#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifndef ENVMAP_TYPE_CUBE_UV\n envColor = envMapTexelToLinear( envColor );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif", envmap_common_pars_fragment: "#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform int maxMipLevel;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif", envmap_pars_fragment: "#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif", envmap_pars_vertex: "#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif", envmap_physical_pars_fragment: "#if defined( USE_ENVMAP )\n #ifdef ENVMAP_MODE_REFRACTION\n uniform float refractionRatio;\n #endif\n vec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n #ifdef ENVMAP_TYPE_CUBE\n vec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n #ifdef TEXTURE_LOD_EXT\n vec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n #else\n vec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n #endif\n envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n #else\n vec4 envMapColor = vec4( 0.0 );\n #endif\n return PI * envMapColor.rgb * envMapIntensity;\n }\n float getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n float maxMIPLevelScalar = float( maxMIPLevel );\n float sigma = PI * roughness * roughness / ( 1.0 + roughness );\n float desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n return clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n }\n vec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( -viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n #else\n vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n #endif\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n float specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n #ifdef ENVMAP_TYPE_CUBE\n vec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n #ifdef TEXTURE_LOD_EXT\n vec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n #else\n vec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n #endif\n envMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n #endif\n return envMapColor.rgb * envMapIntensity;\n }\n#endif", envmap_vertex: "#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif", fog_vertex: "#ifdef USE_FOG\n fogDepth = - mvPosition.z;\n#endif", fog_pars_vertex: "#ifdef USE_FOG\n varying float fogDepth;\n#endif", fog_fragment: "#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif", fog_pars_fragment: "#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float fogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif", gradientmap_pars_fragment: "#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return texture2D( gradientMap, coord ).rgb;\n #else\n return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n #endif\n}", lightmap_fragment: "#ifdef USE_LIGHTMAP\n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n reflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif", lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif", lights_lambert_vertex: "vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n vLightBack = vec3( 0.0 );\n vIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry );\n#ifdef DOUBLE_SIDED\n vIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry );\n#endif\n#if NUM_POINT_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n getPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n getSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n getDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n dotNL = dot( geometry.normal, directLight.direction );\n directLightColor_Diffuse = PI * directLight.color;\n vLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n #ifdef DOUBLE_SIDED\n vLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n #endif\n }\n #pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n #ifdef DOUBLE_SIDED\n vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n #endif\n }\n #pragma unroll_loop_end\n#endif", lights_pars_begin: "uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n vec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n return irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n directLight.color = directionalLight.color;\n directLight.direction = directionalLight.direction;\n directLight.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = pointLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n directLight.color = pointLight.color;\n directLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n directLight.visible = ( directLight.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n vec3 lVector = spotLight.position - geometry.position;\n directLight.direction = normalize( lVector );\n float lightDistance = length( lVector );\n float angleCos = dot( directLight.direction, spotLight.direction );\n if ( angleCos > spotLight.coneCos ) {\n float spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n directLight.color = spotLight.color;\n directLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n directLight.visible = true;\n } else {\n directLight.color = vec3( 0.0 );\n directLight.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n float dotNL = dot( geometry.normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n return irradiance;\n }\n#endif", lights_toon_fragment: "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;", lights_toon_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material ) (0)", lights_phong_fragment: "BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;", lights_phong_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n reflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material ) (0)", lights_physical_fragment: "PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.specularRoughness = max( roughnessFactor, 0.0525 );material.specularRoughness += geometryRoughness;\nmaterial.specularRoughness = min( material.specularRoughness, 1.0 );\n#ifdef REFLECTIVITY\n material.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheen;\n#endif", lights_physical_pars_fragment: "struct PhysicalMaterial {\n vec3 diffuseColor;\n float specularRoughness;\n vec3 specularColor;\n#ifdef CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n vec3 sheenColor;\n#endif\n};\n#define MAXIMUM_SPECULAR_COEFFICIENT 0.16\n#define DEFAULT_SPECULAR_COEFFICIENT 0.04\nfloat clearcoatDHRApprox( const in float roughness, const in float dotNL ) {\n return DEFAULT_SPECULAR_COEFFICIENT + ( 1.0 - DEFAULT_SPECULAR_COEFFICIENT ) * ( pow( 1.0 - dotNL, 5.0 ) * pow( 1.0 - roughness, 2.0 ) );\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometry.normal;\n vec3 viewDir = geometry.viewDir;\n vec3 position = geometry.position;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.specularRoughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n irradiance *= PI;\n #endif\n #ifdef CLEARCOAT\n float ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = ccDotNL * directLight.color;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n ccIrradiance *= PI;\n #endif\n float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n reflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n #else\n float clearcoatDHR = 0.0;\n #endif\n #ifdef USE_SHEEN\n reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n material.specularRoughness,\n directLight.direction,\n geometry,\n material.sheenColor\n );\n #else\n reflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n #endif\n reflectedLight.directDiffuse += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef CLEARCOAT\n float ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n reflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n float ccDotNL = ccDotNV;\n float clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n #else\n float clearcoatDHR = 0.0;\n #endif\n float clearcoatInv = 1.0 - clearcoatDHR;\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n BRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n reflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}", lights_fragment_begin: "\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef CLEARCOAT\n geometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointDirectLightIrradiance( pointLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotDirectLightIrradiance( spotLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n irradiance += getLightProbeIrradiance( lightProbe, geometry );\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif", lights_fragment_maps: "#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n #ifndef PHYSICALLY_CORRECT_LIGHTS\n lightMapIrradiance *= PI;\n #endif\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n radiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n #ifdef CLEARCOAT\n clearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n #endif\n#endif", lights_fragment_end: "#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif", logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif", logdepthbuf_pars_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif", logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n varying float vFragDepth;\n varying float vIsPerspective;\n #else\n uniform float logDepthBufFC;\n #endif\n#endif", logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n #ifdef USE_LOGDEPTHBUF_EXT\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n #else\n if ( isPerspectiveMatrix( projectionMatrix ) ) {\n gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n gl_Position.z *= gl_Position.w;\n }\n #endif\n#endif", map_fragment: "#ifdef USE_MAP\n vec4 texelColor = texture2D( map, vUv );\n texelColor = mapTexelToLinear( texelColor );\n diffuseColor *= texelColor;\n#endif", map_pars_fragment: "#ifdef USE_MAP\n uniform sampler2D map;\n#endif", map_particle_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n vec4 mapTexel = texture2D( map, uv );\n diffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif", map_particle_pars_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif", metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vUv );\n metalnessFactor *= texelMetalness.b;\n#endif", metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif", morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif", morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n uniform float morphTargetBaseInfluence;\n #ifndef USE_MORPHNORMALS\n uniform float morphTargetInfluences[ 8 ];\n #else\n uniform float morphTargetInfluences[ 4 ];\n #endif\n#endif", morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n transformed += morphTarget0 * morphTargetInfluences[ 0 ];\n transformed += morphTarget1 * morphTargetInfluences[ 1 ];\n transformed += morphTarget2 * morphTargetInfluences[ 2 ];\n transformed += morphTarget3 * morphTargetInfluences[ 3 ];\n #ifndef USE_MORPHNORMALS\n transformed += morphTarget4 * morphTargetInfluences[ 4 ];\n transformed += morphTarget5 * morphTargetInfluences[ 5 ];\n transformed += morphTarget6 * morphTargetInfluences[ 6 ];\n transformed += morphTarget7 * morphTargetInfluences[ 7 ];\n #endif\n#endif", normal_fragment_begin: "float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n #ifdef USE_TANGENT\n vec3 tangent = normalize( vTangent );\n vec3 bitangent = normalize( vBitangent );\n #ifdef DOUBLE_SIDED\n tangent = tangent * faceDirection;\n bitangent = bitangent * faceDirection;\n #endif\n #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n mat3 vTBN = mat3( tangent, bitangent, normal );\n #endif\n #endif\n#endif\nvec3 geometryNormal = normal;", normal_fragment_maps: "#ifdef OBJECTSPACE_NORMALMAP\n normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n #ifdef USE_TANGENT\n normal = normalize( vTBN * mapN );\n #else\n normal = perturbNormal2Arb( -vViewPosition, normal, mapN, faceDirection );\n #endif\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif", normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n vec2 st0 = dFdx( vUv.st );\n vec2 st1 = dFdy( vUv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n }\n#endif", clearcoat_normal_fragment_begin: "#ifdef CLEARCOAT\n vec3 clearcoatNormal = geometryNormal;\n#endif", clearcoat_normal_fragment_maps: "#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n #ifdef USE_TANGENT\n clearcoatNormal = normalize( vTBN * clearcoatMapN );\n #else\n clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n #endif\n#endif", clearcoat_pars_fragment: "#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif", packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n vec4 r = vec4( fract( v * PackFactors ), v );\n r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n return linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * invClipZ - far );\n}", premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif", project_vertex: "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;", dithering_fragment: "#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif", dithering_pars_fragment: "#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif", roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n roughnessFactor *= texelRoughness.g;\n#endif", roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif", shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n bool inFrustum = all( inFrustumVec );\n bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n bool frustumTest = all( frustumTestVec );\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return shadow;\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n vec3 lightToPosition = shadowCoord.xyz;\n float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n return (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n#endif", shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif", shadowmap_vertex: "#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n #endif\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif", shadowmask_pars_fragment: "float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}", skinbase_vertex: "#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif", skinning_pars_vertex: "#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n #ifdef BONE_TEXTURE\n uniform highp sampler2D boneTexture;\n uniform int boneTextureSize;\n mat4 getBoneMatrix( const in float i ) {\n float j = i * 4.0;\n float x = mod( j, float( boneTextureSize ) );\n float y = floor( j / float( boneTextureSize ) );\n float dx = 1.0 / float( boneTextureSize );\n float dy = 1.0 / float( boneTextureSize );\n y = dy * ( y + 0.5 );\n vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n mat4 bone = mat4( v1, v2, v3, v4 );\n return bone;\n }\n #else\n uniform mat4 boneMatrices[ MAX_BONES ];\n mat4 getBoneMatrix( const in float i ) {\n mat4 bone = boneMatrices[ int(i) ];\n return bone;\n }\n #endif\n#endif", skinning_vertex: "#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif", skinnormal_vertex: "#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif", specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif", specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif", tonemapping_fragment: "#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif", tonemapping_pars_fragment: "#ifndef saturate\n#define saturate(a) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }", transmission_fragment: "#ifdef USE_TRANSMISSION\n float transmissionFactor = transmission;\n float thicknessFactor = thickness;\n #ifdef USE_TRANSMISSIONMAP\n transmissionFactor *= texture2D( transmissionMap, vUv ).r;\n #endif\n #ifdef USE_THICKNESSNMAP\n thicknessFactor *= texture2D( thicknessMap, vUv ).g;\n #endif\n vec3 pos = vWorldPosition.xyz / vWorldPosition.w;\n vec3 v = normalize( cameraPosition - pos );\n float ior = ( 1.0 + 0.4 * reflectivity ) / ( 1.0 - 0.4 * reflectivity );\n vec3 transmission = transmissionFactor * getIBLVolumeRefraction(\n normal, v, roughnessFactor, material.diffuseColor, totalSpecular,\n pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n attenuationColor, attenuationDistance );\n totalDiffuse = mix( totalDiffuse, transmission, transmissionFactor );\n#endif", transmission_pars_fragment: "#ifdef USE_TRANSMISSION\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec4 vWorldPosition;\n vec3 getVolumeTransmissionRay(vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix) {\n vec3 refractionVector = refract(-v, normalize(n), 1.0 / ior);\n vec3 modelScale;\n modelScale.x = length(vec3(modelMatrix[0].xyz));\n modelScale.y = length(vec3(modelMatrix[1].xyz));\n modelScale.z = length(vec3(modelMatrix[2].xyz));\n return normalize(refractionVector) * thickness * modelScale;\n }\n float applyIorToRoughness(float roughness, float ior) {\n return roughness * clamp(ior * 2.0 - 2.0, 0.0, 1.0);\n }\n vec3 getTransmissionSample(vec2 fragCoord, float roughness, float ior) {\n float framebufferLod = log2(transmissionSamplerSize.x) * applyIorToRoughness(roughness, ior);\n return texture2DLodEXT(transmissionSamplerMap, fragCoord.xy, framebufferLod).rgb;\n }\n vec3 applyVolumeAttenuation(vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance) {\n if (attenuationDistance == 0.0) {\n return radiance;\n } else {\n vec3 attenuationCoefficient = -log(attenuationColor) / attenuationDistance;\n vec3 transmittance = exp(-attenuationCoefficient * transmissionDistance); return transmittance * radiance;\n }\n }\n vec3 getIBLVolumeRefraction(vec3 n, vec3 v, float perceptualRoughness, vec3 baseColor, vec3 specularColor,\n vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness,\n vec3 attenuationColor, float attenuationDistance) {\n vec3 transmissionRay = getVolumeTransmissionRay(n, v, thickness, ior, modelMatrix);\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4(refractedRayExit, 1.0);\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec3 transmittedLight = getTransmissionSample(refractionCoords, perceptualRoughness, ior);\n vec3 attenuatedColor = applyVolumeAttenuation(transmittedLight, length(transmissionRay), attenuationColor, attenuationDistance);\n return (1.0 - specularColor) * attenuatedColor * baseColor;\n }\n#endif", uv_pars_fragment: "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n varying vec2 vUv;\n#endif", uv_pars_vertex: "#ifdef USE_UV\n #ifdef UVS_VERTEX_ONLY\n vec2 vUv;\n #else\n varying vec2 vUv;\n #endif\n uniform mat3 uvTransform;\n#endif", uv_vertex: "#ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif", uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n varying vec2 vUv2;\n#endif", uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n attribute vec2 uv2;\n varying vec2 vUv2;\n uniform mat3 uv2Transform;\n#endif", uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif", worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif", background_frag: "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n gl_FragColor = mapTexelToLinear( texColor );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", background_vert: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}", cube_frag: "#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n vec3 vReflect = vWorldDirection;\n #include <envmap_fragment>\n gl_FragColor = envColor;\n gl_FragColor.a *= opacity;\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", cube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n gl_Position.z = gl_Position.w;\n}", depth_frag: "#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( 1.0 );\n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <logdepthbuf_fragment>\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #endif\n}", depth_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vHighPrecisionZW = gl_Position.zw;\n}", distanceRGBA_frag: "#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( 1.0 );\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}", distanceRGBA_vert: "#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <skinbase_vertex>\n #ifdef USE_DISPLACEMENTMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n vWorldPosition = worldPosition.xyz;\n}", equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n vec4 texColor = texture2D( tEquirect, sampleUV );\n gl_FragColor = mapTexelToLinear( texColor );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n}", equirect_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include <begin_vertex>\n #include <project_vertex>\n}", linedashed_frag: "uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <color_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}", linedashed_vert: "uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n vLineDistance = scale * lineDistance;\n #include <color_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}", meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n \n vec4 lightMapTexel= texture2D( lightMap, vUv2 );\n reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include <aomap_fragment>\n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshbasic_vert: "#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <skinbase_vertex>\n #ifdef USE_ENVMAP\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <worldpos_vertex>\n #include <clipping_planes_vertex>\n #include <envmap_vertex>\n #include <fog_vertex>\n}", meshlambert_frag: "uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n varying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n #include <emissivemap_fragment>\n #ifdef DOUBLE_SIDED\n reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n #else\n reflectedLight.indirectDiffuse += vIndirectFront;\n #endif\n #include <lightmap_fragment>\n reflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n #ifdef DOUBLE_SIDED\n reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n #else\n reflectedLight.directDiffuse = vLightFront;\n #endif\n reflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n varying vec3 vLightBack;\n varying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <lights_lambert_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshmatcap_frag: "#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n matcapColor = matcapTexelToLinear( matcapColor );\n #else\n vec4 matcapColor = vec4( 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshmatcap_vert: "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n vViewPosition = - mvPosition.xyz;\n}", meshtoon_frag: "#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_toon_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshtoon_vert: "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshphong_frag: "#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <specularmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_phong_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include <envmap_fragment>\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <envmap_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", meshphysical_frag: "#define STANDARD\n#ifdef PHYSICAL\n #define REFLECTIVITY\n #define CLEARCOAT\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform vec3 attenuationColor;\n uniform float attenuationDistance;\n#endif\n#ifdef REFLECTIVITY\n uniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <transmission_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <lights_physical_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec4 diffuseColor = vec4( diffuse, opacity );\n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <color_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n #include <roughnessmap_fragment>\n #include <metalnessmap_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n #include <clearcoat_normal_fragment_begin>\n #include <clearcoat_normal_fragment_maps>\n #include <emissivemap_fragment>\n #include <lights_physical_fragment>\n #include <lights_fragment_begin>\n #include <lights_fragment_maps>\n #include <lights_fragment_end>\n #include <aomap_fragment>\n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include <transmission_fragment>\n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n #include <dithering_fragment>\n}", meshphysical_vert: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#ifdef USE_TRANSMISSION\n varying vec4 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <uv2_vertex>\n #include <color_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n vViewPosition = - mvPosition.xyz;\n #include <worldpos_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition;\n#endif\n}", normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n #include <logdepthbuf_fragment>\n #include <normal_fragment_begin>\n #include <normal_fragment_maps>\n gl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}", normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n varying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <skinning_vertex>\n #include <displacementmap_vertex>\n #include <project_vertex>\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n vViewPosition = - mvPosition.xyz;\n#endif\n}", points_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_particle_fragment>\n #include <color_fragment>\n #include <alphatest_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n #include <premultiplied_alpha_fragment>\n}", points_vert: "uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <color_vertex>\n #include <begin_vertex>\n #include <morphtarget_vertex>\n #include <project_vertex>\n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <worldpos_vertex>\n #include <fog_vertex>\n}", shadow_frag: "uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n}", shadow_vert: "#include <common>\n#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n #include <begin_vertex>\n #include <project_vertex>\n #include <worldpos_vertex>\n #include <beginnormal_vertex>\n #include <morphnormal_vertex>\n #include <skinbase_vertex>\n #include <skinnormal_vertex>\n #include <defaultnormal_vertex>\n #include <shadowmap_vertex>\n #include <fog_vertex>\n}", sprite_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n #include <clipping_planes_fragment>\n vec3 outgoingLight = vec3( 0.0 );\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include <logdepthbuf_fragment>\n #include <map_fragment>\n #include <alphamap_fragment>\n #include <alphatest_fragment>\n outgoingLight = diffuseColor.rgb;\n gl_FragColor = vec4( outgoingLight, diffuseColor.a );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n #include <fog_fragment>\n}", sprite_vert: "uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n #include <uv_vertex>\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include <logdepthbuf_vertex>\n #include <clipping_planes_vertex>\n #include <fog_vertex>\n}" }, ei = { common: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, map: { value: null }, uvTransform: { value: new y() }, uv2Transform: { value: new y() }, alphaMap: { value: null } }, specularmap: { specularMap: { value: null } }, envmap: { envMap: { value: null }, flipEnvMap: { value: -1 }, reflectivity: { value: 1 }, refractionRatio: { value: 0.98 }, maxMipLevel: { value: 0 } }, aomap: { aoMap: { value: null }, aoMapIntensity: { value: 1 } }, lightmap: { lightMap: { value: null }, lightMapIntensity: { value: 1 } }, emissivemap: { emissiveMap: { value: null } }, bumpmap: { bumpMap: { value: null }, bumpScale: { value: 1 } }, normalmap: { normalMap: { value: null }, normalScale: { value: new _(1, 1) } }, displacementmap: { displacementMap: { value: null }, displacementScale: { value: 1 }, displacementBias: { value: 0 } }, roughnessmap: { roughnessMap: { value: null } }, metalnessmap: { metalnessMap: { value: null } }, gradientmap: { gradientMap: { value: null } }, fog: { fogDensity: { value: 25e-5 }, fogNear: { value: 1 }, fogFar: { value: 2e3 }, fogColor: { value: new Kt(16777215) } }, lights: { ambientLightColor: { value: [] }, lightProbe: { value: [] }, directionalLights: { value: [], properties: { direction: {}, color: {} } }, directionalLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} } }, directionalShadowMap: { value: [] }, directionalShadowMatrix: { value: [] }, spotLights: { value: [], properties: { color: {}, position: {}, direction: {}, distance: {}, coneCos: {}, penumbraCos: {}, decay: {} } }, spotLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {} } }, spotShadowMap: { value: [] }, spotShadowMatrix: { value: [] }, pointLights: { value: [], properties: { color: {}, position: {}, decay: {}, distance: {} } }, pointLightShadows: { value: [], properties: { shadowBias: {}, shadowNormalBias: {}, shadowRadius: {}, shadowMapSize: {}, shadowCameraNear: {}, shadowCameraFar: {} } }, pointShadowMap: { value: [] }, pointShadowMatrix: { value: [] }, hemisphereLights: { value: [], properties: { direction: {}, skyColor: {}, groundColor: {} } }, rectAreaLights: { value: [], properties: { color: {}, position: {}, width: {}, height: {} } }, ltc_1: { value: null }, ltc_2: { value: null } }, points: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, size: { value: 1 }, scale: { value: 1 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new y() } }, sprite: { diffuse: { value: new Kt(16777215) }, opacity: { value: 1 }, center: { value: new _(0.5, 0.5) }, rotation: { value: 0 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new y() } } }, ii = { basic: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.fog]), vertexShader: ti.meshbasic_vert, fragmentShader: ti.meshbasic_frag }, lambert: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.fog, ei.lights, { emissive: { value: new Kt(0) } }]), vertexShader: ti.meshlambert_vert, fragmentShader: ti.meshlambert_frag }, phong: { uniforms: Fe([ei.common, ei.specularmap, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) }, specular: { value: new Kt(1118481) }, shininess: { value: 30 } }]), vertexShader: ti.meshphong_vert, fragmentShader: ti.meshphong_frag }, standard: { uniforms: Fe([ei.common, ei.envmap, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.roughnessmap, ei.metalnessmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) }, roughness: { value: 1 }, metalness: { value: 0 }, envMapIntensity: { value: 1 } }]), vertexShader: ti.meshphysical_vert, fragmentShader: ti.meshphysical_frag }, toon: { uniforms: Fe([ei.common, ei.aomap, ei.lightmap, ei.emissivemap, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.gradientmap, ei.fog, ei.lights, { emissive: { value: new Kt(0) } }]), vertexShader: ti.meshtoon_vert, fragmentShader: ti.meshtoon_frag }, matcap: { uniforms: Fe([ei.common, ei.bumpmap, ei.normalmap, ei.displacementmap, ei.fog, { matcap: { value: null } }]), vertexShader: ti.meshmatcap_vert, fragmentShader: ti.meshmatcap_frag }, points: { uniforms: Fe([ei.points, ei.fog]), vertexShader: ti.points_vert, fragmentShader: ti.points_frag }, dashed: { uniforms: Fe([ei.common, ei.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: ti.linedashed_vert, fragmentShader: ti.linedashed_frag }, depth: { uniforms: Fe([ei.common, ei.displacementmap]), vertexShader: ti.depth_vert, fragmentShader: ti.depth_frag }, normal: { uniforms: Fe([ei.common, ei.bumpmap, ei.normalmap, ei.displacementmap, { opacity: { value: 1 } }]), vertexShader: ti.normal_vert, fragmentShader: ti.normal_frag }, sprite: { uniforms: Fe([ei.sprite, ei.fog]), vertexShader: ti.sprite_vert, fragmentShader: ti.sprite_frag }, background: { uniforms: { uvTransform: { value: new y() }, t2D: { value: null } }, vertexShader: ti.background_vert, fragmentShader: ti.background_frag }, cube: { uniforms: Fe([ei.envmap, { opacity: { value: 1 } }]), vertexShader: ti.cube_vert, fragmentShader: ti.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: ti.equirect_vert, fragmentShader: ti.equirect_frag }, distanceRGBA: { uniforms: Fe([ei.common, ei.displacementmap, { referencePosition: { value: new I() }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: ti.distanceRGBA_vert, fragmentShader: ti.distanceRGBA_frag }, shadow: { uniforms: Fe([ei.lights, ei.fog, { color: { value: new Kt(0) }, opacity: { value: 1 } }]), vertexShader: ti.shadow_vert, fragmentShader: ti.shadow_frag } };
|
|
7800
7800
|
function ni(t2, e2, i2, n2, r2) {
|
|
7801
7801
|
const s2 = new Kt(0);
|
|
7802
7802
|
let o2, a2, l2 = 0, h2 = null, c2 = 0, u2 = null;
|
|
@@ -8325,7 +8325,7 @@ var Slide = function(t) {
|
|
|
8325
8325
|
}
|
|
8326
8326
|
return s2;
|
|
8327
8327
|
}
|
|
8328
|
-
function
|
|
8328
|
+
function Ii(t2, e2) {
|
|
8329
8329
|
if (t2.length !== e2.length)
|
|
8330
8330
|
return false;
|
|
8331
8331
|
for (let i2 = 0, n2 = t2.length; i2 < n2; i2++)
|
|
@@ -8333,7 +8333,7 @@ var Slide = function(t) {
|
|
|
8333
8333
|
return false;
|
|
8334
8334
|
return true;
|
|
8335
8335
|
}
|
|
8336
|
-
function
|
|
8336
|
+
function Ri(t2, e2) {
|
|
8337
8337
|
for (let i2 = 0, n2 = e2.length; i2 < n2; i2++)
|
|
8338
8338
|
t2[i2] = e2[i2];
|
|
8339
8339
|
}
|
|
@@ -8353,9 +8353,9 @@ var Slide = function(t) {
|
|
|
8353
8353
|
if (e2.x !== void 0)
|
|
8354
8354
|
i2[0] === e2.x && i2[1] === e2.y || (t2.uniform2f(this.addr, e2.x, e2.y), i2[0] = e2.x, i2[1] = e2.y);
|
|
8355
8355
|
else {
|
|
8356
|
-
if (
|
|
8356
|
+
if (Ii(i2, e2))
|
|
8357
8357
|
return;
|
|
8358
|
-
t2.uniform2fv(this.addr, e2),
|
|
8358
|
+
t2.uniform2fv(this.addr, e2), Ri(i2, e2);
|
|
8359
8359
|
}
|
|
8360
8360
|
}
|
|
8361
8361
|
function Oi(t2, e2) {
|
|
@@ -8365,9 +8365,9 @@ var Slide = function(t) {
|
|
|
8365
8365
|
else if (e2.r !== void 0)
|
|
8366
8366
|
i2[0] === e2.r && i2[1] === e2.g && i2[2] === e2.b || (t2.uniform3f(this.addr, e2.r, e2.g, e2.b), i2[0] = e2.r, i2[1] = e2.g, i2[2] = e2.b);
|
|
8367
8367
|
else {
|
|
8368
|
-
if (
|
|
8368
|
+
if (Ii(i2, e2))
|
|
8369
8369
|
return;
|
|
8370
|
-
t2.uniform3fv(this.addr, e2),
|
|
8370
|
+
t2.uniform3fv(this.addr, e2), Ri(i2, e2);
|
|
8371
8371
|
}
|
|
8372
8372
|
}
|
|
8373
8373
|
function Di(t2, e2) {
|
|
@@ -8375,45 +8375,45 @@ var Slide = function(t) {
|
|
|
8375
8375
|
if (e2.x !== void 0)
|
|
8376
8376
|
i2[0] === e2.x && i2[1] === e2.y && i2[2] === e2.z && i2[3] === e2.w || (t2.uniform4f(this.addr, e2.x, e2.y, e2.z, e2.w), i2[0] = e2.x, i2[1] = e2.y, i2[2] = e2.z, i2[3] = e2.w);
|
|
8377
8377
|
else {
|
|
8378
|
-
if (
|
|
8378
|
+
if (Ii(i2, e2))
|
|
8379
8379
|
return;
|
|
8380
|
-
t2.uniform4fv(this.addr, e2),
|
|
8380
|
+
t2.uniform4fv(this.addr, e2), Ri(i2, e2);
|
|
8381
8381
|
}
|
|
8382
8382
|
}
|
|
8383
8383
|
function Fi(t2, e2) {
|
|
8384
8384
|
const i2 = this.cache, n2 = e2.elements;
|
|
8385
8385
|
if (n2 === void 0) {
|
|
8386
|
-
if (
|
|
8386
|
+
if (Ii(i2, e2))
|
|
8387
8387
|
return;
|
|
8388
|
-
t2.uniformMatrix2fv(this.addr, false, e2),
|
|
8388
|
+
t2.uniformMatrix2fv(this.addr, false, e2), Ri(i2, e2);
|
|
8389
8389
|
} else {
|
|
8390
|
-
if (
|
|
8390
|
+
if (Ii(i2, n2))
|
|
8391
8391
|
return;
|
|
8392
|
-
Ai.set(n2), t2.uniformMatrix2fv(this.addr, false, Ai),
|
|
8392
|
+
Ai.set(n2), t2.uniformMatrix2fv(this.addr, false, Ai), Ri(i2, n2);
|
|
8393
8393
|
}
|
|
8394
8394
|
}
|
|
8395
8395
|
function Ui(t2, e2) {
|
|
8396
8396
|
const i2 = this.cache, n2 = e2.elements;
|
|
8397
8397
|
if (n2 === void 0) {
|
|
8398
|
-
if (
|
|
8398
|
+
if (Ii(i2, e2))
|
|
8399
8399
|
return;
|
|
8400
|
-
t2.uniformMatrix3fv(this.addr, false, e2),
|
|
8400
|
+
t2.uniformMatrix3fv(this.addr, false, e2), Ri(i2, e2);
|
|
8401
8401
|
} else {
|
|
8402
|
-
if (
|
|
8402
|
+
if (Ii(i2, n2))
|
|
8403
8403
|
return;
|
|
8404
|
-
Mi.set(n2), t2.uniformMatrix3fv(this.addr, false, Mi),
|
|
8404
|
+
Mi.set(n2), t2.uniformMatrix3fv(this.addr, false, Mi), Ri(i2, n2);
|
|
8405
8405
|
}
|
|
8406
8406
|
}
|
|
8407
8407
|
function ki(t2, e2) {
|
|
8408
8408
|
const i2 = this.cache, n2 = e2.elements;
|
|
8409
8409
|
if (n2 === void 0) {
|
|
8410
|
-
if (
|
|
8410
|
+
if (Ii(i2, e2))
|
|
8411
8411
|
return;
|
|
8412
|
-
t2.uniformMatrix4fv(this.addr, false, e2),
|
|
8412
|
+
t2.uniformMatrix4fv(this.addr, false, e2), Ri(i2, e2);
|
|
8413
8413
|
} else {
|
|
8414
|
-
if (
|
|
8414
|
+
if (Ii(i2, n2))
|
|
8415
8415
|
return;
|
|
8416
|
-
Si.set(n2), t2.uniformMatrix4fv(this.addr, false, Si),
|
|
8416
|
+
Si.set(n2), t2.uniformMatrix4fv(this.addr, false, Si), Ri(i2, n2);
|
|
8417
8417
|
}
|
|
8418
8418
|
}
|
|
8419
8419
|
function Bi(t2, e2) {
|
|
@@ -8422,15 +8422,15 @@ var Slide = function(t) {
|
|
|
8422
8422
|
}
|
|
8423
8423
|
function Gi(t2, e2) {
|
|
8424
8424
|
const i2 = this.cache;
|
|
8425
|
-
|
|
8425
|
+
Ii(i2, e2) || (t2.uniform2iv(this.addr, e2), Ri(i2, e2));
|
|
8426
8426
|
}
|
|
8427
8427
|
function Hi(t2, e2) {
|
|
8428
8428
|
const i2 = this.cache;
|
|
8429
|
-
|
|
8429
|
+
Ii(i2, e2) || (t2.uniform3iv(this.addr, e2), Ri(i2, e2));
|
|
8430
8430
|
}
|
|
8431
8431
|
function ji(t2, e2) {
|
|
8432
8432
|
const i2 = this.cache;
|
|
8433
|
-
|
|
8433
|
+
Ii(i2, e2) || (t2.uniform4iv(this.addr, e2), Ri(i2, e2));
|
|
8434
8434
|
}
|
|
8435
8435
|
function zi(t2, e2) {
|
|
8436
8436
|
const i2 = this.cache;
|
|
@@ -8438,15 +8438,15 @@ var Slide = function(t) {
|
|
|
8438
8438
|
}
|
|
8439
8439
|
function Vi(t2, e2) {
|
|
8440
8440
|
const i2 = this.cache;
|
|
8441
|
-
|
|
8441
|
+
Ii(i2, e2) || (t2.uniform2uiv(this.addr, e2), Ri(i2, e2));
|
|
8442
8442
|
}
|
|
8443
8443
|
function Wi(t2, e2) {
|
|
8444
8444
|
const i2 = this.cache;
|
|
8445
|
-
|
|
8445
|
+
Ii(i2, e2) || (t2.uniform3uiv(this.addr, e2), Ri(i2, e2));
|
|
8446
8446
|
}
|
|
8447
8447
|
function Xi(t2, e2) {
|
|
8448
8448
|
const i2 = this.cache;
|
|
8449
|
-
|
|
8449
|
+
Ii(i2, e2) || (t2.uniform4uiv(this.addr, e2), Ri(i2, e2));
|
|
8450
8450
|
}
|
|
8451
8451
|
function Yi(t2, e2, i2) {
|
|
8452
8452
|
const n2 = this.cache, r2 = i2.allocateTextureUnit();
|
|
@@ -8643,7 +8643,7 @@ var Slide = function(t) {
|
|
|
8643
8643
|
}
|
|
8644
8644
|
gn.prototype.updateCache = function(t2) {
|
|
8645
8645
|
const e2 = this.cache;
|
|
8646
|
-
t2 instanceof Float32Array && e2.length !== t2.length && (this.cache = new Float32Array(t2.length)),
|
|
8646
|
+
t2 instanceof Float32Array && e2.length !== t2.length && (this.cache = new Float32Array(t2.length)), Ri(e2, t2);
|
|
8647
8647
|
}, vn.prototype.setValue = function(t2, e2, i2) {
|
|
8648
8648
|
const n2 = this.seq;
|
|
8649
8649
|
for (let r2 = 0, s2 = n2.length; r2 !== s2; ++r2) {
|
|
@@ -8767,10 +8767,10 @@ var Slide = function(t) {
|
|
|
8767
8767
|
}
|
|
8768
8768
|
return "vec3 " + t2 + "( vec3 color ) { return " + i2 + "ToneMapping( color ); }";
|
|
8769
8769
|
}
|
|
8770
|
-
function
|
|
8770
|
+
function In(t2) {
|
|
8771
8771
|
return t2 !== "";
|
|
8772
8772
|
}
|
|
8773
|
-
function
|
|
8773
|
+
function Rn(t2, e2) {
|
|
8774
8774
|
return t2.replace(/NUM_DIR_LIGHTS/g, e2.numDirLights).replace(/NUM_SPOT_LIGHTS/g, e2.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g, e2.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g, e2.numPointLights).replace(/NUM_HEMI_LIGHTS/g, e2.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g, e2.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g, e2.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g, e2.numPointLightShadows);
|
|
8775
8775
|
}
|
|
8776
8776
|
function Cn(t2, e2) {
|
|
@@ -8846,7 +8846,7 @@ var Slide = function(t) {
|
|
|
8846
8846
|
}
|
|
8847
8847
|
return e3;
|
|
8848
8848
|
}(i2), d2 = t2.gammaFactor > 0 ? t2.gammaFactor : 1, p2 = i2.isWebGL2 ? "" : function(t3) {
|
|
8849
|
-
return [t3.extensionDerivatives || t3.envMapCubeUV || t3.bumpMap || t3.tangentSpaceNormalMap || t3.clearcoatNormalMap || t3.flatShading || t3.shaderID === "physical" ? "#extension GL_OES_standard_derivatives : enable" : "", (t3.extensionFragDepth || t3.logarithmicDepthBuffer) && t3.rendererExtensionFragDepth ? "#extension GL_EXT_frag_depth : enable" : "", t3.extensionDrawBuffers && t3.rendererExtensionDrawBuffers ? "#extension GL_EXT_draw_buffers : require" : "", (t3.extensionShaderTextureLOD || t3.envMap || t3.transmission > 0) && t3.rendererExtensionShaderTextureLod ? "#extension GL_EXT_shader_texture_lod : enable" : ""].filter(
|
|
8849
|
+
return [t3.extensionDerivatives || t3.envMapCubeUV || t3.bumpMap || t3.tangentSpaceNormalMap || t3.clearcoatNormalMap || t3.flatShading || t3.shaderID === "physical" ? "#extension GL_OES_standard_derivatives : enable" : "", (t3.extensionFragDepth || t3.logarithmicDepthBuffer) && t3.rendererExtensionFragDepth ? "#extension GL_EXT_frag_depth : enable" : "", t3.extensionDrawBuffers && t3.rendererExtensionDrawBuffers ? "#extension GL_EXT_draw_buffers : require" : "", (t3.extensionShaderTextureLOD || t3.envMap || t3.transmission > 0) && t3.rendererExtensionShaderTextureLod ? "#extension GL_EXT_shader_texture_lod : enable" : ""].filter(In).join("\n");
|
|
8850
8850
|
}(i2), f2 = function(t3) {
|
|
8851
8851
|
const e3 = [];
|
|
8852
8852
|
for (const i3 in t3) {
|
|
@@ -8856,7 +8856,7 @@ var Slide = function(t) {
|
|
|
8856
8856
|
return e3.join("\n");
|
|
8857
8857
|
}(s2), m2 = r2.createProgram();
|
|
8858
8858
|
let g2, v2, _2 = i2.glslVersion ? "#version " + i2.glslVersion + "\n" : "";
|
|
8859
|
-
i2.isRawShaderMaterial ? (g2 = [f2].filter(
|
|
8859
|
+
i2.isRawShaderMaterial ? (g2 = [f2].filter(In).join("\n"), g2.length > 0 && (g2 += "\n"), v2 = [p2, f2].filter(In).join("\n"), v2.length > 0 && (v2 += "\n")) : (g2 = [Gn(i2), "#define SHADER_NAME " + i2.shaderName, f2, i2.instancing ? "#define USE_INSTANCING" : "", i2.instancingColor ? "#define USE_INSTANCING_COLOR" : "", i2.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + d2, "#define MAX_BONES " + i2.maxBones, i2.useFog && i2.fog ? "#define USE_FOG" : "", i2.useFog && i2.fogExp2 ? "#define FOG_EXP2" : "", i2.map ? "#define USE_MAP" : "", i2.envMap ? "#define USE_ENVMAP" : "", i2.envMap ? "#define " + c2 : "", i2.lightMap ? "#define USE_LIGHTMAP" : "", i2.aoMap ? "#define USE_AOMAP" : "", i2.emissiveMap ? "#define USE_EMISSIVEMAP" : "", i2.bumpMap ? "#define USE_BUMPMAP" : "", i2.normalMap ? "#define USE_NORMALMAP" : "", i2.normalMap && i2.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", i2.normalMap && i2.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", i2.clearcoatMap ? "#define USE_CLEARCOATMAP" : "", i2.clearcoatRoughnessMap ? "#define USE_CLEARCOAT_ROUGHNESSMAP" : "", i2.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", i2.displacementMap && i2.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", i2.specularMap ? "#define USE_SPECULARMAP" : "", i2.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", i2.metalnessMap ? "#define USE_METALNESSMAP" : "", i2.alphaMap ? "#define USE_ALPHAMAP" : "", i2.transmission ? "#define USE_TRANSMISSION" : "", i2.transmissionMap ? "#define USE_TRANSMISSIONMAP" : "", i2.thicknessMap ? "#define USE_THICKNESSMAP" : "", i2.vertexTangents ? "#define USE_TANGENT" : "", i2.vertexColors ? "#define USE_COLOR" : "", i2.vertexAlphas ? "#define USE_COLOR_ALPHA" : "", i2.vertexUvs ? "#define USE_UV" : "", i2.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", i2.flatShading ? "#define FLAT_SHADED" : "", i2.skinning ? "#define USE_SKINNING" : "", i2.useVertexTexture ? "#define BONE_TEXTURE" : "", i2.morphTargets ? "#define USE_MORPHTARGETS" : "", i2.morphNormals && i2.flatShading === false ? "#define USE_MORPHNORMALS" : "", i2.doubleSided ? "#define DOUBLE_SIDED" : "", i2.flipSided ? "#define FLIP_SIDED" : "", i2.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", i2.shadowMapEnabled ? "#define " + l2 : "", i2.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", i2.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", i2.logarithmicDepthBuffer && i2.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", "#ifdef USE_INSTANCING", " attribute mat4 instanceMatrix;", "#endif", "#ifdef USE_INSTANCING_COLOR", " attribute vec3 instanceColor;", "#endif", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_TANGENT", " attribute vec4 tangent;", "#endif", "#if defined( USE_COLOR_ALPHA )", " attribute vec4 color;", "#elif defined( USE_COLOR )", " attribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", " attribute vec3 morphTarget0;", " attribute vec3 morphTarget1;", " attribute vec3 morphTarget2;", " attribute vec3 morphTarget3;", " #ifdef USE_MORPHNORMALS", " attribute vec3 morphNormal0;", " attribute vec3 morphNormal1;", " attribute vec3 morphNormal2;", " attribute vec3 morphNormal3;", " #else", " attribute vec3 morphTarget4;", " attribute vec3 morphTarget5;", " attribute vec3 morphTarget6;", " attribute vec3 morphTarget7;", " #endif", "#endif", "#ifdef USE_SKINNING", " attribute vec4 skinIndex;", " attribute vec4 skinWeight;", "#endif", "\n"].filter(In).join("\n"), v2 = [p2, Gn(i2), "#define SHADER_NAME " + i2.shaderName, f2, i2.alphaTest ? "#define ALPHATEST " + i2.alphaTest + (i2.alphaTest % 1 ? "" : ".0") : "", "#define GAMMA_FACTOR " + d2, i2.useFog && i2.fog ? "#define USE_FOG" : "", i2.useFog && i2.fogExp2 ? "#define FOG_EXP2" : "", i2.map ? "#define USE_MAP" : "", i2.matcap ? "#define USE_MATCAP" : "", i2.envMap ? "#define USE_ENVMAP" : "", i2.envMap ? "#define " + h2 : "", i2.envMap ? "#define " + c2 : "", i2.envMap ? "#define " + u2 : "", i2.lightMap ? "#define USE_LIGHTMAP" : "", i2.aoMap ? "#define USE_AOMAP" : "", i2.emissiveMap ? "#define USE_EMISSIVEMAP" : "", i2.bumpMap ? "#define USE_BUMPMAP" : "", i2.normalMap ? "#define USE_NORMALMAP" : "", i2.normalMap && i2.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", i2.normalMap && i2.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", i2.clearcoatMap ? "#define USE_CLEARCOATMAP" : "", i2.clearcoatRoughnessMap ? "#define USE_CLEARCOAT_ROUGHNESSMAP" : "", i2.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", i2.specularMap ? "#define USE_SPECULARMAP" : "", i2.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", i2.metalnessMap ? "#define USE_METALNESSMAP" : "", i2.alphaMap ? "#define USE_ALPHAMAP" : "", i2.sheen ? "#define USE_SHEEN" : "", i2.transmission ? "#define USE_TRANSMISSION" : "", i2.transmissionMap ? "#define USE_TRANSMISSIONMAP" : "", i2.thicknessMap ? "#define USE_THICKNESSMAP" : "", i2.vertexTangents ? "#define USE_TANGENT" : "", i2.vertexColors || i2.instancingColor ? "#define USE_COLOR" : "", i2.vertexAlphas ? "#define USE_COLOR_ALPHA" : "", i2.vertexUvs ? "#define USE_UV" : "", i2.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", i2.gradientMap ? "#define USE_GRADIENTMAP" : "", i2.flatShading ? "#define FLAT_SHADED" : "", i2.doubleSided ? "#define DOUBLE_SIDED" : "", i2.flipSided ? "#define FLIP_SIDED" : "", i2.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", i2.shadowMapEnabled ? "#define " + l2 : "", i2.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", i2.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", i2.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", i2.logarithmicDepthBuffer && i2.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", (i2.extensionShaderTextureLOD || i2.envMap) && i2.rendererExtensionShaderTextureLod ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", i2.toneMapping !== 0 ? "#define TONE_MAPPING" : "", i2.toneMapping !== 0 ? ti.tonemapping_pars_fragment : "", i2.toneMapping !== 0 ? Pn("toneMapping", i2.toneMapping) : "", i2.dithering ? "#define DITHERING" : "", ti.encodings_pars_fragment, i2.map ? Mn("mapTexelToLinear", i2.mapEncoding) : "", i2.matcap ? Mn("matcapTexelToLinear", i2.matcapEncoding) : "", i2.envMap ? Mn("envMapTexelToLinear", i2.envMapEncoding) : "", i2.emissiveMap ? Mn("emissiveMapTexelToLinear", i2.emissiveMapEncoding) : "", i2.lightMap ? Mn("lightMapTexelToLinear", i2.lightMapEncoding) : "", An("linearToOutputTexel", i2.outputEncoding), i2.depthPacking ? "#define DEPTH_PACKING " + i2.depthPacking : "", "\n"].filter(In).join("\n")), o2 = Nn(o2), o2 = Rn(o2, i2), o2 = Cn(o2, i2), a2 = Nn(a2), a2 = Rn(a2, i2), a2 = Cn(a2, i2), o2 = Un(o2), a2 = Un(a2), i2.isWebGL2 && i2.isRawShaderMaterial !== true && (_2 = "#version 300 es\n", g2 = ["#define attribute in", "#define varying out", "#define texture2D texture"].join("\n") + "\n" + g2, v2 = ["#define varying in", i2.glslVersion === "300 es" ? "" : "out highp vec4 pc_fragColor;", i2.glslVersion === "300 es" ? "" : "#define gl_FragColor pc_fragColor", "#define gl_FragDepthEXT gl_FragDepth", "#define texture2D texture", "#define textureCube texture", "#define texture2DProj textureProj", "#define texture2DLodEXT textureLod", "#define texture2DProjLodEXT textureProjLod", "#define textureCubeLodEXT textureLod", "#define texture2DGradEXT textureGrad", "#define texture2DProjGradEXT textureProjGrad", "#define textureCubeGradEXT textureGrad"].join("\n") + "\n" + v2);
|
|
8860
8860
|
const y2 = _2 + v2 + a2, x2 = Tn(r2, 35633, _2 + g2 + o2), b2 = Tn(r2, 35632, y2);
|
|
8861
8861
|
if (r2.attachShader(m2, x2), r2.attachShader(m2, b2), i2.index0AttributeName !== void 0 ? r2.bindAttribLocation(m2, 0, i2.index0AttributeName) : i2.morphTargets === true && r2.bindAttribLocation(m2, 0, "position"), r2.linkProgram(m2), t2.debug.checkShaderErrors) {
|
|
8862
8862
|
const t3 = r2.getProgramInfoLog(m2).trim(), e3 = r2.getShaderInfoLog(x2).trim(), i3 = r2.getShaderInfoLog(b2).trim();
|
|
@@ -9012,19 +9012,19 @@ var Slide = function(t) {
|
|
|
9012
9012
|
let i2;
|
|
9013
9013
|
switch (e2.type) {
|
|
9014
9014
|
case "DirectionalLight":
|
|
9015
|
-
i2 = { direction: new
|
|
9015
|
+
i2 = { direction: new I(), color: new Kt() };
|
|
9016
9016
|
break;
|
|
9017
9017
|
case "SpotLight":
|
|
9018
|
-
i2 = { position: new
|
|
9018
|
+
i2 = { position: new I(), direction: new I(), color: new Kt(), distance: 0, coneCos: 0, penumbraCos: 0, decay: 0 };
|
|
9019
9019
|
break;
|
|
9020
9020
|
case "PointLight":
|
|
9021
|
-
i2 = { position: new
|
|
9021
|
+
i2 = { position: new I(), color: new Kt(), distance: 0, decay: 0 };
|
|
9022
9022
|
break;
|
|
9023
9023
|
case "HemisphereLight":
|
|
9024
|
-
i2 = { direction: new
|
|
9024
|
+
i2 = { direction: new I(), skyColor: new Kt(), groundColor: new Kt() };
|
|
9025
9025
|
break;
|
|
9026
9026
|
case "RectAreaLight":
|
|
9027
|
-
i2 = { color: new Kt(), position: new
|
|
9027
|
+
i2 = { color: new Kt(), position: new I(), halfWidth: new I(), halfHeight: new I() };
|
|
9028
9028
|
}
|
|
9029
9029
|
return t2[e2.id] = i2, i2;
|
|
9030
9030
|
} };
|
|
@@ -9052,8 +9052,8 @@ var Slide = function(t) {
|
|
|
9052
9052
|
} };
|
|
9053
9053
|
}(), r2 = { version: 0, hash: { directionalLength: -1, pointLength: -1, spotLength: -1, rectAreaLength: -1, hemiLength: -1, numDirectionalShadows: -1, numPointShadows: -1, numSpotShadows: -1 }, ambient: [0, 0, 0], probe: [], directional: [], directionalShadow: [], directionalShadowMap: [], directionalShadowMatrix: [], spot: [], spotShadow: [], spotShadowMap: [], spotShadowMatrix: [], rectArea: [], rectAreaLTC1: null, rectAreaLTC2: null, point: [], pointShadow: [], pointShadowMap: [], pointShadowMatrix: [], hemi: [] };
|
|
9054
9054
|
for (let t3 = 0; t3 < 9; t3++)
|
|
9055
|
-
r2.probe.push(new
|
|
9056
|
-
const s2 = new
|
|
9055
|
+
r2.probe.push(new I());
|
|
9056
|
+
const s2 = new I(), o2 = new ot(), a2 = new ot();
|
|
9057
9057
|
return { setup: function(s3) {
|
|
9058
9058
|
let o3 = 0, a3 = 0, l2 = 0;
|
|
9059
9059
|
for (let t3 = 0; t3 < 9; t3++)
|
|
@@ -9157,7 +9157,7 @@ var Slide = function(t) {
|
|
|
9157
9157
|
tr.prototype.isMeshDepthMaterial = true;
|
|
9158
9158
|
class er extends Vt {
|
|
9159
9159
|
constructor(t2) {
|
|
9160
|
-
super(), this.type = "MeshDistanceMaterial", this.referencePosition = new
|
|
9160
|
+
super(), this.type = "MeshDistanceMaterial", this.referencePosition = new I(), this.nearDistance = 1, this.farDistance = 1e3, this.morphTargets = false, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.fog = false, this.setValues(t2);
|
|
9161
9161
|
}
|
|
9162
9162
|
copy(t2) {
|
|
9163
9163
|
return super.copy(t2), this.referencePosition.copy(t2.referencePosition), this.nearDistance = t2.nearDistance, this.farDistance = t2.farDistance, this.morphTargets = t2.morphTargets, this.map = t2.map, this.alphaMap = t2.alphaMap, this.displacementMap = t2.displacementMap, this.displacementScale = t2.displacementScale, this.displacementBias = t2.displacementBias, this;
|
|
@@ -9348,9 +9348,9 @@ var Slide = function(t) {
|
|
|
9348
9348
|
let a2 = {}, l2 = null, h2 = {}, c2 = null, u2 = false, d2 = null, p2 = null, f2 = null, m2 = null, g2 = null, v2 = null, _2 = null, y2 = false, x2 = null, b2 = null, T2 = null, E2 = null, w2 = null;
|
|
9349
9349
|
const M2 = t2.getParameter(35661);
|
|
9350
9350
|
let A2 = false, P2 = 0;
|
|
9351
|
-
const
|
|
9352
|
-
|
|
9353
|
-
let
|
|
9351
|
+
const I2 = t2.getParameter(7938);
|
|
9352
|
+
I2.indexOf("WebGL") !== -1 ? (P2 = parseFloat(/^WebGL (\d)/.exec(I2)[1]), A2 = P2 >= 1) : I2.indexOf("OpenGL ES") !== -1 && (P2 = parseFloat(/^OpenGL ES (\d)/.exec(I2)[1]), A2 = P2 >= 2);
|
|
9353
|
+
let R2 = null, C2 = {};
|
|
9354
9354
|
const L2 = t2.getParameter(3088), N2 = t2.getParameter(2978), O2 = new S().fromArray(L2), D2 = new S().fromArray(N2);
|
|
9355
9355
|
function F2(e3, i3, n3) {
|
|
9356
9356
|
const r3 = new Uint8Array(4), s3 = t2.createTexture();
|
|
@@ -9429,7 +9429,7 @@ var Slide = function(t) {
|
|
|
9429
9429
|
e3 ? (k2(32823), E2 === i3 && w2 === n3 || (t2.polygonOffset(i3, n3), E2 = i3, w2 = n3)) : B2(32823);
|
|
9430
9430
|
}
|
|
9431
9431
|
function X2(e3) {
|
|
9432
|
-
e3 === void 0 && (e3 = 33984 + M2 - 1),
|
|
9432
|
+
e3 === void 0 && (e3 = 33984 + M2 - 1), R2 !== e3 && (t2.activeTexture(e3), R2 = e3);
|
|
9433
9433
|
}
|
|
9434
9434
|
return { buffers: { color: r2, depth: s2, stencil: o2 }, enable: k2, disable: B2, bindFramebuffer: function(e3, i3) {
|
|
9435
9435
|
return i3 === null && l2 !== null && (i3 = l2), h2[e3] !== i3 && (t2.bindFramebuffer(e3, i3), h2[e3] = i3, n2 && (e3 === 36009 && (h2[36160] = i3), e3 === 36160 && (h2[36009] = i3)), true);
|
|
@@ -9448,11 +9448,11 @@ var Slide = function(t) {
|
|
|
9448
9448
|
}, setPolygonOffset: W2, setScissorTest: function(t3) {
|
|
9449
9449
|
t3 ? k2(3089) : B2(3089);
|
|
9450
9450
|
}, activeTexture: X2, bindTexture: function(e3, i3) {
|
|
9451
|
-
|
|
9452
|
-
let n3 = C2[
|
|
9453
|
-
n3 === void 0 && (n3 = { type: void 0, texture: void 0 }, C2[
|
|
9451
|
+
R2 === null && X2();
|
|
9452
|
+
let n3 = C2[R2];
|
|
9453
|
+
n3 === void 0 && (n3 = { type: void 0, texture: void 0 }, C2[R2] = n3), n3.type === e3 && n3.texture === i3 || (t2.bindTexture(e3, i3 || U2[e3]), n3.type = e3, n3.texture = i3);
|
|
9454
9454
|
}, unbindTexture: function() {
|
|
9455
|
-
const e3 = C2[
|
|
9455
|
+
const e3 = C2[R2];
|
|
9456
9456
|
e3 !== void 0 && e3.type !== void 0 && (t2.bindTexture(e3.type, null), e3.type = void 0, e3.texture = void 0);
|
|
9457
9457
|
}, compressedTexImage2D: function() {
|
|
9458
9458
|
try {
|
|
@@ -9477,7 +9477,7 @@ var Slide = function(t) {
|
|
|
9477
9477
|
}, viewport: function(e3) {
|
|
9478
9478
|
D2.equals(e3) === false && (t2.viewport(e3.x, e3.y, e3.z, e3.w), D2.copy(e3));
|
|
9479
9479
|
}, reset: function() {
|
|
9480
|
-
t2.disable(3042), t2.disable(2884), t2.disable(2929), t2.disable(32823), t2.disable(3089), t2.disable(2960), t2.disable(32926), t2.blendEquation(32774), t2.blendFunc(1, 0), t2.blendFuncSeparate(1, 0, 1, 0), t2.colorMask(true, true, true, true), t2.clearColor(0, 0, 0, 0), t2.depthMask(true), t2.depthFunc(513), t2.clearDepth(1), t2.stencilMask(4294967295), t2.stencilFunc(519, 0, 4294967295), t2.stencilOp(7680, 7680, 7680), t2.clearStencil(0), t2.cullFace(1029), t2.frontFace(2305), t2.polygonOffset(0, 0), t2.activeTexture(33984), t2.bindFramebuffer(36160, null), n2 === true && (t2.bindFramebuffer(36009, null), t2.bindFramebuffer(36008, null)), t2.useProgram(null), t2.lineWidth(1), t2.scissor(0, 0, t2.canvas.width, t2.canvas.height), t2.viewport(0, 0, t2.canvas.width, t2.canvas.height), a2 = {},
|
|
9480
|
+
t2.disable(3042), t2.disable(2884), t2.disable(2929), t2.disable(32823), t2.disable(3089), t2.disable(2960), t2.disable(32926), t2.blendEquation(32774), t2.blendFunc(1, 0), t2.blendFuncSeparate(1, 0, 1, 0), t2.colorMask(true, true, true, true), t2.clearColor(0, 0, 0, 0), t2.depthMask(true), t2.depthFunc(513), t2.clearDepth(1), t2.stencilMask(4294967295), t2.stencilFunc(519, 0, 4294967295), t2.stencilOp(7680, 7680, 7680), t2.clearStencil(0), t2.cullFace(1029), t2.frontFace(2305), t2.polygonOffset(0, 0), t2.activeTexture(33984), t2.bindFramebuffer(36160, null), n2 === true && (t2.bindFramebuffer(36009, null), t2.bindFramebuffer(36008, null)), t2.useProgram(null), t2.lineWidth(1), t2.scissor(0, 0, t2.canvas.width, t2.canvas.height), t2.viewport(0, 0, t2.canvas.width, t2.canvas.height), a2 = {}, R2 = null, C2 = {}, l2 = null, h2 = {}, c2 = null, u2 = false, d2 = null, p2 = null, f2 = null, m2 = null, g2 = null, v2 = null, _2 = null, y2 = false, x2 = null, b2 = null, T2 = null, E2 = null, w2 = null, O2.set(0, 0, t2.canvas.width, t2.canvas.height), D2.set(0, 0, t2.canvas.width, t2.canvas.height), r2.reset(), s2.reset(), o2.reset();
|
|
9481
9481
|
} };
|
|
9482
9482
|
}
|
|
9483
9483
|
function rr(t2, e2, i2, n2, r2, s2, o2) {
|
|
@@ -9618,9 +9618,9 @@ var Slide = function(t) {
|
|
|
9618
9618
|
e4.__version = n3.version, n3.onUpdate && n3.onUpdate(n3);
|
|
9619
9619
|
}(o3, e3, r3) : (i2.activeTexture(33984 + r3), i2.bindTexture(34067, o3.__webglTexture));
|
|
9620
9620
|
}
|
|
9621
|
-
const
|
|
9621
|
+
const I2 = { 1e3: 10497, 1001: 33071, 1002: 33648 }, R2 = { 1003: 9728, 1004: 9984, 1005: 9986, 1006: 9729, 1007: 9985, 1008: 9987 };
|
|
9622
9622
|
function C2(i3, s3, o3) {
|
|
9623
|
-
if (o3 ? (t2.texParameteri(i3, 10242,
|
|
9623
|
+
if (o3 ? (t2.texParameteri(i3, 10242, I2[s3.wrapS]), t2.texParameteri(i3, 10243, I2[s3.wrapT]), i3 !== 32879 && i3 !== 35866 || t2.texParameteri(i3, 32882, I2[s3.wrapR]), t2.texParameteri(i3, 10240, R2[s3.magFilter]), t2.texParameteri(i3, 10241, R2[s3.minFilter])) : (t2.texParameteri(i3, 10242, 33071), t2.texParameteri(i3, 10243, 33071), i3 !== 32879 && i3 !== 35866 || t2.texParameteri(i3, 32882, 33071), s3.wrapS === 1001 && s3.wrapT === 1001 || console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), t2.texParameteri(i3, 10240, E2(s3.magFilter)), t2.texParameteri(i3, 10241, E2(s3.minFilter)), s3.minFilter !== 1003 && s3.minFilter !== 1006 && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")), e2.has("EXT_texture_filter_anisotropic") === true) {
|
|
9624
9624
|
const o4 = e2.get("EXT_texture_filter_anisotropic");
|
|
9625
9625
|
if (s3.type === 1015 && e2.has("OES_texture_float_linear") === false)
|
|
9626
9626
|
return;
|
|
@@ -9920,10 +9920,10 @@ var Slide = function(t) {
|
|
|
9920
9920
|
return this._hand === null && (this._hand = new ar(), this._hand.matrixAutoUpdate = false, this._hand.visible = false, this._hand.joints = {}, this._hand.inputState = { pinching: false }), this._hand;
|
|
9921
9921
|
}
|
|
9922
9922
|
getTargetRaySpace() {
|
|
9923
|
-
return this._targetRay === null && (this._targetRay = new ar(), this._targetRay.matrixAutoUpdate = false, this._targetRay.visible = false, this._targetRay.hasLinearVelocity = false, this._targetRay.linearVelocity = new
|
|
9923
|
+
return this._targetRay === null && (this._targetRay = new ar(), this._targetRay.matrixAutoUpdate = false, this._targetRay.visible = false, this._targetRay.hasLinearVelocity = false, this._targetRay.linearVelocity = new I(), this._targetRay.hasAngularVelocity = false, this._targetRay.angularVelocity = new I()), this._targetRay;
|
|
9924
9924
|
}
|
|
9925
9925
|
getGripSpace() {
|
|
9926
|
-
return this._grip === null && (this._grip = new ar(), this._grip.matrixAutoUpdate = false, this._grip.visible = false, this._grip.hasLinearVelocity = false, this._grip.linearVelocity = new
|
|
9926
|
+
return this._grip === null && (this._grip = new ar(), this._grip.matrixAutoUpdate = false, this._grip.visible = false, this._grip.hasLinearVelocity = false, this._grip.linearVelocity = new I(), this._grip.hasAngularVelocity = false, this._grip.angularVelocity = new I()), this._grip;
|
|
9927
9927
|
}
|
|
9928
9928
|
dispatchEvent(t2) {
|
|
9929
9929
|
return this._targetRay !== null && this._targetRay.dispatchEvent(t2), this._grip !== null && this._grip.dispatchEvent(t2), this._hand !== null && this._hand.dispatchEvent(t2), this;
|
|
@@ -10020,7 +10020,7 @@ var Slide = function(t) {
|
|
|
10020
10020
|
o2 = await r2.requestReferenceSpace(a2), P2.setContext(r2), P2.start(), i2.isPresenting = true, i2.dispatchEvent({ type: "sessionstart" });
|
|
10021
10021
|
}
|
|
10022
10022
|
};
|
|
10023
|
-
const E2 = new
|
|
10023
|
+
const E2 = new I(), w2 = new I();
|
|
10024
10024
|
function M2(t3, e3) {
|
|
10025
10025
|
e3 === null ? t3.matrixWorld.copy(t3.matrix) : t3.matrixWorld.multiplyMatrices(e3.matrixWorld, t3.matrix), t3.matrixWorldInverse.copy(t3.matrixWorld).invert();
|
|
10026
10026
|
}
|
|
@@ -10164,12 +10164,12 @@ var Slide = function(t) {
|
|
|
10164
10164
|
const m2 = this;
|
|
10165
10165
|
let g2 = false, v2 = 0, _2 = 0, y2 = null, x2 = -1, b2 = null;
|
|
10166
10166
|
const T2 = new S(), E2 = new S();
|
|
10167
|
-
let w2 = null, P2 = e2.width,
|
|
10168
|
-
const O2 = new S(0, 0, P2,
|
|
10167
|
+
let w2 = null, P2 = e2.width, R2 = e2.height, C2 = 1, L2 = null, N2 = null;
|
|
10168
|
+
const O2 = new S(0, 0, P2, R2), D2 = new S(0, 0, P2, R2);
|
|
10169
10169
|
let F2 = false;
|
|
10170
10170
|
const U2 = [], k2 = new Je();
|
|
10171
10171
|
let B2 = false, G2 = false, H2 = null;
|
|
10172
|
-
const j2 = new ot(), z2 = new
|
|
10172
|
+
const j2 = new ot(), z2 = new I(), V2 = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: true };
|
|
10173
10173
|
function W2() {
|
|
10174
10174
|
return y2 === null ? C2 : 1;
|
|
10175
10175
|
}
|
|
@@ -10232,15 +10232,15 @@ var Slide = function(t) {
|
|
|
10232
10232
|
}, this.getPixelRatio = function() {
|
|
10233
10233
|
return C2;
|
|
10234
10234
|
}, this.setPixelRatio = function(t3) {
|
|
10235
|
-
t3 !== void 0 && (C2 = t3, this.setSize(P2,
|
|
10235
|
+
t3 !== void 0 && (C2 = t3, this.setSize(P2, R2, false));
|
|
10236
10236
|
}, this.getSize = function(t3) {
|
|
10237
|
-
return t3.set(P2,
|
|
10237
|
+
return t3.set(P2, R2);
|
|
10238
10238
|
}, this.setSize = function(t3, i3, n3) {
|
|
10239
|
-
_t2.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (P2 = t3,
|
|
10239
|
+
_t2.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (P2 = t3, R2 = i3, e2.width = Math.floor(t3 * C2), e2.height = Math.floor(i3 * C2), n3 !== false && (e2.style.width = t3 + "px", e2.style.height = i3 + "px"), this.setViewport(0, 0, t3, i3));
|
|
10240
10240
|
}, this.getDrawingBufferSize = function(t3) {
|
|
10241
|
-
return t3.set(P2 * C2,
|
|
10241
|
+
return t3.set(P2 * C2, R2 * C2).floor();
|
|
10242
10242
|
}, this.setDrawingBufferSize = function(t3, i3, n3) {
|
|
10243
|
-
P2 = t3,
|
|
10243
|
+
P2 = t3, R2 = i3, C2 = n3, e2.width = Math.floor(t3 * n3), e2.height = Math.floor(i3 * n3), this.setViewport(0, 0, t3, i3);
|
|
10244
10244
|
}, this.getCurrentViewport = function(t3) {
|
|
10245
10245
|
return t3.copy(T2);
|
|
10246
10246
|
}, this.getViewport = function(t3) {
|
|
@@ -10286,7 +10286,7 @@ var Slide = function(t) {
|
|
|
10286
10286
|
t3.hasPositions && (mt2.bindBuffer(34962, i3.position), mt2.bufferData(34962, t3.positionArray, 35048), ft2.enableAttribute(n3.position), mt2.vertexAttribPointer(n3.position, 3, 5126, false, 0, 0)), t3.hasNormals && (mt2.bindBuffer(34962, i3.normal), mt2.bufferData(34962, t3.normalArray, 35048), ft2.enableAttribute(n3.normal), mt2.vertexAttribPointer(n3.normal, 3, 5126, false, 0, 0)), t3.hasUvs && (mt2.bindBuffer(34962, i3.uv), mt2.bufferData(34962, t3.uvArray, 35048), ft2.enableAttribute(n3.uv), mt2.vertexAttribPointer(n3.uv, 2, 5126, false, 0, 0)), t3.hasColors && (mt2.bindBuffer(34962, i3.color), mt2.bufferData(34962, t3.colorArray, 35048), ft2.enableAttribute(n3.color), mt2.vertexAttribPointer(n3.color, 3, 5126, false, 0, 0)), ft2.disableUnusedAttributes(), mt2.drawArrays(4, 0, t3.count), t3.count = 0;
|
|
10287
10287
|
}, this.renderBufferDirect = function(t3, e3, i3, n3, r3, s3) {
|
|
10288
10288
|
e3 === null && (e3 = V2);
|
|
10289
|
-
const o3 = r3.isMesh && r3.matrixWorld.determinant() < 0, a3 =
|
|
10289
|
+
const o3 = r3.isMesh && r3.matrixWorld.determinant() < 0, a3 = Rt2(t3, e3, n3, r3);
|
|
10290
10290
|
q2.setMaterial(n3, o3);
|
|
10291
10291
|
let l3 = i3.index;
|
|
10292
10292
|
const h3 = i3.attributes.position;
|
|
@@ -10354,7 +10354,7 @@ var Slide = function(t) {
|
|
|
10354
10354
|
}
|
|
10355
10355
|
function At2(t3, e3, i3, n3, r3, s3) {
|
|
10356
10356
|
if (t3.onBeforeRender(m2, e3, i3, n3, r3, s3), t3.modelViewMatrix.multiplyMatrices(i3.matrixWorldInverse, t3.matrixWorld), t3.normalMatrix.getNormalMatrix(t3.modelViewMatrix), t3.isImmediateRenderObject) {
|
|
10357
|
-
const n4 =
|
|
10357
|
+
const n4 = Rt2(i3, e3, r3, t3);
|
|
10358
10358
|
q2.setMaterial(r3), ft2.reset(), function(t4, e4) {
|
|
10359
10359
|
t4.render(function(t5) {
|
|
10360
10360
|
m2.renderBufferImmediate(t5, e4);
|
|
@@ -10372,21 +10372,21 @@ var Slide = function(t) {
|
|
|
10372
10372
|
let c3 = h3.get(l3);
|
|
10373
10373
|
if (c3 !== void 0) {
|
|
10374
10374
|
if (n3.currentProgram === c3 && n3.lightsStateVersion === o3)
|
|
10375
|
-
return
|
|
10375
|
+
return It2(t3, a3), c3;
|
|
10376
10376
|
} else
|
|
10377
10377
|
a3.uniforms = it2.getUniforms(t3), t3.onBuild(a3, m2), t3.onBeforeCompile(a3, m2), c3 = it2.acquireProgram(a3, l3), h3.set(l3, c3), n3.uniforms = a3.uniforms;
|
|
10378
10378
|
const u3 = n3.uniforms;
|
|
10379
|
-
(t3.isShaderMaterial || t3.isRawShaderMaterial) && t3.clipping !== true || (u3.clippingPlanes = at2.uniform),
|
|
10379
|
+
(t3.isShaderMaterial || t3.isRawShaderMaterial) && t3.clipping !== true || (u3.clippingPlanes = at2.uniform), It2(t3, a3), n3.needsLights = function(t4) {
|
|
10380
10380
|
return t4.isMeshLambertMaterial || t4.isMeshToonMaterial || t4.isMeshPhongMaterial || t4.isMeshStandardMaterial || t4.isShadowMaterial || t4.isShaderMaterial && t4.lights === true;
|
|
10381
10381
|
}(t3), n3.lightsStateVersion = o3, n3.needsLights && (u3.ambientLightColor.value = r3.state.ambient, u3.lightProbe.value = r3.state.probe, u3.directionalLights.value = r3.state.directional, u3.directionalLightShadows.value = r3.state.directionalShadow, u3.spotLights.value = r3.state.spot, u3.spotLightShadows.value = r3.state.spotShadow, u3.rectAreaLights.value = r3.state.rectArea, u3.ltc_1.value = r3.state.rectAreaLTC1, u3.ltc_2.value = r3.state.rectAreaLTC2, u3.pointLights.value = r3.state.point, u3.pointLightShadows.value = r3.state.pointShadow, u3.hemisphereLights.value = r3.state.hemi, u3.directionalShadowMap.value = r3.state.directionalShadowMap, u3.directionalShadowMatrix.value = r3.state.directionalShadowMatrix, u3.spotShadowMap.value = r3.state.spotShadowMap, u3.spotShadowMatrix.value = r3.state.spotShadowMatrix, u3.pointShadowMap.value = r3.state.pointShadowMap, u3.pointShadowMatrix.value = r3.state.pointShadowMatrix);
|
|
10382
10382
|
const p3 = c3.getUniforms(), f3 = bn.seqWithValue(p3.seq, u3);
|
|
10383
10383
|
return n3.currentProgram = c3, n3.uniformsList = f3, c3;
|
|
10384
10384
|
}
|
|
10385
|
-
function
|
|
10385
|
+
function It2(t3, e3) {
|
|
10386
10386
|
const i3 = J2.get(t3);
|
|
10387
10387
|
i3.outputEncoding = e3.outputEncoding, i3.instancing = e3.instancing, i3.skinning = e3.skinning, i3.numClippingPlanes = e3.numClippingPlanes, i3.numIntersection = e3.numClipIntersection, i3.vertexAlphas = e3.vertexAlphas;
|
|
10388
10388
|
}
|
|
10389
|
-
function
|
|
10389
|
+
function Rt2(t3, e3, i3, n3) {
|
|
10390
10390
|
e3.isScene !== true && (e3 = V2), K2.resetTextureUnits();
|
|
10391
10391
|
const r3 = e3.fog, s3 = i3.isMeshStandardMaterial ? e3.environment : null, o3 = y2 === null ? m2.outputEncoding : y2.texture.encoding, a3 = $2.get(i3.envMap || s3), l3 = i3.vertexColors === true && n3.geometry && n3.geometry.attributes.color && n3.geometry.attributes.color.itemSize === 4, h3 = J2.get(i3), c3 = d2.state.lights;
|
|
10392
10392
|
if (B2 === true && (G2 === true || t3 !== b2)) {
|
|
@@ -10412,7 +10412,7 @@ var Slide = function(t) {
|
|
|
10412
10412
|
t4 && (Y2.floatVertexTextures ? (t4.boneTexture === null && t4.computeBoneTexture(), _3.setValue(mt2, "boneTexture", t4.boneTexture, K2), _3.setValue(mt2, "boneTextureSize", t4.boneTextureSize)) : _3.setOptional(mt2, t4, "boneMatrices"));
|
|
10413
10413
|
}
|
|
10414
10414
|
var E3, w3;
|
|
10415
|
-
return (g3 || h3.receiveShadow !== n3.receiveShadow) && (h3.receiveShadow = n3.receiveShadow, _3.setValue(mt2, "receiveShadow", n3.receiveShadow)), g3 && (_3.setValue(mt2, "toneMappingExposure", m2.toneMappingExposure), h3.needsLights && (w3 = v3, (E3 = T3).ambientLightColor.needsUpdate = w3, E3.lightProbe.needsUpdate = w3, E3.directionalLights.needsUpdate = w3, E3.directionalLightShadows.needsUpdate = w3, E3.pointLights.needsUpdate = w3, E3.pointLightShadows.needsUpdate = w3, E3.spotLights.needsUpdate = w3, E3.spotLightShadows.needsUpdate = w3, E3.rectAreaLights.needsUpdate = w3, E3.hemisphereLights.needsUpdate = w3), r3 && i3.fog && nt2.refreshFogUniforms(T3, r3), nt2.refreshMaterialUniforms(T3, i3, C2,
|
|
10415
|
+
return (g3 || h3.receiveShadow !== n3.receiveShadow) && (h3.receiveShadow = n3.receiveShadow, _3.setValue(mt2, "receiveShadow", n3.receiveShadow)), g3 && (_3.setValue(mt2, "toneMappingExposure", m2.toneMappingExposure), h3.needsLights && (w3 = v3, (E3 = T3).ambientLightColor.needsUpdate = w3, E3.lightProbe.needsUpdate = w3, E3.directionalLights.needsUpdate = w3, E3.directionalLightShadows.needsUpdate = w3, E3.pointLights.needsUpdate = w3, E3.pointLightShadows.needsUpdate = w3, E3.spotLights.needsUpdate = w3, E3.spotLightShadows.needsUpdate = w3, E3.rectAreaLights.needsUpdate = w3, E3.hemisphereLights.needsUpdate = w3), r3 && i3.fog && nt2.refreshFogUniforms(T3, r3), nt2.refreshMaterialUniforms(T3, i3, C2, R2, H2), bn.upload(mt2, h3.uniformsList, T3, K2)), i3.isShaderMaterial && i3.uniformsNeedUpdate === true && (bn.upload(mt2, h3.uniformsList, T3, K2), i3.uniformsNeedUpdate = false), i3.isSpriteMaterial && _3.setValue(mt2, "center", n3.center), _3.setValue(mt2, "modelViewMatrix", n3.modelViewMatrix), _3.setValue(mt2, "normalMatrix", n3.normalMatrix), _3.setValue(mt2, "modelMatrix", n3.matrixWorld), p3;
|
|
10416
10416
|
}
|
|
10417
10417
|
St2.setAnimationLoop(function(t3) {
|
|
10418
10418
|
Tt2 && Tt2(t3);
|
|
@@ -10609,7 +10609,7 @@ var Slide = function(t) {
|
|
|
10609
10609
|
}
|
|
10610
10610
|
}
|
|
10611
10611
|
gr.prototype.isInterleavedBuffer = true;
|
|
10612
|
-
const vr = new
|
|
10612
|
+
const vr = new I();
|
|
10613
10613
|
class _r {
|
|
10614
10614
|
constructor(t2, e2, i2, n2 = false) {
|
|
10615
10615
|
this.name = "", this.data = t2, this.itemSize = e2, this.offset = i2, this.normalized = n2 === true;
|
|
@@ -10709,7 +10709,7 @@ var Slide = function(t) {
|
|
|
10709
10709
|
}
|
|
10710
10710
|
let xr;
|
|
10711
10711
|
yr.prototype.isSpriteMaterial = true;
|
|
10712
|
-
const br = new
|
|
10712
|
+
const br = new I(), Tr = new I(), Er = new I(), wr = new _(), Sr = new _(), Mr = new ot(), Ar = new I(), Pr = new I(), Ir = new I(), Rr = new _(), Cr = new _(), Lr = new _();
|
|
10713
10713
|
class Nr extends Ct {
|
|
10714
10714
|
constructor(t2) {
|
|
10715
10715
|
if (super(), this.type = "Sprite", xr === void 0) {
|
|
@@ -10725,12 +10725,12 @@ var Slide = function(t) {
|
|
|
10725
10725
|
let n2, r2;
|
|
10726
10726
|
i2 !== 0 && (r2 = Math.cos(i2), n2 = Math.sin(i2));
|
|
10727
10727
|
const s2 = this.center;
|
|
10728
|
-
Or(Ar.set(-0.5, -0.5, 0), Er, s2, Tr, n2, r2), Or(Pr.set(0.5, -0.5, 0), Er, s2, Tr, n2, r2), Or(
|
|
10729
|
-
let o2 = t2.ray.intersectTriangle(Ar, Pr,
|
|
10730
|
-
if (o2 === null && (Or(Pr.set(-0.5, 0.5, 0), Er, s2, Tr, n2, r2), Cr.set(0, 1), o2 = t2.ray.intersectTriangle(Ar,
|
|
10728
|
+
Or(Ar.set(-0.5, -0.5, 0), Er, s2, Tr, n2, r2), Or(Pr.set(0.5, -0.5, 0), Er, s2, Tr, n2, r2), Or(Ir.set(0.5, 0.5, 0), Er, s2, Tr, n2, r2), Rr.set(0, 0), Cr.set(1, 0), Lr.set(1, 1);
|
|
10729
|
+
let o2 = t2.ray.intersectTriangle(Ar, Pr, Ir, false, br);
|
|
10730
|
+
if (o2 === null && (Or(Pr.set(-0.5, 0.5, 0), Er, s2, Tr, n2, r2), Cr.set(0, 1), o2 = t2.ray.intersectTriangle(Ar, Ir, Pr, false, br), o2 === null))
|
|
10731
10731
|
return;
|
|
10732
10732
|
const a2 = t2.ray.origin.distanceTo(br);
|
|
10733
|
-
a2 < t2.near || a2 > t2.far || e2.push({ distance: a2, point: br.clone(), uv: jt.getUV(br, Ar, Pr,
|
|
10733
|
+
a2 < t2.near || a2 > t2.far || e2.push({ distance: a2, point: br.clone(), uv: jt.getUV(br, Ar, Pr, Ir, Rr, Cr, Lr, new _()), face: null, object: this });
|
|
10734
10734
|
}
|
|
10735
10735
|
copy(t2) {
|
|
10736
10736
|
return super.copy(t2), t2.center !== void 0 && this.center.copy(t2.center), this.material = t2.material, this;
|
|
@@ -10740,7 +10740,7 @@ var Slide = function(t) {
|
|
|
10740
10740
|
wr.subVectors(t2, i2).addScalar(0.5).multiply(n2), r2 !== void 0 ? (Sr.x = s2 * wr.x - r2 * wr.y, Sr.y = r2 * wr.x + s2 * wr.y) : Sr.copy(wr), t2.copy(e2), t2.x += Sr.x, t2.y += Sr.y, t2.applyMatrix4(Mr);
|
|
10741
10741
|
}
|
|
10742
10742
|
Nr.prototype.isSprite = true;
|
|
10743
|
-
const Dr = new
|
|
10743
|
+
const Dr = new I(), Fr = new S(), Ur = new S(), kr = new I(), Br = new ot();
|
|
10744
10744
|
class Gr extends Le {
|
|
10745
10745
|
constructor(t2, e2) {
|
|
10746
10746
|
super(t2, e2), this.type = "SkinnedMesh", this.bindMode = "attached", this.bindMatrix = new ot(), this.bindMatrixInverse = new ot();
|
|
@@ -10839,7 +10839,7 @@ var Slide = function(t) {
|
|
|
10839
10839
|
}
|
|
10840
10840
|
}
|
|
10841
10841
|
qr.prototype.isLineBasicMaterial = true;
|
|
10842
|
-
const Zr = new
|
|
10842
|
+
const Zr = new I(), Jr = new I(), Kr = new ot(), $r = new st(), Qr = new K();
|
|
10843
10843
|
class ts extends Ct {
|
|
10844
10844
|
constructor(t2 = new fe(), e2 = new qr()) {
|
|
10845
10845
|
super(), this.type = "Line", this.geometry = t2, this.material = e2, this.updateMorphTargets();
|
|
@@ -10866,7 +10866,7 @@ var Slide = function(t) {
|
|
|
10866
10866
|
if (i2.boundingSphere === null && i2.computeBoundingSphere(), Qr.copy(i2.boundingSphere), Qr.applyMatrix4(n2), Qr.radius += r2, t2.ray.intersectsSphere(Qr) === false)
|
|
10867
10867
|
return;
|
|
10868
10868
|
Kr.copy(n2).invert(), $r.copy(t2.ray).applyMatrix4(Kr);
|
|
10869
|
-
const o2 = r2 / ((this.scale.x + this.scale.y + this.scale.z) / 3), a2 = o2 * o2, l2 = new
|
|
10869
|
+
const o2 = r2 / ((this.scale.x + this.scale.y + this.scale.z) / 3), a2 = o2 * o2, l2 = new I(), h2 = new I(), c2 = new I(), u2 = new I(), d2 = this.isLineSegments ? 2 : 1;
|
|
10870
10870
|
if (i2.isBufferGeometry) {
|
|
10871
10871
|
const n3 = i2.index, r3 = i2.attributes.position;
|
|
10872
10872
|
if (n3 !== null) {
|
|
@@ -10913,7 +10913,7 @@ var Slide = function(t) {
|
|
|
10913
10913
|
}
|
|
10914
10914
|
}
|
|
10915
10915
|
ts.prototype.isLine = true;
|
|
10916
|
-
const es = new
|
|
10916
|
+
const es = new I(), is = new I();
|
|
10917
10917
|
class ns extends ts {
|
|
10918
10918
|
constructor(t2, e2) {
|
|
10919
10919
|
super(t2, e2), this.type = "LineSegments";
|
|
@@ -10949,7 +10949,7 @@ var Slide = function(t) {
|
|
|
10949
10949
|
}
|
|
10950
10950
|
}
|
|
10951
10951
|
ss.prototype.isPointsMaterial = true;
|
|
10952
|
-
const os = new ot(), as = new st(), ls = new K(), hs = new
|
|
10952
|
+
const os = new ot(), as = new st(), ls = new K(), hs = new I();
|
|
10953
10953
|
class cs2 extends Ct {
|
|
10954
10954
|
constructor(t2 = new fe(), e2 = new ss()) {
|
|
10955
10955
|
super(), this.type = "Points", this.geometry = t2, this.material = e2, this.updateMorphTargets();
|
|
@@ -11000,7 +11000,7 @@ var Slide = function(t) {
|
|
|
11000
11000
|
function us(t2, e2, i2, n2, r2, s2, o2) {
|
|
11001
11001
|
const a2 = as.distanceSqToPoint(t2);
|
|
11002
11002
|
if (a2 < i2) {
|
|
11003
|
-
const i3 = new
|
|
11003
|
+
const i3 = new I();
|
|
11004
11004
|
as.closestPointToPoint(t2, i3), i3.applyMatrix4(n2);
|
|
11005
11005
|
const l2 = r2.ray.origin.distanceTo(i3);
|
|
11006
11006
|
if (l2 < r2.near || l2 > r2.far)
|
|
@@ -11044,7 +11044,7 @@ var Slide = function(t) {
|
|
|
11044
11044
|
i2 === void 0 && h2 === 1026 && (i2 = 1012), i2 === void 0 && h2 === 1027 && (i2 = 1020), super(null, n2, r2, s2, o2, a2, h2, i2, l2), this.image = { width: t2, height: e2 }, this.magFilter = o2 !== void 0 ? o2 : 1003, this.minFilter = a2 !== void 0 ? a2 : 1003, this.flipY = false, this.generateMipmaps = false;
|
|
11045
11045
|
}
|
|
11046
11046
|
}).prototype.isDepthTexture = true;
|
|
11047
|
-
new
|
|
11047
|
+
new I(), new I(), new I(), new jt();
|
|
11048
11048
|
class fs {
|
|
11049
11049
|
constructor() {
|
|
11050
11050
|
this.type = "Curve", this.arcLengthDivisions = 200;
|
|
@@ -11111,7 +11111,7 @@ var Slide = function(t) {
|
|
|
11111
11111
|
getTangent(t2, e2) {
|
|
11112
11112
|
let i2 = t2 - 1e-4, n2 = t2 + 1e-4;
|
|
11113
11113
|
i2 < 0 && (i2 = 0), n2 > 1 && (n2 = 1);
|
|
11114
|
-
const r2 = this.getPoint(i2), s2 = this.getPoint(n2), o2 = e2 || (r2.isVector2 ? new _() : new
|
|
11114
|
+
const r2 = this.getPoint(i2), s2 = this.getPoint(n2), o2 = e2 || (r2.isVector2 ? new _() : new I());
|
|
11115
11115
|
return o2.copy(s2).sub(r2).normalize(), o2;
|
|
11116
11116
|
}
|
|
11117
11117
|
getTangentAt(t2, e2) {
|
|
@@ -11119,12 +11119,12 @@ var Slide = function(t) {
|
|
|
11119
11119
|
return this.getTangent(i2, e2);
|
|
11120
11120
|
}
|
|
11121
11121
|
computeFrenetFrames(t2, e2) {
|
|
11122
|
-
const i2 = new
|
|
11122
|
+
const i2 = new I(), n2 = [], r2 = [], s2 = [], o2 = new I(), a2 = new ot();
|
|
11123
11123
|
for (let e3 = 0; e3 <= t2; e3++) {
|
|
11124
11124
|
const i3 = e3 / t2;
|
|
11125
|
-
n2[e3] = this.getTangentAt(i3, new
|
|
11125
|
+
n2[e3] = this.getTangentAt(i3, new I()), n2[e3].normalize();
|
|
11126
11126
|
}
|
|
11127
|
-
r2[0] = new
|
|
11127
|
+
r2[0] = new I(), s2[0] = new I();
|
|
11128
11128
|
let l2 = Number.MAX_VALUE;
|
|
11129
11129
|
const h2 = Math.abs(n2[0].x), c2 = Math.abs(n2[0].y), u2 = Math.abs(n2[0].z);
|
|
11130
11130
|
h2 <= l2 && (l2 = h2, i2.set(1, 0, 0)), c2 <= l2 && (l2 = c2, i2.set(0, 1, 0)), u2 <= l2 && i2.set(0, 0, 1), o2.crossVectors(n2[0], i2).normalize(), r2[0].crossVectors(n2[0], o2), s2[0].crossVectors(n2[0], r2[0]);
|
|
@@ -11212,12 +11212,12 @@ var Slide = function(t) {
|
|
|
11212
11212
|
} };
|
|
11213
11213
|
}
|
|
11214
11214
|
gs.prototype.isArcCurve = true;
|
|
11215
|
-
const _s = new
|
|
11215
|
+
const _s = new I(), ys = new vs(), xs = new vs(), bs = new vs();
|
|
11216
11216
|
class Ts extends fs {
|
|
11217
11217
|
constructor(t2 = [], e2 = false, i2 = "centripetal", n2 = 0.5) {
|
|
11218
11218
|
super(), this.type = "CatmullRomCurve3", this.points = t2, this.closed = e2, this.curveType = i2, this.tension = n2;
|
|
11219
11219
|
}
|
|
11220
|
-
getPoint(t2, e2 = new
|
|
11220
|
+
getPoint(t2, e2 = new I()) {
|
|
11221
11221
|
const i2 = e2, n2 = this.points, r2 = n2.length, s2 = (r2 - (this.closed ? 0 : 1)) * t2;
|
|
11222
11222
|
let o2, a2, l2 = Math.floor(s2), h2 = s2 - l2;
|
|
11223
11223
|
this.closed ? l2 += l2 > 0 ? 0 : (Math.floor(Math.abs(l2) / r2) + 1) * r2 : h2 === 0 && l2 === r2 - 1 && (l2 = r2 - 2, h2 = 1), this.closed || l2 > 0 ? o2 = n2[(l2 - 1) % r2] : (_s.subVectors(n2[0], n2[1]).add(n2[0]), o2 = _s);
|
|
@@ -11251,7 +11251,7 @@ var Slide = function(t) {
|
|
|
11251
11251
|
super.fromJSON(t2), this.points = [];
|
|
11252
11252
|
for (let e2 = 0, i2 = t2.points.length; e2 < i2; e2++) {
|
|
11253
11253
|
const i3 = t2.points[e2];
|
|
11254
|
-
this.points.push(new
|
|
11254
|
+
this.points.push(new I().fromArray(i3));
|
|
11255
11255
|
}
|
|
11256
11256
|
return this.closed = t2.closed, this.curveType = t2.curveType, this.tension = t2.tension, this;
|
|
11257
11257
|
}
|
|
@@ -11305,10 +11305,10 @@ var Slide = function(t) {
|
|
|
11305
11305
|
}
|
|
11306
11306
|
Ms.prototype.isCubicBezierCurve = true;
|
|
11307
11307
|
class As extends fs {
|
|
11308
|
-
constructor(t2 = new
|
|
11308
|
+
constructor(t2 = new I(), e2 = new I(), i2 = new I(), n2 = new I()) {
|
|
11309
11309
|
super(), this.type = "CubicBezierCurve3", this.v0 = t2, this.v1 = e2, this.v2 = i2, this.v3 = n2;
|
|
11310
11310
|
}
|
|
11311
|
-
getPoint(t2, e2 = new
|
|
11311
|
+
getPoint(t2, e2 = new I()) {
|
|
11312
11312
|
const i2 = e2, n2 = this.v0, r2 = this.v1, s2 = this.v2, o2 = this.v3;
|
|
11313
11313
|
return i2.set(Ss(t2, n2.x, r2.x, s2.x, o2.x), Ss(t2, n2.y, r2.y, s2.y, o2.y), Ss(t2, n2.z, r2.z, s2.z, o2.z)), i2;
|
|
11314
11314
|
}
|
|
@@ -11351,7 +11351,7 @@ var Slide = function(t) {
|
|
|
11351
11351
|
}
|
|
11352
11352
|
}
|
|
11353
11353
|
Ps.prototype.isLineCurve = true;
|
|
11354
|
-
class
|
|
11354
|
+
class Is extends fs {
|
|
11355
11355
|
constructor(t2 = new _(), e2 = new _(), i2 = new _()) {
|
|
11356
11356
|
super(), this.type = "QuadraticBezierCurve", this.v0 = t2, this.v1 = e2, this.v2 = i2;
|
|
11357
11357
|
}
|
|
@@ -11370,12 +11370,12 @@ var Slide = function(t) {
|
|
|
11370
11370
|
return super.fromJSON(t2), this.v0.fromArray(t2.v0), this.v1.fromArray(t2.v1), this.v2.fromArray(t2.v2), this;
|
|
11371
11371
|
}
|
|
11372
11372
|
}
|
|
11373
|
-
|
|
11374
|
-
class
|
|
11375
|
-
constructor(t2 = new
|
|
11373
|
+
Is.prototype.isQuadraticBezierCurve = true;
|
|
11374
|
+
class Rs extends fs {
|
|
11375
|
+
constructor(t2 = new I(), e2 = new I(), i2 = new I()) {
|
|
11376
11376
|
super(), this.type = "QuadraticBezierCurve3", this.v0 = t2, this.v1 = e2, this.v2 = i2;
|
|
11377
11377
|
}
|
|
11378
|
-
getPoint(t2, e2 = new
|
|
11378
|
+
getPoint(t2, e2 = new I()) {
|
|
11379
11379
|
const i2 = e2, n2 = this.v0, r2 = this.v1, s2 = this.v2;
|
|
11380
11380
|
return i2.set(ws(t2, n2.x, r2.x, s2.x), ws(t2, n2.y, r2.y, s2.y), ws(t2, n2.z, r2.z, s2.z)), i2;
|
|
11381
11381
|
}
|
|
@@ -11390,7 +11390,7 @@ var Slide = function(t) {
|
|
|
11390
11390
|
return super.fromJSON(t2), this.v0.fromArray(t2.v0), this.v1.fromArray(t2.v1), this.v2.fromArray(t2.v2), this;
|
|
11391
11391
|
}
|
|
11392
11392
|
}
|
|
11393
|
-
|
|
11393
|
+
Rs.prototype.isQuadraticBezierCurve3 = true;
|
|
11394
11394
|
class Cs extends fs {
|
|
11395
11395
|
constructor(t2 = []) {
|
|
11396
11396
|
super(), this.type = "SplineCurve", this.points = t2;
|
|
@@ -11427,10 +11427,10 @@ var Slide = function(t) {
|
|
|
11427
11427
|
}
|
|
11428
11428
|
Cs.prototype.isSplineCurve = true;
|
|
11429
11429
|
var Ls = Object.freeze({ __proto__: null, ArcCurve: gs, CatmullRomCurve3: Ts, CubicBezierCurve: Ms, CubicBezierCurve3: As, EllipseCurve: ms, LineCurve: Ps, LineCurve3: class extends fs {
|
|
11430
|
-
constructor(t2 = new
|
|
11430
|
+
constructor(t2 = new I(), e2 = new I()) {
|
|
11431
11431
|
super(), this.type = "LineCurve3", this.isLineCurve3 = true, this.v1 = t2, this.v2 = e2;
|
|
11432
11432
|
}
|
|
11433
|
-
getPoint(t2, e2 = new
|
|
11433
|
+
getPoint(t2, e2 = new I()) {
|
|
11434
11434
|
const i2 = e2;
|
|
11435
11435
|
return t2 === 1 ? i2.copy(this.v2) : (i2.copy(this.v2).sub(this.v1), i2.multiplyScalar(t2).add(this.v1)), i2;
|
|
11436
11436
|
}
|
|
@@ -11447,7 +11447,7 @@ var Slide = function(t) {
|
|
|
11447
11447
|
fromJSON(t2) {
|
|
11448
11448
|
return super.fromJSON(t2), this.v1.fromArray(t2.v1), this.v2.fromArray(t2.v2), this;
|
|
11449
11449
|
}
|
|
11450
|
-
}, QuadraticBezierCurve:
|
|
11450
|
+
}, QuadraticBezierCurve: Is, QuadraticBezierCurve3: Rs, SplineCurve: Cs });
|
|
11451
11451
|
const Ns = function(t2, e2, i2 = 2) {
|
|
11452
11452
|
const n2 = e2 && e2.length, r2 = n2 ? e2[0] * i2 : t2.length;
|
|
11453
11453
|
let s2 = Os(t2, 0, r2, i2, true);
|
|
@@ -11743,7 +11743,7 @@ var Slide = function(t) {
|
|
|
11743
11743
|
const f2 = e2.extrudePath, m2 = e2.UVGenerator !== void 0 ? e2.UVGenerator : lo;
|
|
11744
11744
|
e2.amount !== void 0 && (console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."), l2 = e2.amount);
|
|
11745
11745
|
let g2, v2, y2, x2, b2, T2 = false;
|
|
11746
|
-
f2 && (g2 = f2.getSpacedPoints(a2), T2 = true, h2 = false, v2 = f2.computeFrenetFrames(a2, false), y2 = new
|
|
11746
|
+
f2 && (g2 = f2.getSpacedPoints(a2), T2 = true, h2 = false, v2 = f2.computeFrenetFrames(a2, false), y2 = new I(), x2 = new I(), b2 = new I()), h2 || (p2 = 0, c2 = 0, u2 = 0, d2 = 0);
|
|
11747
11747
|
const E2 = t3.extractPoints(o2);
|
|
11748
11748
|
let w2 = E2.shape;
|
|
11749
11749
|
const S2 = E2.holes;
|
|
@@ -11762,7 +11762,7 @@ var Slide = function(t) {
|
|
|
11762
11762
|
function P2(t4, e3, i3) {
|
|
11763
11763
|
return e3 || console.error("THREE.ExtrudeGeometry: vec does not exist"), e3.clone().multiplyScalar(i3).add(t4);
|
|
11764
11764
|
}
|
|
11765
|
-
const
|
|
11765
|
+
const R2 = w2.length, C2 = M2.length;
|
|
11766
11766
|
function L2(t4, e3, i3) {
|
|
11767
11767
|
let n3, r3, s4;
|
|
11768
11768
|
const o3 = t4.x - e3.x, a3 = t4.y - e3.y, l3 = i3.x - t4.x, h3 = i3.y - t4.y, c3 = o3 * o3 + a3 * a3, u3 = o3 * h3 - a3 * l3;
|
|
@@ -11807,12 +11807,12 @@ var Slide = function(t) {
|
|
|
11807
11807
|
}
|
|
11808
11808
|
}
|
|
11809
11809
|
const U2 = u2 + d2;
|
|
11810
|
-
for (let t4 = 0; t4 <
|
|
11810
|
+
for (let t4 = 0; t4 < R2; t4++) {
|
|
11811
11811
|
const e3 = h2 ? P2(w2[t4], F2[t4], U2) : w2[t4];
|
|
11812
11812
|
T2 ? (x2.copy(v2.normals[0]).multiplyScalar(e3.x), y2.copy(v2.binormals[0]).multiplyScalar(e3.y), b2.copy(g2[0]).add(x2).add(y2), B2(b2.x, b2.y, b2.z)) : B2(e3.x, e3.y, 0);
|
|
11813
11813
|
}
|
|
11814
11814
|
for (let t4 = 1; t4 <= a2; t4++)
|
|
11815
|
-
for (let e3 = 0; e3 <
|
|
11815
|
+
for (let e3 = 0; e3 < R2; e3++) {
|
|
11816
11816
|
const i3 = h2 ? P2(w2[e3], F2[e3], U2) : w2[e3];
|
|
11817
11817
|
T2 ? (x2.copy(v2.normals[t4]).multiplyScalar(i3.x), y2.copy(v2.binormals[t4]).multiplyScalar(i3.y), b2.copy(g2[t4]).add(x2).add(y2), B2(b2.x, b2.y, b2.z)) : B2(i3.x, i3.y, l2 / a2 * t4);
|
|
11818
11818
|
}
|
|
@@ -11838,7 +11838,7 @@ var Slide = function(t) {
|
|
|
11838
11838
|
let r3 = i3 - 1;
|
|
11839
11839
|
r3 < 0 && (r3 = t4.length - 1);
|
|
11840
11840
|
for (let t5 = 0, i4 = a2 + 2 * p2; t5 < i4; t5++) {
|
|
11841
|
-
const i5 =
|
|
11841
|
+
const i5 = R2 * t5, s4 = R2 * (t5 + 1);
|
|
11842
11842
|
H2(e3 + n3 + i5, e3 + r3 + i5, e3 + r3 + s4, e3 + n3 + s4);
|
|
11843
11843
|
}
|
|
11844
11844
|
}
|
|
@@ -11865,12 +11865,12 @@ var Slide = function(t) {
|
|
|
11865
11865
|
!function() {
|
|
11866
11866
|
const t4 = n2.length / 3;
|
|
11867
11867
|
if (h2) {
|
|
11868
|
-
let t5 = 0, e3 =
|
|
11868
|
+
let t5 = 0, e3 = R2 * t5;
|
|
11869
11869
|
for (let t6 = 0; t6 < C2; t6++) {
|
|
11870
11870
|
const i3 = M2[t6];
|
|
11871
11871
|
G2(i3[2] + e3, i3[1] + e3, i3[0] + e3);
|
|
11872
11872
|
}
|
|
11873
|
-
t5 = a2 + 2 * p2, e3 =
|
|
11873
|
+
t5 = a2 + 2 * p2, e3 = R2 * t5;
|
|
11874
11874
|
for (let t6 = 0; t6 < C2; t6++) {
|
|
11875
11875
|
const i3 = M2[t6];
|
|
11876
11876
|
G2(i3[0] + e3, i3[1] + e3, i3[2] + e3);
|
|
@@ -11882,7 +11882,7 @@ var Slide = function(t) {
|
|
|
11882
11882
|
}
|
|
11883
11883
|
for (let t5 = 0; t5 < C2; t5++) {
|
|
11884
11884
|
const e3 = M2[t5];
|
|
11885
|
-
G2(e3[0] +
|
|
11885
|
+
G2(e3[0] + R2 * a2, e3[1] + R2 * a2, e3[2] + R2 * a2);
|
|
11886
11886
|
}
|
|
11887
11887
|
}
|
|
11888
11888
|
i2.addGroup(t4, n2.length / 3 - t4, 0);
|
|
@@ -12492,10 +12492,10 @@ var Slide = function(t) {
|
|
|
12492
12492
|
class Po extends Mo {
|
|
12493
12493
|
}
|
|
12494
12494
|
Po.prototype.ValueTypeName = "color";
|
|
12495
|
-
class
|
|
12495
|
+
class Io extends Mo {
|
|
12496
12496
|
}
|
|
12497
|
-
|
|
12498
|
-
class
|
|
12497
|
+
Io.prototype.ValueTypeName = "number";
|
|
12498
|
+
class Ro extends To {
|
|
12499
12499
|
constructor(t2, e2, i2, n2) {
|
|
12500
12500
|
super(t2, e2, i2, n2);
|
|
12501
12501
|
}
|
|
@@ -12509,7 +12509,7 @@ var Slide = function(t) {
|
|
|
12509
12509
|
}
|
|
12510
12510
|
class Co extends Mo {
|
|
12511
12511
|
InterpolantFactoryMethodLinear(t2) {
|
|
12512
|
-
return new
|
|
12512
|
+
return new Ro(this.times, this.values, this.getValueSize(), t2);
|
|
12513
12513
|
}
|
|
12514
12514
|
}
|
|
12515
12515
|
Co.prototype.ValueTypeName = "quaternion", Co.prototype.DefaultInterpolation = 2301, Co.prototype.InterpolantFactoryMethodSmooth = void 0;
|
|
@@ -12542,7 +12542,7 @@ var Slide = function(t) {
|
|
|
12542
12542
|
let o2 = [], a2 = [];
|
|
12543
12543
|
o2.push((t3 + r2 - 1) % r2, t3, (t3 + 1) % r2), a2.push(0, 1, 0);
|
|
12544
12544
|
const l2 = bo.getKeyframeOrder(o2);
|
|
12545
|
-
o2 = bo.sortedArray(o2, 1, l2), a2 = bo.sortedArray(a2, 1, l2), n2 || o2[0] !== 0 || (o2.push(r2), a2.push(a2[0])), s2.push(new
|
|
12545
|
+
o2 = bo.sortedArray(o2, 1, l2), a2 = bo.sortedArray(a2, 1, l2), n2 || o2[0] !== 0 || (o2.push(r2), a2.push(a2[0])), s2.push(new Io(".morphTargetInfluences[" + e2[t3].name + "]", o2, a2).scale(1 / i2));
|
|
12546
12546
|
}
|
|
12547
12547
|
return new this(t2, -1, s2);
|
|
12548
12548
|
}
|
|
@@ -12599,7 +12599,7 @@ var Slide = function(t) {
|
|
|
12599
12599
|
const n4 = r3[e3];
|
|
12600
12600
|
t5.push(n4.time), s3.push(n4.morphTarget === i3 ? 1 : 0);
|
|
12601
12601
|
}
|
|
12602
|
-
n2.push(new
|
|
12602
|
+
n2.push(new Io(".morphTargetInfluence[" + i3 + "]", t5, s3));
|
|
12603
12603
|
}
|
|
12604
12604
|
a2 = t4.length * (s2 || 1);
|
|
12605
12605
|
} else {
|
|
@@ -12655,7 +12655,7 @@ var Slide = function(t) {
|
|
|
12655
12655
|
case "float":
|
|
12656
12656
|
case "number":
|
|
12657
12657
|
case "integer":
|
|
12658
|
-
return
|
|
12658
|
+
return Io;
|
|
12659
12659
|
case "vector":
|
|
12660
12660
|
case "vector2":
|
|
12661
12661
|
case "vector3":
|
|
@@ -13005,7 +13005,7 @@ var Slide = function(t) {
|
|
|
13005
13005
|
return this.curves.push(i2), this.currentPoint.set(t2, e2), this;
|
|
13006
13006
|
}
|
|
13007
13007
|
quadraticCurveTo(t2, e2, i2, n2) {
|
|
13008
|
-
const r2 = new
|
|
13008
|
+
const r2 = new Is(this.currentPoint.clone(), new _(t2, e2), new _(i2, n2));
|
|
13009
13009
|
return this.curves.push(r2), this.currentPoint.set(i2, n2), this;
|
|
13010
13010
|
}
|
|
13011
13011
|
bezierCurveTo(t2, e2, i2, n2, r2, s2) {
|
|
@@ -13111,7 +13111,7 @@ var Slide = function(t) {
|
|
|
13111
13111
|
}
|
|
13112
13112
|
}
|
|
13113
13113
|
Zo.prototype.isHemisphereLight = true;
|
|
13114
|
-
const Jo = new ot(), Ko = new
|
|
13114
|
+
const Jo = new ot(), Ko = new I(), $o = new I();
|
|
13115
13115
|
class Qo {
|
|
13116
13116
|
constructor(t2) {
|
|
13117
13117
|
this.camera = t2, this.bias = 0, this.normalBias = 0, this.radius = 1, this.mapSize = new _(512, 512), this.map = null, this.mapPass = null, this.matrix = new ot(), this.autoUpdate = true, this.needsUpdate = false, this._frustum = new Je(), this._frameExtents = new _(1, 1), this._viewportCount = 1, this._viewports = [new S(0, 0, 1, 1)];
|
|
@@ -13177,10 +13177,10 @@ var Slide = function(t) {
|
|
|
13177
13177
|
}
|
|
13178
13178
|
}
|
|
13179
13179
|
ea.prototype.isSpotLight = true;
|
|
13180
|
-
const ia = new ot(), na = new
|
|
13180
|
+
const ia = new ot(), na = new I(), ra = new I();
|
|
13181
13181
|
class sa extends Qo {
|
|
13182
13182
|
constructor() {
|
|
13183
|
-
super(new Ge(90, 1, 0.5, 500)), this._frameExtents = new _(4, 2), this._viewportCount = 6, this._viewports = [new S(2, 1, 1, 1), new S(0, 1, 1, 1), new S(3, 1, 1, 1), new S(1, 1, 1, 1), new S(3, 0, 1, 1), new S(1, 0, 1, 1)], this._cubeDirections = [new
|
|
13183
|
+
super(new Ge(90, 1, 0.5, 500)), this._frameExtents = new _(4, 2), this._viewportCount = 6, this._viewports = [new S(2, 1, 1, 1), new S(0, 1, 1, 1), new S(3, 1, 1, 1), new S(1, 1, 1, 1), new S(3, 0, 1, 1), new S(1, 0, 1, 1)], this._cubeDirections = [new I(1, 0, 0), new I(-1, 0, 0), new I(0, 0, 1), new I(0, 0, -1), new I(0, 1, 0), new I(0, -1, 0)], this._cubeUps = [new I(0, 1, 0), new I(0, 1, 0), new I(0, 1, 0), new I(0, 1, 0), new I(0, 0, 1), new I(0, 0, -1)];
|
|
13184
13184
|
}
|
|
13185
13185
|
updateMatrices(t2, e2 = 0) {
|
|
13186
13186
|
const i2 = this.camera, n2 = this.matrix, r2 = t2.distance || i2.far;
|
|
@@ -13275,7 +13275,7 @@ var Slide = function(t) {
|
|
|
13275
13275
|
constructor() {
|
|
13276
13276
|
this.coefficients = [];
|
|
13277
13277
|
for (let t2 = 0; t2 < 9; t2++)
|
|
13278
|
-
this.coefficients.push(new
|
|
13278
|
+
this.coefficients.push(new I());
|
|
13279
13279
|
}
|
|
13280
13280
|
set(t2) {
|
|
13281
13281
|
for (let e2 = 0; e2 < 9; e2++)
|
|
@@ -13459,7 +13459,7 @@ var Slide = function(t) {
|
|
|
13459
13459
|
(class extends pa {
|
|
13460
13460
|
constructor(t2, e2, i2 = 1) {
|
|
13461
13461
|
super(void 0, i2);
|
|
13462
|
-
const n2 = new Kt().set(t2), r2 = new Kt().set(e2), s2 = new
|
|
13462
|
+
const n2 = new Kt().set(t2), r2 = new Kt().set(e2), s2 = new I(n2.r, n2.g, n2.b), o2 = new I(r2.r, r2.g, r2.b), a2 = Math.sqrt(Math.PI), l2 = a2 * Math.sqrt(0.75);
|
|
13463
13463
|
this.sh.coefficients[0].copy(s2).add(o2).multiplyScalar(a2), this.sh.coefficients[1].copy(s2).sub(o2).multiplyScalar(l2);
|
|
13464
13464
|
}
|
|
13465
13465
|
}).prototype.isHemisphereLightProbe = true;
|
|
@@ -13676,7 +13676,7 @@ var Slide = function(t) {
|
|
|
13676
13676
|
}
|
|
13677
13677
|
}
|
|
13678
13678
|
}
|
|
13679
|
-
const Sa = new RegExp("[\\[\\]\\.:\\/]", "g"), Ma = "[^" + "\\[\\]\\.:\\/".replace("\\.", "") + "]", Aa = /((?:WC+[\/:])*)/.source.replace("WC", "[^\\[\\]\\.:\\/]"), Pa = /(WCOD+)?/.source.replace("WCOD", Ma),
|
|
13679
|
+
const Sa = new RegExp("[\\[\\]\\.:\\/]", "g"), Ma = "[^" + "\\[\\]\\.:\\/".replace("\\.", "") + "]", Aa = /((?:WC+[\/:])*)/.source.replace("WC", "[^\\[\\]\\.:\\/]"), Pa = /(WCOD+)?/.source.replace("WCOD", Ma), Ia = /(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC", "[^\\[\\]\\.:\\/]"), Ra = /\.(WC+)(?:\[(.+)\])?/.source.replace("WC", "[^\\[\\]\\.:\\/]"), Ca = new RegExp("^" + Aa + Pa + Ia + Ra + "$"), La = ["material", "materials", "bones"];
|
|
13680
13680
|
class Na {
|
|
13681
13681
|
constructor(t2, e2, i2) {
|
|
13682
13682
|
this.path = e2, this.parsedPath = i2 || Na.parseTrackName(e2), this.node = Na.findNode(t2, this.parsedPath.nodeName) || t2, this.rootNode = t2, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
|
|
@@ -14300,15 +14300,15 @@ var Slide = function(t) {
|
|
|
14300
14300
|
}
|
|
14301
14301
|
}).prototype.isInstancedInterleavedBuffer = true;
|
|
14302
14302
|
new _();
|
|
14303
|
-
new
|
|
14304
|
-
new
|
|
14303
|
+
new I();
|
|
14304
|
+
new I();
|
|
14305
14305
|
(class extends Ct {
|
|
14306
14306
|
constructor(t2) {
|
|
14307
14307
|
super(), this.material = t2, this.render = function() {
|
|
14308
14308
|
}, this.hasPositions = false, this.hasNormals = false, this.hasColors = false, this.hasUvs = false, this.positionArray = null, this.normalArray = null, this.colorArray = null, this.uvArray = null, this.count = 0;
|
|
14309
14309
|
}
|
|
14310
14310
|
}).prototype.isImmediateRenderObject = true;
|
|
14311
|
-
const Ga = new
|
|
14311
|
+
const Ga = new I(), Ha = new ot(), ja = new ot();
|
|
14312
14312
|
const za = new Float32Array(1);
|
|
14313
14313
|
new Int32Array(za.buffer);
|
|
14314
14314
|
const Va = [0.125, 0.215, 0.35, 0.446, 0.526, 0.582], Wa = 5 + Va.length, Xa = new $t({ side: 1, depthWrite: false, depthTest: false });
|
|
@@ -14416,7 +14416,7 @@ var Slide = function(t) {
|
|
|
14416
14416
|
}, ot.prototype.flattenToArrayOffset = function(t2, e2) {
|
|
14417
14417
|
return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t2, e2);
|
|
14418
14418
|
}, ot.prototype.getPosition = function() {
|
|
14419
|
-
return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), new
|
|
14419
|
+
return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), new I().setFromMatrixColumn(this, 3);
|
|
14420
14420
|
}, ot.prototype.setRotationFromQuaternion = function(t2) {
|
|
14421
14421
|
return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(t2);
|
|
14422
14422
|
}, ot.prototype.multiplyToArray = function() {
|
|
@@ -14487,23 +14487,23 @@ var Slide = function(t) {
|
|
|
14487
14487
|
return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t2);
|
|
14488
14488
|
}, _.prototype.lengthManhattan = function() {
|
|
14489
14489
|
return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength();
|
|
14490
|
-
},
|
|
14490
|
+
}, I.prototype.setEulerFromRotationMatrix = function() {
|
|
14491
14491
|
console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.");
|
|
14492
|
-
},
|
|
14492
|
+
}, I.prototype.setEulerFromQuaternion = function() {
|
|
14493
14493
|
console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.");
|
|
14494
|
-
},
|
|
14494
|
+
}, I.prototype.getPositionFromMatrix = function(t2) {
|
|
14495
14495
|
return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(t2);
|
|
14496
|
-
},
|
|
14496
|
+
}, I.prototype.getScaleFromMatrix = function(t2) {
|
|
14497
14497
|
return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(t2);
|
|
14498
|
-
},
|
|
14498
|
+
}, I.prototype.getColumnFromMatrix = function(t2, e2) {
|
|
14499
14499
|
return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(e2, t2);
|
|
14500
|
-
},
|
|
14500
|
+
}, I.prototype.applyProjection = function(t2) {
|
|
14501
14501
|
return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."), this.applyMatrix4(t2);
|
|
14502
|
-
},
|
|
14502
|
+
}, I.prototype.fromAttribute = function(t2, e2, i2) {
|
|
14503
14503
|
return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t2, e2, i2);
|
|
14504
|
-
},
|
|
14504
|
+
}, I.prototype.distanceToManhattan = function(t2) {
|
|
14505
14505
|
return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t2);
|
|
14506
|
-
},
|
|
14506
|
+
}, I.prototype.lengthManhattan = function() {
|
|
14507
14507
|
return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength();
|
|
14508
14508
|
}, S.prototype.fromAttribute = function(t2, e2, i2) {
|
|
14509
14509
|
return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t2, e2, i2);
|
|
@@ -14834,7 +14834,7 @@ var Slide = function(t) {
|
|
|
14834
14834
|
var El = i(64), wl = i.n(El);
|
|
14835
14835
|
var Sl = i(65), Ml = i.n(Sl);
|
|
14836
14836
|
var Al = i(66), Pl = i.n(Al);
|
|
14837
|
-
var
|
|
14837
|
+
var Il = i(67), Rl = i.n(Il);
|
|
14838
14838
|
var Cl = i(68), Ll = i.n(Cl);
|
|
14839
14839
|
var Nl = i(69), Ol = i.n(Nl);
|
|
14840
14840
|
class Dl {
|
|
@@ -15049,7 +15049,7 @@ var Slide = function(t) {
|
|
|
15049
15049
|
}
|
|
15050
15050
|
}, Uncover: class extends ol {
|
|
15051
15051
|
constructor() {
|
|
15052
|
-
super(...arguments), this.duration = 750, this.fragmentShader =
|
|
15052
|
+
super(...arguments), this.duration = 750, this.fragmentShader = Rl.a, this.options = [], this.defaultDir = "right", this.optionsMap = { [this.defaultDir]: 0, d: 1, r: 2, u: 3, ld: 4, lu: 5, rd: 6, ru: 7 }, this.selfOptionsList = [{ x: -1, y: 0 }, { x: 0, y: -1 }, { x: 1, y: 0 }, { x: 0, y: 1 }, { x: -1, y: -1 }, { x: -1, y: 1 }, { x: 1, y: -1 }, { x: 1, y: 1 }];
|
|
15053
15053
|
}
|
|
15054
15054
|
applyOptions(t2) {
|
|
15055
15055
|
var e2;
|
|
@@ -15289,7 +15289,7 @@ var Slide = function(t) {
|
|
|
15289
15289
|
this.dispose(), this.renderer.forceContextLoss(), this.renderer.dispose();
|
|
15290
15290
|
}
|
|
15291
15291
|
}
|
|
15292
|
-
var Mh = /iPhone/i, Ah = /iPod/i, Ph = /iPad/i,
|
|
15292
|
+
var Mh = /iPhone/i, Ah = /iPod/i, Ph = /iPad/i, Ih = /\biOS-universal(?:.+)Mac\b/i, Rh = /\bAndroid(?:.+)Mobile\b/i, Ch = /Android/i, Lh = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, Nh = /Silk/i, Oh = /Windows Phone/i, Dh = /\bWindows(?:.+)ARM\b/i, Fh = /BlackBerry/i, Uh = /BB10/i, kh = /Opera Mini/i, Bh = /\b(CriOS|Chrome)(?:.+)Mobile/i, Gh = /Mobile(?:.+)Firefox\b/i, Hh = function(t2) {
|
|
15293
15293
|
return t2 !== void 0 && t2.platform === "MacIntel" && typeof t2.maxTouchPoints == "number" && t2.maxTouchPoints > 1 && typeof MSStream == "undefined";
|
|
15294
15294
|
};
|
|
15295
15295
|
/*!
|
|
@@ -15308,7 +15308,7 @@ var Slide = function(t) {
|
|
|
15308
15308
|
return function(e3) {
|
|
15309
15309
|
return e3.test(t3);
|
|
15310
15310
|
};
|
|
15311
|
-
}(i2), s2 = { apple: { phone: r2(Mh) && !r2(Oh), ipod: r2(Ah), tablet: !r2(Mh) && (r2(Ph) || Hh(e2)) && !r2(Oh), universal: r2(
|
|
15311
|
+
}(i2), s2 = { apple: { phone: r2(Mh) && !r2(Oh), ipod: r2(Ah), tablet: !r2(Mh) && (r2(Ph) || Hh(e2)) && !r2(Oh), universal: r2(Ih), device: (r2(Mh) || r2(Ah) || r2(Ph) || r2(Ih) || Hh(e2)) && !r2(Oh) }, amazon: { phone: r2(Lh), tablet: !r2(Lh) && r2(Nh), device: r2(Lh) || r2(Nh) }, android: { phone: !r2(Oh) && r2(Lh) || !r2(Oh) && r2(Rh), tablet: !r2(Oh) && !r2(Lh) && !r2(Rh) && (r2(Nh) || r2(Ch)), device: !r2(Oh) && (r2(Lh) || r2(Nh) || r2(Rh) || r2(Ch)) || r2(/\bokhttp\b/i) }, windows: { phone: r2(Oh), tablet: r2(Dh), device: r2(Oh) || r2(Dh) }, other: { blackberry: r2(Fh), blackberry10: r2(Uh), opera: r2(kh), firefox: r2(Gh), chrome: r2(Bh), device: r2(Fh) || r2(Uh) || r2(kh) || r2(Gh) || r2(Bh) }, any: false, phone: false, tablet: false };
|
|
15312
15312
|
return s2.any = s2.apple.device || s2.android.device || s2.windows.device || s2.other.device, s2.phone = s2.apple.phone || s2.android.phone || s2.windows.phone, s2.tablet = s2.apple.tablet || s2.android.tablet || s2.windows.tablet, s2;
|
|
15313
15313
|
}(globalThis.navigator);
|
|
15314
15314
|
!function(t2) {
|
|
@@ -15364,7 +15364,7 @@ var Slide = function(t) {
|
|
|
15364
15364
|
}
|
|
15365
15365
|
}
|
|
15366
15366
|
return e2 ? t2 : 4;
|
|
15367
|
-
}(32), SPRITE_BATCH_SIZE: 4096, RENDER_OPTIONS: { view: null, antialias: false, autoDensity: false, backgroundColor: 0, backgroundAlpha: 1, useContextAlpha: true, clearBeforeRender: true, preserveDrawingBuffer: false, width: 800, height: 600, legacy: false }, GC_MODE: ic.AUTO, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: $h.CLAMP, SCALE_MODE: Kh.LINEAR, PRECISION_VERTEX: nc.HIGH, PRECISION_FRAGMENT: ac.apple.device ? nc.HIGH : nc.MEDIUM, CAN_UPLOAD_SAME_BUFFER: !ac.apple.device, CREATE_IMAGE_BITMAP: false, ROUND_PIXELS: false }, Pc = i(36),
|
|
15367
|
+
}(32), SPRITE_BATCH_SIZE: 4096, RENDER_OPTIONS: { view: null, antialias: false, autoDensity: false, backgroundColor: 0, backgroundAlpha: 1, useContextAlpha: true, clearBeforeRender: true, preserveDrawingBuffer: false, width: 800, height: 600, legacy: false }, GC_MODE: ic.AUTO, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: $h.CLAMP, SCALE_MODE: Kh.LINEAR, PRECISION_VERTEX: nc.HIGH, PRECISION_FRAGMENT: ac.apple.device ? nc.HIGH : nc.MEDIUM, CAN_UPLOAD_SAME_BUFFER: !ac.apple.device, CREATE_IMAGE_BITMAP: false, ROUND_PIXELS: false }, Pc = i(36), Ic = i.n(Pc), Rc = i(37), Cc = i.n(Rc), Lc = i(22);
|
|
15368
15368
|
!function(t2) {
|
|
15369
15369
|
t2[t2.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.WEBGL2 = 2] = "WEBGL2";
|
|
15370
15370
|
}(lc || (lc = {})), function(t2) {
|
|
@@ -15729,7 +15729,7 @@ var Slide = function(t) {
|
|
|
15729
15729
|
}, t2.prototype.toString = function() {
|
|
15730
15730
|
return "[@pixi/math:Ellipse x=" + this.x + " y=" + this.y + " width=" + this.width + " height=" + this.height + "]";
|
|
15731
15731
|
}, t2;
|
|
15732
|
-
}(),
|
|
15732
|
+
}(), Iu = function() {
|
|
15733
15733
|
function t2() {
|
|
15734
15734
|
for (var t3 = arguments, e2 = [], i2 = 0; i2 < arguments.length; i2++)
|
|
15735
15735
|
e2[i2] = t3[i2];
|
|
@@ -15755,7 +15755,7 @@ var Slide = function(t) {
|
|
|
15755
15755
|
return t3 + ", " + e2;
|
|
15756
15756
|
}, "") + "]";
|
|
15757
15757
|
}, t2;
|
|
15758
|
-
}(),
|
|
15758
|
+
}(), Ru = function() {
|
|
15759
15759
|
function t2(t3, e2, i2, n2, r2) {
|
|
15760
15760
|
t3 === void 0 && (t3 = 0), e2 === void 0 && (e2 = 0), i2 === void 0 && (i2 = 0), n2 === void 0 && (n2 = 0), r2 === void 0 && (r2 = 20), this.x = t3, this.y = e2, this.width = i2, this.height = n2, this.radius = r2, this.type = xu.RREC;
|
|
15761
15761
|
}
|
|
@@ -16136,7 +16136,7 @@ var Slide = function(t) {
|
|
|
16136
16136
|
(e3 = this._mask.maskObject || this._mask)._maskRefCount === 0 && (e3.renderable = false, e3.isMask = true), e3._maskRefCount++;
|
|
16137
16137
|
}
|
|
16138
16138
|
}, enumerable: false, configurable: true }), e2;
|
|
16139
|
-
}(
|
|
16139
|
+
}(Ic.a), ud = function(t2) {
|
|
16140
16140
|
function e2() {
|
|
16141
16141
|
var e3 = t2 !== null && t2.apply(this, arguments) || this;
|
|
16142
16142
|
return e3.sortDirty = null, e3;
|
|
@@ -16733,7 +16733,7 @@ var Slide = function(t) {
|
|
|
16733
16733
|
}
|
|
16734
16734
|
return null;
|
|
16735
16735
|
}, e2._globalBatch = 0, e2;
|
|
16736
|
-
}(
|
|
16736
|
+
}(Ic.a), Pd = function(t2) {
|
|
16737
16737
|
function e2(e3, i2) {
|
|
16738
16738
|
var n2 = this, r2 = i2 || {}, s2 = r2.width, o2 = r2.height;
|
|
16739
16739
|
(n2 = t2.call(this, s2, o2) || this).items = [], n2.itemDirtyIds = [];
|
|
@@ -16780,7 +16780,7 @@ var Slide = function(t) {
|
|
|
16780
16780
|
return t3.resize(i2, n2), Promise.resolve(t3);
|
|
16781
16781
|
}), this._load;
|
|
16782
16782
|
}, e2;
|
|
16783
|
-
}(wd),
|
|
16783
|
+
}(wd), Id = function(t2) {
|
|
16784
16784
|
function e2(e3, i2) {
|
|
16785
16785
|
var n2, r2, s2 = this, o2 = i2 || {}, a2 = o2.width, l2 = o2.height;
|
|
16786
16786
|
return Array.isArray(e3) ? (n2 = e3, r2 = e3.length) : r2 = e3, s2 = t2.call(this, r2, { width: a2, height: l2 }) || this, n2 && s2.initFromArray(n2, i2), s2;
|
|
@@ -16800,7 +16800,7 @@ var Slide = function(t) {
|
|
|
16800
16800
|
}
|
|
16801
16801
|
return true;
|
|
16802
16802
|
}, e2;
|
|
16803
|
-
}(Pd),
|
|
16803
|
+
}(Pd), Rd = function(t2) {
|
|
16804
16804
|
function e2(e3) {
|
|
16805
16805
|
var i2 = this, n2 = e3, r2 = n2.naturalWidth || n2.videoWidth || n2.width, s2 = n2.naturalHeight || n2.videoHeight || n2.height;
|
|
16806
16806
|
return (i2 = t2.call(this, r2, s2) || this).source = e3, i2.noSubImage = false, i2;
|
|
@@ -16831,7 +16831,7 @@ var Slide = function(t) {
|
|
|
16831
16831
|
var e3 = globalThis.OffscreenCanvas;
|
|
16832
16832
|
return !!(e3 && t3 instanceof e3) || globalThis.HTMLCanvasElement && t3 instanceof HTMLCanvasElement;
|
|
16833
16833
|
}, e2;
|
|
16834
|
-
}(
|
|
16834
|
+
}(Rd), Ld = function(t2) {
|
|
16835
16835
|
function e2(i2, n2) {
|
|
16836
16836
|
var r2 = this, s2 = n2 || {}, o2 = s2.width, a2 = s2.height, l2 = s2.autoLoad, h2 = s2.linkBaseTexture;
|
|
16837
16837
|
if (i2 && i2.length !== e2.SIDES)
|
|
@@ -16867,7 +16867,7 @@ var Slide = function(t) {
|
|
|
16867
16867
|
var n2 = this;
|
|
16868
16868
|
if (i2 = i2 || {}, !(e3 instanceof HTMLImageElement)) {
|
|
16869
16869
|
var r2 = new Image();
|
|
16870
|
-
|
|
16870
|
+
Rd.crossOrigin(r2, e3, i2.crossorigin), r2.src = e3, e3 = r2;
|
|
16871
16871
|
}
|
|
16872
16872
|
return n2 = t2.call(this, e3) || this, !e3.complete && n2._width && n2._height && (n2._width = 0, n2._height = 0), n2.url = e3.src, n2._process = null, n2.preserveBitmap = false, n2.createBitmap = (i2.createBitmap !== void 0 ? i2.createBitmap : Ac.CREATE_IMAGE_BITMAP) && !!globalThis.createImageBitmap, n2.alphaMode = typeof i2.alphaMode == "number" ? i2.alphaMode : null, n2.bitmap = null, n2._load = null, i2.autoLoad !== false && n2.load(), n2;
|
|
16873
16873
|
}
|
|
@@ -16919,7 +16919,7 @@ var Slide = function(t) {
|
|
|
16919
16919
|
}, e2.test = function(t3) {
|
|
16920
16920
|
return typeof t3 == "string" || t3 instanceof HTMLImageElement;
|
|
16921
16921
|
}, e2;
|
|
16922
|
-
}(
|
|
16922
|
+
}(Rd), Od = function(t2) {
|
|
16923
16923
|
function e2(e3, i2) {
|
|
16924
16924
|
var n2 = this;
|
|
16925
16925
|
return i2 = i2 || {}, (n2 = t2.call(this, document.createElement("canvas")) || this)._width = 0, n2._height = 0, n2.svg = e3, n2.scale = i2.scale || 1, n2._overrideWidth = i2.width, n2._overrideHeight = i2.height, n2._resolve = null, n2._crossorigin = i2.crossorigin, n2._load = null, i2.autoLoad !== false && n2.load(), n2;
|
|
@@ -16938,7 +16938,7 @@ var Slide = function(t) {
|
|
|
16938
16938
|
})), this._load;
|
|
16939
16939
|
}, e2.prototype._loadSvg = function() {
|
|
16940
16940
|
var t3 = this, e3 = new Image();
|
|
16941
|
-
|
|
16941
|
+
Rd.crossOrigin(e3, this.svg, this._crossorigin), e3.src = this.svg, e3.onerror = function(i2) {
|
|
16942
16942
|
t3._resolve && (e3.onerror = null, t3.onError.emit(i2));
|
|
16943
16943
|
}, e3.onload = function() {
|
|
16944
16944
|
if (t3._resolve) {
|
|
@@ -16959,14 +16959,14 @@ var Slide = function(t) {
|
|
|
16959
16959
|
}, e2.test = function(t3, i2) {
|
|
16960
16960
|
return i2 === "svg" || typeof t3 == "string" && /^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t3) || typeof t3 == "string" && e2.SVG_XML.test(t3);
|
|
16961
16961
|
}, e2.SVG_XML = /^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m, e2.SVG_SIZE = /<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i, e2;
|
|
16962
|
-
}(
|
|
16962
|
+
}(Rd), Dd = function(t2) {
|
|
16963
16963
|
function e2(i2, n2) {
|
|
16964
16964
|
var r2 = this;
|
|
16965
16965
|
if (n2 = n2 || {}, !(i2 instanceof HTMLVideoElement)) {
|
|
16966
16966
|
var s2 = document.createElement("video");
|
|
16967
16967
|
s2.setAttribute("preload", "auto"), s2.setAttribute("webkit-playsinline", ""), s2.setAttribute("playsinline", ""), typeof i2 == "string" && (i2 = [i2]);
|
|
16968
16968
|
var o2 = i2[0].src || i2[0];
|
|
16969
|
-
|
|
16969
|
+
Rd.crossOrigin(s2, o2, n2.crossorigin);
|
|
16970
16970
|
for (var a2 = 0; a2 < i2.length; ++a2) {
|
|
16971
16971
|
var l2 = document.createElement("source"), h2 = i2[a2], c2 = h2.src, u2 = h2.mime, d2 = (c2 = c2 || i2[a2]).split("?").shift().toLowerCase(), p2 = d2.slice(d2.lastIndexOf(".") + 1);
|
|
16972
16972
|
u2 = u2 || e2.MIME_TYPES[p2] || "video/" + p2, l2.src = c2, l2.type = u2, s2.appendChild(l2);
|
|
@@ -17020,16 +17020,16 @@ var Slide = function(t) {
|
|
|
17020
17020
|
}, enumerable: false, configurable: true }), e2.test = function(t3, i2) {
|
|
17021
17021
|
return globalThis.HTMLVideoElement && t3 instanceof HTMLVideoElement || e2.TYPES.indexOf(i2) > -1;
|
|
17022
17022
|
}, e2.TYPES = ["mp4", "m4v", "webm", "ogg", "ogv", "h264", "avi", "mov"], e2.MIME_TYPES = { ogv: "video/ogg", mov: "video/quicktime", m4v: "video/mp4" }, e2;
|
|
17023
|
-
}(
|
|
17023
|
+
}(Rd), Fd = function(t2) {
|
|
17024
17024
|
function e2(e3) {
|
|
17025
17025
|
return t2.call(this, e3) || this;
|
|
17026
17026
|
}
|
|
17027
17027
|
return Td(e2, t2), e2.test = function(t3) {
|
|
17028
17028
|
return !!globalThis.createImageBitmap && t3 instanceof ImageBitmap;
|
|
17029
17029
|
}, e2;
|
|
17030
|
-
}(
|
|
17031
|
-
yd.push(Nd, Fd, Cd, Dd, Od, Sd, Ld,
|
|
17032
|
-
var Ud = { __proto__: null, Resource: wd, BaseImageResource:
|
|
17030
|
+
}(Rd);
|
|
17031
|
+
yd.push(Nd, Fd, Cd, Dd, Od, Sd, Ld, Id);
|
|
17032
|
+
var Ud = { __proto__: null, Resource: wd, BaseImageResource: Rd, INSTALLED: yd, autoDetectResource: xd, AbstractMultiResource: Pd, ArrayResource: Id, BufferResource: Sd, CanvasResource: Cd, CubeResource: Ld, ImageResource: Nd, SVGResource: Od, VideoResource: Dd, ImageBitmapResource: Fd }, kd = function(t2) {
|
|
17033
17033
|
function e2() {
|
|
17034
17034
|
return t2 !== null && t2.apply(this, arguments) || this;
|
|
17035
17035
|
}
|
|
@@ -17227,7 +17227,7 @@ var Slide = function(t) {
|
|
|
17227
17227
|
}
|
|
17228
17228
|
return e2._WHITE;
|
|
17229
17229
|
}, enumerable: false, configurable: true }), e2;
|
|
17230
|
-
}(
|
|
17230
|
+
}(Ic.a), Wd = function(t2) {
|
|
17231
17231
|
function e2(e3, i2) {
|
|
17232
17232
|
var n2 = t2.call(this, e3, i2) || this;
|
|
17233
17233
|
return n2.valid = true, n2.filterFrame = null, n2.filterPoolKey = null, n2.updateUvs(), n2;
|
|
@@ -17984,20 +17984,20 @@ var Slide = function(t) {
|
|
|
17984
17984
|
return i2 !== Ec.HIGH && t2.substring(0, 15) === "precision highp" ? t2.replace("precision highp", "precision mediump") : t2;
|
|
17985
17985
|
}
|
|
17986
17986
|
var Pp = { float: 1, vec2: 2, vec3: 3, vec4: 4, int: 1, ivec2: 2, ivec3: 3, ivec4: 4, uint: 1, uvec2: 2, uvec3: 3, uvec4: 4, bool: 1, bvec2: 2, bvec3: 3, bvec4: 4, mat2: 4, mat3: 9, mat4: 16, sampler2D: 1 };
|
|
17987
|
-
function
|
|
17987
|
+
function Ip(t2) {
|
|
17988
17988
|
return Pp[t2];
|
|
17989
17989
|
}
|
|
17990
|
-
var
|
|
17990
|
+
var Rp = null, Cp = { FLOAT: "float", FLOAT_VEC2: "vec2", FLOAT_VEC3: "vec3", FLOAT_VEC4: "vec4", INT: "int", INT_VEC2: "ivec2", INT_VEC3: "ivec3", INT_VEC4: "ivec4", UNSIGNED_INT: "uint", UNSIGNED_INT_VEC2: "uvec2", UNSIGNED_INT_VEC3: "uvec3", UNSIGNED_INT_VEC4: "uvec4", BOOL: "bool", BOOL_VEC2: "bvec2", BOOL_VEC3: "bvec3", BOOL_VEC4: "bvec4", FLOAT_MAT2: "mat2", FLOAT_MAT3: "mat3", FLOAT_MAT4: "mat4", SAMPLER_2D: "sampler2D", INT_SAMPLER_2D: "sampler2D", UNSIGNED_INT_SAMPLER_2D: "sampler2D", SAMPLER_CUBE: "samplerCube", INT_SAMPLER_CUBE: "samplerCube", UNSIGNED_INT_SAMPLER_CUBE: "samplerCube", SAMPLER_2D_ARRAY: "sampler2DArray", INT_SAMPLER_2D_ARRAY: "sampler2DArray", UNSIGNED_INT_SAMPLER_2D_ARRAY: "sampler2DArray" };
|
|
17991
17991
|
function Lp(t2, e2) {
|
|
17992
|
-
if (!
|
|
17992
|
+
if (!Rp) {
|
|
17993
17993
|
var i2 = Object.keys(Cp);
|
|
17994
|
-
|
|
17994
|
+
Rp = {};
|
|
17995
17995
|
for (var n2 = 0; n2 < i2.length; ++n2) {
|
|
17996
17996
|
var r2 = i2[n2];
|
|
17997
|
-
|
|
17997
|
+
Rp[t2[r2]] = Cp[r2];
|
|
17998
17998
|
}
|
|
17999
17999
|
}
|
|
18000
|
-
return
|
|
18000
|
+
return Rp[e2];
|
|
18001
18001
|
}
|
|
18002
18002
|
var Np = [{ test: function(t2) {
|
|
18003
18003
|
return t2.type === "float" && t2.size === 1;
|
|
@@ -18416,7 +18416,7 @@ var Slide = function(t) {
|
|
|
18416
18416
|
}
|
|
18417
18417
|
if (!c2)
|
|
18418
18418
|
if (a2.data.size > 1) {
|
|
18419
|
-
var p2 =
|
|
18419
|
+
var p2 = Ip(a2.data.type), f2 = Math.max(af[a2.data.type] / 16, 1), m2 = p2 / f2, g2 = (4 - m2 % 4) % 4;
|
|
18420
18420
|
s2.push("\n cv = ud." + h2 + ".value;\n v = uv." + h2 + ";\n offset = " + a2.offset / 4 + ";\n\n t = 0;\n\n for(var i=0; i < " + a2.data.size * f2 + "; i++)\n {\n for(var j = 0; j < " + m2 + "; j++)\n {\n data[offset++] = v[t++];\n }\n offset += " + g2 + ";\n }\n\n ");
|
|
18421
18421
|
} else {
|
|
18422
18422
|
var v2 = of[a2.data.type];
|
|
@@ -18442,7 +18442,7 @@ var Slide = function(t) {
|
|
|
18442
18442
|
for (var i3 = {}, n3 = e3.getProgramParameter(t3, e3.ACTIVE_ATTRIBUTES), r3 = 0; r3 < n3; r3++) {
|
|
18443
18443
|
var s3 = e3.getActiveAttrib(t3, r3);
|
|
18444
18444
|
if (s3.name.indexOf("gl_") !== 0) {
|
|
18445
|
-
var o3 = Lp(e3, s3.type), a3 = { type: o3, name: s3.name, size:
|
|
18445
|
+
var o3 = Lp(e3, s3.type), a3 = { type: o3, name: s3.name, size: Ip(o3), location: e3.getAttribLocation(t3, s3.name) };
|
|
18446
18446
|
i3[s3.name] = a3;
|
|
18447
18447
|
}
|
|
18448
18448
|
}
|
|
@@ -18781,7 +18781,7 @@ var Slide = function(t) {
|
|
|
18781
18781
|
}, set: function(t3) {
|
|
18782
18782
|
this._backgroundColorRgba[3] = t3;
|
|
18783
18783
|
}, enumerable: false, configurable: true }), e2;
|
|
18784
|
-
}(
|
|
18784
|
+
}(Ic.a), wf = function(t2) {
|
|
18785
18785
|
this.buffer = t2 || null, this.updateID = -1, this.byteLength = -1, this.refCount = 0;
|
|
18786
18786
|
}, Sf = function() {
|
|
18787
18787
|
function t2(t3) {
|
|
@@ -18885,7 +18885,7 @@ var Slide = function(t) {
|
|
|
18885
18885
|
function Af(t2) {
|
|
18886
18886
|
return Mf.create(t2);
|
|
18887
18887
|
}
|
|
18888
|
-
var Pf = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",
|
|
18888
|
+
var Pf = "attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}", If = "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n", Rf = function() {
|
|
18889
18889
|
function t2(t3) {
|
|
18890
18890
|
au("6.1.0", "System class is deprecated, implemement ISystem interface instead."), this.renderer = t3;
|
|
18891
18891
|
}
|
|
@@ -19379,7 +19379,7 @@ var Slide = function(t) {
|
|
|
19379
19379
|
var xm = function(t2) {
|
|
19380
19380
|
function e2() {
|
|
19381
19381
|
var e3 = this, i2 = { m: new Float32Array([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]), uAlpha: 1 };
|
|
19382
|
-
return (e3 = t2.call(this,
|
|
19382
|
+
return (e3 = t2.call(this, If, "varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n vec4 c = texture2D(uSampler, vTextureCoord);\n\n if (uAlpha == 0.0) {\n gl_FragColor = c;\n return;\n }\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (c.a > 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n", i2) || this).alpha = 1, e3;
|
|
19383
19383
|
}
|
|
19384
19384
|
return function(t3, e3) {
|
|
19385
19385
|
function i2() {
|
|
@@ -19759,7 +19759,7 @@ var Slide = function(t) {
|
|
|
19759
19759
|
}, e2.prototype.destroy = function() {
|
|
19760
19760
|
this.removeEvents(), this.removeTickerListener(), this.removeAllListeners(), this.renderer = null, this.mouse = null, this.eventData = null, this.interactionDOMElement = null, this.onPointerDown = null, this.processPointerDown = null, this.onPointerUp = null, this.processPointerUp = null, this.onPointerCancel = null, this.processPointerCancel = null, this.onPointerMove = null, this.processPointerMove = null, this.onPointerOut = null, this.processPointerOverOut = null, this.onPointerOver = null, this.search = null;
|
|
19761
19761
|
}, e2;
|
|
19762
|
-
}(
|
|
19762
|
+
}(Ic.a), Im = /iPhone/i, Rm = /iPod/i, Cm = /iPad/i, Lm = /\biOS-universal(?:.+)Mac\b/i, Nm = /\bAndroid(?:.+)Mobile\b/i, Om = /Android/i, Dm = /(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i, Fm = /Silk/i, Um = /Windows Phone/i, km = /\bWindows(?:.+)ARM\b/i, Bm = /BlackBerry/i, Gm = /BB10/i, Hm = /Opera Mini/i, jm = /\b(CriOS|Chrome)(?:.+)Mobile/i, zm = /Mobile(?:.+)Firefox\b/i, Vm = function(t2) {
|
|
19763
19763
|
return t2 !== void 0 && t2.platform === "MacIntel" && typeof t2.maxTouchPoints == "number" && t2.maxTouchPoints > 1 && typeof MSStream == "undefined";
|
|
19764
19764
|
};
|
|
19765
19765
|
/*!
|
|
@@ -19778,7 +19778,7 @@ var Slide = function(t) {
|
|
|
19778
19778
|
return function(e3) {
|
|
19779
19779
|
return e3.test(t3);
|
|
19780
19780
|
};
|
|
19781
|
-
}(i2), s2 = { apple: { phone: r2(
|
|
19781
|
+
}(i2), s2 = { apple: { phone: r2(Im) && !r2(Um), ipod: r2(Rm), tablet: !r2(Im) && (r2(Cm) || Vm(e2)) && !r2(Um), universal: r2(Lm), device: (r2(Im) || r2(Rm) || r2(Cm) || r2(Lm) || Vm(e2)) && !r2(Um) }, amazon: { phone: r2(Dm), tablet: !r2(Dm) && r2(Fm), device: r2(Dm) || r2(Fm) }, android: { phone: !r2(Um) && r2(Dm) || !r2(Um) && r2(Nm), tablet: !r2(Um) && !r2(Dm) && !r2(Nm) && (r2(Fm) || r2(Om)), device: !r2(Um) && (r2(Dm) || r2(Fm) || r2(Nm) || r2(Om)) || r2(/\bokhttp\b/i) }, windows: { phone: r2(Um), tablet: r2(km), device: r2(Um) || r2(km) }, other: { blackberry: r2(Bm), blackberry10: r2(Gm), opera: r2(Hm), firefox: r2(zm), chrome: r2(jm), device: r2(Bm) || r2(Gm) || r2(Hm) || r2(zm) || r2(jm) }, any: false, phone: false, tablet: false };
|
|
19782
19782
|
return s2.any = s2.apple.device || s2.android.device || s2.windows.device || s2.other.device, s2.phone = s2.apple.phone || s2.android.phone || s2.windows.phone, s2.tablet = s2.apple.tablet || s2.android.tablet || s2.windows.tablet, s2;
|
|
19783
19783
|
}(globalThis.navigator);
|
|
19784
19784
|
!function(t2) {
|
|
@@ -19928,7 +19928,7 @@ var Slide = function(t) {
|
|
|
19928
19928
|
}
|
|
19929
19929
|
pg(t2, e2), t2.prototype = e2 === null ? Object.create(e2) : (i2.prototype = e2.prototype, new i2());
|
|
19930
19930
|
}
|
|
19931
|
-
var mg, gg, vg, _g, yg, xg, bg, Tg, Eg, wg, Sg, Mg, Ag, Pg,
|
|
19931
|
+
var mg, gg, vg, _g, yg, xg, bg, Tg, Eg, wg, Sg, Mg, Ag, Pg, Ig, Rg, Cg, Lg, Ng, Og = function(t2) {
|
|
19932
19932
|
function e2() {
|
|
19933
19933
|
var e3 = t2.call(this) || this;
|
|
19934
19934
|
return e3.tempDisplayObjectParent = null, e3.transform = new Hu(), e3.alpha = 1, e3.visible = true, e3.renderable = true, e3.cullable = false, e3.cullArea = null, e3.parent = null, e3.worldAlpha = 1, e3._lastSortedIndex = 0, e3._zIndex = 0, e3.filterArea = null, e3.filters = null, e3._enabledFilters = null, e3._bounds = new dg(), e3._localBounds = null, e3._boundsID = 0, e3._boundsRect = null, e3._localBoundsRect = null, e3._mask = null, e3._maskRefCount = 0, e3._destroyed = false, e3.isSprite = false, e3.isMask = false, e3;
|
|
@@ -20032,7 +20032,7 @@ var Slide = function(t) {
|
|
|
20032
20032
|
(e3 = this._mask.maskObject || this._mask)._maskRefCount === 0 && (e3.renderable = false, e3.isMask = true), e3._maskRefCount++;
|
|
20033
20033
|
}
|
|
20034
20034
|
}, enumerable: false, configurable: true }), e2;
|
|
20035
|
-
}(
|
|
20035
|
+
}(Ic.a), Dg = function(t2) {
|
|
20036
20036
|
function e2() {
|
|
20037
20037
|
var e3 = t2 !== null && t2.apply(this, arguments) || this;
|
|
20038
20038
|
return e3.sortDirty = null, e3;
|
|
@@ -20072,9 +20072,9 @@ var Slide = function(t) {
|
|
|
20072
20072
|
t2[t2.NO = 0] = "NO", t2[t2.YES = 1] = "YES", t2[t2.AUTO = 2] = "AUTO", t2[t2.BLEND = 0] = "BLEND", t2[t2.CLEAR = 1] = "CLEAR", t2[t2.BLIT = 2] = "BLIT";
|
|
20073
20073
|
}(Pg || (Pg = {})), function(t2) {
|
|
20074
20074
|
t2[t2.AUTO = 0] = "AUTO", t2[t2.MANUAL = 1] = "MANUAL";
|
|
20075
|
-
}(Rg || (Rg = {})), function(t2) {
|
|
20076
|
-
t2.LOW = "lowp", t2.MEDIUM = "mediump", t2.HIGH = "highp";
|
|
20077
20075
|
}(Ig || (Ig = {})), function(t2) {
|
|
20076
|
+
t2.LOW = "lowp", t2.MEDIUM = "mediump", t2.HIGH = "highp";
|
|
20077
|
+
}(Rg || (Rg = {})), function(t2) {
|
|
20078
20078
|
t2[t2.NONE = 0] = "NONE", t2[t2.SCISSOR = 1] = "SCISSOR", t2[t2.STENCIL = 2] = "STENCIL", t2[t2.SPRITE = 3] = "SPRITE";
|
|
20079
20079
|
}(Cg || (Cg = {})), function(t2) {
|
|
20080
20080
|
t2[t2.NONE = 0] = "NONE", t2[t2.LOW = 2] = "LOW", t2[t2.MEDIUM = 4] = "MEDIUM", t2[t2.HIGH = 8] = "HIGH";
|
|
@@ -20441,7 +20441,7 @@ var Slide = function(t) {
|
|
|
20441
20441
|
this.data && this.data.length === e2.length || (this.data = new Float32Array(e2.length)), this.uvMatrix.multiplyUvs(e2, this.data), this._updateID++;
|
|
20442
20442
|
}
|
|
20443
20443
|
}, t2;
|
|
20444
|
-
}(), gv = new wu(), vv = new
|
|
20444
|
+
}(), gv = new wu(), vv = new Iu(), _v = function(t2) {
|
|
20445
20445
|
function e2(e3, i2, n2, r2) {
|
|
20446
20446
|
r2 === void 0 && (r2 = dc.TRIANGLES);
|
|
20447
20447
|
var s2 = t2.call(this) || this;
|
|
@@ -20680,13 +20680,13 @@ var Slide = function(t) {
|
|
|
20680
20680
|
var i2 = t2.points, n2 = e2.points, r2 = n2.length / 2;
|
|
20681
20681
|
n2.push(i2[0], i2[1], i2[2], i2[3], i2[6], i2[7], i2[4], i2[5]), e2.indices.push(r2, r2 + 1, r2 + 2, r2 + 1, r2 + 2, r2 + 3);
|
|
20682
20682
|
} };
|
|
20683
|
-
function
|
|
20683
|
+
function Iv(t2, e2, i2) {
|
|
20684
20684
|
return t2 + (e2 - t2) * i2;
|
|
20685
20685
|
}
|
|
20686
|
-
function
|
|
20686
|
+
function Rv(t2, e2, i2, n2, r2, s2, o2) {
|
|
20687
20687
|
o2 === void 0 && (o2 = []);
|
|
20688
20688
|
for (var a2 = o2, l2 = 0, h2 = 0, c2 = 0, u2 = 0, d2 = 0, p2 = 0, f2 = 0, m2 = 0; f2 <= 20; ++f2)
|
|
20689
|
-
l2 =
|
|
20689
|
+
l2 = Iv(t2, i2, m2 = f2 / 20), h2 = Iv(e2, n2, m2), c2 = Iv(i2, r2, m2), u2 = Iv(n2, s2, m2), d2 = Iv(l2, c2, m2), p2 = Iv(h2, u2, m2), f2 === 0 && a2[a2.length - 2] === d2 && a2[a2.length - 1] === p2 || a2.push(d2, p2);
|
|
20690
20690
|
return a2;
|
|
20691
20691
|
}
|
|
20692
20692
|
var Cv = { build: function(t2) {
|
|
@@ -20694,7 +20694,7 @@ var Slide = function(t) {
|
|
|
20694
20694
|
Av.build(t2);
|
|
20695
20695
|
else {
|
|
20696
20696
|
var e2 = t2.shape, i2 = t2.points, n2 = e2.x, r2 = e2.y, s2 = e2.width, o2 = e2.height, a2 = Math.max(0, Math.min(e2.radius, Math.min(s2, o2) / 2));
|
|
20697
|
-
i2.length = 0, a2 ? (
|
|
20697
|
+
i2.length = 0, a2 ? (Rv(n2, r2 + a2, n2, r2, n2 + a2, r2, i2), Rv(n2 + s2 - a2, r2, n2 + s2, r2, n2 + s2, r2 + a2, i2), Rv(n2 + s2, r2 + o2 - a2, n2 + s2, r2 + o2, n2 + s2 - a2, r2 + o2, i2), Rv(n2 + a2, r2 + o2, n2, r2 + o2, n2, r2 + o2 - a2, i2)) : i2.push(n2, r2, n2 + s2, r2, n2 + s2, r2 + o2, n2, r2 + o2);
|
|
20698
20698
|
}
|
|
20699
20699
|
}, triangulate: function(t2, e2) {
|
|
20700
20700
|
if (Jv.nextRoundedRectBehavior)
|
|
@@ -20747,12 +20747,12 @@ var Slide = function(t) {
|
|
|
20747
20747
|
var c2 = 0.5 * (o2.x + a2.x), u2 = 0.5 * (a2.y + o2.y);
|
|
20748
20748
|
n2.unshift(c2, u2), n2.push(c2, u2);
|
|
20749
20749
|
}
|
|
20750
|
-
var d2 = e3.points, p2 = n2.length / 2, f2 = n2.length, m2 = d2.length / 2, g2 = s2.width / 2, v2 = g2 * g2, _2 = s2.miterLimit * s2.miterLimit, y2 = n2[0], x2 = n2[1], b2 = n2[2], T2 = n2[3], E2 = 0, w2 = 0, S2 = -(x2 - T2), M2 = y2 - b2, A2 = 0, P2 = 0,
|
|
20751
|
-
S2 /=
|
|
20752
|
-
var
|
|
20750
|
+
var d2 = e3.points, p2 = n2.length / 2, f2 = n2.length, m2 = d2.length / 2, g2 = s2.width / 2, v2 = g2 * g2, _2 = s2.miterLimit * s2.miterLimit, y2 = n2[0], x2 = n2[1], b2 = n2[2], T2 = n2[3], E2 = 0, w2 = 0, S2 = -(x2 - T2), M2 = y2 - b2, A2 = 0, P2 = 0, I2 = Math.sqrt(S2 * S2 + M2 * M2);
|
|
20751
|
+
S2 /= I2, M2 /= I2, S2 *= g2, M2 *= g2;
|
|
20752
|
+
var R2 = s2.alignment, C2 = 2 * (1 - R2), L2 = 2 * R2;
|
|
20753
20753
|
l2 || (s2.cap === fv.ROUND ? f2 += Nv(y2 - S2 * (C2 - L2) * 0.5, x2 - M2 * (C2 - L2) * 0.5, y2 - S2 * C2, x2 - M2 * C2, y2 + S2 * L2, x2 + M2 * L2, d2, true) + 2 : s2.cap === fv.SQUARE && (f2 += Lv(y2, x2, S2, M2, C2, L2, true, d2))), d2.push(y2 - S2 * C2, x2 - M2 * C2), d2.push(y2 + S2 * L2, x2 + M2 * L2);
|
|
20754
20754
|
for (var N2 = 1; N2 < p2 - 1; ++N2) {
|
|
20755
|
-
y2 = n2[2 * (N2 - 1)], x2 = n2[2 * (N2 - 1) + 1], b2 = n2[2 * N2], T2 = n2[2 * N2 + 1], E2 = n2[2 * (N2 + 1)], w2 = n2[2 * (N2 + 1) + 1], S2 = -(x2 - T2), M2 = y2 - b2, S2 /=
|
|
20755
|
+
y2 = n2[2 * (N2 - 1)], x2 = n2[2 * (N2 - 1) + 1], b2 = n2[2 * N2], T2 = n2[2 * N2 + 1], E2 = n2[2 * (N2 + 1)], w2 = n2[2 * (N2 + 1) + 1], S2 = -(x2 - T2), M2 = y2 - b2, S2 /= I2 = Math.sqrt(S2 * S2 + M2 * M2), M2 /= I2, S2 *= g2, M2 *= g2, A2 = -(T2 - w2), P2 = b2 - E2, A2 /= I2 = Math.sqrt(A2 * A2 + P2 * P2), P2 /= I2, A2 *= g2, P2 *= g2;
|
|
20756
20756
|
var O2 = b2 - y2, D2 = x2 - T2, F2 = b2 - E2, U2 = w2 - T2, k2 = D2 * F2 - U2 * O2, B2 = k2 < 0;
|
|
20757
20757
|
if (Math.abs(k2) < 0.1)
|
|
20758
20758
|
d2.push(b2 - S2 * C2, T2 - M2 * C2), d2.push(b2 + S2 * L2, T2 + M2 * L2);
|
|
@@ -20761,7 +20761,7 @@ var Slide = function(t) {
|
|
|
20761
20761
|
V2 <= Math.min(O2 * O2 + D2 * D2, F2 * F2 + U2 * U2) + Z2 * Z2 * v2 ? s2.join === pv.BEVEL || V2 / v2 > _2 ? (B2 ? (d2.push(W2, X2), d2.push(b2 + S2 * L2, T2 + M2 * L2), d2.push(W2, X2), d2.push(b2 + A2 * L2, T2 + P2 * L2)) : (d2.push(b2 - S2 * C2, T2 - M2 * C2), d2.push(Y2, q2), d2.push(b2 - A2 * C2, T2 - P2 * C2), d2.push(Y2, q2)), f2 += 2) : s2.join === pv.ROUND ? B2 ? (d2.push(W2, X2), d2.push(b2 + S2 * L2, T2 + M2 * L2), f2 += Nv(b2, T2, b2 + S2 * L2, T2 + M2 * L2, b2 + A2 * L2, T2 + P2 * L2, d2, true) + 4, d2.push(W2, X2), d2.push(b2 + A2 * L2, T2 + P2 * L2)) : (d2.push(b2 - S2 * C2, T2 - M2 * C2), d2.push(Y2, q2), f2 += Nv(b2, T2, b2 - S2 * C2, T2 - M2 * C2, b2 - A2 * C2, T2 - P2 * C2, d2, false) + 4, d2.push(b2 - A2 * C2, T2 - P2 * C2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(Y2, q2)) : (d2.push(b2 - S2 * C2, T2 - M2 * C2), d2.push(b2 + S2 * L2, T2 + M2 * L2), s2.join === pv.ROUND ? f2 += B2 ? Nv(b2, T2, b2 + S2 * L2, T2 + M2 * L2, b2 + A2 * L2, T2 + P2 * L2, d2, true) + 2 : Nv(b2, T2, b2 - S2 * C2, T2 - M2 * C2, b2 - A2 * C2, T2 - P2 * C2, d2, false) + 2 : s2.join === pv.MITER && V2 / v2 <= _2 && (B2 ? (d2.push(Y2, q2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(W2, X2)), f2 += 2), d2.push(b2 - A2 * C2, T2 - P2 * C2), d2.push(b2 + A2 * L2, T2 + P2 * L2), f2 += 2);
|
|
20762
20762
|
}
|
|
20763
20763
|
}
|
|
20764
|
-
y2 = n2[2 * (p2 - 2)], x2 = n2[2 * (p2 - 2) + 1], b2 = n2[2 * (p2 - 1)], S2 = -(x2 - (T2 = n2[2 * (p2 - 1) + 1])), M2 = y2 - b2, S2 /=
|
|
20764
|
+
y2 = n2[2 * (p2 - 2)], x2 = n2[2 * (p2 - 2) + 1], b2 = n2[2 * (p2 - 1)], S2 = -(x2 - (T2 = n2[2 * (p2 - 1) + 1])), M2 = y2 - b2, S2 /= I2 = Math.sqrt(S2 * S2 + M2 * M2), M2 /= I2, S2 *= g2, M2 *= g2, d2.push(b2 - S2 * C2, T2 - M2 * C2), d2.push(b2 + S2 * L2, T2 + M2 * L2), l2 || (s2.cap === fv.ROUND ? f2 += Nv(b2 - S2 * (C2 - L2) * 0.5, T2 - M2 * (C2 - L2) * 0.5, b2 - S2 * C2, T2 - M2 * C2, b2 + S2 * L2, T2 + M2 * L2, d2, false) + 2 : s2.cap === fv.SQUARE && (f2 += Lv(b2, T2, S2, M2, C2, L2, false, d2)));
|
|
20765
20765
|
var J2 = e3.indices, K2 = bv.epsilon * bv.epsilon;
|
|
20766
20766
|
for (N2 = m2; N2 < f2 + m2 - 2; ++N2)
|
|
20767
20767
|
y2 = d2[2 * N2], x2 = d2[2 * N2 + 1], b2 = d2[2 * (N2 + 1)], T2 = d2[2 * (N2 + 1) + 1], E2 = d2[2 * (N2 + 2)], w2 = d2[2 * (N2 + 2) + 1], Math.abs(y2 * (T2 - w2) + b2 * (w2 - x2) + E2 * (x2 - T2)) < K2 || J2.push(N2, N2 + 1, N2 + 2);
|
|
@@ -21065,9 +21065,9 @@ var Slide = function(t) {
|
|
|
21065
21065
|
}, e2.prototype.startPoly = function() {
|
|
21066
21066
|
if (this.currentPath) {
|
|
21067
21067
|
var t3 = this.currentPath.points, e3 = this.currentPath.points.length;
|
|
21068
|
-
e3 > 2 && (this.drawShape(this.currentPath), this.currentPath = new
|
|
21068
|
+
e3 > 2 && (this.drawShape(this.currentPath), this.currentPath = new Iu(), this.currentPath.closeStroke = false, this.currentPath.points.push(t3[e3 - 2], t3[e3 - 1]));
|
|
21069
21069
|
} else
|
|
21070
|
-
this.currentPath = new
|
|
21070
|
+
this.currentPath = new Iu(), this.currentPath.closeStroke = false;
|
|
21071
21071
|
}, e2.prototype.finishPoly = function() {
|
|
21072
21072
|
this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), this.currentPath = null) : this.currentPath.points.length = 0);
|
|
21073
21073
|
}, e2.prototype.moveTo = function(t3, e3) {
|
|
@@ -21115,7 +21115,7 @@ var Slide = function(t) {
|
|
|
21115
21115
|
}, e2.prototype.drawRect = function(t3, e3, i2, n2) {
|
|
21116
21116
|
return this.drawShape(new Mu(t3, e3, i2, n2));
|
|
21117
21117
|
}, e2.prototype.drawRoundedRect = function(t3, e3, i2, n2, r2) {
|
|
21118
|
-
return this.drawShape(new
|
|
21118
|
+
return this.drawShape(new Ru(t3, e3, i2, n2, r2));
|
|
21119
21119
|
}, e2.prototype.drawCircle = function(t3, e3, i2) {
|
|
21120
21120
|
return this.drawShape(new Au(t3, e3, i2));
|
|
21121
21121
|
}, e2.prototype.drawEllipse = function(t3, e3, i2, n2) {
|
|
@@ -21125,7 +21125,7 @@ var Slide = function(t) {
|
|
|
21125
21125
|
i2[n2] = e3[n2];
|
|
21126
21126
|
var r2 = true, s2 = i2[0];
|
|
21127
21127
|
s2.points ? (r2 = s2.closeStroke, t3 = s2.points) : t3 = Array.isArray(i2[0]) ? i2[0] : i2;
|
|
21128
|
-
var o2 = new
|
|
21128
|
+
var o2 = new Iu(t3);
|
|
21129
21129
|
return o2.closeStroke = r2, this.drawShape(o2), this;
|
|
21130
21130
|
}, e2.prototype.drawShape = function(t3) {
|
|
21131
21131
|
return this._holeMode ? this._geometry.drawHole(t3, this._matrix) : this._geometry.drawShape(t3, this._fillStyle.clone(), this._lineStyle.clone(), this._matrix), this;
|
|
@@ -21942,16 +21942,16 @@ var Slide = function(t) {
|
|
|
21942
21942
|
return o();
|
|
21943
21943
|
}
|
|
21944
21944
|
const P_ = "__delay_resolve_result__";
|
|
21945
|
-
function
|
|
21945
|
+
function I_(t2) {
|
|
21946
21946
|
return new Promise((e2) => {
|
|
21947
21947
|
setTimeout(() => {
|
|
21948
21948
|
e2(P_);
|
|
21949
21949
|
}, t2);
|
|
21950
21950
|
});
|
|
21951
21951
|
}
|
|
21952
|
-
function
|
|
21952
|
+
function R_(t2, e2) {
|
|
21953
21953
|
return M_(this, void 0, void 0, function* () {
|
|
21954
|
-
const i2 = yield Promise.race([t2(),
|
|
21954
|
+
const i2 = yield Promise.race([t2(), I_(e2)]);
|
|
21955
21955
|
return i2 === P_ ? P_ : i2;
|
|
21956
21956
|
});
|
|
21957
21957
|
}
|
|
@@ -21982,7 +21982,7 @@ var Slide = function(t) {
|
|
|
21982
21982
|
};
|
|
21983
21983
|
function L_(t2, e2) {
|
|
21984
21984
|
return C_(this, void 0, void 0, function* () {
|
|
21985
|
-
const i2 = yield
|
|
21985
|
+
const i2 = yield R_(() => fetch(t2), e2);
|
|
21986
21986
|
if (i2 === P_)
|
|
21987
21987
|
throw new T_(b_.ResourceError, `"${t2}" loaded timeout"`);
|
|
21988
21988
|
if (!i2.ok)
|
|
@@ -22006,7 +22006,7 @@ var Slide = function(t) {
|
|
|
22006
22006
|
let e3;
|
|
22007
22007
|
if (this.delegate) {
|
|
22008
22008
|
this.logger.info("load resource by delegate. " + t2, this.taskId || "");
|
|
22009
|
-
const i2 = yield
|
|
22009
|
+
const i2 = yield R_(() => this.delegate.loadJson(t2), this.timeout);
|
|
22010
22010
|
if (i2 === P_)
|
|
22011
22011
|
throw new T_(b_.ResourceError, `"${t2}" loaded timeout"`);
|
|
22012
22012
|
e3 = JSON.parse(i2);
|
|
@@ -22025,7 +22025,7 @@ var Slide = function(t) {
|
|
|
22025
22025
|
{
|
|
22026
22026
|
let i2;
|
|
22027
22027
|
if (this.delegate) {
|
|
22028
|
-
if (this.logger.info("load resource by delegate. " + t2, this.taskId || ""), i2 = yield
|
|
22028
|
+
if (this.logger.info("load resource by delegate. " + t2, this.taskId || ""), i2 = yield R_(() => this.delegate.loadImage(t2), this.timeout), i2 === P_)
|
|
22029
22029
|
throw new T_(b_.ResourceError, `"${t2}" loaded timeout"`);
|
|
22030
22030
|
} else {
|
|
22031
22031
|
this.logger.info("load resource from server. " + t2, this.taskId || "");
|
|
@@ -22534,7 +22534,7 @@ var Slide = function(t) {
|
|
|
22534
22534
|
((i2 = this.hitArea) === null || i2 === void 0 ? void 0 : i2.contains(s2, o2)) && this.object.visible && this.handleAction(e2, true);
|
|
22535
22535
|
}
|
|
22536
22536
|
getOriginHitArea() {
|
|
22537
|
-
return this.object.hitArea ? this.object.hitArea : new
|
|
22537
|
+
return this.object.hitArea ? this.object.hitArea : new Ru(0, 0, this.object.width, this.object.height);
|
|
22538
22538
|
}
|
|
22539
22539
|
handleAction(t2, e2 = false) {
|
|
22540
22540
|
this.proxy && !e2 || (this.ctx.eventHub.emit(Nb.hyperlinkTrigger, t2), this.execAction(t2));
|
|
@@ -22897,10 +22897,10 @@ var Slide = function(t) {
|
|
|
22897
22897
|
i2 += e2[n2];
|
|
22898
22898
|
return i2;
|
|
22899
22899
|
}
|
|
22900
|
-
function
|
|
22900
|
+
function Iy(t2) {
|
|
22901
22901
|
return new Float64Array(t2);
|
|
22902
22902
|
}
|
|
22903
|
-
const
|
|
22903
|
+
const Ry = Iy(4), Cy = Iy(8), Ly = Iy(12), Ny = Iy(16), Oy = Iy(4);
|
|
22904
22904
|
function Dy(t2, e2, i2, n2, r2, s2) {
|
|
22905
22905
|
const o2 = (e2 - s2) * (i2 - r2), a2 = (t2 - r2) * (n2 - s2), l2 = o2 - a2;
|
|
22906
22906
|
if (o2 === 0 || a2 === 0 || o2 > 0 != a2 > 0)
|
|
@@ -22909,16 +22909,16 @@ var Slide = function(t) {
|
|
|
22909
22909
|
return Math.abs(l2) >= 33306690738754716e-32 * h2 ? l2 : -function(t3, e3, i3, n3, r3, s3, o3) {
|
|
22910
22910
|
let a3, l3, h3, c2, u2, d2, p2, f2, m2, g2, v2, _2, y2, x2, b2, T2, E2, w2;
|
|
22911
22911
|
const S2 = t3 - r3, M2 = i3 - r3, A2 = e3 - s3, P2 = n3 - s3;
|
|
22912
|
-
x2 = S2 * P2, d2 = My * S2, p2 = d2 - (d2 - S2), f2 = S2 - p2, d2 = My * P2, m2 = d2 - (d2 - P2), g2 = P2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = A2 * M2, d2 = My * A2, p2 = d2 - (d2 - A2), f2 = A2 - p2, d2 = My * M2, m2 = d2 - (d2 - M2), g2 = M2 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, u2 = b2 - v2,
|
|
22913
|
-
let
|
|
22914
|
-
if (
|
|
22915
|
-
return
|
|
22912
|
+
x2 = S2 * P2, d2 = My * S2, p2 = d2 - (d2 - S2), f2 = S2 - p2, d2 = My * P2, m2 = d2 - (d2 - P2), g2 = P2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = A2 * M2, d2 = My * A2, p2 = d2 - (d2 - A2), f2 = A2 - p2, d2 = My * M2, m2 = d2 - (d2 - M2), g2 = M2 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, u2 = b2 - v2, Ry[0] = b2 - (v2 + u2) + (u2 - E2), _2 = x2 + v2, u2 = _2 - x2, y2 = x2 - (_2 - u2) + (v2 - u2), v2 = y2 - T2, u2 = y2 - v2, Ry[1] = y2 - (v2 + u2) + (u2 - T2), w2 = _2 + v2, u2 = w2 - _2, Ry[2] = _2 - (w2 - u2) + (v2 - u2), Ry[3] = w2;
|
|
22913
|
+
let I2 = Py(4, Ry), R2 = 22204460492503146e-32 * o3;
|
|
22914
|
+
if (I2 >= R2 || -I2 >= R2)
|
|
22915
|
+
return I2;
|
|
22916
22916
|
if (u2 = t3 - S2, a3 = t3 - (S2 + u2) + (u2 - r3), u2 = i3 - M2, h3 = i3 - (M2 + u2) + (u2 - r3), u2 = e3 - A2, l3 = e3 - (A2 + u2) + (u2 - s3), u2 = n3 - P2, c2 = n3 - (P2 + u2) + (u2 - s3), a3 === 0 && l3 === 0 && h3 === 0 && c2 === 0)
|
|
22917
|
-
return
|
|
22918
|
-
if (
|
|
22919
|
-
return
|
|
22917
|
+
return I2;
|
|
22918
|
+
if (R2 = 11093356479670487e-47 * o3 + 33306690738754706e-32 * Math.abs(I2), I2 += S2 * c2 + P2 * a3 - (A2 * h3 + M2 * l3), I2 >= R2 || -I2 >= R2)
|
|
22919
|
+
return I2;
|
|
22920
22920
|
x2 = a3 * P2, d2 = My * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = My * P2, m2 = d2 - (d2 - P2), g2 = P2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * M2, d2 = My * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = My * M2, m2 = d2 - (d2 - M2), g2 = M2 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, u2 = b2 - v2, Oy[0] = b2 - (v2 + u2) + (u2 - E2), _2 = x2 + v2, u2 = _2 - x2, y2 = x2 - (_2 - u2) + (v2 - u2), v2 = y2 - T2, u2 = y2 - v2, Oy[1] = y2 - (v2 + u2) + (u2 - T2), w2 = _2 + v2, u2 = w2 - _2, Oy[2] = _2 - (w2 - u2) + (v2 - u2), Oy[3] = w2;
|
|
22921
|
-
const C2 = Ay(4,
|
|
22921
|
+
const C2 = Ay(4, Ry, 4, Oy, Cy);
|
|
22922
22922
|
x2 = S2 * c2, d2 = My * S2, p2 = d2 - (d2 - S2), f2 = S2 - p2, d2 = My * c2, m2 = d2 - (d2 - c2), g2 = c2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = A2 * h3, d2 = My * A2, p2 = d2 - (d2 - A2), f2 = A2 - p2, d2 = My * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, u2 = b2 - v2, Oy[0] = b2 - (v2 + u2) + (u2 - E2), _2 = x2 + v2, u2 = _2 - x2, y2 = x2 - (_2 - u2) + (v2 - u2), v2 = y2 - T2, u2 = y2 - v2, Oy[1] = y2 - (v2 + u2) + (u2 - T2), w2 = _2 + v2, u2 = w2 - _2, Oy[2] = _2 - (w2 - u2) + (v2 - u2), Oy[3] = w2;
|
|
22923
22923
|
const L2 = Ay(C2, Cy, 4, Oy, Ly);
|
|
22924
22924
|
x2 = a3 * c2, d2 = My * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = My * c2, m2 = d2 - (d2 - c2), g2 = c2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * h3, d2 = My * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = My * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, u2 = b2 - v2, Oy[0] = b2 - (v2 + u2) + (u2 - E2), _2 = x2 + v2, u2 = _2 - x2, y2 = x2 - (_2 - u2) + (v2 - u2), v2 = y2 - T2, u2 = y2 - v2, Oy[1] = y2 - (v2 + u2) + (u2 - T2), w2 = _2 + v2, u2 = w2 - _2, Oy[2] = _2 - (w2 - u2) + (v2 - u2), Oy[3] = w2;
|
|
@@ -23922,7 +23922,7 @@ void main(void){
|
|
|
23922
23922
|
super(t2, e2, i2), this.renderContainer = new pd(), this.needCacheAsBitMap = false, this.backgroundGraphics = null, this.effectList = [], this.strokeGraphics = null, this.arrowList = [], this.fillColorFilter = new _y(), this.strokeColorFilter = new _y(), this.id = "", this.fill = new ny(this), this.stroke = new ey(this), this.effectObject = null, this.effectContainer = new pd(), this.effectDisposer = () => {
|
|
23923
23923
|
}, this.json = t2, this.json.fillStyle && this.json.fillStyle.fillType === "groupFill" && n2 && (this.json.fillStyle = n2), this.id = t2.id;
|
|
23924
23924
|
const { fillStyle: s2, lineStyle: o2 } = this.json;
|
|
23925
|
-
this.container.sortableChildren = true, this.container.name = t2.id + "_container_[Shape]", this.effectContainer.name = "effect-container", this.effectContainer.zIndex = 1, this.container.addChild(this.effectContainer), this.renderContainer.name = t2.id + "_render_container_[Shape]", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.ctx.timingTargets.addTarget(this.id, this), (s2 == null ? void 0 : s2.fillType) === "solidFill" && (this.fillColorFilter.currentColor = s2.color, this.fillColorFilter.designColor = s2.color), ((r2 = o2 == null ? void 0 : o2.fill) === null || r2 === void 0 ? void 0 : r2.fillType) === "solidFill" && (this.strokeColorFilter.currentColor = o2.fill.color, this.strokeColorFilter.designColor = o2.fill.color), this.updateTransform(this.json), t2.textBody && (this.text = new mx(t2.textBody, this.ctx, t2.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y })), this.container.hitArea = new
|
|
23925
|
+
this.container.sortableChildren = true, this.container.name = t2.id + "_container_[Shape]", this.effectContainer.name = "effect-container", this.effectContainer.zIndex = 1, this.container.addChild(this.effectContainer), this.renderContainer.name = t2.id + "_render_container_[Shape]", this.generateArrowList(), this.backgroundFill = this.createBackgroundFill(), this.backgroundGraphics = this.createBackgroundGraphics(), this.strokeFill = this.createStrokeFill(), this.strokeGraphics = this.createStrokeGraphics(), this.ctx.timingTargets.addTarget(this.id, this), (s2 == null ? void 0 : s2.fillType) === "solidFill" && (this.fillColorFilter.currentColor = s2.color, this.fillColorFilter.designColor = s2.color), ((r2 = o2 == null ? void 0 : o2.fill) === null || r2 === void 0 ? void 0 : r2.fillType) === "solidFill" && (this.strokeColorFilter.currentColor = o2.fill.color, this.strokeColorFilter.designColor = o2.fill.color), this.updateTransform(this.json), t2.textBody && (this.text = new mx(t2.textBody, this.ctx, t2.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y })), this.container.hitArea = new Ru(1, 1, this.json.width, this.json.height), this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
|
|
23926
23926
|
if (this.ctx.slideIndex === t3 && this.effectObject) {
|
|
23927
23927
|
const t4 = this.getEffectTexture();
|
|
23928
23928
|
t4 && this.effectObject.createFrame(1, t4);
|
|
@@ -24440,7 +24440,7 @@ void main(void){
|
|
|
24440
24440
|
l2((n2 = n2.apply(t2, e2 || [])).next());
|
|
24441
24441
|
});
|
|
24442
24442
|
};
|
|
24443
|
-
class
|
|
24443
|
+
class Ix extends $a.a {
|
|
24444
24444
|
constructor(t2) {
|
|
24445
24445
|
super(), this.type = "audio", this.isPlaying = false, this.isGlobalPause = false, this.updateVolume = (t3) => {
|
|
24446
24446
|
this.audioPlayer.volume(t3);
|
|
@@ -24504,7 +24504,7 @@ void main(void){
|
|
|
24504
24504
|
this.ctx.volumeAdjuster.removeListener("update", this.updateVolume), this.audioPlayer.pause(), this.controller.destroy(), this.ctx.activeMedia.delete(this);
|
|
24505
24505
|
}
|
|
24506
24506
|
}
|
|
24507
|
-
class
|
|
24507
|
+
class Rx extends xx {
|
|
24508
24508
|
constructor(t2, e2, i2, n2) {
|
|
24509
24509
|
super(Object.assign(Object.assign({}, t2), { type: "Shape", useBgFill: false, textRotateWithShape: true, isPicture: true }), e2, i2, n2), this.isInteractiveOutside = false, this.cmd = new iy(this), this.media = t2 == null ? void 0 : t2.media, this.container.name = t2.id + "_container_[Picture]", this.renderContainer.name = t2.id + "_render_container_[Picture]", this.picFill = new ax(this.ctx, t2.picFill, t2.width, t2.height, { useFilter: true, useSlideBackgroundFill: false });
|
|
24510
24510
|
}
|
|
@@ -24543,7 +24543,7 @@ void main(void){
|
|
|
24543
24543
|
t3 && (this.mediaPlayer.sprite.mask = t3, this.container.addChild(t3));
|
|
24544
24544
|
}
|
|
24545
24545
|
} else
|
|
24546
|
-
((s2 = this.media) === null || s2 === void 0 ? void 0 : s2.type) === "audio" && this.media.src && (this.mediaPlayer = new
|
|
24546
|
+
((s2 = this.media) === null || s2 === void 0 ? void 0 : s2.type) === "audio" && this.media.src && (this.mediaPlayer = new Ix({ id: this.json.id + "-audio", shapeId: this.json.id, ctx: this.ctx, audio: this.media, height: this.designHeight, width: this.designWidth, target: o2, canvasElement: this.ctx.view }));
|
|
24547
24547
|
this.mediaPlayer && (this.isInteractiveOutside = !!this.container.interactive, this.container.interactive = true, this.container.on("mouseover", () => {
|
|
24548
24548
|
this.mediaPlayer.showController();
|
|
24549
24549
|
}), this.container.on("mouseout", () => {
|
|
@@ -24603,7 +24603,7 @@ void main(void){
|
|
|
24603
24603
|
t2.addSubMTask(() => Cx(this, void 0, void 0, function* () {
|
|
24604
24604
|
const i4 = this.json.children[e3];
|
|
24605
24605
|
let n3 = null;
|
|
24606
|
-
(i4 == null ? void 0 : i4.type) === "Shape" ? n3 = new xx(i4, this.ctx, s2, this.json.fillStyle) : (i4 == null ? void 0 : i4.type) === "Picture" ? n3 = new
|
|
24606
|
+
(i4 == null ? void 0 : i4.type) === "Shape" ? n3 = new xx(i4, this.ctx, s2, this.json.fillStyle) : (i4 == null ? void 0 : i4.type) === "Picture" ? n3 = new Rx(i4, this.ctx, s2, this.json.fillStyle) : (i4 == null ? void 0 : i4.type) === "Container" && (n3 = new Lx(i4, this.ctx, s2, this.json.fillStyle, t2)), n3 && this.children.push(n3);
|
|
24607
24607
|
}), "@ContainerImpl[child.init]");
|
|
24608
24608
|
}
|
|
24609
24609
|
get interactiveContainer() {
|
|
@@ -25920,7 +25920,7 @@ void main(void){
|
|
|
25920
25920
|
if (t2) {
|
|
25921
25921
|
t2.state = "running";
|
|
25922
25922
|
try {
|
|
25923
|
-
if ((yield
|
|
25923
|
+
if ((yield R_(() => t2.fn.apply(null), 6e4)) === P_)
|
|
25924
25924
|
throw new T_(b_.RuntimeError, `subtask ${t2.name} apply timeout`);
|
|
25925
25925
|
if (t2.state = "finish", t2.sub.length > 0) {
|
|
25926
25926
|
const e2 = this.tasks.findIndex((e3) => e3 === t2);
|
|
@@ -26103,7 +26103,7 @@ void main(void){
|
|
|
26103
26103
|
return M_(this, void 0, void 0, function* () {
|
|
26104
26104
|
const i3 = Date.now();
|
|
26105
26105
|
for (; !t3() && Date.now() - i3 < e4; )
|
|
26106
|
-
yield
|
|
26106
|
+
yield I_(16);
|
|
26107
26107
|
});
|
|
26108
26108
|
}(() => !!this.outputData.has(i2), 2e3), this.loadingSdfKeys.delete(i2);
|
|
26109
26109
|
const h2 = this.outputData.get(i2);
|
|
@@ -26284,10 +26284,10 @@ void main(void){
|
|
|
26284
26284
|
l2((n2 = n2.apply(t2, e2 || [])).next());
|
|
26285
26285
|
});
|
|
26286
26286
|
};
|
|
26287
|
-
class
|
|
26287
|
+
class Ib {
|
|
26288
26288
|
constructor(t2) {
|
|
26289
26289
|
var e2;
|
|
26290
|
-
this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 =
|
|
26290
|
+
this.logger = t2, this.taskId = "", this.isIndexDBReady = false, this.memoryCache = /* @__PURE__ */ new Map(), (e2 = Ib.localCache) === null || e2 === void 0 || e2.ready(() => {
|
|
26291
26291
|
this.isIndexDBReady = true;
|
|
26292
26292
|
}).catch(() => {
|
|
26293
26293
|
t2.warn("local storage not ready", this.taskId);
|
|
@@ -26302,15 +26302,15 @@ void main(void){
|
|
|
26302
26302
|
getItem(t2) {
|
|
26303
26303
|
return Pb(this, void 0, void 0, function* () {
|
|
26304
26304
|
let e2 = null;
|
|
26305
|
-
return this.couldUseIndexDBCache &&
|
|
26305
|
+
return this.couldUseIndexDBCache && Ib.localCache && (e2 = yield R_(() => Ib.localCache.getItem(`${this.taskId}/${t2}`), 500)), e2 = e2 === P_ ? null : e2, e2 || this.memoryCache.get(t2) || null;
|
|
26306
26306
|
});
|
|
26307
26307
|
}
|
|
26308
26308
|
setItem(t2, e2, i2 = false) {
|
|
26309
26309
|
return Pb(this, void 0, void 0, function* () {
|
|
26310
26310
|
if (!this.couldUseIndexDBCache)
|
|
26311
26311
|
return i2 && this.memoryCache.set(t2, e2), Promise.resolve();
|
|
26312
|
-
if (
|
|
26313
|
-
(yield
|
|
26312
|
+
if (Ib.localCache) {
|
|
26313
|
+
(yield R_(() => Ib.localCache.setItem(`${this.taskId}/${t2}`, e2).catch(() => {
|
|
26314
26314
|
i2 && this.memoryCache.set(t2, e2);
|
|
26315
26315
|
}), 500)) === P_ && i2 && this.memoryCache.set(t2, e2);
|
|
26316
26316
|
}
|
|
@@ -26318,21 +26318,21 @@ void main(void){
|
|
|
26318
26318
|
}
|
|
26319
26319
|
dispose() {
|
|
26320
26320
|
var t2;
|
|
26321
|
-
this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 =
|
|
26321
|
+
this.memoryCache = /* @__PURE__ */ new Map(), this.couldUseIndexDBCache && ((t2 = Ib.localCache) === null || t2 === void 0 || t2.keys().then((t3) => {
|
|
26322
26322
|
t3.filter((t4) => t4.indexOf(this.taskId) >= 0).forEach((t4) => {
|
|
26323
26323
|
var e2;
|
|
26324
|
-
(e2 =
|
|
26324
|
+
(e2 = Ib.localCache) === null || e2 === void 0 || e2.removeItem(t4).catch(() => {
|
|
26325
26325
|
});
|
|
26326
26326
|
});
|
|
26327
26327
|
}));
|
|
26328
26328
|
}
|
|
26329
26329
|
}
|
|
26330
|
-
|
|
26330
|
+
Ib.localCache = null;
|
|
26331
26331
|
try {
|
|
26332
|
-
|
|
26332
|
+
Ib.localCache = a.createInstance({ name: "slide_local_cache", driver: a.INDEXEDDB, version: 1 });
|
|
26333
26333
|
} catch (t2) {
|
|
26334
26334
|
}
|
|
26335
|
-
class
|
|
26335
|
+
class Rb extends $a.a {
|
|
26336
26336
|
constructor() {
|
|
26337
26337
|
super(...arguments), this._volume = 0.5;
|
|
26338
26338
|
}
|
|
@@ -26374,7 +26374,7 @@ void main(void){
|
|
|
26374
26374
|
constructor(t2, e2 = {}) {
|
|
26375
26375
|
super(), this.errorChannel = new $a.a(), this.transactionPlayer = null, this.isForward = true, this.drawCall = 0, this.scale = 1, this._isPaused = false, this.maxResolution = new wu(0, 0), this.fps = new x_(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
|
|
26376
26376
|
this.errorChannel.emit("error", new T_(b_.CanvasCrash, "webgl context lost."));
|
|
26377
|
-
}, this.logger = t2.logger, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new
|
|
26377
|
+
}, this.logger = t2.logger, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Ib(this.logger), this.config = { minFPS: il()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: il()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: il()(e2.resolution) ? 1 : e2.resolution, autoFPS: !il()(e2.autoFPS) && e2.autoFPS, autoResolution: !il()(e2.autoResolution) && e2.autoResolution, transactionBgColor: il()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel) }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.loader = new N_(this.localStorage, t2.useLocalCache, this.logger, t2.resourceTimeout, t2.loadDelegate), this.app = new vm({ antialias: true, autoDensity: false, backgroundColor: 16777215 }), this.updateConfig(this.config), this.app.ticker.maxFPS = 60, this.app.ticker.minFPS = this.config.minFPS, this.app.ticker.maxFPS = this.config.maxFPS, this.app.view.style.zIndex = "1", this.app.stage.sortableChildren = true;
|
|
26378
26378
|
const i2 = this.app.renderer, { drawElements: n2 } = i2.gl;
|
|
26379
26379
|
i2.gl.drawElements = (...t3) => {
|
|
26380
26380
|
n2.call(i2.gl, ...t3), this.drawCall += 1;
|
|
@@ -26621,7 +26621,7 @@ void main(void){
|
|
|
26621
26621
|
}
|
|
26622
26622
|
static clearLocalCache() {
|
|
26623
26623
|
var t2;
|
|
26624
|
-
(t2 =
|
|
26624
|
+
(t2 = Ib.localCache) === null || t2 === void 0 || t2.clear().catch(() => {
|
|
26625
26625
|
});
|
|
26626
26626
|
}
|
|
26627
26627
|
destroy() {
|
|
@@ -26962,7 +26962,7 @@ void main(void){
|
|
|
26962
26962
|
}([s3, a3]);
|
|
26963
26963
|
};
|
|
26964
26964
|
}
|
|
26965
|
-
},
|
|
26965
|
+
}, IT = function() {
|
|
26966
26966
|
function t2(t3, e2, i2, n2, r2) {
|
|
26967
26967
|
this.state = "idle", this.index = -1, this.slideIndex = -1, this.fn = i2, this.index = t3, this.slideIndex = e2, this.eventHub = n2, this.id = r2;
|
|
26968
26968
|
}
|
|
@@ -26985,7 +26985,7 @@ void main(void){
|
|
|
26985
26985
|
});
|
|
26986
26986
|
});
|
|
26987
26987
|
}, t2;
|
|
26988
|
-
}(),
|
|
26988
|
+
}(), RT = function() {
|
|
26989
26989
|
function t2() {
|
|
26990
26990
|
var t3 = this;
|
|
26991
26991
|
this.eventHub = new $a.a(), this.tasks = [], this.index = 0, this.eventHub.on("task-end", function(e2) {
|
|
@@ -27007,7 +27007,7 @@ void main(void){
|
|
|
27007
27007
|
e2.tasks.splice(t4, 1);
|
|
27008
27008
|
});
|
|
27009
27009
|
}, t2.prototype.addTask = function(t3, e2, i2) {
|
|
27010
|
-
var n2 = new
|
|
27010
|
+
var n2 = new IT(this.index++, e2, t3, this.eventHub, i2);
|
|
27011
27011
|
this.tasks.push(n2), this.tasks.sort(function(t4, e3) {
|
|
27012
27012
|
return t4.index - e3.index;
|
|
27013
27013
|
}), this.replaceIdleTask(), this.tasks.length === 1 && n2.apply();
|
|
@@ -27637,7 +27637,7 @@ void main(void){
|
|
|
27637
27637
|
}(), yE = void 0, xE = true, bE = void 0, TE = false, EE = [], wE = function t2(e2) {
|
|
27638
27638
|
var i2 = this, n2 = e2 || {};
|
|
27639
27639
|
this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), tE.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], n2 = OT.defaults(n2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), n2 = OT.defaults(n2, { resizable: n2.autoPlace, hideable: n2.autoPlace }), OT.isUndefined(n2.load) ? n2.load = { preset: "Default" } : n2.preset && (n2.load.preset = n2.preset), OT.isUndefined(n2.parent) && n2.hideable && EE.push(this), n2.resizable = OT.isUndefined(n2.parent) && n2.resizable, n2.autoPlace && OT.isUndefined(n2.scrollable) && (n2.scrollable = true);
|
|
27640
|
-
var r2, s2 = _E && localStorage.getItem(
|
|
27640
|
+
var r2, s2 = _E && localStorage.getItem(RE(this, "isLocal")) === "true", o2 = void 0, a2 = void 0;
|
|
27641
27641
|
if (Object.defineProperties(this, { parent: { get: function() {
|
|
27642
27642
|
return n2.parent;
|
|
27643
27643
|
} }, scrollable: { get: function() {
|
|
@@ -27670,11 +27670,11 @@ void main(void){
|
|
|
27670
27670
|
} }, useLocalStorage: { get: function() {
|
|
27671
27671
|
return s2;
|
|
27672
27672
|
}, set: function(t3) {
|
|
27673
|
-
_E && (s2 = t3, t3 ? tE.bind(window, "unload", o2) : tE.unbind(window, "unload", o2), localStorage.setItem(
|
|
27673
|
+
_E && (s2 = t3, t3 ? tE.bind(window, "unload", o2) : tE.unbind(window, "unload", o2), localStorage.setItem(RE(i2, "isLocal"), t3));
|
|
27674
27674
|
} } }), OT.isUndefined(n2.parent)) {
|
|
27675
27675
|
if (this.closed = n2.closed || false, tE.addClass(this.domElement, t2.CLASS_MAIN), tE.makeSelectable(this.domElement, false), _E && s2) {
|
|
27676
27676
|
i2.useLocalStorage = true;
|
|
27677
|
-
var l2 = localStorage.getItem(
|
|
27677
|
+
var l2 = localStorage.getItem(RE(this, "gui"));
|
|
27678
27678
|
l2 && (n2.load = JSON.parse(l2));
|
|
27679
27679
|
}
|
|
27680
27680
|
this.__closeButton = document.createElement("div"), this.__closeButton.innerHTML = t2.TEXT_CLOSED, tE.addClass(this.__closeButton, t2.CLASS_CLOSE_BUTTON), n2.closeOnTop ? (tE.addClass(this.__closeButton, t2.CLASS_CLOSE_TOP), this.domElement.insertBefore(this.__closeButton, this.domElement.childNodes[0])) : (tE.addClass(this.__closeButton, t2.CLASS_CLOSE_BOTTOM), this.domElement.appendChild(this.__closeButton)), tE.bind(this.__closeButton, "click", function() {
|
|
@@ -27691,7 +27691,7 @@ void main(void){
|
|
|
27691
27691
|
n2.autoPlace && (OT.isUndefined(n2.parent) && (xE && (bE = document.createElement("div"), tE.addClass(bE, "dg"), tE.addClass(bE, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(bE), xE = false), bE.appendChild(this.domElement), tE.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || DE(i2, n2.width)), this.__resizeHandler = function() {
|
|
27692
27692
|
i2.onResizeDebounced();
|
|
27693
27693
|
}, tE.bind(window, "resize", this.__resizeHandler), tE.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), tE.bind(this.__ul, "transitionend", this.__resizeHandler), tE.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), n2.resizable && OE(this), o2 = function() {
|
|
27694
|
-
_E && localStorage.getItem(
|
|
27694
|
+
_E && localStorage.getItem(RE(i2, "isLocal")) === "true" && localStorage.setItem(RE(i2, "gui"), JSON.stringify(i2.getSaveObject()));
|
|
27695
27695
|
}, this.saveToLocalStorageIfPossible = o2, n2.parent || ((r2 = i2.getRoot()).width += 1, OT.defer(function() {
|
|
27696
27696
|
r2.width -= 1;
|
|
27697
27697
|
}));
|
|
@@ -27727,7 +27727,7 @@ void main(void){
|
|
|
27727
27727
|
}
|
|
27728
27728
|
}
|
|
27729
27729
|
}
|
|
27730
|
-
function
|
|
27730
|
+
function IE(t2, e2, i2, n2) {
|
|
27731
27731
|
if (e2[i2] === void 0)
|
|
27732
27732
|
throw new Error('Object "' + e2 + '" has no property "' + i2 + '"');
|
|
27733
27733
|
var r2 = void 0;
|
|
@@ -27747,11 +27747,11 @@ void main(void){
|
|
|
27747
27747
|
if (i3.__li = e3, i3.__gui = t3, OT.extend(i3, { options: function(e4) {
|
|
27748
27748
|
if (arguments.length > 1) {
|
|
27749
27749
|
var n4 = i3.__li.nextElementSibling;
|
|
27750
|
-
return i3.remove(),
|
|
27750
|
+
return i3.remove(), IE(t3, i3.object, i3.property, { before: n4, factoryArgs: [OT.toArray(arguments)] });
|
|
27751
27751
|
}
|
|
27752
27752
|
if (OT.isArray(e4) || OT.isObject(e4)) {
|
|
27753
27753
|
var r4 = i3.__li.nextElementSibling;
|
|
27754
|
-
return i3.remove(),
|
|
27754
|
+
return i3.remove(), IE(t3, i3.object, i3.property, { before: r4, factoryArgs: [e4] });
|
|
27755
27755
|
}
|
|
27756
27756
|
}, name: function(t4) {
|
|
27757
27757
|
return i3.__li.firstElementChild.firstElementChild.innerHTML = t4, i3;
|
|
@@ -27773,7 +27773,7 @@ void main(void){
|
|
|
27773
27773
|
if (OT.isNumber(i3.__min) && OT.isNumber(i3.__max)) {
|
|
27774
27774
|
var n4 = i3.__li.firstElementChild.firstElementChild.innerHTML, r4 = i3.__gui.__listening.indexOf(i3) > -1;
|
|
27775
27775
|
i3.remove();
|
|
27776
|
-
var s3 =
|
|
27776
|
+
var s3 = IE(t3, i3.object, i3.property, { before: i3.__li.nextElementSibling, factoryArgs: [i3.__min, i3.__max, i3.__step] });
|
|
27777
27777
|
return s3.name(n4), r4 && s3.listen(), s3;
|
|
27778
27778
|
}
|
|
27779
27779
|
return e4;
|
|
@@ -27798,7 +27798,7 @@ void main(void){
|
|
|
27798
27798
|
}, i3.setValue);
|
|
27799
27799
|
}(t2, l2, r2), t2.__controllers.push(r2), r2;
|
|
27800
27800
|
}
|
|
27801
|
-
function
|
|
27801
|
+
function RE(t2, e2) {
|
|
27802
27802
|
return document.location.href + "." + e2;
|
|
27803
27803
|
}
|
|
27804
27804
|
function CE(t2, e2, i2) {
|
|
@@ -27828,7 +27828,7 @@ void main(void){
|
|
|
27828
27828
|
t2.preset = this.value;
|
|
27829
27829
|
}), e2.appendChild(o2), e2.appendChild(i2), e2.appendChild(n2), e2.appendChild(r2), e2.appendChild(s2), _E) {
|
|
27830
27830
|
var a2 = document.getElementById("dg-local-explain"), l2 = document.getElementById("dg-local-storage");
|
|
27831
|
-
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(
|
|
27831
|
+
document.getElementById("dg-save-locally").style.display = "block", localStorage.getItem(RE(0, "isLocal")) === "true" && l2.setAttribute("checked", "checked"), LE(t2, a2), tE.bind(l2, "change", function() {
|
|
27832
27832
|
t2.useLocalStorage = !t2.useLocalStorage, LE(t2, a2);
|
|
27833
27833
|
});
|
|
27834
27834
|
}
|
|
@@ -27878,9 +27878,9 @@ void main(void){
|
|
|
27878
27878
|
}, wE.CLASS_AUTO_PLACE = "a", wE.CLASS_AUTO_PLACE_CONTAINER = "ac", wE.CLASS_MAIN = "main", wE.CLASS_CONTROLLER_ROW = "cr", wE.CLASS_TOO_TALL = "taller-than-window", wE.CLASS_CLOSED = "closed", wE.CLASS_CLOSE_BUTTON = "close-button", wE.CLASS_CLOSE_TOP = "close-top", wE.CLASS_CLOSE_BOTTOM = "close-bottom", wE.CLASS_DRAG = "drag", wE.DEFAULT_WIDTH = 245, wE.TEXT_CLOSED = "Close Controls", wE.TEXT_OPEN = "Open Controls", wE._keydownHandler = function(t2) {
|
|
27879
27879
|
document.activeElement.type === "text" || t2.which !== 72 && t2.keyCode !== 72 || wE.toggleHide();
|
|
27880
27880
|
}, tE.bind(window, "keydown", wE._keydownHandler, false), OT.extend(wE.prototype, { add: function(t2, e2) {
|
|
27881
|
-
return
|
|
27881
|
+
return IE(this, t2, e2, { factoryArgs: Array.prototype.slice.call(arguments, 2) });
|
|
27882
27882
|
}, addColor: function(t2, e2) {
|
|
27883
|
-
return
|
|
27883
|
+
return IE(this, t2, e2, { color: true });
|
|
27884
27884
|
}, remove: function(t2) {
|
|
27885
27885
|
this.__ul.removeChild(t2.__li), this.__controllers.splice(this.__controllers.indexOf(t2), 1);
|
|
27886
27886
|
var e2 = this;
|
|
@@ -28348,7 +28348,7 @@ void main(void){
|
|
|
28348
28348
|
}
|
|
28349
28349
|
var tw = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange" }, ew = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, iw = "";
|
|
28350
28350
|
try {
|
|
28351
|
-
iw = "0.7.
|
|
28351
|
+
iw = "0.7.2";
|
|
28352
28352
|
} catch (t2) {
|
|
28353
28353
|
iw = "dev";
|
|
28354
28354
|
}
|
|
@@ -28360,11 +28360,11 @@ void main(void){
|
|
|
28360
28360
|
var rw = function(t2) {
|
|
28361
28361
|
function e2(i3) {
|
|
28362
28362
|
var n3 = t2.call(this) || this;
|
|
28363
|
-
return n3.iosResetCache = [], n3.needClearCacheImage = false, n3.version = iw, n3.__slideState = Hb()(ew), n3.userInputTime = 0, n3.isSyncingSlideState = false, n3.frozenTaskManager = new jE(), n3.randomId = o(), n3.resize = false, n3.isAnimating = false, n3.renderingTaskManager = new
|
|
28363
|
+
return n3.iosResetCache = [], n3.needClearCacheImage = false, n3.version = iw, n3.__slideState = Hb()(ew), n3.userInputTime = 0, n3.isSyncingSlideState = false, n3.frozenTaskManager = new jE(), n3.randomId = o(), n3.resize = false, n3.isAnimating = false, n3.renderingTaskManager = new RT(), n3.isLoading = false, n3.interactive = true, n3.renderingIndex = 0, n3.frameWidth = 1, n3.frameHeight = 1, n3.frame = document.createElement("div"), n3.canvasContainer = document.createElement("div"), n3.medianController = document.createElement("div"), n3.frameResizeObserver = new KE(function() {
|
|
28364
28364
|
return n3.frameResizeHandler();
|
|
28365
28365
|
}), n3.timestamp = function() {
|
|
28366
28366
|
return Date.now();
|
|
28367
|
-
}, n3.mode = "local", n3.enableGlobalClick = false, n3.lastEmitedState = null, n3.playerController = null, n3.isInitResized = false, n3.cacheImage = document.createElement("img"), n3.isTouchStart = false, n3.touchStartId = void 0, n3.taskId = "", n3.volumeAdjuster = new
|
|
28367
|
+
}, n3.mode = "local", n3.enableGlobalClick = false, n3.lastEmitedState = null, n3.playerController = null, n3.isInitResized = false, n3.cacheImage = document.createElement("img"), n3.isTouchStart = false, n3.touchStartId = void 0, n3.taskId = "", n3.volumeAdjuster = new Rb(), n3.designWidth = 0, n3.designHeight = 0, n3._slideCount = 0, n3._dispatchIncrId = 0, n3._receiveIncrId = 0, n3.recoverHandler = function(t3) {
|
|
28368
28368
|
if (t3.data.type === "@slide/_recover_" && t3.data.slideId === n3.randomId) {
|
|
28369
28369
|
var e3 = t3.data, i4 = e3.recoverBy, r2 = e3.payload;
|
|
28370
28370
|
if (!r2)
|
|
@@ -28854,9 +28854,9 @@ void main(void){
|
|
|
28854
28854
|
}, e2.clearLocalCache = function() {
|
|
28855
28855
|
Ob.clearLocalCache();
|
|
28856
28856
|
}, e2.disposeLocalCache = function() {
|
|
28857
|
-
}, i2 = e2, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = Fb, e2.handleLogReport = function() {
|
|
28857
|
+
}, i2 = e2, e2._tempLog = "", e2._tempLogIndex = 1, e2.usePlugin = Fb, e2.handleLogReport = function(t3) {
|
|
28858
28858
|
return ZE(void 0, void 0, void 0, function() {
|
|
28859
|
-
var
|
|
28859
|
+
var n3, r2, s2, o2, a2, l2;
|
|
28860
28860
|
return JE(i2, function(i3) {
|
|
28861
28861
|
switch (i3.label) {
|
|
28862
28862
|
case 0:
|
|
@@ -28864,15 +28864,15 @@ void main(void){
|
|
|
28864
28864
|
case 1:
|
|
28865
28865
|
return i3.sent(), nw ? [4, nw.keys()] : [3, 6];
|
|
28866
28866
|
case 2:
|
|
28867
|
-
|
|
28867
|
+
n3 = (i3.sent() || []).sort(function(t4, e3) {
|
|
28868
28868
|
return parseInt(t4.replace("run_time_log_", "")) - parseInt(e3.replace("run_time_log_", ""));
|
|
28869
|
-
}),
|
|
28869
|
+
}), r2 = 0, s2 = n3, i3.label = 3;
|
|
28870
28870
|
case 3:
|
|
28871
|
-
return
|
|
28871
|
+
return r2 < s2.length ? (o2 = s2[r2], a2 = o2.replace("run_time_log_", ""), [4, nw.getItem(o2)]) : [3, 6];
|
|
28872
28872
|
case 4:
|
|
28873
|
-
|
|
28873
|
+
l2 = i3.sent(), window.postMessage({ type: "@slide/_report_log_", log: l2, index: parseInt(a2, 10), total: n3.length, customMessage: "@slide/_report_log_", sessionId: t3 }), i3.label = 5;
|
|
28874
28874
|
case 5:
|
|
28875
|
-
return
|
|
28875
|
+
return r2++, [3, 3];
|
|
28876
28876
|
case 6:
|
|
28877
28877
|
return [2];
|
|
28878
28878
|
}
|
|
@@ -28930,7 +28930,7 @@ void main(void){
|
|
|
28930
28930
|
})], e2.prototype, "initSlideConfig", null), e2;
|
|
28931
28931
|
}($a.a);
|
|
28932
28932
|
nw == null || nw.clear(), window.addEventListener("__slide_log__", rw.handleLogDownload), window.addEventListener("message", function(t2) {
|
|
28933
|
-
t2.data.type === "@slide/_request_log_" && rw.handleLogReport().catch(function() {
|
|
28933
|
+
t2.data.type === "@slide/_request_log_" && rw.handleLogReport(t2.data.sessionId).catch(function() {
|
|
28934
28934
|
});
|
|
28935
28935
|
}), window.setInterval(function() {
|
|
28936
28936
|
rw.flushLog().catch(function() {
|
|
@@ -31127,7 +31127,7 @@ class SlidePreviewer {
|
|
|
31127
31127
|
}
|
|
31128
31128
|
}
|
|
31129
31129
|
const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
|
|
31130
|
-
const version = "0.2.
|
|
31130
|
+
const version = "0.2.12";
|
|
31131
31131
|
const SlideApp = {
|
|
31132
31132
|
kind: "Slide",
|
|
31133
31133
|
setup(context) {
|