@roomle/web-sdk 3.7.0-alpha.3 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/lib/{BufferGeometry-C696z6r3.mjs → BufferGeometry-BzmfTBQt.mjs} +1 -1
  2. package/lib/{BufferGeometry-C696z6r3.mjs.map → BufferGeometry-BzmfTBQt.mjs.map} +1 -1
  3. package/lib/ConfiguratorKernel.wasm +0 -0
  4. package/lib/{GLTFExporter-AfQIvZAD.mjs → GLTFExporter-CyhgWPq0.mjs} +2 -2
  5. package/lib/{GLTFExporter-AfQIvZAD.mjs.map → GLTFExporter-CyhgWPq0.mjs.map} +1 -1
  6. package/lib/{PointLightHelper-wVSmrAnD.mjs → PointLightHelper-DwIXACyT.mjs} +2 -2
  7. package/lib/{PointLightHelper-wVSmrAnD.mjs.map → PointLightHelper-DwIXACyT.mjs.map} +1 -1
  8. package/lib/RoomleCore.js +2 -2
  9. package/lib/RoomleCore.wasm +0 -0
  10. package/lib/RoomleToolsCore.wasm +0 -0
  11. package/lib/{SpotLightHelper-C7J95t4f.mjs → SpotLightHelper-CfLHM7LU.mjs} +2 -2
  12. package/lib/{SpotLightHelper-C7J95t4f.mjs.map → SpotLightHelper-CfLHM7LU.mjs.map} +1 -1
  13. package/lib/{USDZExporter-BBk0APeK.mjs → USDZExporter-kmxcTvnQ.mjs} +2 -2
  14. package/lib/{USDZExporter-BBk0APeK.mjs.map → USDZExporter-kmxcTvnQ.mjs.map} +1 -1
  15. package/lib/{api-DgXsyN04.mjs → api-X1dDTDvL.mjs} +2 -2
  16. package/lib/{api-DgXsyN04.mjs.map → api-X1dDTDvL.mjs.map} +1 -1
  17. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +1 -1
  18. package/lib/{banana-for-scale-D8t2dmc7.mjs → banana-for-scale-Bpf8RfLi.mjs} +4 -4
  19. package/lib/{banana-for-scale-D8t2dmc7.mjs.map → banana-for-scale-Bpf8RfLi.mjs.map} +1 -1
  20. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +1 -1
  21. package/lib/budgeteer.sw.js +1 -1
  22. package/lib/{common-utils-qErzZAiR.mjs → common-utils-DMI8Yuhe.mjs} +5 -3
  23. package/lib/common-utils-DMI8Yuhe.mjs.map +1 -0
  24. package/lib/{component-dimensioning-DlB7-9Om.mjs → component-dimensioning-MtS9xiY-.mjs} +15 -15
  25. package/lib/{component-dimensioning-DlB7-9Om.mjs.map → component-dimensioning-MtS9xiY-.mjs.map} +1 -1
  26. package/lib/{component-raycast-helper-C6ptEb0K.mjs → component-raycast-helper-C1qWqpRH.mjs} +13 -9
  27. package/lib/component-raycast-helper-C1qWqpRH.mjs.map +1 -0
  28. package/lib/configurator-C5t3clCx.mjs +2 -0
  29. package/lib/{configurator-CmMBHkyd.mjs → configurator-Cg1a9XSL.mjs} +4 -4
  30. package/lib/{configurator-CmMBHkyd.mjs.map → configurator-Cg1a9XSL.mjs.map} +1 -1
  31. package/lib/{continuous-drawing-helper-BwulJHKj.mjs → continuous-drawing-helper-CQx5Sbns.mjs} +3 -3
  32. package/lib/{continuous-drawing-helper-BwulJHKj.mjs.map → continuous-drawing-helper-CQx5Sbns.mjs.map} +1 -1
  33. package/lib/{dat.gui.module-CZHqOVGq.mjs → dat.gui.module-CZ-DIWHM.mjs} +1 -1
  34. package/lib/{dat.gui.module-CZHqOVGq.mjs.map → dat.gui.module-CZ-DIWHM.mjs.map} +1 -1
  35. package/lib/{decorate-BAtqSPNS.mjs → decorate-Bck1_lG8.mjs} +1 -1
  36. package/lib/{decorate-BAtqSPNS.mjs.map → decorate-Bck1_lG8.mjs.map} +1 -1
  37. package/lib/dimensioning-helper-Bfe0fImX.mjs +2 -0
  38. package/lib/{dimensioning-helper--Y0Y-Wr1.mjs → dimensioning-helper-GPn7Z8GE.mjs} +7 -7
  39. package/lib/{dimensioning-helper--Y0Y-Wr1.mjs.map → dimensioning-helper-GPn7Z8GE.mjs.map} +1 -1
  40. package/lib/glb-viewer-DIEpkrvY.mjs +2 -0
  41. package/lib/{glb-viewer-Cs3i0yb8.mjs → glb-viewer-tgKOPCaI.mjs} +44 -45
  42. package/lib/glb-viewer-tgKOPCaI.mjs.map +1 -0
  43. package/lib/highlight-coordinator-DRHeEU-E.mjs +116 -0
  44. package/lib/highlight-coordinator-DRHeEU-E.mjs.map +1 -0
  45. package/lib/{homag-intelligence-CBZujG1I.mjs → homag-intelligence-D5mCTWgG.mjs} +19 -11
  46. package/lib/homag-intelligence-D5mCTWgG.mjs.map +1 -0
  47. package/lib/{imos-ix-poc-export-helper-CW7QZhhn.mjs → imos-ix-poc-export-helper-BKFs_Yhm.mjs} +5 -5
  48. package/lib/{imos-ix-poc-export-helper-CW7QZhhn.mjs.map → imos-ix-poc-export-helper-BKFs_Yhm.mjs.map} +1 -1
  49. package/lib/kernel-C7YDLxq8.mjs.map +1 -1
  50. package/lib/{kernel-utils-DCnHzW4n.mjs → kernel-utils-B80amC-l.mjs} +2 -2
  51. package/lib/{kernel-utils-DCnHzW4n.mjs.map → kernel-utils-B80amC-l.mjs.map} +1 -1
  52. package/lib/{layer-CFAr2mK_.mjs → layer-BfckfWZz.mjs} +1 -1
  53. package/lib/{layer-CFAr2mK_.mjs.map → layer-BfckfWZz.mjs.map} +1 -1
  54. package/lib/{main-_HtiLIhS.mjs → main-CJ5TNhBt.mjs} +2484 -2533
  55. package/lib/main-CJ5TNhBt.mjs.map +1 -0
  56. package/lib/{material-viewer-BCjg687R.mjs → material-viewer-DCqZzMZN.mjs} +40 -35
  57. package/lib/material-viewer-DCqZzMZN.mjs.map +1 -0
  58. package/lib/packages-DuOz6rk6.mjs +4 -0
  59. package/lib/{planner-OYwMFSWo.mjs → planner-CSboZram.mjs} +3 -3
  60. package/lib/{planner-OYwMFSWo.mjs.map → planner-CSboZram.mjs.map} +1 -1
  61. package/lib/planner-CWPqJktz.mjs +2 -0
  62. package/lib/{plugin-system-DInww4H_.mjs → plugin-system-DD0Z9Jvt.mjs} +3 -3
  63. package/lib/{plugin-system-DInww4H_.mjs.map → plugin-system-DD0Z9Jvt.mjs.map} +1 -1
  64. package/lib/{roomle-headless-setup-LoBO7UJe.mjs → roomle-headless-setup-nsoGENQV.mjs} +1 -1
  65. package/lib/{roomle-headless-setup-LoBO7UJe.mjs.map → roomle-headless-setup-nsoGENQV.mjs.map} +1 -1
  66. package/lib/roomle-headless.d.ts +185 -63
  67. package/lib/roomle-headless.js +9 -9
  68. package/lib/{roomle-renderer-DVlJsHYn.mjs → roomle-renderer-BEJNPCKx.mjs} +2 -2
  69. package/lib/roomle-renderer-BEJNPCKx.mjs.map +1 -0
  70. package/lib/roomle-sdk.d.ts +185 -63
  71. package/lib/roomle-sdk.js +6 -6
  72. package/lib/roomle-webgpu-renderer-D5flithq.mjs +1502 -0
  73. package/lib/roomle-webgpu-renderer-D5flithq.mjs.map +1 -0
  74. package/lib/{scene-renderer-BHZrQYAH.mjs → scene-renderer-Dm1kij1z.mjs} +26 -26
  75. package/lib/scene-renderer-Dm1kij1z.mjs.map +1 -0
  76. package/lib/{script-loader-X4I-gQl2.mjs → script-loader-DqaDm1FG.mjs} +3 -3
  77. package/lib/{script-loader-X4I-gQl2.mjs.map → script-loader-DqaDm1FG.mjs.map} +1 -1
  78. package/lib/static/packages/workers/generated/budgeteer.sw.js +1 -1
  79. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  80. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCallback.d.ts +2 -2
  81. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCallback.js +1 -1
  82. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCallback.js.map +1 -1
  83. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +18 -6
  84. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorUtils.js +15 -11
  85. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorUtils.js.map +1 -1
  86. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.d.ts +1 -1
  87. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.js +1 -1
  88. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreCallback.js.map +1 -1
  89. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +21 -12
  90. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/planElementManager.js +1 -1
  91. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/loader/planElementManager.js.map +1 -1
  92. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  93. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +2 -2
  94. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  95. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  96. package/lib/{stats-helper-Cv5SoEWT.mjs → stats-helper-D7a7oxnj.mjs} +3 -3
  97. package/lib/{stats-helper-Cv5SoEWT.mjs.map → stats-helper-D7a7oxnj.mjs.map} +1 -1
  98. package/lib/{three.core-mM-jZdgg.mjs → three.core-BmQnspOL.mjs} +819 -816
  99. package/lib/{three.core-mM-jZdgg.mjs.map → three.core-BmQnspOL.mjs.map} +1 -1
  100. package/lib/{three.module-Bmy3sVQ-.mjs → three.module-DkrZwaid.mjs} +455 -455
  101. package/lib/{three.module-Bmy3sVQ-.mjs.map → three.module-DkrZwaid.mjs.map} +1 -1
  102. package/lib/{three.webgpu-BbVYfCDp.mjs → three.webgpu-DLZjhIYv.mjs} +1517 -1517
  103. package/lib/{three.webgpu-BbVYfCDp.mjs.map → three.webgpu-DLZjhIYv.mjs.map} +1 -1
  104. package/lib/three.webgpu-RkQxSIwG.mjs +3 -0
  105. package/lib/{threejs-utils-Bq4pVWBA.mjs → threejs-utils-CrK_gp1x.mjs} +67 -63
  106. package/lib/{threejs-utils-Bq4pVWBA.mjs.map → threejs-utils-CrK_gp1x.mjs.map} +1 -1
  107. package/lib/{tools-core-BRzDdhLJ.mjs → tools-core-CZWgXTFV.mjs} +3 -3
  108. package/lib/{tools-core-BRzDdhLJ.mjs.map → tools-core-CZWgXTFV.mjs.map} +1 -1
  109. package/package.json +1 -1
  110. package/lib/common-utils-qErzZAiR.mjs.map +0 -1
  111. package/lib/component-raycast-helper-C6ptEb0K.mjs.map +0 -1
  112. package/lib/component-raycast-helper-LrhRpeDD.mjs +0 -2
  113. package/lib/configurator-DtvX4JqP.mjs +0 -2
  114. package/lib/dimensioning-helper-BpUreWo2.mjs +0 -2
  115. package/lib/glb-viewer-Cs3i0yb8.mjs.map +0 -1
  116. package/lib/glb-viewer-Dcllu_oG.mjs +0 -2
  117. package/lib/homag-intelligence-CBZujG1I.mjs.map +0 -1
  118. package/lib/main-_HtiLIhS.mjs.map +0 -1
  119. package/lib/material-viewer-BCjg687R.mjs.map +0 -1
  120. package/lib/packages-BhrPUb9k.mjs +0 -4
  121. package/lib/planner-CDJtTG3g.mjs +0 -2
  122. package/lib/roomle-renderer-DVlJsHYn.mjs.map +0 -1
  123. package/lib/roomle-webgpu-renderer-CVxBRv6o.mjs +0 -217
  124. package/lib/roomle-webgpu-renderer-CVxBRv6o.mjs.map +0 -1
  125. package/lib/scene-renderer-BHZrQYAH.mjs.map +0 -1
  126. package/lib/three.webgpu-Bnp8Whu8.mjs +0 -3
@@ -17,11 +17,14 @@ function yt() {
17
17
  return e.style.display = "block", e;
18
18
  }
19
19
  var bt = {}, xt = null;
20
- function St(...e) {
20
+ function St(e) {
21
+ xt = e;
22
+ }
23
+ function Ct(...e) {
21
24
  let t = "THREE." + e.shift();
22
25
  xt ? xt("log", t, ...e) : console.log(t, ...e);
23
26
  }
24
- function Ct(e) {
27
+ function wt(e) {
25
28
  let t = e[0];
26
29
  if (typeof t == "string" && t.startsWith("TSL:")) {
27
30
  let t = e[1];
@@ -30,7 +33,7 @@ function Ct(e) {
30
33
  return e;
31
34
  }
32
35
  function k(...e) {
33
- e = Ct(e);
36
+ e = wt(e);
34
37
  let t = "THREE." + e.shift();
35
38
  if (xt) xt("warn", t, ...e);
36
39
  else {
@@ -39,7 +42,7 @@ function k(...e) {
39
42
  }
40
43
  }
41
44
  function A(...e) {
42
- e = Ct(e);
45
+ e = wt(e);
43
46
  let t = "THREE." + e.shift();
44
47
  if (xt) xt("error", t, ...e);
45
48
  else {
@@ -47,11 +50,11 @@ function A(...e) {
47
50
  n && n.isStackTrace ? console.error(n.getError(t)) : console.error(t, ...e);
48
51
  }
49
52
  }
50
- function wt(...e) {
53
+ function Tt(...e) {
51
54
  let t = e.join(" ");
52
55
  t in bt || (bt[t] = !0, k(...e));
53
56
  }
54
- function Tt(e, t, n) {
57
+ function Et(e, t, n) {
55
58
  return new Promise(function(r, i) {
56
59
  function a() {
57
60
  switch (e.clientWaitSync(t, e.SYNC_FLUSH_COMMANDS_BIT, 0)) {
@@ -67,7 +70,7 @@ function Tt(e, t, n) {
67
70
  setTimeout(a, n);
68
71
  });
69
72
  }
70
- var Et = {
73
+ var Dt = {
71
74
  0: 1,
72
75
  2: 6,
73
76
  4: 7,
@@ -76,7 +79,7 @@ var Et = {
76
79
  6: 2,
77
80
  7: 4,
78
81
  5: 3
79
- }, Dt = class {
82
+ }, Ot = class {
80
83
  addEventListener(e, t) {
81
84
  this._listeners === void 0 && (this._listeners = {});
82
85
  let n = this._listeners;
@@ -106,68 +109,68 @@ var Et = {
106
109
  e.target = null;
107
110
  }
108
111
  }
109
- }, j = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split("."), Ot = 1234567, kt = Math.PI / 180, At = 180 / Math.PI;
110
- function jt() {
112
+ }, j = /* @__PURE__ */ "00.01.02.03.04.05.06.07.08.09.0a.0b.0c.0d.0e.0f.10.11.12.13.14.15.16.17.18.19.1a.1b.1c.1d.1e.1f.20.21.22.23.24.25.26.27.28.29.2a.2b.2c.2d.2e.2f.30.31.32.33.34.35.36.37.38.39.3a.3b.3c.3d.3e.3f.40.41.42.43.44.45.46.47.48.49.4a.4b.4c.4d.4e.4f.50.51.52.53.54.55.56.57.58.59.5a.5b.5c.5d.5e.5f.60.61.62.63.64.65.66.67.68.69.6a.6b.6c.6d.6e.6f.70.71.72.73.74.75.76.77.78.79.7a.7b.7c.7d.7e.7f.80.81.82.83.84.85.86.87.88.89.8a.8b.8c.8d.8e.8f.90.91.92.93.94.95.96.97.98.99.9a.9b.9c.9d.9e.9f.a0.a1.a2.a3.a4.a5.a6.a7.a8.a9.aa.ab.ac.ad.ae.af.b0.b1.b2.b3.b4.b5.b6.b7.b8.b9.ba.bb.bc.bd.be.bf.c0.c1.c2.c3.c4.c5.c6.c7.c8.c9.ca.cb.cc.cd.ce.cf.d0.d1.d2.d3.d4.d5.d6.d7.d8.d9.da.db.dc.dd.de.df.e0.e1.e2.e3.e4.e5.e6.e7.e8.e9.ea.eb.ec.ed.ee.ef.f0.f1.f2.f3.f4.f5.f6.f7.f8.f9.fa.fb.fc.fd.fe.ff".split("."), kt = 1234567, At = Math.PI / 180, jt = 180 / Math.PI;
113
+ function Mt() {
111
114
  let e = Math.random() * 4294967295 | 0, t = Math.random() * 4294967295 | 0, n = Math.random() * 4294967295 | 0, r = Math.random() * 4294967295 | 0;
112
115
  return (j[e & 255] + j[e >> 8 & 255] + j[e >> 16 & 255] + j[e >> 24 & 255] + "-" + j[t & 255] + j[t >> 8 & 255] + "-" + j[t >> 16 & 15 | 64] + j[t >> 24 & 255] + "-" + j[n & 63 | 128] + j[n >> 8 & 255] + "-" + j[n >> 16 & 255] + j[n >> 24 & 255] + j[r & 255] + j[r >> 8 & 255] + j[r >> 16 & 255] + j[r >> 24 & 255]).toLowerCase();
113
116
  }
114
117
  function M(e, t, n) {
115
118
  return Math.max(t, Math.min(n, e));
116
119
  }
117
- function Mt(e, t) {
120
+ function Nt(e, t) {
118
121
  return (e % t + t) % t;
119
122
  }
120
- function Nt(e, t, n, r, i) {
123
+ function Pt(e, t, n, r, i) {
121
124
  return r + (e - t) * (i - r) / (n - t);
122
125
  }
123
- function Pt(e, t, n) {
126
+ function Ft(e, t, n) {
124
127
  return e === t ? 0 : (n - e) / (t - e);
125
128
  }
126
- function Ft(e, t, n) {
129
+ function It(e, t, n) {
127
130
  return (1 - n) * e + n * t;
128
131
  }
129
- function It(e, t, n, r) {
130
- return Ft(e, t, 1 - Math.exp(-n * r));
132
+ function Lt(e, t, n, r) {
133
+ return It(e, t, 1 - Math.exp(-n * r));
131
134
  }
132
- function Lt(e, t = 1) {
133
- return t - Math.abs(Mt(e, t * 2) - t);
135
+ function Rt(e, t = 1) {
136
+ return t - Math.abs(Nt(e, t * 2) - t);
134
137
  }
135
- function Rt(e, t, n) {
138
+ function zt(e, t, n) {
136
139
  return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t), e * e * (3 - 2 * e));
137
140
  }
138
- function zt(e, t, n) {
141
+ function Bt(e, t, n) {
139
142
  return e <= t ? 0 : e >= n ? 1 : (e = (e - t) / (n - t), e * e * e * (e * (e * 6 - 15) + 10));
140
143
  }
141
- function Bt(e, t) {
144
+ function Vt(e, t) {
142
145
  return e + Math.floor(Math.random() * (t - e + 1));
143
146
  }
144
- function Vt(e, t) {
147
+ function Ht(e, t) {
145
148
  return e + Math.random() * (t - e);
146
149
  }
147
- function Ht(e) {
148
- return e * (.5 - Math.random());
149
- }
150
150
  function Ut(e) {
151
- e !== void 0 && (Ot = e);
152
- let t = Ot += 1831565813;
153
- return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
151
+ return e * (.5 - Math.random());
154
152
  }
155
153
  function Wt(e) {
156
- return e * kt;
154
+ e !== void 0 && (kt = e);
155
+ let t = kt += 1831565813;
156
+ return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
157
157
  }
158
158
  function Gt(e) {
159
159
  return e * At;
160
160
  }
161
161
  function Kt(e) {
162
- return (e & e - 1) == 0 && e !== 0;
162
+ return e * jt;
163
163
  }
164
164
  function qt(e) {
165
- return 2 ** Math.ceil(Math.log(e) / Math.LN2);
165
+ return (e & e - 1) == 0 && e !== 0;
166
166
  }
167
167
  function Jt(e) {
168
+ return 2 ** Math.ceil(Math.log(e) / Math.LN2);
169
+ }
170
+ function Yt(e) {
168
171
  return 2 ** Math.floor(Math.log(e) / Math.LN2);
169
172
  }
170
- function Yt(e, t, n, r, i) {
173
+ function Xt(e, t, n, r, i) {
171
174
  let a = Math.cos, o = Math.sin, s = a(n / 2), c = o(n / 2), l = a((t + r) / 2), u = o((t + r) / 2), d = a((t - r) / 2), f = o((t - r) / 2), p = a((r - t) / 2), m = o((r - t) / 2);
172
175
  switch (i) {
173
176
  case "XYX":
@@ -215,29 +218,29 @@ function P(e, t) {
215
218
  default: throw Error("Invalid component type.");
216
219
  }
217
220
  }
218
- var Xt = {
219
- DEG2RAD: kt,
220
- RAD2DEG: At,
221
- generateUUID: jt,
221
+ var Zt = {
222
+ DEG2RAD: At,
223
+ RAD2DEG: jt,
224
+ generateUUID: Mt,
222
225
  clamp: M,
223
- euclideanModulo: Mt,
224
- mapLinear: Nt,
225
- inverseLerp: Pt,
226
- lerp: Ft,
227
- damp: It,
228
- pingpong: Lt,
229
- smoothstep: Rt,
230
- smootherstep: zt,
231
- randInt: Bt,
232
- randFloat: Vt,
233
- randFloatSpread: Ht,
234
- seededRandom: Ut,
235
- degToRad: Wt,
236
- radToDeg: Gt,
237
- isPowerOfTwo: Kt,
238
- ceilPowerOfTwo: qt,
239
- floorPowerOfTwo: Jt,
240
- setQuaternionFromProperEuler: Yt,
226
+ euclideanModulo: Nt,
227
+ mapLinear: Pt,
228
+ inverseLerp: Ft,
229
+ lerp: It,
230
+ damp: Lt,
231
+ pingpong: Rt,
232
+ smoothstep: zt,
233
+ smootherstep: Bt,
234
+ randInt: Vt,
235
+ randFloat: Ht,
236
+ randFloatSpread: Ut,
237
+ seededRandom: Wt,
238
+ degToRad: Gt,
239
+ radToDeg: Kt,
240
+ isPowerOfTwo: qt,
241
+ ceilPowerOfTwo: Jt,
242
+ floorPowerOfTwo: Yt,
243
+ setQuaternionFromProperEuler: Xt,
241
244
  normalize: P,
242
245
  denormalize: N
243
246
  }, F = class e {
@@ -429,7 +432,7 @@ var Xt = {
429
432
  *[Symbol.iterator]() {
430
433
  yield this.x, yield this.y;
431
434
  }
432
- }, Zt = class {
435
+ }, Qt = class {
433
436
  constructor(e = 0, t = 0, n = 0, r = 1) {
434
437
  this.isQuaternion = !0, this._x = e, this._y = t, this._z = n, this._w = r;
435
438
  }
@@ -696,10 +699,10 @@ var Xt = {
696
699
  return this.x = e.x * t.x, this.y = e.y * t.y, this.z = e.z * t.z, this;
697
700
  }
698
701
  applyEuler(e) {
699
- return this.applyQuaternion($t.setFromEuler(e));
702
+ return this.applyQuaternion(en.setFromEuler(e));
700
703
  }
701
704
  applyAxisAngle(e, t) {
702
- return this.applyQuaternion($t.setFromAxisAngle(e, t));
705
+ return this.applyQuaternion(en.setFromAxisAngle(e, t));
703
706
  }
704
707
  applyMatrix3(e) {
705
708
  let t = this.x, n = this.y, r = this.z, i = e.elements;
@@ -801,10 +804,10 @@ var Xt = {
801
804
  return this.copy(e).multiplyScalar(n);
802
805
  }
803
806
  projectOnPlane(e) {
804
- return Qt.copy(this).projectOnVector(e), this.sub(Qt);
807
+ return $t.copy(this).projectOnVector(e), this.sub($t);
805
808
  }
806
809
  reflect(e) {
807
- return this.sub(Qt.copy(e).multiplyScalar(2 * this.dot(e)));
810
+ return this.sub($t.copy(e).multiplyScalar(2 * this.dot(e)));
808
811
  }
809
812
  angleTo(e) {
810
813
  let t = Math.sqrt(this.lengthSq() * e.lengthSq());
@@ -877,7 +880,7 @@ var Xt = {
877
880
  *[Symbol.iterator]() {
878
881
  yield this.x, yield this.y, yield this.z;
879
882
  }
880
- }, Qt = /* @__PURE__ */ new I(), $t = /* @__PURE__ */ new Zt(), en = class e {
883
+ }, $t = /* @__PURE__ */ new I(), en = /* @__PURE__ */ new Qt(), tn = class e {
881
884
  constructor(t, n, r, i, a, o, s, c, l) {
882
885
  e.prototype.isMatrix3 = !0, this.elements = [
883
886
  1,
@@ -949,13 +952,13 @@ var Xt = {
949
952
  return this.set(n * s, n * c, -n * (s * a + c * o) + a + e, -r * c, r * s, -r * (-c * a + s * o) + o + t, 0, 0, 1), this;
950
953
  }
951
954
  scale(e, t) {
952
- return this.premultiply(tn.makeScale(e, t)), this;
955
+ return this.premultiply(nn.makeScale(e, t)), this;
953
956
  }
954
957
  rotate(e) {
955
- return this.premultiply(tn.makeRotation(-e)), this;
958
+ return this.premultiply(nn.makeRotation(-e)), this;
956
959
  }
957
960
  translate(e, t) {
958
- return this.premultiply(tn.makeTranslation(e, t)), this;
961
+ return this.premultiply(nn.makeTranslation(e, t)), this;
959
962
  }
960
963
  makeTranslation(e, t) {
961
964
  return e.isVector2 ? this.set(1, 0, e.x, 0, 1, e.y, 0, 0, 1) : this.set(1, 0, e, 0, 1, t, 0, 0, 1), this;
@@ -983,14 +986,14 @@ var Xt = {
983
986
  clone() {
984
987
  return new this.constructor().fromArray(this.elements);
985
988
  }
986
- }, tn = /* @__PURE__ */ new en(), nn = /* @__PURE__ */ new en().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), rn = /* @__PURE__ */ new en().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
987
- function an() {
989
+ }, nn = /* @__PURE__ */ new tn(), rn = /* @__PURE__ */ new tn().set(.4123908, .3575843, .1804808, .212639, .7151687, .0721923, .0193308, .1191948, .9505322), an = /* @__PURE__ */ new tn().set(3.2409699, -1.5373832, -.4986108, -.9692436, 1.8759675, .0415551, .0556301, -.203977, 1.0569715);
990
+ function on() {
988
991
  let e = {
989
992
  enabled: !0,
990
993
  workingColorSpace: $e,
991
994
  spaces: {},
992
995
  convert: function(e, t, n) {
993
- return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = on(e.r), e.g = on(e.g), e.b = on(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = sn(e.r), e.g = sn(e.g), e.b = sn(e.b)), e);
996
+ return this.enabled === !1 || t === n || !t || !n ? e : (this.spaces[t].transfer === "srgb" && (e.r = cn(e.r), e.g = cn(e.g), e.b = cn(e.b)), this.spaces[t].primaries !== this.spaces[n].primaries && (e.applyMatrix3(this.spaces[t].toXYZ), e.applyMatrix3(this.spaces[n].fromXYZ)), this.spaces[n].transfer === "srgb" && (e.r = ln(e.r), e.g = ln(e.g), e.b = ln(e.b)), e);
994
997
  },
995
998
  workingToColorSpace: function(e, t) {
996
999
  return this.convert(e, this.workingColorSpace, t);
@@ -1023,10 +1026,10 @@ function an() {
1023
1026
  return this.spaces[e].workingColorSpaceConfig.unpackColorSpace;
1024
1027
  },
1025
1028
  fromWorkingColorSpace: function(t, n) {
1026
- return wt("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
1029
+ return Tt("ColorManagement: .fromWorkingColorSpace() has been renamed to .workingToColorSpace()."), e.workingToColorSpace(t, n);
1027
1030
  },
1028
1031
  toWorkingColorSpace: function(t, n) {
1029
- return wt("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
1032
+ return Tt("ColorManagement: .toWorkingColorSpace() has been renamed to .colorSpaceToWorking()."), e.colorSpaceToWorking(t, n);
1030
1033
  }
1031
1034
  }, t = [
1032
1035
  .64,
@@ -1045,8 +1048,8 @@ function an() {
1045
1048
  primaries: t,
1046
1049
  whitePoint: r,
1047
1050
  transfer: et,
1048
- toXYZ: nn,
1049
- fromXYZ: rn,
1051
+ toXYZ: rn,
1052
+ fromXYZ: an,
1050
1053
  luminanceCoefficients: n,
1051
1054
  workingColorSpaceConfig: { unpackColorSpace: Qe },
1052
1055
  outputColorSpaceConfig: { drawingBufferColorSpace: Qe }
@@ -1055,29 +1058,29 @@ function an() {
1055
1058
  primaries: t,
1056
1059
  whitePoint: r,
1057
1060
  transfer: tt,
1058
- toXYZ: nn,
1059
- fromXYZ: rn,
1061
+ toXYZ: rn,
1062
+ fromXYZ: an,
1060
1063
  luminanceCoefficients: n,
1061
1064
  outputColorSpaceConfig: { drawingBufferColorSpace: Qe }
1062
1065
  }
1063
1066
  }), e;
1064
1067
  }
1065
- var L = /* @__PURE__ */ an();
1066
- function on(e) {
1068
+ var sn = /* @__PURE__ */ on();
1069
+ function cn(e) {
1067
1070
  return e < .04045 ? e * .0773993808 : (e * .9478672986 + .0521327014) ** 2.4;
1068
1071
  }
1069
- function sn(e) {
1072
+ function ln(e) {
1070
1073
  return e < .0031308 ? e * 12.92 : 1.055 * e ** .41666 - .055;
1071
1074
  }
1072
- var cn, ln = class {
1075
+ var un, dn = class {
1073
1076
  static getDataURL(e, t = "image/png") {
1074
1077
  if (/^data:/i.test(e.src) || typeof HTMLCanvasElement > "u") return e.src;
1075
1078
  let n;
1076
1079
  if (e instanceof HTMLCanvasElement) n = e;
1077
1080
  else {
1078
- cn === void 0 && (cn = vt("canvas")), cn.width = e.width, cn.height = e.height;
1079
- let t = cn.getContext("2d");
1080
- e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = cn;
1081
+ un === void 0 && (un = vt("canvas")), un.width = e.width, un.height = e.height;
1082
+ let t = un.getContext("2d");
1083
+ e instanceof ImageData ? t.putImageData(e, 0, 0) : t.drawImage(e, 0, 0, e.width, e.height), n = un;
1081
1084
  }
1082
1085
  return n.toDataURL(t);
1083
1086
  }
@@ -1088,11 +1091,11 @@ var cn, ln = class {
1088
1091
  let n = t.getContext("2d");
1089
1092
  n.drawImage(e, 0, 0, e.width, e.height);
1090
1093
  let r = n.getImageData(0, 0, e.width, e.height), i = r.data;
1091
- for (let e = 0; e < i.length; e++) i[e] = on(i[e] / 255) * 255;
1094
+ for (let e = 0; e < i.length; e++) i[e] = cn(i[e] / 255) * 255;
1092
1095
  return n.putImageData(r, 0, 0), t;
1093
1096
  } else if (e.data) {
1094
1097
  let t = e.data.slice(0);
1095
- for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(on(t[e] / 255) * 255) : t[e] = on(t[e]);
1098
+ for (let e = 0; e < t.length; e++) t instanceof Uint8Array || t instanceof Uint8ClampedArray ? t[e] = Math.floor(cn(t[e] / 255) * 255) : t[e] = cn(t[e]);
1096
1099
  return {
1097
1100
  data: t,
1098
1101
  width: e.width,
@@ -1100,9 +1103,9 @@ var cn, ln = class {
1100
1103
  };
1101
1104
  } else return k("ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."), e;
1102
1105
  }
1103
- }, un = 0, dn = class {
1106
+ }, fn = 0, pn = class {
1104
1107
  constructor(e = null) {
1105
- this.isSource = !0, Object.defineProperty(this, "id", { value: un++ }), this.uuid = jt(), this.data = e, this.dataReady = !0, this.version = 0;
1108
+ this.isSource = !0, Object.defineProperty(this, "id", { value: fn++ }), this.uuid = Mt(), this.data = e, this.dataReady = !0, this.version = 0;
1106
1109
  }
1107
1110
  getSize(e) {
1108
1111
  let t = this.data;
@@ -1122,33 +1125,33 @@ var cn, ln = class {
1122
1125
  let e;
1123
1126
  if (Array.isArray(r)) {
1124
1127
  e = [];
1125
- for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(fn(r[t].image)) : e.push(fn(r[t]));
1126
- } else e = fn(r);
1128
+ for (let t = 0, n = r.length; t < n; t++) r[t].isDataTexture ? e.push(mn(r[t].image)) : e.push(mn(r[t]));
1129
+ } else e = mn(r);
1127
1130
  n.url = e;
1128
1131
  }
1129
1132
  return t || (e.images[this.uuid] = n), n;
1130
1133
  }
1131
1134
  };
1132
- function fn(e) {
1133
- return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ? ln.getDataURL(e) : e.data ? {
1135
+ function mn(e) {
1136
+ return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement || typeof HTMLCanvasElement < "u" && e instanceof HTMLCanvasElement || typeof ImageBitmap < "u" && e instanceof ImageBitmap ? dn.getDataURL(e) : e.data ? {
1134
1137
  data: Array.from(e.data),
1135
1138
  width: e.width,
1136
1139
  height: e.height,
1137
1140
  type: e.data.constructor.name
1138
1141
  } : (k("Texture: Unable to serialize Texture."), {});
1139
1142
  }
1140
- var pn = 0, mn = /* @__PURE__ */ new I(), R = class e extends Dt {
1143
+ var hn = 0, gn = /* @__PURE__ */ new I(), L = class e extends Ot {
1141
1144
  constructor(t = e.DEFAULT_IMAGE, n = e.DEFAULT_MAPPING, i = r, a = r, o = c, s = u, l = D, d = f, p = e.DEFAULT_ANISOTROPY, m = "") {
1142
- super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: pn++ }), this.uuid = jt(), this.name = "", this.source = new dn(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = i, this.wrapT = a, this.magFilter = o, this.minFilter = s, this.anisotropy = p, this.format = l, this.internalFormat = null, this.type = d, this.offset = new F(0, 0), this.repeat = new F(1, 1), this.center = new F(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new en(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = m, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
1145
+ super(), this.isTexture = !0, Object.defineProperty(this, "id", { value: hn++ }), this.uuid = Mt(), this.name = "", this.source = new pn(t), this.mipmaps = [], this.mapping = n, this.channel = 0, this.wrapS = i, this.wrapT = a, this.magFilter = o, this.minFilter = s, this.anisotropy = p, this.format = l, this.internalFormat = null, this.type = d, this.offset = new F(0, 0), this.repeat = new F(1, 1), this.center = new F(0, 0), this.rotation = 0, this.matrixAutoUpdate = !0, this.matrix = new tn(), this.generateMipmaps = !0, this.premultiplyAlpha = !1, this.flipY = !0, this.unpackAlignment = 4, this.colorSpace = m, this.userData = {}, this.updateRanges = [], this.version = 0, this.onUpdate = null, this.renderTarget = null, this.isRenderTargetTexture = !1, this.isArrayTexture = !!(t && t.depth && t.depth > 1), this.pmremVersion = 0;
1143
1146
  }
1144
1147
  get width() {
1145
- return this.source.getSize(mn).x;
1148
+ return this.source.getSize(gn).x;
1146
1149
  }
1147
1150
  get height() {
1148
- return this.source.getSize(mn).y;
1151
+ return this.source.getSize(gn).y;
1149
1152
  }
1150
1153
  get depth() {
1151
- return this.source.getSize(mn).z;
1154
+ return this.source.getSize(gn).z;
1152
1155
  }
1153
1156
  get image() {
1154
1157
  return this.source.data;
@@ -1258,8 +1261,8 @@ var pn = 0, mn = /* @__PURE__ */ new I(), R = class e extends Dt {
1258
1261
  e === !0 && this.pmremVersion++;
1259
1262
  }
1260
1263
  };
1261
- R.DEFAULT_IMAGE = null, R.DEFAULT_MAPPING = 300, R.DEFAULT_ANISOTROPY = 1;
1262
- var hn = class e {
1264
+ L.DEFAULT_IMAGE = null, L.DEFAULT_MAPPING = 300, L.DEFAULT_ANISOTROPY = 1;
1265
+ var _n = class e {
1263
1266
  constructor(t = 0, n = 0, r = 0, i = 1) {
1264
1267
  e.prototype.isVector4 = !0, this.x = t, this.y = n, this.z = r, this.w = i;
1265
1268
  }
@@ -1456,7 +1459,7 @@ var hn = class e {
1456
1459
  *[Symbol.iterator]() {
1457
1460
  yield this.x, yield this.y, yield this.z, yield this.w;
1458
1461
  }
1459
- }, gn = class extends Dt {
1462
+ }, vn = class extends Ot {
1460
1463
  constructor(e = 1, t = 1, n = {}) {
1461
1464
  super(), n = Object.assign({
1462
1465
  generateMipmaps: !1,
@@ -1471,8 +1474,8 @@ var hn = class e {
1471
1474
  count: 1,
1472
1475
  depth: 1,
1473
1476
  multiview: !1
1474
- }, n), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = n.depth, this.scissor = new hn(0, 0, e, t), this.scissorTest = !1, this.viewport = new hn(0, 0, e, t), this.textures = [];
1475
- let r = new R({
1477
+ }, n), this.isRenderTarget = !0, this.width = e, this.height = t, this.depth = n.depth, this.scissor = new _n(0, 0, e, t), this.scissorTest = !1, this.viewport = new _n(0, 0, e, t), this.textures = [];
1478
+ let r = new L({
1476
1479
  width: e,
1477
1480
  height: t,
1478
1481
  depth: n.depth
@@ -1518,18 +1521,18 @@ var hn = class e {
1518
1521
  for (let t = 0, n = e.textures.length; t < n; t++) {
1519
1522
  this.textures[t] = e.textures[t].clone(), this.textures[t].isRenderTargetTexture = !0, this.textures[t].renderTarget = this;
1520
1523
  let n = Object.assign({}, e.textures[t].image);
1521
- this.textures[t].source = new dn(n);
1524
+ this.textures[t].source = new pn(n);
1522
1525
  }
1523
1526
  return this.depthBuffer = e.depthBuffer, this.stencilBuffer = e.stencilBuffer, this.resolveDepthBuffer = e.resolveDepthBuffer, this.resolveStencilBuffer = e.resolveStencilBuffer, e.depthTexture !== null && (this.depthTexture = e.depthTexture.clone()), this.samples = e.samples, this;
1524
1527
  }
1525
1528
  dispose() {
1526
1529
  this.dispatchEvent({ type: "dispose" });
1527
1530
  }
1528
- }, _n = class extends gn {
1531
+ }, yn = class extends vn {
1529
1532
  constructor(e = 1, t = 1, n = {}) {
1530
1533
  super(e, t, n), this.isWebGLRenderTarget = !0;
1531
1534
  }
1532
- }, vn = class extends R {
1535
+ }, bn = class extends L {
1533
1536
  constructor(e = null, t = 1, n = 1, i = 1) {
1534
1537
  super(null), this.isDataArrayTexture = !0, this.image = {
1535
1538
  data: e,
@@ -1544,7 +1547,7 @@ var hn = class e {
1544
1547
  clearLayerUpdates() {
1545
1548
  this.layerUpdates.clear();
1546
1549
  }
1547
- }, yn = class extends R {
1550
+ }, xn = class extends L {
1548
1551
  constructor(e = null, t = 1, n = 1, i = 1) {
1549
1552
  super(null), this.isData3DTexture = !0, this.image = {
1550
1553
  data: e,
@@ -1553,7 +1556,7 @@ var hn = class e {
1553
1556
  depth: i
1554
1557
  }, this.magFilter = a, this.minFilter = a, this.wrapR = r, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
1555
1558
  }
1556
- }, z = class e {
1559
+ }, R = class e {
1557
1560
  constructor(t, n, r, i, a, o, s, c, l, u, d, f, p, m, h, g) {
1558
1561
  e.prototype.isMatrix4 = !0, this.elements = [
1559
1562
  1,
@@ -1604,7 +1607,7 @@ var hn = class e {
1604
1607
  }
1605
1608
  extractRotation(e) {
1606
1609
  if (e.determinant() === 0) return this.identity();
1607
- let t = this.elements, n = e.elements, r = 1 / bn.setFromMatrixColumn(e, 0).length(), i = 1 / bn.setFromMatrixColumn(e, 1).length(), a = 1 / bn.setFromMatrixColumn(e, 2).length();
1610
+ let t = this.elements, n = e.elements, r = 1 / Sn.setFromMatrixColumn(e, 0).length(), i = 1 / Sn.setFromMatrixColumn(e, 1).length(), a = 1 / Sn.setFromMatrixColumn(e, 2).length();
1608
1611
  return t[0] = n[0] * r, t[1] = n[1] * r, t[2] = n[2] * r, t[3] = 0, t[4] = n[4] * i, t[5] = n[5] * i, t[6] = n[6] * i, t[7] = 0, t[8] = n[8] * a, t[9] = n[9] * a, t[10] = n[10] * a, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1609
1612
  }
1610
1613
  makeRotationFromEuler(e) {
@@ -1631,11 +1634,11 @@ var hn = class e {
1631
1634
  return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
1632
1635
  }
1633
1636
  makeRotationFromQuaternion(e) {
1634
- return this.compose(Sn, e, Cn);
1637
+ return this.compose(wn, e, Tn);
1635
1638
  }
1636
1639
  lookAt(e, t, n) {
1637
1640
  let r = this.elements;
1638
- return B.subVectors(e, t), B.lengthSq() === 0 && (B.z = 1), B.normalize(), wn.crossVectors(n, B), wn.lengthSq() === 0 && (Math.abs(n.z) === 1 ? B.x += 1e-4 : B.z += 1e-4, B.normalize(), wn.crossVectors(n, B)), wn.normalize(), Tn.crossVectors(B, wn), r[0] = wn.x, r[4] = Tn.x, r[8] = B.x, r[1] = wn.y, r[5] = Tn.y, r[9] = B.y, r[2] = wn.z, r[6] = Tn.z, r[10] = B.z, this;
1641
+ return z.subVectors(e, t), z.lengthSq() === 0 && (z.z = 1), z.normalize(), En.crossVectors(n, z), En.lengthSq() === 0 && (Math.abs(n.z) === 1 ? z.x += 1e-4 : z.z += 1e-4, z.normalize(), En.crossVectors(n, z)), En.normalize(), Dn.crossVectors(z, En), r[0] = En.x, r[4] = Dn.x, r[8] = z.x, r[1] = En.y, r[5] = Dn.y, r[9] = z.y, r[2] = En.z, r[6] = Dn.z, r[10] = z.z, this;
1639
1642
  }
1640
1643
  multiply(e) {
1641
1644
  return this.multiplyMatrices(this, e);
@@ -1711,10 +1714,10 @@ var hn = class e {
1711
1714
  e.x = r[12], e.y = r[13], e.z = r[14];
1712
1715
  let i = this.determinant();
1713
1716
  if (i === 0) return n.set(1, 1, 1), t.identity(), this;
1714
- let a = bn.set(r[0], r[1], r[2]).length(), o = bn.set(r[4], r[5], r[6]).length(), s = bn.set(r[8], r[9], r[10]).length();
1715
- i < 0 && (a = -a), xn.copy(this);
1717
+ let a = Sn.set(r[0], r[1], r[2]).length(), o = Sn.set(r[4], r[5], r[6]).length(), s = Sn.set(r[8], r[9], r[10]).length();
1718
+ i < 0 && (a = -a), Cn.copy(this);
1716
1719
  let c = 1 / a, l = 1 / o, u = 1 / s;
1717
- return xn.elements[0] *= c, xn.elements[1] *= c, xn.elements[2] *= c, xn.elements[4] *= l, xn.elements[5] *= l, xn.elements[6] *= l, xn.elements[8] *= u, xn.elements[9] *= u, xn.elements[10] *= u, t.setFromRotationMatrix(xn), n.x = a, n.y = o, n.z = s, this;
1720
+ return Cn.elements[0] *= c, Cn.elements[1] *= c, Cn.elements[2] *= c, Cn.elements[4] *= l, Cn.elements[5] *= l, Cn.elements[6] *= l, Cn.elements[8] *= u, Cn.elements[9] *= u, Cn.elements[10] *= u, t.setFromRotationMatrix(Cn), n.x = a, n.y = o, n.z = s, this;
1718
1721
  }
1719
1722
  makePerspective(e, t, n, r, i, a, o = ft, s = !1) {
1720
1723
  let c = this.elements, l = 2 * i / (t - e), u = 2 * i / (n - r), d = (t + e) / (t - e), f = (n + r) / (n - r), p, m;
@@ -1745,7 +1748,7 @@ var hn = class e {
1745
1748
  let n = this.elements;
1746
1749
  return e[t] = n[0], e[t + 1] = n[1], e[t + 2] = n[2], e[t + 3] = n[3], e[t + 4] = n[4], e[t + 5] = n[5], e[t + 6] = n[6], e[t + 7] = n[7], e[t + 8] = n[8], e[t + 9] = n[9], e[t + 10] = n[10], e[t + 11] = n[11], e[t + 12] = n[12], e[t + 13] = n[13], e[t + 14] = n[14], e[t + 15] = n[15], e;
1747
1750
  }
1748
- }, bn = /* @__PURE__ */ new I(), xn = /* @__PURE__ */ new z(), Sn = /* @__PURE__ */ new I(0, 0, 0), Cn = /* @__PURE__ */ new I(1, 1, 1), wn = /* @__PURE__ */ new I(), Tn = /* @__PURE__ */ new I(), B = /* @__PURE__ */ new I(), En = /* @__PURE__ */ new z(), Dn = /* @__PURE__ */ new Zt(), On = class e {
1751
+ }, Sn = /* @__PURE__ */ new I(), Cn = /* @__PURE__ */ new R(), wn = /* @__PURE__ */ new I(0, 0, 0), Tn = /* @__PURE__ */ new I(1, 1, 1), En = /* @__PURE__ */ new I(), Dn = /* @__PURE__ */ new I(), z = /* @__PURE__ */ new I(), On = /* @__PURE__ */ new R(), kn = /* @__PURE__ */ new Qt(), An = class e {
1749
1752
  constructor(t = 0, n = 0, r = 0, i = e.DEFAULT_ORDER) {
1750
1753
  this.isEuler = !0, this._x = t, this._y = n, this._z = r, this._order = i;
1751
1754
  }
@@ -1808,13 +1811,13 @@ var hn = class e {
1808
1811
  return this._order = t, n === !0 && this._onChangeCallback(), this;
1809
1812
  }
1810
1813
  setFromQuaternion(e, t, n) {
1811
- return En.makeRotationFromQuaternion(e), this.setFromRotationMatrix(En, t, n);
1814
+ return On.makeRotationFromQuaternion(e), this.setFromRotationMatrix(On, t, n);
1812
1815
  }
1813
1816
  setFromVector3(e, t = this._order) {
1814
1817
  return this.set(e.x, e.y, e.z, t);
1815
1818
  }
1816
1819
  reorder(e) {
1817
- return Dn.setFromEuler(this), this.setFromQuaternion(Dn, e);
1820
+ return kn.setFromEuler(this), this.setFromQuaternion(kn, e);
1818
1821
  }
1819
1822
  equals(e) {
1820
1823
  return e._x === this._x && e._y === this._y && e._z === this._z && e._order === this._order;
@@ -1833,8 +1836,8 @@ var hn = class e {
1833
1836
  yield this._x, yield this._y, yield this._z, yield this._order;
1834
1837
  }
1835
1838
  };
1836
- On.DEFAULT_ORDER = "XYZ";
1837
- var kn = class {
1839
+ An.DEFAULT_ORDER = "XYZ";
1840
+ var jn = class {
1838
1841
  constructor() {
1839
1842
  this.mask = 1;
1840
1843
  }
@@ -1862,16 +1865,16 @@ var kn = class {
1862
1865
  isEnabled(e) {
1863
1866
  return (this.mask & (1 << e | 0)) != 0;
1864
1867
  }
1865
- }, An = 0, jn = /* @__PURE__ */ new I(), Mn = /* @__PURE__ */ new Zt(), Nn = /* @__PURE__ */ new z(), Pn = /* @__PURE__ */ new I(), Fn = /* @__PURE__ */ new I(), In = /* @__PURE__ */ new I(), Ln = /* @__PURE__ */ new Zt(), Rn = /* @__PURE__ */ new I(1, 0, 0), zn = /* @__PURE__ */ new I(0, 1, 0), Bn = /* @__PURE__ */ new I(0, 0, 1), Vn = { type: "added" }, Hn = { type: "removed" }, Un = {
1868
+ }, Mn = 0, Nn = /* @__PURE__ */ new I(), Pn = /* @__PURE__ */ new Qt(), Fn = /* @__PURE__ */ new R(), In = /* @__PURE__ */ new I(), Ln = /* @__PURE__ */ new I(), Rn = /* @__PURE__ */ new I(), zn = /* @__PURE__ */ new Qt(), Bn = /* @__PURE__ */ new I(1, 0, 0), Vn = /* @__PURE__ */ new I(0, 1, 0), Hn = /* @__PURE__ */ new I(0, 0, 1), Un = { type: "added" }, Wn = { type: "removed" }, Gn = {
1866
1869
  type: "childadded",
1867
1870
  child: null
1868
- }, Wn = {
1871
+ }, Kn = {
1869
1872
  type: "childremoved",
1870
1873
  child: null
1871
- }, V = class e extends Dt {
1874
+ }, B = class e extends Ot {
1872
1875
  constructor() {
1873
- super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: An++ }), this.uuid = jt(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1874
- let t = new I(), n = new On(), r = new Zt(), i = new I(1, 1, 1);
1876
+ super(), this.isObject3D = !0, Object.defineProperty(this, "id", { value: Mn++ }), this.uuid = Mt(), this.name = "", this.type = "Object3D", this.parent = null, this.children = [], this.up = e.DEFAULT_UP.clone();
1877
+ let t = new I(), n = new An(), r = new Qt(), i = new I(1, 1, 1);
1875
1878
  function a() {
1876
1879
  r.setFromEuler(n, !1);
1877
1880
  }
@@ -1899,9 +1902,9 @@ var kn = class {
1899
1902
  enumerable: !0,
1900
1903
  value: i
1901
1904
  },
1902
- modelViewMatrix: { value: new z() },
1903
- normalMatrix: { value: new en() }
1904
- }), this.matrix = new z(), this.matrixWorld = new z(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new kn(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1905
+ modelViewMatrix: { value: new R() },
1906
+ normalMatrix: { value: new tn() }
1907
+ }), this.matrix = new R(), this.matrixWorld = new R(), this.matrixAutoUpdate = e.DEFAULT_MATRIX_AUTO_UPDATE, this.matrixWorldAutoUpdate = e.DEFAULT_MATRIX_WORLD_AUTO_UPDATE, this.matrixWorldNeedsUpdate = !1, this.layers = new jn(), this.visible = !0, this.castShadow = !1, this.receiveShadow = !1, this.frustumCulled = !0, this.renderOrder = 0, this.animations = [], this.customDepthMaterial = void 0, this.customDistanceMaterial = void 0, this.static = !1, this.userData = {}, this.pivot = null;
1905
1908
  }
1906
1909
  onBeforeShadow() {}
1907
1910
  onAfterShadow() {}
@@ -1926,49 +1929,49 @@ var kn = class {
1926
1929
  this.quaternion.copy(e);
1927
1930
  }
1928
1931
  rotateOnAxis(e, t) {
1929
- return Mn.setFromAxisAngle(e, t), this.quaternion.multiply(Mn), this;
1932
+ return Pn.setFromAxisAngle(e, t), this.quaternion.multiply(Pn), this;
1930
1933
  }
1931
1934
  rotateOnWorldAxis(e, t) {
1932
- return Mn.setFromAxisAngle(e, t), this.quaternion.premultiply(Mn), this;
1935
+ return Pn.setFromAxisAngle(e, t), this.quaternion.premultiply(Pn), this;
1933
1936
  }
1934
1937
  rotateX(e) {
1935
- return this.rotateOnAxis(Rn, e);
1938
+ return this.rotateOnAxis(Bn, e);
1936
1939
  }
1937
1940
  rotateY(e) {
1938
- return this.rotateOnAxis(zn, e);
1941
+ return this.rotateOnAxis(Vn, e);
1939
1942
  }
1940
1943
  rotateZ(e) {
1941
- return this.rotateOnAxis(Bn, e);
1944
+ return this.rotateOnAxis(Hn, e);
1942
1945
  }
1943
1946
  translateOnAxis(e, t) {
1944
- return jn.copy(e).applyQuaternion(this.quaternion), this.position.add(jn.multiplyScalar(t)), this;
1947
+ return Nn.copy(e).applyQuaternion(this.quaternion), this.position.add(Nn.multiplyScalar(t)), this;
1945
1948
  }
1946
1949
  translateX(e) {
1947
- return this.translateOnAxis(Rn, e);
1950
+ return this.translateOnAxis(Bn, e);
1948
1951
  }
1949
1952
  translateY(e) {
1950
- return this.translateOnAxis(zn, e);
1953
+ return this.translateOnAxis(Vn, e);
1951
1954
  }
1952
1955
  translateZ(e) {
1953
- return this.translateOnAxis(Bn, e);
1956
+ return this.translateOnAxis(Hn, e);
1954
1957
  }
1955
1958
  localToWorld(e) {
1956
1959
  return this.updateWorldMatrix(!0, !1), e.applyMatrix4(this.matrixWorld);
1957
1960
  }
1958
1961
  worldToLocal(e) {
1959
- return this.updateWorldMatrix(!0, !1), e.applyMatrix4(Nn.copy(this.matrixWorld).invert());
1962
+ return this.updateWorldMatrix(!0, !1), e.applyMatrix4(Fn.copy(this.matrixWorld).invert());
1960
1963
  }
1961
1964
  lookAt(e, t, n) {
1962
- e.isVector3 ? Pn.copy(e) : Pn.set(e, t, n);
1965
+ e.isVector3 ? In.copy(e) : In.set(e, t, n);
1963
1966
  let r = this.parent;
1964
- this.updateWorldMatrix(!0, !1), Fn.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Nn.lookAt(Fn, Pn, this.up) : Nn.lookAt(Pn, Fn, this.up), this.quaternion.setFromRotationMatrix(Nn), r && (Nn.extractRotation(r.matrixWorld), Mn.setFromRotationMatrix(Nn), this.quaternion.premultiply(Mn.invert()));
1967
+ this.updateWorldMatrix(!0, !1), Ln.setFromMatrixPosition(this.matrixWorld), this.isCamera || this.isLight ? Fn.lookAt(Ln, In, this.up) : Fn.lookAt(In, Ln, this.up), this.quaternion.setFromRotationMatrix(Fn), r && (Fn.extractRotation(r.matrixWorld), Pn.setFromRotationMatrix(Fn), this.quaternion.premultiply(Pn.invert()));
1965
1968
  }
1966
1969
  add(e) {
1967
1970
  if (arguments.length > 1) {
1968
1971
  for (let e = 0; e < arguments.length; e++) this.add(arguments[e]);
1969
1972
  return this;
1970
1973
  }
1971
- return e === this ? (A("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Vn), Un.child = e, this.dispatchEvent(Un), Un.child = null) : A("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1974
+ return e === this ? (A("Object3D.add: object can't be added as a child of itself.", e), this) : (e && e.isObject3D ? (e.removeFromParent(), e.parent = this, this.children.push(e), e.dispatchEvent(Un), Gn.child = e, this.dispatchEvent(Gn), Gn.child = null) : A("Object3D.add: object not an instance of THREE.Object3D.", e), this);
1972
1975
  }
1973
1976
  remove(e) {
1974
1977
  if (arguments.length > 1) {
@@ -1976,7 +1979,7 @@ var kn = class {
1976
1979
  return this;
1977
1980
  }
1978
1981
  let t = this.children.indexOf(e);
1979
- return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Hn), Wn.child = e, this.dispatchEvent(Wn), Wn.child = null), this;
1982
+ return t !== -1 && (e.parent = null, this.children.splice(t, 1), e.dispatchEvent(Wn), Kn.child = e, this.dispatchEvent(Kn), Kn.child = null), this;
1980
1983
  }
1981
1984
  removeFromParent() {
1982
1985
  let e = this.parent;
@@ -1986,7 +1989,7 @@ var kn = class {
1986
1989
  return this.remove(...this.children);
1987
1990
  }
1988
1991
  attach(e) {
1989
- return this.updateWorldMatrix(!0, !1), Nn.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), Nn.multiply(e.parent.matrixWorld)), e.applyMatrix4(Nn), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Vn), Un.child = e, this.dispatchEvent(Un), Un.child = null, this;
1992
+ return this.updateWorldMatrix(!0, !1), Fn.copy(this.matrixWorld).invert(), e.parent !== null && (e.parent.updateWorldMatrix(!0, !1), Fn.multiply(e.parent.matrixWorld)), e.applyMatrix4(Fn), e.removeFromParent(), e.parent = this, this.children.push(e), e.updateWorldMatrix(!1, !0), e.dispatchEvent(Un), Gn.child = e, this.dispatchEvent(Gn), Gn.child = null, this;
1990
1993
  }
1991
1994
  getObjectById(e) {
1992
1995
  return this.getObjectByProperty("id", e);
@@ -2011,10 +2014,10 @@ var kn = class {
2011
2014
  return this.updateWorldMatrix(!0, !1), e.setFromMatrixPosition(this.matrixWorld);
2012
2015
  }
2013
2016
  getWorldQuaternion(e) {
2014
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Fn, e, In), e;
2017
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Ln, e, Rn), e;
2015
2018
  }
2016
2019
  getWorldScale(e) {
2017
- return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Fn, Ln, e), e;
2020
+ return this.updateWorldMatrix(!0, !1), this.matrixWorld.decompose(Ln, zn, e), e;
2018
2021
  }
2019
2022
  getWorldDirection(e) {
2020
2023
  this.updateWorldMatrix(!0, !1);
@@ -2137,23 +2140,23 @@ var kn = class {
2137
2140
  return this;
2138
2141
  }
2139
2142
  };
2140
- V.DEFAULT_UP = /* @__PURE__ */ new I(0, 1, 0), V.DEFAULT_MATRIX_AUTO_UPDATE = !0, V.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2141
- var Gn = class extends V {
2143
+ B.DEFAULT_UP = /* @__PURE__ */ new I(0, 1, 0), B.DEFAULT_MATRIX_AUTO_UPDATE = !0, B.DEFAULT_MATRIX_WORLD_AUTO_UPDATE = !0;
2144
+ var qn = class extends B {
2142
2145
  constructor() {
2143
2146
  super(), this.isGroup = !0, this.type = "Group";
2144
2147
  }
2145
- }, Kn = { type: "move" }, qn = class {
2148
+ }, Jn = { type: "move" }, Yn = class {
2146
2149
  constructor() {
2147
2150
  this._targetRay = null, this._grip = null, this._hand = null;
2148
2151
  }
2149
2152
  getHandSpace() {
2150
- return this._hand === null && (this._hand = new Gn(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
2153
+ return this._hand === null && (this._hand = new qn(), this._hand.matrixAutoUpdate = !1, this._hand.visible = !1, this._hand.joints = {}, this._hand.inputState = { pinching: !1 }), this._hand;
2151
2154
  }
2152
2155
  getTargetRaySpace() {
2153
- return this._targetRay === null && (this._targetRay = new Gn(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new I(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new I()), this._targetRay;
2156
+ return this._targetRay === null && (this._targetRay = new qn(), this._targetRay.matrixAutoUpdate = !1, this._targetRay.visible = !1, this._targetRay.hasLinearVelocity = !1, this._targetRay.linearVelocity = new I(), this._targetRay.hasAngularVelocity = !1, this._targetRay.angularVelocity = new I()), this._targetRay;
2154
2157
  }
2155
2158
  getGripSpace() {
2156
- return this._grip === null && (this._grip = new Gn(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new I(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new I()), this._grip;
2159
+ return this._grip === null && (this._grip = new qn(), this._grip.matrixAutoUpdate = !1, this._grip.visible = !1, this._grip.hasLinearVelocity = !1, this._grip.linearVelocity = new I(), this._grip.hasAngularVelocity = !1, this._grip.angularVelocity = new I()), this._grip;
2157
2160
  }
2158
2161
  dispatchEvent(e) {
2159
2162
  return this._targetRay !== null && this._targetRay.dispatchEvent(e), this._grip !== null && this._grip.dispatchEvent(e), this._hand !== null && this._hand.dispatchEvent(e), this;
@@ -2194,18 +2197,18 @@ var Gn = class extends V {
2194
2197
  target: this
2195
2198
  }));
2196
2199
  } else s !== null && e.gripSpace && (i = t.getPose(e.gripSpace, n), i !== null && (s.matrix.fromArray(i.transform.matrix), s.matrix.decompose(s.position, s.rotation, s.scale), s.matrixWorldNeedsUpdate = !0, i.linearVelocity ? (s.hasLinearVelocity = !0, s.linearVelocity.copy(i.linearVelocity)) : s.hasLinearVelocity = !1, i.angularVelocity ? (s.hasAngularVelocity = !0, s.angularVelocity.copy(i.angularVelocity)) : s.hasAngularVelocity = !1));
2197
- o !== null && (r = t.getPose(e.targetRaySpace, n), r === null && i !== null && (r = i), r !== null && (o.matrix.fromArray(r.transform.matrix), o.matrix.decompose(o.position, o.rotation, o.scale), o.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (o.hasLinearVelocity = !0, o.linearVelocity.copy(r.linearVelocity)) : o.hasLinearVelocity = !1, r.angularVelocity ? (o.hasAngularVelocity = !0, o.angularVelocity.copy(r.angularVelocity)) : o.hasAngularVelocity = !1, this.dispatchEvent(Kn)));
2200
+ o !== null && (r = t.getPose(e.targetRaySpace, n), r === null && i !== null && (r = i), r !== null && (o.matrix.fromArray(r.transform.matrix), o.matrix.decompose(o.position, o.rotation, o.scale), o.matrixWorldNeedsUpdate = !0, r.linearVelocity ? (o.hasLinearVelocity = !0, o.linearVelocity.copy(r.linearVelocity)) : o.hasLinearVelocity = !1, r.angularVelocity ? (o.hasAngularVelocity = !0, o.angularVelocity.copy(r.angularVelocity)) : o.hasAngularVelocity = !1, this.dispatchEvent(Jn)));
2198
2201
  }
2199
2202
  return o !== null && (o.visible = r !== null), s !== null && (s.visible = i !== null), c !== null && (c.visible = a !== null), this;
2200
2203
  }
2201
2204
  _getHandJoint(e, t) {
2202
2205
  if (e.joints[t.jointName] === void 0) {
2203
- let n = new Gn();
2206
+ let n = new qn();
2204
2207
  n.matrixAutoUpdate = !1, n.visible = !1, e.joints[t.jointName] = n, e.add(n);
2205
2208
  }
2206
2209
  return e.joints[t.jointName];
2207
2210
  }
2208
- }, Jn = {
2211
+ }, Xn = {
2209
2212
  aliceblue: 15792383,
2210
2213
  antiquewhite: 16444375,
2211
2214
  aqua: 65535,
@@ -2354,19 +2357,19 @@ var Gn = class extends V {
2354
2357
  whitesmoke: 16119285,
2355
2358
  yellow: 16776960,
2356
2359
  yellowgreen: 10145074
2357
- }, Yn = {
2360
+ }, Zn = {
2358
2361
  h: 0,
2359
2362
  s: 0,
2360
2363
  l: 0
2361
- }, Xn = {
2364
+ }, Qn = {
2362
2365
  h: 0,
2363
2366
  s: 0,
2364
2367
  l: 0
2365
2368
  };
2366
- function Zn(e, t, n) {
2369
+ function $n(e, t, n) {
2367
2370
  return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * 6 * (2 / 3 - n) : e;
2368
2371
  }
2369
- var H = class {
2372
+ var V = class {
2370
2373
  constructor(e, t, n) {
2371
2374
  return this.isColor = !0, this.r = 1, this.g = 1, this.b = 1, this.set(e, t, n);
2372
2375
  }
@@ -2381,18 +2384,18 @@ var H = class {
2381
2384
  return this.r = e, this.g = e, this.b = e, this;
2382
2385
  }
2383
2386
  setHex(e, t = Qe) {
2384
- return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, L.colorSpaceToWorking(this, t), this;
2387
+ return e = Math.floor(e), this.r = (e >> 16 & 255) / 255, this.g = (e >> 8 & 255) / 255, this.b = (e & 255) / 255, sn.colorSpaceToWorking(this, t), this;
2385
2388
  }
2386
- setRGB(e, t, n, r = L.workingColorSpace) {
2387
- return this.r = e, this.g = t, this.b = n, L.colorSpaceToWorking(this, r), this;
2389
+ setRGB(e, t, n, r = sn.workingColorSpace) {
2390
+ return this.r = e, this.g = t, this.b = n, sn.colorSpaceToWorking(this, r), this;
2388
2391
  }
2389
- setHSL(e, t, n, r = L.workingColorSpace) {
2390
- if (e = Mt(e, 1), t = M(t, 0, 1), n = M(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2392
+ setHSL(e, t, n, r = sn.workingColorSpace) {
2393
+ if (e = Nt(e, 1), t = M(t, 0, 1), n = M(n, 0, 1), t === 0) this.r = this.g = this.b = n;
2391
2394
  else {
2392
2395
  let r = n <= .5 ? n * (1 + t) : n + t - n * t, i = 2 * n - r;
2393
- this.r = Zn(i, r, e + 1 / 3), this.g = Zn(i, r, e), this.b = Zn(i, r, e - 1 / 3);
2396
+ this.r = $n(i, r, e + 1 / 3), this.g = $n(i, r, e), this.b = $n(i, r, e - 1 / 3);
2394
2397
  }
2395
- return L.colorSpaceToWorking(this, r), this;
2398
+ return sn.colorSpaceToWorking(this, r), this;
2396
2399
  }
2397
2400
  setStyle(e, t = Qe) {
2398
2401
  function n(t) {
@@ -2422,7 +2425,7 @@ var H = class {
2422
2425
  return this;
2423
2426
  }
2424
2427
  setColorName(e, t = Qe) {
2425
- let n = Jn[e.toLowerCase()];
2428
+ let n = Xn[e.toLowerCase()];
2426
2429
  return n === void 0 ? k("Color: Unknown color " + e) : this.setHex(n, t), this;
2427
2430
  }
2428
2431
  clone() {
@@ -2432,10 +2435,10 @@ var H = class {
2432
2435
  return this.r = e.r, this.g = e.g, this.b = e.b, this;
2433
2436
  }
2434
2437
  copySRGBToLinear(e) {
2435
- return this.r = on(e.r), this.g = on(e.g), this.b = on(e.b), this;
2438
+ return this.r = cn(e.r), this.g = cn(e.g), this.b = cn(e.b), this;
2436
2439
  }
2437
2440
  copyLinearToSRGB(e) {
2438
- return this.r = sn(e.r), this.g = sn(e.g), this.b = sn(e.b), this;
2441
+ return this.r = ln(e.r), this.g = ln(e.g), this.b = ln(e.b), this;
2439
2442
  }
2440
2443
  convertSRGBToLinear() {
2441
2444
  return this.copySRGBToLinear(this), this;
@@ -2444,14 +2447,14 @@ var H = class {
2444
2447
  return this.copyLinearToSRGB(this), this;
2445
2448
  }
2446
2449
  getHex(e = Qe) {
2447
- return L.workingToColorSpace(U.copy(this), e), Math.round(M(U.r * 255, 0, 255)) * 65536 + Math.round(M(U.g * 255, 0, 255)) * 256 + Math.round(M(U.b * 255, 0, 255));
2450
+ return sn.workingToColorSpace(H.copy(this), e), Math.round(M(H.r * 255, 0, 255)) * 65536 + Math.round(M(H.g * 255, 0, 255)) * 256 + Math.round(M(H.b * 255, 0, 255));
2448
2451
  }
2449
2452
  getHexString(e = Qe) {
2450
2453
  return ("000000" + this.getHex(e).toString(16)).slice(-6);
2451
2454
  }
2452
- getHSL(e, t = L.workingColorSpace) {
2453
- L.workingToColorSpace(U.copy(this), t);
2454
- let n = U.r, r = U.g, i = U.b, a = Math.max(n, r, i), o = Math.min(n, r, i), s, c, l = (o + a) / 2;
2455
+ getHSL(e, t = sn.workingColorSpace) {
2456
+ sn.workingToColorSpace(H.copy(this), t);
2457
+ let n = H.r, r = H.g, i = H.b, a = Math.max(n, r, i), o = Math.min(n, r, i), s, c, l = (o + a) / 2;
2455
2458
  if (o === a) s = 0, c = 0;
2456
2459
  else {
2457
2460
  let e = a - o;
@@ -2470,16 +2473,16 @@ var H = class {
2470
2473
  }
2471
2474
  return e.h = s, e.s = c, e.l = l, e;
2472
2475
  }
2473
- getRGB(e, t = L.workingColorSpace) {
2474
- return L.workingToColorSpace(U.copy(this), t), e.r = U.r, e.g = U.g, e.b = U.b, e;
2476
+ getRGB(e, t = sn.workingColorSpace) {
2477
+ return sn.workingToColorSpace(H.copy(this), t), e.r = H.r, e.g = H.g, e.b = H.b, e;
2475
2478
  }
2476
2479
  getStyle(e = Qe) {
2477
- L.workingToColorSpace(U.copy(this), e);
2478
- let t = U.r, n = U.g, r = U.b;
2480
+ sn.workingToColorSpace(H.copy(this), e);
2481
+ let t = H.r, n = H.g, r = H.b;
2479
2482
  return e === "srgb" ? `rgb(${Math.round(t * 255)},${Math.round(n * 255)},${Math.round(r * 255)})` : `color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`;
2480
2483
  }
2481
2484
  offsetHSL(e, t, n) {
2482
- return this.getHSL(Yn), this.setHSL(Yn.h + e, Yn.s + t, Yn.l + n);
2485
+ return this.getHSL(Zn), this.setHSL(Zn.h + e, Zn.s + t, Zn.l + n);
2483
2486
  }
2484
2487
  add(e) {
2485
2488
  return this.r += e.r, this.g += e.g, this.b += e.b, this;
@@ -2506,8 +2509,8 @@ var H = class {
2506
2509
  return this.r = e.r + (t.r - e.r) * n, this.g = e.g + (t.g - e.g) * n, this.b = e.b + (t.b - e.b) * n, this;
2507
2510
  }
2508
2511
  lerpHSL(e, t) {
2509
- this.getHSL(Yn), e.getHSL(Xn);
2510
- let n = Ft(Yn.h, Xn.h, t), r = Ft(Yn.s, Xn.s, t), i = Ft(Yn.l, Xn.l, t);
2512
+ this.getHSL(Zn), e.getHSL(Qn);
2513
+ let n = It(Zn.h, Qn.h, t), r = It(Zn.s, Qn.s, t), i = It(Zn.l, Qn.l, t);
2511
2514
  return this.setHSL(n, r, i), this;
2512
2515
  }
2513
2516
  setFromVector3(e) {
@@ -2535,11 +2538,11 @@ var H = class {
2535
2538
  *[Symbol.iterator]() {
2536
2539
  yield this.r, yield this.g, yield this.b;
2537
2540
  }
2538
- }, U = /* @__PURE__ */ new H();
2539
- H.NAMES = Jn;
2540
- var Qn = class e {
2541
+ }, H = /* @__PURE__ */ new V();
2542
+ V.NAMES = Xn;
2543
+ var er = class e {
2541
2544
  constructor(e, t = 1, n = 1e3) {
2542
- this.isFog = !0, this.name = "", this.color = new H(e), this.near = t, this.far = n;
2545
+ this.isFog = !0, this.name = "", this.color = new V(e), this.near = t, this.far = n;
2543
2546
  }
2544
2547
  clone() {
2545
2548
  return new e(this.color, this.near, this.far);
@@ -2553,9 +2556,9 @@ var Qn = class e {
2553
2556
  far: this.far
2554
2557
  };
2555
2558
  }
2556
- }, $n = class extends V {
2559
+ }, tr = class extends B {
2557
2560
  constructor() {
2558
- super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new On(), this.environmentIntensity = 1, this.environmentRotation = new On(), this.overrideMaterial = null, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2561
+ super(), this.isScene = !0, this.type = "Scene", this.background = null, this.environment = null, this.fog = null, this.backgroundBlurriness = 0, this.backgroundIntensity = 1, this.backgroundRotation = new An(), this.environmentIntensity = 1, this.environmentRotation = new An(), this.overrideMaterial = null, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
2559
2562
  }
2560
2563
  copy(e, t) {
2561
2564
  return super.copy(e, t), e.background !== null && (this.background = e.background.clone()), e.environment !== null && (this.environment = e.environment.clone()), e.fog !== null && (this.fog = e.fog.clone()), this.backgroundBlurriness = e.backgroundBlurriness, this.backgroundIntensity = e.backgroundIntensity, this.backgroundRotation.copy(e.backgroundRotation), this.environmentIntensity = e.environmentIntensity, this.environmentRotation.copy(e.environmentRotation), e.overrideMaterial !== null && (this.overrideMaterial = e.overrideMaterial.clone()), this.matrixAutoUpdate = e.matrixAutoUpdate, this;
@@ -2564,33 +2567,33 @@ var Qn = class e {
2564
2567
  let t = super.toJSON(e);
2565
2568
  return this.fog !== null && (t.object.fog = this.fog.toJSON()), this.backgroundBlurriness > 0 && (t.object.backgroundBlurriness = this.backgroundBlurriness), this.backgroundIntensity !== 1 && (t.object.backgroundIntensity = this.backgroundIntensity), t.object.backgroundRotation = this.backgroundRotation.toArray(), this.environmentIntensity !== 1 && (t.object.environmentIntensity = this.environmentIntensity), t.object.environmentRotation = this.environmentRotation.toArray(), t;
2566
2569
  }
2567
- }, er = /* @__PURE__ */ new I(), tr = /* @__PURE__ */ new I(), nr = /* @__PURE__ */ new I(), rr = /* @__PURE__ */ new I(), ir = /* @__PURE__ */ new I(), ar = /* @__PURE__ */ new I(), or = /* @__PURE__ */ new I(), sr = /* @__PURE__ */ new I(), cr = /* @__PURE__ */ new I(), lr = /* @__PURE__ */ new I(), ur = /* @__PURE__ */ new hn(), dr = /* @__PURE__ */ new hn(), fr = /* @__PURE__ */ new hn(), pr = class e {
2570
+ }, nr = /* @__PURE__ */ new I(), rr = /* @__PURE__ */ new I(), ir = /* @__PURE__ */ new I(), ar = /* @__PURE__ */ new I(), or = /* @__PURE__ */ new I(), sr = /* @__PURE__ */ new I(), cr = /* @__PURE__ */ new I(), lr = /* @__PURE__ */ new I(), ur = /* @__PURE__ */ new I(), dr = /* @__PURE__ */ new I(), fr = /* @__PURE__ */ new _n(), pr = /* @__PURE__ */ new _n(), mr = /* @__PURE__ */ new _n(), hr = class e {
2568
2571
  constructor(e = new I(), t = new I(), n = new I()) {
2569
2572
  this.a = e, this.b = t, this.c = n;
2570
2573
  }
2571
2574
  static getNormal(e, t, n, r) {
2572
- r.subVectors(n, t), er.subVectors(e, t), r.cross(er);
2575
+ r.subVectors(n, t), nr.subVectors(e, t), r.cross(nr);
2573
2576
  let i = r.lengthSq();
2574
2577
  return i > 0 ? r.multiplyScalar(1 / Math.sqrt(i)) : r.set(0, 0, 0);
2575
2578
  }
2576
2579
  static getBarycoord(e, t, n, r, i) {
2577
- er.subVectors(r, t), tr.subVectors(n, t), nr.subVectors(e, t);
2578
- let a = er.dot(er), o = er.dot(tr), s = er.dot(nr), c = tr.dot(tr), l = tr.dot(nr), u = a * c - o * o;
2580
+ nr.subVectors(r, t), rr.subVectors(n, t), ir.subVectors(e, t);
2581
+ let a = nr.dot(nr), o = nr.dot(rr), s = nr.dot(ir), c = rr.dot(rr), l = rr.dot(ir), u = a * c - o * o;
2579
2582
  if (u === 0) return i.set(0, 0, 0), null;
2580
2583
  let d = 1 / u, f = (c * s - o * l) * d, p = (a * l - o * s) * d;
2581
2584
  return i.set(1 - f - p, p, f);
2582
2585
  }
2583
2586
  static containsPoint(e, t, n, r) {
2584
- return this.getBarycoord(e, t, n, r, rr) === null ? !1 : rr.x >= 0 && rr.y >= 0 && rr.x + rr.y <= 1;
2587
+ return this.getBarycoord(e, t, n, r, ar) === null ? !1 : ar.x >= 0 && ar.y >= 0 && ar.x + ar.y <= 1;
2585
2588
  }
2586
2589
  static getInterpolation(e, t, n, r, i, a, o, s) {
2587
- return this.getBarycoord(e, t, n, r, rr) === null ? (s.x = 0, s.y = 0, "z" in s && (s.z = 0), "w" in s && (s.w = 0), null) : (s.setScalar(0), s.addScaledVector(i, rr.x), s.addScaledVector(a, rr.y), s.addScaledVector(o, rr.z), s);
2590
+ return this.getBarycoord(e, t, n, r, ar) === null ? (s.x = 0, s.y = 0, "z" in s && (s.z = 0), "w" in s && (s.w = 0), null) : (s.setScalar(0), s.addScaledVector(i, ar.x), s.addScaledVector(a, ar.y), s.addScaledVector(o, ar.z), s);
2588
2591
  }
2589
2592
  static getInterpolatedAttribute(e, t, n, r, i, a) {
2590
- return ur.setScalar(0), dr.setScalar(0), fr.setScalar(0), ur.fromBufferAttribute(e, t), dr.fromBufferAttribute(e, n), fr.fromBufferAttribute(e, r), a.setScalar(0), a.addScaledVector(ur, i.x), a.addScaledVector(dr, i.y), a.addScaledVector(fr, i.z), a;
2593
+ return fr.setScalar(0), pr.setScalar(0), mr.setScalar(0), fr.fromBufferAttribute(e, t), pr.fromBufferAttribute(e, n), mr.fromBufferAttribute(e, r), a.setScalar(0), a.addScaledVector(fr, i.x), a.addScaledVector(pr, i.y), a.addScaledVector(mr, i.z), a;
2591
2594
  }
2592
2595
  static isFrontFacing(e, t, n, r) {
2593
- return er.subVectors(n, t), tr.subVectors(e, t), er.cross(tr).dot(r) < 0;
2596
+ return nr.subVectors(n, t), rr.subVectors(e, t), nr.cross(rr).dot(r) < 0;
2594
2597
  }
2595
2598
  set(e, t, n) {
2596
2599
  return this.a.copy(e), this.b.copy(t), this.c.copy(n), this;
@@ -2608,7 +2611,7 @@ var Qn = class e {
2608
2611
  return this.a.copy(e.a), this.b.copy(e.b), this.c.copy(e.c), this;
2609
2612
  }
2610
2613
  getArea() {
2611
- return er.subVectors(this.c, this.b), tr.subVectors(this.a, this.b), er.cross(tr).length() * .5;
2614
+ return nr.subVectors(this.c, this.b), rr.subVectors(this.a, this.b), nr.cross(rr).length() * .5;
2612
2615
  }
2613
2616
  getMidpoint(e) {
2614
2617
  return e.addVectors(this.a, this.b).add(this.c).multiplyScalar(1 / 3);
@@ -2636,28 +2639,28 @@ var Qn = class e {
2636
2639
  }
2637
2640
  closestPointToPoint(e, t) {
2638
2641
  let n = this.a, r = this.b, i = this.c, a, o;
2639
- ir.subVectors(r, n), ar.subVectors(i, n), sr.subVectors(e, n);
2640
- let s = ir.dot(sr), c = ar.dot(sr);
2642
+ or.subVectors(r, n), sr.subVectors(i, n), lr.subVectors(e, n);
2643
+ let s = or.dot(lr), c = sr.dot(lr);
2641
2644
  if (s <= 0 && c <= 0) return t.copy(n);
2642
- cr.subVectors(e, r);
2643
- let l = ir.dot(cr), u = ar.dot(cr);
2645
+ ur.subVectors(e, r);
2646
+ let l = or.dot(ur), u = sr.dot(ur);
2644
2647
  if (l >= 0 && u <= l) return t.copy(r);
2645
2648
  let d = s * u - l * c;
2646
- if (d <= 0 && s >= 0 && l <= 0) return a = s / (s - l), t.copy(n).addScaledVector(ir, a);
2647
- lr.subVectors(e, i);
2648
- let f = ir.dot(lr), p = ar.dot(lr);
2649
+ if (d <= 0 && s >= 0 && l <= 0) return a = s / (s - l), t.copy(n).addScaledVector(or, a);
2650
+ dr.subVectors(e, i);
2651
+ let f = or.dot(dr), p = sr.dot(dr);
2649
2652
  if (p >= 0 && f <= p) return t.copy(i);
2650
2653
  let m = f * c - s * p;
2651
- if (m <= 0 && c >= 0 && p <= 0) return o = c / (c - p), t.copy(n).addScaledVector(ar, o);
2654
+ if (m <= 0 && c >= 0 && p <= 0) return o = c / (c - p), t.copy(n).addScaledVector(sr, o);
2652
2655
  let h = l * p - f * u;
2653
- if (h <= 0 && u - l >= 0 && f - p >= 0) return or.subVectors(i, r), o = (u - l) / (u - l + (f - p)), t.copy(r).addScaledVector(or, o);
2656
+ if (h <= 0 && u - l >= 0 && f - p >= 0) return cr.subVectors(i, r), o = (u - l) / (u - l + (f - p)), t.copy(r).addScaledVector(cr, o);
2654
2657
  let g = 1 / (h + m + d);
2655
- return a = m * g, o = d * g, t.copy(n).addScaledVector(ir, a).addScaledVector(ar, o);
2658
+ return a = m * g, o = d * g, t.copy(n).addScaledVector(or, a).addScaledVector(sr, o);
2656
2659
  }
2657
2660
  equals(e) {
2658
2661
  return e.a.equals(this.a) && e.b.equals(this.b) && e.c.equals(this.c);
2659
2662
  }
2660
- }, mr = class {
2663
+ }, gr = class {
2661
2664
  constructor(e = new I(Infinity, Infinity, Infinity), t = new I(-Infinity, -Infinity, -Infinity)) {
2662
2665
  this.isBox3 = !0, this.min = e, this.max = t;
2663
2666
  }
@@ -2666,12 +2669,12 @@ var Qn = class e {
2666
2669
  }
2667
2670
  setFromArray(e) {
2668
2671
  this.makeEmpty();
2669
- for (let t = 0, n = e.length; t < n; t += 3) this.expandByPoint(gr.fromArray(e, t));
2672
+ for (let t = 0, n = e.length; t < n; t += 3) this.expandByPoint(vr.fromArray(e, t));
2670
2673
  return this;
2671
2674
  }
2672
2675
  setFromBufferAttribute(e) {
2673
2676
  this.makeEmpty();
2674
- for (let t = 0, n = e.count; t < n; t++) this.expandByPoint(gr.fromBufferAttribute(e, t));
2677
+ for (let t = 0, n = e.count; t < n; t++) this.expandByPoint(vr.fromBufferAttribute(e, t));
2675
2678
  return this;
2676
2679
  }
2677
2680
  setFromPoints(e) {
@@ -2680,7 +2683,7 @@ var Qn = class e {
2680
2683
  return this;
2681
2684
  }
2682
2685
  setFromCenterAndSize(e, t) {
2683
- let n = gr.copy(t).multiplyScalar(.5);
2686
+ let n = vr.copy(t).multiplyScalar(.5);
2684
2687
  return this.min.copy(e).sub(n), this.max.copy(e).add(n), this;
2685
2688
  }
2686
2689
  setFromObject(e, t = !1) {
@@ -2718,8 +2721,8 @@ var Qn = class e {
2718
2721
  let n = e.geometry;
2719
2722
  if (n !== void 0) {
2720
2723
  let r = n.getAttribute("position");
2721
- if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0) for (let t = 0, n = r.count; t < n; t++) e.isMesh === !0 ? e.getVertexPosition(t, gr) : gr.fromBufferAttribute(r, t), gr.applyMatrix4(e.matrixWorld), this.expandByPoint(gr);
2722
- else e.boundingBox === void 0 ? (n.boundingBox === null && n.computeBoundingBox(), _r.copy(n.boundingBox)) : (e.boundingBox === null && e.computeBoundingBox(), _r.copy(e.boundingBox)), _r.applyMatrix4(e.matrixWorld), this.union(_r);
2724
+ if (t === !0 && r !== void 0 && e.isInstancedMesh !== !0) for (let t = 0, n = r.count; t < n; t++) e.isMesh === !0 ? e.getVertexPosition(t, vr) : vr.fromBufferAttribute(r, t), vr.applyMatrix4(e.matrixWorld), this.expandByPoint(vr);
2725
+ else e.boundingBox === void 0 ? (n.boundingBox === null && n.computeBoundingBox(), yr.copy(n.boundingBox)) : (e.boundingBox === null && e.computeBoundingBox(), yr.copy(e.boundingBox)), yr.applyMatrix4(e.matrixWorld), this.union(yr);
2723
2726
  }
2724
2727
  let r = e.children;
2725
2728
  for (let e = 0, n = r.length; e < n; e++) this.expandByObject(r[e], t);
@@ -2738,7 +2741,7 @@ var Qn = class e {
2738
2741
  return e.max.x >= this.min.x && e.min.x <= this.max.x && e.max.y >= this.min.y && e.min.y <= this.max.y && e.max.z >= this.min.z && e.min.z <= this.max.z;
2739
2742
  }
2740
2743
  intersectsSphere(e) {
2741
- return this.clampPoint(e.center, gr), gr.distanceToSquared(e.center) <= e.radius * e.radius;
2744
+ return this.clampPoint(e.center, vr), vr.distanceToSquared(e.center) <= e.radius * e.radius;
2742
2745
  }
2743
2746
  intersectsPlane(e) {
2744
2747
  let t, n;
@@ -2746,37 +2749,37 @@ var Qn = class e {
2746
2749
  }
2747
2750
  intersectsTriangle(e) {
2748
2751
  if (this.isEmpty()) return !1;
2749
- this.getCenter(wr), Tr.subVectors(this.max, wr), vr.subVectors(e.a, wr), yr.subVectors(e.b, wr), br.subVectors(e.c, wr), xr.subVectors(yr, vr), Sr.subVectors(br, yr), Cr.subVectors(vr, br);
2752
+ this.getCenter(Er), Dr.subVectors(this.max, Er), br.subVectors(e.a, Er), xr.subVectors(e.b, Er), Sr.subVectors(e.c, Er), Cr.subVectors(xr, br), wr.subVectors(Sr, xr), Tr.subVectors(br, Sr);
2750
2753
  let t = [
2751
- 0,
2752
- -xr.z,
2753
- xr.y,
2754
- 0,
2755
- -Sr.z,
2756
- Sr.y,
2757
2754
  0,
2758
2755
  -Cr.z,
2759
2756
  Cr.y,
2760
- xr.z,
2761
2757
  0,
2762
- -xr.x,
2763
- Sr.z,
2758
+ -wr.z,
2759
+ wr.y,
2764
2760
  0,
2765
- -Sr.x,
2761
+ -Tr.z,
2762
+ Tr.y,
2766
2763
  Cr.z,
2767
2764
  0,
2768
2765
  -Cr.x,
2769
- -xr.y,
2770
- xr.x,
2766
+ wr.z,
2771
2767
  0,
2772
- -Sr.y,
2773
- Sr.x,
2768
+ -wr.x,
2769
+ Tr.z,
2774
2770
  0,
2771
+ -Tr.x,
2775
2772
  -Cr.y,
2776
2773
  Cr.x,
2774
+ 0,
2775
+ -wr.y,
2776
+ wr.x,
2777
+ 0,
2778
+ -Tr.y,
2779
+ Tr.x,
2777
2780
  0
2778
2781
  ];
2779
- return !Or(t, vr, yr, br, Tr) || (t = [
2782
+ return !Ar(t, br, xr, Sr, Dr) || (t = [
2780
2783
  1,
2781
2784
  0,
2782
2785
  0,
@@ -2786,20 +2789,20 @@ var Qn = class e {
2786
2789
  0,
2787
2790
  0,
2788
2791
  1
2789
- ], !Or(t, vr, yr, br, Tr)) ? !1 : (Er.crossVectors(xr, Sr), t = [
2790
- Er.x,
2791
- Er.y,
2792
- Er.z
2793
- ], Or(t, vr, yr, br, Tr));
2792
+ ], !Ar(t, br, xr, Sr, Dr)) ? !1 : (Or.crossVectors(Cr, wr), t = [
2793
+ Or.x,
2794
+ Or.y,
2795
+ Or.z
2796
+ ], Ar(t, br, xr, Sr, Dr));
2794
2797
  }
2795
2798
  clampPoint(e, t) {
2796
2799
  return t.copy(e).clamp(this.min, this.max);
2797
2800
  }
2798
2801
  distanceToPoint(e) {
2799
- return this.clampPoint(e, gr).distanceTo(e);
2802
+ return this.clampPoint(e, vr).distanceTo(e);
2800
2803
  }
2801
2804
  getBoundingSphere(e) {
2802
- return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(gr).length() * .5), e;
2805
+ return this.isEmpty() ? e.makeEmpty() : (this.getCenter(e.center), e.radius = this.getSize(vr).length() * .5), e;
2803
2806
  }
2804
2807
  intersect(e) {
2805
2808
  return this.min.max(e.min), this.max.min(e.max), this.isEmpty() && this.makeEmpty(), this;
@@ -2808,7 +2811,7 @@ var Qn = class e {
2808
2811
  return this.min.min(e.min), this.max.max(e.max), this;
2809
2812
  }
2810
2813
  applyMatrix4(e) {
2811
- return this.isEmpty() ? this : (hr[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), hr[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), hr[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), hr[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), hr[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), hr[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), hr[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), hr[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(hr), this);
2814
+ return this.isEmpty() ? this : (_r[0].set(this.min.x, this.min.y, this.min.z).applyMatrix4(e), _r[1].set(this.min.x, this.min.y, this.max.z).applyMatrix4(e), _r[2].set(this.min.x, this.max.y, this.min.z).applyMatrix4(e), _r[3].set(this.min.x, this.max.y, this.max.z).applyMatrix4(e), _r[4].set(this.max.x, this.min.y, this.min.z).applyMatrix4(e), _r[5].set(this.max.x, this.min.y, this.max.z).applyMatrix4(e), _r[6].set(this.max.x, this.max.y, this.min.z).applyMatrix4(e), _r[7].set(this.max.x, this.max.y, this.max.z).applyMatrix4(e), this.setFromPoints(_r), this);
2812
2815
  }
2813
2816
  translate(e) {
2814
2817
  return this.min.add(e), this.max.add(e), this;
@@ -2825,7 +2828,7 @@ var Qn = class e {
2825
2828
  fromJSON(e) {
2826
2829
  return this.min.fromArray(e.min), this.max.fromArray(e.max), this;
2827
2830
  }
2828
- }, hr = [
2831
+ }, _r = [
2829
2832
  /* @__PURE__ */ new I(),
2830
2833
  /* @__PURE__ */ new I(),
2831
2834
  /* @__PURE__ */ new I(),
@@ -2834,17 +2837,17 @@ var Qn = class e {
2834
2837
  /* @__PURE__ */ new I(),
2835
2838
  /* @__PURE__ */ new I(),
2836
2839
  /* @__PURE__ */ new I()
2837
- ], gr = /* @__PURE__ */ new I(), _r = /* @__PURE__ */ new mr(), vr = /* @__PURE__ */ new I(), yr = /* @__PURE__ */ new I(), br = /* @__PURE__ */ new I(), xr = /* @__PURE__ */ new I(), Sr = /* @__PURE__ */ new I(), Cr = /* @__PURE__ */ new I(), wr = /* @__PURE__ */ new I(), Tr = /* @__PURE__ */ new I(), Er = /* @__PURE__ */ new I(), Dr = /* @__PURE__ */ new I();
2838
- function Or(e, t, n, r, i) {
2840
+ ], vr = /* @__PURE__ */ new I(), yr = /* @__PURE__ */ new gr(), br = /* @__PURE__ */ new I(), xr = /* @__PURE__ */ new I(), Sr = /* @__PURE__ */ new I(), Cr = /* @__PURE__ */ new I(), wr = /* @__PURE__ */ new I(), Tr = /* @__PURE__ */ new I(), Er = /* @__PURE__ */ new I(), Dr = /* @__PURE__ */ new I(), Or = /* @__PURE__ */ new I(), kr = /* @__PURE__ */ new I();
2841
+ function Ar(e, t, n, r, i) {
2839
2842
  for (let a = 0, o = e.length - 3; a <= o; a += 3) {
2840
- Dr.fromArray(e, a);
2841
- let o = i.x * Math.abs(Dr.x) + i.y * Math.abs(Dr.y) + i.z * Math.abs(Dr.z), s = t.dot(Dr), c = n.dot(Dr), l = r.dot(Dr);
2843
+ kr.fromArray(e, a);
2844
+ let o = i.x * Math.abs(kr.x) + i.y * Math.abs(kr.y) + i.z * Math.abs(kr.z), s = t.dot(kr), c = n.dot(kr), l = r.dot(kr);
2842
2845
  if (Math.max(-Math.max(s, c, l), Math.min(s, c, l)) > o) return !1;
2843
2846
  }
2844
2847
  return !0;
2845
2848
  }
2846
- var kr = /* @__PURE__ */ Ar();
2847
- function Ar() {
2849
+ var jr = /* @__PURE__ */ Mr();
2850
+ function Mr() {
2848
2851
  let e = /* @__PURE__ */ new ArrayBuffer(4), t = new Float32Array(e), n = new Uint32Array(e), r = new Uint32Array(512), i = new Uint32Array(512);
2849
2852
  for (let e = 0; e < 256; ++e) {
2850
2853
  let t = e - 127;
@@ -2872,26 +2875,26 @@ function Ar() {
2872
2875
  offsetTable: s
2873
2876
  };
2874
2877
  }
2875
- function W(e) {
2876
- Math.abs(e) > 65504 && k("DataUtils.toHalfFloat(): Value out of range."), e = M(e, -65504, 65504), kr.floatView[0] = e;
2877
- let t = kr.uint32View[0], n = t >> 23 & 511;
2878
- return kr.baseTable[n] + ((t & 8388607) >> kr.shiftTable[n]);
2878
+ function U(e) {
2879
+ Math.abs(e) > 65504 && k("DataUtils.toHalfFloat(): Value out of range."), e = M(e, -65504, 65504), jr.floatView[0] = e;
2880
+ let t = jr.uint32View[0], n = t >> 23 & 511;
2881
+ return jr.baseTable[n] + ((t & 8388607) >> jr.shiftTable[n]);
2879
2882
  }
2880
- function jr(e) {
2883
+ function Nr(e) {
2881
2884
  let t = e >> 10;
2882
- return kr.uint32View[0] = kr.mantissaTable[kr.offsetTable[t] + (e & 1023)] + kr.exponentTable[t], kr.floatView[0];
2885
+ return jr.uint32View[0] = jr.mantissaTable[jr.offsetTable[t] + (e & 1023)] + jr.exponentTable[t], jr.floatView[0];
2883
2886
  }
2884
- var Mr = class {
2887
+ var Pr = class {
2885
2888
  static toHalfFloat(e) {
2886
- return W(e);
2889
+ return U(e);
2887
2890
  }
2888
2891
  static fromHalfFloat(e) {
2889
- return jr(e);
2892
+ return Nr(e);
2890
2893
  }
2891
- }, G = /* @__PURE__ */ new I(), Nr = /* @__PURE__ */ new F(), Pr = 0, Fr = class {
2894
+ }, W = /* @__PURE__ */ new I(), Fr = /* @__PURE__ */ new F(), Ir = 0, Lr = class {
2892
2895
  constructor(e, t, n = !1) {
2893
2896
  if (Array.isArray(e)) throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");
2894
- this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: Pr++ }), this.name = "", this.array = e, this.itemSize = t, this.count = e === void 0 ? 0 : e.length / t, this.normalized = n, this.usage = lt, this.updateRanges = [], this.gpuType = v, this.version = 0;
2897
+ this.isBufferAttribute = !0, Object.defineProperty(this, "id", { value: Ir++ }), this.name = "", this.array = e, this.itemSize = t, this.count = e === void 0 ? 0 : e.length / t, this.normalized = n, this.usage = lt, this.updateRanges = [], this.gpuType = v, this.version = 0;
2895
2898
  }
2896
2899
  onUploadCallback() {}
2897
2900
  set needsUpdate(e) {
@@ -2921,20 +2924,20 @@ var Mr = class {
2921
2924
  return this.array.set(e), this;
2922
2925
  }
2923
2926
  applyMatrix3(e) {
2924
- if (this.itemSize === 2) for (let t = 0, n = this.count; t < n; t++) Nr.fromBufferAttribute(this, t), Nr.applyMatrix3(e), this.setXY(t, Nr.x, Nr.y);
2925
- else if (this.itemSize === 3) for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyMatrix3(e), this.setXYZ(t, G.x, G.y, G.z);
2927
+ if (this.itemSize === 2) for (let t = 0, n = this.count; t < n; t++) Fr.fromBufferAttribute(this, t), Fr.applyMatrix3(e), this.setXY(t, Fr.x, Fr.y);
2928
+ else if (this.itemSize === 3) for (let t = 0, n = this.count; t < n; t++) W.fromBufferAttribute(this, t), W.applyMatrix3(e), this.setXYZ(t, W.x, W.y, W.z);
2926
2929
  return this;
2927
2930
  }
2928
2931
  applyMatrix4(e) {
2929
- for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyMatrix4(e), this.setXYZ(t, G.x, G.y, G.z);
2932
+ for (let t = 0, n = this.count; t < n; t++) W.fromBufferAttribute(this, t), W.applyMatrix4(e), this.setXYZ(t, W.x, W.y, W.z);
2930
2933
  return this;
2931
2934
  }
2932
2935
  applyNormalMatrix(e) {
2933
- for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.applyNormalMatrix(e), this.setXYZ(t, G.x, G.y, G.z);
2936
+ for (let t = 0, n = this.count; t < n; t++) W.fromBufferAttribute(this, t), W.applyNormalMatrix(e), this.setXYZ(t, W.x, W.y, W.z);
2934
2937
  return this;
2935
2938
  }
2936
2939
  transformDirection(e) {
2937
- for (let t = 0, n = this.count; t < n; t++) G.fromBufferAttribute(this, t), G.transformDirection(e), this.setXYZ(t, G.x, G.y, G.z);
2940
+ for (let t = 0, n = this.count; t < n; t++) W.fromBufferAttribute(this, t), W.transformDirection(e), this.setXYZ(t, W.x, W.y, W.z);
2938
2941
  return this;
2939
2942
  }
2940
2943
  set(e, t = 0) {
@@ -2999,60 +3002,60 @@ var Mr = class {
2999
3002
  };
3000
3003
  return this.name !== "" && (e.name = this.name), this.usage !== 35044 && (e.usage = this.usage), e;
3001
3004
  }
3002
- }, Ir = class extends Fr {
3005
+ }, Rr = class extends Lr {
3003
3006
  constructor(e, t, n) {
3004
3007
  super(new Uint16Array(e), t, n);
3005
3008
  }
3006
- }, Lr = class extends Fr {
3009
+ }, zr = class extends Lr {
3007
3010
  constructor(e, t, n) {
3008
3011
  super(new Uint32Array(e), t, n);
3009
3012
  }
3010
- }, Rr = class extends Fr {
3013
+ }, Br = class extends Lr {
3011
3014
  constructor(e, t, n) {
3012
3015
  super(new Uint16Array(e), t, n), this.isFloat16BufferAttribute = !0;
3013
3016
  }
3014
3017
  getX(e) {
3015
- let t = jr(this.array[e * this.itemSize]);
3018
+ let t = Nr(this.array[e * this.itemSize]);
3016
3019
  return this.normalized && (t = N(t, this.array)), t;
3017
3020
  }
3018
3021
  setX(e, t) {
3019
- return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize] = W(t), this;
3022
+ return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize] = U(t), this;
3020
3023
  }
3021
3024
  getY(e) {
3022
- let t = jr(this.array[e * this.itemSize + 1]);
3025
+ let t = Nr(this.array[e * this.itemSize + 1]);
3023
3026
  return this.normalized && (t = N(t, this.array)), t;
3024
3027
  }
3025
3028
  setY(e, t) {
3026
- return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 1] = W(t), this;
3029
+ return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 1] = U(t), this;
3027
3030
  }
3028
3031
  getZ(e) {
3029
- let t = jr(this.array[e * this.itemSize + 2]);
3032
+ let t = Nr(this.array[e * this.itemSize + 2]);
3030
3033
  return this.normalized && (t = N(t, this.array)), t;
3031
3034
  }
3032
3035
  setZ(e, t) {
3033
- return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 2] = W(t), this;
3036
+ return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 2] = U(t), this;
3034
3037
  }
3035
3038
  getW(e) {
3036
- let t = jr(this.array[e * this.itemSize + 3]);
3039
+ let t = Nr(this.array[e * this.itemSize + 3]);
3037
3040
  return this.normalized && (t = N(t, this.array)), t;
3038
3041
  }
3039
3042
  setW(e, t) {
3040
- return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 3] = W(t), this;
3043
+ return this.normalized && (t = P(t, this.array)), this.array[e * this.itemSize + 3] = U(t), this;
3041
3044
  }
3042
3045
  setXY(e, t, n) {
3043
- return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this;
3046
+ return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array)), this.array[e + 0] = U(t), this.array[e + 1] = U(n), this;
3044
3047
  }
3045
3048
  setXYZ(e, t, n, r) {
3046
- return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this.array[e + 2] = W(r), this;
3049
+ return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array)), this.array[e + 0] = U(t), this.array[e + 1] = U(n), this.array[e + 2] = U(r), this;
3047
3050
  }
3048
3051
  setXYZW(e, t, n, r, i) {
3049
- return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array), i = P(i, this.array)), this.array[e + 0] = W(t), this.array[e + 1] = W(n), this.array[e + 2] = W(r), this.array[e + 3] = W(i), this;
3052
+ return e *= this.itemSize, this.normalized && (t = P(t, this.array), n = P(n, this.array), r = P(r, this.array), i = P(i, this.array)), this.array[e + 0] = U(t), this.array[e + 1] = U(n), this.array[e + 2] = U(r), this.array[e + 3] = U(i), this;
3050
3053
  }
3051
- }, K = class extends Fr {
3054
+ }, G = class extends Lr {
3052
3055
  constructor(e, t, n) {
3053
3056
  super(new Float32Array(e), t, n);
3054
3057
  }
3055
- }, zr = /* @__PURE__ */ new mr(), Br = /* @__PURE__ */ new I(), Vr = /* @__PURE__ */ new I(), Hr = class {
3058
+ }, Vr = /* @__PURE__ */ new gr(), Hr = /* @__PURE__ */ new I(), Ur = /* @__PURE__ */ new I(), Wr = class {
3056
3059
  constructor(e = new I(), t = -1) {
3057
3060
  this.isSphere = !0, this.center = e, this.radius = t;
3058
3061
  }
@@ -3061,7 +3064,7 @@ var Mr = class {
3061
3064
  }
3062
3065
  setFromPoints(e, t) {
3063
3066
  let n = this.center;
3064
- t === void 0 ? zr.setFromPoints(e).getCenter(n) : n.copy(t);
3067
+ t === void 0 ? Vr.setFromPoints(e).getCenter(n) : n.copy(t);
3065
3068
  let r = 0;
3066
3069
  for (let t = 0, i = e.length; t < i; t++) r = Math.max(r, n.distanceToSquared(e[t]));
3067
3070
  return this.radius = Math.sqrt(r), this;
@@ -3106,16 +3109,16 @@ var Mr = class {
3106
3109
  }
3107
3110
  expandByPoint(e) {
3108
3111
  if (this.isEmpty()) return this.center.copy(e), this.radius = 0, this;
3109
- Br.subVectors(e, this.center);
3110
- let t = Br.lengthSq();
3112
+ Hr.subVectors(e, this.center);
3113
+ let t = Hr.lengthSq();
3111
3114
  if (t > this.radius * this.radius) {
3112
3115
  let e = Math.sqrt(t), n = (e - this.radius) * .5;
3113
- this.center.addScaledVector(Br, n / e), this.radius += n;
3116
+ this.center.addScaledVector(Hr, n / e), this.radius += n;
3114
3117
  }
3115
3118
  return this;
3116
3119
  }
3117
3120
  union(e) {
3118
- return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (Vr.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(Br.copy(e.center).add(Vr)), this.expandByPoint(Br.copy(e.center).sub(Vr))), this);
3121
+ return e.isEmpty() ? this : this.isEmpty() ? (this.copy(e), this) : (this.center.equals(e.center) === !0 ? this.radius = Math.max(this.radius, e.radius) : (Ur.subVectors(e.center, this.center).setLength(e.radius), this.expandByPoint(Hr.copy(e.center).add(Ur)), this.expandByPoint(Hr.copy(e.center).sub(Ur))), this);
3119
3122
  }
3120
3123
  equals(e) {
3121
3124
  return e.center.equals(this.center) && e.radius === this.radius;
@@ -3132,9 +3135,9 @@ var Mr = class {
3132
3135
  fromJSON(e) {
3133
3136
  return this.radius = e.radius, this.center.fromArray(e.center), this;
3134
3137
  }
3135
- }, Ur = 0, Wr = /* @__PURE__ */ new z(), Gr = /* @__PURE__ */ new V(), Kr = /* @__PURE__ */ new I(), qr = /* @__PURE__ */ new mr(), Jr = /* @__PURE__ */ new mr(), q = /* @__PURE__ */ new I(), Yr = class e extends Dt {
3138
+ }, Gr = 0, Kr = /* @__PURE__ */ new R(), qr = /* @__PURE__ */ new B(), Jr = /* @__PURE__ */ new I(), K = /* @__PURE__ */ new gr(), Yr = /* @__PURE__ */ new gr(), q = /* @__PURE__ */ new I(), Xr = class e extends Ot {
3136
3139
  constructor() {
3137
- super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: Ur++ }), this.uuid = jt(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.indirectOffset = 0, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = {
3140
+ super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: Gr++ }), this.uuid = Mt(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.indirectOffset = 0, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = {
3138
3141
  start: 0,
3139
3142
  count: Infinity
3140
3143
  }, this.userData = {};
@@ -3143,7 +3146,7 @@ var Mr = class {
3143
3146
  return this.index;
3144
3147
  }
3145
3148
  setIndex(e) {
3146
- return Array.isArray(e) ? this.index = new (gt(e) ? Lr : Ir)(e, 1) : this.index = e, this;
3149
+ return Array.isArray(e) ? this.index = new (gt(e) ? zr : Rr)(e, 1) : this.index = e, this;
3147
3150
  }
3148
3151
  setIndirect(e, t = 0) {
3149
3152
  return this.indirect = e, this.indirectOffset = t, this;
@@ -3181,35 +3184,35 @@ var Mr = class {
3181
3184
  t !== void 0 && (t.applyMatrix4(e), t.needsUpdate = !0);
3182
3185
  let n = this.attributes.normal;
3183
3186
  if (n !== void 0) {
3184
- let t = new en().getNormalMatrix(e);
3187
+ let t = new tn().getNormalMatrix(e);
3185
3188
  n.applyNormalMatrix(t), n.needsUpdate = !0;
3186
3189
  }
3187
3190
  let r = this.attributes.tangent;
3188
3191
  return r !== void 0 && (r.transformDirection(e), r.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
3189
3192
  }
3190
3193
  applyQuaternion(e) {
3191
- return Wr.makeRotationFromQuaternion(e), this.applyMatrix4(Wr), this;
3194
+ return Kr.makeRotationFromQuaternion(e), this.applyMatrix4(Kr), this;
3192
3195
  }
3193
3196
  rotateX(e) {
3194
- return Wr.makeRotationX(e), this.applyMatrix4(Wr), this;
3197
+ return Kr.makeRotationX(e), this.applyMatrix4(Kr), this;
3195
3198
  }
3196
3199
  rotateY(e) {
3197
- return Wr.makeRotationY(e), this.applyMatrix4(Wr), this;
3200
+ return Kr.makeRotationY(e), this.applyMatrix4(Kr), this;
3198
3201
  }
3199
3202
  rotateZ(e) {
3200
- return Wr.makeRotationZ(e), this.applyMatrix4(Wr), this;
3203
+ return Kr.makeRotationZ(e), this.applyMatrix4(Kr), this;
3201
3204
  }
3202
3205
  translate(e, t, n) {
3203
- return Wr.makeTranslation(e, t, n), this.applyMatrix4(Wr), this;
3206
+ return Kr.makeTranslation(e, t, n), this.applyMatrix4(Kr), this;
3204
3207
  }
3205
3208
  scale(e, t, n) {
3206
- return Wr.makeScale(e, t, n), this.applyMatrix4(Wr), this;
3209
+ return Kr.makeScale(e, t, n), this.applyMatrix4(Kr), this;
3207
3210
  }
3208
3211
  lookAt(e) {
3209
- return Gr.lookAt(e), Gr.updateMatrix(), this.applyMatrix4(Gr.matrix), this;
3212
+ return qr.lookAt(e), qr.updateMatrix(), this.applyMatrix4(qr.matrix), this;
3210
3213
  }
3211
3214
  center() {
3212
- return this.computeBoundingBox(), this.boundingBox.getCenter(Kr).negate(), this.translate(Kr.x, Kr.y, Kr.z), this;
3215
+ return this.computeBoundingBox(), this.boundingBox.getCenter(Jr).negate(), this.translate(Jr.x, Jr.y, Jr.z), this;
3213
3216
  }
3214
3217
  setFromPoints(e) {
3215
3218
  let t = this.getAttribute("position");
@@ -3219,7 +3222,7 @@ var Mr = class {
3219
3222
  let r = e[n];
3220
3223
  t.push(r.x, r.y, r.z || 0);
3221
3224
  }
3222
- this.setAttribute("position", new K(t, 3));
3225
+ this.setAttribute("position", new G(t, 3));
3223
3226
  } else {
3224
3227
  let n = Math.min(e.length, t.count);
3225
3228
  for (let r = 0; r < n; r++) {
@@ -3231,7 +3234,7 @@ var Mr = class {
3231
3234
  return this;
3232
3235
  }
3233
3236
  computeBoundingBox() {
3234
- this.boundingBox === null && (this.boundingBox = new mr());
3237
+ this.boundingBox === null && (this.boundingBox = new gr());
3235
3238
  let e = this.attributes.position, t = this.morphAttributes.position;
3236
3239
  if (e && e.isGLBufferAttribute) {
3237
3240
  A("BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(new I(-Infinity, -Infinity, -Infinity), new I(Infinity, Infinity, Infinity));
@@ -3240,13 +3243,13 @@ var Mr = class {
3240
3243
  if (e !== void 0) {
3241
3244
  if (this.boundingBox.setFromBufferAttribute(e), t) for (let e = 0, n = t.length; e < n; e++) {
3242
3245
  let n = t[e];
3243
- qr.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(this.boundingBox.min, qr.min), this.boundingBox.expandByPoint(q), q.addVectors(this.boundingBox.max, qr.max), this.boundingBox.expandByPoint(q)) : (this.boundingBox.expandByPoint(qr.min), this.boundingBox.expandByPoint(qr.max));
3246
+ K.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(this.boundingBox.min, K.min), this.boundingBox.expandByPoint(q), q.addVectors(this.boundingBox.max, K.max), this.boundingBox.expandByPoint(q)) : (this.boundingBox.expandByPoint(K.min), this.boundingBox.expandByPoint(K.max));
3244
3247
  }
3245
3248
  } else this.boundingBox.makeEmpty();
3246
3249
  (isNaN(this.boundingBox.min.x) || isNaN(this.boundingBox.min.y) || isNaN(this.boundingBox.min.z)) && A("BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The \"position\" attribute is likely to have NaN values.", this);
3247
3250
  }
3248
3251
  computeBoundingSphere() {
3249
- this.boundingSphere === null && (this.boundingSphere = new Hr());
3252
+ this.boundingSphere === null && (this.boundingSphere = new Wr());
3250
3253
  let e = this.attributes.position, t = this.morphAttributes.position;
3251
3254
  if (e && e.isGLBufferAttribute) {
3252
3255
  A("BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.", this), this.boundingSphere.set(new I(), Infinity);
@@ -3254,16 +3257,16 @@ var Mr = class {
3254
3257
  }
3255
3258
  if (e) {
3256
3259
  let n = this.boundingSphere.center;
3257
- if (qr.setFromBufferAttribute(e), t) for (let e = 0, n = t.length; e < n; e++) {
3260
+ if (K.setFromBufferAttribute(e), t) for (let e = 0, n = t.length; e < n; e++) {
3258
3261
  let n = t[e];
3259
- Jr.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(qr.min, Jr.min), qr.expandByPoint(q), q.addVectors(qr.max, Jr.max), qr.expandByPoint(q)) : (qr.expandByPoint(Jr.min), qr.expandByPoint(Jr.max));
3262
+ Yr.setFromBufferAttribute(n), this.morphTargetsRelative ? (q.addVectors(K.min, Yr.min), K.expandByPoint(q), q.addVectors(K.max, Yr.max), K.expandByPoint(q)) : (K.expandByPoint(Yr.min), K.expandByPoint(Yr.max));
3260
3263
  }
3261
- qr.getCenter(n);
3264
+ K.getCenter(n);
3262
3265
  let r = 0;
3263
3266
  for (let t = 0, i = e.count; t < i; t++) q.fromBufferAttribute(e, t), r = Math.max(r, n.distanceToSquared(q));
3264
3267
  if (t) for (let i = 0, a = t.length; i < a; i++) {
3265
3268
  let a = t[i], o = this.morphTargetsRelative;
3266
- for (let t = 0, i = a.count; t < i; t++) q.fromBufferAttribute(a, t), o && (Kr.fromBufferAttribute(e, t), q.add(Kr)), r = Math.max(r, n.distanceToSquared(q));
3269
+ for (let t = 0, i = a.count; t < i; t++) q.fromBufferAttribute(a, t), o && (Jr.fromBufferAttribute(e, t), q.add(Jr)), r = Math.max(r, n.distanceToSquared(q));
3267
3270
  }
3268
3271
  this.boundingSphere.radius = Math.sqrt(r), isNaN(this.boundingSphere.radius) && A("BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The \"position\" attribute is likely to have NaN values.", this);
3269
3272
  }
@@ -3275,7 +3278,7 @@ var Mr = class {
3275
3278
  return;
3276
3279
  }
3277
3280
  let n = t.position, r = t.normal, i = t.uv;
3278
- this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Fr(new Float32Array(4 * n.count), 4));
3281
+ this.hasAttribute("tangent") === !1 && this.setAttribute("tangent", new Lr(new Float32Array(4 * n.count), 4));
3279
3282
  let a = this.getAttribute("tangent"), o = [], s = [];
3280
3283
  for (let e = 0; e < n.count; e++) o[e] = new I(), s[e] = new I();
3281
3284
  let c = new I(), l = new I(), u = new I(), d = new F(), f = new F(), p = new F(), m = new I(), h = new I();
@@ -3310,7 +3313,7 @@ var Mr = class {
3310
3313
  let e = this.index, t = this.getAttribute("position");
3311
3314
  if (t !== void 0) {
3312
3315
  let n = this.getAttribute("normal");
3313
- if (n === void 0) n = new Fr(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
3316
+ if (n === void 0) n = new Lr(new Float32Array(t.count * 3), 3), this.setAttribute("normal", n);
3314
3317
  else for (let e = 0, t = n.count; e < t; e++) n.setXYZ(e, 0, 0, 0);
3315
3318
  let r = new I(), i = new I(), a = new I(), o = new I(), s = new I(), c = new I(), l = new I(), u = new I();
3316
3319
  if (e) for (let d = 0, f = e.count; d < f; d += 3) {
@@ -3332,7 +3335,7 @@ var Mr = class {
3332
3335
  o = e.isInterleavedBufferAttribute ? t[i] * e.data.stride + e.offset : t[i] * r;
3333
3336
  for (let e = 0; e < r; e++) a[s++] = n[o++];
3334
3337
  }
3335
- return new Fr(a, r, i);
3338
+ return new Lr(a, r, i);
3336
3339
  }
3337
3340
  if (this.index === null) return k("BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."), this;
3338
3341
  let n = new e(), r = this.index.array, i = this.attributes;
@@ -3428,9 +3431,9 @@ var Mr = class {
3428
3431
  dispose() {
3429
3432
  this.dispatchEvent({ type: "dispose" });
3430
3433
  }
3431
- }, Xr = class {
3434
+ }, Zr = class {
3432
3435
  constructor(e, t) {
3433
- this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e === void 0 ? 0 : e.length / t, this.usage = lt, this.updateRanges = [], this.version = 0, this.uuid = jt();
3436
+ this.isInterleavedBuffer = !0, this.array = e, this.stride = t, this.count = e === void 0 ? 0 : e.length / t, this.usage = lt, this.updateRanges = [], this.version = 0, this.uuid = Mt();
3434
3437
  }
3435
3438
  onUploadCallback() {}
3436
3439
  set needsUpdate(e) {
@@ -3460,7 +3463,7 @@ var Mr = class {
3460
3463
  return this.array.set(e, t), this;
3461
3464
  }
3462
3465
  clone(e) {
3463
- e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = jt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
3466
+ e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Mt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = this.array.slice(0).buffer);
3464
3467
  let t = new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]), n = new this.constructor(t, this.stride);
3465
3468
  return n.setUsage(this.usage), n;
3466
3469
  }
@@ -3468,14 +3471,14 @@ var Mr = class {
3468
3471
  return this.onUploadCallback = e, this;
3469
3472
  }
3470
3473
  toJSON(e) {
3471
- return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = jt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
3474
+ return e.arrayBuffers === void 0 && (e.arrayBuffers = {}), this.array.buffer._uuid === void 0 && (this.array.buffer._uuid = Mt()), e.arrayBuffers[this.array.buffer._uuid] === void 0 && (e.arrayBuffers[this.array.buffer._uuid] = Array.from(new Uint32Array(this.array.buffer))), {
3472
3475
  uuid: this.uuid,
3473
3476
  buffer: this.array.buffer._uuid,
3474
3477
  type: this.array.constructor.name,
3475
3478
  stride: this.stride
3476
3479
  };
3477
3480
  }
3478
- }, J = /* @__PURE__ */ new I(), Zr = class e {
3481
+ }, J = /* @__PURE__ */ new I(), Qr = class e {
3479
3482
  constructor(e, t, n, r = !1) {
3480
3483
  this.isInterleavedBufferAttribute = !0, this.name = "", this.data = e, this.itemSize = t, this.offset = n, this.normalized = r;
3481
3484
  }
@@ -3546,18 +3549,18 @@ var Mr = class {
3546
3549
  }
3547
3550
  clone(t) {
3548
3551
  if (t === void 0) {
3549
- St("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");
3552
+ Ct("InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");
3550
3553
  let e = [];
3551
3554
  for (let t = 0; t < this.count; t++) {
3552
3555
  let n = t * this.data.stride + this.offset;
3553
3556
  for (let t = 0; t < this.itemSize; t++) e.push(this.data.array[n + t]);
3554
3557
  }
3555
- return new Fr(new this.array.constructor(e), this.itemSize, this.normalized);
3558
+ return new Lr(new this.array.constructor(e), this.itemSize, this.normalized);
3556
3559
  } else return t.interleavedBuffers === void 0 && (t.interleavedBuffers = {}), t.interleavedBuffers[this.data.uuid] === void 0 && (t.interleavedBuffers[this.data.uuid] = this.data.clone(t)), new e(t.interleavedBuffers[this.data.uuid], this.itemSize, this.offset, this.normalized);
3557
3560
  }
3558
3561
  toJSON(e) {
3559
3562
  if (e === void 0) {
3560
- St("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");
3563
+ Ct("InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");
3561
3564
  let e = [];
3562
3565
  for (let t = 0; t < this.count; t++) {
3563
3566
  let n = t * this.data.stride + this.offset;
@@ -3577,9 +3580,9 @@ var Mr = class {
3577
3580
  normalized: this.normalized
3578
3581
  };
3579
3582
  }
3580
- }, Qr = 0, Y = class extends Dt {
3583
+ }, $r = 0, Y = class extends Ot {
3581
3584
  constructor() {
3582
- super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: Qr++ }), this.uuid = jt(), this.name = "", this.type = "Material", this.blending = 1, this.side = 0, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = 204, this.blendDst = 205, this.blendEquation = 100, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new H(0, 0, 0), this.blendAlpha = 0, this.depthFunc = 3, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = 519, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = nt, this.stencilZFail = nt, this.stencilZPass = nt, 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.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
3585
+ super(), this.isMaterial = !0, Object.defineProperty(this, "id", { value: $r++ }), this.uuid = Mt(), this.name = "", this.type = "Material", this.blending = 1, this.side = 0, this.vertexColors = !1, this.opacity = 1, this.transparent = !1, this.alphaHash = !1, this.blendSrc = 204, this.blendDst = 205, this.blendEquation = 100, this.blendSrcAlpha = null, this.blendDstAlpha = null, this.blendEquationAlpha = null, this.blendColor = new V(0, 0, 0), this.blendAlpha = 0, this.depthFunc = 3, this.depthTest = !0, this.depthWrite = !0, this.stencilWriteMask = 255, this.stencilFunc = 519, this.stencilRef = 0, this.stencilFuncMask = 255, this.stencilFail = nt, this.stencilZFail = nt, this.stencilZPass = nt, 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.alphaToCoverage = !1, this.premultipliedAlpha = !1, this.forceSinglePass = !1, this.allowOverride = !0, this.visible = !0, this.toneMapped = !0, this.userData = {}, this.version = 0, this._alphaTest = 0;
3583
3586
  }
3584
3587
  get alphaTest() {
3585
3588
  return this._alphaTest;
@@ -3652,14 +3655,14 @@ var Mr = class {
3652
3655
  set needsUpdate(e) {
3653
3656
  e === !0 && this.version++;
3654
3657
  }
3655
- }, $r = class extends Y {
3658
+ }, ei = class extends Y {
3656
3659
  constructor(e) {
3657
- super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new H(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.fog = !0, this.setValues(e);
3660
+ super(), this.isSpriteMaterial = !0, this.type = "SpriteMaterial", this.color = new V(16777215), this.map = null, this.alphaMap = null, this.rotation = 0, this.sizeAttenuation = !0, this.transparent = !0, this.fog = !0, this.setValues(e);
3658
3661
  }
3659
3662
  copy(e) {
3660
3663
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.rotation = e.rotation, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
3661
3664
  }
3662
- }, ei = /* @__PURE__ */ new I(), ti = /* @__PURE__ */ new I(), ni = /* @__PURE__ */ new I(), ri = /* @__PURE__ */ new I(), ii = /* @__PURE__ */ new I(), ai = /* @__PURE__ */ new I(), oi = /* @__PURE__ */ new I(), si = class {
3665
+ }, ti = /* @__PURE__ */ new I(), ni = /* @__PURE__ */ new I(), ri = /* @__PURE__ */ new I(), ii = /* @__PURE__ */ new I(), ai = /* @__PURE__ */ new I(), oi = /* @__PURE__ */ new I(), si = /* @__PURE__ */ new I(), ci = class {
3663
3666
  constructor(e = new I(), t = new I(0, 0, -1)) {
3664
3667
  this.origin = e, this.direction = t;
3665
3668
  }
@@ -3676,7 +3679,7 @@ var Mr = class {
3676
3679
  return this.direction.copy(e).sub(this.origin).normalize(), this;
3677
3680
  }
3678
3681
  recast(e) {
3679
- return this.origin.copy(this.at(e, ei)), this;
3682
+ return this.origin.copy(this.at(e, ti)), this;
3680
3683
  }
3681
3684
  closestPointToPoint(e, t) {
3682
3685
  t.subVectors(e, this.origin);
@@ -3687,12 +3690,12 @@ var Mr = class {
3687
3690
  return Math.sqrt(this.distanceSqToPoint(e));
3688
3691
  }
3689
3692
  distanceSqToPoint(e) {
3690
- let t = ei.subVectors(e, this.origin).dot(this.direction);
3691
- return t < 0 ? this.origin.distanceToSquared(e) : (ei.copy(this.origin).addScaledVector(this.direction, t), ei.distanceToSquared(e));
3693
+ let t = ti.subVectors(e, this.origin).dot(this.direction);
3694
+ return t < 0 ? this.origin.distanceToSquared(e) : (ti.copy(this.origin).addScaledVector(this.direction, t), ti.distanceToSquared(e));
3692
3695
  }
3693
3696
  distanceSqToSegment(e, t, n, r) {
3694
- ti.copy(e).add(t).multiplyScalar(.5), ni.copy(t).sub(e).normalize(), ri.copy(this.origin).sub(ti);
3695
- let i = e.distanceTo(t) * .5, a = -this.direction.dot(ni), o = ri.dot(this.direction), s = -ri.dot(ni), c = ri.lengthSq(), l = Math.abs(1 - a * a), u, d, f, p;
3697
+ ni.copy(e).add(t).multiplyScalar(.5), ri.copy(t).sub(e).normalize(), ii.copy(this.origin).sub(ni);
3698
+ let i = e.distanceTo(t) * .5, a = -this.direction.dot(ri), o = ii.dot(this.direction), s = -ii.dot(ri), c = ii.lengthSq(), l = Math.abs(1 - a * a), u, d, f, p;
3696
3699
  if (l > 0) if (u = a * s - o, d = a * o - s, p = i * l, u >= 0) if (d >= -p) if (d <= p) {
3697
3700
  let e = 1 / l;
3698
3701
  u *= e, d *= e, f = u * (u + a * d + 2 * o) + d * (a * u + d + 2 * s) + c;
@@ -3700,11 +3703,11 @@ var Mr = class {
3700
3703
  else d = -i, u = Math.max(0, -(a * d + o)), f = -u * u + d * (d + 2 * s) + c;
3701
3704
  else d <= -p ? (u = Math.max(0, -(-a * i + o)), d = u > 0 ? -i : Math.min(Math.max(-i, -s), i), f = -u * u + d * (d + 2 * s) + c) : d <= p ? (u = 0, d = Math.min(Math.max(-i, -s), i), f = d * (d + 2 * s) + c) : (u = Math.max(0, -(a * i + o)), d = u > 0 ? i : Math.min(Math.max(-i, -s), i), f = -u * u + d * (d + 2 * s) + c);
3702
3705
  else d = a > 0 ? -i : i, u = Math.max(0, -(a * d + o)), f = -u * u + d * (d + 2 * s) + c;
3703
- return n && n.copy(this.origin).addScaledVector(this.direction, u), r && r.copy(ti).addScaledVector(ni, d), f;
3706
+ return n && n.copy(this.origin).addScaledVector(this.direction, u), r && r.copy(ni).addScaledVector(ri, d), f;
3704
3707
  }
3705
3708
  intersectSphere(e, t) {
3706
- ei.subVectors(e.center, this.origin);
3707
- let n = ei.dot(this.direction), r = ei.dot(ei) - n * n, i = e.radius * e.radius;
3709
+ ti.subVectors(e.center, this.origin);
3710
+ let n = ti.dot(this.direction), r = ti.dot(ti) - n * n, i = e.radius * e.radius;
3708
3711
  if (r > i) return null;
3709
3712
  let a = Math.sqrt(i - r), o = n - a, s = n + a;
3710
3713
  return s < 0 ? null : o < 0 ? this.at(s, t) : this.at(o, t);
@@ -3731,22 +3734,22 @@ var Mr = class {
3731
3734
  return c >= 0 ? (n = (e.min.x - d.x) * c, r = (e.max.x - d.x) * c) : (n = (e.max.x - d.x) * c, r = (e.min.x - d.x) * c), l >= 0 ? (i = (e.min.y - d.y) * l, a = (e.max.y - d.y) * l) : (i = (e.max.y - d.y) * l, a = (e.min.y - d.y) * l), n > a || i > r || ((i > n || isNaN(n)) && (n = i), (a < r || isNaN(r)) && (r = a), u >= 0 ? (o = (e.min.z - d.z) * u, s = (e.max.z - d.z) * u) : (o = (e.max.z - d.z) * u, s = (e.min.z - d.z) * u), n > s || o > r) || ((o > n || n !== n) && (n = o), (s < r || r !== r) && (r = s), r < 0) ? null : this.at(n >= 0 ? n : r, t);
3732
3735
  }
3733
3736
  intersectsBox(e) {
3734
- return this.intersectBox(e, ei) !== null;
3737
+ return this.intersectBox(e, ti) !== null;
3735
3738
  }
3736
3739
  intersectTriangle(e, t, n, r, i) {
3737
- ii.subVectors(t, e), ai.subVectors(n, e), oi.crossVectors(ii, ai);
3738
- let a = this.direction.dot(oi), o;
3740
+ ai.subVectors(t, e), oi.subVectors(n, e), si.crossVectors(ai, oi);
3741
+ let a = this.direction.dot(si), o;
3739
3742
  if (a > 0) {
3740
3743
  if (r) return null;
3741
3744
  o = 1;
3742
3745
  } else if (a < 0) o = -1, a = -a;
3743
3746
  else return null;
3744
- ri.subVectors(this.origin, e);
3745
- let s = o * this.direction.dot(ai.crossVectors(ri, ai));
3747
+ ii.subVectors(this.origin, e);
3748
+ let s = o * this.direction.dot(oi.crossVectors(ii, oi));
3746
3749
  if (s < 0) return null;
3747
- let c = o * this.direction.dot(ii.cross(ri));
3750
+ let c = o * this.direction.dot(ai.cross(ii));
3748
3751
  if (c < 0 || s + c > a) return null;
3749
- let l = -o * ri.dot(oi);
3752
+ let l = -o * ii.dot(si);
3750
3753
  return l < 0 ? null : this.at(l / a, i);
3751
3754
  }
3752
3755
  applyMatrix4(e) {
@@ -3758,15 +3761,15 @@ var Mr = class {
3758
3761
  clone() {
3759
3762
  return new this.constructor().copy(this);
3760
3763
  }
3761
- }, ci = class extends Y {
3764
+ }, li = class extends Y {
3762
3765
  constructor(e) {
3763
- super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new H(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.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
3766
+ super(), this.isMeshBasicMaterial = !0, this.type = "MeshBasicMaterial", this.color = new V(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.envMapRotation = new An(), this.combine = 0, this.reflectivity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
3764
3767
  }
3765
3768
  copy(e) {
3766
3769
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
3767
3770
  }
3768
- }, li = /* @__PURE__ */ new z(), ui = /* @__PURE__ */ new si(), di = /* @__PURE__ */ new Hr(), fi = /* @__PURE__ */ new I(), pi = /* @__PURE__ */ new I(), mi = /* @__PURE__ */ new I(), hi = /* @__PURE__ */ new I(), gi = /* @__PURE__ */ new I(), _i = /* @__PURE__ */ new I(), vi = /* @__PURE__ */ new I(), yi = /* @__PURE__ */ new I(), bi = class extends V {
3769
- constructor(e = new Yr(), t = new ci()) {
3771
+ }, ui = /* @__PURE__ */ new R(), di = /* @__PURE__ */ new ci(), fi = /* @__PURE__ */ new Wr(), pi = /* @__PURE__ */ new I(), mi = /* @__PURE__ */ new I(), hi = /* @__PURE__ */ new I(), gi = /* @__PURE__ */ new I(), _i = /* @__PURE__ */ new I(), vi = /* @__PURE__ */ new I(), yi = /* @__PURE__ */ new I(), bi = /* @__PURE__ */ new I(), xi = class extends B {
3772
+ constructor(e = new Xr(), t = new li()) {
3770
3773
  super(), this.isMesh = !0, this.type = "Mesh", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.count = 1, this.updateMorphTargets();
3771
3774
  }
3772
3775
  copy(e, t) {
@@ -3790,18 +3793,18 @@ var Mr = class {
3790
3793
  t.fromBufferAttribute(r, e);
3791
3794
  let o = this.morphTargetInfluences;
3792
3795
  if (i && o) {
3793
- _i.set(0, 0, 0);
3796
+ vi.set(0, 0, 0);
3794
3797
  for (let n = 0, r = i.length; n < r; n++) {
3795
3798
  let r = o[n], s = i[n];
3796
- r !== 0 && (gi.fromBufferAttribute(s, e), a ? _i.addScaledVector(gi, r) : _i.addScaledVector(gi.sub(t), r));
3799
+ r !== 0 && (_i.fromBufferAttribute(s, e), a ? vi.addScaledVector(_i, r) : vi.addScaledVector(_i.sub(t), r));
3797
3800
  }
3798
- t.add(_i);
3801
+ t.add(vi);
3799
3802
  }
3800
3803
  return t;
3801
3804
  }
3802
3805
  raycast(e, t) {
3803
3806
  let n = this.geometry, r = this.material, i = this.matrixWorld;
3804
- r !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(), di.copy(n.boundingSphere), di.applyMatrix4(i), ui.copy(e.ray).recast(e.near), !(di.containsPoint(ui.origin) === !1 && (ui.intersectSphere(di, fi) === null || ui.origin.distanceToSquared(fi) > (e.far - e.near) ** 2)) && (li.copy(i).invert(), ui.copy(e.ray).applyMatrix4(li), !(n.boundingBox !== null && ui.intersectsBox(n.boundingBox) === !1) && this._computeIntersections(e, t, ui)));
3807
+ r !== void 0 && (n.boundingSphere === null && n.computeBoundingSphere(), fi.copy(n.boundingSphere), fi.applyMatrix4(i), di.copy(e.ray).recast(e.near), !(fi.containsPoint(di.origin) === !1 && (di.intersectSphere(fi, pi) === null || di.origin.distanceToSquared(pi) > (e.far - e.near) ** 2)) && (ui.copy(i).invert(), di.copy(e.ray).applyMatrix4(ui), !(n.boundingBox !== null && di.intersectsBox(n.boundingBox) === !1) && this._computeIntersections(e, t, di)));
3805
3808
  }
3806
3809
  _computeIntersections(e, t, n) {
3807
3810
  let r, i = this.geometry, a = this.material, o = i.index, s = i.attributes.position, c = i.attributes.uv, l = i.attributes.uv1, u = i.attributes.normal, d = i.groups, f = i.drawRange;
@@ -3809,49 +3812,49 @@ var Mr = class {
3809
3812
  let s = d[i], p = a[s.materialIndex], m = Math.max(s.start, f.start), h = Math.min(o.count, Math.min(s.start + s.count, f.start + f.count));
3810
3813
  for (let i = m, a = h; i < a; i += 3) {
3811
3814
  let a = o.getX(i), d = o.getX(i + 1), f = o.getX(i + 2);
3812
- r = Si(this, p, e, n, c, l, u, a, d, f), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = s.materialIndex, t.push(r));
3815
+ r = Ci(this, p, e, n, c, l, u, a, d, f), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = s.materialIndex, t.push(r));
3813
3816
  }
3814
3817
  }
3815
3818
  else {
3816
3819
  let i = Math.max(0, f.start), s = Math.min(o.count, f.start + f.count);
3817
3820
  for (let d = i, f = s; d < f; d += 3) {
3818
3821
  let i = o.getX(d), s = o.getX(d + 1), f = o.getX(d + 2);
3819
- r = Si(this, a, e, n, c, l, u, i, s, f), r && (r.faceIndex = Math.floor(d / 3), t.push(r));
3822
+ r = Ci(this, a, e, n, c, l, u, i, s, f), r && (r.faceIndex = Math.floor(d / 3), t.push(r));
3820
3823
  }
3821
3824
  }
3822
3825
  else if (s !== void 0) if (Array.isArray(a)) for (let i = 0, o = d.length; i < o; i++) {
3823
3826
  let o = d[i], p = a[o.materialIndex], m = Math.max(o.start, f.start), h = Math.min(s.count, Math.min(o.start + o.count, f.start + f.count));
3824
3827
  for (let i = m, a = h; i < a; i += 3) {
3825
3828
  let a = i, s = i + 1, d = i + 2;
3826
- r = Si(this, p, e, n, c, l, u, a, s, d), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = o.materialIndex, t.push(r));
3829
+ r = Ci(this, p, e, n, c, l, u, a, s, d), r && (r.faceIndex = Math.floor(i / 3), r.face.materialIndex = o.materialIndex, t.push(r));
3827
3830
  }
3828
3831
  }
3829
3832
  else {
3830
3833
  let i = Math.max(0, f.start), o = Math.min(s.count, f.start + f.count);
3831
3834
  for (let s = i, d = o; s < d; s += 3) {
3832
3835
  let i = s, o = s + 1, d = s + 2;
3833
- r = Si(this, a, e, n, c, l, u, i, o, d), r && (r.faceIndex = Math.floor(s / 3), t.push(r));
3836
+ r = Ci(this, a, e, n, c, l, u, i, o, d), r && (r.faceIndex = Math.floor(s / 3), t.push(r));
3834
3837
  }
3835
3838
  }
3836
3839
  }
3837
3840
  };
3838
- function xi(e, t, n, r, i, a, o, s) {
3841
+ function Si(e, t, n, r, i, a, o, s) {
3839
3842
  let c;
3840
3843
  if (c = t.side === 1 ? r.intersectTriangle(o, a, i, !0, s) : r.intersectTriangle(i, a, o, t.side === 0, s), c === null) return null;
3841
- yi.copy(s), yi.applyMatrix4(e.matrixWorld);
3842
- let l = n.ray.origin.distanceTo(yi);
3844
+ bi.copy(s), bi.applyMatrix4(e.matrixWorld);
3845
+ let l = n.ray.origin.distanceTo(bi);
3843
3846
  return l < n.near || l > n.far ? null : {
3844
3847
  distance: l,
3845
- point: yi.clone(),
3848
+ point: bi.clone(),
3846
3849
  object: e
3847
3850
  };
3848
3851
  }
3849
- function Si(e, t, n, r, i, a, o, s, c, l) {
3850
- e.getVertexPosition(s, pi), e.getVertexPosition(c, mi), e.getVertexPosition(l, hi);
3851
- let u = xi(e, t, n, r, pi, mi, hi, vi);
3852
+ function Ci(e, t, n, r, i, a, o, s, c, l) {
3853
+ e.getVertexPosition(s, mi), e.getVertexPosition(c, hi), e.getVertexPosition(l, gi);
3854
+ let u = Si(e, t, n, r, mi, hi, gi, yi);
3852
3855
  if (u) {
3853
3856
  let e = new I();
3854
- pr.getBarycoord(vi, pi, mi, hi, e), i && (u.uv = pr.getInterpolatedAttribute(i, s, c, l, e, new F())), a && (u.uv1 = pr.getInterpolatedAttribute(a, s, c, l, e, new F())), o && (u.normal = pr.getInterpolatedAttribute(o, s, c, l, e, new I()), u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
3857
+ hr.getBarycoord(yi, mi, hi, gi, e), i && (u.uv = hr.getInterpolatedAttribute(i, s, c, l, e, new F())), a && (u.uv1 = hr.getInterpolatedAttribute(a, s, c, l, e, new F())), o && (u.normal = hr.getInterpolatedAttribute(o, s, c, l, e, new I()), u.normal.dot(r.direction) > 0 && u.normal.multiplyScalar(-1));
3855
3858
  let t = {
3856
3859
  a: s,
3857
3860
  b: c,
@@ -3859,32 +3862,32 @@ function Si(e, t, n, r, i, a, o, s, c, l) {
3859
3862
  normal: new I(),
3860
3863
  materialIndex: 0
3861
3864
  };
3862
- pr.getNormal(pi, mi, hi, t.normal), u.face = t, u.barycoord = e;
3865
+ hr.getNormal(mi, hi, gi, t.normal), u.face = t, u.barycoord = e;
3863
3866
  }
3864
3867
  return u;
3865
3868
  }
3866
- var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE__ */ new hn(), Ei = /* @__PURE__ */ new I(), Di = /* @__PURE__ */ new z(), Oi = /* @__PURE__ */ new I(), ki = /* @__PURE__ */ new Hr(), Ai = /* @__PURE__ */ new z(), ji = /* @__PURE__ */ new si(), Mi = class extends bi {
3869
+ var wi = /* @__PURE__ */ new I(), Ti = /* @__PURE__ */ new _n(), Ei = /* @__PURE__ */ new _n(), Di = /* @__PURE__ */ new I(), Oi = /* @__PURE__ */ new R(), ki = /* @__PURE__ */ new I(), Ai = /* @__PURE__ */ new Wr(), ji = /* @__PURE__ */ new R(), Mi = /* @__PURE__ */ new ci(), Ni = class extends xi {
3867
3870
  constructor(t, n) {
3868
- super(t, n), this.isSkinnedMesh = !0, this.type = "SkinnedMesh", this.bindMode = e, this.bindMatrix = new z(), this.bindMatrixInverse = new z(), this.boundingBox = null, this.boundingSphere = null;
3871
+ super(t, n), this.isSkinnedMesh = !0, this.type = "SkinnedMesh", this.bindMode = e, this.bindMatrix = new R(), this.bindMatrixInverse = new R(), this.boundingBox = null, this.boundingSphere = null;
3869
3872
  }
3870
3873
  computeBoundingBox() {
3871
3874
  let e = this.geometry;
3872
- this.boundingBox === null && (this.boundingBox = new mr()), this.boundingBox.makeEmpty();
3875
+ this.boundingBox === null && (this.boundingBox = new gr()), this.boundingBox.makeEmpty();
3873
3876
  let t = e.getAttribute("position");
3874
- for (let e = 0; e < t.count; e++) this.getVertexPosition(e, Oi), this.boundingBox.expandByPoint(Oi);
3877
+ for (let e = 0; e < t.count; e++) this.getVertexPosition(e, ki), this.boundingBox.expandByPoint(ki);
3875
3878
  }
3876
3879
  computeBoundingSphere() {
3877
3880
  let e = this.geometry;
3878
- this.boundingSphere === null && (this.boundingSphere = new Hr()), this.boundingSphere.makeEmpty();
3881
+ this.boundingSphere === null && (this.boundingSphere = new Wr()), this.boundingSphere.makeEmpty();
3879
3882
  let t = e.getAttribute("position");
3880
- for (let e = 0; e < t.count; e++) this.getVertexPosition(e, Oi), this.boundingSphere.expandByPoint(Oi);
3883
+ for (let e = 0; e < t.count; e++) this.getVertexPosition(e, ki), this.boundingSphere.expandByPoint(ki);
3881
3884
  }
3882
3885
  copy(e, t) {
3883
3886
  return super.copy(e, t), this.bindMode = e.bindMode, this.bindMatrix.copy(e.bindMatrix), this.bindMatrixInverse.copy(e.bindMatrixInverse), this.skeleton = e.skeleton, e.boundingBox !== null && (this.boundingBox = e.boundingBox.clone()), e.boundingSphere !== null && (this.boundingSphere = e.boundingSphere.clone()), this;
3884
3887
  }
3885
3888
  raycast(e, t) {
3886
3889
  let n = this.material, r = this.matrixWorld;
3887
- n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), ki.copy(this.boundingSphere), ki.applyMatrix4(r), e.ray.intersectsSphere(ki) !== !1 && (Ai.copy(r).invert(), ji.copy(e.ray).applyMatrix4(Ai), !(this.boundingBox !== null && ji.intersectsBox(this.boundingBox) === !1) && this._computeIntersections(e, t, ji)));
3890
+ n !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), Ai.copy(this.boundingSphere), Ai.applyMatrix4(r), e.ray.intersectsSphere(Ai) !== !1 && (ji.copy(r).invert(), Mi.copy(e.ray).applyMatrix4(ji), !(this.boundingBox !== null && Mi.intersectsBox(this.boundingBox) === !1) && this._computeIntersections(e, t, Mi)));
3888
3891
  }
3889
3892
  getVertexPosition(e, t) {
3890
3893
  return super.getVertexPosition(e, t), this.applyBoneTransform(e, t), t;
@@ -3896,7 +3899,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3896
3899
  this.skeleton.pose();
3897
3900
  }
3898
3901
  normalizeSkinWeights() {
3899
- let e = new hn(), t = this.geometry.attributes.skinWeight;
3902
+ let e = new _n(), t = this.geometry.attributes.skinWeight;
3900
3903
  for (let n = 0, r = t.count; n < r; n++) {
3901
3904
  e.fromBufferAttribute(t, n);
3902
3905
  let r = 1 / e.manhattanLength();
@@ -3908,21 +3911,21 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3908
3911
  }
3909
3912
  applyBoneTransform(e, t) {
3910
3913
  let n = this.skeleton, r = this.geometry;
3911
- wi.fromBufferAttribute(r.attributes.skinIndex, e), Ti.fromBufferAttribute(r.attributes.skinWeight, e), Ci.copy(t).applyMatrix4(this.bindMatrix), t.set(0, 0, 0);
3914
+ Ti.fromBufferAttribute(r.attributes.skinIndex, e), Ei.fromBufferAttribute(r.attributes.skinWeight, e), wi.copy(t).applyMatrix4(this.bindMatrix), t.set(0, 0, 0);
3912
3915
  for (let e = 0; e < 4; e++) {
3913
- let r = Ti.getComponent(e);
3916
+ let r = Ei.getComponent(e);
3914
3917
  if (r !== 0) {
3915
- let i = wi.getComponent(e);
3916
- Di.multiplyMatrices(n.bones[i].matrixWorld, n.boneInverses[i]), t.addScaledVector(Ei.copy(Ci).applyMatrix4(Di), r);
3918
+ let i = Ti.getComponent(e);
3919
+ Oi.multiplyMatrices(n.bones[i].matrixWorld, n.boneInverses[i]), t.addScaledVector(Di.copy(wi).applyMatrix4(Oi), r);
3917
3920
  }
3918
3921
  }
3919
3922
  return t.applyMatrix4(this.bindMatrixInverse);
3920
3923
  }
3921
- }, Ni = class extends V {
3924
+ }, Pi = class extends B {
3922
3925
  constructor() {
3923
3926
  super(), this.isBone = !0, this.type = "Bone";
3924
3927
  }
3925
- }, Pi = class extends R {
3928
+ }, Fi = class extends L {
3926
3929
  constructor(e = null, t = 1, n = 1, r, i, o, s, c, l = a, u = a, d, f) {
3927
3930
  super(null, o, s, c, l, u, r, i, d, f), this.isDataTexture = !0, this.image = {
3928
3931
  data: e,
@@ -3930,22 +3933,22 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3930
3933
  height: n
3931
3934
  }, this.generateMipmaps = !1, this.flipY = !1, this.unpackAlignment = 1;
3932
3935
  }
3933
- }, Fi = /* @__PURE__ */ new z(), Ii = /* @__PURE__ */ new z(), Li = class e {
3936
+ }, Ii = /* @__PURE__ */ new R(), Li = /* @__PURE__ */ new R(), Ri = class e {
3934
3937
  constructor(e = [], t = []) {
3935
- this.uuid = jt(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.previousBoneMatrices = null, this.boneTexture = null, this.init();
3938
+ this.uuid = Mt(), this.bones = e.slice(0), this.boneInverses = t, this.boneMatrices = null, this.previousBoneMatrices = null, this.boneTexture = null, this.init();
3936
3939
  }
3937
3940
  init() {
3938
3941
  let e = this.bones, t = this.boneInverses;
3939
3942
  if (this.boneMatrices = new Float32Array(e.length * 16), t.length === 0) this.calculateInverses();
3940
3943
  else if (e.length !== t.length) {
3941
3944
  k("Skeleton: Number of inverse bone matrices does not match amount of bones."), this.boneInverses = [];
3942
- for (let e = 0, t = this.bones.length; e < t; e++) this.boneInverses.push(new z());
3945
+ for (let e = 0, t = this.bones.length; e < t; e++) this.boneInverses.push(new R());
3943
3946
  }
3944
3947
  }
3945
3948
  calculateInverses() {
3946
3949
  this.boneInverses.length = 0;
3947
3950
  for (let e = 0, t = this.bones.length; e < t; e++) {
3948
- let t = new z();
3951
+ let t = new R();
3949
3952
  this.bones[e] && t.copy(this.bones[e].matrixWorld).invert(), this.boneInverses.push(t);
3950
3953
  }
3951
3954
  }
@@ -3962,8 +3965,8 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3962
3965
  update() {
3963
3966
  let e = this.bones, t = this.boneInverses, n = this.boneMatrices, r = this.boneTexture;
3964
3967
  for (let r = 0, i = e.length; r < i; r++) {
3965
- let i = e[r] ? e[r].matrixWorld : Ii;
3966
- Fi.multiplyMatrices(i, t[r]), Fi.toArray(n, r * 16);
3968
+ let i = e[r] ? e[r].matrixWorld : Li;
3969
+ Ii.multiplyMatrices(i, t[r]), Ii.toArray(n, r * 16);
3967
3970
  }
3968
3971
  r !== null && (r.needsUpdate = !0);
3969
3972
  }
@@ -3975,7 +3978,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3975
3978
  e = Math.ceil(e / 4) * 4, e = Math.max(e, 4);
3976
3979
  let t = new Float32Array(e * e * 4);
3977
3980
  t.set(this.boneMatrices);
3978
- let n = new Pi(t, e, e, D, v);
3981
+ let n = new Fi(t, e, e, D, v);
3979
3982
  return n.needsUpdate = !0, this.boneMatrices = t, this.boneTexture = n, this;
3980
3983
  }
3981
3984
  getBoneByName(e) {
@@ -3991,7 +3994,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
3991
3994
  this.uuid = e.uuid;
3992
3995
  for (let n = 0, r = e.bones.length; n < r; n++) {
3993
3996
  let r = e.bones[n], i = t[r];
3994
- i === void 0 && (k("Skeleton: No bone found with UUID:", r), i = new Ni()), this.bones.push(i), this.boneInverses.push(new z().fromArray(e.boneInverses[n]));
3997
+ i === void 0 && (k("Skeleton: No bone found with UUID:", r), i = new Pi()), this.bones.push(i), this.boneInverses.push(new R().fromArray(e.boneInverses[n]));
3995
3998
  }
3996
3999
  return this.init(), this;
3997
4000
  }
@@ -4015,7 +4018,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4015
4018
  }
4016
4019
  return e;
4017
4020
  }
4018
- }, Ri = class extends Fr {
4021
+ }, zi = class extends Lr {
4019
4022
  constructor(e, t, n, r = 1) {
4020
4023
  super(e, t, n), this.isInstancedBufferAttribute = !0, this.meshPerAttribute = r;
4021
4024
  }
@@ -4026,20 +4029,20 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4026
4029
  let e = super.toJSON();
4027
4030
  return e.meshPerAttribute = this.meshPerAttribute, e.isInstancedBufferAttribute = !0, e;
4028
4031
  }
4029
- }, zi = /* @__PURE__ */ new z(), Bi = /* @__PURE__ */ new z(), Vi = [], Hi = /* @__PURE__ */ new mr(), Ui = /* @__PURE__ */ new z(), Wi = /* @__PURE__ */ new bi(), Gi = /* @__PURE__ */ new Hr(), Ki = class extends bi {
4032
+ }, Bi = /* @__PURE__ */ new R(), Vi = /* @__PURE__ */ new R(), Hi = [], Ui = /* @__PURE__ */ new gr(), Wi = /* @__PURE__ */ new R(), Gi = /* @__PURE__ */ new xi(), Ki = /* @__PURE__ */ new Wr(), qi = class extends xi {
4030
4033
  constructor(e, t, n) {
4031
- super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new Ri(new Float32Array(n * 16), 16), this.previousInstanceMatrix = null, this.instanceColor = null, this.morphTexture = null, this.count = n, this.boundingBox = null, this.boundingSphere = null;
4032
- for (let e = 0; e < n; e++) this.setMatrixAt(e, Ui);
4034
+ super(e, t), this.isInstancedMesh = !0, this.instanceMatrix = new zi(new Float32Array(n * 16), 16), this.previousInstanceMatrix = null, this.instanceColor = null, this.morphTexture = null, this.count = n, this.boundingBox = null, this.boundingSphere = null;
4035
+ for (let e = 0; e < n; e++) this.setMatrixAt(e, Wi);
4033
4036
  }
4034
4037
  computeBoundingBox() {
4035
4038
  let e = this.geometry, t = this.count;
4036
- this.boundingBox === null && (this.boundingBox = new mr()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
4037
- for (let n = 0; n < t; n++) this.getMatrixAt(n, zi), Hi.copy(e.boundingBox).applyMatrix4(zi), this.boundingBox.union(Hi);
4039
+ this.boundingBox === null && (this.boundingBox = new gr()), e.boundingBox === null && e.computeBoundingBox(), this.boundingBox.makeEmpty();
4040
+ for (let n = 0; n < t; n++) this.getMatrixAt(n, Bi), Ui.copy(e.boundingBox).applyMatrix4(Bi), this.boundingBox.union(Ui);
4038
4041
  }
4039
4042
  computeBoundingSphere() {
4040
4043
  let e = this.geometry, t = this.count;
4041
- this.boundingSphere === null && (this.boundingSphere = new Hr()), e.boundingSphere === null && e.computeBoundingSphere(), this.boundingSphere.makeEmpty();
4042
- for (let n = 0; n < t; n++) this.getMatrixAt(n, zi), Gi.copy(e.boundingSphere).applyMatrix4(zi), this.boundingSphere.union(Gi);
4044
+ this.boundingSphere === null && (this.boundingSphere = new Wr()), e.boundingSphere === null && e.computeBoundingSphere(), this.boundingSphere.makeEmpty();
4045
+ for (let n = 0; n < t; n++) this.getMatrixAt(n, Bi), Ki.copy(e.boundingSphere).applyMatrix4(Bi), this.boundingSphere.union(Ki);
4043
4046
  }
4044
4047
  copy(e, t) {
4045
4048
  return super.copy(e, t), this.instanceMatrix.copy(e.instanceMatrix), e.previousInstanceMatrix !== null && (this.previousInstanceMatrix = e.previousInstanceMatrix.clone()), e.morphTexture !== null && (this.morphTexture = e.morphTexture.clone()), e.instanceColor !== null && (this.instanceColor = e.instanceColor.clone()), this.count = e.count, e.boundingBox !== null && (this.boundingBox = e.boundingBox.clone()), e.boundingSphere !== null && (this.boundingSphere = e.boundingSphere.clone()), this;
@@ -4056,24 +4059,24 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4056
4059
  }
4057
4060
  raycast(e, t) {
4058
4061
  let n = this.matrixWorld, r = this.count;
4059
- if (Wi.geometry = this.geometry, Wi.material = this.material, Wi.material !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), Gi.copy(this.boundingSphere), Gi.applyMatrix4(n), e.ray.intersectsSphere(Gi) !== !1)) for (let i = 0; i < r; i++) {
4060
- this.getMatrixAt(i, zi), Bi.multiplyMatrices(n, zi), Wi.matrixWorld = Bi, Wi.raycast(e, Vi);
4061
- for (let e = 0, n = Vi.length; e < n; e++) {
4062
- let n = Vi[e];
4062
+ if (Gi.geometry = this.geometry, Gi.material = this.material, Gi.material !== void 0 && (this.boundingSphere === null && this.computeBoundingSphere(), Ki.copy(this.boundingSphere), Ki.applyMatrix4(n), e.ray.intersectsSphere(Ki) !== !1)) for (let i = 0; i < r; i++) {
4063
+ this.getMatrixAt(i, Bi), Vi.multiplyMatrices(n, Bi), Gi.matrixWorld = Vi, Gi.raycast(e, Hi);
4064
+ for (let e = 0, n = Hi.length; e < n; e++) {
4065
+ let n = Hi[e];
4063
4066
  n.instanceId = i, n.object = this, t.push(n);
4064
4067
  }
4065
- Vi.length = 0;
4068
+ Hi.length = 0;
4066
4069
  }
4067
4070
  }
4068
4071
  setColorAt(e, t) {
4069
- this.instanceColor === null && (this.instanceColor = new Ri(new Float32Array(this.instanceMatrix.count * 3).fill(1), 3)), t.toArray(this.instanceColor.array, e * 3);
4072
+ this.instanceColor === null && (this.instanceColor = new zi(new Float32Array(this.instanceMatrix.count * 3).fill(1), 3)), t.toArray(this.instanceColor.array, e * 3);
4070
4073
  }
4071
4074
  setMatrixAt(e, t) {
4072
4075
  t.toArray(this.instanceMatrix.array, e * 16);
4073
4076
  }
4074
4077
  setMorphAt(e, t) {
4075
4078
  let n = t.morphTargetInfluences, r = n.length + 1;
4076
- this.morphTexture === null && (this.morphTexture = new Pi(new Float32Array(r * this.count), r, this.count, O, v));
4079
+ this.morphTexture === null && (this.morphTexture = new Fi(new Float32Array(r * this.count), r, this.count, O, v));
4077
4080
  let i = this.morphTexture.source.data.data, a = 0;
4078
4081
  for (let e = 0; e < n.length; e++) a += n[e];
4079
4082
  let o = this.geometry.morphTargetsRelative ? 1 : 1 - a, s = r * e;
@@ -4083,7 +4086,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4083
4086
  dispose() {
4084
4087
  this.dispatchEvent({ type: "dispose" }), this.morphTexture !== null && (this.morphTexture.dispose(), this.morphTexture = null);
4085
4088
  }
4086
- }, qi = /* @__PURE__ */ new I(), Ji = /* @__PURE__ */ new I(), Yi = /* @__PURE__ */ new en(), Xi = class {
4089
+ }, Ji = /* @__PURE__ */ new I(), Yi = /* @__PURE__ */ new I(), Xi = /* @__PURE__ */ new tn(), Zi = class {
4087
4090
  constructor(e = new I(1, 0, 0), t = 0) {
4088
4091
  this.isPlane = !0, this.normal = e, this.constant = t;
4089
4092
  }
@@ -4097,7 +4100,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4097
4100
  return this.normal.copy(e), this.constant = -t.dot(this.normal), this;
4098
4101
  }
4099
4102
  setFromCoplanarPoints(e, t, n) {
4100
- let r = qi.subVectors(n, t).cross(Ji.subVectors(e, t)).normalize();
4103
+ let r = Ji.subVectors(n, t).cross(Yi.subVectors(e, t)).normalize();
4101
4104
  return this.setFromNormalAndCoplanarPoint(r, e), this;
4102
4105
  }
4103
4106
  copy(e) {
@@ -4120,7 +4123,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4120
4123
  return t.copy(e).addScaledVector(this.normal, -this.distanceToPoint(e));
4121
4124
  }
4122
4125
  intersectLine(e, t) {
4123
- let n = e.delta(qi), r = this.normal.dot(n);
4126
+ let n = e.delta(Ji), r = this.normal.dot(n);
4124
4127
  if (r === 0) return this.distanceToPoint(e.start) === 0 ? t.copy(e.start) : null;
4125
4128
  let i = -(e.start.dot(this.normal) + this.constant) / r;
4126
4129
  return i < 0 || i > 1 ? null : t.copy(e.start).addScaledVector(n, i);
@@ -4139,7 +4142,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4139
4142
  return e.copy(this.normal).multiplyScalar(-this.constant);
4140
4143
  }
4141
4144
  applyMatrix4(e, t) {
4142
- let n = t || Yi.getNormalMatrix(e), r = this.coplanarPoint(qi).applyMatrix4(e), i = this.normal.applyMatrix3(n).normalize();
4145
+ let n = t || Xi.getNormalMatrix(e), r = this.coplanarPoint(Ji).applyMatrix4(e), i = this.normal.applyMatrix3(n).normalize();
4143
4146
  return this.constant = -r.dot(i), this;
4144
4147
  }
4145
4148
  translate(e) {
@@ -4151,8 +4154,8 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4151
4154
  clone() {
4152
4155
  return new this.constructor().copy(this);
4153
4156
  }
4154
- }, Zi = /* @__PURE__ */ new Hr(), Qi = /* @__PURE__ */ new F(.5, .5), $i = /* @__PURE__ */ new I(), ea = class {
4155
- constructor(e = new Xi(), t = new Xi(), n = new Xi(), r = new Xi(), i = new Xi(), a = new Xi()) {
4157
+ }, Qi = /* @__PURE__ */ new Wr(), $i = /* @__PURE__ */ new F(.5, .5), ea = /* @__PURE__ */ new I(), ta = class {
4158
+ constructor(e = new Zi(), t = new Zi(), n = new Zi(), r = new Zi(), i = new Zi(), a = new Zi()) {
4156
4159
  this.planes = [
4157
4160
  e,
4158
4161
  t,
@@ -4180,15 +4183,15 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4180
4183
  return this;
4181
4184
  }
4182
4185
  intersectsObject(e) {
4183
- if (e.boundingSphere !== void 0) e.boundingSphere === null && e.computeBoundingSphere(), Zi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
4186
+ if (e.boundingSphere !== void 0) e.boundingSphere === null && e.computeBoundingSphere(), Qi.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);
4184
4187
  else {
4185
4188
  let t = e.geometry;
4186
- t.boundingSphere === null && t.computeBoundingSphere(), Zi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);
4189
+ t.boundingSphere === null && t.computeBoundingSphere(), Qi.copy(t.boundingSphere).applyMatrix4(e.matrixWorld);
4187
4190
  }
4188
- return this.intersectsSphere(Zi);
4191
+ return this.intersectsSphere(Qi);
4189
4192
  }
4190
4193
  intersectsSprite(e) {
4191
- return Zi.center.set(0, 0, 0), Zi.radius = .7071067811865476 + Qi.distanceTo(e.center), Zi.applyMatrix4(e.matrixWorld), this.intersectsSphere(Zi);
4194
+ return Qi.center.set(0, 0, 0), Qi.radius = .7071067811865476 + $i.distanceTo(e.center), Qi.applyMatrix4(e.matrixWorld), this.intersectsSphere(Qi);
4192
4195
  }
4193
4196
  intersectsSphere(e) {
4194
4197
  let t = this.planes, n = e.center, r = -e.radius;
@@ -4199,7 +4202,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4199
4202
  let t = this.planes;
4200
4203
  for (let n = 0; n < 6; n++) {
4201
4204
  let r = t[n];
4202
- if ($i.x = r.normal.x > 0 ? e.max.x : e.min.x, $i.y = r.normal.y > 0 ? e.max.y : e.min.y, $i.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint($i) < 0) return !1;
4205
+ if (ea.x = r.normal.x > 0 ? e.max.x : e.min.x, ea.y = r.normal.y > 0 ? e.max.y : e.min.y, ea.z = r.normal.z > 0 ? e.max.z : e.min.z, r.distanceToPoint(ea) < 0) return !1;
4203
4206
  }
4204
4207
  return !0;
4205
4208
  }
@@ -4211,7 +4214,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4211
4214
  clone() {
4212
4215
  return new this.constructor().copy(this);
4213
4216
  }
4214
- }, ta = /* @__PURE__ */ new z(), na = /* @__PURE__ */ new ea(), ra = class e {
4217
+ }, na = /* @__PURE__ */ new R(), ra = /* @__PURE__ */ new ta(), ia = class e {
4215
4218
  constructor() {
4216
4219
  this.coordinateSystem = ft;
4217
4220
  }
@@ -4219,7 +4222,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4219
4222
  if (!t.isArrayCamera || t.cameras.length === 0) return !1;
4220
4223
  for (let n = 0; n < t.cameras.length; n++) {
4221
4224
  let r = t.cameras[n];
4222
- if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsObject(e)) return !0;
4225
+ if (na.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), ra.setFromProjectionMatrix(na, r.coordinateSystem, r.reversedDepth), ra.intersectsObject(e)) return !0;
4223
4226
  }
4224
4227
  return !1;
4225
4228
  }
@@ -4227,7 +4230,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4227
4230
  if (!t || !t.cameras || t.cameras.length === 0) return !1;
4228
4231
  for (let n = 0; n < t.cameras.length; n++) {
4229
4232
  let r = t.cameras[n];
4230
- if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsSprite(e)) return !0;
4233
+ if (na.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), ra.setFromProjectionMatrix(na, r.coordinateSystem, r.reversedDepth), ra.intersectsSprite(e)) return !0;
4231
4234
  }
4232
4235
  return !1;
4233
4236
  }
@@ -4235,7 +4238,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4235
4238
  if (!t || !t.cameras || t.cameras.length === 0) return !1;
4236
4239
  for (let n = 0; n < t.cameras.length; n++) {
4237
4240
  let r = t.cameras[n];
4238
- if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsSphere(e)) return !0;
4241
+ if (na.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), ra.setFromProjectionMatrix(na, r.coordinateSystem, r.reversedDepth), ra.intersectsSphere(e)) return !0;
4239
4242
  }
4240
4243
  return !1;
4241
4244
  }
@@ -4243,7 +4246,7 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4243
4246
  if (!t || !t.cameras || t.cameras.length === 0) return !1;
4244
4247
  for (let n = 0; n < t.cameras.length; n++) {
4245
4248
  let r = t.cameras[n];
4246
- if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.intersectsBox(e)) return !0;
4249
+ if (na.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), ra.setFromProjectionMatrix(na, r.coordinateSystem, r.reversedDepth), ra.intersectsBox(e)) return !0;
4247
4250
  }
4248
4251
  return !1;
4249
4252
  }
@@ -4251,22 +4254,22 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4251
4254
  if (!t || !t.cameras || t.cameras.length === 0) return !1;
4252
4255
  for (let n = 0; n < t.cameras.length; n++) {
4253
4256
  let r = t.cameras[n];
4254
- if (ta.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), na.setFromProjectionMatrix(ta, r.coordinateSystem, r.reversedDepth), na.containsPoint(e)) return !0;
4257
+ if (na.multiplyMatrices(r.projectionMatrix, r.matrixWorldInverse), ra.setFromProjectionMatrix(na, r.coordinateSystem, r.reversedDepth), ra.containsPoint(e)) return !0;
4255
4258
  }
4256
4259
  return !1;
4257
4260
  }
4258
4261
  clone() {
4259
4262
  return new e();
4260
4263
  }
4261
- }, ia = class extends Y {
4264
+ }, aa = class extends Y {
4262
4265
  constructor(e) {
4263
- super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new H(16777215), this.map = null, this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.fog = !0, this.setValues(e);
4266
+ super(), this.isLineBasicMaterial = !0, this.type = "LineBasicMaterial", this.color = new V(16777215), this.map = null, this.linewidth = 1, this.linecap = "round", this.linejoin = "round", this.fog = !0, this.setValues(e);
4264
4267
  }
4265
4268
  copy(e) {
4266
4269
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.linewidth = e.linewidth, this.linecap = e.linecap, this.linejoin = e.linejoin, this.fog = e.fog, this;
4267
4270
  }
4268
- }, aa = /* @__PURE__ */ new I(), oa = /* @__PURE__ */ new I(), sa = /* @__PURE__ */ new z(), ca = /* @__PURE__ */ new si(), la = /* @__PURE__ */ new Hr(), ua = /* @__PURE__ */ new I(), da = /* @__PURE__ */ new I(), fa = class extends V {
4269
- constructor(e = new Yr(), t = new ia()) {
4271
+ }, oa = /* @__PURE__ */ new I(), sa = /* @__PURE__ */ new I(), ca = /* @__PURE__ */ new R(), la = /* @__PURE__ */ new ci(), ua = /* @__PURE__ */ new Wr(), da = /* @__PURE__ */ new I(), fa = /* @__PURE__ */ new I(), pa = class extends B {
4272
+ constructor(e = new Xr(), t = new aa()) {
4270
4273
  super(), this.isLine = !0, this.type = "Line", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.updateMorphTargets();
4271
4274
  }
4272
4275
  copy(e, t) {
@@ -4276,34 +4279,34 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4276
4279
  let e = this.geometry;
4277
4280
  if (e.index === null) {
4278
4281
  let t = e.attributes.position, n = [0];
4279
- for (let e = 1, r = t.count; e < r; e++) aa.fromBufferAttribute(t, e - 1), oa.fromBufferAttribute(t, e), n[e] = n[e - 1], n[e] += aa.distanceTo(oa);
4280
- e.setAttribute("lineDistance", new K(n, 1));
4282
+ for (let e = 1, r = t.count; e < r; e++) oa.fromBufferAttribute(t, e - 1), sa.fromBufferAttribute(t, e), n[e] = n[e - 1], n[e] += oa.distanceTo(sa);
4283
+ e.setAttribute("lineDistance", new G(n, 1));
4281
4284
  } else k("Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
4282
4285
  return this;
4283
4286
  }
4284
4287
  raycast(e, t) {
4285
4288
  let n = this.geometry, r = this.matrixWorld, i = e.params.Line.threshold, a = n.drawRange;
4286
- if (n.boundingSphere === null && n.computeBoundingSphere(), la.copy(n.boundingSphere), la.applyMatrix4(r), la.radius += i, e.ray.intersectsSphere(la) === !1) return;
4287
- sa.copy(r).invert(), ca.copy(e.ray).applyMatrix4(sa);
4289
+ if (n.boundingSphere === null && n.computeBoundingSphere(), ua.copy(n.boundingSphere), ua.applyMatrix4(r), ua.radius += i, e.ray.intersectsSphere(ua) === !1) return;
4290
+ ca.copy(r).invert(), la.copy(e.ray).applyMatrix4(ca);
4288
4291
  let o = i / ((this.scale.x + this.scale.y + this.scale.z) / 3), s = o * o, c = this.isLineSegments ? 2 : 1, l = n.index, u = n.attributes.position;
4289
4292
  if (l !== null) {
4290
4293
  let n = Math.max(0, a.start), r = Math.min(l.count, a.start + a.count);
4291
4294
  for (let i = n, a = r - 1; i < a; i += c) {
4292
- let n = l.getX(i), r = l.getX(i + 1), a = pa(this, e, ca, s, n, r, i);
4295
+ let n = l.getX(i), r = l.getX(i + 1), a = ma(this, e, la, s, n, r, i);
4293
4296
  a && t.push(a);
4294
4297
  }
4295
4298
  if (this.isLineLoop) {
4296
- let i = l.getX(r - 1), a = l.getX(n), o = pa(this, e, ca, s, i, a, r - 1);
4299
+ let i = l.getX(r - 1), a = l.getX(n), o = ma(this, e, la, s, i, a, r - 1);
4297
4300
  o && t.push(o);
4298
4301
  }
4299
4302
  } else {
4300
4303
  let n = Math.max(0, a.start), r = Math.min(u.count, a.start + a.count);
4301
4304
  for (let i = n, a = r - 1; i < a; i += c) {
4302
- let n = pa(this, e, ca, s, i, i + 1, i);
4305
+ let n = ma(this, e, la, s, i, i + 1, i);
4303
4306
  n && t.push(n);
4304
4307
  }
4305
4308
  if (this.isLineLoop) {
4306
- let i = pa(this, e, ca, s, r - 1, n, r - 1);
4309
+ let i = ma(this, e, la, s, r - 1, n, r - 1);
4307
4310
  i && t.push(i);
4308
4311
  }
4309
4312
  }
@@ -4322,14 +4325,14 @@ var Ci = /* @__PURE__ */ new I(), wi = /* @__PURE__ */ new hn(), Ti = /* @__PURE
4322
4325
  }
4323
4326
  }
4324
4327
  };
4325
- function pa(e, t, n, r, i, a, o) {
4328
+ function ma(e, t, n, r, i, a, o) {
4326
4329
  let s = e.geometry.attributes.position;
4327
- if (aa.fromBufferAttribute(s, i), oa.fromBufferAttribute(s, a), n.distanceSqToSegment(aa, oa, ua, da) > r) return;
4328
- ua.applyMatrix4(e.matrixWorld);
4329
- let c = t.ray.origin.distanceTo(ua);
4330
+ if (oa.fromBufferAttribute(s, i), sa.fromBufferAttribute(s, a), n.distanceSqToSegment(oa, sa, da, fa) > r) return;
4331
+ da.applyMatrix4(e.matrixWorld);
4332
+ let c = t.ray.origin.distanceTo(da);
4330
4333
  if (!(c < t.near || c > t.far)) return {
4331
4334
  distance: c,
4332
- point: da.clone().applyMatrix4(e.matrixWorld),
4335
+ point: fa.clone().applyMatrix4(e.matrixWorld),
4333
4336
  index: o,
4334
4337
  face: null,
4335
4338
  faceIndex: null,
@@ -4337,7 +4340,7 @@ function pa(e, t, n, r, i, a, o) {
4337
4340
  object: e
4338
4341
  };
4339
4342
  }
4340
- var ma = /* @__PURE__ */ new I(), ha = /* @__PURE__ */ new I(), ga = class extends fa {
4343
+ var ha = /* @__PURE__ */ new I(), ga = /* @__PURE__ */ new I(), _a = class extends pa {
4341
4344
  constructor(e, t) {
4342
4345
  super(e, t), this.isLineSegments = !0, this.type = "LineSegments";
4343
4346
  }
@@ -4345,24 +4348,24 @@ var ma = /* @__PURE__ */ new I(), ha = /* @__PURE__ */ new I(), ga = class exten
4345
4348
  let e = this.geometry;
4346
4349
  if (e.index === null) {
4347
4350
  let t = e.attributes.position, n = [];
4348
- for (let e = 0, r = t.count; e < r; e += 2) ma.fromBufferAttribute(t, e), ha.fromBufferAttribute(t, e + 1), n[e] = e === 0 ? 0 : n[e - 1], n[e + 1] = n[e] + ma.distanceTo(ha);
4349
- e.setAttribute("lineDistance", new K(n, 1));
4351
+ for (let e = 0, r = t.count; e < r; e += 2) ha.fromBufferAttribute(t, e), ga.fromBufferAttribute(t, e + 1), n[e] = e === 0 ? 0 : n[e - 1], n[e + 1] = n[e] + ha.distanceTo(ga);
4352
+ e.setAttribute("lineDistance", new G(n, 1));
4350
4353
  } else k("LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");
4351
4354
  return this;
4352
4355
  }
4353
- }, _a = class extends fa {
4356
+ }, va = class extends pa {
4354
4357
  constructor(e, t) {
4355
4358
  super(e, t), this.isLineLoop = !0, this.type = "LineLoop";
4356
4359
  }
4357
- }, va = class extends Y {
4360
+ }, ya = class extends Y {
4358
4361
  constructor(e) {
4359
- super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new H(16777215), this.map = null, this.alphaMap = null, this.size = 1, this.sizeAttenuation = !0, this.fog = !0, this.setValues(e);
4362
+ super(), this.isPointsMaterial = !0, this.type = "PointsMaterial", this.color = new V(16777215), this.map = null, this.alphaMap = null, this.size = 1, this.sizeAttenuation = !0, this.fog = !0, this.setValues(e);
4360
4363
  }
4361
4364
  copy(e) {
4362
4365
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.alphaMap = e.alphaMap, this.size = e.size, this.sizeAttenuation = e.sizeAttenuation, this.fog = e.fog, this;
4363
4366
  }
4364
- }, ya = /* @__PURE__ */ new z(), ba = /* @__PURE__ */ new si(), xa = /* @__PURE__ */ new Hr(), Sa = /* @__PURE__ */ new I(), Ca = class extends V {
4365
- constructor(e = new Yr(), t = new va()) {
4367
+ }, ba = /* @__PURE__ */ new R(), xa = /* @__PURE__ */ new ci(), Sa = /* @__PURE__ */ new Wr(), Ca = /* @__PURE__ */ new I(), wa = class extends B {
4368
+ constructor(e = new Xr(), t = new ya()) {
4366
4369
  super(), this.isPoints = !0, this.type = "Points", this.geometry = e, this.material = t, this.morphTargetDictionary = void 0, this.morphTargetInfluences = void 0, this.updateMorphTargets();
4367
4370
  }
4368
4371
  copy(e, t) {
@@ -4370,18 +4373,18 @@ var ma = /* @__PURE__ */ new I(), ha = /* @__PURE__ */ new I(), ga = class exten
4370
4373
  }
4371
4374
  raycast(e, t) {
4372
4375
  let n = this.geometry, r = this.matrixWorld, i = e.params.Points.threshold, a = n.drawRange;
4373
- if (n.boundingSphere === null && n.computeBoundingSphere(), xa.copy(n.boundingSphere), xa.applyMatrix4(r), xa.radius += i, e.ray.intersectsSphere(xa) === !1) return;
4374
- ya.copy(r).invert(), ba.copy(e.ray).applyMatrix4(ya);
4376
+ if (n.boundingSphere === null && n.computeBoundingSphere(), Sa.copy(n.boundingSphere), Sa.applyMatrix4(r), Sa.radius += i, e.ray.intersectsSphere(Sa) === !1) return;
4377
+ ba.copy(r).invert(), xa.copy(e.ray).applyMatrix4(ba);
4375
4378
  let o = i / ((this.scale.x + this.scale.y + this.scale.z) / 3), s = o * o, c = n.index, l = n.attributes.position;
4376
4379
  if (c !== null) {
4377
4380
  let n = Math.max(0, a.start), i = Math.min(c.count, a.start + a.count);
4378
4381
  for (let a = n, o = i; a < o; a++) {
4379
4382
  let n = c.getX(a);
4380
- Sa.fromBufferAttribute(l, n), wa(Sa, n, s, r, e, t, this);
4383
+ Ca.fromBufferAttribute(l, n), Ta(Ca, n, s, r, e, t, this);
4381
4384
  }
4382
4385
  } else {
4383
4386
  let n = Math.max(0, a.start), i = Math.min(l.count, a.start + a.count);
4384
- for (let a = n, o = i; a < o; a++) Sa.fromBufferAttribute(l, a), wa(Sa, a, s, r, e, t, this);
4387
+ for (let a = n, o = i; a < o; a++) Ca.fromBufferAttribute(l, a), Ta(Ca, a, s, r, e, t, this);
4385
4388
  }
4386
4389
  }
4387
4390
  updateMorphTargets() {
@@ -4398,11 +4401,11 @@ var ma = /* @__PURE__ */ new I(), ha = /* @__PURE__ */ new I(), ga = class exten
4398
4401
  }
4399
4402
  }
4400
4403
  };
4401
- function wa(e, t, n, r, i, a, o) {
4402
- let s = ba.distanceSqToPoint(e);
4404
+ function Ta(e, t, n, r, i, a, o) {
4405
+ let s = xa.distanceSqToPoint(e);
4403
4406
  if (s < n) {
4404
4407
  let n = new I();
4405
- ba.closestPointToPoint(e, n), n.applyMatrix4(r);
4408
+ xa.closestPointToPoint(e, n), n.applyMatrix4(r);
4406
4409
  let c = i.ray.origin.distanceTo(n);
4407
4410
  if (c < i.near || c > i.far) return;
4408
4411
  a.push({
@@ -4417,21 +4420,21 @@ function wa(e, t, n, r, i, a, o) {
4417
4420
  });
4418
4421
  }
4419
4422
  }
4420
- var Ta = class extends R {
4423
+ var Ea = class extends L {
4421
4424
  constructor(e, t) {
4422
4425
  super({
4423
4426
  width: e,
4424
4427
  height: t
4425
4428
  }), this.isFramebufferTexture = !0, this.magFilter = a, this.minFilter = a, this.generateMipmaps = !1, this.needsUpdate = !0;
4426
4429
  }
4427
- }, Ea = class extends R {
4430
+ }, Da = class extends L {
4428
4431
  constructor(e, t, n, r, i, a, o, s, c, l, u, d) {
4429
4432
  super(null, a, o, s, c, l, r, i, u, d), this.isCompressedTexture = !0, this.image = {
4430
4433
  width: t,
4431
4434
  height: n
4432
4435
  }, this.mipmaps = e, this.flipY = !1, this.generateMipmaps = !1;
4433
4436
  }
4434
- }, Da = class extends R {
4437
+ }, Oa = class extends L {
4435
4438
  constructor(e = [], t = 301, n, r, i, a, o, s, c, l) {
4436
4439
  super(e, t, n, r, i, a, o, s, c, l), this.isCubeTexture = !0, this.flipY = !1;
4437
4440
  }
@@ -4441,7 +4444,7 @@ var Ta = class extends R {
4441
4444
  set images(e) {
4442
4445
  this.image = e;
4443
4446
  }
4444
- }, Oa = class extends R {
4447
+ }, ka = class extends L {
4445
4448
  constructor(e, t, n = _, r, i, o, s = a, c = a, l, u = ee, d = 1) {
4446
4449
  if (u !== 1026 && u !== 1027) throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");
4447
4450
  super({
@@ -4451,13 +4454,13 @@ var Ta = class extends R {
4451
4454
  }, r, i, o, s, c, u, n, l), this.isDepthTexture = !0, this.flipY = !1, this.generateMipmaps = !1, this.compareFunction = null;
4452
4455
  }
4453
4456
  copy(e) {
4454
- return super.copy(e), this.source = new dn(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
4457
+ return super.copy(e), this.source = new pn(Object.assign({}, e.image)), this.compareFunction = e.compareFunction, this;
4455
4458
  }
4456
4459
  toJSON(e) {
4457
4460
  let t = super.toJSON(e);
4458
4461
  return this.compareFunction !== null && (t.compareFunction = this.compareFunction), t;
4459
4462
  }
4460
- }, ka = class extends Oa {
4463
+ }, Aa = class extends ka {
4461
4464
  constructor(e, t = _, n = 301, r, i, o = a, s = a, c, l = ee) {
4462
4465
  let u = {
4463
4466
  width: e,
@@ -4479,14 +4482,14 @@ var Ta = class extends R {
4479
4482
  set images(e) {
4480
4483
  this.image = e;
4481
4484
  }
4482
- }, Aa = class extends R {
4485
+ }, ja = class extends L {
4483
4486
  constructor(e = null) {
4484
4487
  super(), this.sourceTexture = e, this.isExternalTexture = !0;
4485
4488
  }
4486
4489
  copy(e) {
4487
4490
  return super.copy(e), this.sourceTexture = e.sourceTexture, this;
4488
4491
  }
4489
- }, ja = class e extends Yr {
4492
+ }, Ma = class e extends Xr {
4490
4493
  constructor(e = 1, t = 1, n = 1, r = 1, i = 1, a = 1) {
4491
4494
  super(), this.type = "BoxGeometry", this.parameters = {
4492
4495
  width: e,
@@ -4499,7 +4502,7 @@ var Ta = class extends R {
4499
4502
  let o = this;
4500
4503
  r = Math.floor(r), i = Math.floor(i), a = Math.floor(a);
4501
4504
  let s = [], c = [], l = [], u = [], d = 0, f = 0;
4502
- p("z", "y", "x", -1, -1, n, t, e, a, i, 0), p("z", "y", "x", 1, -1, n, t, -e, a, i, 1), p("x", "z", "y", 1, 1, e, n, t, r, a, 2), p("x", "z", "y", 1, -1, e, n, -t, r, a, 3), p("x", "y", "z", 1, -1, e, t, n, r, i, 4), p("x", "y", "z", -1, -1, e, t, -n, r, i, 5), this.setIndex(s), this.setAttribute("position", new K(c, 3)), this.setAttribute("normal", new K(l, 3)), this.setAttribute("uv", new K(u, 2));
4505
+ p("z", "y", "x", -1, -1, n, t, e, a, i, 0), p("z", "y", "x", 1, -1, n, t, -e, a, i, 1), p("x", "z", "y", 1, 1, e, n, t, r, a, 2), p("x", "z", "y", 1, -1, e, n, -t, r, a, 3), p("x", "y", "z", 1, -1, e, t, n, r, i, 4), p("x", "y", "z", -1, -1, e, t, -n, r, i, 5), this.setIndex(s), this.setAttribute("position", new G(c, 3)), this.setAttribute("normal", new G(l, 3)), this.setAttribute("uv", new G(u, 2));
4503
4506
  function p(e, t, n, r, i, a, p, m, h, g, _) {
4504
4507
  let v = a / h, y = p / g, b = a / 2, x = p / 2, S = m / 2, C = h + 1, w = g + 1, T = 0, E = 0, D = new I();
4505
4508
  for (let a = 0; a < w; a++) {
@@ -4519,7 +4522,7 @@ var Ta = class extends R {
4519
4522
  static fromJSON(t) {
4520
4523
  return new e(t.width, t.height, t.depth, t.widthSegments, t.heightSegments, t.depthSegments);
4521
4524
  }
4522
- }, Ma = class e extends Yr {
4525
+ }, Na = class e extends Xr {
4523
4526
  constructor(e = 1, t = 32, n = 0, r = Math.PI * 2) {
4524
4527
  super(), this.type = "CircleGeometry", this.parameters = {
4525
4528
  radius: e,
@@ -4534,7 +4537,7 @@ var Ta = class extends R {
4534
4537
  c.x = e * Math.cos(d), c.y = e * Math.sin(d), a.push(c.x, c.y, c.z), o.push(0, 0, 1), l.x = (a[u] / e + 1) / 2, l.y = (a[u + 1] / e + 1) / 2, s.push(l.x, l.y);
4535
4538
  }
4536
4539
  for (let e = 1; e <= t; e++) i.push(e, e + 1, 0);
4537
- this.setIndex(i), this.setAttribute("position", new K(a, 3)), this.setAttribute("normal", new K(o, 3)), this.setAttribute("uv", new K(s, 2));
4540
+ this.setIndex(i), this.setAttribute("position", new G(a, 3)), this.setAttribute("normal", new G(o, 3)), this.setAttribute("uv", new G(s, 2));
4538
4541
  }
4539
4542
  copy(e) {
4540
4543
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -4542,7 +4545,7 @@ var Ta = class extends R {
4542
4545
  static fromJSON(t) {
4543
4546
  return new e(t.radius, t.segments, t.thetaStart, t.thetaLength);
4544
4547
  }
4545
- }, Na = class e extends Yr {
4548
+ }, Pa = class e extends Xr {
4546
4549
  constructor(e = 1, t = 1, n = 1, r = 32, i = 1, a = !1, o = 0, s = Math.PI * 2) {
4547
4550
  super(), this.type = "CylinderGeometry", this.parameters = {
4548
4551
  radiusTop: e,
@@ -4557,7 +4560,7 @@ var Ta = class extends R {
4557
4560
  let c = this;
4558
4561
  r = Math.floor(r), i = Math.floor(i);
4559
4562
  let l = [], u = [], d = [], f = [], p = 0, m = [], h = n / 2, g = 0;
4560
- _(), a === !1 && (e > 0 && v(!0), t > 0 && v(!1)), this.setIndex(l), this.setAttribute("position", new K(u, 3)), this.setAttribute("normal", new K(d, 3)), this.setAttribute("uv", new K(f, 2));
4563
+ _(), a === !1 && (e > 0 && v(!0), t > 0 && v(!1)), this.setIndex(l), this.setAttribute("position", new G(u, 3)), this.setAttribute("normal", new G(d, 3)), this.setAttribute("uv", new G(f, 2));
4561
4564
  function _() {
4562
4565
  let a = new I(), _ = new I(), v = 0, y = (t - e) / n;
4563
4566
  for (let c = 0; c <= i; c++) {
@@ -4595,7 +4598,7 @@ var Ta = class extends R {
4595
4598
  static fromJSON(t) {
4596
4599
  return new e(t.radiusTop, t.radiusBottom, t.height, t.radialSegments, t.heightSegments, t.openEnded, t.thetaStart, t.thetaLength);
4597
4600
  }
4598
- }, Pa = class e extends Na {
4601
+ }, Fa = class e extends Pa {
4599
4602
  constructor(e = 1, t = 1, n = 32, r = 1, i = !1, a = 0, o = Math.PI * 2) {
4600
4603
  super(0, e, t, n, r, i, a, o), this.type = "ConeGeometry", this.parameters = {
4601
4604
  radius: e,
@@ -4610,13 +4613,13 @@ var Ta = class extends R {
4610
4613
  static fromJSON(t) {
4611
4614
  return new e(t.radius, t.height, t.radialSegments, t.heightSegments, t.openEnded, t.thetaStart, t.thetaLength);
4612
4615
  }
4613
- }, Fa = /* @__PURE__ */ new I(), Ia = /* @__PURE__ */ new I(), La = /* @__PURE__ */ new I(), Ra = /* @__PURE__ */ new pr(), za = class extends Yr {
4616
+ }, Ia = /* @__PURE__ */ new I(), La = /* @__PURE__ */ new I(), Ra = /* @__PURE__ */ new I(), za = /* @__PURE__ */ new hr(), Ba = class extends Xr {
4614
4617
  constructor(e = null, t = 1) {
4615
4618
  if (super(), this.type = "EdgesGeometry", this.parameters = {
4616
4619
  geometry: e,
4617
4620
  thresholdAngle: t
4618
4621
  }, e !== null) {
4619
- let n = 10 ** 4, r = Math.cos(kt * t), i = e.getIndex(), a = e.getAttribute("position"), o = i ? i.count : a.count, s = [
4622
+ let n = 10 ** 4, r = Math.cos(At * t), i = e.getIndex(), a = e.getAttribute("position"), o = i ? i.count : a.count, s = [
4620
4623
  0,
4621
4624
  0,
4622
4625
  0
@@ -4631,27 +4634,27 @@ var Ta = class extends R {
4631
4634
  ], u = {}, d = [];
4632
4635
  for (let e = 0; e < o; e += 3) {
4633
4636
  i ? (s[0] = i.getX(e), s[1] = i.getX(e + 1), s[2] = i.getX(e + 2)) : (s[0] = e, s[1] = e + 1, s[2] = e + 2);
4634
- let { a: t, b: o, c: f } = Ra;
4635
- if (t.fromBufferAttribute(a, s[0]), o.fromBufferAttribute(a, s[1]), f.fromBufferAttribute(a, s[2]), Ra.getNormal(La), l[0] = `${Math.round(t.x * n)},${Math.round(t.y * n)},${Math.round(t.z * n)}`, l[1] = `${Math.round(o.x * n)},${Math.round(o.y * n)},${Math.round(o.z * n)}`, l[2] = `${Math.round(f.x * n)},${Math.round(f.y * n)},${Math.round(f.z * n)}`, !(l[0] === l[1] || l[1] === l[2] || l[2] === l[0])) for (let e = 0; e < 3; e++) {
4636
- let t = (e + 1) % 3, n = l[e], i = l[t], a = Ra[c[e]], o = Ra[c[t]], f = `${n}_${i}`, p = `${i}_${n}`;
4637
- p in u && u[p] ? (La.dot(u[p].normal) <= r && (d.push(a.x, a.y, a.z), d.push(o.x, o.y, o.z)), u[p] = null) : f in u || (u[f] = {
4637
+ let { a: t, b: o, c: f } = za;
4638
+ if (t.fromBufferAttribute(a, s[0]), o.fromBufferAttribute(a, s[1]), f.fromBufferAttribute(a, s[2]), za.getNormal(Ra), l[0] = `${Math.round(t.x * n)},${Math.round(t.y * n)},${Math.round(t.z * n)}`, l[1] = `${Math.round(o.x * n)},${Math.round(o.y * n)},${Math.round(o.z * n)}`, l[2] = `${Math.round(f.x * n)},${Math.round(f.y * n)},${Math.round(f.z * n)}`, !(l[0] === l[1] || l[1] === l[2] || l[2] === l[0])) for (let e = 0; e < 3; e++) {
4639
+ let t = (e + 1) % 3, n = l[e], i = l[t], a = za[c[e]], o = za[c[t]], f = `${n}_${i}`, p = `${i}_${n}`;
4640
+ p in u && u[p] ? (Ra.dot(u[p].normal) <= r && (d.push(a.x, a.y, a.z), d.push(o.x, o.y, o.z)), u[p] = null) : f in u || (u[f] = {
4638
4641
  index0: s[e],
4639
4642
  index1: s[t],
4640
- normal: La.clone()
4643
+ normal: Ra.clone()
4641
4644
  });
4642
4645
  }
4643
4646
  }
4644
4647
  for (let e in u) if (u[e]) {
4645
4648
  let { index0: t, index1: n } = u[e];
4646
- Fa.fromBufferAttribute(a, t), Ia.fromBufferAttribute(a, n), d.push(Fa.x, Fa.y, Fa.z), d.push(Ia.x, Ia.y, Ia.z);
4649
+ Ia.fromBufferAttribute(a, t), La.fromBufferAttribute(a, n), d.push(Ia.x, Ia.y, Ia.z), d.push(La.x, La.y, La.z);
4647
4650
  }
4648
- this.setAttribute("position", new K(d, 3));
4651
+ this.setAttribute("position", new G(d, 3));
4649
4652
  }
4650
4653
  }
4651
4654
  copy(e) {
4652
4655
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
4653
4656
  }
4654
- }, Ba = class {
4657
+ }, Va = class {
4655
4658
  constructor() {
4656
4659
  this.type = "Curve", this.arcLengthDivisions = 200, this.needsUpdate = !1, this.cacheArcLengths = null;
4657
4660
  }
@@ -4712,7 +4715,7 @@ var Ta = class extends R {
4712
4715
  return this.getTangent(n, t);
4713
4716
  }
4714
4717
  computeFrenetFrames(e, t = !1) {
4715
- let n = new I(), r = [], i = [], a = [], o = new I(), s = new z();
4718
+ let n = new I(), r = [], i = [], a = [], o = new I(), s = new R();
4716
4719
  for (let t = 0; t <= e; t++) {
4717
4720
  let n = t / e;
4718
4721
  r[t] = this.getTangentAt(n, new I());
@@ -4756,7 +4759,7 @@ var Ta = class extends R {
4756
4759
  fromJSON(e) {
4757
4760
  return this.arcLengthDivisions = e.arcLengthDivisions, this;
4758
4761
  }
4759
- }, Va = class extends Ba {
4762
+ }, Ha = class extends Va {
4760
4763
  constructor(e = 0, t = 0, n = 1, r = 1, i = 0, a = Math.PI * 2, o = !1, s = 0) {
4761
4764
  super(), this.isEllipseCurve = !0, this.type = "EllipseCurve", this.aX = e, this.aY = t, this.xRadius = n, this.yRadius = r, this.aStartAngle = i, this.aEndAngle = a, this.aClockwise = o, this.aRotation = s;
4762
4765
  }
@@ -4782,12 +4785,12 @@ var Ta = class extends R {
4782
4785
  fromJSON(e) {
4783
4786
  return super.fromJSON(e), this.aX = e.aX, this.aY = e.aY, this.xRadius = e.xRadius, this.yRadius = e.yRadius, this.aStartAngle = e.aStartAngle, this.aEndAngle = e.aEndAngle, this.aClockwise = e.aClockwise, this.aRotation = e.aRotation, this;
4784
4787
  }
4785
- }, Ha = class extends Va {
4788
+ }, Ua = class extends Ha {
4786
4789
  constructor(e, t, n, r, i, a) {
4787
4790
  super(e, t, n, n, r, i, a), this.isArcCurve = !0, this.type = "ArcCurve";
4788
4791
  }
4789
4792
  };
4790
- function Ua() {
4793
+ function Wa() {
4791
4794
  let e = 0, t = 0, n = 0, r = 0;
4792
4795
  function i(i, a, o, s) {
4793
4796
  e = i, t = o, n = -3 * i + 3 * a - 2 * o - s, r = 2 * i - 2 * a + o + s;
@@ -4806,7 +4809,7 @@ function Ua() {
4806
4809
  }
4807
4810
  };
4808
4811
  }
4809
- var Wa = /* @__PURE__ */ new I(), Ga = /* @__PURE__ */ new Ua(), Ka = /* @__PURE__ */ new Ua(), qa = /* @__PURE__ */ new Ua(), Ja = class extends Ba {
4812
+ var Ga = /* @__PURE__ */ new I(), Ka = /* @__PURE__ */ new Wa(), qa = /* @__PURE__ */ new Wa(), Ja = /* @__PURE__ */ new Wa(), Ya = class extends Va {
4810
4813
  constructor(e = [], t = !1, n = "centripetal", r = .5) {
4811
4814
  super(), this.isCatmullRomCurve3 = !0, this.type = "CatmullRomCurve3", this.points = e, this.closed = t, this.curveType = n, this.tension = r;
4812
4815
  }
@@ -4814,13 +4817,13 @@ var Wa = /* @__PURE__ */ new I(), Ga = /* @__PURE__ */ new Ua(), Ka = /* @__PURE
4814
4817
  let n = t, r = this.points, i = r.length, a = (i - (this.closed ? 0 : 1)) * e, o = Math.floor(a), s = a - o;
4815
4818
  this.closed ? o += o > 0 ? 0 : (Math.floor(Math.abs(o) / i) + 1) * i : s === 0 && o === i - 1 && (o = i - 2, s = 1);
4816
4819
  let c, l;
4817
- this.closed || o > 0 ? c = r[(o - 1) % i] : (Wa.subVectors(r[0], r[1]).add(r[0]), c = Wa);
4820
+ this.closed || o > 0 ? c = r[(o - 1) % i] : (Ga.subVectors(r[0], r[1]).add(r[0]), c = Ga);
4818
4821
  let u = r[o % i], d = r[(o + 1) % i];
4819
- if (this.closed || o + 2 < i ? l = r[(o + 2) % i] : (Wa.subVectors(r[i - 1], r[i - 2]).add(r[i - 1]), l = Wa), this.curveType === "centripetal" || this.curveType === "chordal") {
4822
+ if (this.closed || o + 2 < i ? l = r[(o + 2) % i] : (Ga.subVectors(r[i - 1], r[i - 2]).add(r[i - 1]), l = Ga), this.curveType === "centripetal" || this.curveType === "chordal") {
4820
4823
  let e = this.curveType === "chordal" ? .5 : .25, t = c.distanceToSquared(u) ** +e, n = u.distanceToSquared(d) ** +e, r = d.distanceToSquared(l) ** +e;
4821
- n < 1e-4 && (n = 1), t < 1e-4 && (t = n), r < 1e-4 && (r = n), Ga.initNonuniformCatmullRom(c.x, u.x, d.x, l.x, t, n, r), Ka.initNonuniformCatmullRom(c.y, u.y, d.y, l.y, t, n, r), qa.initNonuniformCatmullRom(c.z, u.z, d.z, l.z, t, n, r);
4822
- } else this.curveType === "catmullrom" && (Ga.initCatmullRom(c.x, u.x, d.x, l.x, this.tension), Ka.initCatmullRom(c.y, u.y, d.y, l.y, this.tension), qa.initCatmullRom(c.z, u.z, d.z, l.z, this.tension));
4823
- return n.set(Ga.calc(s), Ka.calc(s), qa.calc(s)), n;
4824
+ n < 1e-4 && (n = 1), t < 1e-4 && (t = n), r < 1e-4 && (r = n), Ka.initNonuniformCatmullRom(c.x, u.x, d.x, l.x, t, n, r), qa.initNonuniformCatmullRom(c.y, u.y, d.y, l.y, t, n, r), Ja.initNonuniformCatmullRom(c.z, u.z, d.z, l.z, t, n, r);
4825
+ } else this.curveType === "catmullrom" && (Ka.initCatmullRom(c.x, u.x, d.x, l.x, this.tension), qa.initCatmullRom(c.y, u.y, d.y, l.y, this.tension), Ja.initCatmullRom(c.z, u.z, d.z, l.z, this.tension));
4826
+ return n.set(Ka.calc(s), qa.calc(s), Ja.calc(s)), n;
4824
4827
  }
4825
4828
  copy(e) {
4826
4829
  super.copy(e), this.points = [];
@@ -4848,47 +4851,47 @@ var Wa = /* @__PURE__ */ new I(), Ga = /* @__PURE__ */ new Ua(), Ka = /* @__PURE
4848
4851
  return this.closed = e.closed, this.curveType = e.curveType, this.tension = e.tension, this;
4849
4852
  }
4850
4853
  };
4851
- function Ya(e, t, n, r, i) {
4854
+ function Xa(e, t, n, r, i) {
4852
4855
  let a = (r - t) * .5, o = (i - n) * .5, s = e * e, c = e * s;
4853
4856
  return (2 * n - 2 * r + a + o) * c + (-3 * n + 3 * r - 2 * a - o) * s + a * e + n;
4854
4857
  }
4855
- function Xa(e, t) {
4858
+ function Za(e, t) {
4856
4859
  let n = 1 - e;
4857
4860
  return n * n * t;
4858
4861
  }
4859
- function Za(e, t) {
4862
+ function Qa(e, t) {
4860
4863
  return 2 * (1 - e) * e * t;
4861
4864
  }
4862
- function Qa(e, t) {
4865
+ function $a(e, t) {
4863
4866
  return e * e * t;
4864
4867
  }
4865
- function $a(e, t, n, r) {
4866
- return Xa(e, t) + Za(e, n) + Qa(e, r);
4868
+ function eo(e, t, n, r) {
4869
+ return Za(e, t) + Qa(e, n) + $a(e, r);
4867
4870
  }
4868
- function eo(e, t) {
4871
+ function to(e, t) {
4869
4872
  let n = 1 - e;
4870
4873
  return n * n * n * t;
4871
4874
  }
4872
- function to(e, t) {
4875
+ function no(e, t) {
4873
4876
  let n = 1 - e;
4874
4877
  return 3 * n * n * e * t;
4875
4878
  }
4876
- function no(e, t) {
4879
+ function ro(e, t) {
4877
4880
  return 3 * (1 - e) * e * e * t;
4878
4881
  }
4879
- function ro(e, t) {
4882
+ function io(e, t) {
4880
4883
  return e * e * e * t;
4881
4884
  }
4882
- function io(e, t, n, r, i) {
4883
- return eo(e, t) + to(e, n) + no(e, r) + ro(e, i);
4885
+ function ao(e, t, n, r, i) {
4886
+ return to(e, t) + no(e, n) + ro(e, r) + io(e, i);
4884
4887
  }
4885
- var ao = class extends Ba {
4888
+ var oo = class extends Va {
4886
4889
  constructor(e = new F(), t = new F(), n = new F(), r = new F()) {
4887
4890
  super(), this.isCubicBezierCurve = !0, this.type = "CubicBezierCurve", this.v0 = e, this.v1 = t, this.v2 = n, this.v3 = r;
4888
4891
  }
4889
4892
  getPoint(e, t = new F()) {
4890
4893
  let n = t, r = this.v0, i = this.v1, a = this.v2, o = this.v3;
4891
- return n.set(io(e, r.x, i.x, a.x, o.x), io(e, r.y, i.y, a.y, o.y)), n;
4894
+ return n.set(ao(e, r.x, i.x, a.x, o.x), ao(e, r.y, i.y, a.y, o.y)), n;
4892
4895
  }
4893
4896
  copy(e) {
4894
4897
  return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this.v3.copy(e.v3), this;
@@ -4900,13 +4903,13 @@ var ao = class extends Ba {
4900
4903
  fromJSON(e) {
4901
4904
  return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
4902
4905
  }
4903
- }, oo = class extends Ba {
4906
+ }, so = class extends Va {
4904
4907
  constructor(e = new I(), t = new I(), n = new I(), r = new I()) {
4905
4908
  super(), this.isCubicBezierCurve3 = !0, this.type = "CubicBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = n, this.v3 = r;
4906
4909
  }
4907
4910
  getPoint(e, t = new I()) {
4908
4911
  let n = t, r = this.v0, i = this.v1, a = this.v2, o = this.v3;
4909
- return n.set(io(e, r.x, i.x, a.x, o.x), io(e, r.y, i.y, a.y, o.y), io(e, r.z, i.z, a.z, o.z)), n;
4912
+ return n.set(ao(e, r.x, i.x, a.x, o.x), ao(e, r.y, i.y, a.y, o.y), ao(e, r.z, i.z, a.z, o.z)), n;
4910
4913
  }
4911
4914
  copy(e) {
4912
4915
  return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this.v3.copy(e.v3), this;
@@ -4918,7 +4921,7 @@ var ao = class extends Ba {
4918
4921
  fromJSON(e) {
4919
4922
  return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
4920
4923
  }
4921
- }, so = class extends Ba {
4924
+ }, co = class extends Va {
4922
4925
  constructor(e = new F(), t = new F()) {
4923
4926
  super(), this.isLineCurve = !0, this.type = "LineCurve", this.v1 = e, this.v2 = t;
4924
4927
  }
@@ -4945,7 +4948,7 @@ var ao = class extends Ba {
4945
4948
  fromJSON(e) {
4946
4949
  return super.fromJSON(e), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
4947
4950
  }
4948
- }, co = class extends Ba {
4951
+ }, lo = class extends Va {
4949
4952
  constructor(e = new I(), t = new I()) {
4950
4953
  super(), this.isLineCurve3 = !0, this.type = "LineCurve3", this.v1 = e, this.v2 = t;
4951
4954
  }
@@ -4972,13 +4975,13 @@ var ao = class extends Ba {
4972
4975
  fromJSON(e) {
4973
4976
  return super.fromJSON(e), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
4974
4977
  }
4975
- }, lo = class extends Ba {
4978
+ }, uo = class extends Va {
4976
4979
  constructor(e = new F(), t = new F(), n = new F()) {
4977
4980
  super(), this.isQuadraticBezierCurve = !0, this.type = "QuadraticBezierCurve", this.v0 = e, this.v1 = t, this.v2 = n;
4978
4981
  }
4979
4982
  getPoint(e, t = new F()) {
4980
4983
  let n = t, r = this.v0, i = this.v1, a = this.v2;
4981
- return n.set($a(e, r.x, i.x, a.x), $a(e, r.y, i.y, a.y)), n;
4984
+ return n.set(eo(e, r.x, i.x, a.x), eo(e, r.y, i.y, a.y)), n;
4982
4985
  }
4983
4986
  copy(e) {
4984
4987
  return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this;
@@ -4990,13 +4993,13 @@ var ao = class extends Ba {
4990
4993
  fromJSON(e) {
4991
4994
  return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
4992
4995
  }
4993
- }, uo = class extends Ba {
4996
+ }, fo = class extends Va {
4994
4997
  constructor(e = new I(), t = new I(), n = new I()) {
4995
4998
  super(), this.isQuadraticBezierCurve3 = !0, this.type = "QuadraticBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = n;
4996
4999
  }
4997
5000
  getPoint(e, t = new I()) {
4998
5001
  let n = t, r = this.v0, i = this.v1, a = this.v2;
4999
- return n.set($a(e, r.x, i.x, a.x), $a(e, r.y, i.y, a.y), $a(e, r.z, i.z, a.z)), n;
5002
+ return n.set(eo(e, r.x, i.x, a.x), eo(e, r.y, i.y, a.y), eo(e, r.z, i.z, a.z)), n;
5000
5003
  }
5001
5004
  copy(e) {
5002
5005
  return super.copy(e), this.v0.copy(e.v0), this.v1.copy(e.v1), this.v2.copy(e.v2), this;
@@ -5008,13 +5011,13 @@ var ao = class extends Ba {
5008
5011
  fromJSON(e) {
5009
5012
  return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
5010
5013
  }
5011
- }, fo = class extends Ba {
5014
+ }, po = class extends Va {
5012
5015
  constructor(e = []) {
5013
5016
  super(), this.isSplineCurve = !0, this.type = "SplineCurve", this.points = e;
5014
5017
  }
5015
5018
  getPoint(e, t = new F()) {
5016
5019
  let n = t, r = this.points, i = (r.length - 1) * e, a = Math.floor(i), o = i - a, s = r[a === 0 ? a : a - 1], c = r[a], l = r[a > r.length - 2 ? r.length - 1 : a + 1], u = r[a > r.length - 3 ? r.length - 1 : a + 2];
5017
- return n.set(Ya(o, s.x, c.x, l.x, u.x), Ya(o, s.y, c.y, l.y, u.y)), n;
5020
+ return n.set(Xa(o, s.x, c.x, l.x, u.x), Xa(o, s.y, c.y, l.y, u.y)), n;
5018
5021
  }
5019
5022
  copy(e) {
5020
5023
  super.copy(e), this.points = [];
@@ -5041,19 +5044,19 @@ var ao = class extends Ba {
5041
5044
  }
5042
5045
  return this;
5043
5046
  }
5044
- }, po = /* @__PURE__ */ Object.freeze({
5047
+ }, mo = /* @__PURE__ */ Object.freeze({
5045
5048
  __proto__: null,
5046
- ArcCurve: Ha,
5047
- CatmullRomCurve3: Ja,
5048
- CubicBezierCurve: ao,
5049
- CubicBezierCurve3: oo,
5050
- EllipseCurve: Va,
5051
- LineCurve: so,
5052
- LineCurve3: co,
5053
- QuadraticBezierCurve: lo,
5054
- QuadraticBezierCurve3: uo,
5055
- SplineCurve: fo
5056
- }), mo = class extends Ba {
5049
+ ArcCurve: Ua,
5050
+ CatmullRomCurve3: Ya,
5051
+ CubicBezierCurve: oo,
5052
+ CubicBezierCurve3: so,
5053
+ EllipseCurve: Ha,
5054
+ LineCurve: co,
5055
+ LineCurve3: lo,
5056
+ QuadraticBezierCurve: uo,
5057
+ QuadraticBezierCurve3: fo,
5058
+ SplineCurve: po
5059
+ }), ho = class extends Va {
5057
5060
  constructor() {
5058
5061
  super(), this.type = "CurvePath", this.curves = [], this.autoClose = !1;
5059
5062
  }
@@ -5064,7 +5067,7 @@ var ao = class extends Ba {
5064
5067
  let e = this.curves[0].getPoint(0), t = this.curves[this.curves.length - 1].getPoint(1);
5065
5068
  if (!e.equals(t)) {
5066
5069
  let n = e.isVector2 === !0 ? "LineCurve" : "LineCurve3";
5067
- this.curves.push(new po[n](t, e));
5070
+ this.curves.push(new mo[n](t, e));
5068
5071
  }
5069
5072
  return this;
5070
5073
  }
@@ -5129,11 +5132,11 @@ var ao = class extends Ba {
5129
5132
  super.fromJSON(e), this.autoClose = e.autoClose, this.curves = [];
5130
5133
  for (let t = 0, n = e.curves.length; t < n; t++) {
5131
5134
  let n = e.curves[t];
5132
- this.curves.push(new po[n.type]().fromJSON(n));
5135
+ this.curves.push(new mo[n.type]().fromJSON(n));
5133
5136
  }
5134
5137
  return this;
5135
5138
  }
5136
- }, ho = class extends mo {
5139
+ }, go = class extends ho {
5137
5140
  constructor(e) {
5138
5141
  super(), this.type = "Path", this.currentPoint = new F(), e && this.setFromPoints(e);
5139
5142
  }
@@ -5146,19 +5149,19 @@ var ao = class extends Ba {
5146
5149
  return this.currentPoint.set(e, t), this;
5147
5150
  }
5148
5151
  lineTo(e, t) {
5149
- let n = new so(this.currentPoint.clone(), new F(e, t));
5152
+ let n = new co(this.currentPoint.clone(), new F(e, t));
5150
5153
  return this.curves.push(n), this.currentPoint.set(e, t), this;
5151
5154
  }
5152
5155
  quadraticCurveTo(e, t, n, r) {
5153
- let i = new lo(this.currentPoint.clone(), new F(e, t), new F(n, r));
5156
+ let i = new uo(this.currentPoint.clone(), new F(e, t), new F(n, r));
5154
5157
  return this.curves.push(i), this.currentPoint.set(n, r), this;
5155
5158
  }
5156
5159
  bezierCurveTo(e, t, n, r, i, a) {
5157
- let o = new ao(this.currentPoint.clone(), new F(e, t), new F(n, r), new F(i, a));
5160
+ let o = new oo(this.currentPoint.clone(), new F(e, t), new F(n, r), new F(i, a));
5158
5161
  return this.curves.push(o), this.currentPoint.set(i, a), this;
5159
5162
  }
5160
5163
  splineThru(e) {
5161
- let t = new fo([this.currentPoint.clone()].concat(e));
5164
+ let t = new po([this.currentPoint.clone()].concat(e));
5162
5165
  return this.curves.push(t), this.currentPoint.copy(e[e.length - 1]), this;
5163
5166
  }
5164
5167
  arc(e, t, n, r, i, a) {
@@ -5173,7 +5176,7 @@ var ao = class extends Ba {
5173
5176
  return this.absellipse(e + c, t + l, n, r, i, a, o, s), this;
5174
5177
  }
5175
5178
  absellipse(e, t, n, r, i, a, o, s) {
5176
- let c = new Va(e, t, n, r, i, a, o, s);
5179
+ let c = new Ha(e, t, n, r, i, a, o, s);
5177
5180
  if (this.curves.length > 0) {
5178
5181
  let e = c.getPoint(0);
5179
5182
  e.equals(this.currentPoint) || this.lineTo(e.x, e.y);
@@ -5192,9 +5195,9 @@ var ao = class extends Ba {
5192
5195
  fromJSON(e) {
5193
5196
  return super.fromJSON(e), this.currentPoint.fromArray(e.currentPoint), this;
5194
5197
  }
5195
- }, go = class extends ho {
5198
+ }, _o = class extends go {
5196
5199
  constructor(e) {
5197
- super(e), this.uuid = jt(), this.type = "Shape", this.holes = [];
5200
+ super(e), this.uuid = Mt(), this.type = "Shape", this.holes = [];
5198
5201
  }
5199
5202
  getPointsHoles(e) {
5200
5203
  let t = [];
@@ -5228,16 +5231,16 @@ var ao = class extends Ba {
5228
5231
  super.fromJSON(e), this.uuid = e.uuid, this.holes = [];
5229
5232
  for (let t = 0, n = e.holes.length; t < n; t++) {
5230
5233
  let n = e.holes[t];
5231
- this.holes.push(new ho().fromJSON(n));
5234
+ this.holes.push(new go().fromJSON(n));
5232
5235
  }
5233
5236
  return this;
5234
5237
  }
5235
5238
  };
5236
- function _o(e, t, n = 2) {
5237
- let r = t && t.length, i = r ? t[0] * n : e.length, a = vo(e, 0, i, n, !0), o = [];
5239
+ function vo(e, t, n = 2) {
5240
+ let r = t && t.length, i = r ? t[0] * n : e.length, a = yo(e, 0, i, n, !0), o = [];
5238
5241
  if (!a || a.next === a.prev) return o;
5239
5242
  let s, c, l;
5240
- if (r && (a = To(e, t, a, n)), e.length > 80 * n) {
5243
+ if (r && (a = Eo(e, t, a, n)), e.length > 80 * n) {
5241
5244
  s = e[0], c = e[1];
5242
5245
  let t = s, r = c;
5243
5246
  for (let a = n; a < i; a += n) {
@@ -5246,86 +5249,86 @@ function _o(e, t, n = 2) {
5246
5249
  }
5247
5250
  l = Math.max(t - s, r - c), l = l === 0 ? 0 : 32767 / l;
5248
5251
  }
5249
- return bo(a, o, n, s, c, l, 0), o;
5252
+ return xo(a, o, n, s, c, l, 0), o;
5250
5253
  }
5251
- function vo(e, t, n, r, i) {
5254
+ function yo(e, t, n, r, i) {
5252
5255
  let a;
5253
- if (i === Jo(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = Go(i / r | 0, e[i], e[i + 1], a);
5254
- else for (let i = n - r; i >= t; i -= r) a = Go(i / r | 0, e[i], e[i + 1], a);
5255
- return a && Lo(a, a.next) && (Ko(a), a = a.next), a;
5256
+ if (i === Yo(e, t, n, r) > 0) for (let i = t; i < n; i += r) a = Ko(i / r | 0, e[i], e[i + 1], a);
5257
+ else for (let i = n - r; i >= t; i -= r) a = Ko(i / r | 0, e[i], e[i + 1], a);
5258
+ return a && Ro(a, a.next) && (qo(a), a = a.next), a;
5256
5259
  }
5257
- function yo(e, t) {
5260
+ function bo(e, t) {
5258
5261
  if (!e) return e;
5259
5262
  t ||= e;
5260
5263
  let n = e, r;
5261
5264
  do
5262
- if (r = !1, !n.steiner && (Lo(n, n.next) || X(n.prev, n, n.next) === 0)) {
5263
- if (Ko(n), n = t = n.prev, n === n.next) break;
5265
+ if (r = !1, !n.steiner && (Ro(n, n.next) || X(n.prev, n, n.next) === 0)) {
5266
+ if (qo(n), n = t = n.prev, n === n.next) break;
5264
5267
  r = !0;
5265
5268
  } else n = n.next;
5266
5269
  while (r || n !== t);
5267
5270
  return t;
5268
5271
  }
5269
- function bo(e, t, n, r, i, a, o) {
5272
+ function xo(e, t, n, r, i, a, o) {
5270
5273
  if (!e) return;
5271
- !o && a && Ao(e, r, i, a);
5274
+ !o && a && jo(e, r, i, a);
5272
5275
  let s = e;
5273
5276
  for (; e.prev !== e.next;) {
5274
5277
  let c = e.prev, l = e.next;
5275
- if (a ? So(e, r, i, a) : xo(e)) {
5276
- t.push(c.i, e.i, l.i), Ko(e), e = l.next, s = l.next;
5278
+ if (a ? Co(e, r, i, a) : So(e)) {
5279
+ t.push(c.i, e.i, l.i), qo(e), e = l.next, s = l.next;
5277
5280
  continue;
5278
5281
  }
5279
5282
  if (e = l, e === s) {
5280
- o ? o === 1 ? (e = Co(yo(e), t), bo(e, t, n, r, i, a, 2)) : o === 2 && wo(e, t, n, r, i, a) : bo(yo(e), t, n, r, i, a, 1);
5283
+ o ? o === 1 ? (e = wo(bo(e), t), xo(e, t, n, r, i, a, 2)) : o === 2 && To(e, t, n, r, i, a) : xo(bo(e), t, n, r, i, a, 1);
5281
5284
  break;
5282
5285
  }
5283
5286
  }
5284
5287
  }
5285
- function xo(e) {
5288
+ function So(e) {
5286
5289
  let t = e.prev, n = e, r = e.next;
5287
5290
  if (X(t, n, r) >= 0) return !1;
5288
5291
  let i = t.x, a = n.x, o = r.x, s = t.y, c = n.y, l = r.y, u = Math.min(i, a, o), d = Math.min(s, c, l), f = Math.max(i, a, o), p = Math.max(s, c, l), m = r.next;
5289
5292
  for (; m !== t;) {
5290
- if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && Fo(i, s, a, c, o, l, m.x, m.y) && X(m.prev, m, m.next) >= 0) return !1;
5293
+ if (m.x >= u && m.x <= f && m.y >= d && m.y <= p && Io(i, s, a, c, o, l, m.x, m.y) && X(m.prev, m, m.next) >= 0) return !1;
5291
5294
  m = m.next;
5292
5295
  }
5293
5296
  return !0;
5294
5297
  }
5295
- function So(e, t, n, r) {
5298
+ function Co(e, t, n, r) {
5296
5299
  let i = e.prev, a = e, o = e.next;
5297
5300
  if (X(i, a, o) >= 0) return !1;
5298
- let s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ = Mo(p, m, t, n, r), v = Mo(h, g, t, n, r), y = e.prevZ, b = e.nextZ;
5301
+ let s = i.x, c = a.x, l = o.x, u = i.y, d = a.y, f = o.y, p = Math.min(s, c, l), m = Math.min(u, d, f), h = Math.max(s, c, l), g = Math.max(u, d, f), _ = No(p, m, t, n, r), v = No(h, g, t, n, r), y = e.prevZ, b = e.nextZ;
5299
5302
  for (; y && y.z >= _ && b && b.z <= v;) {
5300
- if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Fo(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0 || (y = y.prevZ, b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Fo(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0)) return !1;
5303
+ if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Io(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0 || (y = y.prevZ, b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Io(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0)) return !1;
5301
5304
  b = b.nextZ;
5302
5305
  }
5303
5306
  for (; y && y.z >= _;) {
5304
- if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Fo(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0) return !1;
5307
+ if (y.x >= p && y.x <= h && y.y >= m && y.y <= g && y !== i && y !== o && Io(s, u, c, d, l, f, y.x, y.y) && X(y.prev, y, y.next) >= 0) return !1;
5305
5308
  y = y.prevZ;
5306
5309
  }
5307
5310
  for (; b && b.z <= v;) {
5308
- if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Fo(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0) return !1;
5311
+ if (b.x >= p && b.x <= h && b.y >= m && b.y <= g && b !== i && b !== o && Io(s, u, c, d, l, f, b.x, b.y) && X(b.prev, b, b.next) >= 0) return !1;
5309
5312
  b = b.nextZ;
5310
5313
  }
5311
5314
  return !0;
5312
5315
  }
5313
- function Co(e, t) {
5316
+ function wo(e, t) {
5314
5317
  let n = e;
5315
5318
  do {
5316
5319
  let r = n.prev, i = n.next.next;
5317
- !Lo(r, i) && Ro(r, n, n.next, i) && Ho(r, i) && Ho(i, r) && (t.push(r.i, n.i, i.i), Ko(n), Ko(n.next), n = e = i), n = n.next;
5320
+ !Ro(r, i) && zo(r, n, n.next, i) && Uo(r, i) && Uo(i, r) && (t.push(r.i, n.i, i.i), qo(n), qo(n.next), n = e = i), n = n.next;
5318
5321
  } while (n !== e);
5319
- return yo(n);
5322
+ return bo(n);
5320
5323
  }
5321
- function wo(e, t, n, r, i, a) {
5324
+ function To(e, t, n, r, i, a) {
5322
5325
  let o = e;
5323
5326
  do {
5324
5327
  let e = o.next.next;
5325
5328
  for (; e !== o.prev;) {
5326
- if (o.i !== e.i && Io(o, e)) {
5327
- let s = Wo(o, e);
5328
- o = yo(o, o.next), s = yo(s, s.next), bo(o, t, n, r, i, a, 0), bo(s, t, n, r, i, a, 0);
5329
+ if (o.i !== e.i && Lo(o, e)) {
5330
+ let s = Go(o, e);
5331
+ o = bo(o, o.next), s = bo(s, s.next), xo(o, t, n, r, i, a, 0), xo(s, t, n, r, i, a, 0);
5329
5332
  return;
5330
5333
  }
5331
5334
  e = e.next;
@@ -5333,31 +5336,31 @@ function wo(e, t, n, r, i, a) {
5333
5336
  o = o.next;
5334
5337
  } while (o !== e);
5335
5338
  }
5336
- function To(e, t, n, r) {
5339
+ function Eo(e, t, n, r) {
5337
5340
  let i = [];
5338
5341
  for (let n = 0, a = t.length; n < a; n++) {
5339
- let o = vo(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
5340
- o === o.next && (o.steiner = !0), i.push(No(o));
5342
+ let o = yo(e, t[n] * r, n < a - 1 ? t[n + 1] * r : e.length, r, !1);
5343
+ o === o.next && (o.steiner = !0), i.push(Po(o));
5341
5344
  }
5342
- i.sort(Eo);
5343
- for (let e = 0; e < i.length; e++) n = Do(i[e], n);
5345
+ i.sort(Do);
5346
+ for (let e = 0; e < i.length; e++) n = Oo(i[e], n);
5344
5347
  return n;
5345
5348
  }
5346
- function Eo(e, t) {
5349
+ function Do(e, t) {
5347
5350
  let n = e.x - t.x;
5348
5351
  return n === 0 && (n = e.y - t.y, n === 0 && (n = (e.next.y - e.y) / (e.next.x - e.x) - (t.next.y - t.y) / (t.next.x - t.x))), n;
5349
5352
  }
5350
- function Do(e, t) {
5351
- let n = Oo(e, t);
5353
+ function Oo(e, t) {
5354
+ let n = ko(e, t);
5352
5355
  if (!n) return t;
5353
- let r = Wo(n, e);
5354
- return yo(r, r.next), yo(n, n.next);
5356
+ let r = Go(n, e);
5357
+ return bo(r, r.next), bo(n, n.next);
5355
5358
  }
5356
- function Oo(e, t) {
5359
+ function ko(e, t) {
5357
5360
  let n = t, r = e.x, i = e.y, a = -Infinity, o;
5358
- if (Lo(e, n)) return n;
5361
+ if (Ro(e, n)) return n;
5359
5362
  do {
5360
- if (Lo(e, n.next)) return n.next;
5363
+ if (Ro(e, n.next)) return n.next;
5361
5364
  if (i <= n.y && i >= n.next.y && n.next.y !== n.y) {
5362
5365
  let e = n.x + (i - n.y) * (n.next.x - n.x) / (n.next.y - n.y);
5363
5366
  if (e <= r && e > a && (a = e, o = n.x < n.next.x ? n : n.next, e === r)) return o;
@@ -5368,25 +5371,25 @@ function Oo(e, t) {
5368
5371
  let s = o, c = o.x, l = o.y, u = Infinity;
5369
5372
  n = o;
5370
5373
  do {
5371
- if (r >= n.x && n.x >= c && r !== n.x && Po(i < l ? r : a, i, c, l, i < l ? a : r, i, n.x, n.y)) {
5374
+ if (r >= n.x && n.x >= c && r !== n.x && Fo(i < l ? r : a, i, c, l, i < l ? a : r, i, n.x, n.y)) {
5372
5375
  let t = Math.abs(i - n.y) / (r - n.x);
5373
- Ho(n, e) && (t < u || t === u && (n.x > o.x || n.x === o.x && ko(o, n))) && (o = n, u = t);
5376
+ Uo(n, e) && (t < u || t === u && (n.x > o.x || n.x === o.x && Ao(o, n))) && (o = n, u = t);
5374
5377
  }
5375
5378
  n = n.next;
5376
5379
  } while (n !== s);
5377
5380
  return o;
5378
5381
  }
5379
- function ko(e, t) {
5382
+ function Ao(e, t) {
5380
5383
  return X(e.prev, e, t.prev) < 0 && X(t.next, e, e.next) < 0;
5381
5384
  }
5382
- function Ao(e, t, n, r) {
5385
+ function jo(e, t, n, r) {
5383
5386
  let i = e;
5384
5387
  do
5385
- i.z === 0 && (i.z = Mo(i.x, i.y, t, n, r)), i.prevZ = i.prev, i.nextZ = i.next, i = i.next;
5388
+ i.z === 0 && (i.z = No(i.x, i.y, t, n, r)), i.prevZ = i.prev, i.nextZ = i.next, i = i.next;
5386
5389
  while (i !== e);
5387
- i.prevZ.nextZ = null, i.prevZ = null, jo(i);
5390
+ i.prevZ.nextZ = null, i.prevZ = null, Mo(i);
5388
5391
  }
5389
- function jo(e) {
5392
+ function Mo(e) {
5390
5393
  let t, n = 1;
5391
5394
  do {
5392
5395
  let r = e, i;
@@ -5404,71 +5407,71 @@ function jo(e) {
5404
5407
  } while (t > 1);
5405
5408
  return e;
5406
5409
  }
5407
- function Mo(e, t, n, r, i) {
5410
+ function No(e, t, n, r, i) {
5408
5411
  return e = (e - n) * i | 0, t = (t - r) * i | 0, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, t = (t | t << 8) & 16711935, t = (t | t << 4) & 252645135, t = (t | t << 2) & 858993459, t = (t | t << 1) & 1431655765, e | t << 1;
5409
5412
  }
5410
- function No(e) {
5413
+ function Po(e) {
5411
5414
  let t = e, n = e;
5412
5415
  do
5413
5416
  (t.x < n.x || t.x === n.x && t.y < n.y) && (n = t), t = t.next;
5414
5417
  while (t !== e);
5415
5418
  return n;
5416
5419
  }
5417
- function Po(e, t, n, r, i, a, o, s) {
5420
+ function Fo(e, t, n, r, i, a, o, s) {
5418
5421
  return (i - o) * (t - s) >= (e - o) * (a - s) && (e - o) * (r - s) >= (n - o) * (t - s) && (n - o) * (a - s) >= (i - o) * (r - s);
5419
5422
  }
5420
- function Fo(e, t, n, r, i, a, o, s) {
5421
- return !(e === o && t === s) && Po(e, t, n, r, i, a, o, s);
5423
+ function Io(e, t, n, r, i, a, o, s) {
5424
+ return !(e === o && t === s) && Fo(e, t, n, r, i, a, o, s);
5422
5425
  }
5423
- function Io(e, t) {
5424
- return e.next.i !== t.i && e.prev.i !== t.i && !Vo(e, t) && (Ho(e, t) && Ho(t, e) && Uo(e, t) && (X(e.prev, e, t.prev) || X(e, t.prev, t)) || Lo(e, t) && X(e.prev, e, e.next) > 0 && X(t.prev, t, t.next) > 0);
5426
+ function Lo(e, t) {
5427
+ return e.next.i !== t.i && e.prev.i !== t.i && !Ho(e, t) && (Uo(e, t) && Uo(t, e) && Wo(e, t) && (X(e.prev, e, t.prev) || X(e, t.prev, t)) || Ro(e, t) && X(e.prev, e, e.next) > 0 && X(t.prev, t, t.next) > 0);
5425
5428
  }
5426
5429
  function X(e, t, n) {
5427
5430
  return (t.y - e.y) * (n.x - t.x) - (t.x - e.x) * (n.y - t.y);
5428
5431
  }
5429
- function Lo(e, t) {
5432
+ function Ro(e, t) {
5430
5433
  return e.x === t.x && e.y === t.y;
5431
5434
  }
5432
- function Ro(e, t, n, r) {
5433
- let i = Bo(X(e, t, n)), a = Bo(X(e, t, r)), o = Bo(X(n, r, e)), s = Bo(X(n, r, t));
5434
- return !!(i !== a && o !== s || i === 0 && zo(e, n, t) || a === 0 && zo(e, r, t) || o === 0 && zo(n, e, r) || s === 0 && zo(n, t, r));
5435
+ function zo(e, t, n, r) {
5436
+ let i = Vo(X(e, t, n)), a = Vo(X(e, t, r)), o = Vo(X(n, r, e)), s = Vo(X(n, r, t));
5437
+ return !!(i !== a && o !== s || i === 0 && Bo(e, n, t) || a === 0 && Bo(e, r, t) || o === 0 && Bo(n, e, r) || s === 0 && Bo(n, t, r));
5435
5438
  }
5436
- function zo(e, t, n) {
5439
+ function Bo(e, t, n) {
5437
5440
  return t.x <= Math.max(e.x, n.x) && t.x >= Math.min(e.x, n.x) && t.y <= Math.max(e.y, n.y) && t.y >= Math.min(e.y, n.y);
5438
5441
  }
5439
- function Bo(e) {
5442
+ function Vo(e) {
5440
5443
  return e > 0 ? 1 : e < 0 ? -1 : 0;
5441
5444
  }
5442
- function Vo(e, t) {
5445
+ function Ho(e, t) {
5443
5446
  let n = e;
5444
5447
  do {
5445
- if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && Ro(n, n.next, e, t)) return !0;
5448
+ if (n.i !== e.i && n.next.i !== e.i && n.i !== t.i && n.next.i !== t.i && zo(n, n.next, e, t)) return !0;
5446
5449
  n = n.next;
5447
5450
  } while (n !== e);
5448
5451
  return !1;
5449
5452
  }
5450
- function Ho(e, t) {
5453
+ function Uo(e, t) {
5451
5454
  return X(e.prev, e, e.next) < 0 ? X(e, t, e.next) >= 0 && X(e, e.prev, t) >= 0 : X(e, t, e.prev) < 0 || X(e, e.next, t) < 0;
5452
5455
  }
5453
- function Uo(e, t) {
5456
+ function Wo(e, t) {
5454
5457
  let n = e, r = !1, i = (e.x + t.x) / 2, a = (e.y + t.y) / 2;
5455
5458
  do
5456
5459
  n.y > a != n.next.y > a && n.next.y !== n.y && i < (n.next.x - n.x) * (a - n.y) / (n.next.y - n.y) + n.x && (r = !r), n = n.next;
5457
5460
  while (n !== e);
5458
5461
  return r;
5459
5462
  }
5460
- function Wo(e, t) {
5461
- let n = qo(e.i, e.x, e.y), r = qo(t.i, t.x, t.y), i = e.next, a = t.prev;
5463
+ function Go(e, t) {
5464
+ let n = Jo(e.i, e.x, e.y), r = Jo(t.i, t.x, t.y), i = e.next, a = t.prev;
5462
5465
  return e.next = t, t.prev = e, n.next = i, i.prev = n, r.next = n, n.prev = r, a.next = r, r.prev = a, r;
5463
5466
  }
5464
- function Go(e, t, n, r) {
5465
- let i = qo(e, t, n);
5467
+ function Ko(e, t, n, r) {
5468
+ let i = Jo(e, t, n);
5466
5469
  return r ? (i.next = r.next, i.prev = r, r.next.prev = i, r.next = i) : (i.prev = i, i.next = i), i;
5467
5470
  }
5468
- function Ko(e) {
5471
+ function qo(e) {
5469
5472
  e.next.prev = e.prev, e.prev.next = e.next, e.prevZ && (e.prevZ.nextZ = e.nextZ), e.nextZ && (e.nextZ.prevZ = e.prevZ);
5470
5473
  }
5471
- function qo(e, t, n) {
5474
+ function Jo(e, t, n) {
5472
5475
  return {
5473
5476
  i: e,
5474
5477
  x: t,
@@ -5481,16 +5484,16 @@ function qo(e, t, n) {
5481
5484
  steiner: !1
5482
5485
  };
5483
5486
  }
5484
- function Jo(e, t, n, r) {
5487
+ function Yo(e, t, n, r) {
5485
5488
  let i = 0;
5486
5489
  for (let a = t, o = n - r; a < n; a += r) i += (e[o] - e[a]) * (e[a + 1] + e[o + 1]), o = a;
5487
5490
  return i;
5488
5491
  }
5489
- var Yo = class {
5492
+ var Xo = class {
5490
5493
  static triangulate(e, t, n = 2) {
5491
- return _o(e, t, n);
5494
+ return vo(e, t, n);
5492
5495
  }
5493
- }, Xo = class e {
5496
+ }, Zo = class e {
5494
5497
  static area(e) {
5495
5498
  let t = e.length, n = 0;
5496
5499
  for (let r = t - 1, i = 0; i < t; r = i++) n += e[r].x * e[i].y - e[i].x * e[r].y;
@@ -5501,23 +5504,23 @@ var Yo = class {
5501
5504
  }
5502
5505
  static triangulateShape(e, t) {
5503
5506
  let n = [], r = [], i = [];
5504
- Zo(e), Qo(n, e);
5507
+ Qo(e), $o(n, e);
5505
5508
  let a = e.length;
5506
- t.forEach(Zo);
5507
- for (let e = 0; e < t.length; e++) r.push(a), a += t[e].length, Qo(n, t[e]);
5508
- let o = Yo.triangulate(n, r);
5509
+ t.forEach(Qo);
5510
+ for (let e = 0; e < t.length; e++) r.push(a), a += t[e].length, $o(n, t[e]);
5511
+ let o = Xo.triangulate(n, r);
5509
5512
  for (let e = 0; e < o.length; e += 3) i.push(o.slice(e, e + 3));
5510
5513
  return i;
5511
5514
  }
5512
5515
  };
5513
- function Zo(e) {
5516
+ function Qo(e) {
5514
5517
  let t = e.length;
5515
5518
  t > 2 && e[t - 1].equals(e[0]) && e.pop();
5516
5519
  }
5517
- function Qo(e, t) {
5520
+ function $o(e, t) {
5518
5521
  for (let n = 0; n < t.length; n++) e.push(t[n].x), e.push(t[n].y);
5519
5522
  }
5520
- var $o = class e extends Yr {
5523
+ var es = class e extends Xr {
5521
5524
  constructor(e = 1, t = 1, n = 1, r = 1) {
5522
5525
  super(), this.type = "PlaneGeometry", this.parameters = {
5523
5526
  width: e,
@@ -5537,7 +5540,7 @@ var $o = class e extends Yr {
5537
5540
  let n = t + c * e, r = t + c * (e + 1), i = t + 1 + c * (e + 1), a = t + 1 + c * e;
5538
5541
  f.push(n, r, a), f.push(r, i, a);
5539
5542
  }
5540
- this.setIndex(f), this.setAttribute("position", new K(p, 3)), this.setAttribute("normal", new K(m, 3)), this.setAttribute("uv", new K(h, 2));
5543
+ this.setIndex(f), this.setAttribute("position", new G(p, 3)), this.setAttribute("normal", new G(m, 3)), this.setAttribute("uv", new G(h, 2));
5541
5544
  }
5542
5545
  copy(e) {
5543
5546
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -5545,7 +5548,7 @@ var $o = class e extends Yr {
5545
5548
  static fromJSON(t) {
5546
5549
  return new e(t.width, t.height, t.widthSegments, t.heightSegments);
5547
5550
  }
5548
- }, es = class e extends Yr {
5551
+ }, ts = class e extends Xr {
5549
5552
  constructor(e = .5, t = 1, n = 32, r = 1, i = 0, a = Math.PI * 2) {
5550
5553
  super(), this.type = "RingGeometry", this.parameters = {
5551
5554
  innerRadius: e,
@@ -5570,7 +5573,7 @@ var $o = class e extends Yr {
5570
5573
  o.push(i, a, c), o.push(a, s, c);
5571
5574
  }
5572
5575
  }
5573
- this.setIndex(o), this.setAttribute("position", new K(s, 3)), this.setAttribute("normal", new K(c, 3)), this.setAttribute("uv", new K(l, 2));
5576
+ this.setIndex(o), this.setAttribute("position", new G(s, 3)), this.setAttribute("normal", new G(c, 3)), this.setAttribute("uv", new G(l, 2));
5574
5577
  }
5575
5578
  copy(e) {
5576
5579
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -5578,8 +5581,8 @@ var $o = class e extends Yr {
5578
5581
  static fromJSON(t) {
5579
5582
  return new e(t.innerRadius, t.outerRadius, t.thetaSegments, t.phiSegments, t.thetaStart, t.thetaLength);
5580
5583
  }
5581
- }, ts = class e extends Yr {
5582
- constructor(e = new go([
5584
+ }, ns = class e extends Xr {
5585
+ constructor(e = new _o([
5583
5586
  new F(0, .5),
5584
5587
  new F(-.5, -.5),
5585
5588
  new F(.5, -.5)
@@ -5591,15 +5594,15 @@ var $o = class e extends Yr {
5591
5594
  let n = [], r = [], i = [], a = [], o = 0, s = 0;
5592
5595
  if (Array.isArray(e) === !1) c(e);
5593
5596
  else for (let t = 0; t < e.length; t++) c(e[t]), this.addGroup(o, s, t), o += s, s = 0;
5594
- this.setIndex(n), this.setAttribute("position", new K(r, 3)), this.setAttribute("normal", new K(i, 3)), this.setAttribute("uv", new K(a, 2));
5597
+ this.setIndex(n), this.setAttribute("position", new G(r, 3)), this.setAttribute("normal", new G(i, 3)), this.setAttribute("uv", new G(a, 2));
5595
5598
  function c(e) {
5596
5599
  let o = r.length / 3, c = e.extractPoints(t), l = c.shape, u = c.holes;
5597
- Xo.isClockWise(l) === !1 && (l = l.reverse());
5600
+ Zo.isClockWise(l) === !1 && (l = l.reverse());
5598
5601
  for (let e = 0, t = u.length; e < t; e++) {
5599
5602
  let t = u[e];
5600
- Xo.isClockWise(t) === !0 && (u[e] = t.reverse());
5603
+ Zo.isClockWise(t) === !0 && (u[e] = t.reverse());
5601
5604
  }
5602
- let d = Xo.triangulateShape(l, u);
5605
+ let d = Zo.triangulateShape(l, u);
5603
5606
  for (let e = 0, t = u.length; e < t; e++) {
5604
5607
  let t = u[e];
5605
5608
  l = l.concat(t);
@@ -5619,7 +5622,7 @@ var $o = class e extends Yr {
5619
5622
  }
5620
5623
  toJSON() {
5621
5624
  let e = super.toJSON(), t = this.parameters.shapes;
5622
- return ns(t, e);
5625
+ return rs(t, e);
5623
5626
  }
5624
5627
  static fromJSON(t, n) {
5625
5628
  let r = [];
@@ -5630,7 +5633,7 @@ var $o = class e extends Yr {
5630
5633
  return new e(r, t.curveSegments);
5631
5634
  }
5632
5635
  };
5633
- function ns(e, t) {
5636
+ function rs(e, t) {
5634
5637
  if (t.shapes = [], Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++) {
5635
5638
  let r = e[n];
5636
5639
  t.shapes.push(r.uuid);
@@ -5638,7 +5641,7 @@ function ns(e, t) {
5638
5641
  else t.shapes.push(e.uuid);
5639
5642
  return t;
5640
5643
  }
5641
- var rs = class e extends Yr {
5644
+ var is = class e extends Xr {
5642
5645
  constructor(e = 1, t = 32, n = 16, r = 0, i = Math.PI * 2, a = 0, o = Math.PI) {
5643
5646
  super(), this.type = "SphereGeometry", this.parameters = {
5644
5647
  radius: e,
@@ -5663,7 +5666,7 @@ var rs = class e extends Yr {
5663
5666
  let t = l[e][r + 1], i = l[e][r], o = l[e + 1][r], c = l[e + 1][r + 1];
5664
5667
  (e !== 0 || a > 0) && f.push(t, i, c), (e !== n - 1 || s < Math.PI) && f.push(i, o, c);
5665
5668
  }
5666
- this.setIndex(f), this.setAttribute("position", new K(p, 3)), this.setAttribute("normal", new K(m, 3)), this.setAttribute("uv", new K(h, 2));
5669
+ this.setIndex(f), this.setAttribute("position", new G(p, 3)), this.setAttribute("normal", new G(m, 3)), this.setAttribute("uv", new G(h, 2));
5667
5670
  }
5668
5671
  copy(e) {
5669
5672
  return super.copy(e), this.parameters = Object.assign({}, e.parameters), this;
@@ -5671,15 +5674,15 @@ var rs = class e extends Yr {
5671
5674
  static fromJSON(t) {
5672
5675
  return new e(t.radius, t.widthSegments, t.heightSegments, t.phiStart, t.phiLength, t.thetaStart, t.thetaLength);
5673
5676
  }
5674
- }, is = class extends Y {
5677
+ }, as = class extends Y {
5675
5678
  constructor(e) {
5676
- super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new H(0), this.transparent = !0, this.fog = !0, this.setValues(e);
5679
+ super(), this.isShadowMaterial = !0, this.type = "ShadowMaterial", this.color = new V(0), this.transparent = !0, this.fog = !0, this.setValues(e);
5677
5680
  }
5678
5681
  copy(e) {
5679
5682
  return super.copy(e), this.color.copy(e.color), this.fog = e.fog, this;
5680
5683
  }
5681
5684
  };
5682
- function as(e) {
5685
+ function os(e) {
5683
5686
  let t = {};
5684
5687
  for (let n in e) {
5685
5688
  t[n] = {};
@@ -5690,29 +5693,29 @@ function as(e) {
5690
5693
  }
5691
5694
  return t;
5692
5695
  }
5693
- function os(e) {
5696
+ function ss(e) {
5694
5697
  let t = {};
5695
5698
  for (let n = 0; n < e.length; n++) {
5696
- let r = as(e[n]);
5699
+ let r = os(e[n]);
5697
5700
  for (let e in r) t[e] = r[e];
5698
5701
  }
5699
5702
  return t;
5700
5703
  }
5701
- function ss(e) {
5704
+ function cs(e) {
5702
5705
  let t = [];
5703
5706
  for (let n = 0; n < e.length; n++) t.push(e[n].clone());
5704
5707
  return t;
5705
5708
  }
5706
- function cs(e) {
5709
+ function ls(e) {
5707
5710
  let t = e.getRenderTarget();
5708
- return t === null ? e.outputColorSpace : t.isXRRenderTarget === !0 ? t.texture.colorSpace : L.workingColorSpace;
5711
+ return t === null ? e.outputColorSpace : t.isXRRenderTarget === !0 ? t.texture.colorSpace : sn.workingColorSpace;
5709
5712
  }
5710
- var ls = {
5711
- clone: as,
5712
- merge: os
5713
- }, us = "void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", ds = "void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", fs = class extends Y {
5713
+ var us = {
5714
+ clone: os,
5715
+ merge: ss
5716
+ }, ds = "void main() {\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}", fs = "void main() {\n gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}", ps = class extends Y {
5714
5717
  constructor(e) {
5715
- super(), this.isShaderMaterial = !0, this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.uniformsGroups = [], this.vertexShader = us, this.fragmentShader = ds, this.linewidth = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.clipping = !1, this.forceSinglePass = !0, this.extensions = {
5718
+ super(), this.isShaderMaterial = !0, this.type = "ShaderMaterial", this.defines = {}, this.uniforms = {}, this.uniformsGroups = [], this.vertexShader = ds, this.fragmentShader = fs, this.linewidth = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.fog = !1, this.lights = !1, this.clipping = !1, this.forceSinglePass = !0, this.extensions = {
5716
5719
  clipCullDistance: !1,
5717
5720
  multiDraw: !1
5718
5721
  }, this.defaultAttributeValues = {
@@ -5726,7 +5729,7 @@ var ls = {
5726
5729
  }, this.index0AttributeName = void 0, this.uniformsNeedUpdate = !1, this.glslVersion = null, e !== void 0 && this.setValues(e);
5727
5730
  }
5728
5731
  copy(e) {
5729
- return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = as(e.uniforms), this.uniformsGroups = ss(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
5732
+ return super.copy(e), this.fragmentShader = e.fragmentShader, this.vertexShader = e.vertexShader, this.uniforms = os(e.uniforms), this.uniformsGroups = cs(e.uniformsGroups), this.defines = Object.assign({}, e.defines), this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.fog = e.fog, this.lights = e.lights, this.clipping = e.clipping, this.extensions = Object.assign({}, e.extensions), this.glslVersion = e.glslVersion, this.defaultAttributeValues = Object.assign({}, e.defaultAttributeValues), this.index0AttributeName = e.index0AttributeName, this.uniformsNeedUpdate = e.uniformsNeedUpdate, this;
5730
5733
  }
5731
5734
  toJSON(e) {
5732
5735
  let t = super.toJSON(e);
@@ -5761,18 +5764,18 @@ var ls = {
5761
5764
  for (let e in this.extensions) this.extensions[e] === !0 && (n[e] = !0);
5762
5765
  return Object.keys(n).length > 0 && (t.extensions = n), t;
5763
5766
  }
5764
- }, ps = class extends fs {
5767
+ }, ms = class extends ps {
5765
5768
  constructor(e) {
5766
5769
  super(e), this.isRawShaderMaterial = !0, this.type = "RawShaderMaterial";
5767
5770
  }
5768
- }, ms = class extends Y {
5771
+ }, hs = class extends Y {
5769
5772
  constructor(e) {
5770
- super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new H(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 H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5773
+ super(), this.isMeshStandardMaterial = !0, this.type = "MeshStandardMaterial", this.defines = { STANDARD: "" }, this.color = new V(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 V(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.roughnessMap = null, this.metalnessMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new An(), this.envMapIntensity = 1, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5771
5774
  }
5772
5775
  copy(e) {
5773
5776
  return super.copy(e), this.defines = { STANDARD: "" }, this.color.copy(e.color), this.roughness = e.roughness, this.metalness = e.metalness, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.roughnessMap = e.roughnessMap, this.metalnessMap = e.metalnessMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.envMapIntensity = e.envMapIntensity, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
5774
5777
  }
5775
- }, hs = class extends ms {
5778
+ }, gs = class extends hs {
5776
5779
  constructor(e) {
5777
5780
  super(), this.isMeshPhysicalMaterial = !0, this.defines = {
5778
5781
  STANDARD: "",
@@ -5784,7 +5787,7 @@ var ls = {
5784
5787
  set: function(e) {
5785
5788
  this.ior = (1 + .4 * e) / (1 - .4 * e);
5786
5789
  }
5787
- }), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new H(0), this.sheenColorMap = null, this.sheenRoughness = 1, this.sheenRoughnessMap = null, this.transmissionMap = null, this.thickness = 0, this.thicknessMap = null, this.attenuationDistance = Infinity, this.attenuationColor = new H(1, 1, 1), this.specularIntensity = 1, this.specularIntensityMap = null, this.specularColor = new H(1, 1, 1), this.specularColorMap = null, this._anisotropy = 0, this._clearcoat = 0, this._dispersion = 0, this._iridescence = 0, this._sheen = 0, this._transmission = 0, this.setValues(e);
5790
+ }), this.iridescenceMap = null, this.iridescenceIOR = 1.3, this.iridescenceThicknessRange = [100, 400], this.iridescenceThicknessMap = null, this.sheenColor = new V(0), this.sheenColorMap = null, this.sheenRoughness = 1, this.sheenRoughnessMap = null, this.transmissionMap = null, this.thickness = 0, this.thicknessMap = null, this.attenuationDistance = Infinity, this.attenuationColor = new V(1, 1, 1), this.specularIntensity = 1, this.specularIntensityMap = null, this.specularColor = new V(1, 1, 1), this.specularColorMap = null, this._anisotropy = 0, this._clearcoat = 0, this._dispersion = 0, this._iridescence = 0, this._sheen = 0, this._transmission = 0, this.setValues(e);
5788
5791
  }
5789
5792
  get anisotropy() {
5790
5793
  return this._anisotropy;
@@ -5828,56 +5831,56 @@ var ls = {
5828
5831
  PHYSICAL: ""
5829
5832
  }, this.anisotropy = e.anisotropy, this.anisotropyRotation = e.anisotropyRotation, this.anisotropyMap = e.anisotropyMap, this.clearcoat = e.clearcoat, this.clearcoatMap = e.clearcoatMap, this.clearcoatRoughness = e.clearcoatRoughness, this.clearcoatRoughnessMap = e.clearcoatRoughnessMap, this.clearcoatNormalMap = e.clearcoatNormalMap, this.clearcoatNormalScale.copy(e.clearcoatNormalScale), this.dispersion = e.dispersion, this.ior = e.ior, this.iridescence = e.iridescence, this.iridescenceMap = e.iridescenceMap, this.iridescenceIOR = e.iridescenceIOR, this.iridescenceThicknessRange = [...e.iridescenceThicknessRange], this.iridescenceThicknessMap = e.iridescenceThicknessMap, this.sheen = e.sheen, this.sheenColor.copy(e.sheenColor), this.sheenColorMap = e.sheenColorMap, this.sheenRoughness = e.sheenRoughness, this.sheenRoughnessMap = e.sheenRoughnessMap, this.transmission = e.transmission, this.transmissionMap = e.transmissionMap, this.thickness = e.thickness, this.thicknessMap = e.thicknessMap, this.attenuationDistance = e.attenuationDistance, this.attenuationColor.copy(e.attenuationColor), this.specularIntensity = e.specularIntensity, this.specularIntensityMap = e.specularIntensityMap, this.specularColor.copy(e.specularColor), this.specularColorMap = e.specularColorMap, this;
5830
5833
  }
5831
- }, gs = class extends Y {
5834
+ }, _s = class extends Y {
5832
5835
  constructor(e) {
5833
- super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new H(16777215), this.specular = new H(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5836
+ super(), this.isMeshPhongMaterial = !0, this.type = "MeshPhongMaterial", this.color = new V(16777215), this.specular = new V(1118481), this.shininess = 30, this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new V(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new An(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5834
5837
  }
5835
5838
  copy(e) {
5836
5839
  return super.copy(e), this.color.copy(e.color), this.specular.copy(e.specular), this.shininess = e.shininess, this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.envMapIntensity = e.envMapIntensity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
5837
5840
  }
5838
- }, _s = class extends Y {
5841
+ }, vs = class extends Y {
5839
5842
  constructor(e) {
5840
- super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new H(16777215), this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
5843
+ super(), this.isMeshToonMaterial = !0, this.defines = { TOON: "" }, this.type = "MeshToonMaterial", this.color = new V(16777215), this.map = null, this.gradientMap = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new V(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.fog = !0, this.setValues(e);
5841
5844
  }
5842
5845
  copy(e) {
5843
5846
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.gradientMap = e.gradientMap, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.fog = e.fog, this;
5844
5847
  }
5845
- }, vs = class extends Y {
5848
+ }, ys = class extends Y {
5846
5849
  constructor(e) {
5847
5850
  super(), this.isMeshNormalMaterial = !0, this.type = "MeshNormalMaterial", this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.flatShading = !1, this.setValues(e);
5848
5851
  }
5849
5852
  copy(e) {
5850
5853
  return super.copy(e), this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.flatShading = e.flatShading, this;
5851
5854
  }
5852
- }, ys = class extends Y {
5855
+ }, bs = class extends Y {
5853
5856
  constructor(e) {
5854
- super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new H(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new H(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new On(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5857
+ super(), this.isMeshLambertMaterial = !0, this.type = "MeshLambertMaterial", this.color = new V(16777215), this.map = null, this.lightMap = null, this.lightMapIntensity = 1, this.aoMap = null, this.aoMapIntensity = 1, this.emissive = new V(0), this.emissiveIntensity = 1, this.emissiveMap = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.specularMap = null, this.alphaMap = null, this.envMap = null, this.envMapRotation = new An(), this.combine = 0, this.reflectivity = 1, this.envMapIntensity = 1, this.refractionRatio = .98, this.wireframe = !1, this.wireframeLinewidth = 1, this.wireframeLinecap = "round", this.wireframeLinejoin = "round", this.flatShading = !1, this.fog = !0, this.setValues(e);
5855
5858
  }
5856
5859
  copy(e) {
5857
5860
  return super.copy(e), this.color.copy(e.color), this.map = e.map, this.lightMap = e.lightMap, this.lightMapIntensity = e.lightMapIntensity, this.aoMap = e.aoMap, this.aoMapIntensity = e.aoMapIntensity, this.emissive.copy(e.emissive), this.emissiveMap = e.emissiveMap, this.emissiveIntensity = e.emissiveIntensity, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.specularMap = e.specularMap, this.alphaMap = e.alphaMap, this.envMap = e.envMap, this.envMapRotation.copy(e.envMapRotation), this.combine = e.combine, this.reflectivity = e.reflectivity, this.envMapIntensity = e.envMapIntensity, this.refractionRatio = e.refractionRatio, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.wireframeLinecap = e.wireframeLinecap, this.wireframeLinejoin = e.wireframeLinejoin, this.flatShading = e.flatShading, this.fog = e.fog, this;
5858
5861
  }
5859
- }, bs = class extends Y {
5862
+ }, xs = class extends Y {
5860
5863
  constructor(e) {
5861
5864
  super(), this.isMeshDepthMaterial = !0, this.type = "MeshDepthMaterial", this.depthPacking = Ze, this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.wireframe = !1, this.wireframeLinewidth = 1, this.setValues(e);
5862
5865
  }
5863
5866
  copy(e) {
5864
5867
  return super.copy(e), this.depthPacking = e.depthPacking, this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this;
5865
5868
  }
5866
- }, xs = class extends Y {
5869
+ }, Ss = class extends Y {
5867
5870
  constructor(e) {
5868
5871
  super(), this.isMeshDistanceMaterial = !0, this.type = "MeshDistanceMaterial", this.map = null, this.alphaMap = null, this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.setValues(e);
5869
5872
  }
5870
5873
  copy(e) {
5871
5874
  return super.copy(e), this.map = e.map, this.alphaMap = e.alphaMap, this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this;
5872
5875
  }
5873
- }, Ss = class extends Y {
5876
+ }, Cs = class extends Y {
5874
5877
  constructor(e) {
5875
- super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new H(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.flatShading = !1, this.fog = !0, this.setValues(e);
5878
+ super(), this.isMeshMatcapMaterial = !0, this.defines = { MATCAP: "" }, this.type = "MeshMatcapMaterial", this.color = new V(16777215), this.matcap = null, this.map = null, this.bumpMap = null, this.bumpScale = 1, this.normalMap = null, this.normalMapType = 0, this.normalScale = new F(1, 1), this.displacementMap = null, this.displacementScale = 1, this.displacementBias = 0, this.alphaMap = null, this.wireframe = !1, this.wireframeLinewidth = 1, this.flatShading = !1, this.fog = !0, this.setValues(e);
5876
5879
  }
5877
5880
  copy(e) {
5878
5881
  return super.copy(e), this.defines = { MATCAP: "" }, this.color.copy(e.color), this.matcap = e.matcap, this.map = e.map, this.bumpMap = e.bumpMap, this.bumpScale = e.bumpScale, this.normalMap = e.normalMap, this.normalMapType = e.normalMapType, this.normalScale.copy(e.normalScale), this.displacementMap = e.displacementMap, this.displacementScale = e.displacementScale, this.displacementBias = e.displacementBias, this.alphaMap = e.alphaMap, this.wireframe = e.wireframe, this.wireframeLinewidth = e.wireframeLinewidth, this.flatShading = e.flatShading, this.fog = e.fog, this;
5879
5882
  }
5880
- }, Cs = class extends ia {
5883
+ }, ws = class extends aa {
5881
5884
  constructor(e) {
5882
5885
  super(), this.isLineDashedMaterial = !0, this.type = "LineDashedMaterial", this.scale = 1, this.dashSize = 3, this.gapSize = 1, this.setValues(e);
5883
5886
  }
@@ -5885,10 +5888,10 @@ var ls = {
5885
5888
  return super.copy(e), this.scale = e.scale, this.dashSize = e.dashSize, this.gapSize = e.gapSize, this;
5886
5889
  }
5887
5890
  };
5888
- function ws(e, t) {
5891
+ function Ts(e, t) {
5889
5892
  return !e || e.constructor === t ? e : typeof t.BYTES_PER_ELEMENT == "number" ? new t(e) : Array.prototype.slice.call(e);
5890
5893
  }
5891
- function Ts(e) {
5894
+ function Es(e) {
5892
5895
  function t(t, n) {
5893
5896
  return e[t] - e[n];
5894
5897
  }
@@ -5896,7 +5899,7 @@ function Ts(e) {
5896
5899
  for (let e = 0; e !== n; ++e) r[e] = e;
5897
5900
  return r.sort(t), r;
5898
5901
  }
5899
- function Es(e, t, n) {
5902
+ function Ds(e, t, n) {
5900
5903
  let r = e.length, i = new e.constructor(r);
5901
5904
  for (let a = 0, o = 0; o !== r; ++a) {
5902
5905
  let r = n[a] * t;
@@ -5904,7 +5907,7 @@ function Es(e, t, n) {
5904
5907
  }
5905
5908
  return i;
5906
5909
  }
5907
- function Ds(e, t, n, r) {
5910
+ function Os(e, t, n, r) {
5908
5911
  let i = 1, a = e[0];
5909
5912
  for (; a !== void 0 && a[r] === void 0;) a = e[i++];
5910
5913
  if (a === void 0) return;
@@ -5919,7 +5922,7 @@ function Ds(e, t, n, r) {
5919
5922
  o = a[r], o !== void 0 && (t.push(a.time), n.push(o)), a = e[i++];
5920
5923
  while (a !== void 0);
5921
5924
  }
5922
- var Os = class {
5925
+ var ks = class {
5923
5926
  constructor(e, t, n, r) {
5924
5927
  this.parameterPositions = e, this._cachedIndex = 0, this.resultBuffer = r === void 0 ? new t.constructor(n) : r, this.sampleValues = t, this.valueSize = n, this.settings = null, this.DefaultSettings_ = {};
5925
5928
  }
@@ -5977,7 +5980,7 @@ var Os = class {
5977
5980
  throw Error("call to abstract method");
5978
5981
  }
5979
5982
  intervalChanged_() {}
5980
- }, ks = class extends Os {
5983
+ }, As = class extends ks {
5981
5984
  constructor(e, t, n, r) {
5982
5985
  super(e, t, n, r), this._weightPrev = -0, this._offsetPrev = -0, this._weightNext = -0, this._offsetNext = -0, this.DefaultSettings_ = {
5983
5986
  endingStart: qe,
@@ -6012,7 +6015,7 @@ var Os = class {
6012
6015
  for (let e = 0; e !== o; ++e) i[e] = g * a[l + e] + _ * a[c + e] + v * a[s + e] + y * a[u + e];
6013
6016
  return i;
6014
6017
  }
6015
- }, As = class extends Os {
6018
+ }, js = class extends ks {
6016
6019
  constructor(e, t, n, r) {
6017
6020
  super(e, t, n, r);
6018
6021
  }
@@ -6021,14 +6024,14 @@ var Os = class {
6021
6024
  for (let e = 0; e !== o; ++e) i[e] = a[c + e] * u + a[s + e] * l;
6022
6025
  return i;
6023
6026
  }
6024
- }, js = class extends Os {
6027
+ }, Ms = class extends ks {
6025
6028
  constructor(e, t, n, r) {
6026
6029
  super(e, t, n, r);
6027
6030
  }
6028
6031
  interpolate_(e) {
6029
6032
  return this.copySampleValue_(e - 1);
6030
6033
  }
6031
- }, Ms = class extends Os {
6034
+ }, Ns = class extends ks {
6032
6035
  interpolate_(e, t, n, r) {
6033
6036
  let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = e * o, c = s - o, l = this.settings || this.DefaultSettings_, u = l.inTangents, d = l.outTangents;
6034
6037
  if (!u || !d) {
@@ -6051,11 +6054,11 @@ var Os = class {
6051
6054
  }
6052
6055
  return i;
6053
6056
  }
6054
- }, Ns = class {
6057
+ }, Ps = class {
6055
6058
  constructor(e, t, n, r) {
6056
6059
  if (e === void 0) throw Error("THREE.KeyframeTrack: track name is undefined");
6057
6060
  if (t === void 0 || t.length === 0) throw Error("THREE.KeyframeTrack: no keyframes in track named " + e);
6058
- this.name = e, this.times = ws(t, this.TimeBufferType), this.values = ws(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
6061
+ this.name = e, this.times = Ts(t, this.TimeBufferType), this.values = Ts(n, this.ValueBufferType), this.setInterpolation(r || this.DefaultInterpolation);
6059
6062
  }
6060
6063
  static toJSON(e) {
6061
6064
  let t = e.constructor, n;
@@ -6063,8 +6066,8 @@ var Os = class {
6063
6066
  else {
6064
6067
  n = {
6065
6068
  name: e.name,
6066
- times: ws(e.times, Array),
6067
- values: ws(e.values, Array)
6069
+ times: Ts(e.times, Array),
6070
+ values: Ts(e.values, Array)
6068
6071
  };
6069
6072
  let t = e.getInterpolation();
6070
6073
  t !== e.DefaultInterpolation && (n.interpolation = t);
@@ -6072,16 +6075,16 @@ var Os = class {
6072
6075
  return n.type = e.ValueTypeName, n;
6073
6076
  }
6074
6077
  InterpolantFactoryMethodDiscrete(e) {
6075
- return new js(this.times, this.values, this.getValueSize(), e);
6078
+ return new Ms(this.times, this.values, this.getValueSize(), e);
6076
6079
  }
6077
6080
  InterpolantFactoryMethodLinear(e) {
6078
- return new As(this.times, this.values, this.getValueSize(), e);
6081
+ return new js(this.times, this.values, this.getValueSize(), e);
6079
6082
  }
6080
6083
  InterpolantFactoryMethodSmooth(e) {
6081
- return new ks(this.times, this.values, this.getValueSize(), e);
6084
+ return new As(this.times, this.values, this.getValueSize(), e);
6082
6085
  }
6083
6086
  InterpolantFactoryMethodBezier(e) {
6084
- let t = new Ms(this.times, this.values, this.getValueSize(), e);
6087
+ let t = new Ns(this.times, this.values, this.getValueSize(), e);
6085
6088
  return this.settings && (t.settings = this.settings), t;
6086
6089
  }
6087
6090
  setInterpolation(e) {
@@ -6207,62 +6210,62 @@ var Os = class {
6207
6210
  return r.createInterpolant = this.createInterpolant, r;
6208
6211
  }
6209
6212
  };
6210
- Ns.prototype.ValueTypeName = "", Ns.prototype.TimeBufferType = Float32Array, Ns.prototype.ValueBufferType = Float32Array, Ns.prototype.DefaultInterpolation = We;
6211
- var Ps = class extends Ns {
6213
+ Ps.prototype.ValueTypeName = "", Ps.prototype.TimeBufferType = Float32Array, Ps.prototype.ValueBufferType = Float32Array, Ps.prototype.DefaultInterpolation = We;
6214
+ var Fs = class extends Ps {
6212
6215
  constructor(e, t, n) {
6213
6216
  super(e, t, n);
6214
6217
  }
6215
6218
  };
6216
- Ps.prototype.ValueTypeName = "bool", Ps.prototype.ValueBufferType = Array, Ps.prototype.DefaultInterpolation = Ue, Ps.prototype.InterpolantFactoryMethodLinear = void 0, Ps.prototype.InterpolantFactoryMethodSmooth = void 0;
6217
- var Fs = class extends Ns {
6219
+ Fs.prototype.ValueTypeName = "bool", Fs.prototype.ValueBufferType = Array, Fs.prototype.DefaultInterpolation = Ue, Fs.prototype.InterpolantFactoryMethodLinear = void 0, Fs.prototype.InterpolantFactoryMethodSmooth = void 0;
6220
+ var Is = class extends Ps {
6218
6221
  constructor(e, t, n, r) {
6219
6222
  super(e, t, n, r);
6220
6223
  }
6221
6224
  };
6222
- Fs.prototype.ValueTypeName = "color";
6223
- var Is = class extends Ns {
6225
+ Is.prototype.ValueTypeName = "color";
6226
+ var Ls = class extends Ps {
6224
6227
  constructor(e, t, n, r) {
6225
6228
  super(e, t, n, r);
6226
6229
  }
6227
6230
  };
6228
- Is.prototype.ValueTypeName = "number";
6229
- var Ls = class extends Os {
6231
+ Ls.prototype.ValueTypeName = "number";
6232
+ var Rs = class extends ks {
6230
6233
  constructor(e, t, n, r) {
6231
6234
  super(e, t, n, r);
6232
6235
  }
6233
6236
  interpolate_(e, t, n, r) {
6234
6237
  let i = this.resultBuffer, a = this.sampleValues, o = this.valueSize, s = (n - t) / (r - t), c = e * o;
6235
- for (let e = c + o; c !== e; c += 4) Zt.slerpFlat(i, 0, a, c - o, a, c, s);
6238
+ for (let e = c + o; c !== e; c += 4) Qt.slerpFlat(i, 0, a, c - o, a, c, s);
6236
6239
  return i;
6237
6240
  }
6238
- }, Rs = class extends Ns {
6241
+ }, zs = class extends Ps {
6239
6242
  constructor(e, t, n, r) {
6240
6243
  super(e, t, n, r);
6241
6244
  }
6242
6245
  InterpolantFactoryMethodLinear(e) {
6243
- return new Ls(this.times, this.values, this.getValueSize(), e);
6246
+ return new Rs(this.times, this.values, this.getValueSize(), e);
6244
6247
  }
6245
6248
  };
6246
- Rs.prototype.ValueTypeName = "quaternion", Rs.prototype.InterpolantFactoryMethodSmooth = void 0;
6247
- var zs = class extends Ns {
6249
+ zs.prototype.ValueTypeName = "quaternion", zs.prototype.InterpolantFactoryMethodSmooth = void 0;
6250
+ var Bs = class extends Ps {
6248
6251
  constructor(e, t, n) {
6249
6252
  super(e, t, n);
6250
6253
  }
6251
6254
  };
6252
- zs.prototype.ValueTypeName = "string", zs.prototype.ValueBufferType = Array, zs.prototype.DefaultInterpolation = Ue, zs.prototype.InterpolantFactoryMethodLinear = void 0, zs.prototype.InterpolantFactoryMethodSmooth = void 0;
6253
- var Bs = class extends Ns {
6255
+ Bs.prototype.ValueTypeName = "string", Bs.prototype.ValueBufferType = Array, Bs.prototype.DefaultInterpolation = Ue, Bs.prototype.InterpolantFactoryMethodLinear = void 0, Bs.prototype.InterpolantFactoryMethodSmooth = void 0;
6256
+ var Vs = class extends Ps {
6254
6257
  constructor(e, t, n, r) {
6255
6258
  super(e, t, n, r);
6256
6259
  }
6257
6260
  };
6258
- Bs.prototype.ValueTypeName = "vector";
6259
- var Vs = class {
6261
+ Vs.prototype.ValueTypeName = "vector";
6262
+ var Hs = class {
6260
6263
  constructor(e = "", t = -1, n = [], r = Xe) {
6261
- this.name = e, this.tracks = n, this.duration = t, this.blendMode = r, this.uuid = jt(), this.userData = {}, this.duration < 0 && this.resetDuration();
6264
+ this.name = e, this.tracks = n, this.duration = t, this.blendMode = r, this.uuid = Mt(), this.userData = {}, this.duration < 0 && this.resetDuration();
6262
6265
  }
6263
6266
  static parse(e) {
6264
6267
  let t = [], n = e.tracks, r = 1 / (e.fps || 1);
6265
- for (let e = 0, i = n.length; e !== i; ++e) t.push(Us(n[e]).scale(r));
6268
+ for (let e = 0, i = n.length; e !== i; ++e) t.push(Ws(n[e]).scale(r));
6266
6269
  let i = new this(e.name, e.duration, t, e.blendMode);
6267
6270
  return i.uuid = e.uuid, i.userData = JSON.parse(e.userData || "{}"), i;
6268
6271
  }
@@ -6275,7 +6278,7 @@ var Vs = class {
6275
6278
  blendMode: e.blendMode,
6276
6279
  userData: JSON.stringify(e.userData)
6277
6280
  };
6278
- for (let e = 0, r = n.length; e !== r; ++e) t.push(Ns.toJSON(n[e]));
6281
+ for (let e = 0, r = n.length; e !== r; ++e) t.push(Ps.toJSON(n[e]));
6279
6282
  return r;
6280
6283
  }
6281
6284
  static CreateFromMorphTargetSequence(e, t, n, r) {
@@ -6283,8 +6286,8 @@ var Vs = class {
6283
6286
  for (let e = 0; e < i; e++) {
6284
6287
  let o = [], s = [];
6285
6288
  o.push((e + i - 1) % i, e, (e + 1) % i), s.push(0, 1, 0);
6286
- let c = Ts(o);
6287
- o = Es(o, 1, c), s = Es(s, 1, c), !r && o[0] === 0 && (o.push(i), s.push(s[0])), a.push(new Is(".morphTargetInfluences[" + t[e].name + "]", o, s).scale(1 / n));
6289
+ let c = Es(o);
6290
+ o = Ds(o, 1, c), s = Ds(s, 1, c), !r && o[0] === 0 && (o.push(i), s.push(s[0])), a.push(new Ls(".morphTargetInfluences[" + t[e].name + "]", o, s).scale(1 / n));
6288
6291
  }
6289
6292
  return new this(e, -1, a);
6290
6293
  }
@@ -6315,7 +6318,7 @@ var Vs = class {
6315
6318
  let n = function(e, t, n, r, i) {
6316
6319
  if (n.length !== 0) {
6317
6320
  let a = [], o = [];
6318
- Ds(n, a, o, r), a.length !== 0 && i.push(new e(t, a, o));
6321
+ Os(n, a, o, r), a.length !== 0 && i.push(new e(t, a, o));
6319
6322
  }
6320
6323
  }, r = [], i = e.name || "default", a = e.fps || 30, o = e.blendMode, s = e.length || -1, c = e.hierarchy || [];
6321
6324
  for (let e = 0; e < c.length; e++) {
@@ -6329,12 +6332,12 @@ var Vs = class {
6329
6332
  let r = i[t];
6330
6333
  e.push(r.time), a.push(r.morphTarget === n ? 1 : 0);
6331
6334
  }
6332
- r.push(new Is(".morphTargetInfluence[" + n + "]", e, a));
6335
+ r.push(new Ls(".morphTargetInfluence[" + n + "]", e, a));
6333
6336
  }
6334
6337
  s = e.length * a;
6335
6338
  } else {
6336
6339
  let a = ".bones[" + t[e].name + "]";
6337
- n(Bs, a + ".position", i, "pos", r), n(Rs, a + ".quaternion", i, "rot", r), n(Bs, a + ".scale", i, "scl", r);
6340
+ n(Vs, a + ".position", i, "pos", r), n(zs, a + ".quaternion", i, "rot", r), n(Vs, a + ".scale", i, "scl", r);
6338
6341
  }
6339
6342
  }
6340
6343
  return r.length === 0 ? null : new this(i, s, r, o);
@@ -6370,42 +6373,42 @@ var Vs = class {
6370
6373
  return this.constructor.toJSON(this);
6371
6374
  }
6372
6375
  };
6373
- function Hs(e) {
6376
+ function Us(e) {
6374
6377
  switch (e.toLowerCase()) {
6375
6378
  case "scalar":
6376
6379
  case "double":
6377
6380
  case "float":
6378
6381
  case "number":
6379
- case "integer": return Is;
6382
+ case "integer": return Ls;
6380
6383
  case "vector":
6381
6384
  case "vector2":
6382
6385
  case "vector3":
6383
- case "vector4": return Bs;
6384
- case "color": return Fs;
6385
- case "quaternion": return Rs;
6386
+ case "vector4": return Vs;
6387
+ case "color": return Is;
6388
+ case "quaternion": return zs;
6386
6389
  case "bool":
6387
- case "boolean": return Ps;
6388
- case "string": return zs;
6390
+ case "boolean": return Fs;
6391
+ case "string": return Bs;
6389
6392
  }
6390
6393
  throw Error("THREE.KeyframeTrack: Unsupported typeName: " + e);
6391
6394
  }
6392
- function Us(e) {
6395
+ function Ws(e) {
6393
6396
  if (e.type === void 0) throw Error("THREE.KeyframeTrack: track type undefined, can not parse");
6394
- let t = Hs(e.type);
6397
+ let t = Us(e.type);
6395
6398
  if (e.times === void 0) {
6396
6399
  let t = [], n = [];
6397
- Ds(e.keys, t, n, "value"), e.times = t, e.values = n;
6400
+ Os(e.keys, t, n, "value"), e.times = t, e.values = n;
6398
6401
  }
6399
6402
  return t.parse === void 0 ? new t(e.name, e.times, e.values, e.interpolation) : t.parse(e);
6400
6403
  }
6401
- var Ws = {
6404
+ var Gs = {
6402
6405
  enabled: !1,
6403
6406
  files: {},
6404
6407
  add: function(e, t) {
6405
- this.enabled !== !1 && (Gs(e) || (this.files[e] = t));
6408
+ this.enabled !== !1 && (Ks(e) || (this.files[e] = t));
6406
6409
  },
6407
6410
  get: function(e) {
6408
- if (this.enabled !== !1 && !Gs(e)) return this.files[e];
6411
+ if (this.enabled !== !1 && !Ks(e)) return this.files[e];
6409
6412
  },
6410
6413
  remove: function(e) {
6411
6414
  delete this.files[e];
@@ -6414,7 +6417,7 @@ var Ws = {
6414
6417
  this.files = {};
6415
6418
  }
6416
6419
  };
6417
- function Gs(e) {
6420
+ function Ks(e) {
6418
6421
  try {
6419
6422
  let t = e.slice(e.indexOf(":") + 1);
6420
6423
  return new URL(t).protocol === "blob:";
@@ -6422,7 +6425,7 @@ function Gs(e) {
6422
6425
  return !1;
6423
6426
  }
6424
6427
  }
6425
- var Ks = class {
6428
+ var qs = class {
6426
6429
  constructor(e, t, n) {
6427
6430
  let r = this, i = !1, a = 0, o = 0, s, c = [];
6428
6431
  this.onStart = void 0, this.onLoad = e, this.onProgress = t, this.onError = n, this._abortController = null, this.itemStart = function(e) {
@@ -6453,9 +6456,9 @@ var Ks = class {
6453
6456
  get abortController() {
6454
6457
  return this._abortController ||= new AbortController(), this._abortController;
6455
6458
  }
6456
- }, qs = /* @__PURE__ */ new Ks(), Js = class {
6459
+ }, Js = /* @__PURE__ */ new qs(), Ys = class {
6457
6460
  constructor(e) {
6458
- this.manager = e === void 0 ? qs : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
6461
+ this.manager = e === void 0 ? Js : e, this.crossOrigin = "anonymous", this.withCredentials = !1, this.path = "", this.resourcePath = "", this.requestHeader = {}, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
6459
6462
  }
6460
6463
  load() {}
6461
6464
  loadAsync(e, t) {
@@ -6484,30 +6487,30 @@ var Ks = class {
6484
6487
  return this;
6485
6488
  }
6486
6489
  };
6487
- Js.DEFAULT_MATERIAL_NAME = "__DEFAULT";
6488
- var Ys = {}, Xs = class extends Error {
6490
+ Ys.DEFAULT_MATERIAL_NAME = "__DEFAULT";
6491
+ var Xs = {}, Zs = class extends Error {
6489
6492
  constructor(e, t) {
6490
6493
  super(e), this.response = t;
6491
6494
  }
6492
- }, Zs = class extends Js {
6495
+ }, Qs = class extends Ys {
6493
6496
  constructor(e) {
6494
6497
  super(e), this.mimeType = "", this.responseType = "", this._abortController = new AbortController();
6495
6498
  }
6496
6499
  load(e, t, n, r) {
6497
6500
  e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
6498
- let i = Ws.get(`file:${e}`);
6501
+ let i = Gs.get(`file:${e}`);
6499
6502
  if (i !== void 0) return this.manager.itemStart(e), setTimeout(() => {
6500
6503
  t && t(i), this.manager.itemEnd(e);
6501
6504
  }, 0), i;
6502
- if (Ys[e] !== void 0) {
6503
- Ys[e].push({
6505
+ if (Xs[e] !== void 0) {
6506
+ Xs[e].push({
6504
6507
  onLoad: t,
6505
6508
  onProgress: n,
6506
6509
  onError: r
6507
6510
  });
6508
6511
  return;
6509
6512
  }
6510
- Ys[e] = [], Ys[e].push({
6513
+ Xs[e] = [], Xs[e].push({
6511
6514
  onLoad: t,
6512
6515
  onProgress: n,
6513
6516
  onError: r
@@ -6520,7 +6523,7 @@ var Ys = {}, Xs = class extends Error {
6520
6523
  fetch(a).then((t) => {
6521
6524
  if (t.status === 200 || t.status === 0) {
6522
6525
  if (t.status === 0 && k("FileLoader: HTTP Status 0 received."), typeof ReadableStream > "u" || t.body === void 0 || t.body.getReader === void 0) return t;
6523
- let n = Ys[e], r = t.body.getReader(), i = t.headers.get("X-File-Size") || t.headers.get("Content-Length"), a = i ? parseInt(i) : 0, o = a !== 0, s = 0, c = new ReadableStream({ start(e) {
6526
+ let n = Xs[e], r = t.body.getReader(), i = t.headers.get("X-File-Size") || t.headers.get("Content-Length"), a = i ? parseInt(i) : 0, o = a !== 0, s = 0, c = new ReadableStream({ start(e) {
6524
6527
  t();
6525
6528
  function t() {
6526
6529
  r.read().then(({ done: r, value: i }) => {
@@ -6544,7 +6547,7 @@ var Ys = {}, Xs = class extends Error {
6544
6547
  }
6545
6548
  } });
6546
6549
  return new Response(c);
6547
- } else throw new Xs(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`, t);
6550
+ } else throw new Zs(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`, t);
6548
6551
  }).then((e) => {
6549
6552
  switch (s) {
6550
6553
  case "arraybuffer": return e.arrayBuffer();
@@ -6559,17 +6562,17 @@ var Ys = {}, Xs = class extends Error {
6559
6562
  }
6560
6563
  }
6561
6564
  }).then((t) => {
6562
- Ws.add(`file:${e}`, t);
6563
- let n = Ys[e];
6564
- delete Ys[e];
6565
+ Gs.add(`file:${e}`, t);
6566
+ let n = Xs[e];
6567
+ delete Xs[e];
6565
6568
  for (let e = 0, r = n.length; e < r; e++) {
6566
6569
  let r = n[e];
6567
6570
  r.onLoad && r.onLoad(t);
6568
6571
  }
6569
6572
  }).catch((t) => {
6570
- let n = Ys[e];
6573
+ let n = Xs[e];
6571
6574
  if (n === void 0) throw this.manager.itemError(e), t;
6572
- delete Ys[e];
6575
+ delete Xs[e];
6573
6576
  for (let e = 0, r = n.length; e < r; e++) {
6574
6577
  let r = n[e];
6575
6578
  r.onError && r.onError(t);
@@ -6588,20 +6591,20 @@ var Ys = {}, Xs = class extends Error {
6588
6591
  abort() {
6589
6592
  return this._abortController.abort(), this._abortController = new AbortController(), this;
6590
6593
  }
6591
- }, Qs = /* @__PURE__ */ new WeakMap(), $s = class extends Js {
6594
+ }, $s = /* @__PURE__ */ new WeakMap(), ec = class extends Ys {
6592
6595
  constructor(e) {
6593
6596
  super(e);
6594
6597
  }
6595
6598
  load(e, t, n, r) {
6596
6599
  this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
6597
- let i = this, a = Ws.get(`image:${e}`);
6600
+ let i = this, a = Gs.get(`image:${e}`);
6598
6601
  if (a !== void 0) {
6599
6602
  if (a.complete === !0) i.manager.itemStart(e), setTimeout(function() {
6600
6603
  t && t(a), i.manager.itemEnd(e);
6601
6604
  }, 0);
6602
6605
  else {
6603
- let e = Qs.get(a);
6604
- e === void 0 && (e = [], Qs.set(a, e)), e.push({
6606
+ let e = $s.get(a);
6607
+ e === void 0 && (e = [], $s.set(a, e)), e.push({
6605
6608
  onLoad: t,
6606
6609
  onError: r
6607
6610
  });
@@ -6611,33 +6614,33 @@ var Ys = {}, Xs = class extends Error {
6611
6614
  let o = vt("img");
6612
6615
  function s() {
6613
6616
  l(), t && t(this);
6614
- let n = Qs.get(this) || [];
6617
+ let n = $s.get(this) || [];
6615
6618
  for (let e = 0; e < n.length; e++) {
6616
6619
  let t = n[e];
6617
6620
  t.onLoad && t.onLoad(this);
6618
6621
  }
6619
- Qs.delete(this), i.manager.itemEnd(e);
6622
+ $s.delete(this), i.manager.itemEnd(e);
6620
6623
  }
6621
6624
  function c(t) {
6622
- l(), r && r(t), Ws.remove(`image:${e}`);
6623
- let n = Qs.get(this) || [];
6625
+ l(), r && r(t), Gs.remove(`image:${e}`);
6626
+ let n = $s.get(this) || [];
6624
6627
  for (let e = 0; e < n.length; e++) {
6625
6628
  let r = n[e];
6626
6629
  r.onError && r.onError(t);
6627
6630
  }
6628
- Qs.delete(this), i.manager.itemError(e), i.manager.itemEnd(e);
6631
+ $s.delete(this), i.manager.itemError(e), i.manager.itemEnd(e);
6629
6632
  }
6630
6633
  function l() {
6631
6634
  o.removeEventListener("load", s, !1), o.removeEventListener("error", c, !1);
6632
6635
  }
6633
- return o.addEventListener("load", s, !1), o.addEventListener("error", c, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin), Ws.add(`image:${e}`, o), i.manager.itemStart(e), o.src = e, o;
6636
+ return o.addEventListener("load", s, !1), o.addEventListener("error", c, !1), e.slice(0, 5) !== "data:" && this.crossOrigin !== void 0 && (o.crossOrigin = this.crossOrigin), Gs.add(`image:${e}`, o), i.manager.itemStart(e), o.src = e, o;
6634
6637
  }
6635
- }, ec = class extends Js {
6638
+ }, tc = class extends Ys {
6636
6639
  constructor(e) {
6637
6640
  super(e);
6638
6641
  }
6639
6642
  load(e, t, n, i) {
6640
- let a = this, o = new Pi(), s = new Zs(this.manager);
6643
+ let a = this, o = new Fi(), s = new Qs(this.manager);
6641
6644
  return s.setResponseType("arraybuffer"), s.setRequestHeader(this.requestHeader), s.setPath(this.path), s.setWithCredentials(a.withCredentials), s.load(e, function(e) {
6642
6645
  let n;
6643
6646
  try {
@@ -6652,19 +6655,19 @@ var Ys = {}, Xs = class extends Error {
6652
6655
  n.image === void 0 ? n.data !== void 0 && (o.image.width = n.width, o.image.height = n.height, o.image.data = n.data) : o.image = n.image, o.wrapS = n.wrapS === void 0 ? r : n.wrapS, o.wrapT = n.wrapT === void 0 ? r : n.wrapT, o.magFilter = n.magFilter === void 0 ? c : n.magFilter, o.minFilter = n.minFilter === void 0 ? c : n.minFilter, o.anisotropy = n.anisotropy === void 0 ? 1 : n.anisotropy, n.colorSpace !== void 0 && (o.colorSpace = n.colorSpace), n.flipY !== void 0 && (o.flipY = n.flipY), n.format !== void 0 && (o.format = n.format), n.type !== void 0 && (o.type = n.type), n.mipmaps !== void 0 && (o.mipmaps = n.mipmaps, o.minFilter = u), n.mipmapCount === 1 && (o.minFilter = c), n.generateMipmaps !== void 0 && (o.generateMipmaps = n.generateMipmaps), o.needsUpdate = !0, t && t(o, n);
6653
6656
  }, n, i), o;
6654
6657
  }
6655
- }, tc = class extends Js {
6658
+ }, nc = class extends Ys {
6656
6659
  constructor(e) {
6657
6660
  super(e);
6658
6661
  }
6659
6662
  load(e, t, n, r) {
6660
- let i = new R(), a = new $s(this.manager);
6663
+ let i = new L(), a = new ec(this.manager);
6661
6664
  return a.setCrossOrigin(this.crossOrigin), a.setPath(this.path), a.load(e, function(e) {
6662
6665
  i.image = e, i.needsUpdate = !0, t !== void 0 && t(i);
6663
6666
  }, n, r), i;
6664
6667
  }
6665
- }, nc = class extends V {
6668
+ }, rc = class extends B {
6666
6669
  constructor(e, t = 1) {
6667
- super(), this.isLight = !0, this.type = "Light", this.color = new H(e), this.intensity = t;
6670
+ super(), this.isLight = !0, this.type = "Light", this.color = new V(e), this.intensity = t;
6668
6671
  }
6669
6672
  dispose() {
6670
6673
  this.dispatchEvent({ type: "dispose" });
@@ -6676,9 +6679,9 @@ var Ys = {}, Xs = class extends Error {
6676
6679
  let t = super.toJSON(e);
6677
6680
  return t.object.color = this.color.getHex(), t.object.intensity = this.intensity, t;
6678
6681
  }
6679
- }, rc = class extends nc {
6682
+ }, ic = class extends rc {
6680
6683
  constructor(e, t, n) {
6681
- super(e, n), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.groundColor = new H(t);
6684
+ super(e, n), this.isHemisphereLight = !0, this.type = "HemisphereLight", this.position.copy(B.DEFAULT_UP), this.updateMatrix(), this.groundColor = new V(t);
6682
6685
  }
6683
6686
  copy(e, t) {
6684
6687
  return super.copy(e, t), this.groundColor.copy(e.groundColor), this;
@@ -6687,9 +6690,9 @@ var Ys = {}, Xs = class extends Error {
6687
6690
  let t = super.toJSON(e);
6688
6691
  return t.object.groundColor = this.groundColor.getHex(), t;
6689
6692
  }
6690
- }, ic = /* @__PURE__ */ new z(), ac = /* @__PURE__ */ new I(), oc = /* @__PURE__ */ new I(), sc = class {
6693
+ }, ac = /* @__PURE__ */ new R(), oc = /* @__PURE__ */ new I(), sc = /* @__PURE__ */ new I(), cc = class {
6691
6694
  constructor(e) {
6692
- this.camera = e, this.intensity = 1, this.bias = 0, this.biasNode = null, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new F(512, 512), this.mapType = f, this.map = null, this.mapPass = null, this.matrix = new z(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new ea(), this._frameExtents = new F(1, 1), this._viewportCount = 1, this._viewports = [new hn(0, 0, 1, 1)];
6695
+ this.camera = e, this.intensity = 1, this.bias = 0, this.biasNode = null, this.normalBias = 0, this.radius = 1, this.blurSamples = 8, this.mapSize = new F(512, 512), this.mapType = f, this.map = null, this.mapPass = null, this.matrix = new R(), this.autoUpdate = !0, this.needsUpdate = !1, this._frustum = new ta(), this._frameExtents = new F(1, 1), this._viewportCount = 1, this._viewports = [new _n(0, 0, 1, 1)];
6693
6696
  }
6694
6697
  getViewportCount() {
6695
6698
  return this._viewportCount;
@@ -6699,7 +6702,7 @@ var Ys = {}, Xs = class extends Error {
6699
6702
  }
6700
6703
  updateMatrices(e) {
6701
6704
  let t = this.camera, n = this.matrix;
6702
- ac.setFromMatrixPosition(e.matrixWorld), t.position.copy(ac), oc.setFromMatrixPosition(e.target.matrixWorld), t.lookAt(oc), t.updateMatrixWorld(), ic.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), this._frustum.setFromProjectionMatrix(ic, t.coordinateSystem, t.reversedDepth), t.coordinateSystem === 2001 || t.reversedDepth ? n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, 1, 0, 0, 0, 0, 1) : n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1), n.multiply(ic);
6705
+ oc.setFromMatrixPosition(e.matrixWorld), t.position.copy(oc), sc.setFromMatrixPosition(e.target.matrixWorld), t.lookAt(sc), t.updateMatrixWorld(), ac.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), this._frustum.setFromProjectionMatrix(ac, t.coordinateSystem, t.reversedDepth), t.coordinateSystem === 2001 || t.reversedDepth ? n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, 1, 0, 0, 0, 0, 1) : n.set(.5, 0, 0, .5, 0, .5, 0, .5, 0, 0, .5, .5, 0, 0, 0, 1), n.multiply(ac);
6703
6706
  }
6704
6707
  getViewport(e) {
6705
6708
  return this._viewports[e];
@@ -6720,9 +6723,9 @@ var Ys = {}, Xs = class extends Error {
6720
6723
  let e = {};
6721
6724
  return this.intensity !== 1 && (e.intensity = this.intensity), this.bias !== 0 && (e.bias = this.bias), this.normalBias !== 0 && (e.normalBias = this.normalBias), this.radius !== 1 && (e.radius = this.radius), (this.mapSize.x !== 512 || this.mapSize.y !== 512) && (e.mapSize = this.mapSize.toArray()), e.camera = this.camera.toJSON(!1).object, delete e.camera.matrix, e;
6722
6725
  }
6723
- }, cc = /* @__PURE__ */ new I(), lc = /* @__PURE__ */ new Zt(), uc = /* @__PURE__ */ new I(), dc = class extends V {
6726
+ }, lc = /* @__PURE__ */ new I(), uc = /* @__PURE__ */ new Qt(), dc = /* @__PURE__ */ new I(), fc = class extends B {
6724
6727
  constructor() {
6725
- super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new z(), this.projectionMatrix = new z(), this.projectionMatrixInverse = new z(), this.coordinateSystem = ft, this._reversedDepth = !1;
6728
+ super(), this.isCamera = !0, this.type = "Camera", this.matrixWorldInverse = new R(), this.projectionMatrix = new R(), this.projectionMatrixInverse = new R(), this.coordinateSystem = ft, this._reversedDepth = !1;
6726
6729
  }
6727
6730
  get reversedDepth() {
6728
6731
  return this._reversedDepth;
@@ -6734,15 +6737,15 @@ var Ys = {}, Xs = class extends Error {
6734
6737
  return super.getWorldDirection(e).negate();
6735
6738
  }
6736
6739
  updateMatrixWorld(e) {
6737
- super.updateMatrixWorld(e), this.matrixWorld.decompose(cc, lc, uc), uc.x === 1 && uc.y === 1 && uc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(cc, lc, uc.set(1, 1, 1)).invert();
6740
+ super.updateMatrixWorld(e), this.matrixWorld.decompose(lc, uc, dc), dc.x === 1 && dc.y === 1 && dc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(lc, uc, dc.set(1, 1, 1)).invert();
6738
6741
  }
6739
6742
  updateWorldMatrix(e, t) {
6740
- super.updateWorldMatrix(e, t), this.matrixWorld.decompose(cc, lc, uc), uc.x === 1 && uc.y === 1 && uc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(cc, lc, uc.set(1, 1, 1)).invert();
6743
+ super.updateWorldMatrix(e, t), this.matrixWorld.decompose(lc, uc, dc), dc.x === 1 && dc.y === 1 && dc.z === 1 ? this.matrixWorldInverse.copy(this.matrixWorld).invert() : this.matrixWorldInverse.compose(lc, uc, dc.set(1, 1, 1)).invert();
6741
6744
  }
6742
6745
  clone() {
6743
6746
  return new this.constructor().copy(this);
6744
6747
  }
6745
- }, fc = /* @__PURE__ */ new I(), pc = /* @__PURE__ */ new F(), mc = /* @__PURE__ */ new F(), hc = class extends dc {
6748
+ }, pc = /* @__PURE__ */ new I(), mc = /* @__PURE__ */ new F(), hc = /* @__PURE__ */ new F(), gc = class extends fc {
6746
6749
  constructor(e = 50, t = 1, n = .1, r = 2e3) {
6747
6750
  super(), this.isPerspectiveCamera = !0, this.type = "PerspectiveCamera", this.fov = e, this.zoom = 1, this.near = n, this.far = r, this.focus = 10, this.aspect = t, this.view = null, this.filmGauge = 35, this.filmOffset = 0, this.updateProjectionMatrix();
6748
6751
  }
@@ -6751,14 +6754,14 @@ var Ys = {}, Xs = class extends Error {
6751
6754
  }
6752
6755
  setFocalLength(e) {
6753
6756
  let t = .5 * this.getFilmHeight() / e;
6754
- this.fov = At * 2 * Math.atan(t), this.updateProjectionMatrix();
6757
+ this.fov = jt * 2 * Math.atan(t), this.updateProjectionMatrix();
6755
6758
  }
6756
6759
  getFocalLength() {
6757
- let e = Math.tan(kt * .5 * this.fov);
6760
+ let e = Math.tan(At * .5 * this.fov);
6758
6761
  return .5 * this.getFilmHeight() / e;
6759
6762
  }
6760
6763
  getEffectiveFOV() {
6761
- return At * 2 * Math.atan(Math.tan(kt * .5 * this.fov) / this.zoom);
6764
+ return jt * 2 * Math.atan(Math.tan(At * .5 * this.fov) / this.zoom);
6762
6765
  }
6763
6766
  getFilmWidth() {
6764
6767
  return this.filmGauge * Math.min(this.aspect, 1);
@@ -6767,10 +6770,10 @@ var Ys = {}, Xs = class extends Error {
6767
6770
  return this.filmGauge / Math.max(this.aspect, 1);
6768
6771
  }
6769
6772
  getViewBounds(e, t, n) {
6770
- fc.set(-1, -1, .5).applyMatrix4(this.projectionMatrixInverse), t.set(fc.x, fc.y).multiplyScalar(-e / fc.z), fc.set(1, 1, .5).applyMatrix4(this.projectionMatrixInverse), n.set(fc.x, fc.y).multiplyScalar(-e / fc.z);
6773
+ pc.set(-1, -1, .5).applyMatrix4(this.projectionMatrixInverse), t.set(pc.x, pc.y).multiplyScalar(-e / pc.z), pc.set(1, 1, .5).applyMatrix4(this.projectionMatrixInverse), n.set(pc.x, pc.y).multiplyScalar(-e / pc.z);
6771
6774
  }
6772
6775
  getViewSize(e, t) {
6773
- return this.getViewBounds(e, pc, mc), t.subVectors(mc, pc);
6776
+ return this.getViewBounds(e, mc, hc), t.subVectors(hc, mc);
6774
6777
  }
6775
6778
  setViewOffset(e, t, n, r, i, a) {
6776
6779
  this.aspect = e / t, this.view === null && (this.view = {
@@ -6787,7 +6790,7 @@ var Ys = {}, Xs = class extends Error {
6787
6790
  this.view !== null && (this.view.enabled = !1), this.updateProjectionMatrix();
6788
6791
  }
6789
6792
  updateProjectionMatrix() {
6790
- let e = this.near, t = e * Math.tan(kt * .5 * this.fov) / this.zoom, n = 2 * t, r = this.aspect * n, i = -.5 * r, a = this.view;
6793
+ let e = this.near, t = e * Math.tan(At * .5 * this.fov) / this.zoom, n = 2 * t, r = this.aspect * n, i = -.5 * r, a = this.view;
6791
6794
  if (this.view !== null && this.view.enabled) {
6792
6795
  let e = a.fullWidth, o = a.fullHeight;
6793
6796
  i += a.offsetX * r / e, t -= a.offsetY * n / o, r *= a.width / e, n *= a.height / o;
@@ -6799,20 +6802,20 @@ var Ys = {}, Xs = class extends Error {
6799
6802
  let t = super.toJSON(e);
6800
6803
  return t.object.fov = this.fov, t.object.zoom = this.zoom, t.object.near = this.near, t.object.far = this.far, t.object.focus = this.focus, t.object.aspect = this.aspect, this.view !== null && (t.object.view = Object.assign({}, this.view)), t.object.filmGauge = this.filmGauge, t.object.filmOffset = this.filmOffset, t;
6801
6804
  }
6802
- }, gc = class extends sc {
6805
+ }, _c = class extends cc {
6803
6806
  constructor() {
6804
- super(new hc(50, 1, .5, 500)), this.isSpotLightShadow = !0, this.focus = 1, this.aspect = 1;
6807
+ super(new gc(50, 1, .5, 500)), this.isSpotLightShadow = !0, this.focus = 1, this.aspect = 1;
6805
6808
  }
6806
6809
  updateMatrices(e) {
6807
- let t = this.camera, n = At * 2 * e.angle * this.focus, r = this.mapSize.width / this.mapSize.height * this.aspect, i = e.distance || t.far;
6810
+ let t = this.camera, n = jt * 2 * e.angle * this.focus, r = this.mapSize.width / this.mapSize.height * this.aspect, i = e.distance || t.far;
6808
6811
  (n !== t.fov || r !== t.aspect || i !== t.far) && (t.fov = n, t.aspect = r, t.far = i, t.updateProjectionMatrix()), super.updateMatrices(e);
6809
6812
  }
6810
6813
  copy(e) {
6811
6814
  return super.copy(e), this.focus = e.focus, this;
6812
6815
  }
6813
- }, _c = class extends nc {
6816
+ }, vc = class extends rc {
6814
6817
  constructor(e, t, n = 0, r = Math.PI / 3, i = 0, a = 2) {
6815
- super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.target = new V(), this.distance = n, this.angle = r, this.penumbra = i, this.decay = a, this.map = null, this.shadow = new gc();
6818
+ super(e, t), this.isSpotLight = !0, this.type = "SpotLight", this.position.copy(B.DEFAULT_UP), this.updateMatrix(), this.target = new B(), this.distance = n, this.angle = r, this.penumbra = i, this.decay = a, this.map = null, this.shadow = new _c();
6816
6819
  }
6817
6820
  get power() {
6818
6821
  return this.intensity * Math.PI;
@@ -6830,13 +6833,13 @@ var Ys = {}, Xs = class extends Error {
6830
6833
  let t = super.toJSON(e);
6831
6834
  return t.object.distance = this.distance, t.object.angle = this.angle, t.object.decay = this.decay, t.object.penumbra = this.penumbra, t.object.target = this.target.uuid, this.map && this.map.isTexture && (t.object.map = this.map.toJSON(e).uuid), t.object.shadow = this.shadow.toJSON(), t;
6832
6835
  }
6833
- }, vc = class extends sc {
6836
+ }, yc = class extends cc {
6834
6837
  constructor() {
6835
- super(new hc(90, 1, .5, 500)), this.isPointLightShadow = !0;
6838
+ super(new gc(90, 1, .5, 500)), this.isPointLightShadow = !0;
6836
6839
  }
6837
- }, yc = class extends nc {
6840
+ }, bc = class extends rc {
6838
6841
  constructor(e, t, n = 0, r = 2) {
6839
- super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = n, this.decay = r, this.shadow = new vc();
6842
+ super(e, t), this.isPointLight = !0, this.type = "PointLight", this.distance = n, this.decay = r, this.shadow = new yc();
6840
6843
  }
6841
6844
  get power() {
6842
6845
  return this.intensity * 4 * Math.PI;
@@ -6854,7 +6857,7 @@ var Ys = {}, Xs = class extends Error {
6854
6857
  let t = super.toJSON(e);
6855
6858
  return t.object.distance = this.distance, t.object.decay = this.decay, t.object.shadow = this.shadow.toJSON(), t;
6856
6859
  }
6857
- }, bc = class extends dc {
6860
+ }, xc = class extends fc {
6858
6861
  constructor(e = -1, t = 1, n = 1, r = -1, i = .1, a = 2e3) {
6859
6862
  super(), this.isOrthographicCamera = !0, this.type = "OrthographicCamera", this.zoom = 1, this.view = null, this.left = e, this.right = t, this.top = n, this.bottom = r, this.near = i, this.far = a, this.updateProjectionMatrix();
6860
6863
  }
@@ -6887,13 +6890,13 @@ var Ys = {}, Xs = class extends Error {
6887
6890
  let t = super.toJSON(e);
6888
6891
  return t.object.zoom = this.zoom, t.object.left = this.left, t.object.right = this.right, t.object.top = this.top, t.object.bottom = this.bottom, t.object.near = this.near, t.object.far = this.far, this.view !== null && (t.object.view = Object.assign({}, this.view)), t;
6889
6892
  }
6890
- }, xc = class extends sc {
6893
+ }, Sc = class extends cc {
6891
6894
  constructor() {
6892
- super(new bc(-5, 5, 5, -5, .5, 500)), this.isDirectionalLightShadow = !0;
6895
+ super(new xc(-5, 5, 5, -5, .5, 500)), this.isDirectionalLightShadow = !0;
6893
6896
  }
6894
- }, Sc = class extends nc {
6897
+ }, Cc = class extends rc {
6895
6898
  constructor(e, t) {
6896
- super(e, t), this.isDirectionalLight = !0, this.type = "DirectionalLight", this.position.copy(V.DEFAULT_UP), this.updateMatrix(), this.target = new V(), this.shadow = new xc();
6899
+ super(e, t), this.isDirectionalLight = !0, this.type = "DirectionalLight", this.position.copy(B.DEFAULT_UP), this.updateMatrix(), this.target = new B(), this.shadow = new Sc();
6897
6900
  }
6898
6901
  dispose() {
6899
6902
  super.dispose(), this.shadow.dispose();
@@ -6905,11 +6908,11 @@ var Ys = {}, Xs = class extends Error {
6905
6908
  let t = super.toJSON(e);
6906
6909
  return t.object.shadow = this.shadow.toJSON(), t.object.target = this.target.uuid, t;
6907
6910
  }
6908
- }, Cc = class extends nc {
6911
+ }, wc = class extends rc {
6909
6912
  constructor(e, t) {
6910
6913
  super(e, t), this.isAmbientLight = !0, this.type = "AmbientLight";
6911
6914
  }
6912
- }, wc = class extends nc {
6915
+ }, Tc = class extends rc {
6913
6916
  constructor(e, t, n = 10, r = 10) {
6914
6917
  super(e, t), this.isRectAreaLight = !0, this.type = "RectAreaLight", this.width = n, this.height = r;
6915
6918
  }
@@ -6926,7 +6929,7 @@ var Ys = {}, Xs = class extends Error {
6926
6929
  let t = super.toJSON(e);
6927
6930
  return t.object.width = this.width, t.object.height = this.height, t;
6928
6931
  }
6929
- }, Tc = class {
6932
+ }, Ec = class {
6930
6933
  constructor() {
6931
6934
  this.isSphericalHarmonics3 = !0, this.coefficients = [];
6932
6935
  for (let e = 0; e < 9; e++) this.coefficients.push(new I());
@@ -6987,8 +6990,8 @@ var Ys = {}, Xs = class extends Error {
6987
6990
  let n = e.x, r = e.y, i = e.z;
6988
6991
  t[0] = .282095, t[1] = .488603 * r, t[2] = .488603 * i, t[3] = .488603 * n, t[4] = 1.092548 * n * r, t[5] = 1.092548 * r * i, t[6] = .315392 * (3 * i * i - 1), t[7] = 1.092548 * n * i, t[8] = .546274 * (n * n - r * r);
6989
6992
  }
6990
- }, Ec = class extends nc {
6991
- constructor(e = new Tc(), t = 1) {
6993
+ }, Dc = class extends rc {
6994
+ constructor(e = new Ec(), t = 1) {
6992
6995
  super(void 0, t), this.isLightProbe = !0, this.sh = e;
6993
6996
  }
6994
6997
  copy(e) {
@@ -6998,7 +7001,7 @@ var Ys = {}, Xs = class extends Error {
6998
7001
  let t = super.toJSON(e);
6999
7002
  return t.object.sh = this.sh.toArray(), t;
7000
7003
  }
7001
- }, Dc = class {
7004
+ }, Oc = class {
7002
7005
  static extractUrlBase(e) {
7003
7006
  let t = e.lastIndexOf("/");
7004
7007
  return t === -1 ? "./" : e.slice(0, t + 1);
@@ -7006,7 +7009,7 @@ var Ys = {}, Xs = class extends Error {
7006
7009
  static resolveURL(e, t) {
7007
7010
  return typeof e != "string" || e === "" ? "" : (/^https?:\/\//i.test(t) && /^\//.test(e) && (t = t.replace(/(^https?:\/\/[^\/]+).*/i, "$1")), /^(https?:)?\/\//i.test(e) || /^data:.*,.*$/i.test(e) || /^blob:.*$/i.test(e) ? e : t + e);
7008
7011
  }
7009
- }, Oc = /* @__PURE__ */ new WeakMap(), kc = class extends Js {
7012
+ }, kc = /* @__PURE__ */ new WeakMap(), Ac = class extends Ys {
7010
7013
  constructor(e) {
7011
7014
  super(e), this.isImageBitmapLoader = !0, typeof createImageBitmap > "u" && k("ImageBitmapLoader: createImageBitmap() not supported."), typeof fetch > "u" && k("ImageBitmapLoader: fetch() not supported."), this.options = { premultiplyAlpha: "none" }, this._abortController = new AbortController();
7012
7015
  }
@@ -7015,11 +7018,11 @@ var Ys = {}, Xs = class extends Error {
7015
7018
  }
7016
7019
  load(e, t, n, r) {
7017
7020
  e === void 0 && (e = ""), this.path !== void 0 && (e = this.path + e), e = this.manager.resolveURL(e);
7018
- let i = this, a = Ws.get(`image-bitmap:${e}`);
7021
+ let i = this, a = Gs.get(`image-bitmap:${e}`);
7019
7022
  if (a !== void 0) {
7020
7023
  if (i.manager.itemStart(e), a.then) {
7021
7024
  a.then((n) => {
7022
- if (Oc.has(a) === !0) r && r(Oc.get(a)), i.manager.itemError(e), i.manager.itemEnd(e);
7025
+ if (kc.has(a) === !0) r && r(kc.get(a)), i.manager.itemError(e), i.manager.itemEnd(e);
7023
7026
  else return t && t(n), i.manager.itemEnd(e), n;
7024
7027
  });
7025
7028
  return;
@@ -7035,29 +7038,29 @@ var Ys = {}, Xs = class extends Error {
7035
7038
  }).then(function(e) {
7036
7039
  return createImageBitmap(e, Object.assign(i.options, { colorSpaceConversion: "none" }));
7037
7040
  }).then(function(n) {
7038
- return Ws.add(`image-bitmap:${e}`, n), t && t(n), i.manager.itemEnd(e), n;
7041
+ return Gs.add(`image-bitmap:${e}`, n), t && t(n), i.manager.itemEnd(e), n;
7039
7042
  }).catch(function(t) {
7040
- r && r(t), Oc.set(s, t), Ws.remove(`image-bitmap:${e}`), i.manager.itemError(e), i.manager.itemEnd(e);
7043
+ r && r(t), kc.set(s, t), Gs.remove(`image-bitmap:${e}`), i.manager.itemError(e), i.manager.itemEnd(e);
7041
7044
  });
7042
- Ws.add(`image-bitmap:${e}`, s), i.manager.itemStart(e);
7045
+ Gs.add(`image-bitmap:${e}`, s), i.manager.itemStart(e);
7043
7046
  }
7044
7047
  abort() {
7045
7048
  return this._abortController.abort(), this._abortController = new AbortController(), this;
7046
7049
  }
7047
- }, Ac = -90, jc = 1, Mc = class extends V {
7050
+ }, jc = -90, Mc = 1, Nc = class extends B {
7048
7051
  constructor(e, t, n) {
7049
7052
  super(), this.type = "CubeCamera", this.renderTarget = n, this.coordinateSystem = null, this.activeMipmapLevel = 0;
7050
- let r = new hc(Ac, jc, e, t);
7053
+ let r = new gc(jc, Mc, e, t);
7051
7054
  r.layers = this.layers, this.add(r);
7052
- let i = new hc(Ac, jc, e, t);
7055
+ let i = new gc(jc, Mc, e, t);
7053
7056
  i.layers = this.layers, this.add(i);
7054
- let a = new hc(Ac, jc, e, t);
7057
+ let a = new gc(jc, Mc, e, t);
7055
7058
  a.layers = this.layers, this.add(a);
7056
- let o = new hc(Ac, jc, e, t);
7059
+ let o = new gc(jc, Mc, e, t);
7057
7060
  o.layers = this.layers, this.add(o);
7058
- let s = new hc(Ac, jc, e, t);
7061
+ let s = new gc(jc, Mc, e, t);
7059
7062
  s.layers = this.layers, this.add(s);
7060
- let c = new hc(Ac, jc, e, t);
7063
+ let c = new gc(jc, Mc, e, t);
7061
7064
  c.layers = this.layers, this.add(c);
7062
7065
  }
7063
7066
  updateCoordinateSystem() {
@@ -7079,11 +7082,11 @@ var Ys = {}, Xs = class extends Error {
7079
7082
  let h = !1;
7080
7083
  h = e.isWebGLRenderer === !0 ? e.state.buffers.depth.getReversed() : e.reversedDepthBuffer, e.setRenderTarget(n, 0, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, i), e.setRenderTarget(n, 1, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, a), e.setRenderTarget(n, 2, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, o), e.setRenderTarget(n, 3, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, s), e.setRenderTarget(n, 4, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, c), n.texture.generateMipmaps = m, e.setRenderTarget(n, 5, r), h && e.autoClear === !1 && e.clearDepth(), e.render(t, l), e.setRenderTarget(u, d, f), e.xr.enabled = p, n.texture.needsPMREMUpdate = !0;
7081
7084
  }
7082
- }, Nc = class extends hc {
7085
+ }, Pc = class extends gc {
7083
7086
  constructor(e = []) {
7084
7087
  super(), this.isArrayCamera = !0, this.isMultiViewCamera = !1, this.cameras = e;
7085
7088
  }
7086
- }, Pc = class {
7089
+ }, Fc = class {
7087
7090
  constructor(e = !0) {
7088
7091
  this.autoStart = e, this.startTime = 0, this.oldTime = 0, this.elapsedTime = 0, this.running = !1, k("THREE.Clock: This module has been deprecated. Please use THREE.Timer instead.");
7089
7092
  }
@@ -7105,12 +7108,12 @@ var Ys = {}, Xs = class extends Error {
7105
7108
  }
7106
7109
  return e;
7107
7110
  }
7108
- }, Fc = "\\[\\]\\.:\\/", Ic = RegExp("[" + Fc + "]", "g"), Lc = "[^" + Fc + "]", Rc = "[^" + Fc.replace("\\.", "") + "]", zc = /* @__PURE__ */ "((?:WC+[\\/:])*)".replace("WC", Lc), Bc = /* @__PURE__ */ "(WCOD+)?".replace("WCOD", Rc), Vc = /* @__PURE__ */ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", Lc), Hc = /* @__PURE__ */ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", Lc), Uc = RegExp("^" + zc + Bc + Vc + Hc + "$"), Wc = [
7111
+ }, Ic = "\\[\\]\\.:\\/", Lc = RegExp("[" + Ic + "]", "g"), Rc = "[^" + Ic + "]", zc = "[^" + Ic.replace("\\.", "") + "]", Bc = /* @__PURE__ */ "((?:WC+[\\/:])*)".replace("WC", Rc), Vc = /* @__PURE__ */ "(WCOD+)?".replace("WCOD", zc), Hc = /* @__PURE__ */ "(?:\\.(WC+)(?:\\[(.+)\\])?)?".replace("WC", Rc), Uc = /* @__PURE__ */ "\\.(WC+)(?:\\[(.+)\\])?".replace("WC", Rc), Wc = RegExp("^" + Bc + Vc + Hc + Uc + "$"), Gc = [
7109
7112
  "material",
7110
7113
  "materials",
7111
7114
  "bones",
7112
7115
  "map"
7113
- ], Gc = class {
7116
+ ], Kc = class {
7114
7117
  constructor(e, t, n) {
7115
7118
  let r = n || Z.parseTrackName(t);
7116
7119
  this._targetGroup = e, this._bindings = e.subscribe_(t, r);
@@ -7140,10 +7143,10 @@ var Ys = {}, Xs = class extends Error {
7140
7143
  return t && t.isAnimationObjectGroup ? new e.Composite(t, n, r) : new e(t, n, r);
7141
7144
  }
7142
7145
  static sanitizeNodeName(e) {
7143
- return e.replace(/\s/g, "_").replace(Ic, "");
7146
+ return e.replace(/\s/g, "_").replace(Lc, "");
7144
7147
  }
7145
7148
  static parseTrackName(e) {
7146
- let t = Uc.exec(e);
7149
+ let t = Wc.exec(e);
7147
7150
  if (t === null) throw Error("PropertyBinding: Cannot parse trackName: " + e);
7148
7151
  let n = {
7149
7152
  nodeName: t[2],
@@ -7154,7 +7157,7 @@ var Ys = {}, Xs = class extends Error {
7154
7157
  }, r = n.nodeName && n.nodeName.lastIndexOf(".");
7155
7158
  if (r !== void 0 && r !== -1) {
7156
7159
  let e = n.nodeName.substring(r + 1);
7157
- Wc.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
7160
+ Gc.indexOf(e) !== -1 && (n.nodeName = n.nodeName.substring(0, r), n.objectName = e);
7158
7161
  }
7159
7162
  if (n.propertyName === null || n.propertyName.length === 0) throw Error("PropertyBinding: can not parse propertyName from trackName: " + e);
7160
7163
  return n;
@@ -7331,7 +7334,7 @@ var Ys = {}, Xs = class extends Error {
7331
7334
  this.node = null, this.getValue = this._getValue_unbound, this.setValue = this._setValue_unbound;
7332
7335
  }
7333
7336
  };
7334
- Z.Composite = Gc, Z.prototype.BindingType = {
7337
+ Z.Composite = Kc, Z.prototype.BindingType = {
7335
7338
  Direct: 0,
7336
7339
  EntireArray: 1,
7337
7340
  ArrayElement: 2,
@@ -7367,7 +7370,7 @@ Z.Composite = Gc, Z.prototype.BindingType = {
7367
7370
  Z.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate
7368
7371
  ]
7369
7372
  ];
7370
- var Kc = class extends Xr {
7373
+ var qc = class extends Zr {
7371
7374
  constructor(e, t, n = 1) {
7372
7375
  super(e, t), this.isInstancedInterleavedBuffer = !0, this.meshPerAttribute = n;
7373
7376
  }
@@ -7382,9 +7385,9 @@ var Kc = class extends Xr {
7382
7385
  let t = super.toJSON(e);
7383
7386
  return t.isInstancedInterleavedBuffer = !0, t.meshPerAttribute = this.meshPerAttribute, t;
7384
7387
  }
7385
- }, qc = /* @__PURE__ */ new z(), Jc = class {
7388
+ }, Jc = /* @__PURE__ */ new R(), Yc = class {
7386
7389
  constructor(e, t, n = 0, r = Infinity) {
7387
- this.ray = new si(e, t), this.near = n, this.far = r, this.camera = null, this.layers = new kn(), this.params = {
7390
+ this.ray = new ci(e, t), this.near = n, this.far = r, this.camera = null, this.layers = new jn(), this.params = {
7388
7391
  Mesh: {},
7389
7392
  Line: { threshold: 1 },
7390
7393
  LOD: {},
@@ -7399,27 +7402,27 @@ var Kc = class extends Xr {
7399
7402
  t.isPerspectiveCamera ? (this.ray.origin.setFromMatrixPosition(t.matrixWorld), this.ray.direction.set(e.x, e.y, .5).unproject(t).sub(this.ray.origin).normalize(), this.camera = t) : t.isOrthographicCamera ? (this.ray.origin.set(e.x, e.y, (t.near + t.far) / (t.near - t.far)).unproject(t), this.ray.direction.set(0, 0, -1).transformDirection(t.matrixWorld), this.camera = t) : A("Raycaster: Unsupported camera type: " + t.type);
7400
7403
  }
7401
7404
  setFromXRController(e) {
7402
- return qc.identity().extractRotation(e.matrixWorld), this.ray.origin.setFromMatrixPosition(e.matrixWorld), this.ray.direction.set(0, 0, -1).applyMatrix4(qc), this;
7405
+ return Jc.identity().extractRotation(e.matrixWorld), this.ray.origin.setFromMatrixPosition(e.matrixWorld), this.ray.direction.set(0, 0, -1).applyMatrix4(Jc), this;
7403
7406
  }
7404
7407
  intersectObject(e, t = !0, n = []) {
7405
- return Xc(e, this, n, t), n.sort(Yc), n;
7408
+ return Zc(e, this, n, t), n.sort(Xc), n;
7406
7409
  }
7407
7410
  intersectObjects(e, t = !0, n = []) {
7408
- for (let r = 0, i = e.length; r < i; r++) Xc(e[r], this, n, t);
7409
- return n.sort(Yc), n;
7411
+ for (let r = 0, i = e.length; r < i; r++) Zc(e[r], this, n, t);
7412
+ return n.sort(Xc), n;
7410
7413
  }
7411
7414
  };
7412
- function Yc(e, t) {
7415
+ function Xc(e, t) {
7413
7416
  return e.distance - t.distance;
7414
7417
  }
7415
- function Xc(e, t, n, r) {
7418
+ function Zc(e, t, n, r) {
7416
7419
  let i = !0;
7417
7420
  if (e.layers.test(t.layers) && e.raycast(t, n) === !1 && (i = !1), i === !0 && r === !0) {
7418
7421
  let r = e.children;
7419
- for (let e = 0, i = r.length; e < i; e++) Xc(r[e], t, n, !0);
7422
+ for (let e = 0, i = r.length; e < i; e++) Zc(r[e], t, n, !0);
7420
7423
  }
7421
7424
  }
7422
- var Zc = class e {
7425
+ var Qc = class e {
7423
7426
  constructor(t, n, r, i) {
7424
7427
  e.prototype.isMatrix2 = !0, this.elements = [
7425
7428
  1,
@@ -7439,7 +7442,7 @@ var Zc = class e {
7439
7442
  let i = this.elements;
7440
7443
  return i[0] = e, i[2] = t, i[1] = n, i[3] = r, this;
7441
7444
  }
7442
- }, Qc = /* @__PURE__ */ new I(), $c = /* @__PURE__ */ new I(), el = /* @__PURE__ */ new I(), tl = /* @__PURE__ */ new I(), nl = /* @__PURE__ */ new I(), rl = /* @__PURE__ */ new I(), il = /* @__PURE__ */ new I(), al = class {
7445
+ }, $c = /* @__PURE__ */ new I(), el = /* @__PURE__ */ new I(), tl = /* @__PURE__ */ new I(), nl = /* @__PURE__ */ new I(), rl = /* @__PURE__ */ new I(), il = /* @__PURE__ */ new I(), al = /* @__PURE__ */ new I(), ol = class {
7443
7446
  constructor(e = new I(), t = new I()) {
7444
7447
  this.start = e, this.end = t;
7445
7448
  }
@@ -7465,29 +7468,29 @@ var Zc = class e {
7465
7468
  return this.delta(t).multiplyScalar(e).add(this.start);
7466
7469
  }
7467
7470
  closestPointToPointParameter(e, t) {
7468
- Qc.subVectors(e, this.start), $c.subVectors(this.end, this.start);
7469
- let n = $c.dot($c), r = $c.dot(Qc) / n;
7471
+ $c.subVectors(e, this.start), el.subVectors(this.end, this.start);
7472
+ let n = el.dot(el), r = el.dot($c) / n;
7470
7473
  return t && (r = M(r, 0, 1)), r;
7471
7474
  }
7472
7475
  closestPointToPoint(e, t, n) {
7473
7476
  let r = this.closestPointToPointParameter(e, t);
7474
7477
  return this.delta(n).multiplyScalar(r).add(this.start);
7475
7478
  }
7476
- distanceSqToLine3(e, t = rl, n = il) {
7479
+ distanceSqToLine3(e, t = il, n = al) {
7477
7480
  let r = 1e-8 * 1e-8, i, a, o = this.start, s = e.start, c = this.end, l = e.end;
7478
- el.subVectors(c, o), tl.subVectors(l, s), nl.subVectors(o, s);
7479
- let u = el.dot(el), d = tl.dot(tl), f = tl.dot(nl);
7481
+ tl.subVectors(c, o), nl.subVectors(l, s), rl.subVectors(o, s);
7482
+ let u = tl.dot(tl), d = nl.dot(nl), f = nl.dot(rl);
7480
7483
  if (u <= r && d <= r) return t.copy(o), n.copy(s), t.sub(n), t.dot(t);
7481
7484
  if (u <= r) i = 0, a = f / d, a = M(a, 0, 1);
7482
7485
  else {
7483
- let e = el.dot(nl);
7486
+ let e = tl.dot(rl);
7484
7487
  if (d <= r) a = 0, i = M(-e / u, 0, 1);
7485
7488
  else {
7486
- let t = el.dot(tl), n = u * d - t * t;
7489
+ let t = tl.dot(nl), n = u * d - t * t;
7487
7490
  i = n === 0 ? 0 : M((t * f - e * d) / n, 0, 1), a = (t * i + f) / d, a < 0 ? (a = 0, i = M(-e / u, 0, 1)) : a > 1 && (a = 1, i = M((t - e) / u, 0, 1));
7488
7491
  }
7489
7492
  }
7490
- return t.copy(o).addScaledVector(el, i), n.copy(s).addScaledVector(tl, a), t.distanceToSquared(n);
7493
+ return t.copy(o).addScaledVector(tl, i), n.copy(s).addScaledVector(nl, a), t.distanceToSquared(n);
7491
7494
  }
7492
7495
  applyMatrix4(e) {
7493
7496
  return this.start.applyMatrix4(e), this.end.applyMatrix4(e), this;
@@ -7498,9 +7501,9 @@ var Zc = class e {
7498
7501
  clone() {
7499
7502
  return new this.constructor().copy(this);
7500
7503
  }
7501
- }, ol = /* @__PURE__ */ new I(), Q = /* @__PURE__ */ new dc(), sl = class extends ga {
7504
+ }, sl = /* @__PURE__ */ new I(), Q = /* @__PURE__ */ new fc(), cl = class extends _a {
7502
7505
  constructor(e) {
7503
- let t = new Yr(), n = new ia({
7506
+ let t = new Xr(), n = new aa({
7504
7507
  color: 16777215,
7505
7508
  vertexColors: !0,
7506
7509
  toneMapped: !1
@@ -7512,8 +7515,8 @@ var Zc = class e {
7512
7515
  function s(e) {
7513
7516
  r.push(0, 0, 0), i.push(0, 0, 0), a[e] === void 0 && (a[e] = []), a[e].push(r.length / 3 - 1);
7514
7517
  }
7515
- t.setAttribute("position", new K(r, 3)), t.setAttribute("color", new K(i, 3)), super(t, n), this.type = "CameraHelper", this.camera = e, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = a, this.update();
7516
- let c = new H(16755200), l = new H(16711680), u = new H(43775), d = new H(16777215), f = new H(3355443);
7518
+ t.setAttribute("position", new G(r, 3)), t.setAttribute("color", new G(i, 3)), super(t, n), this.type = "CameraHelper", this.camera = e, this.camera.updateProjectionMatrix && this.camera.updateProjectionMatrix(), this.matrix = e.matrixWorld, this.matrixAutoUpdate = !1, this.pointMap = a, this.update();
7519
+ let c = new V(16755200), l = new V(16711680), u = new V(43775), d = new V(16777215), f = new V(3355443);
7517
7520
  this.setColors(c, l, u, d, f);
7518
7521
  }
7519
7522
  setColors(e, t, n, r, i) {
@@ -7533,15 +7536,15 @@ var Zc = class e {
7533
7536
  }
7534
7537
  };
7535
7538
  function $(e, t, n, r, i, a, o) {
7536
- ol.set(i, a, o).unproject(r);
7539
+ sl.set(i, a, o).unproject(r);
7537
7540
  let s = t[e];
7538
7541
  if (s !== void 0) {
7539
7542
  let e = n.getAttribute("position");
7540
- for (let t = 0, n = s.length; t < n; t++) e.setXYZ(s[t], ol.x, ol.y, ol.z);
7543
+ for (let t = 0, n = s.length; t < n; t++) e.setXYZ(s[t], sl.x, sl.y, sl.z);
7541
7544
  }
7542
7545
  }
7543
- function cl(e, t, n, r) {
7544
- let i = ll(r);
7546
+ function ll(e, t, n, r) {
7547
+ let i = ul(r);
7545
7548
  switch (n) {
7546
7549
  case T: return e * t;
7547
7550
  case O: return e * t / i.components * i.byteLength;
@@ -7590,7 +7593,7 @@ function cl(e, t, n, r) {
7590
7593
  }
7591
7594
  throw Error(`Unable to determine texture byte length for ${n} format.`);
7592
7595
  }
7593
- function ll(e) {
7596
+ function ul(e) {
7594
7597
  switch (e) {
7595
7598
  case f:
7596
7599
  case p: return {
@@ -7624,6 +7627,6 @@ function ll(e) {
7624
7627
  }
7625
7628
  typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register", { detail: { revision: "183" } })), typeof window < "u" && (window.__THREE__ ? k("WARNING: Multiple instances of Three.js being imported.") : window.__THREE__ = "183");
7626
7629
  //#endregion
7627
- export { za as $, Ce as $n, Tc as $r, Js as $t, ka as A, Je as Ai, yc as An, gn as Ar, We as At, Pi as B, Tt as Bi, At as Bn, tt as Br, ia as Bt, H as C, Bs as Ci, Is as Cn, ie as Cr, Ki as Ct, Ea as D, qn as Di, hc as Dn, wc as Dr, Os as Dt, ht as E, pt as Ei, ho as En, Jc as Er, Zr as Et, Ba as F, cl as Fi, uo as Fn, ye as Fr, kn as Ft, qs as G, oe as Gn, ts as Gr, ga as Gt, Mr as H, wt as Hi, ze as Hn, fs as Hr, co as Ht, mo as I, cs as Ii, Zt as In, He as Ir, nc as It, Oa as J, je as Jn, Li as Jr, d as Jt, ee as K, Ne as Kn, Xo as Kr, c as Kt, Na as L, _t as Li, Rs as Ln, Be as Lr, Ec as Lt, ao as M, yt as Mi, va as Mn, rt as Mr, ct as Mt, oo as N, vt as Ni, Z as Nn, Et as Nr, nt as Nt, Pa as O, Ye as Oi, Xi as On, O as Or, Ke as Ot, ks as P, A as Pi, lo as Pn, es as Pr, Ns as Pt, ut as Q, Se as Qn, rs as Qr, et as Qt, yn as R, St as Ri, Ls as Rn, xe as Rr, fa as Rt, Pc as S, hn as Si, Xe as Sn, re as Sr, Kc as St, L as T, _n as Ti, bc as Tn, si as Tr, Xr as Tt, at as U, be as Un, is as Ur, Cs as Ut, ec as V, k as Vi, Ve as Vn, $n as Vr, so as Vt, st as W, D as Wn, go as Wr, _a as Wt, Sc as X, Pe as Xn, dn as Xr, l as Xt, t as Y, Me as Yn, Mi as Yr, u as Yt, js as Z, Fe as Zn, Hr as Zr, $e as Zt, dc as _, b as _i, _s as _n, he as _r, $s as _t, Nc as a, R as ai, en as an, ke as ar, Rr as at, Ma as b, F as bi, s as bn, de as br, ot as bt, Ms as c, pr as ci, ci as cn, me as cr, Qn as ct, mr as d, ls as di, ys as dn, le as dr, ra as dt, fo as ei, Dc as en, we as er, Va as et, ja as f, f as fi, Ss as fn, ue as fr, dt as ft, Ws as g, _ as gi, ms as gn, Re as gr, kc as gt, p as h, C as hi, hs as hn, Le as hr, rc as ht, Ha as i, zs as ii, Zc as in, Oe as ir, Zs as it, Da as j, as as ji, Ca as jn, n as jr, Ge as jt, Mc as k, qe as ki, $o as kn, ne as kr, Ue as kt, Ni as l, Ir as li, bs as ln, pe as lr, Ta as lt, Yr as m, S as mi, gs as mn, ae as mr, y as mt, Cc as n, $r as ni, Y as nn, Ee as nr, Dt as nt, e as o, tc as oi, z as on, Ie as or, K as ot, Fr as p, w as pi, vs as pn, E as pr, Gn as pt, te as q, Ae as qn, m as qr, As as qt, Vs as r, lt as ri, Xt as rn, De as rr, Aa as rt, Ze as s, mt as si, bi as sn, _e as sr, v as st, T as t, _c as ti, Ks as tn, Te as tr, On as tt, Ps as u, Lr as ui, xs as un, ce as ur, ea as ut, sl as v, x as vi, i as vn, ge as vr, ln as vt, Fs as w, ft as wi, V as wn, ps as wr, g as wt, r as x, I as xi, o as xn, se as xr, Ri as xt, Ja as y, h as yi, a as yn, fe as yr, it as yt, vn as z, os as zi, ve as zn, Qe as zr, al as zt };
7630
+ export { Ba as $, Ce as $n, Ec as $r, Ys as $t, Aa as A, Je as Ai, bc as An, vn as Ar, We as At, Fi as B, Et as Bi, jt as Bn, tt as Br, aa as Bt, V as C, Vs as Ci, Ls as Cn, ie as Cr, qi as Ct, Da as D, Yn as Di, gc as Dn, Tc as Dr, ks as Dt, ht as E, pt as Ei, go as En, Yc as Er, Qr as Et, Va as F, ll as Fi, fo as Fn, ye as Fr, jn as Ft, Js as G, oe as Gn, ns as Gr, _a as Gt, Pr as H, k as Hi, ze as Hn, ps as Hr, lo as Ht, ho as I, ls as Ii, Qt as In, He as Ir, rc as It, ka as J, je as Jn, Ri as Jr, d as Jt, ee as K, Ne as Kn, Zo as Kr, c as Kt, Pa as L, _t as Li, zs as Ln, Be as Lr, Dc as Lt, oo as M, yt as Mi, ya as Mn, rt as Mr, ct as Mt, so as N, vt as Ni, Z as Nn, Dt as Nr, nt as Nt, Fa as O, Ye as Oi, Zi as On, O as Or, Ke as Ot, As as P, A as Pi, uo as Pn, ts as Pr, Ps as Pt, ut as Q, Se as Qn, is as Qr, et as Qt, xn as R, Ct as Ri, Rs as Rn, xe as Rr, pa as Rt, Fc as S, _n as Si, Xe as Sn, re as Sr, qc as St, sn as T, yn as Ti, xc as Tn, ci as Tr, Zr as Tt, at as U, Tt as Ui, be as Un, as as Ur, ws as Ut, tc as V, St as Vi, Ve as Vn, tr as Vr, co as Vt, st as W, D as Wn, _o as Wr, va as Wt, Cc as X, Pe as Xn, pn as Xr, l as Xt, t as Y, Me as Yn, Ni as Yr, u as Yt, Ms as Z, Fe as Zn, Wr as Zr, $e as Zt, fc as _, b as _i, vs as _n, he as _r, ec as _t, Pc as a, L as ai, tn as an, ke as ar, Br as at, Na as b, F as bi, s as bn, de as br, ot as bt, Ns as c, hr as ci, li as cn, me as cr, er as ct, gr as d, us as di, bs as dn, le as dr, ia as dt, po as ei, Oc as en, we as er, Ha as et, Ma as f, f as fi, Cs as fn, ue as fr, dt as ft, Gs as g, _ as gi, hs as gn, Re as gr, Ac as gt, p as h, C as hi, gs as hn, Le as hr, ic as ht, Ua as i, Bs as ii, Qc as in, Oe as ir, Qs as it, Oa as j, os as ji, wa as jn, n as jr, Ge as jt, Nc as k, qe as ki, es as kn, ne as kr, Ue as kt, Pi as l, Rr as li, xs as ln, pe as lr, Ea as lt, Xr as m, S as mi, _s as mn, ae as mr, y as mt, wc as n, ei as ni, Y as nn, Ee as nr, Ot as nt, e as o, nc as oi, R as on, Ie as or, G as ot, Lr as p, w as pi, ys as pn, E as pr, qn as pt, te as q, Ae as qn, m as qr, js as qt, Hs as r, lt as ri, Zt as rn, De as rr, ja as rt, Ze as s, mt as si, xi as sn, _e as sr, v as st, T as t, vc as ti, qs as tn, Te as tr, An as tt, Fs as u, zr as ui, Ss as un, ce as ur, ta as ut, cl as v, x as vi, i as vn, ge as vr, dn as vt, Is as w, ft as wi, B as wn, ms as wr, g as wt, r as x, I as xi, o as xn, se as xr, zi as xt, Ya as y, h as yi, a as yn, fe as yr, it as yt, bn as z, ss as zi, ve as zn, Qe as zr, ol as zt };
7628
7631
 
7629
- //# sourceMappingURL=three.core-mM-jZdgg.mjs.map
7632
+ //# sourceMappingURL=three.core-BmQnspOL.mjs.map