@tomorrowevening/hermes 0.0.40 → 0.0.42

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.es.js CHANGED
@@ -1,10 +1,13 @@
1
- import { PositionalAudio as Vn, EventDispatcher as ln, Texture as un, CubeTexture as Hn, RepeatWrapping as qt, ShaderMaterial as dn, GLSL3 as Wn, DoubleSide as hn, Color as Mt, Mesh as qn, PlaneGeometry as Kn, FrontSide as Xn, BackSide as Zn, NoBlending as Jn, NormalBlending as Qn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as na, CustomBlending as aa, AddEquation as ia, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as sa, MaxEquation as ca, ZeroFactor as fn, OneFactor as pn, SrcColorFactor as mn, OneMinusSrcColorFactor as vn, SrcAlphaFactor as gn, OneMinusSrcAlphaFactor as bn, DstAlphaFactor as yn, OneMinusDstAlphaFactor as En, DstColorFactor as Cn, OneMinusDstColorFactor as xn, SrcAlphaSaturateFactor as la, ConstantColorFactor as wn, OneMinusConstantColorFactor as Sn, ConstantAlphaFactor as On, OneMinusConstantAlphaFactor as Mn, Matrix4 as ua, Vector3 as X, Euler as da, Ray as ha, Plane as fa, MathUtils as pa, MOUSE as Ve, TOUCH as He, Quaternion as Kt, Spherical as Xt, Vector2 as ue, PerspectiveCamera as $t, MeshDepthMaterial as ma, MeshNormalMaterial as va, MeshBasicMaterial as ga, OrthographicCamera as Tn, Scene as Rn, Group as ba, AxesHelper as _n, WebGLRenderer as ya, Raycaster as Ea, CameraHelper as Ca } from "three";
2
- import at from "@theatre/studio";
3
- import { Pane as xa } from "tweakpane";
4
- import * as wa from "@tweakpane/plugin-essentials";
5
- import An, { useState as ae, useRef as Ee, useEffect as Oe, forwardRef as Sa } from "react";
6
- import { Reorder as Pn } from "framer-motion";
7
- function ct(t) {
1
+ import { PositionalAudio as Yn, EventDispatcher as cn, Texture as ln, CubeTexture as Gn, RepeatWrapping as Ht, ShaderMaterial as un, GLSL3 as Vn, DoubleSide as dn, Color as wt, Mesh as Hn, PlaneGeometry as Wn, FrontSide as qn, BackSide as Kn, NoBlending as Xn, NormalBlending as Zn, AdditiveBlending as Jn, SubtractiveBlending as Qn, MultiplyBlending as ea, CustomBlending as ta, AddEquation as na, SubtractEquation as aa, ReverseSubtractEquation as ia, MinEquation as ra, MaxEquation as oa, ZeroFactor as hn, OneFactor as fn, SrcColorFactor as pn, OneMinusSrcColorFactor as mn, SrcAlphaFactor as vn, OneMinusSrcAlphaFactor as gn, DstAlphaFactor as bn, OneMinusDstAlphaFactor as yn, DstColorFactor as En, OneMinusDstColorFactor as Cn, SrcAlphaSaturateFactor as sa, ConstantColorFactor as Sn, OneMinusConstantColorFactor as xn, ConstantAlphaFactor as wn, OneMinusConstantAlphaFactor as On, Matrix4 as ca, Vector3 as X, Euler as la, Ray as ua, Plane as da, MathUtils as ha, MOUSE as Ge, TOUCH as Ve, Quaternion as Wt, Spherical as qt, Vector2 as ue, PerspectiveCamera as Bt, MeshDepthMaterial as fa, MeshNormalMaterial as pa, MeshBasicMaterial as ma, OrthographicCamera as Mn, Scene as Tn, Group as va, AxesHelper as Rn, WebGLRenderer as ga, Raycaster as ba, CameraHelper as ya } from "three";
2
+ import Kt from "@theatre/studio";
3
+ import { Pane as Ea } from "tweakpane";
4
+ import * as Ca from "@tweakpane/plugin-essentials";
5
+ import _n, { useState as ae, useRef as ye, useEffect as we, forwardRef as Sa } from "react";
6
+ import { Reorder as An } from "framer-motion";
7
+ const Pn = () => {
8
+ }, Mi = () => {
9
+ };
10
+ function ot(t) {
8
11
  return t.substring(0, 1).toUpperCase() + t.substring(1);
9
12
  }
10
13
  function Ti(t, n, a) {
@@ -14,45 +17,45 @@ function Ri(t, n) {
14
17
  const a = t - n;
15
18
  return Math.sqrt(a * a);
16
19
  }
17
- function Oa() {
20
+ function xa() {
18
21
  return Math.round(Math.random() * 1e6).toString();
19
22
  }
20
- function Ma(t) {
23
+ function wa(t) {
21
24
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
22
25
  }
23
- function Ta(t) {
26
+ function Oa(t) {
24
27
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (u) => {
25
- const f = u.toString(16);
26
- return f.length === 1 ? "0" + f : f;
27
- }, s = o(n), p = o(a), c = o(e);
28
- return "#" + s + p + c;
28
+ const d = u.toString(16);
29
+ return d.length === 1 ? "0" + d : d;
30
+ }, c = o(n), p = o(a), s = o(e);
31
+ return "#" + c + p + s;
29
32
  }
30
- function Nt(t, n = 1) {
33
+ function It(t, n = 1) {
31
34
  return Number(t.toFixed(n));
32
35
  }
33
- let zt = 0;
34
- const Ra = () => {
35
- zt = 0;
36
+ let Ut = 0;
37
+ const Ma = () => {
38
+ Ut = 0;
36
39
  }, kn = (t) => {
37
40
  if (!t)
38
41
  return;
39
42
  let n = t.name.replace(" ", "");
40
- n.length === 0 && (n = `obj_${zt}`, zt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
43
+ n.length === 0 && (n = `obj_${Ut}`, Ut++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
41
44
  kn(a);
42
45
  });
43
46
  }, _i = (t) => {
44
47
  t?.dispose();
45
- }, _a = (t) => {
48
+ }, Ta = (t) => {
46
49
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
47
50
  }, jn = (t) => {
48
51
  if (t) {
49
52
  for (; t.children.length > 0; ) {
50
53
  const n = t.children[0];
51
- n instanceof Vn ? (n.pause(), n.parent && n.parent.remove(n)) : jn(n);
54
+ n instanceof Yn ? (n.pause(), n.parent && n.parent.remove(n)) : jn(n);
52
55
  }
53
56
  if (t.parent && t.parent.remove(t), t.isMesh) {
54
57
  const n = t;
55
- n.geometry?.dispose(), _a(n.material);
58
+ n.geometry?.dispose(), Ta(n.material);
56
59
  }
57
60
  t.dispose !== void 0 && t.dispose();
58
61
  }
@@ -73,9 +76,7 @@ class Ai {
73
76
  // Set editor and add components here
74
77
  init() {
75
78
  return new Promise((n) => {
76
- this.components.forEach((a) => {
77
- a.handleEditorApp();
78
- }), n();
79
+ n();
79
80
  });
80
81
  }
81
82
  addComponent(n, a) {
@@ -119,7 +120,7 @@ class Ai {
119
120
  n && (this._mode = "editor");
120
121
  }
121
122
  }
122
- const k = new ln(), j = {
123
+ const k = new cn(), j = {
123
124
  CUSTOM: "ToolEvents::custom",
124
125
  // Components
125
126
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -135,7 +136,7 @@ const k = new ln(), j = {
135
136
  ADD_CAMERA: "ToolEvents::addCamera",
136
137
  REMOVE_CAMERA: "ToolEvents::removeCamera"
137
138
  };
138
- class Tt {
139
+ class Ot {
139
140
  app;
140
141
  constructor(n) {
141
142
  this.app = n;
@@ -149,11 +150,8 @@ class Tt {
149
150
  // Receives Editor events
150
151
  handleEditor(n) {
151
152
  }
152
- // Runs only in-editor
153
- handleEditorApp() {
154
- }
155
153
  }
156
- class Pi extends Tt {
154
+ class Pi extends Ot {
157
155
  selectDropdown(n, a) {
158
156
  this.app.send({
159
157
  event: "selectComponent",
@@ -187,15 +185,13 @@ class Pi extends Tt {
187
185
  }
188
186
  }
189
187
  }
190
- const Dn = () => {
191
- };
192
- let ge;
193
- class In extends Tt {
188
+ class Ra extends Ot {
194
189
  project;
195
190
  sheets = /* @__PURE__ */ new Map();
196
191
  sheetObjects = /* @__PURE__ */ new Map();
197
192
  sheetObjectCBs = /* @__PURE__ */ new Map();
198
193
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
194
+ activeSheet;
199
195
  static rafDriver = void 0;
200
196
  dispose() {
201
197
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -237,17 +233,17 @@ class In extends Tt {
237
233
  console.error("Theatre Project hasn't been created yet.");
238
234
  return;
239
235
  }
240
- const s = this.sheet(n);
241
- if (s === void 0)
236
+ const c = this.sheet(n);
237
+ if (c === void 0)
242
238
  return;
243
239
  const p = `${n}_${a}`;
244
- let c = this.sheetObjects.get(p);
245
- c !== void 0 ? c = s.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = s.object(a, e), this.sheetObjects.set(p, c), this.sheetObjectCBs.set(p, o !== void 0 ? o : Dn);
246
- const u = c.onValuesChange((f) => {
240
+ let s = this.sheetObjects.get(p);
241
+ s !== void 0 ? s = c.object(a, { ...e, ...s.value }, { reconfigure: !0 }) : s = c.object(a, e), this.sheetObjects.set(p, s), this.sheetObjectCBs.set(p, o !== void 0 ? o : Pn);
242
+ const u = s.onValuesChange((d) => {
247
243
  if (this.app.editor) {
248
- for (const b in f) {
249
- const E = f[b];
250
- typeof E == "object" && Ma(E) && (f[b] = {
244
+ for (const b in d) {
245
+ const E = d[b];
246
+ typeof E == "object" && wa(E) && (d[b] = {
251
247
  r: E.r,
252
248
  g: E.g,
253
249
  b: E.b,
@@ -260,14 +256,14 @@ class In extends Tt {
260
256
  data: {
261
257
  sheet: n,
262
258
  sheetObject: p,
263
- values: f
259
+ values: d
264
260
  }
265
261
  });
266
262
  }
267
263
  const v = this.sheetObjectCBs.get(p);
268
- v !== void 0 && v(f);
264
+ v !== void 0 && v(d);
269
265
  });
270
- return this.sheetObjectUnsubscribe.set(p, u), c;
266
+ return this.sheetObjectUnsubscribe.set(p, u), s;
271
267
  }
272
268
  unsubscribe(n) {
273
269
  if (this.project === void 0) {
@@ -276,8 +272,8 @@ class In extends Tt {
276
272
  }
277
273
  const a = n.address.sheetId, e = n.address.objectKey;
278
274
  this.sheets.get(a)?.detachObject(e);
279
- const s = `${a}_${e}`, p = this.sheetObjectUnsubscribe.get(s);
280
- p !== void 0 && (this.sheetObjects.delete(s), this.sheetObjectCBs.delete(s), this.sheetObjectUnsubscribe.delete(s), p());
275
+ const c = `${a}_${e}`, p = this.sheetObjectUnsubscribe.get(c);
276
+ p !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), p());
281
277
  }
282
278
  // Remote Controller
283
279
  // Receives App events
@@ -285,16 +281,16 @@ class In extends Tt {
285
281
  let a;
286
282
  switch (n.event) {
287
283
  case "setSheet":
288
- a = this.sheets.get(n.data.sheet), a !== void 0 && (ge = a, at.setSelection([a]));
284
+ a = this.sheets.get(n.data.sheet), a !== void 0 && (this.activeSheet = a, Kt.setSelection([a]));
289
285
  break;
290
286
  case "setSheetObject":
291
- a = this.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), a !== void 0 && at.setSelection([a]);
287
+ a = this.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), a !== void 0 && Kt.setSelection([a]);
292
288
  break;
293
289
  case "updateSheetObject":
294
290
  a = this.sheets.get(n.data.sheet), a !== void 0 && a.sequence.pause(), a = this.sheetObjectCBs.get(n.data.sheetObject), a !== void 0 && a(n.data.values);
295
291
  break;
296
292
  case "updateTimeline":
297
- a = this.sheets.get(n.data.sheet), ge !== void 0 && (ge.sequence.position = n.data.position);
293
+ a = this.sheets.get(n.data.sheet), this.activeSheet !== void 0 && (this.activeSheet.sequence.position = n.data.position);
298
294
  break;
299
295
  }
300
296
  }
@@ -310,52 +306,51 @@ class In extends Tt {
310
306
  break;
311
307
  }
312
308
  }
313
- // Runs only in-editor
314
- handleEditorApp() {
315
- if (this.app.editor) {
316
- at.ui.restore(), at.onSelectionChange((o) => {
317
- o.length < 1 || o.forEach((s) => {
318
- let p = s.address.sheetId, c = "setSheet", u = {};
319
- switch (s.type) {
320
- case "Theatre_Sheet_PublicAPI":
321
- c = "setSheet", u = {
322
- sheet: s.address.sheetId
323
- }, ge = this.sheets.get(s.address.sheetId);
324
- break;
325
- case "Theatre_SheetObject_PublicAPI":
326
- c = "setSheetObject", p += `_${s.address.objectKey}`, u = {
327
- id: p,
328
- sheet: s.address.sheetId,
329
- key: s.address.objectKey
330
- }, ge = this.sheets.get(s.address.sheetId);
331
- break;
309
+ }
310
+ function ki(t, n, a) {
311
+ if (t.editor) {
312
+ a.ui.restore(), a.onSelectionChange((p) => {
313
+ p.length < 1 || p.forEach((s) => {
314
+ let u = s.address.sheetId, d = "setSheet", v = {};
315
+ switch (s.type) {
316
+ case "Theatre_Sheet_PublicAPI":
317
+ d = "setSheet", v = {
318
+ sheet: s.address.sheetId
319
+ }, n.activeSheet = n.sheets.get(s.address.sheetId);
320
+ break;
321
+ case "Theatre_SheetObject_PublicAPI":
322
+ d = "setSheetObject", u += `_${s.address.objectKey}`, v = {
323
+ id: u,
324
+ sheet: s.address.sheetId,
325
+ key: s.address.objectKey
326
+ }, n.activeSheet = n.sheets.get(s.address.sheetId);
327
+ break;
328
+ }
329
+ t.send({ event: d, target: "app", data: v });
330
+ });
331
+ });
332
+ let e = -1;
333
+ const o = () => {
334
+ if (Ra.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
335
+ e = n.activeSheet.sequence.position;
336
+ const p = n.activeSheet;
337
+ t.send({
338
+ event: "updateTimeline",
339
+ target: "app",
340
+ data: {
341
+ position: e,
342
+ sheet: p.address.sheetId
332
343
  }
333
- this.app.send({ event: c, target: "app", data: u });
334
344
  });
335
- });
336
- let n = -1;
337
- const a = () => {
338
- if (In.rafDriver?.tick(performance.now()), ge !== void 0 && n !== ge.sequence.position) {
339
- n = ge.sequence.position;
340
- const o = ge;
341
- this.app.send({
342
- event: "updateTimeline",
343
- target: "app",
344
- data: {
345
- position: n,
346
- sheet: o.address.sheetId
347
- }
348
- });
349
- }
350
- }, e = () => {
351
- a(), requestAnimationFrame(e);
352
- };
353
- a(), e();
354
- } else
355
- at.ui.hide();
356
- }
345
+ }
346
+ }, c = () => {
347
+ o(), requestAnimationFrame(c);
348
+ };
349
+ o(), c();
350
+ } else
351
+ a.ui.hide();
357
352
  }
358
- function Aa(t) {
353
+ function _a(t) {
359
354
  if (t.name === "cameras")
360
355
  return "camera";
361
356
  if (t.name === "interactive")
@@ -369,7 +364,7 @@ function Aa(t) {
369
364
  const n = t.type;
370
365
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
371
366
  }
372
- function Ln(t) {
367
+ function Dn(t) {
373
368
  const n = {
374
369
  name: t.name,
375
370
  type: t.type,
@@ -377,10 +372,10 @@ function Ln(t) {
377
372
  children: []
378
373
  };
379
374
  return t.children.forEach((a) => {
380
- n.children.push(Ln(a));
375
+ n.children.push(Dn(a));
381
376
  }), n;
382
377
  }
383
- function Pa(t) {
378
+ function Aa(t) {
384
379
  const n = {};
385
380
  for (const a in t) {
386
381
  const e = t[a].value;
@@ -388,7 +383,7 @@ function Pa(t) {
388
383
  }
389
384
  return n;
390
385
  }
391
- function ka(t) {
386
+ function Pa(t) {
392
387
  switch (t) {
393
388
  case "blendSrcAlpha":
394
389
  case "blendDstAlpha":
@@ -400,10 +395,10 @@ function ka(t) {
400
395
  }
401
396
  return !1;
402
397
  }
403
- function We(t) {
398
+ function He(t) {
404
399
  const n = {};
405
400
  for (const a in t) {
406
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ka(a))
401
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Pa(a))
407
402
  continue;
408
403
  const e = typeof t[a], o = t[a];
409
404
  switch (e) {
@@ -415,13 +410,13 @@ function We(t) {
415
410
  case "object":
416
411
  if (o !== null)
417
412
  if (n[a] = o, o.isTexture)
418
- if (o instanceof un) {
419
- const s = o.source.toJSON();
420
- n[a] = { src: s.url };
413
+ if (o instanceof ln) {
414
+ const c = o.source.toJSON();
415
+ n[a] = { src: c.url };
421
416
  } else
422
- o instanceof Hn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
417
+ o instanceof Gn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
423
418
  else
424
- a === "uniforms" && (n[a] = Pa(n[a]));
419
+ a === "uniforms" && (n[a] = Aa(n[a]));
425
420
  else
426
421
  n[a] = { src: "" };
427
422
  break;
@@ -429,7 +424,7 @@ function We(t) {
429
424
  }
430
425
  return n;
431
426
  }
432
- function Ft(t) {
427
+ function Lt(t) {
433
428
  t.updateMatrix();
434
429
  const n = {
435
430
  name: t.name,
@@ -455,29 +450,29 @@ function Ft(t) {
455
450
  const e = t;
456
451
  if (Array.isArray(e.material)) {
457
452
  const o = [];
458
- e.material.forEach((s) => {
459
- o.push(We(s));
453
+ e.material.forEach((c) => {
454
+ o.push(He(c));
460
455
  }), n.material = o;
461
456
  } else
462
- n.material = We(e.material);
457
+ n.material = He(e.material);
463
458
  } else if (a.search("points") > -1) {
464
459
  const e = t;
465
460
  if (Array.isArray(e.material)) {
466
461
  const o = [];
467
- e.material.forEach((s) => {
468
- o.push(We(s));
462
+ e.material.forEach((c) => {
463
+ o.push(He(c));
469
464
  }), n.material = o;
470
465
  } else
471
- n.material = We(e.material);
466
+ n.material = He(e.material);
472
467
  } else if (a.search("line") > -1) {
473
468
  const e = t;
474
469
  if (Array.isArray(e.material)) {
475
470
  const o = [];
476
- e.material.forEach((s) => {
477
- o.push(We(s));
471
+ e.material.forEach((c) => {
472
+ o.push(He(c));
478
473
  }), n.material = o;
479
474
  } else
480
- n.material = We(e.material);
475
+ n.material = He(e.material);
481
476
  } else
482
477
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
483
478
  fov: t.fov,
@@ -507,7 +502,7 @@ function Ft(t) {
507
502
  });
508
503
  return n;
509
504
  }
510
- function ja(t, n) {
505
+ function ka(t, n) {
511
506
  const a = n.split(".");
512
507
  switch (a.length) {
513
508
  case 1:
@@ -544,16 +539,16 @@ function ee(t, n, a) {
544
539
  break;
545
540
  }
546
541
  }
547
- function Yt(t) {
542
+ function $t(t) {
548
543
  return new Promise((n, a) => {
549
544
  const e = new Image();
550
545
  e.onload = () => {
551
- const o = new un(e);
552
- o.wrapS = qt, o.wrapT = qt, o.needsUpdate = !0, n(o);
546
+ const o = new ln(e);
547
+ o.wrapS = Ht, o.wrapT = Ht, o.needsUpdate = !0, n(o);
553
548
  }, e.onerror = a, e.src = t;
554
549
  });
555
550
  }
556
- class ki extends Tt {
551
+ class ji extends Ot {
557
552
  scene = void 0;
558
553
  getObject(n) {
559
554
  this.app.debugEnabled && this.app.send({
@@ -563,7 +558,7 @@ class ki extends Tt {
563
558
  });
564
559
  }
565
560
  setObject(n) {
566
- const a = Ft(n);
561
+ const a = Lt(n);
567
562
  this.app.send({
568
563
  event: "setObject",
569
564
  target: "editor",
@@ -607,8 +602,8 @@ class ki extends Tt {
607
602
  setScene(n) {
608
603
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
609
604
  return;
610
- Ra(), kn(this.scene);
611
- const a = Ln(this.scene);
605
+ Ma(), kn(this.scene);
606
+ const a = Dn(this.scene);
612
607
  this.app.send({
613
608
  event: "setScene",
614
609
  target: "editor",
@@ -618,7 +613,7 @@ class ki extends Tt {
618
613
  addCamera(n) {
619
614
  if (!this.app.debugEnabled)
620
615
  return;
621
- const a = Ft(n);
616
+ const a = Lt(n);
622
617
  this.app.send({
623
618
  event: "addCamera",
624
619
  target: "editor",
@@ -628,7 +623,7 @@ class ki extends Tt {
628
623
  removeCamera(n) {
629
624
  if (!this.app.debugEnabled)
630
625
  return;
631
- const a = Ft(n);
626
+ const a = Lt(n);
632
627
  this.app.send({
633
628
  event: "removeCamera",
634
629
  target: "editor",
@@ -671,7 +666,7 @@ class ki extends Tt {
671
666
  }
672
667
  }
673
668
  }
674
- class ji extends Tt {
669
+ class Di extends Ot {
675
670
  bindCBs;
676
671
  buttonCBs;
677
672
  pane = void 0;
@@ -682,7 +677,7 @@ class ji extends Tt {
682
677
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
683
678
  }
684
679
  createGUI() {
685
- this.pane = new xa({ title: "GUI" }), this.pane.registerPlugin(wa);
680
+ this.pane = new Ea({ title: "GUI" }), this.pane.registerPlugin(Ca);
686
681
  }
687
682
  dispose() {
688
683
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -708,13 +703,13 @@ class ji extends Tt {
708
703
  }
709
704
  // Binding
710
705
  bind(n, a, e, o = void 0) {
711
- const s = this.bindID, p = e.onChange !== void 0 ? e.onChange : Dn;
712
- this.bindCBs.set(s, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addBinding(n, a, e).on("change", (u) => {
706
+ const c = this.bindID, p = e.onChange !== void 0 ? e.onChange : Pn;
707
+ this.bindCBs.set(c, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addBinding(n, a, e).on("change", (u) => {
713
708
  this.app.send({
714
709
  event: "updateBind",
715
710
  target: "app",
716
711
  data: {
717
- id: s,
712
+ id: c,
718
713
  value: u.value
719
714
  }
720
715
  });
@@ -722,7 +717,7 @@ class ji extends Tt {
722
717
  event: "bindObject",
723
718
  target: "app",
724
719
  data: {
725
- id: s,
720
+ id: c,
726
721
  name: a,
727
722
  params: e,
728
723
  parent: o
@@ -790,7 +785,7 @@ class ji extends Tt {
790
785
  }
791
786
  }
792
787
  }
793
- var Gt = { exports: {} }, it = {};
788
+ var zt = { exports: {} }, nt = {};
794
789
  /**
795
790
  * @license React
796
791
  * react-jsx-runtime.production.min.js
@@ -800,25 +795,25 @@ var Gt = { exports: {} }, it = {};
800
795
  * This source code is licensed under the MIT license found in the
801
796
  * LICENSE file in the root directory of this source tree.
802
797
  */
803
- var Zt;
804
- function Da() {
805
- if (Zt)
806
- return it;
807
- Zt = 1;
808
- var t = An, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
809
- function p(c, u, f) {
810
- var v, b = {}, E = null, x = null;
811
- f !== void 0 && (E = "" + f), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
798
+ var Xt;
799
+ function ja() {
800
+ if (Xt)
801
+ return nt;
802
+ Xt = 1;
803
+ var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
804
+ function p(s, u, d) {
805
+ var v, b = {}, E = null, S = null;
806
+ d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (S = u.ref);
812
807
  for (v in u)
813
- e.call(u, v) && !s.hasOwnProperty(v) && (b[v] = u[v]);
814
- if (c && c.defaultProps)
815
- for (v in u = c.defaultProps, u)
808
+ e.call(u, v) && !c.hasOwnProperty(v) && (b[v] = u[v]);
809
+ if (s && s.defaultProps)
810
+ for (v in u = s.defaultProps, u)
816
811
  b[v] === void 0 && (b[v] = u[v]);
817
- return { $$typeof: n, type: c, key: E, ref: x, props: b, _owner: o.current };
812
+ return { $$typeof: n, type: s, key: E, ref: S, props: b, _owner: o.current };
818
813
  }
819
- return it.Fragment = a, it.jsx = p, it.jsxs = p, it;
814
+ return nt.Fragment = a, nt.jsx = p, nt.jsxs = p, nt;
820
815
  }
821
- var rt = {};
816
+ var at = {};
822
817
  /**
823
818
  * @license React
824
819
  * react-jsx-runtime.development.js
@@ -828,48 +823,48 @@ var rt = {};
828
823
  * This source code is licensed under the MIT license found in the
829
824
  * LICENSE file in the root directory of this source tree.
830
825
  */
831
- var Jt;
832
- function Ia() {
833
- return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
834
- var t = An, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
826
+ var Zt;
827
+ function Da() {
828
+ return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
829
+ var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
835
830
  function H(i) {
836
831
  if (i === null || typeof i != "object")
837
832
  return null;
838
- var h = M && i[M] || i[P];
839
- return typeof h == "function" ? h : null;
833
+ var f = M && i[M] || i[P];
834
+ return typeof f == "function" ? f : null;
840
835
  }
841
836
  var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
842
- function w(i) {
837
+ function x(i) {
843
838
  {
844
- for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), C = 1; C < h; C++)
839
+ for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
845
840
  g[C - 1] = arguments[C];
846
841
  z("error", i, g);
847
842
  }
848
843
  }
849
- function z(i, h, g) {
844
+ function z(i, f, g) {
850
845
  {
851
846
  var C = B.ReactDebugCurrentFrame, D = C.getStackAddendum();
852
- D !== "" && (h += "%s", g = g.concat([D]));
847
+ D !== "" && (f += "%s", g = g.concat([D]));
853
848
  var F = g.map(function(A) {
854
849
  return String(A);
855
850
  });
856
- F.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, F);
851
+ F.unshift("Warning: " + f), Function.prototype.apply.call(console[i], console, F);
857
852
  }
858
853
  }
859
- var Ce = !1, le = !1, se = !1, d = !1, m = !1, S;
860
- S = Symbol.for("react.module.reference");
854
+ var Ee = !1, le = !1, se = !1, h = !1, m = !1, w;
855
+ w = Symbol.for("react.module.reference");
861
856
  function _(i) {
862
- return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === o || i === f || i === v || d || i === x || Ce || le || se || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === c || i.$$typeof === u || // This needs to include all possible module reference object
857
+ return !!(typeof i == "string" || typeof i == "function" || i === e || i === c || m || i === o || i === d || i === v || h || i === S || Ee || le || se || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === s || i.$$typeof === u || // This needs to include all possible module reference object
863
858
  // types supported by any Flight configuration anywhere since
864
859
  // we don't know which Flight build this will end up being used
865
860
  // with.
866
- i.$$typeof === S || i.getModuleId !== void 0));
861
+ i.$$typeof === w || i.getModuleId !== void 0));
867
862
  }
868
- function Y(i, h, g) {
863
+ function Y(i, f, g) {
869
864
  var C = i.displayName;
870
865
  if (C)
871
866
  return C;
872
- var D = h.displayName || h.name || "";
867
+ var D = f.displayName || f.name || "";
873
868
  return D !== "" ? g + "(" + D + ")" : g;
874
869
  }
875
870
  function U(i) {
@@ -878,7 +873,7 @@ function Ia() {
878
873
  function $(i) {
879
874
  if (i == null)
880
875
  return null;
881
- 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")
876
+ if (typeof i.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
882
877
  return i.displayName || i.name || null;
883
878
  if (typeof i == "string")
884
879
  return i;
@@ -887,20 +882,20 @@ function Ia() {
887
882
  return "Fragment";
888
883
  case a:
889
884
  return "Portal";
890
- case s:
885
+ case c:
891
886
  return "Profiler";
892
887
  case o:
893
888
  return "StrictMode";
894
- case f:
889
+ case d:
895
890
  return "Suspense";
896
891
  case v:
897
892
  return "SuspenseList";
898
893
  }
899
894
  if (typeof i == "object")
900
895
  switch (i.$$typeof) {
901
- case c:
902
- var h = i;
903
- return U(h) + ".Consumer";
896
+ case s:
897
+ var f = i;
898
+ return U(f) + ".Consumer";
904
899
  case p:
905
900
  var g = i;
906
901
  return U(g._context) + ".Provider";
@@ -920,18 +915,18 @@ function Ia() {
920
915
  }
921
916
  return null;
922
917
  }
923
- var I = Object.assign, W = 0, q, T, N, J, me, xe, dt;
924
- function Ke() {
918
+ var I = Object.assign, W = 0, q, T, N, J, me, Ce, lt;
919
+ function qe() {
925
920
  }
926
- Ke.__reactDisabledLog = !0;
927
- function _t() {
921
+ qe.__reactDisabledLog = !0;
922
+ function Tt() {
928
923
  {
929
924
  if (W === 0) {
930
- q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, xe = console.groupCollapsed, dt = console.groupEnd;
925
+ q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, Ce = console.groupCollapsed, lt = console.groupEnd;
931
926
  var i = {
932
927
  configurable: !0,
933
928
  enumerable: !0,
934
- value: Ke,
929
+ value: qe,
935
930
  writable: !0
936
931
  };
937
932
  Object.defineProperties(console, {
@@ -947,7 +942,7 @@ function Ia() {
947
942
  W++;
948
943
  }
949
944
  }
950
- function At() {
945
+ function Rt() {
951
946
  {
952
947
  if (W--, W === 0) {
953
948
  var i = {
@@ -972,51 +967,51 @@ function Ia() {
972
967
  value: me
973
968
  }),
974
969
  groupCollapsed: I({}, i, {
975
- value: xe
970
+ value: Ce
976
971
  }),
977
972
  groupEnd: I({}, i, {
978
- value: dt
973
+ value: lt
979
974
  })
980
975
  });
981
976
  }
982
- W < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
977
+ W < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
983
978
  }
984
979
  }
985
- var Xe = B.ReactCurrentDispatcher, Ze;
986
- function $e(i, h, g) {
980
+ var Ke = B.ReactCurrentDispatcher, Xe;
981
+ function Ue(i, f, g) {
987
982
  {
988
- if (Ze === void 0)
983
+ if (Xe === void 0)
989
984
  try {
990
985
  throw Error();
991
986
  } catch (D) {
992
987
  var C = D.stack.trim().match(/\n( *(at )?)/);
993
- Ze = C && C[1] || "";
988
+ Xe = C && C[1] || "";
994
989
  }
995
990
  return `
996
- ` + Ze + i;
991
+ ` + Xe + i;
997
992
  }
998
993
  }
999
- var ze = !1, Me;
994
+ var $e = !1, Oe;
1000
995
  {
1001
- var ht = typeof WeakMap == "function" ? WeakMap : Map;
1002
- Me = new ht();
996
+ var ut = typeof WeakMap == "function" ? WeakMap : Map;
997
+ Oe = new ut();
1003
998
  }
1004
- function ft(i, h) {
1005
- if (!i || ze)
999
+ function dt(i, f) {
1000
+ if (!i || $e)
1006
1001
  return "";
1007
1002
  {
1008
- var g = Me.get(i);
1003
+ var g = Oe.get(i);
1009
1004
  if (g !== void 0)
1010
1005
  return g;
1011
1006
  }
1012
1007
  var C;
1013
- ze = !0;
1008
+ $e = !0;
1014
1009
  var D = Error.prepareStackTrace;
1015
1010
  Error.prepareStackTrace = void 0;
1016
1011
  var F;
1017
- F = Xe.current, Xe.current = null, _t();
1012
+ F = Ke.current, Ke.current = null, Tt();
1018
1013
  try {
1019
- if (h) {
1014
+ if (f) {
1020
1015
  var A = function() {
1021
1016
  throw Error();
1022
1017
  };
@@ -1060,65 +1055,65 @@ function Ia() {
1060
1055
  if (Z--, Q--, Q < 0 || R[Z] !== ce[Q]) {
1061
1056
  var fe = `
1062
1057
  ` + R[Z].replace(" at new ", " at ");
1063
- return i.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", i.displayName)), typeof i == "function" && Me.set(i, fe), fe;
1058
+ return i.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", i.displayName)), typeof i == "function" && Oe.set(i, fe), fe;
1064
1059
  }
1065
1060
  while (Z >= 1 && Q >= 0);
1066
1061
  break;
1067
1062
  }
1068
1063
  }
1069
1064
  } finally {
1070
- ze = !1, Xe.current = F, At(), Error.prepareStackTrace = D;
1065
+ $e = !1, Ke.current = F, Rt(), Error.prepareStackTrace = D;
1071
1066
  }
1072
- var Ge = i ? i.displayName || i.name : "", Wt = Ge ? $e(Ge) : "";
1073
- return typeof i == "function" && Me.set(i, Wt), Wt;
1067
+ var Ye = i ? i.displayName || i.name : "", Vt = Ye ? Ue(Ye) : "";
1068
+ return typeof i == "function" && Oe.set(i, Vt), Vt;
1074
1069
  }
1075
- function Pt(i, h, g) {
1076
- return ft(i, !1);
1070
+ function _t(i, f, g) {
1071
+ return dt(i, !1);
1077
1072
  }
1078
- function pt(i) {
1079
- var h = i.prototype;
1080
- return !!(h && h.isReactComponent);
1073
+ function ht(i) {
1074
+ var f = i.prototype;
1075
+ return !!(f && f.isReactComponent);
1081
1076
  }
1082
- function Te(i, h, g) {
1077
+ function Me(i, f, g) {
1083
1078
  if (i == null)
1084
1079
  return "";
1085
1080
  if (typeof i == "function")
1086
- return ft(i, pt(i));
1081
+ return dt(i, ht(i));
1087
1082
  if (typeof i == "string")
1088
- return $e(i);
1083
+ return Ue(i);
1089
1084
  switch (i) {
1090
- case f:
1091
- return $e("Suspense");
1085
+ case d:
1086
+ return Ue("Suspense");
1092
1087
  case v:
1093
- return $e("SuspenseList");
1088
+ return Ue("SuspenseList");
1094
1089
  }
1095
1090
  if (typeof i == "object")
1096
1091
  switch (i.$$typeof) {
1097
1092
  case u:
1098
- return Pt(i.render);
1093
+ return _t(i.render);
1099
1094
  case b:
1100
- return Te(i.type, h, g);
1095
+ return Me(i.type, f, g);
1101
1096
  case E: {
1102
1097
  var C = i, D = C._payload, F = C._init;
1103
1098
  try {
1104
- return Te(F(D), h, g);
1099
+ return Me(F(D), f, g);
1105
1100
  } catch {
1106
1101
  }
1107
1102
  }
1108
1103
  }
1109
1104
  return "";
1110
1105
  }
1111
- var Re = Object.prototype.hasOwnProperty, mt = {}, vt = B.ReactDebugCurrentFrame;
1112
- function _e(i) {
1106
+ var Te = Object.prototype.hasOwnProperty, ft = {}, pt = B.ReactDebugCurrentFrame;
1107
+ function Re(i) {
1113
1108
  if (i) {
1114
- var h = i._owner, g = Te(i.type, i._source, h ? h.type : null);
1115
- vt.setExtraStackFrame(g);
1109
+ var f = i._owner, g = Me(i.type, i._source, f ? f.type : null);
1110
+ pt.setExtraStackFrame(g);
1116
1111
  } else
1117
- vt.setExtraStackFrame(null);
1112
+ pt.setExtraStackFrame(null);
1118
1113
  }
1119
- function Je(i, h, g, C, D) {
1114
+ function Ze(i, f, g, C, D) {
1120
1115
  {
1121
- var F = Function.call.bind(Re);
1116
+ var F = Function.call.bind(Te);
1122
1117
  for (var A in i)
1123
1118
  if (F(i, A)) {
1124
1119
  var R = void 0;
@@ -1127,71 +1122,71 @@ function Ia() {
1127
1122
  var ce = Error((C || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1128
1123
  throw ce.name = "Invariant Violation", ce;
1129
1124
  }
1130
- R = i[A](h, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1125
+ R = i[A](f, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1131
1126
  } catch (Z) {
1132
1127
  R = Z;
1133
1128
  }
1134
- R && !(R instanceof Error) && (_e(D), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", g, A, typeof R), _e(null)), R instanceof Error && !(R.message in mt) && (mt[R.message] = !0, _e(D), w("Failed %s type: %s", g, R.message), _e(null));
1129
+ R && !(R instanceof Error) && (Re(D), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", g, A, typeof R), Re(null)), R instanceof Error && !(R.message in ft) && (ft[R.message] = !0, Re(D), x("Failed %s type: %s", g, R.message), Re(null));
1135
1130
  }
1136
1131
  }
1137
1132
  }
1138
- var Ae = Array.isArray;
1139
- function Qe(i) {
1140
- return Ae(i);
1133
+ var _e = Array.isArray;
1134
+ function Je(i) {
1135
+ return _e(i);
1141
1136
  }
1142
- function kt(i) {
1137
+ function At(i) {
1143
1138
  {
1144
- var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
1139
+ var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && i[Symbol.toStringTag] || i.constructor.name || "Object";
1145
1140
  return g;
1146
1141
  }
1147
1142
  }
1148
- function gt(i) {
1143
+ function mt(i) {
1149
1144
  try {
1150
- return bt(i), !1;
1145
+ return vt(i), !1;
1151
1146
  } catch {
1152
1147
  return !0;
1153
1148
  }
1154
1149
  }
1155
- function bt(i) {
1150
+ function vt(i) {
1156
1151
  return "" + i;
1157
1152
  }
1158
- function yt(i) {
1159
- if (gt(i))
1160
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", kt(i)), bt(i);
1153
+ function gt(i) {
1154
+ if (mt(i))
1155
+ return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", At(i)), vt(i);
1161
1156
  }
1162
- var we = B.ReactCurrentOwner, et = {
1157
+ var Se = B.ReactCurrentOwner, Qe = {
1163
1158
  key: !0,
1164
1159
  ref: !0,
1165
1160
  __self: !0,
1166
1161
  __source: !0
1167
- }, tt, Et, Ye;
1168
- Ye = {};
1169
- function jt(i) {
1170
- if (Re.call(i, "ref")) {
1171
- var h = Object.getOwnPropertyDescriptor(i, "ref").get;
1172
- if (h && h.isReactWarning)
1162
+ }, et, bt, ze;
1163
+ ze = {};
1164
+ function Pt(i) {
1165
+ if (Te.call(i, "ref")) {
1166
+ var f = Object.getOwnPropertyDescriptor(i, "ref").get;
1167
+ if (f && f.isReactWarning)
1173
1168
  return !1;
1174
1169
  }
1175
1170
  return i.ref !== void 0;
1176
1171
  }
1177
- function Dt(i) {
1178
- if (Re.call(i, "key")) {
1179
- var h = Object.getOwnPropertyDescriptor(i, "key").get;
1180
- if (h && h.isReactWarning)
1172
+ function kt(i) {
1173
+ if (Te.call(i, "key")) {
1174
+ var f = Object.getOwnPropertyDescriptor(i, "key").get;
1175
+ if (f && f.isReactWarning)
1181
1176
  return !1;
1182
1177
  }
1183
1178
  return i.key !== void 0;
1184
1179
  }
1185
- function Ct(i, h) {
1186
- if (typeof i.ref == "string" && we.current && h && we.current.stateNode !== h) {
1187
- var g = $(we.current.type);
1188
- Ye[g] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', $(we.current.type), i.ref), Ye[g] = !0);
1180
+ function yt(i, f) {
1181
+ if (typeof i.ref == "string" && Se.current && f && Se.current.stateNode !== f) {
1182
+ var g = $(Se.current.type);
1183
+ ze[g] || (x('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', $(Se.current.type), i.ref), ze[g] = !0);
1189
1184
  }
1190
1185
  }
1191
- function Se(i, h) {
1186
+ function xe(i, f) {
1192
1187
  {
1193
1188
  var g = function() {
1194
- tt || (tt = !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)", h));
1189
+ et || (et = !0, x("%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)", f));
1195
1190
  };
1196
1191
  g.isReactWarning = !0, Object.defineProperty(i, "key", {
1197
1192
  get: g,
@@ -1199,10 +1194,10 @@ function Ia() {
1199
1194
  });
1200
1195
  }
1201
1196
  }
1202
- function Ht(i, h) {
1197
+ function Gt(i, f) {
1203
1198
  {
1204
1199
  var g = function() {
1205
- Et || (Et = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
1200
+ bt || (bt = !0, x("%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)", f));
1206
1201
  };
1207
1202
  g.isReactWarning = !0, Object.defineProperty(i, "ref", {
1208
1203
  get: g,
@@ -1210,13 +1205,13 @@ function Ia() {
1210
1205
  });
1211
1206
  }
1212
1207
  }
1213
- var r = function(i, h, g, C, D, F, A) {
1208
+ var r = function(i, f, g, C, D, F, A) {
1214
1209
  var R = {
1215
1210
  // This tag allows us to uniquely identify this as a React Element
1216
1211
  $$typeof: n,
1217
1212
  // Built-in properties that belong on the element
1218
1213
  type: i,
1219
- key: h,
1214
+ key: f,
1220
1215
  ref: g,
1221
1216
  props: A,
1222
1217
  // Record the component responsible for creating this element.
@@ -1239,12 +1234,12 @@ function Ia() {
1239
1234
  value: D
1240
1235
  }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
1241
1236
  };
1242
- function y(i, h, g, C, D) {
1237
+ function y(i, f, g, C, D) {
1243
1238
  {
1244
1239
  var F, A = {}, R = null, ce = null;
1245
- g !== void 0 && (yt(g), R = "" + g), Dt(h) && (yt(h.key), R = "" + h.key), jt(h) && (ce = h.ref, Ct(h, D));
1246
- for (F in h)
1247
- Re.call(h, F) && !et.hasOwnProperty(F) && (A[F] = h[F]);
1240
+ g !== void 0 && (gt(g), R = "" + g), kt(f) && (gt(f.key), R = "" + f.key), Pt(f) && (ce = f.ref, yt(f, D));
1241
+ for (F in f)
1242
+ Te.call(f, F) && !Qe.hasOwnProperty(F) && (A[F] = f[F]);
1248
1243
  if (i && i.defaultProps) {
1249
1244
  var Z = i.defaultProps;
1250
1245
  for (F in Z)
@@ -1252,15 +1247,15 @@ function Ia() {
1252
1247
  }
1253
1248
  if (R || ce) {
1254
1249
  var Q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1255
- R && Se(A, Q), ce && Ht(A, Q);
1250
+ R && xe(A, Q), ce && Gt(A, Q);
1256
1251
  }
1257
- return r(i, R, ce, D, C, we.current, A);
1252
+ return r(i, R, ce, D, C, Se.current, A);
1258
1253
  }
1259
1254
  }
1260
1255
  var O = B.ReactCurrentOwner, L = B.ReactDebugCurrentFrame;
1261
1256
  function K(i) {
1262
1257
  if (i) {
1263
- var h = i._owner, g = Te(i.type, i._source, h ? h.type : null);
1258
+ var f = i._owner, g = Me(i.type, i._source, f ? f.type : null);
1264
1259
  L.setExtraStackFrame(g);
1265
1260
  } else
1266
1261
  L.setExtraStackFrame(null);
@@ -1270,7 +1265,7 @@ function Ia() {
1270
1265
  function ie(i) {
1271
1266
  return typeof i == "object" && i !== null && i.$$typeof === n;
1272
1267
  }
1273
- function It() {
1268
+ function jt() {
1274
1269
  {
1275
1270
  if (O.current) {
1276
1271
  var i = $(O.current.type);
@@ -1282,51 +1277,51 @@ Check the render method of \`` + i + "`.";
1282
1277
  return "";
1283
1278
  }
1284
1279
  }
1285
- function Lt(i) {
1280
+ function Dt(i) {
1286
1281
  {
1287
1282
  if (i !== void 0) {
1288
- var h = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
1283
+ var f = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
1289
1284
  return `
1290
1285
 
1291
- Check your code at ` + h + ":" + g + ".";
1286
+ Check your code at ` + f + ":" + g + ".";
1292
1287
  }
1293
1288
  return "";
1294
1289
  }
1295
1290
  }
1296
- var nt = {};
1291
+ var tt = {};
1297
1292
  function pe(i) {
1298
1293
  {
1299
- var h = It();
1300
- if (!h) {
1294
+ var f = jt();
1295
+ if (!f) {
1301
1296
  var g = typeof i == "string" ? i : i.displayName || i.name;
1302
- g && (h = `
1297
+ g && (f = `
1303
1298
 
1304
1299
  Check the top-level render call using <` + g + ">.");
1305
1300
  }
1306
- return h;
1301
+ return f;
1307
1302
  }
1308
1303
  }
1309
- function he(i, h) {
1304
+ function he(i, f) {
1310
1305
  {
1311
1306
  if (!i._store || i._store.validated || i.key != null)
1312
1307
  return;
1313
1308
  i._store.validated = !0;
1314
- var g = pe(h);
1315
- if (nt[g])
1309
+ var g = pe(f);
1310
+ if (tt[g])
1316
1311
  return;
1317
- nt[g] = !0;
1312
+ tt[g] = !0;
1318
1313
  var C = "";
1319
- i && i._owner && i._owner !== O.current && (C = " It was passed a child from " + $(i._owner.type) + "."), K(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, C), K(null);
1314
+ i && i._owner && i._owner !== O.current && (C = " It was passed a child from " + $(i._owner.type) + "."), K(i), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), K(null);
1320
1315
  }
1321
1316
  }
1322
- function Pe(i, h) {
1317
+ function Ae(i, f) {
1323
1318
  {
1324
1319
  if (typeof i != "object")
1325
1320
  return;
1326
- if (Qe(i))
1321
+ if (Je(i))
1327
1322
  for (var g = 0; g < i.length; g++) {
1328
1323
  var C = i[g];
1329
- ie(C) && he(C, h);
1324
+ ie(C) && he(C, f);
1330
1325
  }
1331
1326
  else if (ie(i))
1332
1327
  i._store && (i._store.validated = !0);
@@ -1334,97 +1329,97 @@ Check the top-level render call using <` + g + ">.");
1334
1329
  var D = H(i);
1335
1330
  if (typeof D == "function" && D !== i.entries)
1336
1331
  for (var F = D.call(i), A; !(A = F.next()).done; )
1337
- ie(A.value) && he(A.value, h);
1332
+ ie(A.value) && he(A.value, f);
1338
1333
  }
1339
1334
  }
1340
1335
  }
1341
- function ke(i) {
1336
+ function Pe(i) {
1342
1337
  {
1343
- var h = i.type;
1344
- if (h == null || typeof h == "string")
1338
+ var f = i.type;
1339
+ if (f == null || typeof f == "string")
1345
1340
  return;
1346
1341
  var g;
1347
- if (typeof h == "function")
1348
- g = h.propTypes;
1349
- else if (typeof h == "object" && (h.$$typeof === u || // Note: Memo only checks outer props here.
1342
+ if (typeof f == "function")
1343
+ g = f.propTypes;
1344
+ else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
1350
1345
  // Inner props are checked in the reconciler.
1351
- h.$$typeof === b))
1352
- g = h.propTypes;
1346
+ f.$$typeof === b))
1347
+ g = f.propTypes;
1353
1348
  else
1354
1349
  return;
1355
1350
  if (g) {
1356
- var C = $(h);
1357
- Je(g, i.props, "prop", C, i);
1358
- } else if (h.PropTypes !== void 0 && !de) {
1351
+ var C = $(f);
1352
+ Ze(g, i.props, "prop", C, i);
1353
+ } else if (f.PropTypes !== void 0 && !de) {
1359
1354
  de = !0;
1360
- var D = $(h);
1361
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
1355
+ var D = $(f);
1356
+ x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
1362
1357
  }
1363
- typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1358
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1364
1359
  }
1365
1360
  }
1366
- function je(i) {
1361
+ function ke(i) {
1367
1362
  {
1368
- for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
1369
- var C = h[g];
1363
+ for (var f = Object.keys(i.props), g = 0; g < f.length; g++) {
1364
+ var C = f[g];
1370
1365
  if (C !== "children" && C !== "key") {
1371
- K(i), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), K(null);
1366
+ K(i), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), K(null);
1372
1367
  break;
1373
1368
  }
1374
1369
  }
1375
- i.ref !== null && (K(i), w("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
1370
+ i.ref !== null && (K(i), x("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
1376
1371
  }
1377
1372
  }
1378
- function De(i, h, g, C, D, F) {
1373
+ function je(i, f, g, C, D, F) {
1379
1374
  {
1380
1375
  var A = _(i);
1381
1376
  if (!A) {
1382
1377
  var R = "";
1383
1378
  (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1384
- var ce = Lt(D);
1385
- ce ? R += ce : R += It();
1379
+ var ce = Dt(D);
1380
+ ce ? R += ce : R += jt();
1386
1381
  var Z;
1387
- i === null ? Z = "null" : Qe(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, R);
1382
+ i === null ? Z = "null" : Je(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, R);
1388
1383
  }
1389
- var Q = y(i, h, g, D, F);
1384
+ var Q = y(i, f, g, D, F);
1390
1385
  if (Q == null)
1391
1386
  return Q;
1392
1387
  if (A) {
1393
- var fe = h.children;
1388
+ var fe = f.children;
1394
1389
  if (fe !== void 0)
1395
1390
  if (C)
1396
- if (Qe(fe)) {
1397
- for (var Ge = 0; Ge < fe.length; Ge++)
1398
- Pe(fe[Ge], i);
1391
+ if (Je(fe)) {
1392
+ for (var Ye = 0; Ye < fe.length; Ye++)
1393
+ Ae(fe[Ye], i);
1399
1394
  Object.freeze && Object.freeze(fe);
1400
1395
  } else
1401
- 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.");
1396
+ x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1402
1397
  else
1403
- Pe(fe, i);
1398
+ Ae(fe, i);
1404
1399
  }
1405
- return i === e ? je(Q) : ke(Q), Q;
1400
+ return i === e ? ke(Q) : Pe(Q), Q;
1406
1401
  }
1407
1402
  }
1408
- function $n(i, h, g) {
1409
- return De(i, h, g, !0);
1403
+ function Bn(i, f, g) {
1404
+ return je(i, f, g, !0);
1410
1405
  }
1411
- function zn(i, h, g) {
1412
- return De(i, h, g, !1);
1406
+ function Un(i, f, g) {
1407
+ return je(i, f, g, !1);
1413
1408
  }
1414
- var Yn = zn, Gn = $n;
1415
- rt.Fragment = e, rt.jsx = Yn, rt.jsxs = Gn;
1416
- }()), rt;
1409
+ var $n = Un, zn = Bn;
1410
+ at.Fragment = e, at.jsx = $n, at.jsxs = zn;
1411
+ }()), at;
1417
1412
  }
1418
- process.env.NODE_ENV === "production" ? Gt.exports = Da() : Gt.exports = Ia();
1419
- var l = Gt.exports;
1420
- function Nn(t) {
1413
+ process.env.NODE_ENV === "production" ? zt.exports = ja() : zt.exports = Da();
1414
+ var l = zt.exports;
1415
+ function In(t) {
1421
1416
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1422
1417
  }
1423
- const La = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1418
+ const Ia = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1424
1419
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1425
1420
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1426
1421
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1427
- ] }), Na = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1422
+ ] }), La = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1428
1423
  "path",
1429
1424
  {
1430
1425
  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
@@ -1432,35 +1427,35 @@ 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
1432
1427
  C11,8.22,10.74,8,10.43,8z`
1433
1428
  }
1434
1429
  ) });
1435
- function Fa(t) {
1436
- return /* @__PURE__ */ l.jsx(Pn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1437
- Na,
1430
+ function Na(t) {
1431
+ return /* @__PURE__ */ l.jsx(An.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1432
+ La,
1438
1433
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1439
1434
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1440
1435
  t.onDelete(t.index);
1441
- }, children: La })
1436
+ }, children: Ia })
1442
1437
  ] }) }, t.title);
1443
1438
  }
1444
- function Ba(t) {
1445
- const [n, a] = ae(!1), [e, o] = ae(t.options), s = (f) => {
1446
- t.onDragComplete(f), o(f);
1447
- }, p = (f) => {
1439
+ function Fa(t) {
1440
+ const [n, a] = ae(!1), [e, o] = ae(t.options), c = (d) => {
1441
+ t.onDragComplete(d), o(d);
1442
+ }, p = (d) => {
1448
1443
  const v = [...e];
1449
- v.splice(f, 1), s(v);
1450
- }, c = [];
1451
- e.forEach((f, v) => {
1452
- c.push(/* @__PURE__ */ l.jsx(Fa, { index: v, title: f, onDelete: p }, f));
1444
+ v.splice(d, 1), c(v);
1445
+ }, s = [];
1446
+ e.forEach((d, v) => {
1447
+ s.push(/* @__PURE__ */ l.jsx(Na, { index: v, title: d, onDelete: p }, d));
1453
1448
  });
1454
1449
  let u = "dropdown draggable";
1455
1450
  return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1456
- /* @__PURE__ */ l.jsx(Nn, { title: t.title }),
1457
- /* @__PURE__ */ l.jsx(Pn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: c })
1451
+ /* @__PURE__ */ l.jsx(In, { title: t.title }),
1452
+ /* @__PURE__ */ l.jsx(An.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: s })
1458
1453
  ] });
1459
1454
  }
1460
- function Ua(t) {
1455
+ function Ba(t) {
1461
1456
  const [n, a] = ae(!1), e = [];
1462
- t.options.map((s, p) => {
1463
- t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx($a, { option: s }, p));
1457
+ t.options.map((c, p) => {
1458
+ t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ua, { option: c }, p));
1464
1459
  });
1465
1460
  let o = "dropdown";
1466
1461
  return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1470,7 +1465,7 @@ function Ua(t) {
1470
1465
  onMouseEnter: () => a(!0),
1471
1466
  onMouseLeave: () => a(!1),
1472
1467
  children: [
1473
- /* @__PURE__ */ l.jsx(Nn, { title: t.title }),
1468
+ /* @__PURE__ */ l.jsx(In, { title: t.title }),
1474
1469
  /* @__PURE__ */ l.jsx(
1475
1470
  "ul",
1476
1471
  {
@@ -1482,18 +1477,18 @@ function Ua(t) {
1482
1477
  }
1483
1478
  );
1484
1479
  }
1485
- function $a(t) {
1480
+ function Ua(t) {
1486
1481
  const { option: n } = t, [a, e] = ae("");
1487
1482
  let o;
1488
1483
  switch (n.type) {
1489
1484
  case "draggable":
1490
1485
  o = /* @__PURE__ */ l.jsx(
1491
- Ba,
1486
+ Fa,
1492
1487
  {
1493
1488
  title: n.title,
1494
1489
  options: n.value,
1495
- onDragComplete: (s) => {
1496
- n.onDragComplete !== void 0 && n.onDragComplete(s);
1490
+ onDragComplete: (c) => {
1491
+ n.onDragComplete !== void 0 && n.onDragComplete(c);
1497
1492
  },
1498
1493
  subdropdown: !0
1499
1494
  }
@@ -1501,7 +1496,7 @@ function $a(t) {
1501
1496
  break;
1502
1497
  case "dropdown":
1503
1498
  o = /* @__PURE__ */ l.jsx(
1504
- Ua,
1499
+ Ba,
1505
1500
  {
1506
1501
  title: n.title,
1507
1502
  options: n.value,
@@ -1522,9 +1517,9 @@ function $a(t) {
1522
1517
  );
1523
1518
  break;
1524
1519
  }
1525
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Oa());
1520
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, xa());
1526
1521
  }
1527
- function Di(t) {
1522
+ function Ii(t) {
1528
1523
  function n(e) {
1529
1524
  switch (t.components.forEach((o) => {
1530
1525
  o.handleApp(e);
@@ -1547,7 +1542,7 @@ function Di(t) {
1547
1542
  e.target === "editor" ? a(e) : n(e);
1548
1543
  };
1549
1544
  }
1550
- const za = `out vec3 worldPosition;
1545
+ const $a = `out vec3 worldPosition;
1551
1546
  uniform float uDistance;
1552
1547
 
1553
1548
  void main() {
@@ -1556,7 +1551,7 @@ void main() {
1556
1551
  worldPosition.xz += cameraPosition.xz;
1557
1552
 
1558
1553
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1559
- }`, Ya = `out vec4 fragColor;
1554
+ }`, za = `out vec4 fragColor;
1560
1555
  in vec3 worldPosition;
1561
1556
 
1562
1557
  uniform float uDivisions;
@@ -1624,14 +1619,14 @@ void main() {
1624
1619
 
1625
1620
  if (fragColor.a <= 0.0) discard;
1626
1621
  }`;
1627
- class Ga extends dn {
1622
+ class Ya extends un {
1628
1623
  constructor(n) {
1629
1624
  super({
1630
1625
  extensions: {
1631
1626
  derivatives: !0
1632
1627
  },
1633
- glslVersion: Wn,
1634
- side: hn,
1628
+ glslVersion: Vn,
1629
+ side: dn,
1635
1630
  transparent: !0,
1636
1631
  uniforms: {
1637
1632
  uScale: {
@@ -1641,7 +1636,7 @@ class Ga extends dn {
1641
1636
  value: n?.divisions !== void 0 ? n?.divisions : 10
1642
1637
  },
1643
1638
  uColor: {
1644
- value: n?.color !== void 0 ? n?.color : new Mt(16777215)
1639
+ value: n?.color !== void 0 ? n?.color : new wt(16777215)
1645
1640
  },
1646
1641
  uDistance: {
1647
1642
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -1653,24 +1648,24 @@ class Ga extends dn {
1653
1648
  value: n?.gridOpacity !== void 0 ? n?.gridOpacity : 0.25
1654
1649
  }
1655
1650
  },
1656
- vertexShader: za,
1657
- fragmentShader: Ya,
1651
+ vertexShader: $a,
1652
+ fragmentShader: za,
1658
1653
  name: "InfiniteGrid",
1659
1654
  depthWrite: !1
1660
1655
  });
1661
1656
  }
1662
1657
  }
1663
- class Va extends qn {
1658
+ class Ga extends Hn {
1664
1659
  gridMaterial;
1665
1660
  constructor() {
1666
- const n = new Ga();
1667
- super(new Kn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1661
+ const n = new Ya();
1662
+ super(new Wn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1668
1663
  }
1669
1664
  update() {
1670
1665
  this.gridMaterial.needsUpdate = !0;
1671
1666
  }
1672
1667
  }
1673
- const Ha = `#include <common>
1668
+ const Va = `#include <common>
1674
1669
  #include <batching_pars_vertex>
1675
1670
  #include <uv_pars_vertex>
1676
1671
  #include <color_pars_vertex>
@@ -1700,7 +1695,7 @@ void main() {
1700
1695
  #include <logdepthbuf_vertex>
1701
1696
  #include <clipping_planes_vertex>
1702
1697
  #include <worldpos_vertex>
1703
- }`, Wa = `
1698
+ }`, Ha = `
1704
1699
  #include <common>
1705
1700
  #include <uv_pars_fragment>
1706
1701
  #include <clipping_planes_pars_fragment>
@@ -1709,18 +1704,18 @@ void main() {
1709
1704
  #include <clipping_planes_fragment>
1710
1705
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1711
1706
  }`;
1712
- class qa extends dn {
1707
+ class Wa extends un {
1713
1708
  constructor() {
1714
1709
  super({
1715
1710
  defines: {
1716
1711
  USE_UV: ""
1717
1712
  },
1718
- vertexShader: Ha,
1719
- fragmentShader: Wa
1713
+ vertexShader: Va,
1714
+ fragmentShader: Ha
1720
1715
  });
1721
1716
  }
1722
1717
  }
1723
- function Vt(t) {
1718
+ function Yt(t) {
1724
1719
  const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1725
1720
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1726
1721
  /* @__PURE__ */ l.jsxs(
@@ -1739,7 +1734,7 @@ function Vt(t) {
1739
1734
  children: "Toggle"
1740
1735
  }
1741
1736
  ),
1742
- /* @__PURE__ */ l.jsx("p", { className: "label", children: ct(t.label) })
1737
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: ot(t.label) })
1743
1738
  ]
1744
1739
  }
1745
1740
  ),
@@ -1747,10 +1742,10 @@ function Vt(t) {
1747
1742
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1748
1743
  ] });
1749
1744
  }
1750
- function Fn(t) {
1745
+ function Ln(t) {
1751
1746
  const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, o = [];
1752
- return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((s) => {
1753
- o.push(/* @__PURE__ */ l.jsx(Fn, { child: s, three: t.three }, Math.random()));
1747
+ return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((c) => {
1748
+ o.push(/* @__PURE__ */ l.jsx(Ln, { child: c, three: t.three }, Math.random()));
1754
1749
  }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1755
1750
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1756
1751
  e ? /* @__PURE__ */ l.jsx(
@@ -1778,29 +1773,29 @@ function Fn(t) {
1778
1773
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1779
1774
  }
1780
1775
  ),
1781
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Aa(t.child)}` })
1776
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${_a(t.child)}` })
1782
1777
  ] }),
1783
1778
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1784
1779
  ] }, Math.random()) });
1785
1780
  }
1786
- function Ka(t) {
1781
+ function qa(t) {
1787
1782
  const n = [];
1788
1783
  return t.child?.children.map((a) => {
1789
- n.push(/* @__PURE__ */ l.jsx(Fn, { child: a, three: t.three }, Math.random()));
1784
+ n.push(/* @__PURE__ */ l.jsx(Ln, { child: a, three: t.three }, Math.random()));
1790
1785
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1791
1786
  }
1792
- const Xa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1793
- function Za(t) {
1787
+ const Ka = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1788
+ function Xa(t) {
1794
1789
  return "items" in t;
1795
1790
  }
1796
- function Be(t) {
1791
+ function Fe(t) {
1797
1792
  const n = [];
1798
1793
  return t.items.forEach((a) => {
1799
- Za(a) ? n.push(
1800
- /* @__PURE__ */ l.jsx(Be, { title: ct(a.title), items: a.items }, Math.random())
1794
+ Xa(a) ? n.push(
1795
+ /* @__PURE__ */ l.jsx(Fe, { title: ot(a.title), items: a.items }, Math.random())
1801
1796
  ) : n.push(
1802
1797
  /* @__PURE__ */ l.jsx(
1803
- st,
1798
+ rt,
1804
1799
  {
1805
1800
  title: a.title,
1806
1801
  prop: a.prop,
@@ -1818,12 +1813,12 @@ function Be(t) {
1818
1813
  Math.random()
1819
1814
  )
1820
1815
  );
1821
- }), /* @__PURE__ */ l.jsx(Vt, { label: t.title, open: t.expanded === !0, children: n });
1816
+ }), /* @__PURE__ */ l.jsx(Yt, { label: t.title, open: t.expanded === !0, children: n });
1822
1817
  }
1823
- function Ja(t) {
1818
+ function Za(t) {
1824
1819
  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");
1825
1820
  }
1826
- function Ie(t) {
1821
+ function De(t) {
1827
1822
  switch (t) {
1828
1823
  case "alphaMap":
1829
1824
  return "Alpha Map";
@@ -1996,10 +1991,10 @@ function Ie(t) {
1996
1991
  }
1997
1992
  return t;
1998
1993
  }
1999
- function Qa(t) {
1994
+ function Ja(t) {
2000
1995
  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";
2001
1996
  }
2002
- function ei() {
1997
+ function Qa() {
2003
1998
  const t = document.createElement("input");
2004
1999
  return t.type = "file", new Promise((n, a) => {
2005
2000
  t.addEventListener("change", function() {
@@ -2007,396 +2002,396 @@ function ei() {
2007
2002
  a();
2008
2003
  else {
2009
2004
  const e = t.files[0], o = new FileReader();
2010
- o.onload = function(s) {
2011
- n(s.target.result);
2005
+ o.onload = function(c) {
2006
+ n(c.target.result);
2012
2007
  }, o.readAsDataURL(e);
2013
2008
  }
2014
2009
  }), t.click();
2015
2010
  });
2016
2011
  }
2017
- const ti = [
2012
+ const ei = [
2018
2013
  {
2019
2014
  title: "Front",
2020
- value: Xn
2015
+ value: qn
2021
2016
  },
2022
2017
  {
2023
2018
  title: "Back",
2024
- value: Zn
2019
+ value: Kn
2025
2020
  },
2026
2021
  {
2027
2022
  title: "Double",
2028
- value: hn
2023
+ value: dn
2029
2024
  }
2030
- ], ni = [
2025
+ ], ti = [
2031
2026
  {
2032
2027
  title: "No Blending",
2033
- value: Jn
2028
+ value: Xn
2034
2029
  },
2035
2030
  {
2036
2031
  title: "Normal",
2037
- value: Qn
2032
+ value: Zn
2038
2033
  },
2039
2034
  {
2040
2035
  title: "Additive",
2041
- value: ea
2036
+ value: Jn
2042
2037
  },
2043
2038
  {
2044
2039
  title: "Subtractive",
2045
- value: ta
2040
+ value: Qn
2046
2041
  },
2047
2042
  {
2048
2043
  title: "Multiply",
2049
- value: na
2044
+ value: ea
2050
2045
  },
2051
2046
  {
2052
2047
  title: "Custom",
2053
- value: aa
2048
+ value: ta
2054
2049
  }
2055
- ], ai = [
2050
+ ], ni = [
2056
2051
  {
2057
2052
  title: "Add",
2058
- value: ia
2053
+ value: na
2059
2054
  },
2060
2055
  {
2061
2056
  title: "Subtract",
2062
- value: ra
2057
+ value: aa
2063
2058
  },
2064
2059
  {
2065
2060
  title: "Reverse Subtract",
2066
- value: oa
2061
+ value: ia
2067
2062
  },
2068
2063
  {
2069
2064
  title: "Min",
2070
- value: sa
2065
+ value: ra
2071
2066
  },
2072
2067
  {
2073
2068
  title: "Max",
2074
- value: ca
2069
+ value: oa
2075
2070
  }
2076
- ], ii = [
2071
+ ], ai = [
2077
2072
  {
2078
2073
  title: "Zero",
2079
- valye: fn
2074
+ valye: hn
2080
2075
  },
2081
2076
  {
2082
2077
  title: "One",
2083
- valye: pn
2078
+ valye: fn
2084
2079
  },
2085
2080
  {
2086
2081
  title: "Src Color",
2087
- valye: mn
2082
+ valye: pn
2088
2083
  },
2089
2084
  {
2090
2085
  title: "One Minus Src Color",
2091
- valye: vn
2086
+ valye: mn
2092
2087
  },
2093
2088
  {
2094
2089
  title: "Src Alpha",
2095
- valye: gn
2090
+ valye: vn
2096
2091
  },
2097
2092
  {
2098
2093
  title: "One Minus Src Alpha",
2099
- valye: bn
2094
+ valye: gn
2100
2095
  },
2101
2096
  {
2102
2097
  title: "Dst Alpha",
2103
- valye: yn
2098
+ valye: bn
2104
2099
  },
2105
2100
  {
2106
2101
  title: "One Minus Dst Alpha",
2107
- valye: En
2102
+ valye: yn
2108
2103
  },
2109
2104
  {
2110
2105
  title: "Dst Color",
2111
- valye: Cn
2106
+ valye: En
2112
2107
  },
2113
2108
  {
2114
2109
  title: "One Minus Dst Color",
2115
- valye: xn
2110
+ valye: Cn
2116
2111
  },
2117
2112
  {
2118
2113
  title: "Src Alpha Saturate",
2119
- valye: la
2114
+ valye: sa
2120
2115
  },
2121
2116
  {
2122
2117
  title: "Constant Color",
2123
- valye: wn
2118
+ valye: Sn
2124
2119
  },
2125
2120
  {
2126
2121
  title: "One Minus Constant Color",
2127
- valye: Sn
2122
+ valye: xn
2128
2123
  },
2129
2124
  {
2130
2125
  title: "Constant Alpha",
2131
- valye: On
2126
+ valye: wn
2132
2127
  },
2133
2128
  {
2134
2129
  title: "One Minus Constant Alpha",
2135
- valye: Mn
2130
+ valye: On
2136
2131
  }
2137
- ], ri = [
2132
+ ], ii = [
2138
2133
  {
2139
2134
  title: "Zero",
2140
- valye: fn
2135
+ valye: hn
2141
2136
  },
2142
2137
  {
2143
2138
  title: "One",
2144
- valye: pn
2139
+ valye: fn
2145
2140
  },
2146
2141
  {
2147
2142
  title: "Src Color",
2148
- valye: mn
2143
+ valye: pn
2149
2144
  },
2150
2145
  {
2151
2146
  title: "One Minus Src Color",
2152
- valye: vn
2147
+ valye: mn
2153
2148
  },
2154
2149
  {
2155
2150
  title: "Src Alpha",
2156
- valye: gn
2151
+ valye: vn
2157
2152
  },
2158
2153
  {
2159
2154
  title: "One Minus Src Alpha",
2160
- valye: bn
2155
+ valye: gn
2161
2156
  },
2162
2157
  {
2163
2158
  title: "Dst Alpha",
2164
- valye: yn
2159
+ valye: bn
2165
2160
  },
2166
2161
  {
2167
2162
  title: "One Minus Dst Alpha",
2168
- valye: En
2163
+ valye: yn
2169
2164
  },
2170
2165
  {
2171
2166
  title: "Dst Color",
2172
- valye: Cn
2167
+ valye: En
2173
2168
  },
2174
2169
  {
2175
2170
  title: "One Minus Dst Color",
2176
- valye: xn
2171
+ valye: Cn
2177
2172
  },
2178
2173
  {
2179
2174
  title: "Constant Color",
2180
- valye: wn
2175
+ valye: Sn
2181
2176
  },
2182
2177
  {
2183
2178
  title: "One Minus Constant Color",
2184
- valye: Sn
2179
+ valye: xn
2185
2180
  },
2186
2181
  {
2187
2182
  title: "Constant Alpha",
2188
- valye: On
2183
+ valye: wn
2189
2184
  },
2190
2185
  {
2191
2186
  title: "One Minus Constant Alpha",
2192
- valye: Mn
2187
+ valye: On
2193
2188
  }
2194
2189
  ];
2195
- function ot(t, n) {
2190
+ function it(t, n) {
2196
2191
  t.needsUpdate = !0, t.type = "option", t.options = n;
2197
2192
  }
2198
- function Qt(t, n, a) {
2193
+ function Jt(t, n, a) {
2199
2194
  const e = [];
2200
2195
  for (const o in t) {
2201
- if (!Ja(o))
2196
+ if (!Za(o))
2202
2197
  continue;
2203
- const s = typeof t[o], p = t[o];
2204
- if (s === "boolean" || s === "number" || s === "string") {
2205
- const c = {
2206
- title: Ie(o),
2198
+ const c = typeof t[o], p = t[o];
2199
+ if (c === "boolean" || c === "number" || c === "string") {
2200
+ const s = {
2201
+ title: De(o),
2207
2202
  prop: o,
2208
- type: s,
2203
+ type: c,
2209
2204
  value: p,
2210
2205
  min: void 0,
2211
2206
  max: void 0,
2212
- needsUpdate: s === "boolean",
2213
- onChange: (f, v) => {
2214
- a.updateObject(n.uuid, `material.${f}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2207
+ needsUpdate: c === "boolean",
2208
+ onChange: (d, v) => {
2209
+ a.updateObject(n.uuid, `material.${d}`, v), s.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2215
2210
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2216
- b !== void 0 && ee(b, `material.${f}`, v);
2211
+ b !== void 0 && ee(b, `material.${d}`, v);
2217
2212
  }
2218
2213
  };
2219
2214
  switch (o) {
2220
2215
  case "blending":
2221
- ot(c, ni);
2216
+ it(s, ti);
2222
2217
  break;
2223
2218
  case "blendDst":
2224
- ot(c, ri);
2219
+ it(s, ii);
2225
2220
  break;
2226
2221
  case "blendEquation":
2227
- ot(c, ai);
2222
+ it(s, ni);
2228
2223
  break;
2229
2224
  case "blendSrc":
2230
- ot(c, ii);
2225
+ it(s, ai);
2231
2226
  break;
2232
2227
  case "side":
2233
- ot(c, ti);
2228
+ it(s, ei);
2234
2229
  break;
2235
2230
  }
2236
- Qa(o) && (c.value = Number(p), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2237
- const u = s === "string" && (o === "vertexShader" || o === "fragmentShader");
2238
- u && (c.disabled = !1, c.latest = c.value, c.onChange = (f, v) => {
2239
- c.latest = v;
2240
- }), e.push(c), u && e.push({
2241
- title: `${ct(o)} - Update`,
2231
+ Ja(o) && (s.value = Number(p), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01);
2232
+ const u = c === "string" && (o === "vertexShader" || o === "fragmentShader");
2233
+ u && (s.disabled = !1, s.latest = s.value, s.onChange = (d, v) => {
2234
+ s.latest = v;
2235
+ }), e.push(s), u && e.push({
2236
+ title: `${ot(o)} - Update`,
2242
2237
  type: "button",
2243
2238
  onChange: () => {
2244
- a.updateObject(n.uuid, `material.${o}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2245
- const f = a.scene?.getObjectByProperty("uuid", n.uuid);
2246
- f !== void 0 && (ee(f, `material.${o}`, c.latest), f.material.needsUpdate = !0);
2239
+ a.updateObject(n.uuid, `material.${o}`, s.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2240
+ const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2241
+ d !== void 0 && (ee(d, `material.${o}`, s.latest), d.material.needsUpdate = !0);
2247
2242
  }
2248
2243
  });
2249
- } else if (s === "object")
2244
+ } else if (c === "object")
2250
2245
  if (p.isColor)
2251
2246
  e.push({
2252
- title: Ie(o),
2247
+ title: De(o),
2253
2248
  prop: o,
2254
2249
  type: "color",
2255
2250
  value: p,
2256
- onChange: (c, u) => {
2257
- const f = new Mt(u);
2258
- a.updateObject(n.uuid, `material.${c}`, f);
2251
+ onChange: (s, u) => {
2252
+ const d = new wt(u);
2253
+ a.updateObject(n.uuid, `material.${s}`, d);
2259
2254
  const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2260
- v !== void 0 && ee(v, `material.${c}`, f);
2255
+ v !== void 0 && ee(v, `material.${s}`, d);
2261
2256
  }
2262
2257
  });
2263
2258
  else if (Array.isArray(p)) {
2264
- const c = [];
2259
+ const s = [];
2265
2260
  for (const u in p)
2266
- c.push({
2261
+ s.push({
2267
2262
  title: `${u}`,
2268
2263
  type: `${typeof p[u]}`,
2269
2264
  value: p[u],
2270
- onChange: (f, v) => {
2265
+ onChange: (d, v) => {
2271
2266
  a.updateObject(n.uuid, `material.${o}`, v);
2272
2267
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2273
2268
  b !== void 0 && ee(b, `material.${o}`, v);
2274
2269
  }
2275
2270
  });
2276
2271
  e.push({
2277
- title: Ie(o),
2278
- items: c
2272
+ title: De(o),
2273
+ items: s
2279
2274
  });
2280
2275
  } else {
2281
- const c = [];
2276
+ const s = [];
2282
2277
  for (const u in p) {
2283
- const f = p[u];
2284
- switch (typeof f) {
2278
+ const d = p[u];
2279
+ switch (typeof d) {
2285
2280
  case "boolean":
2286
2281
  case "number":
2287
2282
  case "string":
2288
2283
  u === "src" ? e.push({
2289
- title: Ie(o),
2284
+ title: De(o),
2290
2285
  type: "image",
2291
- value: f,
2286
+ value: d,
2292
2287
  onChange: (b, E) => {
2293
2288
  a.createTexture(n.uuid, `material.${o}`, E);
2294
- const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2295
- x !== void 0 && Yt(E).then((M) => {
2296
- ee(x, `material.${o}`, M), ee(x, "material.needsUpdate", !0);
2289
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2290
+ S !== void 0 && $t(E).then((M) => {
2291
+ ee(S, `material.${o}`, M), ee(S, "material.needsUpdate", !0);
2297
2292
  });
2298
2293
  }
2299
- }) : c.push({
2300
- title: `${Ie(u)}`,
2294
+ }) : s.push({
2295
+ title: `${De(u)}`,
2301
2296
  prop: `material.${o}.${u}`,
2302
2297
  type: `${typeof t[o][u]}`,
2303
2298
  value: p[u],
2304
2299
  onChange: (b, E) => {
2305
2300
  a.updateObject(n.uuid, `material.${o}.${u}`, E);
2306
- const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2307
- x !== void 0 && ee(x, `material.${o}.${u}`, E);
2301
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2302
+ S !== void 0 && ee(S, `material.${o}.${u}`, E);
2308
2303
  }
2309
2304
  });
2310
2305
  break;
2311
2306
  case "object":
2312
- if (f.value !== void 0 && f.value.src !== void 0)
2313
- c.push({
2314
- title: Ie(u),
2307
+ if (d.value !== void 0 && d.value.src !== void 0)
2308
+ s.push({
2309
+ title: De(u),
2315
2310
  type: "image",
2316
- value: f.value.src,
2311
+ value: d.value.src,
2317
2312
  onChange: (b, E) => {
2318
2313
  a.createTexture(n.uuid, `material.${o}.${u}.value`, p);
2319
- const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2320
- x !== void 0 && Yt(E).then((M) => {
2321
- ee(x, `material.${o}.${u}.value`, M);
2314
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2315
+ S !== void 0 && $t(E).then((M) => {
2316
+ ee(S, `material.${o}.${u}.value`, M);
2322
2317
  });
2323
2318
  }
2324
2319
  });
2325
2320
  else if (o === "uniforms") {
2326
- const b = f.value, E = (x, M, P) => ({
2327
- title: x,
2321
+ const b = d.value, E = (S, M, P) => ({
2322
+ title: S,
2328
2323
  type: "number",
2329
2324
  value: P,
2330
2325
  step: 0.01,
2331
2326
  onChange: (H, B) => {
2332
- const w = `material.uniforms.${u}.value.${M}`;
2333
- a.updateObject(n.uuid, w, B);
2327
+ const x = `material.uniforms.${u}.value.${M}`;
2328
+ a.updateObject(n.uuid, x, B);
2334
2329
  const z = a.scene?.getObjectByProperty("uuid", n.uuid);
2335
- z !== void 0 && ee(z, w, B);
2330
+ z !== void 0 && ee(z, x, B);
2336
2331
  }
2337
2332
  });
2338
- if (typeof f.value == "number")
2339
- c.push({
2333
+ if (typeof d.value == "number")
2334
+ s.push({
2340
2335
  title: u,
2341
2336
  type: "number",
2342
- value: f.value,
2343
- onChange: (x, M) => {
2344
- const P = `material.${o}.${x}.value`;
2337
+ value: d.value,
2338
+ onChange: (S, M) => {
2339
+ const P = `material.${o}.${S}.value`;
2345
2340
  a.updateObject(n.uuid, P, M);
2346
2341
  const H = a.scene?.getObjectByProperty("uuid", n.uuid);
2347
2342
  H !== void 0 && ee(H, P, M);
2348
2343
  }
2349
2344
  });
2350
2345
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2351
- c.push({
2346
+ s.push({
2352
2347
  title: u,
2353
2348
  type: "color",
2354
- value: f.value,
2355
- onChange: (x, M) => {
2356
- const P = new Mt(M), H = `material.${o}.${x}.value`;
2349
+ value: d.value,
2350
+ onChange: (S, M) => {
2351
+ const P = new wt(M), H = `material.${o}.${S}.value`;
2357
2352
  a.updateObject(n.uuid, H, P);
2358
2353
  const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2359
2354
  B !== void 0 && ee(B, H, P);
2360
2355
  }
2361
2356
  });
2362
2357
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2363
- c.push(
2358
+ s.push(
2364
2359
  {
2365
2360
  title: u,
2366
2361
  items: [
2367
- E("X", "x", f.value.x),
2368
- E("Y", "y", f.value.y)
2362
+ E("X", "x", d.value.x),
2363
+ E("Y", "y", d.value.y)
2369
2364
  ]
2370
2365
  }
2371
2366
  );
2372
2367
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2373
- c.push(
2368
+ s.push(
2374
2369
  {
2375
2370
  title: u,
2376
2371
  items: [
2377
- E("X", "x", f.value.x),
2378
- E("Y", "y", f.value.y),
2379
- E("Z", "z", f.value.z)
2372
+ E("X", "x", d.value.x),
2373
+ E("Y", "y", d.value.y),
2374
+ E("Z", "z", d.value.z)
2380
2375
  ]
2381
2376
  }
2382
2377
  );
2383
2378
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
2384
- c.push(
2379
+ s.push(
2385
2380
  {
2386
2381
  title: u,
2387
2382
  items: [
2388
- E("X", "x", f.value.x),
2389
- E("Y", "y", f.value.y),
2390
- E("Z", "z", f.value.z),
2391
- E("W", "w", f.value.w)
2383
+ E("X", "x", d.value.x),
2384
+ E("Y", "y", d.value.y),
2385
+ E("Z", "z", d.value.z),
2386
+ E("W", "w", d.value.w)
2392
2387
  ]
2393
2388
  }
2394
2389
  );
2395
2390
  else if (b.elements !== void 0) {
2396
- const x = b.elements, M = [];
2397
- for (let P = 0; P < x.length; P++)
2398
- M.push(E(P.toString(), P.toString(), x[P]));
2399
- c.push(
2391
+ const S = b.elements, M = [];
2392
+ for (let P = 0; P < S.length; P++)
2393
+ M.push(E(P.toString(), P.toString(), S[P]));
2394
+ s.push(
2400
2395
  {
2401
2396
  title: u,
2402
2397
  items: M
@@ -2405,28 +2400,28 @@ function Qt(t, n, a) {
2405
2400
  } else
2406
2401
  console.log(">>> need to add this format:", u, b);
2407
2402
  } else
2408
- c.push({
2403
+ s.push({
2409
2404
  title: u,
2410
- type: `${typeof f.value}`,
2411
- value: f.value,
2405
+ type: `${typeof d.value}`,
2406
+ value: d.value,
2412
2407
  onChange: (b, E) => {
2413
2408
  a.updateObject(n.uuid, `material.${o}.${u}.value`, E);
2414
- const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2415
- x !== void 0 && ee(x, `material.${o}.${u}.value`, E);
2409
+ const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2410
+ S !== void 0 && ee(S, `material.${o}.${u}.value`, E);
2416
2411
  }
2417
2412
  });
2418
2413
  break;
2419
2414
  }
2420
2415
  }
2421
- c.length > 0 && e.push({
2422
- title: Ie(o),
2423
- items: c
2416
+ s.length > 0 && e.push({
2417
+ title: De(o),
2418
+ items: s
2424
2419
  });
2425
2420
  }
2426
2421
  else
2427
- p !== void 0 && console.log("other:", o, s, p);
2422
+ p !== void 0 && console.log("other:", o, c, p);
2428
2423
  }
2429
- return e.sort((o, s) => o.title < s.title ? -1 : o.title > s.title ? 1 : 0), e.push({
2424
+ return e.sort((o, c) => o.title < c.title ? -1 : o.title > c.title ? 1 : 0), e.push({
2430
2425
  title: "Update Material",
2431
2426
  type: "button",
2432
2427
  onChange: () => {
@@ -2434,76 +2429,76 @@ function Qt(t, n, a) {
2434
2429
  }
2435
2430
  }), e;
2436
2431
  }
2437
- function oi(t, n) {
2432
+ function ri(t, n) {
2438
2433
  const a = t.material;
2439
2434
  if (Array.isArray(a)) {
2440
2435
  const e = [], o = a.length;
2441
- for (let s = 0; s < o; s++)
2436
+ for (let c = 0; c < o; c++)
2442
2437
  e.push(
2443
2438
  /* @__PURE__ */ l.jsx(
2444
- Be,
2439
+ Fe,
2445
2440
  {
2446
- title: `Material ${s}`,
2447
- items: Qt(a[s], t, n)
2441
+ title: `Material ${c}`,
2442
+ items: Jt(a[c], t, n)
2448
2443
  },
2449
- `Material ${s}`
2444
+ `Material ${c}`
2450
2445
  )
2451
2446
  );
2452
2447
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2453
2448
  } else
2454
2449
  return /* @__PURE__ */ l.jsx(
2455
- Be,
2450
+ Fe,
2456
2451
  {
2457
2452
  title: "Material",
2458
- items: Qt(a, t, n)
2453
+ items: Jt(a, t, n)
2459
2454
  }
2460
2455
  );
2461
2456
  }
2462
- function st(t) {
2457
+ function rt(t) {
2463
2458
  let n = t.value;
2464
- n !== void 0 && n.isColor !== void 0 && (n = Ta(t.value));
2465
- const [a, e] = ae(n), o = Ee(null), s = Ee(null), p = Ee(null);
2466
- Oe(() => {
2467
- let v = !1, b = -1, E = 0, x = Number(a);
2459
+ n !== void 0 && n.isColor !== void 0 && (n = Oa(t.value));
2460
+ const [a, e] = ae(n), o = ye(null), c = ye(null), p = ye(null);
2461
+ we(() => {
2462
+ let v = !1, b = -1, E = 0, S = Number(a);
2468
2463
  const M = (z) => {
2469
- v = !0, E = x, b = z.clientX;
2464
+ v = !0, E = S, b = z.clientX;
2470
2465
  }, P = (z) => {
2471
2466
  if (!v)
2472
2467
  return;
2473
- const Ce = t.step !== void 0 ? t.step : 1, le = (z.clientX - b) * Ce;
2474
- x = Number((E + le).toFixed(4)), s.current !== null && (s.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2468
+ const Ee = t.step !== void 0 ? t.step : 1, le = (z.clientX - b) * Ee;
2469
+ S = Number((E + le).toFixed(4)), c.current !== null && (c.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
2475
2470
  }, H = () => {
2476
2471
  v = !1;
2477
2472
  }, B = () => {
2478
2473
  v = !1;
2479
- }, w = t.type === "number";
2480
- return w && (o.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", H, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", B, !1)), () => {
2481
- w && (o.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", H), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", B));
2474
+ }, x = t.type === "number";
2475
+ return x && (o.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", H, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", B, !1)), () => {
2476
+ x && (o.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", H), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", B));
2482
2477
  };
2483
2478
  }, [a]);
2484
- const c = t.type === "string" && (a.length > 100 || a.search(`
2485
- `) > -1), u = c || t.type === "image", f = (v) => {
2479
+ const s = t.type === "string" && (a.length > 100 || a.search(`
2480
+ `) > -1), u = s || t.type === "image", d = (v) => {
2486
2481
  let b = v.target.value;
2487
2482
  t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2488
2483
  };
2489
2484
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2490
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: ct(t.title) }, "fieldLabel"),
2491
- t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2485
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: ot(t.title) }, "fieldLabel"),
2486
+ t.type === "string" && !s && /* @__PURE__ */ l.jsx(
2492
2487
  "input",
2493
2488
  {
2494
2489
  type: "text",
2495
2490
  disabled: t.disabled,
2496
- onChange: f,
2491
+ onChange: d,
2497
2492
  value: a
2498
2493
  }
2499
2494
  ),
2500
- t.type === "string" && c && /* @__PURE__ */ l.jsx(
2495
+ t.type === "string" && s && /* @__PURE__ */ l.jsx(
2501
2496
  "textarea",
2502
2497
  {
2503
2498
  cols: 50,
2504
2499
  rows: 10,
2505
2500
  disabled: t.disabled !== void 0 ? t.disabled : !0,
2506
- onChange: f,
2501
+ onChange: d,
2507
2502
  value: a
2508
2503
  }
2509
2504
  ),
@@ -2512,25 +2507,25 @@ function st(t) {
2512
2507
  {
2513
2508
  type: "checkbox",
2514
2509
  disabled: t.disabled,
2515
- onChange: f,
2510
+ onChange: d,
2516
2511
  checked: a
2517
2512
  }
2518
2513
  ),
2519
2514
  t.type === "number" && /* @__PURE__ */ l.jsx(
2520
2515
  "input",
2521
2516
  {
2522
- ref: s,
2517
+ ref: c,
2523
2518
  type: "number",
2524
2519
  value: a,
2525
2520
  min: t.min,
2526
2521
  max: t.max,
2527
2522
  step: t.step,
2528
2523
  disabled: t.disabled,
2529
- onChange: f
2524
+ onChange: d
2530
2525
  }
2531
2526
  ),
2532
2527
  t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2533
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: f, disabled: t.disabled, className: "min" }),
2528
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
2534
2529
  /* @__PURE__ */ l.jsx(
2535
2530
  "input",
2536
2531
  {
@@ -2540,13 +2535,13 @@ function st(t) {
2540
2535
  min: t.min,
2541
2536
  max: t.max,
2542
2537
  step: t.step,
2543
- onChange: f
2538
+ onChange: d
2544
2539
  }
2545
2540
  )
2546
2541
  ] }),
2547
2542
  t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2548
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: f, disabled: t.disabled, className: "color" }),
2549
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: f, disabled: t.disabled })
2543
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
2544
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
2550
2545
  ] }),
2551
2546
  t.type === "button" && /* @__PURE__ */ l.jsx(
2552
2547
  "button",
@@ -2559,14 +2554,14 @@ function st(t) {
2559
2554
  }
2560
2555
  ),
2561
2556
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
2562
- ei().then((v) => {
2557
+ Qa().then((v) => {
2563
2558
  p.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2564
2559
  });
2565
- }, src: a.length > 0 ? a : Xa }),
2566
- t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: f, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ct(v.title) }, b)) }) })
2560
+ }, src: a.length > 0 ? a : Ka }),
2561
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ot(v.title) }, b)) }) })
2567
2562
  ] });
2568
2563
  }
2569
- function en(t) {
2564
+ function Qt(t) {
2570
2565
  switch (t) {
2571
2566
  case "fov":
2572
2567
  return "FOV";
@@ -2595,68 +2590,68 @@ function en(t) {
2595
2590
  }
2596
2591
  return t;
2597
2592
  }
2598
- function si(t, n) {
2593
+ function oi(t, n) {
2599
2594
  const a = [];
2600
2595
  if (t.perspectiveCameraInfo !== void 0)
2601
2596
  for (const e in t.perspectiveCameraInfo)
2602
2597
  a.push({
2603
- title: en(e),
2598
+ title: Qt(e),
2604
2599
  prop: e,
2605
2600
  type: "number",
2606
2601
  step: 0.01,
2607
2602
  value: t.perspectiveCameraInfo[e],
2608
- onChange: (o, s) => {
2609
- n.updateObject(t.uuid, o, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2603
+ onChange: (o, c) => {
2604
+ n.updateObject(t.uuid, o, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2610
2605
  const p = n.scene?.getObjectByProperty("uuid", t.uuid);
2611
- p !== void 0 && (ee(p, o, s), p.updateProjectionMatrix());
2606
+ p !== void 0 && (ee(p, o, c), p.updateProjectionMatrix());
2612
2607
  }
2613
2608
  });
2614
2609
  else if (t.orthographicCameraInfo !== void 0)
2615
2610
  for (const e in t.orthographicCameraInfo)
2616
2611
  a.push({
2617
- title: en(e),
2612
+ title: Qt(e),
2618
2613
  prop: e,
2619
2614
  type: "number",
2620
2615
  step: 0.01,
2621
2616
  value: t.perspectiveCameraInfo[e],
2622
- onChange: (o, s) => {
2623
- n.updateObject(t.uuid, o, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2617
+ onChange: (o, c) => {
2618
+ n.updateObject(t.uuid, o, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2624
2619
  const p = n.scene?.getObjectByProperty("uuid", t.uuid);
2625
- p !== void 0 && (ee(p, o, s), p.updateProjectionMatrix());
2620
+ p !== void 0 && (ee(p, o, c), p.updateProjectionMatrix());
2626
2621
  }
2627
2622
  });
2628
2623
  return /* @__PURE__ */ l.jsx(
2629
- Be,
2624
+ Fe,
2630
2625
  {
2631
2626
  title: "Camera",
2632
2627
  items: a
2633
2628
  }
2634
2629
  );
2635
2630
  }
2636
- const ci = Math.PI / 180, li = 180 / Math.PI;
2637
- function qe(t, n, a, e, o) {
2631
+ const si = Math.PI / 180, ci = 180 / Math.PI;
2632
+ function We(t, n, a, e, o) {
2638
2633
  return e + (t - n) * (o - e) / (a - n);
2639
2634
  }
2640
- function ui(t) {
2641
- return t * ci;
2635
+ function li(t) {
2636
+ return t * si;
2642
2637
  }
2643
- function Bt(t) {
2644
- return t * li;
2638
+ function Nt(t) {
2639
+ return t * ci;
2645
2640
  }
2646
- function di(t, n) {
2647
- const a = new ua();
2641
+ function ui(t, n) {
2642
+ const a = new ca();
2648
2643
  a.elements = t.matrix;
2649
- const e = new X(), o = new da(), s = new X();
2650
- t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), s.setFromMatrixScale(a));
2651
- const p = (u, f) => {
2652
- n.updateObject(t.uuid, u, f);
2644
+ const e = new X(), o = new la(), c = new X();
2645
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), c.setFromMatrixScale(a));
2646
+ const p = (u, d) => {
2647
+ n.updateObject(t.uuid, u, d);
2653
2648
  const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2654
- v !== void 0 && ee(v, u, f);
2655
- }, c = (u, f) => {
2656
- p(u, ui(f));
2649
+ v !== void 0 && ee(v, u, d);
2650
+ }, s = (u, d) => {
2651
+ p(u, li(d));
2657
2652
  };
2658
2653
  return /* @__PURE__ */ l.jsx(
2659
- Be,
2654
+ Fe,
2660
2655
  {
2661
2656
  title: "Transform",
2662
2657
  items: [
@@ -2685,37 +2680,37 @@ function di(t, n) {
2685
2680
  title: "Rotation X",
2686
2681
  prop: "rotation.x",
2687
2682
  type: "number",
2688
- value: Nt(Bt(o.x)),
2683
+ value: It(Nt(o.x)),
2689
2684
  min: -360,
2690
2685
  max: 360,
2691
2686
  step: 0.1,
2692
- onChange: c
2687
+ onChange: s
2693
2688
  },
2694
2689
  {
2695
2690
  title: "Rotation Y",
2696
2691
  prop: "rotation.y",
2697
2692
  type: "number",
2698
- value: Nt(Bt(o.y)),
2693
+ value: It(Nt(o.y)),
2699
2694
  min: -360,
2700
2695
  max: 360,
2701
2696
  step: 0.1,
2702
- onChange: c
2697
+ onChange: s
2703
2698
  },
2704
2699
  {
2705
2700
  title: "Rotation Z",
2706
2701
  prop: "rotation.z",
2707
2702
  type: "number",
2708
- value: Nt(Bt(o.z)),
2703
+ value: It(Nt(o.z)),
2709
2704
  min: -360,
2710
2705
  max: 360,
2711
2706
  step: 0.1,
2712
- onChange: c
2707
+ onChange: s
2713
2708
  },
2714
2709
  {
2715
2710
  title: "Scale X",
2716
2711
  prop: "scale.x",
2717
2712
  type: "number",
2718
- value: s.x,
2713
+ value: c.x,
2719
2714
  step: 0.01,
2720
2715
  onChange: p
2721
2716
  },
@@ -2723,7 +2718,7 @@ function di(t, n) {
2723
2718
  title: "Scale Y",
2724
2719
  prop: "scale.y",
2725
2720
  type: "number",
2726
- value: s.y,
2721
+ value: c.y,
2727
2722
  step: 0.01,
2728
2723
  onChange: p
2729
2724
  },
@@ -2731,7 +2726,7 @@ function di(t, n) {
2731
2726
  title: "Scale Z",
2732
2727
  prop: "scale.z",
2733
2728
  type: "number",
2734
- value: s.z,
2729
+ value: c.z,
2735
2730
  step: 0.01,
2736
2731
  onChange: p
2737
2732
  }
@@ -2739,7 +2734,7 @@ function di(t, n) {
2739
2734
  }
2740
2735
  );
2741
2736
  }
2742
- function tn(t) {
2737
+ function en(t) {
2743
2738
  switch (t) {
2744
2739
  case "color":
2745
2740
  return "Color";
@@ -2758,54 +2753,54 @@ function tn(t) {
2758
2753
  }
2759
2754
  return t;
2760
2755
  }
2761
- function hi(t, n) {
2756
+ function di(t, n) {
2762
2757
  const a = [];
2763
2758
  if (t.lightInfo !== void 0)
2764
2759
  for (const e in t.lightInfo) {
2765
2760
  const o = t.lightInfo[e];
2766
2761
  o !== void 0 && (o.isColor !== void 0 ? a.push({
2767
- title: tn(e),
2762
+ title: en(e),
2768
2763
  prop: e,
2769
2764
  type: "color",
2770
2765
  value: o,
2771
- onChange: (s, p) => {
2772
- const c = new Mt(p);
2773
- n.updateObject(t.uuid, s, c);
2766
+ onChange: (c, p) => {
2767
+ const s = new wt(p);
2768
+ n.updateObject(t.uuid, c, s);
2774
2769
  const u = n.scene?.getObjectByProperty("uuid", t.uuid);
2775
- u !== void 0 && ee(u, s, c);
2770
+ u !== void 0 && ee(u, c, s);
2776
2771
  }
2777
2772
  }) : a.push({
2778
- title: tn(e),
2773
+ title: en(e),
2779
2774
  prop: e,
2780
2775
  type: typeof o,
2781
2776
  value: o,
2782
2777
  step: typeof o == "number" ? 0.01 : void 0,
2783
- onChange: (s, p) => {
2784
- n.updateObject(t.uuid, s, p);
2785
- const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2786
- c !== void 0 && ee(c, s, p);
2778
+ onChange: (c, p) => {
2779
+ n.updateObject(t.uuid, c, p);
2780
+ const s = n.scene?.getObjectByProperty("uuid", t.uuid);
2781
+ s !== void 0 && ee(s, c, p);
2787
2782
  }
2788
2783
  }));
2789
2784
  }
2790
2785
  return /* @__PURE__ */ l.jsx(
2791
- Be,
2786
+ Fe,
2792
2787
  {
2793
2788
  title: "Light",
2794
2789
  items: a
2795
2790
  }
2796
2791
  );
2797
2792
  }
2798
- function fi(t, n) {
2793
+ function hi(t, n) {
2799
2794
  const a = [], e = [];
2800
2795
  let o = 0;
2801
- t.animations.forEach((c) => {
2802
- o = Math.max(o, c.duration), c.duration > 0 && e.push({
2803
- title: c.name,
2796
+ t.animations.forEach((s) => {
2797
+ o = Math.max(o, s.duration), s.duration > 0 && e.push({
2798
+ title: s.name,
2804
2799
  items: [
2805
2800
  {
2806
2801
  title: "Duration",
2807
2802
  type: "number",
2808
- value: c.duration,
2803
+ value: s.duration,
2809
2804
  disabled: !0
2810
2805
  },
2811
2806
  {
@@ -2829,21 +2824,21 @@ function fi(t, n) {
2829
2824
  title: "Animations",
2830
2825
  items: e
2831
2826
  });
2832
- const s = n.scene?.getObjectByProperty("uuid", t.uuid);
2827
+ const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2833
2828
  let p = !1;
2834
- if (s !== void 0) {
2835
- const c = s.mixer;
2836
- if (p = c !== void 0, p) {
2829
+ if (c !== void 0) {
2830
+ const s = c.mixer;
2831
+ if (p = s !== void 0, p) {
2837
2832
  const u = [
2838
2833
  {
2839
2834
  title: "Time Scale",
2840
2835
  type: "range",
2841
- value: c.timeScale,
2836
+ value: s.timeScale,
2842
2837
  step: 0.01,
2843
2838
  min: -1,
2844
2839
  max: 2,
2845
- onChange: (f, v) => {
2846
- c.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2840
+ onChange: (d, v) => {
2841
+ s.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2847
2842
  }
2848
2843
  }
2849
2844
  ];
@@ -2851,7 +2846,7 @@ function fi(t, n) {
2851
2846
  title: "Stop All",
2852
2847
  type: "button",
2853
2848
  onChange: () => {
2854
- c.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2849
+ s.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2855
2850
  }
2856
2851
  }), a.push({
2857
2852
  title: "Mixer",
@@ -2859,9 +2854,9 @@ function fi(t, n) {
2859
2854
  });
2860
2855
  }
2861
2856
  }
2862
- return /* @__PURE__ */ l.jsx(Be, { title: "Animation", items: a });
2857
+ return /* @__PURE__ */ l.jsx(Fe, { title: "Animation", items: a });
2863
2858
  }
2864
- const Bn = {
2859
+ const Nn = {
2865
2860
  name: "",
2866
2861
  uuid: "",
2867
2862
  type: "",
@@ -2873,25 +2868,25 @@ const Bn = {
2873
2868
  orthographicCameraInfo: void 0,
2874
2869
  lightInfo: void 0
2875
2870
  };
2876
- let te = { ...Bn };
2877
- function pi(t) {
2871
+ let te = { ...Nn };
2872
+ function fi(t) {
2878
2873
  const [n, a] = ae(-1);
2879
- Oe(() => {
2874
+ we(() => {
2880
2875
  function p(u) {
2881
2876
  te = { ...u.value }, a(Date.now());
2882
2877
  }
2883
- function c() {
2884
- te = { ...Bn }, a(Date.now());
2878
+ function s() {
2879
+ te = { ...Nn }, a(Date.now());
2885
2880
  }
2886
- return k.addEventListener(j.SET_SCENE, c), k.addEventListener(j.SET_OBJECT, p), () => {
2887
- k.removeEventListener(j.SET_SCENE, c), k.removeEventListener(j.SET_OBJECT, p);
2881
+ return k.addEventListener(j.SET_SCENE, s), k.addEventListener(j.SET_OBJECT, p), () => {
2882
+ k.removeEventListener(j.SET_SCENE, s), k.removeEventListener(j.SET_OBJECT, p);
2888
2883
  };
2889
2884
  }, []);
2890
- const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0, s = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2891
- return /* @__PURE__ */ l.jsx(Vt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2885
+ const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0, c = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2886
+ return /* @__PURE__ */ l.jsx(Yt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2892
2887
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2893
2888
  /* @__PURE__ */ l.jsx(
2894
- st,
2889
+ rt,
2895
2890
  {
2896
2891
  type: "string",
2897
2892
  title: "Name",
@@ -2901,7 +2896,7 @@ function pi(t) {
2901
2896
  }
2902
2897
  ),
2903
2898
  /* @__PURE__ */ l.jsx(
2904
- st,
2899
+ rt,
2905
2900
  {
2906
2901
  type: "string",
2907
2902
  title: "Type",
@@ -2911,7 +2906,7 @@ function pi(t) {
2911
2906
  }
2912
2907
  ),
2913
2908
  /* @__PURE__ */ l.jsx(
2914
- st,
2909
+ rt,
2915
2910
  {
2916
2911
  type: "string",
2917
2912
  title: "UUID",
@@ -2921,132 +2916,132 @@ function pi(t) {
2921
2916
  }
2922
2917
  ),
2923
2918
  /* @__PURE__ */ l.jsx(
2924
- st,
2919
+ rt,
2925
2920
  {
2926
2921
  type: "boolean",
2927
2922
  title: "Visible",
2928
2923
  prop: "visible",
2929
2924
  value: te.visible,
2930
- onChange: (p, c) => {
2931
- t.three.updateObject(te.uuid, p, c);
2925
+ onChange: (p, s) => {
2926
+ t.three.updateObject(te.uuid, p, s);
2932
2927
  const u = t.three.scene?.getObjectByProperty("uuid", te.uuid);
2933
- u !== void 0 && ee(u, p, c);
2928
+ u !== void 0 && ee(u, p, s);
2934
2929
  }
2935
2930
  }
2936
2931
  )
2937
2932
  ] }),
2938
2933
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2939
- di(te, t.three),
2940
- o ? fi(te, t.three) : null,
2941
- e.search("camera") > -1 ? si(te, t.three) : null,
2942
- e.search("light") > -1 ? hi(te, t.three) : null,
2943
- s ? oi(te, t.three) : null
2934
+ ui(te, t.three),
2935
+ o ? hi(te, t.three) : null,
2936
+ e.search("camera") > -1 ? oi(te, t.three) : null,
2937
+ e.search("light") > -1 ? di(te, t.three) : null,
2938
+ c ? ri(te, t.three) : null
2944
2939
  ] })
2945
2940
  ] }) }, n) }, "Inspector");
2946
2941
  }
2947
- function Ii(t) {
2942
+ function Li(t) {
2948
2943
  const [n, a] = ae(t.scene);
2949
- Oe(() => {
2950
- const s = (p) => {
2944
+ we(() => {
2945
+ const c = (p) => {
2951
2946
  a(p.value);
2952
2947
  };
2953
- return k.addEventListener(j.SET_SCENE, s), () => {
2954
- k.removeEventListener(j.SET_SCENE, s);
2948
+ return k.addEventListener(j.SET_SCENE, c), () => {
2949
+ k.removeEventListener(j.SET_SCENE, c);
2955
2950
  };
2956
2951
  }, []);
2957
2952
  const e = n !== null, o = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2958
2953
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2959
- /* @__PURE__ */ l.jsx(Vt, { label: o, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(Ka, { child: n, three: t.three }) }) }),
2960
- /* @__PURE__ */ l.jsx(pi, { three: t.three })
2954
+ /* @__PURE__ */ l.jsx(Yt, { label: o, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(qa, { child: n, three: t.three }) }) }),
2955
+ /* @__PURE__ */ l.jsx(fi, { three: t.three })
2961
2956
  ] }, "SidePanel");
2962
2957
  }
2963
- function Li(t) {
2958
+ function Ni(t) {
2964
2959
  function n() {
2965
2960
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2966
2961
  }
2967
- const a = (c) => {
2962
+ const a = (s) => {
2968
2963
  if (!n())
2969
2964
  return;
2970
- const u = t.three.scene?.getObjectByProperty("uuid", c.value);
2965
+ const u = t.three.scene?.getObjectByProperty("uuid", s.value);
2971
2966
  u !== void 0 && t.three.setObject(u);
2972
- }, e = (c, u, f) => {
2967
+ }, e = (s, u, d) => {
2973
2968
  if (!n())
2974
2969
  return;
2975
- const v = t.three.scene?.getObjectByProperty("uuid", c);
2976
- v !== void 0 && ee(v, u, f);
2977
- }, o = (c) => {
2970
+ const v = t.three.scene?.getObjectByProperty("uuid", s);
2971
+ v !== void 0 && ee(v, u, d);
2972
+ }, o = (s) => {
2978
2973
  if (!n())
2979
2974
  return;
2980
- const u = c.value, { key: f, value: v, uuid: b } = u;
2981
- e(b, f, v);
2982
- }, s = (c) => {
2975
+ const u = s.value, { key: d, value: v, uuid: b } = u;
2976
+ e(b, d, v);
2977
+ }, c = (s) => {
2983
2978
  if (!n())
2984
2979
  return;
2985
- const u = c.value;
2986
- Yt(u.value).then((f) => {
2987
- e(u.uuid, u.key, f), e(u.uuid, "material.needsUpdate", !0);
2980
+ const u = s.value;
2981
+ $t(u.value).then((d) => {
2982
+ e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
2988
2983
  });
2989
- }, p = (c) => {
2984
+ }, p = (s) => {
2990
2985
  if (!n())
2991
2986
  return;
2992
- const { key: u, uuid: f, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", f);
2987
+ const { key: u, uuid: d, value: v, subitem: b } = s.value, E = t.three.scene?.getObjectByProperty("uuid", d);
2993
2988
  if (E !== void 0)
2994
2989
  try {
2995
- b !== void 0 ? ja(E, b)[u](v) : E[u](v);
2996
- } catch (x) {
2997
- console.log("Error requesting method:"), console.log(x), console.log(u), console.log(v);
2990
+ b !== void 0 ? ka(E, b)[u](v) : E[u](v);
2991
+ } catch (S) {
2992
+ console.log("Error requesting method:"), console.log(S), console.log(u), console.log(v);
2998
2993
  }
2999
2994
  };
3000
- return Oe(() => (k.addEventListener(j.GET_OBJECT, a), k.addEventListener(j.UPDATE_OBJECT, o), k.addEventListener(j.CREATE_TEXTURE, s), k.addEventListener(j.REQUEST_METHOD, p), () => {
3001
- k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, o), k.removeEventListener(j.CREATE_TEXTURE, s), k.removeEventListener(j.REQUEST_METHOD, p);
2995
+ return we(() => (k.addEventListener(j.GET_OBJECT, a), k.addEventListener(j.UPDATE_OBJECT, o), k.addEventListener(j.CREATE_TEXTURE, c), k.addEventListener(j.REQUEST_METHOD, p), () => {
2996
+ k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, o), k.removeEventListener(j.CREATE_TEXTURE, c), k.removeEventListener(j.REQUEST_METHOD, p);
3002
2997
  }), []), null;
3003
2998
  }
3004
- const nn = { type: "change" }, Ut = { type: "start" }, an = { type: "end" }, xt = new ha(), rn = new fa(), mi = Math.cos(70 * pa.DEG2RAD);
3005
- class vi extends ln {
2999
+ const tn = { type: "change" }, Ft = { type: "start" }, nn = { type: "end" }, Et = new ua(), an = new da(), pi = Math.cos(70 * ha.DEG2RAD);
3000
+ class mi extends cn {
3006
3001
  constructor(n, a) {
3007
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Ve.ROTATE, MIDDLE: Ve.DOLLY, RIGHT: Ve.PAN }, this.touches = { ONE: He.ROTATE, TWO: He.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3008
- return c.phi;
3002
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Ge.ROTATE, MIDDLE: Ge.DOLLY, RIGHT: Ge.PAN }, this.touches = { ONE: Ve.ROTATE, TWO: Ve.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3003
+ return s.phi;
3009
3004
  }, this.getAzimuthalAngle = function() {
3010
- return c.theta;
3005
+ return s.theta;
3011
3006
  }, this.getDistance = function() {
3012
3007
  return this.object.position.distanceTo(this.target);
3013
3008
  }, this.listenToKeyEvents = function(r) {
3014
- r.addEventListener("keydown", et), this._domElementKeyEvents = r;
3009
+ r.addEventListener("keydown", Qe), this._domElementKeyEvents = r;
3015
3010
  }, this.stopListenToKeyEvents = function() {
3016
- this._domElementKeyEvents.removeEventListener("keydown", et), this._domElementKeyEvents = null;
3011
+ this._domElementKeyEvents.removeEventListener("keydown", Qe), this._domElementKeyEvents = null;
3017
3012
  }, this.saveState = function() {
3018
3013
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
3019
3014
  }, this.reset = function() {
3020
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(nn), e.update(), s = o.NONE;
3015
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), c = o.NONE;
3021
3016
  }, this.update = function() {
3022
- const r = new X(), y = new Kt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Kt(), de = new X(), ie = 2 * Math.PI;
3023
- return function(Lt = null) {
3024
- const nt = e.object.position;
3025
- r.copy(nt).sub(e.target), r.applyQuaternion(y), c.setFromVector3(r), e.autoRotate && s === o.NONE && U(_(Lt)), e.enableDamping ? (c.theta += u.theta * e.dampingFactor, c.phi += u.phi * e.dampingFactor) : (c.theta += u.theta, c.phi += u.phi);
3017
+ const r = new X(), y = new Wt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Wt(), de = new X(), ie = 2 * Math.PI;
3018
+ return function(Dt = null) {
3019
+ const tt = e.object.position;
3020
+ r.copy(tt).sub(e.target), r.applyQuaternion(y), s.setFromVector3(r), e.autoRotate && c === o.NONE && U(_(Dt)), e.enableDamping ? (s.theta += u.theta * e.dampingFactor, s.phi += u.phi * e.dampingFactor) : (s.theta += u.theta, s.phi += u.phi);
3026
3021
  let pe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
3027
- isFinite(pe) && isFinite(he) && (pe < -Math.PI ? pe += ie : pe > Math.PI && (pe -= ie), he < -Math.PI ? he += ie : he > Math.PI && (he -= ie), pe <= he ? c.theta = Math.max(pe, Math.min(he, c.theta)) : c.theta = c.theta > (pe + he) / 2 ? Math.max(pe, c.theta) : Math.min(he, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && se || e.object.isOrthographicCamera ? c.radius = me(c.radius) : c.radius = me(c.radius * f), r.setFromSpherical(c), r.applyQuaternion(O), nt.copy(e.target).add(r), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
3028
- let Pe = !1;
3022
+ isFinite(pe) && isFinite(he) && (pe < -Math.PI ? pe += ie : pe > Math.PI && (pe -= ie), he < -Math.PI ? he += ie : he > Math.PI && (he -= ie), pe <= he ? s.theta = Math.max(pe, Math.min(he, s.theta)) : s.theta = s.theta > (pe + he) / 2 ? Math.max(pe, s.theta) : Math.min(he, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && se || e.object.isOrthographicCamera ? s.radius = me(s.radius) : s.radius = me(s.radius * d), r.setFromSpherical(s), r.applyQuaternion(O), tt.copy(e.target).add(r), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
3023
+ let Ae = !1;
3029
3024
  if (e.zoomToCursor && se) {
3030
- let ke = null;
3025
+ let Pe = null;
3031
3026
  if (e.object.isPerspectiveCamera) {
3032
- const je = r.length();
3033
- ke = me(je * f);
3034
- const De = je - ke;
3035
- e.object.position.addScaledVector(Ce, De), e.object.updateMatrixWorld();
3027
+ const ke = r.length();
3028
+ Pe = me(ke * d);
3029
+ const je = ke - Pe;
3030
+ e.object.position.addScaledVector(Ee, je), e.object.updateMatrixWorld();
3036
3031
  } else if (e.object.isOrthographicCamera) {
3032
+ const ke = new X(le.x, le.y, 0);
3033
+ ke.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), Ae = !0;
3037
3034
  const je = new X(le.x, le.y, 0);
3038
- je.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), Pe = !0;
3039
- const De = new X(le.x, le.y, 0);
3040
- De.unproject(e.object), e.object.position.sub(De).add(je), e.object.updateMatrixWorld(), ke = r.length();
3035
+ je.unproject(e.object), e.object.position.sub(je).add(ke), e.object.updateMatrixWorld(), Pe = r.length();
3041
3036
  } else
3042
3037
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
3043
- ke !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ke).add(e.object.position) : (xt.origin.copy(e.object.position), xt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(xt.direction)) < mi ? n.lookAt(e.target) : (rn.setFromNormalAndCoplanarPoint(e.object.up, e.target), xt.intersectPlane(rn, e.target))));
3038
+ Pe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Pe).add(e.object.position) : (Et.origin.copy(e.object.position), Et.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(Et.direction)) < pi ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), Et.intersectPlane(an, e.target))));
3044
3039
  } else
3045
- e.object.isOrthographicCamera && (Pe = f !== 1, Pe && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix()));
3046
- return f = 1, se = !1, Pe || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(nn), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3040
+ e.object.isOrthographicCamera && (Ae = d !== 1, Ae && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3041
+ return d = 1, se = !1, Ae || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
3047
3042
  };
3048
3043
  }(), this.dispose = function() {
3049
- e.domElement.removeEventListener("contextmenu", Ye), e.domElement.removeEventListener("pointerdown", _e), e.domElement.removeEventListener("pointercancel", Ae), e.domElement.removeEventListener("wheel", gt), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", et), e._domElementKeyEvents = null);
3044
+ e.domElement.removeEventListener("contextmenu", ze), e.domElement.removeEventListener("pointerdown", Re), e.domElement.removeEventListener("pointercancel", _e), e.domElement.removeEventListener("wheel", mt), e.domElement.removeEventListener("pointermove", Ze), e.domElement.removeEventListener("pointerup", _e), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Qe), e._domElementKeyEvents = null);
3050
3045
  };
3051
3046
  const e = this, o = {
3052
3047
  NONE: -1,
@@ -3058,13 +3053,13 @@ class vi extends ln {
3058
3053
  TOUCH_DOLLY_PAN: 5,
3059
3054
  TOUCH_DOLLY_ROTATE: 6
3060
3055
  };
3061
- let s = o.NONE;
3062
- const p = 1e-6, c = new Xt(), u = new Xt();
3063
- let f = 1;
3064
- const v = new X(), b = new ue(), E = new ue(), x = new ue(), M = new ue(), P = new ue(), H = new ue(), B = new ue(), w = new ue(), z = new ue(), Ce = new X(), le = new ue();
3056
+ let c = o.NONE;
3057
+ const p = 1e-6, s = new qt(), u = new qt();
3058
+ let d = 1;
3059
+ const v = new X(), b = new ue(), E = new ue(), S = new ue(), M = new ue(), P = new ue(), H = new ue(), B = new ue(), x = new ue(), z = new ue(), Ee = new X(), le = new ue();
3065
3060
  let se = !1;
3066
- const d = [], m = {};
3067
- let S = !1;
3061
+ const h = [], m = {};
3062
+ let w = !1;
3068
3063
  function _(r) {
3069
3064
  return r !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * r : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
3070
3065
  }
@@ -3102,45 +3097,45 @@ class vi extends ln {
3102
3097
  };
3103
3098
  }();
3104
3099
  function T(r) {
3105
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f /= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3100
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3106
3101
  }
3107
3102
  function N(r) {
3108
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f *= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3103
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3109
3104
  }
3110
3105
  function J(r, y) {
3111
3106
  if (!e.zoomToCursor)
3112
3107
  return;
3113
3108
  se = !0;
3114
3109
  const O = e.domElement.getBoundingClientRect(), L = r - O.left, K = y - O.top, de = O.width, ie = O.height;
3115
- le.x = L / de * 2 - 1, le.y = -(K / ie) * 2 + 1, Ce.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
3110
+ le.x = L / de * 2 - 1, le.y = -(K / ie) * 2 + 1, Ee.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
3116
3111
  }
3117
3112
  function me(r) {
3118
3113
  return Math.max(e.minDistance, Math.min(e.maxDistance, r));
3119
3114
  }
3120
- function xe(r) {
3115
+ function Ce(r) {
3121
3116
  b.set(r.clientX, r.clientY);
3122
3117
  }
3123
- function dt(r) {
3118
+ function lt(r) {
3124
3119
  J(r.clientX, r.clientX), B.set(r.clientX, r.clientY);
3125
3120
  }
3126
- function Ke(r) {
3121
+ function qe(r) {
3127
3122
  M.set(r.clientX, r.clientY);
3128
3123
  }
3129
- function _t(r) {
3130
- E.set(r.clientX, r.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3124
+ function Tt(r) {
3125
+ E.set(r.clientX, r.clientY), S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3131
3126
  const y = e.domElement;
3132
- U(2 * Math.PI * x.x / y.clientHeight), $(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3127
+ U(2 * Math.PI * S.x / y.clientHeight), $(2 * Math.PI * S.y / y.clientHeight), b.copy(E), e.update();
3133
3128
  }
3134
- function At(r) {
3135
- w.set(r.clientX, r.clientY), z.subVectors(w, B), z.y > 0 ? T(Y(z.y)) : z.y < 0 && N(Y(z.y)), B.copy(w), e.update();
3129
+ function Rt(r) {
3130
+ x.set(r.clientX, r.clientY), z.subVectors(x, B), z.y > 0 ? T(Y(z.y)) : z.y < 0 && N(Y(z.y)), B.copy(x), e.update();
3136
3131
  }
3137
- function Xe(r) {
3132
+ function Ke(r) {
3138
3133
  P.set(r.clientX, r.clientY), H.subVectors(P, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(P), e.update();
3139
3134
  }
3140
- function Ze(r) {
3135
+ function Xe(r) {
3141
3136
  J(r.clientX, r.clientY), r.deltaY < 0 ? N(Y(r.deltaY)) : r.deltaY > 0 && T(Y(r.deltaY)), e.update();
3142
3137
  }
3143
- function $e(r) {
3138
+ function Ue(r) {
3144
3139
  let y = !1;
3145
3140
  switch (r.code) {
3146
3141
  case e.keys.UP:
@@ -3158,82 +3153,82 @@ class vi extends ln {
3158
3153
  }
3159
3154
  y && (r.preventDefault(), e.update());
3160
3155
  }
3161
- function ze(r) {
3162
- if (d.length === 1)
3156
+ function $e(r) {
3157
+ if (h.length === 1)
3163
3158
  b.set(r.pageX, r.pageY);
3164
3159
  else {
3165
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3160
+ const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3166
3161
  b.set(O, L);
3167
3162
  }
3168
3163
  }
3169
- function Me(r) {
3170
- if (d.length === 1)
3164
+ function Oe(r) {
3165
+ if (h.length === 1)
3171
3166
  M.set(r.pageX, r.pageY);
3172
3167
  else {
3173
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3168
+ const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3174
3169
  M.set(O, L);
3175
3170
  }
3176
3171
  }
3177
- function ht(r) {
3178
- const y = Se(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3172
+ function ut(r) {
3173
+ const y = xe(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3179
3174
  B.set(0, K);
3180
3175
  }
3181
- function ft(r) {
3182
- e.enableZoom && ht(r), e.enablePan && Me(r);
3176
+ function dt(r) {
3177
+ e.enableZoom && ut(r), e.enablePan && Oe(r);
3183
3178
  }
3184
- function Pt(r) {
3185
- e.enableZoom && ht(r), e.enableRotate && ze(r);
3179
+ function _t(r) {
3180
+ e.enableZoom && ut(r), e.enableRotate && $e(r);
3186
3181
  }
3187
- function pt(r) {
3188
- if (d.length == 1)
3182
+ function ht(r) {
3183
+ if (h.length == 1)
3189
3184
  E.set(r.pageX, r.pageY);
3190
3185
  else {
3191
- const O = Se(r), L = 0.5 * (r.pageX + O.x), K = 0.5 * (r.pageY + O.y);
3186
+ const O = xe(r), L = 0.5 * (r.pageX + O.x), K = 0.5 * (r.pageY + O.y);
3192
3187
  E.set(L, K);
3193
3188
  }
3194
- x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3189
+ S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3195
3190
  const y = e.domElement;
3196
- U(2 * Math.PI * x.x / y.clientHeight), $(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3191
+ U(2 * Math.PI * S.x / y.clientHeight), $(2 * Math.PI * S.y / y.clientHeight), b.copy(E);
3197
3192
  }
3198
- function Te(r) {
3199
- if (d.length === 1)
3193
+ function Me(r) {
3194
+ if (h.length === 1)
3200
3195
  P.set(r.pageX, r.pageY);
3201
3196
  else {
3202
- const y = Se(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3197
+ const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
3203
3198
  P.set(O, L);
3204
3199
  }
3205
3200
  H.subVectors(P, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(P);
3206
3201
  }
3207
- function Re(r) {
3208
- const y = Se(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3209
- w.set(0, K), z.set(0, Math.pow(w.y / B.y, e.zoomSpeed)), T(z.y), B.copy(w);
3202
+ function Te(r) {
3203
+ const y = xe(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
3204
+ x.set(0, K), z.set(0, Math.pow(x.y / B.y, e.zoomSpeed)), T(z.y), B.copy(x);
3210
3205
  const de = (r.pageX + y.x) * 0.5, ie = (r.pageY + y.y) * 0.5;
3211
3206
  J(de, ie);
3212
3207
  }
3213
- function mt(r) {
3214
- e.enableZoom && Re(r), e.enablePan && Te(r);
3208
+ function ft(r) {
3209
+ e.enableZoom && Te(r), e.enablePan && Me(r);
3215
3210
  }
3216
- function vt(r) {
3217
- e.enableZoom && Re(r), e.enableRotate && pt(r);
3211
+ function pt(r) {
3212
+ e.enableZoom && Te(r), e.enableRotate && ht(r);
3218
3213
  }
3219
- function _e(r) {
3220
- e.enabled !== !1 && (d.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Je), e.domElement.addEventListener("pointerup", Ae)), jt(r), r.pointerType === "touch" ? tt(r) : Qe(r));
3214
+ function Re(r) {
3215
+ e.enabled !== !1 && (h.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Ze), e.domElement.addEventListener("pointerup", _e)), Pt(r), r.pointerType === "touch" ? et(r) : Je(r));
3221
3216
  }
3222
- function Je(r) {
3223
- e.enabled !== !1 && (r.pointerType === "touch" ? Et(r) : kt(r));
3217
+ function Ze(r) {
3218
+ e.enabled !== !1 && (r.pointerType === "touch" ? bt(r) : At(r));
3224
3219
  }
3225
- function Ae(r) {
3226
- switch (Dt(r), d.length) {
3220
+ function _e(r) {
3221
+ switch (kt(r), h.length) {
3227
3222
  case 0:
3228
- e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Je), e.domElement.removeEventListener("pointerup", Ae), e.dispatchEvent(an), s = o.NONE;
3223
+ e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Ze), e.domElement.removeEventListener("pointerup", _e), e.dispatchEvent(nn), c = o.NONE;
3229
3224
  break;
3230
3225
  case 1:
3231
- const y = d[0], O = m[y];
3232
- tt({ pointerId: y, pageX: O.x, pageY: O.y });
3226
+ const y = h[0], O = m[y];
3227
+ et({ pointerId: y, pageX: O.x, pageY: O.y });
3233
3228
  break;
3234
3229
  }
3235
3230
  }
3236
- function Qe(r) {
3231
+ function Je(r) {
3237
3232
  let y;
3238
3233
  switch (r.button) {
3239
3234
  case 0:
@@ -3249,61 +3244,61 @@ class vi extends ln {
3249
3244
  y = -1;
3250
3245
  }
3251
3246
  switch (y) {
3252
- case Ve.DOLLY:
3247
+ case Ge.DOLLY:
3253
3248
  if (e.enableZoom === !1)
3254
3249
  return;
3255
- dt(r), s = o.DOLLY;
3250
+ lt(r), c = o.DOLLY;
3256
3251
  break;
3257
- case Ve.ROTATE:
3252
+ case Ge.ROTATE:
3258
3253
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
3259
3254
  if (e.enablePan === !1)
3260
3255
  return;
3261
- Ke(r), s = o.PAN;
3256
+ qe(r), c = o.PAN;
3262
3257
  } else {
3263
3258
  if (e.enableRotate === !1)
3264
3259
  return;
3265
- xe(r), s = o.ROTATE;
3260
+ Ce(r), c = o.ROTATE;
3266
3261
  }
3267
3262
  break;
3268
- case Ve.PAN:
3263
+ case Ge.PAN:
3269
3264
  if (r.ctrlKey || r.metaKey || r.shiftKey) {
3270
3265
  if (e.enableRotate === !1)
3271
3266
  return;
3272
- xe(r), s = o.ROTATE;
3267
+ Ce(r), c = o.ROTATE;
3273
3268
  } else {
3274
3269
  if (e.enablePan === !1)
3275
3270
  return;
3276
- Ke(r), s = o.PAN;
3271
+ qe(r), c = o.PAN;
3277
3272
  }
3278
3273
  break;
3279
3274
  default:
3280
- s = o.NONE;
3275
+ c = o.NONE;
3281
3276
  }
3282
- s !== o.NONE && e.dispatchEvent(Ut);
3277
+ c !== o.NONE && e.dispatchEvent(Ft);
3283
3278
  }
3284
- function kt(r) {
3285
- switch (s) {
3279
+ function At(r) {
3280
+ switch (c) {
3286
3281
  case o.ROTATE:
3287
3282
  if (e.enableRotate === !1)
3288
3283
  return;
3289
- _t(r);
3284
+ Tt(r);
3290
3285
  break;
3291
3286
  case o.DOLLY:
3292
3287
  if (e.enableZoom === !1)
3293
3288
  return;
3294
- At(r);
3289
+ Rt(r);
3295
3290
  break;
3296
3291
  case o.PAN:
3297
3292
  if (e.enablePan === !1)
3298
3293
  return;
3299
- Xe(r);
3294
+ Ke(r);
3300
3295
  break;
3301
3296
  }
3302
3297
  }
3303
- function gt(r) {
3304
- e.enabled === !1 || e.enableZoom === !1 || s !== o.NONE || (r.preventDefault(), e.dispatchEvent(Ut), Ze(bt(r)), e.dispatchEvent(an));
3298
+ function mt(r) {
3299
+ e.enabled === !1 || e.enableZoom === !1 || c !== o.NONE || (r.preventDefault(), e.dispatchEvent(Ft), Xe(vt(r)), e.dispatchEvent(nn));
3305
3300
  }
3306
- function bt(r) {
3301
+ function vt(r) {
3307
3302
  const y = r.deltaMode, O = {
3308
3303
  clientX: r.clientX,
3309
3304
  clientY: r.clientY,
@@ -3317,127 +3312,127 @@ class vi extends ln {
3317
3312
  O.deltaY *= 100;
3318
3313
  break;
3319
3314
  }
3320
- return r.ctrlKey && !S && (O.deltaY *= 10), O;
3315
+ return r.ctrlKey && !w && (O.deltaY *= 10), O;
3321
3316
  }
3322
- function yt(r) {
3323
- r.key === "Control" && (S = !0, e.domElement.getRootNode().addEventListener("keyup", we, { passive: !0, capture: !0 }));
3317
+ function gt(r) {
3318
+ r.key === "Control" && (w = !0, e.domElement.getRootNode().addEventListener("keyup", Se, { passive: !0, capture: !0 }));
3324
3319
  }
3325
- function we(r) {
3326
- r.key === "Control" && (S = !1, e.domElement.getRootNode().removeEventListener("keyup", we, { passive: !0, capture: !0 }));
3320
+ function Se(r) {
3321
+ r.key === "Control" && (w = !1, e.domElement.getRootNode().removeEventListener("keyup", Se, { passive: !0, capture: !0 }));
3327
3322
  }
3328
- function et(r) {
3329
- e.enabled === !1 || e.enablePan === !1 || $e(r);
3323
+ function Qe(r) {
3324
+ e.enabled === !1 || e.enablePan === !1 || Ue(r);
3330
3325
  }
3331
- function tt(r) {
3332
- switch (Ct(r), d.length) {
3326
+ function et(r) {
3327
+ switch (yt(r), h.length) {
3333
3328
  case 1:
3334
3329
  switch (e.touches.ONE) {
3335
- case He.ROTATE:
3330
+ case Ve.ROTATE:
3336
3331
  if (e.enableRotate === !1)
3337
3332
  return;
3338
- ze(r), s = o.TOUCH_ROTATE;
3333
+ $e(r), c = o.TOUCH_ROTATE;
3339
3334
  break;
3340
- case He.PAN:
3335
+ case Ve.PAN:
3341
3336
  if (e.enablePan === !1)
3342
3337
  return;
3343
- Me(r), s = o.TOUCH_PAN;
3338
+ Oe(r), c = o.TOUCH_PAN;
3344
3339
  break;
3345
3340
  default:
3346
- s = o.NONE;
3341
+ c = o.NONE;
3347
3342
  }
3348
3343
  break;
3349
3344
  case 2:
3350
3345
  switch (e.touches.TWO) {
3351
- case He.DOLLY_PAN:
3346
+ case Ve.DOLLY_PAN:
3352
3347
  if (e.enableZoom === !1 && e.enablePan === !1)
3353
3348
  return;
3354
- ft(r), s = o.TOUCH_DOLLY_PAN;
3349
+ dt(r), c = o.TOUCH_DOLLY_PAN;
3355
3350
  break;
3356
- case He.DOLLY_ROTATE:
3351
+ case Ve.DOLLY_ROTATE:
3357
3352
  if (e.enableZoom === !1 && e.enableRotate === !1)
3358
3353
  return;
3359
- Pt(r), s = o.TOUCH_DOLLY_ROTATE;
3354
+ _t(r), c = o.TOUCH_DOLLY_ROTATE;
3360
3355
  break;
3361
3356
  default:
3362
- s = o.NONE;
3357
+ c = o.NONE;
3363
3358
  }
3364
3359
  break;
3365
3360
  default:
3366
- s = o.NONE;
3361
+ c = o.NONE;
3367
3362
  }
3368
- s !== o.NONE && e.dispatchEvent(Ut);
3363
+ c !== o.NONE && e.dispatchEvent(Ft);
3369
3364
  }
3370
- function Et(r) {
3371
- switch (Ct(r), s) {
3365
+ function bt(r) {
3366
+ switch (yt(r), c) {
3372
3367
  case o.TOUCH_ROTATE:
3373
3368
  if (e.enableRotate === !1)
3374
3369
  return;
3375
- pt(r), e.update();
3370
+ ht(r), e.update();
3376
3371
  break;
3377
3372
  case o.TOUCH_PAN:
3378
3373
  if (e.enablePan === !1)
3379
3374
  return;
3380
- Te(r), e.update();
3375
+ Me(r), e.update();
3381
3376
  break;
3382
3377
  case o.TOUCH_DOLLY_PAN:
3383
3378
  if (e.enableZoom === !1 && e.enablePan === !1)
3384
3379
  return;
3385
- mt(r), e.update();
3380
+ ft(r), e.update();
3386
3381
  break;
3387
3382
  case o.TOUCH_DOLLY_ROTATE:
3388
3383
  if (e.enableZoom === !1 && e.enableRotate === !1)
3389
3384
  return;
3390
- vt(r), e.update();
3385
+ pt(r), e.update();
3391
3386
  break;
3392
3387
  default:
3393
- s = o.NONE;
3388
+ c = o.NONE;
3394
3389
  }
3395
3390
  }
3396
- function Ye(r) {
3391
+ function ze(r) {
3397
3392
  e.enabled !== !1 && r.preventDefault();
3398
3393
  }
3399
- function jt(r) {
3400
- d.push(r.pointerId);
3394
+ function Pt(r) {
3395
+ h.push(r.pointerId);
3401
3396
  }
3402
- function Dt(r) {
3397
+ function kt(r) {
3403
3398
  delete m[r.pointerId];
3404
- for (let y = 0; y < d.length; y++)
3405
- if (d[y] == r.pointerId) {
3406
- d.splice(y, 1);
3399
+ for (let y = 0; y < h.length; y++)
3400
+ if (h[y] == r.pointerId) {
3401
+ h.splice(y, 1);
3407
3402
  return;
3408
3403
  }
3409
3404
  }
3410
- function Ct(r) {
3405
+ function yt(r) {
3411
3406
  let y = m[r.pointerId];
3412
3407
  y === void 0 && (y = new ue(), m[r.pointerId] = y), y.set(r.pageX, r.pageY);
3413
3408
  }
3414
- function Se(r) {
3415
- const y = r.pointerId === d[0] ? d[1] : d[0];
3409
+ function xe(r) {
3410
+ const y = r.pointerId === h[0] ? h[1] : h[0];
3416
3411
  return m[y];
3417
3412
  }
3418
- e.domElement.addEventListener("contextmenu", Ye), e.domElement.addEventListener("pointerdown", _e), e.domElement.addEventListener("pointercancel", Ae), e.domElement.addEventListener("wheel", gt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", yt, { passive: !0, capture: !0 }), this.update();
3413
+ e.domElement.addEventListener("contextmenu", ze), e.domElement.addEventListener("pointerdown", Re), e.domElement.addEventListener("pointercancel", _e), e.domElement.addEventListener("wheel", mt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", gt, { passive: !0, capture: !0 }), this.update();
3419
3414
  }
3420
3415
  }
3421
- const Ot = (t) => {
3416
+ const xt = (t) => {
3422
3417
  const [n, a] = ae(t.options[t.index]), e = () => {
3423
3418
  t.onToggle(!t.open);
3424
- }, o = (s) => {
3425
- s !== n && (t.onSelect(s), a(s)), t.onToggle(!1);
3419
+ }, o = (c) => {
3420
+ c !== n && (t.onSelect(c), a(c)), t.onToggle(!1);
3426
3421
  };
3427
3422
  return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3428
3423
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3429
- t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => o(s), children: s }, s)) })
3424
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => o(c), children: c }, c)) })
3430
3425
  ] });
3431
- }, Le = Sa(function(n, a) {
3432
- const [e, o] = ae(!1), s = n.options.indexOf(n.camera.name);
3426
+ }, Ie = Sa(function(n, a) {
3427
+ const [e, o] = ae(!1), c = n.options.indexOf(n.camera.name);
3433
3428
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3434
3429
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3435
3430
  e && o(!1);
3436
3431
  } }),
3437
3432
  /* @__PURE__ */ l.jsx(
3438
- Ot,
3433
+ xt,
3439
3434
  {
3440
- index: s,
3435
+ index: c,
3441
3436
  open: e,
3442
3437
  options: n.options,
3443
3438
  onSelect: n.onSelect,
@@ -3448,65 +3443,65 @@ const Ot = (t) => {
3448
3443
  }
3449
3444
  )
3450
3445
  ] });
3451
- }), on = [
3446
+ }), rn = [
3452
3447
  "Single",
3453
3448
  "Side by Side",
3454
3449
  "Stacked",
3455
3450
  "Quad"
3456
- ], ne = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), be = /* @__PURE__ */ new Map();
3457
- function Ue(t, n) {
3458
- const a = new Tn(-100, 100, 100, -100, 50, 3e3);
3451
+ ], ne = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), ge = /* @__PURE__ */ new Map();
3452
+ function Be(t, n) {
3453
+ const a = new Mn(-100, 100, 100, -100, 50, 3e3);
3459
3454
  return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
3460
3455
  }
3461
- Ue("Top", new X(0, 1e3, 0));
3462
- Ue("Bottom", new X(0, -1e3, 0));
3463
- Ue("Left", new X(-1e3, 0, 0));
3464
- Ue("Right", new X(1e3, 0, 0));
3465
- Ue("Front", new X(0, 0, 1e3));
3466
- Ue("Back", new X(0, 0, -1e3));
3467
- Ue("Orthographic", new X(1e3, 1e3, 1e3));
3468
- const Rt = new $t(60, 1, 50, 3e3);
3469
- Rt.name = "Debug";
3470
- Rt.position.set(500, 500, 500);
3471
- Rt.lookAt(0, 0, 0);
3472
- ne.set("Debug", Rt);
3473
- const sn = [
3456
+ Be("Top", new X(0, 1e3, 0));
3457
+ Be("Bottom", new X(0, -1e3, 0));
3458
+ Be("Left", new X(-1e3, 0, 0));
3459
+ Be("Right", new X(1e3, 0, 0));
3460
+ Be("Front", new X(0, 0, 1e3));
3461
+ Be("Back", new X(0, 0, -1e3));
3462
+ Be("Orthographic", new X(1e3, 1e3, 1e3));
3463
+ const Mt = new Bt(60, 1, 50, 3e3);
3464
+ Mt.name = "Debug";
3465
+ Mt.position.set(500, 500, 500);
3466
+ Mt.lookAt(0, 0, 0);
3467
+ ne.set("Debug", Mt);
3468
+ const on = [
3474
3469
  "Renderer",
3475
3470
  "Depth",
3476
3471
  "Normals",
3477
3472
  "UVs",
3478
3473
  "Wireframe"
3479
- ], gi = new ma(), bi = new va(), yi = new qa(), Ei = new ga({
3474
+ ], vi = new fa(), gi = new pa(), bi = new Wa(), yi = new ma({
3480
3475
  opacity: 0.33,
3481
3476
  transparent: !0,
3482
3477
  wireframe: !0
3483
3478
  });
3484
- let wt = "Renderer";
3485
- const V = new Rn();
3479
+ let Ct = "Renderer";
3480
+ const V = new Tn();
3486
3481
  V.name = "Debug Scene";
3487
- let ye = new Rn();
3488
- V.add(ye);
3489
- const ut = new ba();
3490
- ut.name = "helpers";
3491
- V.add(ut);
3492
- const Ci = new Va();
3493
- ut.add(Ci);
3494
- const Un = new _n(500);
3495
- Un.name = "axisHelper";
3496
- ut.add(Un);
3497
- const lt = new _n(100);
3498
- lt.name = "interactionHelper";
3499
- ut.add(lt);
3500
- lt.visible = !1;
3501
- let St = !1, G = ne.get("Debug"), oe = ne.get("Orthographic"), Ne = ne.get("Front"), Fe = ne.get("Top"), cn = !1;
3502
- function Ni(t) {
3503
- const [n, a] = ae(t.mode !== void 0 ? t.mode : "Single"), [e, o] = ae(null), [s, p] = ae(!1), [c, u] = ae(!1), [f, v] = ae(!1), [, b] = ae(Date.now()), E = Ee(null), x = Ee(null), M = Ee(null), P = Ee(null), H = Ee(null), B = Ee(null), w = (d, m) => {
3504
- const S = re.get(d.name);
3505
- S !== void 0 && S.dispose(), re.delete(d.name);
3506
- const _ = be.get(d.name);
3507
- _ !== void 0 && (V.remove(_), _.dispose()), be.delete(d.name);
3508
- const Y = new vi(d, m);
3509
- switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, d.name) {
3482
+ let be = new Tn();
3483
+ V.add(be);
3484
+ const ct = new va();
3485
+ ct.name = "helpers";
3486
+ V.add(ct);
3487
+ const Ei = new Ga();
3488
+ ct.add(Ei);
3489
+ const Fn = new Rn(500);
3490
+ Fn.name = "axisHelper";
3491
+ ct.add(Fn);
3492
+ const st = new Rn(100);
3493
+ st.name = "interactionHelper";
3494
+ ct.add(st);
3495
+ st.visible = !1;
3496
+ let St = !1, G = ne.get("Debug"), oe = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), sn = !1;
3497
+ function Fi(t) {
3498
+ const [n, a] = ae(t.mode !== void 0 ? t.mode : "Single"), [e, o] = ae(null), [c, p] = ae(!1), [s, u] = ae(!1), [d, v] = ae(!1), [, b] = ae(Date.now()), E = ye(null), S = ye(null), M = ye(null), P = ye(null), H = ye(null), B = ye(null), x = (h, m) => {
3499
+ const w = re.get(h.name);
3500
+ w !== void 0 && w.dispose(), re.delete(h.name);
3501
+ const _ = ge.get(h.name);
3502
+ _ !== void 0 && (V.remove(_), _.dispose()), ge.delete(h.name);
3503
+ const Y = new mi(h, m);
3504
+ switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, h.name) {
3510
3505
  case "Top":
3511
3506
  case "Bottom":
3512
3507
  case "Left":
@@ -3516,95 +3511,95 @@ function Ni(t) {
3516
3511
  Y.enableRotate = !1;
3517
3512
  break;
3518
3513
  }
3519
- if (re.set(d.name, Y), d instanceof $t) {
3520
- const U = new Ca(d);
3521
- be.set(d.name, U), V.add(U);
3522
- }
3523
- }, z = (d) => {
3524
- const m = be.get(d.name);
3525
- m !== void 0 && (V.remove(m), m.dispose(), be.delete(d.name));
3526
- const S = re.get(d.name);
3527
- S !== void 0 && (S.dispose(), re.delete(d.name));
3528
- }, Ce = () => {
3529
- re.forEach((d, m) => {
3530
- d.dispose();
3531
- const S = be.get(m);
3532
- S !== void 0 && (V.remove(S), S.dispose()), be.delete(m), re.delete(m);
3533
- }), re.clear(), be.clear();
3514
+ if (re.set(h.name, Y), h instanceof Bt) {
3515
+ const U = new ya(h);
3516
+ ge.set(h.name, U), V.add(U);
3517
+ }
3518
+ }, z = (h) => {
3519
+ const m = ge.get(h.name);
3520
+ m !== void 0 && (V.remove(m), m.dispose(), ge.delete(h.name));
3521
+ const w = re.get(h.name);
3522
+ w !== void 0 && (w.dispose(), re.delete(h.name));
3523
+ }, Ee = () => {
3524
+ re.forEach((h, m) => {
3525
+ h.dispose();
3526
+ const w = ge.get(m);
3527
+ w !== void 0 && (V.remove(w), w.dispose()), ge.delete(m), re.delete(m);
3528
+ }), re.clear(), ge.clear();
3534
3529
  }, le = () => {
3535
3530
  switch (n) {
3536
3531
  case "Single":
3537
- w(G, M.current);
3532
+ x(G, M.current);
3538
3533
  break;
3539
3534
  case "Side by Side":
3540
3535
  case "Stacked":
3541
- w(G, M.current), w(oe, P.current);
3536
+ x(G, M.current), x(oe, P.current);
3542
3537
  break;
3543
3538
  case "Quad":
3544
- w(G, M.current), w(oe, P.current), w(Ne, H.current), w(Fe, B.current);
3539
+ x(G, M.current), x(oe, P.current), x(Le, H.current), x(Ne, B.current);
3545
3540
  break;
3546
3541
  }
3547
3542
  };
3548
- Oe(() => {
3549
- const d = new ya({
3543
+ we(() => {
3544
+ const h = new ga({
3550
3545
  canvas: E.current,
3551
3546
  stencil: !1
3552
3547
  });
3553
- d.autoClear = !1, d.shadowMap.enabled = !0, d.setPixelRatio(devicePixelRatio), d.setClearColor(0), o(d);
3554
- }, []), Oe(() => {
3555
- const d = (_) => {
3556
- jn(ye), V.remove(ye);
3548
+ h.autoClear = !1, h.shadowMap.enabled = !0, h.setPixelRatio(devicePixelRatio), h.setClearColor(0), o(h);
3549
+ }, []), we(() => {
3550
+ const h = (_) => {
3551
+ jn(be), V.remove(be);
3557
3552
  const Y = t.scenes.get(_.value.name);
3558
3553
  if (Y !== void 0) {
3559
3554
  const U = new Y();
3560
- t.onSceneSet !== void 0 && t.onSceneSet(U), ye = U, t.three.scene = ye, V.add(ye), cn = !0;
3555
+ t.onSceneSet !== void 0 && t.onSceneSet(U), be = U, t.three.scene = be, V.add(be), sn = !0;
3561
3556
  }
3562
3557
  }, m = (_) => {
3563
3558
  const Y = _.value, U = t.three.scene?.getObjectByProperty("uuid", Y.uuid);
3564
3559
  U !== void 0 && ne.set(Y.name, U), b(Date.now());
3565
- }, S = (_) => {
3560
+ }, w = (_) => {
3566
3561
  ne.delete(_.value.name), b(Date.now());
3567
3562
  };
3568
- return k.addEventListener(j.SET_SCENE, d), k.addEventListener(j.ADD_CAMERA, m), k.addEventListener(j.REMOVE_CAMERA, S), () => {
3569
- k.removeEventListener(j.SET_SCENE, d), k.removeEventListener(j.ADD_CAMERA, m), k.removeEventListener(j.REMOVE_CAMERA, S);
3563
+ return k.addEventListener(j.SET_SCENE, h), k.addEventListener(j.ADD_CAMERA, m), k.addEventListener(j.REMOVE_CAMERA, w), () => {
3564
+ k.removeEventListener(j.SET_SCENE, h), k.removeEventListener(j.ADD_CAMERA, m), k.removeEventListener(j.REMOVE_CAMERA, w);
3570
3565
  };
3571
- }, []), Oe(() => {
3566
+ }, []), we(() => {
3572
3567
  if (e === null)
3573
3568
  return;
3574
- let d = window.innerWidth, m = window.innerHeight, S = Math.floor(d / 2), _ = Math.floor(m / 2), Y = -1;
3569
+ let h = window.innerWidth, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), Y = -1;
3575
3570
  const U = () => {
3576
- d = window.innerWidth - 300, m = window.innerHeight, S = Math.floor(d / 2), _ = Math.floor(m / 2), e.setSize(d, m);
3577
- let T = d, N = m;
3571
+ h = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), e.setSize(h, m);
3572
+ let T = h, N = m;
3578
3573
  switch (n) {
3579
3574
  case "Side by Side":
3580
- T = S, N = m;
3575
+ T = w, N = m;
3581
3576
  break;
3582
3577
  case "Stacked":
3583
- T = d, N = _;
3578
+ T = h, N = _;
3584
3579
  break;
3585
3580
  case "Quad":
3586
- T = S, N = _;
3581
+ T = w, N = _;
3587
3582
  break;
3588
3583
  }
3589
3584
  ne.forEach((J) => {
3590
- J instanceof Tn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof $t && (J.aspect = T / N, J.updateProjectionMatrix(), be.get(J.name)?.update());
3585
+ J instanceof Mn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof Bt && (J.aspect = T / N, J.updateProjectionMatrix(), ge.get(J.name)?.update());
3591
3586
  });
3592
3587
  }, $ = () => {
3593
- e.setViewport(0, 0, d, m), e.setScissor(0, 0, d, m), e.render(V, G);
3588
+ e.setViewport(0, 0, h, m), e.setScissor(0, 0, h, m), e.render(V, G);
3594
3589
  }, I = () => {
3595
3590
  if (n === "Side by Side")
3596
- e.setViewport(0, 0, S, m), e.setScissor(0, 0, S, m), e.render(V, G), e.setViewport(S, 0, S, m), e.setScissor(S, 0, S, m), e.render(V, oe);
3591
+ e.setViewport(0, 0, w, m), e.setScissor(0, 0, w, m), e.render(V, G), e.setViewport(w, 0, w, m), e.setScissor(w, 0, w, m), e.render(V, oe);
3597
3592
  else {
3598
3593
  const T = m - _;
3599
- e.setViewport(0, T, d, _), e.setScissor(0, T, d, _), e.render(V, G), e.setViewport(0, 0, d, _), e.setScissor(0, 0, d, _), e.render(V, oe);
3594
+ e.setViewport(0, T, h, _), e.setScissor(0, T, h, _), e.render(V, G), e.setViewport(0, 0, h, _), e.setScissor(0, 0, h, _), e.render(V, oe);
3600
3595
  }
3601
3596
  }, W = () => {
3602
3597
  let T = 0, N = 0;
3603
- N = m - _, T = 0, e.setViewport(T, N, S, _), e.setScissor(T, N, S, _), e.render(V, G), T = S, e.setViewport(T, N, S, _), e.setScissor(T, N, S, _), e.render(V, oe), N = 0, T = 0, e.setViewport(T, N, S, _), e.setScissor(T, N, S, _), e.render(V, Ne), T = S, e.setViewport(T, N, S, _), e.setScissor(T, N, S, _), e.render(V, Fe);
3598
+ N = m - _, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, G), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, oe), N = 0, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Le), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Ne);
3604
3599
  }, q = () => {
3605
3600
  switch (re.forEach((T) => {
3606
3601
  T.update();
3607
- }), t.onSceneUpdate !== void 0 && cn && t.onSceneUpdate(ye), e.clear(), n) {
3602
+ }), t.onSceneUpdate !== void 0 && sn && t.onSceneUpdate(be), e.clear(), n) {
3608
3603
  case "Single":
3609
3604
  $();
3610
3605
  break;
@@ -3621,21 +3616,21 @@ function Ni(t) {
3621
3616
  return le(), window.addEventListener("resize", U), U(), q(), () => {
3622
3617
  window.removeEventListener("resize", U), cancelAnimationFrame(Y), Y = -1;
3623
3618
  };
3624
- }, [n, e]), Oe(() => {
3619
+ }, [n, e]), we(() => {
3625
3620
  if (e !== null) {
3626
- const d = new Ea(), m = new ue(), S = ($, I, W, q) => {
3621
+ const h = new ba(), m = new ue(), w = ($, I, W, q) => {
3627
3622
  switch (n) {
3628
3623
  case "Quad":
3629
- $ < W ? I < q ? d.setFromCamera(m, G) : d.setFromCamera(m, Ne) : I < q ? d.setFromCamera(m, oe) : d.setFromCamera(m, Fe);
3624
+ $ < W ? I < q ? h.setFromCamera(m, G) : h.setFromCamera(m, Le) : I < q ? h.setFromCamera(m, oe) : h.setFromCamera(m, Ne);
3630
3625
  break;
3631
3626
  case "Side by Side":
3632
- $ < W ? d.setFromCamera(m, G) : d.setFromCamera(m, oe);
3627
+ $ < W ? h.setFromCamera(m, G) : h.setFromCamera(m, oe);
3633
3628
  break;
3634
3629
  case "Single":
3635
- d.setFromCamera(m, G);
3630
+ h.setFromCamera(m, G);
3636
3631
  break;
3637
3632
  case "Stacked":
3638
- I < q ? d.setFromCamera(m, G) : d.setFromCamera(m, oe);
3633
+ I < q ? h.setFromCamera(m, G) : h.setFromCamera(m, oe);
3639
3634
  break;
3640
3635
  }
3641
3636
  }, _ = ($) => {
@@ -3644,11 +3639,11 @@ function Ni(t) {
3644
3639
  const I = new ue();
3645
3640
  e.getSize(I);
3646
3641
  const W = Math.min($.clientX, I.x), q = Math.min($.clientY, I.y);
3647
- m.x = qe(W, 0, I.x, -1, 1), m.y = qe(q, 0, I.y, 1, -1);
3642
+ m.x = We(W, 0, I.x, -1, 1), m.y = We(q, 0, I.y, 1, -1);
3648
3643
  const T = I.x / 2, N = I.y / 2, J = () => {
3649
- W < T ? m.x = qe(W, 0, T, -1, 1) : m.x = qe(W, T, I.x, -1, 1);
3644
+ W < T ? m.x = We(W, 0, T, -1, 1) : m.x = We(W, T, I.x, -1, 1);
3650
3645
  }, me = () => {
3651
- q < N ? m.y = qe(q, 0, N, 1, -1) : m.y = qe(q, N, I.y, 1, -1);
3646
+ q < N ? m.y = We(q, 0, N, 1, -1) : m.y = We(q, N, I.y, 1, -1);
3652
3647
  };
3653
3648
  switch (n) {
3654
3649
  case "Quad":
@@ -3661,9 +3656,9 @@ function Ni(t) {
3661
3656
  me(), me();
3662
3657
  break;
3663
3658
  }
3664
- S(W, q, T, N);
3665
- const xe = d.intersectObjects(ye.children);
3666
- xe.length > 0 && lt.position.copy(xe[0].point);
3659
+ w(W, q, T, N);
3660
+ const Ce = h.intersectObjects(be.children);
3661
+ Ce.length > 0 && st.position.copy(Ce[0].point);
3667
3662
  }, Y = ($) => {
3668
3663
  if (!St)
3669
3664
  return;
@@ -3671,128 +3666,128 @@ function Ni(t) {
3671
3666
  if (e.getSize(I), $.clientX >= I.x)
3672
3667
  return;
3673
3668
  _($);
3674
- const W = d.intersectObjects(ye.children);
3669
+ const W = h.intersectObjects(be.children);
3675
3670
  W.length > 0 && t.three.getObject(W[0].object.uuid);
3676
- }, U = x.current;
3671
+ }, U = S.current;
3677
3672
  return U.addEventListener("mousemove", _, !1), U.addEventListener("click", Y, !1), () => {
3678
3673
  U.removeEventListener("mousemove", _), U.removeEventListener("click", Y);
3679
3674
  };
3680
3675
  }
3681
3676
  }, [n, e]);
3682
3677
  const se = [];
3683
- return ne.forEach((d, m) => {
3678
+ return ne.forEach((h, m) => {
3684
3679
  se.push(m);
3685
3680
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3686
3681
  /* @__PURE__ */ l.jsx("canvas", { ref: E }),
3687
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: x, children: [
3688
- n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (d) => {
3682
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: S, children: [
3683
+ n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
3689
3684
  re.get(G.name)?.dispose();
3690
- const m = ne.get(d);
3691
- m !== void 0 && (z(G), G = m, w(m, M.current));
3685
+ const m = ne.get(h);
3686
+ m !== void 0 && (z(G), G = m, x(m, M.current));
3692
3687
  } }) }),
3693
3688
  (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3694
- /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (d) => {
3689
+ /* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
3695
3690
  re.get(G.name)?.dispose();
3696
- const m = ne.get(d);
3697
- m !== void 0 && (z(G), G = m, w(m, M.current));
3691
+ const m = ne.get(h);
3692
+ m !== void 0 && (z(G), G = m, x(m, M.current));
3698
3693
  } }),
3699
- /* @__PURE__ */ l.jsx(Le, { camera: oe, options: se, ref: P, onSelect: (d) => {
3694
+ /* @__PURE__ */ l.jsx(Ie, { camera: oe, options: se, ref: P, onSelect: (h) => {
3700
3695
  re.get(oe.name)?.dispose();
3701
- const m = ne.get(d);
3702
- m !== void 0 && (z(oe), oe = m, w(m, P.current));
3696
+ const m = ne.get(h);
3697
+ m !== void 0 && (z(oe), oe = m, x(m, P.current));
3703
3698
  } })
3704
3699
  ] }),
3705
3700
  n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3706
- /* @__PURE__ */ l.jsx(Le, { camera: G, options: se, ref: M, onSelect: (d) => {
3701
+ /* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
3707
3702
  re.get(G.name)?.dispose();
3708
- const m = ne.get(d);
3709
- m !== void 0 && (z(G), G = m, w(m, M.current));
3703
+ const m = ne.get(h);
3704
+ m !== void 0 && (z(G), G = m, x(m, M.current));
3710
3705
  } }),
3711
- /* @__PURE__ */ l.jsx(Le, { camera: oe, options: se, ref: P, onSelect: (d) => {
3706
+ /* @__PURE__ */ l.jsx(Ie, { camera: oe, options: se, ref: P, onSelect: (h) => {
3712
3707
  re.get(oe.name)?.dispose();
3713
- const m = ne.get(d);
3714
- m !== void 0 && (z(oe), oe = m, w(m, P.current));
3708
+ const m = ne.get(h);
3709
+ m !== void 0 && (z(oe), oe = m, x(m, P.current));
3715
3710
  } }),
3716
- /* @__PURE__ */ l.jsx(Le, { camera: Ne, options: se, ref: H, onSelect: (d) => {
3717
- re.get(Ne.name)?.dispose();
3718
- const m = ne.get(d);
3719
- m !== void 0 && (z(Ne), Ne = m, w(m, H.current));
3711
+ /* @__PURE__ */ l.jsx(Ie, { camera: Le, options: se, ref: H, onSelect: (h) => {
3712
+ re.get(Le.name)?.dispose();
3713
+ const m = ne.get(h);
3714
+ m !== void 0 && (z(Le), Le = m, x(m, H.current));
3720
3715
  } }),
3721
- /* @__PURE__ */ l.jsx(Le, { camera: Fe, options: se, ref: B, onSelect: (d) => {
3722
- re.get(Fe.name)?.dispose();
3723
- const m = ne.get(d);
3724
- m !== void 0 && (z(Fe), Fe = m, w(m, B.current));
3716
+ /* @__PURE__ */ l.jsx(Ie, { camera: Ne, options: se, ref: B, onSelect: (h) => {
3717
+ re.get(Ne.name)?.dispose();
3718
+ const m = ne.get(h);
3719
+ m !== void 0 && (z(Ne), Ne = m, x(m, B.current));
3725
3720
  } })
3726
3721
  ] })
3727
3722
  ] }),
3728
3723
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3729
3724
  /* @__PURE__ */ l.jsx(
3730
- Ot,
3725
+ xt,
3731
3726
  {
3732
- index: on.indexOf(n),
3733
- options: on,
3734
- onSelect: (d) => {
3735
- d !== n && (Ce(), a(d));
3727
+ index: rn.indexOf(n),
3728
+ options: rn,
3729
+ onSelect: (h) => {
3730
+ h !== n && (Ee(), a(h));
3736
3731
  },
3737
- open: s,
3738
- onToggle: (d) => {
3739
- p(d), c && u(!1), f && v(!1);
3732
+ open: c,
3733
+ onToggle: (h) => {
3734
+ p(h), s && u(!1), d && v(!1);
3740
3735
  }
3741
3736
  }
3742
3737
  ),
3743
3738
  /* @__PURE__ */ l.jsx(
3744
- Ot,
3739
+ xt,
3745
3740
  {
3746
- index: sn.indexOf(wt),
3747
- options: sn,
3748
- onSelect: (d) => {
3749
- if (d !== wt)
3750
- switch (wt = d, wt) {
3741
+ index: on.indexOf(Ct),
3742
+ options: on,
3743
+ onSelect: (h) => {
3744
+ if (h !== Ct)
3745
+ switch (Ct = h, Ct) {
3751
3746
  case "Depth":
3752
- V.overrideMaterial = gi;
3747
+ V.overrideMaterial = vi;
3753
3748
  break;
3754
3749
  case "Normals":
3755
- V.overrideMaterial = bi;
3750
+ V.overrideMaterial = gi;
3756
3751
  break;
3757
3752
  default:
3758
3753
  case "Renderer":
3759
3754
  V.overrideMaterial = null;
3760
3755
  break;
3761
3756
  case "Wireframe":
3762
- V.overrideMaterial = Ei;
3757
+ V.overrideMaterial = yi;
3763
3758
  break;
3764
3759
  case "UVs":
3765
- V.overrideMaterial = yi;
3760
+ V.overrideMaterial = bi;
3766
3761
  break;
3767
3762
  }
3768
3763
  },
3769
- open: c,
3770
- onToggle: (d) => {
3771
- s && p(!1), u(d), f && v(!1);
3764
+ open: s,
3765
+ onToggle: (h) => {
3766
+ c && p(!1), u(h), d && v(!1);
3772
3767
  }
3773
3768
  }
3774
3769
  ),
3775
3770
  /* @__PURE__ */ l.jsx(
3776
- Ot,
3771
+ xt,
3777
3772
  {
3778
3773
  index: 0,
3779
3774
  options: [
3780
3775
  "Orbit Mode",
3781
3776
  "Selection Mode"
3782
3777
  ],
3783
- onSelect: (d) => {
3784
- St = d === "Selection Mode", lt.visible = St;
3778
+ onSelect: (h) => {
3779
+ St = h === "Selection Mode", st.visible = St;
3785
3780
  },
3786
- open: f,
3787
- onToggle: (d) => {
3788
- s && p(!1), c && u(!1), v(d);
3781
+ open: d,
3782
+ onToggle: (h) => {
3783
+ c && p(!1), s && u(!1), v(h);
3789
3784
  }
3790
3785
  }
3791
3786
  )
3792
3787
  ] })
3793
3788
  ] });
3794
3789
  }
3795
- function Fi(t) {
3790
+ function Bi(t) {
3796
3791
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3797
3792
  /* @__PURE__ */ l.jsx("header", { children: t.header }),
3798
3793
  t.children,
@@ -3800,41 +3795,44 @@ function Fi(t) {
3800
3795
  ] });
3801
3796
  }
3802
3797
  export {
3803
- Vt as Accordion,
3798
+ Yt as Accordion,
3804
3799
  Ai as Application,
3805
- Tt as BaseRemote,
3806
- Fn as ChildObject,
3807
- Ka as ContainerObject,
3808
- Ba as Draggable,
3809
- Fa as DraggableItem,
3810
- Ua as Dropdown,
3811
- $a as DropdownItem,
3812
- Fi as Editor,
3813
- Va as InfiniteGridHelper,
3814
- pi as Inspector,
3815
- Ni as MultiView,
3816
- Nn as NavButton,
3800
+ Ot as BaseRemote,
3801
+ Ln as ChildObject,
3802
+ qa as ContainerObject,
3803
+ Fa as Draggable,
3804
+ Na as DraggableItem,
3805
+ Ba as Dropdown,
3806
+ Ua as DropdownItem,
3807
+ Bi as Editor,
3808
+ Ga as InfiniteGridHelper,
3809
+ fi as Inspector,
3810
+ Fi as MultiView,
3811
+ In as NavButton,
3817
3812
  Pi as RemoteComponents,
3818
- Di as RemoteController,
3819
- In as RemoteTheatre,
3820
- ki as RemoteThree,
3821
- ji as RemoteTweakpane,
3822
- Li as SceneInspector,
3823
- Ii as SidePanel,
3813
+ Ii as RemoteController,
3814
+ Ra as RemoteTheatre,
3815
+ ji as RemoteThree,
3816
+ Di as RemoteTweakpane,
3817
+ Ni as SceneInspector,
3818
+ Li as SidePanel,
3824
3819
  j as ToolEvents,
3825
- qa as UVMaterial,
3826
- ct as capitalize,
3820
+ Wa as UVMaterial,
3821
+ ot as capitalize,
3827
3822
  Ti as clamp,
3828
- Ta as colorToHex,
3823
+ Oa as colorToHex,
3829
3824
  k as debugDispatcher,
3825
+ Mi as defaultTheatreCallback,
3830
3826
  jn as dispose,
3831
- _a as disposeMaterial,
3827
+ Ta as disposeMaterial,
3832
3828
  _i as disposeTexture,
3833
3829
  Ri as distance,
3834
3830
  kn as hierarchyUUID,
3835
- Ma as isColor,
3836
- Oa as randomID,
3837
- Ra as resetThreeObjects,
3838
- Nt as round,
3839
- zt as totalThreeObjects
3831
+ wa as isColor,
3832
+ Pn as noop,
3833
+ xa as randomID,
3834
+ Ma as resetThreeObjects,
3835
+ It as round,
3836
+ ki as theatreEditorApp,
3837
+ Ut as totalThreeObjects
3840
3838
  };