@tomorrowevening/hermes 0.0.39 → 0.0.40

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.
@@ -1,64 +1,63 @@
1
- import { PositionalAudio as Vn, EventDispatcher as un, Texture as dn, CubeTexture as Hn, RepeatWrapping as Kt, ShaderMaterial as hn, GLSL3 as Wn, DoubleSide as fn, Color as Tt, Mesh as qn, PlaneGeometry as Kn, FrontSide as Xn, BackSide as Zn, NoBlending as Jn, NormalBlending as Qn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as na, CustomBlending as aa, AddEquation as ia, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as sa, MaxEquation as ca, ZeroFactor as pn, OneFactor as mn, SrcColorFactor as vn, OneMinusSrcColorFactor as gn, SrcAlphaFactor as bn, OneMinusSrcAlphaFactor as yn, DstAlphaFactor as En, OneMinusDstAlphaFactor as Cn, DstColorFactor as xn, OneMinusDstColorFactor as wn, SrcAlphaSaturateFactor as la, ConstantColorFactor as Sn, OneMinusConstantColorFactor as On, ConstantAlphaFactor as Mn, OneMinusConstantAlphaFactor as Tn, Matrix4 as ua, Vector3 as X, Euler as da, Ray as ha, Plane as fa, MathUtils as pa, MOUSE as Ve, TOUCH as He, Quaternion as Xt, Spherical as Zt, Vector2 as ue, PerspectiveCamera as zt, MeshDepthMaterial as ma, MeshNormalMaterial as va, MeshBasicMaterial as ga, OrthographicCamera as Rn, Scene as _n, Group as ba, AxesHelper as An, WebGLRenderer as ya, Raycaster as Ea, CameraHelper as Ca } from "three";
2
- import { getProject as xa, createRafDriver as wa } from "@theatre/core";
1
+ import { PositionalAudio as Vn, EventDispatcher as ln, Texture as un, CubeTexture as Hn, RepeatWrapping as qt, ShaderMaterial as dn, GLSL3 as Wn, DoubleSide as hn, Color as Mt, Mesh as qn, PlaneGeometry as Kn, FrontSide as Xn, BackSide as Zn, NoBlending as Jn, NormalBlending as Qn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as na, CustomBlending as aa, AddEquation as ia, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as sa, MaxEquation as ca, ZeroFactor as fn, OneFactor as pn, SrcColorFactor as mn, OneMinusSrcColorFactor as vn, SrcAlphaFactor as gn, OneMinusSrcAlphaFactor as bn, DstAlphaFactor as yn, OneMinusDstAlphaFactor as En, DstColorFactor as Cn, OneMinusDstColorFactor as xn, SrcAlphaSaturateFactor as la, ConstantColorFactor as wn, OneMinusConstantColorFactor as Sn, ConstantAlphaFactor as On, OneMinusConstantAlphaFactor as Mn, Matrix4 as ua, Vector3 as X, Euler as da, Ray as ha, Plane as fa, MathUtils as pa, MOUSE as Ve, TOUCH as He, Quaternion as Kt, Spherical as Xt, Vector2 as ue, PerspectiveCamera as $t, MeshDepthMaterial as ma, MeshNormalMaterial as va, MeshBasicMaterial as ga, OrthographicCamera as Tn, Scene as Rn, Group as ba, AxesHelper as _n, WebGLRenderer as ya, Raycaster as Ea, CameraHelper as Ca } from "three";
3
2
  import at from "@theatre/studio";
4
- import { Pane as Sa } from "tweakpane";
5
- import * as Oa from "@tweakpane/plugin-essentials";
6
- import Pn, { useState as ae, useRef as Ee, useEffect as Oe, forwardRef as Ma } from "react";
7
- import { Reorder as kn } from "framer-motion";
8
- function lt(t) {
3
+ import { Pane as xa } from "tweakpane";
4
+ import * as wa from "@tweakpane/plugin-essentials";
5
+ import An, { useState as ae, useRef as Ee, useEffect as Oe, forwardRef as Sa } from "react";
6
+ import { Reorder as Pn } from "framer-motion";
7
+ function ct(t) {
9
8
  return t.substring(0, 1).toUpperCase() + t.substring(1);
10
9
  }
11
- function Ai(t, n, a) {
10
+ function Ti(t, n, a) {
12
11
  return Math.min(n, Math.max(t, a));
13
12
  }
14
- function Pi(t, n) {
13
+ function Ri(t, n) {
15
14
  const a = t - n;
16
15
  return Math.sqrt(a * a);
17
16
  }
18
- function Ta() {
17
+ function Oa() {
19
18
  return Math.round(Math.random() * 1e6).toString();
20
19
  }
21
- function Ra(t) {
20
+ function Ma(t) {
22
21
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
22
  }
24
- function _a(t) {
23
+ function Ta(t) {
25
24
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (u) => {
26
25
  const f = u.toString(16);
27
26
  return f.length === 1 ? "0" + f : f;
28
27
  }, s = o(n), p = o(a), c = o(e);
29
28
  return "#" + s + p + c;
30
29
  }
31
- function Ft(t, n = 1) {
30
+ function Nt(t, n = 1) {
32
31
  return Number(t.toFixed(n));
33
32
  }
34
- let Yt = 0;
35
- const Aa = () => {
36
- Yt = 0;
37
- }, jn = (t) => {
33
+ let zt = 0;
34
+ const Ra = () => {
35
+ zt = 0;
36
+ }, kn = (t) => {
38
37
  if (!t)
39
38
  return;
40
39
  let n = t.name.replace(" ", "");
41
- n.length === 0 && (n = `obj_${Yt}`, Yt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
- jn(a);
40
+ n.length === 0 && (n = `obj_${zt}`, zt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
41
+ kn(a);
43
42
  });
44
- }, ki = (t) => {
43
+ }, _i = (t) => {
45
44
  t?.dispose();
46
- }, Pa = (t) => {
45
+ }, _a = (t) => {
47
46
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
48
- }, Dn = (t) => {
47
+ }, jn = (t) => {
49
48
  if (t) {
50
49
  for (; t.children.length > 0; ) {
51
50
  const n = t.children[0];
52
- n instanceof Vn ? (n.pause(), n.parent && n.parent.remove(n)) : Dn(n);
51
+ n instanceof Vn ? (n.pause(), n.parent && n.parent.remove(n)) : jn(n);
53
52
  }
54
53
  if (t.parent && t.parent.remove(t), t.isMesh) {
55
54
  const n = t;
56
- n.geometry?.dispose(), Pa(n.material);
55
+ n.geometry?.dispose(), _a(n.material);
57
56
  }
58
57
  t.dispose !== void 0 && t.dispose();
59
58
  }
60
59
  };
61
- class ji {
60
+ class Ai {
62
61
  components = /* @__PURE__ */ new Map();
63
62
  listen;
64
63
  // Protected
@@ -120,7 +119,7 @@ class ji {
120
119
  n && (this._mode = "editor");
121
120
  }
122
121
  }
123
- const k = new un(), j = {
122
+ const k = new ln(), j = {
124
123
  CUSTOM: "ToolEvents::custom",
125
124
  // Components
126
125
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -136,7 +135,7 @@ const k = new un(), j = {
136
135
  ADD_CAMERA: "ToolEvents::addCamera",
137
136
  REMOVE_CAMERA: "ToolEvents::removeCamera"
138
137
  };
139
- class Rt {
138
+ class Tt {
140
139
  app;
141
140
  constructor(n) {
142
141
  this.app = n;
@@ -154,7 +153,7 @@ class Rt {
154
153
  handleEditorApp() {
155
154
  }
156
155
  }
157
- class Di extends Rt {
156
+ class Pi extends Tt {
158
157
  selectDropdown(n, a) {
159
158
  this.app.send({
160
159
  event: "selectComponent",
@@ -188,19 +187,16 @@ class Di extends Rt {
188
187
  }
189
188
  }
190
189
  }
191
- const In = () => {
190
+ const Dn = () => {
192
191
  };
193
192
  let ge;
194
- class st extends Rt {
193
+ class In extends Tt {
195
194
  project;
196
195
  sheets = /* @__PURE__ */ new Map();
197
196
  sheetObjects = /* @__PURE__ */ new Map();
198
197
  sheetObjectCBs = /* @__PURE__ */ new Map();
199
198
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
200
- static rafDriver = null;
201
- init(n, a) {
202
- return this.project = xa(n, a), this.project.ready;
203
- }
199
+ static rafDriver = void 0;
204
200
  dispose() {
205
201
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
206
202
  }
@@ -246,12 +242,12 @@ class st extends Rt {
246
242
  return;
247
243
  const p = `${n}_${a}`;
248
244
  let c = this.sheetObjects.get(p);
249
- c !== void 0 ? c = s.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = s.object(a, e), this.sheetObjects.set(p, c), this.sheetObjectCBs.set(p, o !== void 0 ? o : In);
245
+ c !== void 0 ? c = s.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = s.object(a, e), this.sheetObjects.set(p, c), this.sheetObjectCBs.set(p, o !== void 0 ? o : Dn);
250
246
  const u = c.onValuesChange((f) => {
251
247
  if (this.app.editor) {
252
248
  for (const b in f) {
253
249
  const E = f[b];
254
- typeof E == "object" && Ra(E) && (f[b] = {
250
+ typeof E == "object" && Ma(E) && (f[b] = {
255
251
  r: E.r,
256
252
  g: E.g,
257
253
  b: E.b,
@@ -339,7 +335,7 @@ class st extends Rt {
339
335
  });
340
336
  let n = -1;
341
337
  const a = () => {
342
- if (st.getRafDriver().tick(performance.now()), ge !== void 0 && n !== ge.sequence.position) {
338
+ if (In.rafDriver?.tick(performance.now()), ge !== void 0 && n !== ge.sequence.position) {
343
339
  n = ge.sequence.position;
344
340
  const o = ge;
345
341
  this.app.send({
@@ -358,11 +354,8 @@ class st extends Rt {
358
354
  } else
359
355
  at.ui.hide();
360
356
  }
361
- static getRafDriver() {
362
- return st.rafDriver || (st.rafDriver = wa()), st.rafDriver;
363
- }
364
357
  }
365
- function ka(t) {
358
+ function Aa(t) {
366
359
  if (t.name === "cameras")
367
360
  return "camera";
368
361
  if (t.name === "interactive")
@@ -387,7 +380,7 @@ function Ln(t) {
387
380
  n.children.push(Ln(a));
388
381
  }), n;
389
382
  }
390
- function ja(t) {
383
+ function Pa(t) {
391
384
  const n = {};
392
385
  for (const a in t) {
393
386
  const e = t[a].value;
@@ -395,7 +388,7 @@ function ja(t) {
395
388
  }
396
389
  return n;
397
390
  }
398
- function Da(t) {
391
+ function ka(t) {
399
392
  switch (t) {
400
393
  case "blendSrcAlpha":
401
394
  case "blendDstAlpha":
@@ -410,7 +403,7 @@ function Da(t) {
410
403
  function We(t) {
411
404
  const n = {};
412
405
  for (const a in t) {
413
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Da(a))
406
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ka(a))
414
407
  continue;
415
408
  const e = typeof t[a], o = t[a];
416
409
  switch (e) {
@@ -422,13 +415,13 @@ function We(t) {
422
415
  case "object":
423
416
  if (o !== null)
424
417
  if (n[a] = o, o.isTexture)
425
- if (o instanceof dn) {
418
+ if (o instanceof un) {
426
419
  const s = o.source.toJSON();
427
420
  n[a] = { src: s.url };
428
421
  } else
429
422
  o instanceof Hn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
430
423
  else
431
- a === "uniforms" && (n[a] = ja(n[a]));
424
+ a === "uniforms" && (n[a] = Pa(n[a]));
432
425
  else
433
426
  n[a] = { src: "" };
434
427
  break;
@@ -436,7 +429,7 @@ function We(t) {
436
429
  }
437
430
  return n;
438
431
  }
439
- function Bt(t) {
432
+ function Ft(t) {
440
433
  t.updateMatrix();
441
434
  const n = {
442
435
  name: t.name,
@@ -514,7 +507,7 @@ function Bt(t) {
514
507
  });
515
508
  return n;
516
509
  }
517
- function Ia(t, n) {
510
+ function ja(t, n) {
518
511
  const a = n.split(".");
519
512
  switch (a.length) {
520
513
  case 1:
@@ -551,16 +544,16 @@ function ee(t, n, a) {
551
544
  break;
552
545
  }
553
546
  }
554
- function Gt(t) {
547
+ function Yt(t) {
555
548
  return new Promise((n, a) => {
556
549
  const e = new Image();
557
550
  e.onload = () => {
558
- const o = new dn(e);
559
- o.wrapS = Kt, o.wrapT = Kt, o.needsUpdate = !0, n(o);
551
+ const o = new un(e);
552
+ o.wrapS = qt, o.wrapT = qt, o.needsUpdate = !0, n(o);
560
553
  }, e.onerror = a, e.src = t;
561
554
  });
562
555
  }
563
- class Ii extends Rt {
556
+ class ki extends Tt {
564
557
  scene = void 0;
565
558
  getObject(n) {
566
559
  this.app.debugEnabled && this.app.send({
@@ -570,7 +563,7 @@ class Ii extends Rt {
570
563
  });
571
564
  }
572
565
  setObject(n) {
573
- const a = Bt(n);
566
+ const a = Ft(n);
574
567
  this.app.send({
575
568
  event: "setObject",
576
569
  target: "editor",
@@ -614,7 +607,7 @@ class Ii extends Rt {
614
607
  setScene(n) {
615
608
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
616
609
  return;
617
- Aa(), jn(this.scene);
610
+ Ra(), kn(this.scene);
618
611
  const a = Ln(this.scene);
619
612
  this.app.send({
620
613
  event: "setScene",
@@ -625,7 +618,7 @@ class Ii extends Rt {
625
618
  addCamera(n) {
626
619
  if (!this.app.debugEnabled)
627
620
  return;
628
- const a = Bt(n);
621
+ const a = Ft(n);
629
622
  this.app.send({
630
623
  event: "addCamera",
631
624
  target: "editor",
@@ -635,7 +628,7 @@ class Ii extends Rt {
635
628
  removeCamera(n) {
636
629
  if (!this.app.debugEnabled)
637
630
  return;
638
- const a = Bt(n);
631
+ const a = Ft(n);
639
632
  this.app.send({
640
633
  event: "removeCamera",
641
634
  target: "editor",
@@ -678,7 +671,7 @@ class Ii extends Rt {
678
671
  }
679
672
  }
680
673
  }
681
- class Li extends Rt {
674
+ class ji extends Tt {
682
675
  bindCBs;
683
676
  buttonCBs;
684
677
  pane = void 0;
@@ -689,7 +682,7 @@ class Li extends Rt {
689
682
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
690
683
  }
691
684
  createGUI() {
692
- this.pane = new Sa({ title: "GUI" }), this.pane.registerPlugin(Oa);
685
+ this.pane = new xa({ title: "GUI" }), this.pane.registerPlugin(wa);
693
686
  }
694
687
  dispose() {
695
688
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -715,7 +708,7 @@ class Li extends Rt {
715
708
  }
716
709
  // Binding
717
710
  bind(n, a, e, o = void 0) {
718
- const s = this.bindID, p = e.onChange !== void 0 ? e.onChange : In;
711
+ const s = this.bindID, p = e.onChange !== void 0 ? e.onChange : Dn;
719
712
  this.bindCBs.set(s, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addBinding(n, a, e).on("change", (u) => {
720
713
  this.app.send({
721
714
  event: "updateBind",
@@ -797,7 +790,7 @@ class Li extends Rt {
797
790
  }
798
791
  }
799
792
  }
800
- var Vt = { exports: {} }, it = {};
793
+ var Gt = { exports: {} }, it = {};
801
794
  /**
802
795
  * @license React
803
796
  * react-jsx-runtime.production.min.js
@@ -807,12 +800,12 @@ var Vt = { exports: {} }, it = {};
807
800
  * This source code is licensed under the MIT license found in the
808
801
  * LICENSE file in the root directory of this source tree.
809
802
  */
810
- var Jt;
811
- function La() {
812
- if (Jt)
803
+ var Zt;
804
+ function Da() {
805
+ if (Zt)
813
806
  return it;
814
- Jt = 1;
815
- var t = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
807
+ Zt = 1;
808
+ var t = An, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
816
809
  function p(c, u, f) {
817
810
  var v, b = {}, E = null, x = null;
818
811
  f !== void 0 && (E = "" + f), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
@@ -835,10 +828,10 @@ var rt = {};
835
828
  * This source code is licensed under the MIT license found in the
836
829
  * LICENSE file in the root directory of this source tree.
837
830
  */
838
- var Qt;
839
- function Na() {
840
- return Qt || (Qt = 1, process.env.NODE_ENV !== "production" && function() {
841
- var t = Pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
831
+ var Jt;
832
+ function Ia() {
833
+ return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
834
+ var t = An, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
842
835
  function H(i) {
843
836
  if (i === null || typeof i != "object")
844
837
  return null;
@@ -927,14 +920,14 @@ function Na() {
927
920
  }
928
921
  return null;
929
922
  }
930
- var I = Object.assign, W = 0, q, T, N, J, me, xe, ht;
923
+ var I = Object.assign, W = 0, q, T, N, J, me, xe, dt;
931
924
  function Ke() {
932
925
  }
933
926
  Ke.__reactDisabledLog = !0;
934
- function At() {
927
+ function _t() {
935
928
  {
936
929
  if (W === 0) {
937
- q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, xe = console.groupCollapsed, ht = console.groupEnd;
930
+ q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, xe = console.groupCollapsed, dt = console.groupEnd;
938
931
  var i = {
939
932
  configurable: !0,
940
933
  enumerable: !0,
@@ -954,7 +947,7 @@ function Na() {
954
947
  W++;
955
948
  }
956
949
  }
957
- function Pt() {
950
+ function At() {
958
951
  {
959
952
  if (W--, W === 0) {
960
953
  var i = {
@@ -982,7 +975,7 @@ function Na() {
982
975
  value: xe
983
976
  }),
984
977
  groupEnd: I({}, i, {
985
- value: ht
978
+ value: dt
986
979
  })
987
980
  });
988
981
  }
@@ -1005,10 +998,10 @@ function Na() {
1005
998
  }
1006
999
  var ze = !1, Me;
1007
1000
  {
1008
- var ft = typeof WeakMap == "function" ? WeakMap : Map;
1009
- Me = new ft();
1001
+ var ht = typeof WeakMap == "function" ? WeakMap : Map;
1002
+ Me = new ht();
1010
1003
  }
1011
- function pt(i, h) {
1004
+ function ft(i, h) {
1012
1005
  if (!i || ze)
1013
1006
  return "";
1014
1007
  {
@@ -1021,7 +1014,7 @@ function Na() {
1021
1014
  var D = Error.prepareStackTrace;
1022
1015
  Error.prepareStackTrace = void 0;
1023
1016
  var F;
1024
- F = Xe.current, Xe.current = null, At();
1017
+ F = Xe.current, Xe.current = null, _t();
1025
1018
  try {
1026
1019
  if (h) {
1027
1020
  var A = function() {
@@ -1074,15 +1067,15 @@ function Na() {
1074
1067
  }
1075
1068
  }
1076
1069
  } finally {
1077
- ze = !1, Xe.current = F, Pt(), Error.prepareStackTrace = D;
1070
+ ze = !1, Xe.current = F, At(), Error.prepareStackTrace = D;
1078
1071
  }
1079
- var Ge = i ? i.displayName || i.name : "", qt = Ge ? $e(Ge) : "";
1080
- return typeof i == "function" && Me.set(i, qt), qt;
1072
+ var Ge = i ? i.displayName || i.name : "", Wt = Ge ? $e(Ge) : "";
1073
+ return typeof i == "function" && Me.set(i, Wt), Wt;
1081
1074
  }
1082
- function kt(i, h, g) {
1083
- return pt(i, !1);
1075
+ function Pt(i, h, g) {
1076
+ return ft(i, !1);
1084
1077
  }
1085
- function mt(i) {
1078
+ function pt(i) {
1086
1079
  var h = i.prototype;
1087
1080
  return !!(h && h.isReactComponent);
1088
1081
  }
@@ -1090,7 +1083,7 @@ function Na() {
1090
1083
  if (i == null)
1091
1084
  return "";
1092
1085
  if (typeof i == "function")
1093
- return pt(i, mt(i));
1086
+ return ft(i, pt(i));
1094
1087
  if (typeof i == "string")
1095
1088
  return $e(i);
1096
1089
  switch (i) {
@@ -1102,7 +1095,7 @@ function Na() {
1102
1095
  if (typeof i == "object")
1103
1096
  switch (i.$$typeof) {
1104
1097
  case u:
1105
- return kt(i.render);
1098
+ return Pt(i.render);
1106
1099
  case b:
1107
1100
  return Te(i.type, h, g);
1108
1101
  case E: {
@@ -1115,13 +1108,13 @@ function Na() {
1115
1108
  }
1116
1109
  return "";
1117
1110
  }
1118
- var Re = Object.prototype.hasOwnProperty, vt = {}, gt = B.ReactDebugCurrentFrame;
1111
+ var Re = Object.prototype.hasOwnProperty, mt = {}, vt = B.ReactDebugCurrentFrame;
1119
1112
  function _e(i) {
1120
1113
  if (i) {
1121
1114
  var h = i._owner, g = Te(i.type, i._source, h ? h.type : null);
1122
- gt.setExtraStackFrame(g);
1115
+ vt.setExtraStackFrame(g);
1123
1116
  } else
1124
- gt.setExtraStackFrame(null);
1117
+ vt.setExtraStackFrame(null);
1125
1118
  }
1126
1119
  function Je(i, h, g, C, D) {
1127
1120
  {
@@ -1138,7 +1131,7 @@ function Na() {
1138
1131
  } catch (Z) {
1139
1132
  R = Z;
1140
1133
  }
1141
- R && !(R instanceof Error) && (_e(D), w("%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).", C || "React class", g, A, typeof R), _e(null)), R instanceof Error && !(R.message in vt) && (vt[R.message] = !0, _e(D), w("Failed %s type: %s", g, R.message), _e(null));
1134
+ R && !(R instanceof Error) && (_e(D), w("%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).", C || "React class", g, A, typeof R), _e(null)), R instanceof Error && !(R.message in mt) && (mt[R.message] = !0, _e(D), w("Failed %s type: %s", g, R.message), _e(null));
1142
1135
  }
1143
1136
  }
1144
1137
  }
@@ -1146,34 +1139,34 @@ function Na() {
1146
1139
  function Qe(i) {
1147
1140
  return Ae(i);
1148
1141
  }
1149
- function jt(i) {
1142
+ function kt(i) {
1150
1143
  {
1151
1144
  var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
1152
1145
  return g;
1153
1146
  }
1154
1147
  }
1155
- function bt(i) {
1148
+ function gt(i) {
1156
1149
  try {
1157
- return yt(i), !1;
1150
+ return bt(i), !1;
1158
1151
  } catch {
1159
1152
  return !0;
1160
1153
  }
1161
1154
  }
1162
- function yt(i) {
1155
+ function bt(i) {
1163
1156
  return "" + i;
1164
1157
  }
1165
- function Et(i) {
1166
- if (bt(i))
1167
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", jt(i)), yt(i);
1158
+ function yt(i) {
1159
+ if (gt(i))
1160
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", kt(i)), bt(i);
1168
1161
  }
1169
1162
  var we = B.ReactCurrentOwner, et = {
1170
1163
  key: !0,
1171
1164
  ref: !0,
1172
1165
  __self: !0,
1173
1166
  __source: !0
1174
- }, tt, Ct, Ye;
1167
+ }, tt, Et, Ye;
1175
1168
  Ye = {};
1176
- function Dt(i) {
1169
+ function jt(i) {
1177
1170
  if (Re.call(i, "ref")) {
1178
1171
  var h = Object.getOwnPropertyDescriptor(i, "ref").get;
1179
1172
  if (h && h.isReactWarning)
@@ -1181,7 +1174,7 @@ function Na() {
1181
1174
  }
1182
1175
  return i.ref !== void 0;
1183
1176
  }
1184
- function It(i) {
1177
+ function Dt(i) {
1185
1178
  if (Re.call(i, "key")) {
1186
1179
  var h = Object.getOwnPropertyDescriptor(i, "key").get;
1187
1180
  if (h && h.isReactWarning)
@@ -1189,7 +1182,7 @@ function Na() {
1189
1182
  }
1190
1183
  return i.key !== void 0;
1191
1184
  }
1192
- function xt(i, h) {
1185
+ function Ct(i, h) {
1193
1186
  if (typeof i.ref == "string" && we.current && h && we.current.stateNode !== h) {
1194
1187
  var g = $(we.current.type);
1195
1188
  Ye[g] || (w('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', $(we.current.type), i.ref), Ye[g] = !0);
@@ -1206,10 +1199,10 @@ function Na() {
1206
1199
  });
1207
1200
  }
1208
1201
  }
1209
- function Wt(i, h) {
1202
+ function Ht(i, h) {
1210
1203
  {
1211
1204
  var g = function() {
1212
- Ct || (Ct = !0, w("%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));
1205
+ Et || (Et = !0, w("%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));
1213
1206
  };
1214
1207
  g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1215
1208
  get: g,
@@ -1249,7 +1242,7 @@ function Na() {
1249
1242
  function y(i, h, g, C, D) {
1250
1243
  {
1251
1244
  var F, A = {}, R = null, ce = null;
1252
- g !== void 0 && (Et(g), R = "" + g), It(h) && (Et(h.key), R = "" + h.key), Dt(h) && (ce = h.ref, xt(h, D));
1245
+ g !== void 0 && (yt(g), R = "" + g), Dt(h) && (yt(h.key), R = "" + h.key), jt(h) && (ce = h.ref, Ct(h, D));
1253
1246
  for (F in h)
1254
1247
  Re.call(h, F) && !et.hasOwnProperty(F) && (A[F] = h[F]);
1255
1248
  if (i && i.defaultProps) {
@@ -1259,7 +1252,7 @@ function Na() {
1259
1252
  }
1260
1253
  if (R || ce) {
1261
1254
  var Q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1262
- R && Se(A, Q), ce && Wt(A, Q);
1255
+ R && Se(A, Q), ce && Ht(A, Q);
1263
1256
  }
1264
1257
  return r(i, R, ce, D, C, we.current, A);
1265
1258
  }
@@ -1277,7 +1270,7 @@ function Na() {
1277
1270
  function ie(i) {
1278
1271
  return typeof i == "object" && i !== null && i.$$typeof === n;
1279
1272
  }
1280
- function Lt() {
1273
+ function It() {
1281
1274
  {
1282
1275
  if (O.current) {
1283
1276
  var i = $(O.current.type);
@@ -1289,7 +1282,7 @@ Check the render method of \`` + i + "`.";
1289
1282
  return "";
1290
1283
  }
1291
1284
  }
1292
- function Nt(i) {
1285
+ function Lt(i) {
1293
1286
  {
1294
1287
  if (i !== void 0) {
1295
1288
  var h = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
@@ -1303,7 +1296,7 @@ Check your code at ` + h + ":" + g + ".";
1303
1296
  var nt = {};
1304
1297
  function pe(i) {
1305
1298
  {
1306
- var h = Lt();
1299
+ var h = It();
1307
1300
  if (!h) {
1308
1301
  var g = typeof i == "string" ? i : i.displayName || i.name;
1309
1302
  g && (h = `
@@ -1388,8 +1381,8 @@ Check the top-level render call using <` + g + ">.");
1388
1381
  if (!A) {
1389
1382
  var R = "";
1390
1383
  (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1391
- var ce = Nt(D);
1392
- ce ? R += ce : R += Lt();
1384
+ var ce = Lt(D);
1385
+ ce ? R += ce : R += It();
1393
1386
  var Z;
1394
1387
  i === null ? Z = "null" : Qe(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, R);
1395
1388
  }
@@ -1422,16 +1415,16 @@ Check the top-level render call using <` + g + ">.");
1422
1415
  rt.Fragment = e, rt.jsx = Yn, rt.jsxs = Gn;
1423
1416
  }()), rt;
1424
1417
  }
1425
- process.env.NODE_ENV === "production" ? Vt.exports = La() : Vt.exports = Na();
1426
- var l = Vt.exports;
1418
+ process.env.NODE_ENV === "production" ? Gt.exports = Da() : Gt.exports = Ia();
1419
+ var l = Gt.exports;
1427
1420
  function Nn(t) {
1428
1421
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1429
1422
  }
1430
- const Fa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1423
+ const La = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1431
1424
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1432
1425
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1433
1426
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1434
- ] }), Ba = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1427
+ ] }), Na = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1435
1428
  "path",
1436
1429
  {
1437
1430
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1439,16 +1432,16 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1439
1432
  C11,8.22,10.74,8,10.43,8z`
1440
1433
  }
1441
1434
  ) });
1442
- function Ua(t) {
1443
- return /* @__PURE__ */ l.jsx(kn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1444
- Ba,
1435
+ function Fa(t) {
1436
+ return /* @__PURE__ */ l.jsx(Pn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1437
+ Na,
1445
1438
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1446
1439
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1447
1440
  t.onDelete(t.index);
1448
- }, children: Fa })
1441
+ }, children: La })
1449
1442
  ] }) }, t.title);
1450
1443
  }
1451
- function $a(t) {
1444
+ function Ba(t) {
1452
1445
  const [n, a] = ae(!1), [e, o] = ae(t.options), s = (f) => {
1453
1446
  t.onDragComplete(f), o(f);
1454
1447
  }, p = (f) => {
@@ -1456,18 +1449,18 @@ function $a(t) {
1456
1449
  v.splice(f, 1), s(v);
1457
1450
  }, c = [];
1458
1451
  e.forEach((f, v) => {
1459
- c.push(/* @__PURE__ */ l.jsx(Ua, { index: v, title: f, onDelete: p }, f));
1452
+ c.push(/* @__PURE__ */ l.jsx(Fa, { index: v, title: f, onDelete: p }, f));
1460
1453
  });
1461
1454
  let u = "dropdown draggable";
1462
1455
  return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1463
1456
  /* @__PURE__ */ l.jsx(Nn, { title: t.title }),
1464
- /* @__PURE__ */ l.jsx(kn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1457
+ /* @__PURE__ */ l.jsx(Pn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1465
1458
  ] });
1466
1459
  }
1467
- function za(t) {
1460
+ function Ua(t) {
1468
1461
  const [n, a] = ae(!1), e = [];
1469
1462
  t.options.map((s, p) => {
1470
- t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ya, { option: s }, p));
1463
+ t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx($a, { option: s }, p));
1471
1464
  });
1472
1465
  let o = "dropdown";
1473
1466
  return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1489,13 +1482,13 @@ function za(t) {
1489
1482
  }
1490
1483
  );
1491
1484
  }
1492
- function Ya(t) {
1485
+ function $a(t) {
1493
1486
  const { option: n } = t, [a, e] = ae("");
1494
1487
  let o;
1495
1488
  switch (n.type) {
1496
1489
  case "draggable":
1497
1490
  o = /* @__PURE__ */ l.jsx(
1498
- $a,
1491
+ Ba,
1499
1492
  {
1500
1493
  title: n.title,
1501
1494
  options: n.value,
@@ -1508,7 +1501,7 @@ function Ya(t) {
1508
1501
  break;
1509
1502
  case "dropdown":
1510
1503
  o = /* @__PURE__ */ l.jsx(
1511
- za,
1504
+ Ua,
1512
1505
  {
1513
1506
  title: n.title,
1514
1507
  options: n.value,
@@ -1529,9 +1522,9 @@ function Ya(t) {
1529
1522
  );
1530
1523
  break;
1531
1524
  }
1532
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Ta());
1525
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Oa());
1533
1526
  }
1534
- function Ni(t) {
1527
+ function Di(t) {
1535
1528
  function n(e) {
1536
1529
  switch (t.components.forEach((o) => {
1537
1530
  o.handleApp(e);
@@ -1554,7 +1547,7 @@ function Ni(t) {
1554
1547
  e.target === "editor" ? a(e) : n(e);
1555
1548
  };
1556
1549
  }
1557
- const Ga = `out vec3 worldPosition;
1550
+ const za = `out vec3 worldPosition;
1558
1551
  uniform float uDistance;
1559
1552
 
1560
1553
  void main() {
@@ -1563,7 +1556,7 @@ void main() {
1563
1556
  worldPosition.xz += cameraPosition.xz;
1564
1557
 
1565
1558
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1566
- }`, Va = `out vec4 fragColor;
1559
+ }`, Ya = `out vec4 fragColor;
1567
1560
  in vec3 worldPosition;
1568
1561
 
1569
1562
  uniform float uDivisions;
@@ -1631,14 +1624,14 @@ void main() {
1631
1624
 
1632
1625
  if (fragColor.a <= 0.0) discard;
1633
1626
  }`;
1634
- class Ha extends hn {
1627
+ class Ga extends dn {
1635
1628
  constructor(n) {
1636
1629
  super({
1637
1630
  extensions: {
1638
1631
  derivatives: !0
1639
1632
  },
1640
1633
  glslVersion: Wn,
1641
- side: fn,
1634
+ side: hn,
1642
1635
  transparent: !0,
1643
1636
  uniforms: {
1644
1637
  uScale: {
@@ -1648,7 +1641,7 @@ class Ha extends hn {
1648
1641
  value: n?.divisions !== void 0 ? n?.divisions : 10
1649
1642
  },
1650
1643
  uColor: {
1651
- value: n?.color !== void 0 ? n?.color : new Tt(16777215)
1644
+ value: n?.color !== void 0 ? n?.color : new Mt(16777215)
1652
1645
  },
1653
1646
  uDistance: {
1654
1647
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -1660,24 +1653,24 @@ class Ha extends hn {
1660
1653
  value: n?.gridOpacity !== void 0 ? n?.gridOpacity : 0.25
1661
1654
  }
1662
1655
  },
1663
- vertexShader: Ga,
1664
- fragmentShader: Va,
1656
+ vertexShader: za,
1657
+ fragmentShader: Ya,
1665
1658
  name: "InfiniteGrid",
1666
1659
  depthWrite: !1
1667
1660
  });
1668
1661
  }
1669
1662
  }
1670
- class Wa extends qn {
1663
+ class Va extends qn {
1671
1664
  gridMaterial;
1672
1665
  constructor() {
1673
- const n = new Ha();
1666
+ const n = new Ga();
1674
1667
  super(new Kn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1675
1668
  }
1676
1669
  update() {
1677
1670
  this.gridMaterial.needsUpdate = !0;
1678
1671
  }
1679
1672
  }
1680
- const qa = `#include <common>
1673
+ const Ha = `#include <common>
1681
1674
  #include <batching_pars_vertex>
1682
1675
  #include <uv_pars_vertex>
1683
1676
  #include <color_pars_vertex>
@@ -1707,7 +1700,7 @@ void main() {
1707
1700
  #include <logdepthbuf_vertex>
1708
1701
  #include <clipping_planes_vertex>
1709
1702
  #include <worldpos_vertex>
1710
- }`, Ka = `
1703
+ }`, Wa = `
1711
1704
  #include <common>
1712
1705
  #include <uv_pars_fragment>
1713
1706
  #include <clipping_planes_pars_fragment>
@@ -1716,18 +1709,18 @@ void main() {
1716
1709
  #include <clipping_planes_fragment>
1717
1710
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1718
1711
  }`;
1719
- class Xa extends hn {
1712
+ class qa extends dn {
1720
1713
  constructor() {
1721
1714
  super({
1722
1715
  defines: {
1723
1716
  USE_UV: ""
1724
1717
  },
1725
- vertexShader: qa,
1726
- fragmentShader: Ka
1718
+ vertexShader: Ha,
1719
+ fragmentShader: Wa
1727
1720
  });
1728
1721
  }
1729
1722
  }
1730
- function Ht(t) {
1723
+ function Vt(t) {
1731
1724
  const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1732
1725
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1733
1726
  /* @__PURE__ */ l.jsxs(
@@ -1746,7 +1739,7 @@ function Ht(t) {
1746
1739
  children: "Toggle"
1747
1740
  }
1748
1741
  ),
1749
- /* @__PURE__ */ l.jsx("p", { className: "label", children: lt(t.label) })
1742
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: ct(t.label) })
1750
1743
  ]
1751
1744
  }
1752
1745
  ),
@@ -1755,10 +1748,10 @@ function Ht(t) {
1755
1748
  ] });
1756
1749
  }
1757
1750
  function Fn(t) {
1758
- const [n, a] = ae(!1), e = t.child.children.length > 0, o = [];
1759
- return t.child.children.length > 0 && t.child.children.map((s) => {
1751
+ const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, o = [];
1752
+ return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((s) => {
1760
1753
  o.push(/* @__PURE__ */ l.jsx(Fn, { child: s, three: t.three }, Math.random()));
1761
- }), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1754
+ }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1762
1755
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1763
1756
  e ? /* @__PURE__ */ l.jsx(
1764
1757
  "button",
@@ -1780,34 +1773,34 @@ function Fn(t) {
1780
1773
  left: e ? "20px" : "5px"
1781
1774
  },
1782
1775
  onClick: () => {
1783
- t.three.getObject(t.child.uuid), n || a(!0);
1776
+ t.child !== void 0 && (t.three.getObject(t.child.uuid), n || a(!0));
1784
1777
  },
1785
1778
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1786
1779
  }
1787
1780
  ),
1788
- /* @__PURE__ */ l.jsx("div", { className: `icon ${ka(t.child)}` })
1781
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${Aa(t.child)}` })
1789
1782
  ] }),
1790
1783
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1791
- ] }, Math.random());
1784
+ ] }, Math.random()) });
1792
1785
  }
1793
- function Za(t) {
1786
+ function Ka(t) {
1794
1787
  const n = [];
1795
- return t.child.children.map((a) => {
1788
+ return t.child?.children.map((a) => {
1796
1789
  n.push(/* @__PURE__ */ l.jsx(Fn, { child: a, three: t.three }, Math.random()));
1797
1790
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1798
1791
  }
1799
- const Ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1800
- function Qa(t) {
1792
+ const Xa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1793
+ function Za(t) {
1801
1794
  return "items" in t;
1802
1795
  }
1803
1796
  function Be(t) {
1804
1797
  const n = [];
1805
1798
  return t.items.forEach((a) => {
1806
- Qa(a) ? n.push(
1807
- /* @__PURE__ */ l.jsx(Be, { title: lt(a.title), items: a.items }, Math.random())
1799
+ Za(a) ? n.push(
1800
+ /* @__PURE__ */ l.jsx(Be, { title: ct(a.title), items: a.items }, Math.random())
1808
1801
  ) : n.push(
1809
1802
  /* @__PURE__ */ l.jsx(
1810
- ct,
1803
+ st,
1811
1804
  {
1812
1805
  title: a.title,
1813
1806
  prop: a.prop,
@@ -1825,9 +1818,9 @@ function Be(t) {
1825
1818
  Math.random()
1826
1819
  )
1827
1820
  );
1828
- }), /* @__PURE__ */ l.jsx(Ht, { label: t.title, open: t.expanded === !0, children: n });
1821
+ }), /* @__PURE__ */ l.jsx(Vt, { label: t.title, open: t.expanded === !0, children: n });
1829
1822
  }
1830
- function ei(t) {
1823
+ function Ja(t) {
1831
1824
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1832
1825
  }
1833
1826
  function Ie(t) {
@@ -2003,10 +1996,10 @@ function Ie(t) {
2003
1996
  }
2004
1997
  return t;
2005
1998
  }
2006
- function ti(t) {
1999
+ function Qa(t) {
2007
2000
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
2008
2001
  }
2009
- function ni() {
2002
+ function ei() {
2010
2003
  const t = document.createElement("input");
2011
2004
  return t.type = "file", new Promise((n, a) => {
2012
2005
  t.addEventListener("change", function() {
@@ -2021,7 +2014,7 @@ function ni() {
2021
2014
  }), t.click();
2022
2015
  });
2023
2016
  }
2024
- const ai = [
2017
+ const ti = [
2025
2018
  {
2026
2019
  title: "Front",
2027
2020
  value: Xn
@@ -2032,9 +2025,9 @@ const ai = [
2032
2025
  },
2033
2026
  {
2034
2027
  title: "Double",
2035
- value: fn
2028
+ value: hn
2036
2029
  }
2037
- ], ii = [
2030
+ ], ni = [
2038
2031
  {
2039
2032
  title: "No Blending",
2040
2033
  value: Jn
@@ -2059,7 +2052,7 @@ const ai = [
2059
2052
  title: "Custom",
2060
2053
  value: aa
2061
2054
  }
2062
- ], ri = [
2055
+ ], ai = [
2063
2056
  {
2064
2057
  title: "Add",
2065
2058
  value: ia
@@ -2080,46 +2073,46 @@ const ai = [
2080
2073
  title: "Max",
2081
2074
  value: ca
2082
2075
  }
2083
- ], oi = [
2076
+ ], ii = [
2084
2077
  {
2085
2078
  title: "Zero",
2086
- valye: pn
2079
+ valye: fn
2087
2080
  },
2088
2081
  {
2089
2082
  title: "One",
2090
- valye: mn
2083
+ valye: pn
2091
2084
  },
2092
2085
  {
2093
2086
  title: "Src Color",
2094
- valye: vn
2087
+ valye: mn
2095
2088
  },
2096
2089
  {
2097
2090
  title: "One Minus Src Color",
2098
- valye: gn
2091
+ valye: vn
2099
2092
  },
2100
2093
  {
2101
2094
  title: "Src Alpha",
2102
- valye: bn
2095
+ valye: gn
2103
2096
  },
2104
2097
  {
2105
2098
  title: "One Minus Src Alpha",
2106
- valye: yn
2099
+ valye: bn
2107
2100
  },
2108
2101
  {
2109
2102
  title: "Dst Alpha",
2110
- valye: En
2103
+ valye: yn
2111
2104
  },
2112
2105
  {
2113
2106
  title: "One Minus Dst Alpha",
2114
- valye: Cn
2107
+ valye: En
2115
2108
  },
2116
2109
  {
2117
2110
  title: "Dst Color",
2118
- valye: xn
2111
+ valye: Cn
2119
2112
  },
2120
2113
  {
2121
2114
  title: "One Minus Dst Color",
2122
- valye: wn
2115
+ valye: xn
2123
2116
  },
2124
2117
  {
2125
2118
  title: "Src Alpha Saturate",
@@ -2127,85 +2120,85 @@ const ai = [
2127
2120
  },
2128
2121
  {
2129
2122
  title: "Constant Color",
2130
- valye: Sn
2123
+ valye: wn
2131
2124
  },
2132
2125
  {
2133
2126
  title: "One Minus Constant Color",
2134
- valye: On
2127
+ valye: Sn
2135
2128
  },
2136
2129
  {
2137
2130
  title: "Constant Alpha",
2138
- valye: Mn
2131
+ valye: On
2139
2132
  },
2140
2133
  {
2141
2134
  title: "One Minus Constant Alpha",
2142
- valye: Tn
2135
+ valye: Mn
2143
2136
  }
2144
- ], si = [
2137
+ ], ri = [
2145
2138
  {
2146
2139
  title: "Zero",
2147
- valye: pn
2140
+ valye: fn
2148
2141
  },
2149
2142
  {
2150
2143
  title: "One",
2151
- valye: mn
2144
+ valye: pn
2152
2145
  },
2153
2146
  {
2154
2147
  title: "Src Color",
2155
- valye: vn
2148
+ valye: mn
2156
2149
  },
2157
2150
  {
2158
2151
  title: "One Minus Src Color",
2159
- valye: gn
2152
+ valye: vn
2160
2153
  },
2161
2154
  {
2162
2155
  title: "Src Alpha",
2163
- valye: bn
2156
+ valye: gn
2164
2157
  },
2165
2158
  {
2166
2159
  title: "One Minus Src Alpha",
2167
- valye: yn
2160
+ valye: bn
2168
2161
  },
2169
2162
  {
2170
2163
  title: "Dst Alpha",
2171
- valye: En
2164
+ valye: yn
2172
2165
  },
2173
2166
  {
2174
2167
  title: "One Minus Dst Alpha",
2175
- valye: Cn
2168
+ valye: En
2176
2169
  },
2177
2170
  {
2178
2171
  title: "Dst Color",
2179
- valye: xn
2172
+ valye: Cn
2180
2173
  },
2181
2174
  {
2182
2175
  title: "One Minus Dst Color",
2183
- valye: wn
2176
+ valye: xn
2184
2177
  },
2185
2178
  {
2186
2179
  title: "Constant Color",
2187
- valye: Sn
2180
+ valye: wn
2188
2181
  },
2189
2182
  {
2190
2183
  title: "One Minus Constant Color",
2191
- valye: On
2184
+ valye: Sn
2192
2185
  },
2193
2186
  {
2194
2187
  title: "Constant Alpha",
2195
- valye: Mn
2188
+ valye: On
2196
2189
  },
2197
2190
  {
2198
2191
  title: "One Minus Constant Alpha",
2199
- valye: Tn
2192
+ valye: Mn
2200
2193
  }
2201
2194
  ];
2202
2195
  function ot(t, n) {
2203
2196
  t.needsUpdate = !0, t.type = "option", t.options = n;
2204
2197
  }
2205
- function en(t, n, a) {
2198
+ function Qt(t, n, a) {
2206
2199
  const e = [];
2207
2200
  for (const o in t) {
2208
- if (!ei(o))
2201
+ if (!Ja(o))
2209
2202
  continue;
2210
2203
  const s = typeof t[o], p = t[o];
2211
2204
  if (s === "boolean" || s === "number" || s === "string") {
@@ -2225,27 +2218,27 @@ function en(t, n, a) {
2225
2218
  };
2226
2219
  switch (o) {
2227
2220
  case "blending":
2228
- ot(c, ii);
2221
+ ot(c, ni);
2229
2222
  break;
2230
2223
  case "blendDst":
2231
- ot(c, si);
2224
+ ot(c, ri);
2232
2225
  break;
2233
2226
  case "blendEquation":
2234
- ot(c, ri);
2227
+ ot(c, ai);
2235
2228
  break;
2236
2229
  case "blendSrc":
2237
- ot(c, oi);
2230
+ ot(c, ii);
2238
2231
  break;
2239
2232
  case "side":
2240
- ot(c, ai);
2233
+ ot(c, ti);
2241
2234
  break;
2242
2235
  }
2243
- ti(o) && (c.value = Number(p), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2236
+ Qa(o) && (c.value = Number(p), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2244
2237
  const u = s === "string" && (o === "vertexShader" || o === "fragmentShader");
2245
2238
  u && (c.disabled = !1, c.latest = c.value, c.onChange = (f, v) => {
2246
2239
  c.latest = v;
2247
2240
  }), e.push(c), u && e.push({
2248
- title: `${lt(o)} - Update`,
2241
+ title: `${ct(o)} - Update`,
2249
2242
  type: "button",
2250
2243
  onChange: () => {
2251
2244
  a.updateObject(n.uuid, `material.${o}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
@@ -2261,7 +2254,7 @@ function en(t, n, a) {
2261
2254
  type: "color",
2262
2255
  value: p,
2263
2256
  onChange: (c, u) => {
2264
- const f = new Tt(u);
2257
+ const f = new Mt(u);
2265
2258
  a.updateObject(n.uuid, `material.${c}`, f);
2266
2259
  const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2267
2260
  v !== void 0 && ee(v, `material.${c}`, f);
@@ -2299,7 +2292,7 @@ function en(t, n, a) {
2299
2292
  onChange: (b, E) => {
2300
2293
  a.createTexture(n.uuid, `material.${o}`, E);
2301
2294
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2302
- x !== void 0 && Gt(E).then((M) => {
2295
+ x !== void 0 && Yt(E).then((M) => {
2303
2296
  ee(x, `material.${o}`, M), ee(x, "material.needsUpdate", !0);
2304
2297
  });
2305
2298
  }
@@ -2324,7 +2317,7 @@ function en(t, n, a) {
2324
2317
  onChange: (b, E) => {
2325
2318
  a.createTexture(n.uuid, `material.${o}.${u}.value`, p);
2326
2319
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2327
- x !== void 0 && Gt(E).then((M) => {
2320
+ x !== void 0 && Yt(E).then((M) => {
2328
2321
  ee(x, `material.${o}.${u}.value`, M);
2329
2322
  });
2330
2323
  }
@@ -2360,7 +2353,7 @@ function en(t, n, a) {
2360
2353
  type: "color",
2361
2354
  value: f.value,
2362
2355
  onChange: (x, M) => {
2363
- const P = new Tt(M), H = `material.${o}.${x}.value`;
2356
+ const P = new Mt(M), H = `material.${o}.${x}.value`;
2364
2357
  a.updateObject(n.uuid, H, P);
2365
2358
  const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2366
2359
  B !== void 0 && ee(B, H, P);
@@ -2441,7 +2434,7 @@ function en(t, n, a) {
2441
2434
  }
2442
2435
  }), e;
2443
2436
  }
2444
- function ci(t, n) {
2437
+ function oi(t, n) {
2445
2438
  const a = t.material;
2446
2439
  if (Array.isArray(a)) {
2447
2440
  const e = [], o = a.length;
@@ -2451,7 +2444,7 @@ function ci(t, n) {
2451
2444
  Be,
2452
2445
  {
2453
2446
  title: `Material ${s}`,
2454
- items: en(a[s], t, n)
2447
+ items: Qt(a[s], t, n)
2455
2448
  },
2456
2449
  `Material ${s}`
2457
2450
  )
@@ -2462,13 +2455,13 @@ function ci(t, n) {
2462
2455
  Be,
2463
2456
  {
2464
2457
  title: "Material",
2465
- items: en(a, t, n)
2458
+ items: Qt(a, t, n)
2466
2459
  }
2467
2460
  );
2468
2461
  }
2469
- function ct(t) {
2462
+ function st(t) {
2470
2463
  let n = t.value;
2471
- n !== void 0 && n.isColor !== void 0 && (n = _a(t.value));
2464
+ n !== void 0 && n.isColor !== void 0 && (n = Ta(t.value));
2472
2465
  const [a, e] = ae(n), o = Ee(null), s = Ee(null), p = Ee(null);
2473
2466
  Oe(() => {
2474
2467
  let v = !1, b = -1, E = 0, x = Number(a);
@@ -2494,7 +2487,7 @@ function ct(t) {
2494
2487
  t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2495
2488
  };
2496
2489
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2497
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: lt(t.title) }, "fieldLabel"),
2490
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: ct(t.title) }, "fieldLabel"),
2498
2491
  t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2499
2492
  "input",
2500
2493
  {
@@ -2566,14 +2559,14 @@ function ct(t) {
2566
2559
  }
2567
2560
  ),
2568
2561
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
2569
- ni().then((v) => {
2562
+ ei().then((v) => {
2570
2563
  p.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2571
2564
  });
2572
- }, src: a.length > 0 ? a : Ja }),
2573
- t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: f, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2565
+ }, src: a.length > 0 ? a : Xa }),
2566
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: f, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ct(v.title) }, b)) }) })
2574
2567
  ] });
2575
2568
  }
2576
- function tn(t) {
2569
+ function en(t) {
2577
2570
  switch (t) {
2578
2571
  case "fov":
2579
2572
  return "FOV";
@@ -2602,12 +2595,12 @@ function tn(t) {
2602
2595
  }
2603
2596
  return t;
2604
2597
  }
2605
- function li(t, n) {
2598
+ function si(t, n) {
2606
2599
  const a = [];
2607
2600
  if (t.perspectiveCameraInfo !== void 0)
2608
2601
  for (const e in t.perspectiveCameraInfo)
2609
2602
  a.push({
2610
- title: tn(e),
2603
+ title: en(e),
2611
2604
  prop: e,
2612
2605
  type: "number",
2613
2606
  step: 0.01,
@@ -2621,7 +2614,7 @@ function li(t, n) {
2621
2614
  else if (t.orthographicCameraInfo !== void 0)
2622
2615
  for (const e in t.orthographicCameraInfo)
2623
2616
  a.push({
2624
- title: tn(e),
2617
+ title: en(e),
2625
2618
  prop: e,
2626
2619
  type: "number",
2627
2620
  step: 0.01,
@@ -2640,17 +2633,17 @@ function li(t, n) {
2640
2633
  }
2641
2634
  );
2642
2635
  }
2643
- const ui = Math.PI / 180, di = 180 / Math.PI;
2636
+ const ci = Math.PI / 180, li = 180 / Math.PI;
2644
2637
  function qe(t, n, a, e, o) {
2645
2638
  return e + (t - n) * (o - e) / (a - n);
2646
2639
  }
2647
- function hi(t) {
2648
- return t * ui;
2640
+ function ui(t) {
2641
+ return t * ci;
2649
2642
  }
2650
- function Ut(t) {
2651
- return t * di;
2643
+ function Bt(t) {
2644
+ return t * li;
2652
2645
  }
2653
- function fi(t, n) {
2646
+ function di(t, n) {
2654
2647
  const a = new ua();
2655
2648
  a.elements = t.matrix;
2656
2649
  const e = new X(), o = new da(), s = new X();
@@ -2660,7 +2653,7 @@ function fi(t, n) {
2660
2653
  const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2661
2654
  v !== void 0 && ee(v, u, f);
2662
2655
  }, c = (u, f) => {
2663
- p(u, hi(f));
2656
+ p(u, ui(f));
2664
2657
  };
2665
2658
  return /* @__PURE__ */ l.jsx(
2666
2659
  Be,
@@ -2692,7 +2685,7 @@ function fi(t, n) {
2692
2685
  title: "Rotation X",
2693
2686
  prop: "rotation.x",
2694
2687
  type: "number",
2695
- value: Ft(Ut(o.x)),
2688
+ value: Nt(Bt(o.x)),
2696
2689
  min: -360,
2697
2690
  max: 360,
2698
2691
  step: 0.1,
@@ -2702,7 +2695,7 @@ function fi(t, n) {
2702
2695
  title: "Rotation Y",
2703
2696
  prop: "rotation.y",
2704
2697
  type: "number",
2705
- value: Ft(Ut(o.y)),
2698
+ value: Nt(Bt(o.y)),
2706
2699
  min: -360,
2707
2700
  max: 360,
2708
2701
  step: 0.1,
@@ -2712,7 +2705,7 @@ function fi(t, n) {
2712
2705
  title: "Rotation Z",
2713
2706
  prop: "rotation.z",
2714
2707
  type: "number",
2715
- value: Ft(Ut(o.z)),
2708
+ value: Nt(Bt(o.z)),
2716
2709
  min: -360,
2717
2710
  max: 360,
2718
2711
  step: 0.1,
@@ -2746,7 +2739,7 @@ function fi(t, n) {
2746
2739
  }
2747
2740
  );
2748
2741
  }
2749
- function nn(t) {
2742
+ function tn(t) {
2750
2743
  switch (t) {
2751
2744
  case "color":
2752
2745
  return "Color";
@@ -2765,24 +2758,24 @@ function nn(t) {
2765
2758
  }
2766
2759
  return t;
2767
2760
  }
2768
- function pi(t, n) {
2761
+ function hi(t, n) {
2769
2762
  const a = [];
2770
2763
  if (t.lightInfo !== void 0)
2771
2764
  for (const e in t.lightInfo) {
2772
2765
  const o = t.lightInfo[e];
2773
2766
  o !== void 0 && (o.isColor !== void 0 ? a.push({
2774
- title: nn(e),
2767
+ title: tn(e),
2775
2768
  prop: e,
2776
2769
  type: "color",
2777
2770
  value: o,
2778
2771
  onChange: (s, p) => {
2779
- const c = new Tt(p);
2772
+ const c = new Mt(p);
2780
2773
  n.updateObject(t.uuid, s, c);
2781
2774
  const u = n.scene?.getObjectByProperty("uuid", t.uuid);
2782
2775
  u !== void 0 && ee(u, s, c);
2783
2776
  }
2784
2777
  }) : a.push({
2785
- title: nn(e),
2778
+ title: tn(e),
2786
2779
  prop: e,
2787
2780
  type: typeof o,
2788
2781
  value: o,
@@ -2802,7 +2795,7 @@ function pi(t, n) {
2802
2795
  }
2803
2796
  );
2804
2797
  }
2805
- function mi(t, n) {
2798
+ function fi(t, n) {
2806
2799
  const a = [], e = [];
2807
2800
  let o = 0;
2808
2801
  t.animations.forEach((c) => {
@@ -2881,7 +2874,7 @@ const Bn = {
2881
2874
  lightInfo: void 0
2882
2875
  };
2883
2876
  let te = { ...Bn };
2884
- function vi(t) {
2877
+ function pi(t) {
2885
2878
  const [n, a] = ae(-1);
2886
2879
  Oe(() => {
2887
2880
  function p(u) {
@@ -2895,10 +2888,10 @@ function vi(t) {
2895
2888
  };
2896
2889
  }, []);
2897
2890
  const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0, s = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2898
- return /* @__PURE__ */ l.jsx(Ht, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2891
+ return /* @__PURE__ */ l.jsx(Vt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2899
2892
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2900
2893
  /* @__PURE__ */ l.jsx(
2901
- ct,
2894
+ st,
2902
2895
  {
2903
2896
  type: "string",
2904
2897
  title: "Name",
@@ -2908,7 +2901,7 @@ function vi(t) {
2908
2901
  }
2909
2902
  ),
2910
2903
  /* @__PURE__ */ l.jsx(
2911
- ct,
2904
+ st,
2912
2905
  {
2913
2906
  type: "string",
2914
2907
  title: "Type",
@@ -2918,7 +2911,7 @@ function vi(t) {
2918
2911
  }
2919
2912
  ),
2920
2913
  /* @__PURE__ */ l.jsx(
2921
- ct,
2914
+ st,
2922
2915
  {
2923
2916
  type: "string",
2924
2917
  title: "UUID",
@@ -2928,7 +2921,7 @@ function vi(t) {
2928
2921
  }
2929
2922
  ),
2930
2923
  /* @__PURE__ */ l.jsx(
2931
- ct,
2924
+ st,
2932
2925
  {
2933
2926
  type: "boolean",
2934
2927
  title: "Visible",
@@ -2943,15 +2936,15 @@ function vi(t) {
2943
2936
  )
2944
2937
  ] }),
2945
2938
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2946
- fi(te, t.three),
2947
- o ? mi(te, t.three) : null,
2948
- e.search("camera") > -1 ? li(te, t.three) : null,
2949
- e.search("light") > -1 ? pi(te, t.three) : null,
2950
- s ? ci(te, t.three) : null
2939
+ di(te, t.three),
2940
+ o ? fi(te, t.three) : null,
2941
+ e.search("camera") > -1 ? si(te, t.three) : null,
2942
+ e.search("light") > -1 ? hi(te, t.three) : null,
2943
+ s ? oi(te, t.three) : null
2951
2944
  ] })
2952
2945
  ] }) }, n) }, "Inspector");
2953
2946
  }
2954
- function Fi(t) {
2947
+ function Ii(t) {
2955
2948
  const [n, a] = ae(t.scene);
2956
2949
  Oe(() => {
2957
2950
  const s = (p) => {
@@ -2963,11 +2956,11 @@ function Fi(t) {
2963
2956
  }, []);
2964
2957
  const e = n !== null, o = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2965
2958
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2966
- /* @__PURE__ */ l.jsx(Ht, { label: o, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(Za, { child: n, three: t.three }) }) }),
2967
- /* @__PURE__ */ l.jsx(vi, { three: t.three })
2959
+ /* @__PURE__ */ l.jsx(Vt, { label: o, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(Ka, { child: n, three: t.three }) }) }),
2960
+ /* @__PURE__ */ l.jsx(pi, { three: t.three })
2968
2961
  ] }, "SidePanel");
2969
2962
  }
2970
- function Bi(t) {
2963
+ function Li(t) {
2971
2964
  function n() {
2972
2965
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2973
2966
  }
@@ -2990,7 +2983,7 @@ function Bi(t) {
2990
2983
  if (!n())
2991
2984
  return;
2992
2985
  const u = c.value;
2993
- Gt(u.value).then((f) => {
2986
+ Yt(u.value).then((f) => {
2994
2987
  e(u.uuid, u.key, f), e(u.uuid, "material.needsUpdate", !0);
2995
2988
  });
2996
2989
  }, p = (c) => {
@@ -2999,7 +2992,7 @@ function Bi(t) {
2999
2992
  const { key: u, uuid: f, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", f);
3000
2993
  if (E !== void 0)
3001
2994
  try {
3002
- b !== void 0 ? Ia(E, b)[u](v) : E[u](v);
2995
+ b !== void 0 ? ja(E, b)[u](v) : E[u](v);
3003
2996
  } catch (x) {
3004
2997
  console.log("Error requesting method:"), console.log(x), console.log(u), console.log(v);
3005
2998
  }
@@ -3008,8 +3001,8 @@ function Bi(t) {
3008
3001
  k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, o), k.removeEventListener(j.CREATE_TEXTURE, s), k.removeEventListener(j.REQUEST_METHOD, p);
3009
3002
  }), []), null;
3010
3003
  }
3011
- const an = { type: "change" }, $t = { type: "start" }, rn = { type: "end" }, wt = new ha(), on = new fa(), gi = Math.cos(70 * pa.DEG2RAD);
3012
- class bi extends un {
3004
+ const nn = { type: "change" }, Ut = { type: "start" }, an = { type: "end" }, xt = new ha(), rn = new fa(), mi = Math.cos(70 * pa.DEG2RAD);
3005
+ class vi extends ln {
3013
3006
  constructor(n, a) {
3014
3007
  super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), 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: Ve.ROTATE, MIDDLE: Ve.DOLLY, RIGHT: Ve.PAN }, this.touches = { ONE: He.ROTATE, TWO: He.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3015
3008
  return c.phi;
@@ -3024,12 +3017,12 @@ class bi extends un {
3024
3017
  }, this.saveState = function() {
3025
3018
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
3026
3019
  }, this.reset = function() {
3027
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(an), e.update(), s = o.NONE;
3020
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(nn), e.update(), s = o.NONE;
3028
3021
  }, this.update = function() {
3029
- const r = new X(), y = new Xt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Xt(), de = new X(), ie = 2 * Math.PI;
3030
- return function(Nt = null) {
3022
+ const r = new X(), y = new Kt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Kt(), de = new X(), ie = 2 * Math.PI;
3023
+ return function(Lt = null) {
3031
3024
  const nt = e.object.position;
3032
- r.copy(nt).sub(e.target), r.applyQuaternion(y), c.setFromVector3(r), e.autoRotate && s === o.NONE && U(_(Nt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
3025
+ r.copy(nt).sub(e.target), r.applyQuaternion(y), c.setFromVector3(r), e.autoRotate && s === o.NONE && U(_(Lt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
3033
3026
  let pe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
3034
3027
  isFinite(pe) && isFinite(he) && (pe < -Math.PI ? pe += ie : pe > Math.PI && (pe -= ie), he < -Math.PI ? he += ie : he > Math.PI && (he -= ie), pe <= he ? c.theta = Math.max(pe, Math.min(he, c.theta)) : c.theta = c.theta > (pe + he) / 2 ? Math.max(pe, c.theta) : Math.min(he, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.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 && se || e.object.isOrthographicCamera ? c.radius = me(c.radius) : c.radius = me(c.radius * f), r.setFromSpherical(c), r.applyQuaternion(O), nt.copy(e.target).add(r), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
3035
3028
  let Pe = !1;
@@ -3047,13 +3040,13 @@ class bi extends un {
3047
3040
  De.unproject(e.object), e.object.position.sub(De).add(je), e.object.updateMatrixWorld(), ke = r.length();
3048
3041
  } else
3049
3042
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
3050
- ke !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ke).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)) < gi ? n.lookAt(e.target) : (on.setFromNormalAndCoplanarPoint(e.object.up, e.target), wt.intersectPlane(on, e.target))));
3043
+ ke !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ke).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)) < mi ? n.lookAt(e.target) : (rn.setFromNormalAndCoplanarPoint(e.object.up, e.target), xt.intersectPlane(rn, e.target))));
3051
3044
  } else
3052
3045
  e.object.isOrthographicCamera && (Pe = f !== 1, Pe && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix()));
3053
- return f = 1, se = !1, Pe || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(an), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3046
+ return f = 1, se = !1, Pe || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(nn), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3054
3047
  };
3055
3048
  }(), this.dispose = function() {
3056
- e.domElement.removeEventListener("contextmenu", Ye), e.domElement.removeEventListener("pointerdown", _e), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", bt), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", et), e._domElementKeyEvents = null);
3049
+ e.domElement.removeEventListener("contextmenu", Ye), e.domElement.removeEventListener("pointerdown", _e), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", gt), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", et), e._domElementKeyEvents = null);
3057
3050
  };
3058
3051
  const e = this, o = {
3059
3052
  NONE: -1,
@@ -3066,7 +3059,7 @@ class bi extends un {
3066
3059
  TOUCH_DOLLY_ROTATE: 6
3067
3060
  };
3068
3061
  let s = o.NONE;
3069
- const p = 1e-6, c = new Zt(), u = new Zt();
3062
+ const p = 1e-6, c = new Xt(), u = new Xt();
3070
3063
  let f = 1;
3071
3064
  const v = new X(), b = new ue(), E = new ue(), x = new ue(), M = new ue(), P = new ue(), H = new ue(), B = new ue(), w = new ue(), z = new ue(), Ce = new X(), le = new ue();
3072
3065
  let se = !1;
@@ -3127,18 +3120,18 @@ class bi extends un {
3127
3120
  function xe(r) {
3128
3121
  b.set(r.clientX, r.clientY);
3129
3122
  }
3130
- function ht(r) {
3123
+ function dt(r) {
3131
3124
  J(r.clientX, r.clientX), B.set(r.clientX, r.clientY);
3132
3125
  }
3133
3126
  function Ke(r) {
3134
3127
  M.set(r.clientX, r.clientY);
3135
3128
  }
3136
- function At(r) {
3129
+ function _t(r) {
3137
3130
  E.set(r.clientX, r.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3138
3131
  const y = e.domElement;
3139
3132
  U(2 * Math.PI * x.x / y.clientHeight), $(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3140
3133
  }
3141
- function Pt(r) {
3134
+ function At(r) {
3142
3135
  w.set(r.clientX, r.clientY), z.subVectors(w, B), z.y > 0 ? T(Y(z.y)) : z.y < 0 && N(Y(z.y)), B.copy(w), e.update();
3143
3136
  }
3144
3137
  function Xe(r) {
@@ -3181,17 +3174,17 @@ class bi extends un {
3181
3174
  M.set(O, L);
3182
3175
  }
3183
3176
  }
3184
- function ft(r) {
3177
+ function ht(r) {
3185
3178
  const y = Se(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3186
3179
  B.set(0, K);
3187
3180
  }
3188
- function pt(r) {
3189
- e.enableZoom && ft(r), e.enablePan && Me(r);
3181
+ function ft(r) {
3182
+ e.enableZoom && ht(r), e.enablePan && Me(r);
3190
3183
  }
3191
- function kt(r) {
3192
- e.enableZoom && ft(r), e.enableRotate && ze(r);
3184
+ function Pt(r) {
3185
+ e.enableZoom && ht(r), e.enableRotate && ze(r);
3193
3186
  }
3194
- function mt(r) {
3187
+ function pt(r) {
3195
3188
  if (d.length == 1)
3196
3189
  E.set(r.pageX, r.pageY);
3197
3190
  else {
@@ -3217,22 +3210,22 @@ class bi extends un {
3217
3210
  const de = (r.pageX + y.x) * 0.5, ie = (r.pageY + y.y) * 0.5;
3218
3211
  J(de, ie);
3219
3212
  }
3220
- function vt(r) {
3213
+ function mt(r) {
3221
3214
  e.enableZoom && Re(r), e.enablePan && Te(r);
3222
3215
  }
3223
- function gt(r) {
3224
- e.enableZoom && Re(r), e.enableRotate && mt(r);
3216
+ function vt(r) {
3217
+ e.enableZoom && Re(r), e.enableRotate && pt(r);
3225
3218
  }
3226
3219
  function _e(r) {
3227
- e.enabled !== !1 && (d.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Je), e.domElement.addEventListener("pointerup", Ae)), Dt(r), r.pointerType === "touch" ? tt(r) : Qe(r));
3220
+ e.enabled !== !1 && (d.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Je), e.domElement.addEventListener("pointerup", Ae)), jt(r), r.pointerType === "touch" ? tt(r) : Qe(r));
3228
3221
  }
3229
3222
  function Je(r) {
3230
- e.enabled !== !1 && (r.pointerType === "touch" ? Ct(r) : jt(r));
3223
+ e.enabled !== !1 && (r.pointerType === "touch" ? Et(r) : kt(r));
3231
3224
  }
3232
3225
  function Ae(r) {
3233
- switch (It(r), d.length) {
3226
+ switch (Dt(r), d.length) {
3234
3227
  case 0:
3235
- e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(rn), s = o.NONE;
3228
+ e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(an), s = o.NONE;
3236
3229
  break;
3237
3230
  case 1:
3238
3231
  const y = d[0], O = m[y];
@@ -3259,7 +3252,7 @@ class bi extends un {
3259
3252
  case Ve.DOLLY:
3260
3253
  if (e.enableZoom === !1)
3261
3254
  return;
3262
- ht(r), s = o.DOLLY;
3255
+ dt(r), s = o.DOLLY;
3263
3256
  break;
3264
3257
  case Ve.ROTATE:
3265
3258
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
@@ -3286,19 +3279,19 @@ class bi extends un {
3286
3279
  default:
3287
3280
  s = o.NONE;
3288
3281
  }
3289
- s !== o.NONE && e.dispatchEvent($t);
3282
+ s !== o.NONE && e.dispatchEvent(Ut);
3290
3283
  }
3291
- function jt(r) {
3284
+ function kt(r) {
3292
3285
  switch (s) {
3293
3286
  case o.ROTATE:
3294
3287
  if (e.enableRotate === !1)
3295
3288
  return;
3296
- At(r);
3289
+ _t(r);
3297
3290
  break;
3298
3291
  case o.DOLLY:
3299
3292
  if (e.enableZoom === !1)
3300
3293
  return;
3301
- Pt(r);
3294
+ At(r);
3302
3295
  break;
3303
3296
  case o.PAN:
3304
3297
  if (e.enablePan === !1)
@@ -3307,10 +3300,10 @@ class bi extends un {
3307
3300
  break;
3308
3301
  }
3309
3302
  }
3310
- function bt(r) {
3311
- e.enabled === !1 || e.enableZoom === !1 || s !== o.NONE || (r.preventDefault(), e.dispatchEvent($t), Ze(yt(r)), e.dispatchEvent(rn));
3303
+ function gt(r) {
3304
+ e.enabled === !1 || e.enableZoom === !1 || s !== o.NONE || (r.preventDefault(), e.dispatchEvent(Ut), Ze(bt(r)), e.dispatchEvent(an));
3312
3305
  }
3313
- function yt(r) {
3306
+ function bt(r) {
3314
3307
  const y = r.deltaMode, O = {
3315
3308
  clientX: r.clientX,
3316
3309
  clientY: r.clientY,
@@ -3326,7 +3319,7 @@ class bi extends un {
3326
3319
  }
3327
3320
  return r.ctrlKey && !S && (O.deltaY *= 10), O;
3328
3321
  }
3329
- function Et(r) {
3322
+ function yt(r) {
3330
3323
  r.key === "Control" && (S = !0, e.domElement.getRootNode().addEventListener("keyup", we, { passive: !0, capture: !0 }));
3331
3324
  }
3332
3325
  function we(r) {
@@ -3336,7 +3329,7 @@ class bi extends un {
3336
3329
  e.enabled === !1 || e.enablePan === !1 || $e(r);
3337
3330
  }
3338
3331
  function tt(r) {
3339
- switch (xt(r), d.length) {
3332
+ switch (Ct(r), d.length) {
3340
3333
  case 1:
3341
3334
  switch (e.touches.ONE) {
3342
3335
  case He.ROTATE:
@@ -3358,12 +3351,12 @@ class bi extends un {
3358
3351
  case He.DOLLY_PAN:
3359
3352
  if (e.enableZoom === !1 && e.enablePan === !1)
3360
3353
  return;
3361
- pt(r), s = o.TOUCH_DOLLY_PAN;
3354
+ ft(r), s = o.TOUCH_DOLLY_PAN;
3362
3355
  break;
3363
3356
  case He.DOLLY_ROTATE:
3364
3357
  if (e.enableZoom === !1 && e.enableRotate === !1)
3365
3358
  return;
3366
- kt(r), s = o.TOUCH_DOLLY_ROTATE;
3359
+ Pt(r), s = o.TOUCH_DOLLY_ROTATE;
3367
3360
  break;
3368
3361
  default:
3369
3362
  s = o.NONE;
@@ -3372,14 +3365,14 @@ class bi extends un {
3372
3365
  default:
3373
3366
  s = o.NONE;
3374
3367
  }
3375
- s !== o.NONE && e.dispatchEvent($t);
3368
+ s !== o.NONE && e.dispatchEvent(Ut);
3376
3369
  }
3377
- function Ct(r) {
3378
- switch (xt(r), s) {
3370
+ function Et(r) {
3371
+ switch (Ct(r), s) {
3379
3372
  case o.TOUCH_ROTATE:
3380
3373
  if (e.enableRotate === !1)
3381
3374
  return;
3382
- mt(r), e.update();
3375
+ pt(r), e.update();
3383
3376
  break;
3384
3377
  case o.TOUCH_PAN:
3385
3378
  if (e.enablePan === !1)
@@ -3389,12 +3382,12 @@ class bi extends un {
3389
3382
  case o.TOUCH_DOLLY_PAN:
3390
3383
  if (e.enableZoom === !1 && e.enablePan === !1)
3391
3384
  return;
3392
- vt(r), e.update();
3385
+ mt(r), e.update();
3393
3386
  break;
3394
3387
  case o.TOUCH_DOLLY_ROTATE:
3395
3388
  if (e.enableZoom === !1 && e.enableRotate === !1)
3396
3389
  return;
3397
- gt(r), e.update();
3390
+ vt(r), e.update();
3398
3391
  break;
3399
3392
  default:
3400
3393
  s = o.NONE;
@@ -3403,10 +3396,10 @@ class bi extends un {
3403
3396
  function Ye(r) {
3404
3397
  e.enabled !== !1 && r.preventDefault();
3405
3398
  }
3406
- function Dt(r) {
3399
+ function jt(r) {
3407
3400
  d.push(r.pointerId);
3408
3401
  }
3409
- function It(r) {
3402
+ function Dt(r) {
3410
3403
  delete m[r.pointerId];
3411
3404
  for (let y = 0; y < d.length; y++)
3412
3405
  if (d[y] == r.pointerId) {
@@ -3414,7 +3407,7 @@ class bi extends un {
3414
3407
  return;
3415
3408
  }
3416
3409
  }
3417
- function xt(r) {
3410
+ function Ct(r) {
3418
3411
  let y = m[r.pointerId];
3419
3412
  y === void 0 && (y = new ue(), m[r.pointerId] = y), y.set(r.pageX, r.pageY);
3420
3413
  }
@@ -3422,10 +3415,10 @@ class bi extends un {
3422
3415
  const y = r.pointerId === d[0] ? d[1] : d[0];
3423
3416
  return m[y];
3424
3417
  }
3425
- e.domElement.addEventListener("contextmenu", Ye), e.domElement.addEventListener("pointerdown", _e), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", bt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", Et, { passive: !0, capture: !0 }), this.update();
3418
+ e.domElement.addEventListener("contextmenu", Ye), e.domElement.addEventListener("pointerdown", _e), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", gt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", yt, { passive: !0, capture: !0 }), this.update();
3426
3419
  }
3427
3420
  }
3428
- const Mt = (t) => {
3421
+ const Ot = (t) => {
3429
3422
  const [n, a] = ae(t.options[t.index]), e = () => {
3430
3423
  t.onToggle(!t.open);
3431
3424
  }, o = (s) => {
@@ -3435,14 +3428,14 @@ const Mt = (t) => {
3435
3428
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3436
3429
  t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => o(s), children: s }, s)) })
3437
3430
  ] });
3438
- }, Le = Ma(function(n, a) {
3431
+ }, Le = Sa(function(n, a) {
3439
3432
  const [e, o] = ae(!1), s = n.options.indexOf(n.camera.name);
3440
3433
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3441
3434
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3442
3435
  e && o(!1);
3443
3436
  } }),
3444
3437
  /* @__PURE__ */ l.jsx(
3445
- Mt,
3438
+ Ot,
3446
3439
  {
3447
3440
  index: s,
3448
3441
  open: e,
@@ -3455,14 +3448,14 @@ const Mt = (t) => {
3455
3448
  }
3456
3449
  )
3457
3450
  ] });
3458
- }), sn = [
3451
+ }), on = [
3459
3452
  "Single",
3460
3453
  "Side by Side",
3461
3454
  "Stacked",
3462
3455
  "Quad"
3463
3456
  ], ne = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), be = /* @__PURE__ */ new Map();
3464
3457
  function Ue(t, n) {
3465
- const a = new Rn(-100, 100, 100, -100, 50, 3e3);
3458
+ const a = new Tn(-100, 100, 100, -100, 50, 3e3);
3466
3459
  return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
3467
3460
  }
3468
3461
  Ue("Top", new X(0, 1e3, 0));
@@ -3472,47 +3465,47 @@ Ue("Right", new X(1e3, 0, 0));
3472
3465
  Ue("Front", new X(0, 0, 1e3));
3473
3466
  Ue("Back", new X(0, 0, -1e3));
3474
3467
  Ue("Orthographic", new X(1e3, 1e3, 1e3));
3475
- const _t = new zt(60, 1, 50, 3e3);
3476
- _t.name = "Debug";
3477
- _t.position.set(500, 500, 500);
3478
- _t.lookAt(0, 0, 0);
3479
- ne.set("Debug", _t);
3480
- const cn = [
3468
+ const Rt = new $t(60, 1, 50, 3e3);
3469
+ Rt.name = "Debug";
3470
+ Rt.position.set(500, 500, 500);
3471
+ Rt.lookAt(0, 0, 0);
3472
+ ne.set("Debug", Rt);
3473
+ const sn = [
3481
3474
  "Renderer",
3482
3475
  "Depth",
3483
3476
  "Normals",
3484
3477
  "UVs",
3485
3478
  "Wireframe"
3486
- ], yi = new ma(), Ei = new va(), Ci = new Xa(), xi = new ga({
3479
+ ], gi = new ma(), bi = new va(), yi = new qa(), Ei = new ga({
3487
3480
  opacity: 0.33,
3488
3481
  transparent: !0,
3489
3482
  wireframe: !0
3490
3483
  });
3491
- let St = "Renderer";
3492
- const V = new _n();
3484
+ let wt = "Renderer";
3485
+ const V = new Rn();
3493
3486
  V.name = "Debug Scene";
3494
- let ye = new _n();
3487
+ let ye = new Rn();
3495
3488
  V.add(ye);
3496
- const dt = new ba();
3497
- dt.name = "helpers";
3498
- V.add(dt);
3499
- const wi = new Wa();
3500
- dt.add(wi);
3501
- const Un = new An(500);
3489
+ const ut = new ba();
3490
+ ut.name = "helpers";
3491
+ V.add(ut);
3492
+ const Ci = new Va();
3493
+ ut.add(Ci);
3494
+ const Un = new _n(500);
3502
3495
  Un.name = "axisHelper";
3503
- dt.add(Un);
3504
- const ut = new An(100);
3505
- ut.name = "interactionHelper";
3506
- dt.add(ut);
3507
- ut.visible = !1;
3508
- let Ot = !1, G = ne.get("Debug"), oe = ne.get("Orthographic"), Ne = ne.get("Front"), Fe = ne.get("Top"), ln = !1;
3509
- function Ui(t) {
3496
+ ut.add(Un);
3497
+ const lt = new _n(100);
3498
+ lt.name = "interactionHelper";
3499
+ ut.add(lt);
3500
+ lt.visible = !1;
3501
+ let St = !1, G = ne.get("Debug"), oe = ne.get("Orthographic"), Ne = ne.get("Front"), Fe = ne.get("Top"), cn = !1;
3502
+ function Ni(t) {
3510
3503
  const [n, a] = ae(t.mode !== void 0 ? t.mode : "Single"), [e, o] = ae(null), [s, p] = ae(!1), [c, u] = ae(!1), [f, v] = ae(!1), [, b] = ae(Date.now()), E = Ee(null), x = Ee(null), M = Ee(null), P = Ee(null), H = Ee(null), B = Ee(null), w = (d, m) => {
3511
3504
  const S = re.get(d.name);
3512
3505
  S !== void 0 && S.dispose(), re.delete(d.name);
3513
3506
  const _ = be.get(d.name);
3514
3507
  _ !== void 0 && (V.remove(_), _.dispose()), be.delete(d.name);
3515
- const Y = new bi(d, m);
3508
+ const Y = new vi(d, m);
3516
3509
  switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, d.name) {
3517
3510
  case "Top":
3518
3511
  case "Bottom":
@@ -3523,7 +3516,7 @@ function Ui(t) {
3523
3516
  Y.enableRotate = !1;
3524
3517
  break;
3525
3518
  }
3526
- if (re.set(d.name, Y), d instanceof zt) {
3519
+ if (re.set(d.name, Y), d instanceof $t) {
3527
3520
  const U = new Ca(d);
3528
3521
  be.set(d.name, U), V.add(U);
3529
3522
  }
@@ -3560,11 +3553,11 @@ function Ui(t) {
3560
3553
  d.autoClear = !1, d.shadowMap.enabled = !0, d.setPixelRatio(devicePixelRatio), d.setClearColor(0), o(d);
3561
3554
  }, []), Oe(() => {
3562
3555
  const d = (_) => {
3563
- Dn(ye), V.remove(ye);
3556
+ jn(ye), V.remove(ye);
3564
3557
  const Y = t.scenes.get(_.value.name);
3565
3558
  if (Y !== void 0) {
3566
3559
  const U = new Y();
3567
- t.onSceneSet !== void 0 && t.onSceneSet(U), ye = U, t.three.scene = ye, V.add(ye), ln = !0;
3560
+ t.onSceneSet !== void 0 && t.onSceneSet(U), ye = U, t.three.scene = ye, V.add(ye), cn = !0;
3568
3561
  }
3569
3562
  }, m = (_) => {
3570
3563
  const Y = _.value, U = t.three.scene?.getObjectByProperty("uuid", Y.uuid);
@@ -3594,7 +3587,7 @@ function Ui(t) {
3594
3587
  break;
3595
3588
  }
3596
3589
  ne.forEach((J) => {
3597
- J instanceof Rn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof zt && (J.aspect = T / N, J.updateProjectionMatrix(), be.get(J.name)?.update());
3590
+ J instanceof Tn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof $t && (J.aspect = T / N, J.updateProjectionMatrix(), be.get(J.name)?.update());
3598
3591
  });
3599
3592
  }, $ = () => {
3600
3593
  e.setViewport(0, 0, d, m), e.setScissor(0, 0, d, m), e.render(V, G);
@@ -3611,7 +3604,7 @@ function Ui(t) {
3611
3604
  }, q = () => {
3612
3605
  switch (re.forEach((T) => {
3613
3606
  T.update();
3614
- }), t.onSceneUpdate !== void 0 && ln && t.onSceneUpdate(ye), e.clear(), n) {
3607
+ }), t.onSceneUpdate !== void 0 && cn && t.onSceneUpdate(ye), e.clear(), n) {
3615
3608
  case "Single":
3616
3609
  $();
3617
3610
  break;
@@ -3646,7 +3639,7 @@ function Ui(t) {
3646
3639
  break;
3647
3640
  }
3648
3641
  }, _ = ($) => {
3649
- if (!Ot)
3642
+ if (!St)
3650
3643
  return;
3651
3644
  const I = new ue();
3652
3645
  e.getSize(I);
@@ -3670,9 +3663,9 @@ function Ui(t) {
3670
3663
  }
3671
3664
  S(W, q, T, N);
3672
3665
  const xe = d.intersectObjects(ye.children);
3673
- xe.length > 0 && ut.position.copy(xe[0].point);
3666
+ xe.length > 0 && lt.position.copy(xe[0].point);
3674
3667
  }, Y = ($) => {
3675
- if (!Ot)
3668
+ if (!St)
3676
3669
  return;
3677
3670
  const I = new ue();
3678
3671
  if (e.getSize(I), $.clientX >= I.x)
@@ -3734,10 +3727,10 @@ function Ui(t) {
3734
3727
  ] }),
3735
3728
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3736
3729
  /* @__PURE__ */ l.jsx(
3737
- Mt,
3730
+ Ot,
3738
3731
  {
3739
- index: sn.indexOf(n),
3740
- options: sn,
3732
+ index: on.indexOf(n),
3733
+ options: on,
3741
3734
  onSelect: (d) => {
3742
3735
  d !== n && (Ce(), a(d));
3743
3736
  },
@@ -3748,28 +3741,28 @@ function Ui(t) {
3748
3741
  }
3749
3742
  ),
3750
3743
  /* @__PURE__ */ l.jsx(
3751
- Mt,
3744
+ Ot,
3752
3745
  {
3753
- index: cn.indexOf(St),
3754
- options: cn,
3746
+ index: sn.indexOf(wt),
3747
+ options: sn,
3755
3748
  onSelect: (d) => {
3756
- if (d !== St)
3757
- switch (St = d, St) {
3749
+ if (d !== wt)
3750
+ switch (wt = d, wt) {
3758
3751
  case "Depth":
3759
- V.overrideMaterial = yi;
3752
+ V.overrideMaterial = gi;
3760
3753
  break;
3761
3754
  case "Normals":
3762
- V.overrideMaterial = Ei;
3755
+ V.overrideMaterial = bi;
3763
3756
  break;
3764
3757
  default:
3765
3758
  case "Renderer":
3766
3759
  V.overrideMaterial = null;
3767
3760
  break;
3768
3761
  case "Wireframe":
3769
- V.overrideMaterial = xi;
3762
+ V.overrideMaterial = Ei;
3770
3763
  break;
3771
3764
  case "UVs":
3772
- V.overrideMaterial = Ci;
3765
+ V.overrideMaterial = yi;
3773
3766
  break;
3774
3767
  }
3775
3768
  },
@@ -3780,7 +3773,7 @@ function Ui(t) {
3780
3773
  }
3781
3774
  ),
3782
3775
  /* @__PURE__ */ l.jsx(
3783
- Mt,
3776
+ Ot,
3784
3777
  {
3785
3778
  index: 0,
3786
3779
  options: [
@@ -3788,7 +3781,7 @@ function Ui(t) {
3788
3781
  "Selection Mode"
3789
3782
  ],
3790
3783
  onSelect: (d) => {
3791
- Ot = d === "Selection Mode", ut.visible = Ot;
3784
+ St = d === "Selection Mode", lt.visible = St;
3792
3785
  },
3793
3786
  open: f,
3794
3787
  onToggle: (d) => {
@@ -3799,7 +3792,7 @@ function Ui(t) {
3799
3792
  ] })
3800
3793
  ] });
3801
3794
  }
3802
- function $i(t) {
3795
+ function Fi(t) {
3803
3796
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3804
3797
  /* @__PURE__ */ l.jsx("header", { children: t.header }),
3805
3798
  t.children,
@@ -3807,41 +3800,41 @@ function $i(t) {
3807
3800
  ] });
3808
3801
  }
3809
3802
  export {
3810
- Ht as Accordion,
3811
- ji as Application,
3812
- Rt as BaseRemote,
3803
+ Vt as Accordion,
3804
+ Ai as Application,
3805
+ Tt as BaseRemote,
3813
3806
  Fn as ChildObject,
3814
- Za as ContainerObject,
3815
- $a as Draggable,
3816
- Ua as DraggableItem,
3817
- za as Dropdown,
3818
- Ya as DropdownItem,
3819
- $i as Editor,
3820
- Wa as InfiniteGridHelper,
3821
- vi as Inspector,
3822
- Ui as MultiView,
3807
+ Ka as ContainerObject,
3808
+ Ba as Draggable,
3809
+ Fa as DraggableItem,
3810
+ Ua as Dropdown,
3811
+ $a as DropdownItem,
3812
+ Fi as Editor,
3813
+ Va as InfiniteGridHelper,
3814
+ pi as Inspector,
3815
+ Ni as MultiView,
3823
3816
  Nn as NavButton,
3824
- Di as RemoteComponents,
3825
- Ni as RemoteController,
3826
- st as RemoteTheatre,
3827
- Ii as RemoteThree,
3828
- Li as RemoteTweakpane,
3829
- Bi as SceneInspector,
3830
- Fi as SidePanel,
3817
+ Pi as RemoteComponents,
3818
+ Di as RemoteController,
3819
+ In as RemoteTheatre,
3820
+ ki as RemoteThree,
3821
+ ji as RemoteTweakpane,
3822
+ Li as SceneInspector,
3823
+ Ii as SidePanel,
3831
3824
  j as ToolEvents,
3832
- Xa as UVMaterial,
3833
- lt as capitalize,
3834
- Ai as clamp,
3835
- _a as colorToHex,
3825
+ qa as UVMaterial,
3826
+ ct as capitalize,
3827
+ Ti as clamp,
3828
+ Ta as colorToHex,
3836
3829
  k as debugDispatcher,
3837
- Dn as dispose,
3838
- Pa as disposeMaterial,
3839
- ki as disposeTexture,
3840
- Pi as distance,
3841
- jn as hierarchyUUID,
3842
- Ra as isColor,
3843
- Ta as randomID,
3844
- Aa as resetThreeObjects,
3845
- Ft as round,
3846
- Yt as totalThreeObjects
3830
+ jn as dispose,
3831
+ _a as disposeMaterial,
3832
+ _i as disposeTexture,
3833
+ Ri as distance,
3834
+ kn as hierarchyUUID,
3835
+ Ma as isColor,
3836
+ Oa as randomID,
3837
+ Ra as resetThreeObjects,
3838
+ Nt as round,
3839
+ zt as totalThreeObjects
3847
3840
  };