@netless/app-slide 0.2.84 → 0.2.85

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.es.js CHANGED
@@ -498,7 +498,7 @@ var Slide = function(t) {
498
498
  }), i.d(e, "j", function() {
499
499
  return b;
500
500
  }), i.d(e, "k", function() {
501
- return Nt;
501
+ return Lt;
502
502
  }), i.d(e, "l", function() {
503
503
  return V;
504
504
  }), i.d(e, "m", function() {
@@ -514,9 +514,9 @@ var Slide = function(t) {
514
514
  }), i.d(e, "r", function() {
515
515
  return Ot;
516
516
  }), i.d(e, "s", function() {
517
- return Lt;
517
+ return Nt;
518
518
  }), i.d(e, "t", function() {
519
- return N;
519
+ return L;
520
520
  }), i.d(e, "u", function() {
521
521
  return Ft;
522
522
  }), i.d(e, "v", function() {
@@ -1094,14 +1094,14 @@ var Slide = function(t) {
1094
1094
  return "[@pixi/core:TextureUvs x0=" + this.x0 + " y0=" + this.y0 + " x1=" + this.x1 + " y1=" + this.y1 + " x2=" + this.x2 + " y2=" + this.y2 + " x3=" + this.x3 + " y3=" + this.y3 + "]";
1095
1095
  }, t2;
1096
1096
  }(), O = new P();
1097
- function L(t2) {
1097
+ function N(t2) {
1098
1098
  t2.destroy = function() {
1099
1099
  }, t2.on = function() {
1100
1100
  }, t2.once = function() {
1101
1101
  }, t2.emit = function() {
1102
1102
  };
1103
1103
  }
1104
- var N = function(t2) {
1104
+ var L = function(t2) {
1105
1105
  function e2(i2, n2, r2, o2, s2, a2) {
1106
1106
  var h2 = t2.call(this) || this;
1107
1107
  if (h2.noFrame = false, n2 || (h2.noFrame = true, n2 = new l.j(0, 0, 1, 1)), i2 instanceof e2 && (i2 = i2.baseTexture), h2.baseTexture = i2, h2._frame = n2, h2.trim = o2, h2.valid = false, h2._uvs = O, h2.uvMatrix = null, h2.orig = r2 || n2, h2._rotate = Number(s2 || 0), true === s2)
@@ -1210,11 +1210,11 @@ var Slide = function(t) {
1210
1210
  }, enumerable: false, configurable: true }), e2.prototype.castToBaseTexture = function() {
1211
1211
  return this.baseTexture;
1212
1212
  }, Object.defineProperty(e2, "EMPTY", { get: function() {
1213
- return e2._EMPTY || (e2._EMPTY = new e2(new v()), L(e2._EMPTY), L(e2._EMPTY.baseTexture)), e2._EMPTY;
1213
+ return e2._EMPTY || (e2._EMPTY = new e2(new v()), N(e2._EMPTY), N(e2._EMPTY.baseTexture)), e2._EMPTY;
1214
1214
  }, enumerable: false, configurable: true }), Object.defineProperty(e2, "WHITE", { get: function() {
1215
1215
  if (!e2._WHITE) {
1216
1216
  var t3 = document.createElement("canvas"), i2 = t3.getContext("2d");
1217
- t3.width = 16, t3.height = 16, i2.fillStyle = "white", i2.fillRect(0, 0, 16, 16), e2._WHITE = new e2(new v(new b(t3))), L(e2._WHITE), L(e2._WHITE.baseTexture);
1217
+ t3.width = 16, t3.height = 16, i2.fillStyle = "white", i2.fillRect(0, 0, 16, 16), e2._WHITE = new e2(new v(new b(t3))), N(e2._WHITE), N(e2._WHITE.baseTexture);
1218
1218
  }
1219
1219
  return e2._WHITE;
1220
1220
  }, enumerable: false, configurable: true }), e2;
@@ -1241,7 +1241,7 @@ var Slide = function(t) {
1241
1241
  n2[r2 - 1] = i2[r2];
1242
1242
  return "number" == typeof t3 && (Object(o.deprecation)("6.0.0", "Arguments (width, height, scaleMode, resolution) have been deprecated."), t3 = { width: t3, height: n2[0], scaleMode: n2[1], resolution: n2[2] }), new e2(new I(t3));
1243
1243
  }, e2;
1244
- }(N), F = function() {
1244
+ }(L), F = function() {
1245
1245
  function t2(t3) {
1246
1246
  this.texturePool = {}, this.textureOptions = t3 || {}, this.enableFullScreen = false, this._pixelsWidth = 0, this._pixelsHeight = 0;
1247
1247
  }
@@ -2073,7 +2073,7 @@ var Slide = function(t) {
2073
2073
  }, enumerable: false, configurable: true }), t2.from = function(e2, i2, n2) {
2074
2074
  return new t2(Pt.from(e2, i2), n2);
2075
2075
  }, t2;
2076
- }(), Lt = function() {
2076
+ }(), Nt = function() {
2077
2077
  function t2() {
2078
2078
  this.data = 0, this.blendMode = r.b.NORMAL, this.polygonOffset = 0, this.blend = true, this.depthMask = true;
2079
2079
  }
@@ -2115,10 +2115,10 @@ var Slide = function(t) {
2115
2115
  var e2 = new t2();
2116
2116
  return e2.depthTest = false, e2.blend = true, e2;
2117
2117
  }, t2;
2118
- }(), Nt = function(t2) {
2118
+ }(), Lt = function(t2) {
2119
2119
  function e2(i2, r2, o2) {
2120
2120
  var s2 = this, a2 = Pt.from(i2 || e2.defaultVertexSrc, r2 || e2.defaultFragmentSrc);
2121
- return (s2 = t2.call(this, a2, o2) || this).padding = 0, s2.resolution = n.b.FILTER_RESOLUTION, s2.multisample = n.b.FILTER_MULTISAMPLE, s2.enabled = true, s2.autoFit = true, s2.state = new Lt(), s2;
2121
+ return (s2 = t2.call(this, a2, o2) || this).padding = 0, s2.resolution = n.b.FILTER_RESOLUTION, s2.multisample = n.b.FILTER_MULTISAMPLE, s2.enabled = true, s2.autoFit = true, s2.state = new Nt(), s2;
2122
2122
  }
2123
2123
  return d(e2, t2), e2.prototype.apply = function(t3, e3, i2, n2, r2) {
2124
2124
  t3.applyFilter(this, e3, i2, n2);
@@ -2177,7 +2177,7 @@ var Slide = function(t) {
2177
2177
  var r2 = this._maskSprite, o2 = r2._texture;
2178
2178
  o2.valid && (o2.uvMatrix || (o2.uvMatrix = new Ft(o2, 0)), o2.uvMatrix.update(), this.uniforms.npmAlpha = o2.baseTexture.alphaMode ? 0 : 1, this.uniforms.mask = o2, this.uniforms.otherMatrix = t3.calculateSpriteMatrix(this.maskMatrix, r2).prepend(o2.uvMatrix.mapCoord), this.uniforms.alpha = r2.worldAlpha, this.uniforms.maskClamp = o2.uvMatrix.uClampFrame, t3.applyFilter(this, e3, i2, n2));
2179
2179
  }, e2;
2180
- }(Nt), Ut = function() {
2180
+ }(Lt), Ut = function() {
2181
2181
  function t2(t3) {
2182
2182
  this.renderer = t3, this.enableScissor = true, this.alphaMaskPool = [], this.maskDataPool = [], this.maskStack = [], this.alphaMaskIndex = 0;
2183
2183
  }
@@ -2536,7 +2536,7 @@ var Slide = function(t) {
2536
2536
  }();
2537
2537
  var ie = function() {
2538
2538
  function t2() {
2539
- this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = r.b.NONE, this._blendEq = false, this.map = [], this.map[0] = this.setBlend, this.map[1] = this.setOffset, this.map[2] = this.setCullFace, this.map[3] = this.setDepthTest, this.map[4] = this.setFrontFace, this.map[5] = this.setDepthMask, this.checks = [], this.defaultState = new Lt(), this.defaultState.blend = true;
2539
+ this.gl = null, this.stateId = 0, this.polygonOffset = 0, this.blendMode = r.b.NONE, this._blendEq = false, this.map = [], this.map[0] = this.setBlend, this.map[1] = this.setOffset, this.map[2] = this.setCullFace, this.map[3] = this.setDepthTest, this.map[4] = this.setFrontFace, this.map[5] = this.setDepthMask, this.checks = [], this.defaultState = new Nt(), this.defaultState.blend = true;
2540
2540
  }
2541
2541
  return t2.prototype.contextChange = function(t3) {
2542
2542
  this.gl = t3, this.blendModes = function(t4, e2) {
@@ -2910,7 +2910,7 @@ var Slide = function(t) {
2910
2910
  }(), _e = function(t2) {
2911
2911
  function e2(e3) {
2912
2912
  var i2 = t2.call(this, e3) || this;
2913
- return i2.shaderGenerator = null, i2.geometryClass = null, i2.vertexSize = null, i2.state = Lt.for2d(), i2.size = 4 * n.b.SPRITE_BATCH_SIZE, i2._vertexCount = 0, i2._indexCount = 0, i2._bufferedElements = [], i2._bufferedTextures = [], i2._bufferSize = 0, i2._shader = null, i2._packedGeometries = [], i2._packedGeometryPoolSize = 2, i2._flushId = 0, i2._aBuffers = {}, i2._iBuffers = {}, i2.MAX_TEXTURES = 1, i2.renderer.on("prerender", i2.onPrerender, i2), e3.runners.contextChange.add(i2), i2._dcIndex = 0, i2._aIndex = 0, i2._iIndex = 0, i2._attributeBuffer = null, i2._indexBuffer = null, i2._tempBoundTextures = [], i2;
2913
+ return i2.shaderGenerator = null, i2.geometryClass = null, i2.vertexSize = null, i2.state = Nt.for2d(), i2.size = 4 * n.b.SPRITE_BATCH_SIZE, i2._vertexCount = 0, i2._indexCount = 0, i2._bufferedElements = [], i2._bufferedTextures = [], i2._bufferSize = 0, i2._shader = null, i2._packedGeometries = [], i2._packedGeometryPoolSize = 2, i2._flushId = 0, i2._aBuffers = {}, i2._iBuffers = {}, i2.MAX_TEXTURES = 1, i2.renderer.on("prerender", i2.onPrerender, i2), e3.runners.contextChange.add(i2), i2._dcIndex = 0, i2._aIndex = 0, i2._iIndex = 0, i2._attributeBuffer = null, i2._indexBuffer = null, i2._tempBoundTextures = [], i2;
2914
2914
  }
2915
2915
  return d(e2, t2), e2.prototype.contextChange = function() {
2916
2916
  var t3 = this.renderer.gl;
@@ -3097,13 +3097,13 @@ var Slide = function(t) {
3097
3097
  }), i.d(e, "premultiplyTintToRgba", function() {
3098
3098
  return w;
3099
3099
  }), i.d(e, "removeItems", function() {
3100
- return L;
3100
+ return N;
3101
3101
  }), i.d(e, "rgb2hex", function() {
3102
3102
  return x;
3103
3103
  }), i.d(e, "sayHello", function() {
3104
3104
  return f;
3105
3105
  }), i.d(e, "sign", function() {
3106
- return N;
3106
+ return L;
3107
3107
  }), i.d(e, "skipHello", function() {
3108
3108
  return p;
3109
3109
  }), i.d(e, "string2hex", function() {
@@ -3243,7 +3243,7 @@ var Slide = function(t) {
3243
3243
  var e2 = (t2 > 65535 ? 1 : 0) << 4, i2 = ((t2 >>>= e2) > 255 ? 1 : 0) << 3;
3244
3244
  return e2 |= i2, e2 |= i2 = ((t2 >>>= i2) > 15 ? 1 : 0) << 2, (e2 |= i2 = ((t2 >>>= i2) > 3 ? 1 : 0) << 1) | (t2 >>>= i2) >> 1;
3245
3245
  }
3246
- function L(t2, e2, i2) {
3246
+ function N(t2, e2, i2) {
3247
3247
  var n2, r2 = t2.length;
3248
3248
  if (!(e2 >= r2 || 0 === i2)) {
3249
3249
  var o2 = r2 - (i2 = e2 + i2 > r2 ? r2 - e2 : i2);
@@ -3252,7 +3252,7 @@ var Slide = function(t) {
3252
3252
  t2.length = o2;
3253
3253
  }
3254
3254
  }
3255
- function N(t2) {
3255
+ function L(t2) {
3256
3256
  return 0 === t2 ? 0 : t2 < 0 ? -1 : 1;
3257
3257
  }
3258
3258
  var D = 0;
@@ -3340,7 +3340,7 @@ var Slide = function(t) {
3340
3340
  * @pixi/settings is licensed under the MIT License.
3341
3341
  * http://www.opensource.org/licenses/mit-license
3342
3342
  */
3343
- var y, x, b, T, E, S, w, A, M, C, R, I, P, O, L, N, D, F, B, U = function(t2) {
3343
+ var y, x, b, T, E, S, w, A, M, C, R, I, P, O, N, L, D, F, B, U = function(t2) {
3344
3344
  var e2 = { userAgent: "", platform: "", maxTouchPoints: 0 };
3345
3345
  t2 || "undefined" == typeof navigator ? "string" == typeof t2 ? e2.userAgent = t2 : t2 && t2.userAgent && (e2 = { userAgent: t2.userAgent, platform: t2.platform, maxTouchPoints: t2.maxTouchPoints || 0 }) : e2 = { userAgent: navigator.userAgent, platform: navigator.platform, maxTouchPoints: navigator.maxTouchPoints || 0 };
3346
3346
  var i2 = e2.userAgent, y2 = i2.split("[FBAN");
@@ -3382,9 +3382,9 @@ var Slide = function(t) {
3382
3382
  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";
3383
3383
  }(O || (O = {})), function(t2) {
3384
3384
  t2[t2.AUTO = 0] = "AUTO", t2[t2.MANUAL = 1] = "MANUAL";
3385
- }(L || (L = {})), function(t2) {
3386
- t2.LOW = "lowp", t2.MEDIUM = "mediump", t2.HIGH = "highp";
3387
3385
  }(N || (N = {})), function(t2) {
3386
+ t2.LOW = "lowp", t2.MEDIUM = "mediump", t2.HIGH = "highp";
3387
+ }(L || (L = {})), function(t2) {
3388
3388
  t2[t2.NONE = 0] = "NONE", t2[t2.SCISSOR = 1] = "SCISSOR", t2[t2.STENCIL = 2] = "STENCIL", t2[t2.SPRITE = 3] = "SPRITE";
3389
3389
  }(D || (D = {})), function(t2) {
3390
3390
  t2[t2.NONE = 0] = "NONE", t2[t2.LOW = 2] = "LOW", t2[t2.MEDIUM = 4] = "MEDIUM", t2[t2.HIGH = 8] = "HIGH";
@@ -3405,7 +3405,7 @@ var Slide = function(t) {
3405
3405
  }
3406
3406
  }
3407
3407
  return e2 ? t2 : 4;
3408
- }(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: L.AUTO, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: R.CLAMP, SCALE_MODE: C.LINEAR, PRECISION_VERTEX: N.HIGH, PRECISION_FRAGMENT: U.apple.device ? N.HIGH : N.MEDIUM, CAN_UPLOAD_SAME_BUFFER: !U.apple.device, CREATE_IMAGE_BITMAP: false, ROUND_PIXELS: false };
3408
+ }(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: N.AUTO, GC_MAX_IDLE: 3600, GC_MAX_CHECK_COUNT: 600, WRAP_MODE: R.CLAMP, SCALE_MODE: C.LINEAR, PRECISION_VERTEX: L.HIGH, PRECISION_FRAGMENT: U.apple.device ? L.HIGH : L.MEDIUM, CAN_UPLOAD_SAME_BUFFER: !U.apple.device, CREATE_IMAGE_BITMAP: false, ROUND_PIXELS: false };
3409
3409
  }, function(t, e, i) {
3410
3410
  i.d(e, "a", function() {
3411
3411
  return s;
@@ -5488,21 +5488,21 @@ var Slide = function(t) {
5488
5488
  i3 = M.indexOf(t3[e4]), n2 = M.indexOf(t3[e4 + 1]), r2 = M.indexOf(t3[e4 + 2]), o2 = M.indexOf(t3[e4 + 3]), u2[l2++] = i3 << 2 | n2 >> 4, u2[l2++] = (15 & n2) << 4 | r2 >> 2, u2[l2++] = (3 & r2) << 6 | 63 & o2;
5489
5489
  return h2;
5490
5490
  }
5491
- function L(t3) {
5491
+ function N(t3) {
5492
5492
  var e4, i3 = new Uint8Array(t3), n2 = "";
5493
5493
  for (e4 = 0; e4 < i3.length; e4 += 3)
5494
5494
  n2 += M[i3[e4] >> 2], n2 += M[(3 & i3[e4]) << 4 | i3[e4 + 1] >> 4], n2 += M[(15 & i3[e4 + 1]) << 2 | i3[e4 + 2] >> 6], n2 += M[63 & i3[e4 + 2]];
5495
5495
  return i3.length % 3 == 2 ? n2 = n2.substring(0, n2.length - 1) + "=" : i3.length % 3 == 1 && (n2 = n2.substring(0, n2.length - 2) + "=="), n2;
5496
5496
  }
5497
- var N = { serialize: function(t3, e4) {
5497
+ var L = { serialize: function(t3, e4) {
5498
5498
  var i3 = "";
5499
5499
  if (t3 && (i3 = P.call(t3)), t3 && ("[object ArrayBuffer]" === i3 || t3.buffer && "[object ArrayBuffer]" === P.call(t3.buffer))) {
5500
5500
  var n2, r2 = "__lfsc__:";
5501
- t3 instanceof ArrayBuffer ? (n2 = t3, r2 += "arbf") : (n2 = t3.buffer, "[object Int8Array]" === i3 ? r2 += "si08" : "[object Uint8Array]" === i3 ? r2 += "ui08" : "[object Uint8ClampedArray]" === i3 ? r2 += "uic8" : "[object Int16Array]" === i3 ? r2 += "si16" : "[object Uint16Array]" === i3 ? r2 += "ur16" : "[object Int32Array]" === i3 ? r2 += "si32" : "[object Uint32Array]" === i3 ? r2 += "ui32" : "[object Float32Array]" === i3 ? r2 += "fl32" : "[object Float64Array]" === i3 ? r2 += "fl64" : e4(new Error("Failed to get type for BinaryArray"))), e4(r2 + L(n2));
5501
+ t3 instanceof ArrayBuffer ? (n2 = t3, r2 += "arbf") : (n2 = t3.buffer, "[object Int8Array]" === i3 ? r2 += "si08" : "[object Uint8Array]" === i3 ? r2 += "ui08" : "[object Uint8ClampedArray]" === i3 ? r2 += "uic8" : "[object Int16Array]" === i3 ? r2 += "si16" : "[object Uint16Array]" === i3 ? r2 += "ur16" : "[object Int32Array]" === i3 ? r2 += "si32" : "[object Uint32Array]" === i3 ? r2 += "ui32" : "[object Float32Array]" === i3 ? r2 += "fl32" : "[object Float64Array]" === i3 ? r2 += "fl64" : e4(new Error("Failed to get type for BinaryArray"))), e4(r2 + N(n2));
5502
5502
  } else if ("[object Blob]" === i3) {
5503
5503
  var o2 = new FileReader();
5504
5504
  o2.onload = function() {
5505
- var i4 = "~~local_forage_type~" + t3.type + "~" + L(this.result);
5505
+ var i4 = "~~local_forage_type~" + t3.type + "~" + N(this.result);
5506
5506
  e4("__lfsc__:blob" + i4);
5507
5507
  }, o2.readAsArrayBuffer(t3);
5508
5508
  } else
@@ -5546,7 +5546,7 @@ var Slide = function(t) {
5546
5546
  default:
5547
5547
  throw new Error("Unkown type: " + n2);
5548
5548
  }
5549
- }, stringToBuffer: O, bufferToString: L };
5549
+ }, stringToBuffer: O, bufferToString: N };
5550
5550
  function D(t3, e4, i3, n2) {
5551
5551
  t3.executeSql("CREATE TABLE IF NOT EXISTS " + e4.storeName + " (id INTEGER PRIMARY KEY, key unique, value)", [], i3, n2);
5552
5552
  }
@@ -5619,7 +5619,7 @@ var Slide = function(t) {
5619
5619
  });
5620
5620
  }, n3);
5621
5621
  });
5622
- return i3.serializer = N, r2;
5622
+ return i3.serializer = L, r2;
5623
5623
  }, _support: "function" == typeof openDatabase, iterate: function(t3, e4) {
5624
5624
  var i3 = this, n2 = new s(function(e5, n3) {
5625
5625
  i3.ready().then(function() {
@@ -5785,7 +5785,7 @@ var Slide = function(t) {
5785
5785
  if (t3)
5786
5786
  for (var i3 in t3)
5787
5787
  e4[i3] = t3[i3];
5788
- return e4.keyPrefix = G(t3, this._defaultConfig), H() ? (this._dbInfo = e4, e4.serializer = N, s.resolve()) : s.reject();
5788
+ return e4.keyPrefix = G(t3, this._defaultConfig), H() ? (this._dbInfo = e4, e4.serializer = L, s.resolve()) : s.reject();
5789
5789
  }, _support: function() {
5790
5790
  try {
5791
5791
  return "undefined" != typeof localStorage && "setItem" in localStorage && !!localStorage.setItem;
@@ -5977,7 +5977,7 @@ var Slide = function(t) {
5977
5977
  var n2 = W[t4] ? s.resolve(W[t4]) : s.reject(new Error("Driver not found."));
5978
5978
  return l(n2, e4, i3), n2;
5979
5979
  }, t3.prototype.getSerializer = function(t4) {
5980
- var e4 = s.resolve(N);
5980
+ var e4 = s.resolve(L);
5981
5981
  return l(e4, t4), e4;
5982
5982
  }, t3.prototype.ready = function(t4) {
5983
5983
  var e4 = this, i3 = e4._driverSet.then(function() {
@@ -6427,7 +6427,7 @@ var Slide = function(t) {
6427
6427
  function S() {
6428
6428
  this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
6429
6429
  }
6430
- var w = /^([a-z0-9.+-]+:)/i, A = /:[0-9]*$/, M = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, C = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", " "]), R = ["'"].concat(C), I = ["%", "/", "?", ";", "#"].concat(R), P = ["/", "?", "#"], O = /^[+a-z0-9A-Z_-]{0,63}$/, L = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, N = { javascript: true, "javascript:": true }, D = { javascript: true, "javascript:": true }, F = { http: true, https: true, ftp: true, gopher: true, file: true, "http:": true, "https:": true, "ftp:": true, "gopher:": true, "file:": true };
6430
+ var w = /^([a-z0-9.+-]+:)/i, A = /:[0-9]*$/, M = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, C = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", " "]), R = ["'"].concat(C), I = ["%", "/", "?", ";", "#"].concat(R), P = ["/", "?", "#"], O = /^[+a-z0-9A-Z_-]{0,63}$/, N = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, L = { javascript: true, "javascript:": true }, D = { javascript: true, "javascript:": true }, F = { http: true, https: true, ftp: true, gopher: true, file: true, "http:": true, "https:": true, "ftp:": true, "gopher:": true, "file:": true };
6431
6431
  function B(t3, e2, i2) {
6432
6432
  if (t3 && p(t3) && t3 instanceof S)
6433
6433
  return t3;
@@ -6472,7 +6472,7 @@ var Slide = function(t) {
6472
6472
  for (var E2 = "", S2 = 0, A2 = T2.length; S2 < A2; S2++)
6473
6473
  T2.charCodeAt(S2) > 127 ? E2 += "x" : E2 += T2[S2];
6474
6474
  if (!E2.match(O)) {
6475
- var C2 = y2.slice(0, g2), B2 = y2.slice(g2 + 1), U2 = T2.match(L);
6475
+ var C2 = y2.slice(0, g2), B2 = y2.slice(g2 + 1), U2 = T2.match(N);
6476
6476
  U2 && (C2.push(U2[1]), B2.unshift(U2[2])), B2.length && (s2 = "/" + B2.join(".") + s2), this.hostname = C2.join(".");
6477
6477
  break;
6478
6478
  }
@@ -6482,7 +6482,7 @@ var Slide = function(t) {
6482
6482
  var k2 = this.port ? ":" + this.port : "", G2 = this.hostname || "";
6483
6483
  this.host = G2 + k2, this.href += this.host, _2 && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== s2[0] && (s2 = "/" + s2));
6484
6484
  }
6485
- if (!N[h2])
6485
+ if (!L[h2])
6486
6486
  for (g2 = 0, b2 = R.length; g2 < b2; g2++) {
6487
6487
  var H2 = R[g2];
6488
6488
  if (-1 !== s2.indexOf(H2)) {
@@ -7319,7 +7319,7 @@ var Slide = function(t) {
7319
7319
  }, e2.prototype.dispose = function() {
7320
7320
  this.source = null;
7321
7321
  }, e2;
7322
- }(At), Lt = function(t3) {
7322
+ }(At), Nt = function(t3) {
7323
7323
  function e2(e3) {
7324
7324
  return t3.call(this, e3) || this;
7325
7325
  }
@@ -7327,7 +7327,7 @@ var Slide = function(t) {
7327
7327
  var e3 = globalThis.OffscreenCanvas;
7328
7328
  return !!(e3 && t4 instanceof e3) || globalThis.HTMLCanvasElement && t4 instanceof HTMLCanvasElement;
7329
7329
  }, e2;
7330
- }(Ot), Nt = function(t3) {
7330
+ }(Ot), Lt = function(t3) {
7331
7331
  function e2(i2, n2) {
7332
7332
  var o2 = this, s2 = n2 || {}, a2 = s2.width, l2 = s2.height, h2 = s2.autoLoad, u2 = s2.linkBaseTexture;
7333
7333
  if (i2 && i2.length !== e2.SIDES)
@@ -7524,7 +7524,7 @@ var Slide = function(t) {
7524
7524
  return !!globalThis.createImageBitmap && t4 instanceof ImageBitmap;
7525
7525
  }, e2;
7526
7526
  }(Ot);
7527
- bt.push(Dt, Ut, Lt, Bt, Ft, Mt, Nt, Pt);
7527
+ bt.push(Dt, Ut, Nt, Bt, Ft, Mt, Lt, Pt);
7528
7528
  var Gt = function(t3) {
7529
7529
  function e2() {
7530
7530
  return null !== t3 && t3.apply(this, arguments) || this;
@@ -7719,7 +7719,7 @@ var Slide = function(t) {
7719
7719
  }, enumerable: false, configurable: true }), Object.defineProperty(e2, "WHITE", { get: function() {
7720
7720
  if (!e2._WHITE) {
7721
7721
  var t4 = document.createElement("canvas"), i2 = t4.getContext("2d");
7722
- t4.width = 16, t4.height = 16, i2.fillStyle = "white", i2.fillRect(0, 0, 16, 16), e2._WHITE = new e2(new Rt(new Lt(t4))), Wt(e2._WHITE), Wt(e2._WHITE.baseTexture);
7722
+ t4.width = 16, t4.height = 16, i2.fillStyle = "white", i2.fillRect(0, 0, 16, 16), e2._WHITE = new e2(new Rt(new Nt(t4))), Wt(e2._WHITE), Wt(e2._WHITE.baseTexture);
7723
7723
  }
7724
7724
  return e2._WHITE;
7725
7725
  }, enumerable: false, configurable: true }), e2;
@@ -8493,14 +8493,14 @@ var Slide = function(t) {
8493
8493
  function Pe(t3) {
8494
8494
  return Ie[t3];
8495
8495
  }
8496
- var Oe = null, Le = { 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" };
8497
- function Ne(t3, e2) {
8496
+ var Oe = null, Ne = { 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" };
8497
+ function Le(t3, e2) {
8498
8498
  if (!Oe) {
8499
- var i2 = Object.keys(Le);
8499
+ var i2 = Object.keys(Ne);
8500
8500
  Oe = {};
8501
8501
  for (var n2 = 0; n2 < i2.length; ++n2) {
8502
8502
  var r2 = i2[n2];
8503
- Oe[t3[r2]] = Le[r2];
8503
+ Oe[t3[r2]] = Ne[r2];
8504
8504
  }
8505
8505
  }
8506
8506
  return Oe[e2];
@@ -8924,14 +8924,14 @@ var Slide = function(t) {
8924
8924
  for (var i3 = {}, n3 = e3.getProgramParameter(t4, e3.ACTIVE_ATTRIBUTES), r3 = 0; r3 < n3; r3++) {
8925
8925
  var o3 = e3.getActiveAttrib(t4, r3);
8926
8926
  if (0 !== o3.name.indexOf("gl_")) {
8927
- var s3 = Ne(e3, o3.type), a3 = { type: s3, name: o3.name, size: Pe(s3), location: e3.getAttribLocation(t4, o3.name) };
8927
+ var s3 = Le(e3, o3.type), a3 = { type: s3, name: o3.name, size: Pe(s3), location: e3.getAttribLocation(t4, o3.name) };
8928
8928
  i3[o3.name] = a3;
8929
8929
  }
8930
8930
  }
8931
8931
  return i3;
8932
8932
  }(r2, t3), e2.uniformData = function(t4, e3) {
8933
8933
  for (var i3 = {}, n3 = e3.getProgramParameter(t4, e3.ACTIVE_UNIFORMS), r3 = 0; r3 < n3; r3++) {
8934
- var o3 = e3.getActiveUniform(t4, r3), s3 = o3.name.replace(/\[.*?\]$/, ""), a3 = !!o3.name.match(/\[.*?\]$/), l3 = Ne(e3, o3.type);
8934
+ var o3 = e3.getActiveUniform(t4, r3), s3 = o3.name.replace(/\[.*?\]$/, ""), a3 = !!o3.name.match(/\[.*?\]$/), l3 = Le(e3, o3.type);
8935
8935
  i3[s3] = { name: s3, index: r3, type: l3, size: o3.size, isArray: a3, value: Se(l3, o3.size) };
8936
8936
  }
8937
8937
  return i3;
@@ -9615,8 +9615,8 @@ var Slide = function(t) {
9615
9615
  h2 && t4._cachedTint !== t4.tint && (t4._cachedTint = t4.tint, t4._cachedTexture = t4._cachedTexture || new Xt(u2), t4._tintedCanvas = o.b.getTintedCanvas({ texture: t4._cachedTexture }, t4.tint));
9616
9616
  var p2 = h2 ? t4._tintedCanvas : u2.getDrawableSource(), f2 = a2[e2] * u2.width, m2 = a2[i2] * u2.width, g2 = a2[n2] * u2.width, v2 = a2[e2 + 1] * u2.height, _2 = a2[i2 + 1] * u2.height, y2 = a2[n2 + 1] * u2.height, x2 = s2[e2], b2 = s2[i2], T2 = s2[n2], E2 = s2[e2 + 1], S2 = s2[i2 + 1], w2 = s2[n2 + 1], A2 = t4.canvasPadding / this.renderer.resolution;
9617
9617
  if (A2 > 0) {
9618
- var M2 = t4.worldTransform, C2 = M2.a, R2 = M2.b, I2 = M2.c, P2 = M2.d, O2 = (x2 + b2 + T2) / 3, L2 = (E2 + S2 + w2) / 3, N2 = x2 - O2, D2 = E2 - L2, F2 = C2 * N2 + I2 * D2, B2 = R2 * N2 + P2 * D2, U2 = Math.sqrt(F2 * F2 + B2 * B2), k2 = 1 + A2 / U2;
9619
- x2 = O2 + N2 * k2, E2 = L2 + D2 * k2, F2 = C2 * (N2 = b2 - O2) + I2 * (D2 = S2 - L2), B2 = R2 * N2 + P2 * D2, b2 = O2 + N2 * (k2 = 1 + A2 / (U2 = Math.sqrt(F2 * F2 + B2 * B2))), S2 = L2 + D2 * k2, F2 = C2 * (N2 = T2 - O2) + I2 * (D2 = w2 - L2), B2 = R2 * N2 + P2 * D2, T2 = O2 + N2 * (k2 = 1 + A2 / (U2 = Math.sqrt(F2 * F2 + B2 * B2))), w2 = L2 + D2 * k2;
9618
+ var M2 = t4.worldTransform, C2 = M2.a, R2 = M2.b, I2 = M2.c, P2 = M2.d, O2 = (x2 + b2 + T2) / 3, N2 = (E2 + S2 + w2) / 3, L2 = x2 - O2, D2 = E2 - N2, F2 = C2 * L2 + I2 * D2, B2 = R2 * L2 + P2 * D2, U2 = Math.sqrt(F2 * F2 + B2 * B2), k2 = 1 + A2 / U2;
9619
+ x2 = O2 + L2 * k2, E2 = N2 + D2 * k2, F2 = C2 * (L2 = b2 - O2) + I2 * (D2 = S2 - N2), B2 = R2 * L2 + P2 * D2, b2 = O2 + L2 * (k2 = 1 + A2 / (U2 = Math.sqrt(F2 * F2 + B2 * B2))), S2 = N2 + D2 * k2, F2 = C2 * (L2 = T2 - O2) + I2 * (D2 = w2 - N2), B2 = R2 * L2 + P2 * D2, T2 = O2 + L2 * (k2 = 1 + A2 / (U2 = Math.sqrt(F2 * F2 + B2 * B2))), w2 = N2 + D2 * k2;
9620
9620
  }
9621
9621
  r2.save(), r2.beginPath(), r2.moveTo(x2, E2), r2.lineTo(b2, S2), r2.lineTo(T2, w2), r2.closePath(), r2.clip();
9622
9622
  var G2 = f2 * _2 + v2 * g2 + m2 * y2 - _2 * g2 - v2 * m2 - f2 * y2, H2 = x2 * _2 + v2 * T2 + b2 * y2 - _2 * T2 - v2 * b2 - x2 * y2, j2 = f2 * b2 + x2 * g2 + m2 * T2 - b2 * g2 - x2 * m2 - f2 * T2, z2 = f2 * _2 * T2 + v2 * b2 * g2 + x2 * m2 * y2 - x2 * _2 * g2 - v2 * m2 * T2 - f2 * b2 * y2, V2 = E2 * _2 + v2 * w2 + S2 * y2 - _2 * w2 - v2 * S2 - E2 * y2, W2 = f2 * S2 + E2 * g2 + m2 * w2 - S2 * g2 - E2 * m2 - f2 * w2, X2 = f2 * _2 * w2 + v2 * S2 * g2 + E2 * m2 * y2 - E2 * _2 * g2 - v2 * m2 * w2 - f2 * S2 * y2;
@@ -9722,9 +9722,9 @@ var Slide = function(t) {
9722
9722
  for (var I = this.hostname.split(/\./), P = (M = 0, I.length); M < P; M++) {
9723
9723
  var O = I[M];
9724
9724
  if (O && !O.match(p)) {
9725
- for (var L = "", N = 0, D = O.length; N < D; N++)
9726
- O.charCodeAt(N) > 127 ? L += "x" : L += O[N];
9727
- if (!L.match(p)) {
9725
+ for (var N = "", L = 0, D = O.length; L < D; L++)
9726
+ O.charCodeAt(L) > 127 ? N += "x" : N += O[L];
9727
+ if (!N.match(p)) {
9728
9728
  var F = I.slice(0, M), B = I.slice(M + 1), U = O.match(f);
9729
9729
  U && (F.push(U[1]), B.unshift(U[2])), B.length && (y2 = "/" + B.join(".") + y2), this.hostname = F.join(".");
9730
9730
  break;
@@ -12396,13 +12396,13 @@ var Slide = function(t) {
12396
12396
  }, function(t, e, i) {
12397
12397
  var n = i(54), r = i(206), o = i(68), s = i(208), a = i(209), l = i(212), h = i(213), u = i(214), c = i(215), d = i(59), p = i(216), f = i(32), m = i(217), g = i(218), v = i(223), _ = i(31), y = i(41), x = i(225), b = i(21), T = i(227), E = i(40), S = i(45), w = {};
12398
12398
  w["[object Arguments]"] = w["[object Array]"] = w["[object ArrayBuffer]"] = w["[object DataView]"] = w["[object Boolean]"] = w["[object Date]"] = w["[object Float32Array]"] = w["[object Float64Array]"] = w["[object Int8Array]"] = w["[object Int16Array]"] = w["[object Int32Array]"] = w["[object Map]"] = w["[object Number]"] = w["[object Object]"] = w["[object RegExp]"] = w["[object Set]"] = w["[object String]"] = w["[object Symbol]"] = w["[object Uint8Array]"] = w["[object Uint8ClampedArray]"] = w["[object Uint16Array]"] = w["[object Uint32Array]"] = true, w["[object Error]"] = w["[object Function]"] = w["[object WeakMap]"] = false, t.exports = function t2(e2, i2, A, M, C, R) {
12399
- var I, P = 1 & i2, O = 2 & i2, L = 4 & i2;
12399
+ var I, P = 1 & i2, O = 2 & i2, N = 4 & i2;
12400
12400
  if (A && (I = C ? A(e2, M, C, R) : A(e2)), void 0 !== I)
12401
12401
  return I;
12402
12402
  if (!b(e2))
12403
12403
  return e2;
12404
- var N = _(e2);
12405
- if (N) {
12404
+ var L = _(e2);
12405
+ if (L) {
12406
12406
  if (I = m(e2), !P)
12407
12407
  return h(e2, I);
12408
12408
  } else {
@@ -12427,7 +12427,7 @@ var Slide = function(t) {
12427
12427
  }) : x(e2) && e2.forEach(function(n2, r2) {
12428
12428
  I.set(r2, t2(n2, i2, A, r2, e2, R));
12429
12429
  });
12430
- var U = N ? void 0 : (L ? O ? p : d : O ? S : E)(e2);
12430
+ var U = L ? void 0 : (N ? O ? p : d : O ? S : E)(e2);
12431
12431
  return r(U || e2, function(n2, r2) {
12432
12432
  U && (n2 = e2[r2 = n2]), o(I, r2, t2(n2, i2, A, r2, e2, R));
12433
12433
  }), I;
@@ -13836,7 +13836,7 @@ var Slide = function(t) {
13836
13836
  expandByObject(t2) {
13837
13837
  t2.updateWorldMatrix(false, false);
13838
13838
  const e2 = t2.geometry;
13839
- void 0 !== e2 && (null === e2.boundingBox && e2.computeBoundingBox(), L.copy(e2.boundingBox), L.applyMatrix4(t2.matrixWorld), this.union(L));
13839
+ void 0 !== e2 && (null === e2.boundingBox && e2.computeBoundingBox(), N.copy(e2.boundingBox), N.applyMatrix4(t2.matrixWorld), this.union(N));
13840
13840
  const i2 = t2.children;
13841
13841
  for (let t3 = 0, e3 = i2.length; t3 < e3; t3++)
13842
13842
  this.expandByObject(i2[t3]);
@@ -13864,9 +13864,9 @@ var Slide = function(t) {
13864
13864
  intersectsTriangle(t2) {
13865
13865
  if (this.isEmpty())
13866
13866
  return false;
13867
- this.getCenter(G), H.subVectors(this.max, G), N.subVectors(t2.a, G), D.subVectors(t2.b, G), F.subVectors(t2.c, G), B.subVectors(D, N), U.subVectors(F, D), k.subVectors(N, F);
13867
+ this.getCenter(G), H.subVectors(this.max, G), L.subVectors(t2.a, G), D.subVectors(t2.b, G), F.subVectors(t2.c, G), B.subVectors(D, L), U.subVectors(F, D), k.subVectors(L, F);
13868
13868
  let e2 = [0, -B.z, B.y, 0, -U.z, U.y, 0, -k.z, k.y, B.z, 0, -B.x, U.z, 0, -U.x, k.z, 0, -k.x, -B.y, B.x, 0, -U.y, U.x, 0, -k.y, k.x, 0];
13869
- return !!V(e2, N, D, F, H) && (e2 = [1, 0, 0, 0, 1, 0, 0, 0, 1], !!V(e2, N, D, F, H) && (j.crossVectors(B, U), e2 = [j.x, j.y, j.z], V(e2, N, D, F, H)));
13869
+ return !!V(e2, L, D, F, H) && (e2 = [1, 0, 0, 0, 1, 0, 0, 0, 1], !!V(e2, L, D, F, H) && (j.crossVectors(B, U), e2 = [j.x, j.y, j.z], V(e2, L, D, F, H)));
13870
13870
  }
13871
13871
  clampPoint(t2, e2) {
13872
13872
  return e2.copy(t2).clamp(this.min, this.max);
@@ -13894,7 +13894,7 @@ var Slide = function(t) {
13894
13894
  }
13895
13895
  }
13896
13896
  I.prototype.isBox3 = true;
13897
- const P = [new M(), new M(), new M(), new M(), new M(), new M(), new M(), new M()], O = new M(), L = new I(), N = new M(), D = new M(), F = new M(), B = new M(), U = new M(), k = new M(), G = new M(), H = new M(), j = new M(), z = new M();
13897
+ const P = [new M(), new M(), new M(), new M(), new M(), new M(), new M(), new M()], O = new M(), N = new I(), L = new M(), D = new M(), F = new M(), B = new M(), U = new M(), k = new M(), G = new M(), H = new M(), j = new M(), z = new M();
13898
13898
  function V(t2, e2, i2, n2, r2) {
13899
13899
  for (let o2 = 0, s2 = t2.length - 3; o2 <= s2; o2 += 3) {
13900
13900
  z.fromArray(t2, o2);
@@ -14173,8 +14173,8 @@ var Slide = function(t) {
14173
14173
  return this.multiplyMatrices(t2, this);
14174
14174
  }
14175
14175
  multiplyMatrices(t2, e2) {
14176
- const i2 = t2.elements, n2 = e2.elements, r2 = this.elements, o2 = i2[0], s2 = i2[4], a2 = i2[8], l2 = i2[12], h2 = i2[1], u2 = i2[5], c2 = 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], S2 = n2[12], w2 = n2[1], A2 = n2[5], M2 = n2[9], C2 = n2[13], R2 = n2[2], I2 = n2[6], P2 = n2[10], O2 = n2[14], L2 = n2[3], N2 = n2[7], D2 = n2[11], F2 = n2[15];
14177
- return r2[0] = o2 * b2 + s2 * w2 + a2 * R2 + l2 * L2, r2[4] = o2 * T2 + s2 * A2 + a2 * I2 + l2 * N2, r2[8] = o2 * E2 + s2 * M2 + a2 * P2 + l2 * D2, r2[12] = o2 * S2 + s2 * C2 + a2 * O2 + l2 * F2, r2[1] = h2 * b2 + u2 * w2 + c2 * R2 + d2 * L2, r2[5] = h2 * T2 + u2 * A2 + c2 * I2 + d2 * N2, r2[9] = h2 * E2 + u2 * M2 + c2 * P2 + d2 * D2, r2[13] = h2 * S2 + u2 * C2 + c2 * O2 + d2 * F2, r2[2] = p2 * b2 + f2 * w2 + m2 * R2 + g2 * L2, r2[6] = p2 * T2 + f2 * A2 + m2 * I2 + g2 * N2, r2[10] = p2 * E2 + f2 * M2 + m2 * P2 + g2 * D2, r2[14] = p2 * S2 + f2 * C2 + m2 * O2 + g2 * F2, r2[3] = v2 * b2 + _2 * w2 + y2 * R2 + x2 * L2, r2[7] = v2 * T2 + _2 * A2 + y2 * I2 + x2 * N2, r2[11] = v2 * E2 + _2 * M2 + y2 * P2 + x2 * D2, r2[15] = v2 * S2 + _2 * C2 + y2 * O2 + x2 * F2, this;
14176
+ const i2 = t2.elements, n2 = e2.elements, r2 = this.elements, o2 = i2[0], s2 = i2[4], a2 = i2[8], l2 = i2[12], h2 = i2[1], u2 = i2[5], c2 = 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], S2 = n2[12], w2 = n2[1], A2 = n2[5], M2 = n2[9], C2 = n2[13], R2 = n2[2], I2 = n2[6], P2 = n2[10], O2 = n2[14], N2 = n2[3], L2 = n2[7], D2 = n2[11], F2 = n2[15];
14177
+ return r2[0] = o2 * b2 + s2 * w2 + a2 * R2 + l2 * N2, r2[4] = o2 * T2 + s2 * A2 + a2 * I2 + l2 * L2, r2[8] = o2 * E2 + s2 * M2 + a2 * P2 + l2 * D2, r2[12] = o2 * S2 + s2 * C2 + a2 * O2 + l2 * F2, r2[1] = h2 * b2 + u2 * w2 + c2 * R2 + d2 * N2, r2[5] = h2 * T2 + u2 * A2 + c2 * I2 + d2 * L2, r2[9] = h2 * E2 + u2 * M2 + c2 * P2 + d2 * D2, r2[13] = h2 * S2 + u2 * C2 + c2 * O2 + d2 * F2, r2[2] = p2 * b2 + f2 * w2 + m2 * R2 + g2 * N2, r2[6] = p2 * T2 + f2 * A2 + m2 * I2 + g2 * L2, r2[10] = p2 * E2 + f2 * M2 + m2 * P2 + g2 * D2, r2[14] = p2 * S2 + f2 * C2 + m2 * O2 + g2 * F2, r2[3] = v2 * b2 + _2 * w2 + y2 * R2 + x2 * N2, r2[7] = v2 * T2 + _2 * A2 + y2 * I2 + x2 * L2, r2[11] = v2 * E2 + _2 * M2 + y2 * P2 + x2 * D2, r2[15] = v2 * S2 + _2 * C2 + y2 * O2 + x2 * F2, this;
14178
14178
  }
14179
14179
  multiplyScalar(t2) {
14180
14180
  const e2 = this.elements;
@@ -14629,7 +14629,7 @@ var Slide = function(t) {
14629
14629
  }
14630
14630
  }
14631
14631
  Rt.DefaultUp = new M(0, 1, 0), Rt.DefaultMatrixAutoUpdate = true, Rt.prototype.isObject3D = true;
14632
- const It = new M(), Pt = new M(), Ot = new M(), Lt = new M(), Nt = new M(), Dt = new M(), Ft = new M(), Bt = new M(), Ut = new M(), kt = new M();
14632
+ const It = new M(), Pt = new M(), Ot = new M(), Nt = new M(), Lt = new M(), Dt = new M(), Ft = new M(), Bt = new M(), Ut = new M(), kt = new M();
14633
14633
  class Gt {
14634
14634
  constructor(t2 = new M(), e2 = new M(), i2 = new M()) {
14635
14635
  this.a = t2, this.b = e2, this.c = i2;
@@ -14648,10 +14648,10 @@ var Slide = function(t) {
14648
14648
  return r2.set(1 - d2 - p2, p2, d2);
14649
14649
  }
14650
14650
  static containsPoint(t2, e2, i2, n2) {
14651
- return this.getBarycoord(t2, e2, i2, n2, Lt), Lt.x >= 0 && Lt.y >= 0 && Lt.x + Lt.y <= 1;
14651
+ return this.getBarycoord(t2, e2, i2, n2, Nt), Nt.x >= 0 && Nt.y >= 0 && Nt.x + Nt.y <= 1;
14652
14652
  }
14653
14653
  static getUV(t2, e2, i2, n2, r2, o2, s2, a2) {
14654
- return this.getBarycoord(t2, e2, i2, n2, Lt), a2.set(0, 0), a2.addScaledVector(r2, Lt.x), a2.addScaledVector(o2, Lt.y), a2.addScaledVector(s2, Lt.z), a2;
14654
+ return this.getBarycoord(t2, e2, i2, n2, Nt), a2.set(0, 0), a2.addScaledVector(r2, Nt.x), a2.addScaledVector(o2, Nt.y), a2.addScaledVector(s2, Nt.z), a2;
14655
14655
  }
14656
14656
  static isFrontFacing(t2, e2, i2, n2) {
14657
14657
  return It.subVectors(i2, e2), Pt.subVectors(t2, e2), It.cross(Pt).dot(n2) < 0;
@@ -14698,19 +14698,19 @@ var Slide = function(t) {
14698
14698
  closestPointToPoint(t2, e2) {
14699
14699
  const i2 = this.a, n2 = this.b, r2 = this.c;
14700
14700
  let o2, s2;
14701
- Nt.subVectors(n2, i2), Dt.subVectors(r2, i2), Bt.subVectors(t2, i2);
14702
- const a2 = Nt.dot(Bt), l2 = Dt.dot(Bt);
14701
+ Lt.subVectors(n2, i2), Dt.subVectors(r2, i2), Bt.subVectors(t2, i2);
14702
+ const a2 = Lt.dot(Bt), l2 = Dt.dot(Bt);
14703
14703
  if (a2 <= 0 && l2 <= 0)
14704
14704
  return e2.copy(i2);
14705
14705
  Ut.subVectors(t2, n2);
14706
- const h2 = Nt.dot(Ut), u2 = Dt.dot(Ut);
14706
+ const h2 = Lt.dot(Ut), u2 = Dt.dot(Ut);
14707
14707
  if (h2 >= 0 && u2 <= h2)
14708
14708
  return e2.copy(n2);
14709
14709
  const c2 = a2 * u2 - h2 * l2;
14710
14710
  if (c2 <= 0 && a2 >= 0 && h2 <= 0)
14711
- return o2 = a2 / (a2 - h2), e2.copy(i2).addScaledVector(Nt, o2);
14711
+ return o2 = a2 / (a2 - h2), e2.copy(i2).addScaledVector(Lt, o2);
14712
14712
  kt.subVectors(t2, r2);
14713
- const d2 = Nt.dot(kt), p2 = Dt.dot(kt);
14713
+ const d2 = Lt.dot(kt), p2 = Dt.dot(kt);
14714
14714
  if (p2 >= 0 && d2 <= p2)
14715
14715
  return e2.copy(r2);
14716
14716
  const f2 = d2 * l2 - a2 * p2;
@@ -14720,7 +14720,7 @@ var Slide = function(t) {
14720
14720
  if (m2 <= 0 && u2 - h2 >= 0 && d2 - p2 >= 0)
14721
14721
  return Ft.subVectors(r2, n2), s2 = (u2 - h2) / (u2 - h2 + (d2 - p2)), e2.copy(n2).addScaledVector(Ft, s2);
14722
14722
  const g2 = 1 / (m2 + f2 + c2);
14723
- return o2 = f2 * g2, s2 = c2 * g2, e2.copy(i2).addScaledVector(Nt, o2).addScaledVector(Dt, s2);
14723
+ return o2 = f2 * g2, s2 = c2 * g2, e2.copy(i2).addScaledVector(Lt, o2).addScaledVector(Dt, s2);
14724
14724
  }
14725
14725
  equals(t2) {
14726
14726
  return t2.a.equals(this.a) && t2.b.equals(this.b) && t2.c.equals(this.c);
@@ -15581,7 +15581,7 @@ var Slide = function(t) {
15581
15581
  return new Oe(t2.width, t2.height, t2.depth, t2.widthSegments, t2.heightSegments, t2.depthSegments);
15582
15582
  }
15583
15583
  }
15584
- function Le(t2) {
15584
+ function Ne(t2) {
15585
15585
  const e2 = {};
15586
15586
  for (const i2 in t2) {
15587
15587
  e2[i2] = {};
@@ -15592,22 +15592,22 @@ var Slide = function(t) {
15592
15592
  }
15593
15593
  return e2;
15594
15594
  }
15595
- function Ne(t2) {
15595
+ function Le(t2) {
15596
15596
  const e2 = {};
15597
15597
  for (let i2 = 0; i2 < t2.length; i2++) {
15598
- const n2 = Le(t2[i2]);
15598
+ const n2 = Ne(t2[i2]);
15599
15599
  for (const t3 in n2)
15600
15600
  e2[t3] = n2[t3];
15601
15601
  }
15602
15602
  return e2;
15603
15603
  }
15604
- const De = { clone: Le, merge: Ne };
15604
+ const De = { clone: Ne, merge: Le };
15605
15605
  class Fe extends jt {
15606
15606
  constructor(t2) {
15607
15607
  super(), this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.vertexShader = "void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", this.fragmentShader = "void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", this.linewidth = 1, this.wireframe = false, this.wireframeLinewidth = 1, this.fog = false, this.lights = false, this.clipping = false, this.morphTargets = false, this.morphNormals = false, this.extensions = { derivatives: false, fragDepth: false, drawBuffers: false, shaderTextureLOD: false }, this.defaultAttributeValues = { color: [1, 1, 1], uv: [0, 0], uv2: [0, 0] }, this.index0AttributeName = void 0, this.uniformsNeedUpdate = false, this.glslVersion = null, void 0 !== t2 && (void 0 !== t2.attributes && console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."), this.setValues(t2));
15608
15608
  }
15609
15609
  copy(t2) {
15610
- return super.copy(t2), this.fragmentShader = t2.fragmentShader, this.vertexShader = t2.vertexShader, this.uniforms = Le(t2.uniforms), this.defines = Object.assign({}, t2.defines), this.wireframe = t2.wireframe, this.wireframeLinewidth = t2.wireframeLinewidth, this.lights = t2.lights, this.clipping = t2.clipping, this.morphTargets = t2.morphTargets, this.morphNormals = t2.morphNormals, this.extensions = Object.assign({}, t2.extensions), this.glslVersion = t2.glslVersion, this;
15610
+ return super.copy(t2), this.fragmentShader = t2.fragmentShader, this.vertexShader = t2.vertexShader, this.uniforms = Ne(t2.uniforms), this.defines = Object.assign({}, t2.defines), this.wireframe = t2.wireframe, this.wireframeLinewidth = t2.wireframeLinewidth, this.lights = t2.lights, this.clipping = t2.clipping, this.morphTargets = t2.morphTargets, this.morphNormals = t2.morphNormals, this.extensions = Object.assign({}, t2.extensions), this.glslVersion = t2.glslVersion, this;
15611
15611
  }
15612
15612
  toJSON(t2) {
15613
15613
  const e2 = super.toJSON(t2);
@@ -15738,7 +15738,7 @@ var Slide = function(t) {
15738
15738
  }
15739
15739
  fromEquirectangularTexture(t2, e2) {
15740
15740
  this.texture.type = e2.type, this.texture.format = 1023, this.texture.encoding = e2.encoding, this.texture.generateMipmaps = e2.generateMipmaps, this.texture.minFilter = e2.minFilter, this.texture.magFilter = e2.magFilter;
15741
- const i2 = { uniforms: { tEquirect: { value: null } }, vertexShader: "\n\n varying vec3 vWorldDirection;\n\n vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n }\n\n void main() {\n\n vWorldDirection = transformDirection( position, modelMatrix );\n\n #include <begin_vertex>\n #include <project_vertex>\n\n }\n ", fragmentShader: "\n\n uniform sampler2D tEquirect;\n\n varying vec3 vWorldDirection;\n\n #include <common>\n\n void main() {\n\n vec3 direction = normalize( vWorldDirection );\n\n vec2 sampleUV = equirectUv( direction );\n\n gl_FragColor = texture2D( tEquirect, sampleUV );\n\n }\n " }, n2 = new Oe(5, 5, 5), r2 = new Fe({ name: "CubemapFromEquirect", uniforms: Le(i2.uniforms), vertexShader: i2.vertexShader, fragmentShader: i2.fragmentShader, side: 1, blending: 0 });
15741
+ const i2 = { uniforms: { tEquirect: { value: null } }, vertexShader: "\n\n varying vec3 vWorldDirection;\n\n vec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n }\n\n void main() {\n\n vWorldDirection = transformDirection( position, modelMatrix );\n\n #include <begin_vertex>\n #include <project_vertex>\n\n }\n ", fragmentShader: "\n\n uniform sampler2D tEquirect;\n\n varying vec3 vWorldDirection;\n\n #include <common>\n\n void main() {\n\n vec3 direction = normalize( vWorldDirection );\n\n vec2 sampleUV = equirectUv( direction );\n\n gl_FragColor = texture2D( tEquirect, sampleUV );\n\n }\n " }, n2 = new Oe(5, 5, 5), r2 = new Fe({ name: "CubemapFromEquirect", uniforms: Ne(i2.uniforms), vertexShader: i2.vertexShader, fragmentShader: i2.fragmentShader, side: 1, blending: 0 });
15742
15742
  r2.uniforms.tEquirect.value = e2;
15743
15743
  const o2 = new Ie(n2, r2), s2 = e2.minFilter;
15744
15744
  1008 === e2.minFilter && (e2.minFilter = 1006);
@@ -15941,7 +15941,7 @@ var Slide = function(t) {
15941
15941
  return new Ke(t2.width, t2.height, t2.widthSegments, t2.heightSegments);
15942
15942
  }
15943
15943
  }
15944
- const Qe = { 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}" }, $e = { common: { diffuse: { value: new Zt(16777215) }, opacity: { value: 1 }, map: { value: null }, uvTransform: { value: new v() }, uv2Transform: { value: new v() }, 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 g(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 Zt(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 Zt(16777215) }, opacity: { value: 1 }, size: { value: 1 }, scale: { value: 1 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new v() } }, sprite: { diffuse: { value: new Zt(16777215) }, opacity: { value: 1 }, center: { value: new g(0.5, 0.5) }, rotation: { value: 0 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new v() } } }, ti = { basic: { uniforms: Ne([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.fog]), vertexShader: Qe.meshbasic_vert, fragmentShader: Qe.meshbasic_frag }, lambert: { uniforms: Ne([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.fog, $e.lights, { emissive: { value: new Zt(0) } }]), vertexShader: Qe.meshlambert_vert, fragmentShader: Qe.meshlambert_frag }, phong: { uniforms: Ne([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) }, specular: { value: new Zt(1118481) }, shininess: { value: 30 } }]), vertexShader: Qe.meshphong_vert, fragmentShader: Qe.meshphong_frag }, standard: { uniforms: Ne([$e.common, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.roughnessmap, $e.metalnessmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) }, roughness: { value: 1 }, metalness: { value: 0 }, envMapIntensity: { value: 1 } }]), vertexShader: Qe.meshphysical_vert, fragmentShader: Qe.meshphysical_frag }, toon: { uniforms: Ne([$e.common, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.gradientmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) } }]), vertexShader: Qe.meshtoon_vert, fragmentShader: Qe.meshtoon_frag }, matcap: { uniforms: Ne([$e.common, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.fog, { matcap: { value: null } }]), vertexShader: Qe.meshmatcap_vert, fragmentShader: Qe.meshmatcap_frag }, points: { uniforms: Ne([$e.points, $e.fog]), vertexShader: Qe.points_vert, fragmentShader: Qe.points_frag }, dashed: { uniforms: Ne([$e.common, $e.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: Qe.linedashed_vert, fragmentShader: Qe.linedashed_frag }, depth: { uniforms: Ne([$e.common, $e.displacementmap]), vertexShader: Qe.depth_vert, fragmentShader: Qe.depth_frag }, normal: { uniforms: Ne([$e.common, $e.bumpmap, $e.normalmap, $e.displacementmap, { opacity: { value: 1 } }]), vertexShader: Qe.normal_vert, fragmentShader: Qe.normal_frag }, sprite: { uniforms: Ne([$e.sprite, $e.fog]), vertexShader: Qe.sprite_vert, fragmentShader: Qe.sprite_frag }, background: { uniforms: { uvTransform: { value: new v() }, t2D: { value: null } }, vertexShader: Qe.background_vert, fragmentShader: Qe.background_frag }, cube: { uniforms: Ne([$e.envmap, { opacity: { value: 1 } }]), vertexShader: Qe.cube_vert, fragmentShader: Qe.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: Qe.equirect_vert, fragmentShader: Qe.equirect_frag }, distanceRGBA: { uniforms: Ne([$e.common, $e.displacementmap, { referencePosition: { value: new M() }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: Qe.distanceRGBA_vert, fragmentShader: Qe.distanceRGBA_frag }, shadow: { uniforms: Ne([$e.lights, $e.fog, { color: { value: new Zt(0) }, opacity: { value: 1 } }]), vertexShader: Qe.shadow_vert, fragmentShader: Qe.shadow_frag } };
15944
+ const Qe = { 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}" }, $e = { common: { diffuse: { value: new Zt(16777215) }, opacity: { value: 1 }, map: { value: null }, uvTransform: { value: new v() }, uv2Transform: { value: new v() }, 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 g(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 Zt(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 Zt(16777215) }, opacity: { value: 1 }, size: { value: 1 }, scale: { value: 1 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new v() } }, sprite: { diffuse: { value: new Zt(16777215) }, opacity: { value: 1 }, center: { value: new g(0.5, 0.5) }, rotation: { value: 0 }, map: { value: null }, alphaMap: { value: null }, uvTransform: { value: new v() } } }, ti = { basic: { uniforms: Le([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.fog]), vertexShader: Qe.meshbasic_vert, fragmentShader: Qe.meshbasic_frag }, lambert: { uniforms: Le([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.fog, $e.lights, { emissive: { value: new Zt(0) } }]), vertexShader: Qe.meshlambert_vert, fragmentShader: Qe.meshlambert_frag }, phong: { uniforms: Le([$e.common, $e.specularmap, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) }, specular: { value: new Zt(1118481) }, shininess: { value: 30 } }]), vertexShader: Qe.meshphong_vert, fragmentShader: Qe.meshphong_frag }, standard: { uniforms: Le([$e.common, $e.envmap, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.roughnessmap, $e.metalnessmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) }, roughness: { value: 1 }, metalness: { value: 0 }, envMapIntensity: { value: 1 } }]), vertexShader: Qe.meshphysical_vert, fragmentShader: Qe.meshphysical_frag }, toon: { uniforms: Le([$e.common, $e.aomap, $e.lightmap, $e.emissivemap, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.gradientmap, $e.fog, $e.lights, { emissive: { value: new Zt(0) } }]), vertexShader: Qe.meshtoon_vert, fragmentShader: Qe.meshtoon_frag }, matcap: { uniforms: Le([$e.common, $e.bumpmap, $e.normalmap, $e.displacementmap, $e.fog, { matcap: { value: null } }]), vertexShader: Qe.meshmatcap_vert, fragmentShader: Qe.meshmatcap_frag }, points: { uniforms: Le([$e.points, $e.fog]), vertexShader: Qe.points_vert, fragmentShader: Qe.points_frag }, dashed: { uniforms: Le([$e.common, $e.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: Qe.linedashed_vert, fragmentShader: Qe.linedashed_frag }, depth: { uniforms: Le([$e.common, $e.displacementmap]), vertexShader: Qe.depth_vert, fragmentShader: Qe.depth_frag }, normal: { uniforms: Le([$e.common, $e.bumpmap, $e.normalmap, $e.displacementmap, { opacity: { value: 1 } }]), vertexShader: Qe.normal_vert, fragmentShader: Qe.normal_frag }, sprite: { uniforms: Le([$e.sprite, $e.fog]), vertexShader: Qe.sprite_vert, fragmentShader: Qe.sprite_frag }, background: { uniforms: { uvTransform: { value: new v() }, t2D: { value: null } }, vertexShader: Qe.background_vert, fragmentShader: Qe.background_frag }, cube: { uniforms: Le([$e.envmap, { opacity: { value: 1 } }]), vertexShader: Qe.cube_vert, fragmentShader: Qe.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: Qe.equirect_vert, fragmentShader: Qe.equirect_frag }, distanceRGBA: { uniforms: Le([$e.common, $e.displacementmap, { referencePosition: { value: new M() }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: Qe.distanceRGBA_vert, fragmentShader: Qe.distanceRGBA_frag }, shadow: { uniforms: Le([$e.lights, $e.fog, { color: { value: new Zt(0) }, opacity: { value: 1 } }]), vertexShader: Qe.shadow_vert, fragmentShader: Qe.shadow_frag } };
15945
15945
  function ei(t2, e2, i2, n2, r2) {
15946
15946
  const o2 = new Zt(0);
15947
15947
  let s2, a2, l2 = 0, h2 = null, u2 = 0, c2 = null;
@@ -15960,11 +15960,11 @@ var Slide = function(t) {
15960
15960
  let p2 = false, f2 = true === r3.isScene ? r3.background : null;
15961
15961
  f2 && f2.isTexture && (f2 = e2.get(f2));
15962
15962
  const m2 = t2.xr, g2 = m2.getSession && m2.getSession();
15963
- g2 && "additive" === g2.environmentBlendMode && (f2 = null), null === f2 ? d2(o2, l2) : f2 && f2.isColor && (d2(f2, 1), p2 = true), (t2.autoClear || p2) && t2.clear(t2.autoClearColor, t2.autoClearDepth, t2.autoClearStencil), f2 && (f2.isCubeTexture || 306 === f2.mapping) ? (void 0 === a2 && (a2 = new Ie(new Oe(1, 1, 1), new Fe({ name: "BackgroundCubeMaterial", uniforms: Le(ti.cube.uniforms), vertexShader: ti.cube.vertexShader, fragmentShader: ti.cube.fragmentShader, side: 1, depthTest: false, depthWrite: false, fog: false })), a2.geometry.deleteAttribute("normal"), a2.geometry.deleteAttribute("uv"), a2.onBeforeRender = function(t3, e3, i4) {
15963
+ g2 && "additive" === g2.environmentBlendMode && (f2 = null), null === f2 ? d2(o2, l2) : f2 && f2.isColor && (d2(f2, 1), p2 = true), (t2.autoClear || p2) && t2.clear(t2.autoClearColor, t2.autoClearDepth, t2.autoClearStencil), f2 && (f2.isCubeTexture || 306 === f2.mapping) ? (void 0 === a2 && (a2 = new Ie(new Oe(1, 1, 1), new Fe({ name: "BackgroundCubeMaterial", uniforms: Ne(ti.cube.uniforms), vertexShader: ti.cube.vertexShader, fragmentShader: ti.cube.fragmentShader, side: 1, depthTest: false, depthWrite: false, fog: false })), a2.geometry.deleteAttribute("normal"), a2.geometry.deleteAttribute("uv"), a2.onBeforeRender = function(t3, e3, i4) {
15964
15964
  this.matrixWorld.copyPosition(i4.matrixWorld);
15965
15965
  }, Object.defineProperty(a2.material, "envMap", { get: function() {
15966
15966
  return this.uniforms.envMap.value;
15967
- } }), n2.update(a2)), a2.material.uniforms.envMap.value = f2, a2.material.uniforms.flipEnvMap.value = f2.isCubeTexture && f2._needsFlipEnvMap ? -1 : 1, h2 === f2 && u2 === f2.version && c2 === t2.toneMapping || (a2.material.needsUpdate = true, h2 = f2, u2 = f2.version, c2 = t2.toneMapping), i3.unshift(a2, a2.geometry, a2.material, 0, 0, null)) : f2 && f2.isTexture && (void 0 === s2 && (s2 = new Ie(new Ke(2, 2), new Fe({ name: "BackgroundMaterial", uniforms: Le(ti.background.uniforms), vertexShader: ti.background.vertexShader, fragmentShader: ti.background.fragmentShader, side: 0, depthTest: false, depthWrite: false, fog: false })), s2.geometry.deleteAttribute("normal"), Object.defineProperty(s2.material, "map", { get: function() {
15967
+ } }), n2.update(a2)), a2.material.uniforms.envMap.value = f2, a2.material.uniforms.flipEnvMap.value = f2.isCubeTexture && f2._needsFlipEnvMap ? -1 : 1, h2 === f2 && u2 === f2.version && c2 === t2.toneMapping || (a2.material.needsUpdate = true, h2 = f2, u2 = f2.version, c2 = t2.toneMapping), i3.unshift(a2, a2.geometry, a2.material, 0, 0, null)) : f2 && f2.isTexture && (void 0 === s2 && (s2 = new Ie(new Ke(2, 2), new Fe({ name: "BackgroundMaterial", uniforms: Ne(ti.background.uniforms), vertexShader: ti.background.vertexShader, fragmentShader: ti.background.fragmentShader, side: 0, depthTest: false, depthWrite: false, fog: false })), s2.geometry.deleteAttribute("normal"), Object.defineProperty(s2.material, "map", { get: function() {
15968
15968
  return this.uniforms.t2D.value;
15969
15969
  } }), n2.update(s2)), s2.material.uniforms.t2D.value = f2, true === f2.matrixAutoUpdate && f2.updateMatrix(), s2.material.uniforms.uvTransform.value.copy(f2.matrix), h2 === f2 && u2 === f2.version && c2 === t2.toneMapping || (s2.material.needsUpdate = true, h2 = f2, u2 = f2.version, c2 = t2.toneMapping), i3.unshift(s2, s2.geometry, s2.material, 0, 0, null));
15970
15970
  } };
@@ -16443,7 +16443,7 @@ var Slide = function(t) {
16443
16443
  r2 = /* @__PURE__ */ new WeakMap();
16444
16444
  } };
16445
16445
  }
16446
- ti.physical = { uniforms: Ne([ti.standard.uniforms, { clearcoat: { value: 0 }, clearcoatMap: { value: null }, clearcoatRoughness: { value: 0 }, clearcoatRoughnessMap: { value: null }, clearcoatNormalScale: { value: new g(1, 1) }, clearcoatNormalMap: { value: null }, sheen: { value: new Zt(0) }, transmission: { value: 0 }, transmissionMap: { value: null }, transmissionSamplerSize: { value: new g() }, transmissionSamplerMap: { value: null }, thickness: { value: 0 }, thicknessMap: { value: null }, attenuationDistance: { value: 0 }, attenuationColor: { value: new Zt(0) } }]), vertexShader: Qe.meshphysical_vert, fragmentShader: Qe.meshphysical_frag };
16446
+ ti.physical = { uniforms: Le([ti.standard.uniforms, { clearcoat: { value: 0 }, clearcoatMap: { value: null }, clearcoatRoughness: { value: 0 }, clearcoatRoughnessMap: { value: null }, clearcoatNormalScale: { value: new g(1, 1) }, clearcoatNormalMap: { value: null }, sheen: { value: new Zt(0) }, transmission: { value: 0 }, transmissionMap: { value: null }, transmissionSamplerSize: { value: new g() }, transmissionSamplerMap: { value: null }, thickness: { value: 0 }, thicknessMap: { value: null }, attenuationDistance: { value: 0 }, attenuationColor: { value: new Zt(0) } }]), vertexShader: Qe.meshphysical_vert, fragmentShader: Qe.meshphysical_frag };
16447
16447
  class mi extends b {
16448
16448
  constructor(t2 = null, e2 = 1, i2 = 1, n2 = 1) {
16449
16449
  super(null), this.image = { data: t2, width: e2, height: i2, depth: n2 }, this.magFilter = 1003, this.minFilter = 1003, this.wrapR = 1001, this.generateMipmaps = false, this.flipY = false, this.unpackAlignment = 1, this.needsUpdate = true;
@@ -16515,7 +16515,7 @@ var Slide = function(t) {
16515
16515
  t2.uniform3fv(this.addr, e2), Ci(i2, e2);
16516
16516
  }
16517
16517
  }
16518
- function Li(t2, e2) {
16518
+ function Ni(t2, e2) {
16519
16519
  const i2 = this.cache;
16520
16520
  if (void 0 !== e2.x)
16521
16521
  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);
@@ -16525,7 +16525,7 @@ var Slide = function(t) {
16525
16525
  t2.uniform4fv(this.addr, e2), Ci(i2, e2);
16526
16526
  }
16527
16527
  }
16528
- function Ni(t2, e2) {
16528
+ function Li(t2, e2) {
16529
16529
  const i2 = this.cache, n2 = e2.elements;
16530
16530
  if (void 0 === n2) {
16531
16531
  if (Mi(i2, e2))
@@ -16682,9 +16682,9 @@ var Slide = function(t) {
16682
16682
  case 35665:
16683
16683
  return Oi;
16684
16684
  case 35666:
16685
- return Li;
16686
- case 35674:
16687
16685
  return Ni;
16686
+ case 35674:
16687
+ return Li;
16688
16688
  case 35675:
16689
16689
  return Di;
16690
16690
  case 35676:
@@ -16931,9 +16931,9 @@ var Slide = function(t) {
16931
16931
  throw new Error("Can not resolve #include <" + e2 + ">");
16932
16932
  return Pn(i2);
16933
16933
  }
16934
- const Ln = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, Nn = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
16934
+ const Nn = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g, Ln = /#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;
16935
16935
  function Dn(t2) {
16936
- return t2.replace(Nn, Bn).replace(Ln, Fn);
16936
+ return t2.replace(Ln, Bn).replace(Nn, Fn);
16937
16937
  }
16938
16938
  function Fn(t2, e2, i2, n2) {
16939
16939
  return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."), Bn(t2, e2, i2, n2);
@@ -17496,7 +17496,7 @@ var Slide = function(t) {
17496
17496
  const R2 = t2.getParameter(7938);
17497
17497
  -1 !== R2.indexOf("WebGL") ? (C2 = parseFloat(/^WebGL (\d)/.exec(R2)[1]), M2 = C2 >= 1) : -1 !== R2.indexOf("OpenGL ES") && (C2 = parseFloat(/^OpenGL ES (\d)/.exec(R2)[1]), M2 = C2 >= 2);
17498
17498
  let I2 = null, P2 = {};
17499
- const O2 = t2.getParameter(3088), L2 = t2.getParameter(2978), N2 = new E().fromArray(O2), D2 = new E().fromArray(L2);
17499
+ const O2 = t2.getParameter(3088), N2 = t2.getParameter(2978), L2 = new E().fromArray(O2), D2 = new E().fromArray(N2);
17500
17500
  function F2(e3, i3, n3) {
17501
17501
  const r3 = new Uint8Array(4), o3 = t2.createTexture();
17502
17502
  t2.bindTexture(e3, o3), t2.texParameteri(e3, 10241, 9728), t2.texParameteri(e3, 10240, 9728);
@@ -17618,11 +17618,11 @@ var Slide = function(t) {
17618
17618
  console.error("THREE.WebGLState:", t3);
17619
17619
  }
17620
17620
  }, scissor: function(e3) {
17621
- false === N2.equals(e3) && (t2.scissor(e3.x, e3.y, e3.z, e3.w), N2.copy(e3));
17621
+ false === L2.equals(e3) && (t2.scissor(e3.x, e3.y, e3.z, e3.w), L2.copy(e3));
17622
17622
  }, viewport: function(e3) {
17623
17623
  false === D2.equals(e3) && (t2.viewport(e3.x, e3.y, e3.z, e3.w), D2.copy(e3));
17624
17624
  }, reset: function() {
17625
- 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), true === n2 && (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 = {}, I2 = null, P2 = {}, l2 = null, h2 = {}, u2 = null, c2 = false, d2 = null, p2 = null, f2 = null, m2 = null, g2 = null, v2 = null, _2 = null, y2 = false, x2 = null, b2 = null, T2 = null, S2 = null, w2 = null, N2.set(0, 0, t2.canvas.width, t2.canvas.height), D2.set(0, 0, t2.canvas.width, t2.canvas.height), r2.reset(), o2.reset(), s2.reset();
17625
+ 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), true === n2 && (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 = {}, I2 = null, P2 = {}, l2 = null, h2 = {}, u2 = null, c2 = false, d2 = null, p2 = null, f2 = null, m2 = null, g2 = null, v2 = null, _2 = null, y2 = false, x2 = null, b2 = null, T2 = null, S2 = null, w2 = null, L2.set(0, 0, t2.canvas.width, t2.canvas.height), D2.set(0, 0, t2.canvas.width, t2.canvas.height), r2.reset(), o2.reset(), s2.reset();
17626
17626
  } };
17627
17627
  }
17628
17628
  function ir(t2, e2, i2, n2, r2, o2, s2) {
@@ -17715,7 +17715,7 @@ var Slide = function(t) {
17715
17715
  console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");
17716
17716
  else {
17717
17717
  if (false !== i3.complete)
17718
- return void L2(r3, t3, e3);
17718
+ return void N2(r3, t3, e3);
17719
17719
  console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");
17720
17720
  }
17721
17721
  }
@@ -17777,7 +17777,7 @@ var Slide = function(t) {
17777
17777
  function O2(e3, i3) {
17778
17778
  void 0 === e3.__webglInit && (e3.__webglInit = true, i3.addEventListener("dispose", S2), e3.__webglTexture = t2.createTexture(), s2.memory.textures++);
17779
17779
  }
17780
- function L2(e3, n3, r3) {
17780
+ function N2(e3, n3, r3) {
17781
17781
  let s3 = 3553;
17782
17782
  n3.isDataTexture2DArray && (s3 = 35866), n3.isDataTexture3D && (s3 = 32879), O2(e3, n3), i2.activeTexture(33984 + r3), i2.bindTexture(s3, e3.__webglTexture), t2.pixelStorei(37440, n3.flipY), t2.pixelStorei(37441, n3.premultiplyAlpha), t2.pixelStorei(3317, n3.unpackAlignment), t2.pixelStorei(37443, 0);
17783
17783
  const l3 = function(t3) {
@@ -17811,7 +17811,7 @@ var Slide = function(t) {
17811
17811
  i2.texImage2D(3553, 0, m2, d3, f2, h3), e3.__maxMipLevel = 0;
17812
17812
  x2(n3, c3) && b2(s3, n3, h3.width, h3.height), e3.__version = n3.version, n3.onUpdate && n3.onUpdate(n3);
17813
17813
  }
17814
- function N2(e3, r3, s3, a3, l3) {
17814
+ function L2(e3, r3, s3, a3, l3) {
17815
17815
  const h3 = o2.convert(s3.format), u3 = o2.convert(s3.type), c3 = T2(s3.internalFormat, h3, u3);
17816
17816
  32879 === l3 || 35866 === l3 ? i2.texImage3D(l3, 0, c3, r3.width, r3.height, r3.depth, 0, h3, u3, null) : i2.texImage2D(l3, 0, c3, r3.width, r3.height, 0, h3, u3, null), i2.bindFramebuffer(36160, e3), t2.framebufferTexture2D(36160, a3, l3, n2.get(s3).__webglTexture, 0), i2.bindFramebuffer(36160, null);
17817
17817
  }
@@ -17882,10 +17882,10 @@ var Slide = function(t) {
17882
17882
  A2 = 0;
17883
17883
  }, this.setTexture2D = M2, this.setTexture2DArray = function(t3, e3) {
17884
17884
  const r3 = n2.get(t3);
17885
- t3.version > 0 && r3.__version !== t3.version ? L2(r3, t3, e3) : (i2.activeTexture(33984 + e3), i2.bindTexture(35866, r3.__webglTexture));
17885
+ t3.version > 0 && r3.__version !== t3.version ? N2(r3, t3, e3) : (i2.activeTexture(33984 + e3), i2.bindTexture(35866, r3.__webglTexture));
17886
17886
  }, this.setTexture3D = function(t3, e3) {
17887
17887
  const r3 = n2.get(t3);
17888
- t3.version > 0 && r3.__version !== t3.version ? L2(r3, t3, e3) : (i2.activeTexture(33984 + e3), i2.bindTexture(32879, r3.__webglTexture));
17888
+ t3.version > 0 && r3.__version !== t3.version ? N2(r3, t3, e3) : (i2.activeTexture(33984 + e3), i2.bindTexture(32879, r3.__webglTexture));
17889
17889
  }, this.setTextureCube = C2, this.setupRenderTarget = function(e3) {
17890
17890
  const l3 = e3.texture, h3 = n2.get(e3), u3 = n2.get(l3);
17891
17891
  e3.addEventListener("dispose", w2), true !== e3.isWebGLMultipleRenderTargets && (u3.__webglTexture = t2.createTexture(), u3.__version = l3.version, s2.memory.textures++);
@@ -17913,13 +17913,13 @@ var Slide = function(t) {
17913
17913
  if (c3) {
17914
17914
  i2.bindTexture(34067, u3.__webglTexture), P2(34067, l3, m2);
17915
17915
  for (let t3 = 0; t3 < 6; t3++)
17916
- N2(h3.__webglFramebuffer[t3], e3, l3, 36064, 34069 + t3);
17916
+ L2(h3.__webglFramebuffer[t3], e3, l3, 36064, 34069 + t3);
17917
17917
  x2(l3, m2) && b2(34067, l3, e3.width, e3.height), i2.bindTexture(34067, null);
17918
17918
  } else if (d3) {
17919
17919
  const t3 = e3.texture;
17920
17920
  for (let r3 = 0, o3 = t3.length; r3 < o3; r3++) {
17921
17921
  const o4 = t3[r3], s3 = n2.get(o4);
17922
- i2.bindTexture(3553, s3.__webglTexture), P2(3553, o4, m2), N2(h3.__webglFramebuffer, e3, o4, 36064 + r3, 3553), x2(o4, m2) && b2(3553, o4, e3.width, e3.height);
17922
+ i2.bindTexture(3553, s3.__webglTexture), P2(3553, o4, m2), L2(h3.__webglFramebuffer, e3, o4, 36064 + r3, 3553), x2(o4, m2) && b2(3553, o4, e3.width, e3.height);
17923
17923
  }
17924
17924
  i2.bindTexture(3553, null);
17925
17925
  } else {
@@ -17929,7 +17929,7 @@ var Slide = function(t) {
17929
17929
  t3 = l3.isDataTexture3D ? 32879 : 35866;
17930
17930
  } else
17931
17931
  console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.");
17932
- i2.bindTexture(t3, u3.__webglTexture), P2(t3, l3, m2), N2(h3.__webglFramebuffer, e3, l3, 36064, t3), x2(l3, m2) && b2(t3, l3, e3.width, e3.height, e3.depth), i2.bindTexture(t3, null);
17932
+ i2.bindTexture(t3, u3.__webglTexture), P2(t3, l3, m2), L2(h3.__webglFramebuffer, e3, l3, 36064, t3), x2(l3, m2) && b2(t3, l3, e3.width, e3.height, e3.depth), i2.bindTexture(t3, null);
17933
17933
  }
17934
17934
  e3.depthBuffer && F2(e3);
17935
17935
  }, this.updateRenderTargetMipmap = function(t3) {
@@ -18309,8 +18309,8 @@ var Slide = function(t) {
18309
18309
  const m2 = this;
18310
18310
  let g2 = false, v2 = 0, _2 = 0, y2 = null, x2 = -1, b2 = null;
18311
18311
  const T2 = new E(), A2 = new E();
18312
- let C2 = null, R2 = e2.width, I2 = e2.height, P2 = 1, O2 = null, L2 = null;
18313
- const N2 = new E(0, 0, R2, I2), D2 = new E(0, 0, R2, I2);
18312
+ let C2 = null, R2 = e2.width, I2 = e2.height, P2 = 1, O2 = null, N2 = null;
18313
+ const L2 = new E(0, 0, R2, I2), D2 = new E(0, 0, R2, I2);
18314
18314
  let F2 = false;
18315
18315
  const B2 = [], U2 = new qe();
18316
18316
  let k2 = false, G2 = false, H2 = null;
@@ -18389,9 +18389,9 @@ var Slide = function(t) {
18389
18389
  }, this.getCurrentViewport = function(t3) {
18390
18390
  return t3.copy(T2);
18391
18391
  }, this.getViewport = function(t3) {
18392
- return t3.copy(N2);
18392
+ return t3.copy(L2);
18393
18393
  }, this.setViewport = function(t3, e3, i3, n3) {
18394
- t3.isVector4 ? N2.set(t3.x, t3.y, t3.z, t3.w) : N2.set(t3, e3, i3, n3), q2.viewport(T2.copy(N2).multiplyScalar(P2).floor());
18394
+ t3.isVector4 ? L2.set(t3.x, t3.y, t3.z, t3.w) : L2.set(t3, e3, i3, n3), q2.viewport(T2.copy(L2).multiplyScalar(P2).floor());
18395
18395
  }, this.getScissor = function(t3) {
18396
18396
  return t3.copy(D2);
18397
18397
  }, this.setScissor = function(t3, e3, i3, n3) {
@@ -18403,7 +18403,7 @@ var Slide = function(t) {
18403
18403
  }, this.setOpaqueSort = function(t3) {
18404
18404
  O2 = t3;
18405
18405
  }, this.setTransparentSort = function(t3) {
18406
- L2 = t3;
18406
+ N2 = t3;
18407
18407
  }, this.getClearColor = function(t3) {
18408
18408
  return t3.copy(ht2.getClearColor());
18409
18409
  }, this.setClearColor = function() {
@@ -18602,7 +18602,7 @@ var Slide = function(t) {
18602
18602
  const o4 = e4.children;
18603
18603
  for (let e5 = 0, s3 = o4.length; e5 < s3; e5++)
18604
18604
  t4(o4[e5], i4, n4, r4);
18605
- }(t3, e3, 0, m2.sortObjects), c2.finish(), true === m2.sortObjects && c2.sort(O2, L2), true === k2 && at2.beginShadows();
18605
+ }(t3, e3, 0, m2.sortObjects), c2.finish(), true === m2.sortObjects && c2.sort(O2, N2), true === k2 && at2.beginShadows();
18606
18606
  const i3 = d2.state.shadowsArray;
18607
18607
  lt2.render(i3, t3, e3), d2.setupLights(), d2.setupLightsView(e3), true === k2 && at2.endShadows(), true === this.info.autoReset && this.info.reset(), ht2.render(c2, t3);
18608
18608
  const n3 = c2.opaque, r3 = c2.transmissive, o3 = c2.transparent;
@@ -18631,7 +18631,7 @@ var Slide = function(t) {
18631
18631
  const s3 = J2.get(t3).__webglFramebuffer;
18632
18632
  t3.isWebGLCubeRenderTarget ? (n3 = s3[e3], r3 = true) : n3 = t3.isWebGLMultisampleRenderTarget ? J2.get(t3).__webglMultisampledFramebuffer : s3, T2.copy(t3.viewport), A2.copy(t3.scissor), C2 = t3.scissorTest;
18633
18633
  } else
18634
- T2.copy(N2).multiplyScalar(P2).floor(), A2.copy(D2).multiplyScalar(P2).floor(), C2 = F2;
18634
+ T2.copy(L2).multiplyScalar(P2).floor(), A2.copy(D2).multiplyScalar(P2).floor(), C2 = F2;
18635
18635
  if (q2.bindFramebuffer(36160, n3) && Y2.drawBuffers) {
18636
18636
  let e4 = false;
18637
18637
  if (t3)
@@ -18885,7 +18885,7 @@ var Slide = function(t) {
18885
18885
  Tr.subVectors(t2, i2).addScalar(0.5).multiply(n2), void 0 !== r2 ? (Er.x = o2 * Tr.x - r2 * Tr.y, Er.y = r2 * Tr.x + o2 * Tr.y) : Er.copy(Tr), t2.copy(e2), t2.x += Er.x, t2.y += Er.y, t2.applyMatrix4(Sr);
18886
18886
  }
18887
18887
  Pr.prototype.isSprite = true;
18888
- const Lr = new M(), Nr = new E(), Dr = new E(), Fr = new M(), Br = new rt();
18888
+ const Nr = new M(), Lr = new E(), Dr = new E(), Fr = new M(), Br = new rt();
18889
18889
  class Ur extends Ie {
18890
18890
  constructor(t2, e2) {
18891
18891
  super(t2, e2), this.type = "SkinnedMesh", this.bindMode = "attached", this.bindMatrix = new rt(), this.bindMatrixInverse = new rt();
@@ -18912,12 +18912,12 @@ var Slide = function(t) {
18912
18912
  }
18913
18913
  boneTransform(t2, e2) {
18914
18914
  const i2 = this.skeleton, n2 = this.geometry;
18915
- Nr.fromBufferAttribute(n2.attributes.skinIndex, t2), Dr.fromBufferAttribute(n2.attributes.skinWeight, t2), Lr.fromBufferAttribute(n2.attributes.position, t2).applyMatrix4(this.bindMatrix), e2.set(0, 0, 0);
18915
+ Lr.fromBufferAttribute(n2.attributes.skinIndex, t2), Dr.fromBufferAttribute(n2.attributes.skinWeight, t2), Nr.fromBufferAttribute(n2.attributes.position, t2).applyMatrix4(this.bindMatrix), e2.set(0, 0, 0);
18916
18916
  for (let t3 = 0; t3 < 4; t3++) {
18917
18917
  const n3 = Dr.getComponent(t3);
18918
18918
  if (0 !== n3) {
18919
- const r2 = Nr.getComponent(t3);
18920
- Br.multiplyMatrices(i2.bones[r2].matrixWorld, i2.boneInverses[r2]), e2.addScaledVector(Fr.copy(Lr).applyMatrix4(Br), n3);
18919
+ const r2 = Lr.getComponent(t3);
18920
+ Br.multiplyMatrices(i2.bones[r2].matrixWorld, i2.boneInverses[r2]), e2.addScaledVector(Fr.copy(Nr).applyMatrix4(Br), n3);
18921
18921
  }
18922
18922
  }
18923
18923
  return e2.applyMatrix4(this.bindMatrixInverse);
@@ -19605,7 +19605,7 @@ var Slide = function(t) {
19605
19605
  for (o3 = 0, s3 = e3.length; o3 < s3; o3++)
19606
19606
  a3 = e3[o3] * n3, l3 = o3 < s3 - 1 ? e3[o3 + 1] * n3 : t3.length, h3 = Oo(t3, a3, l3, n3, false), h3 === h3.next && (h3.steiner = true), r3.push(zo(h3));
19607
19607
  for (r3.sort(ko), o3 = 0; o3 < r3.length; o3++)
19608
- Go(r3[o3], i3), i3 = Lo(i3, i3.next);
19608
+ Go(r3[o3], i3), i3 = No(i3, i3.next);
19609
19609
  return i3;
19610
19610
  }(t2, e2, o2, i2)), t2.length > 80 * i2) {
19611
19611
  a2 = h2 = t2[0], l2 = u2 = t2[1];
@@ -19613,7 +19613,7 @@ var Slide = function(t) {
19613
19613
  c2 = t2[e3], d2 = t2[e3 + 1], c2 < a2 && (a2 = c2), d2 < l2 && (l2 = d2), c2 > h2 && (h2 = c2), d2 > u2 && (u2 = d2);
19614
19614
  p2 = Math.max(h2 - a2, u2 - l2), p2 = 0 !== p2 ? 1 / p2 : 0;
19615
19615
  }
19616
- return No(o2, s2, i2, a2, l2, p2), s2;
19616
+ return Lo(o2, s2, i2, a2, l2, p2), s2;
19617
19617
  };
19618
19618
  function Oo(t2, e2, i2, n2, r2) {
19619
19619
  let o2, s2;
@@ -19630,7 +19630,7 @@ var Slide = function(t) {
19630
19630
  s2 = $o(o2, t2[o2], t2[o2 + 1], s2);
19631
19631
  return s2 && Yo(s2, s2.next) && (ts(s2), s2 = s2.next), s2;
19632
19632
  }
19633
- function Lo(t2, e2) {
19633
+ function No(t2, e2) {
19634
19634
  if (!t2)
19635
19635
  return t2;
19636
19636
  e2 || (e2 = t2);
@@ -19646,7 +19646,7 @@ var Slide = function(t) {
19646
19646
  } while (i2 || n2 !== e2);
19647
19647
  return e2;
19648
19648
  }
19649
- function No(t2, e2, i2, n2, r2, o2, s2) {
19649
+ function Lo(t2, e2, i2, n2, r2, o2, s2) {
19650
19650
  if (!t2)
19651
19651
  return;
19652
19652
  !s2 && o2 && function(t3, e3, i3, n3) {
@@ -19673,7 +19673,7 @@ var Slide = function(t) {
19673
19673
  if (a2 = t2.prev, l2 = t2.next, o2 ? Fo(t2, n2, r2, o2) : Do(t2))
19674
19674
  e2.push(a2.i / i2), e2.push(t2.i / i2), e2.push(l2.i / i2), ts(t2), t2 = l2.next, h2 = l2.next;
19675
19675
  else if ((t2 = l2) === h2) {
19676
- s2 ? 1 === s2 ? No(t2 = Bo(Lo(t2), e2, i2), e2, i2, n2, r2, o2, 2) : 2 === s2 && Uo(t2, e2, i2, n2, r2, o2) : No(Lo(t2), e2, i2, n2, r2, o2, 1);
19676
+ s2 ? 1 === s2 ? Lo(t2 = Bo(No(t2), e2, i2), e2, i2, n2, r2, o2, 2) : 2 === s2 && Uo(t2, e2, i2, n2, r2, o2) : Lo(No(t2), e2, i2, n2, r2, o2, 1);
19677
19677
  break;
19678
19678
  }
19679
19679
  }
@@ -19720,7 +19720,7 @@ var Slide = function(t) {
19720
19720
  const r2 = n2.prev, o2 = n2.next.next;
19721
19721
  !Yo(r2, o2) && qo(r2, n2, n2.next, o2) && Ko(r2, o2) && Ko(o2, r2) && (e2.push(r2.i / i2), e2.push(n2.i / i2), e2.push(o2.i / i2), ts(n2), ts(n2.next), n2 = t2 = o2), n2 = n2.next;
19722
19722
  } while (n2 !== t2);
19723
- return Lo(n2);
19723
+ return No(n2);
19724
19724
  }
19725
19725
  function Uo(t2, e2, i2, n2, r2, o2) {
19726
19726
  let s2 = t2;
@@ -19729,7 +19729,7 @@ var Slide = function(t) {
19729
19729
  for (; t3 !== s2.prev; ) {
19730
19730
  if (s2.i !== t3.i && Wo(s2, t3)) {
19731
19731
  let a2 = Qo(s2, t3);
19732
- return s2 = Lo(s2, s2.next), a2 = Lo(a2, a2.next), No(s2, e2, i2, n2, r2, o2), void No(a2, e2, i2, n2, r2, o2);
19732
+ return s2 = No(s2, s2.next), a2 = No(a2, a2.next), Lo(s2, e2, i2, n2, r2, o2), void Lo(a2, e2, i2, n2, r2, o2);
19733
19733
  }
19734
19734
  t3 = t3.next;
19735
19735
  }
@@ -19772,7 +19772,7 @@ var Slide = function(t) {
19772
19772
  return o2;
19773
19773
  }(t2, e2)) {
19774
19774
  const i2 = Qo(e2, t2);
19775
- Lo(e2, e2.next), Lo(i2, i2.next);
19775
+ No(e2, e2.next), No(i2, i2.next);
19776
19776
  }
19777
19777
  }
19778
19778
  function Ho(t2, e2) {
@@ -19923,27 +19923,27 @@ var Slide = function(t) {
19923
19923
  }
19924
19924
  return new g(n3 / o4, r3 / o4);
19925
19925
  }
19926
- const L2 = [];
19927
- for (let t4 = 0, e3 = C2.length, i3 = e3 - 1, n3 = t4 + 1; t4 < e3; t4++, i3++, n3++)
19928
- i3 === e3 && (i3 = 0), n3 === e3 && (n3 = 0), L2[t4] = O2(C2[t4], C2[i3], C2[n3]);
19929
19926
  const N2 = [];
19930
- let D2, F2 = L2.concat();
19927
+ for (let t4 = 0, e3 = C2.length, i3 = e3 - 1, n3 = t4 + 1; t4 < e3; t4++, i3++, n3++)
19928
+ i3 === e3 && (i3 = 0), n3 === e3 && (n3 = 0), N2[t4] = O2(C2[t4], C2[i3], C2[n3]);
19929
+ const L2 = [];
19930
+ let D2, F2 = N2.concat();
19931
19931
  for (let t4 = 0, e3 = w2.length; t4 < e3; t4++) {
19932
19932
  const e4 = w2[t4];
19933
19933
  D2 = [];
19934
19934
  for (let t5 = 0, i3 = e4.length, n3 = i3 - 1, r3 = t5 + 1; t5 < i3; t5++, n3++, r3++)
19935
19935
  n3 === i3 && (n3 = 0), r3 === i3 && (r3 = 0), D2[t5] = O2(e4[t5], e4[n3], e4[r3]);
19936
- N2.push(D2), F2 = F2.concat(D2);
19936
+ L2.push(D2), F2 = F2.concat(D2);
19937
19937
  }
19938
19938
  for (let t4 = 0; t4 < p2; t4++) {
19939
19939
  const e3 = t4 / p2, i3 = u2 * Math.cos(e3 * Math.PI / 2), n3 = c2 * Math.sin(e3 * Math.PI / 2) + d2;
19940
19940
  for (let t5 = 0, e4 = C2.length; t5 < e4; t5++) {
19941
- const e5 = R2(C2[t5], L2[t5], n3);
19941
+ const e5 = R2(C2[t5], N2[t5], n3);
19942
19942
  k2(e5.x, e5.y, -i3);
19943
19943
  }
19944
19944
  for (let t5 = 0, e4 = w2.length; t5 < e4; t5++) {
19945
19945
  const e5 = w2[t5];
19946
- D2 = N2[t5];
19946
+ D2 = L2[t5];
19947
19947
  for (let t6 = 0, r3 = e5.length; t6 < r3; t6++) {
19948
19948
  const r4 = R2(e5[t6], D2[t6], n3);
19949
19949
  k2(r4.x, r4.y, -i3);
@@ -19963,12 +19963,12 @@ var Slide = function(t) {
19963
19963
  for (let t4 = p2 - 1; t4 >= 0; t4--) {
19964
19964
  const e3 = t4 / p2, i3 = u2 * Math.cos(e3 * Math.PI / 2), n3 = c2 * Math.sin(e3 * Math.PI / 2) + d2;
19965
19965
  for (let t5 = 0, e4 = C2.length; t5 < e4; t5++) {
19966
- const e5 = R2(C2[t5], L2[t5], n3);
19966
+ const e5 = R2(C2[t5], N2[t5], n3);
19967
19967
  k2(e5.x, e5.y, l2 + i3);
19968
19968
  }
19969
19969
  for (let t5 = 0, e4 = w2.length; t5 < e4; t5++) {
19970
19970
  const e5 = w2[t5];
19971
- D2 = N2[t5];
19971
+ D2 = L2[t5];
19972
19972
  for (let t6 = 0, r3 = e5.length; t6 < r3; t6++) {
19973
19973
  const r4 = R2(e5[t6], D2[t6], n3);
19974
19974
  T2 ? k2(r4.x, r4.y + v2[a2 - 1].y, v2[a2 - 1].x + i3) : k2(r4.x, r4.y, l2 + i3);
@@ -20823,7 +20823,7 @@ var Slide = function(t) {
20823
20823
  }
20824
20824
  return void 0 !== e2.parse ? e2.parse(t2) : new e2(t2.name, t2.times, t2.values, t2.interpolation);
20825
20825
  }
20826
- const Ls = { enabled: false, files: {}, add: function(t2, e2) {
20826
+ const Ns = { enabled: false, files: {}, add: function(t2, e2) {
20827
20827
  false !== this.enabled && (this.files[t2] = e2);
20828
20828
  }, get: function(t2) {
20829
20829
  if (false !== this.enabled)
@@ -20833,7 +20833,7 @@ var Slide = function(t) {
20833
20833
  }, clear: function() {
20834
20834
  this.files = {};
20835
20835
  } };
20836
- class Ns {
20836
+ class Ls {
20837
20837
  constructor(t2, e2, i2) {
20838
20838
  const n2 = this;
20839
20839
  let r2 = false, o2 = 0, s2 = 0, a2 = void 0;
@@ -20863,7 +20863,7 @@ var Slide = function(t) {
20863
20863
  };
20864
20864
  }
20865
20865
  }
20866
- const Ds = new Ns();
20866
+ const Ds = new Ls();
20867
20867
  class Fs {
20868
20868
  constructor(t2) {
20869
20869
  this.manager = void 0 !== t2 ? t2 : Ds, this.crossOrigin = "anonymous", this.withCredentials = false, this.path = "", this.resourcePath = "", this.requestHeader = {};
@@ -20901,7 +20901,7 @@ var Slide = function(t) {
20901
20901
  }
20902
20902
  load(t2, e2, i2, n2) {
20903
20903
  void 0 === t2 && (t2 = ""), void 0 !== this.path && (t2 = this.path + t2), t2 = this.manager.resolveURL(t2);
20904
- const r2 = this, o2 = Ls.get(t2);
20904
+ const r2 = this, o2 = Ns.get(t2);
20905
20905
  if (void 0 !== o2)
20906
20906
  return r2.manager.itemStart(t2), setTimeout(function() {
20907
20907
  e2 && e2(o2), r2.manager.itemEnd(t2);
@@ -20947,7 +20947,7 @@ var Slide = function(t) {
20947
20947
  Bs[t2] = [], Bs[t2].push({ onLoad: e2, onProgress: i2, onError: n2 }), a2 = new XMLHttpRequest(), a2.open("GET", t2, true), a2.addEventListener("load", function(e3) {
20948
20948
  const i3 = this.response, n3 = Bs[t2];
20949
20949
  if (delete Bs[t2], 200 === this.status || 0 === this.status) {
20950
- 0 === this.status && console.warn("THREE.FileLoader: HTTP Status 0 received."), Ls.add(t2, i3);
20950
+ 0 === this.status && console.warn("THREE.FileLoader: HTTP Status 0 received."), Ns.add(t2, i3);
20951
20951
  for (let t3 = 0, e4 = n3.length; t3 < e4; t3++) {
20952
20952
  const e5 = n3[t3];
20953
20953
  e5.onLoad && e5.onLoad(i3);
@@ -21002,14 +21002,14 @@ var Slide = function(t) {
21002
21002
  }
21003
21003
  load(t2, e2, i2, n2) {
21004
21004
  void 0 !== this.path && (t2 = this.path + t2), t2 = this.manager.resolveURL(t2);
21005
- const r2 = this, o2 = Ls.get(t2);
21005
+ const r2 = this, o2 = Ns.get(t2);
21006
21006
  if (void 0 !== o2)
21007
21007
  return r2.manager.itemStart(t2), setTimeout(function() {
21008
21008
  e2 && e2(o2), r2.manager.itemEnd(t2);
21009
21009
  }, 0), o2;
21010
21010
  const s2 = document.createElementNS("http://www.w3.org/1999/xhtml", "img");
21011
21011
  function a2() {
21012
- s2.removeEventListener("load", a2, false), s2.removeEventListener("error", l2, false), Ls.add(t2, this), e2 && e2(this), r2.manager.itemEnd(t2);
21012
+ s2.removeEventListener("load", a2, false), s2.removeEventListener("error", l2, false), Ns.add(t2, this), e2 && e2(this), r2.manager.itemEnd(t2);
21013
21013
  }
21014
21014
  function l2(e3) {
21015
21015
  s2.removeEventListener("load", a2, false), s2.removeEventListener("error", l2, false), n2 && n2(e3), r2.manager.itemError(t2), r2.manager.itemEnd(t2);
@@ -21561,7 +21561,7 @@ var Slide = function(t) {
21561
21561
  }
21562
21562
  load(t2, e2, i2, n2) {
21563
21563
  void 0 === t2 && (t2 = ""), void 0 !== this.path && (t2 = this.path + t2), t2 = this.manager.resolveURL(t2);
21564
- const r2 = this, o2 = Ls.get(t2);
21564
+ const r2 = this, o2 = Ns.get(t2);
21565
21565
  if (void 0 !== o2)
21566
21566
  return r2.manager.itemStart(t2), setTimeout(function() {
21567
21567
  e2 && e2(o2), r2.manager.itemEnd(t2);
@@ -21572,7 +21572,7 @@ var Slide = function(t) {
21572
21572
  }).then(function(t3) {
21573
21573
  return createImageBitmap(t3, Object.assign(r2.options, { colorSpaceConversion: "none" }));
21574
21574
  }).then(function(i3) {
21575
- Ls.add(t2, i3), e2 && e2(i3), r2.manager.itemEnd(t2);
21575
+ Ns.add(t2, i3), e2 && e2(i3), r2.manager.itemEnd(t2);
21576
21576
  }).catch(function(e3) {
21577
21577
  n2 && n2(e3), r2.manager.itemError(t2), r2.manager.itemEnd(t2);
21578
21578
  }), r2.manager.itemStart(t2);
@@ -22993,7 +22993,7 @@ var Slide = function(t) {
22993
22993
  t2.position.z = 1e3 - i2;
22994
22994
  }
22995
22995
  }
22996
- class Ll {
22996
+ class Nl {
22997
22997
  constructor() {
22998
22998
  this.prevTexture = il, this.nextTexture = il, this.geometry = new de(), this.material = null, this.camera = new Ol(), this.mesh = new Ie(), this.textureWidth = 0, this.textureHeight = 0;
22999
22999
  }
@@ -23043,13 +23043,13 @@ var Slide = function(t) {
23043
23043
  null === (t2 = this.geometry) || void 0 === t2 || t2.dispose(), null === (e2 = this.material) || void 0 === e2 || e2.dispose();
23044
23044
  }
23045
23045
  }
23046
- var Nl = i(86), Dl = i.n(Nl), Fl = i(87), Bl = i.n(Fl);
23046
+ var Ll = i(86), Dl = i.n(Ll), Fl = i(87), Bl = i.n(Fl);
23047
23047
  var Ul = i(88), kl = i.n(Ul), Gl = i(89), Hl = i.n(Gl);
23048
23048
  var jl = i(90), zl = i.n(jl), Vl = i(91), Wl = i.n(Vl);
23049
23049
  var Xl = i(92), Yl = i.n(Xl), ql = i(93), Zl = i.n(ql);
23050
23050
  var Jl = i(94), Kl = i.n(Jl), Ql = i(95), $l = i.n(Ql);
23051
23051
  var th = i(96), eh = i.n(th), ih = i(97), nh = i.n(ih);
23052
- class rh extends Ll {
23052
+ class rh extends Nl {
23053
23053
  constructor() {
23054
23054
  super(...arguments), this.duration = 1250, this.options = [], this.fragmentShader = nh.a, this.vertexShader = eh.a, this.verticalSegments = 100;
23055
23055
  }
@@ -23218,7 +23218,7 @@ var Slide = function(t) {
23218
23218
  constructor() {
23219
23219
  super(...arguments), this.duration = 1e3, this.fragmentShader = Pl.a, this.options = [];
23220
23220
  }
23221
- }, Checkerboard: class extends Ll {
23221
+ }, Checkerboard: class extends Nl {
23222
23222
  constructor() {
23223
23223
  super(...arguments), this.duration = 2500, this.options = [{ name: "dir", value: "horz" }], this.fragmentShader = Bl.a, this.vertexShader = Dl.a, this.vIndex = "", this.delay = 0, this.verticalSegments = 5;
23224
23224
  }
@@ -23300,7 +23300,7 @@ var Slide = function(t) {
23300
23300
  var t2, e2;
23301
23301
  null === (t2 = this.geometry) || void 0 === t2 || t2.dispose(), null === (e2 = this.material) || void 0 === e2 || e2.dispose();
23302
23302
  }
23303
- }, Curtain: class extends Ll {
23303
+ }, Curtain: class extends Nl {
23304
23304
  constructor() {
23305
23305
  super(...arguments), this.duration = 6e3, this.options = [], this.fragmentShader = Zl.a, this.vertexShader = Yl.a, this.verticalSegments = 100;
23306
23306
  }
@@ -23310,7 +23310,7 @@ var Slide = function(t) {
23310
23310
  addObjects(t2) {
23311
23311
  super.addObjects(t2), this.mesh.position.z += 20, t2.background = this.nextTexture;
23312
23312
  }
23313
- }, Fall: class extends Ll {
23313
+ }, Fall: class extends Nl {
23314
23314
  constructor() {
23315
23315
  super(...arguments), this.zCurveLimit = 100, this.duration = 2e3, this.options = [{ name: "invX", value: "0" }], this.verticalSegments = 100, this.fragmentShader = $l.a, this.vertexShader = Kl.a;
23316
23316
  }
@@ -23358,7 +23358,7 @@ var Slide = function(t) {
23358
23358
  const e2 = this.options.find((t3) => "dir" === t3.name);
23359
23359
  this.material.uniforms.option = { value: "in" === (null == e2 ? void 0 : e2.value) ? 0 : 1 };
23360
23360
  }
23361
- }, PeelOff: rh, Flip: class extends Ll {
23361
+ }, PeelOff: rh, Flip: class extends Nl {
23362
23362
  constructor() {
23363
23363
  super(...arguments), this.duration = 1250, this.options = [], this.fragmentShader = _h.a, this.vertexShader = gh.a, this.verticalSegments = 1;
23364
23364
  }
@@ -23572,7 +23572,7 @@ var Slide = function(t) {
23572
23572
  i(139);
23573
23573
  var Ph = i(3), Oh = i(5);
23574
23574
  Oh.c.mixin({ accessible: false, accessibleTitle: null, accessibleHint: null, tabIndex: 0, _accessibleActive: false, _accessibleDiv: null, accessibleType: "button", accessiblePointerEvents: "auto", accessibleChildren: true, renderId: -1 });
23575
- var Lh = function() {
23575
+ var Nh = function() {
23576
23576
  function t2(t3) {
23577
23577
  this.debug = false, this._isActive = false, this._isMobileAccessibility = false, this.pool = [], this.renderId = 0, this.children = [], this.androidUpdateCount = 0, this.androidUpdateFrequency = 500, this._hookDiv = null, (Ph.isMobile.tablet || Ph.isMobile.phone) && this.createTouchHook();
23578
23578
  var e2 = document.createElement("div");
@@ -23648,9 +23648,9 @@ var Slide = function(t) {
23648
23648
  }, t2.prototype.destroy = function() {
23649
23649
  this.destroyTouchHook(), this.div = null, globalThis.document.removeEventListener("mousemove", this._onMouseMove, true), globalThis.removeEventListener("keydown", this._onKeyDown), this.pool = null, this.children = null, this.renderer = null;
23650
23650
  }, t2;
23651
- }(), Nh = i(1), Dh = i(7), Fh = function() {
23651
+ }(), Lh = i(1), Dh = i(7), Fh = function() {
23652
23652
  function t2() {
23653
- this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0, this.global = new Nh.g(), this.target = null, this.originalEvent = null, this.identifier = null, this.isPrimary = false, this.button = 0, this.buttons = 0, this.width = 0, this.height = 0, this.tiltX = 0, this.tiltY = 0, this.pointerType = null, this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0;
23653
+ this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0, this.global = new Lh.g(), this.target = null, this.originalEvent = null, this.identifier = null, this.isPrimary = false, this.button = 0, this.buttons = 0, this.width = 0, this.height = 0, this.tiltX = 0, this.tiltY = 0, this.pointerType = null, this.pressure = 0, this.rotationAngle = 0, this.twist = 0, this.tangentialPressure = 0;
23654
23654
  }
23655
23655
  return Object.defineProperty(t2.prototype, "pointerId", { get: function() {
23656
23656
  return this.identifier;
@@ -23709,7 +23709,7 @@ var Slide = function(t) {
23709
23709
  }, enumerable: false, configurable: true }), t2.FLAGS = Object.freeze({ NONE: 0, OVER: 1, LEFT_DOWN: 2, RIGHT_DOWN: 4 }), t2;
23710
23710
  }(), Gh = function() {
23711
23711
  function t2() {
23712
- this._tempPoint = new Nh.g();
23712
+ this._tempPoint = new Lh.g();
23713
23713
  }
23714
23714
  return t2.prototype.recursiveFindHit = function(t3, e2, i2, n2, r2) {
23715
23715
  if (!e2 || !e2.visible)
@@ -24091,7 +24091,7 @@ var Slide = function(t) {
24091
24091
  }, t2.prototype.clear = function() {
24092
24092
  this.minX = 1 / 0, this.minY = 1 / 0, this.maxX = -1 / 0, this.maxY = -1 / 0;
24093
24093
  }, t2.prototype.getRectangle = function(t3) {
24094
- return this.minX > this.maxX || this.minY > this.maxY ? Nh.j.EMPTY : ((t3 = t3 || new Nh.j(0, 0, 1, 1)).x = this.minX, t3.y = this.minY, t3.width = this.maxX - this.minX, t3.height = this.maxY - this.minY, t3);
24094
+ return this.minX > this.maxX || this.minY > this.maxY ? Lh.j.EMPTY : ((t3 = t3 || new Lh.j(0, 0, 1, 1)).x = this.minX, t3.y = this.minY, t3.width = this.maxX - this.minX, t3.height = this.maxY - this.minY, t3);
24095
24095
  }, t2.prototype.addPoint = function(t3) {
24096
24096
  this.minX = Math.min(this.minX, t3.x), this.maxX = Math.max(this.maxX, t3.x), this.minY = Math.min(this.minY, t3.y), this.maxY = Math.max(this.maxY, t3.y);
24097
24097
  }, t2.prototype.addPointMatrix = function(t3, e2) {
@@ -24156,10 +24156,10 @@ var Slide = function(t) {
24156
24156
  }
24157
24157
  Pu(t2, e2), t2.prototype = null === e2 ? Object.create(e2) : (i2.prototype = e2.prototype, new i2());
24158
24158
  }
24159
- var Lu, Nu, Du, Fu, Bu, Uu, ku, Gu, Hu, ju, zu, Vu, Wu, Xu, Yu, qu, Zu, Ju, Ku, Qu = function(t2) {
24159
+ var Nu, Lu, Du, Fu, Bu, Uu, ku, Gu, Hu, ju, zu, Vu, Wu, Xu, Yu, qu, Zu, Ju, Ku, Qu = function(t2) {
24160
24160
  function e2() {
24161
24161
  var e3 = t2.call(this) || this;
24162
- return e3.tempDisplayObjectParent = null, e3.transform = new Nh.m(), 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 Iu(), 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;
24162
+ return e3.tempDisplayObjectParent = null, e3.transform = new Lh.m(), 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 Iu(), 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;
24163
24163
  }
24164
24164
  return Ou(e2, t2), e2.mixin = function(t3) {
24165
24165
  for (var i2 = Object.keys(t3), n2 = 0; n2 < i2.length; ++n2) {
@@ -24173,9 +24173,9 @@ var Slide = function(t) {
24173
24173
  }, e2.prototype.updateTransform = function() {
24174
24174
  this._boundsID++, this.transform.updateTransform(this.parent.transform), this.worldAlpha = this.alpha * this.parent.worldAlpha;
24175
24175
  }, e2.prototype.getBounds = function(t3, e3) {
24176
- return t3 || (this.parent ? (this._recursivePostUpdateTransform(), this.updateTransform()) : (this.parent = this._tempDisplayObjectParent, this.updateTransform(), this.parent = null)), this._bounds.updateID !== this._boundsID && (this.calculateBounds(), this._bounds.updateID = this._boundsID), e3 || (this._boundsRect || (this._boundsRect = new Nh.j()), e3 = this._boundsRect), this._bounds.getRectangle(e3);
24176
+ return t3 || (this.parent ? (this._recursivePostUpdateTransform(), this.updateTransform()) : (this.parent = this._tempDisplayObjectParent, this.updateTransform(), this.parent = null)), this._bounds.updateID !== this._boundsID && (this.calculateBounds(), this._bounds.updateID = this._boundsID), e3 || (this._boundsRect || (this._boundsRect = new Lh.j()), e3 = this._boundsRect), this._bounds.getRectangle(e3);
24177
24177
  }, e2.prototype.getLocalBounds = function(t3) {
24178
- t3 || (this._localBoundsRect || (this._localBoundsRect = new Nh.j()), t3 = this._localBoundsRect), this._localBounds || (this._localBounds = new Iu());
24178
+ t3 || (this._localBoundsRect || (this._localBoundsRect = new Lh.j()), t3 = this._localBoundsRect), this._localBounds || (this._localBounds = new Iu());
24179
24179
  var e3 = this.transform, i2 = this.parent;
24180
24180
  this.parent = null, this.transform = this._tempDisplayObjectParent.transform;
24181
24181
  var n2 = this._bounds, r2 = this._boundsID;
@@ -24234,9 +24234,9 @@ var Slide = function(t) {
24234
24234
  }, set: function(t3) {
24235
24235
  this.transform.rotation = t3;
24236
24236
  }, enumerable: false, configurable: true }), Object.defineProperty(e2.prototype, "angle", { get: function() {
24237
- return this.transform.rotation * Nh.i;
24237
+ return this.transform.rotation * Lh.i;
24238
24238
  }, set: function(t3) {
24239
- this.transform.rotation = t3 * Nh.b;
24239
+ this.transform.rotation = t3 * Lh.b;
24240
24240
  }, enumerable: false, configurable: true }), Object.defineProperty(e2.prototype, "zIndex", { get: function() {
24241
24241
  return this._zIndex;
24242
24242
  }, set: function(t3) {
@@ -24272,9 +24272,9 @@ var Slide = function(t) {
24272
24272
  }
24273
24273
  Qu.prototype.displayObjectUpdateTransform = Qu.prototype.updateTransform, function(t2) {
24274
24274
  t2[t2.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.WEBGL2 = 2] = "WEBGL2";
24275
- }(Lu || (Lu = {})), function(t2) {
24276
- t2[t2.UNKNOWN = 0] = "UNKNOWN", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.CANVAS = 2] = "CANVAS";
24277
24275
  }(Nu || (Nu = {})), function(t2) {
24276
+ t2[t2.UNKNOWN = 0] = "UNKNOWN", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.CANVAS = 2] = "CANVAS";
24277
+ }(Lu || (Lu = {})), function(t2) {
24278
24278
  t2[t2.COLOR = 16384] = "COLOR", t2[t2.DEPTH = 256] = "DEPTH", t2[t2.STENCIL = 1024] = "STENCIL";
24279
24279
  }(Du || (Du = {})), function(t2) {
24280
24280
  t2[t2.NORMAL = 0] = "NORMAL", t2[t2.ADD = 1] = "ADD", t2[t2.MULTIPLY = 2] = "MULTIPLY", t2[t2.SCREEN = 3] = "SCREEN", t2[t2.OVERLAY = 4] = "OVERLAY", t2[t2.DARKEN = 5] = "DARKEN", t2[t2.LIGHTEN = 6] = "LIGHTEN", t2[t2.COLOR_DODGE = 7] = "COLOR_DODGE", t2[t2.COLOR_BURN = 8] = "COLOR_BURN", t2[t2.HARD_LIGHT = 9] = "HARD_LIGHT", t2[t2.SOFT_LIGHT = 10] = "SOFT_LIGHT", t2[t2.DIFFERENCE = 11] = "DIFFERENCE", t2[t2.EXCLUSION = 12] = "EXCLUSION", t2[t2.HUE = 13] = "HUE", t2[t2.SATURATION = 14] = "SATURATION", t2[t2.COLOR = 15] = "COLOR", t2[t2.LUMINOSITY = 16] = "LUMINOSITY", t2[t2.NORMAL_NPM = 17] = "NORMAL_NPM", t2[t2.ADD_NPM = 18] = "ADD_NPM", t2[t2.SCREEN_NPM = 19] = "SCREEN_NPM", t2[t2.NONE = 20] = "NONE", t2[t2.SRC_OVER = 0] = "SRC_OVER", t2[t2.SRC_IN = 21] = "SRC_IN", t2[t2.SRC_OUT = 22] = "SRC_OUT", t2[t2.SRC_ATOP = 23] = "SRC_ATOP", t2[t2.DST_OVER = 24] = "DST_OVER", t2[t2.DST_IN = 25] = "DST_IN", t2[t2.DST_OUT = 26] = "DST_OUT", t2[t2.DST_ATOP = 27] = "DST_ATOP", t2[t2.ERASE = 26] = "ERASE", t2[t2.SUBTRACT = 28] = "SUBTRACT", t2[t2.XOR = 29] = "XOR";
@@ -24475,7 +24475,7 @@ var Slide = function(t) {
24475
24475
  }, enumerable: false, configurable: true }), e2;
24476
24476
  }(Qu);
24477
24477
  ec.prototype.containerUpdateTransform = ec.prototype.updateTransform;
24478
- var ic = new Nh.j(), nc = function() {
24478
+ var ic = new Lh.j(), nc = function() {
24479
24479
  function t2(t3) {
24480
24480
  this.renderer = t3;
24481
24481
  }
@@ -25231,7 +25231,7 @@ var Slide = function(t) {
25231
25231
  return t2._textureFormats;
25232
25232
  }, enumerable: false, configurable: true }), t2;
25233
25233
  }();
25234
- function Lc(t2, e2, i2) {
25234
+ function Nc(t2, e2, i2) {
25235
25235
  var n2 = { textures: {}, texture: null };
25236
25236
  return e2 ? (e2.map(function(t3) {
25237
25237
  return new Vh.t(new Vh.c(t3, Object.assign({ mipmap: Sc.k.OFF, alphaMode: Sc.a.NO_PREMULTIPLIED_ALPHA }, i2)));
@@ -25241,19 +25241,19 @@ var Slide = function(t) {
25241
25241
  }), n2) : n2;
25242
25242
  }
25243
25243
  pc.setExtensionXhrType("dds", pc.XHR_RESPONSE_TYPE.BUFFER);
25244
- var Nc, Dc, Fc = 3, Bc = 4, Uc = 7, kc = 19, Gc = 2, Hc = 0, jc = 1, zc = 2, Vc = 3;
25244
+ var Lc, Dc, Fc = 3, Bc = 4, Uc = 7, kc = 19, Gc = 2, Hc = 0, jc = 1, zc = 2, Vc = 3;
25245
25245
  !function(t2) {
25246
25246
  t2[t2.DXGI_FORMAT_UNKNOWN = 0] = "DXGI_FORMAT_UNKNOWN", t2[t2.DXGI_FORMAT_R32G32B32A32_TYPELESS = 1] = "DXGI_FORMAT_R32G32B32A32_TYPELESS", t2[t2.DXGI_FORMAT_R32G32B32A32_FLOAT = 2] = "DXGI_FORMAT_R32G32B32A32_FLOAT", t2[t2.DXGI_FORMAT_R32G32B32A32_UINT = 3] = "DXGI_FORMAT_R32G32B32A32_UINT", t2[t2.DXGI_FORMAT_R32G32B32A32_SINT = 4] = "DXGI_FORMAT_R32G32B32A32_SINT", t2[t2.DXGI_FORMAT_R32G32B32_TYPELESS = 5] = "DXGI_FORMAT_R32G32B32_TYPELESS", t2[t2.DXGI_FORMAT_R32G32B32_FLOAT = 6] = "DXGI_FORMAT_R32G32B32_FLOAT", t2[t2.DXGI_FORMAT_R32G32B32_UINT = 7] = "DXGI_FORMAT_R32G32B32_UINT", t2[t2.DXGI_FORMAT_R32G32B32_SINT = 8] = "DXGI_FORMAT_R32G32B32_SINT", t2[t2.DXGI_FORMAT_R16G16B16A16_TYPELESS = 9] = "DXGI_FORMAT_R16G16B16A16_TYPELESS", t2[t2.DXGI_FORMAT_R16G16B16A16_FLOAT = 10] = "DXGI_FORMAT_R16G16B16A16_FLOAT", t2[t2.DXGI_FORMAT_R16G16B16A16_UNORM = 11] = "DXGI_FORMAT_R16G16B16A16_UNORM", t2[t2.DXGI_FORMAT_R16G16B16A16_UINT = 12] = "DXGI_FORMAT_R16G16B16A16_UINT", t2[t2.DXGI_FORMAT_R16G16B16A16_SNORM = 13] = "DXGI_FORMAT_R16G16B16A16_SNORM", t2[t2.DXGI_FORMAT_R16G16B16A16_SINT = 14] = "DXGI_FORMAT_R16G16B16A16_SINT", t2[t2.DXGI_FORMAT_R32G32_TYPELESS = 15] = "DXGI_FORMAT_R32G32_TYPELESS", t2[t2.DXGI_FORMAT_R32G32_FLOAT = 16] = "DXGI_FORMAT_R32G32_FLOAT", t2[t2.DXGI_FORMAT_R32G32_UINT = 17] = "DXGI_FORMAT_R32G32_UINT", t2[t2.DXGI_FORMAT_R32G32_SINT = 18] = "DXGI_FORMAT_R32G32_SINT", t2[t2.DXGI_FORMAT_R32G8X24_TYPELESS = 19] = "DXGI_FORMAT_R32G8X24_TYPELESS", t2[t2.DXGI_FORMAT_D32_FLOAT_S8X24_UINT = 20] = "DXGI_FORMAT_D32_FLOAT_S8X24_UINT", t2[t2.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS = 21] = "DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS", t2[t2.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT = 22] = "DXGI_FORMAT_X32_TYPELESS_G8X24_UINT", t2[t2.DXGI_FORMAT_R10G10B10A2_TYPELESS = 23] = "DXGI_FORMAT_R10G10B10A2_TYPELESS", t2[t2.DXGI_FORMAT_R10G10B10A2_UNORM = 24] = "DXGI_FORMAT_R10G10B10A2_UNORM", t2[t2.DXGI_FORMAT_R10G10B10A2_UINT = 25] = "DXGI_FORMAT_R10G10B10A2_UINT", t2[t2.DXGI_FORMAT_R11G11B10_FLOAT = 26] = "DXGI_FORMAT_R11G11B10_FLOAT", t2[t2.DXGI_FORMAT_R8G8B8A8_TYPELESS = 27] = "DXGI_FORMAT_R8G8B8A8_TYPELESS", t2[t2.DXGI_FORMAT_R8G8B8A8_UNORM = 28] = "DXGI_FORMAT_R8G8B8A8_UNORM", t2[t2.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB = 29] = "DXGI_FORMAT_R8G8B8A8_UNORM_SRGB", t2[t2.DXGI_FORMAT_R8G8B8A8_UINT = 30] = "DXGI_FORMAT_R8G8B8A8_UINT", t2[t2.DXGI_FORMAT_R8G8B8A8_SNORM = 31] = "DXGI_FORMAT_R8G8B8A8_SNORM", t2[t2.DXGI_FORMAT_R8G8B8A8_SINT = 32] = "DXGI_FORMAT_R8G8B8A8_SINT", t2[t2.DXGI_FORMAT_R16G16_TYPELESS = 33] = "DXGI_FORMAT_R16G16_TYPELESS", t2[t2.DXGI_FORMAT_R16G16_FLOAT = 34] = "DXGI_FORMAT_R16G16_FLOAT", t2[t2.DXGI_FORMAT_R16G16_UNORM = 35] = "DXGI_FORMAT_R16G16_UNORM", t2[t2.DXGI_FORMAT_R16G16_UINT = 36] = "DXGI_FORMAT_R16G16_UINT", t2[t2.DXGI_FORMAT_R16G16_SNORM = 37] = "DXGI_FORMAT_R16G16_SNORM", t2[t2.DXGI_FORMAT_R16G16_SINT = 38] = "DXGI_FORMAT_R16G16_SINT", t2[t2.DXGI_FORMAT_R32_TYPELESS = 39] = "DXGI_FORMAT_R32_TYPELESS", t2[t2.DXGI_FORMAT_D32_FLOAT = 40] = "DXGI_FORMAT_D32_FLOAT", t2[t2.DXGI_FORMAT_R32_FLOAT = 41] = "DXGI_FORMAT_R32_FLOAT", t2[t2.DXGI_FORMAT_R32_UINT = 42] = "DXGI_FORMAT_R32_UINT", t2[t2.DXGI_FORMAT_R32_SINT = 43] = "DXGI_FORMAT_R32_SINT", t2[t2.DXGI_FORMAT_R24G8_TYPELESS = 44] = "DXGI_FORMAT_R24G8_TYPELESS", t2[t2.DXGI_FORMAT_D24_UNORM_S8_UINT = 45] = "DXGI_FORMAT_D24_UNORM_S8_UINT", t2[t2.DXGI_FORMAT_R24_UNORM_X8_TYPELESS = 46] = "DXGI_FORMAT_R24_UNORM_X8_TYPELESS", t2[t2.DXGI_FORMAT_X24_TYPELESS_G8_UINT = 47] = "DXGI_FORMAT_X24_TYPELESS_G8_UINT", t2[t2.DXGI_FORMAT_R8G8_TYPELESS = 48] = "DXGI_FORMAT_R8G8_TYPELESS", t2[t2.DXGI_FORMAT_R8G8_UNORM = 49] = "DXGI_FORMAT_R8G8_UNORM", t2[t2.DXGI_FORMAT_R8G8_UINT = 50] = "DXGI_FORMAT_R8G8_UINT", t2[t2.DXGI_FORMAT_R8G8_SNORM = 51] = "DXGI_FORMAT_R8G8_SNORM", t2[t2.DXGI_FORMAT_R8G8_SINT = 52] = "DXGI_FORMAT_R8G8_SINT", t2[t2.DXGI_FORMAT_R16_TYPELESS = 53] = "DXGI_FORMAT_R16_TYPELESS", t2[t2.DXGI_FORMAT_R16_FLOAT = 54] = "DXGI_FORMAT_R16_FLOAT", t2[t2.DXGI_FORMAT_D16_UNORM = 55] = "DXGI_FORMAT_D16_UNORM", t2[t2.DXGI_FORMAT_R16_UNORM = 56] = "DXGI_FORMAT_R16_UNORM", t2[t2.DXGI_FORMAT_R16_UINT = 57] = "DXGI_FORMAT_R16_UINT", t2[t2.DXGI_FORMAT_R16_SNORM = 58] = "DXGI_FORMAT_R16_SNORM", t2[t2.DXGI_FORMAT_R16_SINT = 59] = "DXGI_FORMAT_R16_SINT", t2[t2.DXGI_FORMAT_R8_TYPELESS = 60] = "DXGI_FORMAT_R8_TYPELESS", t2[t2.DXGI_FORMAT_R8_UNORM = 61] = "DXGI_FORMAT_R8_UNORM", t2[t2.DXGI_FORMAT_R8_UINT = 62] = "DXGI_FORMAT_R8_UINT", t2[t2.DXGI_FORMAT_R8_SNORM = 63] = "DXGI_FORMAT_R8_SNORM", t2[t2.DXGI_FORMAT_R8_SINT = 64] = "DXGI_FORMAT_R8_SINT", t2[t2.DXGI_FORMAT_A8_UNORM = 65] = "DXGI_FORMAT_A8_UNORM", t2[t2.DXGI_FORMAT_R1_UNORM = 66] = "DXGI_FORMAT_R1_UNORM", t2[t2.DXGI_FORMAT_R9G9B9E5_SHAREDEXP = 67] = "DXGI_FORMAT_R9G9B9E5_SHAREDEXP", t2[t2.DXGI_FORMAT_R8G8_B8G8_UNORM = 68] = "DXGI_FORMAT_R8G8_B8G8_UNORM", t2[t2.DXGI_FORMAT_G8R8_G8B8_UNORM = 69] = "DXGI_FORMAT_G8R8_G8B8_UNORM", t2[t2.DXGI_FORMAT_BC1_TYPELESS = 70] = "DXGI_FORMAT_BC1_TYPELESS", t2[t2.DXGI_FORMAT_BC1_UNORM = 71] = "DXGI_FORMAT_BC1_UNORM", t2[t2.DXGI_FORMAT_BC1_UNORM_SRGB = 72] = "DXGI_FORMAT_BC1_UNORM_SRGB", t2[t2.DXGI_FORMAT_BC2_TYPELESS = 73] = "DXGI_FORMAT_BC2_TYPELESS", t2[t2.DXGI_FORMAT_BC2_UNORM = 74] = "DXGI_FORMAT_BC2_UNORM", t2[t2.DXGI_FORMAT_BC2_UNORM_SRGB = 75] = "DXGI_FORMAT_BC2_UNORM_SRGB", t2[t2.DXGI_FORMAT_BC3_TYPELESS = 76] = "DXGI_FORMAT_BC3_TYPELESS", t2[t2.DXGI_FORMAT_BC3_UNORM = 77] = "DXGI_FORMAT_BC3_UNORM", t2[t2.DXGI_FORMAT_BC3_UNORM_SRGB = 78] = "DXGI_FORMAT_BC3_UNORM_SRGB", t2[t2.DXGI_FORMAT_BC4_TYPELESS = 79] = "DXGI_FORMAT_BC4_TYPELESS", t2[t2.DXGI_FORMAT_BC4_UNORM = 80] = "DXGI_FORMAT_BC4_UNORM", t2[t2.DXGI_FORMAT_BC4_SNORM = 81] = "DXGI_FORMAT_BC4_SNORM", t2[t2.DXGI_FORMAT_BC5_TYPELESS = 82] = "DXGI_FORMAT_BC5_TYPELESS", t2[t2.DXGI_FORMAT_BC5_UNORM = 83] = "DXGI_FORMAT_BC5_UNORM", t2[t2.DXGI_FORMAT_BC5_SNORM = 84] = "DXGI_FORMAT_BC5_SNORM", t2[t2.DXGI_FORMAT_B5G6R5_UNORM = 85] = "DXGI_FORMAT_B5G6R5_UNORM", t2[t2.DXGI_FORMAT_B5G5R5A1_UNORM = 86] = "DXGI_FORMAT_B5G5R5A1_UNORM", t2[t2.DXGI_FORMAT_B8G8R8A8_UNORM = 87] = "DXGI_FORMAT_B8G8R8A8_UNORM", t2[t2.DXGI_FORMAT_B8G8R8X8_UNORM = 88] = "DXGI_FORMAT_B8G8R8X8_UNORM", t2[t2.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM = 89] = "DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM", t2[t2.DXGI_FORMAT_B8G8R8A8_TYPELESS = 90] = "DXGI_FORMAT_B8G8R8A8_TYPELESS", t2[t2.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB = 91] = "DXGI_FORMAT_B8G8R8A8_UNORM_SRGB", t2[t2.DXGI_FORMAT_B8G8R8X8_TYPELESS = 92] = "DXGI_FORMAT_B8G8R8X8_TYPELESS", t2[t2.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB = 93] = "DXGI_FORMAT_B8G8R8X8_UNORM_SRGB", t2[t2.DXGI_FORMAT_BC6H_TYPELESS = 94] = "DXGI_FORMAT_BC6H_TYPELESS", t2[t2.DXGI_FORMAT_BC6H_UF16 = 95] = "DXGI_FORMAT_BC6H_UF16", t2[t2.DXGI_FORMAT_BC6H_SF16 = 96] = "DXGI_FORMAT_BC6H_SF16", t2[t2.DXGI_FORMAT_BC7_TYPELESS = 97] = "DXGI_FORMAT_BC7_TYPELESS", t2[t2.DXGI_FORMAT_BC7_UNORM = 98] = "DXGI_FORMAT_BC7_UNORM", t2[t2.DXGI_FORMAT_BC7_UNORM_SRGB = 99] = "DXGI_FORMAT_BC7_UNORM_SRGB", t2[t2.DXGI_FORMAT_AYUV = 100] = "DXGI_FORMAT_AYUV", t2[t2.DXGI_FORMAT_Y410 = 101] = "DXGI_FORMAT_Y410", t2[t2.DXGI_FORMAT_Y416 = 102] = "DXGI_FORMAT_Y416", t2[t2.DXGI_FORMAT_NV12 = 103] = "DXGI_FORMAT_NV12", t2[t2.DXGI_FORMAT_P010 = 104] = "DXGI_FORMAT_P010", t2[t2.DXGI_FORMAT_P016 = 105] = "DXGI_FORMAT_P016", t2[t2.DXGI_FORMAT_420_OPAQUE = 106] = "DXGI_FORMAT_420_OPAQUE", t2[t2.DXGI_FORMAT_YUY2 = 107] = "DXGI_FORMAT_YUY2", t2[t2.DXGI_FORMAT_Y210 = 108] = "DXGI_FORMAT_Y210", t2[t2.DXGI_FORMAT_Y216 = 109] = "DXGI_FORMAT_Y216", t2[t2.DXGI_FORMAT_NV11 = 110] = "DXGI_FORMAT_NV11", t2[t2.DXGI_FORMAT_AI44 = 111] = "DXGI_FORMAT_AI44", t2[t2.DXGI_FORMAT_IA44 = 112] = "DXGI_FORMAT_IA44", t2[t2.DXGI_FORMAT_P8 = 113] = "DXGI_FORMAT_P8", t2[t2.DXGI_FORMAT_A8P8 = 114] = "DXGI_FORMAT_A8P8", t2[t2.DXGI_FORMAT_B4G4R4A4_UNORM = 115] = "DXGI_FORMAT_B4G4R4A4_UNORM", t2[t2.DXGI_FORMAT_P208 = 116] = "DXGI_FORMAT_P208", t2[t2.DXGI_FORMAT_V208 = 117] = "DXGI_FORMAT_V208", t2[t2.DXGI_FORMAT_V408 = 118] = "DXGI_FORMAT_V408", t2[t2.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE = 119] = "DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE", t2[t2.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE = 120] = "DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE", t2[t2.DXGI_FORMAT_FORCE_UINT = 121] = "DXGI_FORMAT_FORCE_UINT";
25247
- }(Nc || (Nc = {})), function(t2) {
25247
+ }(Lc || (Lc = {})), function(t2) {
25248
25248
  t2[t2.DDS_DIMENSION_TEXTURE1D = 2] = "DDS_DIMENSION_TEXTURE1D", t2[t2.DDS_DIMENSION_TEXTURE2D = 3] = "DDS_DIMENSION_TEXTURE2D", t2[t2.DDS_DIMENSION_TEXTURE3D = 6] = "DDS_DIMENSION_TEXTURE3D";
25249
25249
  }(Dc || (Dc = {}));
25250
- var Wc, Xc, Yc, qc = ((Rc = {})[827611204] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Rc[861165636] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Rc[894720068] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Rc), Zc = ((Ic = {})[Nc.DXGI_FORMAT_BC1_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Ic[Nc.DXGI_FORMAT_BC1_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Ic[Nc.DXGI_FORMAT_BC2_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Ic[Nc.DXGI_FORMAT_BC2_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Ic[Nc.DXGI_FORMAT_BC3_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Ic[Nc.DXGI_FORMAT_BC3_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Ic[Nc.DXGI_FORMAT_BC1_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, Ic[Nc.DXGI_FORMAT_BC2_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, Ic[Nc.DXGI_FORMAT_BC3_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, Ic), Jc = function() {
25250
+ var Wc, Xc, Yc, qc = ((Rc = {})[827611204] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Rc[861165636] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Rc[894720068] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Rc), Zc = ((Ic = {})[Lc.DXGI_FORMAT_BC1_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Ic[Lc.DXGI_FORMAT_BC1_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT1_EXT, Ic[Lc.DXGI_FORMAT_BC2_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Ic[Lc.DXGI_FORMAT_BC2_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT3_EXT, Ic[Lc.DXGI_FORMAT_BC3_TYPELESS] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Ic[Lc.DXGI_FORMAT_BC3_UNORM] = Ec.COMPRESSED_RGBA_S3TC_DXT5_EXT, Ic[Lc.DXGI_FORMAT_BC1_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, Ic[Lc.DXGI_FORMAT_BC2_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT, Ic[Lc.DXGI_FORMAT_BC3_UNORM_SRGB] = Ec.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT, Ic), Jc = function() {
25251
25251
  function t2() {
25252
25252
  }
25253
25253
  return t2.use = function(e2, i2) {
25254
25254
  if ("dds" === e2.extension && e2.data)
25255
25255
  try {
25256
- Object.assign(e2, Lc(e2.name || e2.url, t2.parse(e2.data), e2.metadata));
25256
+ Object.assign(e2, Nc(e2.name || e2.url, t2.parse(e2.data), e2.metadata));
25257
25257
  } catch (t3) {
25258
25258
  return void i2(t3);
25259
25259
  }
@@ -25311,7 +25311,7 @@ var Slide = function(t) {
25311
25311
  try {
25312
25312
  var n2 = e2.name || e2.url, r2 = t2.parse(n2, e2.data), o2 = r2.compressed, s2 = r2.uncompressed, a2 = r2.kvData;
25313
25313
  if (o2) {
25314
- var l2 = Lc(n2, o2, e2.metadata);
25314
+ var l2 = Nc(n2, o2, e2.metadata);
25315
25315
  if (a2 && l2.textures)
25316
25316
  for (var h2 in l2.textures)
25317
25317
  l2.textures[h2].baseTexture.ktxKeyValueData = a2;
@@ -25486,7 +25486,7 @@ var Slide = function(t) {
25486
25486
  }(), yd = function(t2) {
25487
25487
  function e2(e3) {
25488
25488
  var i2 = t2.call(this, e3) || this;
25489
- return i2.shader = null, i2.properties = null, i2.tempMatrix = new Nh.d(), i2.properties = [{ attributeName: "aVertexPosition", size: 2, uploadFunction: i2.uploadVertices, offset: 0 }, { attributeName: "aPositionCoord", size: 2, uploadFunction: i2.uploadPosition, offset: 0 }, { attributeName: "aRotation", size: 1, uploadFunction: i2.uploadRotation, offset: 0 }, { attributeName: "aTextureCoord", size: 2, uploadFunction: i2.uploadUvs, offset: 0 }, { attributeName: "aColor", size: 1, type: Sc.r.UNSIGNED_BYTE, uploadFunction: i2.uploadTint, offset: 0 }], i2.shader = Vh.r.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n", "varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}", {}), i2.state = Vh.s.for2d(), i2;
25489
+ return i2.shader = null, i2.properties = null, i2.tempMatrix = new Lh.d(), i2.properties = [{ attributeName: "aVertexPosition", size: 2, uploadFunction: i2.uploadVertices, offset: 0 }, { attributeName: "aPositionCoord", size: 2, uploadFunction: i2.uploadPosition, offset: 0 }, { attributeName: "aRotation", size: 1, uploadFunction: i2.uploadRotation, offset: 0 }, { attributeName: "aTextureCoord", size: 2, uploadFunction: i2.uploadUvs, offset: 0 }, { attributeName: "aColor", size: 1, type: Sc.r.UNSIGNED_BYTE, uploadFunction: i2.uploadTint, offset: 0 }], i2.shader = Vh.r.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n vec2 v = vec2(x, y);\n v = v + aPositionCoord;\n\n gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = aTextureCoord;\n vColor = aColor * uColor;\n}\n", "varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n gl_FragColor = color;\n}", {}), i2.state = Vh.s.for2d(), i2;
25490
25490
  }
25491
25491
  return fd(e2, t2), e2.prototype.render = function(t3) {
25492
25492
  var e3 = t3.children, i2 = t3._maxSize, n2 = t3._batchSize, r2 = this.renderer, o2 = e3.length;
@@ -25618,10 +25618,10 @@ var Slide = function(t) {
25618
25618
  }
25619
25619
  } }, Md = { build: function(t2) {
25620
25620
  var e2, i2, n2, r2, o2, s2, a2 = t2.points;
25621
- if (t2.type === Nh.l.CIRC) {
25621
+ if (t2.type === Lh.l.CIRC) {
25622
25622
  var l2 = t2.shape;
25623
25623
  e2 = l2.x, i2 = l2.y, o2 = s2 = l2.radius, n2 = r2 = 0;
25624
- } else if (t2.type === Nh.l.ELIP) {
25624
+ } else if (t2.type === Lh.l.ELIP) {
25625
25625
  var h2 = t2.shape;
25626
25626
  e2 = h2.x, i2 = h2.y, o2 = h2.width, s2 = h2.height, n2 = r2 = 0;
25627
25627
  } else {
@@ -25651,7 +25651,7 @@ var Slide = function(t) {
25651
25651
  a2.length = 0;
25652
25652
  }, triangulate: function(t2, e2) {
25653
25653
  var i2, n2, r2 = t2.points, o2 = e2.points, s2 = e2.indices, a2 = o2.length / 2, l2 = a2;
25654
- if (t2.type !== Nh.l.RREC) {
25654
+ if (t2.type !== Lh.l.RREC) {
25655
25655
  var h2 = t2.shape;
25656
25656
  i2 = h2.x, n2 = h2.y;
25657
25657
  } else {
@@ -25702,7 +25702,7 @@ var Slide = function(t) {
25702
25702
  var u2 = t2 - i2 * r2 + l2, c2 = e2 - n2 * r2 + h2, d2 = t2 + i2 * o2 + l2, p2 = e2 + n2 * o2 + h2;
25703
25703
  return a2.push(u2, c2), a2.push(d2, p2), 2;
25704
25704
  }
25705
- function Ld(t2, e2, i2, n2, r2, o2, s2, a2) {
25705
+ function Nd(t2, e2, i2, n2, r2, o2, s2, a2) {
25706
25706
  var l2 = i2 - t2, h2 = n2 - e2, u2 = Math.atan2(l2, h2), c2 = Math.atan2(r2 - t2, o2 - e2);
25707
25707
  a2 && u2 < c2 ? u2 += 2 * Math.PI : !a2 && u2 > c2 && (c2 += 2 * Math.PI);
25708
25708
  var d2 = u2, p2 = c2 - u2, f2 = Math.abs(p2), m2 = Math.sqrt(l2 * l2 + h2 * h2), g2 = 1 + (15 * f2 * Math.sqrt(m2) / Math.PI >> 0), v2 = p2 / g2;
@@ -25719,9 +25719,9 @@ var Slide = function(t) {
25719
25719
  }
25720
25720
  return 2 * g2;
25721
25721
  }
25722
- function Nd(t2, e2) {
25722
+ function Ld(t2, e2) {
25723
25723
  t2.lineStyle.native ? function(t3, e3) {
25724
- var i2 = 0, n2 = t3.shape, r2 = t3.points || n2.points, o2 = n2.type !== Nh.l.POLY || n2.closeStroke;
25724
+ var i2 = 0, n2 = t3.shape, r2 = t3.points || n2.points, o2 = n2.type !== Lh.l.POLY || n2.closeStroke;
25725
25725
  if (0 !== r2.length) {
25726
25726
  var s2 = e3.points, a2 = e3.indices, l2 = r2.length / 2, h2 = s2.length / 2, u2 = h2;
25727
25727
  for (s2.push(r2[0], r2[1]), i2 = 1; i2 < l2; i2++)
@@ -25731,7 +25731,7 @@ var Slide = function(t) {
25731
25731
  }(t2, e2) : function(t3, e3) {
25732
25732
  var i2 = t3.shape, n2 = t3.points || i2.points.slice(), r2 = e3.closePointEps;
25733
25733
  if (0 !== n2.length) {
25734
- var o2 = t3.lineStyle, s2 = new Nh.g(n2[0], n2[1]), a2 = new Nh.g(n2[n2.length - 2], n2[n2.length - 1]), l2 = i2.type !== Nh.l.POLY || i2.closeStroke, h2 = Math.abs(s2.x - a2.x) < r2 && Math.abs(s2.y - a2.y) < r2;
25734
+ var o2 = t3.lineStyle, s2 = new Lh.g(n2[0], n2[1]), a2 = new Lh.g(n2[n2.length - 2], n2[n2.length - 1]), l2 = i2.type !== Lh.l.POLY || i2.closeStroke, h2 = Math.abs(s2.x - a2.x) < r2 && Math.abs(s2.y - a2.y) < r2;
25735
25735
  if (l2) {
25736
25736
  n2 = n2.slice(), h2 && (n2.pop(), n2.pop(), a2.set(n2[n2.length - 2], n2[n2.length - 1]));
25737
25737
  var u2 = 0.5 * (s2.x + a2.x), c2 = 0.5 * (a2.y + s2.y);
@@ -25740,21 +25740,21 @@ var Slide = function(t) {
25740
25740
  var d2 = e3.points, p2 = n2.length / 2, f2 = n2.length, m2 = d2.length / 2, g2 = o2.width / 2, v2 = g2 * g2, _2 = o2.miterLimit * o2.miterLimit, y2 = n2[0], x2 = n2[1], b2 = n2[2], T2 = n2[3], E2 = 0, S2 = 0, w2 = -(x2 - T2), A2 = y2 - b2, M2 = 0, C2 = 0, R2 = Math.sqrt(w2 * w2 + A2 * A2);
25741
25741
  w2 /= R2, A2 /= R2, w2 *= g2, A2 *= g2;
25742
25742
  var I2 = o2.alignment, P2 = 2 * (1 - I2), O2 = 2 * I2;
25743
- l2 || (o2.cap === gd.ROUND ? f2 += Ld(y2 - w2 * (P2 - O2) * 0.5, x2 - A2 * (P2 - O2) * 0.5, y2 - w2 * P2, x2 - A2 * P2, y2 + w2 * O2, x2 + A2 * O2, d2, true) + 2 : o2.cap === gd.SQUARE && (f2 += Od(y2, x2, w2, A2, P2, O2, true, d2))), d2.push(y2 - w2 * P2, x2 - A2 * P2), d2.push(y2 + w2 * O2, x2 + A2 * O2);
25744
- for (var L2 = 1; L2 < p2 - 1; ++L2) {
25745
- y2 = n2[2 * (L2 - 1)], x2 = n2[2 * (L2 - 1) + 1], b2 = n2[2 * L2], T2 = n2[2 * L2 + 1], E2 = n2[2 * (L2 + 1)], S2 = n2[2 * (L2 + 1) + 1], w2 = -(x2 - T2), A2 = y2 - b2, w2 /= R2 = Math.sqrt(w2 * w2 + A2 * A2), A2 /= R2, w2 *= g2, A2 *= g2, M2 = -(T2 - S2), C2 = b2 - E2, M2 /= R2 = Math.sqrt(M2 * M2 + C2 * C2), C2 /= R2, M2 *= g2, C2 *= g2;
25746
- var N2 = b2 - y2, D2 = x2 - T2, F2 = b2 - E2, B2 = S2 - T2, U2 = D2 * F2 - B2 * N2, k2 = U2 < 0;
25743
+ l2 || (o2.cap === gd.ROUND ? f2 += Nd(y2 - w2 * (P2 - O2) * 0.5, x2 - A2 * (P2 - O2) * 0.5, y2 - w2 * P2, x2 - A2 * P2, y2 + w2 * O2, x2 + A2 * O2, d2, true) + 2 : o2.cap === gd.SQUARE && (f2 += Od(y2, x2, w2, A2, P2, O2, true, d2))), d2.push(y2 - w2 * P2, x2 - A2 * P2), d2.push(y2 + w2 * O2, x2 + A2 * O2);
25744
+ for (var N2 = 1; N2 < p2 - 1; ++N2) {
25745
+ 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)], S2 = n2[2 * (N2 + 1) + 1], w2 = -(x2 - T2), A2 = y2 - b2, w2 /= R2 = Math.sqrt(w2 * w2 + A2 * A2), A2 /= R2, w2 *= g2, A2 *= g2, M2 = -(T2 - S2), C2 = b2 - E2, M2 /= R2 = Math.sqrt(M2 * M2 + C2 * C2), C2 /= R2, M2 *= g2, C2 *= g2;
25746
+ var L2 = b2 - y2, D2 = x2 - T2, F2 = b2 - E2, B2 = S2 - T2, U2 = D2 * F2 - B2 * L2, k2 = U2 < 0;
25747
25747
  if (Math.abs(U2) < 0.1)
25748
25748
  d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(b2 + w2 * O2, T2 + A2 * O2);
25749
25749
  else {
25750
- var G2 = (-w2 + y2) * (-A2 + T2) - (-w2 + b2) * (-A2 + x2), H2 = (-M2 + E2) * (-C2 + T2) - (-M2 + b2) * (-C2 + S2), j2 = (N2 * H2 - F2 * G2) / U2, z2 = (B2 * G2 - D2 * H2) / U2, V2 = (j2 - b2) * (j2 - b2) + (z2 - T2) * (z2 - T2), W2 = b2 + (j2 - b2) * P2, X2 = T2 + (z2 - T2) * P2, Y2 = b2 - (j2 - b2) * O2, q2 = T2 - (z2 - T2) * O2, Z2 = k2 ? P2 : O2;
25751
- V2 <= Math.min(N2 * N2 + D2 * D2, F2 * F2 + B2 * B2) + Z2 * Z2 * v2 ? o2.join === md.BEVEL || V2 / v2 > _2 ? (k2 ? (d2.push(W2, X2), d2.push(b2 + w2 * O2, T2 + A2 * O2), d2.push(W2, X2), d2.push(b2 + M2 * O2, T2 + C2 * O2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(Y2, q2), d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(Y2, q2)), f2 += 2) : o2.join === md.ROUND ? k2 ? (d2.push(W2, X2), d2.push(b2 + w2 * O2, T2 + A2 * O2), f2 += Ld(b2, T2, b2 + w2 * O2, T2 + A2 * O2, b2 + M2 * O2, T2 + C2 * O2, d2, true) + 4, d2.push(W2, X2), d2.push(b2 + M2 * O2, T2 + C2 * O2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(Y2, q2), f2 += Ld(b2, T2, b2 - w2 * P2, T2 - A2 * P2, b2 - M2 * P2, T2 - C2 * P2, d2, false) + 4, d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(Y2, q2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(b2 + w2 * O2, T2 + A2 * O2), o2.join === md.ROUND ? f2 += k2 ? Ld(b2, T2, b2 + w2 * O2, T2 + A2 * O2, b2 + M2 * O2, T2 + C2 * O2, d2, true) + 2 : Ld(b2, T2, b2 - w2 * P2, T2 - A2 * P2, b2 - M2 * P2, T2 - C2 * P2, d2, false) + 2 : o2.join === md.MITER && V2 / v2 <= _2 && (k2 ? (d2.push(Y2, q2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(W2, X2)), f2 += 2), d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(b2 + M2 * O2, T2 + C2 * O2), f2 += 2);
25750
+ var G2 = (-w2 + y2) * (-A2 + T2) - (-w2 + b2) * (-A2 + x2), H2 = (-M2 + E2) * (-C2 + T2) - (-M2 + b2) * (-C2 + S2), j2 = (L2 * H2 - F2 * G2) / U2, z2 = (B2 * G2 - D2 * H2) / U2, V2 = (j2 - b2) * (j2 - b2) + (z2 - T2) * (z2 - T2), W2 = b2 + (j2 - b2) * P2, X2 = T2 + (z2 - T2) * P2, Y2 = b2 - (j2 - b2) * O2, q2 = T2 - (z2 - T2) * O2, Z2 = k2 ? P2 : O2;
25751
+ V2 <= Math.min(L2 * L2 + D2 * D2, F2 * F2 + B2 * B2) + Z2 * Z2 * v2 ? o2.join === md.BEVEL || V2 / v2 > _2 ? (k2 ? (d2.push(W2, X2), d2.push(b2 + w2 * O2, T2 + A2 * O2), d2.push(W2, X2), d2.push(b2 + M2 * O2, T2 + C2 * O2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(Y2, q2), d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(Y2, q2)), f2 += 2) : o2.join === md.ROUND ? k2 ? (d2.push(W2, X2), d2.push(b2 + w2 * O2, T2 + A2 * O2), f2 += Nd(b2, T2, b2 + w2 * O2, T2 + A2 * O2, b2 + M2 * O2, T2 + C2 * O2, d2, true) + 4, d2.push(W2, X2), d2.push(b2 + M2 * O2, T2 + C2 * O2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(Y2, q2), f2 += Nd(b2, T2, b2 - w2 * P2, T2 - A2 * P2, b2 - M2 * P2, T2 - C2 * P2, d2, false) + 4, d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(Y2, q2)) : (d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(b2 + w2 * O2, T2 + A2 * O2), o2.join === md.ROUND ? f2 += k2 ? Nd(b2, T2, b2 + w2 * O2, T2 + A2 * O2, b2 + M2 * O2, T2 + C2 * O2, d2, true) + 2 : Nd(b2, T2, b2 - w2 * P2, T2 - A2 * P2, b2 - M2 * P2, T2 - C2 * P2, d2, false) + 2 : o2.join === md.MITER && V2 / v2 <= _2 && (k2 ? (d2.push(Y2, q2), d2.push(Y2, q2)) : (d2.push(W2, X2), d2.push(W2, X2)), f2 += 2), d2.push(b2 - M2 * P2, T2 - C2 * P2), d2.push(b2 + M2 * O2, T2 + C2 * O2), f2 += 2);
25752
25752
  }
25753
25753
  }
25754
- y2 = n2[2 * (p2 - 2)], x2 = n2[2 * (p2 - 2) + 1], b2 = n2[2 * (p2 - 1)], w2 = -(x2 - (T2 = n2[2 * (p2 - 1) + 1])), A2 = y2 - b2, w2 /= R2 = Math.sqrt(w2 * w2 + A2 * A2), A2 /= R2, w2 *= g2, A2 *= g2, d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(b2 + w2 * O2, T2 + A2 * O2), l2 || (o2.cap === gd.ROUND ? f2 += Ld(b2 - w2 * (P2 - O2) * 0.5, T2 - A2 * (P2 - O2) * 0.5, b2 - w2 * P2, T2 - A2 * P2, b2 + w2 * O2, T2 + A2 * O2, d2, false) + 2 : o2.cap === gd.SQUARE && (f2 += Od(b2, T2, w2, A2, P2, O2, false, d2)));
25754
+ y2 = n2[2 * (p2 - 2)], x2 = n2[2 * (p2 - 2) + 1], b2 = n2[2 * (p2 - 1)], w2 = -(x2 - (T2 = n2[2 * (p2 - 1) + 1])), A2 = y2 - b2, w2 /= R2 = Math.sqrt(w2 * w2 + A2 * A2), A2 /= R2, w2 *= g2, A2 *= g2, d2.push(b2 - w2 * P2, T2 - A2 * P2), d2.push(b2 + w2 * O2, T2 + A2 * O2), l2 || (o2.cap === gd.ROUND ? f2 += Nd(b2 - w2 * (P2 - O2) * 0.5, T2 - A2 * (P2 - O2) * 0.5, b2 - w2 * P2, T2 - A2 * P2, b2 + w2 * O2, T2 + A2 * O2, d2, false) + 2 : o2.cap === gd.SQUARE && (f2 += Od(b2, T2, w2, A2, P2, O2, false, d2)));
25755
25755
  var J2 = e3.indices, K2 = bd.epsilon * bd.epsilon;
25756
- for (L2 = m2; L2 < f2 + m2 - 2; ++L2)
25757
- y2 = d2[2 * L2], x2 = d2[2 * L2 + 1], b2 = d2[2 * (L2 + 1)], T2 = d2[2 * (L2 + 1) + 1], E2 = d2[2 * (L2 + 2)], S2 = d2[2 * (L2 + 2) + 1], Math.abs(y2 * (T2 - S2) + b2 * (S2 - x2) + E2 * (x2 - T2)) < K2 || J2.push(L2, L2 + 1, L2 + 2);
25756
+ for (N2 = m2; N2 < f2 + m2 - 2; ++N2)
25757
+ 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)], S2 = d2[2 * (N2 + 2) + 1], Math.abs(y2 * (T2 - S2) + b2 * (S2 - x2) + E2 * (x2 - T2)) < K2 || J2.push(N2, N2 + 1, N2 + 2);
25758
25758
  }
25759
25759
  }(t2, e2);
25760
25760
  }
@@ -25768,7 +25768,7 @@ var Slide = function(t) {
25768
25768
  var d2 = a2 * a2 + l2 * l2, p2 = h2 * h2 + u2 * u2, f2 = a2 * h2 + l2 * u2, m2 = r2 * Math.sqrt(d2) / c2, g2 = r2 * Math.sqrt(p2) / c2, v2 = m2 * f2 / d2, _2 = g2 * f2 / p2, y2 = m2 * u2 + g2 * l2, x2 = m2 * h2 + g2 * a2, b2 = l2 * (g2 + v2), T2 = a2 * (g2 + v2), E2 = u2 * (m2 + _2), S2 = h2 * (m2 + _2);
25769
25769
  return { cx: y2 + t3, cy: x2 + e2, radius: r2, startAngle: Math.atan2(T2 - x2, b2 - y2), endAngle: Math.atan2(S2 - x2, E2 - y2), anticlockwise: l2 * h2 > u2 * a2 };
25770
25770
  }, t2.arc = function(t3, e2, i2, n2, r2, o2, s2, a2, l2) {
25771
- for (var h2 = s2 - o2, u2 = bd._segmentsCount(Math.abs(h2) * r2, 40 * Math.ceil(Math.abs(h2) / Nh.f)), c2 = h2 / (2 * u2), d2 = 2 * c2, p2 = Math.cos(c2), f2 = Math.sin(c2), m2 = u2 - 1, g2 = m2 % 1 / m2, v2 = 0; v2 <= m2; ++v2) {
25771
+ for (var h2 = s2 - o2, u2 = bd._segmentsCount(Math.abs(h2) * r2, 40 * Math.ceil(Math.abs(h2) / Lh.f)), c2 = h2 / (2 * u2), d2 = 2 * c2, p2 = Math.cos(c2), f2 = Math.sin(c2), m2 = u2 - 1, g2 = m2 % 1 / m2, v2 = 0; v2 <= m2; ++v2) {
25772
25772
  var _2 = c2 + o2 + d2 * (v2 + g2 * v2), y2 = Math.cos(_2), x2 = -Math.sin(_2);
25773
25773
  l2.push((p2 * y2 + f2 * x2) * r2 + i2, (p2 * -x2 + f2 * y2) * r2 + n2);
25774
25774
  }
@@ -25811,7 +25811,7 @@ var Slide = function(t) {
25811
25811
  }, t2.prototype.reset = function() {
25812
25812
  this.style = null, this.size = 0, this.start = 0, this.attribStart = 0, this.attribSize = 0;
25813
25813
  }, t2;
25814
- }(), Gd = ((Dd = {})[Nh.l.POLY] = Ad, Dd[Nh.l.CIRC] = Md, Dd[Nh.l.ELIP] = Md, Dd[Nh.l.RECT] = Cd, Dd[Nh.l.RREC] = Pd, Dd), Hd = [], jd = [], zd = function() {
25814
+ }(), Gd = ((Dd = {})[Lh.l.POLY] = Ad, Dd[Lh.l.CIRC] = Md, Dd[Lh.l.ELIP] = Md, Dd[Lh.l.RECT] = Cd, Dd[Lh.l.RREC] = Pd, Dd), Hd = [], jd = [], zd = function() {
25815
25815
  function t2(t3, e2, i2, n2) {
25816
25816
  void 0 === e2 && (e2 = null), void 0 === i2 && (i2 = null), void 0 === n2 && (n2 = null), this.points = [], this.holes = [], this.shape = t3, this.lineStyle = i2, this.fillStyle = e2, this.matrix = n2, this.type = t3.type;
25817
25817
  }
@@ -25820,7 +25820,7 @@ var Slide = function(t) {
25820
25820
  }, t2.prototype.destroy = function() {
25821
25821
  this.shape = null, this.holes.length = 0, this.holes = null, this.points.length = 0, this.points = null, this.lineStyle = null, this.fillStyle = null;
25822
25822
  }, t2;
25823
- }(), Vd = new Nh.g(), Wd = new Oh.a(), Xd = function(t2) {
25823
+ }(), Vd = new Lh.g(), Wd = new Oh.a(), Xd = function(t2) {
25824
25824
  function e2() {
25825
25825
  var e3 = t2.call(this) || this;
25826
25826
  return e3.closePointEps = 1e-4, e3.boundsPadding = 0, e3.uvsFloat32 = null, e3.indicesUint16 = null, e3.batchable = false, e3.points = [], e3.colors = [], e3.uvs = [], e3.indices = [], e3.textureIds = [], e3.graphicsData = [], e3.drawCalls = [], e3.batchDirty = -1, e3.batches = [], e3.dirty = 0, e3.cacheDirty = -1, e3.clearDirty = 0, e3.shapeIndex = 0, e3._bounds = new Oh.a(), e3.boundsDirty = -1, e3;
@@ -25951,26 +25951,26 @@ var Slide = function(t) {
25951
25951
  }, e2.prototype.processFill = function(t3) {
25952
25952
  t3.holes.length ? Ad.triangulate(t3, this) : Gd[t3.type].triangulate(t3, this);
25953
25953
  }, e2.prototype.processLine = function(t3) {
25954
- Nd(t3, this);
25954
+ Ld(t3, this);
25955
25955
  for (var e3 = 0; e3 < t3.holes.length; e3++)
25956
- Nd(t3.holes[e3], this);
25956
+ Ld(t3.holes[e3], this);
25957
25957
  }, e2.prototype.processHoles = function(t3) {
25958
25958
  for (var e3 = 0; e3 < t3.length; e3++) {
25959
25959
  var i2 = t3[e3];
25960
25960
  Gd[i2.type].build(i2), i2.matrix && this.transformPoints(i2.points, i2.matrix);
25961
25961
  }
25962
25962
  }, e2.prototype.calculateBounds = function() {
25963
- var t3 = this._bounds, e3 = Wd, i2 = Nh.d.IDENTITY;
25963
+ var t3 = this._bounds, e3 = Wd, i2 = Lh.d.IDENTITY;
25964
25964
  this._bounds.clear(), e3.clear();
25965
25965
  for (var n2 = 0; n2 < this.graphicsData.length; n2++) {
25966
- var r2 = this.graphicsData[n2], o2 = r2.shape, s2 = r2.type, a2 = r2.lineStyle, l2 = r2.matrix || Nh.d.IDENTITY, h2 = 0;
25967
- if (a2 && a2.visible && (h2 = a2.width, s2 !== Nh.l.POLY || r2.fillStyle.visible ? h2 *= Math.max(0, a2.alignment) : h2 *= Math.max(a2.alignment, 1 - a2.alignment)), i2 !== l2 && (e3.isEmpty() || (t3.addBoundsMatrix(e3, i2), e3.clear()), i2 = l2), s2 === Nh.l.RECT || s2 === Nh.l.RREC) {
25966
+ var r2 = this.graphicsData[n2], o2 = r2.shape, s2 = r2.type, a2 = r2.lineStyle, l2 = r2.matrix || Lh.d.IDENTITY, h2 = 0;
25967
+ if (a2 && a2.visible && (h2 = a2.width, s2 !== Lh.l.POLY || r2.fillStyle.visible ? h2 *= Math.max(0, a2.alignment) : h2 *= Math.max(a2.alignment, 1 - a2.alignment)), i2 !== l2 && (e3.isEmpty() || (t3.addBoundsMatrix(e3, i2), e3.clear()), i2 = l2), s2 === Lh.l.RECT || s2 === Lh.l.RREC) {
25968
25968
  var u2 = o2;
25969
25969
  e3.addFramePad(u2.x, u2.y, u2.x + u2.width, u2.y + u2.height, h2, h2);
25970
- } else if (s2 === Nh.l.CIRC) {
25970
+ } else if (s2 === Lh.l.CIRC) {
25971
25971
  var c2 = o2;
25972
25972
  e3.addFramePad(c2.x, c2.y, c2.x, c2.y, c2.radius + h2, c2.radius + h2);
25973
- } else if (s2 === Nh.l.ELIP) {
25973
+ } else if (s2 === Lh.l.ELIP) {
25974
25974
  var d2 = o2;
25975
25975
  e3.addFramePad(d2.x, d2.y, d2.x, d2.y, d2.width + h2, d2.height + h2);
25976
25976
  } else {
@@ -26055,9 +26055,9 @@ var Slide = function(t) {
26055
26055
  }, e2.prototype.startPoly = function() {
26056
26056
  if (this.currentPath) {
26057
26057
  var t3 = this.currentPath.points, e3 = this.currentPath.points.length;
26058
- e3 > 2 && (this.drawShape(this.currentPath), this.currentPath = new Nh.h(), this.currentPath.closeStroke = false, this.currentPath.points.push(t3[e3 - 2], t3[e3 - 1]));
26058
+ e3 > 2 && (this.drawShape(this.currentPath), this.currentPath = new Lh.h(), this.currentPath.closeStroke = false, this.currentPath.points.push(t3[e3 - 2], t3[e3 - 1]));
26059
26059
  } else
26060
- this.currentPath = new Nh.h(), this.currentPath.closeStroke = false;
26060
+ this.currentPath = new Lh.h(), this.currentPath.closeStroke = false;
26061
26061
  }, e2.prototype.finishPoly = function() {
26062
26062
  this.currentPath && (this.currentPath.points.length > 2 ? (this.drawShape(this.currentPath), this.currentPath = null) : this.currentPath.points.length = 0);
26063
26063
  }, e2.prototype.moveTo = function(t3, e3) {
@@ -26085,7 +26085,7 @@ var Slide = function(t) {
26085
26085
  }, e2.prototype.arc = function(t3, e3, i2, n2, r2, o2) {
26086
26086
  if (void 0 === o2 && (o2 = false), n2 === r2)
26087
26087
  return this;
26088
- if (!o2 && r2 <= n2 ? r2 += Nh.f : o2 && n2 <= r2 && (n2 += Nh.f), 0 === r2 - n2)
26088
+ if (!o2 && r2 <= n2 ? r2 += Lh.f : o2 && n2 <= r2 && (n2 += Lh.f), 0 === r2 - n2)
26089
26089
  return this;
26090
26090
  var s2 = t3 + Math.cos(n2) * i2, a2 = e3 + Math.sin(n2) * i2, l2 = this._geometry.closePointEps, h2 = this.currentPath ? this.currentPath.points : null;
26091
26091
  if (h2) {
@@ -26103,19 +26103,19 @@ var Slide = function(t) {
26103
26103
  }, e2.prototype.endFill = function() {
26104
26104
  return this.finishPoly(), this._fillStyle.reset(), this;
26105
26105
  }, e2.prototype.drawRect = function(t3, e3, i2, n2) {
26106
- return this.drawShape(new Nh.j(t3, e3, i2, n2));
26106
+ return this.drawShape(new Lh.j(t3, e3, i2, n2));
26107
26107
  }, e2.prototype.drawRoundedRect = function(t3, e3, i2, n2, r2) {
26108
- return this.drawShape(new Nh.k(t3, e3, i2, n2, r2));
26108
+ return this.drawShape(new Lh.k(t3, e3, i2, n2, r2));
26109
26109
  }, e2.prototype.drawCircle = function(t3, e3, i2) {
26110
- return this.drawShape(new Nh.a(t3, e3, i2));
26110
+ return this.drawShape(new Lh.a(t3, e3, i2));
26111
26111
  }, e2.prototype.drawEllipse = function(t3, e3, i2, n2) {
26112
- return this.drawShape(new Nh.c(t3, e3, i2, n2));
26112
+ return this.drawShape(new Lh.c(t3, e3, i2, n2));
26113
26113
  }, e2.prototype.drawPolygon = function() {
26114
26114
  for (var t3, e3 = arguments, i2 = [], n2 = 0; n2 < arguments.length; n2++)
26115
26115
  i2[n2] = e3[n2];
26116
26116
  var r2 = true, o2 = i2[0];
26117
26117
  o2.points ? (r2 = o2.closeStroke, t3 = o2.points) : t3 = Array.isArray(i2[0]) ? i2[0] : i2;
26118
- var s2 = new Nh.h(t3);
26118
+ var s2 = new Lh.h(t3);
26119
26119
  return s2.closeStroke = r2, this.drawShape(s2), this;
26120
26120
  }, e2.prototype.drawShape = function(t3) {
26121
26121
  return this._holeMode ? this._geometry.drawHole(t3, this._matrix) : this._geometry.drawShape(t3, this._fillStyle.clone(), this._lineStyle.clone(), this._matrix), this;
@@ -26123,7 +26123,7 @@ var Slide = function(t) {
26123
26123
  return this._geometry.clear(), this._lineStyle.reset(), this._fillStyle.reset(), this._boundsID++, this._matrix = null, this._holeMode = false, this.currentPath = null, this;
26124
26124
  }, e2.prototype.isFastRect = function() {
26125
26125
  var t3 = this._geometry.graphicsData;
26126
- return !(1 !== t3.length || t3[0].shape.type !== Nh.l.RECT || t3[0].matrix || t3[0].holes.length || t3[0].lineStyle.visible && t3[0].lineStyle.width);
26126
+ return !(1 !== t3.length || t3[0].shape.type !== Lh.l.RECT || t3[0].matrix || t3[0].holes.length || t3[0].lineStyle.visible && t3[0].lineStyle.width);
26127
26127
  }, e2.prototype._render = function(t3) {
26128
26128
  this.finishPoly();
26129
26129
  var e3 = this._geometry, i2 = t3.context.supports.uint32Indices;
@@ -26158,7 +26158,7 @@ var Slide = function(t) {
26158
26158
  if (!Zd[i2]) {
26159
26159
  for (var n2 = t3.plugins[i2].MAX_TEXTURES, r2 = new Int32Array(n2), o2 = 0; o2 < n2; o2++)
26160
26160
  r2[o2] = o2;
26161
- var s2 = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new Nh.d(), default: Vh.v.from({ uSamplers: r2 }, true) }, a2 = t3.plugins[i2]._shader.program;
26161
+ var s2 = { tint: new Float32Array([1, 1, 1, 1]), translationMatrix: new Lh.d(), default: Vh.v.from({ uSamplers: r2 }, true) }, a2 = t3.plugins[i2]._shader.program;
26162
26162
  Zd[i2] = new Vh.r(a2, s2);
26163
26163
  }
26164
26164
  e3 = Zd[i2];
@@ -26201,7 +26201,7 @@ var Slide = function(t) {
26201
26201
  return this.finishPoly(), this._holeMode = false, this;
26202
26202
  }, e2.prototype.destroy = function(e3) {
26203
26203
  this._geometry.refCount--, 0 === this._geometry.refCount && this._geometry.dispose(), this._matrix = null, this.currentPath = null, this._lineStyle.destroy(), this._lineStyle = null, this._fillStyle.destroy(), this._fillStyle = null, this._geometry = null, this.shader = null, this.vertexData = null, this.batches.length = 0, this.batches = null, t2.prototype.destroy.call(this, e3);
26204
- }, e2.nextRoundedRectBehavior = false, e2._TEMP_POINT = new Nh.g(), e2;
26204
+ }, e2.nextRoundedRectBehavior = false, e2._TEMP_POINT = new Lh.g(), e2;
26205
26205
  }(Oh.b), Kd = function(t2, e2) {
26206
26206
  return (Kd = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
26207
26207
  t3.__proto__ = e3;
@@ -26210,10 +26210,10 @@ var Slide = function(t) {
26210
26210
  e3.hasOwnProperty(i2) && (t3[i2] = e3[i2]);
26211
26211
  })(t2, e2);
26212
26212
  };
26213
- var Qd, $d = new Nh.g(), tp = new Uint16Array([0, 1, 2, 0, 2, 3]), ep = function(t2) {
26213
+ var Qd, $d = new Lh.g(), tp = new Uint16Array([0, 1, 2, 0, 2, 3]), ep = function(t2) {
26214
26214
  function e2(e3) {
26215
26215
  var i2 = t2.call(this) || this;
26216
- return i2._anchor = new Nh.e(i2._onAnchorUpdate, i2, e3 ? e3.defaultAnchor.x : 0, e3 ? e3.defaultAnchor.y : 0), i2._texture = null, i2._width = 0, i2._height = 0, i2._tint = null, i2._tintRGB = null, i2.tint = 16777215, i2.blendMode = Sc.b.NORMAL, i2._cachedTint = 16777215, i2.uvs = null, i2.texture = e3 || Vh.t.EMPTY, i2.vertexData = new Float32Array(8), i2.vertexTrimmedData = null, i2._transformID = -1, i2._textureID = -1, i2._transformTrimmedID = -1, i2._textureTrimmedID = -1, i2.indices = tp, i2.pluginName = "batch", i2.isSprite = true, i2._roundPixels = xd.b.ROUND_PIXELS, i2;
26216
+ return i2._anchor = new Lh.e(i2._onAnchorUpdate, i2, e3 ? e3.defaultAnchor.x : 0, e3 ? e3.defaultAnchor.y : 0), i2._texture = null, i2._width = 0, i2._height = 0, i2._tint = null, i2._tintRGB = null, i2.tint = 16777215, i2.blendMode = Sc.b.NORMAL, i2._cachedTint = 16777215, i2.uvs = null, i2.texture = e3 || Vh.t.EMPTY, i2.vertexData = new Float32Array(8), i2.vertexTrimmedData = null, i2._transformID = -1, i2._textureID = -1, i2._transformTrimmedID = -1, i2._textureTrimmedID = -1, i2.indices = tp, i2.pluginName = "batch", i2.isSprite = true, i2._roundPixels = xd.b.ROUND_PIXELS, i2;
26217
26217
  }
26218
26218
  return function(t3, e3) {
26219
26219
  function i2() {
@@ -26248,7 +26248,7 @@ var Slide = function(t) {
26248
26248
  var t3 = this._texture.trim, e3 = this._texture.orig;
26249
26249
  !t3 || t3.width === e3.width && t3.height === e3.height ? (this.calculateVertices(), this._bounds.addQuad(this.vertexData)) : (this.calculateTrimmedVertices(), this._bounds.addQuad(this.vertexTrimmedData));
26250
26250
  }, e2.prototype.getLocalBounds = function(e3) {
26251
- return 0 === this.children.length ? (this._localBounds || (this._localBounds = new Oh.a()), this._localBounds.minX = this._texture.orig.width * -this._anchor._x, this._localBounds.minY = this._texture.orig.height * -this._anchor._y, this._localBounds.maxX = this._texture.orig.width * (1 - this._anchor._x), this._localBounds.maxY = this._texture.orig.height * (1 - this._anchor._y), e3 || (this._localBoundsRect || (this._localBoundsRect = new Nh.j()), e3 = this._localBoundsRect), this._localBounds.getRectangle(e3)) : t2.prototype.getLocalBounds.call(this, e3);
26251
+ return 0 === this.children.length ? (this._localBounds || (this._localBounds = new Oh.a()), this._localBounds.minX = this._texture.orig.width * -this._anchor._x, this._localBounds.minY = this._texture.orig.height * -this._anchor._y, this._localBounds.maxX = this._texture.orig.width * (1 - this._anchor._x), this._localBounds.maxY = this._texture.orig.height * (1 - this._anchor._y), e3 || (this._localBoundsRect || (this._localBoundsRect = new Lh.j()), e3 = this._localBoundsRect), this._localBounds.getRectangle(e3)) : t2.prototype.getLocalBounds.call(this, e3);
26252
26252
  }, e2.prototype.containsPoint = function(t3) {
26253
26253
  this.worldTransform.applyInverse(t3, $d);
26254
26254
  var e3 = this._texture.orig.width, i2 = this._texture.orig.height, n2 = -e3 * this.anchor.x, r2 = 0;
@@ -26615,7 +26615,7 @@ var Slide = function(t) {
26615
26615
  var r2 = this, o2 = false;
26616
26616
  n2 || (n2 = document.createElement("canvas"), o2 = true), n2.width = 3, n2.height = 3;
26617
26617
  var s2 = Vh.t.from(n2);
26618
- return s2.orig = new Nh.j(), s2.trim = new Nh.j(), (r2 = t2.call(this, s2) || this)._ownCanvas = o2, r2.canvas = n2, r2.context = r2.canvas.getContext("2d"), r2._resolution = xd.b.RESOLUTION, r2._autoResolution = true, r2._text = null, r2._style = null, r2._styleListener = null, r2._font = "", r2.text = e3, r2.style = i2, r2.localStyleID = -1, r2;
26618
+ return s2.orig = new Lh.j(), s2.trim = new Lh.j(), (r2 = t2.call(this, s2) || this)._ownCanvas = o2, r2.canvas = n2, r2.context = r2.canvas.getContext("2d"), r2._resolution = xd.b.RESOLUTION, r2._autoResolution = true, r2._text = null, r2._style = null, r2._styleListener = null, r2._font = "", r2.text = e3, r2.style = i2, r2.localStyleID = -1, r2;
26619
26619
  }
26620
26620
  return function(t3, e3) {
26621
26621
  function i2() {
@@ -26912,8 +26912,8 @@ var Slide = function(t) {
26912
26912
  for (var i2 = e2, n2 = t2.BATCH_SIZE; i2 - e2 < n2 && i2 < this._frameKeys.length; ) {
26913
26913
  var r2 = this._frameKeys[i2], o2 = this._frames[r2], s2 = o2.frame;
26914
26914
  if (s2) {
26915
- var a2 = null, l2 = null, h2 = false !== o2.trimmed && o2.sourceSize ? o2.sourceSize : o2.frame, u2 = new Nh.j(0, 0, Math.floor(h2.w) / this.resolution, Math.floor(h2.h) / this.resolution);
26916
- a2 = o2.rotated ? new Nh.j(Math.floor(s2.x) / this.resolution, Math.floor(s2.y) / this.resolution, Math.floor(s2.h) / this.resolution, Math.floor(s2.w) / this.resolution) : new Nh.j(Math.floor(s2.x) / this.resolution, Math.floor(s2.y) / this.resolution, Math.floor(s2.w) / this.resolution, Math.floor(s2.h) / this.resolution), false !== o2.trimmed && o2.spriteSourceSize && (l2 = new Nh.j(Math.floor(o2.spriteSourceSize.x) / this.resolution, Math.floor(o2.spriteSourceSize.y) / this.resolution, Math.floor(s2.w) / this.resolution, Math.floor(s2.h) / this.resolution)), this.textures[r2] = new Vh.t(this.baseTexture, a2, u2, l2, o2.rotated ? 2 : 0, o2.anchor), Vh.t.addToCache(this.textures[r2], r2);
26915
+ var a2 = null, l2 = null, h2 = false !== o2.trimmed && o2.sourceSize ? o2.sourceSize : o2.frame, u2 = new Lh.j(0, 0, Math.floor(h2.w) / this.resolution, Math.floor(h2.h) / this.resolution);
26916
+ a2 = o2.rotated ? new Lh.j(Math.floor(s2.x) / this.resolution, Math.floor(s2.y) / this.resolution, Math.floor(s2.h) / this.resolution, Math.floor(s2.w) / this.resolution) : new Lh.j(Math.floor(s2.x) / this.resolution, Math.floor(s2.y) / this.resolution, Math.floor(s2.w) / this.resolution, Math.floor(s2.h) / this.resolution), false !== o2.trimmed && o2.spriteSourceSize && (l2 = new Lh.j(Math.floor(o2.spriteSourceSize.x) / this.resolution, Math.floor(o2.spriteSourceSize.y) / this.resolution, Math.floor(s2.w) / this.resolution, Math.floor(s2.h) / this.resolution)), this.textures[r2] = new Vh.t(this.baseTexture, a2, u2, l2, o2.rotated ? 2 : 0, o2.anchor), Vh.t.addToCache(this.textures[r2], r2);
26917
26917
  }
26918
26918
  i2++;
26919
26919
  }
@@ -26991,11 +26991,11 @@ var Slide = function(t) {
26991
26991
  }
26992
26992
  Cp(t2, e2), t2.prototype = null === e2 ? Object.create(e2) : (i2.prototype = e2.prototype, new i2());
26993
26993
  }
26994
- var Ip = new Nh.g(), Pp = function(t2) {
26994
+ var Ip = new Lh.g(), Pp = function(t2) {
26995
26995
  function e2(e3, i2, n2) {
26996
26996
  void 0 === i2 && (i2 = 100), void 0 === n2 && (n2 = 100);
26997
26997
  var r2 = t2.call(this, e3) || this;
26998
- return r2.tileTransform = new Nh.m(), r2._width = i2, r2._height = n2, r2.uvMatrix = r2.texture.uvMatrix || new Vh.u(e3), r2.pluginName = "tilingSprite", r2.uvRespectAnchor = false, r2;
26998
+ return r2.tileTransform = new Lh.m(), r2._width = i2, r2._height = n2, r2.uvMatrix = r2.texture.uvMatrix || new Vh.u(e3), r2.pluginName = "tilingSprite", r2.uvRespectAnchor = false, r2;
26999
26999
  }
27000
27000
  return Rp(e2, t2), Object.defineProperty(e2.prototype, "clampMargin", { get: function() {
27001
27001
  return this.uvMatrix.clampMargin;
@@ -27018,7 +27018,7 @@ var Slide = function(t) {
27018
27018
  var t3 = this._width * -this._anchor._x, e3 = this._height * -this._anchor._y, i2 = this._width * (1 - this._anchor._x), n2 = this._height * (1 - this._anchor._y);
27019
27019
  this._bounds.addFrame(this.transform, t3, e3, i2, n2);
27020
27020
  }, e2.prototype.getLocalBounds = function(e3) {
27021
- return 0 === this.children.length ? (this._bounds.minX = this._width * -this._anchor._x, this._bounds.minY = this._height * -this._anchor._y, this._bounds.maxX = this._width * (1 - this._anchor._x), this._bounds.maxY = this._height * (1 - this._anchor._y), e3 || (this._localBoundsRect || (this._localBoundsRect = new Nh.j()), e3 = this._localBoundsRect), this._bounds.getRectangle(e3)) : t2.prototype.getLocalBounds.call(this, e3);
27021
+ return 0 === this.children.length ? (this._bounds.minX = this._width * -this._anchor._x, this._bounds.minY = this._height * -this._anchor._y, this._bounds.maxX = this._width * (1 - this._anchor._x), this._bounds.maxY = this._height * (1 - this._anchor._y), e3 || (this._localBoundsRect || (this._localBoundsRect = new Lh.j()), e3 = this._localBoundsRect), this._bounds.getRectangle(e3)) : t2.prototype.getLocalBounds.call(this, e3);
27022
27022
  }, e2.prototype.containsPoint = function(t3) {
27023
27023
  this.worldTransform.applyInverse(t3, Ip);
27024
27024
  var e3 = this._width, i2 = this._height, n2 = -e3 * this.anchor._x;
@@ -27041,7 +27041,7 @@ var Slide = function(t) {
27041
27041
  }, set: function(t3) {
27042
27042
  this._height = t3;
27043
27043
  }, enumerable: false, configurable: true }), e2;
27044
- }(ep), Op = "#version 100\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n", Lp = new Nh.d(), Np = function(t2) {
27044
+ }(ep), Op = "#version 100\n#define SHADER_NAME Tiling-Sprite-100\n\nprecision lowp float;\n\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n", Np = new Lh.d(), Lp = function(t2) {
27045
27045
  function e2(e3) {
27046
27046
  var i2 = t2.call(this, e3) || this;
27047
27047
  return e3.runners.contextChange.add(i2), i2.quad = new Vh.o(), i2.state = Vh.s.for2d(), i2;
@@ -27057,7 +27057,7 @@ var Slide = function(t) {
27057
27057
  var s2 = t3._texture, a2 = s2.baseTexture, l2 = t3.tileTransform.localTransform, h2 = t3.uvMatrix, u2 = a2.isPowerOfTwo && s2.frame.width === a2.width && s2.frame.height === a2.height;
27058
27058
  u2 && (a2._glTextures[e3.CONTEXT_UID] ? u2 = a2.wrapMode !== Sc.s.CLAMP : a2.wrapMode === Sc.s.CLAMP && (a2.wrapMode = Sc.s.REPEAT));
27059
27059
  var c2 = u2 ? this.simpleShader : this.shader, d2 = s2.width, p2 = s2.height, f2 = t3._width, m2 = t3._height;
27060
- Lp.set(l2.a * d2 / f2, l2.b * d2 / m2, l2.c * p2 / f2, l2.d * p2 / m2, l2.tx / f2, l2.ty / m2), Lp.invert(), u2 ? Lp.prepend(h2.mapCoord) : (c2.uniforms.uMapCoord = h2.mapCoord.toArray(true), c2.uniforms.uClampFrame = h2.uClampFrame, c2.uniforms.uClampOffset = h2.uClampOffset), c2.uniforms.uTransform = Lp.toArray(true), c2.uniforms.uColor = Object(Ph.premultiplyTintToRgba)(t3.tint, t3.worldAlpha, c2.uniforms.uColor, a2.alphaMode), c2.uniforms.translationMatrix = t3.transform.worldTransform.toArray(true), c2.uniforms.uSampler = s2, e3.shader.bind(c2), e3.geometry.bind(i2), this.state.blendMode = Object(Ph.correctBlendMode)(t3.blendMode, a2.alphaMode), e3.state.set(this.state), e3.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);
27060
+ Np.set(l2.a * d2 / f2, l2.b * d2 / m2, l2.c * p2 / f2, l2.d * p2 / m2, l2.tx / f2, l2.ty / m2), Np.invert(), u2 ? Np.prepend(h2.mapCoord) : (c2.uniforms.uMapCoord = h2.mapCoord.toArray(true), c2.uniforms.uClampFrame = h2.uClampFrame, c2.uniforms.uClampOffset = h2.uClampOffset), c2.uniforms.uTransform = Np.toArray(true), c2.uniforms.uColor = Object(Ph.premultiplyTintToRgba)(t3.tint, t3.worldAlpha, c2.uniforms.uColor, a2.alphaMode), c2.uniforms.translationMatrix = t3.transform.worldTransform.toArray(true), c2.uniforms.uSampler = s2, e3.shader.bind(c2), e3.geometry.bind(i2), this.state.blendMode = Object(Ph.correctBlendMode)(t3.blendMode, a2.alphaMode), e3.state.set(this.state), e3.geometry.draw(this.renderer.gl.TRIANGLES, 6, 0);
27061
27061
  }, e2;
27062
27062
  }(Vh.m), Dp = i(8), Fp = function(t2, e2) {
27063
27063
  return (Fp = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
@@ -27196,7 +27196,7 @@ var Slide = function(t) {
27196
27196
  for (c2 = 0; c2 < t3.char.length; c2++) {
27197
27197
  var m2 = t3.char[c2], g2 = (p2 = m2.id, m2.page), v2 = t3.char[c2], _2 = v2.x, y2 = v2.y, x2 = v2.width, b2 = v2.height, T2 = v2.xoffset, E2 = v2.yoffset, S2 = v2.xadvance;
27198
27198
  _2 /= h2, y2 /= h2, x2 /= h2, b2 /= h2, T2 /= h2, E2 /= h2, S2 /= h2;
27199
- var w2 = new Nh.j(_2 + u2[g2].frame.x / h2, y2 + u2[g2].frame.y / h2, x2, b2);
27199
+ var w2 = new Lh.j(_2 + u2[g2].frame.x / h2, y2 + u2[g2].frame.y / h2, x2, b2);
27200
27200
  this.chars[p2] = { xOffset: T2, yOffset: E2, xAdvance: S2, kerning: {}, texture: new Vh.t(u2[g2].baseTexture, w2), page: g2 };
27201
27201
  }
27202
27202
  for (c2 = 0; c2 < t3.kerning.length; c2++) {
@@ -27270,11 +27270,11 @@ var Slide = function(t) {
27270
27270
  b2 = 0;
27271
27271
  for (var M2 = u2.length; b2 < M2; b2++)
27272
27272
  for (var C2 = u2[b2], R2 = 0; R2 < M2; R2++) {
27273
- var I2 = u2[R2], P2 = m2.measureText(C2).width, O2 = m2.measureText(I2).width, L2 = m2.measureText(C2 + I2).width - (P2 + O2);
27274
- L2 && p2.kerning.push({ first: Wp(C2), second: Wp(I2), amount: L2 });
27273
+ var I2 = u2[R2], P2 = m2.measureText(C2).width, O2 = m2.measureText(I2).width, N2 = m2.measureText(C2 + I2).width - (P2 + O2);
27274
+ N2 && p2.kerning.push({ first: Wp(C2), second: Wp(I2), amount: N2 });
27275
27275
  }
27276
- var N2 = new t2(p2, x2, true);
27277
- return void 0 !== t2.available[e2] && t2.uninstall(e2), t2.available[e2] = N2, N2;
27276
+ var L2 = new t2(p2, x2, true);
27277
+ return void 0 !== t2.available[e2] && t2.uninstall(e2), t2.available[e2] = L2, L2;
27278
27278
  }, t2.ALPHA = [["a", "z"], ["A", "Z"], " "], t2.NUMERIC = [["0", "9"]], t2.ALPHANUMERIC = [["a", "z"], ["A", "Z"], ["0", "9"], " "], t2.ASCII = [[" ", "~"]], t2.defaultOptions = { resolution: 1, textureWidth: 512, textureHeight: 512, padding: 4, chars: t2.ALPHANUMERIC }, t2.available = {}, t2;
27279
27279
  }(), Yp = [], qp = [], Zp = [], Jp = (function(t2) {
27280
27280
  function e2(i2, n2) {
@@ -27284,7 +27284,7 @@ var Slide = function(t) {
27284
27284
  var o2 = Object.assign({}, e2.styleDefaults, n2), s2 = o2.align, a2 = o2.tint, l2 = o2.maxWidth, h2 = o2.letterSpacing, u2 = o2.fontName, c2 = o2.fontSize;
27285
27285
  if (!Xp.available[u2])
27286
27286
  throw new Error('Missing BitmapFont "' + u2 + '"');
27287
- return r2._activePagesMeshData = [], r2._textWidth = 0, r2._textHeight = 0, r2._align = s2, r2._tint = a2, r2._fontName = u2, r2._fontSize = c2 || Xp.available[u2].size, r2.text = i2, r2._maxWidth = l2, r2._maxLineHeight = 0, r2._letterSpacing = h2, r2._anchor = new Nh.e(function() {
27287
+ return r2._activePagesMeshData = [], r2._textWidth = 0, r2._textHeight = 0, r2._align = s2, r2._tint = a2, r2._fontName = u2, r2._fontSize = c2 || Xp.available[u2].size, r2.text = i2, r2._maxWidth = l2, r2._maxLineHeight = 0, r2._letterSpacing = h2, r2._anchor = new Lh.e(function() {
27288
27288
  r2.dirty = true;
27289
27289
  }, r2, 0, 0), r2._roundPixels = xd.b.ROUND_PIXELS, r2.dirty = true, r2._resolution = xd.b.RESOLUTION, r2._autoResolution = true, r2._textureCache = {}, r2;
27290
27290
  }
@@ -27294,13 +27294,13 @@ var Slide = function(t) {
27294
27294
  }
27295
27295
  Fp(t3, e3), t3.prototype = null === e3 ? Object.create(e3) : (i2.prototype = e3.prototype, new i2());
27296
27296
  })(e2, t2), e2.prototype.updateText = function() {
27297
- for (var t3, e3 = Xp.available[this._fontName], i2 = this._fontSize / e3.size, n2 = new Nh.g(), r2 = [], o2 = [], s2 = [], a2 = Vp(this._text.replace(/(?:\r\n|\r)/g, "\n") || " "), l2 = this._maxWidth * e3.size / this._fontSize, h2 = "none" === e3.distanceFieldType ? Yp : qp, u2 = null, c2 = 0, d2 = 0, p2 = 0, f2 = -1, m2 = 0, g2 = 0, v2 = 0, _2 = 0, y2 = 0; y2 < a2.length; y2++) {
27297
+ for (var t3, e3 = Xp.available[this._fontName], i2 = this._fontSize / e3.size, n2 = new Lh.g(), r2 = [], o2 = [], s2 = [], a2 = Vp(this._text.replace(/(?:\r\n|\r)/g, "\n") || " "), l2 = this._maxWidth * e3.size / this._fontSize, h2 = "none" === e3.distanceFieldType ? Yp : qp, u2 = null, c2 = 0, d2 = 0, p2 = 0, f2 = -1, m2 = 0, g2 = 0, v2 = 0, _2 = 0, y2 = 0; y2 < a2.length; y2++) {
27298
27298
  var x2 = Wp(G2 = a2[y2]);
27299
27299
  if (/(?:\s)/.test(G2) && (f2 = y2, m2 = c2, _2++), "\r" !== G2 && "\n" !== G2) {
27300
27300
  var b2 = e3.chars[x2];
27301
27301
  if (b2) {
27302
27302
  u2 && b2.kerning[u2] && (n2.x += b2.kerning[u2]);
27303
- var T2 = Zp.pop() || { texture: Vh.t.EMPTY, line: 0, charCode: 0, prevSpaces: 0, position: new Nh.g() };
27303
+ var T2 = Zp.pop() || { texture: Vh.t.EMPTY, line: 0, charCode: 0, prevSpaces: 0, position: new Lh.g() };
27304
27304
  T2.texture = b2.texture, T2.line = p2, T2.charCode = x2, T2.position.x = n2.x + b2.xOffset + this._letterSpacing / 2, T2.position.y = n2.y + b2.yOffset, T2.prevSpaces = _2, r2.push(T2), c2 = T2.position.x + Math.max(b2.xAdvance, b2.texture.orig.width), n2.x += b2.xAdvance + this._letterSpacing, v2 = Math.max(v2, b2.yOffset + b2.texture.height), u2 = x2, -1 !== f2 && l2 > 0 && n2.x > l2 && (++g2, Object(Ph.removeItems)(r2, 1 + f2 - g2, 1 + y2 - f2), y2 = f2, f2 = -1, o2.push(m2), s2.push(r2.length > 0 ? r2[r2.length - 1].prevSpaces : 0), d2 = Math.max(d2, m2), p2++, n2.x = 0, n2.y += e3.lineHeight, u2 = null, _2 = 0);
27305
27305
  }
27306
27306
  } else
@@ -27320,10 +27320,10 @@ var Slide = function(t) {
27320
27320
  var I2 = (j2 = r2[y2].texture).baseTexture.uid;
27321
27321
  if (!M2[I2]) {
27322
27322
  if (!(Z2 = h2.pop())) {
27323
- var P2 = new Dp.b(), O2 = void 0, L2 = void 0;
27324
- "none" === e3.distanceFieldType ? (O2 = new Dp.c(Vh.t.EMPTY), L2 = Sc.b.NORMAL) : (O2 = new Dp.c(Vh.t.EMPTY, { program: Vh.n.from("// Mesh material default fragment\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTextureMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n", "// Pixi texture info\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\n\r\n// Tint\r\nuniform vec4 uColor;\r\n\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r\nuniform float uFWidth;\r\n\r\nvoid main(void) {\r\n\r\n // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r\n vec4 texColor = texture2D(uSampler, vTextureCoord);\r\n\r\n // MSDF\r\n float median = texColor.r + texColor.g + texColor.b -\r\n min(texColor.r, min(texColor.g, texColor.b)) -\r\n max(texColor.r, max(texColor.g, texColor.b));\r\n // SDF\r\n median = min(median, texColor.a);\r\n\r\n float screenPxDistance = uFWidth * (median - 0.5);\r\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n"), uniforms: { uFWidth: 0 } }), L2 = Sc.b.NORMAL_NPM);
27325
- var N2 = new Dp.a(P2, O2);
27326
- N2.blendMode = L2, Z2 = { index: 0, indexCount: 0, vertexCount: 0, uvsCount: 0, total: 0, mesh: N2, vertices: null, uvs: null, indices: null };
27323
+ var P2 = new Dp.b(), O2 = void 0, N2 = void 0;
27324
+ "none" === e3.distanceFieldType ? (O2 = new Dp.c(Vh.t.EMPTY), N2 = Sc.b.NORMAL) : (O2 = new Dp.c(Vh.t.EMPTY, { program: Vh.n.from("// Mesh material default fragment\r\nattribute vec2 aVertexPosition;\r\nattribute vec2 aTextureCoord;\r\n\r\nuniform mat3 projectionMatrix;\r\nuniform mat3 translationMatrix;\r\nuniform mat3 uTextureMatrix;\r\n\r\nvarying vec2 vTextureCoord;\r\n\r\nvoid main(void)\r\n{\r\n gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r\n\r\n vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r\n}\r\n", "// Pixi texture info\r\nvarying vec2 vTextureCoord;\r\nuniform sampler2D uSampler;\r\n\r\n// Tint\r\nuniform vec4 uColor;\r\n\r\n// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r\nuniform float uFWidth;\r\n\r\nvoid main(void) {\r\n\r\n // To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r\n vec4 texColor = texture2D(uSampler, vTextureCoord);\r\n\r\n // MSDF\r\n float median = texColor.r + texColor.g + texColor.b -\r\n min(texColor.r, min(texColor.g, texColor.b)) -\r\n max(texColor.r, max(texColor.g, texColor.b));\r\n // SDF\r\n median = min(median, texColor.a);\r\n\r\n float screenPxDistance = uFWidth * (median - 0.5);\r\n float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r\n\r\n // NPM Textures, NPM outputs\r\n gl_FragColor = vec4(uColor.rgb, uColor.a * alpha);\r\n\r\n}\r\n"), uniforms: { uFWidth: 0 } }), N2 = Sc.b.NORMAL_NPM);
27325
+ var L2 = new Dp.a(P2, O2);
27326
+ L2.blendMode = N2, Z2 = { index: 0, indexCount: 0, vertexCount: 0, uvsCount: 0, total: 0, mesh: L2, vertices: null, uvs: null, indices: null };
27327
27327
  }
27328
27328
  Z2.index = 0, Z2.indexCount = 0, Z2.vertexCount = 0, Z2.uvsCount = 0, Z2.total = 0;
27329
27329
  var D2 = this._textureCache;
@@ -27749,8 +27749,8 @@ var Slide = function(t) {
27749
27749
  };
27750
27750
  var Cf = function(t2) {
27751
27751
  function e2(e3, i2) {
27752
- var n2 = this, r2 = new Nh.d();
27753
- return e3.renderable = false, (n2 = t2.call(this, "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\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 vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n", "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n", { mapSampler: e3._texture, filterMatrix: r2, scale: { x: 1, y: 1 }, rotation: new Float32Array([1, 0, 0, 1]) }) || this).maskSprite = e3, n2.maskMatrix = r2, null == i2 && (i2 = 20), n2.scale = new Nh.g(i2, i2), n2;
27752
+ var n2 = this, r2 = new Lh.d();
27753
+ return e3.renderable = false, (n2 = t2.call(this, "attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\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 vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n", "varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n", { mapSampler: e3._texture, filterMatrix: r2, scale: { x: 1, y: 1 }, rotation: new Float32Array([1, 0, 0, 1]) }) || this).maskSprite = e3, n2.maskMatrix = r2, null == i2 && (i2 = 20), n2.scale = new Lh.g(i2, i2), n2;
27754
27754
  }
27755
27755
  return function(t3, e3) {
27756
27756
  function i2() {
@@ -27913,7 +27913,7 @@ void main() {
27913
27913
  e3.hasOwnProperty(i2) && (t3[i2] = e3[i2]);
27914
27914
  })(t2, e2);
27915
27915
  };
27916
- var Of, Lf, Nf, Df, Ff, Bf, Uf, kf, Gf, Hf, jf, zf, Vf, Wf, Xf, Yf, qf, Zf, Jf, Kf = function(t2) {
27916
+ var Of, Nf, Lf, Df, Ff, Bf, Uf, kf, Gf, Hf, jf, zf, Vf, Wf, Xf, Yf, qf, Zf, Jf, Kf = function(t2) {
27917
27917
  function e2(e3, i2) {
27918
27918
  void 0 === e3 && (e3 = 0.5), void 0 === i2 && (i2 = Math.random());
27919
27919
  var n2 = t2.call(this, Vh.z, "precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n", { uNoise: 0, uSeed: 0 }) || this;
@@ -27938,9 +27938,9 @@ void main() {
27938
27938
  t2[t2.WEBGL_LEGACY = 0] = "WEBGL_LEGACY", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.WEBGL2 = 2] = "WEBGL2";
27939
27939
  }(Of || (Of = {})), function(t2) {
27940
27940
  t2[t2.UNKNOWN = 0] = "UNKNOWN", t2[t2.WEBGL = 1] = "WEBGL", t2[t2.CANVAS = 2] = "CANVAS";
27941
- }(Lf || (Lf = {})), function(t2) {
27942
- t2[t2.COLOR = 16384] = "COLOR", t2[t2.DEPTH = 256] = "DEPTH", t2[t2.STENCIL = 1024] = "STENCIL";
27943
27941
  }(Nf || (Nf = {})), function(t2) {
27942
+ t2[t2.COLOR = 16384] = "COLOR", t2[t2.DEPTH = 256] = "DEPTH", t2[t2.STENCIL = 1024] = "STENCIL";
27943
+ }(Lf || (Lf = {})), function(t2) {
27944
27944
  t2[t2.NORMAL = 0] = "NORMAL", t2[t2.ADD = 1] = "ADD", t2[t2.MULTIPLY = 2] = "MULTIPLY", t2[t2.SCREEN = 3] = "SCREEN", t2[t2.OVERLAY = 4] = "OVERLAY", t2[t2.DARKEN = 5] = "DARKEN", t2[t2.LIGHTEN = 6] = "LIGHTEN", t2[t2.COLOR_DODGE = 7] = "COLOR_DODGE", t2[t2.COLOR_BURN = 8] = "COLOR_BURN", t2[t2.HARD_LIGHT = 9] = "HARD_LIGHT", t2[t2.SOFT_LIGHT = 10] = "SOFT_LIGHT", t2[t2.DIFFERENCE = 11] = "DIFFERENCE", t2[t2.EXCLUSION = 12] = "EXCLUSION", t2[t2.HUE = 13] = "HUE", t2[t2.SATURATION = 14] = "SATURATION", t2[t2.COLOR = 15] = "COLOR", t2[t2.LUMINOSITY = 16] = "LUMINOSITY", t2[t2.NORMAL_NPM = 17] = "NORMAL_NPM", t2[t2.ADD_NPM = 18] = "ADD_NPM", t2[t2.SCREEN_NPM = 19] = "SCREEN_NPM", t2[t2.NONE = 20] = "NONE", t2[t2.SRC_OVER = 0] = "SRC_OVER", t2[t2.SRC_IN = 21] = "SRC_IN", t2[t2.SRC_OUT = 22] = "SRC_OUT", t2[t2.SRC_ATOP = 23] = "SRC_ATOP", t2[t2.DST_OVER = 24] = "DST_OVER", t2[t2.DST_IN = 25] = "DST_IN", t2[t2.DST_OUT = 26] = "DST_OUT", t2[t2.DST_ATOP = 27] = "DST_ATOP", t2[t2.ERASE = 26] = "ERASE", t2[t2.SUBTRACT = 28] = "SUBTRACT", t2[t2.XOR = 29] = "XOR";
27945
27945
  }(Df || (Df = {})), function(t2) {
27946
27946
  t2[t2.POINTS = 0] = "POINTS", t2[t2.LINES = 1] = "LINES", t2[t2.LINE_LOOP = 2] = "LINE_LOOP", t2[t2.LINE_STRIP = 3] = "LINE_STRIP", t2[t2.TRIANGLES = 4] = "TRIANGLES", t2[t2.TRIANGLE_STRIP = 5] = "TRIANGLE_STRIP", t2[t2.TRIANGLE_FAN = 6] = "TRIANGLE_FAN";
@@ -27973,7 +27973,7 @@ void main() {
27973
27973
  }(Zf || (Zf = {})), function(t2) {
27974
27974
  t2[t2.ELEMENT_ARRAY_BUFFER = 34963] = "ELEMENT_ARRAY_BUFFER", t2[t2.ARRAY_BUFFER = 34962] = "ARRAY_BUFFER", t2[t2.UNIFORM_BUFFER = 35345] = "UNIFORM_BUFFER";
27975
27975
  }(Jf || (Jf = {}));
27976
- var Qf = new Nh.d();
27976
+ var Qf = new Lh.d();
27977
27977
  Oh.c.prototype._cacheAsBitmap = false, Oh.c.prototype._cacheData = null, Oh.c.prototype._cacheAsBitmapResolution = null, Oh.c.prototype._cacheAsBitmapMultisample = Zf.NONE;
27978
27978
  var $f = function() {
27979
27979
  this.textureCacheId = null, this.originalRender = null, this.originalRenderCanvas = null, this.originalCalculateBounds = null, this.originalGetLocalBounds = null, this.originalUpdateTransform = null, this.originalDestroy = null, this.originalMask = null, this.originalFilterArea = null, this.originalContainsPoint = null, this.sprite = null;
@@ -28048,7 +28048,7 @@ void main() {
28048
28048
  }
28049
28049
  return null;
28050
28050
  }, Oh.c.prototype.getGlobalPosition = function(t2, e2) {
28051
- return void 0 === t2 && (t2 = new Nh.g()), void 0 === e2 && (e2 = false), this.parent ? this.parent.toGlobal(this.position, t2, e2) : (t2.x = this.position.x, t2.y = this.position.y), t2;
28051
+ return void 0 === t2 && (t2 = new Lh.g()), void 0 === e2 && (e2 = false), this.parent ? this.parent.toGlobal(this.position, t2, e2) : (t2.x = this.position.x, t2.y = this.position.y), t2;
28052
28052
  };
28053
28053
  var tm = i(16), em = (i(12), function(t2, e2) {
28054
28054
  return (em = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(t3, e3) {
@@ -28139,7 +28139,7 @@ void main() {
28139
28139
  * pixi.js is licensed under the MIT License.
28140
28140
  * http://www.opensource.org/licenses/mit-license
28141
28141
  */
28142
- Vh.q.registerPlugin("accessibility", Lh), Vh.q.registerPlugin("extract", nc), Vh.q.registerPlugin("interaction", zh), Vh.q.registerPlugin("particle", yd), Vh.q.registerPlugin("prepare", wp), Vh.q.registerPlugin("batch", Vh.f), Vh.q.registerPlugin("tilingSprite", Np), yc.registerPlugin(Jp), yc.registerPlugin(Oc), yc.registerPlugin(Jc), yc.registerPlugin(dd), yc.registerPlugin(Mp), Wh.registerPlugin(Dh.b), Wh.registerPlugin(xc);
28142
+ Vh.q.registerPlugin("accessibility", Nh), Vh.q.registerPlugin("extract", nc), Vh.q.registerPlugin("interaction", zh), Vh.q.registerPlugin("particle", yd), Vh.q.registerPlugin("prepare", wp), Vh.q.registerPlugin("batch", Vh.f), Vh.q.registerPlugin("tilingSprite", Lp), yc.registerPlugin(Jp), yc.registerPlugin(Oc), yc.registerPlugin(Jc), yc.registerPlugin(dd), yc.registerPlugin(Mp), Wh.registerPlugin(Dh.b), Wh.registerPlugin(xc);
28143
28143
  var nm, rm = { AlphaFilter: Qp, BlurFilter: Sf, BlurFilterPass: Ef, ColorMatrixFilter: Af, DisplacementFilter: Cf, FXAAFilter: If, NoiseFilter: Kf }, om = i(11), sm = i(35), am = function() {
28144
28144
  function t2() {
28145
28145
  }
@@ -28170,11 +28170,11 @@ void main() {
28170
28170
  }, t2;
28171
28171
  }(), lm = function() {
28172
28172
  function t2(t3) {
28173
- this._svgMatrix = null, this._tempMatrix = new Nh.d(), this.renderer = t3;
28173
+ this._svgMatrix = null, this._tempMatrix = new Lh.d(), this.renderer = t3;
28174
28174
  }
28175
28175
  return t2.prototype._calcCanvasStyle = function(t3, e2) {
28176
28176
  var i2;
28177
- return t3.texture && t3.texture.baseTexture !== Vh.t.WHITE.baseTexture ? t3.texture.valid ? (i2 = om.b.getTintedPattern(t3.texture, e2), this.setPatternTransform(i2, t3.matrix || Nh.d.IDENTITY)) : i2 = "#808080" : i2 = "#" + ("00000" + (0 | e2).toString(16)).slice(-6), i2;
28177
+ return t3.texture && t3.texture.baseTexture !== Vh.t.WHITE.baseTexture ? t3.texture.valid ? (i2 = om.b.getTintedPattern(t3.texture, e2), this.setPatternTransform(i2, t3.matrix || Lh.d.IDENTITY)) : i2 = "#808080" : i2 = "#" + ("00000" + (0 | e2).toString(16)).slice(-6), i2;
28178
28178
  }, t2.prototype.render = function(t3) {
28179
28179
  var e2 = this.renderer, i2 = e2.context, n2 = t3.worldAlpha, r2 = t3.transform.worldTransform;
28180
28180
  e2.setContextTransform(r2), e2.setBlendMode(t3.blendMode);
@@ -28188,7 +28188,7 @@ void main() {
28188
28188
  var y2 = ((v2 >> 16 & 255) / 255 * l2 * 255 << 16) + ((v2 >> 8 & 255) / 255 * h2 * 255 << 8) + (255 & v2) / 255 * u2 * 255;
28189
28189
  s2 = this._calcCanvasStyle(m2, y2);
28190
28190
  }
28191
- if (i2.lineWidth = m2.width, i2.lineCap = m2.cap, i2.lineJoin = m2.join, i2.miterLimit = m2.miterLimit, d2.type === Nh.l.POLY) {
28191
+ if (i2.lineWidth = m2.width, i2.lineCap = m2.cap, i2.lineJoin = m2.join, i2.miterLimit = m2.miterLimit, d2.type === Lh.l.POLY) {
28192
28192
  i2.beginPath();
28193
28193
  var x2 = (R2 = p2).points, b2 = d2.holes, T2 = void 0, E2 = void 0, S2 = void 0, w2 = void 0, A2 = void 0;
28194
28194
  i2.moveTo(x2[0], x2[1]);
@@ -28216,13 +28216,13 @@ void main() {
28216
28216
  }
28217
28217
  }
28218
28218
  f2.visible && (i2.globalAlpha = f2.alpha * n2, i2.fillStyle = o2, i2.fill()), m2.visible && this.paintPolygonStroke(R2, m2, s2, b2, A2, n2, i2);
28219
- } else if (d2.type === Nh.l.RECT) {
28219
+ } else if (d2.type === Lh.l.RECT) {
28220
28220
  var R2 = p2;
28221
28221
  if (f2.visible && (i2.globalAlpha = f2.alpha * n2, i2.fillStyle = o2, i2.fillRect(R2.x, R2.y, R2.width, R2.height)), m2.visible) {
28222
28222
  var I2 = m2.width * (0.5 - (1 - m2.alignment)), P2 = R2.width + 2 * I2, O2 = R2.height + 2 * I2;
28223
28223
  i2.globalAlpha = m2.alpha * n2, i2.strokeStyle = s2, i2.strokeRect(R2.x - I2, R2.y - I2, P2, O2);
28224
28224
  }
28225
- } else if (d2.type === Nh.l.CIRC) {
28225
+ } else if (d2.type === Lh.l.CIRC) {
28226
28226
  R2 = p2;
28227
28227
  if (i2.beginPath(), i2.arc(R2.x, R2.y, R2.radius, 0, 2 * Math.PI), i2.closePath(), f2.visible && (i2.globalAlpha = f2.alpha * n2, i2.fillStyle = o2, i2.fill()), m2.visible) {
28228
28228
  if (0.5 !== m2.alignment) {
@@ -28231,18 +28231,18 @@ void main() {
28231
28231
  }
28232
28232
  i2.globalAlpha = m2.alpha * n2, i2.strokeStyle = s2, i2.stroke();
28233
28233
  }
28234
- } else if (d2.type === Nh.l.ELIP) {
28234
+ } else if (d2.type === Lh.l.ELIP) {
28235
28235
  R2 = p2;
28236
28236
  if ((z2 = 1 === m2.alignment) || this.paintEllipse(R2, f2, m2, o2, n2, i2), m2.visible) {
28237
28237
  if (0.5 !== m2.alignment) {
28238
28238
  I2 = m2.width * (0.5 - (1 - m2.alignment));
28239
- var L2 = 2 * (R2.width + I2), N2 = 2 * (R2.height + I2), D2 = R2.x - L2 / 2, F2 = R2.y - N2 / 2, B2 = L2 / 2 * 0.5522848, U2 = N2 / 2 * 0.5522848, k2 = D2 + L2, G2 = F2 + N2, H2 = D2 + L2 / 2, j2 = F2 + N2 / 2;
28239
+ var N2 = 2 * (R2.width + I2), L2 = 2 * (R2.height + I2), D2 = R2.x - N2 / 2, F2 = R2.y - L2 / 2, B2 = N2 / 2 * 0.5522848, U2 = L2 / 2 * 0.5522848, k2 = D2 + N2, G2 = F2 + L2, H2 = D2 + N2 / 2, j2 = F2 + L2 / 2;
28240
28240
  i2.beginPath(), i2.moveTo(D2, j2), i2.bezierCurveTo(D2, j2 - U2, H2 - B2, F2, H2, F2), i2.bezierCurveTo(H2 + B2, F2, k2, j2 - U2, k2, j2), i2.bezierCurveTo(k2, j2 + U2, H2 + B2, G2, H2, G2), i2.bezierCurveTo(H2 - B2, G2, D2, j2 + U2, D2, j2), i2.closePath();
28241
28241
  }
28242
28242
  i2.globalAlpha = m2.alpha * n2, i2.strokeStyle = s2, i2.stroke();
28243
28243
  }
28244
28244
  z2 && this.paintEllipse(R2, f2, m2, o2, n2, i2);
28245
- } else if (d2.type === Nh.l.RREC) {
28245
+ } else if (d2.type === Lh.l.RREC) {
28246
28246
  var z2;
28247
28247
  R2 = p2;
28248
28248
  if ((z2 = 1 === m2.alignment) || this.paintRoundedRectangle(R2, f2, m2, o2, n2, i2), m2.visible) {
@@ -28295,7 +28295,7 @@ void main() {
28295
28295
  }, t2.prototype.destroy = function() {
28296
28296
  this.renderer = null, this._svgMatrix = null, this._tempMatrix = null;
28297
28297
  }, t2;
28298
- }(), hm = new Nh.d();
28298
+ }(), hm = new Lh.d();
28299
28299
  Jd.prototype.generateCanvasTexture = function(t2, e2) {
28300
28300
  void 0 === e2 && (e2 = 1);
28301
28301
  var i2 = this.getLocalBounds(), n2 = Vh.p.create({ width: i2.width, height: i2.height, scaleMode: t2, resolution: e2 });
@@ -28312,7 +28312,7 @@ void main() {
28312
28312
  * @pixi/canvas-sprite is licensed under the MIT License.
28313
28313
  * http://www.opensource.org/licenses/mit-license
28314
28314
  */
28315
- var um = new Nh.d(), cm = function() {
28315
+ var um = new Lh.d(), cm = function() {
28316
28316
  function t2(t3) {
28317
28317
  this.renderer = t3;
28318
28318
  }
@@ -28323,7 +28323,7 @@ void main() {
28323
28323
  if (!(e2.orig.width <= 0 || e2.orig.height <= 0) && e2.valid && h2) {
28324
28324
  i2.setBlendMode(t3.blendMode, true), i2.context.globalAlpha = t3.worldAlpha;
28325
28325
  var u2 = e2.baseTexture.scaleMode === Sc.p.LINEAR;
28326
- i2.smoothProperty && i2.context[i2.smoothProperty] !== u2 && (n2[i2.smoothProperty] = u2), e2.trim ? (a2 = e2.trim.width / 2 + e2.trim.x - t3.anchor.x * e2.orig.width, l2 = e2.trim.height / 2 + e2.trim.y - t3.anchor.y * e2.orig.height) : (a2 = (0.5 - t3.anchor.x) * e2.orig.width, l2 = (0.5 - t3.anchor.y) * e2.orig.height), e2.rotate && (s2.copyTo(um), s2 = um, Nh.n.matrixAppendRotationInv(s2, e2.rotate, a2, l2), a2 = 0, l2 = 0), a2 -= r2 / 2, l2 -= o2 / 2, i2.setContextTransform(s2, t3.roundPixels, 1), t3.roundPixels && (a2 |= 0, l2 |= 0);
28326
+ i2.smoothProperty && i2.context[i2.smoothProperty] !== u2 && (n2[i2.smoothProperty] = u2), e2.trim ? (a2 = e2.trim.width / 2 + e2.trim.x - t3.anchor.x * e2.orig.width, l2 = e2.trim.height / 2 + e2.trim.y - t3.anchor.y * e2.orig.height) : (a2 = (0.5 - t3.anchor.x) * e2.orig.width, l2 = (0.5 - t3.anchor.y) * e2.orig.height), e2.rotate && (s2.copyTo(um), s2 = um, Lh.n.matrixAppendRotationInv(s2, e2.rotate, a2, l2), a2 = 0, l2 = 0), a2 -= r2 / 2, l2 -= o2 / 2, i2.setContextTransform(s2, t3.roundPixels, 1), t3.roundPixels && (a2 |= 0, l2 |= 0);
28327
28327
  var c2 = e2.baseTexture.resolution, d2 = i2._outerBlend;
28328
28328
  d2 && (n2.save(), n2.beginPath(), n2.rect(a2 * i2.resolution, l2 * i2.resolution, r2 * i2.resolution, o2 * i2.resolution), n2.clip()), 16777215 !== t3.tint ? (t3._cachedTint === t3.tint && t3._tintedCanvas.tintId === t3._texture._updateID || (t3._cachedTint = t3.tint, t3._tintedCanvas = om.b.getTintedCanvas(t3, t3.tint)), n2.drawImage(t3._tintedCanvas, 0, 0, Math.floor(r2 * c2), Math.floor(o2 * c2), Math.floor(a2 * i2.resolution), Math.floor(l2 * i2.resolution), Math.floor(r2 * i2.resolution), Math.floor(o2 * i2.resolution))) : n2.drawImage(h2, e2._frame.x * c2, e2._frame.y * c2, Math.floor(r2 * c2), Math.floor(o2 * c2), Math.floor(a2 * i2.resolution), Math.floor(l2 * i2.resolution), Math.floor(r2 * i2.resolution), Math.floor(o2 * i2.resolution)), d2 && n2.restore(), i2.setBlendMode(Sc.b.NORMAL);
28329
28329
  }
@@ -28342,7 +28342,7 @@ void main() {
28342
28342
  * @pixi/canvas-extract is licensed under the MIT License.
28343
28343
  * http://www.opensource.org/licenses/mit-license
28344
28344
  */
28345
- var dm = new Nh.j(), pm = function() {
28345
+ var dm = new Lh.j(), pm = function() {
28346
28346
  function t2(t3) {
28347
28347
  this.renderer = t3;
28348
28348
  }
@@ -28393,7 +28393,7 @@ void main() {
28393
28393
  }(e2, t2), e2.prototype.destroy = function() {
28394
28394
  t2.prototype.destroy.call(this), this.ctx = null, this.canvas = null;
28395
28395
  }, e2;
28396
- }(bp), _m = new Nh.d(), ym = new Nh.d(), xm = [new Nh.g(), new Nh.g(), new Nh.g(), new Nh.g()];
28396
+ }(bp), _m = new Lh.d(), ym = new Lh.d(), xm = [new Lh.g(), new Lh.g(), new Lh.g(), new Lh.g()];
28397
28397
  /*!
28398
28398
  * @pixi/canvas-sprite-tiling - v6.4.2
28399
28399
  * Compiled Thu, 02 Jun 2022 15:39:26 UTC
@@ -28453,7 +28453,7 @@ void main() {
28453
28453
  }, Oh.c.prototype.renderCanvas = function(t2) {
28454
28454
  }, cp.prototype._renderCanvas = function(t2) {
28455
28455
  this._autoResolution && this._resolution !== t2.resolution && (this._resolution = t2.resolution, this.dirty = true), this.updateText(true), ep.prototype._renderCanvas.call(this, t2);
28456
- }, om.a.registerPlugin("accessibility", Lh), om.a.registerPlugin("extract", pm), om.a.registerPlugin("graphics", lm), om.a.registerPlugin("interaction", zh), om.a.registerPlugin("mesh", sm.a), om.a.registerPlugin("prepare", vm), om.a.registerPlugin("sprite", cm);
28456
+ }, om.a.registerPlugin("accessibility", Nh), om.a.registerPlugin("extract", pm), om.a.registerPlugin("graphics", lm), om.a.registerPlugin("interaction", zh), om.a.registerPlugin("mesh", sm.a), om.a.registerPlugin("prepare", vm), om.a.registerPlugin("sprite", cm);
28457
28457
  class bm extends Za.a {
28458
28458
  constructor() {
28459
28459
  super(), this.prevTime = -1, this.times = 0, this.valueTotal = 0, this.destroyed = false, this.value = 0, this.calcFps();
@@ -28566,7 +28566,7 @@ void main() {
28566
28566
  l2((n2 = n2.apply(t2, e2 || [])).next());
28567
28567
  });
28568
28568
  };
28569
- function Lm(t2, e2) {
28569
+ function Nm(t2, e2) {
28570
28570
  return Om(this, void 0, void 0, function* () {
28571
28571
  const i2 = yield Im(() => fetch(t2), e2);
28572
28572
  if (i2 === Cm)
@@ -28576,7 +28576,7 @@ void main() {
28576
28576
  return i2;
28577
28577
  });
28578
28578
  }
28579
- class Nm {
28579
+ class Lm {
28580
28580
  constructor(t2, e2, i2, n2, r2, o2, s2) {
28581
28581
  this.timeout = 15e3, this.useCache = false, this.taskId = "", this.delegate = null, this.urlInterrupter = null, this.useCache = e2, this.localStorage = t2, this.logger = i2, this.tracker = n2, this.timeout = r2, this.delegate = o2 || null, this.urlInterrupter = s2 || null;
28582
28582
  }
@@ -28612,7 +28612,7 @@ void main() {
28612
28612
  this.logger.info("load resource from server. " + n2, this.taskId || "");
28613
28613
  const r3 = Date.now();
28614
28614
  try {
28615
- t3 = yield (yield Lm("" + i2, this.timeout)).json();
28615
+ t3 = yield (yield Nm("" + i2, this.timeout)).json();
28616
28616
  } catch (t4) {
28617
28617
  throw this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - e2, url: i2, type: "json", channel: "fetch" } }), t4;
28618
28618
  }
@@ -28654,7 +28654,7 @@ void main() {
28654
28654
  else
28655
28655
  try {
28656
28656
  this.logger.info("load resource from server. " + r2, this.taskId || "");
28657
- const e3 = Date.now(), o3 = yield Lm(n2, this.timeout);
28657
+ const e3 = Date.now(), o3 = yield Nm(n2, this.timeout);
28658
28658
  this.logger.info(`load resource from server end. ${r2}, time: ${Date.now() - e3}`, this.taskId || ""), t3 = yield o3.blob(), this.tracker({ name: "slideResourceLoad", result: "success", reason: "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } });
28659
28659
  } catch (t4) {
28660
28660
  this.tracker({ name: "slideResourceLoad", result: "fail", reason: t4 + "", payload: { duration: Date.now() - i2, url: n2, type: "image", channel: "fetch" } });
@@ -28944,7 +28944,7 @@ void main() {
28944
28944
  }), t4.pathElement.setAttribute("d", e5), l2.appendChild(t4.pathElement);
28945
28945
  });
28946
28946
  const u3 = e4.width - 4 - 2 * e4.padding, c3 = e4.height - 4 - 2 * e4.padding;
28947
- this.textures[e4.hash] = { texture: new Vh.t(a2, new Nh.j((o3 + 2) * n2, (s3 + 2) * n2, u3 * n2, c3 * n2)), pivot: e4.pivot, scale: 1 / n2 }, h2[e4.hash] = this.hashToIdMap[e4.hash];
28947
+ this.textures[e4.hash] = { texture: new Vh.t(a2, new Lh.j((o3 + 2) * n2, (s3 + 2) * n2, u3 * n2, c3 * n2)), pivot: e4.pivot, scale: 1 / n2 }, h2[e4.hash] = this.hashToIdMap[e4.hash];
28948
28948
  });
28949
28949
  const u2 = (c2 = '<?xml version="1.0" encoding="utf-8"?>' + l2.outerHTML, "data:image/svg+xml," + encodeURIComponent(c2).replace(/'/g, "%27").replace(/"/g, "%22"));
28950
28950
  var c2;
@@ -29172,7 +29172,7 @@ void main() {
29172
29172
  this.actions.push([t2, e2]), "click" === e2 ? (this.object.addListener("pointertap", () => this.handleAction(t2)), this.object.cursor = "pointer") : "hover" === e2 && this.object.addListener("mouseover", () => this.handleAction(t2));
29173
29173
  }
29174
29174
  getOriginHitArea() {
29175
- return this.object.hitArea ? this.object.hitArea : new Nh.k(0, 0, this.object.width, this.object.height);
29175
+ return this.object.hitArea ? this.object.hitArea : new Lh.k(0, 0, this.object.width, this.object.height);
29176
29176
  }
29177
29177
  handleAction(t2) {
29178
29178
  this.ctx.eventHub.emit(Xy.hyperlinkTrigger, t2), this.execAction(t2);
@@ -29236,7 +29236,7 @@ void main() {
29236
29236
  class lg {
29237
29237
  constructor(t2, e2, i2) {
29238
29238
  var n2, r2, o2, s2, a2, l2;
29239
- this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new Nh.j(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new Oh.b(), this.ctx = e2, this.option = i2, this.style = new ng(this.container, !!t2.hardHidden, t2.rotation || 0), this.designGlobalPosition = { x: i2.parentGlobalPos.x + (null !== (r2 = null === (n2 = t2.position) || void 0 === n2 ? void 0 : n2.x) && void 0 !== r2 ? r2 : 0), y: i2.parentGlobalPos.y + (null !== (s2 = null === (o2 = t2.position) || void 0 === o2 ? void 0 : o2.y) && void 0 !== s2 ? s2 : 0) }, (t2.hlinkClick || t2.hlinkHover) && (this.hyperlink = new rg(this.container, this.ctx), t2.hlinkHover && (null === (a2 = this.hyperlink) || void 0 === a2 || a2.addAction(t2.hlinkHover, "hover")), t2.hlinkClick && (null === (l2 = this.hyperlink) || void 0 === l2 || l2.addAction(t2.hlinkClick, "click"))), this.ctx.clock.waitUntil(() => {
29239
+ this.scaleExt = { x: 1, y: 1 }, this.scaleOrigin = { x: 1, y: 1 }, this.designScale = { x: 1, y: 1 }, this.bound = new Lh.j(0, 0, 1, 1), this.pptX = 0, this.pptY = 0, this.presetSubType = 0, this.designWidth = 0, this.designHeight = 0, this.designX = 0, this.designY = 0, this.hasPreset = false, this.container = new Oh.b(), this.ctx = e2, this.option = i2, this.style = new ng(this.container, !!t2.hardHidden, t2.rotation || 0), this.designGlobalPosition = { x: i2.parentGlobalPos.x + (null !== (r2 = null === (n2 = t2.position) || void 0 === n2 ? void 0 : n2.x) && void 0 !== r2 ? r2 : 0), y: i2.parentGlobalPos.y + (null !== (s2 = null === (o2 = t2.position) || void 0 === o2 ? void 0 : o2.y) && void 0 !== s2 ? s2 : 0) }, (t2.hlinkClick || t2.hlinkHover) && (this.hyperlink = new rg(this.container, this.ctx), t2.hlinkHover && (null === (a2 = this.hyperlink) || void 0 === a2 || a2.addAction(t2.hlinkHover, "hover")), t2.hlinkClick && (null === (l2 = this.hyperlink) || void 0 === l2 || l2.addAction(t2.hlinkClick, "click"))), this.ctx.clock.waitUntil(() => {
29240
29240
  try {
29241
29241
  return !!this.container.width;
29242
29242
  } catch (t3) {
@@ -29551,7 +29551,7 @@ void main() {
29551
29551
  function Rg(t2) {
29552
29552
  return new Float64Array(t2);
29553
29553
  }
29554
- const Ig = Rg(4), Pg = Rg(8), Og = Rg(12), Lg = Rg(16), Ng = Rg(4);
29554
+ const Ig = Rg(4), Pg = Rg(8), Og = Rg(12), Ng = Rg(16), Lg = Rg(4);
29555
29555
  function Dg(t2, e2, i2, n2, r2, o2) {
29556
29556
  const s2 = (e2 - o2) * (i2 - r2), a2 = (t2 - r2) * (n2 - o2), l2 = s2 - a2;
29557
29557
  if (0 === s2 || 0 === a2 || s2 > 0 != a2 > 0)
@@ -29568,13 +29568,13 @@ void main() {
29568
29568
  return R2;
29569
29569
  if (I2 = 11093356479670487e-47 * s3 + 33306690738754706e-32 * Math.abs(R2), R2 += w2 * u2 + C2 * a3 - (M2 * h3 + A2 * l3), R2 >= I2 || -R2 >= I2)
29570
29570
  return R2;
29571
- x2 = a3 * C2, d2 = Ag * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = Ag * C2, m2 = d2 - (d2 - C2), g2 = C2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * A2, d2 = Ag * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = Ag * A2, m2 = d2 - (d2 - A2), g2 = A2 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Ng[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Ng[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Ng[2] = _2 - (S2 - c2) + (v2 - c2), Ng[3] = S2;
29572
- const P2 = Mg(4, Ig, 4, Ng, Pg);
29573
- x2 = w2 * u2, d2 = Ag * w2, p2 = d2 - (d2 - w2), f2 = w2 - p2, d2 = Ag * u2, m2 = d2 - (d2 - u2), g2 = u2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = M2 * h3, d2 = Ag * M2, p2 = d2 - (d2 - M2), f2 = M2 - p2, d2 = Ag * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Ng[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Ng[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Ng[2] = _2 - (S2 - c2) + (v2 - c2), Ng[3] = S2;
29574
- const O2 = Mg(P2, Pg, 4, Ng, Og);
29575
- x2 = a3 * u2, d2 = Ag * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = Ag * u2, m2 = d2 - (d2 - u2), g2 = u2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * h3, d2 = Ag * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = Ag * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Ng[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Ng[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Ng[2] = _2 - (S2 - c2) + (v2 - c2), Ng[3] = S2;
29576
- const L2 = Mg(O2, Og, 4, Ng, Lg);
29577
- return Lg[L2 - 1];
29571
+ x2 = a3 * C2, d2 = Ag * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = Ag * C2, m2 = d2 - (d2 - C2), g2 = C2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * A2, d2 = Ag * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = Ag * A2, m2 = d2 - (d2 - A2), g2 = A2 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Lg[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Lg[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Lg[2] = _2 - (S2 - c2) + (v2 - c2), Lg[3] = S2;
29572
+ const P2 = Mg(4, Ig, 4, Lg, Pg);
29573
+ x2 = w2 * u2, d2 = Ag * w2, p2 = d2 - (d2 - w2), f2 = w2 - p2, d2 = Ag * u2, m2 = d2 - (d2 - u2), g2 = u2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = M2 * h3, d2 = Ag * M2, p2 = d2 - (d2 - M2), f2 = M2 - p2, d2 = Ag * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Lg[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Lg[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Lg[2] = _2 - (S2 - c2) + (v2 - c2), Lg[3] = S2;
29574
+ const O2 = Mg(P2, Pg, 4, Lg, Og);
29575
+ x2 = a3 * u2, d2 = Ag * a3, p2 = d2 - (d2 - a3), f2 = a3 - p2, d2 = Ag * u2, m2 = d2 - (d2 - u2), g2 = u2 - m2, b2 = f2 * g2 - (x2 - p2 * m2 - f2 * m2 - p2 * g2), T2 = l3 * h3, d2 = Ag * l3, p2 = d2 - (d2 - l3), f2 = l3 - p2, d2 = Ag * h3, m2 = d2 - (d2 - h3), g2 = h3 - m2, E2 = f2 * g2 - (T2 - p2 * m2 - f2 * m2 - p2 * g2), v2 = b2 - E2, c2 = b2 - v2, Lg[0] = b2 - (v2 + c2) + (c2 - E2), _2 = x2 + v2, c2 = _2 - x2, y2 = x2 - (_2 - c2) + (v2 - c2), v2 = y2 - T2, c2 = y2 - v2, Lg[1] = y2 - (v2 + c2) + (c2 - T2), S2 = _2 + v2, c2 = S2 - _2, Lg[2] = _2 - (S2 - c2) + (v2 - c2), Lg[3] = S2;
29576
+ const N2 = Mg(O2, Og, 4, Lg, Ng);
29577
+ return Ng[N2 - 1];
29578
29578
  }(t2, e2, i2, n2, r2, o2, h2);
29579
29579
  }
29580
29580
  const Fg = Math.pow(2, -52), Bg = new Uint32Array(512);
@@ -29801,17 +29801,19 @@ void main() {
29801
29801
  }
29802
29802
  return e3;
29803
29803
  };
29804
- if (t2.stopList = o2(t2.stopList), t2.stopList = o2(t2.stopList), n2 = t2.line ? Yg(t2, e2, i2) : t2.path ? function(t3, e3, i3) {
29804
+ for (let e3 = 0; e3 < 2; e3++)
29805
+ t2.stopList = o2(t2.stopList);
29806
+ if (n2 = t2.line ? Yg(t2, e2, i2) : t2.path ? function(t3, e3, i3) {
29805
29807
  var n3, r3, o3;
29806
29808
  const s2 = [], a2 = { x: 0, y: 0 };
29807
29809
  if ("circle" === (null === (n3 = t3.path) || void 0 === n3 ? void 0 : n3.path) || "rect" === (null === (r3 = t3.path) || void 0 === r3 ? void 0 : r3.path) || "shape" === (null === (o3 = t3.path) || void 0 === o3 ? void 0 : o3.path)) {
29808
- const n4 = e3 / 2, r4 = i3 / 2, o4 = Math.sqrt(n4 * n4 + r4 * r4);
29810
+ const n4 = e3 / 2, r4 = i3 / 2;
29809
29811
  t3.stopList.forEach((t4) => {
29810
29812
  if (0 === t4.pos)
29811
29813
  s2.push({ point: { x: 0, y: 0 }, color: t4.color });
29812
29814
  else {
29813
- const e4 = o4 * t4.pos, i4 = new zs();
29814
- i4.absellipse(0, 0, e4, e4, 0, 2 * Math.PI, false, 0), i4.getPoints(50).forEach((e5) => {
29815
+ const e4 = new zs();
29816
+ e4.absellipse(0, 0, n4 * t4.pos, r4 * t4.pos, 0, 2 * Math.PI, false, 0), e4.getPoints(40).forEach((e5) => {
29815
29817
  s2.push({ point: { x: e5.x, y: e5.y }, color: t4.color });
29816
29818
  });
29817
29819
  }
@@ -30071,11 +30073,11 @@ void main(void){
30071
30073
  }
30072
30074
  filterAreaJustify(t2) {
30073
30075
  const e2 = Math.ceil(this.json.rad), i2 = Math.ceil(t2.width + 2 * e2), n2 = Math.ceil(t2.height + 2 * e2);
30074
- return new Nh.j(t2.x - e2, t2.y - e2, i2, n2);
30076
+ return new Lh.j(t2.x - e2, t2.y - e2, i2, n2);
30075
30077
  }
30076
30078
  sdfBox(t2, e2) {
30077
30079
  const i2 = Math.ceil(this.json.rad), n2 = Math.ceil(t2 + 2 * i2), r2 = Math.ceil(e2 + 2 * i2);
30078
- return new Nh.j(i2, i2, n2, r2);
30080
+ return new Lh.j(i2, i2, n2, r2);
30079
30081
  }
30080
30082
  }
30081
30083
  var mv = i(19), gv = i.n(mv), vv = i(115), _v = i.n(vv);
@@ -30087,7 +30089,7 @@ void main(void){
30087
30089
  return t2;
30088
30090
  }
30089
30091
  sdfBox(t2, e2) {
30090
- return new Nh.j(0, 0, t2, e2);
30092
+ return new Lh.j(0, 0, t2, e2);
30091
30093
  }
30092
30094
  }
30093
30095
  class xv {
@@ -30105,7 +30107,7 @@ void main(void){
30105
30107
  updateFrame(t2) {
30106
30108
  const e2 = this.frameTextures[t2];
30107
30109
  if (e2) {
30108
- const t3 = this.effectContainer.getBounds(), i2 = (this.effectContainer.width - e2.width) / 2, n2 = (this.effectContainer.height - e2.height) / 2, r2 = new Nh.g(t3.x, t3.y), o2 = new Nh.g(t3.x, t3.y);
30110
+ const t3 = this.effectContainer.getBounds(), i2 = (this.effectContainer.width - e2.width) / 2, n2 = (this.effectContainer.height - e2.height) / 2, r2 = new Lh.g(t3.x, t3.y), o2 = new Lh.g(t3.x, t3.y);
30109
30111
  switch (this.json.align) {
30110
30112
  case "tl":
30111
30113
  o2.x = t3.x, o2.y = t3.y;
@@ -30136,7 +30138,7 @@ void main(void){
30136
30138
  }
30137
30139
  const s2 = this.effectContainer.toLocal(o2);
30138
30140
  this.outputSprite.pivot.x = s2.x, this.outputSprite.pivot.y = s2.y;
30139
- const a2 = new Nh.g(this.json.dist, 0), l2 = new Nh.d();
30141
+ const a2 = new Lh.g(this.json.dist, 0), l2 = new Lh.d();
30140
30142
  l2.rotate(this.json.dir), l2.translate(r2.x + i2, r2.y + n2), l2.apply({ x: a2.x, y: a2.y }, a2);
30141
30143
  const h2 = this.effectContainer.toLocal(a2);
30142
30144
  this.outputSprite.position.x = h2.x, this.outputSprite.position.y = h2.y, this.outputSprite.texture = e2;
@@ -30168,7 +30170,7 @@ void main(void){
30168
30170
  this.frameTextures[e2] = t2;
30169
30171
  }
30170
30172
  setFrameOffset(t2, e2) {
30171
- const i2 = this.effectContainer.getBounds(), n2 = new Nh.g(i2.x + i2.width / 2, i2.y + i2.height / 2), r2 = new Nh.g(n2.x, n2.y + i2.height + this.json.dist), o2 = this.effectContainer.toLocal(r2);
30173
+ const i2 = this.effectContainer.getBounds(), n2 = new Lh.g(i2.x + i2.width / 2, i2.y + i2.height / 2), r2 = new Lh.g(n2.x, n2.y + i2.height + this.json.dist), o2 = this.effectContainer.toLocal(r2);
30172
30174
  this.outputSprite.position.x = o2.x + t2, this.outputSprite.position.y = o2.y + e2;
30173
30175
  }
30174
30176
  }
@@ -30209,7 +30211,7 @@ void main(void){
30209
30211
  l2((n2 = n2.apply(t2, e2 || [])).next());
30210
30212
  });
30211
30213
  };
30212
- class Lv extends Za.a {
30214
+ class Nv extends Za.a {
30213
30215
  get container() {
30214
30216
  return this._targetContainer;
30215
30217
  }
@@ -30236,12 +30238,12 @@ void main(void){
30236
30238
  for (const t3 of this.attachs)
30237
30239
  this._targetContainer.addChild(t3.outputSprite);
30238
30240
  this.sourceSprite.name = "source-sprite";
30239
- const s2 = new Nh.j(0, 0, this.originWidth, this.originHeight), a2 = this.effects.map((t3) => t3.filterAreaJustify(s2)), l2 = a2.map((t3) => t3.x), h2 = a2.map((t3) => t3.y), u2 = a2.map((t3) => t3.width), c2 = a2.map((t3) => t3.height);
30240
- this.filterArea = new Nh.j(Math.min(...l2, 0), Math.min(...h2, 0), Math.max(...u2, this.originWidth), Math.max(...c2, this.originHeight)), this.sourceSprite.filters = this.effects, this.sourceSprite.filterArea = new Nh.j(0, 0, this.filterArea.width, this.filterArea.height), this._targetSprite = new ep(), this._targetSprite.name = "effect-sprite", this._targetContainer.sortableChildren = true, this._targetSprite.zIndex = 999, this._targetContainer.addChild(this._targetSprite);
30241
+ const s2 = new Lh.j(0, 0, this.originWidth, this.originHeight), a2 = this.effects.map((t3) => t3.filterAreaJustify(s2)), l2 = a2.map((t3) => t3.x), h2 = a2.map((t3) => t3.y), u2 = a2.map((t3) => t3.width), c2 = a2.map((t3) => t3.height);
30242
+ this.filterArea = new Lh.j(Math.min(...l2, 0), Math.min(...h2, 0), Math.max(...u2, this.originWidth), Math.max(...c2, this.originHeight)), this.sourceSprite.filters = this.effects, this.sourceSprite.filterArea = new Lh.j(0, 0, this.filterArea.width, this.filterArea.height), this._targetSprite = new ep(), this._targetSprite.name = "effect-sprite", this._targetContainer.sortableChildren = true, this._targetSprite.zIndex = 999, this._targetContainer.addChild(this._targetSprite);
30241
30243
  }
30242
30244
  getSdfTexture(t2, e2) {
30243
30245
  return Ov(this, void 0, void 0, function* () {
30244
- const i2 = `${this.cacheKey}_${t2}`, n2 = this.effects.map((t3) => ({ sdfRect: t3.sdfBox(e2.width, e2.height) })).reduce((t3, e3) => e3.sdfRect ? (t3.width < e3.sdfRect.width && (t3.width = e3.sdfRect.width), t3.height < e3.sdfRect.height && (t3.height = e3.sdfRect.height), t3) : t3, new Nh.j(0, 0));
30246
+ const i2 = `${this.cacheKey}_${t2}`, n2 = this.effects.map((t3) => ({ sdfRect: t3.sdfBox(e2.width, e2.height) })).reduce((t3, e3) => e3.sdfRect ? (t3.width < e3.sdfRect.width && (t3.width = e3.sdfRect.width), t3.height < e3.sdfRect.height && (t3.height = e3.sdfRect.height), t3) : t3, new Lh.j(0, 0));
30245
30247
  return 0 === n2.width || 0 === n2.height ? null : this.ctx.sdfManager.getSdf(e2, n2, i2);
30246
30248
  });
30247
30249
  }
@@ -30284,7 +30286,7 @@ void main(void){
30284
30286
  });
30285
30287
  }
30286
30288
  }
30287
- var Nv = function(t2, e2, i2, n2) {
30289
+ var Lv = function(t2, e2, i2, n2) {
30288
30290
  return new (i2 || (i2 = Promise))(function(r2, o2) {
30289
30291
  function s2(t3) {
30290
30292
  try {
@@ -30339,7 +30341,7 @@ void main(void){
30339
30341
  let o2 = 0, s2 = 0;
30340
30342
  for (const t3 of this.effectContainer.children)
30341
30343
  t3.pivot.x > o2 && (o2 = t3.pivot.x), t3.pivot.y > s2 && (s2 = t3.pivot.y);
30342
- const a2 = new Nh.d();
30344
+ const a2 = new Lh.d();
30343
30345
  a2.translate(o2, s2);
30344
30346
  const l2 = Vh.p.create({ width: i2 ? r2.width : n2, height: i2 ? Math.max(e2, t2) : r2.height, resolution: 2 });
30345
30347
  return this.ctx.renderer.render(this.effectContainer, { renderTexture: l2, transform: a2 }), { texture: l2, offsetX: o2, offsetY: s2 };
@@ -30382,13 +30384,13 @@ void main(void){
30382
30384
  null === (t2 = this.underline) || void 0 === t2 || t2.preRender();
30383
30385
  }
30384
30386
  render(t2) {
30385
- t2.addSubMTask(() => Nv(this, void 0, void 0, function* () {
30387
+ t2.addSubMTask(() => Lv(this, void 0, void 0, function* () {
30386
30388
  this.doRender();
30387
- }), "@TextUnitImpl[doRender]"), t2.addSubMTask(() => Nv(this, void 0, void 0, function* () {
30389
+ }), "@TextUnitImpl[doRender]"), t2.addSubMTask(() => Lv(this, void 0, void 0, function* () {
30388
30390
  var t3;
30389
30391
  if (this.effectList && this.effectList.length > 0) {
30390
30392
  const e2 = `${this.ctx.taskId}_${this.ctx.slideIndex}_${null === (t3 = this.json.fill) || void 0 === t3 ? void 0 : t3.key}_${this.json.effectIndexList}`;
30391
- this.effectObject = new Lv(this.effectContainer, this.effectList, e2, this.ctx, 0, new Nh.g(1, 1)), this.effectObject.on("ready", () => {
30393
+ this.effectObject = new Nv(this.effectContainer, this.effectList, e2, this.ctx, 0, new Lh.g(1, 1)), this.effectObject.on("ready", () => {
30392
30394
  var t4;
30393
30395
  this.effectContainer.visible = false, this.effectObject.container.zIndex = 10, this.container.addChild(this.effectObject.container), null === (t4 = this.effectObject) || void 0 === t4 || t4.updateFrame(1);
30394
30396
  });
@@ -30636,9 +30638,9 @@ void main(void){
30636
30638
  return l3;
30637
30639
  }(s2, a2, l2, h2, u2, c2);
30638
30640
  r2 *= Math.min(1, d2 / 9525 / n2);
30639
- const p2 = new Nh.d();
30641
+ const p2 = new Lh.d();
30640
30642
  p2.translate(r2 + e2 / 2, 0), p2.rotate(2 * Math.PI - u2);
30641
- const f2 = new Nh.g(0, 0), m2 = p2.apply(f2);
30643
+ const f2 = new Lh.g(0, 0), m2 = p2.apply(f2);
30642
30644
  m2.x += e2 / 2, m2.y = i2 / 2 - m2.y;
30643
30645
  const g2 = l2 + 9525 * r2, v2 = h2 + 9525 * r2;
30644
30646
  return `M ${9525 * m2.x},${9525 * m2.y} A ${g2},${v2},${u2},${c2}`;
@@ -30737,7 +30739,7 @@ void main(void){
30737
30739
  if (this.json.presetTextShape) {
30738
30740
  const t3 = this.json.paragraphs.map((t4) => t4.x).reduce((t4, e3) => Math.min(t4, e3)), e2 = this.json.paragraphs[0].y, i2 = this.textContainer.getBounds(), n2 = this.json.paragraphs.map((t4) => t4.lines.map((t5) => t5.width).sort((t5, e3) => t5 - e3)[0]).sort((t4, e3) => t4 - e3)[0], { width: r2, height: o2 } = i2, { geometry: s2, type: a2 } = this.json.presetTextShape;
30739
30741
  if (s2.paths) {
30740
- const i3 = Vh.p.create({ width: n2, height: o2, resolution: this.ctx.renderer.resolution }), l2 = new Nh.d();
30742
+ const i3 = Vh.p.create({ width: n2, height: o2, resolution: this.ctx.renderer.resolution }), l2 = new Lh.d();
30741
30743
  l2.translate(-t3, -e2), this.ctx.renderer.render(this.textContainer, { renderTexture: i3, transform: l2 });
30742
30744
  const h2 = void 0 !== this.json.isHorz && !this.json.isHorz;
30743
30745
  if (["textCircle", "textArchUp", "textArchDown"].indexOf(this.json.presetTextShape.type) >= 0) {
@@ -30896,6 +30898,8 @@ void main(void){
30896
30898
  if (e3.x !== i3.x && e3.y !== i3.y)
30897
30899
  return false;
30898
30900
  }
30901
+ if (i2.join("").includes("CM"))
30902
+ return false;
30899
30903
  const r2 = n2.slice(0, 4).reduce((t3, e3) => t3 + e3.x, 0) / 4, o2 = n2.slice(0, 4).reduce((t3, e3) => t3 + e3.y, 0) / 4;
30900
30904
  if (Number.isNaN(r2) || Number.isNaN(o2))
30901
30905
  return false;
@@ -31005,7 +31009,7 @@ void main(void){
31005
31009
  } catch (t3) {
31006
31010
  this.ctx.logger.error(t3.message, this.ctx.taskId);
31007
31011
  }
31008
- if (this.ctx.timingTargets.addTarget(this.id, this), "solidFill" === (null == d2 ? void 0 : d2.fillType) && (this.fillColorFilter.currentColor = d2.color, this.fillColorFilter.designColor = d2.color), "solidFill" === (null === (c2 = null == p2 ? void 0 : p2.fill) || void 0 === c2 ? void 0 : c2.fillType) && (this.strokeColorFilter.currentColor = p2.fill.color, this.strokeColorFilter.designColor = p2.fill.color), this.updateTransform(this.json), t2.textBody && (this.text = new Yv(t2.textBody, this.ctx, t2.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y }, this.json.rotation || 0)), this.container.hitArea = new Nh.k(1, 1, this.json.width, this.json.height), this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
31012
+ if (this.ctx.timingTargets.addTarget(this.id, this), "solidFill" === (null == d2 ? void 0 : d2.fillType) && (this.fillColorFilter.currentColor = d2.color, this.fillColorFilter.designColor = d2.color), "solidFill" === (null === (c2 = null == p2 ? void 0 : p2.fill) || void 0 === c2 ? void 0 : c2.fillType) && (this.strokeColorFilter.currentColor = p2.fill.color, this.strokeColorFilter.designColor = p2.fill.color), this.updateTransform(this.json), t2.textBody && (this.text = new Yv(t2.textBody, this.ctx, t2.textBody.iterateType, { x: this.designGlobalPosition.x, y: this.designGlobalPosition.y }, this.json.rotation || 0)), this.container.hitArea = new Lh.k(1, 1, this.json.width, this.json.height), this.ctx.slideScopeEventHub.once("slide-render", (t3) => {
31009
31013
  if (this.ctx.slideIndex === t3 && this.effectObject) {
31010
31014
  const t4 = this.getEffectTexture();
31011
31015
  if (t4) {
@@ -31075,7 +31079,7 @@ void main(void){
31075
31079
  let e2 = 0, i2 = 0;
31076
31080
  for (const t3 of this.effectContainer.children)
31077
31081
  t3.pivot.x > e2 && (e2 = t3.pivot.x), t3.pivot.y > i2 && (i2 = t3.pivot.y);
31078
- const n2 = new Nh.d();
31082
+ const n2 = new Lh.d();
31079
31083
  if (n2.translate(e2, i2), 0 === this.effectContainer.children.length)
31080
31084
  return null;
31081
31085
  const r2 = Vh.p.create({ width: t2.width, height: t2.height, resolution: Math.min(this.ctx.renderer.resolution, window.devicePixelRatio || 2, 2) });
@@ -31196,7 +31200,7 @@ void main(void){
31196
31200
  const t4 = null !== (d2 = null === (c2 = this.json.effectList) || void 0 === c2 ? void 0 : c2.findIndex((t5) => "innerShadow" === t5.type)) && void 0 !== d2 ? d2 : -1;
31197
31201
  t4 >= 0 && (null === (p2 = this.json.effectList) || void 0 === p2 || p2.splice(t4, 1));
31198
31202
  }
31199
- if (this.json.effectList && this.json.effectList.length > 0 && (null === (f2 = this.ctx.featureList) || void 0 === f2 ? void 0 : f2.effect) && !this.ctx.forceCanvas && !this.json.media && (this.effectObject = new Lv(this.effectContainer, this.json.effectList, `${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`, this.ctx, this.json.rotation || 0, new Nh.g((null === (m2 = this.json.scale) || void 0 === m2 ? void 0 : m2.x) || 1, (null === (g2 = this.json.scale) || void 0 === g2 ? void 0 : g2.y) || 1)), function(t4) {
31203
+ if (this.json.effectList && this.json.effectList.length > 0 && (null === (f2 = this.ctx.featureList) || void 0 === f2 ? void 0 : f2.effect) && !this.ctx.forceCanvas && !this.json.media && (this.effectObject = new Nv(this.effectContainer, this.json.effectList, `${this.ctx.taskId}_${this.ctx.slideIndex}_${this.json.id}`, this.ctx, this.json.rotation || 0, new Lh.g((null === (m2 = this.json.scale) || void 0 === m2 ? void 0 : m2.x) || 1, (null === (g2 = this.json.scale) || void 0 === g2 ? void 0 : g2.y) || 1)), function(t4) {
31200
31204
  var e3, i3, n3;
31201
31205
  return "gifFill" === (null === (e3 = t4.fillStyle) || void 0 === e3 ? void 0 : e3.fillType) || ("gifFill" === (null === (n3 = null === (i3 = t4.lineStyle) || void 0 === i3 ? void 0 : i3.fill) || void 0 === n3 ? void 0 : n3.fillType) || !!t4.picFill && "gifFill" === t4.picFill.fillType);
31202
31206
  }(this.json) && this.effectObject.setFrameCount(-1), this.effectObject.on("ready", () => {
@@ -32353,7 +32357,7 @@ void main(void){
32353
32357
  }
32354
32358
  }
32355
32359
  M_([Em()], O_.prototype, "interpolationFrom", null);
32356
- class L_ extends w_ {
32360
+ class N_ extends w_ {
32357
32361
  constructor(t2) {
32358
32362
  super(t2), this.isConflict = true, this.activeWhenConflict = "next", this.startVal = null, this.createVal = null, this.vars = { ppt_x: 0, ppt_y: 0, ppt_w: 0, ppt_h: 0, ppt_r: 0 }, this.keyFrames = [], this.isColorAnim = false, this.onTimeNodeStart = () => {
32359
32363
  this.timingTarget && (this.startVal = S_(this.timingTarget, this.json.cBhvr.attrList[0]));
@@ -32424,7 +32428,7 @@ void main(void){
32424
32428
  }
32425
32429
  }
32426
32430
  }
32427
- class N_ extends Vh.k {
32431
+ class L_ extends Vh.k {
32428
32432
  constructor(t2, e2, i2) {
32429
32433
  super(t2, e2, i2);
32430
32434
  }
@@ -32450,69 +32454,69 @@ void main(void){
32450
32454
  var ly = i(133), hy = i.n(ly);
32451
32455
  var uy = i(134), cy = i.n(uy);
32452
32456
  var dy = i(135), py = i.n(dy);
32453
- const fy = { wipe: class extends N_ {
32457
+ const fy = { wipe: class extends L_ {
32454
32458
  constructor(t2) {
32455
32459
  super(U_.a, F_.a, { percent: 0, direction: 1, transition: 0 });
32456
32460
  let e2 = 1;
32457
32461
  "up" === t2 ? e2 = 1 : "down" === t2 ? e2 = 2 : "left" === t2 ? e2 = 3 : "right" === t2 && (e2 = 4), this.uniforms.direction = e2;
32458
32462
  }
32459
- }, fade: class extends N_ {
32463
+ }, fade: class extends L_ {
32460
32464
  constructor(t2) {
32461
32465
  super(void 0, G_.a, { percent: 0, transition: 1 });
32462
32466
  let e2 = 1;
32463
32467
  "out" === t2 ? e2 = -1 : "in" === t2 && (e2 = 1), this.uniforms.transition = Math.pow(e2, e2);
32464
32468
  }
32465
- }, blinds: class extends N_ {
32469
+ }, blinds: class extends L_ {
32466
32470
  constructor(t2) {
32467
32471
  super(V_.a, j_.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "vertical" === t2 ? 1 : 0;
32468
32472
  }
32469
- }, checkerboard: class extends N_ {
32473
+ }, checkerboard: class extends L_ {
32470
32474
  constructor(t2) {
32471
32475
  super(V_.a, X_.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "down" === t2 ? 1 : 0;
32472
32476
  }
32473
- }, dissolve: class extends N_ {
32477
+ }, dissolve: class extends L_ {
32474
32478
  constructor(t2) {
32475
32479
  super(V_.a, q_.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.setTextTure();
32476
32480
  }
32477
32481
  setTextTure() {
32478
32482
  this.uniforms.dissolveSampler = Vh.t.from(Z_);
32479
32483
  }
32480
- }, randombar: class extends N_ {
32484
+ }, randombar: class extends L_ {
32481
32485
  constructor(t2) {
32482
32486
  super(V_.a, K_.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "vertical" === t2 ? 1 : 0, this.setTextTure();
32483
32487
  }
32484
32488
  setTextTure() {
32485
32489
  this.uniforms.dissolveSampler = Vh.t.from(Z_);
32486
32490
  }
32487
- }, circle: class extends N_ {
32491
+ }, circle: class extends L_ {
32488
32492
  constructor(t2) {
32489
32493
  super(V_.a, $_.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "out" === t2 ? 1 : 0;
32490
32494
  }
32491
- }, box: class extends N_ {
32495
+ }, box: class extends L_ {
32492
32496
  constructor(t2) {
32493
32497
  super(V_.a, ey.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "out" === t2 ? 1 : 0;
32494
32498
  }
32495
- }, diamond: class extends N_ {
32499
+ }, diamond: class extends L_ {
32496
32500
  constructor(t2) {
32497
32501
  super(V_.a, ny.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "out" === t2 ? 1 : 0;
32498
32502
  }
32499
- }, plus: class extends N_ {
32503
+ }, plus: class extends L_ {
32500
32504
  constructor(t2) {
32501
32505
  super(V_.a, oy.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "out" === t2 ? 1 : 0;
32502
32506
  }
32503
- }, barn: class extends N_ {
32507
+ }, barn: class extends L_ {
32504
32508
  constructor(t2) {
32505
32509
  super(V_.a, ay.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "inHorizontal" === t2 ? 1 : "outHorizontal" === t2 ? 2 : "outVertical" === t2 ? 3 : 0;
32506
32510
  }
32507
- }, strips: class extends N_ {
32511
+ }, strips: class extends L_ {
32508
32512
  constructor(t2) {
32509
32513
  super(V_.a, hy.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = "upLeft" === t2 ? 1 : "downRight" === t2 ? 2 : "upRight" === t2 ? 3 : 0;
32510
32514
  }
32511
- }, wedge: class extends N_ {
32515
+ }, wedge: class extends L_ {
32512
32516
  constructor(t2) {
32513
32517
  super(V_.a, cy.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) });
32514
32518
  }
32515
- }, wheel: class extends N_ {
32519
+ }, wheel: class extends L_ {
32516
32520
  constructor(t2) {
32517
32521
  super(V_.a, py.a, { percent: 0, transition: 1, rect: new Float32Array([0, 0, 0, 0]) }), this.uniforms.option = Number(t2) || 1;
32518
32522
  }
@@ -32869,7 +32873,7 @@ void main(void){
32869
32873
  createTimeNode(t2, e2) {
32870
32874
  let i2 = null;
32871
32875
  const n2 = { json: t2, isSub: e2, isIterate: this.isIterate, eventHub: this.eventHubs.global, ctx: this.ctx, parent: this, iterateType: this.iterateType, iterateIndex: this.iterateIndex, iterateId: this.iterateId, isInInteractiveSeq: this.isInInteractiveSeq, fromSeqId: this.fromSeqId };
32872
- return "seq" === t2.type ? i2 = new T_(n2) : "par" === t2.type ? i2 = new wy(n2) : "set" === t2.type ? i2 = new A_(n2) : "anim" === t2.type ? i2 = new L_(n2) : "animEffect" === t2.type ? i2 = new my(n2) : "animMotion" === t2.type ? i2 = new gy(n2) : "animScale" === t2.type ? i2 = new vy(n2) : "animClr" === t2.type ? i2 = new _y(n2) : "animRot" === t2.type ? i2 = new yy(n2) : "cmd" === t2.type ? i2 = new xy(n2) : "audio" === t2.type && (i2 = new by(n2)), i2;
32876
+ return "seq" === t2.type ? i2 = new T_(n2) : "par" === t2.type ? i2 = new wy(n2) : "set" === t2.type ? i2 = new A_(n2) : "anim" === t2.type ? i2 = new N_(n2) : "animEffect" === t2.type ? i2 = new my(n2) : "animMotion" === t2.type ? i2 = new gy(n2) : "animScale" === t2.type ? i2 = new vy(n2) : "animClr" === t2.type ? i2 = new _y(n2) : "animRot" === t2.type ? i2 = new yy(n2) : "cmd" === t2.type ? i2 = new xy(n2) : "audio" === t2.type && (i2 = new by(n2)), i2;
32873
32877
  }
32874
32878
  createSubList(t2) {
32875
32879
  this.subList && this.subList.forEach((t3) => t3.commonTimeNode.destroy()), this.subList = [], t2.forEach((t3) => {
@@ -33417,7 +33421,7 @@ void main(void){
33417
33421
  });
33418
33422
  };
33419
33423
  const Oy = (t2) => new Promise((e2) => setTimeout(e2, t2));
33420
- class Ly extends Za.a {
33424
+ class Ny extends Za.a {
33421
33425
  constructor(t2, e2, i2) {
33422
33426
  super(), this.slideIndex = t2, this.taskId = e2, this.logger = i2, this.uuid = Mm(), this.isCancel = false, this.tasks = [];
33423
33427
  }
@@ -33482,7 +33486,7 @@ void main(void){
33482
33486
  });
33483
33487
  }
33484
33488
  }
33485
- var Ny = function(t2, e2, i2, n2) {
33489
+ var Ly = function(t2, e2, i2, n2) {
33486
33490
  return new (i2 || (i2 = Promise))(function(r2, o2) {
33487
33491
  function s2(t3) {
33488
33492
  try {
@@ -33604,7 +33608,7 @@ void main(void){
33604
33608
  return r2.putImageData(new ImageData(Uint8ClampedArray.from(g2), t2, e2), 0, 0), { src: n2.toDataURL("image/png"), maxDis: o2 };
33605
33609
  }
33606
33610
  getSdf(t2, e2, i2) {
33607
- return Ny(this, void 0, void 0, function* () {
33611
+ return Ly(this, void 0, void 0, function* () {
33608
33612
  const n2 = Math.ceil(e2.width), r2 = Math.ceil(e2.height), o2 = Math.ceil(e2.width - t2.width) / 2, s2 = Math.ceil(e2.height - t2.height) / 2;
33609
33613
  let a2 = yield this.localStorage.getItem(`sdf-${i2}-src`), l2 = yield this.localStorage.getItem(`sdf-${i2}-maxDis`);
33610
33614
  if (!(a2 && l2 || this.loadingSdfKeys.has(i2))) {
@@ -33774,7 +33778,7 @@ void main(void){
33774
33778
  }
33775
33779
  preload(t2, e2 = false) {
33776
33780
  return this.stageImpls[t2] || this.stageStates[t2] ? Promise.resolve() : new Promise((i2, n2) => {
33777
- const r2 = new Ly(t2, this.taskId, this.logger);
33781
+ const r2 = new Ny(t2, this.taskId, this.logger);
33778
33782
  r2.on("task-error", (t3, e3) => {
33779
33783
  delete this.stageStates[e3], delete this.stageImpls[e3], delete this.stageCtxs[e3], this.errorChannel.emit("error", t3, e3), n2(t3);
33780
33784
  }), this.stageStates[t2] = { state: "load", task: r2 }, this.createCtx(t2), this.loadStageJson(t2), this.loadSpriteSheets(t2), this.createStage(t2), this.preRenderStage(t2), this.createGraphicsTexture(t2), this.renderStage(t2), this.microTaskManager.addTask(r2), e2 ? r2.applyAll().then(() => {
@@ -33893,7 +33897,7 @@ void main(void){
33893
33897
  Gy.localCache = o.createInstance({ name: "slide_local_cache", driver: o.INDEXEDDB, version: 1 });
33894
33898
  } catch (t2) {
33895
33899
  }
33896
- const Hy = new Nh.j();
33900
+ const Hy = new Lh.j();
33897
33901
  class jy {
33898
33902
  constructor(t2) {
33899
33903
  this.localStorage = t2;
@@ -33980,7 +33984,7 @@ void main(void){
33980
33984
  return (null === (t2 = this.currentStage) || void 0 === t2 ? void 0 : t2.json.prevIndex) ? this.currentStage.json.prevIndex : this.currentIndex - 1;
33981
33985
  }
33982
33986
  constructor(t2, e2 = {}) {
33983
- super(), this.errorChannel = new Za.a(), this.transactionPlayer = null, this.isForward = true, this.drawCall = 0, this.scale = 1, this._isPaused = false, this.maxResolution = new Nh.g(0, 0), this.transitionResolution = new Nh.g(0, 0), this.isNVIDIA = false, this.fps = new bm(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.globalEventHub = new Za.a(), this.globalVideoBackground = new Jd(), this.globalVideoSprite = new ep(), this.onMousemoveTimeout = null, this.cacheFunctionMap = /* @__PURE__ */ new Map(), this.enableAutoForward = false, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33987
+ super(), this.errorChannel = new Za.a(), this.transactionPlayer = null, this.isForward = true, this.drawCall = 0, this.scale = 1, this._isPaused = false, this.maxResolution = new Lh.g(0, 0), this.transitionResolution = new Lh.g(0, 0), this.isNVIDIA = false, this.fps = new bm(), this.designWidth = 0, this.designHeight = 0, this.currentIndex = 0, this.slideCount = 0, this.runtime = { drawCall: 0, fps: 0 }, this.globalEventHub = new Za.a(), this.globalVideoBackground = new Jd(), this.globalVideoSprite = new ep(), this.onMousemoveTimeout = null, this.cacheFunctionMap = /* @__PURE__ */ new Map(), this.enableAutoForward = false, this.isPlayerPaused = () => this._isPaused, this.onWebGLLost = () => {
33984
33988
  this.errorChannel.emit("error", new Tm(gm.CanvasCrash, "webgl context lost."));
33985
33989
  }, this.fullscreenOnMousemove = ({ index: t3, targetId: e3 }) => {
33986
33990
  this.globalEventHub.emit("controllerShowStatusChange", { slideIndex: t3, targetId: e3, status: true }), this.onMousemoveTimeout && clearTimeout(this.onMousemoveTimeout), this.onMousemoveTimeout = setTimeout(() => {
@@ -34039,7 +34043,7 @@ void main(void){
34039
34043
  this.logger.error("removeChild error: PPTPlayer:1062", this.taskId);
34040
34044
  }
34041
34045
  this.globalEventHub.emit("onFullscreenChange", { status: false, slideIndex: this.currentIndex, targetId: null === (e3 = this.currentStage) || void 0 === e3 ? void 0 : e3.ctx.latestChangeFullscreenTargetId }), this.clearFullscreenEventListenersWithAppView(), t3 && this.emit(Xy.changeLocalFullscreenState, { status: false, slideIndex: this.currentIndex, targetId: null === (i3 = this.currentStage) || void 0 === i3 ? void 0 : i3.ctx.latestChangeFullscreenTargetId });
34042
- }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Gy(this.logger), this.cachedExtract = new jy(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Nm(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter);
34046
+ }, this.logger = t2.logger, this.tracker = t2.tracker, this.mode = t2.mode, this.volumeAdjuster = t2.volumeAdjuster, this.localStorage = new Gy(this.logger), this.cachedExtract = new jy(this.localStorage), this.enableWebAudio = !!$a()(t2.enableWebAudio) || t2.enableWebAudio, this.enableAutoForward = !$a()(t2.enableAutoForward) && t2.enableAutoForward, this.config = { minFPS: $a()(e2.minFPS) ? 30 : e2.minFPS, maxFPS: $a()(e2.maxFPS) ? 40 : e2.maxFPS, resolution: $a()(e2.resolution) ? 1 : e2.resolution, autoFPS: !$a()(e2.autoFPS) && e2.autoFPS, autoResolution: !$a()(e2.autoResolution) && e2.autoResolution, transactionBgColor: $a()(e2.transactionBgColor) ? 0 : e2.transactionBgColor, maxResolutionLevel: this.getMaxResolution(e2.maxResolutionLevel), forceCanvas: !$a()(e2.forceCanvas) && e2.forceCanvas, enableNvidiaDetect: !$a()(e2.enableNvidiaDetect) && e2.enableNvidiaDetect, transitionResolutionLevel: this.getMaxResolution(e2.transitionResolutionLevel), antialias: !!$a()(e2.antialias) || e2.antialias }, this.updateMaxResolutionLevel(this.config.maxResolutionLevel), this.updateTransitionResolutionLevel(this.config.transitionResolutionLevel), this.loader = new Lm(this.localStorage, t2.useLocalCache, this.logger, this.tracker, t2.resourceTimeout, t2.loadDelegate, t2.urlInterrupter);
34043
34047
  const i2 = Ph.isWebGLSupported();
34044
34048
  this.app = new Wh({ antialias: this.config.antialias, autoDensity: false, backgroundColor: 16777215, forceCanvas: this.config.forceCanvas || !i2 }), globalThis.__PIXI_APP__ = this.app, this.tracker({ name: "slidePlayerCreate", result: "", reason: "", payload: { webgl: i2, resolution: this.config.resolution, minFPS: this.config.minFPS, maxFPS: this.config.maxFPS, maxResolutionLevel: this.config.maxResolutionLevel, forceCanvas: this.config.forceCanvas } }), 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;
34045
34049
  const n2 = this.app.renderer;
@@ -34184,7 +34188,7 @@ void main(void){
34184
34188
  getTransactionTexture(t2, e2, i2, n2) {
34185
34189
  let r2 = this.transitionResolution.x / t2.json.width;
34186
34190
  Math.floor(t2.json.height * r2 + 1e-4) > t2.json.height && (r2 = this.transitionResolution.y / t2.json.height), r2 = Math.min(1, r2);
34187
- const o2 = Vh.p.create({ width: t2.json.width * r2, height: t2.json.height * r2, resolution: 1 }), s2 = new Nh.d();
34191
+ const o2 = Vh.p.create({ width: t2.json.width * r2, height: t2.json.height * r2, resolution: 1 }), s2 = new Lh.d();
34188
34192
  s2.scale(r2, r2), this.app.renderer.render(t2.container, { renderTexture: o2, transform: s2 });
34189
34193
  const a2 = this.cachedExtract.canvas(o2, this.app.renderer, n2, i2);
34190
34194
  return new b(a2);
@@ -34499,7 +34503,7 @@ void main(void){
34499
34503
  Ax.push(t2), rx();
34500
34504
  }, Cx = 0, Rx = { attributes: true, characterData: true, childList: true, subtree: true }, Ix = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], Px = function(t2) {
34501
34505
  return void 0 === t2 && (t2 = 0), Date.now() + t2;
34502
- }, Ox = false, Lx = new (function() {
34506
+ }, Ox = false, Nx = new (function() {
34503
34507
  function t2() {
34504
34508
  var t3 = this;
34505
34509
  this.stopped = true, this.listener = function() {
@@ -34542,8 +34546,8 @@ void main(void){
34542
34546
  return cx.removeEventListener(e2, t3.listener, true);
34543
34547
  }), this.stopped = true);
34544
34548
  }, t2;
34545
- }())(), Nx = function(t2) {
34546
- !Cx && t2 > 0 && Lx.start(), !(Cx += t2) && Lx.stop();
34549
+ }())(), Lx = function(t2) {
34550
+ !Cx && t2 > 0 && Nx.start(), !(Cx += t2) && Nx.stop();
34547
34551
  }, Dx = function() {
34548
34552
  function t2(t3, e2) {
34549
34553
  this.target = t3, this.observedBox = e2 || Zy.CONTENT_BOX, this.lastReportedSize = { inlineSize: 0, blockSize: 0 };
@@ -34582,10 +34586,10 @@ void main(void){
34582
34586
  Bx.set(t3, i2);
34583
34587
  }, t2.observe = function(t3, e2, i2) {
34584
34588
  var n2 = Bx.get(t3), r2 = 0 === n2.observationTargets.length;
34585
- Ux(n2.observationTargets, e2) < 0 && (r2 && ix.push(n2), n2.observationTargets.push(new Dx(e2, i2 && i2.box)), Nx(1), Lx.schedule());
34589
+ Ux(n2.observationTargets, e2) < 0 && (r2 && ix.push(n2), n2.observationTargets.push(new Dx(e2, i2 && i2.box)), Lx(1), Nx.schedule());
34586
34590
  }, t2.unobserve = function(t3, e2) {
34587
34591
  var i2 = Bx.get(t3), n2 = Ux(i2.observationTargets, e2), r2 = 1 === i2.observationTargets.length;
34588
- n2 >= 0 && (r2 && ix.splice(ix.indexOf(i2), 1), i2.observationTargets.splice(n2, 1), Nx(-1));
34592
+ n2 >= 0 && (r2 && ix.splice(ix.indexOf(i2), 1), i2.observationTargets.splice(n2, 1), Lx(-1));
34589
34593
  }, t2.disconnect = function(t3) {
34590
34594
  var e2 = this, i2 = Bx.get(t3);
34591
34595
  i2.observationTargets.slice().forEach(function(i3) {
@@ -35376,7 +35380,7 @@ void main(void){
35376
35380
  } catch (t2) {
35377
35381
  return false;
35378
35382
  }
35379
- }(), Lb = void 0, Nb = true, Db = void 0, Fb = false, Bb = [], Ub = function t2(e2) {
35383
+ }(), Nb = void 0, Lb = true, Db = void 0, Fb = false, Bb = [], Ub = function t2(e2) {
35380
35384
  var i2 = this, n2 = e2 || {};
35381
35385
  this.domElement = document.createElement("div"), this.__ul = document.createElement("ul"), this.domElement.appendChild(this.__ul), fb.addClass(this.domElement, "dg"), this.__folders = {}, this.__controllers = [], this.__rememberedObjects = [], this.__rememberedObjectIndecesToControllers = [], this.__listening = [], n2 = qx.defaults(n2, { closeOnTop: false, autoPlace: true, width: t2.DEFAULT_WIDTH }), n2 = qx.defaults(n2, { resizable: n2.autoPlace, hideable: n2.autoPlace }), qx.isUndefined(n2.load) ? n2.load = { preset: "Default" } : n2.preset && (n2.load.preset = n2.preset), qx.isUndefined(n2.parent) && n2.hideable && Bb.push(this), n2.resizable = qx.isUndefined(n2.parent) && n2.resizable, n2.autoPlace && qx.isUndefined(n2.scrollable) && (n2.scrollable = true);
35382
35386
  var r2, o2 = Ob && "true" === localStorage.getItem(Vb(this, "isLocal")), s2 = void 0, a2 = void 0;
@@ -35430,7 +35434,7 @@ void main(void){
35430
35434
  return t3.preventDefault(), i2.closed = !i2.closed, false;
35431
35435
  }), n2.closed || (this.closed = false);
35432
35436
  }
35433
- n2.autoPlace && (qx.isUndefined(n2.parent) && (Nb && (Db = document.createElement("div"), fb.addClass(Db, "dg"), fb.addClass(Db, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(Db), Nb = false), Db.appendChild(this.domElement), fb.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || Zb(i2, n2.width)), this.__resizeHandler = function() {
35437
+ n2.autoPlace && (qx.isUndefined(n2.parent) && (Lb && (Db = document.createElement("div"), fb.addClass(Db, "dg"), fb.addClass(Db, t2.CLASS_AUTO_PLACE_CONTAINER), document.body.appendChild(Db), Lb = false), Db.appendChild(this.domElement), fb.addClass(this.domElement, t2.CLASS_AUTO_PLACE)), this.parent || Zb(i2, n2.width)), this.__resizeHandler = function() {
35434
35438
  i2.onResizeDebounced();
35435
35439
  }, fb.bind(window, "resize", this.__resizeHandler), fb.bind(this.__ul, "webkitTransitionEnd", this.__resizeHandler), fb.bind(this.__ul, "transitionend", this.__resizeHandler), fb.bind(this.__ul, "oTransitionEnd", this.__resizeHandler), this.onResize(), n2.resizable && qb(this), s2 = function() {
35436
35440
  Ob && "true" === localStorage.getItem(Vb(i2, "isLocal")) && localStorage.setItem(Vb(i2, "gui"), JSON.stringify(i2.getSaveObject()));
@@ -35576,9 +35580,9 @@ void main(void){
35576
35580
  }
35577
35581
  var h2 = document.getElementById("dg-new-constructor");
35578
35582
  fb.bind(h2, "keydown", function(t3) {
35579
- !t3.metaKey || 67 !== t3.which && 67 !== t3.keyCode || Lb.hide();
35583
+ !t3.metaKey || 67 !== t3.which && 67 !== t3.keyCode || Nb.hide();
35580
35584
  }), fb.bind(i2, "click", function() {
35581
- h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), Lb.show(), h2.focus(), h2.select();
35585
+ h2.innerHTML = JSON.stringify(t2.getSaveObject(), void 0, 2), Nb.show(), h2.focus(), h2.select();
35582
35586
  }), fb.bind(n2, "click", function() {
35583
35587
  t2.save();
35584
35588
  }), fb.bind(r2, "click", function() {
@@ -35676,7 +35680,7 @@ void main(void){
35676
35680
  }, onResizeDebounced: qx.debounce(function() {
35677
35681
  this.onResize();
35678
35682
  }, 50), remember: function() {
35679
- if (qx.isUndefined(Lb) && ((Lb = new Pb()).domElement.innerHTML = Cb), this.parent)
35683
+ if (qx.isUndefined(Nb) && ((Nb = new Pb()).domElement.innerHTML = Cb), this.parent)
35680
35684
  throw new Error("You can only call remember on a top level GUI.");
35681
35685
  var t2 = this;
35682
35686
  qx.each(Array.prototype.slice.call(arguments), function(e2) {
@@ -36497,7 +36501,7 @@ void main(void){
36497
36501
  }
36498
36502
  var _T = { syncDispatch: "syncDispatch", syncReceive: "syncReceive", syncEventLag: "syncEventLag", renderStart: "renderStart", renderEnd: "renderEnd", renderError: "renderError", slideChange: "slideChange", mainSeqStepStart: "mainSeqStepStart", mainSeqStepEnd: "mainSeqStepEnd", animateStart: "animateStart", animateEnd: "animateEnd", stateChange: "stateChange", slideStepEnd: "slideEnd", slideStepStart: "slideStart", useraddLink: "useraddLink" }, yT = { taskId: "", url: "", currentSlideIndex: -1, mainSeqStep: -1, mainSeqState: null, mediaState: /* @__PURE__ */ Object.create(null), interactiveSeqState: /* @__PURE__ */ Object.create(null) }, xT = "";
36499
36503
  try {
36500
- xT = "1.4.39";
36504
+ xT = "1.4.40";
36501
36505
  } catch (t2) {
36502
36506
  xT = "-dev-";
36503
36507
  }
@@ -36516,7 +36520,7 @@ void main(void){
36516
36520
  return n3.frameResizeHandler();
36517
36521
  }), n3.timestamp = function() {
36518
36522
  return Date.now();
36519
- }, 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 zy(), n3.designWidth = 0, n3.designHeight = 0, n3._slideCount = 0, n3._dispatchIncrId = 0, n3._receiveIncrId = 0, n3.resizeView = $y()(n3._resizeView.bind(n3), 50), n3.handleViewClick = $y()(n3._handleViewClick.bind(n3), 300, { leading: true }), n3.resourceList = [], n3._updateVolumeByStaticAdjuster = function(t3) {
36523
+ }, 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 zy(), n3.designWidth = 0, n3.designHeight = 0, n3._slideCount = 0, n3._dispatchIncrId = 0, n3._receiveIncrId = 0, n3.resizeView = $y()(n3._resizeView.bind(n3), 50), n3.handleViewClick = $y()(n3._handleViewClick.bind(n3), 300, { leading: true }), n3.slideNots = null, n3.resourceList = [], n3._updateVolumeByStaticAdjuster = function(t3) {
36520
36524
  n3.volumeAdjuster.volume = t3;
36521
36525
  }, n3.recoverHandler = function(t3) {
36522
36526
  if ("@slide/_recover_" === t3.data.type && t3.data.slideId === n3.randomId) {
@@ -37131,6 +37135,30 @@ void main(void){
37131
37135
  }, e2.clearLocalCache = function() {
37132
37136
  Yy.clearLocalCache();
37133
37137
  }, e2.disposeLocalCache = function() {
37138
+ }, e2.prototype.getNoteForCurrentSlide = function(t3) {
37139
+ return pT(this, void 0, void 0, function() {
37140
+ var e3, i3;
37141
+ return fT(this, function(n3) {
37142
+ switch (n3.label) {
37143
+ case 0:
37144
+ if (!this.player)
37145
+ return [2, null];
37146
+ if (this.slideNots)
37147
+ return [2, this.slideNots[t3]];
37148
+ n3.label = 1;
37149
+ case 1:
37150
+ return n3.trys.push([1, 4, , 5]), [4, fetch(this.__slideState.url + "/" + this.__slideState.taskId + "/jsonOutput/note.json")];
37151
+ case 2:
37152
+ return [4, n3.sent().json()];
37153
+ case 3:
37154
+ return e3 = n3.sent(), this.slideNots = e3, [2, e3[t3]];
37155
+ case 4:
37156
+ return i3 = n3.sent(), this.logger.error("getNotesForCurrentSlide error: " + String(i3), this.taskId), [2, null];
37157
+ case 5:
37158
+ return [2];
37159
+ }
37160
+ });
37161
+ });
37134
37162
  }, i2 = e2, e2.preloadResource = hT, e2.instances = [], e2._tempFrozenIds = [], e2._tempLog = "", e2._tempLogIndex = 1, e2.remoteLogAddress = null, e2.usePlugin = function(t3) {
37135
37163
  t3.context({ logger: { info: function(t4) {
37136
37164
  e2.appendLogString("INFO - " + new Date().toISOString() + " - " + t4 + "\n");
@@ -39791,7 +39819,7 @@ class SlidePreviewer {
39791
39819
  }
39792
39820
  }
39793
39821
  const usePlugin = /* @__PURE__ */ Slide.Slide.usePlugin.bind(Slide.Slide);
39794
- const version = "0.2.84";
39822
+ const version = "0.2.85";
39795
39823
  const SlideApp = {
39796
39824
  kind: "Slide",
39797
39825
  setup(context) {