@tomorrowevening/hermes 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hermes.js CHANGED
@@ -1,9 +1,9 @@
1
1
  var jn = Object.defineProperty;
2
2
  var kn = (t, n, a) => n in t ? jn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
3
  var L = (t, n, a) => (kn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
- import { PositionalAudio as Dn, EventDispatcher as cn, Texture as ln, CubeTexture as An, RepeatWrapping as Yt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Ln, Color as Bt, Mesh as Nn, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as Y, Euler as Bn, Ray as $n, Plane as Gn, MathUtils as Vn, MOUSE as We, TOUCH as Ke, Quaternion as Wt, Spherical as Kt, Vector2 as de, PerspectiveCamera as Lt, MeshDepthMaterial as Hn, MeshNormalMaterial as zn, MeshBasicMaterial as Yn, OrthographicCamera as dn, Scene as fn, Group as Wn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
4
+ import { PositionalAudio as An, EventDispatcher as cn, Texture as ln, CubeTexture as Dn, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Ln, Color as $t, Mesh as Nn, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as Y, Euler as Bn, Ray as $n, Plane as Gn, MathUtils as Vn, MOUSE as We, TOUCH as Ke, Quaternion as Kt, Spherical as Xt, Vector2 as de, PerspectiveCamera as Nt, MeshDepthMaterial as Hn, MeshNormalMaterial as zn, MeshBasicMaterial as Yn, OrthographicCamera as dn, Scene as fn, Group as Wn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
5
5
  import { getProject as Zn, createRafDriver as Jn } from "@theatre/core";
6
- import st from "@theatre/studio";
6
+ import ct from "@theatre/studio";
7
7
  import { Pane as Qn } from "tweakpane";
8
8
  import * as ea from "@tweakpane/plugin-essentials";
9
9
  import pn, { useState as oe, useRef as Ce, useEffect as Fe, Component as ta, forwardRef as na } from "react";
@@ -28,17 +28,17 @@ function ra(t) {
28
28
  }, s = r(n), u = r(a), l = r(e);
29
29
  return "#" + s + u + l;
30
30
  }
31
- function kt(t, n = 1) {
31
+ function At(t, n = 1) {
32
32
  return Number(t.toFixed(n));
33
33
  }
34
- let Nt = 0;
34
+ let Ft = 0;
35
35
  const oa = () => {
36
- Nt = 0;
36
+ Ft = 0;
37
37
  }, gn = (t) => {
38
38
  if (!t)
39
39
  return;
40
40
  let n = t.name.replace(" ", "");
41
- n.length === 0 && (n = `obj_${Nt}`, Nt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
41
+ n.length === 0 && (n = `obj_${Ft}`, Ft++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
42
  gn(a);
43
43
  });
44
44
  }, fi = (t) => {
@@ -50,7 +50,7 @@ const oa = () => {
50
50
  if (t) {
51
51
  for (; t.children.length > 0; ) {
52
52
  const a = t.children[0];
53
- a instanceof Dn ? (a.pause(), a.parent && a.parent.remove(a)) : vn(a);
53
+ a instanceof An ? (a.pause(), a.parent && a.parent.remove(a)) : vn(a);
54
54
  }
55
55
  if (t.parent && t.parent.remove(t), t.isMesh) {
56
56
  const a = t;
@@ -130,7 +130,7 @@ const _ = new cn(), j = {
130
130
  ADD_CAMERA: "ToolEvents::addCamera",
131
131
  REMOVE_CAMERA: "ToolEvents::removeCamera"
132
132
  };
133
- class Ot {
133
+ class Tt {
134
134
  constructor(n) {
135
135
  L(this, "app");
136
136
  this.app = n;
@@ -138,7 +138,7 @@ class Ot {
138
138
  dispose() {
139
139
  }
140
140
  }
141
- class ca extends Ot {
141
+ class ca extends Tt {
142
142
  selectDropdown(n, a) {
143
143
  this.app.send({
144
144
  event: "selectComponent",
@@ -171,7 +171,7 @@ function la(t, n) {
171
171
  }
172
172
  }
173
173
  const bn = () => {
174
- }, qe = class qe extends Ot {
174
+ }, Ze = class Ze extends Tt {
175
175
  constructor() {
176
176
  super(...arguments);
177
177
  L(this, "project");
@@ -269,11 +269,11 @@ const bn = () => {
269
269
  l !== void 0 && (this.sheetObjects.delete(u), this.sheetObjectCBs.delete(u), this.sheetObjectUnsubscribe.delete(u), l());
270
270
  }
271
271
  static getRafDriver() {
272
- return qe.rafDriver || (qe.rafDriver = Jn()), qe.rafDriver;
272
+ return Ze.rafDriver || (Ze.rafDriver = Jn()), Ze.rafDriver;
273
273
  }
274
274
  };
275
- L(qe, "rafDriver", null);
276
- let Ue = qe, Me;
275
+ L(Ze, "rafDriver", null);
276
+ let Ue = Ze, Me;
277
277
  function ua(t, n) {
278
278
  t.components.forEach((a) => {
279
279
  if (a instanceof Ue) {
@@ -281,10 +281,10 @@ function ua(t, n) {
281
281
  const r = a;
282
282
  switch (n.event) {
283
283
  case "setSheet":
284
- e = r.sheets.get(n.data.sheet), e !== void 0 && (Me = e, st.setSelection([e]));
284
+ e = r.sheets.get(n.data.sheet), e !== void 0 && (Me = e, ct.setSelection([e]));
285
285
  break;
286
286
  case "setSheetObject":
287
- e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && st.setSelection([e]);
287
+ e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && ct.setSelection([e]);
288
288
  break;
289
289
  case "updateSheetObject":
290
290
  e = r.sheets.get(n.data.sheet), e !== void 0 && e.sequence.pause(), e = r.sheetObjectCBs.get(n.data.sheetObject), e !== void 0 && e(n.data.values);
@@ -301,7 +301,7 @@ function da(t) {
301
301
  let n;
302
302
  t.components.forEach((s) => {
303
303
  s instanceof Ue && (n = s);
304
- }), st.ui.restore(), st.onSelectionChange((s) => {
304
+ }), ct.ui.restore(), ct.onSelectionChange((s) => {
305
305
  s.length < 1 || s.forEach((u) => {
306
306
  let l = u.address.sheetId, d = "setSheet", p = {};
307
307
  switch (u.type) {
@@ -340,7 +340,7 @@ function da(t) {
340
340
  };
341
341
  e(), r();
342
342
  } else
343
- st.ui.hide();
343
+ ct.ui.hide();
344
344
  }
345
345
  function fa(t, n) {
346
346
  t.editor && t.components.forEach((a) => {
@@ -404,7 +404,7 @@ function ma(t) {
404
404
  }
405
405
  return !1;
406
406
  }
407
- function Xt(t) {
407
+ function Xe(t) {
408
408
  const n = {};
409
409
  for (const a in t) {
410
410
  if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ma(a))
@@ -423,7 +423,7 @@ function Xt(t) {
423
423
  const s = r.source.toJSON();
424
424
  n[a] = { src: s.url };
425
425
  } else
426
- r instanceof An && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
426
+ r instanceof Dn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
427
427
  else
428
428
  a === "uniforms" && (n[a] = pa(n[a]));
429
429
  else
@@ -460,10 +460,28 @@ function Dt(t) {
460
460
  if (Array.isArray(e.material)) {
461
461
  const r = [];
462
462
  e.material.forEach((s) => {
463
- r.push(Xt(s));
463
+ r.push(Xe(s));
464
464
  }), n.material = r;
465
465
  } else
466
- n.material = Xt(e.material);
466
+ n.material = Xe(e.material);
467
+ } else if (a.search("points") > -1) {
468
+ const e = t;
469
+ if (Array.isArray(e.material)) {
470
+ const r = [];
471
+ e.material.forEach((s) => {
472
+ r.push(Xe(s));
473
+ }), n.material = r;
474
+ } else
475
+ n.material = Xe(e.material);
476
+ } else if (a.search("line") > -1) {
477
+ const e = t;
478
+ if (Array.isArray(e.material)) {
479
+ const r = [];
480
+ e.material.forEach((s) => {
481
+ r.push(Xe(s));
482
+ }), n.material = r;
483
+ } else
484
+ n.material = Xe(e.material);
467
485
  } else
468
486
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
469
487
  fov: t.fov,
@@ -513,16 +531,16 @@ function Q(t, n, a) {
513
531
  break;
514
532
  }
515
533
  }
516
- function Ft(t) {
534
+ function Ut(t) {
517
535
  return new Promise((n, a) => {
518
536
  const e = new Image();
519
537
  e.onload = () => {
520
538
  const r = new ln(e);
521
- r.wrapS = Yt, r.wrapT = Yt, r.needsUpdate = !0, n(r);
539
+ r.wrapS = Wt, r.wrapT = Wt, r.needsUpdate = !0, n(r);
522
540
  }, e.onerror = a, e.src = t;
523
541
  });
524
542
  }
525
- class ga extends Ot {
543
+ class ga extends Tt {
526
544
  constructor() {
527
545
  super(...arguments);
528
546
  L(this, "scene");
@@ -639,7 +657,7 @@ function ba(t, n) {
639
657
  break;
640
658
  }
641
659
  }
642
- class En extends Ot {
660
+ class En extends Tt {
643
661
  constructor(a) {
644
662
  super(a);
645
663
  L(this, "bindCBs");
@@ -764,7 +782,7 @@ function ya(t, n) {
764
782
  }
765
783
  });
766
784
  }
767
- var Ut = { exports: {} }, it = {};
785
+ var Bt = { exports: {} }, rt = {};
768
786
  /**
769
787
  * @license React
770
788
  * react-jsx-runtime.production.min.js
@@ -777,7 +795,7 @@ var Ut = { exports: {} }, it = {};
777
795
  var qt;
778
796
  function Ea() {
779
797
  if (qt)
780
- return it;
798
+ return rt;
781
799
  qt = 1;
782
800
  var t = pn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
783
801
  function u(l, d, p) {
@@ -790,9 +808,9 @@ function Ea() {
790
808
  E[v] === void 0 && (E[v] = d[v]);
791
809
  return { $$typeof: n, type: l, key: x, ref: C, props: E, _owner: r.current };
792
810
  }
793
- return it.Fragment = a, it.jsx = u, it.jsxs = u, it;
811
+ return rt.Fragment = a, rt.jsx = u, rt.jsxs = u, rt;
794
812
  }
795
- var rt = {};
813
+ var ot = {};
796
814
  /**
797
815
  * @license React
798
816
  * react-jsx-runtime.development.js
@@ -894,18 +912,18 @@ function wa() {
894
912
  }
895
913
  return null;
896
914
  }
897
- var A = Object.assign, B = 0, J, R, I, q, me, Re, Ze;
898
- function ut() {
915
+ var D = Object.assign, B = 0, J, R, I, q, me, Re, Je;
916
+ function dt() {
899
917
  }
900
- ut.__reactDisabledLog = !0;
901
- function Mt() {
918
+ dt.__reactDisabledLog = !0;
919
+ function Rt() {
902
920
  {
903
921
  if (B === 0) {
904
- J = console.log, R = console.info, I = console.warn, q = console.error, me = console.group, Re = console.groupCollapsed, Ze = console.groupEnd;
922
+ J = console.log, R = console.info, I = console.warn, q = console.error, me = console.group, Re = console.groupCollapsed, Je = console.groupEnd;
905
923
  var i = {
906
924
  configurable: !0,
907
925
  enumerable: !0,
908
- value: ut,
926
+ value: dt,
909
927
  writable: !0
910
928
  };
911
929
  Object.defineProperties(console, {
@@ -921,7 +939,7 @@ function wa() {
921
939
  B++;
922
940
  }
923
941
  }
924
- function Rt() {
942
+ function Pt() {
925
943
  {
926
944
  if (B--, B === 0) {
927
945
  var i = {
@@ -930,52 +948,52 @@ function wa() {
930
948
  writable: !0
931
949
  };
932
950
  Object.defineProperties(console, {
933
- log: A({}, i, {
951
+ log: D({}, i, {
934
952
  value: J
935
953
  }),
936
- info: A({}, i, {
954
+ info: D({}, i, {
937
955
  value: R
938
956
  }),
939
- warn: A({}, i, {
957
+ warn: D({}, i, {
940
958
  value: I
941
959
  }),
942
- error: A({}, i, {
960
+ error: D({}, i, {
943
961
  value: q
944
962
  }),
945
- group: A({}, i, {
963
+ group: D({}, i, {
946
964
  value: me
947
965
  }),
948
- groupCollapsed: A({}, i, {
966
+ groupCollapsed: D({}, i, {
949
967
  value: Re
950
968
  }),
951
- groupEnd: A({}, i, {
952
- value: Ze
969
+ groupEnd: D({}, i, {
970
+ value: Je
953
971
  })
954
972
  });
955
973
  }
956
974
  B < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
957
975
  }
958
976
  }
959
- var Je = K.ReactCurrentDispatcher, Qe;
977
+ var Qe = K.ReactCurrentDispatcher, et;
960
978
  function Pe(i, h, g) {
961
979
  {
962
- if (Qe === void 0)
980
+ if (et === void 0)
963
981
  try {
964
982
  throw Error();
965
983
  } catch (k) {
966
984
  var w = k.stack.trim().match(/\n( *(at )?)/);
967
- Qe = w && w[1] || "";
985
+ et = w && w[1] || "";
968
986
  }
969
987
  return `
970
- ` + Qe + i;
988
+ ` + et + i;
971
989
  }
972
990
  }
973
991
  var Ge = !1, _e;
974
992
  {
975
- var Pt = typeof WeakMap == "function" ? WeakMap : Map;
976
- _e = new Pt();
993
+ var _t = typeof WeakMap == "function" ? WeakMap : Map;
994
+ _e = new _t();
977
995
  }
978
- function dt(i, h) {
996
+ function ft(i, h) {
979
997
  if (!i || Ge)
980
998
  return "";
981
999
  {
@@ -988,7 +1006,7 @@ function wa() {
988
1006
  var k = Error.prepareStackTrace;
989
1007
  Error.prepareStackTrace = void 0;
990
1008
  var F;
991
- F = Je.current, Je.current = null, Mt();
1009
+ F = Qe.current, Qe.current = null, Rt();
992
1010
  try {
993
1011
  if (h) {
994
1012
  var P = function() {
@@ -1041,15 +1059,15 @@ function wa() {
1041
1059
  }
1042
1060
  }
1043
1061
  } finally {
1044
- Ge = !1, Je.current = F, Rt(), Error.prepareStackTrace = k;
1062
+ Ge = !1, Qe.current = F, Pt(), Error.prepareStackTrace = k;
1045
1063
  }
1046
- var Ye = i ? i.displayName || i.name : "", zt = Ye ? Pe(Ye) : "";
1047
- return typeof i == "function" && _e.set(i, zt), zt;
1064
+ var Ye = i ? i.displayName || i.name : "", Yt = Ye ? Pe(Ye) : "";
1065
+ return typeof i == "function" && _e.set(i, Yt), Yt;
1048
1066
  }
1049
- function ft(i, h, g) {
1050
- return dt(i, !1);
1067
+ function ht(i, h, g) {
1068
+ return ft(i, !1);
1051
1069
  }
1052
- function ht(i) {
1070
+ function pt(i) {
1053
1071
  var h = i.prototype;
1054
1072
  return !!(h && h.isReactComponent);
1055
1073
  }
@@ -1057,7 +1075,7 @@ function wa() {
1057
1075
  if (i == null)
1058
1076
  return "";
1059
1077
  if (typeof i == "function")
1060
- return dt(i, ht(i));
1078
+ return ft(i, pt(i));
1061
1079
  if (typeof i == "string")
1062
1080
  return Pe(i);
1063
1081
  switch (i) {
@@ -1069,7 +1087,7 @@ function wa() {
1069
1087
  if (typeof i == "object")
1070
1088
  switch (i.$$typeof) {
1071
1089
  case d:
1072
- return ft(i.render);
1090
+ return ht(i.render);
1073
1091
  case E:
1074
1092
  return je(i.type, h, g);
1075
1093
  case x: {
@@ -1082,13 +1100,13 @@ function wa() {
1082
1100
  }
1083
1101
  return "";
1084
1102
  }
1085
- var Ve = Object.prototype.hasOwnProperty, pt = {}, et = K.ReactDebugCurrentFrame;
1103
+ var Ve = Object.prototype.hasOwnProperty, mt = {}, tt = K.ReactDebugCurrentFrame;
1086
1104
  function Se(i) {
1087
1105
  if (i) {
1088
1106
  var h = i._owner, g = je(i.type, i._source, h ? h.type : null);
1089
- et.setExtraStackFrame(g);
1107
+ tt.setExtraStackFrame(g);
1090
1108
  } else
1091
- et.setExtraStackFrame(null);
1109
+ tt.setExtraStackFrame(null);
1092
1110
  }
1093
1111
  function ke(i, h, g, w, k) {
1094
1112
  {
@@ -1105,40 +1123,40 @@ function wa() {
1105
1123
  } catch (W) {
1106
1124
  T = W;
1107
1125
  }
1108
- T && !(T instanceof Error) && (Se(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in pt) && (pt[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
1126
+ T && !(T instanceof Error) && (Se(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in mt) && (mt[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
1109
1127
  }
1110
1128
  }
1111
1129
  }
1112
- var _t = Array.isArray;
1113
- function tt(i) {
1114
- return _t(i);
1130
+ var jt = Array.isArray;
1131
+ function nt(i) {
1132
+ return jt(i);
1115
1133
  }
1116
- function mt(i) {
1134
+ function gt(i) {
1117
1135
  {
1118
1136
  var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
1119
1137
  return g;
1120
1138
  }
1121
1139
  }
1122
- function nt(i) {
1140
+ function at(i) {
1123
1141
  try {
1124
- return gt(i), !1;
1142
+ return vt(i), !1;
1125
1143
  } catch {
1126
1144
  return !0;
1127
1145
  }
1128
1146
  }
1129
- function gt(i) {
1147
+ function vt(i) {
1130
1148
  return "" + i;
1131
1149
  }
1132
- function vt(i) {
1133
- if (nt(i))
1134
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(i)), gt(i);
1150
+ function bt(i) {
1151
+ if (at(i))
1152
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", gt(i)), vt(i);
1135
1153
  }
1136
- var Oe = K.ReactCurrentOwner, jt = {
1154
+ var Oe = K.ReactCurrentOwner, kt = {
1137
1155
  key: !0,
1138
1156
  ref: !0,
1139
1157
  __self: !0,
1140
1158
  __source: !0
1141
- }, bt, at, ve;
1159
+ }, yt, it, ve;
1142
1160
  ve = {};
1143
1161
  function o(i) {
1144
1162
  if (Ve.call(i, "ref")) {
@@ -1156,7 +1174,7 @@ function wa() {
1156
1174
  }
1157
1175
  return i.key !== void 0;
1158
1176
  }
1159
- function D(i, h) {
1177
+ function A(i, h) {
1160
1178
  if (typeof i.ref == "string" && Oe.current && h && Oe.current.stateNode !== h) {
1161
1179
  var g = U(Oe.current.type);
1162
1180
  ve[g] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', U(Oe.current.type), i.ref), ve[g] = !0);
@@ -1165,7 +1183,7 @@ function wa() {
1165
1183
  function N(i, h) {
1166
1184
  {
1167
1185
  var g = function() {
1168
- bt || (bt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
1186
+ yt || (yt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
1169
1187
  };
1170
1188
  g.isReactWarning = !0, Object.defineProperty(i, "key", {
1171
1189
  get: g,
@@ -1176,7 +1194,7 @@ function wa() {
1176
1194
  function te(i, h) {
1177
1195
  {
1178
1196
  var g = function() {
1179
- at || (at = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
1197
+ it || (it = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
1180
1198
  };
1181
1199
  g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1182
1200
  get: g,
@@ -1216,9 +1234,9 @@ function wa() {
1216
1234
  function ue(i, h, g, w, k) {
1217
1235
  {
1218
1236
  var F, P = {}, T = null, ce = null;
1219
- g !== void 0 && (vt(g), T = "" + g), y(h) && (vt(h.key), T = "" + h.key), o(h) && (ce = h.ref, D(h, k));
1237
+ g !== void 0 && (bt(g), T = "" + g), y(h) && (bt(h.key), T = "" + h.key), o(h) && (ce = h.ref, A(h, k));
1220
1238
  for (F in h)
1221
- Ve.call(h, F) && !jt.hasOwnProperty(F) && (P[F] = h[F]);
1239
+ Ve.call(h, F) && !kt.hasOwnProperty(F) && (P[F] = h[F]);
1222
1240
  if (i && i.defaultProps) {
1223
1241
  var W = i.defaultProps;
1224
1242
  for (F in W)
@@ -1231,13 +1249,13 @@ function wa() {
1231
1249
  return be(i, T, ce, k, w, Oe.current, P);
1232
1250
  }
1233
1251
  }
1234
- var yt = K.ReactCurrentOwner, Et = K.ReactDebugCurrentFrame;
1252
+ var Et = K.ReactCurrentOwner, wt = K.ReactDebugCurrentFrame;
1235
1253
  function ye(i) {
1236
1254
  if (i) {
1237
1255
  var h = i._owner, g = je(i.type, i._source, h ? h.type : null);
1238
- Et.setExtraStackFrame(g);
1256
+ wt.setExtraStackFrame(g);
1239
1257
  } else
1240
- Et.setExtraStackFrame(null);
1258
+ wt.setExtraStackFrame(null);
1241
1259
  }
1242
1260
  var he;
1243
1261
  he = !1;
@@ -1246,8 +1264,8 @@ function wa() {
1246
1264
  }
1247
1265
  function He() {
1248
1266
  {
1249
- if (yt.current) {
1250
- var i = U(yt.current.type);
1267
+ if (Et.current) {
1268
+ var i = U(Et.current.type);
1251
1269
  if (i)
1252
1270
  return `
1253
1271
 
@@ -1256,7 +1274,7 @@ Check the render method of \`` + i + "`.";
1256
1274
  return "";
1257
1275
  }
1258
1276
  }
1259
- function De(i) {
1277
+ function Ae(i) {
1260
1278
  {
1261
1279
  if (i !== void 0) {
1262
1280
  var h = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
@@ -1280,7 +1298,7 @@ Check the top-level render call using <` + g + ">.");
1280
1298
  return h;
1281
1299
  }
1282
1300
  }
1283
- function Gt(i, h) {
1301
+ function Vt(i, h) {
1284
1302
  {
1285
1303
  if (!i._store || i._store.validated || i.key != null)
1286
1304
  return;
@@ -1290,17 +1308,17 @@ Check the top-level render call using <` + g + ">.");
1290
1308
  return;
1291
1309
  Te[g] = !0;
1292
1310
  var w = "";
1293
- i && i._owner && i._owner !== yt.current && (w = " It was passed a child from " + U(i._owner.type) + "."), ye(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), ye(null);
1311
+ i && i._owner && i._owner !== Et.current && (w = " It was passed a child from " + U(i._owner.type) + "."), ye(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), ye(null);
1294
1312
  }
1295
1313
  }
1296
- function Vt(i, h) {
1314
+ function Ht(i, h) {
1297
1315
  {
1298
1316
  if (typeof i != "object")
1299
1317
  return;
1300
- if (tt(i))
1318
+ if (nt(i))
1301
1319
  for (var g = 0; g < i.length; g++) {
1302
1320
  var w = i[g];
1303
- pe(w) && Gt(w, h);
1321
+ pe(w) && Vt(w, h);
1304
1322
  }
1305
1323
  else if (pe(i))
1306
1324
  i._store && (i._store.validated = !0);
@@ -1308,7 +1326,7 @@ Check the top-level render call using <` + g + ">.");
1308
1326
  var k = se(i);
1309
1327
  if (typeof k == "function" && k !== i.entries)
1310
1328
  for (var F = k.call(i), P; !(P = F.next()).done; )
1311
- pe(P.value) && Gt(P.value, h);
1329
+ pe(P.value) && Vt(P.value, h);
1312
1330
  }
1313
1331
  }
1314
1332
  }
@@ -1349,16 +1367,16 @@ Check the top-level render call using <` + g + ">.");
1349
1367
  i.ref !== null && (ye(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
1350
1368
  }
1351
1369
  }
1352
- function Ht(i, h, g, w, k, F) {
1370
+ function zt(i, h, g, w, k, F) {
1353
1371
  {
1354
1372
  var P = O(i);
1355
1373
  if (!P) {
1356
1374
  var T = "";
1357
1375
  (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1358
- var ce = De(k);
1376
+ var ce = Ae(k);
1359
1377
  ce ? T += ce : T += He();
1360
1378
  var W;
1361
- i === null ? W = "null" : tt(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (U(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, T);
1379
+ i === null ? W = "null" : nt(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (U(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, T);
1362
1380
  }
1363
1381
  var Z = ue(i, h, g, k, F);
1364
1382
  if (Z == null)
@@ -1367,30 +1385,30 @@ Check the top-level render call using <` + g + ">.");
1367
1385
  var ge = h.children;
1368
1386
  if (ge !== void 0)
1369
1387
  if (w)
1370
- if (tt(ge)) {
1388
+ if (nt(ge)) {
1371
1389
  for (var Ye = 0; Ye < ge.length; Ye++)
1372
- Vt(ge[Ye], i);
1390
+ Ht(ge[Ye], i);
1373
1391
  Object.freeze && Object.freeze(ge);
1374
1392
  } else
1375
1393
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1376
1394
  else
1377
- Vt(ge, i);
1395
+ Ht(ge, i);
1378
1396
  }
1379
1397
  return i === e ? Tn(Z) : On(Z), Z;
1380
1398
  }
1381
1399
  }
1382
1400
  function Mn(i, h, g) {
1383
- return Ht(i, h, g, !0);
1401
+ return zt(i, h, g, !0);
1384
1402
  }
1385
1403
  function Rn(i, h, g) {
1386
- return Ht(i, h, g, !1);
1404
+ return zt(i, h, g, !1);
1387
1405
  }
1388
1406
  var Pn = Rn, _n = Mn;
1389
- rt.Fragment = e, rt.jsx = Pn, rt.jsxs = _n;
1390
- }()), rt;
1407
+ ot.Fragment = e, ot.jsx = Pn, ot.jsxs = _n;
1408
+ }()), ot;
1391
1409
  }
1392
- process.env.NODE_ENV === "production" ? Ut.exports = Ea() : Ut.exports = wa();
1393
- var c = Ut.exports;
1410
+ process.env.NODE_ENV === "production" ? Bt.exports = Ea() : Bt.exports = wa();
1411
+ var c = Bt.exports;
1394
1412
  function wn(t) {
1395
1413
  return t.title.search("<") > -1 ? /* @__PURE__ */ c.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ c.jsx("button", { children: t.title });
1396
1414
  }
@@ -1615,7 +1633,7 @@ class _a extends un {
1615
1633
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
1616
1634
  },
1617
1635
  uColor: {
1618
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Bt(16777215)
1636
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new $t(16777215)
1619
1637
  },
1620
1638
  uDistance: {
1621
1639
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -1675,7 +1693,7 @@ void main() {
1675
1693
  #include <logdepthbuf_vertex>
1676
1694
  #include <clipping_planes_vertex>
1677
1695
  #include <worldpos_vertex>
1678
- }`, Da = `
1696
+ }`, Aa = `
1679
1697
  #include <common>
1680
1698
  #include <uv_pars_fragment>
1681
1699
  #include <clipping_planes_pars_fragment>
@@ -1684,18 +1702,18 @@ void main() {
1684
1702
  #include <clipping_planes_fragment>
1685
1703
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1686
1704
  }`;
1687
- class Aa extends un {
1705
+ class Da extends un {
1688
1706
  constructor() {
1689
1707
  super({
1690
1708
  defines: {
1691
1709
  USE_UV: ""
1692
1710
  },
1693
1711
  vertexShader: ka,
1694
- fragmentShader: Da
1712
+ fragmentShader: Aa
1695
1713
  });
1696
1714
  }
1697
1715
  }
1698
- function $t(t) {
1716
+ function Gt(t) {
1699
1717
  const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1700
1718
  return /* @__PURE__ */ c.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1701
1719
  /* @__PURE__ */ c.jsxs(
@@ -1775,7 +1793,7 @@ function Be(t) {
1775
1793
  /* @__PURE__ */ c.jsx(Be, { title: a.title, items: a.items }, Math.random())
1776
1794
  ) : n.push(
1777
1795
  /* @__PURE__ */ c.jsx(
1778
- ot,
1796
+ st,
1779
1797
  {
1780
1798
  title: a.title,
1781
1799
  prop: a.prop,
@@ -1792,12 +1810,12 @@ function Be(t) {
1792
1810
  Math.random()
1793
1811
  )
1794
1812
  );
1795
- }), /* @__PURE__ */ c.jsx($t, { label: t.title, open: t.expanded === !0, children: n });
1813
+ }), /* @__PURE__ */ c.jsx(Gt, { label: t.title, open: t.expanded === !0, children: n });
1796
1814
  }
1797
1815
  function Fa(t) {
1798
1816
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1799
1817
  }
1800
- function Ae(t) {
1818
+ function De(t) {
1801
1819
  switch (t) {
1802
1820
  case "alphaMap":
1803
1821
  return "Alpha Map";
@@ -1972,7 +1990,7 @@ function Jt(t, n, a) {
1972
1990
  const s = typeof t[r], u = t[r];
1973
1991
  if (s === "boolean" || s === "number" || s === "string") {
1974
1992
  const l = {
1975
- title: Ae(r),
1993
+ title: De(r),
1976
1994
  prop: r,
1977
1995
  type: s,
1978
1996
  value: u,
@@ -1989,13 +2007,13 @@ function Jt(t, n, a) {
1989
2007
  } else if (s === "object")
1990
2008
  if (u.isColor)
1991
2009
  e.push({
1992
- title: Ae(r),
2010
+ title: De(r),
1993
2011
  prop: r,
1994
2012
  type: "color",
1995
2013
  value: u,
1996
2014
  onChange: (l, d) => {
1997
2015
  var E;
1998
- const p = new Bt(d);
2016
+ const p = new $t(d);
1999
2017
  a.updateObject(n.uuid, `material.${l}`, p);
2000
2018
  const v = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
2001
2019
  v !== void 0 && Q(v, `material.${l}`, p);
@@ -2016,7 +2034,7 @@ function Jt(t, n, a) {
2016
2034
  }
2017
2035
  });
2018
2036
  e.push({
2019
- title: Ae(r),
2037
+ title: De(r),
2020
2038
  items: l
2021
2039
  });
2022
2040
  } else {
@@ -2028,19 +2046,19 @@ function Jt(t, n, a) {
2028
2046
  case "number":
2029
2047
  case "string":
2030
2048
  d === "src" ? e.push({
2031
- title: Ae(r),
2049
+ title: De(r),
2032
2050
  type: "image",
2033
2051
  value: p,
2034
2052
  onChange: (E, x) => {
2035
2053
  var M;
2036
2054
  a.createTexture(n.uuid, `material.${r}`, x);
2037
2055
  const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2038
- C !== void 0 && Ft(x).then((V) => {
2056
+ C !== void 0 && Ut(x).then((V) => {
2039
2057
  Q(C, `material.${r}`, V), Q(C, "material.needsUpdate", !0);
2040
2058
  });
2041
2059
  }
2042
2060
  }) : l.push({
2043
- title: `${Ae(d)}`,
2061
+ title: `${De(d)}`,
2044
2062
  prop: `material.${r}.${d}`,
2045
2063
  type: `${typeof t[r][d]}`,
2046
2064
  value: u[d],
@@ -2054,14 +2072,14 @@ function Jt(t, n, a) {
2054
2072
  break;
2055
2073
  case "object":
2056
2074
  p.value !== void 0 && p.value.src !== void 0 ? l.push({
2057
- title: Ae(d),
2075
+ title: De(d),
2058
2076
  type: "image",
2059
2077
  value: p.value.src,
2060
2078
  onChange: (E, x) => {
2061
2079
  var M;
2062
2080
  a.createTexture(n.uuid, `material.${r}.${d}.value`, x);
2063
2081
  const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
2064
- C !== void 0 && Ft(x).then((V) => {
2082
+ C !== void 0 && Ut(x).then((V) => {
2065
2083
  Q(C, `material.${r}.${d}.value`, V);
2066
2084
  });
2067
2085
  }
@@ -2080,7 +2098,7 @@ function Jt(t, n, a) {
2080
2098
  }
2081
2099
  }
2082
2100
  l.length > 0 && e.push({
2083
- title: Ae(r),
2101
+ title: De(r),
2084
2102
  items: l
2085
2103
  });
2086
2104
  }
@@ -2120,7 +2138,7 @@ function $a(t, n) {
2120
2138
  }
2121
2139
  );
2122
2140
  }
2123
- function ot(t) {
2141
+ function st(t) {
2124
2142
  let n = t.value;
2125
2143
  n !== void 0 && n.isColor !== void 0 && (n = ra(t.value));
2126
2144
  const [a, e] = oe(n), r = Ce(null), s = Ce(null), u = Ce(null);
@@ -2296,13 +2314,13 @@ function Ga(t, n) {
2296
2314
  );
2297
2315
  }
2298
2316
  const Va = Math.PI / 180, Ha = 180 / Math.PI;
2299
- function Xe(t, n, a, e, r) {
2317
+ function qe(t, n, a, e, r) {
2300
2318
  return e + (t - n) * (r - e) / (a - n);
2301
2319
  }
2302
2320
  function za(t) {
2303
2321
  return t * Va;
2304
2322
  }
2305
- function At(t) {
2323
+ function It(t) {
2306
2324
  return t * Ha;
2307
2325
  }
2308
2326
  function Ya(t, n) {
@@ -2348,7 +2366,7 @@ function Ya(t, n) {
2348
2366
  title: "Rotation X",
2349
2367
  prop: "rotation.x",
2350
2368
  type: "number",
2351
- value: kt(At(r.x)),
2369
+ value: At(It(r.x)),
2352
2370
  min: -360,
2353
2371
  max: 360,
2354
2372
  step: 0.1,
@@ -2358,7 +2376,7 @@ function Ya(t, n) {
2358
2376
  title: "Rotation Y",
2359
2377
  prop: "rotation.y",
2360
2378
  type: "number",
2361
- value: kt(At(r.y)),
2379
+ value: At(It(r.y)),
2362
2380
  min: -360,
2363
2381
  max: 360,
2364
2382
  step: 0.1,
@@ -2368,7 +2386,7 @@ function Ya(t, n) {
2368
2386
  title: "Rotation Z",
2369
2387
  prop: "rotation.z",
2370
2388
  type: "number",
2371
- value: kt(At(r.z)),
2389
+ value: At(It(r.z)),
2372
2390
  min: -360,
2373
2391
  max: 360,
2374
2392
  step: 0.1,
@@ -2433,7 +2451,7 @@ function Wa(t, n) {
2433
2451
  value: r,
2434
2452
  onChange: (s, u) => {
2435
2453
  var p;
2436
- const l = new Bt(u);
2454
+ const l = new $t(u);
2437
2455
  n.updateObject(t.uuid, s, l);
2438
2456
  const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
2439
2457
  d !== void 0 && Q(d, s, l);
@@ -2529,10 +2547,10 @@ function Xa(t) {
2529
2547
  };
2530
2548
  }, []);
2531
2549
  const e = ae.type.toLowerCase();
2532
- return /* @__PURE__ */ c.jsx($t, { label: "Inspector", children: /* @__PURE__ */ c.jsx("div", { id: "Inspector", className: t.class, children: ae.uuid.length > 0 && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2550
+ return /* @__PURE__ */ c.jsx(Gt, { label: "Inspector", children: /* @__PURE__ */ c.jsx("div", { id: "Inspector", className: t.class, children: ae.uuid.length > 0 && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2533
2551
  /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2534
2552
  /* @__PURE__ */ c.jsx(
2535
- ot,
2553
+ st,
2536
2554
  {
2537
2555
  type: "string",
2538
2556
  title: "Name",
@@ -2542,7 +2560,7 @@ function Xa(t) {
2542
2560
  }
2543
2561
  ),
2544
2562
  /* @__PURE__ */ c.jsx(
2545
- ot,
2563
+ st,
2546
2564
  {
2547
2565
  type: "string",
2548
2566
  title: "Type",
@@ -2552,7 +2570,7 @@ function Xa(t) {
2552
2570
  }
2553
2571
  ),
2554
2572
  /* @__PURE__ */ c.jsx(
2555
- ot,
2573
+ st,
2556
2574
  {
2557
2575
  type: "string",
2558
2576
  title: "UUID",
@@ -2562,7 +2580,7 @@ function Xa(t) {
2562
2580
  }
2563
2581
  ),
2564
2582
  /* @__PURE__ */ c.jsx(
2565
- ot,
2583
+ st,
2566
2584
  {
2567
2585
  type: "boolean",
2568
2586
  title: "Visible",
@@ -2607,7 +2625,7 @@ class mi extends ta {
2607
2625
  var r;
2608
2626
  const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
2609
2627
  return /* @__PURE__ */ c.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
2610
- /* @__PURE__ */ c.jsx($t, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(Ia, { child: this.componentState.scene, three: this.three }) }) }),
2628
+ /* @__PURE__ */ c.jsx(Gt, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(Ia, { child: this.componentState.scene, three: this.three }) }) }),
2611
2629
  /* @__PURE__ */ c.jsx(Xa, { three: this.three })
2612
2630
  ] }) }, "SidePanel");
2613
2631
  }
@@ -2641,7 +2659,7 @@ function gi(t) {
2641
2659
  if (!n())
2642
2660
  return;
2643
2661
  const d = l.value;
2644
- Ft(d.value).then((p) => {
2662
+ Ut(d.value).then((p) => {
2645
2663
  e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
2646
2664
  });
2647
2665
  }, u = (l) => {
@@ -2660,7 +2678,7 @@ function gi(t) {
2660
2678
  _.removeEventListener(j.GET_OBJECT, a), _.removeEventListener(j.UPDATE_OBJECT, r), _.removeEventListener(j.CREATE_TEXTURE, s), _.removeEventListener(j.REQUEST_METHOD, u);
2661
2679
  }), []), null;
2662
2680
  }
2663
- const tn = { type: "change" }, It = { type: "start" }, nn = { type: "end" }, wt = new $n(), an = new Gn(), qa = Math.cos(70 * Vn.DEG2RAD);
2681
+ const tn = { type: "change" }, Lt = { type: "start" }, nn = { type: "end" }, xt = new $n(), an = new Gn(), qa = Math.cos(70 * Vn.DEG2RAD);
2664
2682
  class Za extends cn {
2665
2683
  constructor(n, a) {
2666
2684
  super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: We.ROTATE, MIDDLE: We.DOLLY, RIGHT: We.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
@@ -2670,42 +2688,42 @@ class Za extends cn {
2670
2688
  }, this.getDistance = function() {
2671
2689
  return this.object.position.distanceTo(this.target);
2672
2690
  }, this.listenToKeyEvents = function(o) {
2673
- o.addEventListener("keydown", nt), this._domElementKeyEvents = o;
2691
+ o.addEventListener("keydown", at), this._domElementKeyEvents = o;
2674
2692
  }, this.stopListenToKeyEvents = function() {
2675
- this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
2693
+ this._domElementKeyEvents.removeEventListener("keydown", at), this._domElementKeyEvents = null;
2676
2694
  }, this.saveState = function() {
2677
2695
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2678
2696
  }, this.reset = function() {
2679
2697
  e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), s = r.NONE;
2680
2698
  }, this.update = function() {
2681
- const o = new Y(), y = new Wt().setFromUnitVectors(n.up, new Y(0, 1, 0)), D = y.clone().invert(), N = new Y(), te = new Wt(), be = new Y(), ue = 2 * Math.PI;
2682
- return function(Et = null) {
2699
+ const o = new Y(), y = new Kt().setFromUnitVectors(n.up, new Y(0, 1, 0)), A = y.clone().invert(), N = new Y(), te = new Kt(), be = new Y(), ue = 2 * Math.PI;
2700
+ return function(wt = null) {
2683
2701
  const ye = e.object.position;
2684
- o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && $(b(Et)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
2702
+ o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && $(b(wt)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
2685
2703
  let he = e.minAzimuthAngle, pe = e.maxAzimuthAngle;
2686
- isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius = q(l.radius) : l.radius = q(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(D), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2704
+ isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius = q(l.radius) : l.radius = q(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(A), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2687
2705
  let He = !1;
2688
2706
  if (e.zoomToCursor && ee) {
2689
- let De = null;
2707
+ let Ae = null;
2690
2708
  if (e.object.isPerspectiveCamera) {
2691
2709
  const Te = o.length();
2692
- De = q(Te * p);
2693
- const ze = Te - De;
2710
+ Ae = q(Te * p);
2711
+ const ze = Te - Ae;
2694
2712
  e.object.position.addScaledVector(fe, ze), e.object.updateMatrixWorld();
2695
2713
  } else if (e.object.isOrthographicCamera) {
2696
2714
  const Te = new Y(le.x, le.y, 0);
2697
2715
  Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), He = !0;
2698
2716
  const ze = new Y(le.x, le.y, 0);
2699
- ze.unproject(e.object), e.object.position.sub(ze).add(Te), e.object.updateMatrixWorld(), De = o.length();
2717
+ ze.unproject(e.object), e.object.position.sub(ze).add(Te), e.object.updateMatrixWorld(), Ae = o.length();
2700
2718
  } else
2701
2719
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2702
- De !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(De).add(e.object.position) : (wt.origin.copy(e.object.position), wt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(wt.direction)) < qa ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), wt.intersectPlane(an, e.target))));
2720
+ Ae !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Ae).add(e.object.position) : (xt.origin.copy(e.object.position), xt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(xt.direction)) < qa ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), xt.intersectPlane(an, e.target))));
2703
2721
  } else
2704
2722
  e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), He = !0);
2705
2723
  return p = 1, ee = !1, He || N.distanceToSquared(e.object.position) > u || 8 * (1 - te.dot(e.object.quaternion)) > u || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), N.copy(e.object.position), te.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
2706
2724
  };
2707
2725
  }(), this.dispose = function() {
2708
- e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", et), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", mt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
2726
+ e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", tt), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", gt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
2709
2727
  };
2710
2728
  const e = this, r = {
2711
2729
  NONE: -1,
@@ -2718,7 +2736,7 @@ class Za extends cn {
2718
2736
  TOUCH_DOLLY_ROTATE: 6
2719
2737
  };
2720
2738
  let s = r.NONE;
2721
- const u = 1e-6, l = new Kt(), d = new Kt();
2739
+ const u = 1e-6, l = new Xt(), d = new Xt();
2722
2740
  let p = 1;
2723
2741
  const v = new Y(), E = new de(), x = new de(), C = new de(), M = new de(), V = new de(), se = new de(), K = new de(), S = new de(), X = new de(), fe = new Y(), le = new de();
2724
2742
  let ee = !1;
@@ -2738,25 +2756,25 @@ class Za extends cn {
2738
2756
  }
2739
2757
  const U = function() {
2740
2758
  const o = new Y();
2741
- return function(D, N) {
2742
- o.setFromMatrixColumn(N, 0), o.multiplyScalar(-D), v.add(o);
2759
+ return function(A, N) {
2760
+ o.setFromMatrixColumn(N, 0), o.multiplyScalar(-A), v.add(o);
2743
2761
  };
2744
- }(), A = function() {
2762
+ }(), D = function() {
2745
2763
  const o = new Y();
2746
- return function(D, N) {
2747
- e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(D), v.add(o);
2764
+ return function(A, N) {
2765
+ e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(A), v.add(o);
2748
2766
  };
2749
2767
  }(), B = function() {
2750
2768
  const o = new Y();
2751
- return function(D, N) {
2769
+ return function(A, N) {
2752
2770
  const te = e.domElement;
2753
2771
  if (e.object.isPerspectiveCamera) {
2754
2772
  const be = e.object.position;
2755
2773
  o.copy(be).sub(e.target);
2756
2774
  let ue = o.length();
2757
- ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), U(2 * D * ue / te.clientHeight, e.object.matrix), A(2 * N * ue / te.clientHeight, e.object.matrix);
2775
+ ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), U(2 * A * ue / te.clientHeight, e.object.matrix), D(2 * N * ue / te.clientHeight, e.object.matrix);
2758
2776
  } else
2759
- e.object.isOrthographicCamera ? (U(D * (e.object.right - e.object.left) / e.object.zoom / te.clientWidth, e.object.matrix), A(N * (e.object.top - e.object.bottom) / e.object.zoom / te.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2777
+ e.object.isOrthographicCamera ? (U(A * (e.object.right - e.object.left) / e.object.zoom / te.clientWidth, e.object.matrix), D(N * (e.object.top - e.object.bottom) / e.object.zoom / te.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2760
2778
  };
2761
2779
  }();
2762
2780
  function J(o) {
@@ -2769,7 +2787,7 @@ class Za extends cn {
2769
2787
  if (!e.zoomToCursor)
2770
2788
  return;
2771
2789
  ee = !0;
2772
- const D = e.domElement.getBoundingClientRect(), N = o - D.left, te = y - D.top, be = D.width, ue = D.height;
2790
+ const A = e.domElement.getBoundingClientRect(), N = o - A.left, te = y - A.top, be = A.width, ue = A.height;
2773
2791
  le.x = N / be * 2 - 1, le.y = -(te / ue) * 2 + 1, fe.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
2774
2792
  }
2775
2793
  function q(o) {
@@ -2781,24 +2799,24 @@ class Za extends cn {
2781
2799
  function Re(o) {
2782
2800
  I(o.clientX, o.clientX), K.set(o.clientX, o.clientY);
2783
2801
  }
2784
- function Ze(o) {
2802
+ function Je(o) {
2785
2803
  M.set(o.clientX, o.clientY);
2786
2804
  }
2787
- function ut(o) {
2805
+ function dt(o) {
2788
2806
  x.set(o.clientX, o.clientY), C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
2789
2807
  const y = e.domElement;
2790
2808
  $(2 * Math.PI * C.x / y.clientHeight), G(2 * Math.PI * C.y / y.clientHeight), E.copy(x), e.update();
2791
2809
  }
2792
- function Mt(o) {
2810
+ function Rt(o) {
2793
2811
  S.set(o.clientX, o.clientY), X.subVectors(S, K), X.y > 0 ? J(O(X.y)) : X.y < 0 && R(O(X.y)), K.copy(S), e.update();
2794
2812
  }
2795
- function Rt(o) {
2813
+ function Pt(o) {
2796
2814
  V.set(o.clientX, o.clientY), se.subVectors(V, M).multiplyScalar(e.panSpeed), B(se.x, se.y), M.copy(V), e.update();
2797
2815
  }
2798
- function Je(o) {
2816
+ function Qe(o) {
2799
2817
  I(o.clientX, o.clientY), o.deltaY < 0 ? R(O(o.deltaY)) : o.deltaY > 0 && J(O(o.deltaY)), e.update();
2800
2818
  }
2801
- function Qe(o) {
2819
+ function et(o) {
2802
2820
  let y = !1;
2803
2821
  switch (o.code) {
2804
2822
  case e.keys.UP:
@@ -2820,70 +2838,70 @@ class Za extends cn {
2820
2838
  if (f.length === 1)
2821
2839
  E.set(o.pageX, o.pageY);
2822
2840
  else {
2823
- const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2824
- E.set(D, N);
2841
+ const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2842
+ E.set(A, N);
2825
2843
  }
2826
2844
  }
2827
2845
  function Ge(o) {
2828
2846
  if (f.length === 1)
2829
2847
  M.set(o.pageX, o.pageY);
2830
2848
  else {
2831
- const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2832
- M.set(D, N);
2849
+ const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2850
+ M.set(A, N);
2833
2851
  }
2834
2852
  }
2835
2853
  function _e(o) {
2836
- const y = ve(o), D = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(D * D + N * N);
2854
+ const y = ve(o), A = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(A * A + N * N);
2837
2855
  K.set(0, te);
2838
2856
  }
2839
- function Pt(o) {
2857
+ function _t(o) {
2840
2858
  e.enableZoom && _e(o), e.enablePan && Ge(o);
2841
2859
  }
2842
- function dt(o) {
2860
+ function ft(o) {
2843
2861
  e.enableZoom && _e(o), e.enableRotate && Pe(o);
2844
2862
  }
2845
- function ft(o) {
2863
+ function ht(o) {
2846
2864
  if (f.length == 1)
2847
2865
  x.set(o.pageX, o.pageY);
2848
2866
  else {
2849
- const D = ve(o), N = 0.5 * (o.pageX + D.x), te = 0.5 * (o.pageY + D.y);
2867
+ const A = ve(o), N = 0.5 * (o.pageX + A.x), te = 0.5 * (o.pageY + A.y);
2850
2868
  x.set(N, te);
2851
2869
  }
2852
2870
  C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
2853
2871
  const y = e.domElement;
2854
2872
  $(2 * Math.PI * C.x / y.clientHeight), G(2 * Math.PI * C.y / y.clientHeight), E.copy(x);
2855
2873
  }
2856
- function ht(o) {
2874
+ function pt(o) {
2857
2875
  if (f.length === 1)
2858
2876
  V.set(o.pageX, o.pageY);
2859
2877
  else {
2860
- const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2861
- V.set(D, N);
2878
+ const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
2879
+ V.set(A, N);
2862
2880
  }
2863
2881
  se.subVectors(V, M).multiplyScalar(e.panSpeed), B(se.x, se.y), M.copy(V);
2864
2882
  }
2865
2883
  function je(o) {
2866
- const y = ve(o), D = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(D * D + N * N);
2884
+ const y = ve(o), A = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(A * A + N * N);
2867
2885
  S.set(0, te), X.set(0, Math.pow(S.y / K.y, e.zoomSpeed)), J(X.y), K.copy(S);
2868
2886
  const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
2869
2887
  I(be, ue);
2870
2888
  }
2871
2889
  function Ve(o) {
2872
- e.enableZoom && je(o), e.enablePan && ht(o);
2890
+ e.enableZoom && je(o), e.enablePan && pt(o);
2873
2891
  }
2874
- function pt(o) {
2875
- e.enableZoom && je(o), e.enableRotate && ft(o);
2892
+ function mt(o) {
2893
+ e.enableZoom && je(o), e.enableRotate && ht(o);
2876
2894
  }
2877
- function et(o) {
2878
- e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)), jt(o), o.pointerType === "touch" ? gt(o) : _t(o));
2895
+ function tt(o) {
2896
+ e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)), kt(o), o.pointerType === "touch" ? vt(o) : jt(o));
2879
2897
  }
2880
2898
  function Se(o) {
2881
- e.enabled !== !1 && (o.pointerType === "touch" ? vt(o) : tt(o));
2899
+ e.enabled !== !1 && (o.pointerType === "touch" ? bt(o) : nt(o));
2882
2900
  }
2883
2901
  function ke(o) {
2884
- bt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke)), e.dispatchEvent(nn), s = r.NONE;
2902
+ yt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke)), e.dispatchEvent(nn), s = r.NONE;
2885
2903
  }
2886
- function _t(o) {
2904
+ function jt(o) {
2887
2905
  let y;
2888
2906
  switch (o.button) {
2889
2907
  case 0:
@@ -2908,7 +2926,7 @@ class Za extends cn {
2908
2926
  if (o.ctrlKey || o.metaKey || o.shiftKey) {
2909
2927
  if (e.enablePan === !1)
2910
2928
  return;
2911
- Ze(o), s = r.PAN;
2929
+ Je(o), s = r.PAN;
2912
2930
  } else {
2913
2931
  if (e.enableRotate === !1)
2914
2932
  return;
@@ -2923,41 +2941,41 @@ class Za extends cn {
2923
2941
  } else {
2924
2942
  if (e.enablePan === !1)
2925
2943
  return;
2926
- Ze(o), s = r.PAN;
2944
+ Je(o), s = r.PAN;
2927
2945
  }
2928
2946
  break;
2929
2947
  default:
2930
2948
  s = r.NONE;
2931
2949
  }
2932
- s !== r.NONE && e.dispatchEvent(It);
2950
+ s !== r.NONE && e.dispatchEvent(Lt);
2933
2951
  }
2934
- function tt(o) {
2952
+ function nt(o) {
2935
2953
  switch (s) {
2936
2954
  case r.ROTATE:
2937
2955
  if (e.enableRotate === !1)
2938
2956
  return;
2939
- ut(o);
2957
+ dt(o);
2940
2958
  break;
2941
2959
  case r.DOLLY:
2942
2960
  if (e.enableZoom === !1)
2943
2961
  return;
2944
- Mt(o);
2962
+ Rt(o);
2945
2963
  break;
2946
2964
  case r.PAN:
2947
2965
  if (e.enablePan === !1)
2948
2966
  return;
2949
- Rt(o);
2967
+ Pt(o);
2950
2968
  break;
2951
2969
  }
2952
2970
  }
2953
- function mt(o) {
2954
- e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(It), Je(o), e.dispatchEvent(nn));
2971
+ function gt(o) {
2972
+ e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(Lt), Qe(o), e.dispatchEvent(nn));
2955
2973
  }
2956
- function nt(o) {
2957
- e.enabled === !1 || e.enablePan === !1 || Qe(o);
2974
+ function at(o) {
2975
+ e.enabled === !1 || e.enablePan === !1 || et(o);
2958
2976
  }
2959
- function gt(o) {
2960
- switch (at(o), f.length) {
2977
+ function vt(o) {
2978
+ switch (it(o), f.length) {
2961
2979
  case 1:
2962
2980
  switch (e.touches.ONE) {
2963
2981
  case Ke.ROTATE:
@@ -2979,12 +2997,12 @@ class Za extends cn {
2979
2997
  case Ke.DOLLY_PAN:
2980
2998
  if (e.enableZoom === !1 && e.enablePan === !1)
2981
2999
  return;
2982
- Pt(o), s = r.TOUCH_DOLLY_PAN;
3000
+ _t(o), s = r.TOUCH_DOLLY_PAN;
2983
3001
  break;
2984
3002
  case Ke.DOLLY_ROTATE:
2985
3003
  if (e.enableZoom === !1 && e.enableRotate === !1)
2986
3004
  return;
2987
- dt(o), s = r.TOUCH_DOLLY_ROTATE;
3005
+ ft(o), s = r.TOUCH_DOLLY_ROTATE;
2988
3006
  break;
2989
3007
  default:
2990
3008
  s = r.NONE;
@@ -2993,19 +3011,19 @@ class Za extends cn {
2993
3011
  default:
2994
3012
  s = r.NONE;
2995
3013
  }
2996
- s !== r.NONE && e.dispatchEvent(It);
3014
+ s !== r.NONE && e.dispatchEvent(Lt);
2997
3015
  }
2998
- function vt(o) {
2999
- switch (at(o), s) {
3016
+ function bt(o) {
3017
+ switch (it(o), s) {
3000
3018
  case r.TOUCH_ROTATE:
3001
3019
  if (e.enableRotate === !1)
3002
3020
  return;
3003
- ft(o), e.update();
3021
+ ht(o), e.update();
3004
3022
  break;
3005
3023
  case r.TOUCH_PAN:
3006
3024
  if (e.enablePan === !1)
3007
3025
  return;
3008
- ht(o), e.update();
3026
+ pt(o), e.update();
3009
3027
  break;
3010
3028
  case r.TOUCH_DOLLY_PAN:
3011
3029
  if (e.enableZoom === !1 && e.enablePan === !1)
@@ -3015,7 +3033,7 @@ class Za extends cn {
3015
3033
  case r.TOUCH_DOLLY_ROTATE:
3016
3034
  if (e.enableZoom === !1 && e.enableRotate === !1)
3017
3035
  return;
3018
- pt(o), e.update();
3036
+ mt(o), e.update();
3019
3037
  break;
3020
3038
  default:
3021
3039
  s = r.NONE;
@@ -3024,10 +3042,10 @@ class Za extends cn {
3024
3042
  function Oe(o) {
3025
3043
  e.enabled !== !1 && o.preventDefault();
3026
3044
  }
3027
- function jt(o) {
3045
+ function kt(o) {
3028
3046
  f.push(o.pointerId);
3029
3047
  }
3030
- function bt(o) {
3048
+ function yt(o) {
3031
3049
  delete m[o.pointerId];
3032
3050
  for (let y = 0; y < f.length; y++)
3033
3051
  if (f[y] == o.pointerId) {
@@ -3035,7 +3053,7 @@ class Za extends cn {
3035
3053
  return;
3036
3054
  }
3037
3055
  }
3038
- function at(o) {
3056
+ function it(o) {
3039
3057
  let y = m[o.pointerId];
3040
3058
  y === void 0 && (y = new de(), m[o.pointerId] = y), y.set(o.pageX, o.pageY);
3041
3059
  }
@@ -3043,10 +3061,10 @@ class Za extends cn {
3043
3061
  const y = o.pointerId === f[0] ? f[1] : f[0];
3044
3062
  return m[y];
3045
3063
  }
3046
- e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown", et), e.domElement.addEventListener("pointercancel", ke), e.domElement.addEventListener("wheel", mt, { passive: !1 }), this.update();
3064
+ e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown", tt), e.domElement.addEventListener("pointercancel", ke), e.domElement.addEventListener("wheel", gt, { passive: !1 }), this.update();
3047
3065
  }
3048
3066
  }
3049
- const St = (t) => {
3067
+ const Ot = (t) => {
3050
3068
  const [n, a] = oe(t.options[t.index]), e = () => {
3051
3069
  t.onToggle(!t.open);
3052
3070
  }, r = (s) => {
@@ -3063,7 +3081,7 @@ const St = (t) => {
3063
3081
  e && r(!1);
3064
3082
  } }),
3065
3083
  /* @__PURE__ */ c.jsx(
3066
- St,
3084
+ Ot,
3067
3085
  {
3068
3086
  index: s,
3069
3087
  open: e,
@@ -3093,40 +3111,40 @@ $e("Right", new Y(1e3, 0, 0));
3093
3111
  $e("Front", new Y(0, 0, 1e3));
3094
3112
  $e("Back", new Y(0, 0, -1e3));
3095
3113
  $e("Orthographic", new Y(1e3, 1e3, 1e3));
3096
- const Tt = new Lt(60, 1, 50, 3e3);
3097
- Tt.name = "Debug";
3098
- Tt.position.set(500, 500, 500);
3099
- Tt.lookAt(0, 0, 0);
3100
- ne.set("Debug", Tt);
3114
+ const Mt = new Nt(60, 1, 50, 3e3);
3115
+ Mt.name = "Debug";
3116
+ Mt.position.set(500, 500, 500);
3117
+ Mt.lookAt(0, 0, 0);
3118
+ ne.set("Debug", Mt);
3101
3119
  const on = [
3102
3120
  "Renderer",
3103
3121
  "Depth",
3104
3122
  "Normals",
3105
3123
  "UVs",
3106
3124
  "Wireframe"
3107
- ], Ja = new Hn(), Qa = new zn(), ei = new Aa(), ti = new Yn({
3125
+ ], Ja = new Hn(), Qa = new zn(), ei = new Da(), ti = new Yn({
3108
3126
  opacity: 0.33,
3109
3127
  transparent: !0,
3110
3128
  wireframe: !0
3111
3129
  });
3112
- let xt = "Renderer";
3130
+ let Ct = "Renderer";
3113
3131
  const z = new fn();
3114
3132
  z.name = "Debug Scene";
3115
3133
  let xe = new fn();
3116
3134
  z.add(xe);
3117
- const lt = new Wn();
3118
- lt.name = "helpers";
3119
- z.add(lt);
3135
+ const ut = new Wn();
3136
+ ut.name = "helpers";
3137
+ z.add(ut);
3120
3138
  const ni = new ja();
3121
- lt.add(ni);
3139
+ ut.add(ni);
3122
3140
  const Sn = new hn(500);
3123
3141
  Sn.name = "axisHelper";
3124
- lt.add(Sn);
3125
- const ct = new hn(100);
3126
- ct.name = "interactionHelper";
3127
- lt.add(ct);
3128
- ct.visible = !1;
3129
- let Ct = !1, H = ne.get("Debug"), re = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), sn = !1;
3142
+ ut.add(Sn);
3143
+ const lt = new hn(100);
3144
+ lt.name = "interactionHelper";
3145
+ ut.add(lt);
3146
+ lt.visible = !1;
3147
+ let St = !1, H = ne.get("Debug"), re = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), sn = !1;
3130
3148
  function vi(t) {
3131
3149
  const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, u] = oe(!1), [l, d] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), V = Ce(null), se = Ce(null), K = Ce(null), S = (f, m) => {
3132
3150
  const b = ie.get(f.name);
@@ -3144,7 +3162,7 @@ function vi(t) {
3144
3162
  $.enableRotate = !1;
3145
3163
  break;
3146
3164
  }
3147
- if (ie.set(f.name, $), f instanceof Lt) {
3165
+ if (ie.set(f.name, $), f instanceof Nt) {
3148
3166
  const G = new qn(f);
3149
3167
  we.set(f.name, G), z.add(G);
3150
3168
  }
@@ -3217,11 +3235,11 @@ function vi(t) {
3217
3235
  }
3218
3236
  ne.forEach((q) => {
3219
3237
  var me;
3220
- q instanceof dn ? (q.left = R / -2, q.right = R / 2, q.top = I / 2, q.bottom = I / -2, q.updateProjectionMatrix()) : q instanceof Lt && (q.aspect = R / I, q.updateProjectionMatrix(), (me = we.get(q.name)) == null || me.update());
3238
+ q instanceof dn ? (q.left = R / -2, q.right = R / 2, q.top = I / 2, q.bottom = I / -2, q.updateProjectionMatrix()) : q instanceof Nt && (q.aspect = R / I, q.updateProjectionMatrix(), (me = we.get(q.name)) == null || me.update());
3221
3239
  });
3222
3240
  }, U = () => {
3223
3241
  e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(z, H);
3224
- }, A = () => {
3242
+ }, D = () => {
3225
3243
  if (n === "Side by Side")
3226
3244
  e.setViewport(0, 0, b, m), e.setScissor(0, 0, b, m), e.render(z, H), e.setViewport(b, 0, b, m), e.setScissor(b, 0, b, m), e.render(z, re);
3227
3245
  else {
@@ -3240,7 +3258,7 @@ function vi(t) {
3240
3258
  break;
3241
3259
  case "Side by Side":
3242
3260
  case "Stacked":
3243
- A();
3261
+ D();
3244
3262
  break;
3245
3263
  case "Quad":
3246
3264
  B();
@@ -3253,10 +3271,10 @@ function vi(t) {
3253
3271
  };
3254
3272
  }, [n, e]), Fe(() => {
3255
3273
  if (e !== null) {
3256
- const f = new Xn(), m = new de(), b = (U, A, B, J) => {
3274
+ const f = new Xn(), m = new de(), b = (U, D, B, J) => {
3257
3275
  switch (n) {
3258
3276
  case "Quad":
3259
- U < B ? A < J ? f.setFromCamera(m, H) : f.setFromCamera(m, Le) : A < J ? f.setFromCamera(m, re) : f.setFromCamera(m, Ne);
3277
+ U < B ? D < J ? f.setFromCamera(m, H) : f.setFromCamera(m, Le) : D < J ? f.setFromCamera(m, re) : f.setFromCamera(m, Ne);
3260
3278
  break;
3261
3279
  case "Side by Side":
3262
3280
  U < B ? f.setFromCamera(m, H) : f.setFromCamera(m, re);
@@ -3265,20 +3283,20 @@ function vi(t) {
3265
3283
  f.setFromCamera(m, H);
3266
3284
  break;
3267
3285
  case "Stacked":
3268
- A < J ? f.setFromCamera(m, H) : f.setFromCamera(m, re);
3286
+ D < J ? f.setFromCamera(m, H) : f.setFromCamera(m, re);
3269
3287
  break;
3270
3288
  }
3271
3289
  }, O = (U) => {
3272
- if (!Ct)
3290
+ if (!St)
3273
3291
  return;
3274
- const A = new de();
3275
- e.getSize(A);
3276
- const B = Math.min(U.clientX, A.x), J = Math.min(U.clientY, A.y);
3277
- m.x = Xe(B, 0, A.x, -1, 1), m.y = Xe(J, 0, A.y, 1, -1);
3278
- const R = A.x / 2, I = A.y / 2, q = () => {
3279
- B < R ? m.x = Xe(B, 0, R, -1, 1) : m.x = Xe(B, R, A.x, -1, 1);
3292
+ const D = new de();
3293
+ e.getSize(D);
3294
+ const B = Math.min(U.clientX, D.x), J = Math.min(U.clientY, D.y);
3295
+ m.x = qe(B, 0, D.x, -1, 1), m.y = qe(J, 0, D.y, 1, -1);
3296
+ const R = D.x / 2, I = D.y / 2, q = () => {
3297
+ B < R ? m.x = qe(B, 0, R, -1, 1) : m.x = qe(B, R, D.x, -1, 1);
3280
3298
  }, me = () => {
3281
- J < I ? m.y = Xe(J, 0, I, 1, -1) : m.y = Xe(J, I, A.y, 1, -1);
3299
+ J < I ? m.y = qe(J, 0, I, 1, -1) : m.y = qe(J, I, D.y, 1, -1);
3282
3300
  };
3283
3301
  switch (n) {
3284
3302
  case "Quad":
@@ -3293,12 +3311,12 @@ function vi(t) {
3293
3311
  }
3294
3312
  b(B, J, R, I);
3295
3313
  const Re = f.intersectObjects(xe.children);
3296
- Re.length > 0 && ct.position.copy(Re[0].point);
3314
+ Re.length > 0 && lt.position.copy(Re[0].point);
3297
3315
  }, $ = (U) => {
3298
- if (!Ct)
3316
+ if (!St)
3299
3317
  return;
3300
- const A = new de();
3301
- if (e.getSize(A), U.clientX >= A.x)
3318
+ const D = new de();
3319
+ if (e.getSize(D), U.clientX >= D.x)
3302
3320
  return;
3303
3321
  O(U);
3304
3322
  const B = f.intersectObjects(xe.children);
@@ -3364,7 +3382,7 @@ function vi(t) {
3364
3382
  ] }),
3365
3383
  /* @__PURE__ */ c.jsxs("div", { className: "settings", children: [
3366
3384
  /* @__PURE__ */ c.jsx(
3367
- St,
3385
+ Ot,
3368
3386
  {
3369
3387
  index: rn.indexOf(n),
3370
3388
  options: rn,
@@ -3378,13 +3396,13 @@ function vi(t) {
3378
3396
  }
3379
3397
  ),
3380
3398
  /* @__PURE__ */ c.jsx(
3381
- St,
3399
+ Ot,
3382
3400
  {
3383
- index: on.indexOf(xt),
3401
+ index: on.indexOf(Ct),
3384
3402
  options: on,
3385
3403
  onSelect: (f) => {
3386
- if (f !== xt)
3387
- switch (xt = f, xt) {
3404
+ if (f !== Ct)
3405
+ switch (Ct = f, Ct) {
3388
3406
  case "Depth":
3389
3407
  z.overrideMaterial = Ja;
3390
3408
  break;
@@ -3410,7 +3428,7 @@ function vi(t) {
3410
3428
  }
3411
3429
  ),
3412
3430
  /* @__PURE__ */ c.jsx(
3413
- St,
3431
+ Ot,
3414
3432
  {
3415
3433
  index: 0,
3416
3434
  options: [
@@ -3418,7 +3436,7 @@ function vi(t) {
3418
3436
  "Selection Mode"
3419
3437
  ],
3420
3438
  onSelect: (f) => {
3421
- Ct = f === "Selection Mode", ct.visible = Ct;
3439
+ St = f === "Selection Mode", lt.visible = St;
3422
3440
  },
3423
3441
  open: p,
3424
3442
  onToggle: (f) => {
@@ -3437,9 +3455,9 @@ function bi(t) {
3437
3455
  ] });
3438
3456
  }
3439
3457
  export {
3440
- $t as Accordion,
3458
+ Gt as Accordion,
3441
3459
  hi as Application,
3442
- Ot as BaseRemote,
3460
+ Tt as BaseRemote,
3443
3461
  xn as ChildObject,
3444
3462
  Ia as ContainerObject,
3445
3463
  Oa as Draggable,
@@ -3459,7 +3477,7 @@ export {
3459
3477
  gi as SceneInspector,
3460
3478
  mi as SidePanel,
3461
3479
  j as ToolEvents,
3462
- Aa as UVMaterial,
3480
+ Da as UVMaterial,
3463
3481
  ui as clamp,
3464
3482
  ra as colorToHex,
3465
3483
  _ as debugDispatcher,
@@ -3471,6 +3489,6 @@ export {
3471
3489
  ia as isColor,
3472
3490
  aa as randomID,
3473
3491
  oa as resetThreeObjects,
3474
- kt as round,
3475
- Nt as totalThreeObjects
3492
+ At as round,
3493
+ Ft as totalThreeObjects
3476
3494
  };