@tomorrowevening/hermes 0.0.129 → 0.0.130

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,8 +1,8 @@
1
- import { OrthographicCamera as Li, Scene as Gs, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as Nt, ObjectLoader as Gn, AnimationMixer as Xn, AnimationClip as $n, EventDispatcher as Bi, Texture as qn, RepeatWrapping as cs, Color as et, ColorManagement as mt, WebGLRenderTarget as Kn, FrontSide as Qn, BackSide as Xs, DoubleSide as Vi, NoBlending as Jn, NormalBlending as ea, AdditiveBlending as ta, SubtractiveBlending as ia, MultiplyBlending as sa, CustomBlending as na, AddEquation as aa, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as la, MaxEquation as ca, ZeroFactor as $s, OneFactor as qs, SrcColorFactor as Ks, OneMinusSrcColorFactor as Qs, SrcAlphaFactor as Js, OneMinusSrcAlphaFactor as en, DstAlphaFactor as tn, OneMinusDstAlphaFactor as sn, DstColorFactor as nn, OneMinusDstColorFactor as an, SrcAlphaSaturateFactor as ha, ConstantColorFactor as rn, OneMinusConstantColorFactor as on, ConstantAlphaFactor as ln, OneMinusConstantAlphaFactor as cn, Line as Ie, LineBasicMaterial as Zi, Ray as da, Plane as ua, MathUtils as pa, Vector3 as P, Controls as hn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as ki, Vector2 as pe, ShaderMaterial as dn, GLSL3 as ma, PlaneGeometry as un, Raycaster as ai, Euler as pn, Matrix4 as hi, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Wt, SphereGeometry as mn, TorusGeometry as Et, CatmullRomCurve3 as hs, Group as fa, AxesHelper as ds, MeshDepthMaterial as ga, MeshNormalMaterial as _a, PerspectiveCamera as Ct, WebGLRenderer as va, CameraHelper as ya, SkinnedMesh as ba, SpotLightHelper as Ea, PointLightHelper as Ca, HemisphereLightHelper as Sa, DirectionalLightHelper as wa, Clock as xa, Vector4 as Oa, Box3 as Ta, Sphere as Ma, SkeletonHelper as Pa, SRGBColorSpace as us, NoToneMapping as ps, NoColorSpace as Aa, LinearToneMapping as Da, ReinhardToneMapping as Ra, CineonToneMapping as Ia, ACESFilmicToneMapping as La, AgXToneMapping as ka, NeutralToneMapping as Ua, CustomToneMapping as ja } from "three";
2
- import fn, { useState as Z, useRef as J, useEffect as tt, useMemo as jt, Component as zt, createRef as Ve, forwardRef as Na } from "react";
3
- import { Reorder as gn } from "framer-motion";
1
+ import { OrthographicCamera as Li, Scene as Ws, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as Nt, ObjectLoader as Wn, AnimationMixer as Gn, AnimationClip as Xn, EventDispatcher as Bi, Texture as $n, RepeatWrapping as cs, Color as et, ColorManagement as mt, WebGLRenderTarget as qn, FrontSide as Kn, BackSide as Gs, DoubleSide as Vi, NoBlending as Qn, NormalBlending as Jn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as ia, CustomBlending as sa, AddEquation as na, SubtractEquation as aa, ReverseSubtractEquation as ra, MinEquation as oa, MaxEquation as la, ZeroFactor as Xs, OneFactor as $s, SrcColorFactor as qs, OneMinusSrcColorFactor as Ks, SrcAlphaFactor as Qs, OneMinusSrcAlphaFactor as Js, DstAlphaFactor as en, OneMinusDstAlphaFactor as tn, DstColorFactor as sn, OneMinusDstColorFactor as nn, SrcAlphaSaturateFactor as ca, ConstantColorFactor as an, OneMinusConstantColorFactor as rn, ConstantAlphaFactor as on, OneMinusConstantAlphaFactor as ln, Line as Ie, LineBasicMaterial as Zi, Ray as ha, Plane as da, MathUtils as ua, Vector3 as P, Controls as cn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as ki, Vector2 as pe, ShaderMaterial as hn, GLSL3 as pa, PlaneGeometry as dn, Raycaster as ai, Euler as un, Matrix4 as hi, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Wt, SphereGeometry as pn, TorusGeometry as Et, CatmullRomCurve3 as hs, Group as ma, AxesHelper as fa, MeshDepthMaterial as ga, MeshNormalMaterial as _a, PerspectiveCamera as Ct, WebGLRenderer as va, CameraHelper as ya, SkinnedMesh as ba, SpotLightHelper as Ea, PointLightHelper as Ca, HemisphereLightHelper as Sa, DirectionalLightHelper as wa, Clock as xa, Vector4 as Oa, Box3 as Ta, Sphere as Ma, SkeletonHelper as Pa, SRGBColorSpace as ds, NoToneMapping as us, NoColorSpace as Aa, LinearToneMapping as Da, ReinhardToneMapping as Ra, CineonToneMapping as Ia, ACESFilmicToneMapping as La, AgXToneMapping as ka, NeutralToneMapping as Ua, CustomToneMapping as ja } from "three";
2
+ import mn, { useState as Z, useRef as J, useEffect as tt, useMemo as jt, Component as zt, createRef as Ve, forwardRef as Na } from "react";
3
+ import { Reorder as fn } from "framer-motion";
4
4
  const ri = () => {
5
- }, No = () => {
5
+ }, zo = () => {
6
6
  };
7
7
  function oi(s) {
8
8
  return s.substring(0, 1).toUpperCase() + s.substring(1);
@@ -17,7 +17,7 @@ function za() {
17
17
  function Ha(s) {
18
18
  return s.r !== void 0 && s.g !== void 0 && s.b !== void 0;
19
19
  }
20
- function ms(s) {
20
+ function ps(s) {
21
21
  const e = Math.round(s.r * 255), t = Math.round(s.g * 255), i = Math.round(s.b * 255), n = (c) => {
22
22
  const l = c.toString(16);
23
23
  return l.length === 1 ? "0" + l : l;
@@ -50,11 +50,11 @@ function yi(s, e, t, i) {
50
50
  });
51
51
  }
52
52
  const Ya = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
53
- function fs(s) {
53
+ function ms(s) {
54
54
  return s = s.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1");
55
55
  }
56
- const _n = typeof window > "u", Le = (() => {
57
- if (_n)
56
+ const gn = typeof window > "u", Le = (() => {
57
+ if (gn)
58
58
  return;
59
59
  const { userAgent: s, platform: e, maxTouchPoints: t } = window.navigator, i = /(iphone|ipod|ipad)/i.test(s), n = e === "iPad" || e === "MacIntel" && t > 0 && !window.MSStream;
60
60
  return { isIpad: n, isMobile: /android/i.test(s) || i || n, isSafari12: /Version\/12.+Safari/.test(s), isFirefox: /Firefox/.test(s) };
@@ -94,12 +94,12 @@ function Ba(s, e, t) {
94
94
  let c;
95
95
  return i === "80162181255" ? c = o.filter(([, , l]) => l >= 14) : (c = o.filter(([, l]) => l === i), c.length || (c = o)), c.map(([l]) => `apple ${l} gpu`);
96
96
  }
97
- class gs extends Error {
97
+ class fs extends Error {
98
98
  constructor(e) {
99
99
  super(e), Object.setPrototypeOf(this, new.target.prototype);
100
100
  }
101
101
  }
102
- const bi = [], _s = [];
102
+ const bi = [], gs = [];
103
103
  function Va(s, e) {
104
104
  if (s === e)
105
105
  return 0;
@@ -115,10 +115,10 @@ function Va(s, e) {
115
115
  return n;
116
116
  let o, c, l = 0, d = 0, p = 0;
117
117
  for (; d < i; )
118
- _s[d] = s.charCodeAt(a + d), bi[d] = ++d;
118
+ gs[d] = s.charCodeAt(a + d), bi[d] = ++d;
119
119
  for (; p < n; )
120
120
  for (r = e.charCodeAt(a + p), o = p++, l = p, d = 0; d < i; d++)
121
- c = r === _s[d] ? o : o + 1, o = bi[d], l = bi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
121
+ c = r === gs[d] ? o : o + 1, o = bi[d], l = bi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
122
122
  return l;
123
123
  }
124
124
  function Za(s) {
@@ -126,19 +126,19 @@ function Za(s) {
126
126
  }
127
127
  const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: i, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: r = "https://unpkg.com/detect-gpu@5.0.57/dist/benchmarks" } = {}) => yi(void 0, void 0, void 0, function* () {
128
128
  const a = {};
129
- if (_n)
129
+ if (gn)
130
130
  return { tier: 0, type: "SSR" };
131
131
  const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (S) => yi(void 0, void 0, void 0, function* () {
132
132
  const O = yield fetch(`${r}/${S}`).then((I) => I.json());
133
133
  if (parseInt(O.shift().split(".")[0], 10) < 4)
134
- throw new gs("Detect GPU benchmark data is out of date. Please update to version 4x");
134
+ throw new fs("Detect GPU benchmark data is out of date. Please update to version 4x");
135
135
  return O;
136
136
  }) } = t;
137
137
  let { renderer: p } = t;
138
138
  const m = (S, O, I, U, R) => ({ device: R, fps: U, gpu: I, isMobile: c, tier: S, type: O });
139
139
  let f, w = "";
140
140
  if (p)
141
- p = fs(p), f = [p];
141
+ p = ms(p), f = [p];
142
142
  else {
143
143
  const S = i || function(I, U = !1) {
144
144
  const R = { alpha: !1, antialias: !1, depth: !1, failIfMajorPerformanceCaveat: U, powerPreference: "high-performance", stencil: !1 };
@@ -151,7 +151,7 @@ const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
151
151
  const O = Le?.isFirefox ? null : S.getExtension("WEBGL_debug_renderer_info");
152
152
  if (p = O ? S.getParameter(O.UNMASKED_RENDERER_WEBGL) : S.getParameter(S.RENDERER), !p)
153
153
  return m(1, "FALLBACK");
154
- w = p, p = fs(p), f = function(I, U, R) {
154
+ w = p, p = ms(p), f = function(I, U, R) {
155
155
  return U === "apple gpu" ? Ba(I, U, R) : [U];
156
156
  }(S, p, c);
157
157
  }
@@ -171,7 +171,7 @@ const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
171
171
  try {
172
172
  B = yield R;
173
173
  } catch (W) {
174
- if (W instanceof gs)
174
+ if (W instanceof fs)
175
175
  throw W;
176
176
  return;
177
177
  }
@@ -187,7 +187,7 @@ const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
187
187
  return;
188
188
  const K = S.split(/[.,()\[\]/\s]/g).sort().filter((W, le, Te) => le === 0 || W !== Te[le - 1]).join(" ");
189
189
  let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, Va(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ee = Number.MAX_VALUE;
190
- const { devicePixelRatio: se } = window, je = l.width * se * l.height * se;
190
+ const { devicePixelRatio: ne } = window, je = l.width * ne * l.height * ne;
191
191
  for (const W of he) {
192
192
  const [le, Te] = W, yt = le * Te, it = Math.abs(je - yt);
193
193
  it < Ee && (Ee = it, $ = W);
@@ -212,7 +212,7 @@ const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
212
212
  return m(C, "BENCHMARK", g, x, y);
213
213
  });
214
214
  var Ga = /* @__PURE__ */ ((s) => (s[s.High = 0] = "High", s[s.Medium = 1] = "Medium", s[s.Low = 2] = "Low", s))(Ga || {});
215
- function Fo(s) {
215
+ function Ho(s) {
216
216
  return new Promise((e) => {
217
217
  Wa().then((t) => {
218
218
  let i = !1;
@@ -244,20 +244,20 @@ function Ui(s, e, t) {
244
244
  function Ft(s, e, t) {
245
245
  return s * (1 - t) + e * t;
246
246
  }
247
- function zo(s, e, t, i, n) {
247
+ function Yo(s, e, t, i, n) {
248
248
  return Ft(t, i, Ui(s, e, n));
249
249
  }
250
- function Ho(s, e) {
250
+ function Bo(s, e) {
251
251
  const t = s - e;
252
252
  return Math.sqrt(t * t);
253
253
  }
254
254
  function Pe(s, e = 1) {
255
255
  return Number(s.toFixed(e));
256
256
  }
257
- function Yo(s, e, t, i) {
257
+ function Vo(s, e, t, i) {
258
258
  return Ft(s, e, 1 - Math.exp(-t * i));
259
259
  }
260
- function Bo(s, e = 1) {
260
+ function Zo(s, e = 1) {
261
261
  return Number(s.toFixed(e));
262
262
  }
263
263
  function Xa(s, e, t, i) {
@@ -273,7 +273,7 @@ function Ka(s, e, t, i, n) {
273
273
  const r = s * s;
274
274
  return e * (r * s) + t * r + i * s + n;
275
275
  }
276
- function Vo(s, e, t, i, n) {
276
+ function Wo(s, e, t, i, n) {
277
277
  if (s <= 0)
278
278
  return 0;
279
279
  if (s >= 1)
@@ -289,7 +289,7 @@ function Vo(s, e, t, i, n) {
289
289
  }
290
290
  return Ka(S, g, y, E, C);
291
291
  }
292
- const Zo = (s) => {
292
+ const Go = (s) => {
293
293
  s?.dispose();
294
294
  }, Qa = (s) => {
295
295
  s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
@@ -307,7 +307,7 @@ const Zo = (s) => {
307
307
  }
308
308
  };
309
309
  let ji = 0;
310
- const vs = () => {
310
+ const _s = () => {
311
311
  ji = 0;
312
312
  }, Ni = (s) => {
313
313
  if (!s)
@@ -355,7 +355,7 @@ class ii {
355
355
  }
356
356
  static renderToCanvas(e) {
357
357
  if (this.material === null) {
358
- this.camera = new Li(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Gs(), this.material = new Je();
358
+ this.camera = new Li(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ws(), this.material = new Je();
359
359
  const t = new _t();
360
360
  t.setAttribute("position", new Ke([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ke([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ke([0, 0, 2, 0, 0, 2], 2));
361
361
  const i = new M(t, this.material);
@@ -370,13 +370,13 @@ class ii {
370
370
  return this.renderer.domElement;
371
371
  }
372
372
  }
373
- function Wo(s) {
373
+ function Xo(s) {
374
374
  return new Promise((e) => {
375
- const t = new Gn();
375
+ const t = new Wn();
376
376
  t.parseAsync(s.scene).then((i) => {
377
- const n = new Xn(i);
377
+ const n = new Gn(i);
378
378
  if (s.animations.length > 0) {
379
- const a = s.animations.map((c) => $n.parse(c));
379
+ const a = s.animations.map((c) => Xn.parse(c));
380
380
  n.clipAction(a[0]).play(), n.getRoot().animations = s.animations, n.getRoot().mixer = n;
381
381
  }
382
382
  const r = [];
@@ -456,7 +456,7 @@ function ar(s, e) {
456
456
  const { keyCode: t } = s;
457
457
  nr[t] && (s.preventDefault(), er(s, e));
458
458
  }
459
- const Go = {
459
+ const $o = {
460
460
  contextmenu: ir,
461
461
  mousedown: at,
462
462
  mousemove: at,
@@ -471,7 +471,7 @@ const Go = {
471
471
  keydown: ar
472
472
  };
473
473
  let rr = 0;
474
- class Xo {
474
+ class qo {
475
475
  id;
476
476
  worker;
477
477
  constructor(e, t, i) {
@@ -557,7 +557,7 @@ class or extends Bi {
557
557
  return this;
558
558
  }
559
559
  }
560
- class $o {
560
+ class Ko {
561
561
  targets = {};
562
562
  constructor() {
563
563
  this.handleEvent = this.handleEvent.bind(this);
@@ -573,7 +573,7 @@ class $o {
573
573
  this.targets[e.id]?.handleEvent(e.data);
574
574
  }
575
575
  }
576
- class qo {
576
+ class Qo {
577
577
  components = /* @__PURE__ */ new Map();
578
578
  listen;
579
579
  // Protected
@@ -645,7 +645,7 @@ class Gi {
645
645
  handleEditor(e, t, i) {
646
646
  }
647
647
  }
648
- class Ko extends Gi {
648
+ class Jo extends Gi {
649
649
  selectDropdown(e, t) {
650
650
  this.app.send({
651
651
  event: "selectComponent",
@@ -677,7 +677,7 @@ class Ko extends Gi {
677
677
  }
678
678
  }
679
679
  }
680
- function Qo(s, e, t) {
680
+ function el(s, e, t) {
681
681
  if (s.editor) {
682
682
  t.ui.restore(), t.onSelectionChange((a) => {
683
683
  a.length < 1 || a.forEach((o) => {
@@ -720,7 +720,7 @@ function Qo(s, e, t) {
720
720
  } else
721
721
  t.ui.hide();
722
722
  }
723
- function Jo() {
723
+ function tl() {
724
724
  setTimeout(() => {
725
725
  const s = document.getElementById("theatrejs-studio-root");
726
726
  if (s === null || s.shadowRoot === null)
@@ -762,7 +762,7 @@ function cr(s, e, t) {
762
762
  e.value
763
763
  );
764
764
  }
765
- class el extends Gi {
765
+ class il extends Gi {
766
766
  project;
767
767
  sheets = /* @__PURE__ */ new Map();
768
768
  sheetObjects = /* @__PURE__ */ new Map();
@@ -1153,7 +1153,7 @@ function mr(s, e) {
1153
1153
  for (const t in e)
1154
1154
  s[t] = e[t];
1155
1155
  }
1156
- function ie(s, e, t) {
1156
+ function se(s, e, t) {
1157
1157
  if (s === void 0)
1158
1158
  return;
1159
1159
  const i = e.split("."), n = i.length;
@@ -1197,16 +1197,16 @@ function ie(s, e, t) {
1197
1197
  a != null && mr(a, t);
1198
1198
  }
1199
1199
  }
1200
- function vn(s) {
1200
+ function _n(s) {
1201
1201
  return new Promise((e, t) => {
1202
1202
  const i = new Image();
1203
1203
  i.onload = () => {
1204
- const n = new qn(i);
1204
+ const n = new $n(i);
1205
1205
  n.wrapS = cs, n.wrapT = cs, n.needsUpdate = !0, e(n);
1206
1206
  }, i.onerror = t, i.src = s;
1207
1207
  });
1208
1208
  }
1209
- class tl extends Gi {
1209
+ class sl extends Gi {
1210
1210
  canvas = null;
1211
1211
  // Canvas or OffscreenCanvas
1212
1212
  inputElement = null;
@@ -1351,7 +1351,7 @@ class tl extends Gi {
1351
1351
  addScene(e) {
1352
1352
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
1353
1353
  return;
1354
- vs(), Ni(e);
1354
+ _s(), Ni(e);
1355
1355
  const t = pt(e);
1356
1356
  this.app.send({
1357
1357
  event: "addScene",
@@ -1394,7 +1394,7 @@ class tl extends Gi {
1394
1394
  setScene(e) {
1395
1395
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
1396
1396
  return;
1397
- this.renderer !== void 0 && (ii.renderer = this.renderer), vs(), Ni(e);
1397
+ this.renderer !== void 0 && (ii.renderer = this.renderer), _s(), Ni(e);
1398
1398
  const t = pt(e);
1399
1399
  this.app.send({
1400
1400
  event: "setScene",
@@ -1492,7 +1492,7 @@ class tl extends Gi {
1492
1492
  }
1493
1493
  // Renderer
1494
1494
  addRT(e, t) {
1495
- const i = new Kn(32, 32, t);
1495
+ const i = new qn(32, 32, t);
1496
1496
  i.texture.name = e, this.renderTargets.set(e, i);
1497
1497
  }
1498
1498
  resize(e, t) {
@@ -1526,12 +1526,12 @@ var Fi = { exports: {} }, St = {};
1526
1526
  * This source code is licensed under the MIT license found in the
1527
1527
  * LICENSE file in the root directory of this source tree.
1528
1528
  */
1529
- var ys;
1529
+ var vs;
1530
1530
  function fr() {
1531
- if (ys)
1531
+ if (vs)
1532
1532
  return St;
1533
- ys = 1;
1534
- var s = fn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
1533
+ vs = 1;
1534
+ var s = mn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
1535
1535
  function a(o, c, l) {
1536
1536
  var d, p = {}, m = null, f = null;
1537
1537
  l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
@@ -1554,10 +1554,10 @@ var wt = {};
1554
1554
  * This source code is licensed under the MIT license found in the
1555
1555
  * LICENSE file in the root directory of this source tree.
1556
1556
  */
1557
- var bs;
1557
+ var ys;
1558
1558
  function gr() {
1559
- return bs || (bs = 1, process.env.NODE_ENV !== "production" && function() {
1560
- var s = fn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), w = Symbol.iterator, v = "@@iterator";
1559
+ return ys || (ys = 1, process.env.NODE_ENV !== "production" && function() {
1560
+ var s = mn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), w = Symbol.iterator, v = "@@iterator";
1561
1561
  function x(h) {
1562
1562
  if (h === null || typeof h != "object")
1563
1563
  return null;
@@ -1646,14 +1646,14 @@ function gr() {
1646
1646
  }
1647
1647
  return null;
1648
1648
  }
1649
- var K = Object.assign, $ = 0, Ue, he, Ee, se, je, Ne, Fe;
1649
+ var K = Object.assign, $ = 0, Ue, he, Ee, ne, je, Ne, Fe;
1650
1650
  function W() {
1651
1651
  }
1652
1652
  W.__reactDisabledLog = !0;
1653
1653
  function le() {
1654
1654
  {
1655
1655
  if ($ === 0) {
1656
- Ue = console.log, he = console.info, Ee = console.warn, se = console.error, je = console.group, Ne = console.groupCollapsed, Fe = console.groupEnd;
1656
+ Ue = console.log, he = console.info, Ee = console.warn, ne = console.error, je = console.group, Ne = console.groupCollapsed, Fe = console.groupEnd;
1657
1657
  var h = {
1658
1658
  configurable: !0,
1659
1659
  enumerable: !0,
@@ -1692,7 +1692,7 @@ function gr() {
1692
1692
  value: Ee
1693
1693
  }),
1694
1694
  error: K({}, h, {
1695
- value: se
1695
+ value: ne
1696
1696
  }),
1697
1697
  group: K({}, h, {
1698
1698
  value: je
@@ -1724,8 +1724,8 @@ function gr() {
1724
1724
  }
1725
1725
  var pi = !1, Yt;
1726
1726
  {
1727
- var wn = typeof WeakMap == "function" ? WeakMap : Map;
1728
- Yt = new wn();
1727
+ var Sn = typeof WeakMap == "function" ? WeakMap : Map;
1728
+ Yt = new Sn();
1729
1729
  }
1730
1730
  function $i(h, b) {
1731
1731
  if (!h || pi)
@@ -1777,18 +1777,18 @@ function gr() {
1777
1777
  if (ze && k && typeof ze.stack == "string") {
1778
1778
  for (var N = ze.stack.split(`
1779
1779
  `), fe = k.stack.split(`
1780
- `), te = N.length - 1, ne = fe.length - 1; te >= 1 && ne >= 0 && N[te] !== fe[ne]; )
1781
- ne--;
1782
- for (; te >= 1 && ne >= 0; te--, ne--)
1783
- if (N[te] !== fe[ne]) {
1784
- if (te !== 1 || ne !== 1)
1780
+ `), ie = N.length - 1, ae = fe.length - 1; ie >= 1 && ae >= 0 && N[ie] !== fe[ae]; )
1781
+ ae--;
1782
+ for (; ie >= 1 && ae >= 0; ie--, ae--)
1783
+ if (N[ie] !== fe[ae]) {
1784
+ if (ie !== 1 || ae !== 1)
1785
1785
  do
1786
- if (te--, ne--, ne < 0 || N[te] !== fe[ne]) {
1786
+ if (ie--, ae--, ae < 0 || N[ie] !== fe[ae]) {
1787
1787
  var we = `
1788
- ` + N[te].replace(" at new ", " at ");
1788
+ ` + N[ie].replace(" at new ", " at ");
1789
1789
  return h.displayName && we.includes("<anonymous>") && (we = we.replace("<anonymous>", h.displayName)), typeof h == "function" && Yt.set(h, we), we;
1790
1790
  }
1791
- while (te >= 1 && ne >= 0);
1791
+ while (ie >= 1 && ae >= 0);
1792
1792
  break;
1793
1793
  }
1794
1794
  }
@@ -1798,10 +1798,10 @@ function gr() {
1798
1798
  var nt = h ? h.displayName || h.name : "", ls = nt ? Ht(nt) : "";
1799
1799
  return typeof h == "function" && Yt.set(h, ls), ls;
1800
1800
  }
1801
- function xn(h, b, T) {
1801
+ function wn(h, b, T) {
1802
1802
  return $i(h, !1);
1803
1803
  }
1804
- function On(h) {
1804
+ function xn(h) {
1805
1805
  var b = h.prototype;
1806
1806
  return !!(b && b.isReactComponent);
1807
1807
  }
@@ -1809,7 +1809,7 @@ function gr() {
1809
1809
  if (h == null)
1810
1810
  return "";
1811
1811
  if (typeof h == "function")
1812
- return $i(h, On(h));
1812
+ return $i(h, xn(h));
1813
1813
  if (typeof h == "string")
1814
1814
  return Ht(h);
1815
1815
  switch (h) {
@@ -1821,7 +1821,7 @@ function gr() {
1821
1821
  if (typeof h == "object")
1822
1822
  switch (h.$$typeof) {
1823
1823
  case c:
1824
- return xn(h.render);
1824
+ return wn(h.render);
1825
1825
  case p:
1826
1826
  return Bt(h.type, b, T);
1827
1827
  case m: {
@@ -1842,7 +1842,7 @@ function gr() {
1842
1842
  } else
1843
1843
  Ki.setExtraStackFrame(null);
1844
1844
  }
1845
- function Tn(h, b, T, k, H) {
1845
+ function On(h, b, T, k, H) {
1846
1846
  {
1847
1847
  var G = Function.call.bind(Vt);
1848
1848
  for (var F in h)
@@ -1854,24 +1854,24 @@ function gr() {
1854
1854
  throw fe.name = "Invariant Violation", fe;
1855
1855
  }
1856
1856
  N = h[F](b, F, k, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1857
- } catch (te) {
1858
- N = te;
1857
+ } catch (ie) {
1858
+ N = ie;
1859
1859
  }
1860
1860
  N && !(N instanceof Error) && (Zt(H), y("%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).", k || "React class", T, F, typeof N), Zt(null)), N instanceof Error && !(N.message in qi) && (qi[N.message] = !0, Zt(H), y("Failed %s type: %s", T, N.message), Zt(null));
1861
1861
  }
1862
1862
  }
1863
1863
  }
1864
- var Mn = Array.isArray;
1864
+ var Tn = Array.isArray;
1865
1865
  function mi(h) {
1866
- return Mn(h);
1866
+ return Tn(h);
1867
1867
  }
1868
- function Pn(h) {
1868
+ function Mn(h) {
1869
1869
  {
1870
1870
  var b = typeof Symbol == "function" && Symbol.toStringTag, T = b && h[Symbol.toStringTag] || h.constructor.name || "Object";
1871
1871
  return T;
1872
1872
  }
1873
1873
  }
1874
- function An(h) {
1874
+ function Pn(h) {
1875
1875
  try {
1876
1876
  return Qi(h), !1;
1877
1877
  } catch {
@@ -1882,17 +1882,17 @@ function gr() {
1882
1882
  return "" + h;
1883
1883
  }
1884
1884
  function Ji(h) {
1885
- if (An(h))
1886
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Pn(h)), Qi(h);
1885
+ if (Pn(h))
1886
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Mn(h)), Qi(h);
1887
1887
  }
1888
- var bt = g.ReactCurrentOwner, Dn = {
1888
+ var bt = g.ReactCurrentOwner, An = {
1889
1889
  key: !0,
1890
1890
  ref: !0,
1891
1891
  __self: !0,
1892
1892
  __source: !0
1893
1893
  }, es, ts, fi;
1894
1894
  fi = {};
1895
- function Rn(h) {
1895
+ function Dn(h) {
1896
1896
  if (Vt.call(h, "ref")) {
1897
1897
  var b = Object.getOwnPropertyDescriptor(h, "ref").get;
1898
1898
  if (b && b.isReactWarning)
@@ -1900,7 +1900,7 @@ function gr() {
1900
1900
  }
1901
1901
  return h.ref !== void 0;
1902
1902
  }
1903
- function In(h) {
1903
+ function Rn(h) {
1904
1904
  if (Vt.call(h, "key")) {
1905
1905
  var b = Object.getOwnPropertyDescriptor(h, "key").get;
1906
1906
  if (b && b.isReactWarning)
@@ -1908,13 +1908,13 @@ function gr() {
1908
1908
  }
1909
1909
  return h.key !== void 0;
1910
1910
  }
1911
- function Ln(h, b) {
1911
+ function In(h, b) {
1912
1912
  if (typeof h.ref == "string" && bt.current && b && bt.current.stateNode !== b) {
1913
1913
  var T = re(bt.current.type);
1914
1914
  fi[T] || (y('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', re(bt.current.type), h.ref), fi[T] = !0);
1915
1915
  }
1916
1916
  }
1917
- function kn(h, b) {
1917
+ function Ln(h, b) {
1918
1918
  {
1919
1919
  var T = function() {
1920
1920
  es || (es = !0, y("%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)", b));
@@ -1925,7 +1925,7 @@ function gr() {
1925
1925
  });
1926
1926
  }
1927
1927
  }
1928
- function Un(h, b) {
1928
+ function kn(h, b) {
1929
1929
  {
1930
1930
  var T = function() {
1931
1931
  ts || (ts = !0, y("%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)", b));
@@ -1936,7 +1936,7 @@ function gr() {
1936
1936
  });
1937
1937
  }
1938
1938
  }
1939
- var jn = function(h, b, T, k, H, G, F) {
1939
+ var Un = function(h, b, T, k, H, G, F) {
1940
1940
  var N = {
1941
1941
  // This tag allows us to uniquely identify this as a React Element
1942
1942
  $$typeof: e,
@@ -1965,22 +1965,22 @@ function gr() {
1965
1965
  value: H
1966
1966
  }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
1967
1967
  };
1968
- function Nn(h, b, T, k, H) {
1968
+ function jn(h, b, T, k, H) {
1969
1969
  {
1970
1970
  var G, F = {}, N = null, fe = null;
1971
- T !== void 0 && (Ji(T), N = "" + T), In(b) && (Ji(b.key), N = "" + b.key), Rn(b) && (fe = b.ref, Ln(b, H));
1971
+ T !== void 0 && (Ji(T), N = "" + T), Rn(b) && (Ji(b.key), N = "" + b.key), Dn(b) && (fe = b.ref, In(b, H));
1972
1972
  for (G in b)
1973
- Vt.call(b, G) && !Dn.hasOwnProperty(G) && (F[G] = b[G]);
1973
+ Vt.call(b, G) && !An.hasOwnProperty(G) && (F[G] = b[G]);
1974
1974
  if (h && h.defaultProps) {
1975
- var te = h.defaultProps;
1976
- for (G in te)
1977
- F[G] === void 0 && (F[G] = te[G]);
1975
+ var ie = h.defaultProps;
1976
+ for (G in ie)
1977
+ F[G] === void 0 && (F[G] = ie[G]);
1978
1978
  }
1979
1979
  if (N || fe) {
1980
- var ne = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1981
- N && kn(F, ne), fe && Un(F, ne);
1980
+ var ae = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1981
+ N && Ln(F, ae), fe && kn(F, ae);
1982
1982
  }
1983
- return jn(h, N, fe, H, k, bt.current, F);
1983
+ return Un(h, N, fe, H, k, bt.current, F);
1984
1984
  }
1985
1985
  }
1986
1986
  var gi = g.ReactCurrentOwner, is = g.ReactDebugCurrentFrame;
@@ -2008,7 +2008,7 @@ Check the render method of \`` + h + "`.";
2008
2008
  return "";
2009
2009
  }
2010
2010
  }
2011
- function Fn(h) {
2011
+ function Nn(h) {
2012
2012
  {
2013
2013
  if (h !== void 0) {
2014
2014
  var b = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
@@ -2020,7 +2020,7 @@ Check your code at ` + b + ":" + T + ".";
2020
2020
  }
2021
2021
  }
2022
2022
  var ns = {};
2023
- function zn(h) {
2023
+ function Fn(h) {
2024
2024
  {
2025
2025
  var b = ss();
2026
2026
  if (!b) {
@@ -2037,7 +2037,7 @@ Check the top-level render call using <` + T + ">.");
2037
2037
  if (!h._store || h._store.validated || h.key != null)
2038
2038
  return;
2039
2039
  h._store.validated = !0;
2040
- var T = zn(b);
2040
+ var T = Fn(b);
2041
2041
  if (ns[T])
2042
2042
  return;
2043
2043
  ns[T] = !0;
@@ -2064,7 +2064,7 @@ Check the top-level render call using <` + T + ">.");
2064
2064
  }
2065
2065
  }
2066
2066
  }
2067
- function Hn(h) {
2067
+ function zn(h) {
2068
2068
  {
2069
2069
  var b = h.type;
2070
2070
  if (b == null || typeof b == "string")
@@ -2080,7 +2080,7 @@ Check the top-level render call using <` + T + ">.");
2080
2080
  return;
2081
2081
  if (T) {
2082
2082
  var k = re(b);
2083
- Tn(T, h.props, "prop", k, h);
2083
+ On(T, h.props, "prop", k, h);
2084
2084
  } else if (b.PropTypes !== void 0 && !_i) {
2085
2085
  _i = !0;
2086
2086
  var H = re(b);
@@ -2089,7 +2089,7 @@ Check the top-level render call using <` + T + ">.");
2089
2089
  typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2090
2090
  }
2091
2091
  }
2092
- function Yn(h) {
2092
+ function Hn(h) {
2093
2093
  {
2094
2094
  for (var b = Object.keys(h.props), T = 0; T < b.length; T++) {
2095
2095
  var k = b[T];
@@ -2107,14 +2107,14 @@ Check the top-level render call using <` + T + ">.");
2107
2107
  if (!F) {
2108
2108
  var N = "";
2109
2109
  (h === void 0 || typeof h == "object" && h !== null && Object.keys(h).length === 0) && (N += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
2110
- var fe = Fn(H);
2110
+ var fe = Nn(H);
2111
2111
  fe ? N += fe : N += ss();
2112
- var te;
2113
- h === null ? te = "null" : mi(h) ? te = "array" : h !== void 0 && h.$$typeof === e ? (te = "<" + (re(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : te = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", te, N);
2112
+ var ie;
2113
+ h === null ? ie = "null" : mi(h) ? ie = "array" : h !== void 0 && h.$$typeof === e ? (ie = "<" + (re(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, N);
2114
2114
  }
2115
- var ne = Nn(h, b, T, H, G);
2116
- if (ne == null)
2117
- return ne;
2115
+ var ae = jn(h, b, T, H, G);
2116
+ if (ae == null)
2117
+ return ae;
2118
2118
  if (F) {
2119
2119
  var we = b.children;
2120
2120
  if (we !== void 0)
@@ -2128,22 +2128,22 @@ Check the top-level render call using <` + T + ">.");
2128
2128
  else
2129
2129
  rs(we, h);
2130
2130
  }
2131
- return h === i ? Yn(ne) : Hn(ne), ne;
2131
+ return h === i ? Hn(ae) : zn(ae), ae;
2132
2132
  }
2133
2133
  }
2134
- function Bn(h, b, T) {
2134
+ function Yn(h, b, T) {
2135
2135
  return os(h, b, T, !0);
2136
2136
  }
2137
- function Vn(h, b, T) {
2137
+ function Bn(h, b, T) {
2138
2138
  return os(h, b, T, !1);
2139
2139
  }
2140
- var Zn = Vn, Wn = Bn;
2141
- wt.Fragment = i, wt.jsx = Zn, wt.jsxs = Wn;
2140
+ var Vn = Bn, Zn = Yn;
2141
+ wt.Fragment = i, wt.jsx = Vn, wt.jsxs = Zn;
2142
2142
  }()), wt;
2143
2143
  }
2144
2144
  process.env.NODE_ENV === "production" ? Fi.exports = fr() : Fi.exports = gr();
2145
2145
  var u = Fi.exports;
2146
- function yn(s) {
2146
+ function vn(s) {
2147
2147
  return s.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ u.jsx("button", { children: s.title });
2148
2148
  }
2149
2149
  const _r = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
@@ -2159,7 +2159,7 @@ C11,8.22,10.74,8,10.43,8z`
2159
2159
  }
2160
2160
  ) });
2161
2161
  function yr(s) {
2162
- return /* @__PURE__ */ u.jsx(gn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
2162
+ return /* @__PURE__ */ u.jsx(fn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
2163
2163
  vr,
2164
2164
  /* @__PURE__ */ u.jsx("span", { children: s.title }),
2165
2165
  /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
@@ -2179,8 +2179,8 @@ function br(s) {
2179
2179
  });
2180
2180
  let c = "dropdown draggable";
2181
2181
  return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2182
- /* @__PURE__ */ u.jsx(yn, { title: s.title }),
2183
- /* @__PURE__ */ u.jsx(gn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
2182
+ /* @__PURE__ */ u.jsx(vn, { title: s.title }),
2183
+ /* @__PURE__ */ u.jsx(fn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
2184
2184
  ] });
2185
2185
  }
2186
2186
  function Er(s) {
@@ -2196,7 +2196,7 @@ function Er(s) {
2196
2196
  onMouseEnter: () => t(!0),
2197
2197
  onMouseLeave: () => t(!1),
2198
2198
  children: [
2199
- /* @__PURE__ */ u.jsx(yn, { title: s.title }),
2199
+ /* @__PURE__ */ u.jsx(vn, { title: s.title }),
2200
2200
  /* @__PURE__ */ u.jsx(
2201
2201
  "ul",
2202
2202
  {
@@ -2250,7 +2250,7 @@ function Cr(s) {
2250
2250
  }
2251
2251
  return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, za());
2252
2252
  }
2253
- function il(s, e, t) {
2253
+ function nl(s, e, t) {
2254
2254
  function i(r) {
2255
2255
  switch (e.forEach((a) => {
2256
2256
  a.callback(s, a.remote, r);
@@ -2306,10 +2306,10 @@ function li(s) {
2306
2306
  /* @__PURE__ */ u.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: s.children }) }, Math.random())
2307
2307
  ] });
2308
2308
  }
2309
- function bn(s) {
2309
+ function yn(s) {
2310
2310
  const e = J(null), [t, i] = Z(!1), n = s.child !== void 0 && s.child.children.length > 0, r = [];
2311
2311
  return s.child !== void 0 && s.child.children.length > 0 && s.child.children.map((a, o) => {
2312
- r.push(/* @__PURE__ */ u.jsx(bn, { child: a, three: s.three }, o));
2312
+ r.push(/* @__PURE__ */ u.jsx(yn, { child: a, three: s.three }, o));
2313
2313
  }), tt(() => {
2314
2314
  if (s.child) {
2315
2315
  const a = s.three.getScene(s.child.uuid);
@@ -2357,7 +2357,7 @@ function bn(s) {
2357
2357
  const o = a.getObjectByProperty("uuid", s.child.uuid);
2358
2358
  if (o !== void 0) {
2359
2359
  const c = "visible", l = !o.visible;
2360
- e.current.style.opacity = l ? "1" : "0.25", s.three.updateObject(s.child.uuid, c, l), ie(o, c, l);
2360
+ e.current.style.opacity = l ? "1" : "0.25", s.three.updateObject(s.child.uuid, c, l), se(o, c, l);
2361
2361
  }
2362
2362
  }
2363
2363
  }
@@ -2369,10 +2369,10 @@ function bn(s) {
2369
2369
  /* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
2370
2370
  ] }, Math.random()) });
2371
2371
  }
2372
- function Es(s) {
2372
+ function bs(s) {
2373
2373
  const e = [];
2374
2374
  return s.child?.children.map((t, i) => {
2375
- e.push(/* @__PURE__ */ u.jsx(bn, { child: t, scene: s.scene, three: s.three }, i));
2375
+ e.push(/* @__PURE__ */ u.jsx(yn, { child: t, scene: s.scene, three: s.three }, i));
2376
2376
  }), /* @__PURE__ */ u.jsx("div", { className: `scene ${s.class !== void 0 ? s.class : ""}`, children: e });
2377
2377
  }
2378
2378
  function It(s) {
@@ -2623,7 +2623,7 @@ function zi(s) {
2623
2623
  function Or(s) {
2624
2624
  return s * xr;
2625
2625
  }
2626
- function Cs(s) {
2626
+ function Es(s) {
2627
2627
  const e = s.value.x !== void 0 && s.value.y !== void 0 && s.value.z !== void 0, t = s.value.isEuler !== void 0, i = s.value.elements !== void 0, n = s.step !== void 0 ? s.step : 0.01, r = [];
2628
2628
  if (t) {
2629
2629
  const a = jt(() => s.value, []);
@@ -2712,7 +2712,7 @@ function Tr(s) {
2712
2712
  /* @__PURE__ */ u.jsx(
2713
2713
  Qe,
2714
2714
  {
2715
- value: n.x,
2715
+ value: n[o],
2716
2716
  type: "number",
2717
2717
  prop: o,
2718
2718
  step: t,
@@ -3005,7 +3005,7 @@ function di(s) {
3005
3005
  }
3006
3006
  return s;
3007
3007
  }
3008
- function En(s) {
3008
+ function bn(s) {
3009
3009
  const e = s.toLowerCase();
3010
3010
  return e.search("intensity") > -1 || e === "anisotropyrotation" || e === "blendalpha" || e === "bumpscale" || e === "clearcoatroughness" || e === "displacementbias" || e === "displacementscale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionratio" || e === "roughness" || e === "sheenroughness";
3011
3011
  }
@@ -3027,11 +3027,11 @@ function Ar() {
3027
3027
  const Dr = [
3028
3028
  {
3029
3029
  title: "Front",
3030
- value: Qn
3030
+ value: Kn
3031
3031
  },
3032
3032
  {
3033
3033
  title: "Back",
3034
- value: Xs
3034
+ value: Gs
3035
3035
  },
3036
3036
  {
3037
3037
  title: "Double",
@@ -3040,166 +3040,166 @@ const Dr = [
3040
3040
  ], Rr = [
3041
3041
  {
3042
3042
  title: "No Blending",
3043
- value: Jn
3043
+ value: Qn
3044
3044
  },
3045
3045
  {
3046
3046
  title: "Normal",
3047
- value: ea
3047
+ value: Jn
3048
3048
  },
3049
3049
  {
3050
3050
  title: "Additive",
3051
- value: ta
3051
+ value: ea
3052
3052
  },
3053
3053
  {
3054
3054
  title: "Subtractive",
3055
- value: ia
3055
+ value: ta
3056
3056
  },
3057
3057
  {
3058
3058
  title: "Multiply",
3059
- value: sa
3059
+ value: ia
3060
3060
  },
3061
3061
  {
3062
3062
  title: "Custom",
3063
- value: na
3063
+ value: sa
3064
3064
  }
3065
3065
  ], Ir = [
3066
3066
  {
3067
3067
  title: "Add",
3068
- value: aa
3068
+ value: na
3069
3069
  },
3070
3070
  {
3071
3071
  title: "Subtract",
3072
- value: ra
3072
+ value: aa
3073
3073
  },
3074
3074
  {
3075
3075
  title: "Reverse Subtract",
3076
- value: oa
3076
+ value: ra
3077
3077
  },
3078
3078
  {
3079
3079
  title: "Min",
3080
- value: la
3080
+ value: oa
3081
3081
  },
3082
3082
  {
3083
3083
  title: "Max",
3084
- value: ca
3084
+ value: la
3085
3085
  }
3086
3086
  ], Lr = [
3087
3087
  {
3088
3088
  title: "Zero",
3089
- value: $s
3089
+ value: Xs
3090
3090
  },
3091
3091
  {
3092
3092
  title: "One",
3093
- value: qs
3093
+ value: $s
3094
3094
  },
3095
3095
  {
3096
3096
  title: "Src Color",
3097
- value: Ks
3097
+ value: qs
3098
3098
  },
3099
3099
  {
3100
3100
  title: "One Minus Src Color",
3101
- value: Qs
3101
+ value: Ks
3102
3102
  },
3103
3103
  {
3104
3104
  title: "Src Alpha",
3105
- value: Js
3105
+ value: Qs
3106
3106
  },
3107
3107
  {
3108
3108
  title: "One Minus Src Alpha",
3109
- value: en
3109
+ value: Js
3110
3110
  },
3111
3111
  {
3112
3112
  title: "Dst Alpha",
3113
- value: tn
3113
+ value: en
3114
3114
  },
3115
3115
  {
3116
3116
  title: "One Minus Dst Alpha",
3117
- value: sn
3117
+ value: tn
3118
3118
  },
3119
3119
  {
3120
3120
  title: "Dst Color",
3121
- value: nn
3121
+ value: sn
3122
3122
  },
3123
3123
  {
3124
3124
  title: "One Minus Dst Color",
3125
- value: an
3125
+ value: nn
3126
3126
  },
3127
3127
  {
3128
3128
  title: "Src Alpha Saturate",
3129
- value: ha
3129
+ value: ca
3130
3130
  },
3131
3131
  {
3132
3132
  title: "Constant Color",
3133
- value: rn
3133
+ value: an
3134
3134
  },
3135
3135
  {
3136
3136
  title: "One Minus Constant Color",
3137
- value: on
3137
+ value: rn
3138
3138
  },
3139
3139
  {
3140
3140
  title: "Constant Alpha",
3141
- value: ln
3141
+ value: on
3142
3142
  },
3143
3143
  {
3144
3144
  title: "One Minus Constant Alpha",
3145
- value: cn
3145
+ value: ln
3146
3146
  }
3147
3147
  ], kr = [
3148
3148
  {
3149
3149
  title: "Zero",
3150
- value: $s
3150
+ value: Xs
3151
3151
  },
3152
3152
  {
3153
3153
  title: "One",
3154
- value: qs
3154
+ value: $s
3155
3155
  },
3156
3156
  {
3157
3157
  title: "Src Color",
3158
- value: Ks
3158
+ value: qs
3159
3159
  },
3160
3160
  {
3161
3161
  title: "One Minus Src Color",
3162
- value: Qs
3162
+ value: Ks
3163
3163
  },
3164
3164
  {
3165
3165
  title: "Src Alpha",
3166
- value: Js
3166
+ value: Qs
3167
3167
  },
3168
3168
  {
3169
3169
  title: "One Minus Src Alpha",
3170
- value: en
3170
+ value: Js
3171
3171
  },
3172
3172
  {
3173
3173
  title: "Dst Alpha",
3174
- value: tn
3174
+ value: en
3175
3175
  },
3176
3176
  {
3177
3177
  title: "One Minus Dst Alpha",
3178
- value: sn
3178
+ value: tn
3179
3179
  },
3180
3180
  {
3181
3181
  title: "Dst Color",
3182
- value: nn
3182
+ value: sn
3183
3183
  },
3184
3184
  {
3185
3185
  title: "One Minus Dst Color",
3186
- value: an
3186
+ value: nn
3187
3187
  },
3188
3188
  {
3189
3189
  title: "Constant Color",
3190
- value: rn
3190
+ value: an
3191
3191
  },
3192
3192
  {
3193
3193
  title: "One Minus Constant Color",
3194
- value: on
3194
+ value: rn
3195
3195
  },
3196
3196
  {
3197
3197
  title: "Constant Alpha",
3198
- value: ln
3198
+ value: on
3199
3199
  },
3200
3200
  {
3201
3201
  title: "One Minus Constant Alpha",
3202
- value: cn
3202
+ value: ln
3203
3203
  }
3204
3204
  ];
3205
3205
  function xt(s, e) {
@@ -3217,7 +3217,7 @@ function Ur(s, e, t, i) {
3217
3217
  const a = i.getScene(t.uuid);
3218
3218
  if (a !== null) {
3219
3219
  const o = a.getObjectByProperty("uuid", t.uuid);
3220
- ie(o, `material.${s}`, r);
3220
+ se(o, `material.${s}`, r);
3221
3221
  }
3222
3222
  }
3223
3223
  };
@@ -3237,7 +3237,7 @@ function jr(s, e, t, i) {
3237
3237
  const o = i.getScene(t.uuid);
3238
3238
  if (o !== null) {
3239
3239
  const c = o.getObjectByProperty("uuid", t.uuid);
3240
- ie(c, `material.${s}`, a);
3240
+ se(c, `material.${s}`, a);
3241
3241
  }
3242
3242
  }
3243
3243
  };
@@ -3258,7 +3258,7 @@ function jr(s, e, t, i) {
3258
3258
  xt(n, Dr);
3259
3259
  break;
3260
3260
  }
3261
- return En(s) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
3261
+ return bn(s) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
3262
3262
  }
3263
3263
  function Nr(s, e, t, i) {
3264
3264
  const n = {
@@ -3272,7 +3272,7 @@ function Nr(s, e, t, i) {
3272
3272
  const c = i.getScene(t.uuid);
3273
3273
  if (c !== null) {
3274
3274
  const l = c.getObjectByProperty("uuid", t.uuid);
3275
- ie(l, `material.${s}`, o);
3275
+ se(l, `material.${s}`, o);
3276
3276
  }
3277
3277
  },
3278
3278
  onKeyDown: (a) => {
@@ -3283,7 +3283,7 @@ function Nr(s, e, t, i) {
3283
3283
  const c = i.getScene(t.uuid);
3284
3284
  if (c !== null) {
3285
3285
  const l = c.getObjectByProperty("uuid", t.uuid);
3286
- ie(l, `material.${s}`, o);
3286
+ se(l, `material.${s}`, o);
3287
3287
  }
3288
3288
  }, n.onKeyDown = (a) => {
3289
3289
  if (a.key === "Enter" && (a.altKey || a.metaKey)) {
@@ -3291,7 +3291,7 @@ function Nr(s, e, t, i) {
3291
3291
  const o = i.getScene(t.uuid);
3292
3292
  if (o !== null) {
3293
3293
  const c = o.getObjectByProperty("uuid", t.uuid);
3294
- ie(c, "material.needsUpdate", !0);
3294
+ se(c, "material.needsUpdate", !0);
3295
3295
  }
3296
3296
  }
3297
3297
  }), n;
@@ -3322,7 +3322,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3322
3322
  const p = i.getScene(t.uuid);
3323
3323
  if (p !== null) {
3324
3324
  const m = p.getObjectByProperty("uuid", t.uuid);
3325
- ie(m, `material.${o}`, d);
3325
+ se(m, `material.${o}`, d);
3326
3326
  }
3327
3327
  }
3328
3328
  };
@@ -3339,11 +3339,11 @@ function Lt(s, e, t, i, n = "", r = !1) {
3339
3339
  const m = i.getScene(t.uuid);
3340
3340
  if (m !== null) {
3341
3341
  const f = m.getObjectByProperty("uuid", t.uuid);
3342
- ie(f, `material.${o}`, p);
3342
+ se(f, `material.${o}`, p);
3343
3343
  }
3344
3344
  }
3345
3345
  };
3346
- return En(a) && (l.type = "range", l.min = 0, l.max = 1), l;
3346
+ return bn(a) && (l.type = "range", l.min = 0, l.max = 1), l;
3347
3347
  } else {
3348
3348
  if (e.isColor)
3349
3349
  return {
@@ -3358,7 +3358,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3358
3358
  const m = i.getScene(t.uuid);
3359
3359
  if (m !== null) {
3360
3360
  const f = m.getObjectByProperty("uuid", t.uuid);
3361
- ie(f, `material.${o}`, p);
3361
+ se(f, `material.${o}`, p);
3362
3362
  }
3363
3363
  }
3364
3364
  };
@@ -3392,7 +3392,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3392
3392
  const p = i.getScene(t.uuid);
3393
3393
  if (p !== null) {
3394
3394
  const m = p.getObjectByProperty("uuid", t.uuid);
3395
- ie(m, `material.${o}`, d);
3395
+ se(m, `material.${o}`, d);
3396
3396
  }
3397
3397
  }
3398
3398
  };
@@ -3408,7 +3408,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3408
3408
  const p = i.getScene(t.uuid);
3409
3409
  if (p !== null) {
3410
3410
  const m = p.getObjectByProperty("uuid", t.uuid);
3411
- ie(m, `material.${o}`, d);
3411
+ se(m, `material.${o}`, d);
3412
3412
  }
3413
3413
  }
3414
3414
  };
@@ -3424,7 +3424,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3424
3424
  const p = i.getScene(t.uuid);
3425
3425
  if (p !== null) {
3426
3426
  const m = p.getObjectByProperty("uuid", t.uuid);
3427
- ie(m, `material.${o}`, d);
3427
+ se(m, `material.${o}`, d);
3428
3428
  }
3429
3429
  }
3430
3430
  };
@@ -3440,7 +3440,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3440
3440
  const p = i.getScene(t.uuid);
3441
3441
  if (p !== null) {
3442
3442
  const m = p.getObjectByProperty("uuid", t.uuid);
3443
- ie(m, `material.${o}`, d);
3443
+ se(m, `material.${o}`, d);
3444
3444
  }
3445
3445
  }
3446
3446
  };
@@ -3478,7 +3478,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3478
3478
  }
3479
3479
  g.needsUpdate = !0;
3480
3480
  };
3481
- d.src.length > 0 ? vn(d.src).then((x) => {
3481
+ d.src.length > 0 ? _n(d.src).then((x) => {
3482
3482
  x.offset.set(d.offset[0], d.offset[1]), x.repeat.set(d.repeat[0], d.repeat[1]), v(x);
3483
3483
  }) : v(null);
3484
3484
  }
@@ -3497,7 +3497,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3497
3497
  const p = i.getScene(t.uuid);
3498
3498
  if (p !== null) {
3499
3499
  const m = p.getObjectByProperty("uuid", t.uuid);
3500
- ie(m, `material.${o}`, d);
3500
+ se(m, `material.${o}`, d);
3501
3501
  }
3502
3502
  }
3503
3503
  };
@@ -3527,7 +3527,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
3527
3527
  }
3528
3528
  }
3529
3529
  }
3530
- function Ss(s, e, t) {
3530
+ function Cs(s, e, t) {
3531
3531
  const i = [];
3532
3532
  for (const n in s) {
3533
3533
  if (!Mr(n))
@@ -3553,7 +3553,7 @@ function Ss(s, e, t) {
3553
3553
  const n = t.getScene(e.uuid);
3554
3554
  if (n !== null) {
3555
3555
  const r = n.getObjectByProperty("uuid", e.uuid);
3556
- ie(r, "material.needsUpdate", !0);
3556
+ se(r, "material.needsUpdate", !0);
3557
3557
  }
3558
3558
  }
3559
3559
  }), i;
@@ -3575,7 +3575,7 @@ function Yr(s, e) {
3575
3575
  Oe,
3576
3576
  {
3577
3577
  title: `Material ${l}`,
3578
- items: Ss(a[l], s, e)
3578
+ items: Cs(a[l], s, e)
3579
3579
  },
3580
3580
  `Material ${l}`
3581
3581
  )
@@ -3586,7 +3586,7 @@ function Yr(s, e) {
3586
3586
  Oe,
3587
3587
  {
3588
3588
  title: "Material",
3589
- items: Ss(a, s, e),
3589
+ items: Cs(a, s, e),
3590
3590
  expanded: n,
3591
3591
  onToggle: (o) => {
3592
3592
  r(o);
@@ -3594,7 +3594,7 @@ function Yr(s, e) {
3594
3594
  }
3595
3595
  );
3596
3596
  }
3597
- const ws = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
3597
+ const Ss = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
3598
3598
  function Br(s) {
3599
3599
  const e = s.step !== void 0 ? s.step : 0.01, t = J(null), i = J(null), n = J(null), r = J(null), a = J(null), [o] = Z(s.value), [c, l] = Z(s.value.offset[0]), [d, p] = Z(s.value.offset[1]), [m, f] = Z(s.value.repeat[0]), [w, v] = Z(s.value.repeat[1]);
3600
3600
  function x(y, E, C, S, O) {
@@ -3629,7 +3629,7 @@ function Br(s) {
3629
3629
  Ar().then((y) => {
3630
3630
  t.current.src = y, x(y, c, d, m, w);
3631
3631
  });
3632
- }, src: o.src.length > 0 ? o.src : ws }),
3632
+ }, src: o.src.length > 0 ? o.src : Ss }),
3633
3633
  /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
3634
3634
  /* @__PURE__ */ u.jsxs("div", { children: [
3635
3635
  /* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
@@ -3678,14 +3678,14 @@ function Br(s) {
3678
3678
  )
3679
3679
  ] }),
3680
3680
  /* @__PURE__ */ u.jsx("button", { onClick: () => {
3681
- x("", c, d, m, w), t.current.src = ws;
3681
+ x("", c, d, m, w), t.current.src = Ss;
3682
3682
  }, children: "Clear" })
3683
3683
  ] })
3684
3684
  ] });
3685
3685
  }
3686
3686
  function si(s) {
3687
3687
  let e = s.value;
3688
- e !== void 0 && (e.isColor !== void 0 ? e = ms(s.value) : s.type === "color" && (e = ms(new et().setStyle(s.value, Nt))));
3688
+ e !== void 0 && (e.isColor !== void 0 ? e = ps(s.value) : s.type === "color" && (e = ps(new et().setStyle(s.value, Nt))));
3689
3689
  const [t, i] = Z(e), n = J(null), r = (l) => {
3690
3690
  let d = l.target.value;
3691
3691
  if (s.type === "boolean")
@@ -3778,9 +3778,9 @@ function si(s) {
3778
3778
  s.type === "image" && /* @__PURE__ */ u.jsx(Br, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3779
3779
  s.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: r, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((l, d) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: oi(l.title) }, d)) }) }),
3780
3780
  s.type === "vector2" && /* @__PURE__ */ u.jsx(Sr, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
3781
- s.type === "grid3" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r }),
3781
+ s.type === "grid3" && /* @__PURE__ */ u.jsx(Es, { step: s.step, value: t, onChange: r }),
3782
3782
  s.type === "grid4" && /* @__PURE__ */ u.jsx(Tr, { step: s.step, value: t, onChange: r }),
3783
- s.type === "euler" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r })
3783
+ s.type === "euler" && /* @__PURE__ */ u.jsx(Es, { step: s.step, value: t, onChange: r })
3784
3784
  ] });
3785
3785
  }
3786
3786
  function Vr(s) {
@@ -3881,19 +3881,19 @@ class Oe extends zt {
3881
3881
  );
3882
3882
  }
3883
3883
  }
3884
- class ae extends zt {
3884
+ class te extends zt {
3885
3885
  static instance;
3886
3886
  static groups = [];
3887
3887
  static groupsRefs = [];
3888
3888
  static groupTitles = [];
3889
3889
  constructor(e) {
3890
- super(e), this.state = { lastUpdate: Date.now() }, ae.instance = this, D.addEventListener(A.ADD_GROUP, this.addGroup), D.addEventListener(A.REMOVE_GROUP, this.removeGroup);
3890
+ super(e), this.state = { lastUpdate: Date.now() }, te.instance = this, D.addEventListener(A.ADD_GROUP, this.addGroup), D.addEventListener(A.REMOVE_GROUP, this.removeGroup);
3891
3891
  }
3892
3892
  componentWillUnmount() {
3893
3893
  D.removeEventListener(A.ADD_GROUP, this.addGroup), D.removeEventListener(A.REMOVE_GROUP, this.removeGroup);
3894
3894
  }
3895
3895
  render() {
3896
- return /* @__PURE__ */ u.jsx("div", { className: "customGroups", children: ae.groups }, this.state.lastUpdate);
3896
+ return /* @__PURE__ */ u.jsx("div", { className: "customGroups", children: te.groups }, this.state.lastUpdate);
3897
3897
  }
3898
3898
  // Events
3899
3899
  addGroup = (e) => {
@@ -3913,7 +3913,7 @@ class ae extends zt {
3913
3913
  this.props.three.updateGroup(t.title, r, a);
3914
3914
  }
3915
3915
  });
3916
- }), ae.groups.push(
3916
+ }), te.groups.push(
3917
3917
  /* @__PURE__ */ u.jsx(
3918
3918
  Oe,
3919
3919
  {
@@ -3922,13 +3922,13 @@ class ae extends zt {
3922
3922
  },
3923
3923
  Math.random()
3924
3924
  )
3925
- ), ae.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
3925
+ ), te.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
3926
3926
  };
3927
3927
  removeGroup = (e) => {
3928
- const t = e.value, i = ae.groupTitles.length;
3928
+ const t = e.value, i = te.groupTitles.length;
3929
3929
  for (let n = 0; n < i; n++)
3930
- if (t === ae.groupTitles[n]) {
3931
- ae.groups.splice(n, 1), ae.groupTitles.splice(n, 1), this.setState({ lastUpdate: Date.now() });
3930
+ if (t === te.groupTitles[n]) {
3931
+ te.groups.splice(n, 1), te.groupTitles.splice(n, 1), this.setState({ lastUpdate: Date.now() });
3932
3932
  return;
3933
3933
  }
3934
3934
  };
@@ -3960,18 +3960,18 @@ class ae extends zt {
3960
3960
  },
3961
3961
  Math.random()
3962
3962
  );
3963
- return ae.groups.push(n), ae.groupsRefs.push(i), ae.groupTitles.push(e.title), i;
3963
+ return te.groups.push(n), te.groupsRefs.push(i), te.groupTitles.push(e.title), i;
3964
3964
  }
3965
3965
  static removeEditorGroup(e) {
3966
- const t = ae.groupTitles.length;
3966
+ const t = te.groupTitles.length;
3967
3967
  for (let i = 0; i < t; i++)
3968
- if (e === ae.groupTitles[i]) {
3969
- ae.groups.splice(i, 1), ae.groupTitles.splice(i, 1), ae.instance.setState({ lastUpdate: Date.now() });
3968
+ if (e === te.groupTitles[i]) {
3969
+ te.groups.splice(i, 1), te.groupTitles.splice(i, 1), te.instance.setState({ lastUpdate: Date.now() });
3970
3970
  return;
3971
3971
  }
3972
3972
  }
3973
3973
  }
3974
- function xs(s) {
3974
+ function ws(s) {
3975
3975
  switch (s) {
3976
3976
  case "fov":
3977
3977
  return "FOV";
@@ -4012,7 +4012,7 @@ function Zr(s, e) {
4012
4012
  if (s.perspectiveCameraInfo !== void 0)
4013
4013
  for (const o in s.perspectiveCameraInfo)
4014
4014
  a.push({
4015
- title: xs(o),
4015
+ title: ws(o),
4016
4016
  prop: o,
4017
4017
  type: "number",
4018
4018
  step: 0.01,
@@ -4022,14 +4022,14 @@ function Zr(s, e) {
4022
4022
  const d = e.getScene(s.uuid);
4023
4023
  if (d !== null) {
4024
4024
  const p = d.getObjectByProperty("uuid", s.uuid);
4025
- p !== void 0 && (ie(p, c, l), p.updateProjectionMatrix());
4025
+ p !== void 0 && (se(p, c, l), p.updateProjectionMatrix());
4026
4026
  }
4027
4027
  }
4028
4028
  });
4029
4029
  else if (s.orthographicCameraInfo !== void 0)
4030
4030
  for (const o in s.orthographicCameraInfo)
4031
4031
  a.push({
4032
- title: xs(o),
4032
+ title: ws(o),
4033
4033
  prop: o,
4034
4034
  type: "number",
4035
4035
  step: 0.01,
@@ -4039,7 +4039,7 @@ function Zr(s, e) {
4039
4039
  const d = e.getScene(s.uuid);
4040
4040
  if (d !== null) {
4041
4041
  const p = d.getObjectByProperty("uuid", s.uuid);
4042
- p !== void 0 && (ie(p, c, l), p.updateProjectionMatrix());
4042
+ p !== void 0 && (se(p, c, l), p.updateProjectionMatrix());
4043
4043
  }
4044
4044
  }
4045
4045
  });
@@ -4062,7 +4062,7 @@ class Wr extends Ie {
4062
4062
  const r = new Zi({ fog: !1 });
4063
4063
  super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
4064
4064
  const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new _t();
4065
- o.setAttribute("position", new Ke(a, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Xs, fog: !1 })));
4065
+ o.setAttribute("position", new Ke(a, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Gs, fog: !1 })));
4066
4066
  }
4067
4067
  updateMatrixWorld() {
4068
4068
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -4078,7 +4078,7 @@ class Wr extends Ie {
4078
4078
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
4079
4079
  }
4080
4080
  }
4081
- const Os = { type: "change" }, Xi = { type: "start" }, Cn = { type: "end" }, Gt = new da(), Ts = new ua(), Gr = Math.cos(70 * pa.DEG2RAD), oe = new P(), ye = 2 * Math.PI, V = {
4081
+ const xs = { type: "change" }, Xi = { type: "start" }, En = { type: "end" }, Gt = new ha(), Os = new da(), Gr = Math.cos(70 * ua.DEG2RAD), oe = new P(), ye = 2 * Math.PI, V = {
4082
4082
  NONE: -1,
4083
4083
  ROTATE: 0,
4084
4084
  DOLLY: 1,
@@ -4088,7 +4088,7 @@ const Os = { type: "change" }, Xi = { type: "start" }, Cn = { type: "end" }, Gt
4088
4088
  TOUCH_DOLLY_PAN: 5,
4089
4089
  TOUCH_DOLLY_ROTATE: 6
4090
4090
  }, Si = 1e-6;
4091
- class Xr extends hn {
4091
+ class Xr extends cn {
4092
4092
  constructor(e, t = null) {
4093
4093
  super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), 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: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ki(), this._sphericalDelta = new ki(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = qr.bind(this), this._onPointerDown = $r.bind(this), this._onPointerUp = Kr.bind(this), this._onContextMenu = no.bind(this), this._onMouseWheel = eo.bind(this), this._onKeyDown = to.bind(this), this._onTouchStart = io.bind(this), this._onTouchMove = so.bind(this), this._onMouseDown = Qr.bind(this), this._onMouseMove = Jr.bind(this), this._interceptControlDown = ao.bind(this), this._interceptControlUp = ro.bind(this), this.domElement !== null && this.connect(), this.update();
4094
4094
  }
@@ -4120,7 +4120,7 @@ class Xr extends hn {
4120
4120
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
4121
4121
  }
4122
4122
  reset() {
4123
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Os), this.update(), this.state = V.NONE;
4123
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(xs), this.update(), this.state = V.NONE;
4124
4124
  }
4125
4125
  update(e = null) {
4126
4126
  const t = this.object.position;
@@ -4150,12 +4150,12 @@ class Xr extends hn {
4150
4150
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = oe.length();
4151
4151
  } else
4152
4152
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
4153
- a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Gt.origin.copy(this.object.position), Gt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Gt.direction)) < Gr ? this.object.lookAt(this.target) : (Ts.setFromNormalAndCoplanarPoint(this.object.up, this.target), Gt.intersectPlane(Ts, this.target))));
4153
+ a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Gt.origin.copy(this.object.position), Gt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Gt.direction)) < Gr ? this.object.lookAt(this.target) : (Os.setFromNormalAndCoplanarPoint(this.object.up, this.target), Gt.intersectPlane(Os, this.target))));
4154
4154
  } else if (this.object.isOrthographicCamera) {
4155
4155
  const a = this.object.zoom;
4156
4156
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
4157
4157
  }
4158
- return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) > Si || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Si || this._lastTargetPosition.distanceToSquared(this.target) > Si ? (this.dispatchEvent(Os), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
4158
+ return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) > Si || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Si || this._lastTargetPosition.distanceToSquared(this.target) > Si ? (this.dispatchEvent(xs), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
4159
4159
  }
4160
4160
  _getAutoRotationAngle(e) {
4161
4161
  return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
@@ -4358,7 +4358,7 @@ function qr(s) {
4358
4358
  function Kr(s) {
4359
4359
  switch (this._removePointer(s), this._pointers.length) {
4360
4360
  case 0:
4361
- this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Cn), this.state = V.NONE;
4361
+ this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(En), this.state = V.NONE;
4362
4362
  break;
4363
4363
  case 1:
4364
4364
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -4434,7 +4434,7 @@ function Jr(s) {
4434
4434
  }
4435
4435
  }
4436
4436
  function eo(s) {
4437
- this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Xi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(Cn));
4437
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Xi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(En));
4438
4438
  }
4439
4439
  function to(s) {
4440
4440
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
@@ -4552,17 +4552,17 @@ function Ze(s) {
4552
4552
  function Be(s) {
4553
4553
  return s.isOrthographicCamera;
4554
4554
  }
4555
- const ht = Math.PI * 2, Ms = Math.PI / 2, Sn = 1e-5, Ot = Math.PI / 180;
4555
+ const ht = Math.PI * 2, Ts = Math.PI / 2, Cn = 1e-5, Ot = Math.PI / 180;
4556
4556
  function Me(s, e, t) {
4557
4557
  return Math.max(e, Math.min(t, s));
4558
4558
  }
4559
- function q(s, e = Sn) {
4559
+ function q(s, e = Cn) {
4560
4560
  return Math.abs(s) < e;
4561
4561
  }
4562
- function Y(s, e, t = Sn) {
4562
+ function Y(s, e, t = Cn) {
4563
4563
  return q(s - e, t);
4564
4564
  }
4565
- function Ps(s, e) {
4565
+ function Ms(s, e) {
4566
4566
  return Math.round(s / e) * e;
4567
4567
  }
4568
4568
  function Tt(s) {
@@ -4582,7 +4582,7 @@ function Xt(s, e, t, i, n = 1 / 0, r) {
4582
4582
  let f = e + (l + m) * c;
4583
4583
  return d - s > 0 == f > d && (f = d, t.value = (f - d) / r), f;
4584
4584
  }
4585
- function As(s, e, t, i, n = 1 / 0, r, a) {
4585
+ function Ps(s, e, t, i, n = 1 / 0, r, a) {
4586
4586
  i = Math.max(1e-4, i);
4587
4587
  const o = 2 / i, c = o * r, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
4588
4588
  let d = e.x, p = e.y, m = e.z, f = s.x - d, w = s.y - p, v = s.z - m;
@@ -4671,7 +4671,7 @@ class oo {
4671
4671
  }
4672
4672
  var Oi;
4673
4673
  const lo = "2.9.0", $t = 1 / 8, co = /Mac/.test((Oi = globalThis?.navigator) === null || Oi === void 0 ? void 0 : Oi.platform);
4674
- let L, Ds, qt, Ti, be, j, z, dt, Pt, Ae, De, We, Rs, Is, xe, At, ut, Ls, Mi, ks, Pi, Ai, Kt;
4674
+ let L, As, qt, Ti, be, j, z, dt, Pt, Ae, De, We, Ds, Rs, xe, At, ut, Is, Mi, Ls, Pi, Ai, Kt;
4675
4675
  class ke extends oo {
4676
4676
  /**
4677
4677
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -4714,7 +4714,7 @@ class ke extends oo {
4714
4714
  * @category Statics
4715
4715
  */
4716
4716
  static install(e) {
4717
- L = e.THREE, Ds = Object.freeze(new L.Vector3(0, 0, 0)), qt = Object.freeze(new L.Vector3(0, 1, 0)), Ti = Object.freeze(new L.Vector3(0, 0, 1)), be = new L.Vector2(), j = new L.Vector3(), z = new L.Vector3(), dt = new L.Vector3(), Pt = new L.Vector3(), Ae = new L.Vector3(), De = new L.Vector3(), We = new L.Vector3(), Rs = new L.Vector3(), Is = new L.Vector3(), xe = new L.Spherical(), At = new L.Spherical(), ut = new L.Box3(), Ls = new L.Box3(), Mi = new L.Sphere(), ks = new L.Quaternion(), Pi = new L.Quaternion(), Ai = new L.Matrix4(), Kt = new L.Raycaster();
4717
+ L = e.THREE, As = Object.freeze(new L.Vector3(0, 0, 0)), qt = Object.freeze(new L.Vector3(0, 1, 0)), Ti = Object.freeze(new L.Vector3(0, 0, 1)), be = new L.Vector2(), j = new L.Vector3(), z = new L.Vector3(), dt = new L.Vector3(), Pt = new L.Vector3(), Ae = new L.Vector3(), De = new L.Vector3(), We = new L.Vector3(), Ds = new L.Vector3(), Rs = new L.Vector3(), xe = new L.Spherical(), At = new L.Spherical(), ut = new L.Box3(), Is = new L.Box3(), Mi = new L.Sphere(), Ls = new L.Quaternion(), Pi = new L.Quaternion(), Ai = new L.Matrix4(), Kt = new L.Raycaster();
4718
4718
  }
4719
4719
  /**
4720
4720
  * list all ACTIONs
@@ -5323,11 +5323,11 @@ class ke extends oo {
5323
5323
  fitToBox(e, t, { cover: i = !1, paddingLeft: n = 0, paddingRight: r = 0, paddingBottom: a = 0, paddingTop: o = 0 } = {}) {
5324
5324
  const c = [], l = e.isBox3 ? ut.copy(e) : ut.setFromObject(e);
5325
5325
  l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
5326
- const d = Ps(this._sphericalEnd.theta, Ms), p = Ps(this._sphericalEnd.phi, Ms);
5326
+ const d = Ms(this._sphericalEnd.theta, Ts), p = Ms(this._sphericalEnd.phi, Ts);
5327
5327
  c.push(this.rotateTo(d, p, t));
5328
- const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = ks.setFromUnitVectors(m, Ti), w = Y(Math.abs(m.y), 1);
5328
+ const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = Ls.setFromUnitVectors(m, Ti), w = Y(Math.abs(m.y), 1);
5329
5329
  w && f.multiply(Pi.setFromAxisAngle(qt, d)), f.multiply(this._yAxisUpSpaceInverse);
5330
- const v = Ls.makeEmpty();
5330
+ const v = Is.makeEmpty();
5331
5331
  z.copy(l.min).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).applyQuaternion(f), v.expandByPoint(z), v.min.x -= n, v.min.y -= a, v.max.x += r, v.max.y += o, f.setFromUnitVectors(Ti, m), w && f.premultiply(Pi.invert()), f.premultiply(this._yAxisUpSpace);
5332
5332
  const x = v.getSize(j), g = v.getCenter(z).applyQuaternion(f);
5333
5333
  if (Ze(this._camera)) {
@@ -5609,7 +5609,7 @@ class ke extends oo {
5609
5609
  * @category Methods
5610
5610
  */
5611
5611
  update(e) {
5612
- const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r = Rs.subVectors(this._targetEnd, this._target), a = Is.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5612
+ const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r = Ds.subVectors(this._targetEnd, this._target), a = Rs.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5613
5613
  if (q(t))
5614
5614
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5615
5615
  else {
@@ -5632,13 +5632,13 @@ class ke extends oo {
5632
5632
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
5633
5633
  else {
5634
5634
  const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5635
- As(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5635
+ Ps(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5636
5636
  }
5637
5637
  if (q(a.x) && q(a.y) && q(a.z))
5638
5638
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5639
5639
  else {
5640
5640
  const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5641
- As(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5641
+ Ps(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5642
5642
  }
5643
5643
  if (q(o))
5644
5644
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
@@ -5785,7 +5785,7 @@ class ke extends oo {
5785
5785
  if (!(this.colliderMeshes.length >= 1) || xi(this._camera, "_collisionTest"))
5786
5786
  return e;
5787
5787
  const i = this._getTargetDirection(Pt);
5788
- Ai.lookAt(Ds, i, this._camera.up);
5788
+ Ai.lookAt(As, i, this._camera.up);
5789
5789
  for (let n = 0; n < 4; n++) {
5790
5790
  const r = z.copy(this._nearPlaneCorners[n]);
5791
5791
  r.applyMatrix4(Ai);
@@ -5925,17 +5925,89 @@ const ci = (s) => {
5925
5925
  )
5926
5926
  ] })
5927
5927
  ] });
5928
- });
5929
- class ho extends dn {
5928
+ }), ho = `out vec3 worldPosition;
5929
+ uniform float uDistance;
5930
+
5931
+ void main() {
5932
+ // Scale the plane by the drawing distance
5933
+ worldPosition = position.xzy * uDistance;
5934
+ worldPosition.xz += cameraPosition.xz;
5935
+
5936
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
5937
+ }`, uo = `out vec4 fragColor;
5938
+ in vec3 worldPosition;
5939
+ uniform float uDivisions;
5940
+ uniform float uScale;
5941
+ uniform vec3 uColor;
5942
+ uniform float uDistance;
5943
+ uniform float uGridOpacity;
5944
+ uniform float uSubgridOpacity;
5945
+
5946
+ float getGrid(float gapSize) {
5947
+ vec2 worldPositionByDivision = worldPosition.xz / gapSize;
5948
+
5949
+ // Inverted, 0 where line, >1 where there's no line
5950
+ // We use the worldPosition (which in this case we use similarly to UVs) differential to control the anti-aliasing
5951
+ // We need to do the -0.5)-0.5 trick because the result fades out from 0 to 1, and we want both
5952
+ // worldPositionByDivision == 0.3 and worldPositionByDivision == 0.7 to result in the same fade, i.e. 0.3,
5953
+ // otherwise only one side of the line will be anti-aliased
5954
+ vec2 grid = abs(fract(worldPositionByDivision-0.5)-0.5) / fwidth(worldPositionByDivision) / 2.0;
5955
+ float gridLine = min(grid.x, grid.y);
5956
+
5957
+ // Uninvert and clamp
5958
+ return 1.0 - min(gridLine, 1.0);
5959
+ }
5960
+
5961
+ void main() {
5962
+ float cameraDistanceToGridPlane = max(200.0, distance(cameraPosition.y, worldPosition.y));
5963
+ float cameraDistanceToFragmentOnGridPlane = distance(cameraPosition.xyz, worldPosition.xyz);
5964
+
5965
+ // The size of the grid and subgrid are powers of each other and they are determined based on camera distance.
5966
+ // The current grid will become the next subgrid when it becomes too small, and its next power becomes the new grid.
5967
+ float subGridPower = pow(uDivisions, floor(log(cameraDistanceToGridPlane) / log(uDivisions)));
5968
+ float gridPower = subGridPower * uDivisions;
5969
+
5970
+ // If we want to fade both the grid and its subgrid, we need to displays 3 different opacities, with the next grid being the third
5971
+ float nextGridPower = gridPower * uDivisions;
5972
+
5973
+ // 1 where grid, 0 where no grid
5974
+ float subgrid = getGrid(subGridPower * uScale);
5975
+ float grid = getGrid(gridPower * uScale);
5976
+ float nextGrid = getGrid(nextGridPower * uScale);
5977
+
5978
+ // Where we are between the introduction of the current grid power and when we switch to the next grid power
5979
+ float stepPercentage = (cameraDistanceToGridPlane - subGridPower)/(gridPower - subGridPower);
5980
+
5981
+ // The last x percentage of the current step over which we want to fade
5982
+ float fadeRange = 0.3;
5983
+
5984
+ // We calculate the fade percentage from the step percentage and the fade range
5985
+ float fadePercentage = max(stepPercentage - 1.0 + fadeRange, 0.0) / fadeRange;
5986
+
5987
+ // Set base opacity based on how close we are to the drawing distance, with a cubic falloff
5988
+ float baseOpacity = subgrid * pow(1.0 - min(cameraDistanceToFragmentOnGridPlane / uDistance, 1.0), 3.0);
5989
+
5990
+ // Shade the subgrid
5991
+ fragColor = vec4(uColor.rgb, (baseOpacity - fadePercentage) * uSubgridOpacity);
5992
+
5993
+ // Somewhat arbitrary additional fade coefficient to counter anti-aliasing popping when switching between grid powers
5994
+ float fadeCoefficient = 0.5;
5995
+
5996
+ // Shade the grid
5997
+ fragColor.a = mix(fragColor.a, baseOpacity * uGridOpacity - fadePercentage * (uGridOpacity - uSubgridOpacity) * fadeCoefficient, grid);
5998
+
5999
+ // Shade the next grid
6000
+ fragColor.a = mix(fragColor.a, baseOpacity * uGridOpacity, nextGrid);
6001
+
6002
+ if (fragColor.a <= 0.0) discard;
6003
+ }`;
6004
+ class po extends hn {
5930
6005
  constructor(e) {
5931
6006
  super({
5932
6007
  extensions: {
5933
6008
  // @ts-ignore
5934
6009
  derivatives: !0
5935
6010
  },
5936
- glslVersion: ma,
5937
- side: Vi,
5938
- transparent: !0,
5939
6011
  uniforms: {
5940
6012
  uScale: {
5941
6013
  value: e?.scale !== void 0 ? e?.scale : 0.1
@@ -5956,100 +6028,28 @@ class ho extends dn {
5956
6028
  value: e?.gridOpacity !== void 0 ? e?.gridOpacity : 0.25
5957
6029
  }
5958
6030
  },
5959
- vertexShader: `out vec3 worldPosition;
5960
- uniform float uDistance;
5961
-
5962
- void main() {
5963
- // Scale the plane by the drawing distance
5964
- worldPosition = position.xzy * uDistance;
5965
- worldPosition.xz += cameraPosition.xz;
5966
-
5967
- gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
5968
- }`,
5969
- fragmentShader: `out vec4 fragColor;
5970
- in vec3 worldPosition;
5971
-
5972
- uniform float uDivisions;
5973
- uniform float uScale;
5974
- uniform vec3 uColor;
5975
- uniform float uDistance;
5976
- uniform float uSubgridOpacity;
5977
- uniform float uGridOpacity;
5978
-
5979
- float getGrid(float gapSize) {
5980
- vec2 worldPositionByDivision = worldPosition.xz / gapSize;
5981
-
5982
- // Inverted, 0 where line, >1 where there's no line
5983
- // We use the worldPosition (which in this case we use similarly to UVs) differential to control the anti-aliasing
5984
- // We need to do the -0.5)-0.5 trick because the result fades out from 0 to 1, and we want both
5985
- // worldPositionByDivision == 0.3 and worldPositionByDivision == 0.7 to result in the same fade, i.e. 0.3,
5986
- // otherwise only one side of the line will be anti-aliased
5987
- vec2 grid = abs(fract(worldPositionByDivision-0.5)-0.5) / fwidth(worldPositionByDivision) / 2.0;
5988
- float gridLine = min(grid.x, grid.y);
5989
-
5990
- // Uninvert and clamp
5991
- return 1.0 - min(gridLine, 1.0);
5992
- }
5993
-
5994
- void main() {
5995
- float cameraDistanceToGridPlane = distance(cameraPosition.y, worldPosition.y);
5996
- float cameraDistanceToFragmentOnGridPlane = distance(cameraPosition.xz, worldPosition.xz);
5997
-
5998
- // The size of the grid and subgrid are powers of each other and they are determined based on camera distance.
5999
- // The current grid will become the next subgrid when it becomes too small, and its next power becomes the new grid.
6000
- float subGridPower = pow(uDivisions, floor(log(cameraDistanceToGridPlane) / log(uDivisions)));
6001
- float gridPower = subGridPower * uDivisions;
6002
-
6003
- // If we want to fade both the grid and its subgrid, we need to displays 3 different opacities, with the next grid being the third
6004
- float nextGridPower = gridPower * uDivisions;
6005
-
6006
- // 1 where grid, 0 where no grid
6007
- float subgrid = getGrid(subGridPower * uScale);
6008
- float grid = getGrid(gridPower * uScale);
6009
- float nextGrid = getGrid(nextGridPower * uScale);
6010
-
6011
- // Where we are between the introduction of the current grid power and when we switch to the next grid power
6012
- float stepPercentage = (cameraDistanceToGridPlane - subGridPower)/(gridPower - subGridPower);
6013
-
6014
- // The last x percentage of the current step over which we want to fade
6015
- float fadeRange = 0.3;
6016
-
6017
- // We calculate the fade percentage from the step percentage and the fade range
6018
- float fadePercentage = max(stepPercentage - 1.0 + fadeRange, 0.0) / fadeRange;
6019
-
6020
- // Set base opacity based on how close we are to the drawing distance, with a cubic falloff
6021
- float baseOpacity = subgrid * pow(1.0 - min(cameraDistanceToFragmentOnGridPlane / uDistance, 1.0), 3.0);
6022
-
6023
- // Shade the subgrid
6024
- fragColor = vec4(uColor.rgb, (baseOpacity - fadePercentage) * uSubgridOpacity);
6025
-
6026
- // Somewhat arbitrary additional fade coefficient to counter anti-aliasing popping when switching between grid powers
6027
- float fadeCoefficient = 0.5;
6028
-
6029
- // Shade the grid
6030
- fragColor.a = mix(fragColor.a, baseOpacity * uGridOpacity - fadePercentage * (uGridOpacity - uSubgridOpacity) * fadeCoefficient, grid);
6031
-
6032
- // Shade the next grid
6033
- fragColor.a = mix(fragColor.a, baseOpacity * uGridOpacity, nextGrid);
6034
-
6035
- if (fragColor.a <= 0.0) discard;
6036
- }`,
6031
+ glslVersion: pa,
6032
+ side: Vi,
6033
+ transparent: !0,
6037
6034
  name: "InfiniteGrid",
6038
- depthWrite: !1
6035
+ depthTest: !1,
6036
+ depthWrite: !1,
6037
+ vertexShader: ho,
6038
+ fragmentShader: uo
6039
6039
  });
6040
6040
  }
6041
6041
  }
6042
- class uo extends M {
6042
+ class mo extends M {
6043
6043
  gridMaterial;
6044
- constructor() {
6045
- const e = new ho();
6046
- super(new un(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
6044
+ constructor(e) {
6045
+ const t = new po(e);
6046
+ super(new dn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
6047
6047
  }
6048
6048
  update() {
6049
6049
  this.gridMaterial.needsUpdate = !0;
6050
6050
  }
6051
6051
  }
6052
- function Us(s) {
6052
+ function ks(s) {
6053
6053
  const [e, t] = Z(s.selected), i = "toggle" + (e ? " selected" : "");
6054
6054
  return /* @__PURE__ */ u.jsx(
6055
6055
  "button",
@@ -6068,7 +6068,7 @@ function Us(s) {
6068
6068
  s.name
6069
6069
  );
6070
6070
  }
6071
- const po = `#include <common>
6071
+ const fo = `#include <common>
6072
6072
  #include <batching_pars_vertex>
6073
6073
  #include <uv_pars_vertex>
6074
6074
  #include <color_pars_vertex>
@@ -6098,7 +6098,7 @@ void main() {
6098
6098
  #include <logdepthbuf_vertex>
6099
6099
  #include <clipping_planes_vertex>
6100
6100
  #include <worldpos_vertex>
6101
- }`, mo = `
6101
+ }`, go = `
6102
6102
  #include <common>
6103
6103
  #include <uv_pars_fragment>
6104
6104
  #include <clipping_planes_pars_fragment>
@@ -6107,30 +6107,30 @@ void main() {
6107
6107
  #include <clipping_planes_fragment>
6108
6108
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
6109
6109
  }`;
6110
- class fo extends dn {
6110
+ class _o extends hn {
6111
6111
  constructor() {
6112
6112
  super({
6113
6113
  defines: {
6114
6114
  USE_UV: ""
6115
6115
  },
6116
- vertexShader: po,
6117
- fragmentShader: mo
6116
+ vertexShader: fo,
6117
+ fragmentShader: go
6118
6118
  });
6119
6119
  }
6120
6120
  }
6121
- const Xe = new ai(), ue = new P(), Ye = new P(), Q = new Ce(), js = {
6121
+ const Xe = new ai(), ue = new P(), Ye = new P(), Q = new Ce(), Us = {
6122
6122
  X: new P(1, 0, 0),
6123
6123
  Y: new P(0, 1, 0),
6124
6124
  Z: new P(0, 0, 1)
6125
- }, Di = { type: "change" }, Ns = { type: "mouseDown", mode: null }, Fs = { type: "mouseUp", mode: null }, zs = { type: "objectChange" };
6126
- class go extends hn {
6125
+ }, Di = { type: "change" }, js = { type: "mouseDown", mode: null }, Ns = { type: "mouseUp", mode: null }, Fs = { type: "objectChange" };
6126
+ class vo extends cn {
6127
6127
  constructor(e, t = null) {
6128
6128
  super(void 0, t);
6129
- const i = new Co(this);
6129
+ const i = new wo(this);
6130
6130
  this._root = i;
6131
- const n = new So();
6131
+ const n = new xo();
6132
6132
  this._gizmo = n, i.add(n);
6133
- const r = new wo();
6133
+ const r = new Oo();
6134
6134
  this._plane = r, i.add(r);
6135
6135
  const a = this;
6136
6136
  function o(E, C) {
@@ -6146,7 +6146,7 @@ class go extends hn {
6146
6146
  }
6147
6147
  o("camera", e), o("object", void 0), o("enabled", !0), o("axis", null), o("mode", "translate"), o("translationSnap", null), o("rotationSnap", null), o("scaleSnap", null), o("space", "world"), o("size", 1), o("dragging", !1), o("showX", !0), o("showY", !0), o("showZ", !0);
6148
6148
  const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), w = new P(), v = new P(), x = new P(), g = 0, y = new P();
6149
- o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", w), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = _o.bind(this), this._onPointerDown = yo.bind(this), this._onPointerHover = vo.bind(this), this._onPointerMove = bo.bind(this), this._onPointerUp = Eo.bind(this), t !== null && this.connect();
6149
+ o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", w), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = yo.bind(this), this._onPointerDown = Eo.bind(this), this._onPointerHover = bo.bind(this), this._onPointerMove = Co.bind(this), this._onPointerUp = So.bind(this), t !== null && this.connect();
6150
6150
  }
6151
6151
  connect() {
6152
6152
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -6168,7 +6168,7 @@ class go extends hn {
6168
6168
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
6169
6169
  e !== null && Xe.setFromCamera(e, this.camera);
6170
6170
  const t = Ri(this._plane, Xe, !0);
6171
- t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, Ns.mode = this.mode, this.dispatchEvent(Ns);
6171
+ t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, js.mode = this.mode, this.dispatchEvent(js);
6172
6172
  }
6173
6173
  }
6174
6174
  pointerMove(e) {
@@ -6192,13 +6192,13 @@ class go extends hn {
6192
6192
  this._offset.copy(this.pointEnd).sub(this.pointStart);
6193
6193
  const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
6194
6194
  let c = !1;
6195
- t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(ue.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(js[t]), ue.copy(js[t]), r === "local" && ue.applyQuaternion(this.worldQuaternion), ue.cross(this.eye), ue.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(ue.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
6195
+ t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(ue.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Us[t]), ue.copy(Us[t]), r === "local" && ue.applyQuaternion(this.worldQuaternion), ue.cross(this.eye), ue.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(ue.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
6196
6196
  }
6197
- this.dispatchEvent(Di), this.dispatchEvent(zs);
6197
+ this.dispatchEvent(Di), this.dispatchEvent(Fs);
6198
6198
  }
6199
6199
  }
6200
6200
  pointerUp(e) {
6201
- e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Fs.mode = this.mode, this.dispatchEvent(Fs)), this.dragging = !1, this.axis = null);
6201
+ e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ns.mode = this.mode, this.dispatchEvent(Ns)), this.dragging = !1, this.axis = null);
6202
6202
  }
6203
6203
  dispose() {
6204
6204
  this.disconnect(), this.traverse(function(e) {
@@ -6214,7 +6214,7 @@ class go extends hn {
6214
6214
  return this.object = void 0, this.axis = null, this._root.visible = !1, this;
6215
6215
  }
6216
6216
  reset() {
6217
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Di), this.dispatchEvent(zs), this.pointStart.copy(this.pointEnd));
6217
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Di), this.dispatchEvent(Fs), this.pointStart.copy(this.pointEnd));
6218
6218
  }
6219
6219
  getRaycaster() {
6220
6220
  return Xe;
@@ -6242,7 +6242,7 @@ class go extends hn {
6242
6242
  this.space = e;
6243
6243
  }
6244
6244
  }
6245
- function _o(s) {
6245
+ function yo(s) {
6246
6246
  if (this.domElement.ownerDocument.pointerLockElement)
6247
6247
  return {
6248
6248
  x: 0,
@@ -6258,7 +6258,7 @@ function _o(s) {
6258
6258
  };
6259
6259
  }
6260
6260
  }
6261
- function vo(s) {
6261
+ function bo(s) {
6262
6262
  if (this.enabled)
6263
6263
  switch (s.pointerType) {
6264
6264
  case "mouse":
@@ -6267,13 +6267,13 @@ function vo(s) {
6267
6267
  break;
6268
6268
  }
6269
6269
  }
6270
- function yo(s) {
6270
+ function Eo(s) {
6271
6271
  this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(s)), this.pointerDown(this._getPointer(s)));
6272
6272
  }
6273
- function bo(s) {
6273
+ function Co(s) {
6274
6274
  this.enabled && this.pointerMove(this._getPointer(s));
6275
6275
  }
6276
- function Eo(s) {
6276
+ function So(s) {
6277
6277
  this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
6278
6278
  }
6279
6279
  function Ri(s, e, t) {
@@ -6283,8 +6283,8 @@ function Ri(s, e, t) {
6283
6283
  return i[n];
6284
6284
  return !1;
6285
6285
  }
6286
- const Qt = new pn(), X = new P(0, 1, 0), Hs = new P(0, 0, 0), Ys = new hi(), Jt = new Ce(), ni = new Ce(), Re = new P(), Bs = new hi(), kt = new P(1, 0, 0), qe = new P(0, 1, 0), Ut = new P(0, 0, 1), ei = new P(), Dt = new P(), Rt = new P();
6287
- class Co extends vt {
6286
+ const Qt = new un(), X = new P(0, 1, 0), zs = new P(0, 0, 0), Hs = new hi(), Jt = new Ce(), ni = new Ce(), Re = new P(), Ys = new hi(), kt = new P(1, 0, 0), qe = new P(0, 1, 0), Ut = new P(0, 0, 1), ei = new P(), Dt = new P(), Rt = new P();
6287
+ class wo extends vt {
6288
6288
  constructor(e) {
6289
6289
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
6290
6290
  }
@@ -6294,7 +6294,7 @@ class Co extends vt {
6294
6294
  t.object !== void 0 && (t.object.updateMatrixWorld(), t.object.parent === null ? console.error("TransformControls: The attached 3D object must be a part of the scene graph.") : t.object.parent.matrixWorld.decompose(t._parentPosition, t._parentQuaternion, t._parentScale), t.object.matrixWorld.decompose(t.worldPosition, t.worldQuaternion, t._worldScale), t._parentQuaternionInv.copy(t._parentQuaternion).invert(), t._worldQuaternionInv.copy(t.worldQuaternion).invert()), t.camera.updateMatrixWorld(), t.camera.matrixWorld.decompose(t.cameraPosition, t.cameraQuaternion, t._cameraScale), t.camera.isOrthographicCamera ? t.camera.getWorldDirection(t.eye).negate() : t.eye.copy(t.cameraPosition).sub(t.worldPosition).normalize(), super.updateMatrixWorld(e);
6295
6295
  }
6296
6296
  }
6297
- class So extends vt {
6297
+ class xo extends vt {
6298
6298
  constructor() {
6299
6299
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
6300
6300
  const e = new Je({
@@ -6441,7 +6441,7 @@ class So extends vt {
6441
6441
  ]
6442
6442
  }, B = {
6443
6443
  XYZE: [
6444
- [new M(new mn(0.25, 10, 8), i)]
6444
+ [new M(new pn(0.25, 10, 8), i)]
6445
6445
  ],
6446
6446
  X: [
6447
6447
  [new M(new Et(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -6523,10 +6523,10 @@ class So extends vt {
6523
6523
  const Ue = new vt();
6524
6524
  for (const he in $)
6525
6525
  for (let Ee = $[he].length; Ee--; ) {
6526
- const se = $[he][Ee][0].clone(), je = $[he][Ee][1], Ne = $[he][Ee][2], Fe = $[he][Ee][3], W = $[he][Ee][4];
6527
- se.name = he, se.tag = W, je && se.position.set(je[0], je[1], je[2]), Ne && se.rotation.set(Ne[0], Ne[1], Ne[2]), Fe && se.scale.set(Fe[0], Fe[1], Fe[2]), se.updateMatrix();
6528
- const le = se.geometry.clone();
6529
- le.applyMatrix4(se.matrix), se.geometry = le, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), Ue.add(se);
6526
+ const ne = $[he][Ee][0].clone(), je = $[he][Ee][1], Ne = $[he][Ee][2], Fe = $[he][Ee][3], W = $[he][Ee][4];
6527
+ ne.name = he, ne.tag = W, je && ne.position.set(je[0], je[1], je[2]), Ne && ne.rotation.set(Ne[0], Ne[1], Ne[2]), Fe && ne.scale.set(Fe[0], Fe[1], Fe[2]), ne.updateMatrix();
6528
+ const le = ne.geometry.clone();
6529
+ le.applyMatrix4(ne.matrix), ne.geometry = le, ne.renderOrder = 1 / 0, ne.position.set(0, 0, 0), ne.rotation.set(0, 0, 0), ne.scale.set(1, 1, 1), Ue.add(ne);
6530
6530
  }
6531
6531
  return Ue;
6532
6532
  }
@@ -6543,20 +6543,20 @@ class So extends vt {
6543
6543
  a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
6544
6544
  let o;
6545
6545
  if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), a.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), a.tag === "helper") {
6546
- a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Q.setFromEuler(Qt.set(0, 0, 0)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (Q.setFromEuler(Qt.set(0, 0, Math.PI / 2)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (Q.setFromEuler(Qt.set(0, Math.PI / 2, 0)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (Q.setFromEuler(Qt.set(0, Math.PI / 2, 0)), X.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(Ys.lookAt(Hs, X, qe)), a.quaternion.multiply(Q), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), ue.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), ue.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(ue), a.visible = this.dragging) : (a.quaternion.copy(i), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
6546
+ a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (Q.setFromEuler(Qt.set(0, 0, 0)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (Q.setFromEuler(Qt.set(0, 0, Math.PI / 2)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (Q.setFromEuler(Qt.set(0, Math.PI / 2, 0)), a.quaternion.copy(i).multiply(Q), Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (Q.setFromEuler(Qt.set(0, Math.PI / 2, 0)), X.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(Hs.lookAt(zs, X, qe)), a.quaternion.multiply(Q), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), ue.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), ue.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(ue), a.visible = this.dragging) : (a.quaternion.copy(i), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
6547
6547
  continue;
6548
6548
  }
6549
- a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Jt.copy(i), X.copy(this.eye).applyQuaternion(Q.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Ys.lookAt(this.eye, Hs, qe)), a.name === "X" && (Q.setFromAxisAngle(kt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q)), a.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q)), a.name === "Z" && (Q.setFromAxisAngle(Ut, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(c) {
6549
+ a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(X.copy(Ut).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(X.copy(kt).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(X.copy(qe).applyQuaternion(i).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Jt.copy(i), X.copy(this.eye).applyQuaternion(Q.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Hs.lookAt(this.eye, zs, qe)), a.name === "X" && (Q.setFromAxisAngle(kt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q)), a.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q)), a.name === "Z" && (Q.setFromAxisAngle(Ut, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Jt, Q), a.quaternion.copy(Q))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(c) {
6550
6550
  return a.name === c;
6551
6551
  })) && (a.material.color.setHex(16776960), a.material.opacity = 1);
6552
6552
  }
6553
6553
  super.updateMatrixWorld(e);
6554
6554
  }
6555
6555
  }
6556
- class wo extends M {
6556
+ class Oo extends M {
6557
6557
  constructor() {
6558
6558
  super(
6559
- new un(1e5, 1e5, 2, 2),
6559
+ new dn(1e5, 1e5, 2, 2),
6560
6560
  new Je({ visible: !1, wireframe: !0, side: Vi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6561
6561
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
6562
6562
  }
@@ -6594,7 +6594,7 @@ class wo extends M {
6594
6594
  default:
6595
6595
  Re.set(0, 0, 0);
6596
6596
  }
6597
- Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Bs.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Bs)), super.updateMatrixWorld(e);
6597
+ Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Ys.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Ys)), super.updateMatrixWorld(e);
6598
6598
  }
6599
6599
  }
6600
6600
  class ge extends Bi {
@@ -6620,7 +6620,7 @@ class ge extends Bi {
6620
6620
  let t = this.controls.get(e);
6621
6621
  if (t === void 0) {
6622
6622
  const i = document.querySelector(".clickable");
6623
- t = new go(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6623
+ t = new vo(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6624
6624
  this.dispatchEvent({ type: ge.DRAG_START });
6625
6625
  }), t.addEventListener("mouseUp", () => {
6626
6626
  this.dispatchEvent({ type: ge.DRAG_END });
@@ -6666,8 +6666,8 @@ class ge extends Bi {
6666
6666
  return ge._instance || (ge._instance = new ge()), ge._instance;
6667
6667
  }
6668
6668
  }
6669
- const xo = new de(), Ii = new pe();
6670
- class Vs extends vt {
6669
+ const To = new de(), Ii = new pe();
6670
+ class Bs extends vt {
6671
6671
  curve = new hs();
6672
6672
  line;
6673
6673
  draggable;
@@ -6689,7 +6689,7 @@ class Vs extends vt {
6689
6689
  group;
6690
6690
  constructor(e, t) {
6691
6691
  const i = new et(lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()));
6692
- super(), this.name = e, this.lineMaterial = new Zi({ color: i }), this.line = new Ie(new _t(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new vt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new mn(1.5), new Je({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new ai(), this.raycaster.params.Line.threshold = 3, this.enable();
6692
+ super(), this.name = e, this.lineMaterial = new Zi({ color: i }), this.line = new Ie(new _t(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new vt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new pn(1.5), new Je({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new ai(), this.raycaster.params.Line.threshold = 3, this.enable();
6693
6693
  }
6694
6694
  enable() {
6695
6695
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6730,7 +6730,7 @@ class Vs extends vt {
6730
6730
  this.addPoint(new P(-50, 0, 0), !1), this.addPoint(new P(50, 0, 0));
6731
6731
  };
6732
6732
  addPoint = (e, t = !0) => {
6733
- const i = this.draggable.children.length, n = new M(xo, this.draggedMat);
6733
+ const i = this.draggable.children.length, n = new M(To, this.draggedMat);
6734
6734
  return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
6735
6735
  };
6736
6736
  addNextPt = () => {
@@ -7000,7 +7000,7 @@ class Vs extends vt {
7000
7000
  };
7001
7001
  }
7002
7002
  let ti = 0;
7003
- class Oo extends vt {
7003
+ class Mo extends vt {
7004
7004
  defaultScale = 10;
7005
7005
  _camera;
7006
7006
  group = null;
@@ -7008,7 +7008,7 @@ class Oo extends vt {
7008
7008
  super(), this.name = "Spline Editor", this._camera = e, D.addEventListener(A.ADD_SPLINE, this.onAddSpline);
7009
7009
  }
7010
7010
  initDebug() {
7011
- this.group = ae.addEditorGroup({
7011
+ this.group = te.addEditorGroup({
7012
7012
  title: this.name,
7013
7013
  items: [
7014
7014
  {
@@ -7053,13 +7053,13 @@ class Oo extends vt {
7053
7053
  });
7054
7054
  }
7055
7055
  dispose() {
7056
- D.removeEventListener(A.ADD_SPLINE, this.onAddSpline), ae.removeEditorGroup(this.name);
7056
+ D.removeEventListener(A.ADD_SPLINE, this.onAddSpline), te.removeEditorGroup(this.name);
7057
7057
  }
7058
7058
  addSpline(e) {
7059
7059
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
7060
7060
  }
7061
7061
  createSpline = (e = []) => {
7062
- const t = `Spline ${ti + 1}`, i = new Vs(t, this._camera);
7062
+ const t = `Spline ${ti + 1}`, i = new Bs(t, this._camera);
7063
7063
  return i.addPoints(e), this.addSpline(i), ti++, i;
7064
7064
  };
7065
7065
  createSplineFromArray = (e) => {
@@ -7083,7 +7083,7 @@ class Oo extends vt {
7083
7083
  t.points.forEach((a) => {
7084
7084
  n.push(new P(a[0], a[1], a[2]));
7085
7085
  });
7086
- const r = new Vs(i, this.camera);
7086
+ const r = new Bs(i, this.camera);
7087
7087
  r.addPoints(n), this.addSpline(r), ti++;
7088
7088
  };
7089
7089
  get camera() {
@@ -7096,15 +7096,15 @@ class Oo extends vt {
7096
7096
  });
7097
7097
  }
7098
7098
  }
7099
- const Zs = [
7099
+ const Vs = [
7100
7100
  "Single",
7101
7101
  "Side by Side",
7102
7102
  "Stacked",
7103
7103
  "Quad"
7104
- ], To = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", Mo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
7104
+ ], Po = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", Ao = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
7105
7105
  class me extends zt {
7106
7106
  static instance = null;
7107
- scene = new Gs();
7107
+ scene = new Ws();
7108
7108
  renderer;
7109
7109
  currentScene;
7110
7110
  cameras = /* @__PURE__ */ new Map();
@@ -7114,17 +7114,16 @@ class me extends zt {
7114
7114
  // RefObject to one of the "windows"
7115
7115
  cameraHelpers = /* @__PURE__ */ new Map();
7116
7116
  lightHelpers = /* @__PURE__ */ new Map();
7117
- helpersContainer = new fa();
7118
- grid = new uo();
7119
- axisHelper = new ds(500);
7120
- interactionHelper = new ds(100);
7117
+ helpersContainer = new ma();
7118
+ grid = new mo();
7119
+ interactionHelper = new fa(25);
7121
7120
  currentTransform;
7122
7121
  // Tools
7123
7122
  splineEditor;
7124
7123
  // Override Materials
7125
7124
  depthMaterial = new ga();
7126
7125
  normalsMaterial = new _a();
7127
- uvMaterial = new fo();
7126
+ uvMaterial = new _o();
7128
7127
  wireframeMaterial = new Je({
7129
7128
  opacity: 0.33,
7130
7129
  transparent: !0,
@@ -7196,7 +7195,7 @@ class me extends zt {
7196
7195
  t.mode !== this.state.mode && (this.assignControls(), this.resize());
7197
7196
  }
7198
7197
  componentWillUnmount() {
7199
- this.disable();
7198
+ this.disable(), te.removeEditorGroup("View Settings");
7200
7199
  }
7201
7200
  render() {
7202
7201
  const e = [];
@@ -7334,8 +7333,8 @@ class me extends zt {
7334
7333
  ci,
7335
7334
  {
7336
7335
  title: "View",
7337
- index: Zs.indexOf(this.state.mode),
7338
- options: Zs,
7336
+ index: Vs.indexOf(this.state.mode),
7337
+ options: Vs,
7339
7338
  onSelect: (t) => {
7340
7339
  t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
7341
7340
  },
@@ -7372,10 +7371,10 @@ class me extends zt {
7372
7371
  }
7373
7372
  ),
7374
7373
  /* @__PURE__ */ u.jsx(
7375
- Us,
7374
+ ks,
7376
7375
  {
7377
7376
  name: "cameraHelper",
7378
- icon: To,
7377
+ icon: Po,
7379
7378
  selected: this.cameraVisibility,
7380
7379
  height: 24,
7381
7380
  top: 2,
@@ -7390,10 +7389,10 @@ class me extends zt {
7390
7389
  }
7391
7390
  ),
7392
7391
  /* @__PURE__ */ u.jsx(
7393
- Us,
7392
+ ks,
7394
7393
  {
7395
7394
  name: "lightHelper",
7396
- icon: Mo,
7395
+ icon: Ao,
7397
7396
  selected: this.lightVisibility,
7398
7397
  height: 24,
7399
7398
  top: 4,
@@ -7418,17 +7417,33 @@ class me extends zt {
7418
7417
  }), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
7419
7418
  }
7420
7419
  setupScene() {
7421
- this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.axisHelper.name = "axisHelper", this.helpersContainer.add(this.axisHelper), this.interactionHelper.name = "interactionHelper", this.helpersContainer.add(this.interactionHelper), this.interactionHelper.visible = !1;
7422
- const e = (n, r) => {
7423
- const a = new Li(-100, 100, 100, -100, 50, 5e3);
7424
- return a.name = n, a.position.copy(r), a.lookAt(0, 0, 0), this.cameras.set(n, a), a;
7425
- };
7426
- e("Top", new P(0, 1e3, 0)), e("Bottom", new P(0, -1e3, 0)), e("Left", new P(-1e3, 0, 0)), e("Right", new P(1e3, 0, 0)), e("Front", new P(0, 0, 1e3)), e("Back", new P(0, 0, -1e3)), e("Orthographic", new P(1e3, 1e3, 1e3)), e("UI", new P()), this.debugCamera = new Ct(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
7427
- const t = localStorage, i = this.props.three.app.appID;
7428
- this.tlCam = this.cameras.get(t.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
7420
+ this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
7421
+ const e = (r, a) => {
7422
+ const o = new Li(-100, 100, 100, -100, 0, 3e3);
7423
+ return o.name = r, o.position.copy(a), o.lookAt(0, 0, 0), this.cameras.set(r, o), o;
7424
+ }, t = 1e3;
7425
+ e("Top", new P(0, t, 0)), e("Bottom", new P(0, -t, 0)), e("Left", new P(-t, 0, 0)), e("Right", new P(t, 0, 0)), e("Front", new P(0, 0, t)), e("Back", new P(0, 0, -t)), e("Orthographic", new P(t, t, t)), e("UI", new P()), this.debugCamera = new Ct(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
7426
+ const i = localStorage, n = this.props.three.app.appID;
7427
+ this.tlCam = this.cameras.get(i.getItem(`${n}_tlCam`)), this.trCam = this.cameras.get(i.getItem(`${n}_trCam`)), this.blCam = this.cameras.get(i.getItem(`${n}_blCam`)), this.brCam = this.cameras.get(i.getItem(`${n}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
7429
7428
  }
7430
7429
  setupTools() {
7431
- this.splineEditor = new Oo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7430
+ te.addEditorGroup({
7431
+ title: "View Settings",
7432
+ items: [
7433
+ {
7434
+ type: "boolean",
7435
+ prop: "Show Grid",
7436
+ value: this.grid.visible
7437
+ }
7438
+ ],
7439
+ onUpdate: (e, t) => {
7440
+ switch (e) {
7441
+ case "Show Grid":
7442
+ this.grid.visible = t;
7443
+ break;
7444
+ }
7445
+ }
7446
+ }), this.splineEditor = new Mo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7432
7447
  }
7433
7448
  // Public
7434
7449
  play() {
@@ -7500,7 +7515,7 @@ class me extends zt {
7500
7515
  });
7501
7516
  };
7502
7517
  sceneUpdate = (e) => {
7503
- this.helpersContainer.add(this.axisHelper), this.clearLightHelpers(), this.scene.remove(this.currentScene), He(this.currentScene);
7518
+ this.clearLightHelpers(), this.scene.remove(this.currentScene), He(this.currentScene);
7504
7519
  const t = this.props.scenes.get(e.value.name);
7505
7520
  if (t !== void 0) {
7506
7521
  const i = new t();
@@ -7728,23 +7743,36 @@ class me extends zt {
7728
7743
  }
7729
7744
  return null;
7730
7745
  }
7746
+ drawTo(e, t, i, n, r, a) {
7747
+ switch (r.name) {
7748
+ case "Left":
7749
+ case "Right":
7750
+ this.grid.rotation.z = Math.PI / 2;
7751
+ break;
7752
+ case "Front":
7753
+ case "Back":
7754
+ this.grid.rotation.x = Math.PI / 2;
7755
+ break;
7756
+ }
7757
+ this.scene.overrideMaterial = a, this.renderer?.setViewport(e, t, i, n), this.renderer?.setScissor(e, t, i, n), this.renderer?.render(this.scene, r), this.grid.rotation.set(0, 0, 0);
7758
+ }
7731
7759
  drawSingle() {
7732
7760
  const e = this.getSceneOverride(this.tlRender);
7733
- this.scene.overrideMaterial = e, this.renderer?.setViewport(0, 0, this.width, this.height), this.renderer?.setScissor(0, 0, this.width, this.height), this.renderer?.render(this.scene, this.tlCam);
7761
+ this.drawTo(0, 0, this.width, this.height, this.tlCam, e);
7734
7762
  }
7735
7763
  drawDouble = () => {
7736
7764
  const e = this.getSceneOverride(this.tlRender), t = this.getSceneOverride(this.trRender), i = Math.floor(this.width / 2), n = Math.floor(this.height / 2);
7737
- if (this.scene.overrideMaterial = e, this.state.mode === "Side by Side")
7738
- this.renderer?.setViewport(0, 0, i, this.height), this.renderer?.setScissor(0, 0, i, this.height), this.renderer?.render(this.scene, this.tlCam), this.scene.overrideMaterial = t, this.renderer?.setViewport(i, 0, i, this.height), this.renderer?.setScissor(i, 0, i, this.height), this.renderer?.render(this.scene, this.trCam);
7765
+ if (this.state.mode === "Side by Side")
7766
+ this.drawTo(0, 0, i, this.height, this.tlCam, e), this.drawTo(i, 0, i, this.height, this.trCam, t);
7739
7767
  else {
7740
7768
  const r = this.height - n;
7741
- this.renderer?.setViewport(0, r, this.width, n), this.renderer?.setScissor(0, r, this.width, n), this.renderer?.render(this.scene, this.tlCam), this.scene.overrideMaterial = t, this.renderer?.setViewport(0, 0, this.width, n), this.renderer?.setScissor(0, 0, this.width, n), this.renderer?.render(this.scene, this.trCam);
7769
+ this.drawTo(0, r, this.width, n, this.tlCam, e), this.drawTo(0, 0, this.width, n, this.trCam, t);
7742
7770
  }
7743
7771
  };
7744
7772
  drawQuad = () => {
7745
7773
  const e = this.getSceneOverride(this.tlRender), t = this.getSceneOverride(this.trRender), i = this.getSceneOverride(this.blRender), n = this.getSceneOverride(this.brRender), r = Math.floor(this.width / 2), a = Math.floor(this.height / 2);
7746
7774
  let o = 0, c = 0;
7747
- c = this.height - a, o = 0, this.scene.overrideMaterial = e, this.renderer?.setViewport(o, c, r, a), this.renderer?.setScissor(o, c, r, a), this.renderer?.render(this.scene, this.tlCam), o = r, this.scene.overrideMaterial = t, this.renderer?.setViewport(o, c, r, a), this.renderer?.setScissor(o, c, r, a), this.renderer?.render(this.scene, this.trCam), c = 0, o = 0, this.scene.overrideMaterial = i, this.renderer?.setViewport(o, c, r, a), this.renderer?.setScissor(o, c, r, a), this.renderer?.render(this.scene, this.blCam), o = r, this.scene.overrideMaterial = n, this.renderer?.setViewport(o, c, r, a), this.renderer?.setScissor(o, c, r, a), this.renderer?.render(this.scene, this.brCam);
7775
+ c = this.height - a, o = 0, this.drawTo(o, c, r, a, this.tlCam, e), o = r, this.drawTo(o, c, r, a, this.trCam, t), c = 0, o = 0, this.scene.overrideMaterial = i, this.drawTo(o, c, r, a, this.blCam, i), o = r, this.drawTo(o, c, r, a, this.brCam, n);
7748
7776
  };
7749
7777
  // Getters
7750
7778
  get appID() {
@@ -7767,7 +7795,7 @@ class ui extends zt {
7767
7795
  static instance;
7768
7796
  matrix = new hi();
7769
7797
  position = new P();
7770
- rotation = new pn();
7798
+ rotation = new un();
7771
7799
  scale = new P();
7772
7800
  open = !1;
7773
7801
  constructor(e) {
@@ -7836,7 +7864,7 @@ class ui extends zt {
7836
7864
  const n = this.props.three.getScene(this.props.object.uuid);
7837
7865
  if (n) {
7838
7866
  const r = n.getObjectByProperty("uuid", this.props.object.uuid);
7839
- ie(r, e, i);
7867
+ se(r, e, i);
7840
7868
  }
7841
7869
  };
7842
7870
  saveExpanded() {
@@ -7846,7 +7874,7 @@ class ui extends zt {
7846
7874
  return `${this.props.three.app.appID}_transform`;
7847
7875
  }
7848
7876
  }
7849
- function Ws(s) {
7877
+ function Zs(s) {
7850
7878
  switch (s) {
7851
7879
  case "color":
7852
7880
  return "Color";
@@ -7869,7 +7897,7 @@ function Ws(s) {
7869
7897
  }
7870
7898
  return s;
7871
7899
  }
7872
- function Po(s, e) {
7900
+ function Do(s, e) {
7873
7901
  function t() {
7874
7902
  return `${e.app.appID}_light`;
7875
7903
  }
@@ -7882,7 +7910,7 @@ function Po(s, e) {
7882
7910
  for (const o in s.lightInfo) {
7883
7911
  const c = s.lightInfo[o];
7884
7912
  c !== void 0 && (c.isColor !== void 0 ? a.push({
7885
- title: Ws(o),
7913
+ title: Zs(o),
7886
7914
  prop: o,
7887
7915
  type: "color",
7888
7916
  value: c,
@@ -7892,11 +7920,11 @@ function Po(s, e) {
7892
7920
  const m = e.getScene(s.uuid);
7893
7921
  if (m !== null) {
7894
7922
  const f = m.getObjectByProperty("uuid", s.uuid);
7895
- ie(f, l, p);
7923
+ se(f, l, p);
7896
7924
  }
7897
7925
  }
7898
7926
  }) : a.push({
7899
- title: Ws(o),
7927
+ title: Zs(o),
7900
7928
  prop: o,
7901
7929
  type: typeof c,
7902
7930
  value: c,
@@ -7906,7 +7934,7 @@ function Po(s, e) {
7906
7934
  const p = e.getScene(s.uuid);
7907
7935
  if (p !== null) {
7908
7936
  const m = p.getObjectByProperty("uuid", s.uuid);
7909
- ie(m, l, d);
7937
+ se(m, l, d);
7910
7938
  }
7911
7939
  }
7912
7940
  }));
@@ -7923,7 +7951,7 @@ function Po(s, e) {
7923
7951
  }
7924
7952
  );
7925
7953
  }
7926
- function Ao(s) {
7954
+ function Ro(s) {
7927
7955
  const e = s.object, t = s.three;
7928
7956
  function i() {
7929
7957
  return `${t.app.appID}_animation`;
@@ -8026,7 +8054,7 @@ const Yi = {
8026
8054
  children: []
8027
8055
  };
8028
8056
  let ce = { ...Yi };
8029
- function Do(s) {
8057
+ function Io(s) {
8030
8058
  const [e, t] = Z(-1);
8031
8059
  tt(() => {
8032
8060
  function a(c) {
@@ -8082,9 +8110,9 @@ function Do(s) {
8082
8110
  ] }),
8083
8111
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8084
8112
  /* @__PURE__ */ u.jsx(ui, { object: ce, three: s.three }),
8085
- n ? /* @__PURE__ */ u.jsx(Ao, { object: ce, three: s.three }) : null,
8113
+ n ? /* @__PURE__ */ u.jsx(Ro, { object: ce, three: s.three }) : null,
8086
8114
  i.search("camera") > -1 ? Zr(ce, s.three) : null,
8087
- i.search("light") > -1 ? Po(ce, s.three) : null,
8115
+ i.search("light") > -1 ? Do(ce, s.three) : null,
8088
8116
  r ? Yr(ce, s.three) : null
8089
8117
  ] })
8090
8118
  ] }) }, e)
@@ -8092,17 +8120,17 @@ function Do(s) {
8092
8120
  "Inspector"
8093
8121
  );
8094
8122
  }
8095
- class Ro extends zt {
8123
+ class Lo extends zt {
8096
8124
  // Renderer
8097
8125
  autoClear = !0;
8098
8126
  autoClearColor = !0;
8099
8127
  autoClearDepth = !0;
8100
8128
  autoClearStencil = !0;
8101
- outputColorSpace = us;
8129
+ outputColorSpace = ds;
8102
8130
  localClippingEnabled = !1;
8103
8131
  clearColor = new et(0);
8104
8132
  clearAlpha = 1;
8105
- toneMapping = ps;
8133
+ toneMapping = us;
8106
8134
  toneMappingExposure = 1;
8107
8135
  constructor(e) {
8108
8136
  super(e);
@@ -8230,7 +8258,7 @@ class Ro extends zt {
8230
8258
  },
8231
8259
  {
8232
8260
  title: "SRB Color Space",
8233
- value: us
8261
+ value: ds
8234
8262
  },
8235
8263
  {
8236
8264
  title: "Linear SRB Color Space",
@@ -8248,7 +8276,7 @@ class Ro extends zt {
8248
8276
  options: [
8249
8277
  {
8250
8278
  title: "None ",
8251
- value: ps
8279
+ value: us
8252
8280
  },
8253
8281
  {
8254
8282
  title: "Linear ",
@@ -8309,7 +8337,7 @@ class Ro extends zt {
8309
8337
  return `${this.props.three.app.appID}_renderer`;
8310
8338
  }
8311
8339
  }
8312
- function Io(s) {
8340
+ function ko(s) {
8313
8341
  const [e] = Z([]), [t] = Z([]), [i, n] = Z(0), r = (c) => {
8314
8342
  const l = c.value;
8315
8343
  e.push(l), t.push(
@@ -8322,7 +8350,7 @@ function Io(s) {
8322
8350
  onRefresh: () => {
8323
8351
  s.three.refreshScene(l.name);
8324
8352
  },
8325
- children: /* @__PURE__ */ u.jsx(Es, { child: l, scene: l, three: s.three })
8353
+ children: /* @__PURE__ */ u.jsx(bs, { child: l, scene: l, three: s.three })
8326
8354
  },
8327
8355
  Math.random()
8328
8356
  )
@@ -8340,7 +8368,7 @@ function Io(s) {
8340
8368
  onRefresh: () => {
8341
8369
  s.three.refreshScene(l.name);
8342
8370
  },
8343
- children: /* @__PURE__ */ u.jsx(Es, { child: l, scene: l, three: s.three })
8371
+ children: /* @__PURE__ */ u.jsx(bs, { child: l, scene: l, three: s.three })
8344
8372
  },
8345
8373
  Math.random()
8346
8374
  ), n(Date.now());
@@ -8358,12 +8386,12 @@ function Io(s) {
8358
8386
  D.removeEventListener(A.ADD_SCENE, r), D.removeEventListener(A.REFRESH_SCENE, a), D.removeEventListener(A.REMOVE_SCENE, o);
8359
8387
  }), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
8360
8388
  /* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, i),
8361
- /* @__PURE__ */ u.jsx(Do, { three: s.three }),
8362
- /* @__PURE__ */ u.jsx(Ro, { three: s.three }),
8363
- /* @__PURE__ */ u.jsx(ae, { three: s.three })
8389
+ /* @__PURE__ */ u.jsx(Io, { three: s.three }),
8390
+ /* @__PURE__ */ u.jsx(Lo, { three: s.three }),
8391
+ /* @__PURE__ */ u.jsx(te, { three: s.three })
8364
8392
  ] });
8365
8393
  }
8366
- function sl(s) {
8394
+ function al(s) {
8367
8395
  return tt(() => {
8368
8396
  function e(o) {
8369
8397
  let c = null;
@@ -8376,7 +8404,7 @@ function sl(s) {
8376
8404
  d !== void 0 && s.three.setObject(d);
8377
8405
  }, i = (o, c, l) => {
8378
8406
  const p = e(o)?.getObjectByProperty("uuid", o);
8379
- p !== void 0 && ie(p, c, l);
8407
+ p !== void 0 && se(p, c, l);
8380
8408
  }, n = (o) => {
8381
8409
  const c = o.value, { key: l, value: d, uuid: p } = c;
8382
8410
  i(p, l, d);
@@ -8404,7 +8432,7 @@ function sl(s) {
8404
8432
  }
8405
8433
  d.material.needsUpdate = !0;
8406
8434
  };
8407
- c.value.src.length > 0 ? vn(c.value.src).then((m) => {
8435
+ c.value.src.length > 0 ? _n(c.value.src).then((m) => {
8408
8436
  m.offset.set(c.value.offset[0], c.value.offset[1]), m.repeat.set(c.value.repeat[0], c.value.repeat[1]), p(m);
8409
8437
  }) : p(null);
8410
8438
  }
@@ -8422,15 +8450,15 @@ function sl(s) {
8422
8450
  };
8423
8451
  }, []), null;
8424
8452
  }
8425
- function Lo(s) {
8453
+ function Uo(s) {
8426
8454
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
8427
8455
  /* @__PURE__ */ u.jsx("div", { className: "header", children: s.header }),
8428
8456
  s.children,
8429
8457
  /* @__PURE__ */ u.jsx("div", { className: "footer", children: s.footer })
8430
8458
  ] });
8431
8459
  }
8432
- function nl(s) {
8433
- return /* @__PURE__ */ u.jsx(Lo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8460
+ function rl(s) {
8461
+ return /* @__PURE__ */ u.jsx(Uo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8434
8462
  /* @__PURE__ */ u.jsx(
8435
8463
  me,
8436
8464
  {
@@ -8441,65 +8469,65 @@ function nl(s) {
8441
8469
  onSceneUpdate: s.onSceneUpdate
8442
8470
  }
8443
8471
  ),
8444
- /* @__PURE__ */ u.jsx(Io, { three: s.three })
8472
+ /* @__PURE__ */ u.jsx(ko, { three: s.three })
8445
8473
  ] }) });
8446
8474
  }
8447
8475
  export {
8448
8476
  li as Accordion,
8449
- qo as Application,
8477
+ Qo as Application,
8450
8478
  Gi as BaseRemote,
8451
- bn as ChildObject,
8452
- Es as ContainerObject,
8479
+ yn as ChildObject,
8480
+ bs as ContainerObject,
8453
8481
  br as Draggable,
8454
8482
  yr as DraggableItem,
8455
8483
  Er as Dropdown,
8456
8484
  Cr as DropdownItem,
8457
- Lo as Editor,
8458
- Xo as ElementProxy,
8485
+ Uo as Editor,
8486
+ qo as ElementProxy,
8459
8487
  or as ElementProxyReceiver,
8460
8488
  ii as ExportTexture,
8461
- Do as Inspector,
8489
+ Io as Inspector,
8462
8490
  me as MultiView,
8463
- yn as NavButton,
8464
- $o as ProxyManager,
8491
+ vn as NavButton,
8492
+ Ko as ProxyManager,
8465
8493
  Ga as QualityType,
8466
- Ko as RemoteComponents,
8467
- il as RemoteController,
8468
- el as RemoteTheatre,
8469
- tl as RemoteThree,
8470
- sl as SceneInspector,
8471
- Io as SidePanel,
8472
- Vs as Spline,
8473
- Oo as SplineEditor,
8474
- nl as ThreeEditor,
8494
+ Jo as RemoteComponents,
8495
+ nl as RemoteController,
8496
+ il as RemoteTheatre,
8497
+ sl as RemoteThree,
8498
+ al as SceneInspector,
8499
+ ko as SidePanel,
8500
+ Bs as Spline,
8501
+ Mo as SplineEditor,
8502
+ rl as ThreeEditor,
8475
8503
  A as ToolEvents,
8476
8504
  ge as Transform,
8477
- Go as WebworkerEventHandlers,
8505
+ $o as WebworkerEventHandlers,
8478
8506
  oi as capitalize,
8479
8507
  $e as clamp,
8480
- ms as colorToHex,
8508
+ ps as colorToHex,
8481
8509
  Fa as copyToClipboard,
8482
- Vo as cubicBezier,
8483
- Jo as customizeTheatreElements,
8484
- Yo as damp,
8510
+ Wo as cubicBezier,
8511
+ tl as customizeTheatreElements,
8512
+ Vo as damp,
8485
8513
  D as debugDispatcher,
8486
- No as defaultTheatreCallback,
8487
- Fo as detectSettings,
8514
+ zo as defaultTheatreCallback,
8515
+ Ho as detectSettings,
8488
8516
  He as dispose,
8489
8517
  Qa as disposeMaterial,
8490
- Zo as disposeTexture,
8491
- Ho as distance,
8518
+ Go as disposeTexture,
8519
+ Bo as distance,
8492
8520
  Ni as hierarchyUUID,
8493
8521
  Ha as isColor,
8494
- zo as map,
8522
+ Yo as map,
8495
8523
  Ft as mix,
8496
8524
  ri as noop,
8497
8525
  Ui as normalize,
8498
- Wo as parseModelLite,
8526
+ Xo as parseModelLite,
8499
8527
  za as randomID,
8500
- vs as resetThreeObjects,
8528
+ _s as resetThreeObjects,
8501
8529
  Pe as round,
8502
- Bo as roundTo,
8503
- Qo as theatreEditorApp,
8530
+ Zo as roundTo,
8531
+ el as theatreEditorApp,
8504
8532
  ji as totalThreeObjects
8505
8533
  };