@tomorrowevening/hermes 0.0.30 → 0.0.31

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,85 +1,85 @@
1
- var Wn = Object.defineProperty;
2
- var qn = (t, n, a) => n in t ? Wn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
- var U = (t, n, a) => (qn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
- import { PositionalAudio as Kn, EventDispatcher as dn, Texture as fn, CubeTexture as Xn, RepeatWrapping as Xt, ShaderMaterial as hn, GLSL3 as Zn, DoubleSide as pn, Color as Tt, Mesh as Jn, PlaneGeometry as Qn, FrontSide as ea, BackSide as ta, NoBlending as na, NormalBlending as aa, AdditiveBlending as ia, SubtractiveBlending as ra, MultiplyBlending as oa, CustomBlending as sa, AddEquation as ca, SubtractEquation as la, ReverseSubtractEquation as ua, MinEquation as da, MaxEquation as fa, ZeroFactor as mn, OneFactor as vn, SrcColorFactor as gn, OneMinusSrcColorFactor as bn, SrcAlphaFactor as yn, OneMinusSrcAlphaFactor as En, DstAlphaFactor as Cn, OneMinusDstAlphaFactor as xn, DstColorFactor as Sn, OneMinusDstColorFactor as wn, SrcAlphaSaturateFactor as ha, ConstantColorFactor as On, OneMinusConstantColorFactor as Mn, ConstantAlphaFactor as Tn, OneMinusConstantAlphaFactor as Rn, Matrix4 as pa, Vector3 as Z, Euler as ma, Ray as va, Plane as ga, MathUtils as ba, MOUSE as He, TOUCH as We, Quaternion as Zt, Spherical as Jt, Vector2 as de, PerspectiveCamera as Yt, MeshDepthMaterial as ya, MeshNormalMaterial as Ea, MeshBasicMaterial as Ca, OrthographicCamera as Pn, Scene as An, Group as xa, AxesHelper as _n, WebGLRenderer as Sa, Raycaster as wa, CameraHelper as Oa } from "three";
5
- import { getProject as Ma } from "@theatre/core";
6
- import ct from "@theatre/studio";
7
- import { Pane as Ta } from "tweakpane";
8
- import * as Ra from "@tweakpane/plugin-essentials";
9
- import kn, { useState as le, useRef as Ce, useEffect as Be, Component as Pa, forwardRef as Aa } from "react";
10
- import { Reorder as jn } from "framer-motion";
11
- function lt(t) {
1
+ var qn = Object.defineProperty;
2
+ var Kn = (t, n, a) => n in t ? qn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
+ var F = (t, n, a) => (Kn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
+ import { PositionalAudio as Xn, EventDispatcher as fn, Texture as hn, CubeTexture as Zn, RepeatWrapping as Zt, ShaderMaterial as pn, GLSL3 as Jn, DoubleSide as mn, Color as Pt, Mesh as Qn, PlaneGeometry as ea, FrontSide as ta, BackSide as na, NoBlending as aa, NormalBlending as ia, AdditiveBlending as ra, SubtractiveBlending as oa, MultiplyBlending as sa, CustomBlending as ca, AddEquation as la, SubtractEquation as ua, ReverseSubtractEquation as da, MinEquation as fa, MaxEquation as ha, ZeroFactor as vn, OneFactor as gn, SrcColorFactor as bn, OneMinusSrcColorFactor as yn, SrcAlphaFactor as En, OneMinusSrcAlphaFactor as Cn, DstAlphaFactor as xn, OneMinusDstAlphaFactor as Sn, DstColorFactor as wn, OneMinusDstColorFactor as On, SrcAlphaSaturateFactor as pa, ConstantColorFactor as Mn, OneMinusConstantColorFactor as Tn, ConstantAlphaFactor as Rn, OneMinusConstantAlphaFactor as Pn, Matrix4 as ma, Vector3 as Z, Euler as va, Ray as ga, Plane as ba, MathUtils as ya, MOUSE as He, TOUCH as We, Quaternion as Jt, Spherical as Qt, Vector2 as de, PerspectiveCamera as Gt, MeshDepthMaterial as Ea, MeshNormalMaterial as Ca, MeshBasicMaterial as xa, OrthographicCamera as An, Scene as kn, Group as Sa, AxesHelper as _n, WebGLRenderer as wa, Raycaster as Oa, CameraHelper as Ma } from "three";
5
+ import { getProject as Ta, createRafDriver as Ra } from "@theatre/core";
6
+ import ut from "@theatre/studio";
7
+ import { Pane as Pa } from "tweakpane";
8
+ import * as Aa from "@tweakpane/plugin-essentials";
9
+ import jn, { useState as le, useRef as Ce, useEffect as Be, Component as ka, forwardRef as _a } from "react";
10
+ import { Reorder as Dn } from "framer-motion";
11
+ function dt(t) {
12
12
  return t.substring(0, 1).toUpperCase() + t.substring(1);
13
13
  }
14
- function Gi(t, n, a) {
14
+ function Hi(t, n, a) {
15
15
  return Math.min(n, Math.max(t, a));
16
16
  }
17
- function Vi(t, n) {
17
+ function Wi(t, n) {
18
18
  const a = t - n;
19
19
  return Math.sqrt(a * a);
20
20
  }
21
- function _a() {
21
+ function ja() {
22
22
  return Math.round(Math.random() * 1e6).toString();
23
23
  }
24
- function ka(t) {
24
+ function Da(t) {
25
25
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
26
26
  }
27
- function ja(t) {
27
+ function Ia(t) {
28
28
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), r = (l) => {
29
29
  const d = l.toString(16);
30
30
  return d.length === 1 ? "0" + d : d;
31
31
  }, s = r(n), h = r(a), c = r(e);
32
32
  return "#" + s + h + c;
33
33
  }
34
- function Bt(t, n = 1) {
34
+ function Ut(t, n = 1) {
35
35
  return Number(t.toFixed(n));
36
36
  }
37
- let Gt = 0;
38
- const Da = () => {
39
- Gt = 0;
40
- }, Dn = (t) => {
37
+ let Vt = 0;
38
+ const La = () => {
39
+ Vt = 0;
40
+ }, In = (t) => {
41
41
  if (!t)
42
42
  return;
43
43
  let n = t.name.replace(" ", "");
44
- n.length === 0 && (n = `obj_${Gt}`, Gt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
45
- Dn(a);
44
+ n.length === 0 && (n = `obj_${Vt}`, Vt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
45
+ In(a);
46
46
  });
47
- }, Hi = (t) => {
47
+ }, qi = (t) => {
48
48
  t == null || t.dispose();
49
- }, Ia = (t) => {
49
+ }, Na = (t) => {
50
50
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
51
- }, In = (t) => {
51
+ }, Ln = (t) => {
52
52
  var n;
53
53
  if (t) {
54
54
  for (; t.children.length > 0; ) {
55
55
  const a = t.children[0];
56
- a instanceof Kn ? (a.pause(), a.parent && a.parent.remove(a)) : In(a);
56
+ a instanceof Xn ? (a.pause(), a.parent && a.parent.remove(a)) : Ln(a);
57
57
  }
58
58
  if (t.parent && t.parent.remove(t), t.isMesh) {
59
59
  const a = t;
60
- (n = a.geometry) == null || n.dispose(), Ia(a.material);
60
+ (n = a.geometry) == null || n.dispose(), Na(a.material);
61
61
  }
62
62
  t.dispose !== void 0 && t.dispose();
63
63
  }
64
64
  };
65
- class Wi {
65
+ class Ki {
66
66
  constructor(n, a, e = !0, r = "editor") {
67
- U(this, "components", /* @__PURE__ */ new Map());
68
- U(this, "listen");
67
+ F(this, "components", /* @__PURE__ */ new Map());
68
+ F(this, "listen");
69
69
  // Protected
70
- U(this, "_debugEnabled");
71
- U(this, "broadcastChannel");
72
- U(this, "webSocket");
73
- U(this, "_mode", "app");
74
- U(this, "_connected", !1);
75
- U(this, "useBC", !1);
76
- U(this, "messageHandler", (n) => {
70
+ F(this, "_debugEnabled");
71
+ F(this, "broadcastChannel");
72
+ F(this, "webSocket");
73
+ F(this, "_mode", "app");
74
+ F(this, "_connected", !1);
75
+ F(this, "useBC", !1);
76
+ F(this, "messageHandler", (n) => {
77
77
  this.listen !== void 0 && (this.useBC ? this.listen(n.data) : this.listen(JSON.parse(n.data)));
78
78
  });
79
- U(this, "openHandler", () => {
79
+ F(this, "openHandler", () => {
80
80
  this._connected = !0;
81
81
  });
82
- U(this, "closeHandler", () => {
82
+ F(this, "closeHandler", () => {
83
83
  this._connected = !1;
84
84
  });
85
85
  this.editor = a && document.location.hash.search(r) > -1, this._debugEnabled = a, a && (this.useBC = e, e ? (this.broadcastChannel = new BroadcastChannel(n), this.broadcastChannel.addEventListener("message", this.messageHandler)) : (this.webSocket = new WebSocket(n), this.webSocket.addEventListener("open", this.openHandler), this.webSocket.addEventListener("close", this.closeHandler), this.webSocket.addEventListener("message", this.messageHandler)));
@@ -117,7 +117,7 @@ class Wi {
117
117
  n && (this._mode = "editor", document.title += " - Editor");
118
118
  }
119
119
  }
120
- const k = new dn(), j = {
120
+ const _ = new fn(), j = {
121
121
  CUSTOM: "ToolEvents::custom",
122
122
  // Components
123
123
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -133,15 +133,15 @@ const k = new dn(), j = {
133
133
  ADD_CAMERA: "ToolEvents::addCamera",
134
134
  REMOVE_CAMERA: "ToolEvents::removeCamera"
135
135
  };
136
- class Rt {
136
+ class At {
137
137
  constructor(n) {
138
- U(this, "app");
138
+ F(this, "app");
139
139
  this.app = n;
140
140
  }
141
141
  dispose() {
142
142
  }
143
143
  }
144
- class La extends Rt {
144
+ class Fa extends At {
145
145
  selectDropdown(n, a) {
146
146
  this.app.send({
147
147
  event: "selectComponent",
@@ -163,30 +163,28 @@ class La extends Rt {
163
163
  });
164
164
  }
165
165
  }
166
- function Na(t, n) {
166
+ function Ba(t, n) {
167
167
  switch (n.event) {
168
168
  case "selectComponent":
169
- k.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
169
+ _.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
170
170
  break;
171
171
  case "draggableListUpdate":
172
- k.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
172
+ _.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
173
173
  break;
174
174
  }
175
175
  }
176
- const Ln = () => {
177
- };
178
- class Pt extends Rt {
176
+ const Nn = () => {
177
+ }, Xe = class Xe extends At {
179
178
  constructor() {
180
179
  super(...arguments);
181
- U(this, "project");
182
- U(this, "sheets", /* @__PURE__ */ new Map());
183
- U(this, "sheetObjects", /* @__PURE__ */ new Map());
184
- U(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
185
- U(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
180
+ F(this, "project");
181
+ F(this, "sheets", /* @__PURE__ */ new Map());
182
+ F(this, "sheetObjects", /* @__PURE__ */ new Map());
183
+ F(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
184
+ F(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
186
185
  }
187
- // private static rafDriver: IRafDriver | null = null;
188
186
  init(a, e) {
189
- return this.project = Ma(a, e), this.project.ready;
187
+ return this.project = Ta(a, e), this.project.ready;
190
188
  }
191
189
  dispose() {
192
190
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -236,12 +234,12 @@ class Pt extends Rt {
236
234
  return;
237
235
  const c = `${a}_${e}`;
238
236
  let l = this.sheetObjects.get(c);
239
- l !== void 0 ? l = h.object(e, { ...r, ...l.value }, { reconfigure: !0 }) : l = h.object(e, r), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, s !== void 0 ? s : Ln);
237
+ l !== void 0 ? l = h.object(e, { ...r, ...l.value }, { reconfigure: !0 }) : l = h.object(e, r), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, s !== void 0 ? s : Nn);
240
238
  const d = l.onValuesChange((b) => {
241
239
  if (this.app.editor) {
242
240
  for (const E in b) {
243
241
  const S = b[E];
244
- typeof S == "object" && ka(S) && (b[E] = {
242
+ typeof S == "object" && Da(S) && (b[E] = {
245
243
  r: S.r,
246
244
  g: S.g,
247
245
  b: S.b,
@@ -273,25 +271,23 @@ class Pt extends Rt {
273
271
  const h = `${e}_${r}`, c = this.sheetObjectUnsubscribe.get(h);
274
272
  c !== void 0 && (this.sheetObjects.delete(h), this.sheetObjectCBs.delete(h), this.sheetObjectUnsubscribe.delete(h), c());
275
273
  }
276
- // public static getRafDriver(): IRafDriver {
277
- // if (!RemoteTheatre.rafDriver) {
278
- // RemoteTheatre.rafDriver = createRafDriver();
279
- // }
280
- // return RemoteTheatre.rafDriver;
281
- // }
282
- }
283
- let Oe;
284
- function Fa(t, n) {
274
+ static getRafDriver() {
275
+ return Xe.rafDriver || (Xe.rafDriver = Ra()), Xe.rafDriver;
276
+ }
277
+ };
278
+ F(Xe, "rafDriver", null);
279
+ let Ze = Xe, Oe;
280
+ function Ua(t, n) {
285
281
  t.components.forEach((a) => {
286
- if (a instanceof Pt) {
282
+ if (a instanceof Ze) {
287
283
  let e;
288
284
  const r = a;
289
285
  switch (n.event) {
290
286
  case "setSheet":
291
- e = r.sheets.get(n.data.sheet), e !== void 0 && (Oe = e, ct.setSelection([e]));
287
+ e = r.sheets.get(n.data.sheet), e !== void 0 && (Oe = e, ut.setSelection([e]));
292
288
  break;
293
289
  case "setSheetObject":
294
- e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && ct.setSelection([e]);
290
+ e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && ut.setSelection([e]);
295
291
  break;
296
292
  case "updateSheetObject":
297
293
  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);
@@ -303,12 +299,12 @@ function Fa(t, n) {
303
299
  }
304
300
  });
305
301
  }
306
- function Ba(t) {
302
+ function $a(t) {
307
303
  if (t.editor) {
308
304
  let n;
309
305
  t.components.forEach((s) => {
310
- s instanceof Pt && (n = s);
311
- }), ct.ui.restore(), ct.onSelectionChange((s) => {
306
+ s instanceof Ze && (n = s);
307
+ }), ut.ui.restore(), ut.onSelectionChange((s) => {
312
308
  s.length < 1 || s.forEach((h) => {
313
309
  let c = h.address.sheetId, l = "setSheet", d = {};
314
310
  switch (h.type) {
@@ -347,12 +343,12 @@ function Ba(t) {
347
343
  };
348
344
  e(), r();
349
345
  } else
350
- ct.ui.hide();
346
+ ut.ui.hide();
351
347
  }
352
- function Ua(t, n) {
348
+ function za(t, n) {
353
349
  t.editor && t.components.forEach((a) => {
354
350
  var e, r;
355
- if (a instanceof Pt) {
351
+ if (a instanceof Ze) {
356
352
  const s = a;
357
353
  switch (n.event) {
358
354
  case "playSheet":
@@ -366,7 +362,7 @@ function Ua(t, n) {
366
362
  }
367
363
  });
368
364
  }
369
- function $a(t) {
365
+ function Ya(t) {
370
366
  if (t.name === "cameras")
371
367
  return "camera";
372
368
  if (t.name === "interactive")
@@ -380,7 +376,7 @@ function $a(t) {
380
376
  const n = t.type;
381
377
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
382
378
  }
383
- function Nn(t) {
379
+ function Fn(t) {
384
380
  const n = {
385
381
  name: t.name,
386
382
  type: t.type,
@@ -388,10 +384,10 @@ function Nn(t) {
388
384
  children: []
389
385
  };
390
386
  return t.children.forEach((a) => {
391
- n.children.push(Nn(a));
387
+ n.children.push(Fn(a));
392
388
  }), n;
393
389
  }
394
- function za(t) {
390
+ function Ga(t) {
395
391
  const n = {};
396
392
  for (const a in t) {
397
393
  const e = t[a].value;
@@ -399,7 +395,7 @@ function za(t) {
399
395
  }
400
396
  return n;
401
397
  }
402
- function Ya(t) {
398
+ function Va(t) {
403
399
  switch (t) {
404
400
  case "blendSrcAlpha":
405
401
  case "blendDstAlpha":
@@ -414,7 +410,7 @@ function Ya(t) {
414
410
  function qe(t) {
415
411
  const n = {};
416
412
  for (const a in t) {
417
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ya(a))
413
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Va(a))
418
414
  continue;
419
415
  const e = typeof t[a], r = t[a];
420
416
  switch (e) {
@@ -426,13 +422,13 @@ function qe(t) {
426
422
  case "object":
427
423
  if (r !== null)
428
424
  if (n[a] = r, r.isTexture)
429
- if (r instanceof fn) {
425
+ if (r instanceof hn) {
430
426
  const s = r.source.toJSON();
431
427
  n[a] = { src: s.url };
432
428
  } else
433
- r instanceof Xn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
429
+ r instanceof Zn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
434
430
  else
435
- a === "uniforms" && (n[a] = za(n[a]));
431
+ a === "uniforms" && (n[a] = Ga(n[a]));
436
432
  else
437
433
  n[a] = { src: "" };
438
434
  break;
@@ -440,7 +436,7 @@ function qe(t) {
440
436
  }
441
437
  return n;
442
438
  }
443
- function Ut(t) {
439
+ function $t(t) {
444
440
  t.updateMatrix();
445
441
  const n = {
446
442
  name: t.name,
@@ -518,7 +514,7 @@ function Ut(t) {
518
514
  });
519
515
  return n;
520
516
  }
521
- function Ga(t, n) {
517
+ function Ha(t, n) {
522
518
  const a = n.split(".");
523
519
  switch (a.length) {
524
520
  case 1:
@@ -555,19 +551,19 @@ function ne(t, n, a) {
555
551
  break;
556
552
  }
557
553
  }
558
- function Vt(t) {
554
+ function Ht(t) {
559
555
  return new Promise((n, a) => {
560
556
  const e = new Image();
561
557
  e.onload = () => {
562
- const r = new fn(e);
563
- r.wrapS = Xt, r.wrapT = Xt, r.needsUpdate = !0, n(r);
558
+ const r = new hn(e);
559
+ r.wrapS = Zt, r.wrapT = Zt, r.needsUpdate = !0, n(r);
564
560
  }, e.onerror = a, e.src = t;
565
561
  });
566
562
  }
567
- class Va extends Rt {
563
+ class Wa extends At {
568
564
  constructor() {
569
565
  super(...arguments);
570
- U(this, "scene");
566
+ F(this, "scene");
571
567
  }
572
568
  getObject(a) {
573
569
  this.app.debugEnabled && this.app.send({
@@ -577,7 +573,7 @@ class Va extends Rt {
577
573
  });
578
574
  }
579
575
  setObject(a) {
580
- const e = Ut(a);
576
+ const e = $t(a);
581
577
  this.app.send({
582
578
  event: "setObject",
583
579
  target: "editor",
@@ -621,8 +617,8 @@ class Va extends Rt {
621
617
  setScene(a) {
622
618
  if (a === void 0 || (this.scene = a, !this.app.debugEnabled))
623
619
  return;
624
- Da(), Dn(this.scene);
625
- const e = Nn(this.scene);
620
+ La(), In(this.scene);
621
+ const e = Fn(this.scene);
626
622
  this.app.send({
627
623
  event: "setScene",
628
624
  target: "editor",
@@ -632,7 +628,7 @@ class Va extends Rt {
632
628
  addCamera(a) {
633
629
  if (!this.app.debugEnabled)
634
630
  return;
635
- const e = Ut(a);
631
+ const e = $t(a);
636
632
  this.app.send({
637
633
  event: "addCamera",
638
634
  target: "editor",
@@ -642,7 +638,7 @@ class Va extends Rt {
642
638
  removeCamera(a) {
643
639
  if (!this.app.debugEnabled)
644
640
  return;
645
- const e = Ut(a);
641
+ const e = $t(a);
646
642
  this.app.send({
647
643
  event: "removeCamera",
648
644
  target: "editor",
@@ -650,51 +646,51 @@ class Va extends Rt {
650
646
  });
651
647
  }
652
648
  }
653
- function Ha(t, n) {
649
+ function qa(t, n) {
654
650
  switch (n.event) {
655
651
  case "getObject":
656
- k.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
652
+ _.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
657
653
  break;
658
654
  case "updateObject":
659
- k.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
655
+ _.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
660
656
  break;
661
657
  case "createTexture":
662
- k.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
658
+ _.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
663
659
  break;
664
660
  case "requestMethod":
665
- k.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
661
+ _.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
666
662
  break;
667
663
  }
668
664
  }
669
- function Wa(t, n) {
665
+ function Ka(t, n) {
670
666
  switch (n.event) {
671
667
  case "setObject":
672
- k.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
668
+ _.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
673
669
  break;
674
670
  case "setScene":
675
- k.dispatchEvent({ type: j.SET_SCENE, value: n.data });
671
+ _.dispatchEvent({ type: j.SET_SCENE, value: n.data });
676
672
  break;
677
673
  case "addCamera":
678
- k.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
674
+ _.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
679
675
  break;
680
676
  case "removeCamera":
681
- k.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
677
+ _.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
682
678
  break;
683
679
  }
684
680
  }
685
- class Fn extends Rt {
681
+ class Bn extends At {
686
682
  constructor(a) {
687
683
  super(a);
688
- U(this, "bindCBs");
689
- U(this, "buttonCBs");
690
- U(this, "pane");
691
- U(this, "appCallbacks", 0);
692
- U(this, "editorCallbacks", 0);
693
- U(this, "inspectorFolder");
684
+ F(this, "bindCBs");
685
+ F(this, "buttonCBs");
686
+ F(this, "pane");
687
+ F(this, "appCallbacks", 0);
688
+ F(this, "editorCallbacks", 0);
689
+ F(this, "inspectorFolder");
694
690
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
695
691
  }
696
692
  createGUI() {
697
- this.pane = new Ta({ title: "GUI" }), this.pane.registerPlugin(Ra);
693
+ this.pane = new Pa({ title: "GUI" }), this.pane.registerPlugin(Aa);
698
694
  }
699
695
  dispose() {
700
696
  var a;
@@ -721,7 +717,7 @@ class Fn extends Rt {
721
717
  }
722
718
  // Binding
723
719
  bind(a, e, r, s = void 0) {
724
- const h = this.bindID, c = r.onChange !== void 0 ? r.onChange : Ln;
720
+ const h = this.bindID, c = r.onChange !== void 0 ? r.onChange : Nn;
725
721
  this.bindCBs.set(h, c), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (d) => {
726
722
  this.app.send({
727
723
  event: "updateBind",
@@ -782,9 +778,9 @@ class Fn extends Rt {
782
778
  this.inspectorFolder.remove(this.inspectorFolder.children[e]);
783
779
  }
784
780
  }
785
- function qa(t, n) {
781
+ function Xa(t, n) {
786
782
  t.components.forEach((a) => {
787
- if (a instanceof Fn) {
783
+ if (a instanceof Bn) {
788
784
  const e = a;
789
785
  switch (n.event) {
790
786
  case "addFolder":
@@ -807,7 +803,7 @@ function qa(t, n) {
807
803
  }
808
804
  });
809
805
  }
810
- var Ht = { exports: {} }, it = {};
806
+ var Wt = { exports: {} }, ot = {};
811
807
  /**
812
808
  * @license React
813
809
  * react-jsx-runtime.production.min.js
@@ -817,12 +813,12 @@ var Ht = { exports: {} }, it = {};
817
813
  * This source code is licensed under the MIT license found in the
818
814
  * LICENSE file in the root directory of this source tree.
819
815
  */
820
- var Qt;
821
- function Ka() {
822
- if (Qt)
823
- return it;
824
- Qt = 1;
825
- var t = kn, 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 };
816
+ var en;
817
+ function Za() {
818
+ if (en)
819
+ return ot;
820
+ en = 1;
821
+ var t = jn, 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 };
826
822
  function h(c, l, d) {
827
823
  var b, m = {}, E = null, S = null;
828
824
  d !== void 0 && (E = "" + d), l.key !== void 0 && (E = "" + l.key), l.ref !== void 0 && (S = l.ref);
@@ -833,9 +829,9 @@ function Ka() {
833
829
  m[b] === void 0 && (m[b] = l[b]);
834
830
  return { $$typeof: n, type: c, key: E, ref: S, props: m, _owner: r.current };
835
831
  }
836
- return it.Fragment = a, it.jsx = h, it.jsxs = h, it;
832
+ return ot.Fragment = a, ot.jsx = h, ot.jsxs = h, ot;
837
833
  }
838
- var rt = {};
834
+ var st = {};
839
835
  /**
840
836
  * @license React
841
837
  * react-jsx-runtime.development.js
@@ -845,10 +841,10 @@ var rt = {};
845
841
  * This source code is licensed under the MIT license found in the
846
842
  * LICENSE file in the root directory of this source tree.
847
843
  */
848
- var en;
849
- function Xa() {
850
- return en || (en = 1, process.env.NODE_ENV !== "production" && function() {
851
- var t = kn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), x = Symbol.iterator, T = "@@iterator";
844
+ var tn;
845
+ function Ja() {
846
+ return tn || (tn = 1, process.env.NODE_ENV !== "production" && function() {
847
+ var t = jn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), x = Symbol.iterator, T = "@@iterator";
852
848
  function W(i) {
853
849
  if (i === null || typeof i != "object")
854
850
  return null;
@@ -867,8 +863,8 @@ function Xa() {
867
863
  {
868
864
  var O = I.ReactDebugCurrentFrame, D = O.getStackAddendum();
869
865
  D !== "" && (p += "%s", g = g.concat([D]));
870
- var $ = g.map(function(_) {
871
- return String(_);
866
+ var $ = g.map(function(k) {
867
+ return String(k);
872
868
  });
873
869
  $.unshift("Warning: " + p), Function.prototype.apply.call(console[i], console, $);
874
870
  }
@@ -892,7 +888,7 @@ function Xa() {
892
888
  function z(i) {
893
889
  return i.displayName || "Context";
894
890
  }
895
- function F(i) {
891
+ function B(i) {
896
892
  if (i == null)
897
893
  return null;
898
894
  if (typeof i.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
@@ -925,11 +921,11 @@ function Xa() {
925
921
  return Y(i, i.render, "ForwardRef");
926
922
  case m:
927
923
  var O = i.displayName || null;
928
- return O !== null ? O : F(i.type) || "Memo";
924
+ return O !== null ? O : B(i.type) || "Memo";
929
925
  case E: {
930
- var D = i, $ = D._payload, _ = D._init;
926
+ var D = i, $ = D._payload, k = D._init;
931
927
  try {
932
- return F(_($));
928
+ return B(k($));
933
929
  } catch {
934
930
  return null;
935
931
  }
@@ -937,18 +933,18 @@ function Xa() {
937
933
  }
938
934
  return null;
939
935
  }
940
- var L = Object.assign, q = 0, K, R, B, Q, fe, xe, ft;
941
- function Xe() {
936
+ var L = Object.assign, q = 0, K, R, U, Q, fe, xe, pt;
937
+ function Je() {
942
938
  }
943
- Xe.__reactDisabledLog = !0;
939
+ Je.__reactDisabledLog = !0;
944
940
  function _t() {
945
941
  {
946
942
  if (q === 0) {
947
- K = console.log, R = console.info, B = console.warn, Q = console.error, fe = console.group, xe = console.groupCollapsed, ft = console.groupEnd;
943
+ K = console.log, R = console.info, U = console.warn, Q = console.error, fe = console.group, xe = console.groupCollapsed, pt = console.groupEnd;
948
944
  var i = {
949
945
  configurable: !0,
950
946
  enumerable: !0,
951
- value: Xe,
947
+ value: Je,
952
948
  writable: !0
953
949
  };
954
950
  Object.defineProperties(console, {
@@ -964,7 +960,7 @@ function Xa() {
964
960
  q++;
965
961
  }
966
962
  }
967
- function kt() {
963
+ function jt() {
968
964
  {
969
965
  if (q--, q === 0) {
970
966
  var i = {
@@ -980,7 +976,7 @@ function Xa() {
980
976
  value: R
981
977
  }),
982
978
  warn: L({}, i, {
983
- value: B
979
+ value: U
984
980
  }),
985
981
  error: L({}, i, {
986
982
  value: Q
@@ -992,33 +988,33 @@ function Xa() {
992
988
  value: xe
993
989
  }),
994
990
  groupEnd: L({}, i, {
995
- value: ft
991
+ value: pt
996
992
  })
997
993
  });
998
994
  }
999
995
  q < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1000
996
  }
1001
997
  }
1002
- var Ze = I.ReactCurrentDispatcher, Je;
998
+ var Qe = I.ReactCurrentDispatcher, et;
1003
999
  function ze(i, p, g) {
1004
1000
  {
1005
- if (Je === void 0)
1001
+ if (et === void 0)
1006
1002
  try {
1007
1003
  throw Error();
1008
1004
  } catch (D) {
1009
1005
  var O = D.stack.trim().match(/\n( *(at )?)/);
1010
- Je = O && O[1] || "";
1006
+ et = O && O[1] || "";
1011
1007
  }
1012
1008
  return `
1013
- ` + Je + i;
1009
+ ` + et + i;
1014
1010
  }
1015
1011
  }
1016
1012
  var Ye = !1, Me;
1017
1013
  {
1018
- var ht = typeof WeakMap == "function" ? WeakMap : Map;
1019
- Me = new ht();
1014
+ var mt = typeof WeakMap == "function" ? WeakMap : Map;
1015
+ Me = new mt();
1020
1016
  }
1021
- function pt(i, p) {
1017
+ function vt(i, p) {
1022
1018
  if (!i || Ye)
1023
1019
  return "";
1024
1020
  {
@@ -1031,30 +1027,30 @@ function Xa() {
1031
1027
  var D = Error.prepareStackTrace;
1032
1028
  Error.prepareStackTrace = void 0;
1033
1029
  var $;
1034
- $ = Ze.current, Ze.current = null, _t();
1030
+ $ = Qe.current, Qe.current = null, _t();
1035
1031
  try {
1036
1032
  if (p) {
1037
- var _ = function() {
1033
+ var k = function() {
1038
1034
  throw Error();
1039
1035
  };
1040
- if (Object.defineProperty(_.prototype, "props", {
1036
+ if (Object.defineProperty(k.prototype, "props", {
1041
1037
  set: function() {
1042
1038
  throw Error();
1043
1039
  }
1044
1040
  }), typeof Reflect == "object" && Reflect.construct) {
1045
1041
  try {
1046
- Reflect.construct(_, []);
1042
+ Reflect.construct(k, []);
1047
1043
  } catch (be) {
1048
1044
  O = be;
1049
1045
  }
1050
- Reflect.construct(i, [], _);
1046
+ Reflect.construct(i, [], k);
1051
1047
  } else {
1052
1048
  try {
1053
- _.call();
1049
+ k.call();
1054
1050
  } catch (be) {
1055
1051
  O = be;
1056
1052
  }
1057
- i.call(_.prototype);
1053
+ i.call(k.prototype);
1058
1054
  }
1059
1055
  } else {
1060
1056
  try {
@@ -1084,15 +1080,15 @@ function Xa() {
1084
1080
  }
1085
1081
  }
1086
1082
  } finally {
1087
- Ye = !1, Ze.current = $, kt(), Error.prepareStackTrace = D;
1083
+ Ye = !1, Qe.current = $, jt(), Error.prepareStackTrace = D;
1088
1084
  }
1089
- var Ve = i ? i.displayName || i.name : "", Kt = Ve ? ze(Ve) : "";
1090
- return typeof i == "function" && Me.set(i, Kt), Kt;
1085
+ var Ve = i ? i.displayName || i.name : "", Xt = Ve ? ze(Ve) : "";
1086
+ return typeof i == "function" && Me.set(i, Xt), Xt;
1091
1087
  }
1092
- function jt(i, p, g) {
1093
- return pt(i, !1);
1088
+ function Dt(i, p, g) {
1089
+ return vt(i, !1);
1094
1090
  }
1095
- function mt(i) {
1091
+ function gt(i) {
1096
1092
  var p = i.prototype;
1097
1093
  return !!(p && p.isReactComponent);
1098
1094
  }
@@ -1100,7 +1096,7 @@ function Xa() {
1100
1096
  if (i == null)
1101
1097
  return "";
1102
1098
  if (typeof i == "function")
1103
- return pt(i, mt(i));
1099
+ return vt(i, gt(i));
1104
1100
  if (typeof i == "string")
1105
1101
  return ze(i);
1106
1102
  switch (i) {
@@ -1112,7 +1108,7 @@ function Xa() {
1112
1108
  if (typeof i == "object")
1113
1109
  switch (i.$$typeof) {
1114
1110
  case l:
1115
- return jt(i.render);
1111
+ return Dt(i.render);
1116
1112
  case m:
1117
1113
  return Te(i.type, p, g);
1118
1114
  case E: {
@@ -1125,65 +1121,65 @@ function Xa() {
1125
1121
  }
1126
1122
  return "";
1127
1123
  }
1128
- var Re = Object.prototype.hasOwnProperty, vt = {}, gt = I.ReactDebugCurrentFrame;
1124
+ var Re = Object.prototype.hasOwnProperty, bt = {}, yt = I.ReactDebugCurrentFrame;
1129
1125
  function Pe(i) {
1130
1126
  if (i) {
1131
1127
  var p = i._owner, g = Te(i.type, i._source, p ? p.type : null);
1132
- gt.setExtraStackFrame(g);
1128
+ yt.setExtraStackFrame(g);
1133
1129
  } else
1134
- gt.setExtraStackFrame(null);
1130
+ yt.setExtraStackFrame(null);
1135
1131
  }
1136
- function Qe(i, p, g, O, D) {
1132
+ function tt(i, p, g, O, D) {
1137
1133
  {
1138
1134
  var $ = Function.call.bind(Re);
1139
- for (var _ in i)
1140
- if ($(i, _)) {
1135
+ for (var k in i)
1136
+ if ($(i, k)) {
1141
1137
  var P = void 0;
1142
1138
  try {
1143
- if (typeof i[_] != "function") {
1144
- var ue = Error((O || "React class") + ": " + g + " type `" + _ + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[_] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1139
+ if (typeof i[k] != "function") {
1140
+ var ue = Error((O || "React class") + ": " + g + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1145
1141
  throw ue.name = "Invariant Violation", ue;
1146
1142
  }
1147
- P = i[_](p, _, O, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1143
+ P = i[k](p, k, O, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1148
1144
  } catch (J) {
1149
1145
  P = J;
1150
1146
  }
1151
- P && !(P instanceof Error) && (Pe(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).", O || "React class", g, _, typeof P), Pe(null)), P instanceof Error && !(P.message in vt) && (vt[P.message] = !0, Pe(D), w("Failed %s type: %s", g, P.message), Pe(null));
1147
+ P && !(P instanceof Error) && (Pe(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).", O || "React class", g, k, typeof P), Pe(null)), P instanceof Error && !(P.message in bt) && (bt[P.message] = !0, Pe(D), w("Failed %s type: %s", g, P.message), Pe(null));
1152
1148
  }
1153
1149
  }
1154
1150
  }
1155
1151
  var Ae = Array.isArray;
1156
- function et(i) {
1152
+ function nt(i) {
1157
1153
  return Ae(i);
1158
1154
  }
1159
- function Dt(i) {
1155
+ function It(i) {
1160
1156
  {
1161
1157
  var p = typeof Symbol == "function" && Symbol.toStringTag, g = p && i[Symbol.toStringTag] || i.constructor.name || "Object";
1162
1158
  return g;
1163
1159
  }
1164
1160
  }
1165
- function bt(i) {
1161
+ function Et(i) {
1166
1162
  try {
1167
- return yt(i), !1;
1163
+ return Ct(i), !1;
1168
1164
  } catch {
1169
1165
  return !0;
1170
1166
  }
1171
1167
  }
1172
- function yt(i) {
1168
+ function Ct(i) {
1173
1169
  return "" + i;
1174
1170
  }
1175
- function Et(i) {
1176
- if (bt(i))
1177
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Dt(i)), yt(i);
1171
+ function xt(i) {
1172
+ if (Et(i))
1173
+ return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", It(i)), Ct(i);
1178
1174
  }
1179
- var Se = I.ReactCurrentOwner, tt = {
1175
+ var Se = I.ReactCurrentOwner, at = {
1180
1176
  key: !0,
1181
1177
  ref: !0,
1182
1178
  __self: !0,
1183
1179
  __source: !0
1184
- }, nt, Ct, Ge;
1180
+ }, it, St, Ge;
1185
1181
  Ge = {};
1186
- function It(i) {
1182
+ function Lt(i) {
1187
1183
  if (Re.call(i, "ref")) {
1188
1184
  var p = Object.getOwnPropertyDescriptor(i, "ref").get;
1189
1185
  if (p && p.isReactWarning)
@@ -1191,7 +1187,7 @@ function Xa() {
1191
1187
  }
1192
1188
  return i.ref !== void 0;
1193
1189
  }
1194
- function Lt(i) {
1190
+ function Nt(i) {
1195
1191
  if (Re.call(i, "key")) {
1196
1192
  var p = Object.getOwnPropertyDescriptor(i, "key").get;
1197
1193
  if (p && p.isReactWarning)
@@ -1199,16 +1195,16 @@ function Xa() {
1199
1195
  }
1200
1196
  return i.key !== void 0;
1201
1197
  }
1202
- function xt(i, p) {
1198
+ function wt(i, p) {
1203
1199
  if (typeof i.ref == "string" && Se.current && p && Se.current.stateNode !== p) {
1204
- var g = F(Se.current.type);
1205
- Ge[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', F(Se.current.type), i.ref), Ge[g] = !0);
1200
+ var g = B(Se.current.type);
1201
+ Ge[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', B(Se.current.type), i.ref), Ge[g] = !0);
1206
1202
  }
1207
1203
  }
1208
1204
  function we(i, p) {
1209
1205
  {
1210
1206
  var g = function() {
1211
- nt || (nt = !0, w("%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)", p));
1207
+ it || (it = !0, w("%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)", p));
1212
1208
  };
1213
1209
  g.isReactWarning = !0, Object.defineProperty(i, "key", {
1214
1210
  get: g,
@@ -1216,10 +1212,10 @@ function Xa() {
1216
1212
  });
1217
1213
  }
1218
1214
  }
1219
- function qt(i, p) {
1215
+ function Kt(i, p) {
1220
1216
  {
1221
1217
  var g = function() {
1222
- 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)", p));
1218
+ St || (St = !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)", p));
1223
1219
  };
1224
1220
  g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1225
1221
  get: g,
@@ -1227,7 +1223,7 @@ function Xa() {
1227
1223
  });
1228
1224
  }
1229
1225
  }
1230
- var o = function(i, p, g, O, D, $, _) {
1226
+ var o = function(i, p, g, O, D, $, k) {
1231
1227
  var P = {
1232
1228
  // This tag allows us to uniquely identify this as a React Element
1233
1229
  $$typeof: n,
@@ -1235,7 +1231,7 @@ function Xa() {
1235
1231
  type: i,
1236
1232
  key: p,
1237
1233
  ref: g,
1238
- props: _,
1234
+ props: k,
1239
1235
  // Record the component responsible for creating this element.
1240
1236
  _owner: $
1241
1237
  };
@@ -1258,20 +1254,20 @@ function Xa() {
1258
1254
  };
1259
1255
  function y(i, p, g, O, D) {
1260
1256
  {
1261
- var $, _ = {}, P = null, ue = null;
1262
- g !== void 0 && (Et(g), P = "" + g), Lt(p) && (Et(p.key), P = "" + p.key), It(p) && (ue = p.ref, xt(p, D));
1257
+ var $, k = {}, P = null, ue = null;
1258
+ g !== void 0 && (xt(g), P = "" + g), Nt(p) && (xt(p.key), P = "" + p.key), Lt(p) && (ue = p.ref, wt(p, D));
1263
1259
  for ($ in p)
1264
- Re.call(p, $) && !tt.hasOwnProperty($) && (_[$] = p[$]);
1260
+ Re.call(p, $) && !at.hasOwnProperty($) && (k[$] = p[$]);
1265
1261
  if (i && i.defaultProps) {
1266
1262
  var J = i.defaultProps;
1267
1263
  for ($ in J)
1268
- _[$] === void 0 && (_[$] = J[$]);
1264
+ k[$] === void 0 && (k[$] = J[$]);
1269
1265
  }
1270
1266
  if (P || ue) {
1271
1267
  var ee = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1272
- P && we(_, ee), ue && qt(_, ee);
1268
+ P && we(k, ee), ue && Kt(k, ee);
1273
1269
  }
1274
- return o(i, P, ue, D, O, Se.current, _);
1270
+ return o(i, P, ue, D, O, Se.current, k);
1275
1271
  }
1276
1272
  }
1277
1273
  var M = I.ReactCurrentOwner, N = I.ReactDebugCurrentFrame;
@@ -1287,10 +1283,10 @@ function Xa() {
1287
1283
  function oe(i) {
1288
1284
  return typeof i == "object" && i !== null && i.$$typeof === n;
1289
1285
  }
1290
- function Nt() {
1286
+ function Ft() {
1291
1287
  {
1292
1288
  if (M.current) {
1293
- var i = F(M.current.type);
1289
+ var i = B(M.current.type);
1294
1290
  if (i)
1295
1291
  return `
1296
1292
 
@@ -1299,7 +1295,7 @@ Check the render method of \`` + i + "`.";
1299
1295
  return "";
1300
1296
  }
1301
1297
  }
1302
- function Ft(i) {
1298
+ function Bt(i) {
1303
1299
  {
1304
1300
  if (i !== void 0) {
1305
1301
  var p = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
@@ -1310,10 +1306,10 @@ Check your code at ` + p + ":" + g + ".";
1310
1306
  return "";
1311
1307
  }
1312
1308
  }
1313
- var at = {};
1309
+ var rt = {};
1314
1310
  function ge(i) {
1315
1311
  {
1316
- var p = Nt();
1312
+ var p = Ft();
1317
1313
  if (!p) {
1318
1314
  var g = typeof i == "string" ? i : i.displayName || i.name;
1319
1315
  g && (p = `
@@ -1329,18 +1325,18 @@ Check the top-level render call using <` + g + ">.");
1329
1325
  return;
1330
1326
  i._store.validated = !0;
1331
1327
  var g = ge(p);
1332
- if (at[g])
1328
+ if (rt[g])
1333
1329
  return;
1334
- at[g] = !0;
1330
+ rt[g] = !0;
1335
1331
  var O = "";
1336
- i && i._owner && i._owner !== M.current && (O = " It was passed a child from " + F(i._owner.type) + "."), X(i), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, O), X(null);
1332
+ i && i._owner && i._owner !== M.current && (O = " It was passed a child from " + B(i._owner.type) + "."), X(i), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, O), X(null);
1337
1333
  }
1338
1334
  }
1339
- function _e(i, p) {
1335
+ function ke(i, p) {
1340
1336
  {
1341
1337
  if (typeof i != "object")
1342
1338
  return;
1343
- if (et(i))
1339
+ if (nt(i))
1344
1340
  for (var g = 0; g < i.length; g++) {
1345
1341
  var O = i[g];
1346
1342
  oe(O) && me(O, p);
@@ -1350,12 +1346,12 @@ Check the top-level render call using <` + g + ">.");
1350
1346
  else if (i) {
1351
1347
  var D = W(i);
1352
1348
  if (typeof D == "function" && D !== i.entries)
1353
- for (var $ = D.call(i), _; !(_ = $.next()).done; )
1354
- oe(_.value) && me(_.value, p);
1349
+ for (var $ = D.call(i), k; !(k = $.next()).done; )
1350
+ oe(k.value) && me(k.value, p);
1355
1351
  }
1356
1352
  }
1357
1353
  }
1358
- function ke(i) {
1354
+ function _e(i) {
1359
1355
  {
1360
1356
  var p = i.type;
1361
1357
  if (p == null || typeof p == "string")
@@ -1370,11 +1366,11 @@ Check the top-level render call using <` + g + ">.");
1370
1366
  else
1371
1367
  return;
1372
1368
  if (g) {
1373
- var O = F(p);
1374
- Qe(g, i.props, "prop", O, i);
1369
+ var O = B(p);
1370
+ tt(g, i.props, "prop", O, i);
1375
1371
  } else if (p.PropTypes !== void 0 && !pe) {
1376
1372
  pe = !0;
1377
- var D = F(p);
1373
+ var D = B(p);
1378
1374
  w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
1379
1375
  }
1380
1376
  typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
@@ -1394,54 +1390,54 @@ Check the top-level render call using <` + g + ">.");
1394
1390
  }
1395
1391
  function De(i, p, g, O, D, $) {
1396
1392
  {
1397
- var _ = A(i);
1398
- if (!_) {
1393
+ var k = A(i);
1394
+ if (!k) {
1399
1395
  var P = "";
1400
1396
  (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1401
- var ue = Ft(D);
1402
- ue ? P += ue : P += Nt();
1397
+ var ue = Bt(D);
1398
+ ue ? P += ue : P += Ft();
1403
1399
  var J;
1404
- i === null ? J = "null" : et(i) ? J = "array" : i !== void 0 && i.$$typeof === n ? (J = "<" + (F(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : J = 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", J, P);
1400
+ i === null ? J = "null" : nt(i) ? J = "array" : i !== void 0 && i.$$typeof === n ? (J = "<" + (B(i.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : J = 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", J, P);
1405
1401
  }
1406
1402
  var ee = y(i, p, g, D, $);
1407
1403
  if (ee == null)
1408
1404
  return ee;
1409
- if (_) {
1405
+ if (k) {
1410
1406
  var ve = p.children;
1411
1407
  if (ve !== void 0)
1412
1408
  if (O)
1413
- if (et(ve)) {
1409
+ if (nt(ve)) {
1414
1410
  for (var Ve = 0; Ve < ve.length; Ve++)
1415
- _e(ve[Ve], i);
1411
+ ke(ve[Ve], i);
1416
1412
  Object.freeze && Object.freeze(ve);
1417
1413
  } else
1418
1414
  w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1419
1415
  else
1420
- _e(ve, i);
1416
+ ke(ve, i);
1421
1417
  }
1422
- return i === e ? je(ee) : ke(ee), ee;
1418
+ return i === e ? je(ee) : _e(ee), ee;
1423
1419
  }
1424
1420
  }
1425
- function Yn(i, p, g) {
1421
+ function Gn(i, p, g) {
1426
1422
  return De(i, p, g, !0);
1427
1423
  }
1428
- function Gn(i, p, g) {
1424
+ function Vn(i, p, g) {
1429
1425
  return De(i, p, g, !1);
1430
1426
  }
1431
- var Vn = Gn, Hn = Yn;
1432
- rt.Fragment = e, rt.jsx = Vn, rt.jsxs = Hn;
1433
- }()), rt;
1427
+ var Hn = Vn, Wn = Gn;
1428
+ st.Fragment = e, st.jsx = Hn, st.jsxs = Wn;
1429
+ }()), st;
1434
1430
  }
1435
- process.env.NODE_ENV === "production" ? Ht.exports = Ka() : Ht.exports = Xa();
1436
- var u = Ht.exports;
1437
- function Bn(t) {
1431
+ process.env.NODE_ENV === "production" ? Wt.exports = Za() : Wt.exports = Ja();
1432
+ var u = Wt.exports;
1433
+ function Un(t) {
1438
1434
  return t.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ u.jsx("button", { children: t.title });
1439
1435
  }
1440
- const Za = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1436
+ const Qa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1441
1437
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1442
1438
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1443
1439
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1444
- ] }), Ja = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1440
+ ] }), ei = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1445
1441
  "path",
1446
1442
  {
1447
1443
  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
@@ -1449,16 +1445,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
1449
1445
  C11,8.22,10.74,8,10.43,8z`
1450
1446
  }
1451
1447
  ) });
1452
- function Qa(t) {
1453
- return /* @__PURE__ */ u.jsx(jn.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1454
- Ja,
1448
+ function ti(t) {
1449
+ return /* @__PURE__ */ u.jsx(Dn.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1450
+ ei,
1455
1451
  /* @__PURE__ */ u.jsx("span", { children: t.title }),
1456
1452
  /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1457
1453
  t.onDelete(t.index);
1458
- }, children: Za })
1454
+ }, children: Qa })
1459
1455
  ] }) }, t.title);
1460
1456
  }
1461
- function ei(t) {
1457
+ function ni(t) {
1462
1458
  const [n, a] = le(!1), [e, r] = le(t.options), s = (d) => {
1463
1459
  t.onDragComplete(d), r(d);
1464
1460
  }, h = (d) => {
@@ -1466,18 +1462,18 @@ function ei(t) {
1466
1462
  b.splice(d, 1), s(b);
1467
1463
  }, c = [];
1468
1464
  e.forEach((d, b) => {
1469
- c.push(/* @__PURE__ */ u.jsx(Qa, { index: b, title: d, onDelete: h }, d));
1465
+ c.push(/* @__PURE__ */ u.jsx(ti, { index: b, title: d, onDelete: h }, d));
1470
1466
  });
1471
1467
  let l = "dropdown draggable";
1472
1468
  return t.subdropdown && (l += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: l, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1473
- /* @__PURE__ */ u.jsx(Bn, { title: t.title }),
1474
- /* @__PURE__ */ u.jsx(jn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1469
+ /* @__PURE__ */ u.jsx(Un, { title: t.title }),
1470
+ /* @__PURE__ */ u.jsx(Dn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1475
1471
  ] });
1476
1472
  }
1477
- function ti(t) {
1473
+ function ai(t) {
1478
1474
  const [n, a] = le(!1), e = [];
1479
1475
  t.options.map((s, h) => {
1480
- t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(ni, { option: s }, h));
1476
+ t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(ii, { option: s }, h));
1481
1477
  });
1482
1478
  let r = "dropdown";
1483
1479
  return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ u.jsxs(
@@ -1487,7 +1483,7 @@ function ti(t) {
1487
1483
  onMouseEnter: () => a(!0),
1488
1484
  onMouseLeave: () => a(!1),
1489
1485
  children: [
1490
- /* @__PURE__ */ u.jsx(Bn, { title: t.title }),
1486
+ /* @__PURE__ */ u.jsx(Un, { title: t.title }),
1491
1487
  /* @__PURE__ */ u.jsx(
1492
1488
  "ul",
1493
1489
  {
@@ -1499,13 +1495,13 @@ function ti(t) {
1499
1495
  }
1500
1496
  );
1501
1497
  }
1502
- function ni(t) {
1498
+ function ii(t) {
1503
1499
  const { option: n } = t, [a, e] = le("");
1504
1500
  let r;
1505
1501
  switch (n.type) {
1506
1502
  case "draggable":
1507
1503
  r = /* @__PURE__ */ u.jsx(
1508
- ei,
1504
+ ni,
1509
1505
  {
1510
1506
  title: n.title,
1511
1507
  options: n.value,
@@ -1518,7 +1514,7 @@ function ni(t) {
1518
1514
  break;
1519
1515
  case "dropdown":
1520
1516
  r = /* @__PURE__ */ u.jsx(
1521
- ti,
1517
+ ai,
1522
1518
  {
1523
1519
  title: n.title,
1524
1520
  options: n.value,
@@ -1539,24 +1535,24 @@ function ni(t) {
1539
1535
  );
1540
1536
  break;
1541
1537
  }
1542
- return /* @__PURE__ */ u.jsx("li", { className: a === n.title ? "selected" : "", children: r }, _a());
1538
+ return /* @__PURE__ */ u.jsx("li", { className: a === n.title ? "selected" : "", children: r }, ja());
1543
1539
  }
1544
- function qi(t) {
1540
+ function Xi(t) {
1545
1541
  const n = [], a = [];
1546
1542
  t.components.forEach((s) => {
1547
- s instanceof La ? n.push(Na) : s instanceof Pt ? (n.push(Fa), a.push(Ua), Ba(t)) : s instanceof Va ? (n.push(Ha), a.push(Wa)) : s instanceof Fn && n.push(qa);
1543
+ s instanceof Fa ? n.push(Ba) : s instanceof Ze ? (n.push(Ua), a.push(za), $a(t)) : s instanceof Wa ? (n.push(qa), a.push(Ka)) : s instanceof Bn && n.push(Xa);
1548
1544
  });
1549
1545
  function e(s) {
1550
1546
  switch (n.forEach((h) => h(t, s)), s.event) {
1551
1547
  case "custom":
1552
- k.dispatchEvent({ type: j.CUSTOM, value: s.data });
1548
+ _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1553
1549
  break;
1554
1550
  }
1555
1551
  }
1556
1552
  function r(s) {
1557
1553
  switch (a.forEach((h) => h(t, s)), s.event) {
1558
1554
  case "custom":
1559
- k.dispatchEvent({ type: j.CUSTOM, value: s.data });
1555
+ _.dispatchEvent({ type: j.CUSTOM, value: s.data });
1560
1556
  break;
1561
1557
  }
1562
1558
  }
@@ -1564,7 +1560,7 @@ function qi(t) {
1564
1560
  s.target === "editor" ? r(s) : e(s);
1565
1561
  };
1566
1562
  }
1567
- const ai = `out vec3 worldPosition;
1563
+ const ri = `out vec3 worldPosition;
1568
1564
  uniform float uDistance;
1569
1565
 
1570
1566
  void main() {
@@ -1573,7 +1569,7 @@ void main() {
1573
1569
  worldPosition.xz += cameraPosition.xz;
1574
1570
 
1575
1571
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1576
- }`, ii = `out vec4 fragColor;
1572
+ }`, oi = `out vec4 fragColor;
1577
1573
  in vec3 worldPosition;
1578
1574
 
1579
1575
  uniform float uDivisions;
@@ -1641,14 +1637,14 @@ void main() {
1641
1637
 
1642
1638
  if (fragColor.a <= 0.0) discard;
1643
1639
  }`;
1644
- class ri extends hn {
1640
+ class si extends pn {
1645
1641
  constructor(n) {
1646
1642
  super({
1647
1643
  extensions: {
1648
1644
  derivatives: !0
1649
1645
  },
1650
- glslVersion: Zn,
1651
- side: pn,
1646
+ glslVersion: Jn,
1647
+ side: mn,
1652
1648
  transparent: !0,
1653
1649
  uniforms: {
1654
1650
  uScale: {
@@ -1658,7 +1654,7 @@ class ri extends hn {
1658
1654
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
1659
1655
  },
1660
1656
  uColor: {
1661
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Tt(16777215)
1657
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Pt(16777215)
1662
1658
  },
1663
1659
  uDistance: {
1664
1660
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -1670,25 +1666,25 @@ class ri extends hn {
1670
1666
  value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
1671
1667
  }
1672
1668
  },
1673
- vertexShader: ai,
1674
- fragmentShader: ii,
1669
+ vertexShader: ri,
1670
+ fragmentShader: oi,
1675
1671
  name: "InfiniteGrid",
1676
1672
  depthWrite: !1
1677
1673
  });
1678
1674
  }
1679
1675
  }
1680
- class oi extends Jn {
1676
+ class ci extends Qn {
1681
1677
  constructor() {
1682
- const a = new ri();
1683
- super(new Qn(2, 2), a);
1684
- U(this, "gridMaterial");
1678
+ const a = new si();
1679
+ super(new ea(2, 2), a);
1680
+ F(this, "gridMaterial");
1685
1681
  this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1686
1682
  }
1687
1683
  update() {
1688
1684
  this.gridMaterial.needsUpdate = !0;
1689
1685
  }
1690
1686
  }
1691
- const si = `#include <common>
1687
+ const li = `#include <common>
1692
1688
  #include <batching_pars_vertex>
1693
1689
  #include <uv_pars_vertex>
1694
1690
  #include <color_pars_vertex>
@@ -1718,7 +1714,7 @@ void main() {
1718
1714
  #include <logdepthbuf_vertex>
1719
1715
  #include <clipping_planes_vertex>
1720
1716
  #include <worldpos_vertex>
1721
- }`, ci = `
1717
+ }`, ui = `
1722
1718
  #include <common>
1723
1719
  #include <uv_pars_fragment>
1724
1720
  #include <clipping_planes_pars_fragment>
@@ -1727,18 +1723,18 @@ void main() {
1727
1723
  #include <clipping_planes_fragment>
1728
1724
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1729
1725
  }`;
1730
- class li extends hn {
1726
+ class di extends pn {
1731
1727
  constructor() {
1732
1728
  super({
1733
1729
  defines: {
1734
1730
  USE_UV: ""
1735
1731
  },
1736
- vertexShader: si,
1737
- fragmentShader: ci
1732
+ vertexShader: li,
1733
+ fragmentShader: ui
1738
1734
  });
1739
1735
  }
1740
1736
  }
1741
- function Wt(t) {
1737
+ function qt(t) {
1742
1738
  const [n, a] = le(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1743
1739
  return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1744
1740
  /* @__PURE__ */ u.jsxs(
@@ -1757,7 +1753,7 @@ function Wt(t) {
1757
1753
  children: "Toggle"
1758
1754
  }
1759
1755
  ),
1760
- /* @__PURE__ */ u.jsx("p", { className: "label", children: lt(t.label) })
1756
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: dt(t.label) })
1761
1757
  ]
1762
1758
  }
1763
1759
  ),
@@ -1765,10 +1761,10 @@ function Wt(t) {
1765
1761
  /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: t.children }) })
1766
1762
  ] });
1767
1763
  }
1768
- function Un(t) {
1764
+ function $n(t) {
1769
1765
  const [n, a] = le(!1), e = t.child.children.length > 0, r = [];
1770
1766
  return t.child.children.length > 0 && t.child.children.map((s) => {
1771
- r.push(/* @__PURE__ */ u.jsx(Un, { child: s, three: t.three }, Math.random()));
1767
+ r.push(/* @__PURE__ */ u.jsx($n, { child: s, three: t.three }, Math.random()));
1772
1768
  }), /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
1773
1769
  /* @__PURE__ */ u.jsxs("div", { className: "child", children: [
1774
1770
  e ? /* @__PURE__ */ u.jsx(
@@ -1796,29 +1792,29 @@ function Un(t) {
1796
1792
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1797
1793
  }
1798
1794
  ),
1799
- /* @__PURE__ */ u.jsx("div", { className: `icon ${$a(t.child)}` })
1795
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${Ya(t.child)}` })
1800
1796
  ] }),
1801
1797
  /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
1802
1798
  ] }, Math.random());
1803
1799
  }
1804
- function ui(t) {
1800
+ function fi(t) {
1805
1801
  const n = [];
1806
1802
  return t.child.children.map((a) => {
1807
- n.push(/* @__PURE__ */ u.jsx(Un, { child: a, three: t.three }, Math.random()));
1803
+ n.push(/* @__PURE__ */ u.jsx($n, { child: a, three: t.three }, Math.random()));
1808
1804
  }), /* @__PURE__ */ u.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1809
1805
  }
1810
- const di = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1811
- function fi(t) {
1806
+ const hi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1807
+ function pi(t) {
1812
1808
  return "items" in t;
1813
1809
  }
1814
1810
  function Ue(t) {
1815
1811
  const n = [];
1816
1812
  return t.items.forEach((a) => {
1817
- fi(a) ? n.push(
1818
- /* @__PURE__ */ u.jsx(Ue, { title: lt(a.title), items: a.items }, Math.random())
1813
+ pi(a) ? n.push(
1814
+ /* @__PURE__ */ u.jsx(Ue, { title: dt(a.title), items: a.items }, Math.random())
1819
1815
  ) : n.push(
1820
1816
  /* @__PURE__ */ u.jsx(
1821
- st,
1817
+ lt,
1822
1818
  {
1823
1819
  title: a.title,
1824
1820
  prop: a.prop,
@@ -1836,9 +1832,9 @@ function Ue(t) {
1836
1832
  Math.random()
1837
1833
  )
1838
1834
  );
1839
- }), /* @__PURE__ */ u.jsx(Wt, { label: t.title, open: t.expanded === !0, children: n });
1835
+ }), /* @__PURE__ */ u.jsx(qt, { label: t.title, open: t.expanded === !0, children: n });
1840
1836
  }
1841
- function hi(t) {
1837
+ function mi(t) {
1842
1838
  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");
1843
1839
  }
1844
1840
  function Ie(t) {
@@ -2014,10 +2010,10 @@ function Ie(t) {
2014
2010
  }
2015
2011
  return t;
2016
2012
  }
2017
- function pi(t) {
2013
+ function vi(t) {
2018
2014
  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";
2019
2015
  }
2020
- function mi() {
2016
+ function gi() {
2021
2017
  const t = document.createElement("input");
2022
2018
  return t.type = "file", new Promise((n, a) => {
2023
2019
  t.addEventListener("change", function() {
@@ -2032,191 +2028,191 @@ function mi() {
2032
2028
  }), t.click();
2033
2029
  });
2034
2030
  }
2035
- const vi = [
2031
+ const bi = [
2036
2032
  {
2037
2033
  title: "Front",
2038
- value: ea
2034
+ value: ta
2039
2035
  },
2040
2036
  {
2041
2037
  title: "Back",
2042
- value: ta
2038
+ value: na
2043
2039
  },
2044
2040
  {
2045
2041
  title: "Double",
2046
- value: pn
2042
+ value: mn
2047
2043
  }
2048
- ], gi = [
2044
+ ], yi = [
2049
2045
  {
2050
2046
  title: "No Blending",
2051
- value: na
2047
+ value: aa
2052
2048
  },
2053
2049
  {
2054
2050
  title: "Normal",
2055
- value: aa
2051
+ value: ia
2056
2052
  },
2057
2053
  {
2058
2054
  title: "Additive",
2059
- value: ia
2055
+ value: ra
2060
2056
  },
2061
2057
  {
2062
2058
  title: "Subtractive",
2063
- value: ra
2059
+ value: oa
2064
2060
  },
2065
2061
  {
2066
2062
  title: "Multiply",
2067
- value: oa
2063
+ value: sa
2068
2064
  },
2069
2065
  {
2070
2066
  title: "Custom",
2071
- value: sa
2067
+ value: ca
2072
2068
  }
2073
- ], bi = [
2069
+ ], Ei = [
2074
2070
  {
2075
2071
  title: "Add",
2076
- value: ca
2072
+ value: la
2077
2073
  },
2078
2074
  {
2079
2075
  title: "Subtract",
2080
- value: la
2076
+ value: ua
2081
2077
  },
2082
2078
  {
2083
2079
  title: "Reverse Subtract",
2084
- value: ua
2080
+ value: da
2085
2081
  },
2086
2082
  {
2087
2083
  title: "Min",
2088
- value: da
2084
+ value: fa
2089
2085
  },
2090
2086
  {
2091
2087
  title: "Max",
2092
- value: fa
2088
+ value: ha
2093
2089
  }
2094
- ], yi = [
2090
+ ], Ci = [
2095
2091
  {
2096
2092
  title: "Zero",
2097
- valye: mn
2093
+ valye: vn
2098
2094
  },
2099
2095
  {
2100
2096
  title: "One",
2101
- valye: vn
2097
+ valye: gn
2102
2098
  },
2103
2099
  {
2104
2100
  title: "Src Color",
2105
- valye: gn
2101
+ valye: bn
2106
2102
  },
2107
2103
  {
2108
2104
  title: "One Minus Src Color",
2109
- valye: bn
2105
+ valye: yn
2110
2106
  },
2111
2107
  {
2112
2108
  title: "Src Alpha",
2113
- valye: yn
2109
+ valye: En
2114
2110
  },
2115
2111
  {
2116
2112
  title: "One Minus Src Alpha",
2117
- valye: En
2113
+ valye: Cn
2118
2114
  },
2119
2115
  {
2120
2116
  title: "Dst Alpha",
2121
- valye: Cn
2117
+ valye: xn
2122
2118
  },
2123
2119
  {
2124
2120
  title: "One Minus Dst Alpha",
2125
- valye: xn
2121
+ valye: Sn
2126
2122
  },
2127
2123
  {
2128
2124
  title: "Dst Color",
2129
- valye: Sn
2125
+ valye: wn
2130
2126
  },
2131
2127
  {
2132
2128
  title: "One Minus Dst Color",
2133
- valye: wn
2129
+ valye: On
2134
2130
  },
2135
2131
  {
2136
2132
  title: "Src Alpha Saturate",
2137
- valye: ha
2133
+ valye: pa
2138
2134
  },
2139
2135
  {
2140
2136
  title: "Constant Color",
2141
- valye: On
2137
+ valye: Mn
2142
2138
  },
2143
2139
  {
2144
2140
  title: "One Minus Constant Color",
2145
- valye: Mn
2141
+ valye: Tn
2146
2142
  },
2147
2143
  {
2148
2144
  title: "Constant Alpha",
2149
- valye: Tn
2145
+ valye: Rn
2150
2146
  },
2151
2147
  {
2152
2148
  title: "One Minus Constant Alpha",
2153
- valye: Rn
2149
+ valye: Pn
2154
2150
  }
2155
- ], Ei = [
2151
+ ], xi = [
2156
2152
  {
2157
2153
  title: "Zero",
2158
- valye: mn
2154
+ valye: vn
2159
2155
  },
2160
2156
  {
2161
2157
  title: "One",
2162
- valye: vn
2158
+ valye: gn
2163
2159
  },
2164
2160
  {
2165
2161
  title: "Src Color",
2166
- valye: gn
2162
+ valye: bn
2167
2163
  },
2168
2164
  {
2169
2165
  title: "One Minus Src Color",
2170
- valye: bn
2166
+ valye: yn
2171
2167
  },
2172
2168
  {
2173
2169
  title: "Src Alpha",
2174
- valye: yn
2170
+ valye: En
2175
2171
  },
2176
2172
  {
2177
2173
  title: "One Minus Src Alpha",
2178
- valye: En
2174
+ valye: Cn
2179
2175
  },
2180
2176
  {
2181
2177
  title: "Dst Alpha",
2182
- valye: Cn
2178
+ valye: xn
2183
2179
  },
2184
2180
  {
2185
2181
  title: "One Minus Dst Alpha",
2186
- valye: xn
2182
+ valye: Sn
2187
2183
  },
2188
2184
  {
2189
2185
  title: "Dst Color",
2190
- valye: Sn
2186
+ valye: wn
2191
2187
  },
2192
2188
  {
2193
2189
  title: "One Minus Dst Color",
2194
- valye: wn
2190
+ valye: On
2195
2191
  },
2196
2192
  {
2197
2193
  title: "Constant Color",
2198
- valye: On
2194
+ valye: Mn
2199
2195
  },
2200
2196
  {
2201
2197
  title: "One Minus Constant Color",
2202
- valye: Mn
2198
+ valye: Tn
2203
2199
  },
2204
2200
  {
2205
2201
  title: "Constant Alpha",
2206
- valye: Tn
2202
+ valye: Rn
2207
2203
  },
2208
2204
  {
2209
2205
  title: "One Minus Constant Alpha",
2210
- valye: Rn
2206
+ valye: Pn
2211
2207
  }
2212
2208
  ];
2213
- function ot(t, n) {
2209
+ function ct(t, n) {
2214
2210
  t.needsUpdate = !0, t.type = "option", t.options = n;
2215
2211
  }
2216
- function tn(t, n, a) {
2212
+ function nn(t, n, a) {
2217
2213
  const e = [];
2218
2214
  for (const r in t) {
2219
- if (!hi(r))
2215
+ if (!mi(r))
2220
2216
  continue;
2221
2217
  const s = typeof t[r], h = t[r];
2222
2218
  if (s === "boolean" || s === "number" || s === "string") {
@@ -2237,27 +2233,27 @@ function tn(t, n, a) {
2237
2233
  };
2238
2234
  switch (r) {
2239
2235
  case "blending":
2240
- ot(c, gi);
2236
+ ct(c, yi);
2241
2237
  break;
2242
2238
  case "blendDst":
2243
- ot(c, Ei);
2239
+ ct(c, xi);
2244
2240
  break;
2245
2241
  case "blendEquation":
2246
- ot(c, bi);
2242
+ ct(c, Ei);
2247
2243
  break;
2248
2244
  case "blendSrc":
2249
- ot(c, yi);
2245
+ ct(c, Ci);
2250
2246
  break;
2251
2247
  case "side":
2252
- ot(c, vi);
2248
+ ct(c, bi);
2253
2249
  break;
2254
2250
  }
2255
- pi(r) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2251
+ vi(r) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2256
2252
  const l = s === "string" && (r === "vertexShader" || r === "fragmentShader");
2257
2253
  l && (c.disabled = !1, c.latest = c.value, c.onChange = (d, b) => {
2258
2254
  c.latest = b;
2259
2255
  }), e.push(c), l && e.push({
2260
- title: `${lt(r)} - Update`,
2256
+ title: `${dt(r)} - Update`,
2261
2257
  type: "button",
2262
2258
  onChange: () => {
2263
2259
  var b;
@@ -2275,7 +2271,7 @@ function tn(t, n, a) {
2275
2271
  value: h,
2276
2272
  onChange: (c, l) => {
2277
2273
  var m;
2278
- const d = new Tt(l);
2274
+ const d = new Pt(l);
2279
2275
  a.updateObject(n.uuid, `material.${c}`, d);
2280
2276
  const b = (m = a.scene) == null ? void 0 : m.getObjectByProperty("uuid", n.uuid);
2281
2277
  b !== void 0 && ne(b, `material.${c}`, d);
@@ -2315,7 +2311,7 @@ function tn(t, n, a) {
2315
2311
  var x;
2316
2312
  a.createTexture(n.uuid, `material.${r}`, E);
2317
2313
  const S = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
2318
- S !== void 0 && Vt(E).then((T) => {
2314
+ S !== void 0 && Ht(E).then((T) => {
2319
2315
  ne(S, `material.${r}`, T), ne(S, "material.needsUpdate", !0);
2320
2316
  });
2321
2317
  }
@@ -2342,7 +2338,7 @@ function tn(t, n, a) {
2342
2338
  var x;
2343
2339
  a.createTexture(n.uuid, `material.${r}.${l}.value`, h);
2344
2340
  const S = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
2345
- S !== void 0 && Vt(E).then((T) => {
2341
+ S !== void 0 && Ht(E).then((T) => {
2346
2342
  ne(S, `material.${r}.${l}.value`, T);
2347
2343
  });
2348
2344
  }
@@ -2381,7 +2377,7 @@ function tn(t, n, a) {
2381
2377
  value: d.value,
2382
2378
  onChange: (S, x) => {
2383
2379
  var w;
2384
- const T = new Tt(x), W = `material.${r}.${S}.value`;
2380
+ const T = new Pt(x), W = `material.${r}.${S}.value`;
2385
2381
  a.updateObject(n.uuid, W, T);
2386
2382
  const I = (w = a.scene) == null ? void 0 : w.getObjectByProperty("uuid", n.uuid);
2387
2383
  I !== void 0 && ne(I, W, T);
@@ -2463,7 +2459,7 @@ function tn(t, n, a) {
2463
2459
  }
2464
2460
  }), e;
2465
2461
  }
2466
- function Ci(t, n) {
2462
+ function Si(t, n) {
2467
2463
  const a = t.material;
2468
2464
  if (Array.isArray(a)) {
2469
2465
  const e = [], r = a.length;
@@ -2473,7 +2469,7 @@ function Ci(t, n) {
2473
2469
  Ue,
2474
2470
  {
2475
2471
  title: `Material ${s}`,
2476
- items: tn(a[s], t, n)
2472
+ items: nn(a[s], t, n)
2477
2473
  },
2478
2474
  `Material ${s}`
2479
2475
  )
@@ -2484,14 +2480,14 @@ function Ci(t, n) {
2484
2480
  Ue,
2485
2481
  {
2486
2482
  title: "Material",
2487
- items: tn(a, t, n)
2483
+ items: nn(a, t, n)
2488
2484
  }
2489
2485
  );
2490
2486
  }
2491
- function st(t) {
2487
+ function lt(t) {
2492
2488
  var b;
2493
2489
  let n = t.value;
2494
- n !== void 0 && n.isColor !== void 0 && (n = ja(t.value));
2490
+ n !== void 0 && n.isColor !== void 0 && (n = Ia(t.value));
2495
2491
  const [a, e] = le(n), r = Ce(null), s = Ce(null), h = Ce(null);
2496
2492
  Be(() => {
2497
2493
  var he;
@@ -2519,7 +2515,7 @@ function st(t) {
2519
2515
  t.type === "boolean" ? E = m.target.checked : t.type === "option" && (E = t.options[E].value), e(E), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, E);
2520
2516
  };
2521
2517
  return /* @__PURE__ */ u.jsxs("div", { className: `field ${l ? "block" : ""}`, children: [
2522
- t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: r, children: lt(t.title) }, "fieldLabel"),
2518
+ t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: r, children: dt(t.title) }, "fieldLabel"),
2523
2519
  t.type === "string" && !c && /* @__PURE__ */ u.jsx(
2524
2520
  "input",
2525
2521
  {
@@ -2591,14 +2587,14 @@ function st(t) {
2591
2587
  }
2592
2588
  ),
2593
2589
  t.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: h, onClick: () => {
2594
- mi().then((m) => {
2590
+ gi().then((m) => {
2595
2591
  h.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
2596
2592
  });
2597
- }, src: a.length > 0 ? a : di }),
2598
- t.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: (b = t.options) == null ? void 0 : b.map((m, E) => /* @__PURE__ */ u.jsx("option", { value: m.value, children: lt(m.title) }, E)) }) })
2593
+ }, src: a.length > 0 ? a : hi }),
2594
+ t.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: (b = t.options) == null ? void 0 : b.map((m, E) => /* @__PURE__ */ u.jsx("option", { value: m.value, children: dt(m.title) }, E)) }) })
2599
2595
  ] });
2600
2596
  }
2601
- function nn(t) {
2597
+ function an(t) {
2602
2598
  switch (t) {
2603
2599
  case "fov":
2604
2600
  return "FOV";
@@ -2627,12 +2623,12 @@ function nn(t) {
2627
2623
  }
2628
2624
  return t;
2629
2625
  }
2630
- function xi(t, n) {
2626
+ function wi(t, n) {
2631
2627
  const a = [];
2632
2628
  if (t.perspectiveCameraInfo !== void 0)
2633
2629
  for (const e in t.perspectiveCameraInfo)
2634
2630
  a.push({
2635
- title: nn(e),
2631
+ title: an(e),
2636
2632
  prop: e,
2637
2633
  type: "number",
2638
2634
  step: 0.01,
@@ -2647,7 +2643,7 @@ function xi(t, n) {
2647
2643
  else if (t.orthographicCameraInfo !== void 0)
2648
2644
  for (const e in t.orthographicCameraInfo)
2649
2645
  a.push({
2650
- title: nn(e),
2646
+ title: an(e),
2651
2647
  prop: e,
2652
2648
  type: "number",
2653
2649
  step: 0.01,
@@ -2667,20 +2663,20 @@ function xi(t, n) {
2667
2663
  }
2668
2664
  );
2669
2665
  }
2670
- const Si = Math.PI / 180, wi = 180 / Math.PI;
2666
+ const Oi = Math.PI / 180, Mi = 180 / Math.PI;
2671
2667
  function Ke(t, n, a, e, r) {
2672
2668
  return e + (t - n) * (r - e) / (a - n);
2673
2669
  }
2674
- function Oi(t) {
2675
- return t * Si;
2670
+ function Ti(t) {
2671
+ return t * Oi;
2676
2672
  }
2677
- function $t(t) {
2678
- return t * wi;
2673
+ function zt(t) {
2674
+ return t * Mi;
2679
2675
  }
2680
- function Mi(t, n) {
2681
- const a = new pa();
2676
+ function Ri(t, n) {
2677
+ const a = new ma();
2682
2678
  a.elements = t.matrix;
2683
- const e = new Z(), r = new ma(), s = new Z();
2679
+ const e = new Z(), r = new va(), s = new Z();
2684
2680
  t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
2685
2681
  const h = (l, d) => {
2686
2682
  var m;
@@ -2688,7 +2684,7 @@ function Mi(t, n) {
2688
2684
  const b = (m = n.scene) == null ? void 0 : m.getObjectByProperty("uuid", t.uuid);
2689
2685
  b !== void 0 && ne(b, l, d);
2690
2686
  }, c = (l, d) => {
2691
- h(l, Oi(d));
2687
+ h(l, Ti(d));
2692
2688
  };
2693
2689
  return /* @__PURE__ */ u.jsx(
2694
2690
  Ue,
@@ -2720,7 +2716,7 @@ function Mi(t, n) {
2720
2716
  title: "Rotation X",
2721
2717
  prop: "rotation.x",
2722
2718
  type: "number",
2723
- value: Bt($t(r.x)),
2719
+ value: Ut(zt(r.x)),
2724
2720
  min: -360,
2725
2721
  max: 360,
2726
2722
  step: 0.1,
@@ -2730,7 +2726,7 @@ function Mi(t, n) {
2730
2726
  title: "Rotation Y",
2731
2727
  prop: "rotation.y",
2732
2728
  type: "number",
2733
- value: Bt($t(r.y)),
2729
+ value: Ut(zt(r.y)),
2734
2730
  min: -360,
2735
2731
  max: 360,
2736
2732
  step: 0.1,
@@ -2740,7 +2736,7 @@ function Mi(t, n) {
2740
2736
  title: "Rotation Z",
2741
2737
  prop: "rotation.z",
2742
2738
  type: "number",
2743
- value: Bt($t(r.z)),
2739
+ value: Ut(zt(r.z)),
2744
2740
  min: -360,
2745
2741
  max: 360,
2746
2742
  step: 0.1,
@@ -2774,7 +2770,7 @@ function Mi(t, n) {
2774
2770
  }
2775
2771
  );
2776
2772
  }
2777
- function an(t) {
2773
+ function rn(t) {
2778
2774
  switch (t) {
2779
2775
  case "color":
2780
2776
  return "Color";
@@ -2793,25 +2789,25 @@ function an(t) {
2793
2789
  }
2794
2790
  return t;
2795
2791
  }
2796
- function Ti(t, n) {
2792
+ function Pi(t, n) {
2797
2793
  const a = [];
2798
2794
  if (t.lightInfo !== void 0)
2799
2795
  for (const e in t.lightInfo) {
2800
2796
  const r = t.lightInfo[e];
2801
2797
  r !== void 0 && (r.isColor !== void 0 ? a.push({
2802
- title: an(e),
2798
+ title: rn(e),
2803
2799
  prop: e,
2804
2800
  type: "color",
2805
2801
  value: r,
2806
2802
  onChange: (s, h) => {
2807
2803
  var d;
2808
- const c = new Tt(h);
2804
+ const c = new Pt(h);
2809
2805
  n.updateObject(t.uuid, s, c);
2810
2806
  const l = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
2811
2807
  l !== void 0 && ne(l, s, c);
2812
2808
  }
2813
2809
  }) : a.push({
2814
- title: an(e),
2810
+ title: rn(e),
2815
2811
  prop: e,
2816
2812
  type: typeof r,
2817
2813
  value: r,
@@ -2832,7 +2828,7 @@ function Ti(t, n) {
2832
2828
  }
2833
2829
  );
2834
2830
  }
2835
- function Ri(t, n) {
2831
+ function Ai(t, n) {
2836
2832
  var c;
2837
2833
  const a = [], e = [];
2838
2834
  let r = 0;
@@ -2899,7 +2895,7 @@ function Ri(t, n) {
2899
2895
  }
2900
2896
  return /* @__PURE__ */ u.jsx(Ue, { title: "Animation", items: a });
2901
2897
  }
2902
- const $n = {
2898
+ const zn = {
2903
2899
  name: "",
2904
2900
  uuid: "",
2905
2901
  type: "",
@@ -2911,25 +2907,25 @@ const $n = {
2911
2907
  orthographicCameraInfo: void 0,
2912
2908
  lightInfo: void 0
2913
2909
  };
2914
- let ie = { ...$n };
2915
- function Pi(t) {
2910
+ let ie = { ...zn };
2911
+ function ki(t) {
2916
2912
  const [n, a] = le(-1);
2917
2913
  Be(() => {
2918
2914
  function h(l) {
2919
2915
  ie = { ...l.value }, a(Date.now());
2920
2916
  }
2921
2917
  function c() {
2922
- ie = { ...$n }, a(Date.now());
2918
+ ie = { ...zn }, a(Date.now());
2923
2919
  }
2924
- return k.addEventListener(j.SET_SCENE, c), k.addEventListener(j.SET_OBJECT, h), () => {
2925
- k.removeEventListener(j.SET_SCENE, c), k.removeEventListener(j.SET_OBJECT, h);
2920
+ return _.addEventListener(j.SET_SCENE, c), _.addEventListener(j.SET_OBJECT, h), () => {
2921
+ _.removeEventListener(j.SET_SCENE, c), _.removeEventListener(j.SET_OBJECT, h);
2926
2922
  };
2927
2923
  }, []);
2928
2924
  const e = ie.type.toLowerCase(), r = ie.animations.length > 0 || ie.mixer !== void 0, s = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2929
- return /* @__PURE__ */ u.jsx(Wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: ie.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2925
+ return /* @__PURE__ */ u.jsx(qt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: ie.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2930
2926
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2931
2927
  /* @__PURE__ */ u.jsx(
2932
- st,
2928
+ lt,
2933
2929
  {
2934
2930
  type: "string",
2935
2931
  title: "Name",
@@ -2939,7 +2935,7 @@ function Pi(t) {
2939
2935
  }
2940
2936
  ),
2941
2937
  /* @__PURE__ */ u.jsx(
2942
- st,
2938
+ lt,
2943
2939
  {
2944
2940
  type: "string",
2945
2941
  title: "Type",
@@ -2949,7 +2945,7 @@ function Pi(t) {
2949
2945
  }
2950
2946
  ),
2951
2947
  /* @__PURE__ */ u.jsx(
2952
- st,
2948
+ lt,
2953
2949
  {
2954
2950
  type: "string",
2955
2951
  title: "UUID",
@@ -2959,7 +2955,7 @@ function Pi(t) {
2959
2955
  }
2960
2956
  ),
2961
2957
  /* @__PURE__ */ u.jsx(
2962
- st,
2958
+ lt,
2963
2959
  {
2964
2960
  type: "boolean",
2965
2961
  title: "Visible",
@@ -2975,37 +2971,37 @@ function Pi(t) {
2975
2971
  )
2976
2972
  ] }),
2977
2973
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2978
- Mi(ie, t.three),
2979
- r ? Ri(ie, t.three) : null,
2980
- e.search("camera") > -1 ? xi(ie, t.three) : null,
2981
- e.search("light") > -1 ? Ti(ie, t.three) : null,
2982
- s ? Ci(ie, t.three) : null
2974
+ Ri(ie, t.three),
2975
+ r ? Ai(ie, t.three) : null,
2976
+ e.search("camera") > -1 ? wi(ie, t.three) : null,
2977
+ e.search("light") > -1 ? Pi(ie, t.three) : null,
2978
+ s ? Si(ie, t.three) : null
2983
2979
  ] })
2984
2980
  ] }) }, n) }, "Inspector");
2985
2981
  }
2986
- class Ki extends Pa {
2982
+ class Zi extends ka {
2987
2983
  constructor(a) {
2988
2984
  super(a);
2989
- U(this, "three");
2985
+ F(this, "three");
2990
2986
  // Private
2991
- U(this, "setScene", (a) => {
2987
+ F(this, "setScene", (a) => {
2992
2988
  this.setState(() => ({
2993
2989
  scene: a.value
2994
2990
  }));
2995
2991
  });
2996
2992
  this.state = {
2997
2993
  scene: a.scene !== void 0 ? a.scene : null
2998
- }, this.three = a.three, k.addEventListener(j.SET_SCENE, this.setScene);
2994
+ }, this.three = a.three, _.addEventListener(j.SET_SCENE, this.setScene);
2999
2995
  }
3000
2996
  componentWillUnmount() {
3001
- k.removeEventListener(j.SET_SCENE, this.setScene);
2997
+ _.removeEventListener(j.SET_SCENE, this.setScene);
3002
2998
  }
3003
2999
  render() {
3004
3000
  var r;
3005
3001
  const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
3006
3002
  return /* @__PURE__ */ u.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3007
- /* @__PURE__ */ u.jsx(Wt, { label: e, open: !0, children: /* @__PURE__ */ u.jsx(u.Fragment, { children: a && /* @__PURE__ */ u.jsx(ui, { child: this.componentState.scene, three: this.three }) }) }),
3008
- /* @__PURE__ */ u.jsx(Pi, { three: this.three })
3003
+ /* @__PURE__ */ u.jsx(qt, { label: e, open: !0, children: /* @__PURE__ */ u.jsx(u.Fragment, { children: a && /* @__PURE__ */ u.jsx(fi, { child: this.componentState.scene, three: this.three }) }) }),
3004
+ /* @__PURE__ */ u.jsx(ki, { three: this.three })
3009
3005
  ] }) }, "SidePanel");
3010
3006
  }
3011
3007
  // Getters / Setters
@@ -3013,7 +3009,7 @@ class Ki extends Pa {
3013
3009
  return this.state;
3014
3010
  }
3015
3011
  }
3016
- function Xi(t) {
3012
+ function Ji(t) {
3017
3013
  function n() {
3018
3014
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
3019
3015
  }
@@ -3038,7 +3034,7 @@ function Xi(t) {
3038
3034
  if (!n())
3039
3035
  return;
3040
3036
  const l = c.value;
3041
- Vt(l.value).then((d) => {
3037
+ Ht(l.value).then((d) => {
3042
3038
  e(l.uuid, l.key, d), e(l.uuid, "material.needsUpdate", !0);
3043
3039
  });
3044
3040
  }, h = (c) => {
@@ -3048,17 +3044,17 @@ function Xi(t) {
3048
3044
  const { key: l, uuid: d, value: b, subitem: m } = c.value, E = (S = t.three.scene) == null ? void 0 : S.getObjectByProperty("uuid", d);
3049
3045
  if (E !== void 0)
3050
3046
  try {
3051
- m !== void 0 ? Ga(E, m)[l](b) : E[l](b);
3047
+ m !== void 0 ? Ha(E, m)[l](b) : E[l](b);
3052
3048
  } catch (x) {
3053
3049
  console.log("Error requesting method:"), console.log(x), console.log(l), console.log(b);
3054
3050
  }
3055
3051
  };
3056
- return Be(() => (k.addEventListener(j.GET_OBJECT, a), k.addEventListener(j.UPDATE_OBJECT, r), k.addEventListener(j.CREATE_TEXTURE, s), k.addEventListener(j.REQUEST_METHOD, h), () => {
3057
- k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, r), k.removeEventListener(j.CREATE_TEXTURE, s), k.removeEventListener(j.REQUEST_METHOD, h);
3052
+ return Be(() => (_.addEventListener(j.GET_OBJECT, a), _.addEventListener(j.UPDATE_OBJECT, r), _.addEventListener(j.CREATE_TEXTURE, s), _.addEventListener(j.REQUEST_METHOD, h), () => {
3053
+ _.removeEventListener(j.GET_OBJECT, a), _.removeEventListener(j.UPDATE_OBJECT, r), _.removeEventListener(j.CREATE_TEXTURE, s), _.removeEventListener(j.REQUEST_METHOD, h);
3058
3054
  }), []), null;
3059
3055
  }
3060
- const rn = { type: "change" }, zt = { type: "start" }, on = { type: "end" }, St = new va(), sn = new ga(), Ai = Math.cos(70 * ba.DEG2RAD);
3061
- class _i extends dn {
3056
+ const on = { type: "change" }, Yt = { type: "start" }, sn = { type: "end" }, Ot = new ga(), cn = new ba(), _i = Math.cos(70 * ya.DEG2RAD);
3057
+ class ji extends fn {
3062
3058
  constructor(n, a) {
3063
3059
  super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Z(), this.cursor = new Z(), 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: He.ROTATE, MIDDLE: He.DOLLY, RIGHT: He.PAN }, this.touches = { ONE: We.ROTATE, TWO: We.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3064
3060
  return c.phi;
@@ -3067,42 +3063,42 @@ class _i extends dn {
3067
3063
  }, this.getDistance = function() {
3068
3064
  return this.object.position.distanceTo(this.target);
3069
3065
  }, this.listenToKeyEvents = function(o) {
3070
- o.addEventListener("keydown", tt), this._domElementKeyEvents = o;
3066
+ o.addEventListener("keydown", at), this._domElementKeyEvents = o;
3071
3067
  }, this.stopListenToKeyEvents = function() {
3072
- this._domElementKeyEvents.removeEventListener("keydown", tt), this._domElementKeyEvents = null;
3068
+ this._domElementKeyEvents.removeEventListener("keydown", at), this._domElementKeyEvents = null;
3073
3069
  }, this.saveState = function() {
3074
3070
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
3075
3071
  }, this.reset = function() {
3076
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(rn), e.update(), s = r.NONE;
3072
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(on), e.update(), s = r.NONE;
3077
3073
  }, this.update = function() {
3078
- const o = new Z(), y = new Zt().setFromUnitVectors(n.up, new Z(0, 1, 0)), M = y.clone().invert(), N = new Z(), X = new Zt(), pe = new Z(), oe = 2 * Math.PI;
3079
- return function(Ft = null) {
3080
- const at = e.object.position;
3081
- o.copy(at).sub(e.target), o.applyQuaternion(y), c.setFromVector3(o), e.autoRotate && s === r.NONE && z(A(Ft)), e.enableDamping ? (c.theta += l.theta * e.dampingFactor, c.phi += l.phi * e.dampingFactor) : (c.theta += l.theta, c.phi += l.phi);
3074
+ const o = new Z(), y = new Jt().setFromUnitVectors(n.up, new Z(0, 1, 0)), M = y.clone().invert(), N = new Z(), X = new Jt(), pe = new Z(), oe = 2 * Math.PI;
3075
+ return function(Bt = null) {
3076
+ const rt = e.object.position;
3077
+ o.copy(rt).sub(e.target), o.applyQuaternion(y), c.setFromVector3(o), e.autoRotate && s === r.NONE && z(A(Bt)), e.enableDamping ? (c.theta += l.theta * e.dampingFactor, c.phi += l.phi * e.dampingFactor) : (c.theta += l.theta, c.phi += l.phi);
3082
3078
  let ge = e.minAzimuthAngle, me = e.maxAzimuthAngle;
3083
- isFinite(ge) && isFinite(me) && (ge < -Math.PI ? ge += oe : ge > Math.PI && (ge -= oe), me < -Math.PI ? me += oe : me > Math.PI && (me -= oe), ge <= me ? c.theta = Math.max(ge, Math.min(me, c.theta)) : c.theta = c.theta > (ge + me) / 2 ? Math.max(ge, c.theta) : Math.min(me, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(b, e.dampingFactor) : e.target.add(b), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ae || e.object.isOrthographicCamera ? c.radius = fe(c.radius) : c.radius = fe(c.radius * d), o.setFromSpherical(c), o.applyQuaternion(M), at.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (l.theta *= 1 - e.dampingFactor, l.phi *= 1 - e.dampingFactor, b.multiplyScalar(1 - e.dampingFactor)) : (l.set(0, 0, 0), b.set(0, 0, 0));
3084
- let _e = !1;
3079
+ isFinite(ge) && isFinite(me) && (ge < -Math.PI ? ge += oe : ge > Math.PI && (ge -= oe), me < -Math.PI ? me += oe : me > Math.PI && (me -= oe), ge <= me ? c.theta = Math.max(ge, Math.min(me, c.theta)) : c.theta = c.theta > (ge + me) / 2 ? Math.max(ge, c.theta) : Math.min(me, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(b, e.dampingFactor) : e.target.add(b), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ae || e.object.isOrthographicCamera ? c.radius = fe(c.radius) : c.radius = fe(c.radius * d), o.setFromSpherical(c), o.applyQuaternion(M), rt.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (l.theta *= 1 - e.dampingFactor, l.phi *= 1 - e.dampingFactor, b.multiplyScalar(1 - e.dampingFactor)) : (l.set(0, 0, 0), b.set(0, 0, 0));
3080
+ let ke = !1;
3085
3081
  if (e.zoomToCursor && ae) {
3086
- let ke = null;
3082
+ let _e = null;
3087
3083
  if (e.object.isPerspectiveCamera) {
3088
3084
  const je = o.length();
3089
- ke = fe(je * d);
3090
- const De = je - ke;
3085
+ _e = fe(je * d);
3086
+ const De = je - _e;
3091
3087
  e.object.position.addScaledVector(he, De), e.object.updateMatrixWorld();
3092
3088
  } else if (e.object.isOrthographicCamera) {
3093
3089
  const je = new Z(te.x, te.y, 0);
3094
- je.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), _e = !0;
3090
+ je.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), ke = !0;
3095
3091
  const De = new Z(te.x, te.y, 0);
3096
- De.unproject(e.object), e.object.position.sub(De).add(je), e.object.updateMatrixWorld(), ke = o.length();
3092
+ De.unproject(e.object), e.object.position.sub(De).add(je), e.object.updateMatrixWorld(), _e = o.length();
3097
3093
  } else
3098
3094
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
3099
- ke !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ke).add(e.object.position) : (St.origin.copy(e.object.position), St.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(St.direction)) < Ai ? n.lookAt(e.target) : (sn.setFromNormalAndCoplanarPoint(e.object.up, e.target), St.intersectPlane(sn, e.target))));
3095
+ _e !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(_e).add(e.object.position) : (Ot.origin.copy(e.object.position), Ot.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(Ot.direction)) < _i ? n.lookAt(e.target) : (cn.setFromNormalAndCoplanarPoint(e.object.up, e.target), Ot.intersectPlane(cn, e.target))));
3100
3096
  } else
3101
- e.object.isOrthographicCamera && (_e = d !== 1, _e && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3102
- return d = 1, ae = !1, _e || N.distanceToSquared(e.object.position) > h || 8 * (1 - X.dot(e.object.quaternion)) > h || pe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(rn), N.copy(e.object.position), X.copy(e.object.quaternion), pe.copy(e.target), !0) : !1;
3097
+ e.object.isOrthographicCamera && (ke = d !== 1, ke && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3098
+ return d = 1, ae = !1, ke || N.distanceToSquared(e.object.position) > h || 8 * (1 - X.dot(e.object.quaternion)) > h || pe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(on), N.copy(e.object.position), X.copy(e.object.quaternion), pe.copy(e.target), !0) : !1;
3103
3099
  };
3104
3100
  }(), this.dispose = function() {
3105
- e.domElement.removeEventListener("contextmenu", Ge), e.domElement.removeEventListener("pointerdown", Pe), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", bt), e.domElement.removeEventListener("pointermove", Qe), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", tt), e._domElementKeyEvents = null);
3101
+ e.domElement.removeEventListener("contextmenu", Ge), e.domElement.removeEventListener("pointerdown", Pe), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", Et), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
3106
3102
  };
3107
3103
  const e = this, r = {
3108
3104
  NONE: -1,
@@ -3115,7 +3111,7 @@ class _i extends dn {
3115
3111
  TOUCH_DOLLY_ROTATE: 6
3116
3112
  };
3117
3113
  let s = r.NONE;
3118
- const h = 1e-6, c = new Jt(), l = new Jt();
3114
+ const h = 1e-6, c = new Qt(), l = new Qt();
3119
3115
  let d = 1;
3120
3116
  const b = new Z(), m = new de(), E = new de(), S = new de(), x = new de(), T = new de(), W = new de(), I = new de(), w = new de(), G = new de(), he = new Z(), te = new de();
3121
3117
  let ae = !1;
@@ -3131,7 +3127,7 @@ class _i extends dn {
3131
3127
  function z(o) {
3132
3128
  l.theta -= o;
3133
3129
  }
3134
- function F(o) {
3130
+ function B(o) {
3135
3131
  l.phi -= o;
3136
3132
  }
3137
3133
  const L = function() {
@@ -3160,7 +3156,7 @@ class _i extends dn {
3160
3156
  function R(o) {
3161
3157
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3162
3158
  }
3163
- function B(o) {
3159
+ function U(o) {
3164
3160
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3165
3161
  }
3166
3162
  function Q(o, y) {
@@ -3176,34 +3172,34 @@ class _i extends dn {
3176
3172
  function xe(o) {
3177
3173
  m.set(o.clientX, o.clientY);
3178
3174
  }
3179
- function ft(o) {
3175
+ function pt(o) {
3180
3176
  Q(o.clientX, o.clientX), I.set(o.clientX, o.clientY);
3181
3177
  }
3182
- function Xe(o) {
3178
+ function Je(o) {
3183
3179
  x.set(o.clientX, o.clientY);
3184
3180
  }
3185
3181
  function _t(o) {
3186
3182
  E.set(o.clientX, o.clientY), S.subVectors(E, m).multiplyScalar(e.rotateSpeed);
3187
3183
  const y = e.domElement;
3188
- z(2 * Math.PI * S.x / y.clientHeight), F(2 * Math.PI * S.y / y.clientHeight), m.copy(E), e.update();
3184
+ z(2 * Math.PI * S.x / y.clientHeight), B(2 * Math.PI * S.y / y.clientHeight), m.copy(E), e.update();
3189
3185
  }
3190
- function kt(o) {
3191
- w.set(o.clientX, o.clientY), G.subVectors(w, I), G.y > 0 ? R(Y(G.y)) : G.y < 0 && B(Y(G.y)), I.copy(w), e.update();
3186
+ function jt(o) {
3187
+ w.set(o.clientX, o.clientY), G.subVectors(w, I), G.y > 0 ? R(Y(G.y)) : G.y < 0 && U(Y(G.y)), I.copy(w), e.update();
3192
3188
  }
3193
- function Ze(o) {
3189
+ function Qe(o) {
3194
3190
  T.set(o.clientX, o.clientY), W.subVectors(T, x).multiplyScalar(e.panSpeed), K(W.x, W.y), x.copy(T), e.update();
3195
3191
  }
3196
- function Je(o) {
3197
- Q(o.clientX, o.clientY), o.deltaY < 0 ? B(Y(o.deltaY)) : o.deltaY > 0 && R(Y(o.deltaY)), e.update();
3192
+ function et(o) {
3193
+ Q(o.clientX, o.clientY), o.deltaY < 0 ? U(Y(o.deltaY)) : o.deltaY > 0 && R(Y(o.deltaY)), e.update();
3198
3194
  }
3199
3195
  function ze(o) {
3200
3196
  let y = !1;
3201
3197
  switch (o.code) {
3202
3198
  case e.keys.UP:
3203
- o.ctrlKey || o.metaKey || o.shiftKey ? F(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : K(0, e.keyPanSpeed), y = !0;
3199
+ o.ctrlKey || o.metaKey || o.shiftKey ? B(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : K(0, e.keyPanSpeed), y = !0;
3204
3200
  break;
3205
3201
  case e.keys.BOTTOM:
3206
- o.ctrlKey || o.metaKey || o.shiftKey ? F(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : K(0, -e.keyPanSpeed), y = !0;
3202
+ o.ctrlKey || o.metaKey || o.shiftKey ? B(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : K(0, -e.keyPanSpeed), y = !0;
3207
3203
  break;
3208
3204
  case e.keys.LEFT:
3209
3205
  o.ctrlKey || o.metaKey || o.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : K(e.keyPanSpeed, 0), y = !0;
@@ -3230,17 +3226,17 @@ class _i extends dn {
3230
3226
  x.set(M, N);
3231
3227
  }
3232
3228
  }
3233
- function ht(o) {
3229
+ function mt(o) {
3234
3230
  const y = we(o), M = o.pageX - y.x, N = o.pageY - y.y, X = Math.sqrt(M * M + N * N);
3235
3231
  I.set(0, X);
3236
3232
  }
3237
- function pt(o) {
3238
- e.enableZoom && ht(o), e.enablePan && Me(o);
3233
+ function vt(o) {
3234
+ e.enableZoom && mt(o), e.enablePan && Me(o);
3239
3235
  }
3240
- function jt(o) {
3241
- e.enableZoom && ht(o), e.enableRotate && Ye(o);
3236
+ function Dt(o) {
3237
+ e.enableZoom && mt(o), e.enableRotate && Ye(o);
3242
3238
  }
3243
- function mt(o) {
3239
+ function gt(o) {
3244
3240
  if (f.length == 1)
3245
3241
  E.set(o.pageX, o.pageY);
3246
3242
  else {
@@ -3249,7 +3245,7 @@ class _i extends dn {
3249
3245
  }
3250
3246
  S.subVectors(E, m).multiplyScalar(e.rotateSpeed);
3251
3247
  const y = e.domElement;
3252
- z(2 * Math.PI * S.x / y.clientHeight), F(2 * Math.PI * S.y / y.clientHeight), m.copy(E);
3248
+ z(2 * Math.PI * S.x / y.clientHeight), B(2 * Math.PI * S.y / y.clientHeight), m.copy(E);
3253
3249
  }
3254
3250
  function Te(o) {
3255
3251
  if (f.length === 1)
@@ -3266,30 +3262,30 @@ class _i extends dn {
3266
3262
  const pe = (o.pageX + y.x) * 0.5, oe = (o.pageY + y.y) * 0.5;
3267
3263
  Q(pe, oe);
3268
3264
  }
3269
- function vt(o) {
3265
+ function bt(o) {
3270
3266
  e.enableZoom && Re(o), e.enablePan && Te(o);
3271
3267
  }
3272
- function gt(o) {
3273
- e.enableZoom && Re(o), e.enableRotate && mt(o);
3268
+ function yt(o) {
3269
+ e.enableZoom && Re(o), e.enableRotate && gt(o);
3274
3270
  }
3275
3271
  function Pe(o) {
3276
- e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Qe), e.domElement.addEventListener("pointerup", Ae)), It(o), o.pointerType === "touch" ? nt(o) : et(o));
3272
+ e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", tt), e.domElement.addEventListener("pointerup", Ae)), Lt(o), o.pointerType === "touch" ? it(o) : nt(o));
3277
3273
  }
3278
- function Qe(o) {
3279
- e.enabled !== !1 && (o.pointerType === "touch" ? Ct(o) : Dt(o));
3274
+ function tt(o) {
3275
+ e.enabled !== !1 && (o.pointerType === "touch" ? St(o) : It(o));
3280
3276
  }
3281
3277
  function Ae(o) {
3282
- switch (Lt(o), f.length) {
3278
+ switch (Nt(o), f.length) {
3283
3279
  case 0:
3284
- e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", Qe), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(on), s = r.NONE;
3280
+ e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(sn), s = r.NONE;
3285
3281
  break;
3286
3282
  case 1:
3287
3283
  const y = f[0], M = v[y];
3288
- nt({ pointerId: y, pageX: M.x, pageY: M.y });
3284
+ it({ pointerId: y, pageX: M.x, pageY: M.y });
3289
3285
  break;
3290
3286
  }
3291
3287
  }
3292
- function et(o) {
3288
+ function nt(o) {
3293
3289
  let y;
3294
3290
  switch (o.button) {
3295
3291
  case 0:
@@ -3308,13 +3304,13 @@ class _i extends dn {
3308
3304
  case He.DOLLY:
3309
3305
  if (e.enableZoom === !1)
3310
3306
  return;
3311
- ft(o), s = r.DOLLY;
3307
+ pt(o), s = r.DOLLY;
3312
3308
  break;
3313
3309
  case He.ROTATE:
3314
3310
  if (o.ctrlKey || o.metaKey || o.shiftKey) {
3315
3311
  if (e.enablePan === !1)
3316
3312
  return;
3317
- Xe(o), s = r.PAN;
3313
+ Je(o), s = r.PAN;
3318
3314
  } else {
3319
3315
  if (e.enableRotate === !1)
3320
3316
  return;
@@ -3329,15 +3325,15 @@ class _i extends dn {
3329
3325
  } else {
3330
3326
  if (e.enablePan === !1)
3331
3327
  return;
3332
- Xe(o), s = r.PAN;
3328
+ Je(o), s = r.PAN;
3333
3329
  }
3334
3330
  break;
3335
3331
  default:
3336
3332
  s = r.NONE;
3337
3333
  }
3338
- s !== r.NONE && e.dispatchEvent(zt);
3334
+ s !== r.NONE && e.dispatchEvent(Yt);
3339
3335
  }
3340
- function Dt(o) {
3336
+ function It(o) {
3341
3337
  switch (s) {
3342
3338
  case r.ROTATE:
3343
3339
  if (e.enableRotate === !1)
@@ -3347,19 +3343,19 @@ class _i extends dn {
3347
3343
  case r.DOLLY:
3348
3344
  if (e.enableZoom === !1)
3349
3345
  return;
3350
- kt(o);
3346
+ jt(o);
3351
3347
  break;
3352
3348
  case r.PAN:
3353
3349
  if (e.enablePan === !1)
3354
3350
  return;
3355
- Ze(o);
3351
+ Qe(o);
3356
3352
  break;
3357
3353
  }
3358
3354
  }
3359
- function bt(o) {
3360
- e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(zt), Je(yt(o)), e.dispatchEvent(on));
3355
+ function Et(o) {
3356
+ e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(Yt), et(Ct(o)), e.dispatchEvent(sn));
3361
3357
  }
3362
- function yt(o) {
3358
+ function Ct(o) {
3363
3359
  const y = o.deltaMode, M = {
3364
3360
  clientX: o.clientX,
3365
3361
  clientY: o.clientY,
@@ -3375,17 +3371,17 @@ class _i extends dn {
3375
3371
  }
3376
3372
  return o.ctrlKey && !C && (M.deltaY *= 10), M;
3377
3373
  }
3378
- function Et(o) {
3374
+ function xt(o) {
3379
3375
  o.key === "Control" && (C = !0, e.domElement.getRootNode().addEventListener("keyup", Se, { passive: !0, capture: !0 }));
3380
3376
  }
3381
3377
  function Se(o) {
3382
3378
  o.key === "Control" && (C = !1, e.domElement.getRootNode().removeEventListener("keyup", Se, { passive: !0, capture: !0 }));
3383
3379
  }
3384
- function tt(o) {
3380
+ function at(o) {
3385
3381
  e.enabled === !1 || e.enablePan === !1 || ze(o);
3386
3382
  }
3387
- function nt(o) {
3388
- switch (xt(o), f.length) {
3383
+ function it(o) {
3384
+ switch (wt(o), f.length) {
3389
3385
  case 1:
3390
3386
  switch (e.touches.ONE) {
3391
3387
  case We.ROTATE:
@@ -3407,12 +3403,12 @@ class _i extends dn {
3407
3403
  case We.DOLLY_PAN:
3408
3404
  if (e.enableZoom === !1 && e.enablePan === !1)
3409
3405
  return;
3410
- pt(o), s = r.TOUCH_DOLLY_PAN;
3406
+ vt(o), s = r.TOUCH_DOLLY_PAN;
3411
3407
  break;
3412
3408
  case We.DOLLY_ROTATE:
3413
3409
  if (e.enableZoom === !1 && e.enableRotate === !1)
3414
3410
  return;
3415
- jt(o), s = r.TOUCH_DOLLY_ROTATE;
3411
+ Dt(o), s = r.TOUCH_DOLLY_ROTATE;
3416
3412
  break;
3417
3413
  default:
3418
3414
  s = r.NONE;
@@ -3421,14 +3417,14 @@ class _i extends dn {
3421
3417
  default:
3422
3418
  s = r.NONE;
3423
3419
  }
3424
- s !== r.NONE && e.dispatchEvent(zt);
3420
+ s !== r.NONE && e.dispatchEvent(Yt);
3425
3421
  }
3426
- function Ct(o) {
3427
- switch (xt(o), s) {
3422
+ function St(o) {
3423
+ switch (wt(o), s) {
3428
3424
  case r.TOUCH_ROTATE:
3429
3425
  if (e.enableRotate === !1)
3430
3426
  return;
3431
- mt(o), e.update();
3427
+ gt(o), e.update();
3432
3428
  break;
3433
3429
  case r.TOUCH_PAN:
3434
3430
  if (e.enablePan === !1)
@@ -3438,12 +3434,12 @@ class _i extends dn {
3438
3434
  case r.TOUCH_DOLLY_PAN:
3439
3435
  if (e.enableZoom === !1 && e.enablePan === !1)
3440
3436
  return;
3441
- vt(o), e.update();
3437
+ bt(o), e.update();
3442
3438
  break;
3443
3439
  case r.TOUCH_DOLLY_ROTATE:
3444
3440
  if (e.enableZoom === !1 && e.enableRotate === !1)
3445
3441
  return;
3446
- gt(o), e.update();
3442
+ yt(o), e.update();
3447
3443
  break;
3448
3444
  default:
3449
3445
  s = r.NONE;
@@ -3452,10 +3448,10 @@ class _i extends dn {
3452
3448
  function Ge(o) {
3453
3449
  e.enabled !== !1 && o.preventDefault();
3454
3450
  }
3455
- function It(o) {
3451
+ function Lt(o) {
3456
3452
  f.push(o.pointerId);
3457
3453
  }
3458
- function Lt(o) {
3454
+ function Nt(o) {
3459
3455
  delete v[o.pointerId];
3460
3456
  for (let y = 0; y < f.length; y++)
3461
3457
  if (f[y] == o.pointerId) {
@@ -3463,7 +3459,7 @@ class _i extends dn {
3463
3459
  return;
3464
3460
  }
3465
3461
  }
3466
- function xt(o) {
3462
+ function wt(o) {
3467
3463
  let y = v[o.pointerId];
3468
3464
  y === void 0 && (y = new de(), v[o.pointerId] = y), y.set(o.pageX, o.pageY);
3469
3465
  }
@@ -3471,10 +3467,10 @@ class _i extends dn {
3471
3467
  const y = o.pointerId === f[0] ? f[1] : f[0];
3472
3468
  return v[y];
3473
3469
  }
3474
- e.domElement.addEventListener("contextmenu", Ge), e.domElement.addEventListener("pointerdown", Pe), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", bt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", Et, { passive: !0, capture: !0 }), this.update();
3470
+ e.domElement.addEventListener("contextmenu", Ge), e.domElement.addEventListener("pointerdown", Pe), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", Et, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", xt, { passive: !0, capture: !0 }), this.update();
3475
3471
  }
3476
3472
  }
3477
- const Mt = (t) => {
3473
+ const Rt = (t) => {
3478
3474
  const [n, a] = le(t.options[t.index]), e = () => {
3479
3475
  t.onToggle(!t.open);
3480
3476
  }, r = (s) => {
@@ -3484,14 +3480,14 @@ const Mt = (t) => {
3484
3480
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3485
3481
  t.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ u.jsx("li", { onClick: () => r(s), children: s }, s)) })
3486
3482
  ] });
3487
- }, Le = Aa(function(n, a) {
3483
+ }, Le = _a(function(n, a) {
3488
3484
  const [e, r] = le(!1), s = n.options.indexOf(n.camera.name);
3489
3485
  return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
3490
3486
  /* @__PURE__ */ u.jsx("div", { ref: a, className: "clickable", onClick: () => {
3491
3487
  e && r(!1);
3492
3488
  } }),
3493
3489
  /* @__PURE__ */ u.jsx(
3494
- Mt,
3490
+ Rt,
3495
3491
  {
3496
3492
  index: s,
3497
3493
  open: e,
@@ -3504,14 +3500,14 @@ const Mt = (t) => {
3504
3500
  }
3505
3501
  )
3506
3502
  ] });
3507
- }), cn = [
3503
+ }), ln = [
3508
3504
  "Single",
3509
3505
  "Side by Side",
3510
3506
  "Stacked",
3511
3507
  "Quad"
3512
3508
  ], re = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map();
3513
3509
  function $e(t, n) {
3514
- const a = new Pn(-100, 100, 100, -100, 50, 3e3);
3510
+ const a = new An(-100, 100, 100, -100, 50, 3e3);
3515
3511
  return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), re.set(t, a), a;
3516
3512
  }
3517
3513
  $e("Top", new Z(0, 1e3, 0));
@@ -3521,47 +3517,47 @@ $e("Right", new Z(1e3, 0, 0));
3521
3517
  $e("Front", new Z(0, 0, 1e3));
3522
3518
  $e("Back", new Z(0, 0, -1e3));
3523
3519
  $e("Orthographic", new Z(1e3, 1e3, 1e3));
3524
- const At = new Yt(60, 1, 50, 3e3);
3525
- At.name = "Debug";
3526
- At.position.set(500, 500, 500);
3527
- At.lookAt(0, 0, 0);
3528
- re.set("Debug", At);
3529
- const ln = [
3520
+ const kt = new Gt(60, 1, 50, 3e3);
3521
+ kt.name = "Debug";
3522
+ kt.position.set(500, 500, 500);
3523
+ kt.lookAt(0, 0, 0);
3524
+ re.set("Debug", kt);
3525
+ const un = [
3530
3526
  "Renderer",
3531
3527
  "Depth",
3532
3528
  "Normals",
3533
3529
  "UVs",
3534
3530
  "Wireframe"
3535
- ], ki = new ya(), ji = new Ea(), Di = new li(), Ii = new Ca({
3531
+ ], Di = new Ea(), Ii = new Ca(), Li = new di(), Ni = new xa({
3536
3532
  opacity: 0.33,
3537
3533
  transparent: !0,
3538
3534
  wireframe: !0
3539
3535
  });
3540
- let wt = "Renderer";
3541
- const H = new An();
3536
+ let Mt = "Renderer";
3537
+ const H = new kn();
3542
3538
  H.name = "Debug Scene";
3543
- let Ee = new An();
3539
+ let Ee = new kn();
3544
3540
  H.add(Ee);
3545
- const dt = new xa();
3546
- dt.name = "helpers";
3547
- H.add(dt);
3548
- const Li = new oi();
3549
- dt.add(Li);
3550
- const zn = new _n(500);
3551
- zn.name = "axisHelper";
3552
- dt.add(zn);
3553
- const ut = new _n(100);
3554
- ut.name = "interactionHelper";
3555
- dt.add(ut);
3556
- ut.visible = !1;
3557
- let Ot = !1, V = re.get("Debug"), ce = re.get("Orthographic"), Ne = re.get("Front"), Fe = re.get("Top"), un = !1;
3558
- function Zi(t) {
3541
+ const ht = new Sa();
3542
+ ht.name = "helpers";
3543
+ H.add(ht);
3544
+ const Fi = new ci();
3545
+ ht.add(Fi);
3546
+ const Yn = new _n(500);
3547
+ Yn.name = "axisHelper";
3548
+ ht.add(Yn);
3549
+ const ft = new _n(100);
3550
+ ft.name = "interactionHelper";
3551
+ ht.add(ft);
3552
+ ft.visible = !1;
3553
+ let Tt = !1, V = re.get("Debug"), ce = re.get("Orthographic"), Ne = re.get("Front"), Fe = re.get("Top"), dn = !1;
3554
+ function Qi(t) {
3559
3555
  const [n, a] = le(t.mode !== void 0 ? t.mode : "Single"), [e, r] = le(null), [s, h] = le(!1), [c, l] = le(!1), [d, b] = le(!1), [, m] = le(Date.now()), E = Ce(null), S = Ce(null), x = Ce(null), T = Ce(null), W = Ce(null), I = Ce(null), w = (f, v) => {
3560
3556
  const C = se.get(f.name);
3561
3557
  C !== void 0 && C.dispose(), se.delete(f.name);
3562
3558
  const A = ye.get(f.name);
3563
3559
  A !== void 0 && (H.remove(A), A.dispose()), ye.delete(f.name);
3564
- const Y = new _i(f, v);
3560
+ const Y = new ji(f, v);
3565
3561
  switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, f.name) {
3566
3562
  case "Top":
3567
3563
  case "Bottom":
@@ -3572,8 +3568,8 @@ function Zi(t) {
3572
3568
  Y.enableRotate = !1;
3573
3569
  break;
3574
3570
  }
3575
- if (se.set(f.name, Y), f instanceof Yt) {
3576
- const z = new Oa(f);
3571
+ if (se.set(f.name, Y), f instanceof Gt) {
3572
+ const z = new Ma(f);
3577
3573
  ye.set(f.name, z), H.add(z);
3578
3574
  }
3579
3575
  }, G = (f) => {
@@ -3602,28 +3598,28 @@ function Zi(t) {
3602
3598
  }
3603
3599
  };
3604
3600
  Be(() => {
3605
- const f = new Sa({
3601
+ const f = new wa({
3606
3602
  canvas: E.current,
3607
3603
  stencil: !1
3608
3604
  });
3609
3605
  f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
3610
3606
  }, []), Be(() => {
3611
3607
  const f = (A) => {
3612
- In(Ee), H.remove(Ee);
3608
+ Ln(Ee), H.remove(Ee);
3613
3609
  const Y = t.scenes.get(A.value.name);
3614
3610
  if (Y !== void 0) {
3615
3611
  const z = new Y();
3616
- t.onSceneSet !== void 0 && t.onSceneSet(z), Ee = z, t.three.scene = Ee, H.add(Ee), un = !0;
3612
+ t.onSceneSet !== void 0 && t.onSceneSet(z), Ee = z, t.three.scene = Ee, H.add(Ee), dn = !0;
3617
3613
  }
3618
3614
  }, v = (A) => {
3619
- var F;
3620
- const Y = A.value, z = (F = t.three.scene) == null ? void 0 : F.getObjectByProperty("uuid", Y.uuid);
3615
+ var B;
3616
+ const Y = A.value, z = (B = t.three.scene) == null ? void 0 : B.getObjectByProperty("uuid", Y.uuid);
3621
3617
  z !== void 0 && re.set(Y.name, z), m(Date.now());
3622
3618
  }, C = (A) => {
3623
3619
  re.delete(A.value.name), m(Date.now());
3624
3620
  };
3625
- return k.addEventListener(j.SET_SCENE, f), k.addEventListener(j.ADD_CAMERA, v), k.addEventListener(j.REMOVE_CAMERA, C), () => {
3626
- k.removeEventListener(j.SET_SCENE, f), k.removeEventListener(j.ADD_CAMERA, v), k.removeEventListener(j.REMOVE_CAMERA, C);
3621
+ return _.addEventListener(j.SET_SCENE, f), _.addEventListener(j.ADD_CAMERA, v), _.addEventListener(j.REMOVE_CAMERA, C), () => {
3622
+ _.removeEventListener(j.SET_SCENE, f), _.removeEventListener(j.ADD_CAMERA, v), _.removeEventListener(j.REMOVE_CAMERA, C);
3627
3623
  };
3628
3624
  }, []), Be(() => {
3629
3625
  if (e === null)
@@ -3631,23 +3627,23 @@ function Zi(t) {
3631
3627
  let f = window.innerWidth, v = window.innerHeight, C = Math.floor(f / 2), A = Math.floor(v / 2), Y = -1;
3632
3628
  const z = () => {
3633
3629
  f = window.innerWidth - 300, v = window.innerHeight, C = Math.floor(f / 2), A = Math.floor(v / 2), e.setSize(f, v);
3634
- let R = f, B = v;
3630
+ let R = f, U = v;
3635
3631
  switch (n) {
3636
3632
  case "Side by Side":
3637
- R = C, B = v;
3633
+ R = C, U = v;
3638
3634
  break;
3639
3635
  case "Stacked":
3640
- R = f, B = A;
3636
+ R = f, U = A;
3641
3637
  break;
3642
3638
  case "Quad":
3643
- R = C, B = A;
3639
+ R = C, U = A;
3644
3640
  break;
3645
3641
  }
3646
3642
  re.forEach((Q) => {
3647
3643
  var fe;
3648
- Q instanceof Pn ? (Q.left = R / -2, Q.right = R / 2, Q.top = B / 2, Q.bottom = B / -2, Q.updateProjectionMatrix()) : Q instanceof Yt && (Q.aspect = R / B, Q.updateProjectionMatrix(), (fe = ye.get(Q.name)) == null || fe.update());
3644
+ Q instanceof An ? (Q.left = R / -2, Q.right = R / 2, Q.top = U / 2, Q.bottom = U / -2, Q.updateProjectionMatrix()) : Q instanceof Gt && (Q.aspect = R / U, Q.updateProjectionMatrix(), (fe = ye.get(Q.name)) == null || fe.update());
3649
3645
  });
3650
- }, F = () => {
3646
+ }, B = () => {
3651
3647
  e.setViewport(0, 0, f, v), e.setScissor(0, 0, f, v), e.render(H, V);
3652
3648
  }, L = () => {
3653
3649
  if (n === "Side by Side")
@@ -3657,14 +3653,14 @@ function Zi(t) {
3657
3653
  e.setViewport(0, R, f, A), e.setScissor(0, R, f, A), e.render(H, V), e.setViewport(0, 0, f, A), e.setScissor(0, 0, f, A), e.render(H, ce);
3658
3654
  }
3659
3655
  }, q = () => {
3660
- let R = 0, B = 0;
3661
- B = v - A, R = 0, e.setViewport(R, B, C, A), e.setScissor(R, B, C, A), e.render(H, V), R = C, e.setViewport(R, B, C, A), e.setScissor(R, B, C, A), e.render(H, ce), B = 0, R = 0, e.setViewport(R, B, C, A), e.setScissor(R, B, C, A), e.render(H, Ne), R = C, e.setViewport(R, B, C, A), e.setScissor(R, B, C, A), e.render(H, Fe);
3656
+ let R = 0, U = 0;
3657
+ U = v - A, R = 0, e.setViewport(R, U, C, A), e.setScissor(R, U, C, A), e.render(H, V), R = C, e.setViewport(R, U, C, A), e.setScissor(R, U, C, A), e.render(H, ce), U = 0, R = 0, e.setViewport(R, U, C, A), e.setScissor(R, U, C, A), e.render(H, Ne), R = C, e.setViewport(R, U, C, A), e.setScissor(R, U, C, A), e.render(H, Fe);
3662
3658
  }, K = () => {
3663
3659
  switch (se.forEach((R) => {
3664
3660
  R.update();
3665
- }), t.onSceneUpdate !== void 0 && un && t.onSceneUpdate(Ee), e.clear(), n) {
3661
+ }), t.onSceneUpdate !== void 0 && dn && t.onSceneUpdate(Ee), e.clear(), n) {
3666
3662
  case "Single":
3667
- F();
3663
+ B();
3668
3664
  break;
3669
3665
  case "Side by Side":
3670
3666
  case "Stacked":
@@ -3681,13 +3677,13 @@ function Zi(t) {
3681
3677
  };
3682
3678
  }, [n, e]), Be(() => {
3683
3679
  if (e !== null) {
3684
- const f = new wa(), v = new de(), C = (F, L, q, K) => {
3680
+ const f = new Oa(), v = new de(), C = (B, L, q, K) => {
3685
3681
  switch (n) {
3686
3682
  case "Quad":
3687
- F < q ? L < K ? f.setFromCamera(v, V) : f.setFromCamera(v, Ne) : L < K ? f.setFromCamera(v, ce) : f.setFromCamera(v, Fe);
3683
+ B < q ? L < K ? f.setFromCamera(v, V) : f.setFromCamera(v, Ne) : L < K ? f.setFromCamera(v, ce) : f.setFromCamera(v, Fe);
3688
3684
  break;
3689
3685
  case "Side by Side":
3690
- F < q ? f.setFromCamera(v, V) : f.setFromCamera(v, ce);
3686
+ B < q ? f.setFromCamera(v, V) : f.setFromCamera(v, ce);
3691
3687
  break;
3692
3688
  case "Single":
3693
3689
  f.setFromCamera(v, V);
@@ -3696,17 +3692,17 @@ function Zi(t) {
3696
3692
  L < K ? f.setFromCamera(v, V) : f.setFromCamera(v, ce);
3697
3693
  break;
3698
3694
  }
3699
- }, A = (F) => {
3700
- if (!Ot)
3695
+ }, A = (B) => {
3696
+ if (!Tt)
3701
3697
  return;
3702
3698
  const L = new de();
3703
3699
  e.getSize(L);
3704
- const q = Math.min(F.clientX, L.x), K = Math.min(F.clientY, L.y);
3700
+ const q = Math.min(B.clientX, L.x), K = Math.min(B.clientY, L.y);
3705
3701
  v.x = Ke(q, 0, L.x, -1, 1), v.y = Ke(K, 0, L.y, 1, -1);
3706
- const R = L.x / 2, B = L.y / 2, Q = () => {
3702
+ const R = L.x / 2, U = L.y / 2, Q = () => {
3707
3703
  q < R ? v.x = Ke(q, 0, R, -1, 1) : v.x = Ke(q, R, L.x, -1, 1);
3708
3704
  }, fe = () => {
3709
- K < B ? v.y = Ke(K, 0, B, 1, -1) : v.y = Ke(K, B, L.y, 1, -1);
3705
+ K < U ? v.y = Ke(K, 0, U, 1, -1) : v.y = Ke(K, U, L.y, 1, -1);
3710
3706
  };
3711
3707
  switch (n) {
3712
3708
  case "Quad":
@@ -3719,16 +3715,16 @@ function Zi(t) {
3719
3715
  fe(), fe();
3720
3716
  break;
3721
3717
  }
3722
- C(q, K, R, B);
3718
+ C(q, K, R, U);
3723
3719
  const xe = f.intersectObjects(Ee.children);
3724
- xe.length > 0 && ut.position.copy(xe[0].point);
3725
- }, Y = (F) => {
3726
- if (!Ot)
3720
+ xe.length > 0 && ft.position.copy(xe[0].point);
3721
+ }, Y = (B) => {
3722
+ if (!Tt)
3727
3723
  return;
3728
3724
  const L = new de();
3729
- if (e.getSize(L), F.clientX >= L.x)
3725
+ if (e.getSize(L), B.clientX >= L.x)
3730
3726
  return;
3731
- A(F);
3727
+ A(B);
3732
3728
  const q = f.intersectObjects(Ee.children);
3733
3729
  q.length > 0 && t.three.getObject(q[0].object.uuid);
3734
3730
  }, z = S.current;
@@ -3792,10 +3788,10 @@ function Zi(t) {
3792
3788
  ] }),
3793
3789
  /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
3794
3790
  /* @__PURE__ */ u.jsx(
3795
- Mt,
3791
+ Rt,
3796
3792
  {
3797
- index: cn.indexOf(n),
3798
- options: cn,
3793
+ index: ln.indexOf(n),
3794
+ options: ln,
3799
3795
  onSelect: (f) => {
3800
3796
  f !== n && (he(), a(f));
3801
3797
  },
@@ -3806,28 +3802,28 @@ function Zi(t) {
3806
3802
  }
3807
3803
  ),
3808
3804
  /* @__PURE__ */ u.jsx(
3809
- Mt,
3805
+ Rt,
3810
3806
  {
3811
- index: ln.indexOf(wt),
3812
- options: ln,
3807
+ index: un.indexOf(Mt),
3808
+ options: un,
3813
3809
  onSelect: (f) => {
3814
- if (f !== wt)
3815
- switch (wt = f, wt) {
3810
+ if (f !== Mt)
3811
+ switch (Mt = f, Mt) {
3816
3812
  case "Depth":
3817
- H.overrideMaterial = ki;
3813
+ H.overrideMaterial = Di;
3818
3814
  break;
3819
3815
  case "Normals":
3820
- H.overrideMaterial = ji;
3816
+ H.overrideMaterial = Ii;
3821
3817
  break;
3822
3818
  default:
3823
3819
  case "Renderer":
3824
3820
  H.overrideMaterial = null;
3825
3821
  break;
3826
3822
  case "Wireframe":
3827
- H.overrideMaterial = Ii;
3823
+ H.overrideMaterial = Ni;
3828
3824
  break;
3829
3825
  case "UVs":
3830
- H.overrideMaterial = Di;
3826
+ H.overrideMaterial = Li;
3831
3827
  break;
3832
3828
  }
3833
3829
  },
@@ -3838,7 +3834,7 @@ function Zi(t) {
3838
3834
  }
3839
3835
  ),
3840
3836
  /* @__PURE__ */ u.jsx(
3841
- Mt,
3837
+ Rt,
3842
3838
  {
3843
3839
  index: 0,
3844
3840
  options: [
@@ -3846,7 +3842,7 @@ function Zi(t) {
3846
3842
  "Selection Mode"
3847
3843
  ],
3848
3844
  onSelect: (f) => {
3849
- Ot = f === "Selection Mode", ut.visible = Ot;
3845
+ Tt = f === "Selection Mode", ft.visible = Tt;
3850
3846
  },
3851
3847
  open: d,
3852
3848
  onToggle: (f) => {
@@ -3857,7 +3853,7 @@ function Zi(t) {
3857
3853
  ] })
3858
3854
  ] });
3859
3855
  }
3860
- function Ji(t) {
3856
+ function er(t) {
3861
3857
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3862
3858
  /* @__PURE__ */ u.jsx("header", { children: t.header }),
3863
3859
  t.children,
@@ -3865,41 +3861,41 @@ function Ji(t) {
3865
3861
  ] });
3866
3862
  }
3867
3863
  export {
3868
- Wt as Accordion,
3869
- Wi as Application,
3870
- Rt as BaseRemote,
3871
- Un as ChildObject,
3872
- ui as ContainerObject,
3873
- ei as Draggable,
3874
- Qa as DraggableItem,
3875
- ti as Dropdown,
3876
- ni as DropdownItem,
3877
- Ji as Editor,
3878
- oi as InfiniteGridHelper,
3879
- Pi as Inspector,
3880
- Zi as MultiView,
3881
- Bn as NavButton,
3882
- La as RemoteComponents,
3883
- qi as RemoteController,
3884
- Pt as RemoteTheatre,
3885
- Va as RemoteThree,
3886
- Fn as RemoteTweakpane,
3887
- Xi as SceneInspector,
3888
- Ki as SidePanel,
3864
+ qt as Accordion,
3865
+ Ki as Application,
3866
+ At as BaseRemote,
3867
+ $n as ChildObject,
3868
+ fi as ContainerObject,
3869
+ ni as Draggable,
3870
+ ti as DraggableItem,
3871
+ ai as Dropdown,
3872
+ ii as DropdownItem,
3873
+ er as Editor,
3874
+ ci as InfiniteGridHelper,
3875
+ ki as Inspector,
3876
+ Qi as MultiView,
3877
+ Un as NavButton,
3878
+ Fa as RemoteComponents,
3879
+ Xi as RemoteController,
3880
+ Ze as RemoteTheatre,
3881
+ Wa as RemoteThree,
3882
+ Bn as RemoteTweakpane,
3883
+ Ji as SceneInspector,
3884
+ Zi as SidePanel,
3889
3885
  j as ToolEvents,
3890
- li as UVMaterial,
3891
- lt as capitalize,
3892
- Gi as clamp,
3893
- ja as colorToHex,
3894
- k as debugDispatcher,
3895
- In as dispose,
3896
- Ia as disposeMaterial,
3897
- Hi as disposeTexture,
3898
- Vi as distance,
3899
- Dn as hierarchyUUID,
3900
- ka as isColor,
3901
- _a as randomID,
3902
- Da as resetThreeObjects,
3903
- Bt as round,
3904
- Gt as totalThreeObjects
3886
+ di as UVMaterial,
3887
+ dt as capitalize,
3888
+ Hi as clamp,
3889
+ Ia as colorToHex,
3890
+ _ as debugDispatcher,
3891
+ Ln as dispose,
3892
+ Na as disposeMaterial,
3893
+ qi as disposeTexture,
3894
+ Wi as distance,
3895
+ In as hierarchyUUID,
3896
+ Da as isColor,
3897
+ ja as randomID,
3898
+ La as resetThreeObjects,
3899
+ Ut as round,
3900
+ Vt as totalThreeObjects
3905
3901
  };