mxdraw 0.0.16 → 0.1.1

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.
Files changed (85) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +63 -162
  3. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js +23 -11
  4. package/dist/lib/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.js.map +1 -1
  5. package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js +3 -0
  6. package/dist/lib/MxModule/McGiWorldDraw/McGiWorldDraw.js.map +1 -0
  7. package/dist/lib/MxModule/McGiWorldDraw/index.js +3 -0
  8. package/dist/lib/MxModule/McGiWorldDraw/index.js.map +1 -0
  9. package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js +20 -0
  10. package/dist/lib/MxModule/McGiWorldDrawType/McGiWorldDrawType.js.map +1 -0
  11. package/dist/lib/MxModule/McGiWorldDrawType/index.js +5 -0
  12. package/dist/lib/MxModule/McGiWorldDrawType/index.js.map +1 -0
  13. package/dist/lib/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.js +1 -1
  14. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js +122 -0
  15. package/dist/lib/MxModule/MxDbEntity/MxDbEntity.js.map +1 -0
  16. package/dist/lib/MxModule/MxDbEntity/index.js +6 -0
  17. package/dist/lib/MxModule/MxDbEntity/index.js.map +1 -0
  18. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js +322 -25
  19. package/dist/lib/MxModule/MxDrawObject/MxDrawObject.js.map +1 -1
  20. package/dist/lib/MxModule/MxFun/MxFun.js +45 -15
  21. package/dist/lib/MxModule/MxFun/MxFun.js.map +1 -1
  22. package/dist/lib/MxModule/MxFun/index.js +2 -2
  23. package/dist/lib/MxModule/MxFun/index.js.map +1 -1
  24. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js +1 -1
  25. package/dist/lib/MxModule/MxThreeJS/MxThreeJS.js.map +1 -1
  26. package/dist/lib/MxModule/loadCoreCode/index.js +6 -0
  27. package/dist/lib/MxModule/loadCoreCode/index.js.map +1 -0
  28. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js +109 -0
  29. package/dist/lib/MxModule/loadCoreCode/loadCoreCode.js.map +1 -0
  30. package/dist/lib/MxModule/{useCoreCode → loadCoreCode}/mxfun.es5.js +634 -471
  31. package/dist/lib/MxModule/loadCoreCode/mxfun.es5.js.map +1 -0
  32. package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js +77 -24
  33. package/dist/lib/MxModule/useCanvasResizeListener/useCanvasResizeListener.js.map +1 -1
  34. package/dist/lib/doc.js +7 -3
  35. package/dist/lib/doc.js.map +1 -1
  36. package/dist/lib/mxdraw.js +13 -6
  37. package/dist/lib/mxdraw.js.map +1 -1
  38. package/dist/lib/tools/dynamicImport/index.js +143 -0
  39. package/dist/lib/tools/dynamicImport/index.js.map +1 -0
  40. package/dist/lib/types/McEdGetPointWorldDrawObject.js +3 -0
  41. package/dist/lib/types/McEdGetPointWorldDrawObject.js.map +1 -0
  42. package/dist/lib/types/MrxDbgUiPrPoint.js +3 -0
  43. package/dist/lib/types/MrxDbgUiPrPoint.js.map +1 -0
  44. package/dist/lib/types/MxCADObject.js +4 -0
  45. package/dist/lib/types/MxCADObject.js.map +1 -0
  46. package/dist/lib/types/MxDrawObject.js +3 -0
  47. package/dist/lib/types/MxDrawObject.js.map +1 -0
  48. package/dist/lib/types/MxFun.js +3 -0
  49. package/dist/lib/types/MxFun.js.map +1 -0
  50. package/dist/mxdraw.es5.js +28 -3
  51. package/dist/mxdraw.es5.js.map +1 -1
  52. package/dist/mxdraw.umd.js +29 -4
  53. package/dist/mxdraw.umd.js.map +1 -1
  54. package/dist/types/MxModule/McEdGetPointWorldDrawObject/McEdGetPointWorldDrawObjectClass.d.ts +13 -3
  55. package/dist/types/MxModule/McGiWorldDraw/McGiWorldDraw.d.ts +156 -0
  56. package/dist/types/MxModule/McGiWorldDraw/index.d.ts +2 -0
  57. package/dist/types/MxModule/McGiWorldDrawType/McGiWorldDrawType.d.ts +16 -0
  58. package/dist/types/MxModule/McGiWorldDrawType/index.d.ts +2 -0
  59. package/dist/types/MxModule/MrxDbgUiPrPoint/MrxDbgUiPrPointClass.d.ts +2 -2
  60. package/dist/types/MxModule/MxDbEntity/MxDbEntity.d.ts +159 -0
  61. package/dist/types/MxModule/MxDbEntity/index.d.ts +3 -0
  62. package/dist/types/MxModule/MxDrawObject/MxDrawObject.d.ts +251 -1
  63. package/dist/types/MxModule/MxFun/MxFun.d.ts +29 -12
  64. package/dist/types/MxModule/MxThreeJS/MxThreeJS.d.ts +10 -10
  65. package/dist/types/MxModule/loadCoreCode/index.d.ts +3 -0
  66. package/dist/types/MxModule/loadCoreCode/loadCoreCode.d.ts +9 -0
  67. package/dist/types/MxModule/{useCoreCode → loadCoreCode}/mxfun.es5.d.ts +0 -0
  68. package/dist/types/MxModule/store/store.d.ts +1 -1
  69. package/dist/types/MxModule/useCanvasResizeListener/useCanvasResizeListener.d.ts +9 -5
  70. package/dist/types/doc.d.ts +5 -2
  71. package/dist/types/mxdraw.d.ts +9 -4
  72. package/dist/types/tools/dynamicImport/index.d.ts +1 -0
  73. package/dist/types/types/McEdGetPointWorldDrawObject.d.ts +9 -0
  74. package/dist/types/types/MrxDbgUiPrPoint.d.ts +23 -0
  75. package/dist/types/types/MxCADObject.d.ts +40 -0
  76. package/dist/types/types/MxDrawObject.d.ts +50 -0
  77. package/dist/types/types/MxFun.d.ts +33 -0
  78. package/package.json +6 -1
  79. package/dist/lib/MxModule/useCoreCode/index.js +0 -6
  80. package/dist/lib/MxModule/useCoreCode/index.js.map +0 -1
  81. package/dist/lib/MxModule/useCoreCode/mxfun.es5.js.map +0 -1
  82. package/dist/lib/MxModule/useCoreCode/useCoreCode.js +0 -100
  83. package/dist/lib/MxModule/useCoreCode/useCoreCode.js.map +0 -1
  84. package/dist/types/MxModule/useCoreCode/index.d.ts +0 -3
  85. package/dist/types/MxModule/useCoreCode/useCoreCode.d.ts +0 -9
@@ -128,7 +128,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
128
128
  t = t >>> 8 ^ r[255 & (t ^ e[o])]; return -1 ^ t; };
129
129
  }, {}], 9: [function (t, e, n) {
130
130
  "use strict";
131
- var l, d = t("../utils/common"), c = t("./trees"), p = t("./adler32"), f = t("./crc32"), i = t("./messages"), u = 0, h = 4, m = 0, g = -2, v = -1, y = 4, r = 2, x = 8, _ = 9, a = 286, o = 30, s = 19, w = 2 * a + 1, b = 15, M = 3, S = 258, C = S + M + 1, T = 42, E = 113, A = 1, D = 2, L = 3, O = 4;
131
+ var l, d = t("../utils/common"), c = t("./trees"), p = t("./adler32"), f = t("./crc32"), i = t("./messages"), u = 0, h = 4, m = 0, g = -2, v = -1, y = 4, r = 2, x = 8, _ = 9, a = 286, o = 30, s = 19, w = 2 * a + 1, b = 15, M = 3, S = 258, C = S + M + 1, T = 42, E = 113, A = 1, D = 2, O = 3, L = 4;
132
132
  function I(t, e) { return t.msg = i[e], e; }
133
133
  function P(t) { return (t << 1) - (4 < t ? 9 : 0); }
134
134
  function R(t) { for (var e = t.length; 0 <= --e;)
@@ -148,7 +148,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
148
148
  }
149
149
  }
150
150
  } while ((e = h[e & u]) > l && 0 != --r); return o <= t.lookahead ? o : t.lookahead; }
151
- function V(t) { var e, n, i, r, a, o, s, l, c, u, h = t.w_size; do {
151
+ function j(t) { var e, n, i, r, a, o, s, l, c, u, h = t.w_size; do {
152
152
  if (r = t.window_size - t.lookahead - t.strstart, t.strstart >= h + (h - C)) {
153
153
  for (d.arraySet(t.window, t.window, h, h, 0), t.match_start -= h, t.strstart -= h, t.block_start -= h, e = n = t.hash_size; i = t.head[--e], t.head[e] = h <= i ? i - h : 0, --n;)
154
154
  ;
@@ -162,9 +162,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
162
162
  for (a = t.strstart - t.insert, t.ins_h = t.window[a], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[a + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[a + M - 1]) & t.hash_mask, t.prev[a & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = a, a++, t.insert--, !(t.lookahead + t.insert < M));)
163
163
  ;
164
164
  } while (t.lookahead < C && 0 !== t.strm.avail_in); }
165
- function U(t, e) { for (var n, i;;) {
165
+ function V(t, e) { for (var n, i;;) {
166
166
  if (t.lookahead < C) {
167
- if (V(t), t.lookahead < C && e === u)
167
+ if (j(t), t.lookahead < C && e === u)
168
168
  return A;
169
169
  if (0 === t.lookahead)
170
170
  break;
@@ -181,10 +181,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
181
181
  i = c._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
182
182
  if (i && (N(t, !1), 0 === t.strm.avail_out))
183
183
  return A;
184
- } return t.insert = t.strstart < M - 1 ? t.strstart : M - 1, e === h ? (N(t, !0), 0 === t.strm.avail_out ? L : O) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }
185
- function j(t, e) { for (var n, i, r;;) {
184
+ } return t.insert = t.strstart < M - 1 ? t.strstart : M - 1, e === h ? (N(t, !0), 0 === t.strm.avail_out ? O : L) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }
185
+ function U(t, e) { for (var n, i, r;;) {
186
186
  if (t.lookahead < C) {
187
- if (V(t), t.lookahead < C && e === u)
187
+ if (j(t), t.lookahead < C && e === u)
188
188
  return A;
189
189
  if (0 === t.lookahead)
190
190
  break;
@@ -201,7 +201,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
201
201
  }
202
202
  else
203
203
  t.match_available = 1, t.strstart++, t.lookahead--;
204
- } return t.match_available && (i = c._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < M - 1 ? t.strstart : M - 1, e === h ? (N(t, !0), 0 === t.strm.avail_out ? L : O) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }
204
+ } return t.match_available && (i = c._tr_tally(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < M - 1 ? t.strstart : M - 1, e === h ? (N(t, !0), 0 === t.strm.avail_out ? O : L) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }
205
205
  function G(t, e, n, i, r) { this.good_length = t, this.max_lazy = e, this.nice_length = n, this.max_chain = i, this.func = r; }
206
206
  function H() { this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = x, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new d.Buf16(2 * w), this.dyn_dtree = new d.Buf16(2 * (2 * o + 1)), this.bl_tree = new d.Buf16(2 * (2 * s + 1)), R(this.dyn_ltree), R(this.dyn_dtree), R(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new d.Buf16(b + 1), this.heap = new d.Buf16(2 * a + 1), R(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new d.Buf16(2 * a + 1), R(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0; }
207
207
  function W(t) { var e; return t && t.state ? (t.total_in = t.total_out = 0, t.data_type = r, (e = t.state).pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = e.wrap ? T : E, t.adler = 2 === e.wrap ? 0 : 1, e.last_flush = u, c._tr_init(e), m) : I(t, g); }
@@ -211,7 +211,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
211
211
  return I(t, g); 8 === i && (i = 9); var s = new H; return (t.state = s).strm = t, s.wrap = o, s.gzhead = null, s.w_bits = i, s.w_size = 1 << s.w_bits, s.w_mask = s.w_size - 1, s.hash_bits = r + 7, s.hash_size = 1 << s.hash_bits, s.hash_mask = s.hash_size - 1, s.hash_shift = ~~((s.hash_bits + M - 1) / M), s.window = new d.Buf8(2 * s.w_size), s.head = new d.Buf16(s.hash_size), s.prev = new d.Buf16(s.w_size), s.lit_bufsize = 1 << r + 6, s.pending_buf_size = 4 * s.lit_bufsize, s.pending_buf = new d.Buf8(s.pending_buf_size), s.d_buf = +s.lit_bufsize, s.l_buf = 3 * s.lit_bufsize, s.level = e, s.strategy = a, s.method = n, J(t); }
212
212
  l = [new G(0, 0, 0, 0, function (t, e) { var n = 65535; for (n > t.pending_buf_size - 5 && (n = t.pending_buf_size - 5);;) {
213
213
  if (t.lookahead <= 1) {
214
- if (V(t), 0 === t.lookahead && e === u)
214
+ if (j(t), 0 === t.lookahead && e === u)
215
215
  return A;
216
216
  if (0 === t.lookahead)
217
217
  break;
@@ -222,7 +222,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
222
222
  return A;
223
223
  if (t.strstart - t.block_start >= t.w_size - C && (N(t, !1), 0 === t.strm.avail_out))
224
224
  return A;
225
- } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? L : O) : (t.strstart > t.block_start && (N(t, !1), t.strm.avail_out), A); }), new G(4, 4, 8, 4, U), new G(4, 5, 16, 8, U), new G(4, 6, 32, 32, U), new G(4, 4, 16, 16, j), new G(8, 16, 32, 32, j), new G(8, 16, 128, 128, j), new G(8, 32, 128, 256, j), new G(32, 128, 258, 1024, j), new G(32, 258, 258, 4096, j)], n.deflateInit = function (t, e) { return q(t, e, x, 15, 8, 0); }, n.deflateInit2 = q, n.deflateReset = J, n.deflateResetKeep = W, n.deflateSetHeader = function (t, e) { return !t || !t.state || 2 !== t.state.wrap ? g : (t.state.gzhead = e, m); }, n.deflate = function (t, e) { var n, i, r, a; if (!t || !t.state || 5 < e || e < 0)
225
+ } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? O : L) : (t.strstart > t.block_start && (N(t, !1), t.strm.avail_out), A); }), new G(4, 4, 8, 4, V), new G(4, 5, 16, 8, V), new G(4, 6, 32, 32, V), new G(4, 4, 16, 16, U), new G(8, 16, 32, 32, U), new G(8, 16, 128, 128, U), new G(8, 32, 128, 256, U), new G(32, 128, 258, 1024, U), new G(32, 258, 258, 4096, U)], n.deflateInit = function (t, e) { return q(t, e, x, 15, 8, 0); }, n.deflateInit2 = q, n.deflateReset = J, n.deflateResetKeep = W, n.deflateSetHeader = function (t, e) { return !t || !t.state || 2 !== t.state.wrap ? g : (t.state.gzhead = e, m); }, n.deflate = function (t, e) { var n, i, r, a; if (!t || !t.state || 5 < e || e < 0)
226
226
  return t ? I(t, g) : g; if (i = t.state, !t.output || !t.input && 0 !== t.avail_in || 666 === i.status && e !== h)
227
227
  return I(t, 0 === t.avail_out ? -5 : g); if (i.strm = t, n = i.last_flush, i.last_flush = e, i.status === T)
228
228
  if (2 === i.wrap)
@@ -271,16 +271,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
271
271
  return I(t, -5); if (666 === i.status && 0 !== t.avail_in)
272
272
  return I(t, -5); if (0 !== t.avail_in || 0 !== i.lookahead || e !== u && 666 !== i.status) {
273
273
  var s = 2 === i.strategy ? function (t, e) { for (var n;;) {
274
- if (0 === t.lookahead && (V(t), 0 === t.lookahead)) {
274
+ if (0 === t.lookahead && (j(t), 0 === t.lookahead)) {
275
275
  if (e === u)
276
276
  return A;
277
277
  break;
278
278
  }
279
279
  if (t.match_length = 0, n = c._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++, n && (N(t, !1), 0 === t.strm.avail_out))
280
280
  return A;
281
- } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? L : O) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }(i, e) : 3 === i.strategy ? function (t, e) { for (var n, i, r, a, o = t.window;;) {
281
+ } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? O : L) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }(i, e) : 3 === i.strategy ? function (t, e) { for (var n, i, r, a, o = t.window;;) {
282
282
  if (t.lookahead <= S) {
283
- if (V(t), t.lookahead <= S && e === u)
283
+ if (j(t), t.lookahead <= S && e === u)
284
284
  return A;
285
285
  if (0 === t.lookahead)
286
286
  break;
@@ -292,17 +292,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
292
292
  }
293
293
  if (t.match_length >= M ? (n = c._tr_tally(t, 1, t.match_length - M), t.lookahead -= t.match_length, t.strstart += t.match_length, t.match_length = 0) : (n = c._tr_tally(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++), n && (N(t, !1), 0 === t.strm.avail_out))
294
294
  return A;
295
- } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? L : O) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }(i, e) : l[i.level].func(i, e);
296
- if (s !== L && s !== O || (i.status = 666), s === A || s === L)
295
+ } return t.insert = 0, e === h ? (N(t, !0), 0 === t.strm.avail_out ? O : L) : t.last_lit && (N(t, !1), 0 === t.strm.avail_out) ? A : D; }(i, e) : l[i.level].func(i, e);
296
+ if (s !== O && s !== L || (i.status = 666), s === A || s === O)
297
297
  return 0 === t.avail_out && (i.last_flush = -1), m;
298
298
  if (s === D && (1 === e ? c._tr_align(i) : 5 !== e && (c._tr_stored_block(i, 0, 0, !1), 3 === e && (R(i.head), 0 === i.lookahead && (i.strstart = 0, i.block_start = 0, i.insert = 0))), k(t), 0 === t.avail_out))
299
299
  return i.last_flush = -1, m;
300
300
  } return e !== h ? m : i.wrap <= 0 ? 1 : (2 === i.wrap ? (B(i, 255 & t.adler), B(i, t.adler >> 8 & 255), B(i, t.adler >> 16 & 255), B(i, t.adler >> 24 & 255), B(i, 255 & t.total_in), B(i, t.total_in >> 8 & 255), B(i, t.total_in >> 16 & 255), B(i, t.total_in >> 24 & 255)) : (F(i, t.adler >>> 16), F(i, 65535 & t.adler)), k(t), 0 < i.wrap && (i.wrap = -i.wrap), 0 !== i.pending ? m : 1); }, n.deflateEnd = function (t) { var e; return t && t.state ? (e = t.state.status) !== T && 69 !== e && 73 !== e && 91 !== e && 103 !== e && e !== E && 666 !== e ? I(t, g) : (t.state = null, e === E ? I(t, -3) : m) : g; }, n.deflateSetDictionary = function (t, e) { var n, i, r, a, o, s, l, c, u = e.length; if (!t || !t.state)
301
301
  return g; if (2 === (a = (n = t.state).wrap) || 1 === a && n.status !== T || n.lookahead)
302
- return g; for (1 === a && (t.adler = p(t.adler, e, u, 0)), n.wrap = 0, u >= n.w_size && (0 === a && (R(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0), c = new d.Buf8(n.w_size), d.arraySet(c, e, u - n.w_size, n.w_size, 0), e = c, u = n.w_size), o = t.avail_in, s = t.next_in, l = t.input, t.avail_in = u, t.next_in = 0, t.input = e, V(n); n.lookahead >= M;) {
302
+ return g; for (1 === a && (t.adler = p(t.adler, e, u, 0)), n.wrap = 0, u >= n.w_size && (0 === a && (R(n.head), n.strstart = 0, n.block_start = 0, n.insert = 0), c = new d.Buf8(n.w_size), d.arraySet(c, e, u - n.w_size, n.w_size, 0), e = c, u = n.w_size), o = t.avail_in, s = t.next_in, l = t.input, t.avail_in = u, t.next_in = 0, t.input = e, j(n); n.lookahead >= M;) {
303
303
  for (i = n.strstart, r = n.lookahead - (M - 1); n.ins_h = (n.ins_h << n.hash_shift ^ n.window[i + M - 1]) & n.hash_mask, n.prev[i & n.w_mask] = n.head[n.ins_h], n.head[n.ins_h] = i, i++, --r;)
304
304
  ;
305
- n.strstart = i, n.lookahead = M - 1, V(n);
305
+ n.strstart = i, n.lookahead = M - 1, j(n);
306
306
  } return n.strstart += n.lookahead, n.block_start = n.strstart, n.insert = n.lookahead, n.lookahead = 0, n.match_length = n.prev_length = M - 1, n.match_available = 0, t.next_in = s, t.input = l, t.avail_in = o, n.wrap = a, m; }, n.deflateInfo = "pako deflate (from Nodeca project)";
307
307
  }, { "../utils/common": 4, "./adler32": 6, "./crc32": 8, "./messages": 14, "./trees": 15 }], 10: [function (t, e, n) {
308
308
  "use strict";
@@ -386,7 +386,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
386
386
  } while (i < r && a < s); i -= w = f >> 3, p &= (1 << (f -= w << 3)) - 1, t.next_in = i, t.next_out = a, t.avail_in = i < r ? r - i + 5 : 5 - (i - r), t.avail_out = a < s ? s - a + 257 : 257 - (a - s), n.hold = p, n.bits = f; };
387
387
  }, {}], 12: [function (t, e, n) {
388
388
  "use strict";
389
- var D = t("../utils/common"), L = t("./adler32"), O = t("./crc32"), I = t("./inffast"), P = t("./inftrees"), R = 1, k = 2, N = 0, B = -2, F = 1, i = 852, r = 592;
389
+ var D = t("../utils/common"), O = t("./adler32"), L = t("./crc32"), I = t("./inffast"), P = t("./inftrees"), R = 1, k = 2, N = 0, B = -2, F = 1, i = 852, r = 592;
390
390
  function z(t) { return (t >>> 24 & 255) + (t >>> 8 & 65280) + ((65280 & t) << 8) + ((255 & t) << 24); }
391
391
  function a() { this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new D.Buf16(320), this.work = new D.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0; }
392
392
  function o(t) { var e; return t && t.state ? (e = t.state, t.total_in = t.total_out = e.total = 0, t.msg = "", e.wrap && (t.adler = 1 & e.wrap), e.mode = F, e.last = 0, e.havedict = 0, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new D.Buf32(i), e.distcode = e.distdyn = new D.Buf32(r), e.sane = 1, e.back = -1, N) : B; }
@@ -394,7 +394,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
394
394
  function l(t, e) { var n, i; return t && t.state ? (i = t.state, e < 0 ? (n = 0, e = -e) : (n = 1 + (e >> 4), e < 48 && (e &= 15)), e && (e < 8 || 15 < e) ? B : (null !== i.window && i.wbits !== e && (i.window = null), i.wrap = n, i.wbits = e, s(t))) : B; }
395
395
  function c(t, e) { var n, i; return t ? (i = new a, (t.state = i).window = null, (n = l(t, e)) !== N && (t.state = null), n) : B; }
396
396
  var u, h, d = !0;
397
- function V(t) { if (d) {
397
+ function j(t) { if (d) {
398
398
  var e;
399
399
  for (u = new D.Buf32(512), h = new D.Buf32(32), e = 0; e < 144;)
400
400
  t.lens[e++] = 8;
@@ -408,7 +408,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
408
408
  t.lens[e++] = 5;
409
409
  P(k, t.lens, 0, 32, h, 0, t.work, { bits: 5 }), d = !1;
410
410
  } t.lencode = u, t.lenbits = 9, t.distcode = h, t.distbits = 5; }
411
- function U(t, e, n, i) { var r, a = t.state; return null === a.window && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new D.Buf8(a.wsize)), i >= a.wsize ? (D.arraySet(a.window, e, n - a.wsize, a.wsize, 0), a.wnext = 0, a.whave = a.wsize) : (i < (r = a.wsize - a.wnext) && (r = i), D.arraySet(a.window, e, n - i, r, a.wnext), (i -= r) ? (D.arraySet(a.window, e, n - i, i, 0), a.wnext = i, a.whave = a.wsize) : (a.wnext += r, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += r))), 0; }
411
+ function V(t, e, n, i) { var r, a = t.state; return null === a.window && (a.wsize = 1 << a.wbits, a.wnext = 0, a.whave = 0, a.window = new D.Buf8(a.wsize)), i >= a.wsize ? (D.arraySet(a.window, e, n - a.wsize, a.wsize, 0), a.wnext = 0, a.whave = a.wsize) : (i < (r = a.wsize - a.wnext) && (r = i), D.arraySet(a.window, e, n - i, r, a.wnext), (i -= r) ? (D.arraySet(a.window, e, n - i, i, 0), a.wnext = i, a.whave = a.wsize) : (a.wnext += r, a.wnext === a.wsize && (a.wnext = 0), a.whave < a.wsize && (a.whave += r))), 0; }
412
412
  n.inflateReset = s, n.inflateReset2 = l, n.inflateResetKeep = o, n.inflateInit = function (t) { return c(t, 15); }, n.inflateInit2 = c, n.inflate = function (t, e) { var n, i, r, a, o, s, l, c, u, h, d, p, f, m, g, v, y, x, _, w, b, M, S, C, T = 0, E = new D.Buf8(4), A = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; if (!t || !t.state || !t.output || !t.input && 0 !== t.avail_in)
413
413
  return B; 12 === (n = t.state).mode && (n.mode = 13), o = t.next_out, r = t.output, l = t.avail_out, a = t.next_in, i = t.input, s = t.avail_in, c = n.hold, u = n.bits, h = s, d = l, M = N; t: for (;;)
414
414
  switch (n.mode) {
@@ -423,7 +423,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
423
423
  s--, c += i[a++] << u, u += 8;
424
424
  }
425
425
  if (2 & n.wrap && 35615 === c) {
426
- E[n.check = 0] = 255 & c, E[1] = c >>> 8 & 255, n.check = O(n.check, E, 2, 0), u = c = 0, n.mode = 2;
426
+ E[n.check = 0] = 255 & c, E[1] = c >>> 8 & 255, n.check = L(n.check, E, 2, 0), u = c = 0, n.mode = 2;
427
427
  break;
428
428
  }
429
429
  if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & c) << 8) + (c >> 8)) % 31) {
@@ -456,21 +456,21 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
456
456
  t.msg = "unknown header flags set", n.mode = 30;
457
457
  break;
458
458
  }
459
- n.head && (n.head.text = c >> 8 & 1), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = O(n.check, E, 2, 0)), u = c = 0, n.mode = 3;
459
+ n.head && (n.head.text = c >> 8 & 1), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = L(n.check, E, 2, 0)), u = c = 0, n.mode = 3;
460
460
  case 3:
461
461
  for (; u < 32;) {
462
462
  if (0 === s)
463
463
  break t;
464
464
  s--, c += i[a++] << u, u += 8;
465
465
  }
466
- n.head && (n.head.time = c), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, E[2] = c >>> 16 & 255, E[3] = c >>> 24 & 255, n.check = O(n.check, E, 4, 0)), u = c = 0, n.mode = 4;
466
+ n.head && (n.head.time = c), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, E[2] = c >>> 16 & 255, E[3] = c >>> 24 & 255, n.check = L(n.check, E, 4, 0)), u = c = 0, n.mode = 4;
467
467
  case 4:
468
468
  for (; u < 16;) {
469
469
  if (0 === s)
470
470
  break t;
471
471
  s--, c += i[a++] << u, u += 8;
472
472
  }
473
- n.head && (n.head.xflags = 255 & c, n.head.os = c >> 8), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = O(n.check, E, 2, 0)), u = c = 0, n.mode = 5;
473
+ n.head && (n.head.xflags = 255 & c, n.head.os = c >> 8), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = L(n.check, E, 2, 0)), u = c = 0, n.mode = 5;
474
474
  case 5:
475
475
  if (1024 & n.flags) {
476
476
  for (; u < 16;) {
@@ -478,13 +478,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
478
478
  break t;
479
479
  s--, c += i[a++] << u, u += 8;
480
480
  }
481
- n.length = c, n.head && (n.head.extra_len = c), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = O(n.check, E, 2, 0)), u = c = 0;
481
+ n.length = c, n.head && (n.head.extra_len = c), 512 & n.flags && (E[0] = 255 & c, E[1] = c >>> 8 & 255, n.check = L(n.check, E, 2, 0)), u = c = 0;
482
482
  }
483
483
  else
484
484
  n.head && (n.head.extra = null);
485
485
  n.mode = 6;
486
486
  case 6:
487
- if (1024 & n.flags && (s < (p = n.length) && (p = s), p && (n.head && (b = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), D.arraySet(n.head.extra, i, a, p, b)), 512 & n.flags && (n.check = O(n.check, i, p, a)), s -= p, a += p, n.length -= p), n.length))
487
+ if (1024 & n.flags && (s < (p = n.length) && (p = s), p && (n.head && (b = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), D.arraySet(n.head.extra, i, a, p, b)), 512 & n.flags && (n.check = L(n.check, i, p, a)), s -= p, a += p, n.length -= p), n.length))
488
488
  break t;
489
489
  n.length = 0, n.mode = 7;
490
490
  case 7:
@@ -493,7 +493,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
493
493
  break t;
494
494
  for (p = 0; b = i[a + p++], n.head && b && n.length < 65536 && (n.head.name += String.fromCharCode(b)), b && p < s;)
495
495
  ;
496
- if (512 & n.flags && (n.check = O(n.check, i, p, a)), s -= p, a += p, b)
496
+ if (512 & n.flags && (n.check = L(n.check, i, p, a)), s -= p, a += p, b)
497
497
  break t;
498
498
  }
499
499
  else
@@ -505,7 +505,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
505
505
  break t;
506
506
  for (p = 0; b = i[a + p++], n.head && b && n.length < 65536 && (n.head.comment += String.fromCharCode(b)), b && p < s;)
507
507
  ;
508
- if (512 & n.flags && (n.check = O(n.check, i, p, a)), s -= p, a += p, b)
508
+ if (512 & n.flags && (n.check = L(n.check, i, p, a)), s -= p, a += p, b)
509
509
  break t;
510
510
  }
511
511
  else
@@ -554,7 +554,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
554
554
  n.mode = 14;
555
555
  break;
556
556
  case 1:
557
- if (V(n), n.mode = 20, 6 !== e)
557
+ if (j(n), n.mode = 20, 6 !== e)
558
558
  break;
559
559
  c >>>= 2, u -= 2;
560
560
  break t;
@@ -779,7 +779,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
779
779
  break t;
780
780
  s--, c |= i[a++] << u, u += 8;
781
781
  }
782
- if (d -= l, t.total_out += d, n.total += d, d && (t.adler = n.check = (n.flags ? O : L)(n.check, r, d, o - d)), d = l, (n.flags ? c : z(c)) !== n.check) {
782
+ if (d -= l, t.total_out += d, n.total += d, d && (t.adler = n.check = (n.flags ? L : O)(n.check, r, d, o - d)), d = l, (n.flags ? c : z(c)) !== n.check) {
783
783
  t.msg = "incorrect data check", n.mode = 30;
784
784
  break;
785
785
  }
@@ -809,34 +809,34 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
809
809
  case 31: return -4;
810
810
  case 32:
811
811
  default: return B;
812
- } return t.next_out = o, t.avail_out = l, t.next_in = a, t.avail_in = s, n.hold = c, n.bits = u, (n.wsize || d !== t.avail_out && n.mode < 30 && (n.mode < 27 || 4 !== e)) && U(t, t.output, t.next_out, d - t.avail_out) ? (n.mode = 31, -4) : (h -= t.avail_in, d -= t.avail_out, t.total_in += h, t.total_out += d, n.total += d, n.wrap && d && (t.adler = n.check = (n.flags ? O : L)(n.check, r, d, t.next_out - d)), t.data_type = n.bits + (n.last ? 64 : 0) + (12 === n.mode ? 128 : 0) + (20 === n.mode || 15 === n.mode ? 256 : 0), (0 == h && 0 === d || 4 === e) && M === N && (M = -5), M); }, n.inflateEnd = function (t) { if (!t || !t.state)
813
- return B; var e = t.state; return e.window && (e.window = null), t.state = null, N; }, n.inflateGetHeader = function (t, e) { var n; return !t || !t.state || 0 == (2 & (n = t.state).wrap) ? B : ((n.head = e).done = !1, N); }, n.inflateSetDictionary = function (t, e) { var n, i = e.length; return !t || !t.state || 0 !== (n = t.state).wrap && 11 !== n.mode ? B : 11 === n.mode && L(1, e, i, 0) !== n.check ? -3 : U(t, e, i, i) ? (n.mode = 31, -4) : (n.havedict = 1, N); }, n.inflateInfo = "pako inflate (from Nodeca project)";
812
+ } return t.next_out = o, t.avail_out = l, t.next_in = a, t.avail_in = s, n.hold = c, n.bits = u, (n.wsize || d !== t.avail_out && n.mode < 30 && (n.mode < 27 || 4 !== e)) && V(t, t.output, t.next_out, d - t.avail_out) ? (n.mode = 31, -4) : (h -= t.avail_in, d -= t.avail_out, t.total_in += h, t.total_out += d, n.total += d, n.wrap && d && (t.adler = n.check = (n.flags ? L : O)(n.check, r, d, t.next_out - d)), t.data_type = n.bits + (n.last ? 64 : 0) + (12 === n.mode ? 128 : 0) + (20 === n.mode || 15 === n.mode ? 256 : 0), (0 == h && 0 === d || 4 === e) && M === N && (M = -5), M); }, n.inflateEnd = function (t) { if (!t || !t.state)
813
+ return B; var e = t.state; return e.window && (e.window = null), t.state = null, N; }, n.inflateGetHeader = function (t, e) { var n; return !t || !t.state || 0 == (2 & (n = t.state).wrap) ? B : ((n.head = e).done = !1, N); }, n.inflateSetDictionary = function (t, e) { var n, i = e.length; return !t || !t.state || 0 !== (n = t.state).wrap && 11 !== n.mode ? B : 11 === n.mode && O(1, e, i, 0) !== n.check ? -3 : V(t, e, i, i) ? (n.mode = 31, -4) : (n.havedict = 1, N); }, n.inflateInfo = "pako inflate (from Nodeca project)";
814
814
  }, { "../utils/common": 4, "./adler32": 6, "./crc32": 8, "./inffast": 11, "./inftrees": 13 }], 13: [function (t, e, n) {
815
815
  "use strict";
816
816
  var R = t("../utils/common"), k = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], N = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], B = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], F = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
817
- e.exports = function (t, e, n, i, r, a, o, s) { var l, c, u, h, d, p, f, m, g, v = s.bits, y = 0, x = 0, _ = 0, w = 0, b = 0, M = 0, S = 0, C = 0, T = 0, E = 0, A = null, D = 0, L = new R.Buf16(16), O = new R.Buf16(16), I = null, P = 0; for (y = 0; y <= 15; y++)
818
- L[y] = 0; for (x = 0; x < i; x++)
819
- L[e[n + x]]++; for (b = v, w = 15; 1 <= w && 0 === L[w]; w--)
817
+ e.exports = function (t, e, n, i, r, a, o, s) { var l, c, u, h, d, p, f, m, g, v = s.bits, y = 0, x = 0, _ = 0, w = 0, b = 0, M = 0, S = 0, C = 0, T = 0, E = 0, A = null, D = 0, O = new R.Buf16(16), L = new R.Buf16(16), I = null, P = 0; for (y = 0; y <= 15; y++)
818
+ O[y] = 0; for (x = 0; x < i; x++)
819
+ O[e[n + x]]++; for (b = v, w = 15; 1 <= w && 0 === O[w]; w--)
820
820
  ; if (w < b && (b = w), 0 === w)
821
- return r[a++] = 20971520, r[a++] = 20971520, s.bits = 1, 0; for (_ = 1; _ < w && 0 === L[_]; _++)
821
+ return r[a++] = 20971520, r[a++] = 20971520, s.bits = 1, 0; for (_ = 1; _ < w && 0 === O[_]; _++)
822
822
  ; for (b < _ && (b = _), y = C = 1; y <= 15; y++)
823
- if (C <<= 1, (C -= L[y]) < 0)
823
+ if (C <<= 1, (C -= O[y]) < 0)
824
824
  return -1; if (0 < C && (0 === t || 1 !== w))
825
- return -1; for (O[1] = 0, y = 1; y < 15; y++)
826
- O[y + 1] = O[y] + L[y]; for (x = 0; x < i; x++)
827
- 0 !== e[n + x] && (o[O[e[n + x]]++] = x); if (p = 0 === t ? (A = I = o, 19) : 1 === t ? (A = k, D -= 257, I = N, P -= 257, 256) : (A = B, I = F, -1), y = _, d = a, S = x = E = 0, u = -1, h = (T = 1 << (M = b)) - 1, 1 === t && 852 < T || 2 === t && 592 < T)
825
+ return -1; for (L[1] = 0, y = 1; y < 15; y++)
826
+ L[y + 1] = L[y] + O[y]; for (x = 0; x < i; x++)
827
+ 0 !== e[n + x] && (o[L[e[n + x]]++] = x); if (p = 0 === t ? (A = I = o, 19) : 1 === t ? (A = k, D -= 257, I = N, P -= 257, 256) : (A = B, I = F, -1), y = _, d = a, S = x = E = 0, u = -1, h = (T = 1 << (M = b)) - 1, 1 === t && 852 < T || 2 === t && 592 < T)
828
828
  return 1; for (;;) {
829
829
  for (f = y - S, g = o[x] < p ? (m = 0, o[x]) : o[x] > p ? (m = I[P + o[x]], A[D + o[x]]) : (m = 96, 0), l = 1 << y - S, _ = c = 1 << M; r[d + (E >> S) + (c -= l)] = f << 24 | m << 16 | g | 0, 0 !== c;)
830
830
  ;
831
831
  for (l = 1 << y - 1; E & l;)
832
832
  l >>= 1;
833
- if (0 !== l ? (E &= l - 1, E += l) : E = 0, x++, 0 == --L[y]) {
833
+ if (0 !== l ? (E &= l - 1, E += l) : E = 0, x++, 0 == --O[y]) {
834
834
  if (y === w)
835
835
  break;
836
836
  y = e[n + o[x]];
837
837
  }
838
838
  if (b < y && (E & h) !== u) {
839
- for (0 === S && (S = b), d += _, C = 1 << (M = y - S); M + S < w && !((C -= L[M + S]) <= 0);)
839
+ for (0 === S && (S = b), d += _, C = 1 << (M = y - S); M + S < w && !((C -= O[M + S]) <= 0);)
840
840
  M++, C <<= 1;
841
841
  if (T += 1 << M, 1 === t && 852 < T || 2 === t && 592 < T)
842
842
  return 1;
@@ -859,23 +859,23 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
859
859
  i(A);
860
860
  var D = new Array(256);
861
861
  i(D);
862
- var L = new Array(o);
863
- i(L);
864
- var O, I, P, R = new Array(p);
862
+ var O = new Array(o);
863
+ i(O);
864
+ var L, I, P, R = new Array(p);
865
865
  function k(t, e, n, i, r) { this.static_tree = t, this.extra_bits = e, this.extra_base = n, this.elems = i, this.max_length = r, this.has_stree = t && t.length; }
866
866
  function a(t, e) { this.dyn_tree = t, this.max_code = 0, this.stat_desc = e; }
867
867
  function N(t) { return t < 256 ? A[t] : A[256 + (t >>> 7)]; }
868
868
  function B(t, e) { t.pending_buf[t.pending++] = 255 & e, t.pending_buf[t.pending++] = e >>> 8 & 255; }
869
869
  function F(t, e, n) { t.bi_valid > r - n ? (t.bi_buf |= e << t.bi_valid & 65535, B(t, t.bi_buf), t.bi_buf = e >> r - t.bi_valid, t.bi_valid += n - r) : (t.bi_buf |= e << t.bi_valid & 65535, t.bi_valid += n); }
870
870
  function z(t, e, n) { F(t, n[2 * e], n[2 * e + 1]); }
871
- function V(t, e) { for (var n = 0; n |= 1 & t, t >>>= 1, n <<= 1, 0 < --e;)
871
+ function j(t, e) { for (var n = 0; n |= 1 & t, t >>>= 1, n <<= 1, 0 < --e;)
872
872
  ; return n >>> 1; }
873
- function U(t, e, n) { var i, r, a = new Array(v + 1), o = 0; for (i = 1; i <= v; i++)
873
+ function V(t, e, n) { var i, r, a = new Array(v + 1), o = 0; for (i = 1; i <= v; i++)
874
874
  a[i] = o = o + n[i - 1] << 1; for (r = 0; r <= e; r++) {
875
875
  var s = t[2 * r + 1];
876
- 0 !== s && (t[2 * r] = V(a[s]++, s));
876
+ 0 !== s && (t[2 * r] = j(a[s]++, s));
877
877
  } }
878
- function j(t) { var e; for (e = 0; e < d; e++)
878
+ function U(t) { var e; for (e = 0; e < d; e++)
879
879
  t.dyn_ltree[2 * e] = 0; for (e = 0; e < p; e++)
880
880
  t.dyn_dtree[2 * e] = 0; for (e = 0; e < f; e++)
881
881
  t.bl_tree[2 * e] = 0; t.dyn_ltree[2 * y] = 1, t.opt_len = t.static_len = 0, t.last_lit = t.matches = 0; }
@@ -884,7 +884,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
884
884
  function W(t, e, n) { for (var i = t.heap[n], r = n << 1; r <= t.heap_len && (r < t.heap_len && H(e, t.heap[r + 1], t.heap[r], t.depth) && r++, !H(e, i, t.heap[r], t.depth));)
885
885
  t.heap[n] = t.heap[r], n = r, r <<= 1; t.heap[n] = i; }
886
886
  function J(t, e, n) { var i, r, a, o, s = 0; if (0 !== t.last_lit)
887
- for (; i = t.pending_buf[t.d_buf + 2 * s] << 8 | t.pending_buf[t.d_buf + 2 * s + 1], r = t.pending_buf[t.l_buf + s], s++, 0 === i ? z(t, r, e) : (z(t, (a = D[r]) + h + 1, e), 0 !== (o = b[a]) && F(t, r -= L[a], o), z(t, a = N(--i), n), 0 !== (o = M[a]) && F(t, i -= R[a], o)), s < t.last_lit;)
887
+ for (; i = t.pending_buf[t.d_buf + 2 * s] << 8 | t.pending_buf[t.d_buf + 2 * s + 1], r = t.pending_buf[t.l_buf + s], s++, 0 === i ? z(t, r, e) : (z(t, (a = D[r]) + h + 1, e), 0 !== (o = b[a]) && F(t, r -= O[a], o), z(t, a = N(--i), n), 0 !== (o = M[a]) && F(t, i -= R[a], o)), s < t.last_lit;)
888
888
  ; z(t, y, e); }
889
889
  function q(t, e) { var n, i, r, a = e.dyn_tree, o = e.stat_desc.static_tree, s = e.stat_desc.has_stree, l = e.stat_desc.elems, c = -1; for (t.heap_len = 0, t.heap_max = g, n = 0; n < l; n++)
890
890
  0 !== a[2 * n] ? (t.heap[++t.heap_len] = c = n, t.depth[n] = 0) : a[2 * n + 1] = 0; for (; t.heap_len < 2;)
@@ -901,7 +901,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
901
901
  for (a = f; 0 !== a; a--)
902
902
  for (i = t.bl_count[a]; 0 !== i;)
903
903
  c < (r = t.heap[--n]) || (l[2 * r + 1] !== a && (t.opt_len += (a - l[2 * r + 1]) * l[2 * r], l[2 * r + 1] = a), i--);
904
- } }(t, e), U(a, c, t.bl_count); }
904
+ } }(t, e), V(a, c, t.bl_count); }
905
905
  function X(t, e, n) { var i, r, a = -1, o = e[1], s = 0, l = 7, c = 4; for (0 === o && (l = 138, c = 3), e[2 * (n + 1) + 1] = 65535, i = 0; i <= n; i++)
906
906
  r = o, o = e[2 * (i + 1) + 1], ++s < l && r === o || (s < c ? t.bl_tree[2 * r] += s : 0 !== r ? (r !== a && t.bl_tree[2 * r]++, t.bl_tree[2 * x]++) : s <= 10 ? t.bl_tree[2 * _]++ : t.bl_tree[2 * w]++, a = r, c = (s = 0) === o ? (l = 138, 3) : r === o ? (l = 6, 3) : (l = 7, 4)); }
907
907
  function Y(t, e, n) { var i, r, a = -1, o = e[1], s = 0, l = 7, c = 4; for (0 === o && (l = 138, c = 3), i = 0; i <= n; i++)
@@ -917,7 +917,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
917
917
  var Z = !1;
918
918
  function $(t, e, n, i) { var r, a, o, s; F(t, (u << 1) + (i ? 1 : 0), 3), a = e, o = n, s = !0, G(r = t), s && (B(r, o), B(r, ~o)), l.arraySet(r.pending_buf, r.window, a, o, r.pending), r.pending += o; }
919
919
  n._tr_init = function (t) { Z || (function () { var t, e, n, i, r, a = new Array(v + 1); for (i = n = 0; i < o - 1; i++)
920
- for (L[i] = n, t = 0; t < 1 << b[i]; t++)
920
+ for (O[i] = n, t = 0; t < 1 << b[i]; t++)
921
921
  D[n++] = i; for (D[n - 1] = i, i = r = 0; i < 16; i++)
922
922
  for (R[i] = r, t = 0; t < 1 << M[i]; t++)
923
923
  A[r++] = i; for (r >>= 7; i < p; i++)
@@ -927,31 +927,31 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
927
927
  T[2 * t + 1] = 8, t++, a[8]++; for (; t <= 255;)
928
928
  T[2 * t + 1] = 9, t++, a[9]++; for (; t <= 279;)
929
929
  T[2 * t + 1] = 7, t++, a[7]++; for (; t <= 287;)
930
- T[2 * t + 1] = 8, t++, a[8]++; for (U(T, d + 1, a), t = 0; t < p; t++)
931
- E[2 * t + 1] = 5, E[2 * t] = V(t, 5); O = new k(T, b, h + 1, d, v), I = new k(E, M, 0, p, v), P = new k(new Array(0), S, 0, f, m); }(), Z = !0), t.l_desc = new a(t.dyn_ltree, O), t.d_desc = new a(t.dyn_dtree, I), t.bl_desc = new a(t.bl_tree, P), t.bi_buf = 0, t.bi_valid = 0, j(t); }, n._tr_stored_block = $, n._tr_flush_block = function (t, e, n, i) { var r, a, o = 0; 0 < t.level ? (2 === t.strm.data_type && (t.strm.data_type = function (t) { var e, n = 4093624447; for (e = 0; e <= 31; e++, n >>>= 1)
930
+ T[2 * t + 1] = 8, t++, a[8]++; for (V(T, d + 1, a), t = 0; t < p; t++)
931
+ E[2 * t + 1] = 5, E[2 * t] = j(t, 5); L = new k(T, b, h + 1, d, v), I = new k(E, M, 0, p, v), P = new k(new Array(0), S, 0, f, m); }(), Z = !0), t.l_desc = new a(t.dyn_ltree, L), t.d_desc = new a(t.dyn_dtree, I), t.bl_desc = new a(t.bl_tree, P), t.bi_buf = 0, t.bi_valid = 0, U(t); }, n._tr_stored_block = $, n._tr_flush_block = function (t, e, n, i) { var r, a, o = 0; 0 < t.level ? (2 === t.strm.data_type && (t.strm.data_type = function (t) { var e, n = 4093624447; for (e = 0; e <= 31; e++, n >>>= 1)
932
932
  if (1 & n && 0 !== t.dyn_ltree[2 * e])
933
933
  return s; if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26])
934
934
  return c; for (e = 32; e < h; e++)
935
935
  if (0 !== t.dyn_ltree[2 * e])
936
936
  return c; return s; }(t)), q(t, t.l_desc), q(t, t.d_desc), o = function (t) { var e; for (X(t, t.dyn_ltree, t.l_desc.max_code), X(t, t.dyn_dtree, t.d_desc.max_code), q(t, t.bl_desc), e = f - 1; 3 <= e && 0 === t.bl_tree[2 * C[e] + 1]; e--)
937
937
  ; return t.opt_len += 3 * (e + 1) + 5 + 5 + 4, e; }(t), r = t.opt_len + 3 + 7 >>> 3, (a = t.static_len + 3 + 7 >>> 3) <= r && (r = a)) : r = a = n + 5, n + 4 <= r && -1 !== e ? $(t, e, n, i) : 4 === t.strategy || a === r ? (F(t, 2 + (i ? 1 : 0), 3), J(t, T, E)) : (F(t, 4 + (i ? 1 : 0), 3), function (t, e, n, i) { var r; for (F(t, e - 257, 5), F(t, n - 1, 5), F(t, i - 4, 4), r = 0; r < i; r++)
938
- F(t, t.bl_tree[2 * C[r] + 1], 3); Y(t, t.dyn_ltree, e - 1), Y(t, t.dyn_dtree, n - 1); }(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, o + 1), J(t, t.dyn_ltree, t.dyn_dtree)), j(t), i && G(t); }, n._tr_tally = function (t, e, n) { return t.pending_buf[t.d_buf + 2 * t.last_lit] = e >>> 8 & 255, t.pending_buf[t.d_buf + 2 * t.last_lit + 1] = 255 & e, t.pending_buf[t.l_buf + t.last_lit] = 255 & n, t.last_lit++, 0 === e ? t.dyn_ltree[2 * n]++ : (t.matches++, e--, t.dyn_ltree[2 * (D[n] + h + 1)]++, t.dyn_dtree[2 * N(e)]++), t.last_lit === t.lit_bufsize - 1; }, n._tr_align = function (t) { var e; F(t, 2, 3), z(t, y, T), 16 === (e = t).bi_valid ? (B(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8); };
938
+ F(t, t.bl_tree[2 * C[r] + 1], 3); Y(t, t.dyn_ltree, e - 1), Y(t, t.dyn_dtree, n - 1); }(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, o + 1), J(t, t.dyn_ltree, t.dyn_dtree)), U(t), i && G(t); }, n._tr_tally = function (t, e, n) { return t.pending_buf[t.d_buf + 2 * t.last_lit] = e >>> 8 & 255, t.pending_buf[t.d_buf + 2 * t.last_lit + 1] = 255 & e, t.pending_buf[t.l_buf + t.last_lit] = 255 & n, t.last_lit++, 0 === e ? t.dyn_ltree[2 * n]++ : (t.matches++, e--, t.dyn_ltree[2 * (D[n] + h + 1)]++, t.dyn_dtree[2 * N(e)]++), t.last_lit === t.lit_bufsize - 1; }, n._tr_align = function (t) { var e; F(t, 2, 3), z(t, y, T), 16 === (e = t).bi_valid ? (B(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : 8 <= e.bi_valid && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8); };
939
939
  }, { "../utils/common": 4 }], 16: [function (t, e, n) {
940
940
  "use strict";
941
941
  e.exports = function () { this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0; };
942
- }, {}], 17: [function (t, e, n) { var nt = t("three"); nt.OrbitControls = function (t, e) { var n, i, r, a, o; void 0 === e && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), e === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = t, this.domElement = e, this.enabled = !0, this.target = new nt.Vector3, this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = .05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: nt.MOUSE.ROTATE, MIDDLE: nt.MOUSE.DOLLY, RIGHT: nt.MOUSE.PAN }, this.touches = { ONE: nt.TOUCH.ROTATE, TWO: nt.TOUCH.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function () { return f.phi; }, this.getAzimuthalAngle = function () { return f.theta; }, this.saveState = function () { s.target0.copy(s.target), s.position0.copy(s.object.position), s.zoom0 = s.object.zoom; }, this.reset = function () { s.target.copy(s.target0), s.object.position.copy(s.position0), s.object.zoom = s.zoom0, s.object.updateProjectionMatrix(), s.dispatchEvent(l), s.update(), d = h.NONE; }, this.update = (n = new nt.Vector3, i = (new nt.Quaternion).setFromUnitVectors(t.up, new nt.Vector3(0, 1, 0)), r = i.clone().inverse(), a = new nt.Vector3, o = new nt.Quaternion, function () { var t = s.object.position; return n.copy(t).sub(s.target), n.applyQuaternion(i), f.setFromVector3(n), s.autoRotate && d === h.NONE && D(2 * Math.PI / 60 / 60 * s.autoRotateSpeed), s.enableDamping ? (f.theta += m.theta * s.dampingFactor, f.phi += m.phi * s.dampingFactor) : (f.theta += m.theta, f.phi += m.phi), f.theta = Math.max(s.minAzimuthAngle, Math.min(s.maxAzimuthAngle, f.theta)), f.phi = Math.max(s.minPolarAngle, Math.min(s.maxPolarAngle, f.phi)), f.makeSafe(), f.radius *= g, f.radius = Math.max(s.minDistance, Math.min(s.maxDistance, f.radius)), !0 === s.enableDamping ? s.target.addScaledVector(v, s.dampingFactor) : s.target.add(v), n.setFromSpherical(f), n.applyQuaternion(r), t.copy(s.target).add(n), s.object.lookAt(s.target), !0 === s.enableDamping ? (m.theta *= 1 - s.dampingFactor, m.phi *= 1 - s.dampingFactor, v.multiplyScalar(1 - s.dampingFactor)) : (m.set(0, 0, 0), v.set(0, 0, 0)), g = 1, !(!(y || a.distanceToSquared(s.object.position) > p || 8 * (1 - o.dot(s.object.quaternion)) > p) || (s.dispatchEvent(l), a.copy(s.object.position), o.copy(s.object.quaternion), y = !1)); }), this.dispose = function () { s.domElement.removeEventListener("contextmenu", et, !1), s.domElement.removeEventListener("mousedown", q, !1), s.domElement.removeEventListener("wheel", Z, !1), s.domElement.removeEventListener("touchstart", K, !1), s.domElement.removeEventListener("touchend", tt, !1), s.domElement.removeEventListener("touchmove", Q, !1), document.removeEventListener("mousemove", X, !1), document.removeEventListener("mouseup", Y, !1), s.domElement.removeEventListener("keydown", $, !1); }; var s = this, l = { type: "change" }, c = { type: "start" }, u = { type: "end" }, h = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_PAN: 4, TOUCH_DOLLY_PAN: 5, TOUCH_DOLLY_ROTATE: 6 }, d = h.NONE, p = 1e-6, f = new nt.Spherical, m = new nt.Spherical, g = 1, v = new nt.Vector3, y = !1, x = new nt.Vector2, _ = new nt.Vector2, w = new nt.Vector2, b = new nt.Vector2, M = new nt.Vector2, S = new nt.Vector2, C = new nt.Vector2, T = new nt.Vector2, E = new nt.Vector2; function A() { return Math.pow(.95, s.zoomSpeed); } function D(t) { m.theta -= t; } function L(t) { m.phi -= t; } var O, I, P, R = (O = new nt.Vector3, function (t, e) { O.setFromMatrixColumn(e, 0), O.multiplyScalar(-t), v.add(O); }), k = (I = new nt.Vector3, function (t, e) { !0 === s.screenSpacePanning ? I.setFromMatrixColumn(e, 1) : (I.setFromMatrixColumn(e, 0), I.crossVectors(s.object.up, I)), I.multiplyScalar(t), v.add(I); }), N = (P = new nt.Vector3, function (t, e) { var n = s.domElement; if (s.object.isPerspectiveCamera) {
942
+ }, {}], 17: [function (t, e, n) { var nt = t("three"); nt.OrbitControls = function (t, e) { var n, i, r, a, o; void 0 === e && console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'), e === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.object = t, this.domElement = e, this.enabled = !0, this.target = new nt.Vector3, this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = .05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !1, this.keyPanSpeed = 7, this.autoRotate = !1, this.autoRotateSpeed = 2, this.enableKeys = !0, this.keys = { LEFT: 37, UP: 38, RIGHT: 39, BOTTOM: 40 }, this.mouseButtons = { LEFT: nt.MOUSE.ROTATE, MIDDLE: nt.MOUSE.DOLLY, RIGHT: nt.MOUSE.PAN }, this.touches = { ONE: nt.TOUCH.ROTATE, TWO: nt.TOUCH.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this.getPolarAngle = function () { return f.phi; }, this.getAzimuthalAngle = function () { return f.theta; }, this.saveState = function () { s.target0.copy(s.target), s.position0.copy(s.object.position), s.zoom0 = s.object.zoom; }, this.reset = function () { s.target.copy(s.target0), s.object.position.copy(s.position0), s.object.zoom = s.zoom0, s.object.updateProjectionMatrix(), s.dispatchEvent(l), s.update(), d = h.NONE; }, this.update = (n = new nt.Vector3, i = (new nt.Quaternion).setFromUnitVectors(t.up, new nt.Vector3(0, 1, 0)), r = i.clone().inverse(), a = new nt.Vector3, o = new nt.Quaternion, function () { var t = s.object.position; return n.copy(t).sub(s.target), n.applyQuaternion(i), f.setFromVector3(n), s.autoRotate && d === h.NONE && D(2 * Math.PI / 60 / 60 * s.autoRotateSpeed), s.enableDamping ? (f.theta += m.theta * s.dampingFactor, f.phi += m.phi * s.dampingFactor) : (f.theta += m.theta, f.phi += m.phi), f.theta = Math.max(s.minAzimuthAngle, Math.min(s.maxAzimuthAngle, f.theta)), f.phi = Math.max(s.minPolarAngle, Math.min(s.maxPolarAngle, f.phi)), f.makeSafe(), f.radius *= g, f.radius = Math.max(s.minDistance, Math.min(s.maxDistance, f.radius)), !0 === s.enableDamping ? s.target.addScaledVector(v, s.dampingFactor) : s.target.add(v), n.setFromSpherical(f), n.applyQuaternion(r), t.copy(s.target).add(n), s.object.lookAt(s.target), !0 === s.enableDamping ? (m.theta *= 1 - s.dampingFactor, m.phi *= 1 - s.dampingFactor, v.multiplyScalar(1 - s.dampingFactor)) : (m.set(0, 0, 0), v.set(0, 0, 0)), g = 1, !(!(y || a.distanceToSquared(s.object.position) > p || 8 * (1 - o.dot(s.object.quaternion)) > p) || (s.dispatchEvent(l), a.copy(s.object.position), o.copy(s.object.quaternion), y = !1)); }), this.dispose = function () { s.domElement.removeEventListener("contextmenu", et, !1), s.domElement.removeEventListener("mousedown", q, !1), s.domElement.removeEventListener("wheel", Z, !1), s.domElement.removeEventListener("touchstart", K, !1), s.domElement.removeEventListener("touchend", tt, !1), s.domElement.removeEventListener("touchmove", Q, !1), document.removeEventListener("mousemove", X, !1), document.removeEventListener("mouseup", Y, !1), s.domElement.removeEventListener("keydown", $, !1); }; var s = this, l = { type: "change" }, c = { type: "start" }, u = { type: "end" }, h = { NONE: -1, ROTATE: 0, DOLLY: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_PAN: 4, TOUCH_DOLLY_PAN: 5, TOUCH_DOLLY_ROTATE: 6 }, d = h.NONE, p = 1e-6, f = new nt.Spherical, m = new nt.Spherical, g = 1, v = new nt.Vector3, y = !1, x = new nt.Vector2, _ = new nt.Vector2, w = new nt.Vector2, b = new nt.Vector2, M = new nt.Vector2, S = new nt.Vector2, C = new nt.Vector2, T = new nt.Vector2, E = new nt.Vector2; function A() { return Math.pow(.95, s.zoomSpeed); } function D(t) { m.theta -= t; } function O(t) { m.phi -= t; } var L, I, P, R = (L = new nt.Vector3, function (t, e) { L.setFromMatrixColumn(e, 0), L.multiplyScalar(-t), v.add(L); }), k = (I = new nt.Vector3, function (t, e) { !0 === s.screenSpacePanning ? I.setFromMatrixColumn(e, 1) : (I.setFromMatrixColumn(e, 0), I.crossVectors(s.object.up, I)), I.multiplyScalar(t), v.add(I); }), N = (P = new nt.Vector3, function (t, e) { var n = s.domElement; if (s.object.isPerspectiveCamera) {
943
943
  var i = s.object.position;
944
944
  P.copy(i).sub(s.target);
945
945
  var r = P.length();
946
946
  r *= Math.tan(s.object.fov / 2 * Math.PI / 180), R(2 * t * r / n.clientHeight, s.object.matrix), k(2 * e * r / n.clientHeight, s.object.matrix);
947
947
  }
948
948
  else
949
- s.object.isOrthographicCamera ? (R(t * (s.object.right - s.object.left) / s.object.zoom / n.clientWidth, s.object.matrix), k(e * (s.object.top - s.object.bottom) / s.object.zoom / n.clientHeight, s.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), s.enablePan = !1); }); function B(t) { s.object.isPerspectiveCamera ? g /= t : s.object.isOrthographicCamera ? (s.object.zoom = Math.max(s.minZoom, Math.min(s.maxZoom, s.object.zoom * t)), s.object.updateProjectionMatrix(), y = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), s.enableZoom = !1); } function F(t) { s.object.isPerspectiveCamera ? g *= t : s.object.isOrthographicCamera ? (s.object.zoom = Math.max(s.minZoom, Math.min(s.maxZoom, s.object.zoom / t)), s.object.updateProjectionMatrix(), y = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), s.enableZoom = !1); } function z(t) { x.set(t.clientX, t.clientY); } function V(t) { b.set(t.clientX, t.clientY); } function U(t) { if (1 == t.touches.length)
949
+ s.object.isOrthographicCamera ? (R(t * (s.object.right - s.object.left) / s.object.zoom / n.clientWidth, s.object.matrix), k(e * (s.object.top - s.object.bottom) / s.object.zoom / n.clientHeight, s.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), s.enablePan = !1); }); function B(t) { s.object.isPerspectiveCamera ? g /= t : s.object.isOrthographicCamera ? (s.object.zoom = Math.max(s.minZoom, Math.min(s.maxZoom, s.object.zoom * t)), s.object.updateProjectionMatrix(), y = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), s.enableZoom = !1); } function F(t) { s.object.isPerspectiveCamera ? g *= t : s.object.isOrthographicCamera ? (s.object.zoom = Math.max(s.minZoom, Math.min(s.maxZoom, s.object.zoom / t)), s.object.updateProjectionMatrix(), y = !0) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), s.enableZoom = !1); } function z(t) { x.set(t.clientX, t.clientY); } function j(t) { b.set(t.clientX, t.clientY); } function V(t) { if (1 == t.touches.length)
950
950
  x.set(t.touches[0].pageX, t.touches[0].pageY);
951
951
  else {
952
952
  var e = .5 * (t.touches[0].pageX + t.touches[1].pageX), n = .5 * (t.touches[0].pageY + t.touches[1].pageY);
953
953
  x.set(e, n);
954
- } } function j(t) { if (1 == t.touches.length)
954
+ } } function U(t) { if (1 == t.touches.length)
955
955
  b.set(t.touches[0].pageX, t.touches[0].pageY);
956
956
  else {
957
957
  var e = .5 * (t.touches[0].pageX + t.touches[1].pageX), n = .5 * (t.touches[0].pageY + t.touches[1].pageY);
@@ -961,7 +961,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
961
961
  else {
962
962
  var e = .5 * (t.touches[0].pageX + t.touches[1].pageX), n = .5 * (t.touches[0].pageY + t.touches[1].pageY);
963
963
  _.set(e, n);
964
- } w.subVectors(_, x).multiplyScalar(s.rotateSpeed); var i = s.domElement; D(2 * Math.PI * w.x / i.clientHeight), L(2 * Math.PI * w.y / i.clientHeight), x.copy(_); } function W(t) { if (1 == t.touches.length)
964
+ } w.subVectors(_, x).multiplyScalar(s.rotateSpeed); var i = s.domElement; D(2 * Math.PI * w.x / i.clientHeight), O(2 * Math.PI * w.y / i.clientHeight), x.copy(_); } function W(t) { if (1 == t.touches.length)
965
965
  M.set(t.touches[0].pageX, t.touches[0].pageY);
966
966
  else {
967
967
  var e = .5 * (t.touches[0].pageX + t.touches[1].pageX), n = .5 * (t.touches[0].pageY + t.touches[1].pageY);
@@ -974,7 +974,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
974
974
  if (t.ctrlKey || t.metaKey || t.shiftKey) {
975
975
  if (!1 === s.enablePan)
976
976
  return;
977
- V(t), d = h.PAN;
977
+ j(t), d = h.PAN;
978
978
  }
979
979
  else {
980
980
  if (!1 === s.enableRotate)
@@ -991,7 +991,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
991
991
  else {
992
992
  if (!1 === s.enablePan)
993
993
  return;
994
- V(t), d = h.PAN;
994
+ j(t), d = h.PAN;
995
995
  }
996
996
  break;
997
997
  default: d = h.NONE;
@@ -1007,7 +1007,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1007
1007
  case nt.MOUSE.PAN:
1008
1008
  if (!1 === s.enablePan)
1009
1009
  return;
1010
- V(t), d = h.PAN;
1010
+ j(t), d = h.PAN;
1011
1011
  break;
1012
1012
  default: d = h.NONE;
1013
1013
  }
@@ -1021,7 +1021,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1021
1021
  case nt.MOUSE.PAN:
1022
1022
  if (!1 === s.enablePan)
1023
1023
  return;
1024
- V(t), d = h.PAN;
1024
+ j(t), d = h.PAN;
1025
1025
  break;
1026
1026
  default: d = h.NONE;
1027
1027
  }
@@ -1033,7 +1033,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1033
1033
  case h.ROTATE:
1034
1034
  if (!1 === s.enableRotate)
1035
1035
  return;
1036
- !function (t) { _.set(t.clientX, t.clientY), w.subVectors(_, x).multiplyScalar(s.rotateSpeed); var e = s.domElement; D(2 * Math.PI * w.x / e.clientHeight), L(2 * Math.PI * w.y / e.clientHeight), x.copy(_), s.update(); }(t);
1036
+ !function (t) { _.set(t.clientX, t.clientY), w.subVectors(_, x).multiplyScalar(s.rotateSpeed); var e = s.domElement; D(2 * Math.PI * w.x / e.clientHeight), O(2 * Math.PI * w.y / e.clientHeight), x.copy(_), s.update(); }(t);
1037
1037
  break;
1038
1038
  case h.DOLLY:
1039
1039
  if (!1 === s.enableZoom)
@@ -1062,12 +1062,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1062
1062
  case nt.TOUCH.ROTATE:
1063
1063
  if (!1 === s.enableRotate)
1064
1064
  return;
1065
- U(t), d = h.TOUCH_ROTATE;
1065
+ V(t), d = h.TOUCH_ROTATE;
1066
1066
  break;
1067
1067
  case nt.TOUCH.PAN:
1068
1068
  if (!1 === s.enablePan)
1069
1069
  return;
1070
- j(t), d = h.TOUCH_PAN;
1070
+ U(t), d = h.TOUCH_PAN;
1071
1071
  break;
1072
1072
  default: d = h.NONE;
1073
1073
  }
@@ -1077,12 +1077,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1077
1077
  case nt.TOUCH.DOLLY_PAN:
1078
1078
  if (!1 === s.enableZoom && !1 === s.enablePan)
1079
1079
  return;
1080
- n = t, s.enableZoom && G(n), s.enablePan && j(n), d = h.TOUCH_DOLLY_PAN;
1080
+ n = t, s.enableZoom && G(n), s.enablePan && U(n), d = h.TOUCH_DOLLY_PAN;
1081
1081
  break;
1082
1082
  case nt.TOUCH.DOLLY_ROTATE:
1083
1083
  if (!1 === s.enableZoom && !1 === s.enableRotate)
1084
1084
  return;
1085
- e = t, s.enableZoom && G(e), s.enableRotate && U(e), d = h.TOUCH_DOLLY_ROTATE;
1085
+ e = t, s.enableZoom && G(e), s.enableRotate && V(e), d = h.TOUCH_DOLLY_ROTATE;
1086
1086
  break;
1087
1087
  default: d = h.NONE;
1088
1088
  }
@@ -1174,7 +1174,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1174
1174
  for (var r in i)
1175
1175
  Object.prototype.hasOwnProperty.call(i, r) && (e[r] = i[r]);
1176
1176
  } return e; });
1177
- var X = 0, Y = 1, Z = 2, F = 1, z = 2, V = 3, O = 0, St = 1, $ = 2, o = 0, v = 2, K = 0, Q = 1, tt = 2, et = 3, nt = 4, it = 5, rt = 100, at = 101, ot = 102, st = 103, lt = 104, ct = 200, ut = 201, ht = 202, dt = 203, pt = 204, ft = 205, mt = 206, gt = 207, vt = 208, yt = 209, xt = 210, _t = 0, wt = 1, bt = 2, Mt = 3, Ct = 4, Tt = 5, Et = 6, At = 7, U = 0, j = 1, G = 2, H = 0, Dt = 1, W = 2, J = 3, q = 4, Lt = 5, Ot = 301, It = 302, Pt = 303, Rt = 304, kt = 305, Nt = 306, Bt = 307, Ft = 1e3, zt = 1001, Vt = 1002, Ut = 1003, jt = 1004, Gt = 1005, Ht = 1006, Wt = 1007, Jt = 1008, qt = 1009, r = 1010, a = 1011, Xt = 1012, s = 1013, Yt = 1014, Zt = 1015, $t = 1016, l = 1017, c = 1018, u = 1019, Kt = 1020, h = 1021, Qt = 1022, te = 1023, d = 1024, p = 1025, i = te, ee = 1026, ne = 1027, f = 1028, m = 1029, g = 1030, y = 1031, x = 1032, _ = 1033, w = 33776, b = 33777, M = 33778, S = 33779, C = 35840, T = 35841, E = 35842, A = 35843, D = 36196, L = 37808, I = 37809, P = 37810, R = 37811, k = 37812, N = 37813, B = 37814, ie = 37815, re = 37816, ae = 37817, oe = 37818, se = 37819, le = 37820, ce = 37821, ue = 2300, he = 2301, de = 2400, pe = 2401, fe = 2402, me = 3e3, e = 3001, n = 3007, ge = 3002, ve = 3003, ye = 3004, xe = 3005, _e = 3006, we = 3200, be = 3201, Me = 0, Se = 1, Ce = 7680, Te = 519, Ee = 35044, Ae = 35048;
1177
+ var X = 0, Y = 1, Z = 2, F = 1, z = 2, j = 3, L = 0, St = 1, $ = 2, o = 0, v = 2, K = 0, Q = 1, tt = 2, et = 3, nt = 4, it = 5, rt = 100, at = 101, ot = 102, st = 103, lt = 104, ct = 200, ut = 201, ht = 202, dt = 203, pt = 204, ft = 205, mt = 206, gt = 207, vt = 208, yt = 209, xt = 210, _t = 0, wt = 1, bt = 2, Mt = 3, Ct = 4, Tt = 5, Et = 6, At = 7, V = 0, U = 1, G = 2, H = 0, Dt = 1, W = 2, J = 3, q = 4, Ot = 5, Lt = 301, It = 302, Pt = 303, Rt = 304, kt = 305, Nt = 306, Bt = 307, Ft = 1e3, zt = 1001, jt = 1002, Vt = 1003, Ut = 1004, Gt = 1005, Ht = 1006, Wt = 1007, Jt = 1008, qt = 1009, r = 1010, a = 1011, Xt = 1012, s = 1013, Yt = 1014, Zt = 1015, $t = 1016, l = 1017, c = 1018, u = 1019, Kt = 1020, h = 1021, Qt = 1022, te = 1023, d = 1024, p = 1025, i = te, ee = 1026, ne = 1027, f = 1028, m = 1029, g = 1030, y = 1031, x = 1032, _ = 1033, w = 33776, b = 33777, M = 33778, S = 33779, C = 35840, T = 35841, E = 35842, A = 35843, D = 36196, O = 37808, I = 37809, P = 37810, R = 37811, k = 37812, N = 37813, B = 37814, ie = 37815, re = 37816, ae = 37817, oe = 37818, se = 37819, le = 37820, ce = 37821, ue = 2300, he = 2301, de = 2400, pe = 2401, fe = 2402, me = 3e3, e = 3001, n = 3007, ge = 3002, ve = 3003, ye = 3004, xe = 3005, _e = 3006, we = 3200, be = 3201, Me = 0, Se = 1, Ce = 7680, Te = 519, Ee = 35044, Ae = 35048;
1178
1178
  function De() { }
1179
1179
  Object.assign(De.prototype, { addEventListener: function (t, e) { void 0 === this._listeners && (this._listeners = {}); var n = this._listeners; void 0 === n[t] && (n[t] = []), -1 === n[t].indexOf(e) && n[t].push(e); }, hasEventListener: function (t, e) { if (void 0 === this._listeners)
1180
1180
  return !1; var n = this._listeners; return void 0 !== n[t] && -1 !== n[t].indexOf(e); }, removeEventListener: function (t, e) { if (void 0 !== this._listeners) {
@@ -1191,9 +1191,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1191
1191
  n[i].call(this, t);
1192
1192
  }
1193
1193
  } } });
1194
- for (var Le = [], Oe = 0; Oe < 256; Oe++)
1195
- Le[Oe] = (Oe < 16 ? "0" : "") + Oe.toString(16);
1196
- var Ie, Pe = { DEG2RAD: Math.PI / 180, RAD2DEG: 180 / Math.PI, generateUUID: function () { var t = 4294967295 * Math.random() | 0, e = 4294967295 * Math.random() | 0, n = 4294967295 * Math.random() | 0, i = 4294967295 * Math.random() | 0; return (Le[255 & t] + Le[t >> 8 & 255] + Le[t >> 16 & 255] + Le[t >> 24 & 255] + "-" + Le[255 & e] + Le[e >> 8 & 255] + "-" + Le[e >> 16 & 15 | 64] + Le[e >> 24 & 255] + "-" + Le[63 & n | 128] + Le[n >> 8 & 255] + "-" + Le[n >> 16 & 255] + Le[n >> 24 & 255] + Le[255 & i] + Le[i >> 8 & 255] + Le[i >> 16 & 255] + Le[i >> 24 & 255]).toUpperCase(); }, clamp: function (t, e, n) { return Math.max(e, Math.min(n, t)); }, euclideanModulo: function (t, e) { return (t % e + e) % e; }, mapLinear: function (t, e, n, i, r) { return i + (t - e) * (r - i) / (n - e); }, lerp: function (t, e, n) { return (1 - n) * t + n * e; }, smoothstep: function (t, e, n) { return t <= e ? 0 : n <= t ? 1 : (t = (t - e) / (n - e)) * t * (3 - 2 * t); }, smootherstep: function (t, e, n) { return t <= e ? 0 : n <= t ? 1 : (t = (t - e) / (n - e)) * t * t * (t * (6 * t - 15) + 10); }, randInt: function (t, e) { return t + Math.floor(Math.random() * (e - t + 1)); }, randFloat: function (t, e) { return t + Math.random() * (e - t); }, randFloatSpread: function (t) { return t * (.5 - Math.random()); }, degToRad: function (t) { return t * Pe.DEG2RAD; }, radToDeg: function (t) { return t * Pe.RAD2DEG; }, isPowerOfTwo: function (t) { return 0 == (t & t - 1) && 0 !== t; }, ceilPowerOfTwo: function (t) { return Math.pow(2, Math.ceil(Math.log(t) / Math.LN2)); }, floorPowerOfTwo: function (t) { return Math.pow(2, Math.floor(Math.log(t) / Math.LN2)); }, setQuaternionFromProperEuler: function (t, e, n, i, r) { var a = Math.cos, o = Math.sin, s = a(n / 2), l = o(n / 2), c = a((e + i) / 2), u = o((e + i) / 2), h = a((e - i) / 2), d = o((e - i) / 2), p = a((i - e) / 2), f = o((i - e) / 2); "XYX" === r ? t.set(s * u, l * h, l * d, s * c) : "YZY" === r ? t.set(l * d, s * u, l * h, s * c) : "ZXZ" === r ? t.set(l * h, l * d, s * u, s * c) : "XZX" === r ? t.set(s * u, l * f, l * p, s * c) : "YXY" === r ? t.set(l * p, s * u, l * f, s * c) : "ZYZ" === r ? t.set(l * f, l * p, s * u, s * c) : console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order."); } };
1194
+ for (var Oe = [], Le = 0; Le < 256; Le++)
1195
+ Oe[Le] = (Le < 16 ? "0" : "") + Le.toString(16);
1196
+ var Ie, Pe = { DEG2RAD: Math.PI / 180, RAD2DEG: 180 / Math.PI, generateUUID: function () { var t = 4294967295 * Math.random() | 0, e = 4294967295 * Math.random() | 0, n = 4294967295 * Math.random() | 0, i = 4294967295 * Math.random() | 0; return (Oe[255 & t] + Oe[t >> 8 & 255] + Oe[t >> 16 & 255] + Oe[t >> 24 & 255] + "-" + Oe[255 & e] + Oe[e >> 8 & 255] + "-" + Oe[e >> 16 & 15 | 64] + Oe[e >> 24 & 255] + "-" + Oe[63 & n | 128] + Oe[n >> 8 & 255] + "-" + Oe[n >> 16 & 255] + Oe[n >> 24 & 255] + Oe[255 & i] + Oe[i >> 8 & 255] + Oe[i >> 16 & 255] + Oe[i >> 24 & 255]).toUpperCase(); }, clamp: function (t, e, n) { return Math.max(e, Math.min(n, t)); }, euclideanModulo: function (t, e) { return (t % e + e) % e; }, mapLinear: function (t, e, n, i, r) { return i + (t - e) * (r - i) / (n - e); }, lerp: function (t, e, n) { return (1 - n) * t + n * e; }, smoothstep: function (t, e, n) { return t <= e ? 0 : n <= t ? 1 : (t = (t - e) / (n - e)) * t * (3 - 2 * t); }, smootherstep: function (t, e, n) { return t <= e ? 0 : n <= t ? 1 : (t = (t - e) / (n - e)) * t * t * (t * (6 * t - 15) + 10); }, randInt: function (t, e) { return t + Math.floor(Math.random() * (e - t + 1)); }, randFloat: function (t, e) { return t + Math.random() * (e - t); }, randFloatSpread: function (t) { return t * (.5 - Math.random()); }, degToRad: function (t) { return t * Pe.DEG2RAD; }, radToDeg: function (t) { return t * Pe.RAD2DEG; }, isPowerOfTwo: function (t) { return 0 == (t & t - 1) && 0 !== t; }, ceilPowerOfTwo: function (t) { return Math.pow(2, Math.ceil(Math.log(t) / Math.LN2)); }, floorPowerOfTwo: function (t) { return Math.pow(2, Math.floor(Math.log(t) / Math.LN2)); }, setQuaternionFromProperEuler: function (t, e, n, i, r) { var a = Math.cos, o = Math.sin, s = a(n / 2), l = o(n / 2), c = a((e + i) / 2), u = o((e + i) / 2), h = a((e - i) / 2), d = o((e - i) / 2), p = a((i - e) / 2), f = o((i - e) / 2); "XYX" === r ? t.set(s * u, l * h, l * d, s * c) : "YZY" === r ? t.set(l * d, s * u, l * h, s * c) : "ZXZ" === r ? t.set(l * h, l * d, s * u, s * c) : "XZX" === r ? t.set(s * u, l * f, l * p, s * c) : "YXY" === r ? t.set(l * p, s * u, l * f, s * c) : "ZYZ" === r ? t.set(l * f, l * p, s * u, s * c) : console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order."); } };
1197
1197
  function Re(t, e) { this.x = t || 0, this.y = e || 0; }
1198
1198
  function ke() { this.elements = [1, 0, 0, 0, 1, 0, 0, 0, 1], 0 < arguments.length && console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead."); }
1199
1199
  Object.defineProperties(Re.prototype, { width: { get: function () { return this.x; }, set: function (t) { this.x = t; } }, height: { get: function () { return this.y; }, set: function (t) { this.y = t; } } }), Object.assign(Re.prototype, { isVector2: !0, set: function (t, e) { return this.x = t, this.y = e, this; }, setScalar: function (t) { return this.x = t, this.y = t, this; }, setX: function (t) { return this.x = t, this; }, setY: function (t) { return this.y = t, this; }, setComponent: function (t, e) { switch (t) {
@@ -1227,9 +1227,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1227
1227
  } return 2048 < e.width || 2048 < e.height ? e.toDataURL("image/jpeg", .6) : e.toDataURL("image/png"); } }, Be = 0;
1228
1228
  function Fe(t, e, n, i, r, a, o, s, l, c) { Object.defineProperty(this, "id", { value: Be++ }), this.uuid = Pe.generateUUID(), this.name = "", this.image = void 0 !== t ? t : Fe.DEFAULT_IMAGE, this.mipmaps = [], this.mapping = void 0 !== e ? e : Fe.DEFAULT_MAPPING, this.wrapS = void 0 !== n ? n : zt, this.wrapT = void 0 !== i ? i : zt, this.magFilter = void 0 !== r ? r : Ht, this.minFilter = void 0 !== a ? a : Jt, this.anisotropy = void 0 !== l ? l : 1, this.format = void 0 !== o ? o : te, this.internalFormat = null, this.type = void 0 !== s ? s : qt, this.offset = new Re(0, 0), this.repeat = new Re(1, 1), this.center = new Re(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new ke, this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.encoding = void 0 !== c ? c : me, this.version = 0, this.onUpdate = null; }
1229
1229
  function ze(t, e, n, i) { this.x = t || 0, this.y = e || 0, this.z = n || 0, this.w = void 0 !== i ? i : 1; }
1230
- function Ve(t, e, n) { this.width = t, this.height = e, this.scissor = new ze(0, 0, t, e), this.scissorTest = !1, this.viewport = new ze(0, 0, t, e), n = n || {}, this.texture = new Fe(void 0, n.mapping, n.wrapS, n.wrapT, n.magFilter, n.minFilter, n.format, n.type, n.anisotropy, n.encoding), this.texture.image = {}, this.texture.image.width = t, this.texture.image.height = e, this.texture.generateMipmaps = void 0 !== n.generateMipmaps && n.generateMipmaps, this.texture.minFilter = void 0 !== n.minFilter ? n.minFilter : Ht, this.depthBuffer = void 0 === n.depthBuffer || n.depthBuffer, this.stencilBuffer = void 0 === n.stencilBuffer || n.stencilBuffer, this.depthTexture = void 0 !== n.depthTexture ? n.depthTexture : null; }
1231
- function Ue(t, e, n) { Ve.call(this, t, e, n), this.samples = 4; }
1232
- function je(t, e, n, i) { this._x = t || 0, this._y = e || 0, this._z = n || 0, this._w = void 0 !== i ? i : 1; }
1230
+ function je(t, e, n) { this.width = t, this.height = e, this.scissor = new ze(0, 0, t, e), this.scissorTest = !1, this.viewport = new ze(0, 0, t, e), n = n || {}, this.texture = new Fe(void 0, n.mapping, n.wrapS, n.wrapT, n.magFilter, n.minFilter, n.format, n.type, n.anisotropy, n.encoding), this.texture.image = {}, this.texture.image.width = t, this.texture.image.height = e, this.texture.generateMipmaps = void 0 !== n.generateMipmaps && n.generateMipmaps, this.texture.minFilter = void 0 !== n.minFilter ? n.minFilter : Ht, this.depthBuffer = void 0 === n.depthBuffer || n.depthBuffer, this.stencilBuffer = void 0 === n.stencilBuffer || n.stencilBuffer, this.depthTexture = void 0 !== n.depthTexture ? n.depthTexture : null; }
1231
+ function Ve(t, e, n) { je.call(this, t, e, n), this.samples = 4; }
1232
+ function Ue(t, e, n, i) { this._x = t || 0, this._y = e || 0, this._z = n || 0, this._w = void 0 !== i ? i : 1; }
1233
1233
  Fe.DEFAULT_IMAGE = void 0, Fe.DEFAULT_MAPPING = 300, Fe.prototype = Object.assign(Object.create(De.prototype), { constructor: Fe, isTexture: !0, updateMatrix: function () { this.matrix.setUvTransform(this.offset.x, this.offset.y, this.repeat.x, this.repeat.y, this.rotation, this.center.x, this.center.y); }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.name = t.name, this.image = t.image, this.mipmaps = t.mipmaps.slice(0), this.mapping = t.mapping, this.wrapS = t.wrapS, this.wrapT = t.wrapT, this.magFilter = t.magFilter, this.minFilter = t.minFilter, this.anisotropy = t.anisotropy, this.format = t.format, this.internalFormat = t.internalFormat, this.type = t.type, this.offset.copy(t.offset), this.repeat.copy(t.repeat), this.center.copy(t.center), this.rotation = t.rotation, this.matrixAutoUpdate = t.matrixAutoUpdate, this.matrix.copy(t.matrix), this.generateMipmaps = t.generateMipmaps, this.premultiplyAlpha = t.premultiplyAlpha, this.flipY = t.flipY, this.unpackAlignment = t.unpackAlignment, this.encoding = t.encoding, this; }, toJSON: function (t) { var e = void 0 === t || "string" == typeof t; if (!e && void 0 !== t.textures[this.uuid])
1234
1234
  return t.textures[this.uuid]; var n = { metadata: { version: 4.5, type: "Texture", generator: "Texture.toJSON" }, uuid: this.uuid, name: this.name, mapping: this.mapping, repeat: [this.repeat.x, this.repeat.y], offset: [this.offset.x, this.offset.y], center: [this.center.x, this.center.y], rotation: this.rotation, wrap: [this.wrapS, this.wrapT], format: this.format, type: this.type, encoding: this.encoding, minFilter: this.minFilter, magFilter: this.magFilter, anisotropy: this.anisotropy, flipY: this.flipY, premultiplyAlpha: this.premultiplyAlpha, unpackAlignment: this.unpackAlignment }; if (void 0 !== this.image) {
1235
1235
  var i = this.image;
@@ -1254,7 +1254,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1254
1254
  case zt:
1255
1255
  t.x = t.x < 0 ? 0 : 1;
1256
1256
  break;
1257
- case Vt: 1 === Math.abs(Math.floor(t.x) % 2) ? t.x = Math.ceil(t.x) - t.x : t.x = t.x - Math.floor(t.x);
1257
+ case jt: 1 === Math.abs(Math.floor(t.x) % 2) ? t.x = Math.ceil(t.x) - t.x : t.x = t.x - Math.floor(t.x);
1258
1258
  } if (t.y < 0 || 1 < t.y)
1259
1259
  switch (this.wrapT) {
1260
1260
  case Ft:
@@ -1263,7 +1263,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1263
1263
  case zt:
1264
1264
  t.y = t.y < 0 ? 0 : 1;
1265
1265
  break;
1266
- case Vt: 1 === Math.abs(Math.floor(t.y) % 2) ? t.y = Math.ceil(t.y) - t.y : t.y = t.y - Math.floor(t.y);
1266
+ case jt: 1 === Math.abs(Math.floor(t.y) % 2) ? t.y = Math.ceil(t.y) - t.y : t.y = t.y - Math.floor(t.y);
1267
1267
  } return this.flipY && (t.y = 1 - t.y), t; } }), Object.defineProperty(Fe.prototype, "needsUpdate", { set: function (t) { !0 === t && this.version++; } }), Object.defineProperties(ze.prototype, { width: { get: function () { return this.z; }, set: function (t) { this.z = t; } }, height: { get: function () { return this.w; }, set: function (t) { this.w = t; } } }), Object.assign(ze.prototype, { isVector4: !0, set: function (t, e, n, i) { return this.x = t, this.y = e, this.z = n, this.w = i, this; }, setScalar: function (t) { return this.x = t, this.y = t, this.z = t, this.w = t, this; }, setX: function (t) { return this.x = t, this; }, setY: function (t) { return this.y = t, this; }, setZ: function (t) { return this.z = t, this; }, setW: function (t) { return this.w = t, this; }, setComponent: function (t, e) { switch (t) {
1268
1268
  case 0:
1269
1269
  this.x = e;
@@ -1290,7 +1290,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1290
1290
  e = Math.PI;
1291
1291
  var m = (o + 1) / 2, g = (u + 1) / 2, v = (f + 1) / 2, y = (s + c) / 4, x = (l + d) / 4, _ = (h + p) / 4;
1292
1292
  return g < m && v < m ? r = m < .01 ? (n = 0, i = .707106781) : (i = y / (n = Math.sqrt(m)), x / n) : v < g ? r = g < .01 ? (i = 0, n = .707106781) : (n = y / (i = Math.sqrt(g)), _ / i) : v < .01 ? (i = n = .707106781, r = 0) : (n = x / (r = Math.sqrt(v)), i = _ / r), this.set(n, i, r, e), this;
1293
- } var w = Math.sqrt((p - h) * (p - h) + (l - d) * (l - d) + (c - s) * (c - s)); return Math.abs(w) < .001 && (w = 1), this.x = (p - h) / w, this.y = (l - d) / w, this.z = (c - s) / w, this.w = Math.acos((o + u + f - 1) / 2), this; }, min: function (t) { return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this.z = Math.min(this.z, t.z), this.w = Math.min(this.w, t.w), this; }, max: function (t) { return this.x = Math.max(this.x, t.x), this.y = Math.max(this.y, t.y), this.z = Math.max(this.z, t.z), this.w = Math.max(this.w, t.w), this; }, clamp: function (t, e) { return this.x = Math.max(t.x, Math.min(e.x, this.x)), this.y = Math.max(t.y, Math.min(e.y, this.y)), this.z = Math.max(t.z, Math.min(e.z, this.z)), this.w = Math.max(t.w, Math.min(e.w, this.w)), this; }, clampScalar: function (t, e) { return this.x = Math.max(t, Math.min(e, this.x)), this.y = Math.max(t, Math.min(e, this.y)), this.z = Math.max(t, Math.min(e, this.z)), this.w = Math.max(t, Math.min(e, this.w)), this; }, clampLength: function (t, e) { var n = this.length(); return this.divideScalar(n || 1).multiplyScalar(Math.max(t, Math.min(e, n))); }, floor: function () { return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this; }, ceil: function () { return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this.w = Math.ceil(this.w), this; }, round: function () { return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this.w = Math.round(this.w), this; }, roundToZero: function () { return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w), this; }, negate: function () { return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this; }, dot: function (t) { return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w; }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); }, manhattanLength: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w); }, normalize: function () { return this.divideScalar(this.length() || 1); }, setLength: function (t) { return this.normalize().multiplyScalar(t); }, lerp: function (t, e) { return this.x += (t.x - this.x) * e, this.y += (t.y - this.y) * e, this.z += (t.z - this.z) * e, this.w += (t.w - this.w) * e, this; }, lerpVectors: function (t, e, n) { return this.subVectors(e, t).multiplyScalar(n).add(t); }, equals: function (t) { return t.x === this.x && t.y === this.y && t.z === this.z && t.w === this.w; }, fromArray: function (t, e) { return void 0 === e && (e = 0), this.x = t[e], this.y = t[e + 1], this.z = t[e + 2], this.w = t[e + 3], this; }, toArray: function (t, e) { return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.x, t[e + 1] = this.y, t[e + 2] = this.z, t[e + 3] = this.w, t; }, fromBufferAttribute: function (t, e, n) { return void 0 !== n && console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."), this.x = t.getX(e), this.y = t.getY(e), this.z = t.getZ(e), this.w = t.getW(e), this; } }), Ve.prototype = Object.assign(Object.create(De.prototype), { constructor: Ve, isWebGLRenderTarget: !0, setSize: function (t, e) { this.width === t && this.height === e || (this.width = t, this.height = e, this.texture.image.width = t, this.texture.image.height = e, this.dispose()), this.viewport.set(0, 0, t, e), this.scissor.set(0, 0, t, e); }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.width = t.width, this.height = t.height, this.viewport.copy(t.viewport), this.texture = t.texture.clone(), this.depthBuffer = t.depthBuffer, this.stencilBuffer = t.stencilBuffer, this.depthTexture = t.depthTexture, this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); } }), Ue.prototype = Object.assign(Object.create(Ve.prototype), { constructor: Ue, isWebGLMultisampleRenderTarget: !0, copy: function (t) { return Ve.prototype.copy.call(this, t), this.samples = t.samples, this; } }), Object.assign(je, { slerp: function (t, e, n, i) { return n.copy(t).slerp(e, i); }, slerpFlat: function (t, e, n, i, r, a, o) { var s = n[i + 0], l = n[i + 1], c = n[i + 2], u = n[i + 3], h = r[a + 0], d = r[a + 1], p = r[a + 2], f = r[a + 3]; if (u !== f || s !== h || l !== d || c !== p) {
1293
+ } var w = Math.sqrt((p - h) * (p - h) + (l - d) * (l - d) + (c - s) * (c - s)); return Math.abs(w) < .001 && (w = 1), this.x = (p - h) / w, this.y = (l - d) / w, this.z = (c - s) / w, this.w = Math.acos((o + u + f - 1) / 2), this; }, min: function (t) { return this.x = Math.min(this.x, t.x), this.y = Math.min(this.y, t.y), this.z = Math.min(this.z, t.z), this.w = Math.min(this.w, t.w), this; }, max: function (t) { return this.x = Math.max(this.x, t.x), this.y = Math.max(this.y, t.y), this.z = Math.max(this.z, t.z), this.w = Math.max(this.w, t.w), this; }, clamp: function (t, e) { return this.x = Math.max(t.x, Math.min(e.x, this.x)), this.y = Math.max(t.y, Math.min(e.y, this.y)), this.z = Math.max(t.z, Math.min(e.z, this.z)), this.w = Math.max(t.w, Math.min(e.w, this.w)), this; }, clampScalar: function (t, e) { return this.x = Math.max(t, Math.min(e, this.x)), this.y = Math.max(t, Math.min(e, this.y)), this.z = Math.max(t, Math.min(e, this.z)), this.w = Math.max(t, Math.min(e, this.w)), this; }, clampLength: function (t, e) { var n = this.length(); return this.divideScalar(n || 1).multiplyScalar(Math.max(t, Math.min(e, n))); }, floor: function () { return this.x = Math.floor(this.x), this.y = Math.floor(this.y), this.z = Math.floor(this.z), this.w = Math.floor(this.w), this; }, ceil: function () { return this.x = Math.ceil(this.x), this.y = Math.ceil(this.y), this.z = Math.ceil(this.z), this.w = Math.ceil(this.w), this; }, round: function () { return this.x = Math.round(this.x), this.y = Math.round(this.y), this.z = Math.round(this.z), this.w = Math.round(this.w), this; }, roundToZero: function () { return this.x = this.x < 0 ? Math.ceil(this.x) : Math.floor(this.x), this.y = this.y < 0 ? Math.ceil(this.y) : Math.floor(this.y), this.z = this.z < 0 ? Math.ceil(this.z) : Math.floor(this.z), this.w = this.w < 0 ? Math.ceil(this.w) : Math.floor(this.w), this; }, negate: function () { return this.x = -this.x, this.y = -this.y, this.z = -this.z, this.w = -this.w, this; }, dot: function (t) { return this.x * t.x + this.y * t.y + this.z * t.z + this.w * t.w; }, lengthSq: function () { return this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w; }, length: function () { return Math.sqrt(this.x * this.x + this.y * this.y + this.z * this.z + this.w * this.w); }, manhattanLength: function () { return Math.abs(this.x) + Math.abs(this.y) + Math.abs(this.z) + Math.abs(this.w); }, normalize: function () { return this.divideScalar(this.length() || 1); }, setLength: function (t) { return this.normalize().multiplyScalar(t); }, lerp: function (t, e) { return this.x += (t.x - this.x) * e, this.y += (t.y - this.y) * e, this.z += (t.z - this.z) * e, this.w += (t.w - this.w) * e, this; }, lerpVectors: function (t, e, n) { return this.subVectors(e, t).multiplyScalar(n).add(t); }, equals: function (t) { return t.x === this.x && t.y === this.y && t.z === this.z && t.w === this.w; }, fromArray: function (t, e) { return void 0 === e && (e = 0), this.x = t[e], this.y = t[e + 1], this.z = t[e + 2], this.w = t[e + 3], this; }, toArray: function (t, e) { return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this.x, t[e + 1] = this.y, t[e + 2] = this.z, t[e + 3] = this.w, t; }, fromBufferAttribute: function (t, e, n) { return void 0 !== n && console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."), this.x = t.getX(e), this.y = t.getY(e), this.z = t.getZ(e), this.w = t.getW(e), this; } }), je.prototype = Object.assign(Object.create(De.prototype), { constructor: je, isWebGLRenderTarget: !0, setSize: function (t, e) { this.width === t && this.height === e || (this.width = t, this.height = e, this.texture.image.width = t, this.texture.image.height = e, this.dispose()), this.viewport.set(0, 0, t, e), this.scissor.set(0, 0, t, e); }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.width = t.width, this.height = t.height, this.viewport.copy(t.viewport), this.texture = t.texture.clone(), this.depthBuffer = t.depthBuffer, this.stencilBuffer = t.stencilBuffer, this.depthTexture = t.depthTexture, this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); } }), Ve.prototype = Object.assign(Object.create(je.prototype), { constructor: Ve, isWebGLMultisampleRenderTarget: !0, copy: function (t) { return je.prototype.copy.call(this, t), this.samples = t.samples, this; } }), Object.assign(Ue, { slerp: function (t, e, n, i) { return n.copy(t).slerp(e, i); }, slerpFlat: function (t, e, n, i, r, a, o) { var s = n[i + 0], l = n[i + 1], c = n[i + 2], u = n[i + 3], h = r[a + 0], d = r[a + 1], p = r[a + 2], f = r[a + 3]; if (u !== f || s !== h || l !== d || c !== p) {
1294
1294
  var m = 1 - o, g = s * h + l * d + c * p + u * f, v = 0 <= g ? 1 : -1, y = 1 - g * g;
1295
1295
  if (y > Number.EPSILON) {
1296
1296
  var x = Math.sqrt(y), _ = Math.atan2(x, g * v);
@@ -1301,7 +1301,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1301
1301
  var b = 1 / Math.sqrt(s * s + l * l + c * c + u * u);
1302
1302
  s *= b, l *= b, c *= b, u *= b;
1303
1303
  }
1304
- } t[e] = s, t[e + 1] = l, t[e + 2] = c, t[e + 3] = u; } }), Object.defineProperties(je.prototype, { x: { get: function () { return this._x; }, set: function (t) { this._x = t, this._onChangeCallback(); } }, y: { get: function () { return this._y; }, set: function (t) { this._y = t, this._onChangeCallback(); } }, z: { get: function () { return this._z; }, set: function (t) { this._z = t, this._onChangeCallback(); } }, w: { get: function () { return this._w; }, set: function (t) { this._w = t, this._onChangeCallback(); } } }), Object.assign(je.prototype, { isQuaternion: !0, set: function (t, e, n, i) { return this._x = t, this._y = e, this._z = n, this._w = i, this._onChangeCallback(), this; }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._w); }, copy: function (t) { return this._x = t.x, this._y = t.y, this._z = t.z, this._w = t.w, this._onChangeCallback(), this; }, setFromEuler: function (t, e) { if (!t || !t.isEuler)
1304
+ } t[e] = s, t[e + 1] = l, t[e + 2] = c, t[e + 3] = u; } }), Object.defineProperties(Ue.prototype, { x: { get: function () { return this._x; }, set: function (t) { this._x = t, this._onChangeCallback(); } }, y: { get: function () { return this._y; }, set: function (t) { this._y = t, this._onChangeCallback(); } }, z: { get: function () { return this._z; }, set: function (t) { this._z = t, this._onChangeCallback(); } }, w: { get: function () { return this._w; }, set: function (t) { this._w = t, this._onChangeCallback(); } } }), Object.assign(Ue.prototype, { isQuaternion: !0, set: function (t, e, n, i) { return this._x = t, this._y = e, this._z = n, this._w = i, this._onChangeCallback(), this; }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._w); }, copy: function (t) { return this._x = t.x, this._y = t.y, this._z = t.z, this._w = t.w, this._onChangeCallback(), this; }, setFromEuler: function (t, e) { if (!t || !t.isEuler)
1305
1305
  throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order."); var n = t._x, i = t._y, r = t._z, a = t.order, o = Math.cos, s = Math.sin, l = o(n / 2), c = o(i / 2), u = o(r / 2), h = s(n / 2), d = s(i / 2), p = s(r / 2); return "XYZ" === a ? (this._x = h * c * u + l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u - h * d * p) : "YXZ" === a ? (this._x = h * c * u + l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u + h * d * p) : "ZXY" === a ? (this._x = h * c * u - l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u - h * d * p) : "ZYX" === a ? (this._x = h * c * u - l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u + h * d * p) : "YZX" === a ? (this._x = h * c * u + l * d * p, this._y = l * d * u + h * c * p, this._z = l * c * p - h * d * u, this._w = l * c * u - h * d * p) : "XZY" === a && (this._x = h * c * u - l * d * p, this._y = l * d * u - h * c * p, this._z = l * c * p + h * d * u, this._w = l * c * u + h * d * p), !1 !== e && this._onChangeCallback(), this; }, setFromAxisAngle: function (t, e) { var n = e / 2, i = Math.sin(n); return this._x = t.x * i, this._y = t.y * i, this._z = t.z * i, this._w = Math.cos(n), this._onChangeCallback(), this; }, setFromRotationMatrix: function (t) { var e, n = t.elements, i = n[0], r = n[4], a = n[8], o = n[1], s = n[5], l = n[9], c = n[2], u = n[6], h = n[10], d = i + s + h; return 0 < d ? (e = .5 / Math.sqrt(d + 1), this._w = .25 / e, this._x = (u - l) * e, this._y = (a - c) * e, this._z = (o - r) * e) : s < i && h < i ? (e = 2 * Math.sqrt(1 + i - s - h), this._w = (u - l) / e, this._x = .25 * e, this._y = (r + o) / e, this._z = (a + c) / e) : h < s ? (e = 2 * Math.sqrt(1 + s - i - h), this._w = (a - c) / e, this._x = (r + o) / e, this._y = .25 * e, this._z = (l + u) / e) : (e = 2 * Math.sqrt(1 + h - i - s), this._w = (o - r) / e, this._x = (a + c) / e, this._y = (l + u) / e, this._z = .25 * e), this._onChangeCallback(), this; }, setFromUnitVectors: function (t, e) { var n = t.dot(e) + 1; return n < 1e-6 ? (n = 0, Math.abs(t.x) > Math.abs(t.z) ? (this._x = -t.y, this._y = t.x, this._z = 0) : (this._x = 0, this._y = -t.z, this._z = t.y)) : (this._x = t.y * e.z - t.z * e.y, this._y = t.z * e.x - t.x * e.z, this._z = t.x * e.y - t.y * e.x), this._w = n, this.normalize(); }, angleTo: function (t) { return 2 * Math.acos(Math.abs(Pe.clamp(this.dot(t), -1, 1))); }, rotateTowards: function (t, e) { var n = this.angleTo(t); if (0 === n)
1306
1306
  return this; var i = Math.min(1, e / n); return this.slerp(t, i), this; }, inverse: function () { return this.conjugate(); }, conjugate: function () { return this._x *= -1, this._y *= -1, this._z *= -1, this._onChangeCallback(), this; }, dot: function (t) { return this._x * t._x + this._y * t._y + this._z * t._z + this._w * t._w; }, lengthSq: function () { return this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w; }, length: function () { return Math.sqrt(this._x * this._x + this._y * this._y + this._z * this._z + this._w * this._w); }, normalize: function () { var t = this.length(); return 0 === t ? (this._x = 0, this._y = 0, this._z = 0, this._w = 1) : (t = 1 / t, this._x = this._x * t, this._y = this._y * t, this._z = this._z * t, this._w = this._w * t), this._onChangeCallback(), this; }, multiply: function (t, e) { return void 0 !== e ? (console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."), this.multiplyQuaternions(t, e)) : this.multiplyQuaternions(this, t); }, premultiply: function (t) { return this.multiplyQuaternions(t, this); }, multiplyQuaternions: function (t, e) { var n = t._x, i = t._y, r = t._z, a = t._w, o = e._x, s = e._y, l = e._z, c = e._w; return this._x = n * c + a * o + i * l - r * s, this._y = i * c + a * s + r * o - n * l, this._z = r * c + a * l + n * s - i * o, this._w = a * c - n * o - i * s - r * l, this._onChangeCallback(), this; }, slerp: function (t, e) { if (0 === e)
1307
1307
  return this; if (1 === e)
@@ -1310,7 +1310,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1310
1310
  var l = 1 - e;
1311
1311
  return this._w = l * a + e * this._w, this._x = l * n + e * this._x, this._y = l * i + e * this._y, this._z = l * r + e * this._z, this.normalize(), this._onChangeCallback(), this;
1312
1312
  } var c = Math.sqrt(s), u = Math.atan2(c, o), h = Math.sin((1 - e) * u) / c, d = Math.sin(e * u) / c; return this._w = a * h + this._w * d, this._x = n * h + this._x * d, this._y = i * h + this._y * d, this._z = r * h + this._z * d, this._onChangeCallback(), this; }, equals: function (t) { return t._x === this._x && t._y === this._y && t._z === this._z && t._w === this._w; }, fromArray: function (t, e) { return void 0 === e && (e = 0), this._x = t[e], this._y = t[e + 1], this._z = t[e + 2], this._w = t[e + 3], this._onChangeCallback(), this; }, toArray: function (t, e) { return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this._x, t[e + 1] = this._y, t[e + 2] = this._z, t[e + 3] = this._w, t; }, _onChange: function (t) { return this._onChangeCallback = t, this; }, _onChangeCallback: function () { } });
1313
- var Ge = new We, He = new je;
1313
+ var Ge = new We, He = new Ue;
1314
1314
  function We(t, e, n) { this.x = t || 0, this.y = e || 0, this.z = n || 0; }
1315
1315
  Object.assign(We.prototype, { isVector3: !0, set: function (t, e, n) { return this.x = t, this.y = e, this.z = n, this; }, setScalar: function (t) { return this.x = t, this.y = t, this.z = t, this; }, setX: function (t) { return this.x = t, this; }, setY: function (t) { return this.y = t, this; }, setZ: function (t) { return this.z = t, this; }, setComponent: function (t, e) { switch (t) {
1316
1316
  case 0:
@@ -1356,7 +1356,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1356
1356
  else if ("XZY" === t.order) {
1357
1357
  x = a * s, _ = a * l, w = o * s, b = o * l;
1358
1358
  e[0] = s * c, e[4] = -u, e[8] = l * c, e[1] = x * u + b, e[5] = a * c, e[9] = _ * u - w, e[2] = w * u - _, e[6] = o * c, e[10] = b * u + x;
1359
- } return e[3] = 0, e[7] = 0, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this; }, makeRotationFromQuaternion: function (t) { return this.compose(Xe, t, Ye); }, lookAt: function (t, e, n) { var i = this.elements; return Ke.subVectors(t, e), 0 === Ke.lengthSq() && (Ke.z = 1), Ke.normalize(), Ze.crossVectors(n, Ke), 0 === Ze.lengthSq() && (1 === Math.abs(n.z) ? Ke.x += 1e-4 : Ke.z += 1e-4, Ke.normalize(), Ze.crossVectors(n, Ke)), Ze.normalize(), $e.crossVectors(Ke, Ze), i[0] = Ze.x, i[4] = $e.x, i[8] = Ke.x, i[1] = Ze.y, i[5] = $e.y, i[9] = Ke.y, i[2] = Ze.z, i[6] = $e.z, i[10] = Ke.z, this; }, multiply: function (t, e) { return void 0 !== e ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(t, e)) : this.multiplyMatrices(this, t); }, premultiply: function (t) { return this.multiplyMatrices(t, this); }, multiplyMatrices: function (t, e) { var n = t.elements, i = e.elements, r = this.elements, a = n[0], o = n[4], s = n[8], l = n[12], c = n[1], u = n[5], h = n[9], d = n[13], p = n[2], f = n[6], m = n[10], g = n[14], v = n[3], y = n[7], x = n[11], _ = n[15], w = i[0], b = i[4], M = i[8], S = i[12], C = i[1], T = i[5], E = i[9], A = i[13], D = i[2], L = i[6], O = i[10], I = i[14], P = i[3], R = i[7], k = i[11], N = i[15]; return r[0] = a * w + o * C + s * D + l * P, r[4] = a * b + o * T + s * L + l * R, r[8] = a * M + o * E + s * O + l * k, r[12] = a * S + o * A + s * I + l * N, r[1] = c * w + u * C + h * D + d * P, r[5] = c * b + u * T + h * L + d * R, r[9] = c * M + u * E + h * O + d * k, r[13] = c * S + u * A + h * I + d * N, r[2] = p * w + f * C + m * D + g * P, r[6] = p * b + f * T + m * L + g * R, r[10] = p * M + f * E + m * O + g * k, r[14] = p * S + f * A + m * I + g * N, r[3] = v * w + y * C + x * D + _ * P, r[7] = v * b + y * T + x * L + _ * R, r[11] = v * M + y * E + x * O + _ * k, r[15] = v * S + y * A + x * I + _ * N, this; }, multiplyScalar: function (t) { var e = this.elements; return e[0] *= t, e[4] *= t, e[8] *= t, e[12] *= t, e[1] *= t, e[5] *= t, e[9] *= t, e[13] *= t, e[2] *= t, e[6] *= t, e[10] *= t, e[14] *= t, e[3] *= t, e[7] *= t, e[11] *= t, e[15] *= t, this; }, determinant: function () { var t = this.elements, e = t[0], n = t[4], i = t[8], r = t[12], a = t[1], o = t[5], s = t[9], l = t[13], c = t[2], u = t[6], h = t[10], d = t[14]; return t[3] * (r * s * u - i * l * u - r * o * h + n * l * h + i * o * d - n * s * d) + t[7] * (e * s * d - e * l * h + r * a * h - i * a * d + i * l * c - r * s * c) + t[11] * (e * l * u - e * o * d - r * a * u + n * a * d + r * o * c - n * l * c) + t[15] * (-i * o * c - e * s * u + e * o * h + i * a * u - n * a * h + n * s * c); }, transpose: function () { var t, e = this.elements; return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this; }, setPosition: function (t, e, n) { var i = this.elements; return t.isVector3 ? (i[12] = t.x, i[13] = t.y, i[14] = t.z) : (i[12] = t, i[13] = e, i[14] = n), this; }, getInverse: function (t, e) { var n = this.elements, i = t.elements, r = i[0], a = i[1], o = i[2], s = i[3], l = i[4], c = i[5], u = i[6], h = i[7], d = i[8], p = i[9], f = i[10], m = i[11], g = i[12], v = i[13], y = i[14], x = i[15], _ = p * y * h - v * f * h + v * u * m - c * y * m - p * u * x + c * f * x, w = g * f * h - d * y * h - g * u * m + l * y * m + d * u * x - l * f * x, b = d * v * h - g * p * h + g * c * m - l * v * m - d * c * x + l * p * x, M = g * p * u - d * v * u - g * c * f + l * v * f + d * c * y - l * p * y, S = r * _ + a * w + o * b + s * M; if (0 == S) {
1359
+ } return e[3] = 0, e[7] = 0, e[11] = 0, e[12] = 0, e[13] = 0, e[14] = 0, e[15] = 1, this; }, makeRotationFromQuaternion: function (t) { return this.compose(Xe, t, Ye); }, lookAt: function (t, e, n) { var i = this.elements; return Ke.subVectors(t, e), 0 === Ke.lengthSq() && (Ke.z = 1), Ke.normalize(), Ze.crossVectors(n, Ke), 0 === Ze.lengthSq() && (1 === Math.abs(n.z) ? Ke.x += 1e-4 : Ke.z += 1e-4, Ke.normalize(), Ze.crossVectors(n, Ke)), Ze.normalize(), $e.crossVectors(Ke, Ze), i[0] = Ze.x, i[4] = $e.x, i[8] = Ke.x, i[1] = Ze.y, i[5] = $e.y, i[9] = Ke.y, i[2] = Ze.z, i[6] = $e.z, i[10] = Ke.z, this; }, multiply: function (t, e) { return void 0 !== e ? (console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."), this.multiplyMatrices(t, e)) : this.multiplyMatrices(this, t); }, premultiply: function (t) { return this.multiplyMatrices(t, this); }, multiplyMatrices: function (t, e) { var n = t.elements, i = e.elements, r = this.elements, a = n[0], o = n[4], s = n[8], l = n[12], c = n[1], u = n[5], h = n[9], d = n[13], p = n[2], f = n[6], m = n[10], g = n[14], v = n[3], y = n[7], x = n[11], _ = n[15], w = i[0], b = i[4], M = i[8], S = i[12], C = i[1], T = i[5], E = i[9], A = i[13], D = i[2], O = i[6], L = i[10], I = i[14], P = i[3], R = i[7], k = i[11], N = i[15]; return r[0] = a * w + o * C + s * D + l * P, r[4] = a * b + o * T + s * O + l * R, r[8] = a * M + o * E + s * L + l * k, r[12] = a * S + o * A + s * I + l * N, r[1] = c * w + u * C + h * D + d * P, r[5] = c * b + u * T + h * O + d * R, r[9] = c * M + u * E + h * L + d * k, r[13] = c * S + u * A + h * I + d * N, r[2] = p * w + f * C + m * D + g * P, r[6] = p * b + f * T + m * O + g * R, r[10] = p * M + f * E + m * L + g * k, r[14] = p * S + f * A + m * I + g * N, r[3] = v * w + y * C + x * D + _ * P, r[7] = v * b + y * T + x * O + _ * R, r[11] = v * M + y * E + x * L + _ * k, r[15] = v * S + y * A + x * I + _ * N, this; }, multiplyScalar: function (t) { var e = this.elements; return e[0] *= t, e[4] *= t, e[8] *= t, e[12] *= t, e[1] *= t, e[5] *= t, e[9] *= t, e[13] *= t, e[2] *= t, e[6] *= t, e[10] *= t, e[14] *= t, e[3] *= t, e[7] *= t, e[11] *= t, e[15] *= t, this; }, determinant: function () { var t = this.elements, e = t[0], n = t[4], i = t[8], r = t[12], a = t[1], o = t[5], s = t[9], l = t[13], c = t[2], u = t[6], h = t[10], d = t[14]; return t[3] * (r * s * u - i * l * u - r * o * h + n * l * h + i * o * d - n * s * d) + t[7] * (e * s * d - e * l * h + r * a * h - i * a * d + i * l * c - r * s * c) + t[11] * (e * l * u - e * o * d - r * a * u + n * a * d + r * o * c - n * l * c) + t[15] * (-i * o * c - e * s * u + e * o * h + i * a * u - n * a * h + n * s * c); }, transpose: function () { var t, e = this.elements; return t = e[1], e[1] = e[4], e[4] = t, t = e[2], e[2] = e[8], e[8] = t, t = e[6], e[6] = e[9], e[9] = t, t = e[3], e[3] = e[12], e[12] = t, t = e[7], e[7] = e[13], e[13] = t, t = e[11], e[11] = e[14], e[14] = t, this; }, setPosition: function (t, e, n) { var i = this.elements; return t.isVector3 ? (i[12] = t.x, i[13] = t.y, i[14] = t.z) : (i[12] = t, i[13] = e, i[14] = n), this; }, getInverse: function (t, e) { var n = this.elements, i = t.elements, r = i[0], a = i[1], o = i[2], s = i[3], l = i[4], c = i[5], u = i[6], h = i[7], d = i[8], p = i[9], f = i[10], m = i[11], g = i[12], v = i[13], y = i[14], x = i[15], _ = p * y * h - v * f * h + v * u * m - c * y * m - p * u * x + c * f * x, w = g * f * h - d * y * h - g * u * m + l * y * m + d * u * x - l * f * x, b = d * v * h - g * p * h + g * c * m - l * v * m - d * c * x + l * p * x, M = g * p * u - d * v * u - g * c * f + l * v * f + d * c * y - l * p * y, S = r * _ + a * w + o * b + s * M; if (0 == S) {
1360
1360
  var C = "THREE.Matrix4: .getInverse() can't invert matrix, determinant is 0";
1361
1361
  if (!0 === e)
1362
1362
  throw new Error(C);
@@ -1365,12 +1365,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1365
1365
  if (e[i] !== n[i])
1366
1366
  return !1; return !0; }, fromArray: function (t, e) { void 0 === e && (e = 0); for (var n = 0; n < 16; n++)
1367
1367
  this.elements[n] = t[n + e]; return this; }, toArray: function (t, e) { void 0 === t && (t = []), void 0 === e && (e = 0); var n = this.elements; return t[e] = n[0], t[e + 1] = n[1], t[e + 2] = n[2], t[e + 3] = n[3], t[e + 4] = n[4], t[e + 5] = n[5], t[e + 6] = n[6], t[e + 7] = n[7], t[e + 8] = n[8], t[e + 9] = n[9], t[e + 10] = n[10], t[e + 11] = n[11], t[e + 12] = n[12], t[e + 13] = n[13], t[e + 14] = n[14], t[e + 15] = n[15], t; } });
1368
- var tn = new Qe, en = new je;
1368
+ var tn = new Qe, en = new Ue;
1369
1369
  function nn(t, e, n, i) { this._x = t || 0, this._y = e || 0, this._z = n || 0, this._order = i || nn.DefaultOrder; }
1370
1370
  function rn() { this.mask = 1; }
1371
1371
  nn.RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"], nn.DefaultOrder = "XYZ", Object.defineProperties(nn.prototype, { x: { get: function () { return this._x; }, set: function (t) { this._x = t, this._onChangeCallback(); } }, y: { get: function () { return this._y; }, set: function (t) { this._y = t, this._onChangeCallback(); } }, z: { get: function () { return this._z; }, set: function (t) { this._z = t, this._onChangeCallback(); } }, order: { get: function () { return this._order; }, set: function (t) { this._order = t, this._onChangeCallback(); } } }), Object.assign(nn.prototype, { isEuler: !0, set: function (t, e, n, i) { return this._x = t, this._y = e, this._z = n, this._order = i || this._order, this._onChangeCallback(), this; }, clone: function () { return new this.constructor(this._x, this._y, this._z, this._order); }, copy: function (t) { return this._x = t._x, this._y = t._y, this._z = t._z, this._order = t._order, this._onChangeCallback(), this; }, setFromRotationMatrix: function (t, e, n) { var i = Pe.clamp, r = t.elements, a = r[0], o = r[4], s = r[8], l = r[1], c = r[5], u = r[9], h = r[2], d = r[6], p = r[10]; return "XYZ" === (e = e || this._order) ? (this._y = Math.asin(i(s, -1, 1)), Math.abs(s) < .9999999 ? (this._x = Math.atan2(-u, p), this._z = Math.atan2(-o, a)) : (this._x = Math.atan2(d, c), this._z = 0)) : "YXZ" === e ? (this._x = Math.asin(-i(u, -1, 1)), Math.abs(u) < .9999999 ? (this._y = Math.atan2(s, p), this._z = Math.atan2(l, c)) : (this._y = Math.atan2(-h, a), this._z = 0)) : "ZXY" === e ? (this._x = Math.asin(i(d, -1, 1)), Math.abs(d) < .9999999 ? (this._y = Math.atan2(-h, p), this._z = Math.atan2(-o, c)) : (this._y = 0, this._z = Math.atan2(l, a))) : "ZYX" === e ? (this._y = Math.asin(-i(h, -1, 1)), Math.abs(h) < .9999999 ? (this._x = Math.atan2(d, p), this._z = Math.atan2(l, a)) : (this._x = 0, this._z = Math.atan2(-o, c))) : "YZX" === e ? (this._z = Math.asin(i(l, -1, 1)), Math.abs(l) < .9999999 ? (this._x = Math.atan2(-u, c), this._y = Math.atan2(-h, a)) : (this._x = 0, this._y = Math.atan2(s, p))) : "XZY" === e ? (this._z = Math.asin(-i(o, -1, 1)), Math.abs(o) < .9999999 ? (this._x = Math.atan2(d, c), this._y = Math.atan2(s, a)) : (this._x = Math.atan2(-u, p), this._y = 0)) : console.warn("THREE.Euler: .setFromRotationMatrix() given unsupported order: " + e), this._order = e, !1 !== n && this._onChangeCallback(), this; }, setFromQuaternion: function (t, e, n) { return tn.makeRotationFromQuaternion(t), this.setFromRotationMatrix(tn, e, n); }, setFromVector3: function (t, e) { return this.set(t.x, t.y, t.z, e || this._order); }, reorder: function (t) { return en.setFromEuler(this), this.setFromQuaternion(en, t); }, equals: function (t) { return t._x === this._x && t._y === this._y && t._z === this._z && t._order === this._order; }, fromArray: function (t) { return this._x = t[0], this._y = t[1], this._z = t[2], void 0 !== t[3] && (this._order = t[3]), this._onChangeCallback(), this; }, toArray: function (t, e) { return void 0 === t && (t = []), void 0 === e && (e = 0), t[e] = this._x, t[e + 1] = this._y, t[e + 2] = this._z, t[e + 3] = this._order, t; }, toVector3: function (t) { return t ? t.set(this._x, this._y, this._z) : new We(this._x, this._y, this._z); }, _onChange: function (t) { return this._onChangeCallback = t, this; }, _onChangeCallback: function () { } }), Object.assign(rn.prototype, { set: function (t) { this.mask = 1 << t | 0; }, enable: function (t) { this.mask |= 1 << t | 0; }, enableAll: function () { this.mask = -1; }, toggle: function (t) { this.mask ^= 1 << t | 0; }, disable: function (t) { this.mask &= ~(1 << t | 0); }, disableAll: function () { this.mask = 0; }, test: function (t) { return 0 != (this.mask & t.mask); } });
1372
- var an = 0, on = new We, sn = new je, ln = new Qe, cn = new We, un = new We, hn = new We, dn = new je, pn = new We(1, 0, 0), fn = new We(0, 1, 0), mn = new We(0, 0, 1), gn = { type: "added" }, vn = { type: "removed" };
1373
- function yn() { Object.defineProperty(this, "id", { value: an++ }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = yn.DefaultUp.clone(); var t = new We, e = new nn, n = new je, i = new We(1, 1, 1); e._onChange(function () { n.setFromEuler(e, !1); }), n._onChange(function () { e.setFromQuaternion(n, void 0, !1); }), Object.defineProperties(this, { position: { configurable: !0, enumerable: !0, value: t }, rotation: { configurable: !0, enumerable: !0, value: e }, quaternion: { configurable: !0, enumerable: !0, value: n }, scale: { configurable: !0, enumerable: !0, value: i }, modelViewMatrix: { value: new Qe }, normalMatrix: { value: new ke } }), this.matrix = new Qe, this.matrixWorld = new Qe, this.matrixAutoUpdate = yn.DefaultMatrixAutoUpdate, this.matrixWorldNeedsUpdate = !1, this.layers = new rn, this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.userData = {}; }
1372
+ var an = 0, on = new We, sn = new Ue, ln = new Qe, cn = new We, un = new We, hn = new We, dn = new Ue, pn = new We(1, 0, 0), fn = new We(0, 1, 0), mn = new We(0, 0, 1), gn = { type: "added" }, vn = { type: "removed" };
1373
+ function yn() { Object.defineProperty(this, "id", { value: an++ }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = yn.DefaultUp.clone(); var t = new We, e = new nn, n = new Ue, i = new We(1, 1, 1); e._onChange(function () { n.setFromEuler(e, !1); }), n._onChange(function () { e.setFromQuaternion(n, void 0, !1); }), Object.defineProperties(this, { position: { configurable: !0, enumerable: !0, value: t }, rotation: { configurable: !0, enumerable: !0, value: e }, quaternion: { configurable: !0, enumerable: !0, value: n }, scale: { configurable: !0, enumerable: !0, value: i }, modelViewMatrix: { value: new Qe }, normalMatrix: { value: new ke } }), this.matrix = new Qe, this.matrixWorld = new Qe, this.matrixAutoUpdate = yn.DefaultMatrixAutoUpdate, this.matrixWorldNeedsUpdate = !1, this.layers = new rn, this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.userData = {}; }
1374
1374
  function xn() { yn.call(this), this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.overrideMaterial = null, this.autoUpdate = !0, "undefined" != typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this })); }
1375
1375
  yn.DefaultUp = new We(0, 1, 0), yn.DefaultMatrixAutoUpdate = !0, yn.prototype = Object.assign(Object.create(De.prototype), { constructor: yn, isObject3D: !0, onBeforeRender: function () { }, onAfterRender: function () { }, applyMatrix4: function (t) { this.matrixAutoUpdate && this.updateMatrix(), this.matrix.premultiply(t), this.matrix.decompose(this.position, this.quaternion, this.scale); }, applyQuaternion: function (t) { return this.quaternion.premultiply(t), this; }, setRotationFromAxisAngle: function (t, e) { this.quaternion.setFromAxisAngle(t, e); }, setRotationFromEuler: function (t) { this.quaternion.setFromEuler(t, !0); }, setRotationFromMatrix: function (t) { this.quaternion.setFromRotationMatrix(t); }, setRotationFromQuaternion: function (t) { this.quaternion.copy(t); }, rotateOnAxis: function (t, e) { return sn.setFromAxisAngle(t, e), this.quaternion.multiply(sn), this; }, rotateOnWorldAxis: function (t, e) { return sn.setFromAxisAngle(t, e), this.quaternion.premultiply(sn), this; }, rotateX: function (t) { return this.rotateOnAxis(pn, t); }, rotateY: function (t) { return this.rotateOnAxis(fn, t); }, rotateZ: function (t) { return this.rotateOnAxis(mn, t); }, translateOnAxis: function (t, e) { return on.copy(t).applyQuaternion(this.quaternion), this.position.add(on.multiplyScalar(e)), this; }, translateX: function (t) { return this.translateOnAxis(pn, t); }, translateY: function (t) { return this.translateOnAxis(fn, t); }, translateZ: function (t) { return this.translateOnAxis(mn, t); }, localToWorld: function (t) { return t.applyMatrix4(this.matrixWorld); }, worldToLocal: function (t) { return t.applyMatrix4(ln.getInverse(this.matrixWorld)); }, lookAt: function (t, e, n) { t.isVector3 ? cn.copy(t) : cn.set(t, e, n); var i = this.parent; this.updateWorldMatrix(!0, !1), un.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? ln.lookAt(un, cn, this.up) : ln.lookAt(cn, un, this.up), this.quaternion.setFromRotationMatrix(ln), i && (ln.extractRotation(i.matrixWorld), sn.setFromRotationMatrix(ln), this.quaternion.premultiply(sn.inverse())); }, add: function (t) { if (1 < arguments.length) {
1376
1376
  for (var e = 0; e < arguments.length; e++)
@@ -1385,7 +1385,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1385
1385
  var r = this.children[n].getObjectByProperty(t, e);
1386
1386
  if (void 0 !== r)
1387
1387
  return r;
1388
- } }, getWorldPosition: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldPosition() target is now required"), t = new We), this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld); }, getWorldQuaternion: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"), t = new je), this.updateMatrixWorld(!0), this.matrixWorld.decompose(un, t, hn), t; }, getWorldScale: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldScale() target is now required"), t = new We), this.updateMatrixWorld(!0), this.matrixWorld.decompose(un, dn, t), t; }, getWorldDirection: function (t) { void 0 === t && (console.warn("THREE.Object3D: .getWorldDirection() target is now required"), t = new We), this.updateMatrixWorld(!0); var e = this.matrixWorld.elements; return t.set(e[8], e[9], e[10]).normalize(); }, raycast: function () { }, traverse: function (t) { t(this); for (var e = this.children, n = 0, i = e.length; n < i; n++)
1388
+ } }, getWorldPosition: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldPosition() target is now required"), t = new We), this.updateMatrixWorld(!0), t.setFromMatrixPosition(this.matrixWorld); }, getWorldQuaternion: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldQuaternion() target is now required"), t = new Ue), this.updateMatrixWorld(!0), this.matrixWorld.decompose(un, t, hn), t; }, getWorldScale: function (t) { return void 0 === t && (console.warn("THREE.Object3D: .getWorldScale() target is now required"), t = new We), this.updateMatrixWorld(!0), this.matrixWorld.decompose(un, dn, t), t; }, getWorldDirection: function (t) { void 0 === t && (console.warn("THREE.Object3D: .getWorldDirection() target is now required"), t = new We), this.updateMatrixWorld(!0); var e = this.matrixWorld.elements; return t.set(e[8], e[9], e[10]).normalize(); }, raycast: function () { }, traverse: function (t) { t(this); for (var e = this.children, n = 0, i = e.length; n < i; n++)
1389
1389
  e[n].traverse(t); }, traverseVisible: function (t) { if (!1 !== this.visible) {
1390
1390
  t(this);
1391
1391
  for (var e = this.children, n = 0, i = e.length; n < i; n++)
@@ -1430,7 +1430,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1430
1430
  var i = t.children[n];
1431
1431
  this.add(i.clone());
1432
1432
  } return this; } }), xn.prototype = Object.assign(Object.create(yn.prototype), { constructor: xn, isScene: !0, copy: function (t, e) { return yn.prototype.copy.call(this, t, e), null !== t.background && (this.background = t.background.clone()), null !== t.environment && (this.environment = t.environment.clone()), null !== t.fog && (this.fog = t.fog.clone()), null !== t.overrideMaterial && (this.overrideMaterial = t.overrideMaterial.clone()), this.autoUpdate = t.autoUpdate, this.matrixAutoUpdate = t.matrixAutoUpdate, this; }, toJSON: function (t) { var e = yn.prototype.toJSON.call(this, t); return null !== this.background && (e.object.background = this.background.toJSON(t)), null !== this.environment && (e.object.environment = this.environment.toJSON(t)), null !== this.fog && (e.object.fog = this.fog.toJSON()), e; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); } });
1433
- var _n = [new We, new We, new We, new We, new We, new We, new We, new We], wn = new We, bn = new Pn, Mn = new We, Sn = new We, Cn = new We, Tn = new We, En = new We, An = new We, Dn = new We, Ln = new We, On = new We, In = new We;
1433
+ var _n = [new We, new We, new We, new We, new We, new We, new We, new We], wn = new We, bn = new Pn, Mn = new We, Sn = new We, Cn = new We, Tn = new We, En = new We, An = new We, Dn = new We, On = new We, Ln = new We, In = new We;
1434
1434
  function Pn(t, e) { this.min = void 0 !== t ? t : new We(1 / 0, 1 / 0, 1 / 0), this.max = void 0 !== e ? e : new We(-1 / 0, -1 / 0, -1 / 0); }
1435
1435
  function Rn(t, e, n, i, r) { var a, o; for (a = 0, o = t.length - 3; a <= o; a += 3) {
1436
1436
  In.fromArray(t, a);
@@ -1447,14 +1447,14 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1447
1447
  } return this.min.set(e, n, i), this.max.set(r, a, o), this; }, setFromPoints: function (t) { this.makeEmpty(); for (var e = 0, n = t.length; e < n; e++)
1448
1448
  this.expandByPoint(t[e]); return this; }, setFromCenterAndSize: function (t, e) { var n = wn.copy(e).multiplyScalar(.5); return this.min.copy(t).sub(n), this.max.copy(t).add(n), this; }, setFromObject: function (t) { return this.makeEmpty(), this.expandByObject(t); }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.min.copy(t.min), this.max.copy(t.max), this; }, makeEmpty: function () { return this.min.x = this.min.y = this.min.z = 1 / 0, this.max.x = this.max.y = this.max.z = -1 / 0, this; }, isEmpty: function () { return this.max.x < this.min.x || this.max.y < this.min.y || this.max.z < this.min.z; }, getCenter: function (t) { return void 0 === t && (console.warn("THREE.Box3: .getCenter() target is now required"), t = new We), this.isEmpty() ? t.set(0, 0, 0) : t.addVectors(this.min, this.max).multiplyScalar(.5); }, getSize: function (t) { return void 0 === t && (console.warn("THREE.Box3: .getSize() target is now required"), t = new We), this.isEmpty() ? t.set(0, 0, 0) : t.subVectors(this.max, this.min); }, expandByPoint: function (t) { return this.min.min(t), this.max.max(t), this; }, expandByVector: function (t) { return this.min.sub(t), this.max.add(t), this; }, expandByScalar: function (t) { return this.min.addScalar(-t), this.max.addScalar(t), this; }, expandByObject: function (t) { t.updateWorldMatrix(!1, !1); var e = t.geometry; void 0 !== e && (null === e.boundingBox && e.computeBoundingBox(), bn.copy(e.boundingBox), bn.applyMatrix4(t.matrixWorld), this.expandByPoint(bn.min), this.expandByPoint(bn.max)); for (var n = t.children, i = 0, r = n.length; i < r; i++)
1449
1449
  this.expandByObject(n[i]); return this; }, containsPoint: function (t) { return !(t.x < this.min.x || t.x > this.max.x || t.y < this.min.y || t.y > this.max.y || t.z < this.min.z || t.z > this.max.z); }, containsBox: function (t) { return this.min.x <= t.min.x && t.max.x <= this.max.x && this.min.y <= t.min.y && t.max.y <= this.max.y && this.min.z <= t.min.z && t.max.z <= this.max.z; }, getParameter: function (t, e) { return void 0 === e && (console.warn("THREE.Box3: .getParameter() target is now required"), e = new We), e.set((t.x - this.min.x) / (this.max.x - this.min.x), (t.y - this.min.y) / (this.max.y - this.min.y), (t.z - this.min.z) / (this.max.z - this.min.z)); }, intersectsBox: function (t) { return !(t.max.x < this.min.x || t.min.x > this.max.x || t.max.y < this.min.y || t.min.y > this.max.y || t.max.z < this.min.z || t.min.z > this.max.z); }, intersectsSphere: function (t) { return this.clampPoint(t.center, wn), wn.distanceToSquared(t.center) <= t.radius * t.radius; }, intersectsPlane: function (t) { var e, n; return n = 0 < t.normal.x ? (e = t.normal.x * this.min.x, t.normal.x * this.max.x) : (e = t.normal.x * this.max.x, t.normal.x * this.min.x), 0 < t.normal.y ? (e += t.normal.y * this.min.y, n += t.normal.y * this.max.y) : (e += t.normal.y * this.max.y, n += t.normal.y * this.min.y), 0 < t.normal.z ? (e += t.normal.z * this.min.z, n += t.normal.z * this.max.z) : (e += t.normal.z * this.max.z, n += t.normal.z * this.min.z), e <= -t.constant && n >= -t.constant; }, intersectsTriangle: function (t) { if (this.isEmpty())
1450
- return !1; this.getCenter(Dn), Ln.subVectors(this.max, Dn), Mn.subVectors(t.a, Dn), Sn.subVectors(t.b, Dn), Cn.subVectors(t.c, Dn), Tn.subVectors(Sn, Mn), En.subVectors(Cn, Sn), An.subVectors(Mn, Cn); var e = [0, -Tn.z, Tn.y, 0, -En.z, En.y, 0, -An.z, An.y, Tn.z, 0, -Tn.x, En.z, 0, -En.x, An.z, 0, -An.x, -Tn.y, Tn.x, 0, -En.y, En.x, 0, -An.y, An.x, 0]; return !!Rn(e, Mn, Sn, Cn, Ln) && (!!Rn(e = [1, 0, 0, 0, 1, 0, 0, 0, 1], Mn, Sn, Cn, Ln) && (On.crossVectors(Tn, En), Rn(e = [On.x, On.y, On.z], Mn, Sn, Cn, Ln))); }, clampPoint: function (t, e) { return void 0 === e && (console.warn("THREE.Box3: .clampPoint() target is now required"), e = new We), e.copy(t).clamp(this.min, this.max); }, distanceToPoint: function (t) { return wn.copy(t).clamp(this.min, this.max).sub(t).length(); }, getBoundingSphere: function (t) { return void 0 === t && console.error("THREE.Box3: .getBoundingSphere() target is now required"), this.getCenter(t.center), t.radius = .5 * this.getSize(wn).length(), t; }, intersect: function (t) { return this.min.max(t.min), this.max.min(t.max), this.isEmpty() && this.makeEmpty(), this; }, union: function (t) { return this.min.min(t.min), this.max.max(t.max), this; }, applyMatrix4: function (t) { return this.isEmpty() || (_n[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(t), _n[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(t), _n[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(t), _n[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(t), _n[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(t), _n[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(t), _n[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(t), _n[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(t), this.setFromPoints(_n)), this; }, translate: function (t) { return this.min.add(t), this.max.add(t), this; }, equals: function (t) { return t.min.equals(this.min) && t.max.equals(this.max); } });
1450
+ return !1; this.getCenter(Dn), On.subVectors(this.max, Dn), Mn.subVectors(t.a, Dn), Sn.subVectors(t.b, Dn), Cn.subVectors(t.c, Dn), Tn.subVectors(Sn, Mn), En.subVectors(Cn, Sn), An.subVectors(Mn, Cn); var e = [0, -Tn.z, Tn.y, 0, -En.z, En.y, 0, -An.z, An.y, Tn.z, 0, -Tn.x, En.z, 0, -En.x, An.z, 0, -An.x, -Tn.y, Tn.x, 0, -En.y, En.x, 0, -An.y, An.x, 0]; return !!Rn(e, Mn, Sn, Cn, On) && (!!Rn(e = [1, 0, 0, 0, 1, 0, 0, 0, 1], Mn, Sn, Cn, On) && (Ln.crossVectors(Tn, En), Rn(e = [Ln.x, Ln.y, Ln.z], Mn, Sn, Cn, On))); }, clampPoint: function (t, e) { return void 0 === e && (console.warn("THREE.Box3: .clampPoint() target is now required"), e = new We), e.copy(t).clamp(this.min, this.max); }, distanceToPoint: function (t) { return wn.copy(t).clamp(this.min, this.max).sub(t).length(); }, getBoundingSphere: function (t) { return void 0 === t && console.error("THREE.Box3: .getBoundingSphere() target is now required"), this.getCenter(t.center), t.radius = .5 * this.getSize(wn).length(), t; }, intersect: function (t) { return this.min.max(t.min), this.max.min(t.max), this.isEmpty() && this.makeEmpty(), this; }, union: function (t) { return this.min.min(t.min), this.max.max(t.max), this; }, applyMatrix4: function (t) { return this.isEmpty() || (_n[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(t), _n[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(t), _n[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(t), _n[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(t), _n[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(t), _n[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(t), _n[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(t), _n[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(t), this.setFromPoints(_n)), this; }, translate: function (t) { return this.min.add(t), this.max.add(t), this; }, equals: function (t) { return t.min.equals(this.min) && t.max.equals(this.max); } });
1451
1451
  var kn = new Pn;
1452
1452
  function Nn(t, e) { this.center = void 0 !== t ? t : new We, this.radius = void 0 !== e ? e : 0; }
1453
1453
  Object.assign(Nn.prototype, { set: function (t, e) { return this.center.copy(t), this.radius = e, this; }, setFromPoints: function (t, e) { var n = this.center; void 0 !== e ? n.copy(e) : kn.setFromPoints(t).getCenter(n); for (var i = 0, r = 0, a = t.length; r < a; r++)
1454
1454
  i = Math.max(i, n.distanceToSquared(t[r])); return this.radius = Math.sqrt(i), this; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.center.copy(t.center), this.radius = t.radius, this; }, empty: function () { return this.radius <= 0; }, containsPoint: function (t) { return t.distanceToSquared(this.center) <= this.radius * this.radius; }, distanceToPoint: function (t) { return t.distanceTo(this.center) - this.radius; }, intersectsSphere: function (t) { var e = this.radius + t.radius; return t.center.distanceToSquared(this.center) <= e * e; }, intersectsBox: function (t) { return t.intersectsSphere(this); }, intersectsPlane: function (t) { return Math.abs(t.distanceToPoint(this.center)) <= this.radius; }, clampPoint: function (t, e) { var n = this.center.distanceToSquared(t); return void 0 === e && (console.warn("THREE.Sphere: .clampPoint() target is now required"), e = new We), e.copy(t), n > this.radius * this.radius && (e.sub(this.center).normalize(), e.multiplyScalar(this.radius).add(this.center)), e; }, getBoundingBox: function (t) { return void 0 === t && (console.warn("THREE.Sphere: .getBoundingBox() target is now required"), t = new Pn), t.set(this.center, this.center), t.expandByScalar(this.radius), t; }, applyMatrix4: function (t) { return this.center.applyMatrix4(t), this.radius = this.radius * t.getMaxScaleOnAxis(), this; }, translate: function (t) { return this.center.add(t), this; }, equals: function (t) { return t.center.equals(this.center) && t.radius === this.radius; } });
1455
- var Bn = new We, Fn = new We, zn = new We, Vn = new We, Un = new We, jn = new We, Gn = new We;
1455
+ var Bn = new We, Fn = new We, zn = new We, jn = new We, Vn = new We, Un = new We, Gn = new We;
1456
1456
  function Hn(t, e) { this.origin = void 0 !== t ? t : new We, this.direction = void 0 !== e ? e : new We(0, 0, -1); }
1457
- Object.assign(Hn.prototype, { set: function (t, e) { return this.origin.copy(t), this.direction.copy(e), this; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.origin.copy(t.origin), this.direction.copy(t.direction), this; }, at: function (t, e) { return void 0 === e && (console.warn("THREE.Ray: .at() target is now required"), e = new We), e.copy(this.direction).multiplyScalar(t).add(this.origin); }, lookAt: function (t) { return this.direction.copy(t).sub(this.origin).normalize(), this; }, recast: function (t) { return this.origin.copy(this.at(t, Bn)), this; }, closestPointToPoint: function (t, e) { void 0 === e && (console.warn("THREE.Ray: .closestPointToPoint() target is now required"), e = new We), e.subVectors(t, this.origin); var n = e.dot(this.direction); return n < 0 ? e.copy(this.origin) : e.copy(this.direction).multiplyScalar(n).add(this.origin); }, distanceToPoint: function (t) { return Math.sqrt(this.distanceSqToPoint(t)); }, distanceSqToPoint: function (t) { var e = Bn.subVectors(t, this.origin).dot(this.direction); return e < 0 ? this.origin.distanceToSquared(t) : (Bn.copy(this.direction).multiplyScalar(e).add(this.origin), Bn.distanceToSquared(t)); }, distanceSqToSegment: function (t, e, n, i) { Fn.copy(t).add(e).multiplyScalar(.5), zn.copy(e).sub(t).normalize(), Vn.copy(this.origin).sub(Fn); var r, a, o, s, l = .5 * t.distanceTo(e), c = -this.direction.dot(zn), u = Vn.dot(this.direction), h = -Vn.dot(zn), d = Vn.lengthSq(), p = Math.abs(1 - c * c); if (0 < p)
1457
+ Object.assign(Hn.prototype, { set: function (t, e) { return this.origin.copy(t), this.direction.copy(e), this; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.origin.copy(t.origin), this.direction.copy(t.direction), this; }, at: function (t, e) { return void 0 === e && (console.warn("THREE.Ray: .at() target is now required"), e = new We), e.copy(this.direction).multiplyScalar(t).add(this.origin); }, lookAt: function (t) { return this.direction.copy(t).sub(this.origin).normalize(), this; }, recast: function (t) { return this.origin.copy(this.at(t, Bn)), this; }, closestPointToPoint: function (t, e) { void 0 === e && (console.warn("THREE.Ray: .closestPointToPoint() target is now required"), e = new We), e.subVectors(t, this.origin); var n = e.dot(this.direction); return n < 0 ? e.copy(this.origin) : e.copy(this.direction).multiplyScalar(n).add(this.origin); }, distanceToPoint: function (t) { return Math.sqrt(this.distanceSqToPoint(t)); }, distanceSqToPoint: function (t) { var e = Bn.subVectors(t, this.origin).dot(this.direction); return e < 0 ? this.origin.distanceToSquared(t) : (Bn.copy(this.direction).multiplyScalar(e).add(this.origin), Bn.distanceToSquared(t)); }, distanceSqToSegment: function (t, e, n, i) { Fn.copy(t).add(e).multiplyScalar(.5), zn.copy(e).sub(t).normalize(), jn.copy(this.origin).sub(Fn); var r, a, o, s, l = .5 * t.distanceTo(e), c = -this.direction.dot(zn), u = jn.dot(this.direction), h = -jn.dot(zn), d = jn.lengthSq(), p = Math.abs(1 - c * c); if (0 < p)
1458
1458
  if (a = c * u - h, s = l * p, 0 <= (r = c * h - u))
1459
1459
  if (-s <= a)
1460
1460
  if (a <= s) {
@@ -1470,7 +1470,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1470
1470
  else
1471
1471
  a = 0 < c ? -l : l, o = -(r = Math.max(0, -(c * a + u))) * r + a * (a + 2 * h) + d; return n && n.copy(this.direction).multiplyScalar(r).add(this.origin), i && i.copy(zn).multiplyScalar(a).add(Fn), o; }, intersectSphere: function (t, e) { Bn.subVectors(t.center, this.origin); var n = Bn.dot(this.direction), i = Bn.dot(Bn) - n * n, r = t.radius * t.radius; if (r < i)
1472
1472
  return null; var a = Math.sqrt(r - i), o = n - a, s = n + a; return o < 0 && s < 0 ? null : o < 0 ? this.at(s, e) : this.at(o, e); }, intersectsSphere: function (t) { return this.distanceSqToPoint(t.center) <= t.radius * t.radius; }, distanceToPlane: function (t) { var e = t.normal.dot(this.direction); if (0 === e)
1473
- return 0 === t.distanceToPoint(this.origin) ? 0 : null; var n = -(this.origin.dot(t.normal) + t.constant) / e; return 0 <= n ? n : null; }, intersectPlane: function (t, e) { var n = this.distanceToPlane(t); return null === n ? null : this.at(n, e); }, intersectsPlane: function (t) { var e = t.distanceToPoint(this.origin); return 0 === e || t.normal.dot(this.direction) * e < 0; }, intersectBox: function (t, e) { var n, i, r, a, o, s, l = 1 / this.direction.x, c = 1 / this.direction.y, u = 1 / this.direction.z, h = this.origin; return i = 0 <= l ? (n = (t.min.x - h.x) * l, (t.max.x - h.x) * l) : (n = (t.max.x - h.x) * l, (t.min.x - h.x) * l), (a = 0 <= c ? (r = (t.min.y - h.y) * c, (t.max.y - h.y) * c) : (r = (t.max.y - h.y) * c, (t.min.y - h.y) * c)) < n || i < r ? null : ((n < r || n != n) && (n = r), (a < i || i != i) && (i = a), (s = 0 <= u ? (o = (t.min.z - h.z) * u, (t.max.z - h.z) * u) : (o = (t.max.z - h.z) * u, (t.min.z - h.z) * u)) < n || i < o ? null : ((n < o || n != n) && (n = o), (s < i || i != i) && (i = s), i < 0 ? null : this.at(0 <= n ? n : i, e))); }, intersectsBox: function (t) { return null !== this.intersectBox(t, Bn); }, intersectTriangle: function (t, e, n, i, r) { Un.subVectors(e, t), jn.subVectors(n, t), Gn.crossVectors(Un, jn); var a, o = this.direction.dot(Gn); if (0 < o) {
1473
+ return 0 === t.distanceToPoint(this.origin) ? 0 : null; var n = -(this.origin.dot(t.normal) + t.constant) / e; return 0 <= n ? n : null; }, intersectPlane: function (t, e) { var n = this.distanceToPlane(t); return null === n ? null : this.at(n, e); }, intersectsPlane: function (t) { var e = t.distanceToPoint(this.origin); return 0 === e || t.normal.dot(this.direction) * e < 0; }, intersectBox: function (t, e) { var n, i, r, a, o, s, l = 1 / this.direction.x, c = 1 / this.direction.y, u = 1 / this.direction.z, h = this.origin; return i = 0 <= l ? (n = (t.min.x - h.x) * l, (t.max.x - h.x) * l) : (n = (t.max.x - h.x) * l, (t.min.x - h.x) * l), (a = 0 <= c ? (r = (t.min.y - h.y) * c, (t.max.y - h.y) * c) : (r = (t.max.y - h.y) * c, (t.min.y - h.y) * c)) < n || i < r ? null : ((n < r || n != n) && (n = r), (a < i || i != i) && (i = a), (s = 0 <= u ? (o = (t.min.z - h.z) * u, (t.max.z - h.z) * u) : (o = (t.max.z - h.z) * u, (t.min.z - h.z) * u)) < n || i < o ? null : ((n < o || n != n) && (n = o), (s < i || i != i) && (i = s), i < 0 ? null : this.at(0 <= n ? n : i, e))); }, intersectsBox: function (t) { return null !== this.intersectBox(t, Bn); }, intersectTriangle: function (t, e, n, i, r) { Vn.subVectors(e, t), Un.subVectors(n, t), Gn.crossVectors(Vn, Un); var a, o = this.direction.dot(Gn); if (0 < o) {
1474
1474
  if (i)
1475
1475
  return null;
1476
1476
  a = 1;
@@ -1479,10 +1479,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1479
1479
  if (!(o < 0))
1480
1480
  return null;
1481
1481
  a = -1, o = -o;
1482
- } Vn.subVectors(this.origin, t); var s = a * this.direction.dot(jn.crossVectors(Vn, jn)); if (s < 0)
1483
- return null; var l = a * this.direction.dot(Un.cross(Vn)); if (l < 0)
1482
+ } jn.subVectors(this.origin, t); var s = a * this.direction.dot(Un.crossVectors(jn, Un)); if (s < 0)
1483
+ return null; var l = a * this.direction.dot(Vn.cross(jn)); if (l < 0)
1484
1484
  return null; if (o < s + l)
1485
- return null; var c = -a * Vn.dot(Gn); return c < 0 ? null : this.at(c / o, r); }, applyMatrix4: function (t) { return this.origin.applyMatrix4(t), this.direction.transformDirection(t), this; }, equals: function (t) { return t.origin.equals(this.origin) && t.direction.equals(this.direction); } });
1485
+ return null; var c = -a * jn.dot(Gn); return c < 0 ? null : this.at(c / o, r); }, applyMatrix4: function (t) { return this.origin.applyMatrix4(t), this.direction.transformDirection(t), this; }, equals: function (t) { return t.origin.equals(this.origin) && t.direction.equals(this.direction); } });
1486
1486
  var Wn = new We, Jn = new We, qn = new ke;
1487
1487
  function Xn(t, e) { this.normal = void 0 !== t ? t : new We(1, 0, 0), this.constant = void 0 !== e ? e : 0; }
1488
1488
  Object.assign(Xn.prototype, { isPlane: !0, set: function (t, e) { return this.normal.copy(t), this.constant = e, this; }, setComponents: function (t, e, n, i) { return this.normal.set(t, e, n), this.constant = i, this; }, setFromNormalAndCoplanarPoint: function (t, e) { return this.normal.copy(t), this.constant = -e.dot(this.normal), this; }, setFromCoplanarPoints: function (t, e, n) { var i = Wn.subVectors(n, e).cross(Jn.subVectors(t, e)).normalize(); return this.setFromNormalAndCoplanarPoint(i, t), this; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { return this.normal.copy(t.normal), this.constant = t.constant, this; }, normalize: function () { var t = 1 / this.normal.length(); return this.normal.multiplyScalar(t), this.constant *= t, this; }, negate: function () { return this.constant *= -1, this.normal.negate(), this; }, distanceToPoint: function (t) { return this.normal.dot(t) + this.constant; }, distanceToSphere: function (t) { return this.distanceToPoint(t.center) - t.radius; }, projectPoint: function (t, e) { return void 0 === e && (console.warn("THREE.Plane: .projectPoint() target is now required"), e = new We), e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t); }, intersectLine: function (t, e) { void 0 === e && (console.warn("THREE.Plane: .intersectLine() target is now required"), e = new We); var n = t.delta(Wn), i = this.normal.dot(n); if (0 === i)
@@ -1549,8 +1549,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1549
1549
  this.vertexNormals[e] = t.vertexNormals[e].clone(); for (e = 0, n = t.vertexColors.length; e < n; e++)
1550
1550
  this.vertexColors[e] = t.vertexColors[e].clone(); return this; } });
1551
1551
  var fi = 0;
1552
- function mi() { Object.defineProperty(this, "id", { value: fi++ }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "Material", this.fog = !0, this.blending = Q, this.side = O, this.flatShading = !1, this.vertexTangents = !1, this.vertexColors = o, this.opacity = 1, this.transparent = !1, this.blendSrc = pt, this.blendDst = ft, this.blendEquation = rt, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = Mt, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = Te, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Ce, this.stencilZFail = Ce, this.stencilZPass = Ce, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaTest = 0, this.premultipliedAlpha = !1, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0; }
1553
- function gi(t) { mi.call(this), this.type = "MeshBasicMaterial", this.color = new ci(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.setValues(t); }
1552
+ function mi() { Object.defineProperty(this, "id", { value: fi++ }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "Material", this.fog = !0, this.blending = Q, this.side = L, this.flatShading = !1, this.vertexTangents = !1, this.vertexColors = o, this.opacity = 1, this.transparent = !1, this.blendSrc = pt, this.blendDst = ft, this.blendEquation = rt, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.depthFunc = Mt, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = Te, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = Ce, this.stencilZFail = Ce, this.stencilZPass = Ce, this.stencilWrite = !1, this.clippingPlanes = null, this.clipIntersection = !1, this.clipShadows = !1, this.shadowSide = null, this.colorWrite = !0, this.precision = null, this.polygonOffset = !1, this.polygonOffsetFactor = 0, this.polygonOffsetUnits = 0, this.dithering = !1, this.alphaTest = 0, this.premultipliedAlpha = !1, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0; }
1553
+ function gi(t) { mi.call(this), this.type = "MeshBasicMaterial", this.color = new ci(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = V, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.setValues(t); }
1554
1554
  mi.prototype = Object.assign(Object.create(De.prototype), { constructor: mi, isMaterial: !0, onBeforeCompile: function () { }, setValues: function (t) { if (void 0 !== t)
1555
1555
  for (var e in t) {
1556
1556
  var n = t[e];
@@ -1566,7 +1566,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1566
1566
  } }, toJSON: function (t) { var e = void 0 === t || "string" == typeof t; e && (t = { textures: {}, images: {} }); var n = { metadata: { version: 4.5, type: "Material", generator: "Material.toJSON" } }; function i(t) { var e = []; for (var n in t) {
1567
1567
  var i = t[n];
1568
1568
  delete i.metadata, e.push(i);
1569
- } return e; } if (n.uuid = this.uuid, n.type = this.type, "" !== this.name && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), void 0 !== this.roughness && (n.roughness = this.roughness), void 0 !== this.metalness && (n.metalness = this.metalness), this.sheen && this.sheen.isColor && (n.sheen = this.sheen.getHex()), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity && 1 !== this.emissiveIntensity && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), void 0 !== this.shininess && (n.shininess = this.shininess), void 0 !== this.clearcoat && (n.clearcoat = this.clearcoat), void 0 !== this.clearcoatRoughness && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(t).uuid), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(t).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(t).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(t).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(t).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(t).uuid, n.reflectivity = this.reflectivity, n.refractionRatio = this.refractionRatio, void 0 !== this.combine && (n.combine = this.combine), void 0 !== this.envMapIntensity && (n.envMapIntensity = this.envMapIntensity)), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(t).uuid), void 0 !== this.size && (n.size = this.size), void 0 !== this.sizeAttenuation && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Q && (n.blending = this.blending), !0 === this.flatShading && (n.flatShading = this.flatShading), this.side !== O && (n.side = this.side), this.vertexColors !== o && (n.vertexColors = this.vertexColors), this.opacity < 1 && (n.opacity = this.opacity), !0 === this.transparent && (n.transparent = this.transparent), n.depthFunc = this.depthFunc, n.depthTest = this.depthTest, n.depthWrite = this.depthWrite, n.stencilWrite = this.stencilWrite, n.stencilWriteMask = this.stencilWriteMask, n.stencilFunc = this.stencilFunc, n.stencilRef = this.stencilRef, n.stencilFuncMask = this.stencilFuncMask, n.stencilFail = this.stencilFail, n.stencilZFail = this.stencilZFail, n.stencilZPass = this.stencilZPass, this.rotation && 0 !== this.rotation && (n.rotation = this.rotation), !0 === this.polygonOffset && (n.polygonOffset = !0), 0 !== this.polygonOffsetFactor && (n.polygonOffsetFactor = this.polygonOffsetFactor), 0 !== this.polygonOffsetUnits && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth && 1 !== this.linewidth && (n.linewidth = this.linewidth), void 0 !== this.dashSize && (n.dashSize = this.dashSize), void 0 !== this.gapSize && (n.gapSize = this.gapSize), void 0 !== this.scale && (n.scale = this.scale), !0 === this.dithering && (n.dithering = !0), 0 < this.alphaTest && (n.alphaTest = this.alphaTest), !0 === this.premultipliedAlpha && (n.premultipliedAlpha = this.premultipliedAlpha), !0 === this.wireframe && (n.wireframe = this.wireframe), 1 < this.wireframeLinewidth && (n.wireframeLinewidth = this.wireframeLinewidth), "round" !== this.wireframeLinecap && (n.wireframeLinecap = this.wireframeLinecap), "round" !== this.wireframeLinejoin && (n.wireframeLinejoin = this.wireframeLinejoin), !0 === this.morphTargets && (n.morphTargets = !0), !0 === this.morphNormals && (n.morphNormals = !0), !0 === this.skinning && (n.skinning = !0), !1 === this.visible && (n.visible = !1), !1 === this.toneMapped && (n.toneMapped = !1), "{}" !== JSON.stringify(this.userData) && (n.userData = this.userData), e) {
1569
+ } return e; } if (n.uuid = this.uuid, n.type = this.type, "" !== this.name && (n.name = this.name), this.color && this.color.isColor && (n.color = this.color.getHex()), void 0 !== this.roughness && (n.roughness = this.roughness), void 0 !== this.metalness && (n.metalness = this.metalness), this.sheen && this.sheen.isColor && (n.sheen = this.sheen.getHex()), this.emissive && this.emissive.isColor && (n.emissive = this.emissive.getHex()), this.emissiveIntensity && 1 !== this.emissiveIntensity && (n.emissiveIntensity = this.emissiveIntensity), this.specular && this.specular.isColor && (n.specular = this.specular.getHex()), void 0 !== this.shininess && (n.shininess = this.shininess), void 0 !== this.clearcoat && (n.clearcoat = this.clearcoat), void 0 !== this.clearcoatRoughness && (n.clearcoatRoughness = this.clearcoatRoughness), this.clearcoatNormalMap && this.clearcoatNormalMap.isTexture && (n.clearcoatNormalMap = this.clearcoatNormalMap.toJSON(t).uuid, n.clearcoatNormalScale = this.clearcoatNormalScale.toArray()), this.map && this.map.isTexture && (n.map = this.map.toJSON(t).uuid), this.matcap && this.matcap.isTexture && (n.matcap = this.matcap.toJSON(t).uuid), this.alphaMap && this.alphaMap.isTexture && (n.alphaMap = this.alphaMap.toJSON(t).uuid), this.lightMap && this.lightMap.isTexture && (n.lightMap = this.lightMap.toJSON(t).uuid), this.aoMap && this.aoMap.isTexture && (n.aoMap = this.aoMap.toJSON(t).uuid, n.aoMapIntensity = this.aoMapIntensity), this.bumpMap && this.bumpMap.isTexture && (n.bumpMap = this.bumpMap.toJSON(t).uuid, n.bumpScale = this.bumpScale), this.normalMap && this.normalMap.isTexture && (n.normalMap = this.normalMap.toJSON(t).uuid, n.normalMapType = this.normalMapType, n.normalScale = this.normalScale.toArray()), this.displacementMap && this.displacementMap.isTexture && (n.displacementMap = this.displacementMap.toJSON(t).uuid, n.displacementScale = this.displacementScale, n.displacementBias = this.displacementBias), this.roughnessMap && this.roughnessMap.isTexture && (n.roughnessMap = this.roughnessMap.toJSON(t).uuid), this.metalnessMap && this.metalnessMap.isTexture && (n.metalnessMap = this.metalnessMap.toJSON(t).uuid), this.emissiveMap && this.emissiveMap.isTexture && (n.emissiveMap = this.emissiveMap.toJSON(t).uuid), this.specularMap && this.specularMap.isTexture && (n.specularMap = this.specularMap.toJSON(t).uuid), this.envMap && this.envMap.isTexture && (n.envMap = this.envMap.toJSON(t).uuid, n.reflectivity = this.reflectivity, n.refractionRatio = this.refractionRatio, void 0 !== this.combine && (n.combine = this.combine), void 0 !== this.envMapIntensity && (n.envMapIntensity = this.envMapIntensity)), this.gradientMap && this.gradientMap.isTexture && (n.gradientMap = this.gradientMap.toJSON(t).uuid), void 0 !== this.size && (n.size = this.size), void 0 !== this.sizeAttenuation && (n.sizeAttenuation = this.sizeAttenuation), this.blending !== Q && (n.blending = this.blending), !0 === this.flatShading && (n.flatShading = this.flatShading), this.side !== L && (n.side = this.side), this.vertexColors !== o && (n.vertexColors = this.vertexColors), this.opacity < 1 && (n.opacity = this.opacity), !0 === this.transparent && (n.transparent = this.transparent), n.depthFunc = this.depthFunc, n.depthTest = this.depthTest, n.depthWrite = this.depthWrite, n.stencilWrite = this.stencilWrite, n.stencilWriteMask = this.stencilWriteMask, n.stencilFunc = this.stencilFunc, n.stencilRef = this.stencilRef, n.stencilFuncMask = this.stencilFuncMask, n.stencilFail = this.stencilFail, n.stencilZFail = this.stencilZFail, n.stencilZPass = this.stencilZPass, this.rotation && 0 !== this.rotation && (n.rotation = this.rotation), !0 === this.polygonOffset && (n.polygonOffset = !0), 0 !== this.polygonOffsetFactor && (n.polygonOffsetFactor = this.polygonOffsetFactor), 0 !== this.polygonOffsetUnits && (n.polygonOffsetUnits = this.polygonOffsetUnits), this.linewidth && 1 !== this.linewidth && (n.linewidth = this.linewidth), void 0 !== this.dashSize && (n.dashSize = this.dashSize), void 0 !== this.gapSize && (n.gapSize = this.gapSize), void 0 !== this.scale && (n.scale = this.scale), !0 === this.dithering && (n.dithering = !0), 0 < this.alphaTest && (n.alphaTest = this.alphaTest), !0 === this.premultipliedAlpha && (n.premultipliedAlpha = this.premultipliedAlpha), !0 === this.wireframe && (n.wireframe = this.wireframe), 1 < this.wireframeLinewidth && (n.wireframeLinewidth = this.wireframeLinewidth), "round" !== this.wireframeLinecap && (n.wireframeLinecap = this.wireframeLinecap), "round" !== this.wireframeLinejoin && (n.wireframeLinejoin = this.wireframeLinejoin), !0 === this.morphTargets && (n.morphTargets = !0), !0 === this.morphNormals && (n.morphNormals = !0), !0 === this.skinning && (n.skinning = !0), !1 === this.visible && (n.visible = !1), !1 === this.toneMapped && (n.toneMapped = !1), "{}" !== JSON.stringify(this.userData) && (n.userData = this.userData), e) {
1570
1570
  var r = i(t.textures), a = i(t.images);
1571
1571
  0 < r.length && (n.textures = r), 0 < a.length && (n.images = a);
1572
1572
  } return n; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { this.name = t.name, this.fog = t.fog, this.blending = t.blending, this.side = t.side, this.flatShading = t.flatShading, this.vertexTangents = t.vertexTangents, this.vertexColors = t.vertexColors, this.opacity = t.opacity, this.transparent = t.transparent, this.blendSrc = t.blendSrc, this.blendDst = t.blendDst, this.blendEquation = t.blendEquation, this.blendSrcAlpha = t.blendSrcAlpha, this.blendDstAlpha = t.blendDstAlpha, this.blendEquationAlpha = t.blendEquationAlpha, this.depthFunc = t.depthFunc, this.depthTest = t.depthTest, this.depthWrite = t.depthWrite, this.stencilWriteMask = t.stencilWriteMask, this.stencilFunc = t.stencilFunc, this.stencilRef = t.stencilRef, this.stencilFuncMask = t.stencilFuncMask, this.stencilFail = t.stencilFail, this.stencilZFail = t.stencilZFail, this.stencilZPass = t.stencilZPass, this.stencilWrite = t.stencilWrite; var e = t.clippingPlanes, n = null; if (null !== e) {
@@ -1652,12 +1652,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1652
1652
  }
1653
1653
  m && this.skinIndices.push(p[v.a], p[v.b], p[v.c]), g && this.skinWeights.push(f[v.a], f[v.b], f[v.c]);
1654
1654
  } return this.computeGroups(t), this.verticesNeedUpdate = t.verticesNeedUpdate, this.normalsNeedUpdate = t.normalsNeedUpdate, this.colorsNeedUpdate = t.colorsNeedUpdate, this.uvsNeedUpdate = t.uvsNeedUpdate, this.groupsNeedUpdate = t.groupsNeedUpdate, null !== t.boundingSphere && (this.boundingSphere = t.boundingSphere.clone()), null !== t.boundingBox && (this.boundingBox = t.boundingBox.clone()), this; } });
1655
- var Li = 1, Oi = new Qe, Ii = new yn, Pi = new We, Ri = new Pn, ki = new Pn, Ni = new We;
1656
- function Bi() { Object.defineProperty(this, "id", { value: Li += 2 }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {}; }
1655
+ var Oi = 1, Li = new Qe, Ii = new yn, Pi = new We, Ri = new Pn, ki = new Pn, Ni = new We;
1656
+ function Bi() { Object.defineProperty(this, "id", { value: Oi += 2 }), this.uuid = Pe.generateUUID(), this.name = "", this.type = "BufferGeometry", this.index = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {}; }
1657
1657
  Bi.prototype = Object.assign(Object.create(De.prototype), { constructor: Bi, isBufferGeometry: !0, getIndex: function () { return this.index; }, setIndex: function (t) { Array.isArray(t) ? this.index = new (65535 < Di(t) ? Ci : Mi)(t, 1) : this.index = t; }, getAttribute: function (t) { return this.attributes[t]; }, setAttribute: function (t, e) { return this.attributes[t] = e, this; }, deleteAttribute: function (t) { return delete this.attributes[t], this; }, addGroup: function (t, e, n) { this.groups.push({ start: t, count: e, materialIndex: void 0 !== n ? n : 0 }); }, clearGroups: function () { this.groups = []; }, setDrawRange: function (t, e) { this.drawRange.start = t, this.drawRange.count = e; }, applyMatrix4: function (t) { var e = this.attributes.position; void 0 !== e && (e.applyMatrix4(t), e.needsUpdate = !0); var n = this.attributes.normal; if (void 0 !== n) {
1658
1658
  var i = (new ke).getNormalMatrix(t);
1659
1659
  n.applyNormalMatrix(i), n.needsUpdate = !0;
1660
- } var r = this.attributes.tangent; return void 0 !== r && (r.transformDirection(t), r.needsUpdate = !0), null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this; }, rotateX: function (t) { return Oi.makeRotationX(t), this.applyMatrix4(Oi), this; }, rotateY: function (t) { return Oi.makeRotationY(t), this.applyMatrix4(Oi), this; }, rotateZ: function (t) { return Oi.makeRotationZ(t), this.applyMatrix4(Oi), this; }, translate: function (t, e, n) { return Oi.makeTranslation(t, e, n), this.applyMatrix4(Oi), this; }, scale: function (t, e, n) { return Oi.makeScale(t, e, n), this.applyMatrix4(Oi), this; }, lookAt: function (t) { return Ii.lookAt(t), Ii.updateMatrix(), this.applyMatrix4(Ii.matrix), this; }, center: function () { return this.computeBoundingBox(), this.boundingBox.getCenter(Pi).negate(), this.translate(Pi.x, Pi.y, Pi.z), this; }, setFromObject: function (t) { var e = t.geometry; if (t.isPoints || t.isLine) {
1660
+ } var r = this.attributes.tangent; return void 0 !== r && (r.transformDirection(t), r.needsUpdate = !0), null !== this.boundingBox && this.computeBoundingBox(), null !== this.boundingSphere && this.computeBoundingSphere(), this; }, rotateX: function (t) { return Li.makeRotationX(t), this.applyMatrix4(Li), this; }, rotateY: function (t) { return Li.makeRotationY(t), this.applyMatrix4(Li), this; }, rotateZ: function (t) { return Li.makeRotationZ(t), this.applyMatrix4(Li), this; }, translate: function (t, e, n) { return Li.makeTranslation(t, e, n), this.applyMatrix4(Li), this; }, scale: function (t, e, n) { return Li.makeScale(t, e, n), this.applyMatrix4(Li), this; }, lookAt: function (t) { return Ii.lookAt(t), Ii.updateMatrix(), this.applyMatrix4(Ii.matrix), this; }, center: function () { return this.computeBoundingBox(), this.boundingBox.getCenter(Pi).negate(), this.translate(Pi.x, Pi.y, Pi.z), this; }, setFromObject: function (t) { var e = t.geometry; if (t.isPoints || t.isLine) {
1661
1661
  var n = new Ti(3 * e.vertices.length, 3), i = new Ti(3 * e.colors.length, 3);
1662
1662
  if (this.setAttribute("position", n.copyVector3sArray(e.vertices)), this.setAttribute("color", i.copyColorsArray(e.colors)), e.lineDistances && e.lineDistances.length === e.vertices.length) {
1663
1663
  var r = new Ti(e.lineDistances.length, 1);
@@ -1794,21 +1794,21 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1794
1794
  var h = u[n];
1795
1795
  this.addGroup(h.start, h.count, h.materialIndex);
1796
1796
  } var d = t.boundingBox; null !== d && (this.boundingBox = d.clone()); var p = t.boundingSphere; return null !== p && (this.boundingSphere = p.clone()), this.drawRange.start = t.drawRange.start, this.drawRange.count = t.drawRange.count, this.userData = t.userData, this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); } });
1797
- var Fi = new Qe, zi = new Hn, Vi = new Nn, Ui = new We, ji = new We, Gi = new We, Hi = new We, Wi = new We, Ji = new We, qi = new We, Xi = new We, Yi = new We, Zi = new Re, $i = new Re, Ki = new Re, Qi = new We, tr = new We;
1797
+ var Fi = new Qe, zi = new Hn, ji = new Nn, Vi = new We, Ui = new We, Gi = new We, Hi = new We, Wi = new We, Ji = new We, qi = new We, Xi = new We, Yi = new We, Zi = new Re, $i = new Re, Ki = new Re, Qi = new We, tr = new We;
1798
1798
  function er(t, e) { yn.call(this), this.type = "Mesh", this.geometry = void 0 !== t ? t : new Bi, this.material = void 0 !== e ? e : new gi, this.updateMorphTargets(); }
1799
1799
  function nr(t, e, n, i, r, a, o, s) { if (null === (e.side === St ? i.intersectTriangle(o, a, r, !0, s) : i.intersectTriangle(r, a, o, e.side !== $, s)))
1800
1800
  return null; tr.copy(s), tr.applyMatrix4(t.matrixWorld); var l = n.ray.origin.distanceTo(tr); return l < n.near || l > n.far ? null : { distance: l, point: tr.clone(), object: t }; }
1801
- function ir(t, e, n, i, r, a, o, s, l, c, u, h) { Ui.fromBufferAttribute(r, c), ji.fromBufferAttribute(r, u), Gi.fromBufferAttribute(r, h); var d = t.morphTargetInfluences; if (e.morphTargets && a && d) {
1801
+ function ir(t, e, n, i, r, a, o, s, l, c, u, h) { Vi.fromBufferAttribute(r, c), Ui.fromBufferAttribute(r, u), Gi.fromBufferAttribute(r, h); var d = t.morphTargetInfluences; if (e.morphTargets && a && d) {
1802
1802
  qi.set(0, 0, 0), Xi.set(0, 0, 0), Yi.set(0, 0, 0);
1803
1803
  for (var p = 0, f = a.length; p < f; p++) {
1804
1804
  var m = d[p], g = a[p];
1805
- 0 !== m && (Hi.fromBufferAttribute(g, c), Wi.fromBufferAttribute(g, u), Ji.fromBufferAttribute(g, h), o ? (qi.addScaledVector(Hi, m), Xi.addScaledVector(Wi, m), Yi.addScaledVector(Ji, m)) : (qi.addScaledVector(Hi.sub(Ui), m), Xi.addScaledVector(Wi.sub(ji), m), Yi.addScaledVector(Ji.sub(Gi), m)));
1805
+ 0 !== m && (Hi.fromBufferAttribute(g, c), Wi.fromBufferAttribute(g, u), Ji.fromBufferAttribute(g, h), o ? (qi.addScaledVector(Hi, m), Xi.addScaledVector(Wi, m), Yi.addScaledVector(Ji, m)) : (qi.addScaledVector(Hi.sub(Vi), m), Xi.addScaledVector(Wi.sub(Ui), m), Yi.addScaledVector(Ji.sub(Gi), m)));
1806
1806
  }
1807
- Ui.add(qi), ji.add(Xi), Gi.add(Yi);
1808
- } var v = nr(t, e, n, i, Ui, ji, Gi, Qi); if (v) {
1809
- s && (Zi.fromBufferAttribute(s, c), $i.fromBufferAttribute(s, u), Ki.fromBufferAttribute(s, h), v.uv = ai.getUV(Qi, Ui, ji, Gi, Zi, $i, Ki, new Re)), l && (Zi.fromBufferAttribute(l, c), $i.fromBufferAttribute(l, u), Ki.fromBufferAttribute(l, h), v.uv2 = ai.getUV(Qi, Ui, ji, Gi, Zi, $i, Ki, new Re));
1807
+ Vi.add(qi), Ui.add(Xi), Gi.add(Yi);
1808
+ } var v = nr(t, e, n, i, Vi, Ui, Gi, Qi); if (v) {
1809
+ s && (Zi.fromBufferAttribute(s, c), $i.fromBufferAttribute(s, u), Ki.fromBufferAttribute(s, h), v.uv = ai.getUV(Qi, Vi, Ui, Gi, Zi, $i, Ki, new Re)), l && (Zi.fromBufferAttribute(l, c), $i.fromBufferAttribute(l, u), Ki.fromBufferAttribute(l, h), v.uv2 = ai.getUV(Qi, Vi, Ui, Gi, Zi, $i, Ki, new Re));
1810
1810
  var y = new pi(c, u, h);
1811
- ai.getNormal(Ui, ji, Gi, y.normal), v.face = y;
1811
+ ai.getNormal(Vi, Ui, Gi, y.normal), v.face = y;
1812
1812
  } return v; }
1813
1813
  er.prototype = Object.assign(Object.create(yn.prototype), { constructor: er, isMesh: !0, copy: function (t) { return yn.prototype.copy.call(this, t), void 0 !== t.morphTargetInfluences && (this.morphTargetInfluences = t.morphTargetInfluences.slice()), void 0 !== t.morphTargetDictionary && (this.morphTargetDictionary = Object.assign({}, t.morphTargetDictionary)), this; }, updateMorphTargets: function () { var t, e, n, i = this.geometry; if (i.isBufferGeometry) {
1814
1814
  var r = i.morphAttributes, a = Object.keys(r);
@@ -1822,7 +1822,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1822
1822
  else {
1823
1823
  var s = i.morphTargets;
1824
1824
  void 0 !== s && 0 < s.length && console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");
1825
- } }, raycast: function (t, e) { var n, i = this.geometry, r = this.material, a = this.matrixWorld; if (void 0 !== r && (null === i.boundingSphere && i.computeBoundingSphere(), Vi.copy(i.boundingSphere), Vi.applyMatrix4(a), !1 !== t.ray.intersectsSphere(Vi) && (Fi.getInverse(a), zi.copy(t.ray).applyMatrix4(Fi), null === i.boundingBox || !1 !== zi.intersectsBox(i.boundingBox))))
1825
+ } }, raycast: function (t, e) { var n, i = this.geometry, r = this.material, a = this.matrixWorld; if (void 0 !== r && (null === i.boundingSphere && i.computeBoundingSphere(), ji.copy(i.boundingSphere), ji.applyMatrix4(a), !1 !== t.ray.intersectsSphere(ji) && (Fi.getInverse(a), zi.copy(t.ray).applyMatrix4(Fi), null === i.boundingBox || !1 !== zi.intersectsBox(i.boundingBox))))
1826
1826
  if (i.isBufferGeometry) {
1827
1827
  var o, s, l, c, u, h, d, p, f, m = i.index, g = i.attributes.position, v = i.morphAttributes.position, y = i.morphTargetsRelative, x = i.attributes.uv, _ = i.attributes.uv2, w = i.groups, b = i.drawRange;
1828
1828
  if (null !== m)
@@ -1843,16 +1843,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
1843
1843
  (n = ir(this, r, t, zi, g, v, y, x, _, o = c, s = c + 1, l = c + 2)) && (n.faceIndex = Math.floor(c / 3), e.push(n));
1844
1844
  }
1845
1845
  else if (i.isGeometry) {
1846
- var M, S, C, T, E = Array.isArray(r), A = i.vertices, D = i.faces, L = i.faceVertexUvs[0];
1847
- 0 < L.length && (T = L);
1848
- for (var O = 0, I = D.length; O < I; O++) {
1849
- var P = D[O], R = E ? r[P.materialIndex] : r;
1846
+ var M, S, C, T, E = Array.isArray(r), A = i.vertices, D = i.faces, O = i.faceVertexUvs[0];
1847
+ 0 < O.length && (T = O);
1848
+ for (var L = 0, I = D.length; L < I; L++) {
1849
+ var P = D[L], R = E ? r[P.materialIndex] : r;
1850
1850
  if (void 0 !== R && (M = A[P.a], S = A[P.b], C = A[P.c], n = nr(this, R, t, zi, M, S, C, Qi))) {
1851
- if (T && T[O]) {
1852
- var k = T[O];
1851
+ if (T && T[L]) {
1852
+ var k = T[L];
1853
1853
  Zi.copy(k[0]), $i.copy(k[1]), Ki.copy(k[2]), n.uv = ai.getUV(Qi, M, S, C, Zi, $i, Ki, new Re);
1854
1854
  }
1855
- n.face = P, n.faceIndex = O, e.push(n);
1855
+ n.face = P, n.faceIndex = L, e.push(n);
1856
1856
  }
1857
1857
  }
1858
1858
  } }, clone: function () { return new this.constructor(this.geometry, this.material).copy(this); } });
@@ -2015,17 +2015,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2015
2015
  this.skinWeights.push(_[e].clone()); var w = t.skinIndices; for (e = 0, n = w.length; e < n; e++)
2016
2016
  this.skinIndices.push(w[e].clone()); var b = t.lineDistances; for (e = 0, n = b.length; e < n; e++)
2017
2017
  this.lineDistances.push(b[e]); var M = t.boundingBox; null !== M && (this.boundingBox = M.clone()); var S = t.boundingSphere; return null !== S && (this.boundingSphere = S.clone()), this.elementsNeedUpdate = t.elementsNeedUpdate, this.verticesNeedUpdate = t.verticesNeedUpdate, this.uvsNeedUpdate = t.uvsNeedUpdate, this.normalsNeedUpdate = t.normalsNeedUpdate, this.colorsNeedUpdate = t.colorsNeedUpdate, this.lineDistancesNeedUpdate = t.lineDistancesNeedUpdate, this.groupsNeedUpdate = t.groupsNeedUpdate, this; }, dispose: function () { this.dispatchEvent({ type: "dispose" }); } });
2018
- var cr = function (o) { function t(t, e, n, i, r, a) { o.call(this), this.type = "BoxGeometry", this.parameters = { width: t, height: e, depth: n, widthSegments: i, heightSegments: r, depthSegments: a }, this.fromBufferGeometry(new ur(t, e, n, i, r, a)), this.mergeVertices(); } return o && (t.__proto__ = o), (t.prototype = Object.create(o && o.prototype)).constructor = t; }(lr), ur = function (s) { function t(t, e, n, i, r, a) { s.call(this), this.type = "BoxBufferGeometry", this.parameters = { width: t, height: e, depth: n, widthSegments: i, heightSegments: r, depthSegments: a }; var D = this; t = t || 1, e = e || 1, n = n || 1, i = Math.floor(i) || 1, r = Math.floor(r) || 1, a = Math.floor(a) || 1; var L = [], O = [], I = [], P = [], R = 0, k = 0; function o(t, e, n, i, r, a, o, s, l, c, u) { var h, d, p = a / l, f = o / c, m = a / 2, g = o / 2, v = s / 2, y = l + 1, x = c + 1, _ = 0, w = 0, b = new We; for (d = 0; d < x; d++) {
2018
+ var cr = function (o) { function t(t, e, n, i, r, a) { o.call(this), this.type = "BoxGeometry", this.parameters = { width: t, height: e, depth: n, widthSegments: i, heightSegments: r, depthSegments: a }, this.fromBufferGeometry(new ur(t, e, n, i, r, a)), this.mergeVertices(); } return o && (t.__proto__ = o), (t.prototype = Object.create(o && o.prototype)).constructor = t; }(lr), ur = function (s) { function t(t, e, n, i, r, a) { s.call(this), this.type = "BoxBufferGeometry", this.parameters = { width: t, height: e, depth: n, widthSegments: i, heightSegments: r, depthSegments: a }; var D = this; t = t || 1, e = e || 1, n = n || 1, i = Math.floor(i) || 1, r = Math.floor(r) || 1, a = Math.floor(a) || 1; var O = [], L = [], I = [], P = [], R = 0, k = 0; function o(t, e, n, i, r, a, o, s, l, c, u) { var h, d, p = a / l, f = o / c, m = a / 2, g = o / 2, v = s / 2, y = l + 1, x = c + 1, _ = 0, w = 0, b = new We; for (d = 0; d < x; d++) {
2019
2019
  var M = d * f - g;
2020
2020
  for (h = 0; h < y; h++) {
2021
2021
  var S = h * p - m;
2022
- b[t] = S * i, b[e] = M * r, b[n] = v, O.push(b.x, b.y, b.z), b[t] = 0, b[e] = 0, b[n] = 0 < s ? 1 : -1, I.push(b.x, b.y, b.z), P.push(h / l), P.push(1 - d / c), _ += 1;
2022
+ b[t] = S * i, b[e] = M * r, b[n] = v, L.push(b.x, b.y, b.z), b[t] = 0, b[e] = 0, b[n] = 0 < s ? 1 : -1, I.push(b.x, b.y, b.z), P.push(h / l), P.push(1 - d / c), _ += 1;
2023
2023
  }
2024
2024
  } for (d = 0; d < c; d++)
2025
2025
  for (h = 0; h < l; h++) {
2026
2026
  var C = R + h + y * d, T = R + h + y * (d + 1), E = R + (h + 1) + y * (d + 1), A = R + (h + 1) + y * d;
2027
- L.push(C, T, A), L.push(T, E, A), w += 6;
2028
- } D.addGroup(k, w, u), k += w, R += _; } o("z", "y", "x", -1, -1, n, e, t, a, r, 0), o("z", "y", "x", 1, -1, n, e, -t, a, r, 1), o("x", "z", "y", 1, 1, t, n, e, i, a, 2), o("x", "z", "y", 1, -1, t, n, -e, i, a, 3), o("x", "y", "z", 1, -1, t, e, n, i, r, 4), o("x", "y", "z", -1, -1, t, e, -n, i, r, 5), this.setIndex(L), this.setAttribute("position", new Ti(O, 3)), this.setAttribute("normal", new Ti(I, 3)), this.setAttribute("uv", new Ti(P, 2)); } return s && (t.__proto__ = s), (t.prototype = Object.create(s && s.prototype)).constructor = t; }(Bi);
2027
+ O.push(C, T, A), O.push(T, E, A), w += 6;
2028
+ } D.addGroup(k, w, u), k += w, R += _; } o("z", "y", "x", -1, -1, n, e, t, a, r, 0), o("z", "y", "x", 1, -1, n, e, -t, a, r, 1), o("x", "z", "y", 1, 1, t, n, e, i, a, 2), o("x", "z", "y", 1, -1, t, n, -e, i, a, 3), o("x", "y", "z", 1, -1, t, e, n, i, r, 4), o("x", "y", "z", -1, -1, t, e, -n, i, r, 5), this.setIndex(O), this.setAttribute("position", new Ti(L, 3)), this.setAttribute("normal", new Ti(I, 3)), this.setAttribute("uv", new Ti(P, 2)); } return s && (t.__proto__ = s), (t.prototype = Object.create(s && s.prototype)).constructor = t; }(Bi);
2029
2029
  function hr(t) { var e = {}; for (var n in t)
2030
2030
  for (var i in e[n] = {}, t[n]) {
2031
2031
  var r = t[n][i];
@@ -2050,9 +2050,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2050
2050
  } var l = this.filmOffset; 0 !== l && (r += t * l / this.getFilmWidth()), this.projectionMatrix.makePerspective(r, r + i, e, e - n, t, this.far), this.projectionMatrixInverse.getInverse(this.projectionMatrix); }, toJSON: function (t) { var e = yn.prototype.toJSON.call(this, t); return e.object.fov = this.fov, e.object.zoom = this.zoom, e.object.near = this.near, e.object.far = this.far, e.object.focus = this.focus, e.object.aspect = this.aspect, null !== this.view && (e.object.view = Object.assign({}, this.view)), e.object.filmGauge = this.filmGauge, e.object.filmOffset = this.filmOffset, e; } });
2051
2051
  function xr(t, e, n, i) { yn.call(this), this.type = "CubeCamera"; var a = new yr(90, 1, t, e); a.up.set(0, -1, 0), a.lookAt(new We(1, 0, 0)), this.add(a); var o = new yr(90, 1, t, e); o.up.set(0, -1, 0), o.lookAt(new We(-1, 0, 0)), this.add(o); var s = new yr(90, 1, t, e); s.up.set(0, 0, 1), s.lookAt(new We(0, 1, 0)), this.add(s); var l = new yr(90, 1, t, e); l.up.set(0, 0, -1), l.lookAt(new We(0, -1, 0)), this.add(l); var c = new yr(90, 1, t, e); c.up.set(0, -1, 0), c.lookAt(new We(0, 0, 1)), this.add(c); var u = new yr(90, 1, t, e); u.up.set(0, -1, 0), u.lookAt(new We(0, 0, -1)), this.add(u), i = i || { format: Qt, magFilter: Ht, minFilter: Ht }, this.renderTarget = new _r(n, i), this.renderTarget.texture.name = "CubeCamera", this.update = function (t, e) { null === this.parent && this.updateMatrixWorld(); var n = t.getRenderTarget(), i = this.renderTarget, r = i.texture.generateMipmaps; i.texture.generateMipmaps = !1, t.setRenderTarget(i, 0), t.render(e, a), t.setRenderTarget(i, 1), t.render(e, o), t.setRenderTarget(i, 2), t.render(e, s), t.setRenderTarget(i, 3), t.render(e, l), t.setRenderTarget(i, 4), t.render(e, c), i.texture.generateMipmaps = r, t.setRenderTarget(i, 5), t.render(e, u), t.setRenderTarget(n); }, this.clear = function (t, e, n, i) { for (var r = t.getRenderTarget(), a = this.renderTarget, o = 0; o < 6; o++)
2052
2052
  t.setRenderTarget(a, o), t.clear(e, n, i); t.setRenderTarget(r); }; }
2053
- function _r(t, e, n) { Number.isInteger(e) && (console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"), e = n), Ve.call(this, t, t, e); }
2054
- function wr(t, e, n, i, r, a, o, s, l, c, u, h) { Fe.call(this, null, a, o, s, l, c, i, r, u, h), this.image = { data: t || null, width: e || 1, height: n || 1 }, this.magFilter = void 0 !== l ? l : Ut, this.minFilter = void 0 !== c ? c : Ut, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.needsUpdate = !0; }
2055
- (xr.prototype = Object.create(yn.prototype)).constructor = xr, ((_r.prototype = Object.create(Ve.prototype)).constructor = _r).prototype.isWebGLCubeRenderTarget = !0, _r.prototype.fromEquirectangularTexture = function (t, e) { this.texture.type = e.type, this.texture.format = e.format, this.texture.encoding = e.encoding; var n = new xn, i = { uniforms: { tEquirect: { value: null } }, vertexShader: ["varying vec3 vWorldDirection;", "vec3 transformDirection( in vec3 dir, in mat4 matrix ) {", "\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );", "}", "void main() {", "\tvWorldDirection = transformDirection( position, modelMatrix );", "\t#include <begin_vertex>", "\t#include <project_vertex>", "}"].join("\n"), fragmentShader: ["uniform sampler2D tEquirect;", "varying vec3 vWorldDirection;", "#define RECIPROCAL_PI 0.31830988618", "#define RECIPROCAL_PI2 0.15915494", "void main() {", "\tvec3 direction = normalize( vWorldDirection );", "\tvec2 sampleUV;", "\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;", "\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;", "\tgl_FragColor = texture2D( tEquirect, sampleUV );", "}"].join("\n") }, r = new gr({ type: "CubemapFromEquirect", uniforms: hr(i.uniforms), vertexShader: i.vertexShader, fragmentShader: i.fragmentShader, side: St, blending: K }); r.uniforms.tEquirect.value = e; var a = new er(new ur(5, 5, 5), r); n.add(a); var o = new xr(1, 10, 1); return o.renderTarget = this, o.renderTarget.texture.name = "CubeCameraTexture", o.update(t, n), a.geometry.dispose(), a.material.dispose(), this; }, ((wr.prototype = Object.create(Fe.prototype)).constructor = wr).prototype.isDataTexture = !0;
2053
+ function _r(t, e, n) { Number.isInteger(e) && (console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"), e = n), je.call(this, t, t, e); }
2054
+ function wr(t, e, n, i, r, a, o, s, l, c, u, h) { Fe.call(this, null, a, o, s, l, c, i, r, u, h), this.image = { data: t || null, width: e || 1, height: n || 1 }, this.magFilter = void 0 !== l ? l : Vt, this.minFilter = void 0 !== c ? c : Vt, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1, this.needsUpdate = !0; }
2055
+ (xr.prototype = Object.create(yn.prototype)).constructor = xr, ((_r.prototype = Object.create(je.prototype)).constructor = _r).prototype.isWebGLCubeRenderTarget = !0, _r.prototype.fromEquirectangularTexture = function (t, e) { this.texture.type = e.type, this.texture.format = e.format, this.texture.encoding = e.encoding; var n = new xn, i = { uniforms: { tEquirect: { value: null } }, vertexShader: ["varying vec3 vWorldDirection;", "vec3 transformDirection( in vec3 dir, in mat4 matrix ) {", "\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );", "}", "void main() {", "\tvWorldDirection = transformDirection( position, modelMatrix );", "\t#include <begin_vertex>", "\t#include <project_vertex>", "}"].join("\n"), fragmentShader: ["uniform sampler2D tEquirect;", "varying vec3 vWorldDirection;", "#define RECIPROCAL_PI 0.31830988618", "#define RECIPROCAL_PI2 0.15915494", "void main() {", "\tvec3 direction = normalize( vWorldDirection );", "\tvec2 sampleUV;", "\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;", "\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;", "\tgl_FragColor = texture2D( tEquirect, sampleUV );", "}"].join("\n") }, r = new gr({ type: "CubemapFromEquirect", uniforms: hr(i.uniforms), vertexShader: i.vertexShader, fragmentShader: i.fragmentShader, side: St, blending: K }); r.uniforms.tEquirect.value = e; var a = new er(new ur(5, 5, 5), r); n.add(a); var o = new xr(1, 10, 1); return o.renderTarget = this, o.renderTarget.texture.name = "CubeCameraTexture", o.update(t, n), a.geometry.dispose(), a.material.dispose(), this; }, ((wr.prototype = Object.create(Fe.prototype)).constructor = wr).prototype.isDataTexture = !0;
2056
2056
  var br = new Nn, Mr = new We;
2057
2057
  function Sr(t, e, n, i, r, a) { this.planes = [void 0 !== t ? t : new Xn, void 0 !== e ? e : new Xn, void 0 !== n ? n : new Xn, void 0 !== i ? i : new Xn, void 0 !== r ? r : new Xn, void 0 !== a ? a : new Xn]; }
2058
2058
  Object.assign(Sr.prototype, { set: function (t, e, n, i, r, a) { var o = this.planes; return o[0].copy(t), o[1].copy(e), o[2].copy(n), o[3].copy(i), o[4].copy(r), o[5].copy(a), this; }, clone: function () { return (new this.constructor).copy(this); }, copy: function (t) { for (var e = this.planes, n = 0; n < 6; n++)
@@ -2082,14 +2082,14 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2082
2082
  f.push(_, w, M), f.push(w, b, M);
2083
2083
  } this.setIndex(f), this.setAttribute("position", new Ti(m, 3)), this.setAttribute("normal", new Ti(g, 3)), this.setAttribute("uv", new Ti(v, 2)); }
2084
2084
  (Ar.prototype = Object.create(lr.prototype)).constructor = Ar, (Dr.prototype = Object.create(Bi.prototype)).constructor = Dr;
2085
- var Lr = { alphamap_fragment: "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif", alphatest_fragment: "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif", aomap_fragment: "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif", aomap_pars_fragment: "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif", begin_vertex: "vec3 transformed = vec3( position );", beginnormal_vertex: "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif", bsdfs: "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn 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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn 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\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn 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\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn 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\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn 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\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn 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\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn 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\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif", clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif", clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif", clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif", clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif", color_fragment: "#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif", color_pars_fragment: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif", color_pars_vertex: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif", color_vertex: "#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif", common: "#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\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\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\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\nfloat 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}\nvec2 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 = direction.xy / 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 = direction.xz / abs(direction.y);\n } else {\n uv = vec2(-direction.x, direction.y) / abs(direction.z);\n }\n return 0.5 * (uv + 1.0);\n}\nvec3 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\nfloat 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}\nvec4 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\ttransformedNormal = mat3( instanceMatrix ) * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif", displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif", displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif", emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif", emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif", encodings_fragment: "gl_FragColor = linearToOutputTexel( gl_FragColor );", encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn 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\treturn 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\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn 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\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn 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\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}", envmap_fragment: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif", envmap_common_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif", envmap_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif", envmap_pars_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif", envmap_physical_pars_fragment: "#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif", envmap_vertex: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif", fog_vertex: "#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif", fog_pars_vertex: "#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif", fog_fragment: "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif", fog_pars_fragment: "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif", gradientmap_pars_fragment: "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}", lightmap_fragment: "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif", lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform 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\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\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\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif", lights_toon_fragment: "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;", lights_toon_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(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\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.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\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(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\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatRoughness = max( clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif", lights_physical_pars_fragment: "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 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\treturn 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\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.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\treflectedLight.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\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn 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\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif", lights_fragment_maps: "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif", lights_fragment_end: "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif", logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_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\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif", logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif", logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif", map_fragment: "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif", map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif", map_particle_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif", map_particle_pars_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif", metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif", metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif", morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif", morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif", normal_fragment_begin: "#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;", normal_fragment_maps: "#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif", normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif", clearcoat_normal_fragment_begin: "#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif", clearcoat_normal_fragment_maps: "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif", clearcoat_normalmap_pars_fragment: "#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif", packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 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\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn 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\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}", premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif", project_vertex: "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;", dithering_fragment: "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif", dithering_pars_fragment: "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif", roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif", roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif", shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif", shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif", shadowmap_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif", shadowmask_pars_fragment: "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}", skinbase_vertex: "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif", skinning_pars_vertex: "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif", skinning_vertex: "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif", skinnormal_vertex: "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif", specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif", specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif", tonemapping_fragment: "#if defined( TONE_MAPPING )\n\tgl_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;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}", uv_pars_fragment: "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif", uv_pars_vertex: "#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif", uv_vertex: "#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif", uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif", uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif", uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif", worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif", background_frag: "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", background_vert: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_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\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", cube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}", depth_frag: "#if DEPTH_PACKING == 3200\n\tuniform 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>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#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>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_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\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}", equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", equirect_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#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 <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}", meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#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\tvarying vec3 vLightBack;\n\tvarying 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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#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\tvarying vec3 vNormal;\n#endif\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 <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}", meshmatcap_vert: "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_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\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}", meshtoon_frag: "#define TOON\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 <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 <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshtoon_vert: "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}", meshphysical_frag: "#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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 <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_normalmap_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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshphysical_vert: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}", normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}", normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - 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\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#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\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#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\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}", shadow_vert: "#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#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\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}" }, Or = { basic: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.fog]), vertexShader: Lr.meshbasic_vert, fragmentShader: Lr.meshbasic_frag }, lambert: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) } }]), vertexShader: Lr.meshlambert_vert, fragmentShader: Lr.meshlambert_frag }, phong: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, specular: { value: new ci(1118481) }, shininess: { value: 30 } }]), vertexShader: Lr.meshphong_vert, fragmentShader: Lr.meshphong_frag }, standard: { uniforms: dr([Cr.common, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.roughnessmap, Cr.metalnessmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, roughness: { value: .5 }, metalness: { value: .5 }, envMapIntensity: { value: 1 } }]), vertexShader: Lr.meshphysical_vert, fragmentShader: Lr.meshphysical_frag }, toon: { uniforms: dr([Cr.common, Cr.specularmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.gradientmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, specular: { value: new ci(1118481) }, shininess: { value: 30 } }]), vertexShader: Lr.meshtoon_vert, fragmentShader: Lr.meshtoon_frag }, matcap: { uniforms: dr([Cr.common, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.fog, { matcap: { value: null } }]), vertexShader: Lr.meshmatcap_vert, fragmentShader: Lr.meshmatcap_frag }, points: { uniforms: dr([Cr.points, Cr.fog]), vertexShader: Lr.points_vert, fragmentShader: Lr.points_frag }, dashed: { uniforms: dr([Cr.common, Cr.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: Lr.linedashed_vert, fragmentShader: Lr.linedashed_frag }, depth: { uniforms: dr([Cr.common, Cr.displacementmap]), vertexShader: Lr.depth_vert, fragmentShader: Lr.depth_frag }, normal: { uniforms: dr([Cr.common, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, { opacity: { value: 1 } }]), vertexShader: Lr.normal_vert, fragmentShader: Lr.normal_frag }, sprite: { uniforms: dr([Cr.sprite, Cr.fog]), vertexShader: Lr.sprite_vert, fragmentShader: Lr.sprite_frag }, background: { uniforms: { uvTransform: { value: new ke }, t2D: { value: null } }, vertexShader: Lr.background_vert, fragmentShader: Lr.background_frag }, cube: { uniforms: dr([Cr.envmap, { opacity: { value: 1 } }]), vertexShader: Lr.cube_vert, fragmentShader: Lr.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: Lr.equirect_vert, fragmentShader: Lr.equirect_frag }, distanceRGBA: { uniforms: dr([Cr.common, Cr.displacementmap, { referencePosition: { value: new We }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: Lr.distanceRGBA_vert, fragmentShader: Lr.distanceRGBA_frag }, shadow: { uniforms: dr([Cr.lights, Cr.fog, { color: { value: new ci(0) }, opacity: { value: 1 } }]), vertexShader: Lr.shadow_vert, fragmentShader: Lr.shadow_frag } };
2085
+ var Or = { alphamap_fragment: "#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif", alphamap_pars_fragment: "#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif", alphatest_fragment: "#ifdef ALPHATEST\n\tif ( diffuseColor.a < ALPHATEST ) discard;\n#endif", aomap_fragment: "#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.specularRoughness );\n\t#endif\n#endif", aomap_pars_fragment: "#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif", begin_vertex: "vec3 transformed = vec3( position );", beginnormal_vertex: "vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif", bsdfs: "vec2 integrateSpecularBRDF( const in float dotNV, const in float roughness ) {\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\treturn 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\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n#else\n\tif( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\treturn pow( saturate( -lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t}\n\treturn 1.0;\n#endif\n}\nvec3 BRDF_Diffuse_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 specularColor, const in float dotLH ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotLH - 6.98316 ) * dotLH );\n\treturn ( 1.0 - specularColor ) * fresnel + specularColor;\n}\nvec3 F_Schlick_RoughnessDependent( const in vec3 F0, const in float dotNV, const in float roughness ) {\n\tfloat fresnel = exp2( ( -5.55473 * dotNV - 6.98316 ) * dotNV );\n\tvec3 Fr = max( vec3( 1.0 - roughness ), F0 ) - F0;\n\treturn Fr * fresnel + F0;\n}\nfloat G_GGX_Smith( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gl = dotNL + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\tfloat gv = dotNV + sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\treturn 1.0 / ( gl * gv );\n}\nfloat G_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn 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\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( incidentLight.direction + viewDir );\n\tfloat dotNL = saturate( dot( normal, incidentLight.direction ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( G * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn 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\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn 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\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\treturn 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\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\tvec3 F = F_Schlick_RoughnessDependent( specularColor, dotNV, roughness );\n\tvec2 brdf = integrateSpecularBRDF( dotNV, roughness );\n\tvec3 FssEss = F * brdf.x + brdf.y;\n\tfloat Ess = brdf.x + brdf.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn 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\tvec3 halfDir = normalize( incidentLight.direction + geometry.viewDir );\n\tfloat dotNH = saturate( dot( geometry.normal, halfDir ) );\n\tfloat dotLH = saturate( dot( incidentLight.direction, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, dotLH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\nfloat GGXRoughnessToBlinnExponent( const in float ggxRoughness ) {\n\treturn ( 2.0 / pow2( ggxRoughness + 0.0001 ) - 2.0 );\n}\nfloat BlinnExponentToGGXRoughness( const in float blinnExponent ) {\n\treturn sqrt( 2.0 / ( blinnExponent + 2.0 ) );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie(float roughness, float NoH) {\n\tfloat invAlpha = 1.0 / roughness;\n\tfloat cos2h = NoH * NoH;\n\tfloat sin2h = max(1.0 - cos2h, 0.0078125);\treturn (2.0 + invAlpha) * pow(sin2h, invAlpha * 0.5) / (2.0 * PI);\n}\nfloat V_Neubelt(float NoV, float NoL) {\n\treturn 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\tvec3 N = geometry.normal;\n\tvec3 V = geometry.viewDir;\n\tvec3 H = normalize( V + L );\n\tfloat dotNH = saturate( dot( N, H ) );\n\treturn specularColor * D_Charlie( roughness, dotNH ) * V_Neubelt( dot(N, V), dot(N, L) );\n}\n#endif", bumpmap_pars_fragment: "#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 );\n\t\tfDet *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif", clipping_planes_fragment: "#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vViewPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vViewPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\tif ( clipped ) discard;\n\t#endif\n#endif", clipping_planes_pars_fragment: "#if NUM_CLIPPING_PLANES > 0\n\t#if ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\t\tvarying vec3 vViewPosition;\n\t#endif\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif", clipping_planes_pars_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvarying vec3 vViewPosition;\n#endif", clipping_planes_vertex: "#if NUM_CLIPPING_PLANES > 0 && ! defined( STANDARD ) && ! defined( PHONG ) && ! defined( MATCAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif", color_fragment: "#ifdef USE_COLOR\n\tdiffuseColor.rgb *= vColor;\n#endif", color_pars_fragment: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif", color_pars_vertex: "#ifdef USE_COLOR\n\tvarying vec3 vColor;\n#endif", color_vertex: "#ifdef USE_COLOR\n\tvColor.xyz = color.xyz;\n#endif", common: "#define PI 3.14159265359\n#define PI2 6.28318530718\n#define PI_HALF 1.5707963267949\n#define RECIPROCAL_PI 0.31830988618\n#define RECIPROCAL_PI2 0.15915494\n#define LOG2 1.442695\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\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract(sin(sn) * c);\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat max3( vec3 v ) { return max( max( v.x, v.y ), v.z ); }\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nvec3 projectOnPlane(in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\tfloat distance = dot( planeNormal, point - pointOnPlane );\n\treturn - distance * planeNormal + point;\n}\nfloat sideOfPlane( in vec3 point, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn sign( dot( point - pointOnPlane, planeNormal ) );\n}\nvec3 linePlaneIntersect( in vec3 pointOnLine, in vec3 lineDirection, in vec3 pointOnPlane, in vec3 planeNormal ) {\n\treturn lineDirection * ( dot( planeNormal, pointOnPlane - pointOnLine ) / dot( planeNormal, lineDirection ) ) + pointOnLine;\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\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\nfloat 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}\nvec2 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 = direction.xy / 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 = direction.xz / abs(direction.y);\n } else {\n uv = vec2(-direction.x, direction.y) / abs(direction.z);\n }\n return 0.5 * (uv + 1.0);\n}\nvec3 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\nfloat 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}\nvec4 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\ttransformedNormal = mat3( instanceMatrix ) * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif", displacementmap_pars_vertex: "#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif", displacementmap_vertex: "#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif", emissivemap_fragment: "#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\temissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb;\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif", emissivemap_pars_fragment: "#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif", encodings_fragment: "gl_FragColor = linearToOutputTexel( gl_FragColor );", encodings_pars_fragment: "\nvec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 GammaToLinear( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a );\n}\nvec4 LinearToGamma( in vec4 value, in float gammaFactor ) {\n\treturn vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a );\n}\nvec4 sRGBToLinear( in vec4 value ) {\n\treturn 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\treturn 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\treturn vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 );\n}\nvec4 LinearToRGBE( in vec4 value ) {\n\tfloat maxComponent = max( max( value.r, value.g ), value.b );\n\tfloat fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 );\n\treturn vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 );\n}\nvec4 RGBMToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * value.a * maxRange, 1.0 );\n}\nvec4 LinearToRGBM( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat M = clamp( maxRGB / maxRange, 0.0, 1.0 );\n\tM = ceil( M * 255.0 ) / 255.0;\n\treturn vec4( value.rgb / ( M * maxRange ), M );\n}\nvec4 RGBDToLinear( in vec4 value, in float maxRange ) {\n\treturn vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 );\n}\nvec4 LinearToRGBD( in vec4 value, in float maxRange ) {\n\tfloat maxRGB = max( value.r, max( value.g, value.b ) );\n\tfloat D = max( maxRange / maxRGB, 1.0 );\n\tD = clamp( floor( D ) / 255.0, 0.0, 1.0 );\n\treturn 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\tvec3 Xp_Y_XYZp = cLogLuvM * value.rgb;\n\tXp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) );\n\tvec4 vResult;\n\tvResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z;\n\tfloat Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0;\n\tvResult.w = fract( Le );\n\tvResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0;\n\treturn 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\tfloat Le = value.z * 255.0 + value.w;\n\tvec3 Xp_Y_XYZp;\n\tXp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 );\n\tXp_Y_XYZp.z = Xp_Y_XYZp.y / value.y;\n\tXp_Y_XYZp.x = value.x * Xp_Y_XYZp.z;\n\tvec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb;\n\treturn vec4( max( vRGB, 0.0 ), 1.0 );\n}", envmap_fragment: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\t\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\tvec2 sampleUV;\n\t\treflectVec = normalize( reflectVec );\n\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\tvec4 envColor = texture2D( envMap, sampleUV );\n\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\treflectVec = normalize( reflectVec );\n\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0, 0.0, 1.0 ) );\n\t\tvec4 envColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifndef ENVMAP_TYPE_CUBE_UV\n\t\tenvColor = envMapTexelToLinear( envColor );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif", envmap_common_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform int maxMipLevel;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif", envmap_pars_fragment: "#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif", envmap_pars_vertex: "#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif", envmap_physical_pars_fragment: "#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getLightProbeIndirectIrradiance( const in GeometricContext geometry, const in int maxMIPLevel ) {\n\t\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryVec = vec3( flipEnvMap * worldNormal.x, worldNormal.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryVec, float( maxMIPLevel ) );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t#else\n\t\t\tvec4 envMapColor = vec4( 0.0 );\n\t\t#endif\n\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t}\n\tfloat getSpecularMIPLevel( const in float roughness, const in int maxMIPLevel ) {\n\t\tfloat maxMIPLevelScalar = float( maxMIPLevel );\n\t\tfloat sigma = PI * roughness * roughness / ( 1.0 + roughness );\n\t\tfloat desiredMIPLevel = maxMIPLevelScalar + log2( sigma );\n\t\treturn clamp( desiredMIPLevel, 0.0, maxMIPLevelScalar );\n\t}\n\tvec3 getLightProbeIndirectRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in int maxMIPLevel ) {\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t vec3 reflectVec = reflect( -viewDir, normal );\n\t\t reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t#else\n\t\t vec3 reflectVec = refract( -viewDir, normal, refractionRatio );\n\t\t#endif\n\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\tfloat specularMIPLevel = getSpecularMIPLevel( roughness, maxMIPLevel );\n\t\t#ifdef ENVMAP_TYPE_CUBE\n\t\t\tvec3 queryReflectVec = vec3( flipEnvMap * reflectVec.x, reflectVec.yz );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = textureCubeLodEXT( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = textureCube( envMap, queryReflectVec, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t#elif defined( ENVMAP_TYPE_EQUIREC )\n\t\t\tvec2 sampleUV;\n\t\t\tsampleUV.y = asin( clamp( reflectVec.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\t\t\tsampleUV.x = atan( reflectVec.z, reflectVec.x ) * RECIPROCAL_PI2 + 0.5;\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, sampleUV, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, sampleUV, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#elif defined( ENVMAP_TYPE_SPHERE )\n\t\t\tvec3 reflectView = normalize( ( viewMatrix * vec4( reflectVec, 0.0 ) ).xyz + vec3( 0.0,0.0,1.0 ) );\n\t\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\t\tvec4 envMapColor = texture2DLodEXT( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#else\n\t\t\t\tvec4 envMapColor = texture2D( envMap, reflectView.xy * 0.5 + 0.5, specularMIPLevel );\n\t\t\t#endif\n\t\t\tenvMapColor.rgb = envMapTexelToLinear( envMapColor ).rgb;\n\t\t#endif\n\t\treturn envMapColor.rgb * envMapIntensity;\n\t}\n#endif", envmap_vertex: "#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) { \n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif", fog_vertex: "#ifdef USE_FOG\n\tfogDepth = -mvPosition.z;\n#endif", fog_pars_vertex: "#ifdef USE_FOG\n\tvarying float fogDepth;\n#endif", fog_fragment: "#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif", fog_pars_fragment: "#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float fogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif", gradientmap_pars_fragment: "#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn texture2D( gradientMap, coord ).rgb;\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}", lightmap_fragment: "#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\treflectedLight.indirectDiffuse += PI * lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n#endif", lightmap_pars_fragment: "#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform 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\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointDirectLightIrradiance( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotDirectLightIrradiance( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalDirectLightIrradiance( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = PI * directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( -dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry );\n\t\t#endif\n\t}\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\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in GeometricContext geometry ) {\n\tvec3 worldNormal = inverseTransformDirection( geometry.normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treturn irradiance;\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalDirectLightIrradiance( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tdirectLight.color = directionalLight.color;\n\t\tdirectLight.direction = directionalLight.direction;\n\t\tdirectLight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t\tfloat shadowCameraNear;\n\t\tfloat shadowCameraFar;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointDirectLightIrradiance( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tdirectLight.color = pointLight.color;\n\t\tdirectLight.color *= punctualLightIntensityToIrradianceFactor( lightDistance, pointLight.distance, pointLight.decay );\n\t\tdirectLight.visible = ( directLight.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t\tint shadow;\n\t\tfloat shadowBias;\n\t\tfloat shadowRadius;\n\t\tvec2 shadowMapSize;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotDirectLightIrradiance( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight directLight ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tdirectLight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tfloat angleCos = dot( directLight.direction, spotLight.direction );\n\t\tif ( angleCos > spotLight.coneCos ) {\n\t\t\tfloat spotEffect = smoothstep( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\t\tdirectLight.color = spotLight.color;\n\t\t\tdirectLight.color *= spotEffect * punctualLightIntensityToIrradianceFactor( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tdirectLight.visible = true;\n\t\t} else {\n\t\t\tdirectLight.color = vec3( 0.0 );\n\t\t\tdirectLight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in GeometricContext geometry ) {\n\t\tfloat dotNL = dot( geometry.normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tirradiance *= PI;\n\t\t#endif\n\t\treturn irradiance;\n\t}\n#endif", lights_toon_fragment: "ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;", lights_toon_pars_fragment: "varying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\nstruct ToonMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_Specular_BlinnPhong( directLight, geometry, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(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\tvarying vec3 vNormal;\n#endif\nstruct BlinnPhongMaterial {\n\tvec3\tdiffuseColor;\n\tvec3\tspecularColor;\n\tfloat\tspecularShininess;\n\tfloat\tspecularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n\treflectedLight.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\treflectedLight.indirectDiffuse += irradiance * BRDF_Diffuse_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(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\tmaterial.specularColor = mix( vec3( MAXIMUM_SPECULAR_COEFFICIENT * pow2( reflectivity ) ), diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( DEFAULT_SPECULAR_COEFFICIENT ), diffuseColor.rgb, metalnessFactor );\n#endif\n#ifdef CLEARCOAT\n\tmaterial.clearcoat = saturate( clearcoat );\tmaterial.clearcoatRoughness = max( clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheen;\n#endif", lights_physical_pars_fragment: "struct PhysicalMaterial {\n\tvec3\tdiffuseColor;\n\tfloat\tspecularRoughness;\n\tvec3\tspecularColor;\n#ifdef CLEARCOAT\n\tfloat clearcoat;\n\tfloat clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tvec3 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\treturn 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\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.specularRoughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tirradiance *= PI;\n\t#endif\n\t#ifdef CLEARCOAT\n\t\tfloat ccDotNL = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = ccDotNL * directLight.color;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tccIrradiance *= PI;\n\t\t#endif\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t\treflectedLight.directSpecular += ccIrradiance * material.clearcoat * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_Sheen(\n\t\t\tmaterial.specularRoughness,\n\t\t\tdirectLight.direction,\n\t\t\tgeometry,\n\t\t\tmaterial.sheenColor\n\t\t);\n\t#else\n\t\treflectedLight.directSpecular += ( 1.0 - clearcoatDHR ) * irradiance * BRDF_Specular_GGX( directLight, geometry.viewDir, geometry.normal, material.specularColor, material.specularRoughness);\n\t#endif\n\treflectedLight.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\treflectedLight.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\t#ifdef CLEARCOAT\n\t\tfloat ccDotNV = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular += clearcoatRadiance * material.clearcoat * BRDF_Specular_GGX_Environment( geometry.viewDir, geometry.clearcoatNormal, vec3( DEFAULT_SPECULAR_COEFFICIENT ), material.clearcoatRoughness );\n\t\tfloat ccDotNL = ccDotNV;\n\t\tfloat clearcoatDHR = material.clearcoat * clearcoatDHRApprox( material.clearcoatRoughness, ccDotNL );\n\t#else\n\t\tfloat clearcoatDHR = 0.0;\n\t#endif\n\tfloat clearcoatInv = 1.0 - clearcoatDHR;\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tBRDF_Specular_Multiscattering_Environment( geometry, material.specularColor, material.specularRoughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += clearcoatInv * radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn 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\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointDirectLightIrradiance( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( pointLight.shadow, directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotDirectLightIrradiance( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( spotLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalDirectLightIrradiance( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectLight.color *= all( bvec3( directionalLight.shadow, directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry );\n\t\t}\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif", lights_fragment_maps: "#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getLightProbeIndirectIrradiance( geometry, maxMipLevel );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.normal, material.specularRoughness, maxMipLevel );\n\t#ifdef CLEARCOAT\n\t\tclearcoatRadiance += getLightProbeIndirectRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness, maxMipLevel );\n\t#endif\n#endif", lights_fragment_end: "#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif", logdepthbuf_fragment: "#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_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\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif", logdepthbuf_pars_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif", logdepthbuf_vertex: "#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif", map_fragment: "#ifdef USE_MAP\n\tvec4 texelColor = texture2D( map, vUv );\n\ttexelColor = mapTexelToLinear( texelColor );\n\tdiffuseColor *= texelColor;\n#endif", map_pars_fragment: "#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif", map_particle_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tvec4 mapTexel = texture2D( map, uv );\n\tdiffuseColor *= mapTexelToLinear( mapTexel );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif", map_particle_pars_fragment: "#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif", metalnessmap_fragment: "float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif", metalnessmap_pars_fragment: "#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif", morphnormal_vertex: "#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n#endif", morphtarget_pars_vertex: "#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifndef USE_MORPHNORMALS\n\tuniform float morphTargetInfluences[ 8 ];\n\t#else\n\tuniform float morphTargetInfluences[ 4 ];\n\t#endif\n#endif", morphtarget_vertex: "#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t#ifndef USE_MORPHNORMALS\n\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t#endif\n#endif", normal_fragment_begin: "#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t\tbitangent = bitangent * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;", normal_fragment_maps: "#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( -vViewPosition, normal, mapN );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( -vViewPosition, normal, dHdxy_fwd() );\n#endif", normalmap_pars_fragment: "#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tfloat scale = sign( st1.t * st0.s - st0.t * st1.s );\n\t\tvec3 S = normalize( ( q0 * st1.t - q1 * st0.t ) * scale );\n\t\tvec3 T = normalize( ( - q0 * st1.s + q1 * st0.s ) * scale );\n\t\tvec3 N = normalize( surf_norm );\n\t\tmat3 tsn = mat3( S, T, N );\n\t\tmapN.xy *= ( float( gl_FrontFacing ) * 2.0 - 1.0 );\n\t\treturn normalize( tsn * mapN );\n\t}\n#endif", clearcoat_normal_fragment_begin: "#ifdef CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif", clearcoat_normal_fragment_maps: "#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN );\n\t#endif\n#endif", clearcoat_normalmap_pars_fragment: "#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif", packing: "vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 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\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ));\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w);\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn 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\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn (( near + viewZ ) * far ) / (( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}", premultiplied_alpha_fragment: "#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif", project_vertex: "vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;", dithering_fragment: "#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif", dithering_pars_fragment: "#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif", roughnessmap_fragment: "float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif", roughnessmap_pars_fragment: "#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif", shadowmap_pars_fragment: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif", shadowmap_pars_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif", shadowmap_vertex: "#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * worldPosition;\n\t}\n\t#endif\n#endif", shadowmask_pars_fragment: "float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLight directionalLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tshadow *= all( bvec2( directionalLight.shadow, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLight spotLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tshadow *= all( bvec2( spotLight.shadow, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLight pointLight;\n\t#pragma unroll_loop\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tshadow *= all( bvec2( pointLight.shadow, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#endif\n\t#endif\n\treturn shadow;\n}", skinbase_vertex: "#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif", skinning_pars_vertex: "#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif", skinning_vertex: "#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif", skinnormal_vertex: "#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif", specularmap_fragment: "float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif", specularmap_pars_fragment: "#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif", tonemapping_fragment: "#if defined( TONE_MAPPING )\n\tgl_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;\nuniform float toneMappingWhitePoint;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\n#define Uncharted2Helper( x ) max( ( ( x * ( 0.15 * x + 0.10 * 0.50 ) + 0.20 * 0.02 ) / ( x * ( 0.15 * x + 0.50 ) + 0.20 * 0.30 ) ) - 0.02 / 0.30, vec3( 0.0 ) )\nvec3 Uncharted2ToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( Uncharted2Helper( color ) / Uncharted2Helper( vec3( toneMappingWhitePoint ) ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( ( color * ( 2.51 * color + 0.03 ) ) / ( color * ( 2.43 * color + 0.59 ) + 0.14 ) );\n}", uv_pars_fragment: "#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif", uv_pars_vertex: "#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif", uv_vertex: "#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif", uv2_pars_fragment: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif", uv2_pars_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif", uv2_vertex: "#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif", worldpos_vertex: "#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif", background_frag: "uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", background_vert: "varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_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\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", cube_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}", depth_frag: "#if DEPTH_PACKING == 3200\n\tuniform 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>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - gl_FragCoord.z ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( gl_FragCoord.z );\n\t#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>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_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\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}", equirect_frag: "uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV;\n\tsampleUV.y = asin( clamp( direction.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\tsampleUV.x = atan( direction.z, direction.x ) * RECIPROCAL_PI2 + 0.5;\n\tvec4 texColor = texture2D( tEquirect, sampleUV );\n\tgl_FragColor = mapTexelToLinear( texColor );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}", equirect_vert: "varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#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 <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\tvLineDistance = scale * lineDistance;\n\tvec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}", meshbasic_frag: "uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_ENVMAP\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <envmap_vertex>\n\t#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\tvarying vec3 vLightBack;\n\tvarying 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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\treflectedLight.indirectDiffuse = getAmbientLightIrradiance( ambientLightColor );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Diffuse_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshlambert_vert: "#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#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\tvarying vec3 vNormal;\n#endif\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 <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t\tmatcapColor = matcapTexelToLinear( matcapColor );\n\t#else\n\t\tvec4 matcapColor = vec4( 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}", meshmatcap_vert: "#define MATCAP\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <uv_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\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#ifndef FLAT_SHADED\n\t\tvNormal = normalize( transformedNormal );\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}", meshtoon_frag: "#define TOON\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 <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 <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshtoon_vert: "#define TOON\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshphong_vert: "#define PHONG\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying 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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}", meshphysical_frag: "#define STANDARD\n#ifdef PHYSICAL\n\t#define REFLECTIVITY\n\t#define CLEARCOAT\n\t#define TRANSPARENCY\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef TRANSPARENCY\n\tuniform float transparency;\n#endif\n#ifdef REFLECTIVITY\n\tuniform float reflectivity;\n#endif\n#ifdef CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheen;\n#endif\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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 <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_normalmap_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\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#ifdef TRANSPARENCY\n\t\tdiffuseColor.a *= saturate( 1. - transparency + linearToRelativeLuminance( reflectedLight.directSpecular + reflectedLight.indirectSpecular ) );\n\t#endif\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}", meshphysical_vert: "#define STANDARD\nvarying vec3 vViewPosition;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\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\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}", normal_frag: "#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}", normal_vert: "#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#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\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - 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\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#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\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#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\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}", shadow_vert: "#include <fog_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#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\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\tgl_FragColor = vec4( outgoingLight, diffuseColor.a );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#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\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}" }, Lr = { basic: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.fog]), vertexShader: Or.meshbasic_vert, fragmentShader: Or.meshbasic_frag }, lambert: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) } }]), vertexShader: Or.meshlambert_vert, fragmentShader: Or.meshlambert_frag }, phong: { uniforms: dr([Cr.common, Cr.specularmap, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, specular: { value: new ci(1118481) }, shininess: { value: 30 } }]), vertexShader: Or.meshphong_vert, fragmentShader: Or.meshphong_frag }, standard: { uniforms: dr([Cr.common, Cr.envmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.roughnessmap, Cr.metalnessmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, roughness: { value: .5 }, metalness: { value: .5 }, envMapIntensity: { value: 1 } }]), vertexShader: Or.meshphysical_vert, fragmentShader: Or.meshphysical_frag }, toon: { uniforms: dr([Cr.common, Cr.specularmap, Cr.aomap, Cr.lightmap, Cr.emissivemap, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.gradientmap, Cr.fog, Cr.lights, { emissive: { value: new ci(0) }, specular: { value: new ci(1118481) }, shininess: { value: 30 } }]), vertexShader: Or.meshtoon_vert, fragmentShader: Or.meshtoon_frag }, matcap: { uniforms: dr([Cr.common, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, Cr.fog, { matcap: { value: null } }]), vertexShader: Or.meshmatcap_vert, fragmentShader: Or.meshmatcap_frag }, points: { uniforms: dr([Cr.points, Cr.fog]), vertexShader: Or.points_vert, fragmentShader: Or.points_frag }, dashed: { uniforms: dr([Cr.common, Cr.fog, { scale: { value: 1 }, dashSize: { value: 1 }, totalSize: { value: 2 } }]), vertexShader: Or.linedashed_vert, fragmentShader: Or.linedashed_frag }, depth: { uniforms: dr([Cr.common, Cr.displacementmap]), vertexShader: Or.depth_vert, fragmentShader: Or.depth_frag }, normal: { uniforms: dr([Cr.common, Cr.bumpmap, Cr.normalmap, Cr.displacementmap, { opacity: { value: 1 } }]), vertexShader: Or.normal_vert, fragmentShader: Or.normal_frag }, sprite: { uniforms: dr([Cr.sprite, Cr.fog]), vertexShader: Or.sprite_vert, fragmentShader: Or.sprite_frag }, background: { uniforms: { uvTransform: { value: new ke }, t2D: { value: null } }, vertexShader: Or.background_vert, fragmentShader: Or.background_frag }, cube: { uniforms: dr([Cr.envmap, { opacity: { value: 1 } }]), vertexShader: Or.cube_vert, fragmentShader: Or.cube_frag }, equirect: { uniforms: { tEquirect: { value: null } }, vertexShader: Or.equirect_vert, fragmentShader: Or.equirect_frag }, distanceRGBA: { uniforms: dr([Cr.common, Cr.displacementmap, { referencePosition: { value: new We }, nearDistance: { value: 1 }, farDistance: { value: 1e3 } }]), vertexShader: Or.distanceRGBA_vert, fragmentShader: Or.distanceRGBA_frag }, shadow: { uniforms: dr([Cr.lights, Cr.fog, { color: { value: new ci(0) }, opacity: { value: 1 } }]), vertexShader: Or.shadow_vert, fragmentShader: Or.shadow_frag } };
2086
2086
  function Ir(l, n, c, i) { var u, h, d = new ci(0), p = 0, f = null, m = 0, g = null; function v(t, e) { n.buffers.color.setClear(t.r, t.g, t.b, e, i); } return { getClearColor: function () { return d; }, setClearColor: function (t, e) { d.set(t), v(d, p = void 0 !== e ? e : 1); }, getClearAlpha: function () { return p; }, setClearAlpha: function (t) { v(d, p = t); }, render: function (t, e, n, i) { var r = e.background, a = l.xr, o = a.getSession && a.getSession(); if (o && "additive" === o.environmentBlendMode && (r = null), null === r ? v(d, p) : r && r.isColor && (v(r, 1), i = !0), (l.autoClear || i) && l.clear(l.autoClearColor, l.autoClearDepth, l.autoClearStencil), r && (r.isCubeTexture || r.isWebGLCubeRenderTarget || r.mapping === Nt)) {
2087
- void 0 === h && ((h = new er(new ur(1, 1, 1), new gr({ type: "BackgroundCubeMaterial", uniforms: hr(Or.cube.uniforms), vertexShader: Or.cube.vertexShader, fragmentShader: Or.cube.fragmentShader, side: St, depthTest: !1, depthWrite: !1, fog: !1 }))).geometry.deleteAttribute("normal"), h.geometry.deleteAttribute("uv"), h.onBeforeRender = function (t, e, n) { this.matrixWorld.copyPosition(n.matrixWorld); }, Object.defineProperty(h.material, "envMap", { get: function () { return this.uniforms.envMap.value; } }), c.update(h));
2087
+ void 0 === h && ((h = new er(new ur(1, 1, 1), new gr({ type: "BackgroundCubeMaterial", uniforms: hr(Lr.cube.uniforms), vertexShader: Lr.cube.vertexShader, fragmentShader: Lr.cube.fragmentShader, side: St, depthTest: !1, depthWrite: !1, fog: !1 }))).geometry.deleteAttribute("normal"), h.geometry.deleteAttribute("uv"), h.onBeforeRender = function (t, e, n) { this.matrixWorld.copyPosition(n.matrixWorld); }, Object.defineProperty(h.material, "envMap", { get: function () { return this.uniforms.envMap.value; } }), c.update(h));
2088
2088
  var s = r.isWebGLCubeRenderTarget ? r.texture : r;
2089
2089
  h.material.uniforms.envMap.value = s, h.material.uniforms.flipEnvMap.value = s.isCubeTexture ? -1 : 1, f === r && m === s.version && g === l.toneMapping || (h.material.needsUpdate = !0, f = r, m = s.version, g = l.toneMapping), t.unshift(h, h.geometry, h.material, 0, 0, null);
2090
2090
  }
2091
2091
  else
2092
- r && r.isTexture && (void 0 === u && ((u = new er(new Dr(2, 2), new gr({ type: "BackgroundMaterial", uniforms: hr(Or.background.uniforms), vertexShader: Or.background.vertexShader, fragmentShader: Or.background.fragmentShader, side: O, depthTest: !1, depthWrite: !1, fog: !1 }))).geometry.deleteAttribute("normal"), Object.defineProperty(u.material, "map", { get: function () { return this.uniforms.t2D.value; } }), c.update(u)), !0 === (u.material.uniforms.t2D.value = r).matrixAutoUpdate && r.updateMatrix(), u.material.uniforms.uvTransform.value.copy(r.matrix), f === r && m === r.version && g === l.toneMapping || (u.material.needsUpdate = !0, m = (f = r).version, g = l.toneMapping), t.unshift(u, u.geometry, u.material, 0, 0, null)); } }; }
2092
+ r && r.isTexture && (void 0 === u && ((u = new er(new Dr(2, 2), new gr({ type: "BackgroundMaterial", uniforms: hr(Lr.background.uniforms), vertexShader: Lr.background.vertexShader, fragmentShader: Lr.background.fragmentShader, side: L, depthTest: !1, depthWrite: !1, fog: !1 }))).geometry.deleteAttribute("normal"), Object.defineProperty(u.material, "map", { get: function () { return this.uniforms.t2D.value; } }), c.update(u)), !0 === (u.material.uniforms.t2D.value = r).matrixAutoUpdate && r.updateMatrix(), u.material.uniforms.uvTransform.value.copy(r.matrix), f === r && m === r.version && g === l.toneMapping || (u.material.needsUpdate = !0, m = (f = r).version, g = l.toneMapping), t.unshift(u, u.geometry, u.material, 0, 0, null)); } }; }
2093
2093
  function Pr(o, s, l, t) { var c, u = t.isWebGL2; this.setMode = function (t) { c = t; }, this.render = function (t, e) { o.drawArrays(c, t, e), l.update(e, c); }, this.renderInstances = function (t, e, n, i) { if (0 !== i) {
2094
2094
  var r, a;
2095
2095
  if (u)
@@ -2188,8 +2188,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2188
2188
  break;
2189
2189
  default: console.error("THREE.WebGLInfo: Unknown draw mode:", e);
2190
2190
  } } }; }
2191
- function Vr(t, e) { return Math.abs(e[1]) - Math.abs(t[1]); }
2192
- function Ur(m) { var g = {}, v = new Float32Array(8); return { update: function (t, e, n, i) { var r = t.morphTargetInfluences, a = void 0 === r ? 0 : r.length, o = g[e.id]; if (void 0 === o) {
2191
+ function jr(t, e) { return Math.abs(e[1]) - Math.abs(t[1]); }
2192
+ function Vr(m) { var g = {}, v = new Float32Array(8); return { update: function (t, e, n, i) { var r = t.morphTargetInfluences, a = void 0 === r ? 0 : r.length, o = g[e.id]; if (void 0 === o) {
2193
2193
  o = [];
2194
2194
  for (var s = 0; s < a; s++)
2195
2195
  o[s] = [s, 0];
@@ -2198,7 +2198,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2198
2198
  0 !== (h = o[s])[1] && (l && e.deleteAttribute("morphTarget" + s), c && e.deleteAttribute("morphNormal" + s));
2199
2199
  } for (s = 0; s < a; s++) {
2200
2200
  (h = o[s])[0] = s, h[1] = r[s];
2201
- } o.sort(Vr); var u = 0; for (s = 0; s < 8; s++) {
2201
+ } o.sort(jr); var u = 0; for (s = 0; s < 8; s++) {
2202
2202
  var h;
2203
2203
  if (h = o[s]) {
2204
2204
  var d = h[0], p = h[1];
@@ -2209,11 +2209,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2209
2209
  }
2210
2210
  v[s] = 0;
2211
2211
  } var f = e.morphTargetsRelative ? 1 : 1 - u; i.getUniforms().setValue(m, "morphTargetBaseInfluence", f), i.getUniforms().setValue(m, "morphTargetInfluences", v); } }; }
2212
- function jr(t, r, a, o) { var s = {}; return { update: function (t) { var e = o.render.frame, n = t.geometry, i = r.get(t, n); return s[i.id] !== e && (n.isGeometry && i.updateFromObject(t), r.update(i), s[i.id] = e), t.isInstancedMesh && a.update(t.instanceMatrix, 34962), i; }, dispose: function () { s = {}; } }; }
2213
- function Gr(t, e, n, i, r, a, o, s, l, c) { Fe.call(this, t = void 0 !== t ? t : [], e = void 0 !== e ? e : Ot, n, i, r, a, o = void 0 !== o ? o : Qt, s, l, c), this.flipY = !1; }
2214
- function Hr(t, e, n, i) { Fe.call(this, null), this.image = { data: t || null, width: e || 1, height: n || 1, depth: i || 1 }, this.magFilter = Ut, this.minFilter = Ut, this.wrapR = zt, this.generateMipmaps = !1, this.flipY = !1, this.needsUpdate = !0; }
2215
- function Wr(t, e, n, i) { Fe.call(this, null), this.image = { data: t || null, width: e || 1, height: n || 1, depth: i || 1 }, this.magFilter = Ut, this.minFilter = Ut, this.wrapR = zt, this.generateMipmaps = !1, this.flipY = !1, this.needsUpdate = !0; }
2216
- Or.physical = { uniforms: dr([Or.standard.uniforms, { transparency: { value: 0 }, clearcoat: { value: 0 }, clearcoatRoughness: { value: 0 }, sheen: { value: new ci(0) }, clearcoatNormalScale: { value: new Re(1, 1) }, clearcoatNormalMap: { value: null } }]), vertexShader: Lr.meshphysical_vert, fragmentShader: Lr.meshphysical_frag }, ((Gr.prototype = Object.create(Fe.prototype)).constructor = Gr).prototype.isCubeTexture = !0, Object.defineProperty(Gr.prototype, "images", { get: function () { return this.image; }, set: function (t) { this.image = t; } }), ((Hr.prototype = Object.create(Fe.prototype)).constructor = Hr).prototype.isDataTexture2DArray = !0, ((Wr.prototype = Object.create(Fe.prototype)).constructor = Wr).prototype.isDataTexture3D = !0;
2212
+ function Ur(t, r, a, o) { var s = {}; return { update: function (t) { var e = o.render.frame, n = t.geometry, i = r.get(t, n); return s[i.id] !== e && (n.isGeometry && i.updateFromObject(t), r.update(i), s[i.id] = e), t.isInstancedMesh && a.update(t.instanceMatrix, 34962), i; }, dispose: function () { s = {}; } }; }
2213
+ function Gr(t, e, n, i, r, a, o, s, l, c) { Fe.call(this, t = void 0 !== t ? t : [], e = void 0 !== e ? e : Lt, n, i, r, a, o = void 0 !== o ? o : Qt, s, l, c), this.flipY = !1; }
2214
+ function Hr(t, e, n, i) { Fe.call(this, null), this.image = { data: t || null, width: e || 1, height: n || 1, depth: i || 1 }, this.magFilter = Vt, this.minFilter = Vt, this.wrapR = zt, this.generateMipmaps = !1, this.flipY = !1, this.needsUpdate = !0; }
2215
+ function Wr(t, e, n, i) { Fe.call(this, null), this.image = { data: t || null, width: e || 1, height: n || 1, depth: i || 1 }, this.magFilter = Vt, this.minFilter = Vt, this.wrapR = zt, this.generateMipmaps = !1, this.flipY = !1, this.needsUpdate = !0; }
2216
+ Lr.physical = { uniforms: dr([Lr.standard.uniforms, { transparency: { value: 0 }, clearcoat: { value: 0 }, clearcoatRoughness: { value: 0 }, sheen: { value: new ci(0) }, clearcoatNormalScale: { value: new Re(1, 1) }, clearcoatNormalMap: { value: null } }]), vertexShader: Or.meshphysical_vert, fragmentShader: Or.meshphysical_frag }, ((Gr.prototype = Object.create(Fe.prototype)).constructor = Gr).prototype.isCubeTexture = !0, Object.defineProperty(Gr.prototype, "images", { get: function () { return this.image; }, set: function (t) { this.image = t; } }), ((Hr.prototype = Object.create(Fe.prototype)).constructor = Hr).prototype.isDataTexture2DArray = !0, ((Wr.prototype = Object.create(Fe.prototype)).constructor = Wr).prototype.isDataTexture3D = !0;
2217
2217
  var Jr = new Fe, qr = new Hr, Xr = new Wr, Yr = new Gr, Zr = [], $r = [], Kr = new Float32Array(16), Qr = new Float32Array(9), ta = new Float32Array(4);
2218
2218
  function ea(t, e, n) { var i = t[0]; if (i <= 0 || 0 < i)
2219
2219
  return t; var r = e * n, a = Zr[r]; if (void 0 === a && (a = new Float32Array(r), Zr[r] = a), 0 !== e) {
@@ -2303,8 +2303,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2303
2303
  function Ea(t, e) { var n = ea(e, this.size, 3); t.uniform3fv(this.addr, n); }
2304
2304
  function Aa(t, e) { var n = ea(e, this.size, 4); t.uniform4fv(this.addr, n); }
2305
2305
  function Da(t, e) { var n = ea(e, this.size, 4); t.uniformMatrix2fv(this.addr, !1, n); }
2306
- function La(t, e) { var n = ea(e, this.size, 9); t.uniformMatrix3fv(this.addr, !1, n); }
2307
- function Oa(t, e) { var n = ea(e, this.size, 16); t.uniformMatrix4fv(this.addr, !1, n); }
2306
+ function Oa(t, e) { var n = ea(e, this.size, 9); t.uniformMatrix3fv(this.addr, !1, n); }
2307
+ function La(t, e) { var n = ea(e, this.size, 16); t.uniformMatrix4fv(this.addr, !1, n); }
2308
2308
  function Ia(t, e, n) { var i = e.length, r = ra(n, i); t.uniform1iv(this.addr, r); for (var a = 0; a !== i; ++a)
2309
2309
  n.safeSetTexture2D(e[a] || Jr, r[a]); }
2310
2310
  function Pa(t, e, n) { var i = e.length, r = ra(n, i); t.uniform1iv(this.addr, r); for (var a = 0; a !== i; ++a)
@@ -2349,8 +2349,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2349
2349
  case 35665: return Ea;
2350
2350
  case 35666: return Aa;
2351
2351
  case 35674: return Da;
2352
- case 35675: return La;
2353
- case 35676: return Oa;
2352
+ case 35675: return Oa;
2353
+ case 35676: return La;
2354
2354
  case 5124:
2355
2355
  case 35670: return ba;
2356
2356
  case 35667:
@@ -2385,19 +2385,19 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2385
2385
  var u = n.map[s];
2386
2386
  void 0 === u && Fa(n, u = new Na(s)), n = u;
2387
2387
  } }
2388
- function Va(t, e) { this.seq = [], this.map = {}; for (var n = t.getProgramParameter(e, 35718), i = 0; i < n; ++i) {
2388
+ function ja(t, e) { this.seq = [], this.map = {}; for (var n = t.getProgramParameter(e, 35718), i = 0; i < n; ++i) {
2389
2389
  var r = t.getActiveUniform(e, i);
2390
2390
  za(r, t.getUniformLocation(e, r.name), this);
2391
2391
  } }
2392
- function Ua(t, e, n) { var i = t.createShader(e); return t.shaderSource(i, n), t.compileShader(i), i; }
2393
- Va.prototype.setValue = function (t, e, n, i) { var r = this.map[e]; void 0 !== r && r.setValue(t, n, i); }, Va.prototype.setOptional = function (t, e, n) { var i = e[n]; void 0 !== i && this.setValue(t, n, i); }, Va.upload = function (t, e, n, i) { for (var r = 0, a = e.length; r !== a; ++r) {
2392
+ function Va(t, e, n) { var i = t.createShader(e); return t.shaderSource(i, n), t.compileShader(i), i; }
2393
+ ja.prototype.setValue = function (t, e, n, i) { var r = this.map[e]; void 0 !== r && r.setValue(t, n, i); }, ja.prototype.setOptional = function (t, e, n) { var i = e[n]; void 0 !== i && this.setValue(t, n, i); }, ja.upload = function (t, e, n, i) { for (var r = 0, a = e.length; r !== a; ++r) {
2394
2394
  var o = e[r], s = n[o.id];
2395
2395
  !1 !== s.needsUpdate && o.setValue(t, s.value, i);
2396
- } }, Va.seqWithValue = function (t, e) { for (var n = [], i = 0, r = t.length; i !== r; ++i) {
2396
+ } }, ja.seqWithValue = function (t, e) { for (var n = [], i = 0, r = t.length; i !== r; ++i) {
2397
2397
  var a = t[i];
2398
2398
  a.id in e && n.push(a);
2399
2399
  } return n; };
2400
- var ja = 0;
2400
+ var Ua = 0;
2401
2401
  function Ga(t) { switch (t) {
2402
2402
  case me: return ["Linear", "( value )"];
2403
2403
  case e: return ["sRGB", "( value )"];
@@ -2417,16 +2417,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2417
2417
  function Xa(t, e) { return t.replace(/NUM_CLIPPING_PLANES/g, e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g, e.numClippingPlanes - e.numClipIntersection); }
2418
2418
  var Ya = /^[ \t]*#include +<([\w\d./]+)>/gm;
2419
2419
  function Za(t) { return t.replace(Ya, $a); }
2420
- function $a(t, e) { var n = Lr[e]; if (void 0 === n)
2420
+ function $a(t, e) { var n = Or[e]; if (void 0 === n)
2421
2421
  throw new Error("Can not resolve #include <" + e + ">"); return Za(n); }
2422
2422
  var Ka = /#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;
2423
2423
  function Qa(t) { return t.replace(Ka, to); }
2424
2424
  function to(t, e, n, i) { for (var r = "", a = parseInt(e); a < parseInt(n); a++)
2425
2425
  r += i.replace(/\[ i \]/g, "[ " + a + " ]").replace(/UNROLLED_LOOP_INDEX/g, a); return r; }
2426
2426
  function eo(t) { var e = "precision " + t.precision + " float;\nprecision " + t.precision + " int;"; return "highp" === t.precision ? e += "\n#define HIGH_PRECISION" : "mediump" === t.precision ? e += "\n#define MEDIUM_PRECISION" : "lowp" === t.precision && (e += "\n#define LOW_PRECISION"), e; }
2427
- function no(t, e, n) { var i, r, a, o, s, l, c, u, h = t.getContext(), d = n.defines, p = n.vertexShader, f = n.fragmentShader, m = (r = "SHADOWMAP_TYPE_BASIC", (i = n).shadowMapType === F ? r = "SHADOWMAP_TYPE_PCF" : i.shadowMapType === z ? r = "SHADOWMAP_TYPE_PCF_SOFT" : i.shadowMapType === V && (r = "SHADOWMAP_TYPE_VSM"), r), g = function (t) { var e = "ENVMAP_TYPE_CUBE"; if (t.envMap)
2427
+ function no(t, e, n) { var i, r, a, o, s, l, c, u, h = t.getContext(), d = n.defines, p = n.vertexShader, f = n.fragmentShader, m = (r = "SHADOWMAP_TYPE_BASIC", (i = n).shadowMapType === F ? r = "SHADOWMAP_TYPE_PCF" : i.shadowMapType === z ? r = "SHADOWMAP_TYPE_PCF_SOFT" : i.shadowMapType === j && (r = "SHADOWMAP_TYPE_VSM"), r), g = function (t) { var e = "ENVMAP_TYPE_CUBE"; if (t.envMap)
2428
2428
  switch (t.envMapMode) {
2429
- case Ot:
2429
+ case Lt:
2430
2430
  case It:
2431
2431
  e = "ENVMAP_TYPE_CUBE";
2432
2432
  break;
@@ -2445,17 +2445,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2445
2445
  case Rt: e = "ENVMAP_MODE_REFRACTION";
2446
2446
  } return e; }(n), y = function (t) { var e = "ENVMAP_BLENDING_NONE"; if (t.envMap)
2447
2447
  switch (t.combine) {
2448
- case U:
2448
+ case V:
2449
2449
  e = "ENVMAP_BLENDING_MULTIPLY";
2450
2450
  break;
2451
- case j:
2451
+ case U:
2452
2452
  e = "ENVMAP_BLENDING_MIX";
2453
2453
  break;
2454
2454
  case G: e = "ENVMAP_BLENDING_ADD";
2455
2455
  } return e; }(n), x = 0 < t.gammaFactor ? t.gammaFactor : 1, _ = n.isWebGL2 ? "" : [(a = n).extensionDerivatives || a.envMapCubeUV || a.bumpMap || a.tangentSpaceNormalMap || a.clearcoatNormalMap || a.flatShading || "physical" === a.shaderID ? "#extension GL_OES_standard_derivatives : enable" : "", (a.extensionFragDepth || a.logarithmicDepthBuffer) && a.rendererExtensionFragDepth ? "#extension GL_EXT_frag_depth : enable" : "", a.extensionDrawBuffers && a.rendererExtensionDrawBuffers ? "#extension GL_EXT_draw_buffers : require" : "", (a.extensionShaderTextureLOD || a.envMap) && a.rendererExtensionShaderTextureLod ? "#extension GL_EXT_shader_texture_lod : enable" : ""].filter(Ja).join("\n"), w = function (t) { var e = []; for (var n in t) {
2456
2456
  var i = t[n];
2457
2457
  !1 !== i && e.push("#define " + n + " " + i);
2458
- } return e.join("\n"); }(d), b = h.createProgram(), M = n.numMultiviewViews; if (n.isRawShaderMaterial ? (0 < (o = [w].filter(Ja).join("\n")).length && (o += "\n"), 0 < (s = [_, w].filter(Ja).join("\n")).length && (s += "\n")) : (o = [eo(n), "#define SHADER_NAME " + n.shaderName, w, n.instancing ? "#define USE_INSTANCING" : "", n.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + x, "#define MAX_BONES " + n.maxBones, n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.map ? "#define USE_MAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + v : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMap && n.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", n.normalMap && n.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.displacementMap && n.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.vertexTangents ? "#define USE_TANGENT" : "", n.vertexColors ? "#define USE_COLOR" : "", n.vertexUvs ? "#define USE_UV" : "", n.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.skinning ? "#define USE_SKINNING" : "", n.useVertexTexture ? "#define BONE_TEXTURE" : "", n.morphTargets ? "#define USE_MORPHTARGETS" : "", n.morphNormals && !1 === n.flatShading ? "#define USE_MORPHNORMALS" : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + m : "", n.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", n.logarithmicDepthBuffer && n.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", "#ifdef USE_INSTANCING", " attribute mat4 instanceMatrix;", "#endif", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_TANGENT", "\tattribute vec4 tangent;", "#endif", "#ifdef USE_COLOR", "\tattribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", "\tattribute vec3 morphTarget0;", "\tattribute vec3 morphTarget1;", "\tattribute vec3 morphTarget2;", "\tattribute vec3 morphTarget3;", "\t#ifdef USE_MORPHNORMALS", "\t\tattribute vec3 morphNormal0;", "\t\tattribute vec3 morphNormal1;", "\t\tattribute vec3 morphNormal2;", "\t\tattribute vec3 morphNormal3;", "\t#else", "\t\tattribute vec3 morphTarget4;", "\t\tattribute vec3 morphTarget5;", "\t\tattribute vec3 morphTarget6;", "\t\tattribute vec3 morphTarget7;", "\t#endif", "#endif", "#ifdef USE_SKINNING", "\tattribute vec4 skinIndex;", "\tattribute vec4 skinWeight;", "#endif", "\n"].filter(Ja).join("\n"), s = [_, eo(n), "#define SHADER_NAME " + n.shaderName, w, n.alphaTest ? "#define ALPHATEST " + n.alphaTest + (n.alphaTest % 1 ? "" : ".0") : "", "#define GAMMA_FACTOR " + x, n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.map ? "#define USE_MAP" : "", n.matcap ? "#define USE_MATCAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + g : "", n.envMap ? "#define " + v : "", n.envMap ? "#define " + y : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMap && n.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", n.normalMap && n.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.sheen ? "#define USE_SHEEN" : "", n.vertexTangents ? "#define USE_TANGENT" : "", n.vertexColors ? "#define USE_COLOR" : "", n.vertexUvs ? "#define USE_UV" : "", n.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", n.gradientMap ? "#define USE_GRADIENTMAP" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + m : "", n.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", n.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", n.logarithmicDepthBuffer && n.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", (n.extensionShaderTextureLOD || n.envMap) && n.rendererExtensionShaderTextureLod ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", n.toneMapping !== H ? "#define TONE_MAPPING" : "", n.toneMapping !== H ? Lr.tonemapping_pars_fragment : "", n.toneMapping !== H ? function (t, e) { var n; switch (e) {
2458
+ } return e.join("\n"); }(d), b = h.createProgram(), M = n.numMultiviewViews; if (n.isRawShaderMaterial ? (0 < (o = [w].filter(Ja).join("\n")).length && (o += "\n"), 0 < (s = [_, w].filter(Ja).join("\n")).length && (s += "\n")) : (o = [eo(n), "#define SHADER_NAME " + n.shaderName, w, n.instancing ? "#define USE_INSTANCING" : "", n.supportsVertexTextures ? "#define VERTEX_TEXTURES" : "", "#define GAMMA_FACTOR " + x, "#define MAX_BONES " + n.maxBones, n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.map ? "#define USE_MAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + v : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMap && n.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", n.normalMap && n.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.displacementMap && n.supportsVertexTextures ? "#define USE_DISPLACEMENTMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.vertexTangents ? "#define USE_TANGENT" : "", n.vertexColors ? "#define USE_COLOR" : "", n.vertexUvs ? "#define USE_UV" : "", n.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.skinning ? "#define USE_SKINNING" : "", n.useVertexTexture ? "#define BONE_TEXTURE" : "", n.morphTargets ? "#define USE_MORPHTARGETS" : "", n.morphNormals && !1 === n.flatShading ? "#define USE_MORPHNORMALS" : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + m : "", n.sizeAttenuation ? "#define USE_SIZEATTENUATION" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", n.logarithmicDepthBuffer && n.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", "uniform mat4 modelMatrix;", "uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", "#ifdef USE_INSTANCING", " attribute mat4 instanceMatrix;", "#endif", "attribute vec3 position;", "attribute vec3 normal;", "attribute vec2 uv;", "#ifdef USE_TANGENT", "\tattribute vec4 tangent;", "#endif", "#ifdef USE_COLOR", "\tattribute vec3 color;", "#endif", "#ifdef USE_MORPHTARGETS", "\tattribute vec3 morphTarget0;", "\tattribute vec3 morphTarget1;", "\tattribute vec3 morphTarget2;", "\tattribute vec3 morphTarget3;", "\t#ifdef USE_MORPHNORMALS", "\t\tattribute vec3 morphNormal0;", "\t\tattribute vec3 morphNormal1;", "\t\tattribute vec3 morphNormal2;", "\t\tattribute vec3 morphNormal3;", "\t#else", "\t\tattribute vec3 morphTarget4;", "\t\tattribute vec3 morphTarget5;", "\t\tattribute vec3 morphTarget6;", "\t\tattribute vec3 morphTarget7;", "\t#endif", "#endif", "#ifdef USE_SKINNING", "\tattribute vec4 skinIndex;", "\tattribute vec4 skinWeight;", "#endif", "\n"].filter(Ja).join("\n"), s = [_, eo(n), "#define SHADER_NAME " + n.shaderName, w, n.alphaTest ? "#define ALPHATEST " + n.alphaTest + (n.alphaTest % 1 ? "" : ".0") : "", "#define GAMMA_FACTOR " + x, n.useFog && n.fog ? "#define USE_FOG" : "", n.useFog && n.fogExp2 ? "#define FOG_EXP2" : "", n.map ? "#define USE_MAP" : "", n.matcap ? "#define USE_MATCAP" : "", n.envMap ? "#define USE_ENVMAP" : "", n.envMap ? "#define " + g : "", n.envMap ? "#define " + v : "", n.envMap ? "#define " + y : "", n.lightMap ? "#define USE_LIGHTMAP" : "", n.aoMap ? "#define USE_AOMAP" : "", n.emissiveMap ? "#define USE_EMISSIVEMAP" : "", n.bumpMap ? "#define USE_BUMPMAP" : "", n.normalMap ? "#define USE_NORMALMAP" : "", n.normalMap && n.objectSpaceNormalMap ? "#define OBJECTSPACE_NORMALMAP" : "", n.normalMap && n.tangentSpaceNormalMap ? "#define TANGENTSPACE_NORMALMAP" : "", n.clearcoatNormalMap ? "#define USE_CLEARCOAT_NORMALMAP" : "", n.specularMap ? "#define USE_SPECULARMAP" : "", n.roughnessMap ? "#define USE_ROUGHNESSMAP" : "", n.metalnessMap ? "#define USE_METALNESSMAP" : "", n.alphaMap ? "#define USE_ALPHAMAP" : "", n.sheen ? "#define USE_SHEEN" : "", n.vertexTangents ? "#define USE_TANGENT" : "", n.vertexColors ? "#define USE_COLOR" : "", n.vertexUvs ? "#define USE_UV" : "", n.uvsVertexOnly ? "#define UVS_VERTEX_ONLY" : "", n.gradientMap ? "#define USE_GRADIENTMAP" : "", n.flatShading ? "#define FLAT_SHADED" : "", n.doubleSided ? "#define DOUBLE_SIDED" : "", n.flipSided ? "#define FLIP_SIDED" : "", n.shadowMapEnabled ? "#define USE_SHADOWMAP" : "", n.shadowMapEnabled ? "#define " + m : "", n.premultipliedAlpha ? "#define PREMULTIPLIED_ALPHA" : "", n.physicallyCorrectLights ? "#define PHYSICALLY_CORRECT_LIGHTS" : "", n.logarithmicDepthBuffer ? "#define USE_LOGDEPTHBUF" : "", n.logarithmicDepthBuffer && n.rendererExtensionFragDepth ? "#define USE_LOGDEPTHBUF_EXT" : "", (n.extensionShaderTextureLOD || n.envMap) && n.rendererExtensionShaderTextureLod ? "#define TEXTURE_LOD_EXT" : "", "uniform mat4 viewMatrix;", "uniform vec3 cameraPosition;", "uniform bool isOrthographic;", n.toneMapping !== H ? "#define TONE_MAPPING" : "", n.toneMapping !== H ? Or.tonemapping_pars_fragment : "", n.toneMapping !== H ? function (t, e) { var n; switch (e) {
2459
2459
  case Dt:
2460
2460
  n = "Linear";
2461
2461
  break;
@@ -2468,30 +2468,30 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2468
2468
  case q:
2469
2469
  n = "OptimizedCineon";
2470
2470
  break;
2471
- case Lt:
2471
+ case Ot:
2472
2472
  n = "ACESFilmic";
2473
2473
  break;
2474
2474
  default: throw new Error("unsupported toneMapping: " + e);
2475
- } return "vec3 " + t + "( vec3 color ) { return " + n + "ToneMapping( color ); }"; }("toneMapping", n.toneMapping) : "", n.dithering ? "#define DITHERING" : "", n.outputEncoding || n.mapEncoding || n.matcapEncoding || n.envMapEncoding || n.emissiveMapEncoding || n.lightMapEncoding ? Lr.encodings_pars_fragment : "", n.mapEncoding ? Wa("mapTexelToLinear", n.mapEncoding) : "", n.matcapEncoding ? Wa("matcapTexelToLinear", n.matcapEncoding) : "", n.envMapEncoding ? Wa("envMapTexelToLinear", n.envMapEncoding) : "", n.emissiveMapEncoding ? Wa("emissiveMapTexelToLinear", n.emissiveMapEncoding) : "", n.lightMapEncoding ? Wa("lightMapTexelToLinear", n.lightMapEncoding) : "", n.outputEncoding ? (l = "linearToOutputTexel", c = n.outputEncoding, u = Ga(c), "vec4 " + l + "( vec4 value ) { return LinearTo" + u[0] + u[1] + "; }") : "", n.depthPacking ? "#define DEPTH_PACKING " + n.depthPacking : "", "\n"].filter(Ja).join("\n")), p = Xa(p = qa(p = Za(p), n), n), f = Xa(f = qa(f = Za(f), n), n), p = Qa(p), f = Qa(f), n.isWebGL2 && !n.isRawShaderMaterial) {
2475
+ } return "vec3 " + t + "( vec3 color ) { return " + n + "ToneMapping( color ); }"; }("toneMapping", n.toneMapping) : "", n.dithering ? "#define DITHERING" : "", n.outputEncoding || n.mapEncoding || n.matcapEncoding || n.envMapEncoding || n.emissiveMapEncoding || n.lightMapEncoding ? Or.encodings_pars_fragment : "", n.mapEncoding ? Wa("mapTexelToLinear", n.mapEncoding) : "", n.matcapEncoding ? Wa("matcapTexelToLinear", n.matcapEncoding) : "", n.envMapEncoding ? Wa("envMapTexelToLinear", n.envMapEncoding) : "", n.emissiveMapEncoding ? Wa("emissiveMapTexelToLinear", n.emissiveMapEncoding) : "", n.lightMapEncoding ? Wa("lightMapTexelToLinear", n.lightMapEncoding) : "", n.outputEncoding ? (l = "linearToOutputTexel", c = n.outputEncoding, u = Ga(c), "vec4 " + l + "( vec4 value ) { return LinearTo" + u[0] + u[1] + "; }") : "", n.depthPacking ? "#define DEPTH_PACKING " + n.depthPacking : "", "\n"].filter(Ja).join("\n")), p = Xa(p = qa(p = Za(p), n), n), f = Xa(f = qa(f = Za(f), n), n), p = Qa(p), f = Qa(f), n.isWebGL2 && !n.isRawShaderMaterial) {
2476
2476
  var S = !1, C = /^\s*#version\s+300\s+es\s*\n/;
2477
2477
  n.isShaderMaterial && null !== p.match(C) && null !== f.match(C) && (S = !0, p = p.replace(C, ""), f = f.replace(C, "")), o = ["#version 300 es\n", "#define attribute in", "#define varying out", "#define texture2D texture"].join("\n") + "\n" + o, s = ["#version 300 es\n", "#define varying in", S ? "" : "out highp vec4 pc_fragColor;", S ? "" : "#define gl_FragColor pc_fragColor", "#define gl_FragDepthEXT gl_FragDepth", "#define texture2D texture", "#define textureCube texture", "#define texture2DProj textureProj", "#define texture2DLodEXT textureLod", "#define texture2DProjLodEXT textureProjLod", "#define textureCubeLodEXT textureLod", "#define texture2DGradEXT textureGrad", "#define texture2DProjGradEXT textureProjGrad", "#define textureCubeGradEXT textureGrad"].join("\n") + "\n" + s, 0 < M && (o = (o = o.replace("#version 300 es\n", ["#version 300 es\n", "#extension GL_OVR_multiview2 : require", "layout(num_views = " + M + ") in;", "#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace(["uniform mat4 modelViewMatrix;", "uniform mat4 projectionMatrix;", "uniform mat4 viewMatrix;", "uniform mat3 normalMatrix;"].join("\n"), ["uniform mat4 modelViewMatrices[" + M + "];", "uniform mat4 projectionMatrices[" + M + "];", "uniform mat4 viewMatrices[" + M + "];", "uniform mat3 normalMatrices[" + M + "];", "#define modelViewMatrix modelViewMatrices[VIEW_ID]", "#define projectionMatrix projectionMatrices[VIEW_ID]", "#define viewMatrix viewMatrices[VIEW_ID]", "#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")), s = (s = s.replace("#version 300 es\n", ["#version 300 es\n", "#extension GL_OVR_multiview2 : require", "#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace("uniform mat4 viewMatrix;", ["uniform mat4 viewMatrices[" + M + "];", "#define viewMatrix viewMatrices[VIEW_ID]"].join("\n")));
2478
- } var T, E, A = s + f, D = Ua(h, 35633, o + p), L = Ua(h, 35632, A); if (h.attachShader(b, D), h.attachShader(b, L), void 0 !== n.index0AttributeName ? h.bindAttribLocation(b, 0, n.index0AttributeName) : !0 === n.morphTargets && h.bindAttribLocation(b, 0, "position"), h.linkProgram(b), t.debug.checkShaderErrors) {
2479
- var O = h.getProgramInfoLog(b).trim(), I = h.getShaderInfoLog(D).trim(), P = h.getShaderInfoLog(L).trim(), R = !0, k = !0;
2478
+ } var T, E, A = s + f, D = Va(h, 35633, o + p), O = Va(h, 35632, A); if (h.attachShader(b, D), h.attachShader(b, O), void 0 !== n.index0AttributeName ? h.bindAttribLocation(b, 0, n.index0AttributeName) : !0 === n.morphTargets && h.bindAttribLocation(b, 0, "position"), h.linkProgram(b), t.debug.checkShaderErrors) {
2479
+ var L = h.getProgramInfoLog(b).trim(), I = h.getShaderInfoLog(D).trim(), P = h.getShaderInfoLog(O).trim(), R = !0, k = !0;
2480
2480
  if (!1 === h.getProgramParameter(b, 35714)) {
2481
2481
  R = !1;
2482
- var N = Ha(h, D, "vertex"), B = Ha(h, L, "fragment");
2483
- console.error("THREE.WebGLProgram: shader error: ", h.getError(), "35715", h.getProgramParameter(b, 35715), "gl.getProgramInfoLog", O, N, B);
2482
+ var N = Ha(h, D, "vertex"), B = Ha(h, O, "fragment");
2483
+ console.error("THREE.WebGLProgram: shader error: ", h.getError(), "35715", h.getProgramParameter(b, 35715), "gl.getProgramInfoLog", L, N, B);
2484
2484
  }
2485
2485
  else
2486
- "" !== O ? console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()", O) : "" !== I && "" !== P || (k = !1);
2487
- k && (this.diagnostics = { runnable: R, programLog: O, vertexShader: { log: I, prefix: o }, fragmentShader: { log: P, prefix: s } });
2488
- } return h.deleteShader(D), h.deleteShader(L), this.getUniforms = function () { return void 0 === T && (T = new Va(h, b)), T; }, this.getAttributes = function () { return void 0 === E && (E = function (t, e) { for (var n = {}, i = t.getProgramParameter(e, 35721), r = 0; r < i; r++) {
2486
+ "" !== L ? console.warn("THREE.WebGLProgram: gl.getProgramInfoLog()", L) : "" !== I && "" !== P || (k = !1);
2487
+ k && (this.diagnostics = { runnable: R, programLog: L, vertexShader: { log: I, prefix: o }, fragmentShader: { log: P, prefix: s } });
2488
+ } return h.deleteShader(D), h.deleteShader(O), this.getUniforms = function () { return void 0 === T && (T = new ja(h, b)), T; }, this.getAttributes = function () { return void 0 === E && (E = function (t, e) { for (var n = {}, i = t.getProgramParameter(e, 35721), r = 0; r < i; r++) {
2489
2489
  var a = t.getActiveAttrib(e, r).name;
2490
2490
  n[a] = t.getAttribLocation(e, a);
2491
- } return n; }(h, b)), E; }, this.destroy = function () { h.deleteProgram(b), this.program = void 0; }, this.name = n.shaderName, this.id = ja++, this.cacheKey = e, this.usedTimes = 1, this.program = b, this.vertexShader = D, this.fragmentShader = L, this.numMultiviewViews = M, this; }
2491
+ } return n; }(h, b)), E; }, this.destroy = function () { h.deleteProgram(b), this.program = void 0; }, this.name = n.shaderName, this.id = Ua++, this.cacheKey = e, this.usedTimes = 1, this.program = b, this.vertexShader = D, this.fragmentShader = O, this.numMultiviewViews = M, this; }
2492
2492
  function io(m, g, v) { var o = [], y = v.isWebGL2, x = v.logarithmicDepthBuffer, _ = v.floatVertexTextures, w = v.precision, b = v.maxVertexUniforms, M = v.vertexTextures, S = { MeshDepthMaterial: "depth", MeshDistanceMaterial: "distanceRGBA", MeshNormalMaterial: "normal", MeshBasicMaterial: "basic", MeshLambertMaterial: "lambert", MeshPhongMaterial: "phong", MeshToonMaterial: "toon", MeshStandardMaterial: "physical", MeshPhysicalMaterial: "physical", MeshMatcapMaterial: "matcap", LineBasicMaterial: "basic", LineDashedMaterial: "dashed", PointsMaterial: "points", ShadowMaterial: "shadow", SpriteMaterial: "sprite" }, r = ["precision", "isWebGL2", "supportsVertexTextures", "outputEncoding", "instancing", "numMultiviewViews", "map", "mapEncoding", "matcap", "matcapEncoding", "envMap", "envMapMode", "envMapEncoding", "envMapCubeUV", "lightMap", "lightMapEncoding", "aoMap", "emissiveMap", "emissiveMapEncoding", "bumpMap", "normalMap", "objectSpaceNormalMap", "tangentSpaceNormalMap", "clearcoatNormalMap", "displacementMap", "specularMap", "roughnessMap", "metalnessMap", "gradientMap", "alphaMap", "combine", "vertexColors", "vertexTangents", "vertexUvs", "uvsVertexOnly", "fog", "useFog", "fogExp2", "flatShading", "sizeAttenuation", "logarithmicDepthBuffer", "skinning", "maxBones", "useVertexTexture", "morphTargets", "morphNormals", "maxMorphTargets", "maxMorphNormals", "premultipliedAlpha", "numDirLights", "numPointLights", "numSpotLights", "numHemiLights", "numRectAreaLights", "numDirLightShadows", "numPointLightShadows", "numSpotLightShadows", "shadowMapEnabled", "shadowMapType", "toneMapping", "physicallyCorrectLights", "alphaTest", "doubleSided", "flipSided", "numClippingPlanes", "numClipIntersection", "depthPacking", "dithering", "sheen"]; function C(t) { var e; return t ? t.isTexture ? e = t.encoding : t.isWebGLRenderTarget && (console.warn("THREE.WebGLPrograms.getTextureEncodingFromMap: don't use render targets as textures. Use their .texture property instead."), e = t.texture.encoding) : e = me, e; } this.getParameters = function (t, e, n, i, r, a, o) { var s = i.fog, l = t.isMeshStandardMaterial ? i.environment : null, c = t.envMap || l, u = S[t.type], h = o.isSkinnedMesh ? function (t) { var e = t.skeleton.bones; if (_)
2493
2493
  return 1024; var n = b, i = Math.floor((n - 20) / 4), r = Math.min(i, e.length); return r < e.length ? (console.warn("THREE.WebGLRenderer: Skeleton has " + e.length + " bones. This GPU supports " + r + "."), 0) : r; }(o) : 0; null !== t.precision && (w = v.getMaxPrecision(t.precision)) !== t.precision && console.warn("THREE.WebGLProgram.getParameters:", t.precision, "not supported, using", w, "instead."); var d = function (t, e) { var n; if (e) {
2494
- var i = Or[e];
2494
+ var i = Lr[e];
2495
2495
  n = { name: t.type, uniforms: pr.clone(i.uniforms), vertexShader: i.vertexShader, fragmentShader: i.fragmentShader };
2496
2496
  }
2497
2497
  else
@@ -2535,7 +2535,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2535
2535
  var uo = 0;
2536
2536
  function ho(t, e) { return (e.castShadow ? 1 : 0) - (t.castShadow ? 1 : 0); }
2537
2537
  function po() { for (var T = new co, E = { version: 0, hash: { directionalLength: -1, pointLength: -1, spotLength: -1, rectAreaLength: -1, hemiLength: -1, numDirectionalShadows: -1, numPointShadows: -1, numSpotShadows: -1 }, ambient: [0, 0, 0], probe: [], directional: [], directionalShadowMap: [], directionalShadowMatrix: [], spot: [], spotShadowMap: [], spotShadowMatrix: [], rectArea: [], point: [], pointShadowMap: [], pointShadowMatrix: [], hemi: [], numDirectionalShadows: -1, numPointShadows: -1, numSpotShadows: -1 }, t = 0; t < 9; t++)
2538
- E.probe.push(new We); var A = new We, D = new Qe, L = new Qe; return { setup: function (t, e, n) { for (var i = 0, r = 0, a = 0, o = 0; o < 9; o++)
2538
+ E.probe.push(new We); var A = new We, D = new Qe, O = new Qe; return { setup: function (t, e, n) { for (var i = 0, r = 0, a = 0, o = 0; o < 9; o++)
2539
2539
  E.probe[o].set(0, 0, 0); var s = 0, l = 0, c = 0, u = 0, h = 0, d = 0, p = 0, f = 0, m = n.matrixWorldInverse; t.sort(ho), o = 0; for (var g = t.length; o < g; o++) {
2540
2540
  var v = t[o], y = v.color, x = v.intensity, _ = v.distance, w = v.shadow && v.shadow.map ? v.shadow.map.texture : null;
2541
2541
  if (v.isAmbientLight)
@@ -2558,7 +2558,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2558
2558
  E.spot[c] = S, c++;
2559
2559
  }
2560
2560
  else if (v.isRectAreaLight) {
2561
- (S = T.get(v)).color.copy(y).multiplyScalar(x), S.position.setFromMatrixPosition(v.matrixWorld), S.position.applyMatrix4(m), L.identity(), D.copy(v.matrixWorld), D.premultiply(m), L.extractRotation(D), S.halfWidth.set(.5 * v.width, 0, 0), S.halfHeight.set(0, .5 * v.height, 0), S.halfWidth.applyMatrix4(L), S.halfHeight.applyMatrix4(L), E.rectArea[u] = S, u++;
2561
+ (S = T.get(v)).color.copy(y).multiplyScalar(x), S.position.setFromMatrixPosition(v.matrixWorld), S.position.applyMatrix4(m), O.identity(), D.copy(v.matrixWorld), D.premultiply(m), O.extractRotation(D), S.halfWidth.set(.5 * v.width, 0, 0), S.halfHeight.set(0, .5 * v.height, 0), S.halfWidth.applyMatrix4(O), S.halfHeight.applyMatrix4(O), E.rectArea[u] = S, u++;
2562
2562
  }
2563
2563
  else if (v.isPointLight) {
2564
2564
  if ((S = T.get(v)).position.setFromMatrixPosition(v.matrixWorld), S.position.applyMatrix4(m), S.color.copy(v.color).multiplyScalar(v.intensity), S.distance = v.distance, S.decay = v.decay, S.shadow = v.castShadow, v.castShadow) {
@@ -2578,7 +2578,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2578
2578
  function vo(t) { mi.call(this), this.type = "MeshDistanceMaterial", this.referencePosition = new We, this.nearDistance = 1, this.farDistance = 1e3, this.skinning = !1, this.morphTargets = !1, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.fog = !1, this.setValues(t); }
2579
2579
  ((go.prototype = Object.create(mi.prototype)).constructor = go).prototype.isMeshDepthMaterial = !0, go.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.depthPacking = t.depthPacking, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.map = t.map, this.alphaMap = t.alphaMap, this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this; }, ((vo.prototype = Object.create(mi.prototype)).constructor = vo).prototype.isMeshDistanceMaterial = !0, vo.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.referencePosition.copy(t.referencePosition), this.nearDistance = t.nearDistance, this.farDistance = t.farDistance, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.map = t.map, this.alphaMap = t.alphaMap, this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this; };
2580
2580
  var yo = "uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n float mean = 0.0;\n float squared_mean = 0.0;\n\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy ) / resolution ) );\n for ( float i = -1.0; i < 1.0 ; i += SAMPLE_RATE) {\n #ifdef HORIZONAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( i, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, i ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean * HALF_SAMPLE_RATE;\n squared_mean = squared_mean * HALF_SAMPLE_RATE;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}", xo = "void main() {\n\tgl_Position = vec4( position, 1.0 );\n}";
2581
- function _o(g, v, y) { var x = new Sr, _ = new Re, w = new Re, b = new ze, a = [], o = [], M = {}, S = { 0: St, 1: O, 2: $ }, i = new gr({ defines: { SAMPLE_RATE: .25, HALF_SAMPLE_RATE: 1 / 8 }, uniforms: { shadow_pass: { value: null }, resolution: { value: new Re }, radius: { value: 4 } }, vertexShader: xo, fragmentShader: yo }), r = i.clone(); r.defines.HORIZONAL_PASS = 1; var t = new Bi; t.setAttribute("position", new yi(new Float32Array([-1, -1, .5, 3, -1, .5, -1, 3, .5]), 3)); var s = new er(t, i), C = this; function T(t, e) { var n = v.update(s); i.uniforms.shadow_pass.value = t.map.texture, i.uniforms.resolution.value = t.mapSize, i.uniforms.radius.value = t.radius, g.setRenderTarget(t.mapPass), g.clear(), g.renderBufferDirect(e, null, n, i, s, null), r.uniforms.shadow_pass.value = t.mapPass.texture, r.uniforms.resolution.value = t.mapSize, r.uniforms.radius.value = t.radius, g.setRenderTarget(t.map), g.clear(), g.renderBufferDirect(e, null, n, r, s, null); } function E(t, e, n) { var i = t << 0 | e << 1 | n << 2, r = a[i]; return void 0 === r && (r = new go({ depthPacking: be, morphTargets: t, skinning: e }), a[i] = r), r; } function A(t, e, n) { var i = t << 0 | e << 1 | n << 2, r = o[i]; return void 0 === r && (r = new vo({ morphTargets: t, skinning: e }), o[i] = r), r; } function D(t, e, n, i, r, a) { var o = t.geometry, s = null, l = E, c = t.customDepthMaterial; if (!0 === n.isPointLight && (l = A, c = t.customDistanceMaterial), void 0 === c) {
2581
+ function _o(g, v, y) { var x = new Sr, _ = new Re, w = new Re, b = new ze, a = [], o = [], M = {}, S = { 0: St, 1: L, 2: $ }, i = new gr({ defines: { SAMPLE_RATE: .25, HALF_SAMPLE_RATE: 1 / 8 }, uniforms: { shadow_pass: { value: null }, resolution: { value: new Re }, radius: { value: 4 } }, vertexShader: xo, fragmentShader: yo }), r = i.clone(); r.defines.HORIZONAL_PASS = 1; var t = new Bi; t.setAttribute("position", new yi(new Float32Array([-1, -1, .5, 3, -1, .5, -1, 3, .5]), 3)); var s = new er(t, i), C = this; function T(t, e) { var n = v.update(s); i.uniforms.shadow_pass.value = t.map.texture, i.uniforms.resolution.value = t.mapSize, i.uniforms.radius.value = t.radius, g.setRenderTarget(t.mapPass), g.clear(), g.renderBufferDirect(e, null, n, i, s, null), r.uniforms.shadow_pass.value = t.mapPass.texture, r.uniforms.resolution.value = t.mapSize, r.uniforms.radius.value = t.radius, g.setRenderTarget(t.map), g.clear(), g.renderBufferDirect(e, null, n, r, s, null); } function E(t, e, n) { var i = t << 0 | e << 1 | n << 2, r = a[i]; return void 0 === r && (r = new go({ depthPacking: be, morphTargets: t, skinning: e }), a[i] = r), r; } function A(t, e, n) { var i = t << 0 | e << 1 | n << 2, r = o[i]; return void 0 === r && (r = new vo({ morphTargets: t, skinning: e }), o[i] = r), r; } function D(t, e, n, i, r, a) { var o = t.geometry, s = null, l = E, c = t.customDepthMaterial; if (!0 === n.isPointLight && (l = A, c = t.customDistanceMaterial), void 0 === c) {
2582
2582
  var u = !1;
2583
2583
  !0 === e.morphTargets && (!0 === o.isBufferGeometry ? u = o.morphAttributes && o.morphAttributes.position && 0 < o.morphAttributes.position.length : !0 === o.isGeometry && (u = o.morphTargets && 0 < o.morphTargets.length));
2584
2584
  var h = !1;
@@ -2590,8 +2590,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2590
2590
  void 0 === f && (f = {}, M[d] = f);
2591
2591
  var m = f[p];
2592
2592
  void 0 === m && (m = s.clone(), f[p] = m), s = m;
2593
- } return s.visible = e.visible, s.wireframe = e.wireframe, s.side = a === V ? null !== e.shadowSide ? e.shadowSide : e.side : null !== e.shadowSide ? e.shadowSide : S[e.side], s.clipShadows = e.clipShadows, s.clippingPlanes = e.clippingPlanes, s.clipIntersection = e.clipIntersection, s.wireframeLinewidth = e.wireframeLinewidth, s.linewidth = e.linewidth, !0 === n.isPointLight && !0 === s.isMeshDistanceMaterial && (s.referencePosition.setFromMatrixPosition(n.matrixWorld), s.nearDistance = i, s.farDistance = r), s; } function L(t, e, n, i, r) { if (!1 !== t.visible) {
2594
- if (t.layers.test(e.layers) && (t.isMesh || t.isLine || t.isPoints) && (t.castShadow || t.receiveShadow && r === V) && (!t.frustumCulled || x.intersectsObject(t))) {
2593
+ } return s.visible = e.visible, s.wireframe = e.wireframe, s.side = a === j ? null !== e.shadowSide ? e.shadowSide : e.side : null !== e.shadowSide ? e.shadowSide : S[e.side], s.clipShadows = e.clipShadows, s.clippingPlanes = e.clippingPlanes, s.clipIntersection = e.clipIntersection, s.wireframeLinewidth = e.wireframeLinewidth, s.linewidth = e.linewidth, !0 === n.isPointLight && !0 === s.isMeshDistanceMaterial && (s.referencePosition.setFromMatrixPosition(n.matrixWorld), s.nearDistance = i, s.farDistance = r), s; } function O(t, e, n, i, r) { if (!1 !== t.visible) {
2594
+ if (t.layers.test(e.layers) && (t.isMesh || t.isLine || t.isPoints) && (t.castShadow || t.receiveShadow && r === j) && (!t.frustumCulled || x.intersectsObject(t))) {
2595
2595
  t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse, t.matrixWorld);
2596
2596
  var a = v.update(t), o = t.material;
2597
2597
  if (Array.isArray(o))
@@ -2608,7 +2608,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2608
2608
  }
2609
2609
  }
2610
2610
  for (var p = t.children, f = 0, m = p.length; f < m; f++)
2611
- L(p[f], e, n, i, r);
2611
+ O(p[f], e, n, i, r);
2612
2612
  } } this.enabled = !1, this.autoUpdate = !0, this.needsUpdate = !1, this.type = F, this.render = function (t, e, n) { if (!1 !== C.enabled && (!1 !== C.autoUpdate || !1 !== C.needsUpdate) && 0 !== t.length) {
2613
2613
  var i = g.getRenderTarget(), r = g.getActiveCubeFace(), a = g.getActiveMipmapLevel(), o = g.state;
2614
2614
  o.setBlending(K), o.buffers.color.setClear(1, 1, 1, 1), o.buffers.depth.setTest(!0), o.setScissorTest(!1);
@@ -2617,20 +2617,20 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2617
2617
  if (void 0 !== u) {
2618
2618
  _.copy(u.mapSize);
2619
2619
  var h = u.getFrameExtents();
2620
- if (_.multiply(h), w.copy(u.mapSize), (_.x > y || _.y > y) && (console.warn("THREE.WebGLShadowMap:", c, "has shadow exceeding max texture size, reducing"), _.x > y && (w.x = Math.floor(y / h.x), _.x = w.x * h.x, u.mapSize.x = w.x), _.y > y && (w.y = Math.floor(y / h.y), _.y = w.y * h.y, u.mapSize.y = w.y)), null === u.map && !u.isPointLightShadow && this.type === V) {
2620
+ if (_.multiply(h), w.copy(u.mapSize), (_.x > y || _.y > y) && (console.warn("THREE.WebGLShadowMap:", c, "has shadow exceeding max texture size, reducing"), _.x > y && (w.x = Math.floor(y / h.x), _.x = w.x * h.x, u.mapSize.x = w.x), _.y > y && (w.y = Math.floor(y / h.y), _.y = w.y * h.y, u.mapSize.y = w.y)), null === u.map && !u.isPointLightShadow && this.type === j) {
2621
2621
  var d = { minFilter: Ht, magFilter: Ht, format: te };
2622
- u.map = new Ve(_.x, _.y, d), u.map.texture.name = c.name + ".shadowMap", u.mapPass = new Ve(_.x, _.y, d), u.camera.updateProjectionMatrix();
2622
+ u.map = new je(_.x, _.y, d), u.map.texture.name = c.name + ".shadowMap", u.mapPass = new je(_.x, _.y, d), u.camera.updateProjectionMatrix();
2623
2623
  }
2624
2624
  if (null === u.map) {
2625
- d = { minFilter: Ut, magFilter: Ut, format: te };
2626
- u.map = new Ve(_.x, _.y, d), u.map.texture.name = c.name + ".shadowMap", u.camera.updateProjectionMatrix();
2625
+ d = { minFilter: Vt, magFilter: Vt, format: te };
2626
+ u.map = new je(_.x, _.y, d), u.map.texture.name = c.name + ".shadowMap", u.camera.updateProjectionMatrix();
2627
2627
  }
2628
2628
  g.setRenderTarget(u.map), g.clear();
2629
2629
  for (var p = u.getViewportCount(), f = 0; f < p; f++) {
2630
2630
  var m = u.getViewport(f);
2631
- b.set(w.x * m.x, w.y * m.y, w.x * m.z, w.y * m.w), o.viewport(b), u.updateMatrices(c, f), x = u.getFrustum(), L(e, n, u.camera, c, this.type);
2631
+ b.set(w.x * m.x, w.y * m.y, w.x * m.z, w.y * m.w), o.viewport(b), u.updateMatrices(c, f), x = u.getFrustum(), O(e, n, u.camera, c, this.type);
2632
2632
  }
2633
- u.isPointLightShadow || this.type !== V || T(u, n);
2633
+ u.isPointLightShadow || this.type !== j || T(u, n);
2634
2634
  }
2635
2635
  else
2636
2636
  console.warn("THREE.WebGLShadowMap:", c, "has no shadow.");
@@ -2669,15 +2669,15 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2669
2669
  else
2670
2670
  u.depthFunc(515);
2671
2671
  i = t;
2672
- } }, setLocked: function (t) { e = t; }, setClear: function (t) { r !== t && (u.clearDepth(t), r = t); }, reset: function () { e = !1, r = i = n = null; } }; }, o = new function () { var e = !1, n = null, i = null, r = null, a = null, o = null, s = null, l = null, c = null; return { setTest: function (t) { e || (t ? F : z)(2960); }, setMask: function (t) { n === t || e || (u.stencilMask(t), n = t); }, setFunc: function (t, e, n) { i === t && r === e && a === n || (u.stencilFunc(t, e, n), i = t, r = e, a = n); }, setOp: function (t, e, n) { o === t && s === e && l === n || (u.stencilOp(t, e, n), o = t, s = e, l = n); }, setLocked: function (t) { e = t; }, setClear: function (t) { c !== t && (u.clearStencil(t), c = t); }, reset: function () { e = !1, c = l = s = o = a = r = i = n = null; } }; }, e = u.getParameter(34921), s = new Uint8Array(e), l = new Uint8Array(e), c = new Uint8Array(e), h = {}, d = null, p = null, f = null, m = null, g = null, v = null, y = null, x = null, _ = null, w = !1, b = null, M = null, S = null, C = null, T = null, E = u.getParameter(35661), A = !1, D = 0, L = u.getParameter(7938); -1 !== L.indexOf("WebGL") ? (D = parseFloat(/^WebGL\ ([0-9])/.exec(L)[1]), A = 1 <= D) : -1 !== L.indexOf("OpenGL ES") && (D = parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(L)[1]), A = 2 <= D); var O = null, I = {}, P = new ze, R = new ze; function k(t, e, n) { var i = new Uint8Array(4), r = u.createTexture(); u.bindTexture(t, r), u.texParameteri(t, 10241, 9728), u.texParameteri(t, 10240, 9728); for (var a = 0; a < n; a++)
2673
- u.texImage2D(e + a, 0, 6408, 1, 1, 0, 6408, 5121, i); return r; } var N = {}; function B(t, e) { s[t] = 1, 0 === l[t] && (u.enableVertexAttribArray(t), l[t] = 1), c[t] !== e && ((i ? u : n.get("ANGLE_instanced_arrays"))[i ? "vertexAttribDivisor" : "vertexAttribDivisorANGLE"](t, e), c[t] = e); } function F(t) { !0 !== h[t] && (u.enable(t), h[t] = !0); } function z(t) { !1 !== h[t] && (u.disable(t), h[t] = !1); } N[3553] = k(3553, 3553, 1), N[34067] = k(34067, 34069, 6), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), F(2929), a.setFunc(Mt), H(!1), W(Y), F(2884), G(K); var V = {}; if (V[rt] = 32774, V[at] = 32778, V[ot] = 32779, i)
2674
- V[st] = 32775, V[lt] = 32776;
2672
+ } }, setLocked: function (t) { e = t; }, setClear: function (t) { r !== t && (u.clearDepth(t), r = t); }, reset: function () { e = !1, r = i = n = null; } }; }, o = new function () { var e = !1, n = null, i = null, r = null, a = null, o = null, s = null, l = null, c = null; return { setTest: function (t) { e || (t ? F : z)(2960); }, setMask: function (t) { n === t || e || (u.stencilMask(t), n = t); }, setFunc: function (t, e, n) { i === t && r === e && a === n || (u.stencilFunc(t, e, n), i = t, r = e, a = n); }, setOp: function (t, e, n) { o === t && s === e && l === n || (u.stencilOp(t, e, n), o = t, s = e, l = n); }, setLocked: function (t) { e = t; }, setClear: function (t) { c !== t && (u.clearStencil(t), c = t); }, reset: function () { e = !1, c = l = s = o = a = r = i = n = null; } }; }, e = u.getParameter(34921), s = new Uint8Array(e), l = new Uint8Array(e), c = new Uint8Array(e), h = {}, d = null, p = null, f = null, m = null, g = null, v = null, y = null, x = null, _ = null, w = !1, b = null, M = null, S = null, C = null, T = null, E = u.getParameter(35661), A = !1, D = 0, O = u.getParameter(7938); -1 !== O.indexOf("WebGL") ? (D = parseFloat(/^WebGL\ ([0-9])/.exec(O)[1]), A = 1 <= D) : -1 !== O.indexOf("OpenGL ES") && (D = parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(O)[1]), A = 2 <= D); var L = null, I = {}, P = new ze, R = new ze; function k(t, e, n) { var i = new Uint8Array(4), r = u.createTexture(); u.bindTexture(t, r), u.texParameteri(t, 10241, 9728), u.texParameteri(t, 10240, 9728); for (var a = 0; a < n; a++)
2673
+ u.texImage2D(e + a, 0, 6408, 1, 1, 0, 6408, 5121, i); return r; } var N = {}; function B(t, e) { s[t] = 1, 0 === l[t] && (u.enableVertexAttribArray(t), l[t] = 1), c[t] !== e && ((i ? u : n.get("ANGLE_instanced_arrays"))[i ? "vertexAttribDivisor" : "vertexAttribDivisorANGLE"](t, e), c[t] = e); } function F(t) { !0 !== h[t] && (u.enable(t), h[t] = !0); } function z(t) { !1 !== h[t] && (u.disable(t), h[t] = !1); } N[3553] = k(3553, 3553, 1), N[34067] = k(34067, 34069, 6), r.setClear(0, 0, 0, 1), a.setClear(1), o.setClear(0), F(2929), a.setFunc(Mt), H(!1), W(Y), F(2884), G(K); var j = {}; if (j[rt] = 32774, j[at] = 32778, j[ot] = 32779, i)
2674
+ j[st] = 32775, j[lt] = 32776;
2675
2675
  else {
2676
- var U = n.get("EXT_blend_minmax");
2677
- null !== U && (V[st] = U.MIN_EXT, V[lt] = U.MAX_EXT);
2678
- } var j = {}; function G(t, e, n, i, r, a, o, s) { if (t !== K) {
2676
+ var V = n.get("EXT_blend_minmax");
2677
+ null !== V && (j[st] = V.MIN_EXT, j[lt] = V.MAX_EXT);
2678
+ } var U = {}; function G(t, e, n, i, r, a, o, s) { if (t !== K) {
2679
2679
  if (p || (F(3042), p = !0), t === it)
2680
- r = r || e, a = a || n, o = o || i, e === m && r === y || (u.blendEquationSeparate(V[e], V[r]), m = e, y = r), n === g && i === v && a === x && o === _ || (u.blendFuncSeparate(j[n], j[i], j[a], j[o]), g = n, v = i, x = a, _ = o), f = t, w = null;
2680
+ r = r || e, a = a || n, o = o || i, e === m && r === y || (u.blendEquationSeparate(j[e], j[r]), m = e, y = r), n === g && i === v && a === x && o === _ || (u.blendFuncSeparate(U[n], U[i], U[a], U[o]), g = n, v = i, x = a, _ = o), f = t, w = null;
2681
2681
  else if (t !== f || s !== w) {
2682
2682
  if (m === rt && y === rt || (u.blendEquation(32774), y = m = rt), s)
2683
2683
  switch (t) {
@@ -2715,9 +2715,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2715
2715
  }
2716
2716
  }
2717
2717
  else
2718
- p && (z(3042), p = !1); } function H(t) { b !== t && (t ? u.frontFace(2304) : u.frontFace(2305), b = t); } function W(t) { t !== X ? (F(2884), t !== M && (t === Y ? u.cullFace(1029) : t === Z ? u.cullFace(1028) : u.cullFace(1032))) : z(2884), M = t; } function J(t, e, n) { t ? (F(32823), C === e && T === n || (u.polygonOffset(e, n), C = e, T = n)) : z(32823); } function q(t) { void 0 === t && (t = 33984 + E - 1), O !== t && (u.activeTexture(t), O = t); } return j[ct] = 0, j[ut] = 1, j[ht] = 768, j[pt] = 770, j[xt] = 776, j[vt] = 774, j[mt] = 772, j[dt] = 769, j[ft] = 771, j[yt] = 775, j[gt] = 773, { buffers: { color: r, depth: a, stencil: o }, initAttributes: function () { for (var t = 0, e = s.length; t < e; t++)
2718
+ p && (z(3042), p = !1); } function H(t) { b !== t && (t ? u.frontFace(2304) : u.frontFace(2305), b = t); } function W(t) { t !== X ? (F(2884), t !== M && (t === Y ? u.cullFace(1029) : t === Z ? u.cullFace(1028) : u.cullFace(1032))) : z(2884), M = t; } function J(t, e, n) { t ? (F(32823), C === e && T === n || (u.polygonOffset(e, n), C = e, T = n)) : z(32823); } function q(t) { void 0 === t && (t = 33984 + E - 1), L !== t && (u.activeTexture(t), L = t); } return U[ct] = 0, U[ut] = 1, U[ht] = 768, U[pt] = 770, U[xt] = 776, U[vt] = 774, U[mt] = 772, U[dt] = 769, U[ft] = 771, U[yt] = 775, U[gt] = 773, { buffers: { color: r, depth: a, stencil: o }, initAttributes: function () { for (var t = 0, e = s.length; t < e; t++)
2719
2719
  s[t] = 0; }, enableAttribute: function (t) { B(t, 0); }, enableAttributeAndDivisor: B, disableUnusedAttributes: function () { for (var t = 0, e = l.length; t !== e; ++t)
2720
- l[t] !== s[t] && (u.disableVertexAttribArray(t), l[t] = 0); }, enable: F, disable: z, useProgram: function (t) { return d !== t && (u.useProgram(t), d = t, !0); }, setBlending: G, setMaterial: function (t, e) { (t.side === $ ? z : F)(2884); var n = t.side === St; e && (n = !n), H(n), t.blending === Q && !1 === t.transparent ? G(K) : G(t.blending, t.blendEquation, t.blendSrc, t.blendDst, t.blendEquationAlpha, t.blendSrcAlpha, t.blendDstAlpha, t.premultipliedAlpha), a.setFunc(t.depthFunc), a.setTest(t.depthTest), a.setMask(t.depthWrite), r.setMask(t.colorWrite); var i = t.stencilWrite; o.setTest(i), i && (o.setMask(t.stencilWriteMask), o.setFunc(t.stencilFunc, t.stencilRef, t.stencilFuncMask), o.setOp(t.stencilFail, t.stencilZFail, t.stencilZPass)), J(t.polygonOffset, t.polygonOffsetFactor, t.polygonOffsetUnits); }, setFlipSided: H, setCullFace: W, setLineWidth: function (t) { t !== S && (A && u.lineWidth(t), S = t); }, setPolygonOffset: J, setScissorTest: function (t) { (t ? F : z)(3089); }, activeTexture: q, bindTexture: function (t, e) { null === O && q(); var n = I[O]; void 0 === n && (n = { type: void 0, texture: void 0 }, I[O] = n), n.type === t && n.texture === e || (u.bindTexture(t, e || N[t]), n.type = t, n.texture = e); }, unbindTexture: function () { var t = I[O]; void 0 !== t && void 0 !== t.type && (u.bindTexture(t.type, null), t.type = void 0, t.texture = void 0); }, compressedTexImage2D: function () { try {
2720
+ l[t] !== s[t] && (u.disableVertexAttribArray(t), l[t] = 0); }, enable: F, disable: z, useProgram: function (t) { return d !== t && (u.useProgram(t), d = t, !0); }, setBlending: G, setMaterial: function (t, e) { (t.side === $ ? z : F)(2884); var n = t.side === St; e && (n = !n), H(n), t.blending === Q && !1 === t.transparent ? G(K) : G(t.blending, t.blendEquation, t.blendSrc, t.blendDst, t.blendEquationAlpha, t.blendSrcAlpha, t.blendDstAlpha, t.premultipliedAlpha), a.setFunc(t.depthFunc), a.setTest(t.depthTest), a.setMask(t.depthWrite), r.setMask(t.colorWrite); var i = t.stencilWrite; o.setTest(i), i && (o.setMask(t.stencilWriteMask), o.setFunc(t.stencilFunc, t.stencilRef, t.stencilFuncMask), o.setOp(t.stencilFail, t.stencilZFail, t.stencilZPass)), J(t.polygonOffset, t.polygonOffsetFactor, t.polygonOffsetUnits); }, setFlipSided: H, setCullFace: W, setLineWidth: function (t) { t !== S && (A && u.lineWidth(t), S = t); }, setPolygonOffset: J, setScissorTest: function (t) { (t ? F : z)(3089); }, activeTexture: q, bindTexture: function (t, e) { null === L && q(); var n = I[L]; void 0 === n && (n = { type: void 0, texture: void 0 }, I[L] = n), n.type === t && n.texture === e || (u.bindTexture(t, e || N[t]), n.type = t, n.texture = e); }, unbindTexture: function () { var t = I[L]; void 0 !== t && void 0 !== t.type && (u.bindTexture(t.type, null), t.type = void 0, t.texture = void 0); }, compressedTexImage2D: function () { try {
2721
2721
  u.compressedTexImage2D.apply(u, arguments);
2722
2722
  }
2723
2723
  catch (t) {
@@ -2733,7 +2733,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2733
2733
  catch (t) {
2734
2734
  console.error("THREE.WebGLState:", t);
2735
2735
  } }, scissor: function (t) { !1 === P.equals(t) && (u.scissor(t.x, t.y, t.z, t.w), P.copy(t)); }, viewport: function (t) { !1 === R.equals(t) && (u.viewport(t.x, t.y, t.z, t.w), R.copy(t)); }, reset: function () { for (var t = 0; t < l.length; t++)
2736
- 1 === l[t] && (u.disableVertexAttribArray(t), l[t] = 0); h = {}, I = {}, M = b = f = d = O = null, r.reset(), a.reset(), o.reset(); } }; }
2736
+ 1 === l[t] && (u.disableVertexAttribArray(t), l[t] = 0); h = {}, I = {}, M = b = f = d = L = null, r.reset(), a.reset(), o.reset(); } }; }
2737
2737
  function bo(x, _, w, b, r, M, S) { var c, C = r.isWebGL2, e = r.maxTextures, g = r.maxCubemapSize, m = r.maxTextureSize, n = r.maxSamples, o = new WeakMap, i = !1; try {
2738
2738
  i = "undefined" != typeof OffscreenCanvas && null !== new OffscreenCanvas(1, 1).getContext("2d");
2739
2739
  }
@@ -2745,13 +2745,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2745
2745
  return l.width = o, l.height = s, l.getContext("2d").drawImage(t, 0, 0, o, s), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + t.width + "x" + t.height + ") to (" + o + "x" + s + ")."), l;
2746
2746
  }
2747
2747
  return "data" in t && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + t.width + "x" + t.height + ")."), t;
2748
- } return t; } function T(t) { return Pe.isPowerOfTwo(t.width) && Pe.isPowerOfTwo(t.height); } function E(t, e) { return t.generateMipmaps && e && t.minFilter !== Ut && t.minFilter !== Ht; } function A(t, e, n, i) { x.generateMipmap(t), b.get(e).__maxMipLevel = Math.log(Math.max(n, i)) * Math.LOG2E; } function D(t, e, n) { if (!1 === C)
2748
+ } return t; } function T(t) { return Pe.isPowerOfTwo(t.width) && Pe.isPowerOfTwo(t.height); } function E(t, e) { return t.generateMipmaps && e && t.minFilter !== Vt && t.minFilter !== Ht; } function A(t, e, n, i) { x.generateMipmap(t), b.get(e).__maxMipLevel = Math.log(Math.max(n, i)) * Math.LOG2E; } function D(t, e, n) { if (!1 === C)
2749
2749
  return e; if (null !== t) {
2750
2750
  if (void 0 !== x[t])
2751
2751
  return x[t];
2752
2752
  console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + t + "'");
2753
- } var i = e; return 6403 === e && (5126 === n && (i = 33326), 5131 === n && (i = 33325), 5121 === n && (i = 33321)), 6407 === e && (5126 === n && (i = 34837), 5131 === n && (i = 34843), 5121 === n && (i = 32849)), 6408 === e && (5126 === n && (i = 34836), 5131 === n && (i = 34842), 5121 === n && (i = 32856)), 33325 === i || 33326 === i || 34842 === i || 34836 === i ? _.get("EXT_color_buffer_float") : 34843 !== i && 34837 !== i || console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."), i; } function a(t) { return t === Ut || t === jt || t === Gt ? 9728 : 9729; } function s(t) { var e = t.target; e.removeEventListener("dispose", s), function (t) { var e = b.get(t); if (void 0 === e.__webglInit)
2754
- return; x.deleteTexture(e.__webglTexture), b.remove(t); }(e), e.isVideoTexture && o.delete(e), S.memory.textures--; } function L(t) { var e = t.target; e.removeEventListener("dispose", L), function (t) { var e = b.get(t), n = b.get(t.texture); if (!t)
2753
+ } var i = e; return 6403 === e && (5126 === n && (i = 33326), 5131 === n && (i = 33325), 5121 === n && (i = 33321)), 6407 === e && (5126 === n && (i = 34837), 5131 === n && (i = 34843), 5121 === n && (i = 32849)), 6408 === e && (5126 === n && (i = 34836), 5131 === n && (i = 34842), 5121 === n && (i = 32856)), 33325 === i || 33326 === i || 34842 === i || 34836 === i ? _.get("EXT_color_buffer_float") : 34843 !== i && 34837 !== i || console.warn("THREE.WebGLRenderer: Floating point textures with RGB format not supported. Please use RGBA instead."), i; } function a(t) { return t === Vt || t === Ut || t === Gt ? 9728 : 9729; } function s(t) { var e = t.target; e.removeEventListener("dispose", s), function (t) { var e = b.get(t); if (void 0 === e.__webglInit)
2754
+ return; x.deleteTexture(e.__webglTexture), b.remove(t); }(e), e.isVideoTexture && o.delete(e), S.memory.textures--; } function O(t) { var e = t.target; e.removeEventListener("dispose", O), function (t) { var e = b.get(t), n = b.get(t.texture); if (!t)
2755
2755
  return; void 0 !== n.__webglTexture && x.deleteTexture(n.__webglTexture); t.depthTexture && t.depthTexture.dispose(); if (t.isWebGLCubeRenderTarget)
2756
2756
  for (var i = 0; i < 6; i++)
2757
2757
  x.deleteFramebuffer(e.__webglFramebuffer[i]), e.__webglDepthbuffer && x.deleteRenderbuffer(e.__webglDepthbuffer[i]);
@@ -2777,7 +2777,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2777
2777
  for (var i = t && (t.isCompressedTexture || t.image[0].isCompressedTexture), r = t.image[0] && t.image[0].isDataTexture, a = [], o = 0; o < 6; o++)
2778
2778
  a[o] = i || r ? r ? t.image[o].image : t.image[o] : v(t.image[o], !1, !0, g);
2779
2779
  var s, l = a[0], c = T(l) || C, u = M.convert(t.format), h = M.convert(t.type), d = D(t.internalFormat, u, h);
2780
- if (O(34067, t, c), i) {
2780
+ if (L(34067, t, c), i) {
2781
2781
  for (o = 0; o < 6; o++) {
2782
2782
  s = a[o].mipmaps;
2783
2783
  for (var p = 0; p < s.length; p++) {
@@ -2810,13 +2810,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2810
2810
  }
2811
2811
  else
2812
2812
  w.activeTexture(33984 + e), w.bindTexture(34067, n.__webglTexture);
2813
- } } function p(t, e) { w.activeTexture(33984 + e), w.bindTexture(34067, b.get(t).__webglTexture); } var f = {}; f[Ft] = 10497, f[zt] = 33071, f[Vt] = 33648; var y = {}; function O(t, e, n) { n ? (x.texParameteri(t, 10242, f[e.wrapS]), x.texParameteri(t, 10243, f[e.wrapT]), 32879 !== t && 35866 !== t || x.texParameteri(t, 32882, f[e.wrapR]), x.texParameteri(t, 10240, y[e.magFilter]), x.texParameteri(t, 10241, y[e.minFilter])) : (x.texParameteri(t, 10242, 33071), x.texParameteri(t, 10243, 33071), 32879 !== t && 35866 !== t || x.texParameteri(t, 32882, 33071), e.wrapS === zt && e.wrapT === zt || console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), x.texParameteri(t, 10240, a(e.magFilter)), x.texParameteri(t, 10241, a(e.minFilter)), e.minFilter !== Ut && e.minFilter !== Ht && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")); var i = _.get("EXT_texture_filter_anisotropic"); if (i) {
2813
+ } } function p(t, e) { w.activeTexture(33984 + e), w.bindTexture(34067, b.get(t).__webglTexture); } var f = {}; f[Ft] = 10497, f[zt] = 33071, f[jt] = 33648; var y = {}; function L(t, e, n) { n ? (x.texParameteri(t, 10242, f[e.wrapS]), x.texParameteri(t, 10243, f[e.wrapT]), 32879 !== t && 35866 !== t || x.texParameteri(t, 32882, f[e.wrapR]), x.texParameteri(t, 10240, y[e.magFilter]), x.texParameteri(t, 10241, y[e.minFilter])) : (x.texParameteri(t, 10242, 33071), x.texParameteri(t, 10243, 33071), 32879 !== t && 35866 !== t || x.texParameteri(t, 32882, 33071), e.wrapS === zt && e.wrapT === zt || console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."), x.texParameteri(t, 10240, a(e.magFilter)), x.texParameteri(t, 10241, a(e.minFilter)), e.minFilter !== Vt && e.minFilter !== Ht && console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")); var i = _.get("EXT_texture_filter_anisotropic"); if (i) {
2814
2814
  if (e.type === Zt && null === _.get("OES_texture_float_linear"))
2815
2815
  return;
2816
2816
  if (e.type === $t && null === (C || _.get("OES_texture_half_float_linear")))
2817
2817
  return;
2818
2818
  (1 < e.anisotropy || b.get(e).__currentAnisotropy) && (x.texParameterf(t, i.TEXTURE_MAX_ANISOTROPY_EXT, Math.min(e.anisotropy, r.getMaxAnisotropy())), b.get(e).__currentAnisotropy = e.anisotropy);
2819
- } } function I(t, e) { void 0 === t.__webglInit && (t.__webglInit = !0, e.addEventListener("dispose", s), t.__webglTexture = x.createTexture(), S.memory.textures++); } function P(t, e, n) { var i = 3553; e.isDataTexture2DArray && (i = 35866), e.isDataTexture3D && (i = 32879), I(t, e), w.activeTexture(33984 + n), w.bindTexture(i, t.__webglTexture), x.pixelStorei(37440, e.flipY), x.pixelStorei(37441, e.premultiplyAlpha), x.pixelStorei(3317, e.unpackAlignment); var r, a = (r = e, !C && (r.wrapS !== zt || r.wrapT !== zt || r.minFilter !== Ut && r.minFilter !== Ht) && !1 === T(e.image)), o = v(e.image, a, !1, m), s = T(o) || C, l = M.convert(e.format), c = M.convert(e.type), u = D(e.internalFormat, l, c); O(i, e, s); var h, d = e.mipmaps; if (e.isDepthTexture) {
2819
+ } } function I(t, e) { void 0 === t.__webglInit && (t.__webglInit = !0, e.addEventListener("dispose", s), t.__webglTexture = x.createTexture(), S.memory.textures++); } function P(t, e, n) { var i = 3553; e.isDataTexture2DArray && (i = 35866), e.isDataTexture3D && (i = 32879), I(t, e), w.activeTexture(33984 + n), w.bindTexture(i, t.__webglTexture), x.pixelStorei(37440, e.flipY), x.pixelStorei(37441, e.premultiplyAlpha), x.pixelStorei(3317, e.unpackAlignment); var r, a = (r = e, !C && (r.wrapS !== zt || r.wrapT !== zt || r.minFilter !== Vt && r.minFilter !== Ht) && !1 === T(e.image)), o = v(e.image, a, !1, m), s = T(o) || C, l = M.convert(e.format), c = M.convert(e.type), u = D(e.internalFormat, l, c); L(i, e, s); var h, d = e.mipmaps; if (e.isDepthTexture) {
2820
2820
  if (u = 6402, e.type === Zt) {
2821
2821
  if (!1 === C)
2822
2822
  throw new Error("Float Depth Texture only supported in WebGL2.0");
@@ -2894,7 +2894,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2894
2894
  x.bindFramebuffer(36160, e.__webglFramebuffer[i]), e.__webglDepthbuffer[i] = x.createRenderbuffer(), k(e.__webglDepthbuffer[i], t);
2895
2895
  }
2896
2896
  else
2897
- x.bindFramebuffer(36160, e.__webglFramebuffer), e.__webglDepthbuffer = x.createRenderbuffer(), k(e.__webglDepthbuffer, t); x.bindFramebuffer(36160, null); } function B(t) { return C && t.isWebGLMultisampleRenderTarget ? Math.min(n, t.samples) : 0; } y[Ut] = 9728, y[jt] = 9984, y[Gt] = 9986, y[Ht] = 9729, y[Wt] = 9985; var F = !(y[Jt] = 9987), z = !1; this.allocateTextureUnit = function () { var t = l; return e <= t && console.warn("THREE.WebGLTextures: Trying to use " + t + " texture units while this GPU supports only " + e), l += 1, t; }, this.resetTextureUnits = function () { l = 0; }, this.setTexture2D = h, this.setTexture2DArray = function (t, e) { var n = b.get(t); 0 < t.version && n.__version !== t.version ? P(n, t, e) : (w.activeTexture(33984 + e), w.bindTexture(35866, n.__webglTexture)); }, this.setTexture3D = function (t, e) { var n = b.get(t); 0 < t.version && n.__version !== t.version ? P(n, t, e) : (w.activeTexture(33984 + e), w.bindTexture(32879, n.__webglTexture)); }, this.setTextureCube = d, this.setTextureCubeDynamic = p, this.setupRenderTarget = function (t) { var e = b.get(t), n = b.get(t.texture); t.addEventListener("dispose", L), n.__webglTexture = x.createTexture(), S.memory.textures++; var i = !0 === t.isWebGLCubeRenderTarget, r = !0 === t.isWebGLMultisampleRenderTarget, a = !0 === t.isWebGLMultiviewRenderTarget, o = T(t) || C; if (i) {
2897
+ x.bindFramebuffer(36160, e.__webglFramebuffer), e.__webglDepthbuffer = x.createRenderbuffer(), k(e.__webglDepthbuffer, t); x.bindFramebuffer(36160, null); } function B(t) { return C && t.isWebGLMultisampleRenderTarget ? Math.min(n, t.samples) : 0; } y[Vt] = 9728, y[Ut] = 9984, y[Gt] = 9986, y[Ht] = 9729, y[Wt] = 9985; var F = !(y[Jt] = 9987), z = !1; this.allocateTextureUnit = function () { var t = l; return e <= t && console.warn("THREE.WebGLTextures: Trying to use " + t + " texture units while this GPU supports only " + e), l += 1, t; }, this.resetTextureUnits = function () { l = 0; }, this.setTexture2D = h, this.setTexture2DArray = function (t, e) { var n = b.get(t); 0 < t.version && n.__version !== t.version ? P(n, t, e) : (w.activeTexture(33984 + e), w.bindTexture(35866, n.__webglTexture)); }, this.setTexture3D = function (t, e) { var n = b.get(t); 0 < t.version && n.__version !== t.version ? P(n, t, e) : (w.activeTexture(33984 + e), w.bindTexture(32879, n.__webglTexture)); }, this.setTextureCube = d, this.setTextureCubeDynamic = p, this.setupRenderTarget = function (t) { var e = b.get(t), n = b.get(t.texture); t.addEventListener("dispose", O), n.__webglTexture = x.createTexture(), S.memory.textures++; var i = !0 === t.isWebGLCubeRenderTarget, r = !0 === t.isWebGLMultisampleRenderTarget, a = !0 === t.isWebGLMultiviewRenderTarget, o = T(t) || C; if (i) {
2898
2898
  e.__webglFramebuffer = [];
2899
2899
  for (var s = 0; s < 6; s++)
2900
2900
  e.__webglFramebuffer[s] = x.createFramebuffer();
@@ -2921,13 +2921,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2921
2921
  y[s] = x.createFramebuffer(), x.bindFramebuffer(36160, y[s]), x.framebufferTextureLayer(36160, 36064, g, 0, s);
2922
2922
  e.__webglColorTexture = g, e.__webglDepthStencilTexture = v, e.__webglViewFramebuffers = y, x.bindFramebuffer(36160, null), x.bindTexture(35866, null);
2923
2923
  } if (i) {
2924
- w.bindTexture(34067, n.__webglTexture), O(34067, t.texture, o);
2924
+ w.bindTexture(34067, n.__webglTexture), L(34067, t.texture, o);
2925
2925
  for (s = 0; s < 6; s++)
2926
2926
  R(e.__webglFramebuffer[s], t, 36064, 34069 + s);
2927
2927
  E(t.texture, o) && A(34067, t.texture, t.width, t.height), w.bindTexture(34067, null);
2928
2928
  }
2929
2929
  else
2930
- a || (w.bindTexture(3553, n.__webglTexture), O(3553, t.texture, o), R(e.__webglFramebuffer, t, 36064, 3553), E(t.texture, o) && A(3553, t.texture, t.width, t.height), w.bindTexture(3553, null)); t.depthBuffer && N(t); }, this.updateRenderTargetMipmap = function (t) { var e = t.texture; if (E(e, T(t) || C)) {
2930
+ a || (w.bindTexture(3553, n.__webglTexture), L(3553, t.texture, o), R(e.__webglFramebuffer, t, 36064, 3553), E(t.texture, o) && A(3553, t.texture, t.width, t.height), w.bindTexture(3553, null)); t.depthBuffer && N(t); }, this.updateRenderTargetMipmap = function (t) { var e = t.texture; if (E(e, T(t) || C)) {
2931
2931
  var n = t.isWebGLCubeRenderTarget ? 34067 : 3553, i = b.get(e).__webglTexture;
2932
2932
  w.bindTexture(n, i), A(n, e, t.width, t.height), w.bindTexture(n, null);
2933
2933
  } }, this.updateMultisampleRenderTarget = function (t) { if (t.isWebGLMultisampleRenderTarget)
@@ -2985,8 +2985,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
2985
2985
  return e.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;
2986
2986
  if (t === A)
2987
2987
  return e.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG;
2988
- } return t === D ? null !== (e = n.get("WEBGL_compressed_texture_etc1")) ? e.COMPRESSED_RGB_ETC1_WEBGL : null : t === L || t === I || t === P || t === R || t === k || t === N || t === B || t === ie || t === re || t === ae || t === oe || t === se || t === le || t === ce ? null !== (e = n.get("WEBGL_compressed_texture_astc")) ? t : null : t === Kt ? i ? 34042 : null !== (e = n.get("WEBGL_depth_texture")) ? e.UNSIGNED_INT_24_8_WEBGL : null : void 0; } }; }
2989
- function So(t, e, n, i) { Ve.call(this, t, e, i), this.depthBuffer = !1, this.stencilBuffer = !1, this.numViews = n; }
2988
+ } return t === D ? null !== (e = n.get("WEBGL_compressed_texture_etc1")) ? e.COMPRESSED_RGB_ETC1_WEBGL : null : t === O || t === I || t === P || t === R || t === k || t === N || t === B || t === ie || t === re || t === ae || t === oe || t === se || t === le || t === ce ? null !== (e = n.get("WEBGL_compressed_texture_astc")) ? t : null : t === Kt ? i ? 34042 : null !== (e = n.get("WEBGL_depth_texture")) ? e.UNSIGNED_INT_24_8_WEBGL : null : void 0; } }; }
2989
+ function So(t, e, n, i) { je.call(this, t, e, i), this.depthBuffer = !1, this.stencilBuffer = !1, this.numViews = n; }
2990
2990
  function Co(n, d) { var p, i, a, o, r, f, s, l = 2, c = n.extensions, m = n.properties, u = 0; function h(t) { return t.isArrayCamera ? t.cameras : (r[0] = t, r); } this.isAvailable = function () { if (void 0 === s) {
2991
2991
  var t = c.get("OVR_multiview2");
2992
2992
  if (s = null !== t && !1 === d.getContextAttributes().antialias) {
@@ -3040,7 +3040,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3040
3040
  var c = v[r], u = l[r], h = null, d = null;
3041
3041
  u && (c.targetRay && null !== (h = e.getPose(u.targetRaySpace, m)) && (c.targetRay.matrix.fromArray(h.transform.matrix), c.targetRay.matrix.decompose(c.targetRay.position, c.targetRay.rotation, c.targetRay.scale)), c.grip && u.gripSpace && null !== (d = e.getPose(u.gripSpace, m)) && (c.grip.matrix.fromArray(d.transform.matrix), c.grip.matrix.decompose(c.grip.position, c.grip.rotation, c.grip.scale))), c.targetRay && (c.targetRay.visible = null !== h), c.grip && (c.grip.visible = null !== d);
3042
3042
  } S && S(t, e); }), this.setAnimationLoop = function (t) { S = t; }, this.dispose = function () { }; }
3043
- function Do(t) { var i = void 0 !== (t = t || {}).canvas ? t.canvas : document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"), e = void 0 !== t.context ? t.context : null, n = void 0 !== t.alpha && t.alpha, r = void 0 === t.depth || t.depth, a = void 0 === t.stencil || t.stencil, o = void 0 !== t.antialias && t.antialias, s = void 0 === t.premultipliedAlpha || t.premultipliedAlpha, l = void 0 !== t.preserveDrawingBuffer && t.preserveDrawingBuffer, c = void 0 !== t.powerPreference ? t.powerPreference : "default", u = void 0 !== t.failIfMajorPerformanceCaveat && t.failIfMajorPerformanceCaveat, f = null, P = null; this.domElement = i, this.debug = { checkShaderErrors: !0 }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.gammaFactor = 2, this.outputEncoding = me, this.physicallyCorrectLights = !1, this.toneMapping = Dt, this.toneMappingExposure = 1, this.toneMappingWhitePoint = 1, this.maxMorphTargets = 8, this.maxMorphNormals = 4; var R, M, k, N, m, B, F, S, C, g, v, h, d, p, T, E, A, y, z = this, x = !1, _ = null, w = 0, b = 0, D = null, L = null, V = -1, O = { geometry: null, program: null, wireframe: !1 }, U = null, I = null, j = new ze, G = new ze, H = null, W = i.width, J = i.height, q = 1, X = null, Y = null, Z = new ze(0, 0, W, J), $ = new ze(0, 0, W, J), K = !1, Q = new Sr, tt = new kr, et = !1, nt = !1, it = new Qe, rt = new We; function at() { return null === D ? q : 1; } try {
3043
+ function Do(t) { var i = void 0 !== (t = t || {}).canvas ? t.canvas : document.createElementNS("http://www.w3.org/1999/xhtml", "canvas"), e = void 0 !== t.context ? t.context : null, n = void 0 !== t.alpha && t.alpha, r = void 0 === t.depth || t.depth, a = void 0 === t.stencil || t.stencil, o = void 0 !== t.antialias && t.antialias, s = void 0 === t.premultipliedAlpha || t.premultipliedAlpha, l = void 0 !== t.preserveDrawingBuffer && t.preserveDrawingBuffer, c = void 0 !== t.powerPreference ? t.powerPreference : "default", u = void 0 !== t.failIfMajorPerformanceCaveat && t.failIfMajorPerformanceCaveat, f = null, P = null; this.domElement = i, this.debug = { checkShaderErrors: !0 }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.gammaFactor = 2, this.outputEncoding = me, this.physicallyCorrectLights = !1, this.toneMapping = Dt, this.toneMappingExposure = 1, this.toneMappingWhitePoint = 1, this.maxMorphTargets = 8, this.maxMorphNormals = 4; var R, M, k, N, m, B, F, S, C, g, v, h, d, p, T, E, A, y, z = this, x = !1, _ = null, w = 0, b = 0, D = null, O = null, j = -1, L = { geometry: null, program: null, wireframe: !1 }, V = null, I = null, U = new ze, G = new ze, H = null, W = i.width, J = i.height, q = 1, X = null, Y = null, Z = new ze(0, 0, W, J), $ = new ze(0, 0, W, J), K = !1, Q = new Sr, tt = new kr, et = !1, nt = !1, it = new Qe, rt = new We; function at() { return null === D ? q : 1; } try {
3044
3044
  var ot = { alpha: n, depth: r, stencil: a, antialias: o, premultipliedAlpha: s, preserveDrawingBuffer: l, powerPreference: c, failIfMajorPerformanceCaveat: u, xrCompatible: !0 };
3045
3045
  if (i.addEventListener("webglcontextlost", ht, !1), i.addEventListener("webglcontextrestored", dt, !1), null === (R = e || i.getContext("webgl", ot) || i.getContext("experimental-webgl", ot)))
3046
3046
  throw null !== i.getContext("webgl") ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
@@ -3048,7 +3048,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3048
3048
  }
3049
3049
  catch (t) {
3050
3050
  throw console.error("THREE.WebGLRenderer: " + t.message), t;
3051
- } function st() { M = new Nr(R), !1 === (k = new Rr(R, M, t)).isWebGL2 && (M.get("WEBGL_depth_texture"), M.get("OES_texture_float"), M.get("OES_texture_half_float"), M.get("OES_texture_half_float_linear"), M.get("OES_standard_derivatives"), M.get("OES_element_index_uint"), M.get("ANGLE_instanced_arrays")), M.get("OES_texture_float_linear"), y = new Mo(0, M, k), (N = new wo(R, M, k)).scissor(G.copy($).multiplyScalar(q).floor()), N.viewport(j.copy(Z).multiplyScalar(q).floor()), m = new zr, B = new ro, F = new bo(R, M, N, B, k, y, m), S = new Er(R, k), C = new Br(0, S, m), g = new jr(0, C, S, m), T = new Ur(R), v = new io(z, M, k), h = new lo, d = new mo, p = new Ir(z, N, g, s), E = new Pr(R, M, m, k), A = new Fr(R, M, m, k), m.programs = v.programs, z.capabilities = k, z.extensions = M, z.properties = B, z.renderLists = h, z.state = N, z.info = m; } st(); var lt = new Ao(z, R); this.xr = lt; var ct = new Co(z, R), ut = new _o(z, g, k.maxTextureSize); function ht(t) { t.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), x = !0; } function dt() { console.log("THREE.WebGLRenderer: Context Restored."), x = !1, st(); } function pt(t) { var e, n = t.target; n.removeEventListener("dispose", pt), ft(e = n), B.remove(e); } function ft(t) { var e = B.get(t).program; (t.program = void 0) !== e && v.releaseProgram(e); } this.shadowMap = ut, this.getContext = function () { return R; }, this.getContextAttributes = function () { return R.getContextAttributes(); }, this.forceContextLoss = function () { var t = M.get("WEBGL_lose_context"); t && t.loseContext(); }, this.forceContextRestore = function () { var t = M.get("WEBGL_lose_context"); t && t.restoreContext(); }, this.getPixelRatio = function () { return q; }, this.setPixelRatio = function (t) { void 0 !== t && (q = t, this.setSize(W, J, !1)); }, this.getSize = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"), t = new Re), t.set(W, J); }, this.setSize = function (t, e, n) { lt.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (W = t, J = e, i.width = Math.floor(t * q), i.height = Math.floor(e * q), !1 !== n && (i.style.width = t + "px", i.style.height = e + "px"), this.setViewport(0, 0, t, e)); }, this.getDrawingBufferSize = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"), t = new Re), t.set(W * q, J * q).floor(); }, this.setDrawingBufferSize = function (t, e, n) { W = t, J = e, q = n, i.width = Math.floor(t * n), i.height = Math.floor(e * n), this.setViewport(0, 0, t, e); }, this.getCurrentViewport = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"), t = new ze), t.copy(j); }, this.getViewport = function (t) { return t.copy(Z); }, this.setViewport = function (t, e, n, i) { t.isVector4 ? Z.set(t.x, t.y, t.z, t.w) : Z.set(t, e, n, i), N.viewport(j.copy(Z).multiplyScalar(q).floor()); }, this.getScissor = function (t) { return t.copy($); }, this.setScissor = function (t, e, n, i) { t.isVector4 ? $.set(t.x, t.y, t.z, t.w) : $.set(t, e, n, i), N.scissor(G.copy($).multiplyScalar(q).floor()); }, this.getScissorTest = function () { return K; }, this.setScissorTest = function (t) { N.setScissorTest(K = t); }, this.setOpaqueSort = function (t) { X = t; }, this.setTransparentSort = function (t) { Y = t; }, this.getClearColor = function () { return p.getClearColor(); }, this.setClearColor = function () { p.setClearColor.apply(p, arguments); }, this.getClearAlpha = function () { return p.getClearAlpha(); }, this.setClearAlpha = function () { p.setClearAlpha.apply(p, arguments); }, this.clear = function (t, e, n) { var i = 0; void 0 !== t && !t || (i |= 16384), void 0 !== e && !e || (i |= 256), void 0 !== n && !n || (i |= 1024), R.clear(i); }, this.clearColor = function () { this.clear(!0, !1, !1); }, this.clearDepth = function () { this.clear(!1, !0, !1); }, this.clearStencil = function () { this.clear(!1, !1, !0); }, this.dispose = function () { i.removeEventListener("webglcontextlost", ht, !1), i.removeEventListener("webglcontextrestored", dt, !1), h.dispose(), d.dispose(), B.dispose(), g.dispose(), lt.dispose(), vt.stop(); }, this.renderBufferImmediate = function (t, e) { N.initAttributes(); var n = B.get(t); t.hasPositions && !n.position && (n.position = R.createBuffer()), t.hasNormals && !n.normal && (n.normal = R.createBuffer()), t.hasUvs && !n.uv && (n.uv = R.createBuffer()), t.hasColors && !n.color && (n.color = R.createBuffer()); var i = e.getAttributes(); t.hasPositions && (R.bindBuffer(34962, n.position), R.bufferData(34962, t.positionArray, 35048), N.enableAttribute(i.position), R.vertexAttribPointer(i.position, 3, 5126, !1, 0, 0)), t.hasNormals && (R.bindBuffer(34962, n.normal), R.bufferData(34962, t.normalArray, 35048), N.enableAttribute(i.normal), R.vertexAttribPointer(i.normal, 3, 5126, !1, 0, 0)), t.hasUvs && (R.bindBuffer(34962, n.uv), R.bufferData(34962, t.uvArray, 35048), N.enableAttribute(i.uv), R.vertexAttribPointer(i.uv, 2, 5126, !1, 0, 0)), t.hasColors && (R.bindBuffer(34962, n.color), R.bufferData(34962, t.colorArray, 35048), N.enableAttribute(i.color), R.vertexAttribPointer(i.color, 3, 5126, !1, 0, 0)), N.disableUnusedAttributes(), R.drawArrays(4, 0, t.count), t.count = 0; }; var mt = new xn; this.renderBufferDirect = function (t, e, n, i, r, a) { null === e && (e = mt); var o = r.isMesh && r.matrixWorld.determinant() < 0, s = wt(t, e, i, r); N.setMaterial(i, o); var l = !1; O.geometry === n.id && O.program === s.id && O.wireframe === (!0 === i.wireframe) || (O.geometry = n.id, O.program = s.id, O.wireframe = !0 === i.wireframe, l = !0), (i.morphTargets || i.morphNormals) && (T.update(r, n, i, s), l = !0); var c = n.index, u = n.attributes.position; if (null === c) {
3051
+ } function st() { M = new Nr(R), !1 === (k = new Rr(R, M, t)).isWebGL2 && (M.get("WEBGL_depth_texture"), M.get("OES_texture_float"), M.get("OES_texture_half_float"), M.get("OES_texture_half_float_linear"), M.get("OES_standard_derivatives"), M.get("OES_element_index_uint"), M.get("ANGLE_instanced_arrays")), M.get("OES_texture_float_linear"), y = new Mo(0, M, k), (N = new wo(R, M, k)).scissor(G.copy($).multiplyScalar(q).floor()), N.viewport(U.copy(Z).multiplyScalar(q).floor()), m = new zr, B = new ro, F = new bo(R, M, N, B, k, y, m), S = new Er(R, k), C = new Br(0, S, m), g = new Ur(0, C, S, m), T = new Vr(R), v = new io(z, M, k), h = new lo, d = new mo, p = new Ir(z, N, g, s), E = new Pr(R, M, m, k), A = new Fr(R, M, m, k), m.programs = v.programs, z.capabilities = k, z.extensions = M, z.properties = B, z.renderLists = h, z.state = N, z.info = m; } st(); var lt = new Ao(z, R); this.xr = lt; var ct = new Co(z, R), ut = new _o(z, g, k.maxTextureSize); function ht(t) { t.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), x = !0; } function dt() { console.log("THREE.WebGLRenderer: Context Restored."), x = !1, st(); } function pt(t) { var e, n = t.target; n.removeEventListener("dispose", pt), ft(e = n), B.remove(e); } function ft(t) { var e = B.get(t).program; (t.program = void 0) !== e && v.releaseProgram(e); } this.shadowMap = ut, this.getContext = function () { return R; }, this.getContextAttributes = function () { return R.getContextAttributes(); }, this.forceContextLoss = function () { var t = M.get("WEBGL_lose_context"); t && t.loseContext(); }, this.forceContextRestore = function () { var t = M.get("WEBGL_lose_context"); t && t.restoreContext(); }, this.getPixelRatio = function () { return q; }, this.setPixelRatio = function (t) { void 0 !== t && (q = t, this.setSize(W, J, !1)); }, this.getSize = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getsize() now requires a Vector2 as an argument"), t = new Re), t.set(W, J); }, this.setSize = function (t, e, n) { lt.isPresenting ? console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.") : (W = t, J = e, i.width = Math.floor(t * q), i.height = Math.floor(e * q), !1 !== n && (i.style.width = t + "px", i.style.height = e + "px"), this.setViewport(0, 0, t, e)); }, this.getDrawingBufferSize = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getdrawingBufferSize() now requires a Vector2 as an argument"), t = new Re), t.set(W * q, J * q).floor(); }, this.setDrawingBufferSize = function (t, e, n) { W = t, J = e, q = n, i.width = Math.floor(t * n), i.height = Math.floor(e * n), this.setViewport(0, 0, t, e); }, this.getCurrentViewport = function (t) { return void 0 === t && (console.warn("WebGLRenderer: .getCurrentViewport() now requires a Vector4 as an argument"), t = new ze), t.copy(U); }, this.getViewport = function (t) { return t.copy(Z); }, this.setViewport = function (t, e, n, i) { t.isVector4 ? Z.set(t.x, t.y, t.z, t.w) : Z.set(t, e, n, i), N.viewport(U.copy(Z).multiplyScalar(q).floor()); }, this.getScissor = function (t) { return t.copy($); }, this.setScissor = function (t, e, n, i) { t.isVector4 ? $.set(t.x, t.y, t.z, t.w) : $.set(t, e, n, i), N.scissor(G.copy($).multiplyScalar(q).floor()); }, this.getScissorTest = function () { return K; }, this.setScissorTest = function (t) { N.setScissorTest(K = t); }, this.setOpaqueSort = function (t) { X = t; }, this.setTransparentSort = function (t) { Y = t; }, this.getClearColor = function () { return p.getClearColor(); }, this.setClearColor = function () { p.setClearColor.apply(p, arguments); }, this.getClearAlpha = function () { return p.getClearAlpha(); }, this.setClearAlpha = function () { p.setClearAlpha.apply(p, arguments); }, this.clear = function (t, e, n) { var i = 0; void 0 !== t && !t || (i |= 16384), void 0 !== e && !e || (i |= 256), void 0 !== n && !n || (i |= 1024), R.clear(i); }, this.clearColor = function () { this.clear(!0, !1, !1); }, this.clearDepth = function () { this.clear(!1, !0, !1); }, this.clearStencil = function () { this.clear(!1, !1, !0); }, this.dispose = function () { i.removeEventListener("webglcontextlost", ht, !1), i.removeEventListener("webglcontextrestored", dt, !1), h.dispose(), d.dispose(), B.dispose(), g.dispose(), lt.dispose(), vt.stop(); }, this.renderBufferImmediate = function (t, e) { N.initAttributes(); var n = B.get(t); t.hasPositions && !n.position && (n.position = R.createBuffer()), t.hasNormals && !n.normal && (n.normal = R.createBuffer()), t.hasUvs && !n.uv && (n.uv = R.createBuffer()), t.hasColors && !n.color && (n.color = R.createBuffer()); var i = e.getAttributes(); t.hasPositions && (R.bindBuffer(34962, n.position), R.bufferData(34962, t.positionArray, 35048), N.enableAttribute(i.position), R.vertexAttribPointer(i.position, 3, 5126, !1, 0, 0)), t.hasNormals && (R.bindBuffer(34962, n.normal), R.bufferData(34962, t.normalArray, 35048), N.enableAttribute(i.normal), R.vertexAttribPointer(i.normal, 3, 5126, !1, 0, 0)), t.hasUvs && (R.bindBuffer(34962, n.uv), R.bufferData(34962, t.uvArray, 35048), N.enableAttribute(i.uv), R.vertexAttribPointer(i.uv, 2, 5126, !1, 0, 0)), t.hasColors && (R.bindBuffer(34962, n.color), R.bufferData(34962, t.colorArray, 35048), N.enableAttribute(i.color), R.vertexAttribPointer(i.color, 3, 5126, !1, 0, 0)), N.disableUnusedAttributes(), R.drawArrays(4, 0, t.count), t.count = 0; }; var mt = new xn; this.renderBufferDirect = function (t, e, n, i, r, a) { null === e && (e = mt); var o = r.isMesh && r.matrixWorld.determinant() < 0, s = wt(t, e, i, r); N.setMaterial(i, o); var l = !1; L.geometry === n.id && L.program === s.id && L.wireframe === (!0 === i.wireframe) || (L.geometry = n.id, L.program = s.id, L.wireframe = !0 === i.wireframe, l = !0), (i.morphTargets || i.morphNormals) && (T.update(r, n, i, s), l = !0); var c = n.index, u = n.attributes.position; if (null === c) {
3052
3052
  if (void 0 === u || 0 === u.count)
3053
3053
  return;
3054
3054
  }
@@ -3117,13 +3117,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3117
3117
  else
3118
3118
  for (var h = n.cameras, d = 0, p = h.length; d < p; d++) {
3119
3119
  var f = h[d];
3120
- s.layers.test(f.layers) && (N.viewport(j.copy(f.viewport)), P.setupLights(f), xt(s, e, f, l, c, u));
3120
+ s.layers.test(f.layers) && (N.viewport(U.copy(f.viewport)), P.setupLights(f), xt(s, e, f, l, c, u));
3121
3121
  }
3122
3122
  else
3123
3123
  I = null, xt(s, e, n, l, c, u);
3124
3124
  } } function xt(t, e, n, i, r, a) { if (t.onBeforeRender(z, e, n, i, r, a), P = d.get(e, I || n), t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse, t.matrixWorld), t.normalMatrix.getNormalMatrix(t.modelViewMatrix), t.isImmediateRenderObject) {
3125
3125
  var o = wt(n, e, r, t);
3126
- N.setMaterial(r), O.geometry = null, O.program = null, O.wireframe = !1, s = o, t.render(function (t) { z.renderBufferImmediate(t, s); });
3126
+ N.setMaterial(r), L.geometry = null, L.program = null, L.wireframe = !1, s = o, t.render(function (t) { z.renderBufferImmediate(t, s); });
3127
3127
  }
3128
3128
  else
3129
3129
  z.renderBufferDirect(n, e, i, r, t, a); var s; t.onAfterRender(z, e, n, i, r, a), P = d.get(e, I || n); } function _t(t, e, n) { var i = B.get(t), r = P.state.lights, a = P.state.shadowsArray, o = r.state.version, s = v.getParameters(t, r.state, a, e, tt.numPlanes, tt.numIntersection, n), l = v.getProgramCacheKey(s), c = i.program, u = !0; if (void 0 === c)
@@ -3140,11 +3140,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3140
3140
  for (var d = t.numSupportedMorphTargets = 0; d < z.maxMorphTargets; d++)
3141
3141
  0 <= h["morphTarget" + d] && t.numSupportedMorphTargets++; if (t.morphNormals)
3142
3142
  for (d = t.numSupportedMorphNormals = 0; d < z.maxMorphNormals; d++)
3143
- 0 <= h["morphNormal" + d] && t.numSupportedMorphNormals++; var p, f = i.uniforms; (t.isShaderMaterial || t.isRawShaderMaterial) && !0 !== t.clipping || (i.numClippingPlanes = tt.numPlanes, i.numIntersection = tt.numIntersection, f.clippingPlanes = tt.uniform), i.fog = e.fog, i.needsLights = (p = t).isMeshLambertMaterial || p.isMeshToonMaterial || p.isMeshPhongMaterial || p.isMeshStandardMaterial || p.isShadowMaterial || p.isShaderMaterial && !0 === p.lights, i.lightsStateVersion = o, i.needsLights && (f.ambientLightColor.value = r.state.ambient, f.lightProbe.value = r.state.probe, f.directionalLights.value = r.state.directional, f.spotLights.value = r.state.spot, f.rectAreaLights.value = r.state.rectArea, f.pointLights.value = r.state.point, f.hemisphereLights.value = r.state.hemi, f.directionalShadowMap.value = r.state.directionalShadowMap, f.directionalShadowMatrix.value = r.state.directionalShadowMatrix, f.spotShadowMap.value = r.state.spotShadowMap, f.spotShadowMatrix.value = r.state.spotShadowMatrix, f.pointShadowMap.value = r.state.pointShadowMap, f.pointShadowMatrix.value = r.state.pointShadowMatrix); var m = i.program.getUniforms(), g = Va.seqWithValue(m.seq, f); i.uniformsList = g; } function wt(t, e, n, i) { F.resetTextureUnits(); var r = e.fog, a = n.isMeshStandardMaterial ? e.environment : null, o = B.get(n), s = P.state.lights; if (et && (nt || t !== U)) {
3144
- var l = t === U && n.id === V;
3143
+ 0 <= h["morphNormal" + d] && t.numSupportedMorphNormals++; var p, f = i.uniforms; (t.isShaderMaterial || t.isRawShaderMaterial) && !0 !== t.clipping || (i.numClippingPlanes = tt.numPlanes, i.numIntersection = tt.numIntersection, f.clippingPlanes = tt.uniform), i.fog = e.fog, i.needsLights = (p = t).isMeshLambertMaterial || p.isMeshToonMaterial || p.isMeshPhongMaterial || p.isMeshStandardMaterial || p.isShadowMaterial || p.isShaderMaterial && !0 === p.lights, i.lightsStateVersion = o, i.needsLights && (f.ambientLightColor.value = r.state.ambient, f.lightProbe.value = r.state.probe, f.directionalLights.value = r.state.directional, f.spotLights.value = r.state.spot, f.rectAreaLights.value = r.state.rectArea, f.pointLights.value = r.state.point, f.hemisphereLights.value = r.state.hemi, f.directionalShadowMap.value = r.state.directionalShadowMap, f.directionalShadowMatrix.value = r.state.directionalShadowMatrix, f.spotShadowMap.value = r.state.spotShadowMap, f.spotShadowMatrix.value = r.state.spotShadowMatrix, f.pointShadowMap.value = r.state.pointShadowMap, f.pointShadowMatrix.value = r.state.pointShadowMatrix); var m = i.program.getUniforms(), g = ja.seqWithValue(m.seq, f); i.uniformsList = g; } function wt(t, e, n, i) { F.resetTextureUnits(); var r = e.fog, a = n.isMeshStandardMaterial ? e.environment : null, o = B.get(n), s = P.state.lights; if (et && (nt || t !== V)) {
3144
+ var l = t === V && n.id === j;
3145
3145
  tt.setState(n.clippingPlanes, n.clipIntersection, n.clipShadows, t, o, l);
3146
- } n.version === o.__version ? (void 0 === o.program || n.fog && o.fog !== r || o.environment !== a || o.needsLights && o.lightsStateVersion !== s.state.version || void 0 !== o.numClippingPlanes && (o.numClippingPlanes !== tt.numPlanes || o.numIntersection !== tt.numIntersection) || o.outputEncoding !== z.outputEncoding) && _t(n, e, i) : (B.update(n, "uniforms", n.uniforms), _t(n, e, i), o.__version = n.version); var c, u, h, d, p, f, m, g, v, y, x, _, w = !1, b = !1, M = !1, S = o.program, C = S.getUniforms(), T = o.uniforms; if (N.useProgram(S.program) && (M = b = w = !0), n.id !== V && (V = n.id, b = !0), w || U !== t) {
3147
- if (0 < S.numMultiviewViews ? ct.updateCameraProjectionMatricesUniform(t, C) : C.setValue(R, "projectionMatrix", t.projectionMatrix), k.logarithmicDepthBuffer && C.setValue(R, "logDepthBufFC", 2 / (Math.log(t.far + 1) / Math.LN2)), U !== t && (U = t, M = b = !0), n.isShaderMaterial || n.isMeshPhongMaterial || n.isMeshToonMaterial || n.isMeshStandardMaterial || n.envMap) {
3146
+ } n.version === o.__version ? (void 0 === o.program || n.fog && o.fog !== r || o.environment !== a || o.needsLights && o.lightsStateVersion !== s.state.version || void 0 !== o.numClippingPlanes && (o.numClippingPlanes !== tt.numPlanes || o.numIntersection !== tt.numIntersection) || o.outputEncoding !== z.outputEncoding) && _t(n, e, i) : (B.update(n, "uniforms", n.uniforms), _t(n, e, i), o.__version = n.version); var c, u, h, d, p, f, m, g, v, y, x, _, w = !1, b = !1, M = !1, S = o.program, C = S.getUniforms(), T = o.uniforms; if (N.useProgram(S.program) && (M = b = w = !0), n.id !== j && (j = n.id, b = !0), w || V !== t) {
3147
+ if (0 < S.numMultiviewViews ? ct.updateCameraProjectionMatricesUniform(t, C) : C.setValue(R, "projectionMatrix", t.projectionMatrix), k.logarithmicDepthBuffer && C.setValue(R, "logDepthBufFC", 2 / (Math.log(t.far + 1) / Math.LN2)), V !== t && (V = t, M = b = !0), n.isShaderMaterial || n.isMeshPhongMaterial || n.isMeshToonMaterial || n.isMeshStandardMaterial || n.envMap) {
3148
3148
  var E = C.map.cameraPosition;
3149
3149
  void 0 !== E && E.setValue(R, rt.setFromMatrixPosition(t.matrixWorld));
3150
3150
  }
@@ -3156,21 +3156,21 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3156
3156
  var D = A.bones;
3157
3157
  if (k.floatVertexTextures) {
3158
3158
  if (void 0 === A.boneTexture) {
3159
- var L = Math.sqrt(4 * D.length);
3160
- L = Pe.ceilPowerOfTwo(L), L = Math.max(L, 4);
3161
- var O = new Float32Array(L * L * 4);
3162
- O.set(A.boneMatrices);
3163
- var I = new wr(O, L, L, te, Zt);
3164
- A.boneMatrices = O, A.boneTexture = I, A.boneTextureSize = L;
3159
+ var O = Math.sqrt(4 * D.length);
3160
+ O = Pe.ceilPowerOfTwo(O), O = Math.max(O, 4);
3161
+ var L = new Float32Array(O * O * 4);
3162
+ L.set(A.boneMatrices);
3163
+ var I = new wr(L, O, O, te, Zt);
3164
+ A.boneMatrices = L, A.boneTexture = I, A.boneTextureSize = O;
3165
3165
  }
3166
3166
  C.setValue(R, "boneTexture", A.boneTexture, F), C.setValue(R, "boneTextureSize", A.boneTextureSize);
3167
3167
  }
3168
3168
  else
3169
3169
  C.setOptional(R, A, "boneMatrices");
3170
3170
  }
3171
- } return !b && o.receiveShadow === i.receiveShadow || (o.receiveShadow = i.receiveShadow, C.setValue(R, "receiveShadow", i.receiveShadow)), b && (C.setValue(R, "toneMappingExposure", z.toneMappingExposure), C.setValue(R, "toneMappingWhitePoint", z.toneMappingWhitePoint), o.needsLights && (_ = M, (x = T).ambientLightColor.needsUpdate = _, x.lightProbe.needsUpdate = _, x.directionalLights.needsUpdate = _, x.pointLights.needsUpdate = _, x.spotLights.needsUpdate = _, x.rectAreaLights.needsUpdate = _, x.hemisphereLights.needsUpdate = _), r && n.fog && (y = r, (v = T).fogColor.value.copy(y.color), y.isFog ? (v.fogNear.value = y.near, v.fogFar.value = y.far) : y.isFogExp2 && (v.fogDensity.value = y.density)), n.isMeshBasicMaterial ? bt(T, n) : n.isMeshLambertMaterial ? (bt(T, n), m = T, (g = n).emissiveMap && (m.emissiveMap.value = g.emissiveMap)) : n.isMeshToonMaterial ? (bt(T, n), function (t, e) { t.specular.value.copy(e.specular), t.shininess.value = Math.max(e.shininess, 1e-4), e.gradientMap && (t.gradientMap.value = e.gradientMap); e.emissiveMap && (t.emissiveMap.value = e.emissiveMap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshPhongMaterial ? (bt(T, n), function (t, e) { t.specular.value.copy(e.specular), t.shininess.value = Math.max(e.shininess, 1e-4), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshStandardMaterial ? (bt(T, n, a), (n.isMeshPhysicalMaterial ? function (t, e, n) { Mt(t, e, n), t.reflectivity.value = e.reflectivity, t.clearcoat.value = e.clearcoat, t.clearcoatRoughness.value = e.clearcoatRoughness, e.sheen && t.sheen.value.copy(e.sheen); e.clearcoatNormalMap && (t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale), t.clearcoatNormalMap.value = e.clearcoatNormalMap, e.side === St && t.clearcoatNormalScale.value.negate()); t.transparency.value = e.transparency; } : Mt)(T, n, a)) : n.isMeshMatcapMaterial ? (bt(T, n), function (t, e) { e.matcap && (t.matcap.value = e.matcap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshDepthMaterial ? (bt(T, n), p = T, (f = n).displacementMap && (p.displacementMap.value = f.displacementMap, p.displacementScale.value = f.displacementScale, p.displacementBias.value = f.displacementBias)) : n.isMeshDistanceMaterial ? (bt(T, n), function (t, e) { e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); t.referencePosition.value.copy(e.referencePosition), t.nearDistance.value = e.nearDistance, t.farDistance.value = e.farDistance; }(T, n)) : n.isMeshNormalMaterial ? (bt(T, n), function (t, e) { e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isLineBasicMaterial ? (d = n, (h = T).diffuse.value.copy(d.color), h.opacity.value = d.opacity, n.isLineDashedMaterial && (u = n, (c = T).dashSize.value = u.dashSize, c.totalSize.value = u.dashSize + u.gapSize, c.scale.value = u.scale)) : n.isPointsMaterial ? function (t, e) { t.diffuse.value.copy(e.color), t.opacity.value = e.opacity, t.size.value = e.size * q, t.scale.value = .5 * J, e.map && (t.map.value = e.map); e.alphaMap && (t.alphaMap.value = e.alphaMap); var n; e.map ? n = e.map : e.alphaMap && (n = e.alphaMap); void 0 !== n && (!0 === n.matrixAutoUpdate && n.updateMatrix(), t.uvTransform.value.copy(n.matrix)); }(T, n) : n.isSpriteMaterial ? function (t, e) { t.diffuse.value.copy(e.color), t.opacity.value = e.opacity, t.rotation.value = e.rotation, e.map && (t.map.value = e.map); e.alphaMap && (t.alphaMap.value = e.alphaMap); var n; e.map ? n = e.map : e.alphaMap && (n = e.alphaMap); void 0 !== n && (!0 === n.matrixAutoUpdate && n.updateMatrix(), t.uvTransform.value.copy(n.matrix)); }(T, n) : n.isShadowMaterial && (T.color.value.copy(n.color), T.opacity.value = n.opacity), void 0 !== T.ltc_1 && (T.ltc_1.value = Cr.LTC_1), void 0 !== T.ltc_2 && (T.ltc_2.value = Cr.LTC_2), Va.upload(R, o.uniformsList, T, F), n.isShaderMaterial && (n.uniformsNeedUpdate = !1)), n.isShaderMaterial && !0 === n.uniformsNeedUpdate && (Va.upload(R, o.uniformsList, T, F), n.uniformsNeedUpdate = !1), n.isSpriteMaterial && C.setValue(R, "center", i.center), 0 < S.numMultiviewViews ? ct.updateObjectMatricesUniforms(i, t, C) : (C.setValue(R, "modelViewMatrix", i.modelViewMatrix), C.setValue(R, "normalMatrix", i.normalMatrix)), C.setValue(R, "modelMatrix", i.matrixWorld), S; } function bt(t, e, n) { t.opacity.value = e.opacity, e.color && t.diffuse.value.copy(e.color), e.emissive && t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity), e.map && (t.map.value = e.map), e.alphaMap && (t.alphaMap.value = e.alphaMap), e.specularMap && (t.specularMap.value = e.specularMap); var i, r, a = e.envMap || n; a && (t.envMap.value = a, t.flipEnvMap.value = a.isCubeTexture ? -1 : 1, t.reflectivity.value = e.reflectivity, t.refractionRatio.value = e.refractionRatio, t.maxMipLevel.value = B.get(a).__maxMipLevel), e.lightMap && (t.lightMap.value = e.lightMap, t.lightMapIntensity.value = e.lightMapIntensity), e.aoMap && (t.aoMap.value = e.aoMap, t.aoMapIntensity.value = e.aoMapIntensity), e.map ? i = e.map : e.specularMap ? i = e.specularMap : e.displacementMap ? i = e.displacementMap : e.normalMap ? i = e.normalMap : e.bumpMap ? i = e.bumpMap : e.roughnessMap ? i = e.roughnessMap : e.metalnessMap ? i = e.metalnessMap : e.alphaMap ? i = e.alphaMap : e.emissiveMap && (i = e.emissiveMap), void 0 !== i && (i.isWebGLRenderTarget && (i = i.texture), !0 === i.matrixAutoUpdate && i.updateMatrix(), t.uvTransform.value.copy(i.matrix)), e.aoMap ? r = e.aoMap : e.lightMap && (r = e.lightMap), void 0 !== r && (r.isWebGLRenderTarget && (r = r.texture), !0 === r.matrixAutoUpdate && r.updateMatrix(), t.uv2Transform.value.copy(r.matrix)); } function Mt(t, e, n) { t.roughness.value = e.roughness, t.metalness.value = e.metalness, e.roughnessMap && (t.roughnessMap.value = e.roughnessMap), e.metalnessMap && (t.metalnessMap.value = e.metalnessMap), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap), e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)), e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()), e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias), (e.envMap || n) && (t.envMapIntensity.value = e.envMapIntensity); } vt.setAnimationLoop(function (t) { lt.isPresenting || gt && gt(t); }), "undefined" != typeof window && vt.setContext(window), this.setAnimationLoop = function (t) { gt = t, lt.setAnimationLoop(t), vt.start(); }, this.render = function (t, e) { var n, i; if (void 0 !== arguments[2] && (console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."), n = arguments[2]), void 0 !== arguments[3] && (console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."), i = arguments[3]), e && e.isCamera) {
3171
+ } return !b && o.receiveShadow === i.receiveShadow || (o.receiveShadow = i.receiveShadow, C.setValue(R, "receiveShadow", i.receiveShadow)), b && (C.setValue(R, "toneMappingExposure", z.toneMappingExposure), C.setValue(R, "toneMappingWhitePoint", z.toneMappingWhitePoint), o.needsLights && (_ = M, (x = T).ambientLightColor.needsUpdate = _, x.lightProbe.needsUpdate = _, x.directionalLights.needsUpdate = _, x.pointLights.needsUpdate = _, x.spotLights.needsUpdate = _, x.rectAreaLights.needsUpdate = _, x.hemisphereLights.needsUpdate = _), r && n.fog && (y = r, (v = T).fogColor.value.copy(y.color), y.isFog ? (v.fogNear.value = y.near, v.fogFar.value = y.far) : y.isFogExp2 && (v.fogDensity.value = y.density)), n.isMeshBasicMaterial ? bt(T, n) : n.isMeshLambertMaterial ? (bt(T, n), m = T, (g = n).emissiveMap && (m.emissiveMap.value = g.emissiveMap)) : n.isMeshToonMaterial ? (bt(T, n), function (t, e) { t.specular.value.copy(e.specular), t.shininess.value = Math.max(e.shininess, 1e-4), e.gradientMap && (t.gradientMap.value = e.gradientMap); e.emissiveMap && (t.emissiveMap.value = e.emissiveMap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshPhongMaterial ? (bt(T, n), function (t, e) { t.specular.value.copy(e.specular), t.shininess.value = Math.max(e.shininess, 1e-4), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshStandardMaterial ? (bt(T, n, a), (n.isMeshPhysicalMaterial ? function (t, e, n) { Mt(t, e, n), t.reflectivity.value = e.reflectivity, t.clearcoat.value = e.clearcoat, t.clearcoatRoughness.value = e.clearcoatRoughness, e.sheen && t.sheen.value.copy(e.sheen); e.clearcoatNormalMap && (t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale), t.clearcoatNormalMap.value = e.clearcoatNormalMap, e.side === St && t.clearcoatNormalScale.value.negate()); t.transparency.value = e.transparency; } : Mt)(T, n, a)) : n.isMeshMatcapMaterial ? (bt(T, n), function (t, e) { e.matcap && (t.matcap.value = e.matcap); e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isMeshDepthMaterial ? (bt(T, n), p = T, (f = n).displacementMap && (p.displacementMap.value = f.displacementMap, p.displacementScale.value = f.displacementScale, p.displacementBias.value = f.displacementBias)) : n.isMeshDistanceMaterial ? (bt(T, n), function (t, e) { e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); t.referencePosition.value.copy(e.referencePosition), t.nearDistance.value = e.nearDistance, t.farDistance.value = e.farDistance; }(T, n)) : n.isMeshNormalMaterial ? (bt(T, n), function (t, e) { e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)); e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()); e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias); }(T, n)) : n.isLineBasicMaterial ? (d = n, (h = T).diffuse.value.copy(d.color), h.opacity.value = d.opacity, n.isLineDashedMaterial && (u = n, (c = T).dashSize.value = u.dashSize, c.totalSize.value = u.dashSize + u.gapSize, c.scale.value = u.scale)) : n.isPointsMaterial ? function (t, e) { t.diffuse.value.copy(e.color), t.opacity.value = e.opacity, t.size.value = e.size * q, t.scale.value = .5 * J, e.map && (t.map.value = e.map); e.alphaMap && (t.alphaMap.value = e.alphaMap); var n; e.map ? n = e.map : e.alphaMap && (n = e.alphaMap); void 0 !== n && (!0 === n.matrixAutoUpdate && n.updateMatrix(), t.uvTransform.value.copy(n.matrix)); }(T, n) : n.isSpriteMaterial ? function (t, e) { t.diffuse.value.copy(e.color), t.opacity.value = e.opacity, t.rotation.value = e.rotation, e.map && (t.map.value = e.map); e.alphaMap && (t.alphaMap.value = e.alphaMap); var n; e.map ? n = e.map : e.alphaMap && (n = e.alphaMap); void 0 !== n && (!0 === n.matrixAutoUpdate && n.updateMatrix(), t.uvTransform.value.copy(n.matrix)); }(T, n) : n.isShadowMaterial && (T.color.value.copy(n.color), T.opacity.value = n.opacity), void 0 !== T.ltc_1 && (T.ltc_1.value = Cr.LTC_1), void 0 !== T.ltc_2 && (T.ltc_2.value = Cr.LTC_2), ja.upload(R, o.uniformsList, T, F), n.isShaderMaterial && (n.uniformsNeedUpdate = !1)), n.isShaderMaterial && !0 === n.uniformsNeedUpdate && (ja.upload(R, o.uniformsList, T, F), n.uniformsNeedUpdate = !1), n.isSpriteMaterial && C.setValue(R, "center", i.center), 0 < S.numMultiviewViews ? ct.updateObjectMatricesUniforms(i, t, C) : (C.setValue(R, "modelViewMatrix", i.modelViewMatrix), C.setValue(R, "normalMatrix", i.normalMatrix)), C.setValue(R, "modelMatrix", i.matrixWorld), S; } function bt(t, e, n) { t.opacity.value = e.opacity, e.color && t.diffuse.value.copy(e.color), e.emissive && t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity), e.map && (t.map.value = e.map), e.alphaMap && (t.alphaMap.value = e.alphaMap), e.specularMap && (t.specularMap.value = e.specularMap); var i, r, a = e.envMap || n; a && (t.envMap.value = a, t.flipEnvMap.value = a.isCubeTexture ? -1 : 1, t.reflectivity.value = e.reflectivity, t.refractionRatio.value = e.refractionRatio, t.maxMipLevel.value = B.get(a).__maxMipLevel), e.lightMap && (t.lightMap.value = e.lightMap, t.lightMapIntensity.value = e.lightMapIntensity), e.aoMap && (t.aoMap.value = e.aoMap, t.aoMapIntensity.value = e.aoMapIntensity), e.map ? i = e.map : e.specularMap ? i = e.specularMap : e.displacementMap ? i = e.displacementMap : e.normalMap ? i = e.normalMap : e.bumpMap ? i = e.bumpMap : e.roughnessMap ? i = e.roughnessMap : e.metalnessMap ? i = e.metalnessMap : e.alphaMap ? i = e.alphaMap : e.emissiveMap && (i = e.emissiveMap), void 0 !== i && (i.isWebGLRenderTarget && (i = i.texture), !0 === i.matrixAutoUpdate && i.updateMatrix(), t.uvTransform.value.copy(i.matrix)), e.aoMap ? r = e.aoMap : e.lightMap && (r = e.lightMap), void 0 !== r && (r.isWebGLRenderTarget && (r = r.texture), !0 === r.matrixAutoUpdate && r.updateMatrix(), t.uv2Transform.value.copy(r.matrix)); } function Mt(t, e, n) { t.roughness.value = e.roughness, t.metalness.value = e.metalness, e.roughnessMap && (t.roughnessMap.value = e.roughnessMap), e.metalnessMap && (t.metalnessMap.value = e.metalnessMap), e.emissiveMap && (t.emissiveMap.value = e.emissiveMap), e.bumpMap && (t.bumpMap.value = e.bumpMap, t.bumpScale.value = e.bumpScale, e.side === St && (t.bumpScale.value *= -1)), e.normalMap && (t.normalMap.value = e.normalMap, t.normalScale.value.copy(e.normalScale), e.side === St && t.normalScale.value.negate()), e.displacementMap && (t.displacementMap.value = e.displacementMap, t.displacementScale.value = e.displacementScale, t.displacementBias.value = e.displacementBias), (e.envMap || n) && (t.envMapIntensity.value = e.envMapIntensity); } vt.setAnimationLoop(function (t) { lt.isPresenting || gt && gt(t); }), "undefined" != typeof window && vt.setContext(window), this.setAnimationLoop = function (t) { gt = t, lt.setAnimationLoop(t), vt.start(); }, this.render = function (t, e) { var n, i; if (void 0 !== arguments[2] && (console.warn("THREE.WebGLRenderer.render(): the renderTarget argument has been removed. Use .setRenderTarget() instead."), n = arguments[2]), void 0 !== arguments[3] && (console.warn("THREE.WebGLRenderer.render(): the forceClear argument has been removed. Use .clear() instead."), i = arguments[3]), e && e.isCamera) {
3172
3172
  if (!x) {
3173
- O.geometry = null, O.program = null, O.wireframe = !1, V = -1, !(U = null) === t.autoUpdate && t.updateMatrixWorld(), null === e.parent && e.updateMatrixWorld(), lt.enabled && lt.isPresenting && (e = lt.getCamera(e)), (P = d.get(t, e)).init(), t.onBeforeRender(z, t, e, n || D), it.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), Q.setFromProjectionMatrix(it), nt = this.localClippingEnabled, et = tt.init(this.clippingPlanes, nt, e), (f = h.get(t, e)).init(), function t(e, n, i, r) { if (!1 === e.visible)
3173
+ L.geometry = null, L.program = null, L.wireframe = !1, j = -1, !(V = null) === t.autoUpdate && t.updateMatrixWorld(), null === e.parent && e.updateMatrixWorld(), lt.enabled && lt.isPresenting && (e = lt.getCamera(e)), (P = d.get(t, e)).init(), t.onBeforeRender(z, t, e, n || D), it.multiplyMatrices(e.projectionMatrix, e.matrixWorldInverse), Q.setFromProjectionMatrix(it), nt = this.localClippingEnabled, et = tt.init(this.clippingPlanes, nt, e), (f = h.get(t, e)).init(), function t(e, n, i, r) { if (!1 === e.visible)
3174
3174
  return; var a = e.layers.test(n.layers); if (a)
3175
3175
  if (e.isGroup)
3176
3176
  i = e.renderOrder;
@@ -3214,17 +3214,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3214
3214
  else
3215
3215
  console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera."); }, this.setFramebuffer = function (t) { _ !== t && null === D && R.bindFramebuffer(36160, t), _ = t; }, this.getActiveCubeFace = function () { return w; }, this.getActiveMipmapLevel = function () { return b; }, this.getRenderTarget = function () { return D; }, this.setRenderTarget = function (t, e, n) { w = e, b = n, (D = t) && void 0 === B.get(t).__webglFramebuffer && F.setupRenderTarget(t); var i = _, r = !1; if (t) {
3216
3216
  var a = B.get(t).__webglFramebuffer;
3217
- t.isWebGLCubeRenderTarget ? (i = a[e || 0], r = !0) : i = t.isWebGLMultisampleRenderTarget ? B.get(t).__webglMultisampledFramebuffer : a, j.copy(t.viewport), G.copy(t.scissor), H = t.scissorTest;
3217
+ t.isWebGLCubeRenderTarget ? (i = a[e || 0], r = !0) : i = t.isWebGLMultisampleRenderTarget ? B.get(t).__webglMultisampledFramebuffer : a, U.copy(t.viewport), G.copy(t.scissor), H = t.scissorTest;
3218
3218
  }
3219
3219
  else
3220
- j.copy(Z).multiplyScalar(q).floor(), G.copy($).multiplyScalar(q).floor(), H = K; if (L !== i && (R.bindFramebuffer(36160, i), L = i), N.viewport(j), N.scissor(G), N.setScissorTest(H), r) {
3220
+ U.copy(Z).multiplyScalar(q).floor(), G.copy($).multiplyScalar(q).floor(), H = K; if (O !== i && (R.bindFramebuffer(36160, i), O = i), N.viewport(U), N.scissor(G), N.setScissorTest(H), r) {
3221
3221
  var o = B.get(t.texture);
3222
3222
  R.framebufferTexture2D(36160, 36064, 34069 + (e || 0), o.__webglTexture, n || 0);
3223
3223
  } }, this.readRenderTargetPixels = function (t, e, n, i, r, a, o) { if (t && t.isWebGLRenderTarget) {
3224
3224
  var s = B.get(t).__webglFramebuffer;
3225
3225
  if (t.isWebGLCubeRenderTarget && void 0 !== o && (s = s[o]), s) {
3226
3226
  var l = !1;
3227
- s !== L && (R.bindFramebuffer(36160, s), l = !0);
3227
+ s !== O && (R.bindFramebuffer(36160, s), l = !0);
3228
3228
  try {
3229
3229
  var c = t.texture, u = c.format, h = c.type;
3230
3230
  if (u !== te && y.convert(u) !== R.getParameter(35739))
@@ -3234,30 +3234,30 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3234
3234
  36053 === R.checkFramebufferStatus(36160) ? 0 <= e && e <= t.width - i && 0 <= n && n <= t.height - r && R.readPixels(e, n, i, r, y.convert(u), y.convert(h), a) : console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.");
3235
3235
  }
3236
3236
  finally {
3237
- l && R.bindFramebuffer(36160, L);
3237
+ l && R.bindFramebuffer(36160, O);
3238
3238
  }
3239
3239
  }
3240
3240
  }
3241
3241
  else
3242
3242
  console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget."); }, this.copyFramebufferToTexture = function (t, e, n) { void 0 === n && (n = 0); var i = Math.pow(2, -n), r = Math.floor(e.image.width * i), a = Math.floor(e.image.height * i), o = y.convert(e.format); F.setTexture2D(e, 0), R.copyTexImage2D(3553, n, o, t.x, t.y, r, a, 0), N.unbindTexture(); }, this.copyTextureToTexture = function (t, e, n, i) { var r = e.image.width, a = e.image.height, o = y.convert(n.format), s = y.convert(n.type); F.setTexture2D(n, 0), e.isDataTexture ? R.texSubImage2D(3553, i || 0, t.x, t.y, r, a, o, s, e.image.data) : R.texSubImage2D(3553, i || 0, t.x, t.y, o, s, e.image), N.unbindTexture(); }, this.initTexture = function (t) { F.setTexture2D(t, 0), N.unbindTexture(); }, "undefined" != typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this })); }
3243
- function Lo(t, e) { this.name = "", this.color = new ci(t), this.density = void 0 !== e ? e : 25e-5; }
3244
- function Oo(t, e, n) { this.name = "", this.color = new ci(t), this.near = void 0 !== e ? e : 1, this.far = void 0 !== n ? n : 1e3; }
3243
+ function Oo(t, e) { this.name = "", this.color = new ci(t), this.density = void 0 !== e ? e : 25e-5; }
3244
+ function Lo(t, e, n) { this.name = "", this.color = new ci(t), this.near = void 0 !== e ? e : 1, this.far = void 0 !== n ? n : 1e3; }
3245
3245
  function Io(t, e) { this.array = t, this.stride = e, this.count = void 0 !== t ? t.length / e : 0, this.usage = Ee, this.updateRange = { offset: 0, count: -1 }, this.version = 0; }
3246
- So.prototype = Object.assign(Object.create(Ve.prototype), { constructor: So, isWebGLMultiviewRenderTarget: !0, copy: function (t) { return Ve.prototype.copy.call(this, t), this.numViews = t.numViews, this; }, setNumViews: function (t) { return this.numViews !== t && (this.numViews = t, this.dispose()), this; } }), To.prototype = Object.assign(Object.create(yr.prototype), { constructor: To, isArrayCamera: !0 }), Eo.prototype = Object.assign(Object.create(yn.prototype), { constructor: Eo, isGroup: !0 }), Object.assign(Ao.prototype, De.prototype), Object.assign(Lo.prototype, { isFogExp2: !0, clone: function () { return new Lo(this.color, this.density); }, toJSON: function () { return { type: "FogExp2", color: this.color.getHex(), density: this.density }; } }), Object.assign(Oo.prototype, { isFog: !0, clone: function () { return new Oo(this.color, this.near, this.far); }, toJSON: function () { return { type: "Fog", color: this.color.getHex(), near: this.near, far: this.far }; } }), Object.defineProperty(Io.prototype, "needsUpdate", { set: function (t) { !0 === t && this.version++; } }), Object.assign(Io.prototype, { isInterleavedBuffer: !0, onUploadCallback: function () { }, setUsage: function (t) { return this.usage = t, this; }, copy: function (t) { return this.array = new t.array.constructor(t.array), this.count = t.count, this.stride = t.stride, this.usage = t.usage, this; }, copyAt: function (t, e, n) { t *= this.stride, n *= e.stride; for (var i = 0, r = this.stride; i < r; i++)
3246
+ So.prototype = Object.assign(Object.create(je.prototype), { constructor: So, isWebGLMultiviewRenderTarget: !0, copy: function (t) { return je.prototype.copy.call(this, t), this.numViews = t.numViews, this; }, setNumViews: function (t) { return this.numViews !== t && (this.numViews = t, this.dispose()), this; } }), To.prototype = Object.assign(Object.create(yr.prototype), { constructor: To, isArrayCamera: !0 }), Eo.prototype = Object.assign(Object.create(yn.prototype), { constructor: Eo, isGroup: !0 }), Object.assign(Ao.prototype, De.prototype), Object.assign(Oo.prototype, { isFogExp2: !0, clone: function () { return new Oo(this.color, this.density); }, toJSON: function () { return { type: "FogExp2", color: this.color.getHex(), density: this.density }; } }), Object.assign(Lo.prototype, { isFog: !0, clone: function () { return new Lo(this.color, this.near, this.far); }, toJSON: function () { return { type: "Fog", color: this.color.getHex(), near: this.near, far: this.far }; } }), Object.defineProperty(Io.prototype, "needsUpdate", { set: function (t) { !0 === t && this.version++; } }), Object.assign(Io.prototype, { isInterleavedBuffer: !0, onUploadCallback: function () { }, setUsage: function (t) { return this.usage = t, this; }, copy: function (t) { return this.array = new t.array.constructor(t.array), this.count = t.count, this.stride = t.stride, this.usage = t.usage, this; }, copyAt: function (t, e, n) { t *= this.stride, n *= e.stride; for (var i = 0, r = this.stride; i < r; i++)
3247
3247
  this.array[t + i] = e.array[n + i]; return this; }, set: function (t, e) { return void 0 === e && (e = 0), this.array.set(t, e), this; }, clone: function () { return (new this.constructor).copy(this); }, onUpload: function (t) { return this.onUploadCallback = t, this; } });
3248
3248
  var Po, Ro = new We;
3249
3249
  function ko(t, e, n, i) { this.data = t, this.itemSize = e, this.offset = n, this.normalized = !0 === i; }
3250
3250
  function No(t) { mi.call(this), this.type = "SpriteMaterial", this.color = new ci(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.setValues(t); }
3251
3251
  Object.defineProperties(ko.prototype, { count: { get: function () { return this.data.count; } }, array: { get: function () { return this.data.array; } } }), Object.assign(ko.prototype, { isInterleavedBufferAttribute: !0, applyMatrix4: function (t) { for (var e = 0, n = this.data.count; e < n; e++)
3252
3252
  Ro.x = this.getX(e), Ro.y = this.getY(e), Ro.z = this.getZ(e), Ro.applyMatrix4(t), this.setXYZ(e, Ro.x, Ro.y, Ro.z); return this; }, setX: function (t, e) { return this.data.array[t * this.data.stride + this.offset] = e, this; }, setY: function (t, e) { return this.data.array[t * this.data.stride + this.offset + 1] = e, this; }, setZ: function (t, e) { return this.data.array[t * this.data.stride + this.offset + 2] = e, this; }, setW: function (t, e) { return this.data.array[t * this.data.stride + this.offset + 3] = e, this; }, getX: function (t) { return this.data.array[t * this.data.stride + this.offset]; }, getY: function (t) { return this.data.array[t * this.data.stride + this.offset + 1]; }, getZ: function (t) { return this.data.array[t * this.data.stride + this.offset + 2]; }, getW: function (t) { return this.data.array[t * this.data.stride + this.offset + 3]; }, setXY: function (t, e, n) { return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = n, this; }, setXYZ: function (t, e, n, i) { return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = n, this.data.array[t + 2] = i, this; }, setXYZW: function (t, e, n, i, r) { return t = t * this.data.stride + this.offset, this.data.array[t + 0] = e, this.data.array[t + 1] = n, this.data.array[t + 2] = i, this.data.array[t + 3] = r, this; } }), ((No.prototype = Object.create(mi.prototype)).constructor = No).prototype.isSpriteMaterial = !0, No.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.alphaMap = t.alphaMap, this.rotation = t.rotation, this.sizeAttenuation = t.sizeAttenuation, this; };
3253
- var Bo = new We, Fo = new We, zo = new We, Vo = new Re, Uo = new Re, jo = new Qe, Go = new We, Ho = new We, Wo = new We, Jo = new Re, qo = new Re, Xo = new Re;
3253
+ var Bo = new We, Fo = new We, zo = new We, jo = new Re, Vo = new Re, Uo = new Qe, Go = new We, Ho = new We, Wo = new We, Jo = new Re, qo = new Re, Xo = new Re;
3254
3254
  function Yo(t) { if (yn.call(this), this.type = "Sprite", void 0 === Po) {
3255
3255
  Po = new Bi;
3256
3256
  var e = new Io(new Float32Array([-.5, -.5, 0, 0, 0, .5, -.5, 0, 1, 0, .5, .5, 0, 1, 1, -.5, .5, 0, 0, 1]), 5);
3257
3257
  Po.setIndex([0, 1, 2, 0, 2, 3]), Po.setAttribute("position", new ko(e, 3, 0, !1)), Po.setAttribute("uv", new ko(e, 2, 3, !1));
3258
3258
  } this.geometry = Po, this.material = void 0 !== t ? t : new No, this.center = new Re(.5, .5); }
3259
- function Zo(t, e, n, i, r, a) { Vo.subVectors(t, n).addScalar(.5).multiply(i), void 0 !== r ? (Uo.x = a * Vo.x - r * Vo.y, Uo.y = r * Vo.x + a * Vo.y) : Uo.copy(Vo), t.copy(e), t.x += Uo.x, t.y += Uo.y, t.applyMatrix4(jo); }
3260
- Yo.prototype = Object.assign(Object.create(yn.prototype), { constructor: Yo, isSprite: !0, raycast: function (t, e) { null === t.camera && console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'), Fo.setFromMatrixScale(this.matrixWorld), jo.copy(t.camera.matrixWorld), this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse, this.matrixWorld), zo.setFromMatrixPosition(this.modelViewMatrix), t.camera.isPerspectiveCamera && !1 === this.material.sizeAttenuation && Fo.multiplyScalar(-zo.z); var n, i, r = this.material.rotation; 0 !== r && (i = Math.cos(r), n = Math.sin(r)); var a = this.center; Zo(Go.set(-.5, -.5, 0), zo, a, Fo, n, i), Zo(Ho.set(.5, -.5, 0), zo, a, Fo, n, i), Zo(Wo.set(.5, .5, 0), zo, a, Fo, n, i), Jo.set(0, 0), qo.set(1, 0), Xo.set(1, 1); var o = t.ray.intersectTriangle(Go, Ho, Wo, !1, Bo); if (null !== o || (Zo(Ho.set(-.5, .5, 0), zo, a, Fo, n, i), qo.set(0, 1), null !== (o = t.ray.intersectTriangle(Go, Wo, Ho, !1, Bo)))) {
3259
+ function Zo(t, e, n, i, r, a) { jo.subVectors(t, n).addScalar(.5).multiply(i), void 0 !== r ? (Vo.x = a * jo.x - r * jo.y, Vo.y = r * jo.x + a * jo.y) : Vo.copy(jo), t.copy(e), t.x += Vo.x, t.y += Vo.y, t.applyMatrix4(Uo); }
3260
+ Yo.prototype = Object.assign(Object.create(yn.prototype), { constructor: Yo, isSprite: !0, raycast: function (t, e) { null === t.camera && console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'), Fo.setFromMatrixScale(this.matrixWorld), Uo.copy(t.camera.matrixWorld), this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse, this.matrixWorld), zo.setFromMatrixPosition(this.modelViewMatrix), t.camera.isPerspectiveCamera && !1 === this.material.sizeAttenuation && Fo.multiplyScalar(-zo.z); var n, i, r = this.material.rotation; 0 !== r && (i = Math.cos(r), n = Math.sin(r)); var a = this.center; Zo(Go.set(-.5, -.5, 0), zo, a, Fo, n, i), Zo(Ho.set(.5, -.5, 0), zo, a, Fo, n, i), Zo(Wo.set(.5, .5, 0), zo, a, Fo, n, i), Jo.set(0, 0), qo.set(1, 0), Xo.set(1, 1); var o = t.ray.intersectTriangle(Go, Ho, Wo, !1, Bo); if (null !== o || (Zo(Ho.set(-.5, .5, 0), zo, a, Fo, n, i), qo.set(0, 1), null !== (o = t.ray.intersectTriangle(Go, Wo, Ho, !1, Bo)))) {
3261
3261
  var s = t.ray.origin.distanceTo(Bo);
3262
3262
  s < t.near || s > t.far || e.push({ distance: s, point: Bo.clone(), uv: ai.getUV(Bo, Go, Ho, Wo, Jo, qo, Xo, new Re), face: null, object: this });
3263
3263
  } }, clone: function () { return new this.constructor(this.material).copy(this); }, copy: function (t) { return yn.prototype.copy.call(this, t), void 0 !== t.center && this.center.copy(t.center), this; } });
@@ -3392,9 +3392,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3392
3392
  } }
3393
3393
  function As(t, e, n, i, r, a, o, s, l) { Fe.call(this, t, e, n, i, r, a, o, s, l), this.format = void 0 !== o ? o : Qt, this.minFilter = void 0 !== a ? a : Ht, this.magFilter = void 0 !== r ? r : Ht, this.generateMipmaps = !1; }
3394
3394
  function Ds(t, e, n, i, r, a, o, s, l, c, u, h) { Fe.call(this, null, a, o, s, l, c, i, r, u, h), this.image = { width: e, height: n }, this.mipmaps = t, this.flipY = !1, this.generateMipmaps = !1; }
3395
- function Ls(t, e, n, i, r, a, o, s, l) { Fe.call(this, t, e, n, i, r, a, o, s, l), this.needsUpdate = !0; }
3396
- function Os(t, e, n, i, r, a, o, s, l, c) { if ((c = void 0 !== c ? c : ee) !== ee && c !== ne)
3397
- throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat"); void 0 === n && c === ee && (n = Xt), void 0 === n && c === ne && (n = Kt), Fe.call(this, null, i, r, a, o, s, c, n, l), this.image = { width: t, height: e }, this.magFilter = void 0 !== o ? o : Ut, this.minFilter = void 0 !== s ? s : Ut, this.flipY = !1, this.generateMipmaps = !1; }
3395
+ function Os(t, e, n, i, r, a, o, s, l) { Fe.call(this, t, e, n, i, r, a, o, s, l), this.needsUpdate = !0; }
3396
+ function Ls(t, e, n, i, r, a, o, s, l, c) { if ((c = void 0 !== c ? c : ee) !== ee && c !== ne)
3397
+ throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat"); void 0 === n && c === ee && (n = Xt), void 0 === n && c === ne && (n = Kt), Fe.call(this, null, i, r, a, o, s, c, n, l), this.image = { width: t, height: e }, this.magFilter = void 0 !== o ? o : Vt, this.minFilter = void 0 !== s ? s : Vt, this.flipY = !1, this.generateMipmaps = !1; }
3398
3398
  function Is(t) { Bi.call(this), this.type = "WireframeGeometry"; var e, n, i, r, a, o, s, l, c, u, h = [], d = [0, 0], p = {}, f = ["a", "b", "c"]; if (t && t.isGeometry) {
3399
3399
  var m = t.faces;
3400
3400
  for (e = 0, i = m.length; e < i; e++) {
@@ -3458,10 +3458,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3458
3458
  } }(); }(), this.setAttribute("position", new Ti(u, 3)), this.setAttribute("normal", new Ti(u.slice(), 3)), this.setAttribute("uv", new Ti(h, 2)), 0 === e ? this.computeVertexNormals() : this.normalizeNormals(); }
3459
3459
  function Bs(t, e) { lr.call(this), this.type = "TetrahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new Fs(t, e)), this.mergeVertices(); }
3460
3460
  function Fs(t, e) { Ns.call(this, [1, 1, 1, -1, -1, 1, -1, 1, -1, 1, -1, -1], [2, 1, 0, 0, 3, 2, 1, 3, 0, 2, 3, 1], t, e), this.type = "TetrahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3461
- function zs(t, e) { lr.call(this), this.type = "OctahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new Vs(t, e)), this.mergeVertices(); }
3462
- function Vs(t, e) { Ns.call(this, [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2], t, e), this.type = "OctahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3463
- function Us(t, e) { lr.call(this), this.type = "IcosahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new js(t, e)), this.mergeVertices(); }
3464
- function js(t, e) { var n = (1 + Math.sqrt(5)) / 2; Ns.call(this, [-1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, 0, 0, -1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, n, 0, -1, n, 0, 1, -n, 0, -1, -n, 0, 1], [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1], t, e), this.type = "IcosahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3461
+ function zs(t, e) { lr.call(this), this.type = "OctahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new js(t, e)), this.mergeVertices(); }
3462
+ function js(t, e) { Ns.call(this, [1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1, 0, 0, 0, 1, 0, 0, -1], [0, 2, 4, 0, 4, 3, 0, 3, 5, 0, 5, 2, 1, 2, 5, 1, 5, 3, 1, 3, 4, 1, 4, 2], t, e), this.type = "OctahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3463
+ function Vs(t, e) { lr.call(this), this.type = "IcosahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new Us(t, e)), this.mergeVertices(); }
3464
+ function Us(t, e) { var n = (1 + Math.sqrt(5)) / 2; Ns.call(this, [-1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, 0, 0, -1, n, 0, 1, n, 0, -1, -n, 0, 1, -n, n, 0, -1, n, 0, 1, -n, 0, -1, -n, 0, 1], [0, 11, 5, 0, 5, 1, 0, 1, 7, 0, 7, 10, 0, 10, 11, 1, 5, 9, 5, 11, 4, 11, 10, 2, 10, 7, 6, 7, 1, 8, 3, 9, 4, 3, 4, 2, 3, 2, 6, 3, 6, 8, 3, 8, 9, 4, 9, 5, 2, 4, 11, 6, 2, 10, 8, 6, 7, 9, 8, 1], t, e), this.type = "IcosahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3465
3465
  function Gs(t, e) { lr.call(this), this.type = "DodecahedronGeometry", this.parameters = { radius: t, detail: e }, this.fromBufferGeometry(new Hs(t, e)), this.mergeVertices(); }
3466
3466
  function Hs(t, e) { var n = (1 + Math.sqrt(5)) / 2, i = 1 / n; Ns.call(this, [-1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 0, -i, -n, 0, -i, n, 0, i, -n, 0, i, n, -i, -n, 0, -i, n, 0, i, -n, 0, i, n, 0, -n, 0, -i, n, 0, -i, -n, 0, i, n, 0, i], [3, 11, 7, 3, 7, 15, 3, 15, 13, 7, 19, 17, 7, 17, 6, 7, 6, 15, 17, 4, 8, 17, 8, 10, 17, 10, 6, 8, 0, 16, 8, 16, 2, 8, 2, 10, 0, 12, 1, 0, 1, 18, 0, 18, 16, 6, 10, 2, 6, 2, 13, 6, 13, 15, 2, 16, 18, 2, 18, 3, 2, 3, 13, 18, 1, 9, 18, 9, 11, 18, 11, 3, 4, 14, 12, 4, 12, 0, 4, 0, 8, 11, 9, 5, 11, 5, 19, 11, 19, 7, 19, 5, 14, 19, 14, 4, 19, 4, 17, 1, 12, 14, 1, 14, 5, 1, 5, 9], t, e), this.type = "DodecahedronBufferGeometry", this.parameters = { radius: t, detail: e }; }
3467
3467
  function Ws(t, e, n, i, r, a) { lr.call(this), this.type = "TubeGeometry", this.parameters = { path: t, tubularSegments: e, radius: n, radialSegments: i, closed: r }, void 0 !== a && console.warn("THREE.TubeGeometry: taper has been removed."); var o = new Js(t, e, n, i, r); this.tangents = o.tangents, this.normals = o.normals, this.binormals = o.binormals, this.fromBufferGeometry(o), this.mergeVertices(); }
@@ -3531,7 +3531,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3531
3531
  else {
3532
3532
  var s = i.morphTargets;
3533
3533
  void 0 !== s && 0 < s.length && console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.");
3534
- } }, clone: function () { return new this.constructor(this.geometry, this.material).copy(this); } }), As.prototype = Object.assign(Object.create(Fe.prototype), { constructor: As, isVideoTexture: !0, update: function () { var t = this.image; t.readyState >= t.HAVE_CURRENT_DATA && (this.needsUpdate = !0); } }), ((Ds.prototype = Object.create(Fe.prototype)).constructor = Ds).prototype.isCompressedTexture = !0, ((Ls.prototype = Object.create(Fe.prototype)).constructor = Ls).prototype.isCanvasTexture = !0, ((Os.prototype = Object.create(Fe.prototype)).constructor = Os).prototype.isDepthTexture = !0, (Is.prototype = Object.create(Bi.prototype)).constructor = Is, (Ps.prototype = Object.create(lr.prototype)).constructor = Ps, (Rs.prototype = Object.create(Bi.prototype)).constructor = Rs, (ks.prototype = Object.create(lr.prototype)).constructor = ks, (Ns.prototype = Object.create(Bi.prototype)).constructor = Ns, (Bs.prototype = Object.create(lr.prototype)).constructor = Bs, (Fs.prototype = Object.create(Ns.prototype)).constructor = Fs, (zs.prototype = Object.create(lr.prototype)).constructor = zs, (Vs.prototype = Object.create(Ns.prototype)).constructor = Vs, (Us.prototype = Object.create(lr.prototype)).constructor = Us, (js.prototype = Object.create(Ns.prototype)).constructor = js, (Gs.prototype = Object.create(lr.prototype)).constructor = Gs, (Hs.prototype = Object.create(Ns.prototype)).constructor = Hs, (Ws.prototype = Object.create(lr.prototype)).constructor = Ws, ((Js.prototype = Object.create(Bi.prototype)).constructor = Js).prototype.toJSON = function () { var t = Bi.prototype.toJSON.call(this); return t.path = this.parameters.path.toJSON(), t; }, (qs.prototype = Object.create(lr.prototype)).constructor = qs, (Xs.prototype = Object.create(Bi.prototype)).constructor = Xs, (Ys.prototype = Object.create(lr.prototype)).constructor = Ys, (Zs.prototype = Object.create(Bi.prototype)).constructor = Zs;
3534
+ } }, clone: function () { return new this.constructor(this.geometry, this.material).copy(this); } }), As.prototype = Object.assign(Object.create(Fe.prototype), { constructor: As, isVideoTexture: !0, update: function () { var t = this.image; t.readyState >= t.HAVE_CURRENT_DATA && (this.needsUpdate = !0); } }), ((Ds.prototype = Object.create(Fe.prototype)).constructor = Ds).prototype.isCompressedTexture = !0, ((Os.prototype = Object.create(Fe.prototype)).constructor = Os).prototype.isCanvasTexture = !0, ((Ls.prototype = Object.create(Fe.prototype)).constructor = Ls).prototype.isDepthTexture = !0, (Is.prototype = Object.create(Bi.prototype)).constructor = Is, (Ps.prototype = Object.create(lr.prototype)).constructor = Ps, (Rs.prototype = Object.create(Bi.prototype)).constructor = Rs, (ks.prototype = Object.create(lr.prototype)).constructor = ks, (Ns.prototype = Object.create(Bi.prototype)).constructor = Ns, (Bs.prototype = Object.create(lr.prototype)).constructor = Bs, (Fs.prototype = Object.create(Ns.prototype)).constructor = Fs, (zs.prototype = Object.create(lr.prototype)).constructor = zs, (js.prototype = Object.create(Ns.prototype)).constructor = js, (Vs.prototype = Object.create(lr.prototype)).constructor = Vs, (Us.prototype = Object.create(Ns.prototype)).constructor = Us, (Gs.prototype = Object.create(lr.prototype)).constructor = Gs, (Hs.prototype = Object.create(Ns.prototype)).constructor = Hs, (Ws.prototype = Object.create(lr.prototype)).constructor = Ws, ((Js.prototype = Object.create(Bi.prototype)).constructor = Js).prototype.toJSON = function () { var t = Bi.prototype.toJSON.call(this); return t.path = this.parameters.path.toJSON(), t; }, (qs.prototype = Object.create(lr.prototype)).constructor = qs, (Xs.prototype = Object.create(Bi.prototype)).constructor = Xs, (Ys.prototype = Object.create(lr.prototype)).constructor = Ys, (Zs.prototype = Object.create(Bi.prototype)).constructor = Zs;
3535
3535
  var $s = function (t, e, n) { n = n || 2; var i, r, a, o, s, l, c, u = e && e.length, h = u ? e[0] * n : t.length, d = Ks(t, 0, h, n, !0), p = []; if (!d || d.next === d.prev)
3536
3536
  return p; if (u && (d = function (t, e, n, i) { var r, a, o, s, l, c = []; for (r = 0, a = e.length; r < a; r++)
3537
3537
  o = e[r] * i, s = r < a - 1 ? e[r + 1] * i : t.length, (l = Ks(t, o, s, i, !1)) === l.next && (l.steiner = !0), c.push(ll(l)); for (c.sort(al), r = 0; r < c.length; r++)
@@ -3672,7 +3672,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3672
3672
  } function i(t) { var i = [], e = void 0 !== $.curveSegments ? $.curveSegments : 12, l = void 0 !== $.steps ? $.steps : 1, n = void 0 !== $.depth ? $.depth : 100, r = void 0 === $.bevelEnabled || $.bevelEnabled, a = void 0 !== $.bevelThickness ? $.bevelThickness : 6, o = void 0 !== $.bevelSize ? $.bevelSize : a - 2, s = void 0 !== $.bevelOffset ? $.bevelOffset : 0, c = void 0 !== $.bevelSegments ? $.bevelSegments : 3, u = $.extrudePath, h = void 0 !== $.UVGenerator ? $.UVGenerator : Ml; void 0 !== $.amount && (console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."), n = $.amount); var d, p, f, m, g, v, y, x, _ = !1; u && (d = u.getSpacedPoints(l), r = !(_ = !0), p = u.computeFrenetFrames(l, !1), f = new We, m = new We, g = new We), r || (s = o = a = c = 0); var w = t.extractPoints(e), b = w.shape, M = w.holes; if (!yl.isClockWise(b))
3673
3673
  for (b = b.reverse(), y = 0, x = M.length; y < x; y++)
3674
3674
  v = M[y], yl.isClockWise(v) && (M[y] = v.reverse()); var S = yl.triangulateShape(b, M), C = b; for (y = 0, x = M.length; y < x; y++)
3675
- v = M[y], b = b.concat(v); function T(t, e, n) { return e || console.error("THREE.ExtrudeGeometry: vec does not exist"), e.clone().multiplyScalar(n).add(t); } var E, A, D, L, O, I, P = b.length, R = S.length; function k(t, e, n) { var i, r, a, o = t.x - e.x, s = t.y - e.y, l = n.x - t.x, c = n.y - t.y, u = o * o + s * s, h = o * c - s * l; if (Math.abs(h) > Number.EPSILON) {
3675
+ v = M[y], b = b.concat(v); function T(t, e, n) { return e || console.error("THREE.ExtrudeGeometry: vec does not exist"), e.clone().multiplyScalar(n).add(t); } var E, A, D, O, L, I, P = b.length, R = S.length; function k(t, e, n) { var i, r, a, o = t.x - e.x, s = t.y - e.y, l = n.x - t.x, c = n.y - t.y, u = o * o + s * s, h = o * c - s * l; if (Math.abs(h) > Number.EPSILON) {
3676
3676
  var d = Math.sqrt(u), p = Math.sqrt(l * l + c * c), f = e.x - s / d, m = e.y + o / d, g = ((n.x - c / p - f) * c - (n.y + l / p - m) * l) / (o * c - s * l), v = (i = f + o * g - t.x) * i + (r = m + s * g - t.y) * r;
3677
3677
  if (v <= 2)
3678
3678
  return new Re(i, r);
@@ -3681,26 +3681,26 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3681
3681
  else {
3682
3682
  var y = !1;
3683
3683
  o > Number.EPSILON ? l > Number.EPSILON && (y = !0) : o < -Number.EPSILON ? l < -Number.EPSILON && (y = !0) : Math.sign(s) === Math.sign(c) && (y = !0), a = y ? (i = -s, r = o, Math.sqrt(u)) : (i = o, r = s, Math.sqrt(u / 2));
3684
- } return new Re(i / a, r / a); } for (var N = [], B = 0, F = C.length, z = F - 1, V = B + 1; B < F; B++, z++, V++)
3685
- z === F && (z = 0), V === F && (V = 0), N[B] = k(C[B], C[z], C[V]); var U, j, G = [], H = N.concat(); for (y = 0, x = M.length; y < x; y++) {
3686
- for (v = M[y], U = [], B = 0, z = (F = v.length) - 1, V = B + 1; B < F; B++, z++, V++)
3687
- z === F && (z = 0), V === F && (V = 0), U[B] = k(v[B], v[z], v[V]);
3688
- G.push(U), H = H.concat(U);
3684
+ } return new Re(i / a, r / a); } for (var N = [], B = 0, F = C.length, z = F - 1, j = B + 1; B < F; B++, z++, j++)
3685
+ z === F && (z = 0), j === F && (j = 0), N[B] = k(C[B], C[z], C[j]); var V, U, G = [], H = N.concat(); for (y = 0, x = M.length; y < x; y++) {
3686
+ for (v = M[y], V = [], B = 0, z = (F = v.length) - 1, j = B + 1; B < F; B++, z++, j++)
3687
+ z === F && (z = 0), j === F && (j = 0), V[B] = k(v[B], v[z], v[j]);
3688
+ G.push(V), H = H.concat(V);
3689
3689
  } for (E = 0; E < c; E++) {
3690
- for (D = E / c, L = a * Math.cos(D * Math.PI / 2), A = o * Math.sin(D * Math.PI / 2) + s, B = 0, F = C.length; B < F; B++)
3691
- J((O = T(C[B], N[B], A)).x, O.y, -L);
3690
+ for (D = E / c, O = a * Math.cos(D * Math.PI / 2), A = o * Math.sin(D * Math.PI / 2) + s, B = 0, F = C.length; B < F; B++)
3691
+ J((L = T(C[B], N[B], A)).x, L.y, -O);
3692
3692
  for (y = 0, x = M.length; y < x; y++)
3693
- for (v = M[y], U = G[y], B = 0, F = v.length; B < F; B++)
3694
- J((O = T(v[B], U[B], A)).x, O.y, -L);
3693
+ for (v = M[y], V = G[y], B = 0, F = v.length; B < F; B++)
3694
+ J((L = T(v[B], V[B], A)).x, L.y, -O);
3695
3695
  } for (A = o + s, B = 0; B < P; B++)
3696
- O = r ? T(b[B], H[B], A) : b[B], _ ? (m.copy(p.normals[0]).multiplyScalar(O.x), f.copy(p.binormals[0]).multiplyScalar(O.y), g.copy(d[0]).add(m).add(f), J(g.x, g.y, g.z)) : J(O.x, O.y, 0); for (j = 1; j <= l; j++)
3696
+ L = r ? T(b[B], H[B], A) : b[B], _ ? (m.copy(p.normals[0]).multiplyScalar(L.x), f.copy(p.binormals[0]).multiplyScalar(L.y), g.copy(d[0]).add(m).add(f), J(g.x, g.y, g.z)) : J(L.x, L.y, 0); for (U = 1; U <= l; U++)
3697
3697
  for (B = 0; B < P; B++)
3698
- O = r ? T(b[B], H[B], A) : b[B], _ ? (m.copy(p.normals[j]).multiplyScalar(O.x), f.copy(p.binormals[j]).multiplyScalar(O.y), g.copy(d[j]).add(m).add(f), J(g.x, g.y, g.z)) : J(O.x, O.y, n / l * j); for (E = c - 1; 0 <= E; E--) {
3699
- for (D = E / c, L = a * Math.cos(D * Math.PI / 2), A = o * Math.sin(D * Math.PI / 2) + s, B = 0, F = C.length; B < F; B++)
3700
- J((O = T(C[B], N[B], A)).x, O.y, n + L);
3698
+ L = r ? T(b[B], H[B], A) : b[B], _ ? (m.copy(p.normals[U]).multiplyScalar(L.x), f.copy(p.binormals[U]).multiplyScalar(L.y), g.copy(d[U]).add(m).add(f), J(g.x, g.y, g.z)) : J(L.x, L.y, n / l * U); for (E = c - 1; 0 <= E; E--) {
3699
+ for (D = E / c, O = a * Math.cos(D * Math.PI / 2), A = o * Math.sin(D * Math.PI / 2) + s, B = 0, F = C.length; B < F; B++)
3700
+ J((L = T(C[B], N[B], A)).x, L.y, n + O);
3701
3701
  for (y = 0, x = M.length; y < x; y++)
3702
- for (v = M[y], U = G[y], B = 0, F = v.length; B < F; B++)
3703
- O = T(v[B], U[B], A), _ ? J(O.x, O.y + d[l - 1].y, d[l - 1].x + L) : J(O.x, O.y, n + L);
3702
+ for (v = M[y], V = G[y], B = 0, F = v.length; B < F; B++)
3703
+ L = T(v[B], V[B], A), _ ? J(L.x, L.y + d[l - 1].y, d[l - 1].x + O) : J(L.x, L.y, n + O);
3704
3704
  } function W(t, e) { var n, i; for (B = t.length; 0 <= --B;) {
3705
3705
  (i = (n = B) - 1) < 0 && (i = t.length - 1);
3706
3706
  var r = 0, a = l + 2 * c;
@@ -3747,8 +3747,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3747
3747
  var b = h[l][s + 1], M = h[l][s], S = h[l + 1][s], C = h[l + 1][s + 1];
3748
3748
  (0 !== l || 0 < a) && f.push(b, M, C), (l !== n - 1 || c < Math.PI) && f.push(M, S, C);
3749
3749
  } this.setIndex(f), this.setAttribute("position", new Ti(m, 3)), this.setAttribute("normal", new Ti(g, 3)), this.setAttribute("uv", new Ti(v, 2)); }
3750
- function Dl(t, e, n, i, r, a) { lr.call(this), this.type = "RingGeometry", this.parameters = { innerRadius: t, outerRadius: e, thetaSegments: n, phiSegments: i, thetaStart: r, thetaLength: a }, this.fromBufferGeometry(new Ll(t, e, n, i, r, a)), this.mergeVertices(); }
3751
- function Ll(t, e, n, i, r, a) { Bi.call(this), this.type = "RingBufferGeometry", this.parameters = { innerRadius: t, outerRadius: e, thetaSegments: n, phiSegments: i, thetaStart: r, thetaLength: a }, t = t || .5, e = e || 1, r = void 0 !== r ? r : 0, a = void 0 !== a ? a : 2 * Math.PI, n = void 0 !== n ? Math.max(3, n) : 8; var o, s, l, c = [], u = [], h = [], d = [], p = t, f = (e - t) / (i = void 0 !== i ? Math.max(1, i) : 1), m = new We, g = new Re; for (s = 0; s <= i; s++) {
3750
+ function Dl(t, e, n, i, r, a) { lr.call(this), this.type = "RingGeometry", this.parameters = { innerRadius: t, outerRadius: e, thetaSegments: n, phiSegments: i, thetaStart: r, thetaLength: a }, this.fromBufferGeometry(new Ol(t, e, n, i, r, a)), this.mergeVertices(); }
3751
+ function Ol(t, e, n, i, r, a) { Bi.call(this), this.type = "RingBufferGeometry", this.parameters = { innerRadius: t, outerRadius: e, thetaSegments: n, phiSegments: i, thetaStart: r, thetaLength: a }, t = t || .5, e = e || 1, r = void 0 !== r ? r : 0, a = void 0 !== a ? a : 2 * Math.PI, n = void 0 !== n ? Math.max(3, n) : 8; var o, s, l, c = [], u = [], h = [], d = [], p = t, f = (e - t) / (i = void 0 !== i ? Math.max(1, i) : 1), m = new We, g = new Re; for (s = 0; s <= i; s++) {
3752
3752
  for (l = 0; l <= n; l++)
3753
3753
  o = r + l / n * a, m.x = p * Math.cos(o), m.y = p * Math.sin(o), u.push(m.x, m.y, m.z), h.push(0, 0, 1), g.x = (m.x / e + 1) / 2, g.y = (m.y / e + 1) / 2, d.push(g.x, g.y);
3754
3754
  p += f;
@@ -3759,7 +3759,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3759
3759
  c.push(y, x, w), c.push(x, _, w);
3760
3760
  }
3761
3761
  } this.setIndex(c), this.setAttribute("position", new Ti(u, 3)), this.setAttribute("normal", new Ti(h, 3)), this.setAttribute("uv", new Ti(d, 2)); }
3762
- function Ol(t, e, n, i) { lr.call(this), this.type = "LatheGeometry", this.parameters = { points: t, segments: e, phiStart: n, phiLength: i }, this.fromBufferGeometry(new Il(t, e, n, i)), this.mergeVertices(); }
3762
+ function Ll(t, e, n, i) { lr.call(this), this.type = "LatheGeometry", this.parameters = { points: t, segments: e, phiStart: n, phiLength: i }, this.fromBufferGeometry(new Il(t, e, n, i)), this.mergeVertices(); }
3763
3763
  function Il(t, e, n, i) { Bi.call(this), this.type = "LatheBufferGeometry", this.parameters = { points: t, segments: e, phiStart: n, phiLength: i }, e = Math.floor(e) || 12, n = n || 0, i = i || 2 * Math.PI, i = Pe.clamp(i, 0, 2 * Math.PI); var r, a, o, s = [], l = [], c = [], u = 1 / e, h = new We, d = new Re; for (a = 0; a <= e; a++) {
3764
3764
  var p = n + a * u * i, f = Math.sin(p), m = Math.cos(p);
3765
3765
  for (o = 0; o <= t.length - 1; o++)
@@ -3804,10 +3804,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3804
3804
  }
3805
3805
  } this.setAttribute("position", new Ti(o, 3)); }
3806
3806
  function Bl(t, e, n, i, r, a, o, s) { lr.call(this), this.type = "CylinderGeometry", this.parameters = { radiusTop: t, radiusBottom: e, height: n, radialSegments: i, heightSegments: r, openEnded: a, thetaStart: o, thetaLength: s }, this.fromBufferGeometry(new Fl(t, e, n, i, r, a, o, s)), this.mergeVertices(); }
3807
- function Fl(v, y, x, _, w, t, b, M) { Bi.call(this), this.type = "CylinderBufferGeometry", this.parameters = { radiusTop: v, radiusBottom: y, height: x, radialSegments: _, heightSegments: w, openEnded: t, thetaStart: b, thetaLength: M }; var S = this; v = void 0 !== v ? v : 1, y = void 0 !== y ? y : 1, x = x || 1, _ = Math.floor(_) || 8, w = Math.floor(w) || 1, t = void 0 !== t && t, b = void 0 !== b ? b : 0, M = void 0 !== M ? M : 2 * Math.PI; var C = [], T = [], E = [], A = [], D = 0, L = [], O = x / 2, I = 0; function e(t) { var e, n, i, r = new Re, a = new We, o = 0, s = !0 === t ? v : y, l = !0 === t ? 1 : -1; for (n = D, e = 1; e <= _; e++)
3808
- T.push(0, O * l, 0), E.push(0, l, 0), A.push(.5, .5), D++; for (i = D, e = 0; e <= _; e++) {
3807
+ function Fl(v, y, x, _, w, t, b, M) { Bi.call(this), this.type = "CylinderBufferGeometry", this.parameters = { radiusTop: v, radiusBottom: y, height: x, radialSegments: _, heightSegments: w, openEnded: t, thetaStart: b, thetaLength: M }; var S = this; v = void 0 !== v ? v : 1, y = void 0 !== y ? y : 1, x = x || 1, _ = Math.floor(_) || 8, w = Math.floor(w) || 1, t = void 0 !== t && t, b = void 0 !== b ? b : 0, M = void 0 !== M ? M : 2 * Math.PI; var C = [], T = [], E = [], A = [], D = 0, O = [], L = x / 2, I = 0; function e(t) { var e, n, i, r = new Re, a = new We, o = 0, s = !0 === t ? v : y, l = !0 === t ? 1 : -1; for (n = D, e = 1; e <= _; e++)
3808
+ T.push(0, L * l, 0), E.push(0, l, 0), A.push(.5, .5), D++; for (i = D, e = 0; e <= _; e++) {
3809
3809
  var c = e / _ * M + b, u = Math.cos(c), h = Math.sin(c);
3810
- a.x = s * h, a.y = O * l, a.z = s * u, T.push(a.x, a.y, a.z), E.push(0, l, 0), r.x = .5 * u + .5, r.y = .5 * h * l + .5, A.push(r.x, r.y), D++;
3810
+ a.x = s * h, a.y = L * l, a.z = s * u, T.push(a.x, a.y, a.z), E.push(0, l, 0), r.x = .5 * u + .5, r.y = .5 * h * l + .5, A.push(r.x, r.y), D++;
3811
3811
  } for (e = 0; e < _; e++) {
3812
3812
  var d = n + e, p = i + e;
3813
3813
  !0 === t ? C.push(p, p + 1, d) : C.push(p + 1, p, d), o += 3;
@@ -3815,32 +3815,32 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
3815
3815
  var o = [], s = e / w, l = s * (y - v) + v;
3816
3816
  for (t = 0; t <= _; t++) {
3817
3817
  var c = t / _, u = c * M + b, h = Math.sin(u), d = Math.cos(u);
3818
- i.x = l * h, i.y = -s * x + O, i.z = l * d, T.push(i.x, i.y, i.z), n.set(h, a, d).normalize(), E.push(n.x, n.y, n.z), A.push(c, 1 - s), o.push(D++);
3818
+ i.x = l * h, i.y = -s * x + L, i.z = l * d, T.push(i.x, i.y, i.z), n.set(h, a, d).normalize(), E.push(n.x, n.y, n.z), A.push(c, 1 - s), o.push(D++);
3819
3819
  }
3820
- L.push(o);
3820
+ O.push(o);
3821
3821
  } for (t = 0; t < _; t++)
3822
3822
  for (e = 0; e < w; e++) {
3823
- var p = L[e][t], f = L[e + 1][t], m = L[e + 1][t + 1], g = L[e][t + 1];
3823
+ var p = O[e][t], f = O[e + 1][t], m = O[e + 1][t + 1], g = O[e][t + 1];
3824
3824
  C.push(p, f, g), C.push(f, m, g), r += 6;
3825
3825
  } S.addGroup(I, r, 0), I += r; }(), !1 === t && (0 < v && e(!0), 0 < y && e(!1)), this.setIndex(C), this.setAttribute("position", new Ti(T, 3)), this.setAttribute("normal", new Ti(E, 3)), this.setAttribute("uv", new Ti(A, 2)); }
3826
3826
  function zl(t, e, n, i, r, a, o) { Bl.call(this, 0, t, e, n, i, r, a, o), this.type = "ConeGeometry", this.parameters = { radius: t, height: e, radialSegments: n, heightSegments: i, openEnded: r, thetaStart: a, thetaLength: o }; }
3827
- function Vl(t, e, n, i, r, a, o) { Fl.call(this, 0, t, e, n, i, r, a, o), this.type = "ConeBufferGeometry", this.parameters = { radius: t, height: e, radialSegments: n, heightSegments: i, openEnded: r, thetaStart: a, thetaLength: o }; }
3828
- function Ul(t, e, n, i) { lr.call(this), this.type = "CircleGeometry", this.parameters = { radius: t, segments: e, thetaStart: n, thetaLength: i }, this.fromBufferGeometry(new jl(t, e, n, i)), this.mergeVertices(); }
3829
- function jl(t, e, n, i) { Bi.call(this), this.type = "CircleBufferGeometry", this.parameters = { radius: t, segments: e, thetaStart: n, thetaLength: i }, t = t || 1, e = void 0 !== e ? Math.max(3, e) : 8, n = void 0 !== n ? n : 0, i = void 0 !== i ? i : 2 * Math.PI; var r, a, o = [], s = [], l = [], c = [], u = new We, h = new Re; for (s.push(0, 0, 0), l.push(0, 0, 1), c.push(.5, .5), a = 0, r = 3; a <= e; a++, r += 3) {
3827
+ function jl(t, e, n, i, r, a, o) { Fl.call(this, 0, t, e, n, i, r, a, o), this.type = "ConeBufferGeometry", this.parameters = { radius: t, height: e, radialSegments: n, heightSegments: i, openEnded: r, thetaStart: a, thetaLength: o }; }
3828
+ function Vl(t, e, n, i) { lr.call(this), this.type = "CircleGeometry", this.parameters = { radius: t, segments: e, thetaStart: n, thetaLength: i }, this.fromBufferGeometry(new Ul(t, e, n, i)), this.mergeVertices(); }
3829
+ function Ul(t, e, n, i) { Bi.call(this), this.type = "CircleBufferGeometry", this.parameters = { radius: t, segments: e, thetaStart: n, thetaLength: i }, t = t || 1, e = void 0 !== e ? Math.max(3, e) : 8, n = void 0 !== n ? n : 0, i = void 0 !== i ? i : 2 * Math.PI; var r, a, o = [], s = [], l = [], c = [], u = new We, h = new Re; for (s.push(0, 0, 0), l.push(0, 0, 1), c.push(.5, .5), a = 0, r = 3; a <= e; a++, r += 3) {
3830
3830
  var d = n + a / e * i;
3831
3831
  u.x = t * Math.cos(d), u.y = t * Math.sin(d), s.push(u.x, u.y, u.z), l.push(0, 0, 1), h.x = (s[r] / t + 1) / 2, h.y = (s[r + 1] / t + 1) / 2, c.push(h.x, h.y);
3832
3832
  } for (r = 1; r <= e; r++)
3833
3833
  o.push(r, r + 1, 0); this.setIndex(o), this.setAttribute("position", new Ti(s, 3)), this.setAttribute("normal", new Ti(l, 3)), this.setAttribute("uv", new Ti(c, 2)); }
3834
- (Cl.prototype = Object.create(lr.prototype)).constructor = Cl, (Tl.prototype = Object.create(bl.prototype)).constructor = Tl, (El.prototype = Object.create(lr.prototype)).constructor = El, (Al.prototype = Object.create(Bi.prototype)).constructor = Al, (Dl.prototype = Object.create(lr.prototype)).constructor = Dl, (Ll.prototype = Object.create(Bi.prototype)).constructor = Ll, (Ol.prototype = Object.create(lr.prototype)).constructor = Ol, (Il.prototype = Object.create(Bi.prototype)).constructor = Il, ((Pl.prototype = Object.create(lr.prototype)).constructor = Pl).prototype.toJSON = function () { var t = lr.prototype.toJSON.call(this); return kl(this.parameters.shapes, t); }, ((Rl.prototype = Object.create(Bi.prototype)).constructor = Rl).prototype.toJSON = function () { var t = Bi.prototype.toJSON.call(this); return kl(this.parameters.shapes, t); }, (Nl.prototype = Object.create(Bi.prototype)).constructor = Nl, (Bl.prototype = Object.create(lr.prototype)).constructor = Bl, (Fl.prototype = Object.create(Bi.prototype)).constructor = Fl, (zl.prototype = Object.create(Bl.prototype)).constructor = zl, (Vl.prototype = Object.create(Fl.prototype)).constructor = Vl, (Ul.prototype = Object.create(lr.prototype)).constructor = Ul, (jl.prototype = Object.create(Bi.prototype)).constructor = jl;
3835
- var Gl = Object.freeze({ __proto__: null, WireframeGeometry: Is, ParametricGeometry: Ps, ParametricBufferGeometry: Rs, TetrahedronGeometry: Bs, TetrahedronBufferGeometry: Fs, OctahedronGeometry: zs, OctahedronBufferGeometry: Vs, IcosahedronGeometry: Us, IcosahedronBufferGeometry: js, DodecahedronGeometry: Gs, DodecahedronBufferGeometry: Hs, PolyhedronGeometry: ks, PolyhedronBufferGeometry: Ns, TubeGeometry: Ws, TubeBufferGeometry: Js, TorusKnotGeometry: qs, TorusKnotBufferGeometry: Xs, TorusGeometry: Ys, TorusBufferGeometry: Zs, TextGeometry: Cl, TextBufferGeometry: Tl, SphereGeometry: El, SphereBufferGeometry: Al, RingGeometry: Dl, RingBufferGeometry: Ll, PlaneGeometry: Ar, PlaneBufferGeometry: Dr, LatheGeometry: Ol, LatheBufferGeometry: Il, ShapeGeometry: Pl, ShapeBufferGeometry: Rl, ExtrudeGeometry: wl, ExtrudeBufferGeometry: bl, EdgesGeometry: Nl, ConeGeometry: zl, ConeBufferGeometry: Vl, CylinderGeometry: Bl, CylinderBufferGeometry: Fl, CircleGeometry: Ul, CircleBufferGeometry: jl, BoxGeometry: cr, BoxBufferGeometry: ur });
3834
+ (Cl.prototype = Object.create(lr.prototype)).constructor = Cl, (Tl.prototype = Object.create(bl.prototype)).constructor = Tl, (El.prototype = Object.create(lr.prototype)).constructor = El, (Al.prototype = Object.create(Bi.prototype)).constructor = Al, (Dl.prototype = Object.create(lr.prototype)).constructor = Dl, (Ol.prototype = Object.create(Bi.prototype)).constructor = Ol, (Ll.prototype = Object.create(lr.prototype)).constructor = Ll, (Il.prototype = Object.create(Bi.prototype)).constructor = Il, ((Pl.prototype = Object.create(lr.prototype)).constructor = Pl).prototype.toJSON = function () { var t = lr.prototype.toJSON.call(this); return kl(this.parameters.shapes, t); }, ((Rl.prototype = Object.create(Bi.prototype)).constructor = Rl).prototype.toJSON = function () { var t = Bi.prototype.toJSON.call(this); return kl(this.parameters.shapes, t); }, (Nl.prototype = Object.create(Bi.prototype)).constructor = Nl, (Bl.prototype = Object.create(lr.prototype)).constructor = Bl, (Fl.prototype = Object.create(Bi.prototype)).constructor = Fl, (zl.prototype = Object.create(Bl.prototype)).constructor = zl, (jl.prototype = Object.create(Fl.prototype)).constructor = jl, (Vl.prototype = Object.create(lr.prototype)).constructor = Vl, (Ul.prototype = Object.create(Bi.prototype)).constructor = Ul;
3835
+ var Gl = Object.freeze({ __proto__: null, WireframeGeometry: Is, ParametricGeometry: Ps, ParametricBufferGeometry: Rs, TetrahedronGeometry: Bs, TetrahedronBufferGeometry: Fs, OctahedronGeometry: zs, OctahedronBufferGeometry: js, IcosahedronGeometry: Vs, IcosahedronBufferGeometry: Us, DodecahedronGeometry: Gs, DodecahedronBufferGeometry: Hs, PolyhedronGeometry: ks, PolyhedronBufferGeometry: Ns, TubeGeometry: Ws, TubeBufferGeometry: Js, TorusKnotGeometry: qs, TorusKnotBufferGeometry: Xs, TorusGeometry: Ys, TorusBufferGeometry: Zs, TextGeometry: Cl, TextBufferGeometry: Tl, SphereGeometry: El, SphereBufferGeometry: Al, RingGeometry: Dl, RingBufferGeometry: Ol, PlaneGeometry: Ar, PlaneBufferGeometry: Dr, LatheGeometry: Ll, LatheBufferGeometry: Il, ShapeGeometry: Pl, ShapeBufferGeometry: Rl, ExtrudeGeometry: wl, ExtrudeBufferGeometry: bl, EdgesGeometry: Nl, ConeGeometry: zl, ConeBufferGeometry: jl, CylinderGeometry: Bl, CylinderBufferGeometry: Fl, CircleGeometry: Vl, CircleBufferGeometry: Ul, BoxGeometry: cr, BoxBufferGeometry: ur });
3836
3836
  function Hl(t) { mi.call(this), this.type = "ShadowMaterial", this.color = new ci(0), this.transparent = !0, this.setValues(t); }
3837
3837
  function Wl(t) { gr.call(this, t), this.type = "RawShaderMaterial"; }
3838
3838
  function Jl(t) { mi.call(this), this.defines = { STANDARD: "" }, this.type = "MeshStandardMaterial", this.color = new ci(16777215), this.roughness = 1, this.metalness = 0, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3839
3839
  function ql(t) { Jl.call(this), this.defines = { STANDARD: "", PHYSICAL: "" }, this.type = "MeshPhysicalMaterial", this.reflectivity = .5, this.clearcoat = 0, this.clearcoatRoughness = 0, this.sheen = null, this.clearcoatNormalScale = new Re(1, 1), this.clearcoatNormalMap = null, this.transparency = 0, this.setValues(t); }
3840
- function Xl(t) { mi.call(this), this.type = "MeshPhongMaterial", this.color = new ci(16777215), this.specular = new ci(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3840
+ function Xl(t) { mi.call(this), this.type = "MeshPhongMaterial", this.color = new ci(16777215), this.specular = new ci(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = V, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3841
3841
  function Yl(t) { mi.call(this), this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new ci(16777215), this.specular = new ci(1118481), this.shininess = 30, this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3842
3842
  function Zl(t) { mi.call(this), this.type = "MeshNormalMaterial", this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3843
- function $l(t) { mi.call(this), this.type = "MeshLambertMaterial", this.color = new ci(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = U, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3843
+ function $l(t) { mi.call(this), this.type = "MeshLambertMaterial", this.color = new ci(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new ci(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.combine = V, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3844
3844
  function Kl(t) { mi.call(this), this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new ci(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = Me, this.normalScale = new Re(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.skinning = !1, this.morphTargets = !1, this.morphNormals = !1, this.setValues(t); }
3845
3845
  function Ql(t) { us.call(this), this.type = "LineDashedMaterial", this.scale = 1, this.dashSize = 3, this.gapSize = 1, this.setValues(t); }
3846
3846
  ((Hl.prototype = Object.create(mi.prototype)).constructor = Hl).prototype.isShadowMaterial = !0, Hl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.color.copy(t.color), this; }, ((Wl.prototype = Object.create(gr.prototype)).constructor = Wl).prototype.isRawShaderMaterial = !0, ((Jl.prototype = Object.create(mi.prototype)).constructor = Jl).prototype.isMeshStandardMaterial = !0, Jl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.defines = { STANDARD: "" }, this.color.copy(t.color), this.roughness = t.roughness, this.metalness = t.metalness, this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalMapType = t.normalMapType, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.roughnessMap = t.roughnessMap, this.metalnessMap = t.metalnessMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.envMapIntensity = t.envMapIntensity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, ((ql.prototype = Object.create(Jl.prototype)).constructor = ql).prototype.isMeshPhysicalMaterial = !0, ql.prototype.copy = function (t) { return Jl.prototype.copy.call(this, t), this.defines = { STANDARD: "", PHYSICAL: "" }, this.reflectivity = t.reflectivity, this.clearcoat = t.clearcoat, this.clearcoatRoughness = t.clearcoatRoughness, t.sheen ? this.sheen = (this.sheen || new ci).copy(t.sheen) : this.sheen = null, this.clearcoatNormalMap = t.clearcoatNormalMap, this.clearcoatNormalScale.copy(t.clearcoatNormalScale), this.transparency = t.transparency, this; }, ((Xl.prototype = Object.create(mi.prototype)).constructor = Xl).prototype.isMeshPhongMaterial = !0, Xl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.color.copy(t.color), this.specular.copy(t.specular), this.shininess = t.shininess, this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalMapType = t.normalMapType, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, ((Yl.prototype = Object.create(mi.prototype)).constructor = Yl).prototype.isMeshToonMaterial = !0, Yl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.color.copy(t.color), this.specular.copy(t.specular), this.shininess = t.shininess, this.map = t.map, this.gradientMap = t.gradientMap, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalMapType = t.normalMapType, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, ((Zl.prototype = Object.create(mi.prototype)).constructor = Zl).prototype.isMeshNormalMaterial = !0, Zl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalMapType = t.normalMapType, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, (($l.prototype = Object.create(mi.prototype)).constructor = $l).prototype.isMeshLambertMaterial = !0, $l.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.color.copy(t.color), this.map = t.map, this.lightMap = t.lightMap, this.lightMapIntensity = t.lightMapIntensity, this.aoMap = t.aoMap, this.aoMapIntensity = t.aoMapIntensity, this.emissive.copy(t.emissive), this.emissiveMap = t.emissiveMap, this.emissiveIntensity = t.emissiveIntensity, this.specularMap = t.specularMap, this.alphaMap = t.alphaMap, this.envMap = t.envMap, this.combine = t.combine, this.reflectivity = t.reflectivity, this.refractionRatio = t.refractionRatio, this.wireframe = t.wireframe, this.wireframeLinewidth = t.wireframeLinewidth, this.wireframeLinecap = t.wireframeLinecap, this.wireframeLinejoin = t.wireframeLinejoin, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, ((Kl.prototype = Object.create(mi.prototype)).constructor = Kl).prototype.isMeshMatcapMaterial = !0, Kl.prototype.copy = function (t) { return mi.prototype.copy.call(this, t), this.defines = { MATCAP: "" }, this.color.copy(t.color), this.matcap = t.matcap, this.map = t.map, this.bumpMap = t.bumpMap, this.bumpScale = t.bumpScale, this.normalMap = t.normalMap, this.normalMapType = t.normalMapType, this.normalScale.copy(t.normalScale), this.displacementMap = t.displacementMap, this.displacementScale = t.displacementScale, this.displacementBias = t.displacementBias, this.alphaMap = t.alphaMap, this.skinning = t.skinning, this.morphTargets = t.morphTargets, this.morphNormals = t.morphNormals, this; }, ((Ql.prototype = Object.create(us.prototype)).constructor = Ql).prototype.isLineDashedMaterial = !0, Ql.prototype.copy = function (t) { return us.prototype.copy.call(this, t), this.scale = t.scale, this.dashSize = t.dashSize, this.gapSize = t.gapSize, this; };
@@ -4053,7 +4053,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4053
4053
  e[m + d] = e[f + d];
4054
4054
  ++r;
4055
4055
  } return r !== t.length ? (this.times = ec.arraySlice(t, 0, r), this.values = ec.arraySlice(e, 0, r * n)) : (this.times = t, this.values = e), this; }, clone: function () { var t = ec.arraySlice(this.times, 0), e = ec.arraySlice(this.values, 0), n = new this.constructor(this.name, t, e); return n.createInterpolant = this.createInterpolant, n; } }), sc.prototype = Object.assign(Object.create(oc.prototype), { constructor: sc, ValueTypeName: "bool", ValueBufferType: Array, DefaultInterpolation: ue, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0 }), lc.prototype = Object.assign(Object.create(oc.prototype), { constructor: lc, ValueTypeName: "color" }), cc.prototype = Object.assign(Object.create(oc.prototype), { constructor: cc, ValueTypeName: "number" }), uc.prototype = Object.assign(Object.create(nc.prototype), { constructor: uc, interpolate_: function (t, e, n, i) { for (var r = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = t * o, l = (n - e) / (i - e), c = s + o; s !== c; s += 4)
4056
- je.slerpFlat(r, 0, a, s - o, a, s, l); return r; } }), hc.prototype = Object.assign(Object.create(oc.prototype), { constructor: hc, ValueTypeName: "quaternion", DefaultInterpolation: he, InterpolantFactoryMethodLinear: function (t) { return new uc(this.times, this.values, this.getValueSize(), t); }, InterpolantFactoryMethodSmooth: void 0 }), dc.prototype = Object.assign(Object.create(oc.prototype), { constructor: dc, ValueTypeName: "string", ValueBufferType: Array, DefaultInterpolation: ue, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0 }), pc.prototype = Object.assign(Object.create(oc.prototype), { constructor: pc, ValueTypeName: "vector" }), Object.assign(fc, { parse: function (t) { for (var e = [], n = t.tracks, i = 1 / (t.fps || 1), r = 0, a = n.length; r !== a; ++r)
4056
+ Ue.slerpFlat(r, 0, a, s - o, a, s, l); return r; } }), hc.prototype = Object.assign(Object.create(oc.prototype), { constructor: hc, ValueTypeName: "quaternion", DefaultInterpolation: he, InterpolantFactoryMethodLinear: function (t) { return new uc(this.times, this.values, this.getValueSize(), t); }, InterpolantFactoryMethodSmooth: void 0 }), dc.prototype = Object.assign(Object.create(oc.prototype), { constructor: dc, ValueTypeName: "string", ValueBufferType: Array, DefaultInterpolation: ue, InterpolantFactoryMethodLinear: void 0, InterpolantFactoryMethodSmooth: void 0 }), pc.prototype = Object.assign(Object.create(oc.prototype), { constructor: pc, ValueTypeName: "vector" }), Object.assign(fc, { parse: function (t) { for (var e = [], n = t.tracks, i = 1 / (t.fps || 1), r = 0, a = n.length; r !== a; ++r)
4057
4057
  e.push(mc(n[r]).scale(i)); return new fc(t.name, t.duration, e); }, toJSON: function (t) { for (var e = [], n = t.tracks, i = { name: t.name, duration: t.duration, tracks: e, uuid: t.uuid }, r = 0, a = n.length; r !== a; ++r)
4058
4058
  e.push(oc.toJSON(n[r])); return i; }, CreateFromMorphTargetSequence: function (t, e, n, i) { for (var r = e.length, a = [], o = 0; o < r; o++) {
4059
4059
  var s = [], l = [];
@@ -4125,8 +4125,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4125
4125
  function Ec(t) { xc.call(this, t); }
4126
4126
  function Ac() { this.type = "Curve", this.arcLengthDivisions = 200; }
4127
4127
  function Dc(t, e, n, i, r, a, o, s) { Ac.call(this), this.type = "EllipseCurve", this.aX = t || 0, this.aY = e || 0, this.xRadius = n || 1, this.yRadius = i || 1, this.aStartAngle = r || 0, this.aEndAngle = a || 2 * Math.PI, this.aClockwise = o || !1, this.aRotation = s || 0; }
4128
- function Lc(t, e, n, i, r, a) { Dc.call(this, t, e, n, n, i, r, a), this.type = "ArcCurve"; }
4129
- function Oc() { var r = 0, a = 0, o = 0, s = 0; function c(t, e, n, i) { o = -3 * (r = t) + 3 * e - 2 * (a = n) - i, s = 2 * t - 2 * e + n + i; } return { initCatmullRom: function (t, e, n, i, r) { c(e, n, r * (n - t), r * (i - e)); }, initNonuniformCatmullRom: function (t, e, n, i, r, a, o) { var s = (e - t) / r - (n - t) / (r + a) + (n - e) / a, l = (n - e) / a - (i - e) / (a + o) + (i - n) / o; c(e, n, s *= a, l *= a); }, calc: function (t) { var e = t * t; return r + a * t + o * e + s * (e * t); } }; }
4128
+ function Oc(t, e, n, i, r, a) { Dc.call(this, t, e, n, n, i, r, a), this.type = "ArcCurve"; }
4129
+ function Lc() { var r = 0, a = 0, o = 0, s = 0; function c(t, e, n, i) { o = -3 * (r = t) + 3 * e - 2 * (a = n) - i, s = 2 * t - 2 * e + n + i; } return { initCatmullRom: function (t, e, n, i, r) { c(e, n, r * (n - t), r * (i - e)); }, initNonuniformCatmullRom: function (t, e, n, i, r, a, o) { var s = (e - t) / r - (n - t) / (r + a) + (n - e) / a, l = (n - e) / a - (i - e) / (a + o) + (i - n) / o; c(e, n, s *= a, l *= a); }, calc: function (t) { var e = t * t; return r + a * t + o * e + s * (e * t); } }; }
4130
4130
  wc.prototype = Object.assign(Object.create(xc.prototype), { constructor: wc, load: function (o, t, e, n) { void 0 === o && (o = ""), void 0 !== this.path && (o = this.path + o), o = this.manager.resolveURL(o); var s = this, i = gc.get(o); if (void 0 !== i)
4131
4131
  return s.manager.itemStart(o), setTimeout(function () { t && t(i), s.manager.itemEnd(o); }, 0), i; if (void 0 === _c[o]) {
4132
4132
  var r = o.match(/^data:(.*?)(;base64)?,(.*)$/);
@@ -4226,15 +4226,15 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4226
4226
  r -= i; r < Number.EPSILON && (r = a ? 0 : i), !0 !== this.aClockwise || a || (r === i ? r = -i : r -= i); var o = this.aStartAngle + t * r, s = this.aX + this.xRadius * Math.cos(o), l = this.aY + this.yRadius * Math.sin(o); if (0 !== this.aRotation) {
4227
4227
  var c = Math.cos(this.aRotation), u = Math.sin(this.aRotation), h = s - this.aX, d = l - this.aY;
4228
4228
  s = h * c - d * u + this.aX, l = h * u + d * c + this.aY;
4229
- } return n.set(s, l); }, Dc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.aX = t.aX, this.aY = t.aY, this.xRadius = t.xRadius, this.yRadius = t.yRadius, this.aStartAngle = t.aStartAngle, this.aEndAngle = t.aEndAngle, this.aClockwise = t.aClockwise, this.aRotation = t.aRotation, this; }, Dc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.aX = this.aX, t.aY = this.aY, t.xRadius = this.xRadius, t.yRadius = this.yRadius, t.aStartAngle = this.aStartAngle, t.aEndAngle = this.aEndAngle, t.aClockwise = this.aClockwise, t.aRotation = this.aRotation, t; }, Dc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.aX = t.aX, this.aY = t.aY, this.xRadius = t.xRadius, this.yRadius = t.yRadius, this.aStartAngle = t.aStartAngle, this.aEndAngle = t.aEndAngle, this.aClockwise = t.aClockwise, this.aRotation = t.aRotation, this; }, ((Lc.prototype = Object.create(Dc.prototype)).constructor = Lc).prototype.isArcCurve = !0;
4230
- var Ic = new We, Pc = new Oc, Rc = new Oc, kc = new Oc;
4229
+ } return n.set(s, l); }, Dc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.aX = t.aX, this.aY = t.aY, this.xRadius = t.xRadius, this.yRadius = t.yRadius, this.aStartAngle = t.aStartAngle, this.aEndAngle = t.aEndAngle, this.aClockwise = t.aClockwise, this.aRotation = t.aRotation, this; }, Dc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.aX = this.aX, t.aY = this.aY, t.xRadius = this.xRadius, t.yRadius = this.yRadius, t.aStartAngle = this.aStartAngle, t.aEndAngle = this.aEndAngle, t.aClockwise = this.aClockwise, t.aRotation = this.aRotation, t; }, Dc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.aX = t.aX, this.aY = t.aY, this.xRadius = t.xRadius, this.yRadius = t.yRadius, this.aStartAngle = t.aStartAngle, this.aEndAngle = t.aEndAngle, this.aClockwise = t.aClockwise, this.aRotation = t.aRotation, this; }, ((Oc.prototype = Object.create(Dc.prototype)).constructor = Oc).prototype.isArcCurve = !0;
4230
+ var Ic = new We, Pc = new Lc, Rc = new Lc, kc = new Lc;
4231
4231
  function Nc(t, e, n, i) { Ac.call(this), this.type = "CatmullRomCurve3", this.points = t || [], this.closed = e || !1, this.curveType = n || "centripetal", this.tension = i || .5; }
4232
4232
  function Bc(t, e, n, i, r) { var a = .5 * (i - e), o = .5 * (r - n), s = t * t; return (2 * n - 2 * i + a + o) * (t * s) + (-3 * n + 3 * i - 2 * a - o) * s + a * t + n; }
4233
4233
  function Fc(t, e, n, i) { return (o = 1 - t) * o * e + 2 * (1 - (a = t)) * a * n + (r = t) * r * i; var r, a, o; }
4234
4234
  function zc(t, e, n, i, r) { return (c = 1 - t) * c * c * e + 3 * (l = 1 - (s = t)) * l * s * n + 3 * (1 - (o = t)) * o * o * i + (a = t) * a * a * r; var a, o, s, l, c; }
4235
- function Vc(t, e, n, i) { Ac.call(this), this.type = "CubicBezierCurve", this.v0 = t || new Re, this.v1 = e || new Re, this.v2 = n || new Re, this.v3 = i || new Re; }
4236
- function Uc(t, e, n, i) { Ac.call(this), this.type = "CubicBezierCurve3", this.v0 = t || new We, this.v1 = e || new We, this.v2 = n || new We, this.v3 = i || new We; }
4237
- function jc(t, e) { Ac.call(this), this.type = "LineCurve", this.v1 = t || new Re, this.v2 = e || new Re; }
4235
+ function jc(t, e, n, i) { Ac.call(this), this.type = "CubicBezierCurve", this.v0 = t || new Re, this.v1 = e || new Re, this.v2 = n || new Re, this.v3 = i || new Re; }
4236
+ function Vc(t, e, n, i) { Ac.call(this), this.type = "CubicBezierCurve3", this.v0 = t || new We, this.v1 = e || new We, this.v2 = n || new We, this.v3 = i || new We; }
4237
+ function Uc(t, e) { Ac.call(this), this.type = "LineCurve", this.v1 = t || new Re, this.v2 = e || new Re; }
4238
4238
  function Gc(t, e) { Ac.call(this), this.type = "LineCurve3", this.v1 = t || new We, this.v2 = e || new We; }
4239
4239
  function Hc(t, e, n) { Ac.call(this), this.type = "QuadraticBezierCurve", this.v0 = t || new Re, this.v1 = e || new Re, this.v2 = n || new Re; }
4240
4240
  function Wc(t, e, n) { Ac.call(this), this.type = "QuadraticBezierCurve3", this.v0 = t || new We, this.v1 = e || new We, this.v2 = n || new We; }
@@ -4253,7 +4253,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4253
4253
  } return t.closed = this.closed, t.curveType = this.curveType, t.tension = this.tension, t; }, Nc.prototype.fromJSON = function (t) { Ac.prototype.fromJSON.call(this, t), this.points = []; for (var e = 0, n = t.points.length; e < n; e++) {
4254
4254
  var i = t.points[e];
4255
4255
  this.points.push((new We).fromArray(i));
4256
- } return this.closed = t.closed, this.curveType = t.curveType, this.tension = t.tension, this; }, ((Vc.prototype = Object.create(Ac.prototype)).constructor = Vc).prototype.isCubicBezierCurve = !0, Vc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.v0, r = this.v1, a = this.v2, o = this.v3; return n.set(zc(t, i.x, r.x, a.x, o.x), zc(t, i.y, r.y, a.y, o.y)), n; }, Vc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this.v3.copy(t.v3), this; }, Vc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t.v3 = this.v3.toArray(), t; }, Vc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this.v3.fromArray(t.v3), this; }, ((Uc.prototype = Object.create(Ac.prototype)).constructor = Uc).prototype.isCubicBezierCurve3 = !0, Uc.prototype.getPoint = function (t, e) { var n = e || new We, i = this.v0, r = this.v1, a = this.v2, o = this.v3; return n.set(zc(t, i.x, r.x, a.x, o.x), zc(t, i.y, r.y, a.y, o.y), zc(t, i.z, r.z, a.z, o.z)), n; }, Uc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this.v3.copy(t.v3), this; }, Uc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t.v3 = this.v3.toArray(), t; }, Uc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this.v3.fromArray(t.v3), this; }, ((jc.prototype = Object.create(Ac.prototype)).constructor = jc).prototype.isLineCurve = !0, jc.prototype.getPoint = function (t, e) { var n = e || new Re; return 1 === t ? n.copy(this.v2) : (n.copy(this.v2).sub(this.v1), n.multiplyScalar(t).add(this.v1)), n; }, jc.prototype.getPointAt = function (t, e) { return this.getPoint(t, e); }, jc.prototype.getTangent = function () { return this.v2.clone().sub(this.v1).normalize(); }, jc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, jc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, jc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Gc.prototype = Object.create(Ac.prototype)).constructor = Gc).prototype.isLineCurve3 = !0, Gc.prototype.getPoint = function (t, e) { var n = e || new We; return 1 === t ? n.copy(this.v2) : (n.copy(this.v2).sub(this.v1), n.multiplyScalar(t).add(this.v1)), n; }, Gc.prototype.getPointAt = function (t, e) { return this.getPoint(t, e); }, Gc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Gc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Gc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Hc.prototype = Object.create(Ac.prototype)).constructor = Hc).prototype.isQuadraticBezierCurve = !0, Hc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.v0, r = this.v1, a = this.v2; return n.set(Fc(t, i.x, r.x, a.x), Fc(t, i.y, r.y, a.y)), n; }, Hc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Hc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Hc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Wc.prototype = Object.create(Ac.prototype)).constructor = Wc).prototype.isQuadraticBezierCurve3 = !0, Wc.prototype.getPoint = function (t, e) { var n = e || new We, i = this.v0, r = this.v1, a = this.v2; return n.set(Fc(t, i.x, r.x, a.x), Fc(t, i.y, r.y, a.y), Fc(t, i.z, r.z, a.z)), n; }, Wc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Wc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Wc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Jc.prototype = Object.create(Ac.prototype)).constructor = Jc).prototype.isSplineCurve = !0, Jc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.points, r = (i.length - 1) * t, a = Math.floor(r), o = r - a, s = i[0 === a ? a : a - 1], l = i[a], c = i[a > i.length - 2 ? i.length - 1 : a + 1], u = i[a > i.length - 3 ? i.length - 1 : a + 2]; return n.set(Bc(o, s.x, l.x, c.x, u.x), Bc(o, s.y, l.y, c.y, u.y)), n; }, Jc.prototype.copy = function (t) { Ac.prototype.copy.call(this, t), this.points = []; for (var e = 0, n = t.points.length; e < n; e++) {
4256
+ } return this.closed = t.closed, this.curveType = t.curveType, this.tension = t.tension, this; }, ((jc.prototype = Object.create(Ac.prototype)).constructor = jc).prototype.isCubicBezierCurve = !0, jc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.v0, r = this.v1, a = this.v2, o = this.v3; return n.set(zc(t, i.x, r.x, a.x, o.x), zc(t, i.y, r.y, a.y, o.y)), n; }, jc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this.v3.copy(t.v3), this; }, jc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t.v3 = this.v3.toArray(), t; }, jc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this.v3.fromArray(t.v3), this; }, ((Vc.prototype = Object.create(Ac.prototype)).constructor = Vc).prototype.isCubicBezierCurve3 = !0, Vc.prototype.getPoint = function (t, e) { var n = e || new We, i = this.v0, r = this.v1, a = this.v2, o = this.v3; return n.set(zc(t, i.x, r.x, a.x, o.x), zc(t, i.y, r.y, a.y, o.y), zc(t, i.z, r.z, a.z, o.z)), n; }, Vc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this.v3.copy(t.v3), this; }, Vc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t.v3 = this.v3.toArray(), t; }, Vc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this.v3.fromArray(t.v3), this; }, ((Uc.prototype = Object.create(Ac.prototype)).constructor = Uc).prototype.isLineCurve = !0, Uc.prototype.getPoint = function (t, e) { var n = e || new Re; return 1 === t ? n.copy(this.v2) : (n.copy(this.v2).sub(this.v1), n.multiplyScalar(t).add(this.v1)), n; }, Uc.prototype.getPointAt = function (t, e) { return this.getPoint(t, e); }, Uc.prototype.getTangent = function () { return this.v2.clone().sub(this.v1).normalize(); }, Uc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Uc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Uc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Gc.prototype = Object.create(Ac.prototype)).constructor = Gc).prototype.isLineCurve3 = !0, Gc.prototype.getPoint = function (t, e) { var n = e || new We; return 1 === t ? n.copy(this.v2) : (n.copy(this.v2).sub(this.v1), n.multiplyScalar(t).add(this.v1)), n; }, Gc.prototype.getPointAt = function (t, e) { return this.getPoint(t, e); }, Gc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Gc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Gc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Hc.prototype = Object.create(Ac.prototype)).constructor = Hc).prototype.isQuadraticBezierCurve = !0, Hc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.v0, r = this.v1, a = this.v2; return n.set(Fc(t, i.x, r.x, a.x), Fc(t, i.y, r.y, a.y)), n; }, Hc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Hc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Hc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Wc.prototype = Object.create(Ac.prototype)).constructor = Wc).prototype.isQuadraticBezierCurve3 = !0, Wc.prototype.getPoint = function (t, e) { var n = e || new We, i = this.v0, r = this.v1, a = this.v2; return n.set(Fc(t, i.x, r.x, a.x), Fc(t, i.y, r.y, a.y), Fc(t, i.z, r.z, a.z)), n; }, Wc.prototype.copy = function (t) { return Ac.prototype.copy.call(this, t), this.v0.copy(t.v0), this.v1.copy(t.v1), this.v2.copy(t.v2), this; }, Wc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); return t.v0 = this.v0.toArray(), t.v1 = this.v1.toArray(), t.v2 = this.v2.toArray(), t; }, Wc.prototype.fromJSON = function (t) { return Ac.prototype.fromJSON.call(this, t), this.v0.fromArray(t.v0), this.v1.fromArray(t.v1), this.v2.fromArray(t.v2), this; }, ((Jc.prototype = Object.create(Ac.prototype)).constructor = Jc).prototype.isSplineCurve = !0, Jc.prototype.getPoint = function (t, e) { var n = e || new Re, i = this.points, r = (i.length - 1) * t, a = Math.floor(r), o = r - a, s = i[0 === a ? a : a - 1], l = i[a], c = i[a > i.length - 2 ? i.length - 1 : a + 1], u = i[a > i.length - 3 ? i.length - 1 : a + 2]; return n.set(Bc(o, s.x, l.x, c.x, u.x), Bc(o, s.y, l.y, c.y, u.y)), n; }, Jc.prototype.copy = function (t) { Ac.prototype.copy.call(this, t), this.points = []; for (var e = 0, n = t.points.length; e < n; e++) {
4257
4257
  var i = t.points[e];
4258
4258
  this.points.push(i.clone());
4259
4259
  } return this; }, Jc.prototype.toJSON = function () { var t = Ac.prototype.toJSON.call(this); t.points = []; for (var e = 0, n = this.points.length; e < n; e++) {
@@ -4263,7 +4263,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4263
4263
  var i = t.points[e];
4264
4264
  this.points.push((new Re).fromArray(i));
4265
4265
  } return this; };
4266
- var qc = Object.freeze({ __proto__: null, ArcCurve: Lc, CatmullRomCurve3: Nc, CubicBezierCurve: Vc, CubicBezierCurve3: Uc, EllipseCurve: Dc, LineCurve: jc, LineCurve3: Gc, QuadraticBezierCurve: Hc, QuadraticBezierCurve3: Wc, SplineCurve: Jc });
4266
+ var qc = Object.freeze({ __proto__: null, ArcCurve: Oc, CatmullRomCurve3: Nc, CubicBezierCurve: jc, CubicBezierCurve3: Vc, EllipseCurve: Dc, LineCurve: Uc, LineCurve3: Gc, QuadraticBezierCurve: Hc, QuadraticBezierCurve3: Wc, SplineCurve: Jc });
4267
4267
  function Xc() { Ac.call(this), this.type = "CurvePath", this.curves = [], this.autoClose = !1; }
4268
4268
  function Yc(t) { Xc.call(this), this.type = "Path", this.currentPoint = new Re, t && this.setFromPoints(t); }
4269
4269
  function Zc(t) { Yc.call(this, t), this.uuid = Pe.generateUUID(), this.type = "Shape", this.holes = []; }
@@ -4280,7 +4280,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4280
4280
  function su(t, e) { $c.call(this, t, e), this.type = "AmbientLight", this.castShadow = void 0; }
4281
4281
  function lu(t, e, n, i) { $c.call(this, t, e), this.type = "RectAreaLight", this.width = void 0 !== n ? n : 10, this.height = void 0 !== i ? i : 10; }
4282
4282
  function cu(t) { xc.call(this, t), this.textures = {}; }
4283
- Xc.prototype = Object.assign(Object.create(Ac.prototype), { constructor: Xc, add: function (t) { this.curves.push(t); }, closePath: function () { var t = this.curves[0].getPoint(0), e = this.curves[this.curves.length - 1].getPoint(1); t.equals(e) || this.curves.push(new jc(e, t)); }, getPoint: function (t) { for (var e = t * this.getLength(), n = this.getCurveLengths(), i = 0; i < n.length;) {
4283
+ Xc.prototype = Object.assign(Object.create(Ac.prototype), { constructor: Xc, add: function (t) { this.curves.push(t); }, closePath: function () { var t = this.curves[0].getPoint(0), e = this.curves[this.curves.length - 1].getPoint(1); t.equals(e) || this.curves.push(new Uc(e, t)); }, getPoint: function (t) { for (var e = t * this.getLength(), n = this.getCurveLengths(), i = 0; i < n.length;) {
4284
4284
  if (n[i] >= e) {
4285
4285
  var r = n[i] - e, a = this.curves[i], o = a.getLength(), s = 0 === o ? 0 : 1 - r / o;
4286
4286
  return a.getPointAt(s);
@@ -4303,7 +4303,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4303
4303
  var i = t.curves[e];
4304
4304
  this.curves.push((new qc[i.type]).fromJSON(i));
4305
4305
  } return this; } }), Yc.prototype = Object.assign(Object.create(Xc.prototype), { constructor: Yc, setFromPoints: function (t) { this.moveTo(t[0].x, t[0].y); for (var e = 1, n = t.length; e < n; e++)
4306
- this.lineTo(t[e].x, t[e].y); return this; }, moveTo: function (t, e) { return this.currentPoint.set(t, e), this; }, lineTo: function (t, e) { var n = new jc(this.currentPoint.clone(), new Re(t, e)); return this.curves.push(n), this.currentPoint.set(t, e), this; }, quadraticCurveTo: function (t, e, n, i) { var r = new Hc(this.currentPoint.clone(), new Re(t, e), new Re(n, i)); return this.curves.push(r), this.currentPoint.set(n, i), this; }, bezierCurveTo: function (t, e, n, i, r, a) { var o = new Vc(this.currentPoint.clone(), new Re(t, e), new Re(n, i), new Re(r, a)); return this.curves.push(o), this.currentPoint.set(r, a), this; }, splineThru: function (t) { var e = new Jc([this.currentPoint.clone()].concat(t)); return this.curves.push(e), this.currentPoint.copy(t[t.length - 1]), this; }, arc: function (t, e, n, i, r, a) { var o = this.currentPoint.x, s = this.currentPoint.y; return this.absarc(t + o, e + s, n, i, r, a), this; }, absarc: function (t, e, n, i, r, a) { return this.absellipse(t, e, n, n, i, r, a), this; }, ellipse: function (t, e, n, i, r, a, o, s) { var l = this.currentPoint.x, c = this.currentPoint.y; return this.absellipse(t + l, e + c, n, i, r, a, o, s), this; }, absellipse: function (t, e, n, i, r, a, o, s) { var l = new Dc(t, e, n, i, r, a, o, s); if (0 < this.curves.length) {
4306
+ this.lineTo(t[e].x, t[e].y); return this; }, moveTo: function (t, e) { return this.currentPoint.set(t, e), this; }, lineTo: function (t, e) { var n = new Uc(this.currentPoint.clone(), new Re(t, e)); return this.curves.push(n), this.currentPoint.set(t, e), this; }, quadraticCurveTo: function (t, e, n, i) { var r = new Hc(this.currentPoint.clone(), new Re(t, e), new Re(n, i)); return this.curves.push(r), this.currentPoint.set(n, i), this; }, bezierCurveTo: function (t, e, n, i, r, a) { var o = new jc(this.currentPoint.clone(), new Re(t, e), new Re(n, i), new Re(r, a)); return this.curves.push(o), this.currentPoint.set(r, a), this; }, splineThru: function (t) { var e = new Jc([this.currentPoint.clone()].concat(t)); return this.curves.push(e), this.currentPoint.copy(t[t.length - 1]), this; }, arc: function (t, e, n, i, r, a) { var o = this.currentPoint.x, s = this.currentPoint.y; return this.absarc(t + o, e + s, n, i, r, a), this; }, absarc: function (t, e, n, i, r, a) { return this.absellipse(t, e, n, n, i, r, a), this; }, ellipse: function (t, e, n, i, r, a, o, s) { var l = this.currentPoint.x, c = this.currentPoint.y; return this.absellipse(t + l, e + c, n, i, r, a, o, s), this; }, absellipse: function (t, e, n, i, r, a, o, s) { var l = new Dc(t, e, n, i, r, a, o, s); if (0 < this.curves.length) {
4307
4307
  var c = l.getPoint(0);
4308
4308
  c.equals(this.currentPoint) || this.lineTo(c.x, c.y);
4309
4309
  } this.curves.push(l); var u = l.getPoint(1); return this.currentPoint.copy(u), this; }, copy: function (t) { return Xc.prototype.copy.call(this, t), this.currentPoint.copy(t.currentPoint), this; }, toJSON: function () { var t = Xc.prototype.toJSON.call(this); return t.currentPoint = this.currentPoint.toArray(), t; }, fromJSON: function (t) { return Xc.prototype.fromJSON.call(this, t), this.currentPoint.fromArray(t.currentPoint), this; } }), Zc.prototype = Object.assign(Object.create(Yc.prototype), { constructor: Zc, getPointsHoles: function (t) { for (var e = [], n = 0, i = this.holes.length; n < i; n++)
@@ -4540,7 +4540,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4540
4540
  return void 0 === a[t] && console.warn("THREE.ObjectLoader: Undefined material", t), a[t];
4541
4541
  } } switch (t.type) {
4542
4542
  case "Scene":
4543
- n = new xn, void 0 !== t.background && Number.isInteger(t.background) && (n.background = new ci(t.background)), void 0 !== t.fog && ("Fog" === t.fog.type ? n.fog = new Oo(t.fog.color, t.fog.near, t.fog.far) : "FogExp2" === t.fog.type && (n.fog = new Lo(t.fog.color, t.fog.density)));
4543
+ n = new xn, void 0 !== t.background && Number.isInteger(t.background) && (n.background = new ci(t.background)), void 0 !== t.fog && ("Fog" === t.fog.type ? n.fog = new Lo(t.fog.color, t.fog.near, t.fog.far) : "FogExp2" === t.fog.type && (n.fog = new Oo(t.fog.color, t.fog.density)));
4544
4544
  break;
4545
4545
  case "PerspectiveCamera":
4546
4546
  n = new yr(t.fov, t.aspect, t.near, t.far), void 0 !== t.focus && (n.focus = t.focus), void 0 !== t.zoom && (n.zoom = t.zoom), void 0 !== t.filmGauge && (n.filmGauge = t.filmGauge), void 0 !== t.filmOffset && (n.filmOffset = t.filmOffset), void 0 !== t.view && (n.view = Object.assign({}, t.view));
@@ -4608,7 +4608,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4608
4608
  void 0 !== m && n.addLevel(m, f.distance);
4609
4609
  }
4610
4610
  } return n; } });
4611
- var gu, vu = { UVMapping: 300, CubeReflectionMapping: Ot, CubeRefractionMapping: It, EquirectangularReflectionMapping: Pt, EquirectangularRefractionMapping: Rt, SphericalReflectionMapping: kt, CubeUVReflectionMapping: Nt, CubeUVRefractionMapping: Bt }, yu = { RepeatWrapping: Ft, ClampToEdgeWrapping: zt, MirroredRepeatWrapping: Vt }, xu = { NearestFilter: Ut, NearestMipmapNearestFilter: jt, NearestMipmapLinearFilter: Gt, LinearFilter: Ht, LinearMipmapNearestFilter: Wt, LinearMipmapLinearFilter: Jt };
4611
+ var gu, vu = { UVMapping: 300, CubeReflectionMapping: Lt, CubeRefractionMapping: It, EquirectangularReflectionMapping: Pt, EquirectangularRefractionMapping: Rt, SphericalReflectionMapping: kt, CubeUVReflectionMapping: Nt, CubeUVRefractionMapping: Bt }, yu = { RepeatWrapping: Ft, ClampToEdgeWrapping: zt, MirroredRepeatWrapping: jt }, xu = { NearestFilter: Vt, NearestMipmapNearestFilter: Ut, NearestMipmapLinearFilter: Gt, LinearFilter: Ht, LinearMipmapNearestFilter: Wt, LinearMipmapLinearFilter: Jt };
4612
4612
  function _u(t) { "undefined" == typeof createImageBitmap && console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."), "undefined" == typeof fetch && console.warn("THREE.ImageBitmapLoader: fetch() not supported."), xc.call(this, t), this.options = void 0; }
4613
4613
  function wu() { this.type = "ShapePath", this.color = new ci, this.subPaths = [], this.currentPath = null; }
4614
4614
  function bu(t) { this.type = "Font", this.data = t; }
@@ -4677,7 +4677,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4677
4677
  0 < _.length && (x || (m = p));
4678
4678
  } v = 0; for (var A = f.length; v < A; v++) {
4679
4679
  l = f[v].s, c.push(l);
4680
- for (var D = 0, L = (d = m[v]).length; D < L; D++)
4680
+ for (var D = 0, O = (d = m[v]).length; D < O; D++)
4681
4681
  l.holes.push(d[D].h);
4682
4682
  } return c; } }), Object.assign(bu.prototype, { isFont: !0, generateShapes: function (t, e) { void 0 === e && (e = 100); for (var n = [], i = function (t, e, n) { for (var i = Array.from ? Array.from(t) : String(t).split(""), r = e / n.resolution, a = (n.boundingBox.yMax - n.boundingBox.yMin + n.underlineThickness) * r, o = [], s = 0, l = 0, c = 0; c < i.length; c++) {
4683
4683
  var u = i[c];
@@ -4700,7 +4700,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4700
4700
  this.coefficients.push(new We); }
4701
4701
  function Au(t, e) { $c.call(this, void 0, e), this.sh = void 0 !== t ? t : new Eu; }
4702
4702
  function Du(t, e, n) { Au.call(this, void 0, n); var i = (new ci).set(t), r = (new ci).set(e), a = new We(i.r, i.g, i.b), o = new We(r.r, r.g, r.b), s = Math.sqrt(Math.PI), l = s * Math.sqrt(.75); this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s), this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(l); }
4703
- function Lu(t, e) { Au.call(this, void 0, e); var n = (new ci).set(t); this.sh.coefficients[0].set(n.r, n.g, n.b).multiplyScalar(2 * Math.sqrt(Math.PI)); }
4703
+ function Ou(t, e) { Au.call(this, void 0, e); var n = (new ci).set(t); this.sh.coefficients[0].set(n.r, n.g, n.b).multiplyScalar(2 * Math.sqrt(Math.PI)); }
4704
4704
  Tu.prototype = Object.assign(Object.create(xc.prototype), { constructor: Tu, load: function (t, n, e, i) { var r = new wc(this.manager); r.setResponseType("arraybuffer"), r.setPath(this.path), r.load(t, function (t) { var e = t.slice(0); Cu.getContext().decodeAudioData(e, function (t) { n(t); }); }, e, i); } }), Object.assign(Eu.prototype, { isSphericalHarmonics3: !0, set: function (t) { for (var e = 0; e < 9; e++)
4705
4705
  this.coefficients[e].copy(t[e]); return this; }, zero: function () { for (var t = 0; t < 9; t++)
4706
4706
  this.coefficients[t].set(0, 0, 0); return this; }, getAt: function (t, e) { var n = t.x, i = t.y, r = t.z, a = this.coefficients; return e.copy(a[0]).multiplyScalar(.282095), e.addScale(a[1], .488603 * i), e.addScale(a[2], .488603 * r), e.addScale(a[3], .488603 * n), e.addScale(a[4], n * i * 1.092548), e.addScale(a[5], i * r * 1.092548), e.addScale(a[6], .315392 * (3 * r * r - 1)), e.addScale(a[7], n * r * 1.092548), e.addScale(a[8], .546274 * (n * n - i * i)), e; }, getIrradianceAt: function (t, e) { var n = t.x, i = t.y, r = t.z, a = this.coefficients; return e.copy(a[0]).multiplyScalar(.886227), e.addScale(a[1], 1.023328 * i), e.addScale(a[2], 1.023328 * r), e.addScale(a[3], 1.023328 * n), e.addScale(a[4], .858086 * n * i), e.addScale(a[5], .858086 * i * r), e.addScale(a[6], .743125 * r * r - .247708), e.addScale(a[7], .858086 * n * r), e.addScale(a[8], .429043 * (n * n - i * i)), e; }, add: function (t) { for (var e = 0; e < 9; e++)
@@ -4710,28 +4710,28 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4710
4710
  if (!this.coefficients[e].equals(t.coefficients[e]))
4711
4711
  return !1; return !0; }, copy: function (t) { return this.set(t.coefficients); }, clone: function () { return (new this.constructor).copy(this); }, fromArray: function (t, e) { void 0 === e && (e = 0); for (var n = this.coefficients, i = 0; i < 9; i++)
4712
4712
  n[i].fromArray(t, e + 3 * i); return this; }, toArray: function (t, e) { void 0 === t && (t = []), void 0 === e && (e = 0); for (var n = this.coefficients, i = 0; i < 9; i++)
4713
- n[i].toArray(t, e + 3 * i); return t; } }), Object.assign(Eu, { getBasisAt: function (t, e) { var n = t.x, i = t.y, r = t.z; e[0] = .282095, e[1] = .488603 * i, e[2] = .488603 * r, e[3] = .488603 * n, e[4] = 1.092548 * n * i, e[5] = 1.092548 * i * r, e[6] = .315392 * (3 * r * r - 1), e[7] = 1.092548 * n * r, e[8] = .546274 * (n * n - i * i); } }), Au.prototype = Object.assign(Object.create($c.prototype), { constructor: Au, isLightProbe: !0, copy: function (t) { return $c.prototype.copy.call(this, t), this.sh.copy(t.sh), this.intensity = t.intensity, this; }, toJSON: function (t) { return $c.prototype.toJSON.call(this, t); } }), Du.prototype = Object.assign(Object.create(Au.prototype), { constructor: Du, isHemisphereLightProbe: !0, copy: function (t) { return Au.prototype.copy.call(this, t), this; }, toJSON: function (t) { return Au.prototype.toJSON.call(this, t); } }), Lu.prototype = Object.assign(Object.create(Au.prototype), { constructor: Lu, isAmbientLightProbe: !0, copy: function (t) { return Au.prototype.copy.call(this, t), this; }, toJSON: function (t) { return Au.prototype.toJSON.call(this, t); } });
4714
- var Ou = new Qe, Iu = new Qe;
4713
+ n[i].toArray(t, e + 3 * i); return t; } }), Object.assign(Eu, { getBasisAt: function (t, e) { var n = t.x, i = t.y, r = t.z; e[0] = .282095, e[1] = .488603 * i, e[2] = .488603 * r, e[3] = .488603 * n, e[4] = 1.092548 * n * i, e[5] = 1.092548 * i * r, e[6] = .315392 * (3 * r * r - 1), e[7] = 1.092548 * n * r, e[8] = .546274 * (n * n - i * i); } }), Au.prototype = Object.assign(Object.create($c.prototype), { constructor: Au, isLightProbe: !0, copy: function (t) { return $c.prototype.copy.call(this, t), this.sh.copy(t.sh), this.intensity = t.intensity, this; }, toJSON: function (t) { return $c.prototype.toJSON.call(this, t); } }), Du.prototype = Object.assign(Object.create(Au.prototype), { constructor: Du, isHemisphereLightProbe: !0, copy: function (t) { return Au.prototype.copy.call(this, t), this; }, toJSON: function (t) { return Au.prototype.toJSON.call(this, t); } }), Ou.prototype = Object.assign(Object.create(Au.prototype), { constructor: Ou, isAmbientLightProbe: !0, copy: function (t) { return Au.prototype.copy.call(this, t), this; }, toJSON: function (t) { return Au.prototype.toJSON.call(this, t); } });
4714
+ var Lu = new Qe, Iu = new Qe;
4715
4715
  function Pu() { this.type = "StereoCamera", this.aspect = 1, this.eyeSep = .064, this.cameraL = new yr, this.cameraL.layers.enable(1), this.cameraL.matrixAutoUpdate = !1, this.cameraR = new yr, this.cameraR.layers.enable(2), this.cameraR.matrixAutoUpdate = !1, this._cache = { focus: null, fov: null, aspect: null, near: null, far: null, zoom: null, eyeSep: null }; }
4716
4716
  function Ru(t) { this.autoStart = void 0 === t || t, this.startTime = 0, this.oldTime = 0, this.elapsedTime = 0, this.running = !1; }
4717
4717
  Object.assign(Pu.prototype, { update: function (t) { var e = this._cache; if (e.focus !== t.focus || e.fov !== t.fov || e.aspect !== t.aspect * this.aspect || e.near !== t.near || e.far !== t.far || e.zoom !== t.zoom || e.eyeSep !== this.eyeSep) {
4718
4718
  e.focus = t.focus, e.fov = t.fov, e.aspect = t.aspect * this.aspect, e.near = t.near, e.far = t.far, e.zoom = t.zoom, e.eyeSep = this.eyeSep;
4719
4719
  var n, i, r = t.projectionMatrix.clone(), a = e.eyeSep / 2, o = a * e.near / e.focus, s = e.near * Math.tan(Pe.DEG2RAD * e.fov * .5) / e.zoom;
4720
- Iu.elements[12] = -a, Ou.elements[12] = a, n = -s * e.aspect + o, i = s * e.aspect + o, r.elements[0] = 2 * e.near / (i - n), r.elements[8] = (i + n) / (i - n), this.cameraL.projectionMatrix.copy(r), n = -s * e.aspect - o, i = s * e.aspect - o, r.elements[0] = 2 * e.near / (i - n), r.elements[8] = (i + n) / (i - n), this.cameraR.projectionMatrix.copy(r);
4721
- } this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Iu), this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Ou); } }), Object.assign(Ru.prototype, { start: function () { this.startTime = ("undefined" == typeof performance ? Date : performance).now(), this.oldTime = this.startTime, this.elapsedTime = 0, this.running = !0; }, stop: function () { this.getElapsedTime(), this.running = !1, this.autoStart = !1; }, getElapsedTime: function () { return this.getDelta(), this.elapsedTime; }, getDelta: function () { var t = 0; if (this.autoStart && !this.running)
4720
+ Iu.elements[12] = -a, Lu.elements[12] = a, n = -s * e.aspect + o, i = s * e.aspect + o, r.elements[0] = 2 * e.near / (i - n), r.elements[8] = (i + n) / (i - n), this.cameraL.projectionMatrix.copy(r), n = -s * e.aspect - o, i = s * e.aspect - o, r.elements[0] = 2 * e.near / (i - n), r.elements[8] = (i + n) / (i - n), this.cameraR.projectionMatrix.copy(r);
4721
+ } this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Iu), this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(Lu); } }), Object.assign(Ru.prototype, { start: function () { this.startTime = ("undefined" == typeof performance ? Date : performance).now(), this.oldTime = this.startTime, this.elapsedTime = 0, this.running = !0; }, stop: function () { this.getElapsedTime(), this.running = !1, this.autoStart = !1; }, getElapsedTime: function () { return this.getDelta(), this.elapsedTime; }, getDelta: function () { var t = 0; if (this.autoStart && !this.running)
4722
4722
  return this.start(), 0; if (this.running) {
4723
4723
  var e = ("undefined" == typeof performance ? Date : performance).now();
4724
4724
  t = (e - this.oldTime) / 1e3, this.oldTime = e, this.elapsedTime += t;
4725
4725
  } return t; } });
4726
- var ku = new We, Nu = new je, Bu = new We, Fu = new We;
4726
+ var ku = new We, Nu = new Ue, Bu = new We, Fu = new We;
4727
4727
  function zu() { yn.call(this), this.type = "AudioListener", this.context = Cu.getContext(), this.gain = this.context.createGain(), this.gain.connect(this.context.destination), this.filter = null, this.timeDelta = 0, this._clock = new Ru; }
4728
- function Vu(t) { yn.call(this), this.type = "Audio", this.listener = t, this.context = t.context, this.gain = this.context.createGain(), this.gain.connect(t.getInput()), this.autoplay = !1, this.buffer = null, this.detune = 0, this.loop = !1, this.loopStart = 0, this.loopEnd = 0, this.offset = 0, this.duration = void 0, this.playbackRate = 1, this.isPlaying = !1, this.hasPlaybackControl = !0, this.sourceType = "empty", this._startedAt = 0, this._pausedAt = 0, this.filters = []; }
4728
+ function ju(t) { yn.call(this), this.type = "Audio", this.listener = t, this.context = t.context, this.gain = this.context.createGain(), this.gain.connect(t.getInput()), this.autoplay = !1, this.buffer = null, this.detune = 0, this.loop = !1, this.loopStart = 0, this.loopEnd = 0, this.offset = 0, this.duration = void 0, this.playbackRate = 1, this.isPlaying = !1, this.hasPlaybackControl = !0, this.sourceType = "empty", this._startedAt = 0, this._pausedAt = 0, this.filters = []; }
4729
4729
  zu.prototype = Object.assign(Object.create(yn.prototype), { constructor: zu, getInput: function () { return this.gain; }, removeFilter: function () { return null !== this.filter && (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination), this.gain.connect(this.context.destination), this.filter = null), this; }, getFilter: function () { return this.filter; }, setFilter: function (t) { return null !== this.filter ? (this.gain.disconnect(this.filter), this.filter.disconnect(this.context.destination)) : this.gain.disconnect(this.context.destination), this.filter = t, this.gain.connect(this.filter), this.filter.connect(this.context.destination), this; }, getMasterVolume: function () { return this.gain.gain.value; }, setMasterVolume: function (t) { return this.gain.gain.setTargetAtTime(t, this.context.currentTime, .01), this; }, updateMatrixWorld: function (t) { yn.prototype.updateMatrixWorld.call(this, t); var e = this.context.listener, n = this.up; if (this.timeDelta = this._clock.getDelta(), this.matrixWorld.decompose(ku, Nu, Bu), Fu.set(0, 0, -1).applyQuaternion(Nu), e.positionX) {
4730
4730
  var i = this.context.currentTime + this.timeDelta;
4731
4731
  e.positionX.linearRampToValueAtTime(ku.x, i), e.positionY.linearRampToValueAtTime(ku.y, i), e.positionZ.linearRampToValueAtTime(ku.z, i), e.forwardX.linearRampToValueAtTime(Fu.x, i), e.forwardY.linearRampToValueAtTime(Fu.y, i), e.forwardZ.linearRampToValueAtTime(Fu.z, i), e.upX.linearRampToValueAtTime(n.x, i), e.upY.linearRampToValueAtTime(n.y, i), e.upZ.linearRampToValueAtTime(n.z, i);
4732
4732
  }
4733
4733
  else
4734
- e.setPosition(ku.x, ku.y, ku.z), e.setOrientation(Fu.x, Fu.y, Fu.z, n.x, n.y, n.z); } }), Vu.prototype = Object.assign(Object.create(yn.prototype), { constructor: Vu, getOutput: function () { return this.gain; }, setNodeSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "audioNode", this.source = t, this.connect(), this; }, setMediaElementSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "mediaNode", this.source = this.context.createMediaElementSource(t), this.connect(), this; }, setMediaStreamSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "mediaStreamNode", this.source = this.context.createMediaStreamSource(t), this.connect(), this; }, setBuffer: function (t) { return this.buffer = t, this.sourceType = "buffer", this.autoplay && this.play(), this; }, play: function (t) { if (void 0 === t && (t = 0), !0 !== this.isPlaying) {
4734
+ e.setPosition(ku.x, ku.y, ku.z), e.setOrientation(Fu.x, Fu.y, Fu.z, n.x, n.y, n.z); } }), ju.prototype = Object.assign(Object.create(yn.prototype), { constructor: ju, getOutput: function () { return this.gain; }, setNodeSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "audioNode", this.source = t, this.connect(), this; }, setMediaElementSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "mediaNode", this.source = this.context.createMediaElementSource(t), this.connect(), this; }, setMediaStreamSource: function (t) { return this.hasPlaybackControl = !1, this.sourceType = "mediaStreamNode", this.source = this.context.createMediaStreamSource(t), this.connect(), this; }, setBuffer: function (t) { return this.buffer = t, this.sourceType = "buffer", this.autoplay && this.play(), this; }, play: function (t) { if (void 0 === t && (t = 0), !0 !== this.isPlaying) {
4735
4735
  if (!1 !== this.hasPlaybackControl) {
4736
4736
  this._startedAt = this.context.currentTime + t;
4737
4737
  var e = this.context.createBufferSource();
@@ -4760,8 +4760,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4760
4760
  return !0 === this.isPlaying && this.source.detune.setTargetAtTime(this.detune, this.context.currentTime, .01), this; }, getDetune: function () { return this.detune; }, getFilter: function () { return this.getFilters()[0]; }, setFilter: function (t) { return this.setFilters(t ? [t] : []); }, setPlaybackRate: function (t) { if (!1 !== this.hasPlaybackControl)
4761
4761
  return this.playbackRate = t, !0 === this.isPlaying && this.source.playbackRate.setTargetAtTime(this.playbackRate, this.context.currentTime, .01), this; console.warn("THREE.Audio: this Audio has no playback control."); }, getPlaybackRate: function () { return this.playbackRate; }, onEnded: function () { this.isPlaying = !1; }, getLoop: function () { return !1 === this.hasPlaybackControl ? (console.warn("THREE.Audio: this Audio has no playback control."), !1) : this.loop; }, setLoop: function (t) { if (!1 !== this.hasPlaybackControl)
4762
4762
  return this.loop = t, !0 === this.isPlaying && (this.source.loop = this.loop), this; console.warn("THREE.Audio: this Audio has no playback control."); }, setLoopStart: function (t) { return this.loopStart = t, this; }, setLoopEnd: function (t) { return this.loopEnd = t, this; }, getVolume: function () { return this.gain.gain.value; }, setVolume: function (t) { return this.gain.gain.setTargetAtTime(t, this.context.currentTime, .01), this; } });
4763
- var Uu = new We, ju = new je, Gu = new We, Hu = new We;
4764
- function Wu(t) { Vu.call(this, t), this.panner = this.context.createPanner(), this.panner.panningModel = "HRTF", this.panner.connect(this.gain); }
4763
+ var Vu = new We, Uu = new Ue, Gu = new We, Hu = new We;
4764
+ function Wu(t) { ju.call(this, t), this.panner = this.context.createPanner(), this.panner.panningModel = "HRTF", this.panner.connect(this.gain); }
4765
4765
  function Ju(t, e) { this.analyser = t.context.createAnalyser(), this.analyser.fftSize = void 0 !== e ? e : 2048, this.data = new Uint8Array(this.analyser.frequencyBinCount), t.getOutput().connect(this.analyser); }
4766
4766
  function qu(t, e, n) { this.binding = t, this.valueSize = n; var i, r = Float64Array; switch (e) {
4767
4767
  case "quaternion":
@@ -4773,15 +4773,15 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4773
4773
  break;
4774
4774
  default: i = this._lerp;
4775
4775
  } this.buffer = new r(4 * n), this._mixBufferRegion = i, this.cumulativeWeight = 0, this.useCount = 0, this.referenceCount = 0; }
4776
- Wu.prototype = Object.assign(Object.create(Vu.prototype), { constructor: Wu, getOutput: function () { return this.panner; }, getRefDistance: function () { return this.panner.refDistance; }, setRefDistance: function (t) { return this.panner.refDistance = t, this; }, getRolloffFactor: function () { return this.panner.rolloffFactor; }, setRolloffFactor: function (t) { return this.panner.rolloffFactor = t, this; }, getDistanceModel: function () { return this.panner.distanceModel; }, setDistanceModel: function (t) { return this.panner.distanceModel = t, this; }, getMaxDistance: function () { return this.panner.maxDistance; }, setMaxDistance: function (t) { return this.panner.maxDistance = t, this; }, setDirectionalCone: function (t, e, n) { return this.panner.coneInnerAngle = t, this.panner.coneOuterAngle = e, this.panner.coneOuterGain = n, this; }, updateMatrixWorld: function (t) { if (yn.prototype.updateMatrixWorld.call(this, t), !0 !== this.hasPlaybackControl || !1 !== this.isPlaying) {
4777
- this.matrixWorld.decompose(Uu, ju, Gu), Hu.set(0, 0, 1).applyQuaternion(ju);
4776
+ Wu.prototype = Object.assign(Object.create(ju.prototype), { constructor: Wu, getOutput: function () { return this.panner; }, getRefDistance: function () { return this.panner.refDistance; }, setRefDistance: function (t) { return this.panner.refDistance = t, this; }, getRolloffFactor: function () { return this.panner.rolloffFactor; }, setRolloffFactor: function (t) { return this.panner.rolloffFactor = t, this; }, getDistanceModel: function () { return this.panner.distanceModel; }, setDistanceModel: function (t) { return this.panner.distanceModel = t, this; }, getMaxDistance: function () { return this.panner.maxDistance; }, setMaxDistance: function (t) { return this.panner.maxDistance = t, this; }, setDirectionalCone: function (t, e, n) { return this.panner.coneInnerAngle = t, this.panner.coneOuterAngle = e, this.panner.coneOuterGain = n, this; }, updateMatrixWorld: function (t) { if (yn.prototype.updateMatrixWorld.call(this, t), !0 !== this.hasPlaybackControl || !1 !== this.isPlaying) {
4777
+ this.matrixWorld.decompose(Vu, Uu, Gu), Hu.set(0, 0, 1).applyQuaternion(Uu);
4778
4778
  var e = this.panner;
4779
4779
  if (e.positionX) {
4780
4780
  var n = this.context.currentTime + this.listener.timeDelta;
4781
- e.positionX.linearRampToValueAtTime(Uu.x, n), e.positionY.linearRampToValueAtTime(Uu.y, n), e.positionZ.linearRampToValueAtTime(Uu.z, n), e.orientationX.linearRampToValueAtTime(Hu.x, n), e.orientationY.linearRampToValueAtTime(Hu.y, n), e.orientationZ.linearRampToValueAtTime(Hu.z, n);
4781
+ e.positionX.linearRampToValueAtTime(Vu.x, n), e.positionY.linearRampToValueAtTime(Vu.y, n), e.positionZ.linearRampToValueAtTime(Vu.z, n), e.orientationX.linearRampToValueAtTime(Hu.x, n), e.orientationY.linearRampToValueAtTime(Hu.y, n), e.orientationZ.linearRampToValueAtTime(Hu.z, n);
4782
4782
  }
4783
4783
  else
4784
- e.setPosition(Uu.x, Uu.y, Uu.z), e.setOrientation(Hu.x, Hu.y, Hu.z);
4784
+ e.setPosition(Vu.x, Vu.y, Vu.z), e.setOrientation(Hu.x, Hu.y, Hu.z);
4785
4785
  } } }), Object.assign(Ju.prototype, { getFrequencyData: function () { return this.analyser.getByteFrequencyData(this.data), this.data; }, getAverageFrequency: function () { for (var t = 0, e = this.getFrequencyData(), n = 0; n < e.length; n++)
4786
4786
  t += e[n]; return t / e.length; } }), Object.assign(qu.prototype, { accumulate: function (t, e) { var n = this.buffer, i = this.valueSize, r = t * i + i, a = this.cumulativeWeight; if (0 === a) {
4787
4787
  for (var o = 0; o !== i; ++o)
@@ -4801,7 +4801,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
4801
4801
  } }, saveOriginalState: function () { var t = this.binding, e = this.buffer, n = this.valueSize, i = 3 * n; t.getValue(e, i); for (var r = n, a = i; r !== a; ++r)
4802
4802
  e[r] = e[i + r % n]; this.cumulativeWeight = 0; }, restoreOriginalState: function () { var t = 3 * this.valueSize; this.binding.setValue(this.buffer, t); }, _select: function (t, e, n, i, r) { if (.5 <= i)
4803
4803
  for (var a = 0; a !== r; ++a)
4804
- t[e + a] = t[n + a]; }, _slerp: function (t, e, n, i) { je.slerpFlat(t, e, t, e, t, n, i); }, _lerp: function (t, e, n, i, r) { for (var a = 1 - i, o = 0; o !== r; ++o) {
4804
+ t[e + a] = t[n + a]; }, _slerp: function (t, e, n, i) { Ue.slerpFlat(t, e, t, e, t, n, i); }, _lerp: function (t, e, n, i, r) { for (var a = 1 - i, o = 0; o !== r; ++o) {
4805
4805
  var s = e + o;
4806
4806
  t[s] = t[s] * a + t[n + o] * i;
4807
4807
  } } });
@@ -5137,8 +5137,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5137
5137
  var o = e[r];
5138
5138
  o.parent && o.parent.isBone && (Ch.multiplyMatrices(Th, o.matrixWorld), Sh.setFromMatrixPosition(Ch), i.setXYZ(a, Sh.x, Sh.y, Sh.z), Ch.multiplyMatrices(Th, o.parent.matrixWorld), Sh.setFromMatrixPosition(Ch), i.setXYZ(a + 1, Sh.x, Sh.y, Sh.z), a += 2);
5139
5139
  } n.getAttribute("position").needsUpdate = !0, yn.prototype.updateMatrixWorld.call(this, t); }, ((Ah.prototype = Object.create(er.prototype)).constructor = Ah).prototype.dispose = function () { this.geometry.dispose(), this.material.dispose(); }, Ah.prototype.update = function () { void 0 !== this.color ? this.material.color.set(this.color) : this.material.color.copy(this.light.color); };
5140
- var Dh = new We, Lh = new ci, Oh = new ci;
5141
- function Ih(t, e, n) { yn.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = n; var i = new Vs(e); i.rotateY(.5 * Math.PI), this.material = new gi({ wireframe: !0, fog: !1 }), void 0 === this.color && (this.material.vertexColors = v); var r = i.getAttribute("position"), a = new Float32Array(3 * r.count); i.setAttribute("color", new yi(a, 3)), this.add(new er(i, this.material)), this.update(); }
5140
+ var Dh = new We, Oh = new ci, Lh = new ci;
5141
+ function Ih(t, e, n) { yn.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = n; var i = new js(e); i.rotateY(.5 * Math.PI), this.material = new gi({ wireframe: !0, fog: !1 }), void 0 === this.color && (this.material.vertexColors = v); var r = i.getAttribute("position"), a = new Float32Array(3 * r.count); i.setAttribute("color", new yi(a, 3)), this.add(new er(i, this.material)), this.update(); }
5142
5142
  function Ph(t, e, n, i) { t = t || 10, e = e || 10, n = new ci(void 0 !== n ? n : 4473924), i = new ci(void 0 !== i ? i : 8947848); for (var r = e / 2, a = t / e, o = t / 2, s = [], l = [], c = 0, u = 0, h = -o; c <= e; c++, h += a) {
5143
5143
  s.push(-o, 0, h, o, 0, h), s.push(h, 0, -o, h, 0, o);
5144
5144
  var d = c === r ? n : i;
@@ -5152,9 +5152,9 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5152
5152
  this.material.color.set(this.color);
5153
5153
  else {
5154
5154
  var e = t.geometry.getAttribute("color");
5155
- Lh.copy(this.light.color), Oh.copy(this.light.groundColor);
5155
+ Oh.copy(this.light.color), Lh.copy(this.light.groundColor);
5156
5156
  for (var n = 0, i = e.count; n < i; n++) {
5157
- var r = n < i / 2 ? Lh : Oh;
5157
+ var r = n < i / 2 ? Oh : Lh;
5158
5158
  e.setXYZ(n, r.r, r.g, r.b);
5159
5159
  }
5160
5160
  e.needsUpdate = !0;
@@ -5162,12 +5162,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5162
5162
  var kh = new We, Nh = new We, Bh = new We;
5163
5163
  function Fh(t, e, n) { yn.call(this), this.light = t, this.light.updateMatrixWorld(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.color = n, void 0 === e && (e = 1); var i = new Bi; i.setAttribute("position", new Ti([-e, e, 0, e, e, 0, e, -e, 0, -e, -e, 0, -e, e, 0], 3)); var r = new us({ fog: !1 }); this.lightPlane = new gs(i, r), this.add(this.lightPlane), (i = new Bi).setAttribute("position", new Ti([0, 0, 0, 0, 0, 1], 3)), this.targetLine = new gs(i, r), this.add(this.targetLine), this.update(); }
5164
5164
  ((Fh.prototype = Object.create(yn.prototype)).constructor = Fh).prototype.dispose = function () { this.lightPlane.geometry.dispose(), this.lightPlane.material.dispose(), this.targetLine.geometry.dispose(), this.targetLine.material.dispose(); }, Fh.prototype.update = function () { kh.setFromMatrixPosition(this.light.matrixWorld), Nh.setFromMatrixPosition(this.light.target.matrixWorld), Bh.subVectors(Nh, kh), this.lightPlane.lookAt(Nh), void 0 !== this.color ? (this.lightPlane.material.color.set(this.color), this.targetLine.material.color.set(this.color)) : (this.lightPlane.material.color.copy(this.light.color), this.targetLine.material.color.copy(this.light.color)), this.targetLine.lookAt(Nh), this.targetLine.scale.z = Bh.length(); };
5165
- var zh = new We, Vh = new vr;
5166
- function Uh(t) { var e = new Bi, n = new us({ color: 16777215, vertexColors: 1 }), i = [], r = [], a = {}, o = new ci(16755200), s = new ci(16711680), l = new ci(43775), c = new ci(16777215), u = new ci(3355443); function h(t, e, n) { d(t, n), d(e, n); } function d(t, e) { i.push(0, 0, 0), r.push(e.r, e.g, e.b), void 0 === a[t] && (a[t] = []), a[t].push(i.length / 3 - 1); } h("n1", "n2", o), h("n2", "n4", o), h("n4", "n3", o), h("n3", "n1", o), h("f1", "f2", o), h("f2", "f4", o), h("f4", "f3", o), h("f3", "f1", o), h("n1", "f1", o), h("n2", "f2", o), h("n3", "f3", o), h("n4", "f4", o), h("p", "n1", s), h("p", "n2", s), h("p", "n3", s), h("p", "n4", s), h("u1", "u2", l), h("u2", "u3", l), h("u3", "u1", l), h("c", "t", c), h("p", "c", u), h("cn1", "cn2", u), h("cn3", "cn4", u), h("cf1", "cf2", u), h("cf3", "cf4", u), e.setAttribute("position", new Ti(i, 3)), e.setAttribute("color", new Ti(r, 3)), xs.call(this, e, n), this.camera = t, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = a, this.update(); }
5167
- function jh(t, e, n, i, r, a, o) { zh.set(r, a, o).unproject(i); var s = e[t]; if (void 0 !== s)
5165
+ var zh = new We, jh = new vr;
5166
+ function Vh(t) { var e = new Bi, n = new us({ color: 16777215, vertexColors: 1 }), i = [], r = [], a = {}, o = new ci(16755200), s = new ci(16711680), l = new ci(43775), c = new ci(16777215), u = new ci(3355443); function h(t, e, n) { d(t, n), d(e, n); } function d(t, e) { i.push(0, 0, 0), r.push(e.r, e.g, e.b), void 0 === a[t] && (a[t] = []), a[t].push(i.length / 3 - 1); } h("n1", "n2", o), h("n2", "n4", o), h("n4", "n3", o), h("n3", "n1", o), h("f1", "f2", o), h("f2", "f4", o), h("f4", "f3", o), h("f3", "f1", o), h("n1", "f1", o), h("n2", "f2", o), h("n3", "f3", o), h("n4", "f4", o), h("p", "n1", s), h("p", "n2", s), h("p", "n3", s), h("p", "n4", s), h("u1", "u2", l), h("u2", "u3", l), h("u3", "u1", l), h("c", "t", c), h("p", "c", u), h("cn1", "cn2", u), h("cn3", "cn4", u), h("cf1", "cf2", u), h("cf3", "cf4", u), e.setAttribute("position", new Ti(i, 3)), e.setAttribute("color", new Ti(r, 3)), xs.call(this, e, n), this.camera = t, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = t.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = a, this.update(); }
5167
+ function Uh(t, e, n, i, r, a, o) { zh.set(r, a, o).unproject(i); var s = e[t]; if (void 0 !== s)
5168
5168
  for (var l = n.getAttribute("position"), c = 0, u = s.length; c < u; c++)
5169
5169
  l.setXYZ(s[c], zh.x, zh.y, zh.z); }
5170
- ((Uh.prototype = Object.create(xs.prototype)).constructor = Uh).prototype.update = function () { var t = this.geometry, e = this.pointMap; Vh.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), jh("c", e, t, Vh, 0, 0, -1), jh("t", e, t, Vh, 0, 0, 1), jh("n1", e, t, Vh, -1, -1, -1), jh("n2", e, t, Vh, 1, -1, -1), jh("n3", e, t, Vh, -1, 1, -1), jh("n4", e, t, Vh, 1, 1, -1), jh("f1", e, t, Vh, -1, -1, 1), jh("f2", e, t, Vh, 1, -1, 1), jh("f3", e, t, Vh, -1, 1, 1), jh("f4", e, t, Vh, 1, 1, 1), jh("u1", e, t, Vh, .7, 1.1, -1), jh("u2", e, t, Vh, -.7, 1.1, -1), jh("u3", e, t, Vh, 0, 2, -1), jh("cf1", e, t, Vh, -1, 0, 1), jh("cf2", e, t, Vh, 1, 0, 1), jh("cf3", e, t, Vh, 0, -1, 1), jh("cf4", e, t, Vh, 0, 1, 1), jh("cn1", e, t, Vh, -1, 0, -1), jh("cn2", e, t, Vh, 1, 0, -1), jh("cn3", e, t, Vh, 0, -1, -1), jh("cn4", e, t, Vh, 0, 1, -1), t.getAttribute("position").needsUpdate = !0; };
5170
+ ((Vh.prototype = Object.create(xs.prototype)).constructor = Vh).prototype.update = function () { var t = this.geometry, e = this.pointMap; jh.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse), Uh("c", e, t, jh, 0, 0, -1), Uh("t", e, t, jh, 0, 0, 1), Uh("n1", e, t, jh, -1, -1, -1), Uh("n2", e, t, jh, 1, -1, -1), Uh("n3", e, t, jh, -1, 1, -1), Uh("n4", e, t, jh, 1, 1, -1), Uh("f1", e, t, jh, -1, -1, 1), Uh("f2", e, t, jh, 1, -1, 1), Uh("f3", e, t, jh, -1, 1, 1), Uh("f4", e, t, jh, 1, 1, 1), Uh("u1", e, t, jh, .7, 1.1, -1), Uh("u2", e, t, jh, -.7, 1.1, -1), Uh("u3", e, t, jh, 0, 2, -1), Uh("cf1", e, t, jh, -1, 0, 1), Uh("cf2", e, t, jh, 1, 0, 1), Uh("cf3", e, t, jh, 0, -1, 1), Uh("cf4", e, t, jh, 0, 1, 1), Uh("cn1", e, t, jh, -1, 0, -1), Uh("cn2", e, t, jh, 1, 0, -1), Uh("cn3", e, t, jh, 0, -1, -1), Uh("cn4", e, t, jh, 0, 1, -1), t.getAttribute("position").needsUpdate = !0; };
5171
5171
  var Gh = new Pn;
5172
5172
  function Hh(t, e) { this.object = t, void 0 === e && (e = 16776960); var n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), i = new Float32Array(24), r = new Bi; r.setIndex(new yi(n, 1)), r.setAttribute("position", new yi(i, 3)), xs.call(this, r, new us({ color: e })), this.matrixAutoUpdate = !1, this.update(); }
5173
5173
  function Wh(t, e) { this.type = "Box3Helper", this.box = t, e = e || 16776960; var n = new Uint16Array([0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7]), i = new Bi; i.setIndex(new yi(n, 1)), i.setAttribute("position", new Ti([1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1], 3)), xs.call(this, i, new us({ color: e })), this.geometry.computeBoundingSphere(); }
@@ -5175,7 +5175,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5175
5175
  ((Hh.prototype = Object.create(xs.prototype)).constructor = Hh).prototype.update = function (t) { if (void 0 !== t && console.warn("THREE.BoxHelper: .update() has no longer arguments."), void 0 !== this.object && Gh.setFromObject(this.object), !Gh.isEmpty()) {
5176
5176
  var e = Gh.min, n = Gh.max, i = this.geometry.attributes.position, r = i.array;
5177
5177
  r[0] = n.x, r[1] = n.y, r[2] = n.z, r[3] = e.x, r[4] = n.y, r[5] = n.z, r[6] = e.x, r[7] = e.y, r[8] = n.z, r[9] = n.x, r[10] = e.y, r[11] = n.z, r[12] = n.x, r[13] = n.y, r[14] = e.z, r[15] = e.x, r[16] = n.y, r[17] = e.z, r[18] = e.x, r[19] = e.y, r[20] = e.z, r[21] = n.x, r[22] = e.y, r[23] = e.z, i.needsUpdate = !0, this.geometry.computeBoundingSphere();
5178
- } }, Hh.prototype.setFromObject = function (t) { return this.object = t, this.update(), this; }, Hh.prototype.copy = function (t) { return xs.prototype.copy.call(this, t), this.object = t.object, this; }, Hh.prototype.clone = function () { return (new this.constructor).copy(this); }, ((Wh.prototype = Object.create(xs.prototype)).constructor = Wh).prototype.updateMatrixWorld = function (t) { var e = this.box; e.isEmpty() || (e.getCenter(this.position), e.getSize(this.scale), this.scale.multiplyScalar(.5), yn.prototype.updateMatrixWorld.call(this, t)); }, ((Jh.prototype = Object.create(gs.prototype)).constructor = Jh).prototype.updateMatrixWorld = function (t) { var e = -this.plane.constant; Math.abs(e) < 1e-8 && (e = 1e-8), this.scale.set(.5 * this.size, .5 * this.size, e), this.children[0].material.side = e < 0 ? St : O, this.lookAt(this.plane.normal), yn.prototype.updateMatrixWorld.call(this, t); };
5178
+ } }, Hh.prototype.setFromObject = function (t) { return this.object = t, this.update(), this; }, Hh.prototype.copy = function (t) { return xs.prototype.copy.call(this, t), this.object = t.object, this; }, Hh.prototype.clone = function () { return (new this.constructor).copy(this); }, ((Wh.prototype = Object.create(xs.prototype)).constructor = Wh).prototype.updateMatrixWorld = function (t) { var e = this.box; e.isEmpty() || (e.getCenter(this.position), e.getSize(this.scale), this.scale.multiplyScalar(.5), yn.prototype.updateMatrixWorld.call(this, t)); }, ((Jh.prototype = Object.create(gs.prototype)).constructor = Jh).prototype.updateMatrixWorld = function (t) { var e = -this.plane.constant; Math.abs(e) < 1e-8 && (e = 1e-8), this.scale.set(.5 * this.size, .5 * this.size, e), this.children[0].material.side = e < 0 ? St : L, this.lookAt(this.plane.normal), yn.prototype.updateMatrixWorld.call(this, t); };
5179
5179
  var qh, Xh, Yh = new We;
5180
5180
  function Zh(t, e, n, i, r, a) { yn.call(this), void 0 === t && (t = new We(0, 0, 1)), void 0 === e && (e = new We(0, 0, 0)), void 0 === n && (n = 1), void 0 === i && (i = 16776960), void 0 === r && (r = .2 * n), void 0 === a && (a = .2 * r), void 0 === qh && ((qh = new Bi).setAttribute("position", new Ti([0, 0, 0, 0, 1, 0], 3)), (Xh = new Fl(0, .5, 1, 5, 1)).translate(0, -.5, 0)), this.position.copy(e), this.line = new gs(qh, new us({ color: i })), this.line.matrixAutoUpdate = !1, this.add(this.line), this.cone = new er(Xh, new gi({ color: i })), this.cone.matrixAutoUpdate = !1, this.add(this.cone), this.setDirection(t), this.setLength(n, r, a); }
5181
5181
  function $h(t) { var e = [0, 0, 0, t = t || 1, 0, 0, 0, 0, 0, 0, t, 0, 0, 0, 0, 0, 0, t], n = new Bi; n.setAttribute("position", new Ti(e, 3)), n.setAttribute("color", new Ti([1, 0, 0, 1, .6, 0, 0, 1, 0, .6, 1, 0, 0, 0, 1, 0, .6, 1], 3)); var i = new us({ vertexColors: v }); xs.call(this, n, i); }
@@ -5205,16 +5205,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5205
5205
  x.setAttribute("position", new yi(h, 3)), x.setAttribute("uv", new yi(d, 2)), x.setAttribute("faceIndex", new yi(p, 1)), t.push(x), Kh < i && i--;
5206
5206
  } return { _lodPlanes: t, _sizeLods: e, _sigmas: n }; }(), fd = pd._lodPlanes, md = pd._sizeLods, gd = pd._sigmas, vd = null, yd = null, xd = null, _d = (1 + Math.sqrt(5)) / 2, wd = 1 / _d, bd = [new We(1, 1, 1), new We(-1, 1, 1), new We(1, 1, -1), new We(-1, 1, -1), new We(0, _d, wd), new We(0, _d, -wd), new We(wd, 0, _d), new We(-wd, 0, _d), new We(_d, wd, 0), new We(-_d, wd, 0)];
5207
5207
  function Md(t) { yd = t, Td(ud); }
5208
- function Sd(t) { var e = { magFilter: Ut, minFilter: Ut, generateMipmaps: !1, type: t ? t.type : qt, format: t ? t.format : i, encoding: t ? t.encoding : ge, depthBuffer: !1, stencilBuffer: !1 }, n = Ed(e); return n.depthBuffer = !t, vd = Ed(e), n; }
5208
+ function Sd(t) { var e = { magFilter: Vt, minFilter: Vt, generateMipmaps: !1, type: t ? t.type : qt, format: t ? t.format : i, encoding: t ? t.encoding : ge, depthBuffer: !1, stencilBuffer: !1 }, n = Ed(e); return n.depthBuffer = !t, vd = Ed(e), n; }
5209
5209
  function Cd(t) { vd.dispose(), yd.setRenderTarget(xd), t.scissorTest = !1, t.setSize(t.width, t.height); }
5210
5210
  function Td(t) { var e = new xn; e.add(new er(fd[0], t)), yd.compile(e, cd); }
5211
- function Ed(t) { var e = new Ve(3 * td, 3 * td, t); return e.texture.mapping = Nt, e.texture.name = "PMREM.cubeUv", e.scissorTest = !0, e; }
5211
+ function Ed(t) { var e = new je(3 * td, 3 * td, t); return e.texture.mapping = Nt, e.texture.name = "PMREM.cubeUv", e.scissorTest = !0, e; }
5212
5212
  function Ad(t, e, n, i, r) { t.viewport.set(e, n, i, r), t.scissor.set(e, n, i, r); }
5213
5213
  function Dd(t) { var e = yd.autoClear; yd.autoClear = !1; for (var n = 1; n < nd; n++) {
5214
- Ld(t, n - 1, n, Math.sqrt(gd[n] * gd[n] - gd[n - 1] * gd[n - 1]), bd[(n - 1) % bd.length]);
5214
+ Od(t, n - 1, n, Math.sqrt(gd[n] * gd[n] - gd[n - 1] * gd[n - 1]), bd[(n - 1) % bd.length]);
5215
5215
  } yd.autoClear = e; }
5216
- function Ld(t, e, n, i, r) { Od(t, vd, e, n, i, "latitudinal", r), Od(vd, t, n, n, i, "longitudinal", r); }
5217
- function Od(t, e, n, i, r, a, o) { "latitudinal" !== a && "longitudinal" !== a && console.error("blur direction must be either latitudinal or longitudinal!"); var s = new xn; s.add(new er(fd[i], ud)); var l = ud.uniforms, c = md[n] - 1, u = isFinite(r) ? Math.PI / (2 * c) : 2 * Math.PI / (2 * id - 1), h = r / u, d = isFinite(r) ? 1 + Math.floor(3 * h) : id; id < d && console.warn("sigmaRadians, " + r + ", is too large and will clip, as it requested " + d + " samples when the maximum is set to " + id); for (var p = [], f = 0, m = 0; m < id; ++m) {
5216
+ function Od(t, e, n, i, r) { Ld(t, vd, e, n, i, "latitudinal", r), Ld(vd, t, n, n, i, "longitudinal", r); }
5217
+ function Ld(t, e, n, i, r, a, o) { "latitudinal" !== a && "longitudinal" !== a && console.error("blur direction must be either latitudinal or longitudinal!"); var s = new xn; s.add(new er(fd[i], ud)); var l = ud.uniforms, c = md[n] - 1, u = isFinite(r) ? Math.PI / (2 * c) : 2 * Math.PI / (2 * id - 1), h = r / u, d = isFinite(r) ? 1 + Math.floor(3 * h) : id; id < d && console.warn("sigmaRadians, " + r + ", is too large and will clip, as it requested " + d + " samples when the maximum is set to " + id); for (var p = [], f = 0, m = 0; m < id; ++m) {
5218
5218
  var g = m / h, v = Math.exp(-g * g / 2);
5219
5219
  p.push(v), 0 == m ? f += v : m < d && (f += 2 * v);
5220
5220
  } for (m = 0; m < p.length; m++)
@@ -5232,7 +5232,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5232
5232
  } for (var g = 0; g < 6; g++) {
5233
5233
  var v = g % 3;
5234
5234
  0 == v ? (r.up.set(0, a[g], 0), r.lookAt(o[g], 0, 0)) : 1 == v ? (r.up.set(0, 0, a[g]), r.lookAt(0, o[g], 0)) : (r.up.set(0, a[g], 0), r.lookAt(0, 0, o[g])), Ad(i, v * td, 2 < g ? td : 0, td, td), yd.setRenderTarget(i), yd.render(t, r);
5235
- } yd.toneMapping = l, yd.toneMappingExposure = c, yd.outputEncoding = s, yd.setClearColor(u, h), t.scale.z *= -1; }(t, n, i, r), 0 < e && Ld(r, 0, 0, e), Dd(r), Cd(r), r; }, fromEquirectangular: function (t) { return t.magFilter = Ut, t.minFilter = Ut, t.generateMipmaps = !1, this.fromCubemap(t); }, fromCubemap: function (t) { xd = yd.getRenderTarget(); var e = Sd(t); return function (t, e) { var n = new xn; t.isCubeTexture ? null == dd && (dd = Pd()) : null == hd && (hd = Id()); var i = t.isCubeTexture ? dd : hd; n.add(new er(fd[0], i)); var r = i.uniforms; (r.envMap.value = t).isCubeTexture || r.texelSize.value.set(1 / t.image.width, 1 / t.image.height); r.inputEncoding.value = rd[t.encoding], r.outputEncoding.value = rd[t.encoding], Ad(e, 0, 0, 3 * td, 2 * td), yd.setRenderTarget(e), yd.render(n, cd); }(t, e), Dd(e), Cd(e), e; }, compileCubemapShader: function () { null == dd && Td(dd = Pd()); }, compileEquirectangularShader: function () { null == hd && Td(hd = Id()); }, dispose: function () { ud.dispose(), null != dd && dd.dispose(), null != hd && hd.dispose(); for (var t = 0; t < fd.length; t++)
5235
+ } yd.toneMapping = l, yd.toneMappingExposure = c, yd.outputEncoding = s, yd.setClearColor(u, h), t.scale.z *= -1; }(t, n, i, r), 0 < e && Od(r, 0, 0, e), Dd(r), Cd(r), r; }, fromEquirectangular: function (t) { return t.magFilter = Vt, t.minFilter = Vt, t.generateMipmaps = !1, this.fromCubemap(t); }, fromCubemap: function (t) { xd = yd.getRenderTarget(); var e = Sd(t); return function (t, e) { var n = new xn; t.isCubeTexture ? null == dd && (dd = Pd()) : null == hd && (hd = Id()); var i = t.isCubeTexture ? dd : hd; n.add(new er(fd[0], i)); var r = i.uniforms; (r.envMap.value = t).isCubeTexture || r.texelSize.value.set(1 / t.image.width, 1 / t.image.height); r.inputEncoding.value = rd[t.encoding], r.outputEncoding.value = rd[t.encoding], Ad(e, 0, 0, 3 * td, 2 * td), yd.setRenderTarget(e), yd.render(n, cd); }(t, e), Dd(e), Cd(e), e; }, compileCubemapShader: function () { null == dd && Td(dd = Pd()); }, compileEquirectangularShader: function () { null == hd && Td(hd = Id()); }, dispose: function () { ud.dispose(), null != dd && dd.dispose(), null != hd && hd.dispose(); for (var t = 0; t < fd.length; t++)
5236
5236
  fd[t].dispose(); } };
5237
5237
  function Nd(t) { console.warn("THREE.ClosedSplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), Nc.call(this, t), this.type = "catmullrom", this.closed = !0; }
5238
5238
  function Bd(t) { console.warn("THREE.SplineCurve3 has been deprecated. Use THREE.CatmullRomCurve3 instead."), Nc.call(this, t), this.type = "catmullrom"; }
@@ -5240,11 +5240,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5240
5240
  Ac.create = function (t, e) { return console.log("THREE.Curve.create() has been deprecated"), t.prototype = Object.create(Ac.prototype), (t.prototype.constructor = t).prototype.getPoint = e, t; }, Object.assign(Xc.prototype, { createPointsGeometry: function (t) { console.warn("THREE.CurvePath: .createPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); var e = this.getPoints(t); return this.createGeometry(e); }, createSpacedPointsGeometry: function (t) { console.warn("THREE.CurvePath: .createSpacedPointsGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); var e = this.getSpacedPoints(t); return this.createGeometry(e); }, createGeometry: function (t) { console.warn("THREE.CurvePath: .createGeometry() has been removed. Use new THREE.Geometry().setFromPoints( points ) instead."); for (var e = new lr, n = 0, i = t.length; n < i; n++) {
5241
5241
  var r = t[n];
5242
5242
  e.vertices.push(new We(r.x, r.y, r.z || 0));
5243
- } return e; } }), Object.assign(Yc.prototype, { fromPoints: function (t) { return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."), this.setFromPoints(t); } }), Nd.prototype = Object.create(Nc.prototype), Bd.prototype = Object.create(Nc.prototype), Fd.prototype = Object.create(Nc.prototype), Object.assign(Fd.prototype, { initFromArray: function () { console.error("THREE.Spline: .initFromArray() has been removed."); }, getControlPointsArray: function () { console.error("THREE.Spline: .getControlPointsArray() has been removed."); }, reparametrizeByArcLength: function () { console.error("THREE.Spline: .reparametrizeByArcLength() has been removed."); } }), Ph.prototype.setColors = function () { console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead."); }, Eh.prototype.update = function () { console.error("THREE.SkeletonHelper: update() no longer needs to be called."); }, Object.assign(xc.prototype, { extractUrlBase: function (t) { return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."), uu.extractUrlBase(t); } }), xc.Handlers = { add: function () { console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead."); }, get: function () { console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead."); } }, Object.assign(mu.prototype, { setTexturePath: function (t) { return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."), this.setResourcePath(t); } }), Object.assign(vh.prototype, { center: function (t) { return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."), this.getCenter(t); }, empty: function () { return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (t) { return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, size: function (t) { return console.warn("THREE.Box2: .size() has been renamed to .getSize()."), this.getSize(t); } }), Object.assign(Pn.prototype, { center: function (t) { return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."), this.getCenter(t); }, empty: function () { return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (t) { return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, isIntersectionSphere: function (t) { return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t); }, size: function (t) { return console.warn("THREE.Box3: .size() has been renamed to .getSize()."), this.getSize(t); } }), Sr.prototype.setFromMatrix = function (t) { return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."), this.setFromProjectionMatrix(t); }, _h.prototype.center = function (t) { return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."), this.getCenter(t); }, Object.assign(Pe, { random16: function () { return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."), Math.random(); }, nearestPowerOfTwo: function (t) { return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."), Pe.floorPowerOfTwo(t); }, nextPowerOfTwo: function (t) { return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."), Pe.ceilPowerOfTwo(t); } }), Object.assign(ke.prototype, { flattenToArrayOffset: function (t, e) { return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e); }, multiplyVector3: function (t) { return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."), t.applyMatrix3(this); }, multiplyVector3Array: function () { console.error("THREE.Matrix3: .multiplyVector3Array() has been removed."); }, applyToBufferAttribute: function (t) { return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."), t.applyMatrix3(this); }, applyToVector3Array: function () { console.error("THREE.Matrix3: .applyToVector3Array() has been removed."); } }), Object.assign(Qe.prototype, { extractPosition: function (t) { return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(t); }, flattenToArrayOffset: function (t, e) { return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e); }, getPosition: function () { return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), (new We).setFromMatrixColumn(this, 3); }, setRotationFromQuaternion: function (t) { return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(t); }, multiplyToArray: function () { console.warn("THREE.Matrix4: .multiplyToArray() has been removed."); }, multiplyVector3: function (t) { return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, multiplyVector4: function (t) { return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, multiplyVector3Array: function () { console.error("THREE.Matrix4: .multiplyVector3Array() has been removed."); }, rotateAxis: function (t) { console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."), t.transformDirection(this); }, crossVector: function (t) { return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, translate: function () { console.error("THREE.Matrix4: .translate() has been removed."); }, rotateX: function () { console.error("THREE.Matrix4: .rotateX() has been removed."); }, rotateY: function () { console.error("THREE.Matrix4: .rotateY() has been removed."); }, rotateZ: function () { console.error("THREE.Matrix4: .rotateZ() has been removed."); }, rotateByAxis: function () { console.error("THREE.Matrix4: .rotateByAxis() has been removed."); }, applyToBufferAttribute: function (t) { return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, applyToVector3Array: function () { console.error("THREE.Matrix4: .applyToVector3Array() has been removed."); }, makeFrustum: function (t, e, n, i, r, a) { return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."), this.makePerspective(t, e, i, n, r, a); } }), Xn.prototype.isIntersectionLine = function (t) { return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."), this.intersectsLine(t); }, je.prototype.multiplyVector3 = function (t) { return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."), t.applyQuaternion(this); }, Object.assign(Hn.prototype, { isIntersectionBox: function (t) { return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, isIntersectionPlane: function (t) { return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."), this.intersectsPlane(t); }, isIntersectionSphere: function (t) { return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t); } }), Object.assign(ai.prototype, { area: function () { return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."), this.getArea(); }, barycoordFromPoint: function (t, e) { return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."), this.getBarycoord(t, e); }, midpoint: function (t) { return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."), this.getMidpoint(t); }, normal: function (t) { return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."), this.getNormal(t); }, plane: function (t) { return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."), this.getPlane(t); } }), Object.assign(ai, { barycoordFromPoint: function (t, e, n, i, r) { return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."), ai.getBarycoord(t, e, n, i, r); }, normal: function (t, e, n, i) { return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."), ai.getNormal(t, e, n, i); } }), Object.assign(Zc.prototype, { extractAllPoints: function (t) { return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."), this.extractPoints(t); }, extrude: function (t) { return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."), new wl(this, t); }, makeGeometry: function (t) { return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."), new Pl(this, t); } }), Object.assign(Re.prototype, { fromAttribute: function (t, e, n) { return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, distanceToManhattan: function (t) { return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t); }, lengthManhattan: function () { return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(We.prototype, { setEulerFromRotationMatrix: function () { console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead."); }, setEulerFromQuaternion: function () { console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead."); }, getPositionFromMatrix: function (t) { return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(t); }, getScaleFromMatrix: function (t) { return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(t); }, getColumnFromMatrix: function (t, e) { return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(e, t); }, applyProjection: function (t) { return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."), this.applyMatrix4(t); }, fromAttribute: function (t, e, n) { return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, distanceToManhattan: function (t) { return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t); }, lengthManhattan: function () { return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(ze.prototype, { fromAttribute: function (t, e, n) { return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, lengthManhattan: function () { return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(lr.prototype, { computeTangents: function () { console.error("THREE.Geometry: .computeTangents() has been removed."); }, computeLineDistances: function () { console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead."); }, applyMatrix: function (t) { return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.assign(yn.prototype, { getChildByName: function (t) { return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."), this.getObjectByName(t); }, renderDepth: function () { console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead."); }, translate: function (t, e) { return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."), this.translateOnAxis(e, t); }, getWorldRotation: function () { console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead."); }, applyMatrix: function (t) { return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.defineProperties(yn.prototype, { eulerOrder: { get: function () { return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order; }, set: function (t) { console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order = t; } }, useQuaternion: { get: function () { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); }, set: function () { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); } } }), Object.assign(er.prototype, { setDrawMode: function () { console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary."); } }), Object.defineProperties(er.prototype, { drawMode: { get: function () { return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."), 0; }, set: function () { console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary."); } } }), Object.defineProperties(Qo.prototype, { objects: { get: function () { return console.warn("THREE.LOD: .objects has been renamed to .levels."), this.levels; } } }), Object.defineProperty(is.prototype, "useVertexTexture", { get: function () { console.warn("THREE.Skeleton: useVertexTexture has been removed."); }, set: function () { console.warn("THREE.Skeleton: useVertexTexture has been removed."); } }), ts.prototype.initBones = function () { console.error("THREE.SkinnedMesh: initBones() has been removed."); }, Object.defineProperty(Ac.prototype, "__arcLengthDivisions", { get: function () { return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions; }, set: function (t) { console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions = t; } }), yr.prototype.setLens = function (t, e) { console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."), void 0 !== e && (this.filmGauge = e), this.setFocalLength(t); }, Object.defineProperties($c.prototype, { onlyShadow: { set: function () { console.warn("THREE.Light: .onlyShadow has been removed."); } }, shadowCameraFov: { set: function (t) { console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."), this.shadow.camera.fov = t; } }, shadowCameraLeft: { set: function (t) { console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."), this.shadow.camera.left = t; } }, shadowCameraRight: { set: function (t) { console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."), this.shadow.camera.right = t; } }, shadowCameraTop: { set: function (t) { console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."), this.shadow.camera.top = t; } }, shadowCameraBottom: { set: function (t) { console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."), this.shadow.camera.bottom = t; } }, shadowCameraNear: { set: function (t) { console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."), this.shadow.camera.near = t; } }, shadowCameraFar: { set: function (t) { console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."), this.shadow.camera.far = t; } }, shadowCameraVisible: { set: function () { console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead."); } }, shadowBias: { set: function (t) { console.warn("THREE.Light: .shadowBias is now .shadow.bias."), this.shadow.bias = t; } }, shadowDarkness: { set: function () { console.warn("THREE.Light: .shadowDarkness has been removed."); } }, shadowMapWidth: { set: function (t) { console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."), this.shadow.mapSize.width = t; } }, shadowMapHeight: { set: function (t) { console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."), this.shadow.mapSize.height = t; } } }), Object.defineProperties(yi.prototype, { length: { get: function () { return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."), this.array.length; } }, dynamic: { get: function () { return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."), this.usage === Ae; }, set: function () { console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."), this.setUsage(Ae); } } }), Object.assign(yi.prototype, { setDynamic: function (t) { return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."), this.setUsage(!0 === t ? Ae : Ee), this; }, copyIndicesArray: function () { console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed."); }, setArray: function () { console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers"); } }), Object.assign(Bi.prototype, { addIndex: function (t) { console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."), this.setIndex(t); }, addAttribute: function (t, e) { return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."), e && e.isBufferAttribute || e && e.isInterleavedBufferAttribute ? "index" === t ? (console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), this.setIndex(e), this) : this.setAttribute(t, e) : (console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), this.setAttribute(t, new yi(e, arguments[2]))); }, addDrawCall: function (t, e, n) { void 0 !== n && console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."), console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."), this.addGroup(t, e); }, clearDrawCalls: function () { console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."), this.clearGroups(); }, computeTangents: function () { console.warn("THREE.BufferGeometry: .computeTangents() has been removed."); }, computeOffsets: function () { console.warn("THREE.BufferGeometry: .computeOffsets() has been removed."); }, removeAttribute: function (t) { return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."), this.deleteAttribute(t); }, applyMatrix: function (t) { return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.defineProperties(Bi.prototype, { drawcalls: { get: function () { return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."), this.groups; } }, offsets: { get: function () { return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."), this.groups; } } }), Object.defineProperties(Io.prototype, { dynamic: { get: function () { return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."), this.usage === Ae; }, set: function (t) { console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."), this.setUsage(t); } } }), Object.assign(Io.prototype, { setDynamic: function (t) { return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."), this.setUsage(!0 === t ? Ae : Ee), this; }, setArray: function () { console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers"); } }), Object.assign(bl.prototype, { getArrays: function () { console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed."); }, addShapeList: function () { console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed."); }, addShape: function () { console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed."); } }), Object.defineProperties(ch.prototype, { dynamic: { set: function () { console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead."); } }, onUpdate: { value: function () { return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."), this; } } }), Object.defineProperties(mi.prototype, { wrapAround: { get: function () { console.warn("THREE.Material: .wrapAround has been removed."); }, set: function () { console.warn("THREE.Material: .wrapAround has been removed."); } }, overdraw: { get: function () { console.warn("THREE.Material: .overdraw has been removed."); }, set: function () { console.warn("THREE.Material: .overdraw has been removed."); } }, wrapRGB: { get: function () { return console.warn("THREE.Material: .wrapRGB has been removed."), new ci; } }, shading: { get: function () { console.error("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."); }, set: function (t) { console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === t; } }, stencilMask: { get: function () { return console.warn("THREE." + this.type + ": .stencilMask has been removed. Use .stencilFuncMask instead."), this.stencilFuncMask; }, set: function (t) { console.warn("THREE." + this.type + ": .stencilMask has been removed. Use .stencilFuncMask instead."), this.stencilFuncMask = t; } } }), Object.defineProperties(Xl.prototype, { metal: { get: function () { return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."), !1; }, set: function () { console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead"); } } }), Object.defineProperties(gr.prototype, { derivatives: { get: function () { return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives; }, set: function (t) { console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives = t; } } }), Object.assign(Do.prototype, { clearTarget: function (t, e, n, i) { console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."), this.setRenderTarget(t), this.clear(e, n, i); }, animate: function (t) { console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."), this.setAnimationLoop(t); }, getCurrentRenderTarget: function () { return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."), this.getRenderTarget(); }, getMaxAnisotropy: function () { return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."), this.capabilities.getMaxAnisotropy(); }, getPrecision: function () { return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."), this.capabilities.precision; }, resetGLState: function () { return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."), this.state.reset(); }, supportsFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get("OES_texture_float"); }, supportsHalfFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get("OES_texture_half_float"); }, supportsStandardDerivatives: function () { return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get("OES_standard_derivatives"); }, supportsCompressedTextureS3TC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get("WEBGL_compressed_texture_s3tc"); }, supportsCompressedTexturePVRTC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get("WEBGL_compressed_texture_pvrtc"); }, supportsBlendMinMax: function () { return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get("EXT_blend_minmax"); }, supportsVertexTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."), this.capabilities.vertexTextures; }, supportsInstancedArrays: function () { return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."), this.extensions.get("ANGLE_instanced_arrays"); }, enableScissorTest: function (t) { console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."), this.setScissorTest(t); }, initMaterial: function () { console.warn("THREE.WebGLRenderer: .initMaterial() has been removed."); }, addPrePlugin: function () { console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed."); }, addPostPlugin: function () { console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed."); }, updateShadowMap: function () { console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed."); }, setFaceCulling: function () { console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed."); }, allocTextureUnit: function () { console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed."); }, setTexture: function () { console.warn("THREE.WebGLRenderer: .setTexture() has been removed."); }, setTexture2D: function () { console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed."); }, setTextureCube: function () { console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed."); }, getActiveMipMapLevel: function () { return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."), this.getActiveMipmapLevel(); } }), Object.defineProperties(Do.prototype, { shadowMapEnabled: { get: function () { return this.shadowMap.enabled; }, set: function (t) { console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."), this.shadowMap.enabled = t; } }, shadowMapType: { get: function () { return this.shadowMap.type; }, set: function (t) { console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."), this.shadowMap.type = t; } }, shadowMapCullFace: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead."); } }, context: { get: function () { return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."), this.getContext(); } }, vr: { get: function () { return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"), this.xr; } }, gammaInput: { get: function () { return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."), !1; }, set: function () { console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."); } }, gammaOutput: { get: function () { return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."), !1; }, set: function (t) { console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."), this.outputEncoding = !0 === t ? e : me; } } }), Object.defineProperties(_o.prototype, { cullFace: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead."); } }, renderReverseSided: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead."); } }, renderSingleSided: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead."); } } }), Object.defineProperties(Ve.prototype, { wrapS: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS = t; } }, wrapT: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT = t; } }, magFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter = t; } }, minFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter = t; } }, anisotropy: { get: function () { return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy = t; } }, offset: { get: function () { return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset = t; } }, repeat: { get: function () { return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat = t; } }, format: { get: function () { return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format = t; } }, type: { get: function () { return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type = t; } }, generateMipmaps: { get: function () { return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps = t; } } }), Object.defineProperties(Vu.prototype, { load: { value: function (t) { console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead."); var e = this; return (new Tu).load(t, function (t) { e.setBuffer(t); }), this; } }, startTime: { set: function () { console.warn("THREE.Audio: .startTime is now .play( delay )."); } } }), Ju.prototype.getData = function () { return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."), this.getFrequencyData(); }, xr.prototype.updateCubeMap = function (t, e) { return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."), this.update(t, e); };
5243
+ } return e; } }), Object.assign(Yc.prototype, { fromPoints: function (t) { return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."), this.setFromPoints(t); } }), Nd.prototype = Object.create(Nc.prototype), Bd.prototype = Object.create(Nc.prototype), Fd.prototype = Object.create(Nc.prototype), Object.assign(Fd.prototype, { initFromArray: function () { console.error("THREE.Spline: .initFromArray() has been removed."); }, getControlPointsArray: function () { console.error("THREE.Spline: .getControlPointsArray() has been removed."); }, reparametrizeByArcLength: function () { console.error("THREE.Spline: .reparametrizeByArcLength() has been removed."); } }), Ph.prototype.setColors = function () { console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead."); }, Eh.prototype.update = function () { console.error("THREE.SkeletonHelper: update() no longer needs to be called."); }, Object.assign(xc.prototype, { extractUrlBase: function (t) { return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."), uu.extractUrlBase(t); } }), xc.Handlers = { add: function () { console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead."); }, get: function () { console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead."); } }, Object.assign(mu.prototype, { setTexturePath: function (t) { return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."), this.setResourcePath(t); } }), Object.assign(vh.prototype, { center: function (t) { return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."), this.getCenter(t); }, empty: function () { return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (t) { return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, size: function (t) { return console.warn("THREE.Box2: .size() has been renamed to .getSize()."), this.getSize(t); } }), Object.assign(Pn.prototype, { center: function (t) { return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."), this.getCenter(t); }, empty: function () { return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."), this.isEmpty(); }, isIntersectionBox: function (t) { return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, isIntersectionSphere: function (t) { return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t); }, size: function (t) { return console.warn("THREE.Box3: .size() has been renamed to .getSize()."), this.getSize(t); } }), Sr.prototype.setFromMatrix = function (t) { return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."), this.setFromProjectionMatrix(t); }, _h.prototype.center = function (t) { return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."), this.getCenter(t); }, Object.assign(Pe, { random16: function () { return console.warn("THREE.Math: .random16() has been deprecated. Use Math.random() instead."), Math.random(); }, nearestPowerOfTwo: function (t) { return console.warn("THREE.Math: .nearestPowerOfTwo() has been renamed to .floorPowerOfTwo()."), Pe.floorPowerOfTwo(t); }, nextPowerOfTwo: function (t) { return console.warn("THREE.Math: .nextPowerOfTwo() has been renamed to .ceilPowerOfTwo()."), Pe.ceilPowerOfTwo(t); } }), Object.assign(ke.prototype, { flattenToArrayOffset: function (t, e) { return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e); }, multiplyVector3: function (t) { return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."), t.applyMatrix3(this); }, multiplyVector3Array: function () { console.error("THREE.Matrix3: .multiplyVector3Array() has been removed."); }, applyToBufferAttribute: function (t) { return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."), t.applyMatrix3(this); }, applyToVector3Array: function () { console.error("THREE.Matrix3: .applyToVector3Array() has been removed."); } }), Object.assign(Qe.prototype, { extractPosition: function (t) { return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."), this.copyPosition(t); }, flattenToArrayOffset: function (t, e) { return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."), this.toArray(t, e); }, getPosition: function () { return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."), (new We).setFromMatrixColumn(this, 3); }, setRotationFromQuaternion: function (t) { return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."), this.makeRotationFromQuaternion(t); }, multiplyToArray: function () { console.warn("THREE.Matrix4: .multiplyToArray() has been removed."); }, multiplyVector3: function (t) { return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, multiplyVector4: function (t) { return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, multiplyVector3Array: function () { console.error("THREE.Matrix4: .multiplyVector3Array() has been removed."); }, rotateAxis: function (t) { console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."), t.transformDirection(this); }, crossVector: function (t) { return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, translate: function () { console.error("THREE.Matrix4: .translate() has been removed."); }, rotateX: function () { console.error("THREE.Matrix4: .rotateX() has been removed."); }, rotateY: function () { console.error("THREE.Matrix4: .rotateY() has been removed."); }, rotateZ: function () { console.error("THREE.Matrix4: .rotateZ() has been removed."); }, rotateByAxis: function () { console.error("THREE.Matrix4: .rotateByAxis() has been removed."); }, applyToBufferAttribute: function (t) { return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."), t.applyMatrix4(this); }, applyToVector3Array: function () { console.error("THREE.Matrix4: .applyToVector3Array() has been removed."); }, makeFrustum: function (t, e, n, i, r, a) { return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."), this.makePerspective(t, e, i, n, r, a); } }), Xn.prototype.isIntersectionLine = function (t) { return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."), this.intersectsLine(t); }, Ue.prototype.multiplyVector3 = function (t) { return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."), t.applyQuaternion(this); }, Object.assign(Hn.prototype, { isIntersectionBox: function (t) { return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."), this.intersectsBox(t); }, isIntersectionPlane: function (t) { return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."), this.intersectsPlane(t); }, isIntersectionSphere: function (t) { return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."), this.intersectsSphere(t); } }), Object.assign(ai.prototype, { area: function () { return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."), this.getArea(); }, barycoordFromPoint: function (t, e) { return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."), this.getBarycoord(t, e); }, midpoint: function (t) { return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."), this.getMidpoint(t); }, normal: function (t) { return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."), this.getNormal(t); }, plane: function (t) { return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."), this.getPlane(t); } }), Object.assign(ai, { barycoordFromPoint: function (t, e, n, i, r) { return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."), ai.getBarycoord(t, e, n, i, r); }, normal: function (t, e, n, i) { return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."), ai.getNormal(t, e, n, i); } }), Object.assign(Zc.prototype, { extractAllPoints: function (t) { return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."), this.extractPoints(t); }, extrude: function (t) { return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."), new wl(this, t); }, makeGeometry: function (t) { return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."), new Pl(this, t); } }), Object.assign(Re.prototype, { fromAttribute: function (t, e, n) { return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, distanceToManhattan: function (t) { return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t); }, lengthManhattan: function () { return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(We.prototype, { setEulerFromRotationMatrix: function () { console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead."); }, setEulerFromQuaternion: function () { console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead."); }, getPositionFromMatrix: function (t) { return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."), this.setFromMatrixPosition(t); }, getScaleFromMatrix: function (t) { return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."), this.setFromMatrixScale(t); }, getColumnFromMatrix: function (t, e) { return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."), this.setFromMatrixColumn(e, t); }, applyProjection: function (t) { return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."), this.applyMatrix4(t); }, fromAttribute: function (t, e, n) { return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, distanceToManhattan: function (t) { return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."), this.manhattanDistanceTo(t); }, lengthManhattan: function () { return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(ze.prototype, { fromAttribute: function (t, e, n) { return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."), this.fromBufferAttribute(t, e, n); }, lengthManhattan: function () { return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."), this.manhattanLength(); } }), Object.assign(lr.prototype, { computeTangents: function () { console.error("THREE.Geometry: .computeTangents() has been removed."); }, computeLineDistances: function () { console.error("THREE.Geometry: .computeLineDistances() has been removed. Use THREE.Line.computeLineDistances() instead."); }, applyMatrix: function (t) { return console.warn("THREE.Geometry: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.assign(yn.prototype, { getChildByName: function (t) { return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."), this.getObjectByName(t); }, renderDepth: function () { console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead."); }, translate: function (t, e) { return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."), this.translateOnAxis(e, t); }, getWorldRotation: function () { console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead."); }, applyMatrix: function (t) { return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.defineProperties(yn.prototype, { eulerOrder: { get: function () { return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order; }, set: function (t) { console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."), this.rotation.order = t; } }, useQuaternion: { get: function () { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); }, set: function () { console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default."); } } }), Object.assign(er.prototype, { setDrawMode: function () { console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary."); } }), Object.defineProperties(er.prototype, { drawMode: { get: function () { return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."), 0; }, set: function () { console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary."); } } }), Object.defineProperties(Qo.prototype, { objects: { get: function () { return console.warn("THREE.LOD: .objects has been renamed to .levels."), this.levels; } } }), Object.defineProperty(is.prototype, "useVertexTexture", { get: function () { console.warn("THREE.Skeleton: useVertexTexture has been removed."); }, set: function () { console.warn("THREE.Skeleton: useVertexTexture has been removed."); } }), ts.prototype.initBones = function () { console.error("THREE.SkinnedMesh: initBones() has been removed."); }, Object.defineProperty(Ac.prototype, "__arcLengthDivisions", { get: function () { return console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions; }, set: function (t) { console.warn("THREE.Curve: .__arcLengthDivisions is now .arcLengthDivisions."), this.arcLengthDivisions = t; } }), yr.prototype.setLens = function (t, e) { console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."), void 0 !== e && (this.filmGauge = e), this.setFocalLength(t); }, Object.defineProperties($c.prototype, { onlyShadow: { set: function () { console.warn("THREE.Light: .onlyShadow has been removed."); } }, shadowCameraFov: { set: function (t) { console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."), this.shadow.camera.fov = t; } }, shadowCameraLeft: { set: function (t) { console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."), this.shadow.camera.left = t; } }, shadowCameraRight: { set: function (t) { console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."), this.shadow.camera.right = t; } }, shadowCameraTop: { set: function (t) { console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."), this.shadow.camera.top = t; } }, shadowCameraBottom: { set: function (t) { console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."), this.shadow.camera.bottom = t; } }, shadowCameraNear: { set: function (t) { console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."), this.shadow.camera.near = t; } }, shadowCameraFar: { set: function (t) { console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."), this.shadow.camera.far = t; } }, shadowCameraVisible: { set: function () { console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead."); } }, shadowBias: { set: function (t) { console.warn("THREE.Light: .shadowBias is now .shadow.bias."), this.shadow.bias = t; } }, shadowDarkness: { set: function () { console.warn("THREE.Light: .shadowDarkness has been removed."); } }, shadowMapWidth: { set: function (t) { console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."), this.shadow.mapSize.width = t; } }, shadowMapHeight: { set: function (t) { console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."), this.shadow.mapSize.height = t; } } }), Object.defineProperties(yi.prototype, { length: { get: function () { return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."), this.array.length; } }, dynamic: { get: function () { return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."), this.usage === Ae; }, set: function () { console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."), this.setUsage(Ae); } } }), Object.assign(yi.prototype, { setDynamic: function (t) { return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."), this.setUsage(!0 === t ? Ae : Ee), this; }, copyIndicesArray: function () { console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed."); }, setArray: function () { console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers"); } }), Object.assign(Bi.prototype, { addIndex: function (t) { console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."), this.setIndex(t); }, addAttribute: function (t, e) { return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."), e && e.isBufferAttribute || e && e.isInterleavedBufferAttribute ? "index" === t ? (console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."), this.setIndex(e), this) : this.setAttribute(t, e) : (console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."), this.setAttribute(t, new yi(e, arguments[2]))); }, addDrawCall: function (t, e, n) { void 0 !== n && console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."), console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."), this.addGroup(t, e); }, clearDrawCalls: function () { console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."), this.clearGroups(); }, computeTangents: function () { console.warn("THREE.BufferGeometry: .computeTangents() has been removed."); }, computeOffsets: function () { console.warn("THREE.BufferGeometry: .computeOffsets() has been removed."); }, removeAttribute: function (t) { return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."), this.deleteAttribute(t); }, applyMatrix: function (t) { return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."), this.applyMatrix4(t); } }), Object.defineProperties(Bi.prototype, { drawcalls: { get: function () { return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."), this.groups; } }, offsets: { get: function () { return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."), this.groups; } } }), Object.defineProperties(Io.prototype, { dynamic: { get: function () { return console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."), this.usage === Ae; }, set: function (t) { console.warn("THREE.InterleavedBuffer: .length has been deprecated. Use .usage instead."), this.setUsage(t); } } }), Object.assign(Io.prototype, { setDynamic: function (t) { return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."), this.setUsage(!0 === t ? Ae : Ee), this; }, setArray: function () { console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers"); } }), Object.assign(bl.prototype, { getArrays: function () { console.error("THREE.ExtrudeBufferGeometry: .getArrays() has been removed."); }, addShapeList: function () { console.error("THREE.ExtrudeBufferGeometry: .addShapeList() has been removed."); }, addShape: function () { console.error("THREE.ExtrudeBufferGeometry: .addShape() has been removed."); } }), Object.defineProperties(ch.prototype, { dynamic: { set: function () { console.warn("THREE.Uniform: .dynamic has been removed. Use object.onBeforeRender() instead."); } }, onUpdate: { value: function () { return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."), this; } } }), Object.defineProperties(mi.prototype, { wrapAround: { get: function () { console.warn("THREE.Material: .wrapAround has been removed."); }, set: function () { console.warn("THREE.Material: .wrapAround has been removed."); } }, overdraw: { get: function () { console.warn("THREE.Material: .overdraw has been removed."); }, set: function () { console.warn("THREE.Material: .overdraw has been removed."); } }, wrapRGB: { get: function () { return console.warn("THREE.Material: .wrapRGB has been removed."), new ci; } }, shading: { get: function () { console.error("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."); }, set: function (t) { console.warn("THREE." + this.type + ": .shading has been removed. Use the boolean .flatShading instead."), this.flatShading = 1 === t; } }, stencilMask: { get: function () { return console.warn("THREE." + this.type + ": .stencilMask has been removed. Use .stencilFuncMask instead."), this.stencilFuncMask; }, set: function (t) { console.warn("THREE." + this.type + ": .stencilMask has been removed. Use .stencilFuncMask instead."), this.stencilFuncMask = t; } } }), Object.defineProperties(Xl.prototype, { metal: { get: function () { return console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead."), !1; }, set: function () { console.warn("THREE.MeshPhongMaterial: .metal has been removed. Use THREE.MeshStandardMaterial instead"); } } }), Object.defineProperties(gr.prototype, { derivatives: { get: function () { return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives; }, set: function (t) { console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."), this.extensions.derivatives = t; } } }), Object.assign(Do.prototype, { clearTarget: function (t, e, n, i) { console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."), this.setRenderTarget(t), this.clear(e, n, i); }, animate: function (t) { console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."), this.setAnimationLoop(t); }, getCurrentRenderTarget: function () { return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."), this.getRenderTarget(); }, getMaxAnisotropy: function () { return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."), this.capabilities.getMaxAnisotropy(); }, getPrecision: function () { return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."), this.capabilities.precision; }, resetGLState: function () { return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."), this.state.reset(); }, supportsFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."), this.extensions.get("OES_texture_float"); }, supportsHalfFloatTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."), this.extensions.get("OES_texture_half_float"); }, supportsStandardDerivatives: function () { return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."), this.extensions.get("OES_standard_derivatives"); }, supportsCompressedTextureS3TC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."), this.extensions.get("WEBGL_compressed_texture_s3tc"); }, supportsCompressedTexturePVRTC: function () { return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."), this.extensions.get("WEBGL_compressed_texture_pvrtc"); }, supportsBlendMinMax: function () { return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."), this.extensions.get("EXT_blend_minmax"); }, supportsVertexTextures: function () { return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."), this.capabilities.vertexTextures; }, supportsInstancedArrays: function () { return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."), this.extensions.get("ANGLE_instanced_arrays"); }, enableScissorTest: function (t) { console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."), this.setScissorTest(t); }, initMaterial: function () { console.warn("THREE.WebGLRenderer: .initMaterial() has been removed."); }, addPrePlugin: function () { console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed."); }, addPostPlugin: function () { console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed."); }, updateShadowMap: function () { console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed."); }, setFaceCulling: function () { console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed."); }, allocTextureUnit: function () { console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed."); }, setTexture: function () { console.warn("THREE.WebGLRenderer: .setTexture() has been removed."); }, setTexture2D: function () { console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed."); }, setTextureCube: function () { console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed."); }, getActiveMipMapLevel: function () { return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."), this.getActiveMipmapLevel(); } }), Object.defineProperties(Do.prototype, { shadowMapEnabled: { get: function () { return this.shadowMap.enabled; }, set: function (t) { console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."), this.shadowMap.enabled = t; } }, shadowMapType: { get: function () { return this.shadowMap.type; }, set: function (t) { console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."), this.shadowMap.type = t; } }, shadowMapCullFace: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead."); } }, context: { get: function () { return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."), this.getContext(); } }, vr: { get: function () { return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"), this.xr; } }, gammaInput: { get: function () { return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."), !1; }, set: function () { console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."); } }, gammaOutput: { get: function () { return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."), !1; }, set: function (t) { console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."), this.outputEncoding = !0 === t ? e : me; } } }), Object.defineProperties(_o.prototype, { cullFace: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead."); } }, renderReverseSided: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead."); } }, renderSingleSided: { get: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead."); }, set: function () { console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead."); } } }), Object.defineProperties(je.prototype, { wrapS: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."), this.texture.wrapS = t; } }, wrapT: { get: function () { return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."), this.texture.wrapT = t; } }, magFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."), this.texture.magFilter = t; } }, minFilter: { get: function () { return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."), this.texture.minFilter = t; } }, anisotropy: { get: function () { return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."), this.texture.anisotropy = t; } }, offset: { get: function () { return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."), this.texture.offset = t; } }, repeat: { get: function () { return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."), this.texture.repeat = t; } }, format: { get: function () { return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."), this.texture.format = t; } }, type: { get: function () { return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."), this.texture.type = t; } }, generateMipmaps: { get: function () { return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps; }, set: function (t) { console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."), this.texture.generateMipmaps = t; } } }), Object.defineProperties(ju.prototype, { load: { value: function (t) { console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead."); var e = this; return (new Tu).load(t, function (t) { e.setBuffer(t); }), this; } }, startTime: { set: function () { console.warn("THREE.Audio: .startTime is now .play( delay )."); } } }), Ju.prototype.getData = function () { return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."), this.getFrequencyData(); }, xr.prototype.updateCubeMap = function (t, e) { return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."), this.update(t, e); };
5244
5244
  var zd = { merge: function (t, e, n) { var i; console.warn("THREE.GeometryUtils: .merge() has been moved to Geometry. Use geometry.merge( geometry2, matrix, materialIndexOffset ) instead."), e.isMesh && (e.matrixAutoUpdate && e.updateMatrix(), i = e.matrix, e = e.geometry), t.merge(e, i, n); }, center: function (t) { return console.warn("THREE.GeometryUtils: .center() has been moved to Geometry. Use geometry.center() instead."), t.center(); } };
5245
5245
  Ne.crossOrigin = void 0, Ne.loadTexture = function (t, e, n, i) { console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead."); var r = new Ec; r.setCrossOrigin(this.crossOrigin); var a = r.load(t, n, void 0, i); return e && (a.mapping = e), a; }, Ne.loadTextureCube = function (t, e, n, i) { console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead."); var r = new Tc; r.setCrossOrigin(this.crossOrigin); var a = r.load(t, n, void 0, i); return e && (a.mapping = e), a; }, Ne.loadCompressedTexture = function () { console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead."); }, Ne.loadCompressedTextureCube = function () { console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead."); };
5246
- var Vd = { createMultiMaterialObject: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); }, detach: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); }, attach: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); } };
5247
- "undefined" != typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "113" } })), t.ACESFilmicToneMapping = Lt, t.AddEquation = rt, t.AddOperation = G, t.AdditiveBlending = tt, t.AlphaFormat = h, t.AlwaysDepth = wt, t.AlwaysStencilFunc = Te, t.AmbientLight = su, t.AmbientLightProbe = Lu, t.AnimationClip = fc, t.AnimationLoader = bc, t.AnimationMixer = lh, t.AnimationObjectGroup = oh, t.AnimationUtils = ec, t.ArcCurve = Lc, t.ArrayCamera = To, t.ArrowHelper = Zh, t.Audio = Vu, t.AudioAnalyser = Ju, t.AudioContext = Cu, t.AudioListener = zu, t.AudioLoader = Tu, t.AxesHelper = $h, t.AxisHelper = function (t) { return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."), new $h(t); }, t.BackSide = St, t.BasicDepthPacking = we, t.BasicShadowMap = 0, t.BinaryTextureLoader = function (t) { return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."), new Sc(t); }, t.Bone = rs, t.BooleanKeyframeTrack = sc, t.BoundingBoxHelper = function (t, e) { return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."), new Hh(t, e); }, t.Box2 = vh, t.Box3 = Pn, t.Box3Helper = Wh, t.BoxBufferGeometry = ur, t.BoxGeometry = cr, t.BoxHelper = Hh, t.BufferAttribute = yi, t.BufferGeometry = Bi, t.BufferGeometryLoader = pu, t.ByteType = r, t.Cache = gc, t.Camera = vr, t.CameraHelper = Uh, t.CanvasRenderer = function () { console.error("THREE.CanvasRenderer has been removed"); }, t.CanvasTexture = Ls, t.CatmullRomCurve3 = Nc, t.CineonToneMapping = q, t.CircleBufferGeometry = jl, t.CircleGeometry = Ul, t.ClampToEdgeWrapping = zt, t.Clock = Ru, t.ClosedSplineCurve3 = Nd, t.Color = ci, t.ColorKeyframeTrack = lc, t.CompressedTexture = Ds, t.CompressedTextureLoader = Mc, t.ConeBufferGeometry = Vl, t.ConeGeometry = zl, t.CubeCamera = xr, t.CubeGeometry = cr, t.CubeReflectionMapping = Ot, t.CubeRefractionMapping = It, t.CubeTexture = Gr, t.CubeTextureLoader = Tc, t.CubeUVReflectionMapping = Nt, t.CubeUVRefractionMapping = Bt, t.CubicBezierCurve = Vc, t.CubicBezierCurve3 = Uc, t.CubicInterpolant = ic, t.CullFaceBack = Y, t.CullFaceFront = Z, t.CullFaceFrontBack = 3, t.CullFaceNone = X, t.Curve = Ac, t.CurvePath = Xc, t.CustomBlending = it, t.CylinderBufferGeometry = Fl, t.CylinderGeometry = Bl, t.Cylindrical = mh, t.DataTexture = wr, t.DataTexture2DArray = Hr, t.DataTexture3D = Wr, t.DataTextureLoader = Sc, t.DecrementStencilOp = 7683, t.DecrementWrapStencilOp = 34056, t.DefaultLoadingManager = yc, t.DepthFormat = ee, t.DepthStencilFormat = ne, t.DepthTexture = Os, t.DirectionalLight = ou, t.DirectionalLightHelper = Fh, t.DirectionalLightShadow = au, t.DiscreteInterpolant = ac, t.DodecahedronBufferGeometry = Hs, t.DodecahedronGeometry = Gs, t.DoubleSide = $, t.DstAlphaFactor = mt, t.DstColorFactor = vt, t.DynamicBufferAttribute = function (t, e) { return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."), new yi(t, e).setUsage(Ae); }, t.DynamicCopyUsage = 35050, t.DynamicDrawUsage = Ae, t.DynamicReadUsage = 35049, t.EdgesGeometry = Nl, t.EdgesHelper = function (t, e) { return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."), new xs(new Nl(t.geometry), new us({ color: void 0 !== e ? e : 16777215 })); }, t.EllipseCurve = Dc, t.EqualDepth = Ct, t.EqualStencilFunc = 514, t.EquirectangularReflectionMapping = Pt, t.EquirectangularRefractionMapping = Rt, t.Euler = nn, t.EventDispatcher = De, t.ExtrudeBufferGeometry = bl, t.ExtrudeGeometry = wl, t.Face3 = pi, t.Face4 = function (t, e, n, i, r, a, o) { return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."), new pi(t, e, n, r, a, o); }, t.FaceColors = 1, t.FileLoader = wc, t.FlatShading = 1, t.Float32Attribute = function (t, e) { return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."), new Ti(t, e); }, t.Float32BufferAttribute = Ti, t.Float64Attribute = function (t, e) { return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."), new Ei(t, e); }, t.Float64BufferAttribute = Ei, t.FloatType = Zt, t.Fog = Oo, t.FogExp2 = Lo, t.Font = bu, t.FontLoader = Su, t.FrontFaceDirectionCCW = 1, t.FrontFaceDirectionCW = 0, t.FrontSide = O, t.Frustum = Sr, t.GammaEncoding = n, t.Geometry = lr, t.GeometryUtils = zd, t.GreaterDepth = Et, t.GreaterEqualDepth = Tt, t.GreaterEqualStencilFunc = 518, t.GreaterStencilFunc = 516, t.GridHelper = Ph, t.Group = Eo, t.HalfFloatType = $t, t.HemisphereLight = Kc, t.HemisphereLightHelper = Ih, t.HemisphereLightProbe = Du, t.IcosahedronBufferGeometry = js, t.IcosahedronGeometry = Us, t.ImageBitmapLoader = _u, t.ImageLoader = Cc, t.ImageUtils = Ne, t.ImmediateRenderObject = wh, t.IncrementStencilOp = 7682, t.IncrementWrapStencilOp = 34055, t.InstancedBufferAttribute = du, t.InstancedBufferGeometry = hu, t.InstancedInterleavedBuffer = uh, t.InstancedMesh = cs, t.Int16Attribute = function (t, e) { return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."), new bi(t, e); }, t.Int16BufferAttribute = bi, t.Int32Attribute = function (t, e) { return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."), new Si(t, e); }, t.Int32BufferAttribute = Si, t.Int8Attribute = function (t, e) { return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."), new xi(t, e); }, t.Int8BufferAttribute = xi, t.IntType = s, t.InterleavedBuffer = Io, t.InterleavedBufferAttribute = ko, t.Interpolant = nc, t.InterpolateDiscrete = ue, t.InterpolateLinear = he, t.InterpolateSmooth = 2302, t.InvertStencilOp = 5386, t.JSONLoader = function () { console.error("THREE.JSONLoader has been removed."); }, t.KeepStencilOp = Ce, t.KeyframeTrack = oc, t.LOD = Qo, t.LatheBufferGeometry = Il, t.LatheGeometry = Ol, t.Layers = rn, t.LensFlare = function () { console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js"); }, t.LessDepth = bt, t.LessEqualDepth = Mt, t.LessEqualStencilFunc = 515, t.LessStencilFunc = 513, t.Light = $c, t.LightProbe = Au, t.LightShadow = Qc, t.Line = gs, t.Line3 = _h, t.LineBasicMaterial = us, t.LineCurve = jc, t.LineCurve3 = Gc, t.LineDashedMaterial = Ql, t.LineLoop = _s, t.LinePieces = 1, t.LineSegments = xs, t.LineStrip = 0, t.LinearEncoding = me, t.LinearFilter = Ht, t.LinearInterpolant = rc, t.LinearMipMapLinearFilter = 1008, t.LinearMipMapNearestFilter = 1007, t.LinearMipmapLinearFilter = Jt, t.LinearMipmapNearestFilter = Wt, t.LinearToneMapping = Dt, t.Loader = xc, t.LoaderUtils = uu, t.LoadingManager = vc, t.LogLuvEncoding = ve, t.LoopOnce = 2200, t.LoopPingPong = 2202, t.LoopRepeat = 2201, t.LuminanceAlphaFormat = p, t.LuminanceFormat = d, t.MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, t.Material = mi, t.MaterialLoader = cu, t.Math = Pe, t.MathUtils = Pe, t.Matrix3 = ke, t.Matrix4 = Qe, t.MaxEquation = lt, t.Mesh = er, t.MeshBasicMaterial = gi, t.MeshDepthMaterial = go, t.MeshDistanceMaterial = vo, t.MeshFaceMaterial = function (t) { return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."), t; }, t.MeshLambertMaterial = $l, t.MeshMatcapMaterial = Kl, t.MeshNormalMaterial = Zl, t.MeshPhongMaterial = Xl, t.MeshPhysicalMaterial = ql, t.MeshStandardMaterial = Jl, t.MeshToonMaterial = Yl, t.MinEquation = st, t.MirroredRepeatWrapping = Vt, t.MixOperation = j, t.MultiMaterial = function (t) { return void 0 === t && (t = []), console.warn("THREE.MultiMaterial has been removed. Use an Array instead."), t.isMultiMaterial = !0, (t.materials = t).clone = function () { return t.slice(); }, t; }, t.MultiplyBlending = nt, t.MultiplyOperation = U, t.NearestFilter = Ut, t.NearestMipMapLinearFilter = 1005, t.NearestMipMapNearestFilter = 1004, t.NearestMipmapLinearFilter = Gt, t.NearestMipmapNearestFilter = jt, t.NeverDepth = _t, t.NeverStencilFunc = 512, t.NoBlending = K, t.NoColors = o, t.NoToneMapping = H, t.NormalBlending = Q, t.NotEqualDepth = At, t.NotEqualStencilFunc = 517, t.NumberKeyframeTrack = cc, t.Object3D = yn, t.ObjectLoader = mu, t.ObjectSpaceNormalMap = Se, t.OctahedronBufferGeometry = Vs, t.OctahedronGeometry = zs, t.OneFactor = ut, t.OneMinusDstAlphaFactor = gt, t.OneMinusDstColorFactor = yt, t.OneMinusSrcAlphaFactor = ft, t.OneMinusSrcColorFactor = dt, t.OrthographicCamera = ru, t.PCFShadowMap = F, t.PCFSoftShadowMap = z, t.PMREMGenerator = Md, t.ParametricBufferGeometry = Rs, t.ParametricGeometry = Ps, t.Particle = function (t) { return console.warn("THREE.Particle has been renamed to THREE.Sprite."), new Yo(t); }, t.ParticleBasicMaterial = function (t) { return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.ParticleSystem = function (t, e) { return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."), new Ts(t, e); }, t.ParticleSystemMaterial = function (t) { return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.Path = Yc, t.PerspectiveCamera = yr, t.Plane = Xn, t.PlaneBufferGeometry = Dr, t.PlaneGeometry = Ar, t.PlaneHelper = Jh, t.PointCloud = function (t, e) { return console.warn("THREE.PointCloud has been renamed to THREE.Points."), new Ts(t, e); }, t.PointCloudMaterial = function (t) { return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.PointLight = iu, t.PointLightHelper = Ah, t.Points = Ts, t.PointsMaterial = ws, t.PolarGridHelper = Rh, t.PolyhedronBufferGeometry = Ns, t.PolyhedronGeometry = ks, t.PositionalAudio = Wu, t.PropertyBinding = ah, t.PropertyMixer = qu, t.QuadraticBezierCurve = Hc, t.QuadraticBezierCurve3 = Wc, t.Quaternion = je, t.QuaternionKeyframeTrack = hc, t.QuaternionLinearInterpolant = uc, t.REVISION = "113", t.RGBADepthPacking = be, t.RGBAFormat = te, t.RGBAIntegerFormat = _, t.RGBA_ASTC_10x10_Format = se, t.RGBA_ASTC_10x5_Format = re, t.RGBA_ASTC_10x6_Format = ae, t.RGBA_ASTC_10x8_Format = oe, t.RGBA_ASTC_12x10_Format = le, t.RGBA_ASTC_12x12_Format = ce, t.RGBA_ASTC_4x4_Format = L, t.RGBA_ASTC_5x4_Format = I, t.RGBA_ASTC_5x5_Format = P, t.RGBA_ASTC_6x5_Format = R, t.RGBA_ASTC_6x6_Format = k, t.RGBA_ASTC_8x5_Format = N, t.RGBA_ASTC_8x6_Format = B, t.RGBA_ASTC_8x8_Format = ie, t.RGBA_PVRTC_2BPPV1_Format = A, t.RGBA_PVRTC_4BPPV1_Format = E, t.RGBA_S3TC_DXT1_Format = b, t.RGBA_S3TC_DXT3_Format = M, t.RGBA_S3TC_DXT5_Format = S, t.RGBDEncoding = _e, t.RGBEEncoding = ge, t.RGBEFormat = i, t.RGBFormat = Qt, t.RGBIntegerFormat = x, t.RGBM16Encoding = xe, t.RGBM7Encoding = ye, t.RGB_ETC1_Format = D, t.RGB_PVRTC_2BPPV1_Format = T, t.RGB_PVRTC_4BPPV1_Format = C, t.RGB_S3TC_DXT1_Format = w, t.RGFormat = g, t.RGIntegerFormat = y, t.RawShaderMaterial = Wl, t.Ray = Hn, t.Raycaster = hh, t.RectAreaLight = lu, t.RedFormat = f, t.RedIntegerFormat = m, t.ReinhardToneMapping = W, t.RepeatWrapping = Ft, t.ReplaceStencilOp = 7681, t.ReverseSubtractEquation = ot, t.RingBufferGeometry = Ll, t.RingGeometry = Dl, t.Scene = xn, t.SceneUtils = Vd, t.ShaderChunk = Lr, t.ShaderLib = Or, t.ShaderMaterial = gr, t.ShadowMaterial = Hl, t.Shape = Zc, t.ShapeBufferGeometry = Rl, t.ShapeGeometry = Pl, t.ShapePath = wu, t.ShapeUtils = yl, t.ShortType = a, t.Skeleton = is, t.SkeletonHelper = Eh, t.SkinnedMesh = ts, t.SmoothShading = 2, t.Sphere = Nn, t.SphereBufferGeometry = Al, t.SphereGeometry = El, t.Spherical = fh, t.SphericalHarmonics3 = Eu, t.SphericalReflectionMapping = kt, t.Spline = Fd, t.SplineCurve = Jc, t.SplineCurve3 = Bd, t.SpotLight = eu, t.SpotLightHelper = Mh, t.SpotLightShadow = tu, t.Sprite = Yo, t.SpriteMaterial = No, t.SrcAlphaFactor = pt, t.SrcAlphaSaturateFactor = xt, t.SrcColorFactor = ht, t.StaticCopyUsage = 35046, t.StaticDrawUsage = Ee, t.StaticReadUsage = 35045, t.StereoCamera = Pu, t.StreamCopyUsage = 35042, t.StreamDrawUsage = 35040, t.StreamReadUsage = 35041, t.StringKeyframeTrack = dc, t.SubtractEquation = at, t.SubtractiveBlending = et, t.TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, t.TangentSpaceNormalMap = Me, t.TetrahedronBufferGeometry = Fs, t.TetrahedronGeometry = Bs, t.TextBufferGeometry = Tl, t.TextGeometry = Cl, t.Texture = Fe, t.TextureLoader = Ec, t.TorusBufferGeometry = Zs, t.TorusGeometry = Ys, t.TorusKnotBufferGeometry = Xs, t.TorusKnotGeometry = qs, t.Triangle = ai, t.TriangleFanDrawMode = 2, t.TriangleStripDrawMode = 1, t.TrianglesDrawMode = 0, t.TubeBufferGeometry = Js, t.TubeGeometry = Ws, t.UVMapping = 300, t.Uint16Attribute = function (t, e) { return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."), new Mi(t, e); }, t.Uint16BufferAttribute = Mi, t.Uint32Attribute = function (t, e) { return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."), new Ci(t, e); }, t.Uint32BufferAttribute = Ci, t.Uint8Attribute = function (t, e) { return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."), new _i(t, e); }, t.Uint8BufferAttribute = _i, t.Uint8ClampedAttribute = function (t, e) { return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."), new wi(t, e); }, t.Uint8ClampedBufferAttribute = wi, t.Uncharted2ToneMapping = J, t.Uniform = ch, t.UniformsLib = Cr, t.UniformsUtils = pr, t.UnsignedByteType = qt, t.UnsignedInt248Type = Kt, t.UnsignedIntType = Yt, t.UnsignedShort4444Type = l, t.UnsignedShort5551Type = c, t.UnsignedShort565Type = u, t.UnsignedShortType = Xt, t.VSMShadowMap = V, t.Vector2 = Re, t.Vector3 = We, t.Vector4 = ze, t.VectorKeyframeTrack = pc, t.Vertex = function (t, e, n) { return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."), new We(t, e, n); }, t.VertexColors = v, t.VideoTexture = As, t.WebGLCubeRenderTarget = _r, t.WebGLMultisampleRenderTarget = Ue, t.WebGLRenderTarget = Ve, t.WebGLRenderTargetCube = function (t, e, n) { return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."), new _r(t, n); }, t.WebGLRenderer = Do, t.WebGLUtils = Mo, t.WireframeGeometry = Is, t.WireframeHelper = function (t, e) { return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."), new xs(new Is(t.geometry), new us({ color: void 0 !== e ? e : 16777215 })); }, t.WrapAroundEnding = fe, t.XHRLoader = function (t) { return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."), new wc(t); }, t.ZeroCurvatureEnding = de, t.ZeroFactor = ct, t.ZeroSlopeEnding = pe, t.ZeroStencilOp = 0, t.sRGBEncoding = e, Object.defineProperty(t, "__esModule", { value: !0 });
5246
+ var jd = { createMultiMaterialObject: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); }, detach: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); }, attach: function () { console.error("THREE.SceneUtils has been moved to /examples/js/utils/SceneUtils.js"); } };
5247
+ "undefined" != typeof __THREE_DEVTOOLS__ && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "113" } })), t.ACESFilmicToneMapping = Ot, t.AddEquation = rt, t.AddOperation = G, t.AdditiveBlending = tt, t.AlphaFormat = h, t.AlwaysDepth = wt, t.AlwaysStencilFunc = Te, t.AmbientLight = su, t.AmbientLightProbe = Ou, t.AnimationClip = fc, t.AnimationLoader = bc, t.AnimationMixer = lh, t.AnimationObjectGroup = oh, t.AnimationUtils = ec, t.ArcCurve = Oc, t.ArrayCamera = To, t.ArrowHelper = Zh, t.Audio = ju, t.AudioAnalyser = Ju, t.AudioContext = Cu, t.AudioListener = zu, t.AudioLoader = Tu, t.AxesHelper = $h, t.AxisHelper = function (t) { return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."), new $h(t); }, t.BackSide = St, t.BasicDepthPacking = we, t.BasicShadowMap = 0, t.BinaryTextureLoader = function (t) { return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."), new Sc(t); }, t.Bone = rs, t.BooleanKeyframeTrack = sc, t.BoundingBoxHelper = function (t, e) { return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."), new Hh(t, e); }, t.Box2 = vh, t.Box3 = Pn, t.Box3Helper = Wh, t.BoxBufferGeometry = ur, t.BoxGeometry = cr, t.BoxHelper = Hh, t.BufferAttribute = yi, t.BufferGeometry = Bi, t.BufferGeometryLoader = pu, t.ByteType = r, t.Cache = gc, t.Camera = vr, t.CameraHelper = Vh, t.CanvasRenderer = function () { console.error("THREE.CanvasRenderer has been removed"); }, t.CanvasTexture = Os, t.CatmullRomCurve3 = Nc, t.CineonToneMapping = q, t.CircleBufferGeometry = Ul, t.CircleGeometry = Vl, t.ClampToEdgeWrapping = zt, t.Clock = Ru, t.ClosedSplineCurve3 = Nd, t.Color = ci, t.ColorKeyframeTrack = lc, t.CompressedTexture = Ds, t.CompressedTextureLoader = Mc, t.ConeBufferGeometry = jl, t.ConeGeometry = zl, t.CubeCamera = xr, t.CubeGeometry = cr, t.CubeReflectionMapping = Lt, t.CubeRefractionMapping = It, t.CubeTexture = Gr, t.CubeTextureLoader = Tc, t.CubeUVReflectionMapping = Nt, t.CubeUVRefractionMapping = Bt, t.CubicBezierCurve = jc, t.CubicBezierCurve3 = Vc, t.CubicInterpolant = ic, t.CullFaceBack = Y, t.CullFaceFront = Z, t.CullFaceFrontBack = 3, t.CullFaceNone = X, t.Curve = Ac, t.CurvePath = Xc, t.CustomBlending = it, t.CylinderBufferGeometry = Fl, t.CylinderGeometry = Bl, t.Cylindrical = mh, t.DataTexture = wr, t.DataTexture2DArray = Hr, t.DataTexture3D = Wr, t.DataTextureLoader = Sc, t.DecrementStencilOp = 7683, t.DecrementWrapStencilOp = 34056, t.DefaultLoadingManager = yc, t.DepthFormat = ee, t.DepthStencilFormat = ne, t.DepthTexture = Ls, t.DirectionalLight = ou, t.DirectionalLightHelper = Fh, t.DirectionalLightShadow = au, t.DiscreteInterpolant = ac, t.DodecahedronBufferGeometry = Hs, t.DodecahedronGeometry = Gs, t.DoubleSide = $, t.DstAlphaFactor = mt, t.DstColorFactor = vt, t.DynamicBufferAttribute = function (t, e) { return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."), new yi(t, e).setUsage(Ae); }, t.DynamicCopyUsage = 35050, t.DynamicDrawUsage = Ae, t.DynamicReadUsage = 35049, t.EdgesGeometry = Nl, t.EdgesHelper = function (t, e) { return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."), new xs(new Nl(t.geometry), new us({ color: void 0 !== e ? e : 16777215 })); }, t.EllipseCurve = Dc, t.EqualDepth = Ct, t.EqualStencilFunc = 514, t.EquirectangularReflectionMapping = Pt, t.EquirectangularRefractionMapping = Rt, t.Euler = nn, t.EventDispatcher = De, t.ExtrudeBufferGeometry = bl, t.ExtrudeGeometry = wl, t.Face3 = pi, t.Face4 = function (t, e, n, i, r, a, o) { return console.warn("THREE.Face4 has been removed. A THREE.Face3 will be created instead."), new pi(t, e, n, r, a, o); }, t.FaceColors = 1, t.FileLoader = wc, t.FlatShading = 1, t.Float32Attribute = function (t, e) { return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."), new Ti(t, e); }, t.Float32BufferAttribute = Ti, t.Float64Attribute = function (t, e) { return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."), new Ei(t, e); }, t.Float64BufferAttribute = Ei, t.FloatType = Zt, t.Fog = Lo, t.FogExp2 = Oo, t.Font = bu, t.FontLoader = Su, t.FrontFaceDirectionCCW = 1, t.FrontFaceDirectionCW = 0, t.FrontSide = L, t.Frustum = Sr, t.GammaEncoding = n, t.Geometry = lr, t.GeometryUtils = zd, t.GreaterDepth = Et, t.GreaterEqualDepth = Tt, t.GreaterEqualStencilFunc = 518, t.GreaterStencilFunc = 516, t.GridHelper = Ph, t.Group = Eo, t.HalfFloatType = $t, t.HemisphereLight = Kc, t.HemisphereLightHelper = Ih, t.HemisphereLightProbe = Du, t.IcosahedronBufferGeometry = Us, t.IcosahedronGeometry = Vs, t.ImageBitmapLoader = _u, t.ImageLoader = Cc, t.ImageUtils = Ne, t.ImmediateRenderObject = wh, t.IncrementStencilOp = 7682, t.IncrementWrapStencilOp = 34055, t.InstancedBufferAttribute = du, t.InstancedBufferGeometry = hu, t.InstancedInterleavedBuffer = uh, t.InstancedMesh = cs, t.Int16Attribute = function (t, e) { return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."), new bi(t, e); }, t.Int16BufferAttribute = bi, t.Int32Attribute = function (t, e) { return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."), new Si(t, e); }, t.Int32BufferAttribute = Si, t.Int8Attribute = function (t, e) { return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."), new xi(t, e); }, t.Int8BufferAttribute = xi, t.IntType = s, t.InterleavedBuffer = Io, t.InterleavedBufferAttribute = ko, t.Interpolant = nc, t.InterpolateDiscrete = ue, t.InterpolateLinear = he, t.InterpolateSmooth = 2302, t.InvertStencilOp = 5386, t.JSONLoader = function () { console.error("THREE.JSONLoader has been removed."); }, t.KeepStencilOp = Ce, t.KeyframeTrack = oc, t.LOD = Qo, t.LatheBufferGeometry = Il, t.LatheGeometry = Ll, t.Layers = rn, t.LensFlare = function () { console.error("THREE.LensFlare has been moved to /examples/js/objects/Lensflare.js"); }, t.LessDepth = bt, t.LessEqualDepth = Mt, t.LessEqualStencilFunc = 515, t.LessStencilFunc = 513, t.Light = $c, t.LightProbe = Au, t.LightShadow = Qc, t.Line = gs, t.Line3 = _h, t.LineBasicMaterial = us, t.LineCurve = Uc, t.LineCurve3 = Gc, t.LineDashedMaterial = Ql, t.LineLoop = _s, t.LinePieces = 1, t.LineSegments = xs, t.LineStrip = 0, t.LinearEncoding = me, t.LinearFilter = Ht, t.LinearInterpolant = rc, t.LinearMipMapLinearFilter = 1008, t.LinearMipMapNearestFilter = 1007, t.LinearMipmapLinearFilter = Jt, t.LinearMipmapNearestFilter = Wt, t.LinearToneMapping = Dt, t.Loader = xc, t.LoaderUtils = uu, t.LoadingManager = vc, t.LogLuvEncoding = ve, t.LoopOnce = 2200, t.LoopPingPong = 2202, t.LoopRepeat = 2201, t.LuminanceAlphaFormat = p, t.LuminanceFormat = d, t.MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 }, t.Material = mi, t.MaterialLoader = cu, t.Math = Pe, t.MathUtils = Pe, t.Matrix3 = ke, t.Matrix4 = Qe, t.MaxEquation = lt, t.Mesh = er, t.MeshBasicMaterial = gi, t.MeshDepthMaterial = go, t.MeshDistanceMaterial = vo, t.MeshFaceMaterial = function (t) { return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."), t; }, t.MeshLambertMaterial = $l, t.MeshMatcapMaterial = Kl, t.MeshNormalMaterial = Zl, t.MeshPhongMaterial = Xl, t.MeshPhysicalMaterial = ql, t.MeshStandardMaterial = Jl, t.MeshToonMaterial = Yl, t.MinEquation = st, t.MirroredRepeatWrapping = jt, t.MixOperation = U, t.MultiMaterial = function (t) { return void 0 === t && (t = []), console.warn("THREE.MultiMaterial has been removed. Use an Array instead."), t.isMultiMaterial = !0, (t.materials = t).clone = function () { return t.slice(); }, t; }, t.MultiplyBlending = nt, t.MultiplyOperation = V, t.NearestFilter = Vt, t.NearestMipMapLinearFilter = 1005, t.NearestMipMapNearestFilter = 1004, t.NearestMipmapLinearFilter = Gt, t.NearestMipmapNearestFilter = Ut, t.NeverDepth = _t, t.NeverStencilFunc = 512, t.NoBlending = K, t.NoColors = o, t.NoToneMapping = H, t.NormalBlending = Q, t.NotEqualDepth = At, t.NotEqualStencilFunc = 517, t.NumberKeyframeTrack = cc, t.Object3D = yn, t.ObjectLoader = mu, t.ObjectSpaceNormalMap = Se, t.OctahedronBufferGeometry = js, t.OctahedronGeometry = zs, t.OneFactor = ut, t.OneMinusDstAlphaFactor = gt, t.OneMinusDstColorFactor = yt, t.OneMinusSrcAlphaFactor = ft, t.OneMinusSrcColorFactor = dt, t.OrthographicCamera = ru, t.PCFShadowMap = F, t.PCFSoftShadowMap = z, t.PMREMGenerator = Md, t.ParametricBufferGeometry = Rs, t.ParametricGeometry = Ps, t.Particle = function (t) { return console.warn("THREE.Particle has been renamed to THREE.Sprite."), new Yo(t); }, t.ParticleBasicMaterial = function (t) { return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.ParticleSystem = function (t, e) { return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."), new Ts(t, e); }, t.ParticleSystemMaterial = function (t) { return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.Path = Yc, t.PerspectiveCamera = yr, t.Plane = Xn, t.PlaneBufferGeometry = Dr, t.PlaneGeometry = Ar, t.PlaneHelper = Jh, t.PointCloud = function (t, e) { return console.warn("THREE.PointCloud has been renamed to THREE.Points."), new Ts(t, e); }, t.PointCloudMaterial = function (t) { return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."), new ws(t); }, t.PointLight = iu, t.PointLightHelper = Ah, t.Points = Ts, t.PointsMaterial = ws, t.PolarGridHelper = Rh, t.PolyhedronBufferGeometry = Ns, t.PolyhedronGeometry = ks, t.PositionalAudio = Wu, t.PropertyBinding = ah, t.PropertyMixer = qu, t.QuadraticBezierCurve = Hc, t.QuadraticBezierCurve3 = Wc, t.Quaternion = Ue, t.QuaternionKeyframeTrack = hc, t.QuaternionLinearInterpolant = uc, t.REVISION = "113", t.RGBADepthPacking = be, t.RGBAFormat = te, t.RGBAIntegerFormat = _, t.RGBA_ASTC_10x10_Format = se, t.RGBA_ASTC_10x5_Format = re, t.RGBA_ASTC_10x6_Format = ae, t.RGBA_ASTC_10x8_Format = oe, t.RGBA_ASTC_12x10_Format = le, t.RGBA_ASTC_12x12_Format = ce, t.RGBA_ASTC_4x4_Format = O, t.RGBA_ASTC_5x4_Format = I, t.RGBA_ASTC_5x5_Format = P, t.RGBA_ASTC_6x5_Format = R, t.RGBA_ASTC_6x6_Format = k, t.RGBA_ASTC_8x5_Format = N, t.RGBA_ASTC_8x6_Format = B, t.RGBA_ASTC_8x8_Format = ie, t.RGBA_PVRTC_2BPPV1_Format = A, t.RGBA_PVRTC_4BPPV1_Format = E, t.RGBA_S3TC_DXT1_Format = b, t.RGBA_S3TC_DXT3_Format = M, t.RGBA_S3TC_DXT5_Format = S, t.RGBDEncoding = _e, t.RGBEEncoding = ge, t.RGBEFormat = i, t.RGBFormat = Qt, t.RGBIntegerFormat = x, t.RGBM16Encoding = xe, t.RGBM7Encoding = ye, t.RGB_ETC1_Format = D, t.RGB_PVRTC_2BPPV1_Format = T, t.RGB_PVRTC_4BPPV1_Format = C, t.RGB_S3TC_DXT1_Format = w, t.RGFormat = g, t.RGIntegerFormat = y, t.RawShaderMaterial = Wl, t.Ray = Hn, t.Raycaster = hh, t.RectAreaLight = lu, t.RedFormat = f, t.RedIntegerFormat = m, t.ReinhardToneMapping = W, t.RepeatWrapping = Ft, t.ReplaceStencilOp = 7681, t.ReverseSubtractEquation = ot, t.RingBufferGeometry = Ol, t.RingGeometry = Dl, t.Scene = xn, t.SceneUtils = jd, t.ShaderChunk = Or, t.ShaderLib = Lr, t.ShaderMaterial = gr, t.ShadowMaterial = Hl, t.Shape = Zc, t.ShapeBufferGeometry = Rl, t.ShapeGeometry = Pl, t.ShapePath = wu, t.ShapeUtils = yl, t.ShortType = a, t.Skeleton = is, t.SkeletonHelper = Eh, t.SkinnedMesh = ts, t.SmoothShading = 2, t.Sphere = Nn, t.SphereBufferGeometry = Al, t.SphereGeometry = El, t.Spherical = fh, t.SphericalHarmonics3 = Eu, t.SphericalReflectionMapping = kt, t.Spline = Fd, t.SplineCurve = Jc, t.SplineCurve3 = Bd, t.SpotLight = eu, t.SpotLightHelper = Mh, t.SpotLightShadow = tu, t.Sprite = Yo, t.SpriteMaterial = No, t.SrcAlphaFactor = pt, t.SrcAlphaSaturateFactor = xt, t.SrcColorFactor = ht, t.StaticCopyUsage = 35046, t.StaticDrawUsage = Ee, t.StaticReadUsage = 35045, t.StereoCamera = Pu, t.StreamCopyUsage = 35042, t.StreamDrawUsage = 35040, t.StreamReadUsage = 35041, t.StringKeyframeTrack = dc, t.SubtractEquation = at, t.SubtractiveBlending = et, t.TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 }, t.TangentSpaceNormalMap = Me, t.TetrahedronBufferGeometry = Fs, t.TetrahedronGeometry = Bs, t.TextBufferGeometry = Tl, t.TextGeometry = Cl, t.Texture = Fe, t.TextureLoader = Ec, t.TorusBufferGeometry = Zs, t.TorusGeometry = Ys, t.TorusKnotBufferGeometry = Xs, t.TorusKnotGeometry = qs, t.Triangle = ai, t.TriangleFanDrawMode = 2, t.TriangleStripDrawMode = 1, t.TrianglesDrawMode = 0, t.TubeBufferGeometry = Js, t.TubeGeometry = Ws, t.UVMapping = 300, t.Uint16Attribute = function (t, e) { return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."), new Mi(t, e); }, t.Uint16BufferAttribute = Mi, t.Uint32Attribute = function (t, e) { return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."), new Ci(t, e); }, t.Uint32BufferAttribute = Ci, t.Uint8Attribute = function (t, e) { return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."), new _i(t, e); }, t.Uint8BufferAttribute = _i, t.Uint8ClampedAttribute = function (t, e) { return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."), new wi(t, e); }, t.Uint8ClampedBufferAttribute = wi, t.Uncharted2ToneMapping = J, t.Uniform = ch, t.UniformsLib = Cr, t.UniformsUtils = pr, t.UnsignedByteType = qt, t.UnsignedInt248Type = Kt, t.UnsignedIntType = Yt, t.UnsignedShort4444Type = l, t.UnsignedShort5551Type = c, t.UnsignedShort565Type = u, t.UnsignedShortType = Xt, t.VSMShadowMap = j, t.Vector2 = Re, t.Vector3 = We, t.Vector4 = ze, t.VectorKeyframeTrack = pc, t.Vertex = function (t, e, n) { return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."), new We(t, e, n); }, t.VertexColors = v, t.VideoTexture = As, t.WebGLCubeRenderTarget = _r, t.WebGLMultisampleRenderTarget = Ve, t.WebGLRenderTarget = je, t.WebGLRenderTargetCube = function (t, e, n) { return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."), new _r(t, n); }, t.WebGLRenderer = Do, t.WebGLUtils = Mo, t.WireframeGeometry = Is, t.WireframeHelper = function (t, e) { return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."), new xs(new Is(t.geometry), new us({ color: void 0 !== e ? e : 16777215 })); }, t.WrapAroundEnding = fe, t.XHRLoader = function (t) { return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."), new wc(t); }, t.ZeroCurvatureEnding = de, t.ZeroFactor = ct, t.ZeroSlopeEnding = pe, t.ZeroStencilOp = 0, t.sRGBEncoding = e, Object.defineProperty(t, "__esModule", { value: !0 });
5248
5248
  }, "object" == typeof n && void 0 !== e ? r(n) : "function" == typeof define && define.amd ? define(["exports"], r) : r((i = i || self).THREE = {}); }, {}], 20: [function (t, e, n) {
5249
5249
  "use strict";
5250
5250
  Object.defineProperty(n, "__esModule", { value: !0 }), n.McEdJigOsnap = n.McEdImpJigGlobalData = n.MxOsnapDefine = void 0;
@@ -5299,27 +5299,42 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5299
5299
  } }, S.prototype.seInValidPoint = function () { this.setPoint(void 0); }, S.prototype.getCurrentOSnapPoint = function (t) { var e = {}; return this.isEnable() ? (e.pt = t, e.osmode = this.m_osmode, this.m_osmode != v.MxJigCmdManager.OsnapMode.kOsModekValid ? (e.pt.x = this.m_ptSnapPoint.x, e.pt.y = this.m_ptSnapPoint.y, e.pt.z = this.m_ptSnapPoint.z, s.isOsnapZValue() || (t.z = 0)) : e.pt = t) : (e.pt = t, e.osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid), e; }, S.prototype.setLongprogressStatus = function (t) { this.m_iLongprogressStatus = t; }, S.prototype.reComputeOffset = function () { }, S);
5300
5300
  function S(t) { this.m_inPoint = new f.Vector3, this.m_vecOffset = new f.Vector3, this.m_pt = new f.Vector3, this.m_isValid = !1, this.m_ptSnapPoint = new f.Vector3, this.m_ptSnapSrcPoint = new f.Vector3, this.m_osmode = v.MxJigCmdManager.OsnapMode.kOsModekValid, this.m_prvInputPoint = new f.Vector3, this.m_isValidPrvInputPoint = !1, this.m_lOSmode = 0, this.m_iLongprogressStatus = -1, this.m_isOffsetInputPostion = !1, this.m_mxJig = null, this.m_notifyOsnap_delayCall = void 0, this.m_isRuning = !1, this.m_isEnable = !1, this.m_mxJig = t, this.m_draw = new w; }
5301
5301
  n.McEdJigOsnap = M;
5302
- }, { "./MxDrawData": 34, "./MxDrawObject": 35, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxTools": 53, "./MxWindowsEvent": 59, three: 19 }], 21: [function (t, e, n) {
5302
+ }, { "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxWindowsEvent": 65, three: 19 }], 21: [function (t, e, n) {
5303
+ "use strict";
5304
+ var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5305
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
5306
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
5307
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.McGiWorldDrawSelect = n.McGiWorldDraw = n.McGiWorldDrawType = void 0;
5308
+ var a, o, s = t("three"), l = t("./MxThreeJS");
5309
+ (o = a = n.McGiWorldDrawType || (n.McGiWorldDrawType = {}))[o.kWorldDraw = 1] = "kWorldDraw", o[o.kDynDragDraw = 2] = "kDynDragDraw", o[o.kSelectDraw = 3] = "kSelectDraw";
5310
+ var c = (u.prototype.getType = function () { return this.worldDrawType; }, u.prototype.setColor = function (t) { this.iColor = t; }, u.prototype.getColor = function () { return this.iColor; }, u.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, u.prototype.getRenderOrder = function () { return this.iRenderOrder; }, u.prototype.setLineWidth = function (t) { this.iLineWidth = t; }, u.prototype.getLineWidth = function () { return this.iLineWidth; }, u.prototype.drawEntity = function (t) { t.renderOrder = this.iRenderOrder, this.aryEntity.push(t); }, u.prototype.getEntitys = function () { return this.aryEntity; }, u.prototype.getMxObject = function () { return this.mxObj; }, u.prototype.drawLine = function (t, e) { this.drawEntity(l.MxThreeJS.createLine(t, e, this.iColor)); }, u.prototype.drawLine2 = function (t, e, n, i) { this.drawEntity(l.MxThreeJS.createLine(new s.Vector3(t, e, 0), new s.Vector3(n, i, 0), this.iColor)); }, u.prototype.drawCircle = function (t, e) { this.drawEntity(l.MxThreeJS.createCircle(t, e, this.iColor)); }, u.prototype.drawText = function (t, e, n, i) { var r = l.MxThreeJS.creatTextSprite(t, i, e, n, this.iColor); this.drawEntity(r); }, u.prototype.setupForEntity = function (t) { this.iColor = t.getColor(); }, u);
5311
+ function u(t, e) { this.aryEntity = [], this.iColor = 16777215, this.iLineWidth = 0, this.iRenderOrder = 100, this.worldDrawType = 1, this.mxObj = t, this.worldDrawType = e; }
5312
+ n.McGiWorldDraw = c;
5313
+ var h, d = (r(p, h = c), p.prototype.setCurEntityId = function (t) { this.curEntityId = t; }, p.prototype.drawEntity = function (t) { console.log("MXASSER(0) No Sup DrawEntity"); }, p.prototype.drawText = function (t, e, n, i) { }, p.prototype.isValid = function () { return 0 != this.curEntityId || (console.log("this.curEntityId == 0"), !1); }, p.prototype.drawLine = function (t, e) { this.isValid() && this.selectManager.addLineDisplay(this.curEntityId, t, e); }, p.prototype.drawLine2 = function (t, e, n, i) { this.isValid() && this.selectManager.addLineDisplay(this.curEntityId, new s.Vector3(t, e, 0), new s.Vector3(n, i, 0)); }, p.prototype.drawCircle = function (t, e) { this.isValid() && this.selectManager.addCircleDisplay(this.curEntityId, t, e); }, p);
5314
+ function p(t, e) { var n = h.call(this, t, a.kSelectDraw) || this; return n.selectManager = e, n.curEntityId = 0, n; }
5315
+ n.McGiWorldDrawSelect = d;
5316
+ }, { "./MxThreeJS": 58, three: 19 }], 22: [function (t, e, n) {
5303
5317
  "use strict";
5304
5318
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5305
5319
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
5306
5320
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
5307
5321
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MrxDbgUiPrBase = n.MrxDbgUiPrBase_Return = n.McEdGetPointWorldDrawObject = n.McEdGetPointWorldDraw = void 0;
5308
- var a = t("./MxJig"), o = t("./MxJigCmdManager"), s = t("./MxThreeJS"), l = t("./MxUiVue"), c = t("./MxString"), u = (h.prototype.setMcEdJig = function (t) { this.m_pJig = t; }, h.prototype.setColor = function (t) { this.m_iColor = t; }, h.prototype.getColor = function () { return this.m_iColor; }, h.prototype.drawLine = function (t, e) { this.m_pJig.drawEntity(s.MxThreeJS.createLine(t, e, this.m_iColor)); }, h.prototype.drawCircle = function (t, e) { this.m_pJig.drawEntity(s.MxThreeJS.createCircle(t, e, this.m_iColor)); }, h.prototype.drawEntity = function (t) { this.m_pJig.drawEntity(t); }, h.prototype.drawText = function (t, e, n, i) { var r = s.MxThreeJS.creatTextSprite(t, i, e, n, this.m_iColor); this.drawEntity(r); }, h);
5309
- function h() { this.m_pJig = null, this.m_iColor = 16777215; }
5310
- n.McEdGetPointWorldDraw = u;
5311
- var d, p, f, m = (r(g, d = u), g.prototype.setDraw = function (t) { this.m_callDraw = t; }, g.prototype.worldDraw = function (t) { null != this.m_callDraw && this.m_callDraw(t, this); }, g);
5312
- function g() { var t = null !== d && d.apply(this, arguments) || this; return t.m_callDraw = void 0, t; }
5313
- n.McEdGetPointWorldDrawObject = m, (f = p = n.MrxDbgUiPrBase_Return || (n.MrxDbgUiPrBase_Return = {}))[f.kCancel = -2] = "kCancel", f[f.kNone = -1] = "kNone", f[f.kOk = 0] = "kOk", f[f.kKeyWord = 1] = "kKeyWord";
5314
- var v, y = (v = a.McEdJigCommand, r(x, v), x.prototype.procInKeyword = function (t) { t.status >= o.MxJigCmdManager.DragStatus.kKW1 && 0 < t.sKeyValue.length ? this.m_keyWordPicked = t.sKeyValue.toUpperCase() : this.m_keyWordPicked = ""; }, x.prototype.getReturnStatus = function (t) { switch (t) {
5315
- case o.MxJigCmdManager.DragStatus.kNoChange: return p.kNone;
5316
- case o.MxJigCmdManager.DragStatus.kCancel: return p.kCancel;
5317
- case o.MxJigCmdManager.DragStatus.kNull: return p.kNone;
5318
- case o.MxJigCmdManager.DragStatus.kNormal: return p.kOk;
5319
- } return 1 <= t ? p.kKeyWord : p.kCancel; }, x.prototype.setInputToucheType = function (t) { this.m_toucheType = t; }, x.prototype.getInputToucheType = function () { return this.m_toucheType; }, x.prototype.keyWords = function () { return this.m_keyWords; }, x.prototype.setKeyWords = function (t) { this.m_keyWords = t; }, x.prototype.message = function () { return this.m_message; }, x.prototype.setMessage = function (t) { this.m_message = t; }, x.prototype.keyWordPicked = function () { return this.m_keyWordPicked; }, x.prototype.isKeyWordPicked = function (t) { return t = t.toUpperCase(), this.m_keyWordPicked == t; }, x.prototype.setUserDraw = function (t) { t.setMcEdJig(this), this.m_pWorldDraw = t; }, x.prototype.printMessage = function () { var t = new c.MxString(this.m_message); t.TrimRight(":"), 1 < this.m_keyWords.length && "[" == this.m_keyWords[0] && "]" == this.m_keyWords[this.m_keyWords.length - 1] ? l.MxUiVue.acutPrintf(t.m_val + " 或" + this.m_keyWords + ":") : l.MxUiVue.acutPrintf(t.m_val + ":"); }, x);
5320
- function x() { var t = null !== v && v.apply(this, arguments) || this; return t.m_keyWords = "", t.m_message = "", t.m_keyWordPicked = "", t.m_pWorldDraw = null, t.m_toucheType = o.MxJigCmdManager.InType.kGetBegan, t; }
5321
- n.MrxDbgUiPrBase = y;
5322
- }, { "./MxJig": 41, "./MxJigCmdManager": 42, "./MxString": 50, "./MxThreeJS": 52, "./MxUiVue": 58 }], 22: [function (t, e, n) {
5322
+ var a = t("./MxJig"), o = t("./MxJigCmdManager"), s = t("./MxThreeJS"), l = t("./MxUiVue"), c = t("./MxString"), u = t("./McGiWorldDraw"), h = (d.prototype.setMcEdJig = function (t) { this.m_pJig = t; }, d.prototype.setColor = function (t) { this.m_iColor = t; }, d.prototype.getColor = function () { return this.m_iColor; }, d.prototype.drawLine = function (t, e) { this.m_pJig.drawEntity(s.MxThreeJS.createLine(t, e, this.m_iColor)); }, d.prototype.drawCircle = function (t, e) { this.m_pJig.drawEntity(s.MxThreeJS.createCircle(t, e, this.m_iColor)); }, d.prototype.drawEntity = function (t) { this.m_pJig.drawEntity(t); }, d.prototype.drawText = function (t, e, n, i) { var r = s.MxThreeJS.creatTextSprite(t, i, e, n, this.m_iColor); this.drawEntity(r); }, d.prototype.drawCustomEntity = function (t) { var e = new u.McGiWorldDraw(this.m_pJig.getMxObject(), u.McGiWorldDrawType.kDynDragDraw); e.setupForEntity(t), t.worldDraw(e); for (var n = e.getEntitys(), i = n.length, r = 0; r < i; r++)
5323
+ this.drawEntity(n[r]); }, d);
5324
+ function d() { this.m_pJig = null, this.m_iColor = 16777215; }
5325
+ n.McEdGetPointWorldDraw = h;
5326
+ var p, f, m, g = (r(v, p = h), v.prototype.setDraw = function (t) { this.m_callDraw = t; }, v.prototype.worldDraw = function (t) { null != this.m_callDraw && this.m_callDraw(t, this); }, v);
5327
+ function v() { var t = null !== p && p.apply(this, arguments) || this; return t.m_callDraw = void 0, t; }
5328
+ n.McEdGetPointWorldDrawObject = g, (m = f = n.MrxDbgUiPrBase_Return || (n.MrxDbgUiPrBase_Return = {}))[m.kCancel = -2] = "kCancel", m[m.kNone = -1] = "kNone", m[m.kOk = 0] = "kOk", m[m.kKeyWord = 1] = "kKeyWord";
5329
+ var y, x = (y = a.McEdJigCommand, r(_, y), _.prototype.procInKeyword = function (t) { t.status >= o.MxJigCmdManager.DragStatus.kKW1 && 0 < t.sKeyValue.length ? this.m_keyWordPicked = t.sKeyValue.toUpperCase() : this.m_keyWordPicked = ""; }, _.prototype.getReturnStatus = function (t) { switch (t) {
5330
+ case o.MxJigCmdManager.DragStatus.kNoChange: return f.kNone;
5331
+ case o.MxJigCmdManager.DragStatus.kCancel: return f.kCancel;
5332
+ case o.MxJigCmdManager.DragStatus.kNull: return f.kNone;
5333
+ case o.MxJigCmdManager.DragStatus.kNormal: return f.kOk;
5334
+ } return 1 <= t ? f.kKeyWord : f.kCancel; }, _.prototype.setInputToucheType = function (t) { this.m_toucheType = t; }, _.prototype.getInputToucheType = function () { return this.m_toucheType; }, _.prototype.keyWords = function () { return this.m_keyWords; }, _.prototype.setKeyWords = function (t) { this.m_keyWords = t; }, _.prototype.message = function () { return this.m_message; }, _.prototype.setMessage = function (t) { this.m_message = t; }, _.prototype.keyWordPicked = function () { return this.m_keyWordPicked; }, _.prototype.isKeyWordPicked = function (t) { return t = t.toUpperCase(), this.m_keyWordPicked == t; }, _.prototype.setUserDraw = function (t) { t.setMcEdJig(this), this.m_pWorldDraw = t; }, _.prototype.printMessage = function () { var t = new c.MxString(this.m_message); t.TrimRight(":"), 1 < this.m_keyWords.length && "[" == this.m_keyWords[0] && "]" == this.m_keyWords[this.m_keyWords.length - 1] ? l.MxUiVue.acutPrintf(t.m_val + " 或" + this.m_keyWords + ":") : l.MxUiVue.acutPrintf(t.m_val + ":"); }, _);
5335
+ function _() { var t = null !== y && y.apply(this, arguments) || this; return t.m_keyWords = "", t.m_message = "", t.m_keyWordPicked = "", t.m_pWorldDraw = null, t.m_toucheType = o.MxJigCmdManager.InType.kGetBegan, t; }
5336
+ n.MrxDbgUiPrBase = x;
5337
+ }, { "./McGiWorldDraw": 21, "./MxJig": 47, "./MxJigCmdManager": 48, "./MxString": 56, "./MxThreeJS": 58, "./MxUiVue": 64 }], 23: [function (t, e, n) {
5323
5338
  "use strict";
5324
5339
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5325
5340
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -5336,7 +5351,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5336
5351
  } l.MxFun.Assert(0); }, d.prototype.upDisplay = function () { this.m_pWorldDraw && this.m_value && (this.m_pWorldDraw.worldDraw(this.m_value), this.m_useBasePt && this.m_basePt && this.m_pWorldDraw.drawLine(this.m_value, this.m_basePt)); }, d);
5337
5352
  function d() { var t = null !== a && a.apply(this, arguments) || this; return t.m_useBasePt = !1, t.m_basePt = null, t.m_value = null, t.m_retcall = null, t.m_retWhileCall = null, t.m_exitCall = null, t.m_resultDragStatus = s.MxJigCmdManager.DragStatus.kCancel, t; }
5338
5353
  n.MrxDbgUiPrPoint = h;
5339
- }, { "./MrxDbgUiPrBase": 21, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxUiVue": 58, three: 19 }], 23: [function (t, e, n) {
5354
+ }, { "./MrxDbgUiPrBase": 22, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxUiVue": 64, three: 19 }], 24: [function (t, e, n) {
5340
5355
  "use strict";
5341
5356
  Object.defineProperty(n, "__esModule", { value: !0 }), n.ExternalReferenceManager = n.ExternalReferenceDatabase = n.Blocks = n.Block = n.Layer = n.BlockInstance = n.BlockRef = n.ClipPlans = n.ClipPlan = void 0;
5342
5357
  var S = t("three"), C = t("./MxShader"), i = t("./MxBrowseLayerData"), b = function () { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0; };
@@ -5558,13 +5573,13 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5558
5573
  } console.log("mx error iDatabaseIndex"); }, d);
5559
5574
  function d() { this._mapId2ExternalDatabase = new Map; }
5560
5575
  n.ExternalReferenceManager = h;
5561
- }, { "./MxBrowseLayerData": 24, "./MxShader": 49, three: 19 }], 24: [function (t, e, n) {
5576
+ }, { "./MxBrowseLayerData": 25, "./MxShader": 55, three: 19 }], 25: [function (t, e, n) {
5562
5577
  "use strict";
5563
5578
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxBrowseLayerData = void 0;
5564
5579
  var i = (r.prototype.add = function (t, e, n) { this._layerColor[t] = e, this._nametoId[n] = t; }, r.prototype.setZeroLayerId = function (t) { this._zeroLayerId = t; }, r.prototype.getZeroLayerId = function () { return this._zeroLayerId; }, r.prototype.getLayerIdForName = function (t) { return null == this._nametoId[t] ? 0 : this._nametoId[t]; }, r.prototype.getColor = function (t) { return null == this._layerColor[t] ? 16777215 : this._layerColor[t]; }, r.prototype.initComplete = function () { this._isSetInstanceComplete = !0; }, r.prototype.isInitComplete = function () { return this._isSetInstanceComplete; }, r);
5565
5580
  function r() { this._isSetInstanceComplete = !1, this._layerColor = new Map, this._nametoId = new Map, this._zeroLayerId = 0; }
5566
5581
  n.MxBrowseLayerData = i;
5567
- }, {}], 25: [function (t, e, n) {
5582
+ }, {}], 26: [function (t, e, n) {
5568
5583
  "use strict";
5569
5584
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADSyncDisplay = n.MxCADDisplayFun = n.MxCADDatabase = n.MxCADLayerTable = n.MxCADLayerTableRecord = n.MxCADDisplayBlockTable = n.MxCADDisplayBlockRecord = n.MxCADDisplayLayerTable = n.MxCADDisplayLayerRecord = n.MxCADDisplayMemorySections = n.MxCADDisplayMemorySection = n.MxCADDisplayMemorySectionType = n.MxCADDisplayBlockInstance = n.MxCADDisplayBlockRef = n.MxCADDisplayClipPlans = n.MxCADDisplayClipPlan = void 0;
5570
5585
  function i() { this.x1 = 0, this.y1 = 0, this.x2 = 0, this.y2 = 0; }
@@ -5623,8 +5638,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5623
5638
  r(i); return c; }, M);
5624
5639
  function M() { this.mapData = new Map, this.zeroLayerId = 0; }
5625
5640
  n.MxCADLayerTable = b;
5626
- var S, C, D = (L.prototype.initRootBlockRef = function (t) { t ? this.dpRootBlkRef = t : (this.dpRootBlkRef = new o, this.dpRootBlkRef.mat = new T.Matrix4, this.dpRootBlkRef.blkRecId = 0, this.dpRootBlkRef.blkOwnerId = -1, this.dpRootBlkRef.layerId = -1, this.dpRootBlkRef.color = 16777215, this.dpRootBlkRef.id = 0); }, L.prototype.reInit = function () { this.dpBlockTable = new x, this.layerTable = new b, this.memSections = new c, this.initRootBlockRef(); }, L.prototype.getMxObj = function () { return this.mxObj; }, L.prototype.getDisplayRootBlockRef = function () { return this.dpRootBlkRef; }, L.prototype.getDisplayBlockTable = function () { return this.dpBlockTable; }, L.prototype.getLayerTable = function () { return this.layerTable; }, L.prototype.getMemSections = function () { return this.memSections; }, L);
5627
- function L(t) { this.dpBlockTable = new x, this.dpRootBlkRef = null, this.layerTable = new b, this.memSections = new c, this.mxObj = null, this.mxObj = t, this.initRootBlockRef(); }
5641
+ var S, C, D = (O.prototype.initRootBlockRef = function (t) { t ? this.dpRootBlkRef = t : (this.dpRootBlkRef = new o, this.dpRootBlkRef.mat = new T.Matrix4, this.dpRootBlkRef.blkRecId = 0, this.dpRootBlkRef.blkOwnerId = -1, this.dpRootBlkRef.layerId = -1, this.dpRootBlkRef.color = 16777215, this.dpRootBlkRef.id = 0); }, O.prototype.reInit = function () { this.dpBlockTable = new x, this.layerTable = new b, this.memSections = new c, this.initRootBlockRef(); }, O.prototype.getMxObj = function () { return this.mxObj; }, O.prototype.getDisplayRootBlockRef = function () { return this.dpRootBlkRef; }, O.prototype.getDisplayBlockTable = function () { return this.dpBlockTable; }, O.prototype.getLayerTable = function () { return this.layerTable; }, O.prototype.getMemSections = function () { return this.memSections; }, O);
5642
+ function O(t) { this.dpBlockTable = new x, this.dpRootBlkRef = null, this.layerTable = new b, this.memSections = new c, this.mxObj = null, this.mxObj = t, this.initRootBlockRef(); }
5628
5643
  n.MxCADDatabase = D, (C = S = n.MxCADDisplayFun || (n.MxCADDisplayFun = {})).showLayer = function (t, n, i) { t.getDisplayBlockTable().getAllBlockRecord().forEach(function (t) { var e = t.getLayerTable().getLayerRecord(n); e && e.show(i); }); }, C.createThreejsObjForMemData_Clip = function (t, e, n, i, r, a) { if (0 == t.length)
5629
5644
  return !1; var o = [], s = [], l = t[0].clipPlans.clipPlanArray[0]; o.push(l.x1, l.y1), s.push(l.x2, l.y2); for (var c = [], u = [], h = [], d = [], p = [], f = 0; f < t.length; f++) {
5630
5645
  var m = t[f];
@@ -5658,7 +5673,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5658
5673
  var x = new T.Mesh(y, g);
5659
5674
  x.frustumCulled = !1, x.renderOrder = 1, x.visible = !a, i.add(x), n.addEntity(e.id, x), f && n.addColorByLayerMaterial(e.id, g);
5660
5675
  } };
5661
- var O = (I.prototype.upDisplayFromChage_memData = function (t) { var e = this.database.getDisplayBlockTable().getBlockRecord(t.blockId); if (null == e)
5676
+ var L = (I.prototype.upDisplayFromChage_memData = function (t) { var e = this.database.getDisplayBlockTable().getBlockRecord(t.blockId); if (null == e)
5662
5677
  return !1; var n = this.database.getLayerTable().getColor(t.layerId), i = this.database.getLayerTable().isOff(t.layerId), r = e.getLayerTable().createLayerRecord(t.layerId), a = this.mxObj.getScene(), o = e.getInstances_class(); r.deleteMemorySectionEntitys(t.id, a); var s = o.aryInstanceNoClip, l = o.mapInstanceClip; 0 < s.length && S.createThreejsObjForMemData(s, t, r, a, n, i); for (var c = l.values(), u = c.next(); !u.done;) {
5663
5678
  var h = u.value;
5664
5679
  S.createThreejsObjForMemData_Clip(h, t, r, a, n, i), u = c.next();
@@ -5687,8 +5702,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5687
5702
  i += 4, this.deleteMemorySectionAndEntity(a);
5688
5703
  } }, I);
5689
5704
  function I(t) { this.database = null, this.mxObj = null, this.database = t, this.mxObj = t.getMxObj(); }
5690
- n.MxCADSyncDisplay = O;
5691
- }, { "./MxCADNetData": 27, "./MxFun": 39, "./MxShader": 49, three: 19 }], 26: [function (t, e, n) {
5705
+ n.MxCADSyncDisplay = L;
5706
+ }, { "./MxCADNetData": 28, "./MxFun": 45, "./MxShader": 55, three: 19 }], 27: [function (t, e, n) {
5692
5707
  "use strict";
5693
5708
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5694
5709
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -5746,19 +5761,19 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5746
5761
  } }, m);
5747
5762
  function m(t, e, n, i) { var r = p.call(this) || this; return r.pt = t, r.grips = e, r.ids = n, r.currPt = t, r.mapEntityData = i, r; }
5748
5763
  n.MxCADGripJig = f;
5749
- }, { "./MxFun": 39, "./MxJig": 41, "./MxJigCmdManager": 42, "./MxThreeJS": 52, three: 19 }], 27: [function (t, e, n) {
5764
+ }, { "./MxFun": 45, "./MxJig": 47, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 28: [function (t, e, n) {
5750
5765
  "use strict";
5751
5766
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADNetData = void 0;
5752
5767
  var i = (r.prototype.getBlobHead = function (t) { var e = {}; return e.type = this._dataView.getInt32(t, !0), t += 4, e.ver = this._dataView.getInt32(t, !0), t += 4, e.databaseIndex = this._dataView.getInt32(t, !0), t += 4, e.nOffset = t, e; }, r.prototype.getMxCADPointMemorySectionsHead = function () { var t = this.getBlobHead(0); return t.zeroLayerIdIndex = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datacount = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize != t.nOffset && console.log("mx: sectionshead size assert(0)"), t; }, r.prototype.getMxCADPointMemorySectionsHeadFromChange = function () { var t = this.getBlobHead(0); return t.zeroLayerIdIndex = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datacount = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize != t.nOffset && console.log("mx: sectionshead size assert(0)"), t; }, r.prototype.getMxCADPointMemorySectionHead = function (t) { var e = this.getBlobHead(t); return t = e.nOffset, e.pointCount = this._dataView.getInt32(t, !0), t += 4, e.layerId = this._dataView.getInt32(t, !0), t += 4, e.blkId = this._dataView.getInt32(t, !0), t += 4, e.memColor = this._dataView.getInt32(t, !0), t += 4, e.memId = this._dataView.getInt32(t, !0), t += 4, e.memType = this._dataView.getInt32(t, !0), t += 4, e.offset = t, e; }, r.prototype.getMxCADPointMemorySectionHeadFromChange = function (t) { var e = this.getBlobHead(t); return t = e.nOffset, e.pointCount = this._dataView.getInt32(t, !0), t += 4, e.layerId = this._dataView.getInt32(t, !0), t += 4, e.blkId = this._dataView.getInt32(t, !0), t += 4, e.memColor = this._dataView.getInt32(t, !0), t += 4, e.memId = this._dataView.getInt32(t, !0), t += 4, e.memType = this._dataView.getInt32(t, !0), t += 4, e.offset = t, e; }, r.prototype.getMxCADBlockRefsHead = function () { var t = this.getBlobHead(0); return t.nBlockRefCount = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize != t.nOffset && console.log("mx: sectionshead size assert(0)"), t; }, r.prototype.getMxCADNotUseMemorySectionsHeadForChage = function () { var t = this.getBlobHead(0); return t.nCount = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize != t.nOffset && console.log("mx: sectionshead size assert(0)"), t; }, r.prototype.getEntityDisplayDatasHead = function () { var t = this.getBlobHead(0); return t.nCount = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize = this._dataView.getInt32(t.nOffset, !0), t.nOffset += 4, t.datasize != t.nOffset && console.log("mx: sectionshead size assert(0)"), t; }, r.prototype.getEntityDisplayDataHead = function (t) { var e = this.getBlobHead(t); return e.nCount = this._dataView.getInt32(e.nOffset, !0), e.nOffset += 4, e.type = this._dataView.getInt32(e.nOffset, !0), e.nOffset += 4, e.datasize = this._dataView.getInt32(e.nOffset, !0), e.nOffset += 4, e.datasize != e.nOffset - t && console.log("mx: sectionshead size assert(0)"), e; }, r);
5753
5768
  function r(t) { this._dataView = t; }
5754
5769
  n.MxCADNetData = i;
5755
- }, {}], 28: [function (t, e, n) {
5770
+ }, {}], 29: [function (t, e, n) {
5756
5771
  "use strict";
5757
5772
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADObject = void 0;
5758
5773
  var i = t("./MxCADEditDisplay"), r = t("./MxCADOpenDisplay"), a = t("./MxCADSelect"), o = t("./MxCADGrip"), s = (l.prototype.reInit = function () { this.openDisplay.reInit(), this.databsae.reInit(), this.mxObj.reInit(); }, l.prototype.getSelect = function () { return this.select; }, l.prototype.getGrip = function () { return this.grip; }, l.prototype.newFile = function () { this.reInit(), this.openFile(""); }, l.prototype.undo = function () { this.mxObj.undo(); }, l.prototype.openFile = function (t, e) { var n = this; this.reInit(), this._openFile = t, this.mxObj.callCommand("MxCAD_OpenFile", JSON.stringify({ file: t }), function (t) { n.mxObj.callCommand("MxCAD_SendDisplay"), "string" != typeof t || t.length < 1 ? e && e({}) : e && e(JSON.parse(t)); }); }, l.prototype.saveFile = function (t, e) { this.mxObj.callCommand("MxCAD_SaveFile", JSON.stringify({ file: t }), function (t) { e(JSON.parse(t)); }); }, l.prototype.getDisplayFromServer = function () { this.reInit(), this.mxObj.callCommand("MxCAD_SendDisplay"); }, l.prototype.getFileName = function () { return this._openFile; }, l.prototype.getDatabase = function () { return this.databsae; }, l.prototype.getOpenDisplay = function () { return this.openDisplay; }, l.prototype.getSyncDisplay = function () { return this.syncDisplay; }, l.prototype.getAllLayerData = function () { return this.databsae.getLayerTable().getAllLayerData(); }, l);
5759
5774
  function l(t) { this._openFile = "", this.mxObj = null, this.databsae = null, this.openDisplay = null, this.syncDisplay = null, this.select = null, this.grip = null, this.mxObj = t, this.databsae = new i.MxCADDatabase(t), this.openDisplay = new r.MxCADOpenDisplay(this.databsae), this.syncDisplay = new i.MxCADSyncDisplay(this.databsae), this.select = new a.MxCADSelect(t), this.grip = new o.MxCADGrip(t); }
5760
5775
  n.MxCADObject = s;
5761
- }, { "./MxCADEditDisplay": 25, "./MxCADGrip": 26, "./MxCADOpenDisplay": 29, "./MxCADSelect": 30 }], 29: [function (t, e, n) {
5776
+ }, { "./MxCADEditDisplay": 26, "./MxCADGrip": 27, "./MxCADOpenDisplay": 30, "./MxCADSelect": 31 }], 30: [function (t, e, n) {
5762
5777
  "use strict";
5763
5778
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADOpenDisplay = void 0;
5764
5779
  var C = t("three"), T = t("./MxCADNetData"), E = t("./MxCADEditDisplay"), i = (r.prototype.createAllInstanceCall = function (t, e, n, i, r) { if (!i.get(t.getId())) {
@@ -5851,12 +5866,12 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5851
5866
  } this.creteDisplayForNewData(); }, r);
5852
5867
  function r(t) { this.database = null, this.isGetDisplayBlockRef = !1, this.isCreateInstance = !1, this.isGetLayerTable = !1, this.vecNewCreateDisplayData = [], this.mxObj = null, this.database = t, this.mxObj = t.getMxObj(); }
5853
5868
  n.MxCADOpenDisplay = i;
5854
- }, { "./MxCADEditDisplay": 25, "./MxCADNetData": 27, three: 19 }], 30: [function (t, e, n) {
5869
+ }, { "./MxCADEditDisplay": 26, "./MxCADNetData": 28, three: 19 }], 31: [function (t, e, n) {
5855
5870
  "use strict";
5856
5871
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCADSelect = n.MxCADSelectDisplayEntityData = n.MxCADSelectDisplayEntityDataType = void 0;
5857
- var L, i, O = t("three"), r = t("./MxFun"), I = t("three.meshline"), P = t("./MxCADNetData");
5858
- (i = L = n.MxCADSelectDisplayEntityDataType || (n.MxCADSelectDisplayEntityDataType = {}))[i.kLinesType = 1] = "kLinesType", i[i.kTriangleType = 2] = "kTriangleType";
5859
- var R = function () { this.type = L.kLinesType, this.points = []; };
5872
+ var O, i, L = t("three"), r = t("./MxFun"), I = t("three.meshline"), P = t("./MxCADNetData");
5873
+ (i = O = n.MxCADSelectDisplayEntityDataType || (n.MxCADSelectDisplayEntityDataType = {}))[i.kLinesType = 1] = "kLinesType", i[i.kTriangleType = 2] = "kTriangleType";
5874
+ var R = function () { this.type = O.kLinesType, this.points = []; };
5860
5875
  n.MxCADSelectDisplayEntityData = R;
5861
5876
  var a = (o.prototype.removeAllEntity = function () { for (var t = this.mxObj.getScene(), e = this.aryThreeObject.length, n = 0; n < e; n++)
5862
5877
  r.MxFun.removeThreejsObject(this.aryThreeObject[n], t); this.aryThreeObject = []; }, o.prototype.clearAllSelect = function () { return this.mxObj.callCommand("MxCAD_ClearSelect"), 0 != this.aryThreeObject.length && (this.removeAllEntity(), !0); }, o.prototype.OnMessageEntityDisplayDatas = function (t) { for (var e = new P.MxCADNetData(t), n = e.getEntityDisplayDatasHead(), i = n.nOffset, r = [], a = 0; a < n.nCount; a++) {
@@ -5872,33 +5887,33 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5872
5887
  }
5873
5888
  v.points = l, r.push(v);
5874
5889
  }
5875
- } var d = this.mxObj.getViewWidth(), p = this.mxObj.getViewHeight(); this.material.resolution = new O.Vector2(d, p); for (var f = r.length, m = this.mxObj.getScene(), g = 0; g < f; g++) {
5890
+ } var d = this.mxObj.getViewWidth(), p = this.mxObj.getViewHeight(); this.material.resolution = new L.Vector2(d, p); for (var f = r.length, m = this.mxObj.getScene(), g = 0; g < f; g++) {
5876
5891
  var v;
5877
- if ((v = r[g]).type == L.kLinesType)
5892
+ if ((v = r[g]).type == O.kLinesType)
5878
5893
  for (var y = v.points.length, x = 0; x + 3 < y; x += 4) {
5879
5894
  var _ = new Float32Array(6);
5880
5895
  _[0] = v.points[x], _[1] = v.points[x + 1], _[2] = 0, _[3] = v.points[x + 2], _[4] = v.points[x + 3], _[5] = 0;
5881
5896
  var w = new I.MeshLine;
5882
5897
  w.setGeometry(_);
5883
- var b = new O.Mesh(w.geometry, this.material);
5898
+ var b = new L.Mesh(w.geometry, this.material);
5884
5899
  b.renderOrder = 1, m.add(b), this.aryThreeObject.push(b);
5885
5900
  }
5886
- else if (v.type == L.kTriangleType) {
5901
+ else if (v.type == O.kTriangleType) {
5887
5902
  y = v.points.length;
5888
- var M = new O.Geometry, S = 0;
5903
+ var M = new L.Geometry, S = 0;
5889
5904
  for (x = 0; x + 5 < y; x += 6) {
5890
- var C = new O.Vector3(v.points[x], v.points[x + 1], 0), T = new O.Vector3(v.points[x + 2], v.points[x + 3], 0), E = new O.Vector3(v.points[x + 4], v.points[x + 5], 0);
5905
+ var C = new L.Vector3(v.points[x], v.points[x + 1], 0), T = new L.Vector3(v.points[x + 2], v.points[x + 3], 0), E = new L.Vector3(v.points[x + 4], v.points[x + 5], 0);
5891
5906
  M.vertices.push(C), M.vertices.push(T), M.vertices.push(E);
5892
- var A = new O.Face3(S, S + 1, S + 2);
5907
+ var A = new L.Face3(S, S + 1, S + 2);
5893
5908
  M.faces.push(A), S += 3;
5894
5909
  }
5895
- var D = new O.Mesh(M, this.materialFill);
5910
+ var D = new L.Mesh(M, this.materialFill);
5896
5911
  D.renderOrder = 1, m.add(D), this.aryThreeObject.push(D);
5897
5912
  }
5898
5913
  } }, o);
5899
- function o(t) { this.aryThreeObject = [], this.mxObj = null, this.material = new I.MeshLineMaterial({ useMap: !1, color: new O.Color(2641557), opacity: 1, resolution: new O.Vector2(500, 500), sizeAttenuation: !0, lineWidth: .006, transparent: !0, depthTest: !1 }), this.materialFill = new O.MeshBasicMaterial({ color: new O.Color(2641557), opacity: .8, side: O.DoubleSide, transparent: !0, depthTest: !1 }), this.mxObj = t; }
5914
+ function o(t) { this.aryThreeObject = [], this.mxObj = null, this.material = new I.MeshLineMaterial({ useMap: !1, color: new L.Color(2641557), opacity: 1, resolution: new L.Vector2(500, 500), sizeAttenuation: !0, lineWidth: .006, transparent: !0, depthTest: !1 }), this.materialFill = new L.MeshBasicMaterial({ color: new L.Color(2641557), opacity: .8, side: L.DoubleSide, transparent: !0, depthTest: !1 }), this.mxObj = t; }
5900
5915
  n.MxCADSelect = a;
5901
- }, { "./MxCADNetData": 27, "./MxFun": 39, three: 19, "three.meshline": 18 }], 31: [function (t, e, n) {
5916
+ }, { "./MxCADNetData": 28, "./MxFun": 45, three: 19, "three.meshline": 18 }], 32: [function (t, e, n) {
5902
5917
  "use strict";
5903
5918
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCadSketchLayers = n.MxCadSketchLayer = void 0;
5904
5919
  var i = (r.prototype.addEntity = function (t) { this._setEntityId.add(t); }, r.prototype.getId = function () { return this.id; }, r.prototype.setId = function (t) { this.id = t; }, r.prototype.removeEntity = function (t) { this._setEntityId.delete(t); }, r.prototype.show = function (r) { var a = this; this._setEntityId.forEach(function (t) { var e = a._mxobj.getEntity(t); if (null != e)
@@ -5909,7 +5924,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5909
5924
  var a = (o.prototype.getLayer = function (t, e) { void 0 === e && (e = !0); var n = this._mapId2Layers.get(t); return null == n && ((n = new i(this._mxobj)).setId(t), this._mapId2Layers.set(t, n)), n; }, o.prototype.addEntity = function (t, e) { this.getLayer(e).addEntity(t); }, o.prototype.removeEntity = function (e) { this._mapId2Layers.forEach(function (t) { t.removeEntity(e); }); }, o.prototype.removeAllEntity = function () { this._mapId2Layers.clear(); }, o);
5910
5925
  function o(t) { this._mxobj = null, this._mapId2Layers = new Map, this._mxobj = t; }
5911
5926
  n.MxCadSketchLayers = a;
5912
- }, {}], 32: [function (t, e, n) {
5927
+ }, {}], 33: [function (t, e, n) {
5913
5928
  "use strict";
5914
5929
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxCmdRunManager = void 0;
5915
5930
  var i, h, d, p, f, m, g, v = t("./MxFun"), y = t("./MxType"), x = t("./MxJigCmdManager"), _ = t("./MxUiVue");
@@ -5932,12 +5947,118 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5932
5947
  (c || u) && t.updateDisplay();
5933
5948
  }
5934
5949
  } return s(n), x.MxJigCmdManager.isRunning() || _.MxUiVue.restoreCmdStatus(), !0; }, i.addCommand = function (t, e, n) { null == n && (n = y.MxType.CommandFlags.MCRX_CMD_MODAL); var i = t.toUpperCase(); h[i] = { fun: e, cmd: t, flag: n }; };
5935
- }, { "./MxFun": 39, "./MxJigCmdManager": 42, "./MxType": 54, "./MxUiVue": 58 }], 33: [function (t, e, n) {
5950
+ }, { "./MxFun": 45, "./MxJigCmdManager": 48, "./MxType": 60, "./MxUiVue": 64 }], 34: [function (t, e, n) {
5951
+ "use strict";
5952
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbDatabase = void 0;
5953
+ var o = t("three"), i = t("./MxFun"), r = t("./MxDbEntityGrip"), a = t("./MxDbEntitySelect"), s = (l.prototype.getAllEntity = function () { return this.mapIdToEntity; }, l.prototype.getMxObject = function () { return this.mxObj; }, l.prototype.getGripManager = function () { return this.gripManager; }, l.prototype.getSelectManager = function () { return this.selectManager; }, l.prototype.init = function (t) { this.mxObj = t, this.scene = t.getScene(), i.MxFun.removeThreejsObject(this.parentObject, this.scene), this.parentObject = new o.Object3D, this.parentObject.renderOrder = 100, this.scene.add(this.parentObject); }, l.prototype.getEntity = function (t) { return this.mapIdToEntity.get(t); }, l.prototype.eraseEntity = function (t) { this.gripManager.deleteGripData(t), this.selectManager.deleteSelect(t), this.mapIdToEntity.delete(t); }, l.prototype.addEntity = function (t) { return this.mapIdToEntity.set(this.idCount, t), t.setMxDatabase(this), t.setObjectId(this.idCount), t.upDisplay(), this.idCount++; }, l.prototype.getThreeJSParentObject = function () { return this.parentObject; }, l.prototype.getIntersectObjects = function (t) { var e = new o.Raycaster; e.linePrecision = this.mxObj.screenCoordLong2World(20); var n = this.mxObj.getCanvas(), i = n.clientWidth, r = n.clientHeight, a = new o.Vector2(t.x / i * 2 - 1, -t.y / r * 2 + 1); return e.setFromCamera(a, this.mxObj.getCamera()), e.intersectObjects(this.parentObject.children, !0); }, l);
5954
+ function l() { this.mapIdToEntity = new Map, this.mxObj = null, this.scene = null, this.idCount = 1, this.parentObject = null, this.gripManager = new r.MxDbEntityGrip(this), this.selectManager = new a.MxDbEntitySelect(this); }
5955
+ n.MxDbDatabase = s;
5956
+ }, { "./MxDbEntityGrip": 36, "./MxDbEntitySelect": 37, "./MxFun": 45, three: 19 }], 35: [function (t, e, n) {
5957
+ "use strict";
5958
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntity = n.MxDbEntityUserObject = void 0;
5959
+ var s = t("three"), l = t("./McGiWorldDraw"), i = (r.prototype.getTypeName = function () { return "MxDbEntityUserObject"; }, r.prototype.getImp = function () { return this.MxDbEntityImp; }, r.prototype.upDisplay = function () { var t = this.getImp(); return !!t && t.upDisplay(); }, r.prototype.erase = function () { var t = this.getImp(); return !!t && t.erase(); }, r.prototype.setColor = function (t) { this.iColor = t; }, r.prototype.getColor = function () { return this.iColor; }, r.prototype.dwgIn = function (t) { return this.iColor = t.iColor, !0; }, r.prototype.dwgOut = function (t) { return t.iColor = this.iColor, t; }, r);
5960
+ function r() { this.iColor = 16777215; }
5961
+ n.MxDbEntityUserObject = i;
5962
+ var a = (o.prototype.setObjectId = function (t) { this.id = t; }, o.prototype.setMxDatabase = function (t) { this.mxDatabase = t; }, o.prototype.objectId = function () { return this.id; }, o.prototype.initUserObject = function (t) { (this.userObject = t).MxDbEntityImp = this; }, o.prototype.upDisplay = function () { if (!this.mxDatabase)
5963
+ return !1; this.updateDisplayImp(this.mxDatabase.getThreeJSParentObject(), this.mxDatabase.getMxObject()); }, o.prototype.erase = function () { if (0 == this.id)
5964
+ return !1; this.clearDisplayImp(this.mxDatabase.getThreeJSParentObject()), this.userObject = null, this.mxDatabase.eraseEntity(this.id), this.id = 0, this.mxDatabase = null; }, o.prototype.clearDisplayImp = function (t) { this.threeObjectGroup && (this.threeObjectGroup.traverse(function (t) { "Mesh" === t.type && (t.geometry.dispose(), t.material.dispose()); }), t.remove(this.threeObjectGroup)), this.threeObjectGroup = null; }, o.prototype.updateDisplayImp = function (t, e) { this.clearDisplayImp(t), this.threeObjectGroup = new s.Group; var n = new l.McGiWorldDraw(e, l.McGiWorldDrawType.kWorldDraw); n.setupForEntity(this.userObject), this.worldDraw(n); for (var i = n.getEntitys(), r = i.length, a = 0; a < r; a++) {
5965
+ var o = i[a];
5966
+ (o.MxDbEntity = this).threeObjectGroup.add(o);
5967
+ } t.add(this.threeObjectGroup); }, o.prototype.worldDraw = function (t) { this.userObject.worldDraw(t); }, o.prototype.getGripPoints = function () { return this.userObject.getGripPoints(); }, o.prototype.getUserObject = function () { return this.userObject; }, o.prototype.clone = function () { var t = new o; t.initUserObject(this.userObject.create()); var e = {}; return this.userObject.dwgOut(e), t.userObject.dwgIn(e), t; }, o.prototype.setColor = function (t) { this.userObject.setColor(t); }, o.prototype.getColor = function () { return this.userObject.getColor(); }, o);
5968
+ function o() { this.threeObjectGroup = null, this.userObject = null, this.mxDatabase = null, this.id = 0; }
5969
+ n.MxDbEntity = a;
5970
+ }, { "./McGiWorldDraw": 21, three: 19 }], 36: [function (t, e, n) {
5971
+ "use strict";
5972
+ var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
5973
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
5974
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
5975
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntityGrip = n.MxDbEntityGripJig = n.MxDbEntityGripData = void 0;
5976
+ var c = t("three"), s = t("./MxFun"), o = t("./MxDrawData"), a = t("./MxJig"), u = t("./MxJigCmdManager"), h = t("./McGiWorldDraw"), l = function () { this.threeObject = null; };
5977
+ n.MxDbEntityGripData = l;
5978
+ var d, p = (d = a.McEdJigCommand, r(f, d), f.prototype.sampler = function () { var t = u.MxJigCmdManager.InType.kGetBegan, e = this.acquirePoint(t); return e.status == u.MxJigCmdManager.DragStatus.kNormal && (this.currPt = e.pt), e.status; }, f.prototype.getTypeName = function () { return "MxGripEdit"; }, f.prototype.done = function (t) { if (t == u.MxJigCmdManager.DragStatus.kNormal) {
5979
+ var e = this.currPt.clone();
5980
+ e.sub(this.dragBasePt);
5981
+ for (var n = this.getMxObject(), i = n.getMxDatabase(), r = n.getMxDatabase().getGripManager(), a = this.grips.length, o = new Set, s = 0; s < a; s++) {
5982
+ var l = this.grips[s], c = this.ents[s];
5983
+ r.deleteGripData(c.objectId()), c.getUserObject().moveGripPointsAt(l.iIndex, e), r.addGripFromEntity(c), c.upDisplay(), o.add(c.objectId());
5984
+ }
5985
+ n.updateDisplay(), i.getSelectManager().upSelectDilsplay(o);
5986
+ } return u.MxJigCmdManager.DoneStatius.kExitCommand; }, f.prototype.upDisplay = function () { var t = this.currPt.clone(); if (t.sub(this.dragBasePt), !(t.length() < .001))
5987
+ for (var e = this.getMxObject(), n = this.grips.length, i = 0; i < n; i++) {
5988
+ var r = this.grips[i], a = this.ents[i].clone();
5989
+ a.getUserObject().moveGripPointsAt(r.iIndex, t);
5990
+ var o = new h.McGiWorldDraw(e, h.McGiWorldDrawType.kDynDragDraw);
5991
+ o.setupForEntity(a.getUserObject()), a.worldDraw(o);
5992
+ for (var s = o.getEntitys(), l = s.length, c = 0; c < l; c++)
5993
+ this.drawEntity(s[c], 31);
5994
+ } }, f);
5995
+ function f(t, e, n) { var i = d.call(this) || this; return i.dragBasePt = t, i.grips = e, i.ents = n, i.currPt = t, i; }
5996
+ n.MxDbEntityGripJig = p;
5997
+ var m = (g.prototype.removeAllGrips = function () { if (0 == this.mapGrips.size)
5998
+ return !1; var o = this.database.getMxObject().getScene(); return this.mapGrips.forEach(function (t, e, n) { for (var i = t.length, r = 0; r < i; r++) {
5999
+ var a = t[r];
6000
+ s.MxFun.removeThreejsObject(a.threeObject, o);
6001
+ } }), this.mapGrips = new Map, !0; }, g.prototype.deleteGripData = function (t) { var e = this.database.getMxObject().getScene(), n = this.mapGrips.get(t); if (n)
6002
+ for (var i = n.length, r = 0; r < i; r++) {
6003
+ var a = n[r];
6004
+ s.MxFun.removeThreejsObject(a.threeObject, e);
6005
+ } this.mapGrips.delete(t); }, g.prototype.createGripDisplayObject = function (t) { var e = this.database.getMxObject(), n = e.getScene(); t.geometry = new c.Geometry; var i = e.screenCoordLong2World(8); t.geometry.vertices.push(new c.Vector3(t.point.x - i, t.point.y - i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x - i, t.point.y + i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + i, t.point.y + i, 0)), t.geometry.vertices.push(new c.Vector3(t.point.x + i, t.point.y - i, 0)), t.geometry.faces.push(new c.Face3(0, 1, 2)), t.geometry.faces.push(new c.Face3(2, 3, 0)), t.geometry.computeFaceNormals(), t.geometry.computeVertexNormals(); var r = new c.MeshBasicMaterial({ color: 255, transparent: !0, depthTest: !1, side: c.DoubleSide, opacity: .9 }), a = new c.Mesh(t.geometry, r); a.renderOrder = 100, n.add(a), t.threeObject = a; }, g.prototype.addGripData = function (t, e, n) { var i = this.mapGrips.get(t); null == i && (i = new Array, this.mapGrips.set(t, i)); var r = new l; return r.iIndex = e, r.point = new c.Vector3(n.x, n.y, 0), i.push(r), r; }, g.prototype.hitTest = function (t) { var a = this, o = { grips: new Array, ents: new Array, pt: t }, s = new c.Vector3(t.x, t.y, 0), l = this.database.getMxObject().screenCoordLong2World(8); return this.mapGrips.forEach(function (t, e) { for (var n = t.length, i = 0; i < n; i++) {
6006
+ var r = t[i];
6007
+ if (r.point.distanceTo(s) <= l) {
6008
+ o.grips.push(r), o.ents.push(a.database.getEntity(e));
6009
+ break;
6010
+ }
6011
+ } }), o; }, g.prototype.onMouseLBDown = function (t) { var e = this.hitTest(t); return 0 != e.grips.length && (s.MxFun.sendStringToExecute("Mx_FrontEndWebpageGripEdit", e), !0); }, g.prototype.gripEditImp = function (t) { var e = t.grips, n = t.ents, i = t.pt, r = new p(i, e, n); r.setDisableDynInput(!0), r.setDisableOsnap(!0), u.MxJigCmdManager.runCmd(r); }, g.prototype.doWindowsSelect = function (t, e) { }, g.prototype.addGripFromEntity = function (t) { var e = t.getGripPoints(), n = t.objectId(); this.deleteGripData(n); for (var i = 0; i < e.length; i++) {
6012
+ var r = this.addGripData(n, i, e[i]);
6013
+ this.createGripDisplayObject(r);
6014
+ } }, g.prototype.doPointSelect = function (t) { var i = this, e = this.database.getSelectManager(); o.MxDrawData.m_isMultipleSelect || (this.removeAllGrips(), e.removeAllEntity()); var n = this.database.getMxObject(), r = this.database.getIntersectObjects(t); if (0 == r.length)
6015
+ return n.updateDisplay(), !1; var a = new Set; return r.forEach(function (t) { var e = t.object.MxDbEntity; if (e) {
6016
+ var n = e.objectId();
6017
+ a.has(n) || (a.add(n), i.addGripFromEntity(e));
6018
+ } }), e.upSelectDilsplay(a), n.updateDisplay(), !0; }, g);
6019
+ function g(t) { this.database = null, this.mapGrips = new Map, this.database = t; }
6020
+ n.MxDbEntityGrip = m;
6021
+ }, { "./McGiWorldDraw": 21, "./MxDrawData": 40, "./MxFun": 45, "./MxJig": 47, "./MxJigCmdManager": 48, three: 19 }], 37: [function (t, e, n) {
6022
+ "use strict";
6023
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbEntitySelect = void 0;
6024
+ var d = t("three"), a = t("./MxFun"), p = t("three.meshline"), r = t("./McGiWorldDraw"), i = (o.prototype.setRenderOrder = function (t) { this.iRenderOrder = t; }, o.prototype.getRenderOrder = function () { return this.iRenderOrder; }, o.prototype.setCanvasSize = function (t, e) { this.canvasWidth == t && this.canvasHeight == e || (this.canvasWidth = t, this.canvasHeight = e, this.material.resolution = new d.Vector2(this.canvasWidth, this.canvasHeight), this.material.needsUpdate = !0); }, o.prototype.removeAllEntity = function () { var i = this.mxDatabase.getMxObject().getScene(); return 0 != this.mapIdToThreeObject.size && (this.mapIdToThreeObject.forEach(function (t) { for (var e = t.length, n = 0; n < e; n++)
6025
+ a.MxFun.removeThreejsObject(t[n], i); }), this.mapIdToThreeObject.clear(), !0); }, o.prototype.getAllSelect = function () { var n = []; return this.mapIdToThreeObject.forEach(function (t, e) { n.push(e); }), n; }, o.prototype.deleteSelect = function (t) { var e = this.mxDatabase.getMxObject().getScene(), n = this.mapIdToThreeObject.get(t); if (n) {
6026
+ for (var i = n.length, r = 0; r < i; r++)
6027
+ a.MxFun.removeThreejsObject(n[r], e);
6028
+ this.mapIdToThreeObject.delete(t);
6029
+ } }, o.prototype.upSelectDilsplayFromId = function (t) { var e = new Set; e.add(t), this.upSelectDilsplay(e); }, o.prototype.upSelectDilsplay = function (t) { var n = this, i = new r.McGiWorldDrawSelect(this.mxDatabase.getMxObject(), this); t.forEach(function (t) { n.deleteSelect(t); var e = n.mxDatabase.getEntity(t); e && (i.setCurEntityId(t), e.worldDraw(i)); }); }, o.prototype.addCircleDisplay = function (t, e, n) { var i = new d.CircleGeometry(n, 64, 3, 2 * Math.PI); if (i.vertices.shift(), 0 != i.vertices.length) {
6030
+ i.vertices.push(i.vertices[0]);
6031
+ var r = 3 * i.vertices.length;
6032
+ if (0 != r) {
6033
+ for (var a = this.mxDatabase.getMxObject().getScene(), o = new Float32Array(r), s = 0, l = 0; s + 2 < r; s += 3, l++)
6034
+ o[s] = i.vertices[l].x + e.x, o[s + 1] = i.vertices[l].y + e.y, o[s + 2] = e.z;
6035
+ var c = new p.MeshLine;
6036
+ c.setGeometry(o);
6037
+ var u = new d.Mesh(c.geometry, this.material);
6038
+ u.renderOrder = this.iRenderOrder, a.add(u);
6039
+ var h = this.mapIdToThreeObject.get(t);
6040
+ h || (h = new Array, this.mapIdToThreeObject.set(t, h)), h.push(u);
6041
+ }
6042
+ } }, o.prototype.addLineDisplay = function (t, e, n) { var i = this.mxDatabase.getMxObject().getScene(), r = new Float32Array(6); r[0] = e.x, r[1] = e.y, r[2] = 0, r[3] = n.x, r[4] = n.y, r[5] = 0; var a = new p.MeshLine; a.setGeometry(r); var o = new d.Mesh(a.geometry, this.material); o.renderOrder = this.iRenderOrder, i.add(o); var s = this.mapIdToThreeObject.get(t); s || (s = new Array, this.mapIdToThreeObject.set(t, s)), s.push(o); }, o);
6043
+ function o(t) { this.mapIdToThreeObject = new Map, this.canvasWidth = 800, this.canvasHeight = 500, this.mxDatabase = null, this.material = new p.MeshLineMaterial({ useMap: !1, color: new d.Color(2641557), opacity: .6, resolution: new d.Vector2(800, 500), sizeAttenuation: !0, lineWidth: .007, transparent: !0, depthTest: !1 }), this.iRenderOrder = 10, this.mxDatabase = t; }
6044
+ n.MxDbEntitySelect = i;
6045
+ }, { "./McGiWorldDraw": 21, "./MxFun": 45, three: 19, "three.meshline": 18 }], 38: [function (t, e, n) {
6046
+ "use strict";
6047
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDbTextureManager = void 0;
6048
+ var a = t("three"), i = (r.prototype.loadImage = function (n, i) { var t = this.mapImageUrlToMaterialTexture.get(n); if (t)
6049
+ i(t);
6050
+ else {
6051
+ var r = this;
6052
+ (new a.TextureLoader).load(n, function (t) { var e = new a.MeshLambertMaterial({ map: t, transparent: !0, side: a.DoubleSide }); e.map && (e.map.needsUpdate = !0), r.mapImageUrlToMaterialTexture.set(n, e), i && i(e); }, void 0, function (t) { console.log(t), i && i(null); });
6053
+ } }, r);
6054
+ function r() { this.mapImageUrlToMaterialTexture = new Map; }
6055
+ n.MxDbTextureManager = i;
6056
+ }, { three: 19 }], 39: [function (t, e, n) {
5936
6057
  "use strict";
5937
6058
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawCommands = void 0;
5938
- var a = t("./MxFun"), i = t("./MxType"), o = t("./MxIntelliSelect"), s = t("./MxJigCmdManager"), l = t("./MxWindowsEvent");
6059
+ var a = t("./MxFun"), i = t("./MxType"), o = t("./MxIntelliSelect"), s = t("./MxJigCmdManager"), l = t("./MxWindowsEvent"), c = t("./MxDrawData");
5939
6060
  function r(t) { if (null != t && null != t.pt1) {
5940
- var e = new o.MxIntelliSelectJig(t.pt1);
6061
+ var e = new o.MxIntelliSelectJig(t.pt1, !1);
5941
6062
  e.setDisableDynInput(!0), e.setDisableOsnap(!0);
5942
6063
  var i = t.pt1, r = a.MxFun.getCurrentMx();
5943
6064
  e.doPointSelect(a.MxFun.getCurrentMx(), t.pt1, function (t) { if (0 != JSON.parse(t).lCount) {
@@ -5949,18 +6070,30 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5949
6070
  }
5950
6071
  } }), s.MxJigCmdManager.runCmd(e);
5951
6072
  } }
5952
- function c(t) { null != t && null != t.grips && null != t.ids && a.MxFun.getCurrentMx().getMxCAD().getGrip().gripEditImp(t); }
5953
- (n.MxDrawCommands || (n.MxDrawCommands = {})).registerCommand = function () { a.MxFun.addCommand("Mx_IntelliSel", r, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_GripEdit", c, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT); };
5954
- }, { "./MxFun": 39, "./MxIntelliSelect": 40, "./MxJigCmdManager": 42, "./MxType": 54, "./MxWindowsEvent": 59 }], 34: [function (t, e, n) {
6073
+ function u(t) { null != t && null != t.grips && null != t.ids && a.MxFun.getCurrentMx().getMxCAD().getGrip().gripEditImp(t); }
6074
+ function h(t) { if (null != t && null != t.pt) {
6075
+ var e = a.MxFun.getCurrentMx(), n = t.pt;
6076
+ if (!e.getMxDatabase().getGripManager().doPointSelect(n) && c.MxDrawData.m_isMultipleSelect) {
6077
+ var i = e.screenCoord2World(n.x, n.y, 0), r = new o.MxIntelliSelectJig(i, !0);
6078
+ r.setDisableDynInput(!0), r.setDisableOsnap(!0), s.MxJigCmdManager.runCmd(r);
6079
+ }
6080
+ } }
6081
+ function d(t) { null != t && null != t.grips && null != t.ents && a.MxFun.getCurrentMx().getMxDatabase().getGripManager().gripEditImp(t); }
6082
+ (n.MxDrawCommands || (n.MxDrawCommands = {})).registerCommand = function () { a.MxFun.addCommand("Mx_IntelliSel", r, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_GripEdit", u, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageIntelliSel", h, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT), a.MxFun.addCommand("Mx_FrontEndWebpageGripEdit", d, i.MxType.CommandFlags.MCRX_CMD_TRANSPARENT); };
6083
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxIntelliSelect": 46, "./MxJigCmdManager": 48, "./MxType": 60, "./MxWindowsEvent": 65 }], 40: [function (t, e, n) {
5955
6084
  "use strict";
5956
- var i;
5957
- Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawData = void 0, (i = n.MxDrawData || (n.MxDrawData = {})).m_isEnableIntelliSelect = !1, i.getCursorWidthPixels = function () { return 14; }, i.setIniset = function (t) { void 0 !== t.EnableIntelliSelect && "boolean" == typeof t.EnableIntelliSelect && (i.m_isEnableIntelliSelect = t.EnableIntelliSelect); };
5958
- }, {}], 35: [function (t, e, n) {
6085
+ var i, r, a;
6086
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawData = n.IntelliSelectType = void 0, (r = i = n.IntelliSelectType || (n.IntelliSelectType = {}))[r.kFrontEndWebpageModel = 1] = "kFrontEndWebpageModel", r[r.kBackgroundServicesModel = 2] = "kBackgroundServicesModel", (a = n.MxDrawData || (n.MxDrawData = {})).m_isEnableIntelliSelect = !1, a.m_intelliSelectType = i.kBackgroundServicesModel, a.m_isMultipleSelect = !0, a.getCursorWidthPixels = function () { return 14; }, a.setIniset = function (t) { void 0 !== t.EnableIntelliSelect && "boolean" == typeof t.EnableIntelliSelect && (a.m_isEnableIntelliSelect = t.EnableIntelliSelect), void 0 !== t.IntelliSelectType && "number" == typeof t.IntelliSelectType && (a.m_intelliSelectType = t.IntelliSelectType), void 0 !== t.multipleSelect && "boolean" == typeof t.multipleSelect && (a.m_isMultipleSelect = t.multipleSelect); };
6087
+ }, {}], 41: [function (t, e, n) {
5959
6088
  "use strict";
5960
6089
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawObject = n.IniSetName = n.MxRunMode = void 0;
5961
- var s, i, r, c = t("three"), u = t("./MxFun"), a = t("./MxCadSketchLayer"), o = t("./MxBrowseLayerData"), l = t("./MxBrowseDisplay"), L = t("./MxNetData"), h = t("./MxNetData"), d = t("./MxSelect"), p = t("./MxManager"), f = t("./MxJigCmdManager"), m = t("./MxSystemVariable"), g = t("./MxCADObject"), v = t("./MxLocalFileLoad"), y = t("./MxDrawObjectOsnap");
6090
+ var s, i, r, c = t("three"), u = t("./MxFun"), a = t("./MxCadSketchLayer"), o = t("./MxBrowseLayerData"), l = t("./MxBrowseDisplay"), O = t("./MxNetData"), h = t("./MxNetData"), d = t("./MxSelect"), p = t("./MxManager"), f = t("./MxJigCmdManager"), m = t("./MxSystemVariable"), g = t("./MxCADObject"), v = t("./MxLocalFileLoad"), y = t("./MxDrawObjectOsnap"), x = t("./MxDbDatabase"), _ = t("./MxDbEntity");
5962
6091
  (i = s = n.MxRunMode || (n.MxRunMode = {}))[i.kBrowse = 1] = "kBrowse", i[i.kMxCAD = 2] = "kMxCAD", i[i.kMxCADBrowseApp = 3] = "kMxCADBrowseApp", (r = n.IniSetName || (n.IniSetName = {})).kEnableOsnapFunction = "EnableOsnapFunction";
5963
- var x = (_.prototype.setOtherRefFile = function (t) { this._tzDwgStaticFile = t; }, _.prototype.setRequestHeader = function (t) { this._requestHeader = t; }, _.prototype.initZoomW = function (t, e) { this._initZoomwCoordPt1 = t.clone(), this._initZoomWCoordPt2 = e.clone(); }, _.prototype.getMxCAD = function () { return this._mxCAD; }, _.prototype.setMouseRightRotate = function (t) { this._mouseRightRotate = t, null != this.controls && (this.controls.mouseButtons.RIGHT = t ? c.MOUSE.ROTATE : c.MOUSE.PAN); }, _.prototype.initRunMode = function (t) { this._isCreate ? console.log("iniRunMode failed,mxobject already created") : this._runMode = t; }, _.prototype.getRunMode = function () { return this._runMode; }, _.prototype.setStaticLocalLoad = function (t) { this._isStaticLocalLoad = t; }, _.prototype.isStaticLocalLoad = function () { return this._isStaticLocalLoad; }, _.prototype.setStaticLocalLoadPath = function (t) { this._staticLocalLoadPath = t; }, _.prototype.addEvent = function (t, e) { this._event[t] = e; }, _.prototype.removeEvent = function (t) { this._event[t] = void 0; }, _.prototype.getEvent = function () { return this._event; }, _.prototype.sysVariable = function () { return this.m_sysVariable; }, _.prototype.setIniset = function (t) { this.m_iniSet = t; }, _.prototype.getInisetValue = function (t) { return this.m_iniSet[t]; }, _.prototype.getViewColor = function () { return this._viewcolor; }, _.prototype.isWhiteViewColor = function () { return 16777215 == this._viewcolor; }, _.prototype.initUserLoginData = function (t, e) { this._userIdentitySign = t, this._userRandomToken = e; }, _.prototype.automaticInversionColor = function (t) { return 16777215 != this._viewcolor || 16777215 != t ? t : 0; }, _.prototype.setViewColor = function (t) { this._viewcolor = t, null != this.scene && (this.scene.background = new c.Color(t)); }, _.prototype.callInitCompleteEvent = function () { null != this._event.loadComplete && this._event.loadComplete(); }, _.prototype.callEvent = function (t, e) { return null != this._event[t] && (this._event[t](e), !0); }, _.prototype.userLoginResult = function (t) { null != this._event.userLoginResult && this._event.userLoginResult(t); }, _.prototype.serverReturn = function (t) { var e = JSON.parse(t); null != this._event.serverReturn && this._event.serverReturn(e); }, _.prototype.openFileResult = function (t) { JSON.parse(t).linkServer || console.log("link mx serverobj error"), null != this._event.openFileResult && this._event.openFileResult(t); }, _.prototype.xzSize = function (t) { var e = this._devicePixelRatio; if (e - 1 <= 1e-4 && -1e-4 <= e - 1)
6092
+ var w = (b.prototype.setOtherRefFile = function (t) { this._tzDwgStaticFile = t; }, b.prototype.setRequestHeader = function (t) { this._requestHeader = t; }, b.prototype.initZoomW = function (t, e) { this._initZoomwCoordPt1 = t.clone(), this._initZoomWCoordPt2 = e.clone(); }, b.prototype.getMxDatabase = function () { return this.m_mxDatabase; }, b.prototype.addMxEntity = function (t) { var e = new _.MxDbEntity; return e.initUserObject(t), this.m_mxDatabase.addEntity(e); }, b.prototype.getAllMxEntity = function () { var e = []; return this.m_mxDatabase.getAllEntity().forEach(function (t) { t && e.push(t.getUserObject()); }), e; }, b.prototype.findMxEntityAtPoint = function (t, e) { e && (t = this.worldCoord2Screen(t.x, t.y, 0)); var n = [], i = this.m_mxDatabase.getIntersectObjects(t); if (0 == i.length)
6093
+ return n; var r = new Map; return i.forEach(function (t) { var e = t.object.MxDbEntity; if (e) {
6094
+ var n = e.objectId();
6095
+ r.has(n) || r.set(n, e.getUserObject());
6096
+ } }), r.forEach(function (t) { n.push(t); }), n; }, b.prototype.getMxAllSelect = function () { return this.m_mxDatabase.getSelectManager().getAllSelect(); }, b.prototype.getMxEntity = function (t) { return this.m_mxDatabase.getEntity(t); }, b.prototype.getMxCAD = function () { return this._mxCAD; }, b.prototype.setMouseRightRotate = function (t) { this._mouseRightRotate = t, null != this.controls && (this.controls.mouseButtons.RIGHT = t ? c.MOUSE.ROTATE : c.MOUSE.PAN); }, b.prototype.setMouseMiddlePan = function (t) { this._isMouseMiddlePan = t ? 1 : 0, null != this.controls && (t ? (this.controls.mouseButtons.LEFT = -1, this.controls.mouseButtons.RIGHT = -1, this.controls.mouseButtons.MIDDLE = c.MOUSE.PAN) : (this.controls.mouseButtons.LEFT = c.MOUSE.PAN, this._mouseRightRotate ? this.controls.mouseButtons.RIGHT = c.MOUSE.ROTATE : this.controls.mouseButtons.RIGHT = c.MOUSE.PAN, this.controls.mouseButtons.MIDDLE = 1)); }, b.prototype.resetThreeJSControls = function () { this.controls && (this.controls.saveState(), this.controls.reset()); }, b.prototype.enableZoom = function (t) { null != this.controls && (this.controls.enableZoom = t); }, b.prototype.enablePan = function (t) { null != this.controls && (this.controls.enablePan = t); }, b.prototype.initRunMode = function (t) { this._isCreate ? console.log("iniRunMode failed,mxobject already created") : this._runMode = t; }, b.prototype.getRunMode = function () { return this._runMode; }, b.prototype.setStaticLocalLoad = function (t) { this._isStaticLocalLoad = t; }, b.prototype.isStaticLocalLoad = function () { return this._isStaticLocalLoad; }, b.prototype.setStaticLocalLoadPath = function (t) { this._staticLocalLoadPath = t; }, b.prototype.addEvent = function (t, e) { this._event[t] = e; }, b.prototype.removeEvent = function (t) { this._event[t] = void 0; }, b.prototype.getEvent = function () { return this._event; }, b.prototype.sysVariable = function () { return this.m_sysVariable; }, b.prototype.setIniset = function (t) { this.m_iniSet = t; }, b.prototype.getInisetValue = function (t) { return this.m_iniSet[t]; }, b.prototype.getViewColor = function () { return this._viewcolor; }, b.prototype.isWhiteViewColor = function () { return 16777215 == this._viewcolor; }, b.prototype.initUserLoginData = function (t, e) { this._userIdentitySign = t, this._userRandomToken = e; }, b.prototype.initRendererParam = function (t) { this._rendererParam = t; }, b.prototype.automaticInversionColor = function (t) { return 16777215 != this._viewcolor || 16777215 != t ? t : 0; }, b.prototype.setViewColor = function (t) { this._viewcolor = t, null != this.scene && (this.scene.background = new c.Color(t)); }, b.prototype.callInitCompleteEvent = function () { null != this._event.loadComplete && this._event.loadComplete(); }, b.prototype.callEvent = function (t, e) { return null != this._event[t] && (this._event[t](e), !0); }, b.prototype.userLoginResult = function (t) { null != this._event.userLoginResult && this._event.userLoginResult(t); }, b.prototype.serverReturn = function (t) { var e = JSON.parse(t); null != this._event.serverReturn && this._event.serverReturn(e); }, b.prototype.openFileResult = function (t) { JSON.parse(t).linkServer || console.log("link mx serverobj error"), null != this._event.openFileResult && this._event.openFileResult(t); }, b.prototype.xzSize = function (t) { var e = this._devicePixelRatio; if (e - 1 <= 1e-4 && -1e-4 <= e - 1)
5964
6097
  return t; for (var n = 9999999, i = t, r = 0, a = t; r < 100; r++) {
5965
6098
  if ((s = (o = a * e) - Math.floor(o)) <= .001)
5966
6099
  return a;
@@ -5970,10 +6103,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5970
6103
  if ((s = (o = a * e) - Math.floor(o)) <= .001)
5971
6104
  return a;
5972
6105
  s < n && (n = s, i = a), --a;
5973
- } return i; }, _.prototype.setSize = function (t, e) { this._viewWidth = t, this._viewHeight = e, null != this._userCanvas && (this._userCanvas.width = t, this._userCanvas.height = e, this._userCanvas.style.width = t + "px", this._userCanvas.style.height = e + "px"), this.onResizeImp(), this.updateDisplay(); }, _.prototype.getCurrentColor = function () { return this._color; }, _.prototype.setCurrentColor = function (t) { this._color = t; }, _.prototype.getSelect = function () { return this._select; }, _.prototype.call = function (t, e, n) { this._net.getSend().CallServerJS(t, e, n); }, _.prototype.zoomAll = function () { this._is2d && this.call("getDatabaseBoundHelp", '{"isBackground":1}', function (t) { if (0 != t.length) {
6106
+ } return i; }, b.prototype.setSize = function (t, e) { this._viewWidth = t, this._viewHeight = e, null != this._userCanvas && (this._userCanvas.width = t, this._userCanvas.height = e, this._userCanvas.style.width = t + "px", this._userCanvas.style.height = e + "px"), this.onResizeImp(), this.updateDisplay(); }, b.prototype.getCurrentColor = function () { return this._color; }, b.prototype.setCurrentColor = function (t) { this._color = t; }, b.prototype.getSelect = function () { return this._select; }, b.prototype.call = function (t, e, n) { this._net.getSend().CallServerJS(t, e, n); }, b.prototype.zoomAll = function () { this._is2d && this.call("getDatabaseBoundHelp", '{"isBackground":1}', function (t) { if (0 != t.length) {
5974
6107
  var e = JSON.parse(t);
5975
6108
  this.zoomW(new c.Vector3(e[0], e[1], 0), new c.Vector3(e[2], e[3], 0));
5976
- } }); }, _.prototype.tempDisableSelect = function (t) { this._select.tmpDisable = t; }, _.prototype.getViewCenterDocCoord = function () { return null != this._userCanvas ? this.screenCoord2Doc(.5 * this._userCanvas.clientWidth, .5 * this._userCanvas.clientHeight, 0) : this.screenCoord2Doc(.5 * this._viewWidth, .5 * this._viewHeight, 0); }, _.prototype.onLoad = function () { if (this._isStaticLocalLoad)
6109
+ } }); }, b.prototype.tempDisableSelect = function (t) { this._select.tmpDisable = t; }, b.prototype.getViewCenterDocCoord = function () { return null != this._userCanvas ? this.screenCoord2Doc(.5 * this._userCanvas.clientWidth, .5 * this._userCanvas.clientHeight, 0) : this.screenCoord2Doc(.5 * this._viewWidth, .5 * this._viewHeight, 0); }, b.prototype.onLoad = function () { if (this._isStaticLocalLoad)
5977
6110
  this._net = new h.MxNet, this._net.init(this, !1), 0 < this._openFile.length && (this._staticLocalNet = new v.MxLocalDwgFileLoad(this._net), this._staticLocalNet.load(encodeURIComponent(this._staticLocalLoadPath), encodeURIComponent(this._openFile)));
5978
6111
  else {
5979
6112
  this._net = new h.MxNet;
@@ -5982,8 +6115,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5982
6115
  var e = new h.MxNet;
5983
6116
  e.init(this, !1), this._extRefManager.createTzDwgExternalReferences(99999), e.setCurrentDatabaseId(99999), this._staticLoadTzNet = new h.MxHFileLoad(e), this._staticLoadTzNet.setShowloading(!1), this._staticLoadTzNet.setRequestHeader(this._requestHeader), this._staticLoadTzNet.load(encodeURIComponent(this._tzDwgStaticFile));
5984
6117
  }
5985
- } }, _.prototype.getStaticNet = function () { return this._staticNet; }, _.prototype.isStaticFileNet = function () { return !this._isStaticLocalLoad && null != this._staticNet; }, _.prototype.getStaticLocalNet = function () { return this._staticLocalNet; }, _.prototype.getStaticLoadTzNet = function () { return this._staticLoadTzNet; }, _.prototype.getViewWidth = function () { return null != this._userCanvas ? this._userCanvas.clientWidth : this._viewWidth; }, _.prototype.getViewHeight = function () { return null != this._userCanvas ? this._userCanvas.clientHeight : this._viewHeight; }, _.prototype.makeCurrent = function () { p.MxManager.setCurrentMx(this); }, _.prototype.createCanvasImageData = function (e, t) { var n = this, i = 0, r = 0, a = !1; t && t.width && t.height && (i = this.getViewWidth(), r = this.getViewHeight(), a = !0, this.setSize(t.width, t.height)), this._callCreateCanvasImageData = function (t) { a && n.setSize(i, r), e(t); }, this.updateDisplay(); }, _.prototype.getIntersectObjects = function (t) { var e = new c.Raycaster; e.linePrecision = this.screenCoordLong2World(4); var n = this.getCanvas(), i = n.clientWidth, r = n.clientHeight; return t = new c.Vector2(t.x / i * 2 - 1, -t.y / r * 2 + 1), e.setFromCamera(t, this.camera), e.intersectObjects(this.threejsselectObjects.children, !0); }, _.prototype.addObject = function (t, e) { null == e || 1 == e ? this.threejsselectObjects.add(t) : this.scene.add(t); }, _.prototype.addViewObject = function (t, e) { this.secenView ? null == e || 1 == e ? this.threejsselectObjectsView.add(t) : this.secenView.add(t) : console.log("this.secenView is null"); }, _.prototype.removeAllSelectObject = function () { for (; this.threejsselectObjects.children.length;)
5986
- this.threejsselectObjects.remove(this.threejsselectObjects.children[0]); }, _.prototype.removeObject = function (t, e) { null == e || 1 == e ? this.threejsselectObjects.remove(t) : this.scene.remove(t); }, _.prototype.render = function () { this.secenView ? (this.renderer.autoClear = !0, this.renderer.render(this.secenView, this.cameraView), this.renderer.autoClear = !1) : this.renderer.autoClear = !0, this.renderer.render(this.scene, this.camera), null != this._callCreateCanvasImageData && (this._callCreateCanvasImageData(this.renderer.domElement.toDataURL("image/png")), this._callCreateCanvasImageData = void 0), this.callEvent("render", this.renderer); }, _.prototype.updateDisplay = function (t) { function e() { n._isAnimation ? (n._isAnimationStarting = !0, requestAnimationFrame(this.needRander)) : n._isWaiteCount = 0, n.render(); } void 0 === t && (t = !1); var n = this; !0 !== t ? this._isAnimationStarting || (this._isAnimation ? requestAnimationFrame(e) : ((5 < this._isWaiteCount || this._isWaiteCount < 0) && (this._isWaiteCount = 0), this._isWaiteCount <= 0 && requestAnimationFrame(e), this._isWaiteCount++)) : e(); }, _.prototype.gotoLayout = function (t) { "Modle" == t && (t = ""); var e = this._openFile; for (var n in this._iniParam)
6118
+ } }, b.prototype.getStaticNet = function () { return this._staticNet; }, b.prototype.isStaticFileNet = function () { return !this._isStaticLocalLoad && null != this._staticNet; }, b.prototype.getStaticLocalNet = function () { return this._staticLocalNet; }, b.prototype.getStaticLoadTzNet = function () { return this._staticLoadTzNet; }, b.prototype.getViewWidth = function () { return null != this._userCanvas ? this._userCanvas.clientWidth : this._viewWidth; }, b.prototype.getViewHeight = function () { return null != this._userCanvas ? this._userCanvas.clientHeight : this._viewHeight; }, b.prototype.makeCurrent = function () { p.MxManager.setCurrentMx(this); }, b.prototype.createCanvasImageData = function (e, t) { var n = this, i = 0, r = 0, a = !1; t && t.width && t.height && (i = this.getViewWidth(), r = this.getViewHeight(), a = !0, this.setSize(t.width, t.height)), this._callCreateCanvasImageData = function (t) { a && n.setSize(i, r), e(t); }, this.updateDisplay(); }, b.prototype.getIntersectObjects = function (t) { var e = new c.Raycaster; e.linePrecision = this.screenCoordLong2World(4); var n = this.getCanvas(), i = n.clientWidth, r = n.clientHeight; return t = new c.Vector2(t.x / i * 2 - 1, -t.y / r * 2 + 1), e.setFromCamera(t, this.camera), e.intersectObjects(this.threejsselectObjects.children, !0); }, b.prototype.addObject = function (t, e) { null == e || 1 == e ? this.threejsselectObjects.add(t) : this.scene.add(t); }, b.prototype.addViewObject = function (t, e) { this.secenView ? null == e || 1 == e ? this.threejsselectObjectsView.add(t) : this.secenView.add(t) : console.log("this.secenView is null"); }, b.prototype.removeAllSelectObject = function () { for (; this.threejsselectObjects.children.length;)
6119
+ this.threejsselectObjects.remove(this.threejsselectObjects.children[0]); }, b.prototype.removeObject = function (t, e) { null == e || 1 == e ? this.threejsselectObjects.remove(t) : this.scene.remove(t); }, b.prototype.render = function () { this.secenView ? (this.renderer.autoClear = !0, this.renderer.render(this.secenView, this.cameraView), this.renderer.autoClear = !1) : this.renderer.autoClear = !0, this.renderer.render(this.scene, this.camera), null != this._callCreateCanvasImageData && (this._callCreateCanvasImageData(this.renderer.domElement.toDataURL("image/png")), this._callCreateCanvasImageData = void 0), this.callEvent("render", this.renderer); }, b.prototype.updateDisplay = function (t) { function e() { n._isAnimation ? (n._isAnimationStarting = !0, requestAnimationFrame(this.needRander)) : n._isWaiteCount = 0, n.render(); } void 0 === t && (t = !1); var n = this; !0 !== t ? this._isAnimationStarting || (this._isAnimation ? requestAnimationFrame(e) : ((5 < this._isWaiteCount || this._isWaiteCount < 0) && (this._isWaiteCount = 0), this._isWaiteCount <= 0 && requestAnimationFrame(e), this._isWaiteCount++)) : e(); }, b.prototype.gotoLayout = function (t) { "Modle" == t && (t = ""); var e = this._openFile; for (var n in this._iniParam)
5987
6120
  "srcname" == (o = (a = this._iniParam[n])[0]) && (e = a[1]); var i = {}, r = ""; for (var n in this._iniParam) {
5988
6121
  var a, o;
5989
6122
  if (null == i[o = (a = this._iniParam[n])[0]]) {
@@ -5999,10 +6132,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
5999
6132
  continue;
6000
6133
  0 == r.length ? r = o + "=" + s + "&srcname=" + e : r += "&" + o + "=" + s;
6001
6134
  }
6002
- } var c = u.MxFun.getLocationPageUrl() + "?" + r; window.location.href = c; }, _.prototype.addInitParam = function (t, e) { var n = new Array; n.push(t), n.push(e), this._iniParam.push(n); }, _.prototype.create = function (t, e) { if (this._callCreateCanvasImageData = void 0, this._isCreate = !0, this._devicePixelRatio = window.devicePixelRatio, this._openFile = e, this._iniParam = u.MxFun.getUrlParams(), this._openFileExtName = e.substring(e.lastIndexOf(".") + 1), "" != this._openFile && this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp) {
6135
+ } var c = u.MxFun.getLocationPageUrl() + "?" + r; window.location.href = c; }, b.prototype.addInitParam = function (t, e) { var n = new Array; n.push(t), n.push(e), this._iniParam.push(n); }, b.prototype.create = function (t, e) { if (this._callCreateCanvasImageData = void 0, this._isCreate = !0, this._devicePixelRatio = window.devicePixelRatio, this._openFile = e, this._iniParam = u.MxFun.getUrlParams(), this._openFileExtName = e.substring(e.lastIndexOf(".") + 1), "" != this._openFile && this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp) {
6003
6136
  var n = new Array;
6004
6137
  n.push("file"), n.push(this._openFile), this._iniParam.push(n);
6005
- } "" != this._userIdentitySign && (this.addInitParam("userIdentitySign", this._userIdentitySign), this.addInitParam("userRandomToken", this._userRandomToken)), this.addInitParam("runMode", this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? "mxcad" : "browse"), this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? ("empty" == this._openFile && (this._openFile = ""), this._mxCAD = new g.MxCADObject(this)) : this._mxCAD = null, this._userCanvas = t; var i = window.innerWidth, r = window.innerHeight; null != t && (i = t.clientWidth, r = t.clientHeight), this._viewWidth = i, this._viewHeight = r, this.onInitThreejs(), this.onCreate(), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this._is2d && (this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp || (this.controls.mouseButtons.LEFT = -1, this.controls.mouseButtons.RIGHT = -1, this.controls.mouseButtons.MIDDLE = c.MOUSE.PAN)), this._select = new d.MxSelect(this, this.getCanvas()), this._select.enabled = u.MxFun.isEnableSelect(), this._select.init(), this._is2d || (this._select.enabled = !1), this._runMode != s.kBrowse && (this._select.enabled = !1), p.MxManager.add(this), p.MxManager.setCurrentMx(this); var a = this; if (this.controls.addEventListener("change", function () { f.MxJigCmdManager.OnThreeControlsChage(), a.callEvent("viewchange"); var t = a.getMxCAD(); t && t.getGrip().onControlsChage(), a.updateDisplay(); }), this.updateDisplay(), null == t)
6138
+ } "" != this._userIdentitySign && (this.addInitParam("userIdentitySign", this._userIdentitySign), this.addInitParam("userRandomToken", this._userRandomToken)), this.addInitParam("runMode", this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? "mxcad" : "browse"), this._runMode == s.kMxCAD || this._runMode == s.kMxCADBrowseApp ? ("empty" == this._openFile && (this._openFile = ""), this._mxCAD = new g.MxCADObject(this)) : this._mxCAD = null, this._userCanvas = t; var i = window.innerWidth, r = window.innerHeight; null != t && (i = t.clientWidth, r = t.clientHeight), this._viewWidth = i, this._viewHeight = r, this.m_mxDatabase.getSelectManager().setCanvasSize(i, r), this.onInitThreejs(), this.onCreate(), this.m_mxDatabase.init(this), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this._is2d && (this._runMode != s.kMxCAD && this._runMode != s.kMxCADBrowseApp || (this.controls.mouseButtons.LEFT = -1, this.controls.mouseButtons.RIGHT = -1, this.controls.mouseButtons.MIDDLE = c.MOUSE.PAN)), this._select = new d.MxSelect(this, this.getCanvas()), this._select.enabled = u.MxFun.isEnableSelect(), this._select.init(), this._is2d || (this._select.enabled = !1), this._runMode != s.kBrowse && (this._select.enabled = !1), p.MxManager.add(this), p.MxManager.setCurrentMx(this); var a = this; if (this.controls.addEventListener("change", function () { f.MxJigCmdManager.OnThreeControlsChage(), a.callEvent("viewchange"); var t = a.getMxCAD(); t && t.getGrip().onControlsChage(), a.updateDisplay(); }), this.updateDisplay(), null == t)
6006
6139
  window.addEventListener("resize", function () { a._viewWidth = window.innerWidth, a._viewHeight = window.innerHeight, a.onResizeImp(), a.updateDisplay(); }, !1);
6007
6140
  else {
6008
6141
  var o = function () { if (a._viewWidth = a._userCanvas.clientWidth, a._viewHeight = a._userCanvas.clientHeight, null != a._event.onResize) {
@@ -6010,7 +6143,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6010
6143
  null != t && (a._viewWidth = parseInt(t.width), a._viewHeight = parseInt(t.height));
6011
6144
  } a.onResizeImp(a._viewWidth, a._viewHeight), a.updateDisplay(); };
6012
6145
  null != this._event.addResizeEvent ? this._event.addResizeEvent(o, t) : window.addEventListener("resize", o, !1), null != this._event.onResize && (o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(), window.setTimeout(function () { o(); }, 600); }, 200); }, 50); }, 20));
6013
- } this.onLoad(); }, _.prototype.initResize = function () { if (null == this._userCanvas)
6146
+ } this.onLoad(); }, b.prototype.initResize = function () { if (null == this._userCanvas)
6014
6147
  this._viewWidth = window.innerWidth, this._viewHeight = window.innerHeight, this.onResizeImp();
6015
6148
  else {
6016
6149
  if (this._viewWidth = this._userCanvas.clientWidth, this._viewHeight = this._userCanvas.clientHeight, null != this._event.onResize) {
@@ -6018,7 +6151,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6018
6151
  null != t && (this._viewWidth = t.width, this._viewHeight = t.height);
6019
6152
  }
6020
6153
  this.onResizeImp(this._viewWidth, this._viewHeight);
6021
- } this.updateDisplay(); }, _.prototype.is2D = function () { return this._is2d; }, _.prototype.getOpenFile = function () { return this._openFile; }, _.prototype.getIniParam = function () { return this._iniParam; }, _.prototype.getOpenFileExtName = function () { return this._openFileExtName; }, _.prototype.loadCodeToServer = function (t, e) { this._net.getSend().CallLoadCodeToServer(t, e); }, _.prototype.openFile = function (t) { this._net.getSend().OpenFile(t); }, _.prototype.userLogin = function (t, e) { this._net.getSend().UserLogin(t, e); }, _.prototype.getUserCanvas = function () { return this._userCanvas; }, _.prototype.getCanvas = function () { return null != this._userCanvas ? this._userCanvas : this.renderer.domElement; }, _.prototype.getScene = function () { return this.scene; }, _.prototype.getCamera = function () { return this.camera; }, _.prototype.callCommand = function (t, e, n) { void 0 === e && (e = ""), this._net.getSend().DoCommand(t, e, n); }, _.prototype.undoMark = function () { this._net.getSend().UndoMark(); }, _.prototype.loadCodeFileToServer = function (t, e, n) { var i = '{"path":"' + t + '","reload":' + (null != n ? "true" : "false") + "}"; this._net.getSend().DoCommand("Mx_LoadCodeFormServerFile", i, e); }, _.prototype.deleteAll = function () { this.removeAllEntity(), this.callCommand("Mx_ClearAll"), this.updateDisplay(); }, _.prototype.undo = function () { this.callCommand("Mx_Undo"); }, _.prototype.save = function () { this.callCommand("Mx_Save"); }, _.prototype.initAllLayoutName = function (t) { this._allLayoutName = t; }, _.prototype.getAllLayoutName = function () { return this._allLayoutName; }, _.prototype.updataClipMaterial = function () { this._blocks.updataClipMaterial(this); }, _.prototype.getSketchLayers = function () { return this._sketchLayers; }, _.prototype.getExtRefManager = function () { return this._extRefManager; }, _.prototype.showLayer = function (t, e, n) { "string" == typeof t && (t = this._layers.getLayerIdForName(t)), n ? this._sketchLayers.getLayer(t).show(e) : this._blocks.showLayer(t, e), this.updateDisplay(); }, _.prototype.addLayerInfo = function (t, e, n) { e = this.automaticInversionColor(16777215 & e), this._layers.add(t, e, n); }, _.prototype.setZeroLayerId = function (t) { this._layers.setZeroLayerId(t); }, _.prototype.addLayerInfoComplete = function () { this._layers.initComplete(); }, _.prototype.addEntity = function (t, e) { var n = this._mapId2Entity.get(t); null == n && (n = new Array, this._mapId2Entity.set(t, n)), n.push(e); }, _.prototype.getEntity = function (t) { return this._mapId2Entity.get(t); }, _.prototype.clearThreejsScence = function () { this.scene.remove(), this.scene.dispose(), this.scene = new c.Scene, this.scene.background = new c.Color(this._viewcolor), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this.onInitScene(); }, _.prototype.reInit = function () { this.clearThreejsScence(), this._openFile = "", this._openFileExtName = "", this._select.removeAll(), this._is2d || (this._select.enabled = !1), this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._tzDwgStaticFile = "", this._devicePixelRatio = window.devicePixelRatio, this._blocks.initRootBlockRef(); }, _.prototype.removeEntity = function (t) { if (null == this._setAdyDelete[t]) {
6154
+ } this.updateDisplay(); }, b.prototype.is2D = function () { return this._is2d; }, b.prototype.getOpenFile = function () { return this._openFile; }, b.prototype.getIniParam = function () { return this._iniParam; }, b.prototype.getOpenFileExtName = function () { return this._openFileExtName; }, b.prototype.loadCodeToServer = function (t, e) { this._net.getSend().CallLoadCodeToServer(t, e); }, b.prototype.openFile = function (t) { this._net.getSend().OpenFile(t); }, b.prototype.userLogin = function (t, e) { this._net.getSend().UserLogin(t, e); }, b.prototype.getUserCanvas = function () { return this._userCanvas; }, b.prototype.getCanvas = function () { return null != this._userCanvas ? this._userCanvas : this.renderer.domElement; }, b.prototype.getScene = function () { return this.scene; }, b.prototype.getCamera = function () { return this.camera; }, b.prototype.callCommand = function (t, e, n) { void 0 === e && (e = ""), this._net.getSend().DoCommand(t, e, n); }, b.prototype.undoMark = function () { this._net.getSend().UndoMark(); }, b.prototype.loadCodeFileToServer = function (t, e, n) { var i = '{"path":"' + t + '","reload":' + (null != n ? "true" : "false") + "}"; this._net.getSend().DoCommand("Mx_LoadCodeFormServerFile", i, e); }, b.prototype.deleteAll = function () { this.removeAllEntity(), this.callCommand("Mx_ClearAll"), this.updateDisplay(); }, b.prototype.undo = function () { this.callCommand("Mx_Undo"); }, b.prototype.save = function () { this.callCommand("Mx_Save"); }, b.prototype.initAllLayoutName = function (t) { this._allLayoutName = t; }, b.prototype.getAllLayoutName = function () { return this._allLayoutName; }, b.prototype.updataClipMaterial = function () { this._blocks.updataClipMaterial(this); }, b.prototype.getSketchLayers = function () { return this._sketchLayers; }, b.prototype.getExtRefManager = function () { return this._extRefManager; }, b.prototype.showLayer = function (t, e, n) { "string" == typeof t && (t = this._layers.getLayerIdForName(t)), n ? this._sketchLayers.getLayer(t).show(e) : this._blocks.showLayer(t, e), this.updateDisplay(); }, b.prototype.addLayerInfo = function (t, e, n) { e = this.automaticInversionColor(16777215 & e), this._layers.add(t, e, n); }, b.prototype.setZeroLayerId = function (t) { this._layers.setZeroLayerId(t); }, b.prototype.addLayerInfoComplete = function () { this._layers.initComplete(); }, b.prototype.addEntity = function (t, e) { var n = this._mapId2Entity.get(t); null == n && (n = new Array, this._mapId2Entity.set(t, n)), n.push(e); }, b.prototype.getEntity = function (t) { return this._mapId2Entity.get(t); }, b.prototype.clearThreejsScence = function () { this.scene.remove(), this.scene.dispose(), this.scene = new c.Scene, this.scene.background = new c.Color(this._viewcolor), u.MxFun.removeThreejsObject(this.threejsselectObjects, this.scene), this.threejsselectObjects = new c.Object3D, this.scene.add(this.threejsselectObjects), this._objectsOsnap = new y.MxDrawObjectOsnap(this), this.m_mxDatabase.init(this), this.onInitScene(); }, b.prototype.reInit = function () { this.clearThreejsScence(), this._openFile = "", this._openFileExtName = "", this._select.removeAll(), this._is2d || (this._select.enabled = !1), this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._tzDwgStaticFile = "", this._devicePixelRatio = window.devicePixelRatio, this._blocks.initRootBlockRef(); }, b.prototype.removeEntity = function (t) { if (null == this._setAdyDelete[t]) {
6022
6155
  this._setAdyDelete[t] = !0;
6023
6156
  var e = this._mapId2Entity.get(t);
6024
6157
  if (null != e) {
@@ -6026,11 +6159,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6026
6159
  this.scene.remove(e[n]);
6027
6160
  this._sketchLayers.removeEntity(t), this._mapId2Entity.delete(t);
6028
6161
  }
6029
- } }, _.prototype.removeEntityFromServer = function (t) { for (var e = t.getInt32(4, !0), n = 0; n < e; n++) {
6162
+ } }, b.prototype.removeEntityFromServer = function (t) { for (var e = t.getInt32(4, !0), n = 0; n < e; n++) {
6030
6163
  var i = t.getInt32(4 * (n + 20), !0);
6031
6164
  this.removeEntity(i);
6032
- } }, _.prototype.removeAllEntity = function () { var r = this; this._mapId2Entity.forEach(function (t, e, n) { for (var i in t)
6033
- r.scene.remove(t[i]); }), this._mapId2Entity.clear(), this._sketchLayers.removeAllEntity(); }, _.prototype.mxWebAddEntity = function (t) { this._setAdyDelete.clear(); var e = this.mxWebAddEntity_3DChild(t); this.mxWebAddEntity_Curve(t, e), this._setAdyDelete.clear(); }, _.prototype.screenCoord2World = function (t, e, n) { var i = this.getCanvas(), r = i.clientWidth, a = i.clientHeight; n = .5; var o = this.camera; o && o.isOrthographicCamera && (n = (o.near + o.far) / (o.near - o.far)); var s = new c.Vector3(t / r * 2 - 1, -e / a * 2 + 1, n); return s.unproject(this.camera), s; }, _.prototype.worldCoord2Screen = function (t, e, n) { var i = new c.Vector3(t, e, n).project(this.camera), r = this.getCanvas(), a = r.clientWidth / 2, o = r.clientHeight / 2, s = Math.round(i.x * a + a), l = Math.round(-i.y * o + o); return new c.Vector3(s, l, 0); }, _.prototype.worldCoordLong2Doc = function (t) { var e = this.worldCoord2Doc(0, 0, 0), n = this.worldCoord2Doc(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoordLong2World = function (t) { var e = this.docCoord2World(0, 0, 0), n = this.docCoord2World(t, 0, 0); return e.distanceTo(n); }, _.prototype.docCoord2World = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._doc2World), i; }, _.prototype.worldCoord2Doc = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._word2doc), i; }, _.prototype.screenCoord2Doc = function (t, e, n) { var i = this.screenCoord2World(t, e, n); return this.worldCoord2Doc(i.x, i.y, i.z); }, _.prototype.docCoord2Screen = function (t, e, n) { var i = this.docCoord2World(t, e, n); return this.worldCoord2Screen(i.x, i.y, i.z); }, _.prototype.screenCoordLong2Doc = function (t) { var e = this.screenCoord2Doc(0, 0, 0), n = this.screenCoord2Doc(t, 0, 0); return e.distanceTo(n); }, _.prototype.screenCoordLong2DocScale = function () { var t = this.screenCoord2Doc(0, 0, 0), e = this.screenCoord2Doc(1, 0, 0); return t.distanceTo(e); }, _.prototype.docCoordLong2Screen = function (t) { var e = this.docCoord2Screen(0, 0, 0), n = this.docCoord2Screen(t, 0, 0); return e.distanceTo(n); }, _.prototype.screenCoordLong2World = function (t) { var e = this.screenCoord2World(0, 0, 0), n = this.screenCoord2World(t, 0, 0); return e.distanceTo(n); }, _.prototype.worldCoordLong2Screen = function (t) { var e = this.worldCoord2Screen(0, 0, 0), n = this.worldCoord2Screen(t, 0, 0); return e.distanceTo(n); }, _.prototype.intiDoc2Wold = function (t) { this._doc2World.fromArray(t), this._word2doc.getInverse(this._doc2World); }, _.prototype.enableSingleTouchPan = function (t) { this.controls.enablePan = t; }, _.prototype.mxWebAddEntityFor2dPointMeshBuffers = function (t, e) { var n = new L.MxNetData(t), i = n.getdPointMeshBuffersHead(), r = i.zeroLayerIdIndex, a = i.databaseIndex; -1 != e && (a = e); for (var o = i.datasize, s = 0; s < i.datacount; s++) {
6165
+ } }, b.prototype.removeAllEntity = function () { var r = this; this._mapId2Entity.forEach(function (t, e, n) { for (var i in t)
6166
+ r.scene.remove(t[i]); }), this._mapId2Entity.clear(), this._sketchLayers.removeAllEntity(); }, b.prototype.mxWebAddEntity = function (t) { this._setAdyDelete.clear(); var e = this.mxWebAddEntity_3DChild(t); this.mxWebAddEntity_Curve(t, e), this._setAdyDelete.clear(); }, b.prototype.screenCoord2World = function (t, e, n) { var i = this.getCanvas(), r = i.clientWidth, a = i.clientHeight; n = .5; var o = this.camera; o && o.isOrthographicCamera && (n = (o.near + o.far) / (o.near - o.far)); var s = new c.Vector3(t / r * 2 - 1, -e / a * 2 + 1, n); return s.unproject(this.camera), s; }, b.prototype.worldCoord2Screen = function (t, e, n) { var i = new c.Vector3(t, e, n).project(this.camera), r = this.getCanvas(), a = r.clientWidth / 2, o = r.clientHeight / 2, s = Math.round(i.x * a + a), l = Math.round(-i.y * o + o); return new c.Vector3(s, l, 0); }, b.prototype.worldCoordLong2Doc = function (t) { var e = this.worldCoord2Doc(0, 0, 0), n = this.worldCoord2Doc(t, 0, 0); return e.distanceTo(n); }, b.prototype.docCoordLong2World = function (t) { var e = this.docCoord2World(0, 0, 0), n = this.docCoord2World(t, 0, 0); return e.distanceTo(n); }, b.prototype.docCoord2World = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._doc2World), i; }, b.prototype.worldCoord2Doc = function (t, e, n) { var i = new c.Vector3(t, e, n); return i.applyMatrix4(this._word2doc), i; }, b.prototype.screenCoord2Doc = function (t, e, n) { var i = this.screenCoord2World(t, e, n); return this.worldCoord2Doc(i.x, i.y, i.z); }, b.prototype.docCoord2Screen = function (t, e, n) { var i = this.docCoord2World(t, e, n); return this.worldCoord2Screen(i.x, i.y, i.z); }, b.prototype.screenCoordLong2Doc = function (t) { var e = this.screenCoord2Doc(0, 0, 0), n = this.screenCoord2Doc(t, 0, 0); return e.distanceTo(n); }, b.prototype.screenCoordLong2DocScale = function () { var t = this.screenCoord2Doc(0, 0, 0), e = this.screenCoord2Doc(1, 0, 0); return t.distanceTo(e); }, b.prototype.docCoordLong2Screen = function (t) { var e = this.docCoord2Screen(0, 0, 0), n = this.docCoord2Screen(t, 0, 0); return e.distanceTo(n); }, b.prototype.screenCoordLong2World = function (t) { var e = this.screenCoord2World(0, 0, 0), n = this.screenCoord2World(t, 0, 0); return e.distanceTo(n); }, b.prototype.worldCoordLong2Screen = function (t) { var e = this.worldCoord2Screen(0, 0, 0), n = this.worldCoord2Screen(t, 0, 0); return e.distanceTo(n); }, b.prototype.intiDoc2Wold = function (t) { this._doc2World.fromArray(t), this._word2doc.getInverse(this._doc2World); }, b.prototype.enableSingleTouchPan = function (t) { this.controls.enablePan = t; }, b.prototype.mxWebAddEntityFor2dPointMeshBuffers = function (t, e) { var n = new O.MxNetData(t), i = n.getdPointMeshBuffersHead(), r = i.zeroLayerIdIndex, a = i.databaseIndex; -1 != e && (a = e); for (var o = i.datasize, s = 0; s < i.datacount; s++) {
6034
6167
  var l = n.getdPointMeshBufferDataHead(o);
6035
6168
  o = l.offset;
6036
6169
  var c = l.layerId, u = c == r, h = l.blkId, d = l.pointCount;
@@ -6058,7 +6191,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6058
6191
  var D = E.crateBlock(h);
6059
6192
  D.addGeometryMesh(p, f, c, g, m, v), E.createThreejsObj(D, this, A);
6060
6193
  }
6061
- } }, _.prototype.mxWebAddEntityFor2dPointCurveBuffers = function (t, e) { var n = new L.MxNetData(t), i = n.getdPointCurveBuffersHead(), r = i.zeroLayerIdIndex, a = i.databaseIndex; -1 != e && (a = e); for (var o = i.datasize, s = 0; s < i.datacount; s++) {
6194
+ } }, b.prototype.mxWebAddEntityFor2dPointCurveBuffers = function (t, e) { var n = new O.MxNetData(t), i = n.getdPointCurveBuffersHead(), r = i.zeroLayerIdIndex, a = i.databaseIndex; -1 != e && (a = e); for (var o = i.datasize, s = 0; s < i.datacount; s++) {
6062
6195
  var l = n.getdPointCurveBufferDataHead(o);
6063
6196
  o = l.offset;
6064
6197
  var c = l.layerId, u = c == r, h = l.blkId, d = l.pointCount;
@@ -6082,7 +6215,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6082
6215
  var E = C.crateBlock(h);
6083
6216
  E.addGeometryCurve(p, f, c, g, m, v), C.createThreejsObj(E, this, T);
6084
6217
  }
6085
- } }, _.prototype.mxWebAddEntityFor2dPointCurveBuffer = function (t, e) { var n = new L.MxNetData(t); if (!n.getIsSketchEntity()) {
6218
+ } }, b.prototype.mxWebAddEntityFor2dPointCurveBuffer = function (t, e) { var n = new O.MxNetData(t); if (!n.getIsSketchEntity()) {
6086
6219
  var i, r = n.getLayerId(), a = r == n.getZeroLayerId(), o = n.getBlockId();
6087
6220
  if (!((i = t.getInt32(20, !0) / 20) < 1)) {
6088
6221
  for (var s = 80, l = [], c = [], u = [], h = [], d = [], p = 0; p < i; p++) {
@@ -6106,7 +6239,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6106
6239
  var M = w.crateBlock(o);
6107
6240
  M.addGeometryCurve(l, c, r, h, u, d), w.createThreejsObj(M, this, b);
6108
6241
  }
6109
- } }, _.prototype.mxWebAddEntityFor2dPointMeshBuffer = function (t, e) { var n = new L.MxNetData(t); if (!n.getIsSketchEntity()) {
6242
+ } }, b.prototype.mxWebAddEntityFor2dPointMeshBuffer = function (t, e) { var n = new O.MxNetData(t); if (!n.getIsSketchEntity()) {
6110
6243
  var i, r = n.getLayerId(), a = n.getBlockId(), o = r == n.getZeroLayerId();
6111
6244
  if (!((i = t.getInt32(12, !0) / 28) < 1)) {
6112
6245
  for (var s = 80, l = [], c = [], u = [], h = [], d = [], p = 0; p < i; p++) {
@@ -6134,10 +6267,10 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6134
6267
  var C = M.crateBlock(a);
6135
6268
  C.addGeometryMesh(l, c, r, h, u, d), M.createThreejsObj(C, this, S);
6136
6269
  }
6137
- } }, _.prototype.mxWebCreateAllBlocks = function (t, e) { var n = new L.MxNetData(t).getDatabaseIndex(); -1 != e && (n = e); var i = this._blocks; 0 != n && (i = this._extRefManager.getBlocks(n)), i.createBlocks(t, this.scene); }, _.prototype.mxWebEntitysData = function (t, e) { -1 == e && this._objectsOsnap.mxWebEntitysData(t, e); }, _.prototype.getObjectOsnap = function () { return this._objectsOsnap; }, _);
6138
- function _() { this._is2d = !0, this._runMode = s.kBrowse, this._mxCAD = null, this._userCanvas = null, this._openFile = "empty", this._openFileExtName = "", this._userIdentitySign = "", this._userRandomToken = "", this._isCreate = !1, this.m_iniSet = {}, this._net = null, this._staticNet = null, this._staticLoadTzNet = null, this._staticLocalNet = null, this._isStaticLocalLoad = !1, this._staticLocalLoadPath = "", this._viewWidth = 1, this._viewHeight = 1, this.m_sysVariable = new m.MxSystemVariable, this._color = "#FFFFFF", this._viewcolor = 15790320, this._isAnimation = !1, this._isAnimationStarting = !1, this._isWaiteCount = 0, this._callCreateCanvasImageData = void 0, this._event = {}, this.scene = null, this.camera = null, this.secenView = null, this.cameraView = null, this.renderer = null, this.controls = null, this.threejsselectObjects = null, this.threejsselectObjectsView = null, this._mouseRightRotate = !0, this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._devicePixelRatio = 1, this._tzDwgStaticFile = "", this._requestHeader = "", this._objectsOsnap = null, this._initZoomwCoordPt1 = null, this._initZoomWCoordPt2 = null, this._blocks.initRootBlockRef(), this.m_iniSet[r.kEnableOsnapFunction] = !1, this.m_sysVariable.init(this); }
6139
- n.MxDrawObject = x;
6140
- }, { "./MxBrowseDisplay": 23, "./MxBrowseLayerData": 24, "./MxCADObject": 28, "./MxCadSketchLayer": 31, "./MxDrawObjectOsnap": 38, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxLocalFileLoad": 44, "./MxManager": 45, "./MxNetData": 47, "./MxSelect": 48, "./MxSystemVariable": 51, three: 19 }], 36: [function (t, e, n) {
6270
+ } }, b.prototype.mxWebCreateAllBlocks = function (t, e) { var n = new O.MxNetData(t).getDatabaseIndex(); -1 != e && (n = e); var i = this._blocks; 0 != n && (i = this._extRefManager.getBlocks(n)), i.createBlocks(t, this.scene); }, b.prototype.mxWebEntitysData = function (t, e) { -1 == e && this._objectsOsnap.mxWebEntitysData(t, e); }, b.prototype.getObjectOsnap = function () { return this._objectsOsnap; }, b);
6271
+ function b() { this._is2d = !0, this._runMode = s.kBrowse, this._mxCAD = null, this._userCanvas = null, this._openFile = "empty", this._openFileExtName = "", this._userIdentitySign = "", this._rendererParam = void 0, this._userRandomToken = "", this._isCreate = !1, this.m_iniSet = {}, this._net = null, this._staticNet = null, this._staticLoadTzNet = null, this._staticLocalNet = null, this._isStaticLocalLoad = !1, this._staticLocalLoadPath = "", this._viewWidth = 1, this._viewHeight = 1, this.m_sysVariable = new m.MxSystemVariable, this._color = "#FFFFFF", this._viewcolor = 15790320, this._isAnimation = !1, this._isAnimationStarting = !1, this._isWaiteCount = 0, this._callCreateCanvasImageData = void 0, this._event = {}, this.scene = null, this.camera = null, this.secenView = null, this.cameraView = null, this.renderer = null, this.controls = null, this.threejsselectObjects = null, this.threejsselectObjectsView = null, this._mouseRightRotate = !0, this._isMouseMiddlePan = -1, this._mapId2Entity = new Map, this._setAdyDelete = new Map, this._sketchLayers = new a.MxCadSketchLayers(this), this._layers = new o.MxBrowseLayerData, this._blocks = new l.Blocks, this._extRefManager = new l.ExternalReferenceManager, this._doc2World = new c.Matrix4, this._word2doc = new c.Matrix4, this._allLayoutName = new Array, this._devicePixelRatio = 1, this._tzDwgStaticFile = "", this._requestHeader = "", this._objectsOsnap = null, this._initZoomwCoordPt1 = null, this._initZoomWCoordPt2 = null, this.m_mxDatabase = null, this._blocks.initRootBlockRef(), this.m_iniSet[r.kEnableOsnapFunction] = !1, this.m_sysVariable.init(this), this.m_mxDatabase = new x.MxDbDatabase; }
6272
+ n.MxDrawObject = w;
6273
+ }, { "./MxBrowseDisplay": 24, "./MxBrowseLayerData": 25, "./MxCADObject": 29, "./MxCadSketchLayer": 32, "./MxDbDatabase": 34, "./MxDbEntity": 35, "./MxDrawObjectOsnap": 44, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxNetData": 53, "./MxSelect": 54, "./MxSystemVariable": 57, three: 19 }], 42: [function (t, e, n) {
6141
6274
  "use strict";
6142
6275
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6143
6276
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6164,12 +6297,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6164
6297
  this.secenView.add(n);
6165
6298
  var i = new g.DirectionalLight(16777215, 1);
6166
6299
  i.position.set(-2, 2, 3).normalize(), this.secenView.add(i), this.threejsselectObjectsView = new g.Object3D, this.secenView.add(this.threejsselectObjectsView);
6167
- } }, d.prototype.onInitThreejs = function () { var t = this.getViewWidth(), e = this.getViewHeight(), n = (t = this.xzSize(t)) / (e = this.xzSize(e)) * 50; this.initViewScene(), this.camera = new g.OrthographicCamera(n / -2, n / 2, 25, -25, 1, 1e3), this.camera.position.set(0, 0, 200), this.scene = new g.Scene; var i = this.getUserCanvas(); if (null == i)
6168
- this.renderer = new g.WebGLRenderer({ antialias: !1 }), this.renderer.setClearColor(0, 1), this.renderer.setPixelRatio(this._devicePixelRatio), this.renderer.setSize(t, e), document.body.appendChild(this.renderer.domElement);
6169
- else {
6170
- var r = {};
6171
- r.canvas = i, this.renderer = new g.WebGLRenderer(r), this.renderer.setClearColor(0, 1), this.renderer.setPixelRatio(this._devicePixelRatio);
6172
- } this.renderer.sortObjects = !0; var a = this.getUserCanvas(); null == a && (a = this.renderer.domElement), this.controls = new l.OrbitControls(this.camera, a), this.is3DDraw || (this.controls.enableZoom = !0), o.MxFun.isPC() ? (this.controls.zoomSpeed = 4, this.controls.mouseButtons.LEFT = g.MOUSE.PAN, this._mouseRightRotate ? this.controls.mouseButtons.RIGHT = g.MOUSE.ROTATE : this.controls.mouseButtons.RIGHT = g.MOUSE.PAN) : (this.controls.zoomSpeed = 1.5, this.controls.touches.ONE = g.TOUCH.PAN), this.controls.screenSpacePanning = !0; }, d.prototype.onCreate = function () { this._is2d = !0, this.onInitScene(); }, d.prototype.mxWebAddEntity_3DChild = function (t) { var e = new c.MxNetData(t), n = e.getMesh(); if (null == n.id)
6300
+ } }, d.prototype.onInitThreejs = function () { var t = this.getViewWidth(), e = this.getViewHeight(), n = (t = this.xzSize(t)) / (e = this.xzSize(e)) * 50; this.initViewScene(), this.camera = new g.OrthographicCamera(n / -2, n / 2, 25, -25, 1, 1e3), this.camera.position.set(0, 0, 200), this.scene = new g.Scene; var i = this.getUserCanvas(), r = this._rendererParam; r = r || {}, null == i ? (r.antialias = !1, this.renderer = new g.WebGLRenderer(r), this.renderer.setClearColor(0, 1), this.renderer.setPixelRatio(this._devicePixelRatio), this.renderer.setSize(t, e), document.body.appendChild(this.renderer.domElement)) : (r.canvas = i, this.renderer = new g.WebGLRenderer(r), this.renderer.setClearColor(0, 1), this.renderer.setPixelRatio(this._devicePixelRatio)), this.renderer.sortObjects = !0; var a = this.getUserCanvas(); null == a && (a = this.renderer.domElement), this.controls = new l.OrbitControls(this.camera, a), this.is3DDraw || (this.controls.enableZoom = !0), o.MxFun.isPC() ? (this.controls.zoomSpeed = 4, this.controls.mouseButtons.LEFT = g.MOUSE.PAN, this._mouseRightRotate ? this.controls.mouseButtons.RIGHT = g.MOUSE.ROTATE : this.controls.mouseButtons.RIGHT = g.MOUSE.PAN, this.controls.screenSpacePanning = !0, -1 != this._isMouseMiddlePan && this.setMouseMiddlePan(1 == this._isMouseMiddlePan)) : (this.controls.zoomSpeed = 1.5, this.controls.touches.ONE = g.TOUCH.PAN, this.controls.screenSpacePanning = !0); }, d.prototype.onCreate = function () { this._is2d = !0, this.onInitScene(); }, d.prototype.mxWebAddEntity_3DChild = function (t) { var e = new c.MxNetData(t), n = e.getMesh(); if (null == n.id)
6173
6301
  return n.size; var i = new g.Mesh(n.geometry, u.MxMaterial.GetBaseColorMaterial(n.nColorIndex)); return this.removeEntity(n.id), this.scene.add(i), n.isSketchEntity && (this.addEntity(n.id, i), this.getSketchLayers().addEntity(n.id, e.getLayerId())), n.size; }, d.prototype.mxWebAddEntity_Curve = function (t, e) { var n = new c.MxNetData(t), i = n.getCurve(e); if (null != i.id) {
6174
6302
  var r = u.MxMaterial.GetCurveColorMaterial(i.colorIndex), a = new g.LineSegments(i.geometry, r);
6175
6303
  this.removeEntity(i.id), this.scene.add(a), i.isSketchEntity && (this.addEntity(i.id, a), this.getSketchLayers().addEntity(i.id, n.getLayerId()));
@@ -6180,17 +6308,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6180
6308
  else {
6181
6309
  var s = Math.abs(this._minDisplayPoint.x - this._maxDisplayPoint.x), l = Math.abs(this._minDisplayPoint.y - this._maxDisplayPoint.y);
6182
6310
  s / l < n / i ? (a = .5 * l, o = n / i, r.left = -a * o, r.right = a * o, r.top = a, r.bottom = -a) : (a = .5 * s, o = i / n, r.left = -a, r.right = a, r.top = a * o, r.bottom = -a * o), r.updateProjectionMatrix();
6183
- } this.renderer.setSize(n, i), this.updataClipMaterial(), this.updataCameraView(n, i), this.callEvent("viewsizechange", { width: n, height: i }), this.callEvent("viewchange"); }, d);
6311
+ } this.renderer.setSize(n, i), this.updataClipMaterial(), this.updataCameraView(n, i), this.callEvent("viewsizechange", { width: n, height: i }), this.callEvent("viewchange"), this.m_mxDatabase.getSelectManager().setCanvasSize(n, i); }, d);
6184
6312
  function d() { var t = null !== a && a.apply(this, arguments) || this; return t._minDisplayPoint = null, t._maxDisplayPoint = null, t.is3DDraw = o.MxFun.is3DDwg(), t; }
6185
6313
  n.MxDrawObject2d = h;
6186
- }, { "./MxDrawObject": 35, "./MxFun": 39, "./MxMaterial": 46, "./MxNetData": 47, three: 19, "three-orbitcontrols": 17 }], 37: [function (t, e, n) {
6314
+ }, { "./MxDrawObject": 41, "./MxFun": 45, "./MxMaterial": 52, "./MxNetData": 53, three: 19, "three-orbitcontrols": 17 }], 43: [function (t, e, n) {
6187
6315
  "use strict";
6188
6316
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6189
6317
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
6190
6318
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
6191
6319
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxDrawObject3d = void 0;
6192
- var a, L = t("three"), o = t("./MxDrawObject"), s = t("three-orbitcontrols"), O = t("./MxNetData"), I = t("./MxMaterial"), P = t("./MxTools"), l = (a = o.MxDrawObject, r(c, a), c.prototype.mxWebAddEntity_Curve = function (t, e) { var n = new O.MxNetData(t), i = 0 == t.getInt32(32, !0), r = n.getIsSketchEntity(), a = 0; if (!((a = i ? t.getInt32(20, !0) / 4 / 3 : t.getInt32(20, !0) / 4 / 2) < 2)) {
6193
- for (var o = new L.Geometry, s = e, l = 0; l < a; l++) {
6320
+ var a, O = t("three"), o = t("./MxDrawObject"), s = t("three-orbitcontrols"), L = t("./MxNetData"), I = t("./MxMaterial"), P = t("./MxTools"), l = (a = o.MxDrawObject, r(c, a), c.prototype.mxWebAddEntity_Curve = function (t, e) { var n = new L.MxNetData(t), i = 0 == t.getInt32(32, !0), r = n.getIsSketchEntity(), a = 0; if (!((a = i ? t.getInt32(20, !0) / 4 / 3 : t.getInt32(20, !0) / 4 / 2) < 2)) {
6321
+ for (var o = new O.Geometry, s = e, l = 0; l < a; l++) {
6194
6322
  var c = t.getFloat32(s, !0);
6195
6323
  s += 4;
6196
6324
  var u = t.getFloat32(s, !0);
@@ -6198,14 +6326,14 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6198
6326
  var h = 0;
6199
6327
  i && (h = t.getFloat32(s, !0), s += 4), o.vertices.push(P.MxTools.AsThreeJsPoint(c, u, h));
6200
6328
  }
6201
- var d = t.getInt32(28, !0), p = I.MxMaterial.GetCurveColorMaterial(d), f = new L.LineSegments(o, p), m = t.getInt32(4, !0);
6329
+ var d = t.getInt32(28, !0), p = I.MxMaterial.GetCurveColorMaterial(d), f = new O.LineSegments(o, p), m = t.getInt32(4, !0);
6202
6330
  this.removeEntity(m), this.scene.add(f), r && this.addEntity(m, f);
6203
- } }, c.prototype.mxWebAddEntity_3DChild = function (t) { var e = new O.MxNetData(t), n = e.getId(), i = (e.getColorIndex(), 0 == e.getBufferType()), r = e.getIsSketchEntity(); this.removeEntity(n); var a = new L.Mesh(new L.Geometry), o = this.mxWebUpdateEntity_3DChild(a, t, i); return this.scene.add(a), r && this.addEntity(n, a), a.geometry.computeBoundingBox(), a.geometry.computeBoundingSphere(), o; }, c.prototype.mxWebUpdateEntity_3DChild = function (t, e, n) { var i = new O.MxNetData(e), r = i.getVertexBufferSize(), a = i.getIndexBufferSize(), o = i.getColorIndex(); if (0 === r || 0 === a)
6331
+ } }, c.prototype.mxWebAddEntity_3DChild = function (t) { var e = new L.MxNetData(t), n = e.getId(), i = (e.getColorIndex(), 0 == e.getBufferType()), r = e.getIsSketchEntity(); this.removeEntity(n); var a = new O.Mesh(new O.Geometry), o = this.mxWebUpdateEntity_3DChild(a, t, i); return this.scene.add(a), r && this.addEntity(n, a), a.geometry.computeBoundingBox(), a.geometry.computeBoundingSphere(), o; }, c.prototype.mxWebUpdateEntity_3DChild = function (t, e, n) { var i = new L.MxNetData(e), r = i.getVertexBufferSize(), a = i.getIndexBufferSize(), o = i.getColorIndex(); if (0 === r || 0 === a)
6204
6332
  return i.getDrawDataOffset(); var s = i.getMateria(), l = void 0, c = !0, u = !1, h = !1; 0 != s.length && (null != (l = JSON.parse(s)).computeFaceNonmal && (c = l.computeFaceNonmal), null != l.castShadow && (u = l.castShadow), null != l.receiveShadow && (h = l.receiveShadow)), t.material = I.MxMaterial.createMaterial(l), null == t.material && (t.material = I.MxMaterial.GetColorMaterial(o)), t.castShadow = u, t.receiveShadow = h; var d = i.getDrawDataOffset(), p = 0; p = n ? r / 4 / 8 : r / 4 / 2; var f = t.geometry; f.vertices = [], f.faces = []; for (var m = 0; m < p; m++) {
6205
6333
  var g = e.getFloat32(d + 0, !0), v = e.getFloat32(d + 4, !0), y = 0, x = 0, _ = 0, w = 0, b = 0, M = 0;
6206
6334
  n ? (y = e.getFloat32(d + 8, !0), x = e.getFloat32(d + 12, !0), _ = e.getFloat32(d + 16, !0), w = e.getFloat32(d + 20, !0), b = e.getFloat32(d + 24, !0), M = e.getFloat32(d + 28, !0), d += 32) : d += 8;
6207
6335
  var S = P.MxTools.AsThreeJsPoint(g, v, y);
6208
- f.vertices.push(S), f.vertices[m].normal = P.MxTools.AsThreeJsPoint(x, _, w), f.vertices[m].uv = new L.Vector2(b, M);
6336
+ f.vertices.push(S), f.vertices[m].normal = P.MxTools.AsThreeJsPoint(x, _, w), f.vertices[m].uv = new O.Vector2(b, M);
6209
6337
  } var C = a / 4; for (m = 0; m < C; m += 3) {
6210
6338
  var T = e.getInt32(d, !0);
6211
6339
  d += 4;
@@ -6213,21 +6341,21 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6213
6341
  d += 4;
6214
6342
  var A = e.getInt32(d, !0);
6215
6343
  d += 4;
6216
- var D = new L.Face3(T, E, A);
6344
+ var D = new O.Face3(T, E, A);
6217
6345
  c || D.vertexNormals.push(f.vertices[T].normal, f.vertices[E].normal, f.vertices[A].normal), f.faces.push(D), f.faceVertexUvs[0].push([f.vertices[T].uv, f.vertices[E].uv, f.vertices[A].uv]);
6218
- } return c && f.computeFaceNormals(), d; }, c.prototype.updateUVs = function (l) { l.faceVertexUvs[0] = [], l.faces.forEach(function (n) { var t = ["x", "y", "z"].sort(function (t, e) { return Math.abs(n.normal[t]) - Math.abs(n.normal[e]); }), e = l.vertices[n.a], i = l.vertices[n.b], r = l.vertices[n.c], a = new L.Vector2(e[t[0]], e[t[1]]), o = new L.Vector2(i[t[0]], i[t[1]]), s = new L.Vector2(r[t[0]], r[t[1]]); l.faceVertexUvs[0].push([a, o, s]); }), l.uvsNeedUpdate = !0; }, c.prototype.onInitThreejs = function () { var t = this.getViewWidth(), e = this.getViewHeight(), n = (t = this.xzSize(t)) / (e = this.xzSize(e)) * 50; this.camera = new L.OrthographicCamera(n / -2, n / 2, 25, -25, 1, 1e3), this.camera.position.set(-200, 200, 200), this.scene = new L.Scene, this.scene.background = new L.Color(this._viewcolor); var i = this.getUserCanvas(); null == i ? (this.renderer = new L.WebGLRenderer({ antialias: !0, alpha: !0 }), this.renderer.setPixelRatio(this._devicePixelRatio), this.renderer.setSize(t, e), document.body.appendChild(this.renderer.domElement)) : (this.renderer = new L.WebGLRenderer({ canvas: i, antialias: !0, alpha: !0 }), this.renderer.setPixelRatio(this._devicePixelRatio)); var r = this.getUserCanvas(); null == r && (r = this.renderer.domElement), this.controls = new s.OrbitControls(this.camera, r); }, c.prototype.onInitScene = function () { var t = this.getEvent(), e = 0; if (null != t.initScene && (e = t.initScene(this.scene, this.controls, !1)), 0 == e) {
6219
- var n = new L.AmbientLight(2236962);
6346
+ } return c && f.computeFaceNormals(), d; }, c.prototype.updateUVs = function (l) { l.faceVertexUvs[0] = [], l.faces.forEach(function (n) { var t = ["x", "y", "z"].sort(function (t, e) { return Math.abs(n.normal[t]) - Math.abs(n.normal[e]); }), e = l.vertices[n.a], i = l.vertices[n.b], r = l.vertices[n.c], a = new O.Vector2(e[t[0]], e[t[1]]), o = new O.Vector2(i[t[0]], i[t[1]]), s = new O.Vector2(r[t[0]], r[t[1]]); l.faceVertexUvs[0].push([a, o, s]); }), l.uvsNeedUpdate = !0; }, c.prototype.onInitThreejs = function () { var t = this.getViewWidth(), e = this.getViewHeight(), n = (t = this.xzSize(t)) / (e = this.xzSize(e)) * 50; this.camera = new O.OrthographicCamera(n / -2, n / 2, 25, -25, 1, 1e3), this.camera.position.set(-200, 200, 200), this.scene = new O.Scene, this.scene.background = new O.Color(this._viewcolor); var i = this.getUserCanvas(); null == i ? (this.renderer = new O.WebGLRenderer({ antialias: !0, alpha: !0 }), this.renderer.setPixelRatio(this._devicePixelRatio), this.renderer.setSize(t, e), document.body.appendChild(this.renderer.domElement)) : (this.renderer = new O.WebGLRenderer({ canvas: i, antialias: !0, alpha: !0 }), this.renderer.setPixelRatio(this._devicePixelRatio)); var r = this.getUserCanvas(); null == r && (r = this.renderer.domElement), this.controls = new s.OrbitControls(this.camera, r); }, c.prototype.onInitScene = function () { var t = this.getEvent(), e = 0; if (null != t.initScene && (e = t.initScene(this.scene, this.controls, !1)), 0 == e) {
6347
+ var n = new O.AmbientLight(2236962);
6220
6348
  n.integrity = 1, this.scene.add(n);
6221
- var i = new L.DirectionalLight(16777215, 1);
6349
+ var i = new O.DirectionalLight(16777215, 1);
6222
6350
  i.position.set(-2, 2, 3).normalize(), this.scene.add(i);
6223
- var r = new L.GridHelper(2e3, 100);
6351
+ var r = new O.GridHelper(2e3, 100);
6224
6352
  r.position.y = -199, r.material.opacity = .25, r.material.transparent = !0, this.scene.add(r);
6225
- var a = new L.AxesHelper(20);
6353
+ var a = new O.AxesHelper(20);
6226
6354
  this.scene.add(a);
6227
- } }, c.prototype.onCreate = function () { this._is2d = !1; var t = this.getEvent(); null != t.initRenderer && t.initRenderer(this.renderer), this.onInitScene(); }, c.prototype.getOrthographicCamera = function () { return this.camera instanceof L.OrthographicCamera ? this.camera : null; }, c.prototype.onResizeImp = function (t, e) { var n = this.getViewWidth(); null != t && (n = t); var i = this.getViewHeight(); null != e && (i = e), n = this.xzSize(n), i = this.xzSize(i); var r = this.getOrthographicCamera(), a = n / i; r.left = 50 * a / -2, r.right = 50 * a / 2, r.top = 25, r.bottom = -25, r.updateProjectionMatrix(), this.renderer.setSize(n, i); }, c.prototype.updateCameraDisplayRange = function (t, e, n) { }, c.prototype.zoomInitialStates = function () { }, c.prototype.zoomScale = function (t) { }, c.prototype.zoomW = function (t, e, n) { }, c.prototype.zoomCenter = function (t, e) { }, c.prototype.getFullDisplayRange = function () { return {}; }, c);
6355
+ } }, c.prototype.onCreate = function () { this._is2d = !1; var t = this.getEvent(); null != t.initRenderer && t.initRenderer(this.renderer), this.onInitScene(); }, c.prototype.getOrthographicCamera = function () { return this.camera instanceof O.OrthographicCamera ? this.camera : null; }, c.prototype.onResizeImp = function (t, e) { var n = this.getViewWidth(); null != t && (n = t); var i = this.getViewHeight(); null != e && (i = e), n = this.xzSize(n), i = this.xzSize(i); var r = this.getOrthographicCamera(), a = n / i; r.left = 50 * a / -2, r.right = 50 * a / 2, r.top = 25, r.bottom = -25, r.updateProjectionMatrix(), this.renderer.setSize(n, i); }, c.prototype.updateCameraDisplayRange = function (t, e, n) { }, c.prototype.zoomInitialStates = function () { }, c.prototype.zoomScale = function (t) { }, c.prototype.zoomW = function (t, e, n) { }, c.prototype.zoomCenter = function (t, e) { }, c.prototype.getFullDisplayRange = function () { return {}; }, c);
6228
6356
  function c() { var t = a.call(this) || this; return t._viewcolor = 15790320, t; }
6229
6357
  n.MxDrawObject3d = l;
6230
- }, { "./MxDrawObject": 35, "./MxMaterial": 46, "./MxNetData": 47, "./MxTools": 53, three: 19, "three-orbitcontrols": 17 }], 38: [function (t, e, n) {
6358
+ }, { "./MxDrawObject": 41, "./MxMaterial": 52, "./MxNetData": 53, "./MxTools": 59, three: 19, "three-orbitcontrols": 17 }], 44: [function (t, e, n) {
6231
6359
  "use strict";
6232
6360
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6233
6361
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6312,17 +6440,17 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6312
6440
  } }, f);
6313
6441
  function f(t) { this.threejsObjects = null, this.mxObj = null, this.mxObj = t; }
6314
6442
  n.MxDrawObjectOsnap = p;
6315
- }, { "./MxDrawData": 34, "./MxJigCmdManager": 42, "./MxThreeJS": 52, three: 19 }], 39: [function (t, e, n) {
6443
+ }, { "./MxDrawData": 40, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 45: [function (t, e, n) {
6316
6444
  "use strict";
6317
6445
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxFun = void 0;
6318
- var l, i, r, a, o, s, c, u, h, d, p, f, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), _ = t("./MxDrawObject3d"), w = t("./MxUiObjectMobile"), b = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), L = t("./MxDrawCommands"), O = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig");
6446
+ var l, i, r, a, o, s, c, u, h, d, p, f, m, g, v = t("three"), y = t("./MxManager"), x = t("./MxDrawObject2d"), _ = t("./MxDrawObject3d"), w = t("./MxUiObjectMobile"), b = t("./MxUiObjectPC"), M = t("./MxJigCmdManager"), S = t("./MxJigGetLine"), C = t("./MxCmdRunManager"), T = t("./MxUiVue"), E = t("./MxThreeJS"), A = t("./MxWindowsEvent"), D = t("./MxTools"), O = t("./MxDrawCommands"), L = t("./MxDrawData"), I = t("./MxCADEditDisplay"), P = t("./MxLocalFileLoad"), R = t("./TempTest/MxTestJig");
6319
6447
  function k(t) { t.cmd && z(t.cmd); }
6320
6448
  function N(t) { var e = new RegExp("(^|&)" + t + "=([^&]*)(&|$)"), n = window.location.search.substr(1).match(e); return null != n ? decodeURIComponent(n[2]) : ""; }
6321
6449
  function B() { return y.MxManager.currentMx(); }
6322
6450
  function F() { return y.MxManager.currentMx(); }
6323
6451
  function z(t, e) { var n = F(); if (n)
6324
6452
  return C.MxCmdRunManager.runCmd(n, t, e); }
6325
- function V(t) { null != t && (t.init(), T.MxUiVue.init(t)), p || (p = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), L.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = k); }
6453
+ function j(t) { null != t && (t.init(), T.MxUiVue.init(t)), p || (p = !0, g = new P.MxLocalNodeJs, M.MxJigCmdManager.init(), A.MxWindowsEvent.registEvent(), y.MxManager.init(), O.MxDrawCommands.registerCommand(), window.mxConfig_isLoadTest && R.MxTest.registerCommand(), m.sendStringToExecute = k); }
6326
6454
  l = n.MxFun || (n.MxFun = {}), i = ".", c = o = a = -1, d = null, p = !(h = "ws://localhost:5090"), m = {}, g = f = u = s = r = void 0, l.getUiObj = function () { return d; }, l.getNodeJs = function () { return g; }, l.setMxServer = function (t) { h = t; }, l.getMxServer = function () { return h; }, l.isPC = function () { return !/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); }, l.getClientPlatform = function () { return navigator.platform; }, l.getClientInfo = function () { return { width: document.body.clientWidth, height: document.body.clientHeight }; }, l.curPath = function () { return i; }, l.setCurPath = function (t) { i = t; }, l.getQueryString = N, l.getLocationPageUrl = function () { var t = window.location.href, e = t.lastIndexOf("?"); return -1 == e ? t : t.substring(0, e); }, l.getUrlParams = function () { var t = window.location.search, e = t.substr(1, t.length).split("&"), n = new Array; if (null != e)
6327
6455
  for (var i = 0; i < e.length; i++) {
6328
6456
  var r = e[i].replace(/[=|^==]/, "&").split("&");
@@ -6340,38 +6468,43 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6340
6468
  } return r; }, l.set2dParam = function (t) { r = t; }, l.showLayer = function (t, e, n) { var i = y.MxManager.currentMx().getMxCAD(); if (!i)
6341
6469
  return y.MxManager.currentMx().showLayer(t, e, n); "number" == typeof t && I.MxCADDisplayFun.showLayer(i.getDatabase(), t, e); }, l.upDisplayForLayerData = function (t) { var e = y.MxManager.currentMx().getMxCAD(); return !!e && e.getDatabase().getLayerTable().upDisplayForLayerData(e.getDatabase(), t); }, l.screenCoord2World = function (t, e, n) { return y.MxManager.currentMx().screenCoord2World(t, e, n); }, l.worldCoord2Screen = function (t, e, n) { return y.MxManager.currentMx().worldCoord2Screen(t, e, n); }, l.docCoord2World = function (t, e, n) { return y.MxManager.currentMx().docCoord2World(t, e, n); }, l.worldCoord2Doc = function (t, e, n) { return y.MxManager.currentMx().worldCoord2Doc(t, e, n); }, l.screenCoord2Doc = function (t, e, n) { return y.MxManager.currentMx().screenCoord2Doc(t, e, n); }, l.docCoord2Screen = function (t, e, n) { return y.MxManager.currentMx().docCoord2Screen(t, e, n); }, l.zoomCenter = function (t, e) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomCenter(t, e), y.MxManager.currentMx().updateDisplay()); }, l.zoomW = function (t, e, n, i, r) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomW(new v.Vector3(t, e, 0), new v.Vector3(n, i, 0), r), y.MxManager.currentMx().updateDisplay()); }, l.zoomScale = function (t) { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomScale(t), y.MxManager.currentMx().updateDisplay()); }, l.zoomAll = function () { y.MxManager.currentMx().is2D() && (y.MxManager.currentMx().zoomAll(), y.MxManager.currentMx().updateDisplay()); }, l.deleteAll = function () { return y.MxManager.currentMx().deleteAll(); }, l.callCommand = function (t, e, n) { y.MxManager.currentMx().callCommand(t, e, n); }, l.getCurrentColor = function () { return y.MxManager.currentMx().getCurrentColor(); }, l.setCurrentColor = function (t) { y.MxManager.currentMx().setCurrentColor(t); }, l.undo = function () { y.MxManager.currentMx().undo(); }, l.save = function () { y.MxManager.currentMx().save(); }, l.showLoading = function () { null != d && d.ShowLoading(); }, l.hideLoading = function () { null != d && d.HideLoading(); }, l.showProp = function (t) { null != d && d.ShowObjectProperty(t); }, l.hideProp = function () { null != d && d.HideObjectProp(); }, l.getUiObject = function () { return d; }, l.getViewCenterDocCoord = function () { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().getViewCenterDocCoord() : new v.Vector3(0, 0, 0); }, l.screenCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2Doc(t) : t; }, l.docCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2Screen(t) : t; }, l.worldCoordLong2Doc = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Doc(t) : t; }, l.docCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().docCoordLong2World(t) : t; }, l.screenCoordLong2World = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().screenCoordLong2World(t) : t; }, l.worldCoordLong2Screen = function (t) { return y.MxManager.currentMx().is2D() ? y.MxManager.currentMx().worldCoordLong2Screen(t) : t; }, l.addSelectEvent = function (t) { y.MxManager.addSelectEvent(t); }, l.clearSelectEvent = function () { y.MxManager.clearSelectEvent(); }, l.removeThreejsObject = function (t, e) { t && (t.traverse(function (t) { (t instanceof v.Mesh || t instanceof v.Line || t instanceof v.LineLoop) && t.geometry.dispose(); }), e.remove(t)); }, l.setOutServerDebugCall = function (t) { y.MxManager.setOutDebugCall(t); }, l.updateDisplay = function () { y.MxManager.updateDisplay(); }, l.getCurrentDraw = F, l.formatString = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6342
6470
  e[n - 1] = arguments[n]; for (var i = 0; i < e.length; i++)
6343
- t = t.replace("{".concat(i, "}"), e[i]); return t; }, l.createMxUiObject = function (t) { var e; return e = this.isPC() ? new b.MxUiObjectPC : new w.MxUiObjectMobile, t(d = e), e.create(), e; }, l.createMxObject = function (t, e, n, i, r) { p || V(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = l.getQueryString("file")); var a = null != i && i; if (null != e) {
6471
+ t = t.replace("{".concat(i, "}"), e[i]); return t; }, l.createMxUiObject = function (t) { var e; return e = this.isPC() ? new b.MxUiObjectPC : new w.MxUiObjectMobile, t(d = e), e.create(), e; }, l.createMxObject = function (t, e, n, i, r) { p || j(), "string" == typeof t && (t = 0 == t.length ? void 0 : document.getElementById(t)), null == e && (e = l.getQueryString("file")); var a = null != i && i; if (null != e) {
6344
6472
  0 == e.length && (e = "empty");
6345
6473
  var o = e.substring(e.lastIndexOf(".") + 1);
6346
6474
  "dwg" != o.toLowerCase() && "dxf" != o.toLowerCase() && "dwf" != o.toLowerCase() && "mwg" != o.toLowerCase() || (a = !0);
6347
6475
  }
6348
6476
  else
6349
- e = "empty"; 1 == r && (e = ""); var s = null; return a ? (s = new x.MxDrawObject2d).setViewColor(0) : (s = new _.MxDrawObject3d).setViewColor(15790320), null != n && n(s), s.create(t, e), s; }, l.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, l.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, l.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, l.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, l.getTHREE = function () { return v; }, l.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, l.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, l.sendStringToExecute = z, l.init = V, l.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, l.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, l.getMxThreeJS = function () { return E.MxThreeJS; }, l.getMxTools = function () { return D.MxTools; }, l.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, l.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, l.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, l.Assert = function (t) { t || console.log("MxAssert error"); }, l.setIniset = function (t) { O.MxDrawData.setIniset(t); }, l.setPostMessageToParentFrameFunction = function (t) { f = t; }, l.postMessageToParentFrame = function (t) { return null != f && (f(t), !0); }, l.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, l.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6477
+ e = "empty"; 1 == r && (e = ""); var s = null; return a ? (s = new x.MxDrawObject2d).setViewColor(0) : (s = new _.MxDrawObject3d).setViewColor(15790320), null != n && n(s), s.create(t, e), s; }, l.getMxObjectFormElement = function (t) { return y.MxManager.getMxObject(t); }, l.isRunningCommand = function () { return M.MxJigCmdManager.isRunning(); }, l.stopRunCommand = function () { return M.MxJigCmdManager.stopCmd(); }, l.runCommand = function (t) { return M.MxJigCmdManager.runCmd(t); }, l.getTHREE = function () { return v; }, l.getLine = function (t) { var e = new S.MxJigGetLine; e.setRetCall(t), M.MxJigCmdManager.runCmd(e); }, l.addCommand = function (t, e, n) { C.MxCmdRunManager.addCommand(t, e, n); }, l.sendStringToExecute = z, l.initUiDataObject = function (t) { t.init(l), T.MxUiVue.init(t); }, l.init = j, l.addWindowsEvent = function (t) { A.MxWindowsEvent.addEvent(t); }, l.getCurrentMousePostion = function () { return A.MxWindowsEvent.getCurrentMousePostion(); }, l.getMxThreeJS = function () { return E.MxThreeJS; }, l.getMxTools = function () { return D.MxTools; }, l.getMxCmdRunManager = function () { return C.MxCmdRunManager; }, l.getMxJigCmdManager = function () { return M.MxJigCmdManager; }, l.initQuickCommand = function (t) { C.MxCmdRunManager.InitQuickCommand(t); }, l.Assert = function (t) { t || console.log("MxAssert error"); }, l.setIniset = function (t) { L.MxDrawData.setIniset(t); }, l.setPostMessageToParentFrameFunction = function (t) { f = t; }, l.postMessageToParentFrame = function (t) { return null != f && (f(t), !0); }, l.onParentFrameMessage = function (t) { null != t && null != t.type && m[t.type] && m[t.type](t); }, l.acutPrintf = function (t) { for (var e = [], n = 1; n < arguments.length; n++)
6350
6478
  e[n - 1] = arguments[n]; if (!T.MxUiVue.isNull()) {
6351
6479
  for (var i = arguments, r = i[0], a = 0; a < i.length - 1; a++) {
6352
6480
  var o = new RegExp("\\{" + a + "\\}", "gm");
6353
6481
  r = r.replace(o, i[a + 1]);
6354
6482
  }
6355
6483
  T.MxUiVue.AcutPrintfNoFormat(r, !0);
6356
- } };
6357
- }, { "./MxCADEditDisplay": 25, "./MxCmdRunManager": 32, "./MxDrawCommands": 33, "./MxDrawData": 34, "./MxDrawObject2d": 36, "./MxDrawObject3d": 37, "./MxJigCmdManager": 42, "./MxJigGetLine": 43, "./MxLocalFileLoad": 44, "./MxManager": 45, "./MxThreeJS": 52, "./MxTools": 53, "./MxUiObjectMobile": 56, "./MxUiObjectPC": 57, "./MxUiVue": 58, "./MxWindowsEvent": 59, "./TempTest/MxTestJig": 61, three: 19 }], 40: [function (t, e, n) {
6484
+ } }, l.loadImage = function (t, e) { y.MxManager.getMxDbTextureManager().loadImage(t, e); };
6485
+ }, { "./MxCADEditDisplay": 26, "./MxCmdRunManager": 33, "./MxDrawCommands": 39, "./MxDrawData": 40, "./MxDrawObject2d": 42, "./MxDrawObject3d": 43, "./MxJigCmdManager": 48, "./MxJigGetLine": 49, "./MxLocalFileLoad": 50, "./MxManager": 51, "./MxThreeJS": 58, "./MxTools": 59, "./MxUiObjectMobile": 62, "./MxUiObjectPC": 63, "./MxUiVue": 64, "./MxWindowsEvent": 65, "./TempTest/MxTestJig": 67, three: 19 }], 46: [function (t, e, n) {
6358
6486
  "use strict";
6359
6487
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6360
6488
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
6361
6489
  throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
6362
6490
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxIntelliSelectJig = void 0;
6363
6491
  var a, l = t("three"), o = t("./MxJig"), s = t("./MxJigCmdManager"), c = t("./MxThreeJS"), u = (a = o.McEdJigCommand, r(h, a), h.prototype.sampler = function () { var t = s.MxJigCmdManager.InType.kGetBegan, e = this.acquirePoint(t); return e.status == s.MxJigCmdManager.DragStatus.kNormal && (this.m_pt2 = e.pt), e.status; }, h.prototype.getTypeName = function () { return "MxIntelliSelect"; }, h.prototype.done = function (t) { if (t == s.MxJigCmdManager.DragStatus.kNormal) {
6364
- var e = { x1: this.m_pt1.x, y1: this.m_pt1.y, x2: this.m_pt2.x, y2: this.m_pt2.y }, n = this.getMxObject();
6365
- n.callCommand("MxCAD_IntelliSelect", JSON.stringify(e), function (t) { n.getMxCAD().getGrip().onIntelliSelect(t); });
6492
+ var e = this.getMxObject();
6493
+ if (this.m_isFrontEndWebpage)
6494
+ e.getMxDatabase().getGripManager().doWindowsSelect(this.m_pt1, this.m_pt2);
6495
+ else {
6496
+ var n = { x1: this.m_pt1.x, y1: this.m_pt1.y, x2: this.m_pt2.x, y2: this.m_pt2.y };
6497
+ e.callCommand("MxCAD_IntelliSelect", JSON.stringify(n), function (t) { e.getMxCAD().getGrip().onIntelliSelect(t); });
6498
+ }
6366
6499
  } return s.MxJigCmdManager.DoneStatius.kExitCommand; }, h.prototype.doPointSelect = function (t, e, n) { var i = t.screenCoordLong2World(16), r = { x: e.x, y: e.y, tol: i }; t.callCommand("MxCAD_IntelliSelect_Point", JSON.stringify(r), function (t) { n(t); }); }, h.prototype.upDisplay = function () { var t = new l.Vector3(this.m_pt1.x, this.m_pt2.y, this.m_pt2.z), e = new l.Vector3(this.m_pt2.x, this.m_pt1.y, this.m_pt2.z), n = []; n.push(this.m_pt1), n.push(t), n.push(this.m_pt2), n.push(e), n.push(this.m_pt1); var i = null, r = 65280; if (this.m_pt2.x > this.m_pt1.x)
6367
6500
  i = c.MxThreeJS.createLines(n, 16777215), r = 255;
6368
6501
  else {
6369
6502
  var a = this.getMxObject().screenCoordLong2World(3);
6370
6503
  i = c.MxThreeJS.createDashedLines(n, 16777215, 2 * a, a);
6371
6504
  } var o = []; o.push(this.m_pt1), o.push(t), o.push(this.m_pt2), o.push(this.m_pt1), o.push(this.m_pt2), o.push(e); var s = c.MxThreeJS.createTriangle(o, r, .27); this.drawEntity(s, 30), this.drawEntity(i, 31); }, h);
6372
- function h(t) { var e = a.call(this) || this; return e.m_pt1 = t, e.m_pt2 = t, e; }
6505
+ function h(t, e) { var n = a.call(this) || this; return n.m_pt1 = t, n.m_pt2 = t, n.m_isFrontEndWebpage = e, n; }
6373
6506
  n.MxIntelliSelectJig = u;
6374
- }, { "./MxJig": 41, "./MxJigCmdManager": 42, "./MxThreeJS": 52, three: 19 }], 41: [function (t, e, n) {
6507
+ }, { "./MxJig": 47, "./MxJigCmdManager": 48, "./MxThreeJS": 58, three: 19 }], 47: [function (t, e, n) {
6375
6508
  "use strict";
6376
6509
  Object.defineProperty(n, "__esModule", { value: !0 }), n.McEdJigCommand = n.MxDynamicInput = void 0;
6377
6510
  var f = t("three"), m = t("./MxFun"), a = t("./MxJigCmdManager"), o = t("./MxTools"), s = t("./MxUiVue"), i = t("./McEdJigOsnap"), r = t("./MxWindowsEvent"), l = (c.prototype.onKeyDonw = function (t) { if (27 == t)
@@ -6417,16 +6550,16 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6417
6550
  } this._mxObject.updateDisplay(); }, h.prototype.getCurrentMouseButton = function () { return a.MxJigCmdManager.getCurrentMouseButton(); }, h.prototype.userInputControls = function () { return this._userInputContros; }, h.prototype.setUserInputControls = function (t) { this._userInputContros = t; }, h);
6418
6551
  function h() { this._isExit = !1, this._aryDynDrawObjectNamesId = void 0, this._DynNameId = 1, this._iColor = 16777215, this._isCancle = !1, this.m_isDisableDynInput = !1, this.m_isDisableOsnap = !1, this.m_dynInput = new l(this), this.m_osnap = new i.McEdJigOsnap(this), this._userInputContros = a.MxJigCmdManager.UserInputControls.kNullResponseAccepted, this.m_isOffsetInputPostion = !1, this.m_isReserveDrawStatus = !1, this.m_callReserveDrawAddEntity = null, this._mxObject = null; }
6419
6552
  n.McEdJigCommand = u;
6420
- }, { "./McEdJigOsnap": 20, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxTools": 53, "./MxUiVue": 58, "./MxWindowsEvent": 59, three: 19 }], 42: [function (t, e, n) {
6553
+ }, { "./McEdJigOsnap": 20, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 48: [function (t, e, n) {
6421
6554
  "use strict";
6422
6555
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxJigCmdManager = n.AcquireReturn = void 0;
6423
6556
  var i, X = t("three"), Y = t("./MxFun"), Z = t("./MxJig"), $ = t("./MxManager"), K = t("./MrxDbgUiPrPoint"), Q = t("./MrxDbgUiPrBase"), tt = t("./MxUiVue"), et = t("./MxTools"), nt = t("./MxString"), it = t("./MxWindowsEvent"), rt = t("./MxDrawObject"), at = t("./McEdJigOsnap"), ot = t("./MxDrawData"), st = function () { this.status = i.DragStatus.kNoChange, this.exit = !0, this.sKeyValue = ""; };
6424
- n.AcquireReturn = st, function (r) { var s, t, a, e, l, n, i, o, c, u, h, d, p, f, m, g, v, y; (t = s = r.UserInputControls || (r.UserInputControls = {}))[t.kGovernedByOrthoMode = 1] = "kGovernedByOrthoMode", t[t.kNullResponseAccepted = 2] = "kNullResponseAccepted", t[t.kDontEchoCancelForCtrlC = 4] = "kDontEchoCancelForCtrlC", t[t.kDontUpdateLastPoint = 8] = "kDontUpdateLastPoint", t[t.kNoDwgLimitsChecking = 16] = "kNoDwgLimitsChecking", t[t.kNoZeroResponseAccepted = 32] = "kNoZeroResponseAccepted", t[t.kNoNegativeResponseAccepted = 64] = "kNoNegativeResponseAccepted", t[t.kAccept3dCoordinates = 128] = "kAccept3dCoordinates", t[t.kAcceptMouseUpAsPoint = 256] = "kAcceptMouseUpAsPoint", t[t.kAnyBlankTerminatesInput = 512] = "kAnyBlankTerminatesInput", t[t.kInitialBlankTerminatesInput = 1024] = "kInitialBlankTerminatesInput", t[t.kAcceptOtherInputString = 2048] = "kAcceptOtherInputString", t[t.kGovernedByUCSDetect = 4096] = "kGovernedByUCSDetect", t[t.kNoZDirectionOrtho = 8192] = "kNoZDirectionOrtho", t[t.kSpacesInAccepted = 16384] = "kSpacesInAccepted", (e = a = r.AcquireStatus || (r.AcquireStatus = {}))[e.kNoChange = 0] = "kNoChange", e[e.kMove = 1] = "kMove", e[e.kBegan = 2] = "kBegan", e[e.kEnd = 3] = "kEnd", e[e.kMouseUp = 4] = "kMouseUp", e[e.kMouseDown = 5] = "kMouseDown", e[e.kCancle = 6] = "kCancle", (n = l = r.DragStatus || (r.DragStatus = {}))[n.kNoChange = -6] = "kNoChange", n[n.kCancel = -4] = "kCancel", n[n.kOther = -3] = "kOther", n[n.kNull = -1] = "kNull", n[n.kNormal = 0] = "kNormal", n[n.kKW1 = 1] = "kKW1", (i = r.DoneStatius || (r.DoneStatius = {}))[i.kContinueCommand = 0] = "kContinueCommand", i[i.kExitCommand = 1] = "kExitCommand", (c = o = r.InType || (r.InType = {}))[c.kGetBegan = 1] = "kGetBegan", c[c.kGetEnd = 2] = "kGetEnd", (h = u = r.MouseButton || (r.MouseButton = {}))[h.kInvalid = -1] = "kInvalid", h[h.kLeft = 0] = "kLeft", h[h.kMid = 1] = "kMid", h[h.kRight = 2] = "kRight", (p = d = r.COMMAND_IN || (r.COMMAND_IN = {}))[p.COMMAND_IN_NO_ENTITY = 0] = "COMMAND_IN_NO_ENTITY", p[p.COMMAND_IN_EMTPY = 1] = "COMMAND_IN_EMTPY", p[p.COMMAND_IN_KEY = 2] = "COMMAND_IN_KEY", p[p.COMMAND_IN_STRING = 3] = "COMMAND_IN_STRING", p[p.COMMAND_IN_COORD = 5] = "COMMAND_IN_COORD", p[p.COMMAND_IN_DIST = 6] = "COMMAND_IN_DIST", p[p.COMMAND_IN_INVALID = 7] = "COMMAND_IN_INVALID", p[p.COMMAND_IN_INVALID_ZERO = 8] = "COMMAND_IN_INVALID_ZERO", p[p.COMMAND_IN_INVALID_NEG = 9] = "COMMAND_IN_INVALID_NEG", p[p.COMMAND_IN_INT = 10] = "COMMAND_IN_INT", (m = f = r.COMMAND_GET || (r.COMMAND_GET = {}))[m.COMMAND_GET_STRING = 1] = "COMMAND_GET_STRING", m[m.COMMAND_GET_KEY = 2] = "COMMAND_GET_KEY", m[m.COMMAND_GET_DIST = 4] = "COMMAND_GET_DIST", m[m.COMMAND_GET_COORD = 8] = "COMMAND_GET_COORD", m[m.COMMAND_GET_INT = 16] = "COMMAND_GET_INT", (g = r.DynamicInputType || (r.DynamicInputType = {}))[g.kNoInput = 0] = "kNoInput", g[g.kXYCoordInput = 1] = "kXYCoordInput", g[g.kDistanceInput = 2] = "kDistanceInput", g[g.kDynTip = 3] = "kDynTip", g[g.kAutoInput = 4] = "kAutoInput", g[g.kAngleInput = 5] = "kAngleInput", (v = r.GETPOINTSTATUS || (r.GETPOINTSTATUS = {}))[v.OsModeSValidLastPoint = 1] = "OsModeSValidLastPoint", v[v.OsModeSTempDisable = 2] = "OsModeSTempDisable", v[v.OsModeOrthoTempDisable = 4] = "OsModeOrthoTempDisable", v[v.OsModeSInvalidLastMovePoint = 8] = "OsModeSInvalidLastMovePoint", v[v.OsModePoloarTempDisable = 16] = "OsModePoloarTempDisable", v[v.OsModeDynTraceTempDisable = 32] = "OsModeDynTraceTempDisable", v[v.OsModeGridSnapTempDisable = 64] = "OsModeGridSnapTempDisable", (y = r.OsnapMode || (r.OsnapMode = {}))[y.kOsModekValid = 0] = "kOsModekValid", y[y.kOsModeEnd = 1] = "kOsModeEnd", y[y.kOsModeMid = 2] = "kOsModeMid", y[y.kOsModeCen = 3] = "kOsModeCen", y[y.kOsModeNode = 4] = "kOsModeNode", y[y.kOsModeQuad = 5] = "kOsModeQuad", y[y.kOsModeIns = 7] = "kOsModeIns", y[y.kOsModePerp = 8] = "kOsModePerp", y[y.kOsModeTan = 9] = "kOsModeTan", y[y.kOsModeNear = 10] = "kOsModeNear", y[y.kOsModeInt = 11] = "kOsModeInt"; var x, _ = void 0, w = void 0, b = !1, M = a.kNoChange, S = u.kInvalid, C = new X.Vector2(0, 0), T = !1, E = void 0, A = !1, D = new Map, L = new Array, O = new nt.MxString, I = !0; function P() { null != _ && _.notifySampler(); } function R(t) { var e = t.srcElement; if (e && "CANVAS" == e.tagName) {
6557
+ n.AcquireReturn = st, function (r) { var s, t, a, e, l, n, i, o, c, u, h, d, p, f, m, g, v, y; (t = s = r.UserInputControls || (r.UserInputControls = {}))[t.kGovernedByOrthoMode = 1] = "kGovernedByOrthoMode", t[t.kNullResponseAccepted = 2] = "kNullResponseAccepted", t[t.kDontEchoCancelForCtrlC = 4] = "kDontEchoCancelForCtrlC", t[t.kDontUpdateLastPoint = 8] = "kDontUpdateLastPoint", t[t.kNoDwgLimitsChecking = 16] = "kNoDwgLimitsChecking", t[t.kNoZeroResponseAccepted = 32] = "kNoZeroResponseAccepted", t[t.kNoNegativeResponseAccepted = 64] = "kNoNegativeResponseAccepted", t[t.kAccept3dCoordinates = 128] = "kAccept3dCoordinates", t[t.kAcceptMouseUpAsPoint = 256] = "kAcceptMouseUpAsPoint", t[t.kAnyBlankTerminatesInput = 512] = "kAnyBlankTerminatesInput", t[t.kInitialBlankTerminatesInput = 1024] = "kInitialBlankTerminatesInput", t[t.kAcceptOtherInputString = 2048] = "kAcceptOtherInputString", t[t.kGovernedByUCSDetect = 4096] = "kGovernedByUCSDetect", t[t.kNoZDirectionOrtho = 8192] = "kNoZDirectionOrtho", t[t.kSpacesInAccepted = 16384] = "kSpacesInAccepted", (e = a = r.AcquireStatus || (r.AcquireStatus = {}))[e.kNoChange = 0] = "kNoChange", e[e.kMove = 1] = "kMove", e[e.kBegan = 2] = "kBegan", e[e.kEnd = 3] = "kEnd", e[e.kMouseUp = 4] = "kMouseUp", e[e.kMouseDown = 5] = "kMouseDown", e[e.kCancle = 6] = "kCancle", (n = l = r.DragStatus || (r.DragStatus = {}))[n.kNoChange = -6] = "kNoChange", n[n.kCancel = -4] = "kCancel", n[n.kOther = -3] = "kOther", n[n.kNull = -1] = "kNull", n[n.kNormal = 0] = "kNormal", n[n.kKW1 = 1] = "kKW1", (i = r.DoneStatius || (r.DoneStatius = {}))[i.kContinueCommand = 0] = "kContinueCommand", i[i.kExitCommand = 1] = "kExitCommand", (c = o = r.InType || (r.InType = {}))[c.kGetBegan = 1] = "kGetBegan", c[c.kGetEnd = 2] = "kGetEnd", (h = u = r.MouseButton || (r.MouseButton = {}))[h.kInvalid = -1] = "kInvalid", h[h.kLeft = 0] = "kLeft", h[h.kMid = 1] = "kMid", h[h.kRight = 2] = "kRight", (p = d = r.COMMAND_IN || (r.COMMAND_IN = {}))[p.COMMAND_IN_NO_ENTITY = 0] = "COMMAND_IN_NO_ENTITY", p[p.COMMAND_IN_EMTPY = 1] = "COMMAND_IN_EMTPY", p[p.COMMAND_IN_KEY = 2] = "COMMAND_IN_KEY", p[p.COMMAND_IN_STRING = 3] = "COMMAND_IN_STRING", p[p.COMMAND_IN_COORD = 5] = "COMMAND_IN_COORD", p[p.COMMAND_IN_DIST = 6] = "COMMAND_IN_DIST", p[p.COMMAND_IN_INVALID = 7] = "COMMAND_IN_INVALID", p[p.COMMAND_IN_INVALID_ZERO = 8] = "COMMAND_IN_INVALID_ZERO", p[p.COMMAND_IN_INVALID_NEG = 9] = "COMMAND_IN_INVALID_NEG", p[p.COMMAND_IN_INT = 10] = "COMMAND_IN_INT", (m = f = r.COMMAND_GET || (r.COMMAND_GET = {}))[m.COMMAND_GET_STRING = 1] = "COMMAND_GET_STRING", m[m.COMMAND_GET_KEY = 2] = "COMMAND_GET_KEY", m[m.COMMAND_GET_DIST = 4] = "COMMAND_GET_DIST", m[m.COMMAND_GET_COORD = 8] = "COMMAND_GET_COORD", m[m.COMMAND_GET_INT = 16] = "COMMAND_GET_INT", (g = r.DynamicInputType || (r.DynamicInputType = {}))[g.kNoInput = 0] = "kNoInput", g[g.kXYCoordInput = 1] = "kXYCoordInput", g[g.kDistanceInput = 2] = "kDistanceInput", g[g.kDynTip = 3] = "kDynTip", g[g.kAutoInput = 4] = "kAutoInput", g[g.kAngleInput = 5] = "kAngleInput", (v = r.GETPOINTSTATUS || (r.GETPOINTSTATUS = {}))[v.OsModeSValidLastPoint = 1] = "OsModeSValidLastPoint", v[v.OsModeSTempDisable = 2] = "OsModeSTempDisable", v[v.OsModeOrthoTempDisable = 4] = "OsModeOrthoTempDisable", v[v.OsModeSInvalidLastMovePoint = 8] = "OsModeSInvalidLastMovePoint", v[v.OsModePoloarTempDisable = 16] = "OsModePoloarTempDisable", v[v.OsModeDynTraceTempDisable = 32] = "OsModeDynTraceTempDisable", v[v.OsModeGridSnapTempDisable = 64] = "OsModeGridSnapTempDisable", (y = r.OsnapMode || (r.OsnapMode = {}))[y.kOsModekValid = 0] = "kOsModekValid", y[y.kOsModeEnd = 1] = "kOsModeEnd", y[y.kOsModeMid = 2] = "kOsModeMid", y[y.kOsModeCen = 3] = "kOsModeCen", y[y.kOsModeNode = 4] = "kOsModeNode", y[y.kOsModeQuad = 5] = "kOsModeQuad", y[y.kOsModeIns = 7] = "kOsModeIns", y[y.kOsModePerp = 8] = "kOsModePerp", y[y.kOsModeTan = 9] = "kOsModeTan", y[y.kOsModeNear = 10] = "kOsModeNear", y[y.kOsModeInt = 11] = "kOsModeInt"; var x, _ = void 0, w = void 0, b = !1, M = a.kNoChange, S = u.kInvalid, C = new X.Vector2(0, 0), T = !1, E = void 0, A = !1, D = new Map, O = new Array, L = new nt.MxString, I = !0; function P() { null != _ && _.notifySampler(); } function R(t) { var e = t.srcElement; if (e && "CANVAS" == e.tagName) {
6425
6558
  if (null == _)
6426
6559
  return;
6427
6560
  if (_.getDynImput().isInputStatus())
6428
6561
  return;
6429
- C.x = t.offsetX, C.y = t.offsetY, V(C);
6562
+ C.x = t.offsetX, C.y = t.offsetY, j(C);
6430
6563
  } } function k(t) { if (t.button == u.kLeft) {
6431
6564
  var e = t.srcElement;
6432
6565
  if (e && "CANVAS" == e.tagName) {
@@ -6457,7 +6590,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6457
6590
  } M = a.kEnd, P(); } function z(t) { if (0 != t.touches.length) {
6458
6591
  var e = t.touches[0].pageX, n = t.touches[0].pageY;
6459
6592
  x = Y.MxFun.screenCoord2World(e, n, 0), M = a.kMove, P();
6460
- } } function V(t) { A = !1, null == t && (t = C); var e = _.getMxObject().screenCoord2World(t.x, t.y, 0), n = _.getOsnap(), i = _.getMxObject().screenCoordLong2World(.5 * ot.MxDrawData.getCursorWidthPixels()); n.setPoint(e, i), r.OsnapMode.kOsModekValid, x = e, M = a.kMove, P.call(this); } function U() { b || (b = !0, Y.MxFun.isPC() ? (document.addEventListener("mouseup", k, !1), document.addEventListener("mousemove", R, !1), document.addEventListener("mousedown", N, !1)) : (document.addEventListener("touchstart", B, !1), document.addEventListener("touchend", F, !1), document.addEventListener("touchmove", z, !1))); } function j() { b && (b = !1, Y.MxFun.isPC() ? (document.removeEventListener("mouseup", k, !1), document.removeEventListener("mousemove", R, !1), document.removeEventListener("mousedown", N, !1)) : (document.removeEventListener("touchstart", B, !1), document.removeEventListener("touchend", F, !1), document.removeEventListener("touchmove", z, !1))); } function G(t) { t.getRunMode() == rt.MxRunMode.kBrowse && t.enableSingleTouchPan(!1), t.tempDisableSelect(!0), t.updateDisplay(); } function H(t) { var e = new X.Vector3, n = !1, i = new nt.MxString(t), r = i.AnalyzeString(","); if (r.length < 2)
6593
+ } } function j(t) { A = !1, null == t && (t = C); var e = _.getMxObject().screenCoord2World(t.x, t.y, 0), n = _.getOsnap(), i = _.getMxObject().screenCoordLong2World(.5 * ot.MxDrawData.getCursorWidthPixels()); n.setPoint(e, i), r.OsnapMode.kOsModekValid, x = e, M = a.kMove, P.call(this); } function V() { b || (b = !0, Y.MxFun.isPC() ? (document.addEventListener("mouseup", k, !1), document.addEventListener("mousemove", R, !1), document.addEventListener("mousedown", N, !1)) : (document.addEventListener("touchstart", B, !1), document.addEventListener("touchend", F, !1), document.addEventListener("touchmove", z, !1))); } function U() { b && (b = !1, Y.MxFun.isPC() ? (document.removeEventListener("mouseup", k, !1), document.removeEventListener("mousemove", R, !1), document.removeEventListener("mousedown", N, !1)) : (document.removeEventListener("touchstart", B, !1), document.removeEventListener("touchend", F, !1), document.removeEventListener("touchmove", z, !1))); } function G(t) { t.getRunMode() == rt.MxRunMode.kBrowse && t.enableSingleTouchPan(!1), t.tempDisableSelect(!0), t.updateDisplay(); } function H(t) { var e = new X.Vector3, n = !1, i = new nt.MxString(t), r = i.AnalyzeString(","); if (r.length < 2)
6461
6594
  for (; !i.IsEmpty() && et.MxTools.IsNumerical(i);) {
6462
6595
  var a = et.MxTools._tstof(i.m_val);
6463
6596
  if (et.MxTools.IsZero(a))
@@ -6491,27 +6624,27 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6491
6624
  } return t & f.COMMAND_GET_STRING ? (e.sValue = i, e.iRet = d.COMMAND_IN_STRING) : e.iRet = d.COMMAND_IN_INVALID, e; } r.getInputKeyword = function (t) { if (t < 1)
6492
6625
  return ""; for (var e, n = D.entries(); !(e = n.next()).done;)
6493
6626
  if (e.value == t)
6494
- return e.key; return ""; }, r.GetKeyWordToString = function () { return L; }, r.keywordList = function () { return O.m_val; }, r.setKeywordList = function (t) { if (O.m_val = t, D.clear(), L.length = 0, !O.IsEmpty())
6495
- if (O.TrimLeft(" "), O.TrimRight(" "), "[" == O.m_val[0] && "]" == O.m_val[O.m_val.length - 1]) {
6496
- O.TrimLeft("["), O.TrimRight("]");
6497
- for (var e = O.AnalyzeString("/"), n = 1, i = 0; i < e.length; i++) {
6627
+ return e.key; return ""; }, r.GetKeyWordToString = function () { return O; }, r.keywordList = function () { return L.m_val; }, r.setKeywordList = function (t) { if (L.m_val = t, D.clear(), O.length = 0, !L.IsEmpty())
6628
+ if (L.TrimLeft(" "), L.TrimRight(" "), "[" == L.m_val[0] && "]" == L.m_val[L.m_val.length - 1]) {
6629
+ L.TrimLeft("["), L.TrimRight("]");
6630
+ for (var e = L.AnalyzeString("/"), n = 1, i = 0; i < e.length; i++) {
6498
6631
  var r = (s = new nt.MxString(e[i])).Find("(");
6499
6632
  if (-1 != r) {
6500
6633
  var a = new nt.MxString(s.Left(r)), o = new nt.MxString(s.Right(s.GetLength() - r - 1));
6501
- o.TrimRight(")"), a.IsEmpty() || o.IsEmpty() || (o.MakeUpper(), D.set(o.m_val, n), n++, L.push(new et.MxPair(o.m_val, a.m_val)));
6634
+ o.TrimRight(")"), a.IsEmpty() || o.IsEmpty() || (o.MakeUpper(), D.set(o.m_val, n), n++, O.push(new et.MxPair(o.m_val, a.m_val)));
6502
6635
  }
6503
6636
  }
6504
6637
  }
6505
6638
  else
6506
- for (e = O.AnalyzeString(" "), n = 1, i = 0; i < e.length; i++) {
6639
+ for (e = L.AnalyzeString(" "), n = 1, i = 0; i < e.length; i++) {
6507
6640
  var s;
6508
6641
  (s = new nt.MxString(e[i])).IsEmpty() || (s.MakeUpper(), D.set(s.m_val, n), n++);
6509
- } }, r.getAcquirePoint = function () { return x; }, r.getAcquireStatus = function () { return M; }, r.doMouseMoveImp = V, r.OnThreeControlsChage = function () { null == _ || V(C); }, r.OnEnter = function (t) { A = !0, M = a.kNoChange, P(), A = !1; }, r.Test = function () { A = !0; }, r.registEvent = U, r.unRegistEvent = j, r.getCurrentMouseButton = function () { return S; }, r.isRunning = function () { return null != _; }, r.getCurCmd = function () { return _; }, r.commandRunComplete = function (t) { _ != t && console.log("aseert:_curCmd == cmd"); var e, n = $.MxManager.currentMx(); null != _ && (n = _.getMxObject()), null != w ? (U(), _ = w, w = void 0, S = u.kInvalid, _.onStartCommand(), G(n)) : (j(), _ = void 0, (e = n).getRunMode() == rt.MxRunMode.kBrowse && e.enableSingleTouchPan(!0), e.tempDisableSelect(!1), e.updateDisplay()); }, r.isWaitCmdNull = function () { return null == w; }, r.stopCmd = function () { null != _ && (T = !0, _.notifyCancleExit(), T = !1); }, r.setRunCmdEvent = function (t) { E = t; }, r.runCmd = function (t) { if (!T) {
6642
+ } }, r.getAcquirePoint = function () { return x; }, r.getAcquireStatus = function () { return M; }, r.doMouseMoveImp = j, r.OnThreeControlsChage = function () { null == _ || j(C); }, r.OnEnter = function (t) { A = !0, M = a.kNoChange, P(), A = !1; }, r.Test = function () { A = !0; }, r.registEvent = V, r.unRegistEvent = U, r.getCurrentMouseButton = function () { return S; }, r.isRunning = function () { return null != _; }, r.getCurCmd = function () { return _; }, r.commandRunComplete = function (t) { _ != t && console.log("aseert:_curCmd == cmd"); var e, n = $.MxManager.currentMx(); null != _ && (n = _.getMxObject()), null != w ? (V(), _ = w, w = void 0, S = u.kInvalid, _.onStartCommand(), G(n)) : (U(), _ = void 0, (e = n).getRunMode() == rt.MxRunMode.kBrowse && e.enableSingleTouchPan(!0), e.tempDisableSelect(!1), e.updateDisplay()); }, r.isWaitCmdNull = function () { return null == w; }, r.stopCmd = function () { null != _ && (T = !0, _.notifyCancleExit(), T = !1); }, r.setRunCmdEvent = function (t) { E = t; }, r.runCmd = function (t) { if (!T) {
6510
6643
  var e = $.MxManager.currentMx();
6511
- t.setMxObject(e), C = it.MxWindowsEvent.getCurrentMousePostion(), E && E(), null == _ ? (U(), _ = t, S = u.kInvalid, _.onStartCommand(), G(e)) : (w = t, T = !0, _.notifyCancleExit(), T = !1);
6644
+ t.setMxObject(e), C = it.MxWindowsEvent.getCurrentMousePostion(), E && E(), null == _ ? (V(), _ = t, S = u.kInvalid, _.onStartCommand(), G(e)) : (w = t, T = !0, _.notifyCancleExit(), T = !1);
6512
6645
  } }, r.GetAcqurePointFromStringTo = H, r.ProcCommandRetResult = J, r.GetCommandLineContent = q, r.acquirePoint = function (t) { var e = new st; if (null == _)
6513
6646
  return e.status = l.kCancel, e; var n = q(f.COMMAND_GET_COORD | f.COMMAND_GET_KEY); return n.iRet == d.COMMAND_IN_EMTPY ? (e.status = l.kNull, e.exit = !0) : n.iRet == d.COMMAND_IN_KEY ? (e.status = n.iKey, e.exit = !0, e.sKeyValue = n.sValue) : n.iRet == d.COMMAND_IN_COORD ? (e.status = l.kNormal, e.pt = _.getMxObject().docCoord2World(n.pt.x, n.pt.y, n.pt.z), e.exit = !0) : (J(n.iRet, "\n 需要点或选项关键字。 \n"), M == a.kMove ? (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kEnd ? t & o.kGetEnd ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kCancle ? (e.status = l.kCancel, e.pt = x, e.exit = !0) : M == a.kBegan ? t & o.kGetBegan ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNormal, e.pt = x, e.exit = !1) : M == a.kMouseDown ? (e.status = l.kNormal, e.pt = x, e.exit = !0) : (e.status = l.kNoChange, e.pt = void 0, e.exit = !1)), e; }, r.getMcEdJigCommandClass = function () { return Z.McEdJigCommand; }, r.getMrxDbgUiPrPointClass = function () { return K.MrxDbgUiPrPoint; }, r.getMcEdGetPointWorldDrawClass = function () { return Q.McEdGetPointWorldDraw; }, r.McEdGetPointWorldDrawObjectClass = function () { return Q.McEdGetPointWorldDrawObject; }, r.init = function () { this._curCmd = void 0; }; }(i = n.MxJigCmdManager || (n.MxJigCmdManager = {}));
6514
- }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 21, "./MrxDbgUiPrPoint": 22, "./MxDrawData": 34, "./MxDrawObject": 35, "./MxFun": 39, "./MxJig": 41, "./MxManager": 45, "./MxString": 50, "./MxTools": 53, "./MxUiVue": 58, "./MxWindowsEvent": 59, three: 19 }], 43: [function (t, e, n) {
6647
+ }, { "./McEdJigOsnap": 20, "./MrxDbgUiPrBase": 22, "./MrxDbgUiPrPoint": 23, "./MxDrawData": 40, "./MxDrawObject": 41, "./MxFun": 45, "./MxJig": 47, "./MxManager": 51, "./MxString": 56, "./MxTools": 59, "./MxUiVue": 64, "./MxWindowsEvent": 65, three: 19 }], 49: [function (t, e, n) {
6515
6648
  "use strict";
6516
6649
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6517
6650
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6521,7 +6654,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6521
6654
  return this._isGetPt1 = !1, s.MxJigCmdManager.DoneStatius.kContinueCommand; var e = {}; return e.pt1 = l.MxFun.worldCoord2Doc(this._pt1.x, this._pt1.y, this._pt1.z), e.pt2 = l.MxFun.worldCoord2Doc(this._pt2.x, this._pt2.y, this._pt2.z), this._retCall(e), s.MxJigCmdManager.DoneStatius.kExitCommand; }, u.prototype.upDisplay = function () { this._isGetPt1 || null == this._pt1 || null == this._pt2 || this.drawLine(this._pt1, this._pt2); }, u);
6522
6655
  function u() { var t = null !== a && a.apply(this, arguments) || this; return t._isGetPt1 = !0, t; }
6523
6656
  n.MxJigGetLine = c;
6524
- }, { "./MxFun": 39, "./MxJig": 41, "./MxJigCmdManager": 42 }], 44: [function (t, e, n) {
6657
+ }, { "./MxFun": 45, "./MxJig": 47, "./MxJigCmdManager": 48 }], 50: [function (t, e, n) {
6525
6658
  "use strict";
6526
6659
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxLocalDwgFileLoad = n.MxLocalFileLoad = n.MxLocalNodeJs = void 0;
6527
6660
  var a = t("./MxFun"), i = (r.prototype.init = function (t) { this.loadFileCall = t.loadFileFun; }, r.prototype.loadFile = function (t, e, n, i, r) { null != this.loadFileCall ? this.loadFileCall(t, e, n, i, r) : r(void 0); }, r);
@@ -6540,10 +6673,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6540
6673
  } }, c.prototype.onRenderHead = function (t) { var e = JSON.parse(t); this._dataType = e.type, this._dataNum = e.count, this._iGet = 0, this._isShowLoading && a.MxFun.showLoading(), this.getDatas(); }, c.prototype.getFile = function (t, e, n, i, r) { var a = new o; a.setPath(t), a.setBinary(n), a.load(e, i, function () { }, r); }, c);
6541
6674
  function c(t) { this.net = null, this._dataNum = 0, this._iGet = 0, this._dataType = [], this._path = "", this._filename = "", this._isShowLoading = !0, this.net = t; }
6542
6675
  n.MxLocalDwgFileLoad = l;
6543
- }, { "./MxFun": 39 }], 45: [function (t, e, n) {
6676
+ }, { "./MxFun": 45 }], 51: [function (t, e, n) {
6544
6677
  "use strict";
6545
- var i, r, a, o, s;
6546
- Object.defineProperty(n, "__esModule", { value: !0 }), n.MxManager = void 0, i = n.MxManager || (n.MxManager = {}), r = [], a = null, o = [], s = void 0, i.add = function (t) { r.push(t); }, i.outDebugString = function (t) { null == s ? console.log(t) : s(t); }, i.setOutDebugCall = function (t) { s = t; }, i.onLoad = function () { for (var t in r)
6678
+ Object.defineProperty(n, "__esModule", { value: !0 }), n.MxManager = void 0;
6679
+ var i, r, a, o, s, l, c = t("./MxDbTextureManager");
6680
+ i = n.MxManager || (n.MxManager = {}), r = [], a = null, o = [], s = void 0, l = new c.MxDbTextureManager, i.add = function (t) { r.push(t); }, i.getMxDbTextureManager = function () { return l; }, i.outDebugString = function (t) { null == s ? console.log(t) : s(t); }, i.setOutDebugCall = function (t) { s = t; }, i.onLoad = function () { for (var t in r)
6547
6681
  r[t].onLoad(); }, i.updateDisplay = function () { for (var t in r)
6548
6682
  r[t].updateDisplay(); }, i.currentMx = function () { return a; }, i.setCurrentMx = function (t) { a = t; }, i.initResize = function () { for (var t in r)
6549
6683
  r[t].initResize(); }, i.addSelectEvent = function (t) { o.push(t); }, i.clearSelectEvent = function () { o = []; }, i.callSelectObject = function (t) { for (var e in o)
@@ -6551,7 +6685,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6551
6685
  break; }, i.init = function () { }, i.getMxObject = function (t) { for (var e in r)
6552
6686
  if (r[e].getCanvas() === t)
6553
6687
  return r[e]; return null; };
6554
- }, {}], 46: [function (t, e, n) {
6688
+ }, { "./MxDbTextureManager": 38 }], 52: [function (t, e, n) {
6555
6689
  "use strict";
6556
6690
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxMaterial = void 0;
6557
6691
  var i, r = t("three");
@@ -6560,7 +6694,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6560
6694
  var n = e.map, i = (new r.TextureLoader).load(n);
6561
6695
  i.wrapS = i.wrapT = r.RepeatWrapping, t.map = i, t.side = r.DoubleSide;
6562
6696
  } } return 0 != t.transparent ? t.transparent = !0 : t.transparent = !1, "MeshPhongMaterial" == t.name ? n(e = new r.MeshPhongMaterial(t), t) : "MeshBasicMaterial" == t.name ? n(e = new r.MeshBasicMaterial(t), t) : "MeshDepthMaterial" == t.name ? n(e = new r.MeshDepthMaterial(t), t) : "MeshNormalMaterial" == t.name ? n(e = new r.MeshNormalMaterial(t), t) : "MeshLambertMaterial" == t.name ? n(e = new r.MeshLambertMaterial(t), t) : "MeshStandardMaterial" == t.name && n(e = new r.MeshStandardMaterial(t), t), e; };
6563
- }, { three: 19 }], 47: [function (t, e, n) {
6697
+ }, { three: 19 }], 53: [function (t, e, n) {
6564
6698
  "use strict";
6565
6699
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxHFileLoad = n.MxNet = n.MxNetBinMessageType = n.MxNetSend = n.MxNetMessage = n.MxNetMessageType = n.MxNetData = void 0;
6566
6700
  var i, r, x = t("three"), l = t("./MxFun"), a = t("pako"), o = t("./MxManager"), s = (c.prototype.getId = function () { return this._dataView.getInt32(4, !0); }, c.prototype.getVersion_MwBlobHead = function () { return this._dataView.getInt32(60, !0); }, c.prototype.getVersion_MwBlobHeadDynLen = function () { return this._dataView.getInt32(4, !0); }, c.prototype.getdPointCurveBuffersHead = function () { var t = {}; return t.ver = this._dataView.getInt32(4, !0), t.databaseIndex = this._dataView.getInt32(8, !0), t.zeroLayerIdIndex = this._dataView.getInt32(16, !0), t.datacount = this._dataView.getInt32(20, !0), t.datasize = this._dataView.getInt32(24, !0), t; }, c.prototype.getdPointMeshBuffersHead = function () { var t = {}; return t.ver = this._dataView.getInt32(4, !0), t.databaseIndex = this._dataView.getInt32(8, !0), t.id = this._dataView.getInt32(12, !0), t.zeroLayerIdIndex = this._dataView.getInt32(16, !0), t.datacount = this._dataView.getInt32(20, !0), t.datasize = this._dataView.getInt32(24, !0), t; }, c.prototype.getdPointCurveBufferDataHead = function (t) { t += 4, t += 4, t += 4; var e = {}; return e.pointCount = this._dataView.getInt32(t, !0), t += 4, e.layerId = this._dataView.getInt32(t, !0), t += 4, e.blkId = this._dataView.getInt32(t, !0), t += 4, e.offset = t, e; }, c.prototype.getdPointMeshBufferDataHead = function (t) { t += 4, t += 4, t += 4; var e = {}; return e.pointCount = this._dataView.getInt32(t, !0), t += 4, e.layerId = this._dataView.getInt32(t, !0), t += 4, e.blkId = this._dataView.getInt32(t, !0), t += 4, e.offset = t, e; }, c.prototype.getDatabaseIndex = function () { return this._dataView.getInt32(8, !0); }, c.prototype.getColorIndex = function () { return this._dataView.getInt32(24, !0); }, c.prototype.getBufferType = function () { return this._dataView.getInt32(32, !0); }, c.prototype.getIsSketchEntity = function () { return this._dataView.getInt32(40, !0); }, c.prototype.getLayerId = function () { return this._dataView.getInt32(44, !0); }, c.prototype.getBlockId = function () { return this._dataView.getInt32(48, !0); }, c.prototype.getVertexBufferSize = function () { return this._dataView.getInt32(12, !0); }, c.prototype.getIndexBufferSize = function () { return this._dataView.getInt32(16, !0); }, c.prototype.getZeroLayerId = function () { return this._dataView.getInt32(52, !0); }, c.prototype.getSelectMark = function () { return this._dataView.getInt32(56, !0); }, c.prototype.getMateria = function () { var t = this._dataView.getInt32(36, !0); if (0 == t)
@@ -6682,7 +6816,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6682
6816
  } }, _.prototype.onRenderHead = function (t) { var e = JSON.parse(t); this._dataType = e.type, this._dataNum = e.count, this._iGet = 0, this.showLoading(), this.getData(); }, _.prototype.getFile = function (t, e, n, i) { var r = new x.FileLoader(this.manager); r.setPath(t), 0 != this._requestHeader.length && (r.requestHeader = { usertoken: this._requestHeader }), r.load(e, n, function () { }, i); }, _);
6683
6817
  function _(t, e) { this.net = null, this.manager = null, this._dataNum = 0, this._iGet = 0, this._dataType = [], this._path = "", this._filename = "", this._isShowLoading = !0, this._requestHeader = "", this.net = t, this.manager = void 0 !== e ? e : x.DefaultLoadingManager; }
6684
6818
  n.MxHFileLoad = y;
6685
- }, { "./MxFun": 39, "./MxManager": 45, pako: 1, three: 19 }], 48: [function (t, e, n) {
6819
+ }, { "./MxFun": 45, "./MxManager": 51, pako: 1, three: 19 }], 54: [function (t, e, n) {
6686
6820
  "use strict";
6687
6821
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxSelect = void 0;
6688
6822
  var f = t("three"), m = t("three.meshline"), l = t("./MxFun"), r = t("./MxNetData"), a = t("./MxMaterial"), i = (o.prototype.removeAll = function () { this._mapSelectMark2Entity = new Map; }, o.prototype.addEntity = function (t, e) { var n = this._mapSelectMark2Entity.get(t); null == n && (n = new Array, this._mapSelectMark2Entity.set(t, n)), n.push(e); }, o.prototype.removeEntity = function (t) { var e = new Map, n = function (a, t) { var o = this.mx.getScene(), s = t; return function (t, e, n) { if (null == a || e != a)
@@ -6709,11 +6843,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6709
6843
  } }, o);
6710
6844
  function o(t, e) { this.enabled = !0, this.tmpDisable = !1, this.mx = void 0, this.domElement = void 0, this._mapSelectMark2Entity = new Map, this._material = new m.MeshLineMaterial({ useMap: !1, color: new f.Color(16711680), opacity: .5, resolution: new f.Vector2(500, 500), sizeAttenuation: !0, lineWidth: .005, transparent: !0 }), this.mx = t, this.domElement = void 0 !== e ? e : document; }
6711
6845
  n.MxSelect = i;
6712
- }, { "./MxFun": 39, "./MxMaterial": 46, "./MxNetData": 47, three: 19, "three.meshline": 18 }], 49: [function (t, e, n) {
6846
+ }, { "./MxFun": 45, "./MxMaterial": 52, "./MxNetData": 53, three: 19, "three.meshline": 18 }], 55: [function (t, e, n) {
6713
6847
  "use strict";
6714
6848
  var i;
6715
6849
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxShader = void 0, (i = n.MxShader || (n.MxShader = {})).VSHADER_COLOR_POINT = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nattribute vec2 position; \nattribute vec3 color; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.VSHADER_COLOR_POINT_BYLAYER = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nuniform vec3 color; \nattribute vec2 position; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.FSHADER_COLOR_POINT = " precision highp float; \nvarying vec4 vColor; \nvoid main() { \ngl_FragColor = vColor; \n} \n", i.VSHADER_COLOR_POINT_CLIP = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nuniform vec2 clippt1; \nuniform vec2 clippt2; \nuniform float vieww; \nuniform float viewh; \nattribute vec2 position; \nattribute vec3 color; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvarying vec2 vCp1; \nvarying vec2 vCp2; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nvec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); \nvec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); \nvCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); \nvCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.VSHADER_COLOR_POINT_BYLAYER_CLIP = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nuniform vec3 color; \nuniform vec2 clippt1; \nuniform vec2 clippt2; \nuniform float vieww; \nuniform float viewh; \nattribute vec2 position; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvarying vec2 vCp1; \nvarying vec2 vCp2; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nvec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); \nvec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); \nvCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); \nvCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.FSHADER_COLOR_POINT_CLIP = "precision highp float; \nvarying vec4 vColor; \nvarying vec2 vCp1; \nvarying vec2 vCp2; \nvoid main() { \nif(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) \ngl_FragColor = vColor; \nelse \ndiscard; \n} \n", i.VSHADER_COLOR_POINT_FORMXCAD = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nuniform vec3 color; \nattribute vec2 position; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.FSHADER_COLOR_POINT_FORMXCAD = " precision highp float; \nvarying vec4 vColor; \nvoid main() { \ngl_FragColor = vColor; \n} \n", i.VSHADER_COLOR_POINT_CLIP_FORMXCAD = " precision highp float; \nuniform mat4 modelViewMatrix; \nuniform mat4 projectionMatrix; \nuniform vec3 color; \nuniform vec2 clippt1; \nuniform vec2 clippt2; \nuniform float vieww; \nuniform float viewh; \nattribute vec2 position; \nattribute vec4 tran1; \nattribute vec4 tran2; \nattribute vec4 tran3; \nattribute vec4 tran4; \nattribute float ishide; \nvarying vec4 vColor; \nvarying vec2 vCp1; \nvarying vec2 vCp2; \nvoid main(){ \n mat4 tran; \ntran[0][0] = tran1.x;tran[0][1] = tran1.y;tran[0][2] = tran1.z;tran[0][3] = tran1.w; \ntran[1][0] = tran2.x;tran[1][1] = tran2.y;tran[1][2] = tran2.z;tran[1][3] = tran2.w; \ntran[2][0] = tran3.x;tran[2][1] = tran3.y;tran[2][2] = tran3.z;tran[2][3] = tran3.w; \ntran[3][0] = tran4.x;tran[3][1] = tran4.y;tran[3][2] = tran4.z;tran[3][3] = tran4.w; \nvec4 pt1 = projectionMatrix * modelViewMatrix * vec4( clippt1.x,clippt1.y,0.0, 1.0 ); \nvec4 pt2 = projectionMatrix * modelViewMatrix * vec4( clippt2.x,clippt2.y,0.0, 1.0 ); \nvCp1 = vec2(pt1.x * vieww + vieww,pt1.y * viewh + viewh); \nvCp2 = vec2(pt2.x * vieww + vieww,pt2.y * viewh + viewh); \nif(ishide > 0.1) \n vColor = vec4(color,0.0); \nelse \n vColor = vec4(color,1.0); \ngl_Position = projectionMatrix * modelViewMatrix * tran * vec4( position.x,position.y,0.0, 1.0 ); \n} \n", i.FSHADER_COLOR_POINT_CLIP_FORMXCAD = "precision highp float; \nvarying vec4 vColor; \nvarying vec2 vCp1; \nvarying vec2 vCp2; \nvoid main() { \nif(gl_FragCoord.x > vCp1.x && gl_FragCoord.x < vCp2.x && gl_FragCoord.y > vCp1.y && gl_FragCoord.y < vCp2.y) \ngl_FragColor = vColor; \nelse \ndiscard; \n} \n";
6716
- }, {}], 50: [function (t, e, n) {
6850
+ }, {}], 56: [function (t, e, n) {
6717
6851
  "use strict";
6718
6852
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxString = void 0;
6719
6853
  var i = (r.prototype.Find = function (t) { return this.m_val.indexOf(t); }, r.prototype.Left = function (t) { return this.m_val.substring(0, t); }, r.prototype.Right = function (t) { return this.m_val.substring(t + 1, this.m_val.length); }, r.prototype.TrimLeft = function (t) { for (; 0 < this.m_val.length && this.m_val[0] == t;)
@@ -6721,7 +6855,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6721
6855
  this.m_val = this.m_val.slice(0, -1); }, r.prototype.AnalyzeString = function (t) { return this.m_val.split(t); }, r.prototype.IsEmpty = function () { return 0 == this.m_val.length; }, r.prototype.MakeUpper = function () { this.m_val = this.m_val.toUpperCase(); }, r.prototype.MakeLower = function () { this.m_val = this.m_val.toLowerCase(); }, r.prototype.GetLength = function () { return this.m_val.length; }, r);
6722
6856
  function r(t) { this.m_val = "", null != t && (this.m_val = t); }
6723
6857
  n.MxString = i;
6724
- }, {}], 51: [function (t, e, n) {
6858
+ }, {}], 57: [function (t, e, n) {
6725
6859
  "use strict";
6726
6860
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxSystemVariable = void 0;
6727
6861
  var i = t("three"), r = t("./McEdJigOsnap"), a = (o.prototype.init = function (t) { this.m_mxObj = t; }, o.prototype.getAllLinetypeName = function () { return this.m_vecLinetype; }, o.prototype.getSysVarBool = function (t) { return null != this.m_data[t] && this.m_data[t]; }, o.prototype.setSysVarBool = function (t, e) { this.m_data[t] = e; }, o.prototype.setSysVarPoint = function (t, e) { this.m_data[t] = e; }, o.prototype.OnMessageMxCADSystemVariable = function (t) { this.m_vecLinetype = []; var e = JSON.parse(t); if (null != e) {
@@ -6732,11 +6866,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6732
6866
  } this.m_mxObj.callEvent("loadSystmeVariableComplete"); }, o.prototype.getSysVarPoint = function (t) { return null == this.m_data[t] ? new i.Vector3(0, 0, 0) : this.m_data[t]; }, o.prototype.setSysVarNumber = function (t, e) { this.m_data[t] = e; }, o.prototype.getSysVarNumber = function (t) { return null == this.m_data[t] ? 0 : this.m_data[t]; }, o);
6733
6867
  function o() { this.m_data = {}, this.m_mxObj = null, this.m_vecLinetype = [], this.m_data.DYNINPUT = !0, this.m_data.GETPOINTSTATUS = 0, this.m_data.CELTYPE = "Continuous", this.m_data.CLAYER = "0", this.m_data.CECOLOR = 67108863, this.m_data.CECOLORINDEX = 7, this.m_data.OSMODE = r.MxOsnapDefine.OsModeAll; }
6734
6868
  n.MxSystemVariable = a;
6735
- }, { "./McEdJigOsnap": 20, three: 19 }], 52: [function (t, e, n) {
6869
+ }, { "./McEdJigOsnap": 20, three: 19 }], 58: [function (t, e, n) {
6736
6870
  "use strict";
6737
6871
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxThreeJS = void 0;
6738
6872
  var i, m = t("three"), g = t("./MxFun");
6739
- (i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n) { var i = new m.Geometry, r = new m.LineBasicMaterial({ color: n }); return i.vertices.push(t, e), new m.Line(i, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); s.font = l; var c, u = s.measureText(t); a = 2 * (c = u.width, Math.pow(2, Math.floor(Math.log(c) / Math.LN2))), o.width = a, o.height = 256, s.font = l, s.textAlign = "center", s.textBaseline = "middle"; var h = g.MxFun.formatString("#{0}", r.toString(16)); s.fillStyle = h, s.fillText(t, a / 2, 128); var d = new m.Texture(o); d.needsUpdate = !0; var p = new m.SpriteMaterial({ map: d }); p.transparent = !1, p.rotation = i; var f = new m.Sprite(p); return f.scale.set(a / 256 * n, n, 1), f.position.set(e.x, e.y, 0), f; }, i.createTriangle = function (t, e, n) { if (!(t.length < 3)) {
6873
+ (i = n.MxThreeJS || (n.MxThreeJS = {})).createLine = function (t, e, n) { var i = new m.Geometry, r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); return i.vertices.push(t, e), new m.Line(i, r); }, i.createCircle = function (t, e, n) { var i = new m.CircleGeometry(e, 64, 3, 2 * Math.PI), r = new m.LineBasicMaterial({ color: n, transparent: !0, depthTest: !1 }); i.vertices.shift(); var a = new m.LineLoop(i, r); return a.position.x = t.x, a.position.y = t.y, a.position.z = t.z, a; }, i.creatTextSprite = function (t, e, n, i, r) { var a, o = document.createElement("canvas"), s = o.getContext("2d"), l = g.MxFun.formatString("normal {0}px Arial", "256"); s.font = l; var c, u = s.measureText(t); a = 2 * (c = u.width, Math.pow(2, Math.floor(Math.log(c) / Math.LN2))), o.width = a, o.height = 256, s.font = l, s.textAlign = "center", s.textBaseline = "middle"; var h = g.MxFun.formatString("#{0}", r.toString(16)); s.fillStyle = h, s.fillText(t, a / 2, 128); var d = new m.Texture(o); d.needsUpdate = !0; var p = new m.SpriteMaterial({ map: d, transparent: !0, depthTest: !1 }); p.transparent = !1, p.rotation = i; var f = new m.Sprite(p); return f.scale.set(a / 256 * n, n, 1), f.position.set(e.x, e.y, 0), f; }, i.createTriangle = function (t, e, n) { if (!(t.length < 3)) {
6740
6874
  for (var i = t.length, r = new m.Geometry, a = 0; a + 2 < i; a += 3) {
6741
6875
  r.vertices.push(t[a]), r.vertices.push(t[a + 1]), r.vertices.push(t[a + 2]);
6742
6876
  var o = new m.Face3(a, a + 1, a + 2);
@@ -6745,8 +6879,8 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6745
6879
  r.computeFaceNormals(), r.computeVertexNormals(), null == n && (n = 1);
6746
6880
  var s = new m.MeshBasicMaterial({ color: e, transparent: !0, depthTest: !1, side: m.DoubleSide, opacity: n });
6747
6881
  return new m.Mesh(r, s);
6748
- } }, i.createLines = function (t, e) { var n = new m.Geometry; n.vertices = t; var i = new m.LineBasicMaterial({ color: e }); return new m.Line(n, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i })); return a.computeLineDistances(), a; };
6749
- }, { "./MxFun": 39, three: 19 }], 53: [function (t, e, n) {
6882
+ } }, i.createLines = function (t, e) { var n = new m.Geometry; n.vertices = t; var i = new m.LineBasicMaterial({ color: e, transparent: !0, depthTest: !1 }); return new m.Line(n, i); }, i.createDashedLines = function (t, e, n, i) { var r = new m.Geometry; r.vertices = t; var a = new m.Line(r, new m.LineDashedMaterial({ color: e, dashSize: n, gapSize: i, transparent: !0, depthTest: !1 })); return a.computeLineDistances(), a; };
6883
+ }, { "./MxFun": 45, three: 19 }], 59: [function (t, e, n) {
6750
6884
  "use strict";
6751
6885
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxPair = n.MxTools = void 0;
6752
6886
  var i, r = t("three");
@@ -6758,11 +6892,11 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6758
6892
  t = t.replace("{".concat(i, "}"), e[i]); return t; }, i._tstof = function (t) { return parseFloat(t); }, i._tstoi = function (t) { return parseInt(t); }, i.IsZero = function (t) { return -1e-7 < t && t < 1e-7; }, i.MillimeterToPixels = function (t) { return 10 * t; }, i.getXYPlanDistance = function (t, e) { var n = new r.Vector2(t.x, t.y), i = new r.Vector2(e.x, e.y); return n.distanceTo(i); };
6759
6893
  function a(t, e) { this.first = t, this.second = e; }
6760
6894
  n.MxPair = a;
6761
- }, { three: 19 }], 54: [function (t, e, n) {
6895
+ }, { three: 19 }], 60: [function (t, e, n) {
6762
6896
  "use strict";
6763
6897
  var i, r;
6764
6898
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxType = void 0, i = n.MxType || (n.MxType = {}), (r = i.CommandFlags || (i.CommandFlags = {}))[r.MCRX_CMD_MODAL = 0] = "MCRX_CMD_MODAL", r[r.MCRX_CMD_TRANSPARENT = 1] = "MCRX_CMD_TRANSPARENT", r[r.MCRX_CMD_NO_UNDO_MARKER = 2] = "MCRX_CMD_NO_UNDO_MARKER", r[r.MCRX_CMD_NOPRV = 4] = "MCRX_CMD_NOPRV";
6765
- }, {}], 55: [function (require, module, exports) {
6899
+ }, {}], 61: [function (require, module, exports) {
6766
6900
  "use strict";
6767
6901
  Object.defineProperty(exports, "__esModule", { value: !0 }), exports.MxUiObject = exports.MxToolBarItem = exports.MxMenuItem = void 0;
6768
6902
  var MxFun_1 = require("./MxFun"), MxMenuItem = function () { this.id = -1, this.text = "", this.evalString = "", this.parentId = -1; };
@@ -6771,7 +6905,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6771
6905
  exports.MxToolBarItem = MxToolBarItem;
6772
6906
  var MxUiObject = function () { function MxUiObject() { this.vecMenuItem = new Array, this.vecToolBarItem = new Array, this.uiPath = "./ui", this.idMenuItemCount = 100, this.isShowTitle = !1, this.isShowStructTree = !1, this.isEnableLoading = !0, this.isShowLayer = !1, this.isShowTakeColor = !1, this.isShowLayout = !1, this.isEnableObjectProperty = !1, this.isShowToolbar = !1, this.isShowMainMenu = !1, this.sTitle = ""; } return MxUiObject.prototype.SetLayoutData = function (t) { this.vecLayoutData = t; }, MxUiObject.prototype.CallMxCommand = function (t) { MxFun_1.MxFun.callCommand(t, ""); }, MxUiObject.prototype.EvalJs = function (value) { eval(value); }, MxUiObject.prototype.SetLayerData = function (t) { this.vecLayerData = t; }, MxUiObject.prototype.SetSketchLayerData = function (t) { this.vecSketchLayerData = t; }, MxUiObject.prototype.init = function () { this.onInit(); }, MxUiObject.prototype.addMenuItem = function (t, e, n, i) { void 0 === e && (e = ""), void 0 === n && (n = -1), void 0 === i && (i = -1); var r = new MxMenuItem; r.text = t, r.evalString = e, -1 == i && (i = this.idMenuItemCount, this.idMenuItemCount++), r.id = i, r.parentId = n, this.vecMenuItem.push(r); }, MxUiObject.prototype.addToolBarItem = function (t, e, n, i, r) { void 0 === e && (e = ""), void 0 === n && (n = ""), void 0 === i && (i = !1), void 0 === r && (r = ""); var a = new MxToolBarItem; a.image = t, a.evalString = n, a.text = e, a.isMxCommand = i, a.itemid = r, this.vecToolBarItem.push(a); }, MxUiObject.prototype.setPath = function (t) { this.uiPath = t; }, MxUiObject.prototype.getPath = function () { return this.uiPath; }, MxUiObject.prototype.create = function () { this.onCreate(); }, MxUiObject.prototype.writeUICSS = function () { var t = this.uiPath; MxFun_1.MxFun.isPC() ? (document.write("<link rel='stylesheet' href='" + t + "/css/mxbimpcm.css'>"), this.isShowMainMenu && (document.write("<link rel='stylesheet' href='" + t + "/css/rightfacefonts2.css'>"), document.write("<link rel='stylesheet' href='" + t + "/css/rightmnu.css'>"), document.write("<script type='text/javascript' src='" + t + "/hc-mobile-nav.js'><\/script>"))) : (document.write("<link rel='stylesheet' href='" + t + "/css/mxmobile.css'>"), this.isShowMainMenu && (document.write("<link href='" + t + "/css/font-awesome.min.css' rel='stylesheet'>"), document.write("<link rel='stylesheet' href='" + t + "/css/rightfacefonts1.css'>"), document.write("<link rel='stylesheet' href='" + t + "/css/rightfacefonts2.css'>"), document.write("<link rel='stylesheet' href='" + t + "/css/rightmnu.css'>"), document.write("<script type='text/javascript' src='" + t + "/hc-mobile-nav.js'><\/script>"))); }, MxUiObject; }();
6773
6907
  exports.MxUiObject = MxUiObject;
6774
- }, { "./MxFun": 39 }], 56: [function (t, e, n) {
6908
+ }, { "./MxFun": 45 }], 62: [function (t, e, n) {
6775
6909
  "use strict";
6776
6910
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6777
6911
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6816,7 +6950,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6816
6950
  } }(-1, s), t("#main-nav").append(a); var e = t("#main-nav"), n = t(".toggle"), i = { maxWidth: !1, customToggle: n, levelTitles: !0 }, r = null, o = {}; r && r.remove(), n.off("click"), r = e.clone(), t.extend(o, { side: "right" }), r.hcMobileNav(t.extend({}, i, o)); }(jQuery); var e = window.location.href, n = e.length, i = e.indexOf("?"), r = e.substr(i, n).split("=")[1]; $(".barspan").html(decodeURIComponent(r)), $("#close2").click(function () { $(this).parent("div").fadeOut(200); }), $(".bf-select-current").click(function () { $(this).hasClass("bf-open") ? $(this).removeClass("bf-open") : $(this).addClass("bf-open"); }), $(".my-option").click(function () { var t = $(this); $(".my-option").each(function () { $(this).removeClass("active"); }), t.addClass("active"); }), $(".bf-select-option").click(function () { $(this).parent("ul").prev("span").html($(this).text()), $(this).parent("ul").prev("span").removeClass("bf-open"); }), $(document).on("click", ".layer-enable", function () { var t = l.MxFun.getUiObj().getPath(), e = parseInt($(this).attr("id")), n = parseInt($(this).attr("sketch")), i = !0; $(this).attr("src") == t + "/image/show.png" ? ($(this).attr("src", t + "/image/hide.png"), i = !1) : $(this).attr("src", t + "/image/show.png"), l.MxFun.showLayer(e, i, 1 == n); }); }, c.prototype.Fullscreen = function () { var t = document.documentElement; t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullScreen && t.webkitRequestFullScreen(), document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(), this.IsFullStatus() ? ($("img[title='取消全屏']").attr("src", this.uiPath + "/image\\fullscreen1.gif"), $("img[title='取消全屏']").attr("title", "全屏")) : ($("img[title='全屏']").attr("src", this.uiPath + "/image\\escscreen1.gif"), $("img[title='全屏']").attr("title", "取消全屏")); }, c.prototype.IsFullStatus = function () { return null != (document.fullscreenEnabled || document.mozFullscreenElement || document.webkitFullscreenElement); }, c);
6817
6951
  function c() { return null !== a && a.apply(this, arguments) || this; }
6818
6952
  n.MxUiObjectMobile = s;
6819
- }, { "./MxFun": 39, "./MxUiObject": 55 }], 57: [function (t, e, n) {
6953
+ }, { "./MxFun": 45, "./MxUiObject": 61 }], 63: [function (t, e, n) {
6820
6954
  "use strict";
6821
6955
  var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
6822
6956
  Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
@@ -6871,7 +7005,7 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6871
7005
  } }, l.prototype.HideObjectProp = function () { $("#StrcutInfoBase").hasClass("hide") || ($("#StrcutInfoBase").fadeOut(200), $("#StrcutInfoBase").addClass("hide")); }, l.prototype.SwitchShowLayer = function () { var t = document.getElementById("ModelTreeInterface"), e = document.getElementById("ModelTreeThumbnail"), n = document.getElementById("LayerThumbnail"), i = document.getElementById("LayerInterface"), r = document.getElementById("LayerOut"), a = document.getElementById("LayerOutInterface"); t.style.display = "none", (a.style.display = "none") == i.style.display ? (n.style.display = "block", i.style.display = "block", i.style.left = "80px", i.style.top = "50px", null != e && (e.style.display = "block"), null != r && (r.style.display = "block"), t.style.display = "none", a.style.display = "none") : (i.style.display = "none", null != e && (e.style.display = "block"), n.style.display = "block", null != r && (r.style.display = "block")); }, l.prototype.SwitchShowStructTree = function () { var t = document.getElementById("ModelTreeInterface"), e = document.getElementById("ModelTreeThumbnail"), n = document.getElementById("LayerThumbnail"), i = document.getElementById("LayerInterface"), r = document.getElementById("LayerOut"), a = document.getElementById("LayerOutInterface"); i.style.display = "none", (a.style.display = "none") == t.style.display ? (null != e && (e.style.display = "block"), t.style.display = "block", t.style.left = "80px", t.style.top = "50px", n.style.display = "block", null != r && (r.style.display = "block"), i.style.display = "none", a.style.display = "none") : (t.style.display = "none", null != e && (e.style.display = "block"), n.style.display = "block", null != r && (r.style.display = "block")); }, l.prototype.Chosecolor = function () { document.getElementById("color-picker").click(); }, l.prototype.ColorChange = function (t) { document.getElementById("colorbox").style.backgroundColor = t, v.MxFun.setCurrentColor(t); }, l.prototype.SwitchShowLayout = function () { var t = document.getElementById("ModelTreeInterface"), e = document.getElementById("ModelTreeThumbnail"), n = document.getElementById("LayerThumbnail"), i = document.getElementById("LayerInterface"), r = document.getElementById("LayerOut"), a = document.getElementById("LayerOutInterface"); t.style.display = "none", (i.style.display = "none") == a.style.display ? (r.style.display = "block", a.style.display = "block", a.style.left = "80px", a.style.top = "120px", null != e && (e.style.display = "block"), n.style.display = "block", t.style.display = "none", i.style.display = "none") : (a.style.display = "none", null != e && (e.style.display = "block"), n.style.display = "block", r.style.display = "block"); }, l.prototype.Fullscreen = function () { var t = document.documentElement; t.requestFullscreen ? t.requestFullscreen() : t.mozRequestFullScreen ? t.mozRequestFullScreen() : t.webkitRequestFullScreen && t.webkitRequestFullScreen(), document.exitFullscreen ? document.exitFullscreen() : document.mozCancelFullScreen ? document.mozCancelFullScreen() : document.webkitCancelFullScreen ? document.webkitCancelFullScreen() : document.msExitFullscreen && document.msExitFullscreen(), this.IsFullStatus() ? ($("img[title='取消全屏']").attr("src", this.uiPath + "/image\\fullscreen1.gif"), $("img[title='取消全屏']").attr("title", "全屏")) : ($("img[title='全屏']").attr("src", this.uiPath + "/image\\escscreen1.gif"), $("img[title='全屏']").attr("title", "取消全屏")); }, l.prototype.IsFullStatus = function () { return null != (document.fullscreenEnabled || document.mozFullscreenElement || document.webkitFullscreenElement); }, l);
6872
7006
  function l() { return null !== a && a.apply(this, arguments) || this; }
6873
7007
  n.MxUiObjectPC = s;
6874
- }, { "./MxFun": 39, "./MxUiObject": 55 }], 58: [function (t, e, n) {
7008
+ }, { "./MxFun": 45, "./MxUiObject": 61 }], 64: [function (t, e, n) {
6875
7009
  "use strict";
6876
7010
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxUiVue = void 0;
6877
7011
  var i, r, d, a = t("./MxFun"), o = t("./MxJigCmdManager"), s = t("./MxTools"), l = t("./MxCmdRunManager");
@@ -6925,54 +7059,64 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6925
7059
  " " == t.getCmdTip() && 0 == t.getCmdText().length ? (t.setCmdTip(""), h("{0}:", "命令")) : h("\n{0}:", "命令");
6926
7060
  } }, i.DynamicInput_upDisplay = function () { null != d && i.OnMxEvent({ name: "dynInputUpDisplay" }); }, i.DynamicInput_setType = function (t) { null != d && d.getDynamicInput().setType(t); }, i.DynamicInput_getType = function () { return null == d ? o.MxJigCmdManager.DynamicInputType.kNoInput : d.getDynamicInput().getType(); }, i.DynamicInput_setPos = function (t) { null != d && d.getDynamicInput().setPos([t.x, t.y]); }, i.DynamicInput_setTip = function (t) { null != d && d.getDynamicInput().setTip(t); }, i.DynamicInput_setValue1 = function (t) { null != d && d.getDynamicInput().setValue1(t); }, i.DynamicInput_getValue1 = function () { return null == d ? "" : d.getDynamicInput().getValue1(); }, i.DynamicInput_setValue1Pos = function (t) { null != d && d.getDynamicInput().setValue1Pos([t.x, t.y]); }, i.DynamicInput_setValue2 = function (t) { null != d && d.getDynamicInput().setValue2(t); }, i.DynamicInput_getValue2 = function () { return null == d ? "" : d.getDynamicInput().getValue2(); }, i.DynamicInput_getFocusValue = function () { return null == d ? "" : d.getDynamicInput().getFocusValue(); }, i.DynamicInput_setValue2Pos = function (t) { null != d && d.getDynamicInput().setValue2Pos([t.x, t.y]); }, i.DynamicInput_setShow = function (t) { null != d && d.getDynamicInput().setShow(t); }, i.DynamicInput_isShow = function () { return null != d && d.getDynamicInput().isShow(); }, i.OnMxEvent = function (t) { if (null == d)
6927
7061
  return !1; d.OnMxEvent(t); };
6928
- }, { "./MxCmdRunManager": 32, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxTools": 53 }], 59: [function (t, e, n) {
7062
+ }, { "./MxCmdRunManager": 33, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxTools": 59 }], 65: [function (t, e, n) {
6929
7063
  "use strict";
6930
7064
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxWindowsEvent = void 0;
6931
- var i, r, o, a, s = t("./MxFun"), l = t("./MxManager"), c = t("./MxJigCmdManager"), u = t("three"), h = t("./MxUiVue"), d = t("./MxDrawData");
7065
+ var i, r, s, a, l = t("./MxFun"), c = t("./MxManager"), u = t("./MxJigCmdManager"), h = t("three"), o = t("./MxUiVue"), d = t("./MxDrawData");
6932
7066
  function p(t, e) { for (var n = 0, i = a.length; n < i; n++) {
6933
7067
  var r = a[n](t, e);
6934
7068
  if (0 != r)
6935
7069
  return r;
6936
7070
  } }
6937
- function f(t) { if (o.x = t.offsetX, o.y = t.offsetY, !p("mousemove", t) && !h.MxUiVue.isNull()) {
7071
+ function f(t) { if (s.x = t.offsetX, s.y = t.offsetY, !p("mousemove", t) && !o.MxUiVue.isNull()) {
6938
7072
  var e = t.srcElement;
6939
7073
  if (e && "CANVAS" == e.tagName) {
6940
- var n = l.MxManager.getMxObject(e);
7074
+ var n = c.MxManager.getMxObject(e);
6941
7075
  if (null == n)
6942
7076
  return;
6943
7077
  var i = n.screenCoord2Doc(t.offsetX, t.offsetY, 0);
6944
- h.MxUiVue.setTipCoord(s.MxFun.formatString("{0},{1},0.000", i.x.toFixed(3), i.y.toFixed(3)));
7078
+ o.MxUiVue.setTipCoord(l.MxFun.formatString("{0},{1},0.000", i.x.toFixed(3), i.y.toFixed(3)));
6945
7079
  }
6946
7080
  } }
6947
7081
  function m(t) { p("mouseup", t); }
6948
- function g(t) { if (o.x = t.offsetX, o.y = t.offsetY, !p("mousedown", t))
6949
- if (t.button == c.MxJigCmdManager.MouseButton.kRight && c.MxJigCmdManager.isRunning())
6950
- c.MxJigCmdManager.stopCmd();
6951
- else if (d.MxDrawData.m_isEnableIntelliSelect && t.button == c.MxJigCmdManager.MouseButton.kLeft && !c.MxJigCmdManager.isRunning()) {
7082
+ function g(t) { if (s.x = t.offsetX, s.y = t.offsetY, !p("mousedown", t))
7083
+ if (t.button == u.MxJigCmdManager.MouseButton.kRight && u.MxJigCmdManager.isRunning())
7084
+ u.MxJigCmdManager.stopCmd();
7085
+ else if (d.MxDrawData.m_isEnableIntelliSelect && t.button == u.MxJigCmdManager.MouseButton.kLeft && !u.MxJigCmdManager.isRunning()) {
6952
7086
  var e = t.srcElement;
6953
7087
  if (e && "CANVAS" == e.tagName) {
6954
- var n = l.MxManager.getMxObject(e);
7088
+ var n = c.MxManager.getMxObject(e);
6955
7089
  if (null == n)
6956
7090
  return;
6957
- var i = n.screenCoord2World(t.offsetX, t.offsetY, 0), r = n.getMxCAD();
6958
- if (!r)
6959
- return;
6960
- var a = !0;
6961
- r && r.getGrip().onMouseLBDown(i) && (a = !1), a && s.MxFun.sendStringToExecute("Mx_IntelliSel", { pt1: i });
7091
+ var i = n.screenCoord2World(t.offsetX, t.offsetY, 0);
7092
+ if (d.MxDrawData.m_intelliSelectType == d.IntelliSelectType.kBackgroundServicesModel) {
7093
+ var r = n.getMxCAD();
7094
+ if (!r)
7095
+ return;
7096
+ var a = !0;
7097
+ r && r.getGrip().onMouseLBDown(i) && (a = !1), a && l.MxFun.sendStringToExecute("Mx_IntelliSel", { pt1: i });
7098
+ }
7099
+ else {
7100
+ if (!n.getMxDatabase().getGripManager().onMouseLBDown(i)) {
7101
+ var o = new h.Vector3(t.offsetX, t.offsetY, 0);
7102
+ l.MxFun.sendStringToExecute("Mx_FrontEndWebpageIntelliSel", { pt: o });
7103
+ }
7104
+ }
6962
7105
  }
6963
7106
  } }
6964
7107
  function v(t) { var e = t || window.event || arguments.callee.caller.arguments[0]; if (e && 27 == e.keyCode)
6965
- if (d.MxDrawData.m_isEnableIntelliSelect && !c.MxJigCmdManager.isRunning()) {
6966
- var n = s.MxFun.getCurrentMxCAD();
6967
- if (n) {
6968
- var i = n.getSelect().clearAllSelect(), r = n.getGrip().clearAll();
6969
- (i || r) && s.MxFun.getCurrentMx().updateDisplay();
7108
+ if (d.MxDrawData.m_isEnableIntelliSelect && !u.MxJigCmdManager.isRunning()) {
7109
+ var n = !1, i = l.MxFun.getCurrentMx(), r = i.getMxCAD();
7110
+ if (r) {
7111
+ var a = r.getSelect().clearAllSelect(), o = r.getGrip().clearAll();
7112
+ (a || o) && (n = !0);
6970
7113
  }
7114
+ i.getMxDatabase().getGripManager().removeAllGrips() && (n = !0), i.getMxDatabase().getSelectManager().removeAllEntity() && (n = !0), n && i.updateDisplay();
6971
7115
  }
6972
7116
  else
6973
- c.MxJigCmdManager.isRunning() && c.MxJigCmdManager.stopCmd(); }
6974
- i = n.MxWindowsEvent || (n.MxWindowsEvent = {}), r = !1, o = new u.Vector2(0, 0), a = new Array, i.addEvent = function (t) { a.push(t); }, i.getCurrentMousePostion = function () { return o; }, i.registEvent = function () { r || (r = !0, s.MxFun.isPC() && (document.addEventListener("mousemove", f, !1), document.addEventListener("mouseup", m, !1), document.addEventListener("mousedown", g, !1), document.onkeydown = v)); };
6975
- }, { "./MxDrawData": 34, "./MxFun": 39, "./MxJigCmdManager": 42, "./MxManager": 45, "./MxUiVue": 58, three: 19 }], 60: [function (e, t, n) {
7117
+ u.MxJigCmdManager.isRunning() && u.MxJigCmdManager.stopCmd(); }
7118
+ i = n.MxWindowsEvent || (n.MxWindowsEvent = {}), r = !1, s = new h.Vector2(0, 0), a = new Array, i.addEvent = function (t) { a.push(t); }, i.getCurrentMousePostion = function () { return s; }, i.registEvent = function () { r || (r = !0, l.MxFun.isPC() && (document.addEventListener("mousemove", f, !1), document.addEventListener("mouseup", m, !1), document.addEventListener("mousedown", g, !1), document.onkeydown = v)); };
7119
+ }, { "./MxDrawData": 40, "./MxFun": 45, "./MxJigCmdManager": 48, "./MxManager": 51, "./MxUiVue": 64, three: 19 }], 66: [function (e, t, n) {
6976
7120
  "use strict";
6977
7121
  Object.defineProperty(n, "__esModule", { value: !0 });
6978
7122
  var i = e("./MxFun");
@@ -6982,20 +7126,39 @@ function mxfun() { !function a(o, s, l) { function c(e, t) { if (!s[e]) {
6982
7126
  var t = i.MxFun.getUiObject();
6983
7127
  null != t && t.writeUICSS();
6984
7128
  } "undefined" == typeof MxDocumentReady ? $(document).ready(function () { r.CreateMx(); }) : MxDocumentReady(e, r.CreateMx); }, r).Main();
6985
- }, { "./MxFun": 39 }], 61: [function (t, e, n) {
7129
+ }, { "./MxFun": 45 }], 67: [function (t, e, n) {
6986
7130
  "use strict";
7131
+ var i, r = this && this.__extends || (i = function (t, e) { return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function (t, e) { t.__proto__ = e; } || function (t, e) { for (var n in e)
7132
+ Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]); })(t, e); }, function (t, e) { if ("function" != typeof e && null !== e)
7133
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null"); function n() { this.constructor = t; } i(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n); });
6987
7134
  Object.defineProperty(n, "__esModule", { value: !0 }), n.MxTest = void 0;
6988
- var i = t("../MrxDbgUiPrBase"), r = t("../MrxDbgUiPrPoint"), o = t("../MxThreeJS"), s = t("three"), l = t("../MxFun");
6989
- function a(t) { var a = new r.MrxDbgUiPrPoint; a.setMessage("\n指定第一点:"), a.go(function (t) { if (0 == t) {
6990
- var r = a.value(), n = new s.Vector3;
7135
+ var a, o = t("../MrxDbgUiPrBase"), s = t("../MrxDbgUiPrPoint"), l = t("../MxThreeJS"), c = t("three"), u = t("../MxFun"), h = t("../MxDbEntity"), d = (a = h.MxDbEntityUserObject, r(p, a), p.prototype.worldDraw = function (t) { t.drawCircle(this.pt, this.r); var e = new c.Vector3(this.pt.x - this.r, this.pt.y - this.r, 0), n = new c.Vector3(this.pt.x + this.r, this.pt.y + this.r, 0), i = new c.Vector3(e.x, n.y); new c.Vector3(n.x, e.y), t.drawLine(e, i), t.drawLine2(e.x, e.y, n.x, n.y), t.drawText("Test", t.getMxObject().screenCoordLong2World(50), 0, e); }, p.prototype.setPoint = function (t) { this.pt = t; }, p.prototype.setR = function (t) { this.r = t; }, p.prototype.getTypeName = function () { return "MxDbTest"; }, p.prototype.getGripPoints = function () { var t = []; return t.push(this.pt), t; }, p.prototype.moveGripPointsAt = function (t, e) { return 0 == t && this.pt.add(e), !0; }, p.prototype.dwgIn = function (t) { return a.prototype.dwgIn.call(this, t), this.pt.copy(t.pt), this.r = t.r, !0; }, p.prototype.dwgOut = function (t) { return a.prototype.dwgOut.call(this, t), t.pt = this.pt, t.r = this.r, t; }, p.prototype.create = function () { return new p; }, p);
7136
+ function p() { var t = null !== a && a.apply(this, arguments) || this; return t.pt = new c.Vector3, t.r = 100, t; }
7137
+ function f(t) { var a = new s.MrxDbgUiPrPoint; a.setMessage("\n指定第一点:"), a.go(function (t) { if (0 == t) {
7138
+ var r = a.value(), n = new c.Vector3;
6991
7139
  n.x = r.x, n.y = r.y;
6992
- var e = new i.McEdGetPointWorldDrawObject;
7140
+ var e = new o.McEdGetPointWorldDrawObject;
6993
7141
  e.setDraw(function (t, e) { e.setColor(255), e.drawLine(t, n); }), a.setUserDraw(e), a.setMessage("\n指定下一点:"), a.go(function (t) { if (0 == t) {
6994
- var e = a.value(), n = l.MxFun.getCurrentDraw(), i = o.MxThreeJS.createLine(r, e, 16777215);
7142
+ var e = a.value(), n = u.MxFun.getCurrentDraw(), i = l.MxThreeJS.createLine(r, e, 16777215);
6995
7143
  n.addObject(i);
6996
7144
  } });
6997
7145
  } }); }
6998
- (n.MxTest || (n.MxTest = {})).registerCommand = function () { l.MxFun.addCommand("MxTest_GetPoint", a); };
6999
- }, { "../MrxDbgUiPrBase": 21, "../MrxDbgUiPrPoint": 22, "../MxFun": 39, "../MxThreeJS": 52, three: 19 }] }, {}, [60]); }
7146
+ function m() { var i = new s.MrxDbgUiPrPoint; i.setMessage("\n指定第一点:"), i.go(function (t) { if (0 == t) {
7147
+ var e = u.MxFun.getCurrentDraw(), n = new d;
7148
+ n.setColor(65297), n.setPoint(i.value()), n.setR(e.docCoordLong2World(100)), e.addMxEntity(n);
7149
+ } }); }
7150
+ (n.MxTest || (n.MxTest = {})).registerCommand = function () { console.log("regist mx test"), u.MxFun.addCommand("MxTest_GetPoint", f), u.MxFun.addCommand("MxTest_DrawCustomEntity", m), u.MxFun.addWindowsEvent(function (t, e) { if ("mouseup" == t) {
7151
+ if (u.MxFun.isRunningCommand())
7152
+ return 0;
7153
+ if (0 != e.button)
7154
+ return 0;
7155
+ var n = e.srcElement;
7156
+ if (n && "CANVAS" == n.tagName) {
7157
+ var i = u.MxFun.getCurrentDraw(), r = new c.Vector3(e.offsetX, e.offsetY, 0);
7158
+ i.findMxEntityAtPoint(r).length && e.preventDefault();
7159
+ }
7160
+ return 0;
7161
+ } }); };
7162
+ }, { "../MrxDbgUiPrBase": 22, "../MrxDbgUiPrPoint": 23, "../MxDbEntity": 35, "../MxFun": 45, "../MxThreeJS": 58, three: 19 }] }, {}, [66]); }
7000
7163
  exports.default = mxfun;
7001
7164
  //# sourceMappingURL=mxfun.es5.js.map