@tomorrowevening/hermes 0.0.120 → 0.0.122

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,30 +1,30 @@
1
- import { OrthographicCamera as Pi, Scene as Ys, MeshBasicMaterial as Je, BufferGeometry as gt, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, EventDispatcher as Bs, Texture as Vn, RepeatWrapping as ss, Color as et, ColorManagement as pt, WebGLRenderTarget as Zn, FrontSide as Wn, BackSide as Vs, DoubleSide as Fi, NoBlending as Gn, NormalBlending as Xn, AdditiveBlending as $n, SubtractiveBlending as qn, MultiplyBlending as Kn, CustomBlending as Qn, AddEquation as Jn, SubtractEquation as ea, ReverseSubtractEquation as ta, MinEquation as ia, MaxEquation as sa, ZeroFactor as Zs, OneFactor as Ws, SrcColorFactor as Gs, OneMinusSrcColorFactor as Xs, SrcAlphaFactor as $s, OneMinusSrcAlphaFactor as qs, DstAlphaFactor as Ks, OneMinusDstAlphaFactor as Qs, DstColorFactor as Js, OneMinusDstColorFactor as en, SrcAlphaSaturateFactor as na, ConstantColorFactor as tn, OneMinusConstantColorFactor as sn, ConstantAlphaFactor as nn, OneMinusConstantAlphaFactor as an, Line as Ie, LineBasicMaterial as zi, Ray as aa, Plane as ra, MathUtils as oa, Vector3 as A, Controls as rn, MOUSE as ft, TOUCH as mt, Quaternion as Ee, Spherical as Di, Vector2 as pe, ShaderMaterial as on, GLSL3 as la, PlaneGeometry as ln, Raycaster as si, Euler as cn, Matrix4 as oi, Object3D as _t, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Vt, SphereGeometry as hn, TorusGeometry as bt, CatmullRomCurve3 as ns, Group as ca, AxesHelper as as, MeshDepthMaterial as ha, MeshNormalMaterial as da, PerspectiveCamera as Ct, WebGLRenderer as ua, CameraHelper as pa, SkinnedMesh as ma, SpotLightHelper as fa, PointLightHelper as ga, HemisphereLightHelper as _a, DirectionalLightHelper as va, Clock as ya, Vector4 as ba, Box3 as Ca, Sphere as Ea, SkeletonHelper as Sa, SRGBColorSpace as rs, NoToneMapping as os, NoColorSpace as wa, LinearToneMapping as xa, ReinhardToneMapping as Oa, CineonToneMapping as Ta, ACESFilmicToneMapping as Ma, AgXToneMapping as Aa, NeutralToneMapping as Pa, CustomToneMapping as Da } from "three";
2
- import dn, { useState as Z, useRef as J, useEffect as tt, useMemo as Ut, Component as Nt, createRef as Ve, forwardRef as Ra } from "react";
3
- import { Reorder as un } from "framer-motion";
4
- const pn = () => {
5
- }, _o = () => {
1
+ import { OrthographicCamera as Di, Scene as Vs, MeshBasicMaterial as Je, BufferGeometry as gt, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, ObjectLoader as Vn, AnimationMixer as Zn, EventDispatcher as zi, Texture as Wn, RepeatWrapping as as, Color as et, ColorManagement as pt, WebGLRenderTarget as Gn, FrontSide as Xn, BackSide as Zs, DoubleSide as Hi, NoBlending as $n, NormalBlending as qn, AdditiveBlending as Kn, SubtractiveBlending as Qn, MultiplyBlending as Jn, CustomBlending as ea, AddEquation as ta, SubtractEquation as ia, ReverseSubtractEquation as sa, MinEquation as na, MaxEquation as aa, ZeroFactor as Ws, OneFactor as Gs, SrcColorFactor as Xs, OneMinusSrcColorFactor as $s, SrcAlphaFactor as qs, OneMinusSrcAlphaFactor as Ks, DstAlphaFactor as Qs, OneMinusDstAlphaFactor as Js, DstColorFactor as en, OneMinusDstColorFactor as tn, SrcAlphaSaturateFactor as ra, ConstantColorFactor as sn, OneMinusConstantColorFactor as nn, ConstantAlphaFactor as an, OneMinusConstantAlphaFactor as rn, Line as Ie, LineBasicMaterial as Yi, Ray as oa, Plane as la, MathUtils as ca, Vector3 as A, Controls as on, MOUSE as ft, TOUCH as mt, Quaternion as Ee, Spherical as Ri, Vector2 as pe, ShaderMaterial as ln, GLSL3 as ha, PlaneGeometry as cn, Raycaster as si, Euler as hn, Matrix4 as li, Object3D as _t, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Vt, SphereGeometry as dn, TorusGeometry as bt, CatmullRomCurve3 as rs, Group as da, AxesHelper as os, MeshDepthMaterial as ua, MeshNormalMaterial as pa, PerspectiveCamera as Ct, WebGLRenderer as ma, CameraHelper as fa, SkinnedMesh as ga, SpotLightHelper as _a, PointLightHelper as va, HemisphereLightHelper as ya, DirectionalLightHelper as ba, Clock as Ca, Vector4 as Ea, Box3 as Sa, Sphere as wa, SkeletonHelper as xa, SRGBColorSpace as ls, NoToneMapping as cs, NoColorSpace as Oa, LinearToneMapping as Ta, ReinhardToneMapping as Ma, CineonToneMapping as Aa, ACESFilmicToneMapping as Pa, AgXToneMapping as Da, NeutralToneMapping as Ra, CustomToneMapping as Ia } from "three";
2
+ import un, { useState as Z, useRef as J, useEffect as tt, useMemo as Ut, Component as Nt, createRef as Ve, forwardRef as La } from "react";
3
+ import { Reorder as pn } from "framer-motion";
4
+ const ni = () => {
5
+ }, bo = () => {
6
6
  };
7
- function ni(s) {
7
+ function ai(s) {
8
8
  return s.substring(0, 1).toUpperCase() + s.substring(1);
9
9
  }
10
- function Ia(s) {
10
+ function ka(s) {
11
11
  const e = JSON.stringify(s);
12
12
  return navigator.clipboard.writeText(e), e;
13
13
  }
14
- function La() {
14
+ function Ua() {
15
15
  return Math.round(Math.random() * 1e6).toString();
16
16
  }
17
- function ka(s) {
17
+ function ja(s) {
18
18
  return s.r !== void 0 && s.g !== void 0 && s.b !== void 0;
19
19
  }
20
- function ls(s) {
20
+ function hs(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;
24
24
  }, r = n(e), a = n(t), o = n(i);
25
25
  return "#" + r + a + o;
26
26
  }
27
- function gi(s, e, t, i) {
27
+ function _i(s, e, t, i) {
28
28
  return new (t || (t = Promise))(function(n, r) {
29
29
  function a(l) {
30
30
  try {
@@ -49,8 +49,8 @@ function gi(s, e, t, i) {
49
49
  c((i = i.apply(s, e || [])).next());
50
50
  });
51
51
  }
52
- const Ua = ["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 cs(s) {
52
+ const Na = ["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 ds(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
56
  const mn = typeof window > "u", Le = (() => {
@@ -59,7 +59,7 @@ const mn = typeof window > "u", Le = (() => {
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) };
61
61
  })();
62
- function ja(s, e, t) {
62
+ function Fa(s, e, t) {
63
63
  if (!t)
64
64
  return [e];
65
65
  const i = function(l) {
@@ -94,13 +94,13 @@ function ja(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 hs extends Error {
97
+ class us extends Error {
98
98
  constructor(e) {
99
99
  super(e), Object.setPrototypeOf(this, new.target.prototype);
100
100
  }
101
101
  }
102
- const _i = [], ds = [];
103
- function Na(s, e) {
102
+ const vi = [], ps = [];
103
+ function za(s, e) {
104
104
  if (s === e)
105
105
  return 0;
106
106
  const t = s;
@@ -115,30 +115,30 @@ function Na(s, e) {
115
115
  return n;
116
116
  let o, c, l = 0, d = 0, p = 0;
117
117
  for (; d < i; )
118
- ds[d] = s.charCodeAt(a + d), _i[d] = ++d;
118
+ ps[d] = s.charCodeAt(a + d), vi[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 === ds[d] ? o : o + 1, o = _i[d], l = _i[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
121
+ c = r === ps[d] ? o : o + 1, o = vi[d], l = vi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
122
122
  return l;
123
123
  }
124
- function Fa(s) {
124
+ function Ha(s) {
125
125
  return s != null;
126
126
  }
127
- const za = ({ 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" } = {}) => gi(void 0, void 0, void 0, function* () {
127
+ const Ya = ({ 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" } = {}) => _i(void 0, void 0, void 0, function* () {
128
128
  const a = {};
129
129
  if (mn)
130
130
  return { tier: 0, type: "SSR" };
131
- const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (w) => gi(void 0, void 0, void 0, function* () {
131
+ const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (w) => _i(void 0, void 0, void 0, function* () {
132
132
  const O = yield fetch(`${r}/${w}`).then((L) => L.json());
133
133
  if (parseInt(O.shift().split(".")[0], 10) < 4)
134
- throw new hs("Detect GPU benchmark data is out of date. Please update to version 4x");
134
+ throw new us("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 = (w, O, L, j, R) => ({ device: R, fps: j, gpu: L, isMobile: c, tier: w, type: O });
139
139
  let f, E = "";
140
140
  if (p)
141
- p = cs(p), f = [p];
141
+ p = ds(p), f = [p];
142
142
  else {
143
143
  const w = i || function(L, j = !1) {
144
144
  const R = { alpha: !1, antialias: !1, depth: !1, failIfMajorPerformanceCaveat: j, powerPreference: "high-performance", stencil: !1 };
@@ -151,13 +151,13 @@ const za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
151
151
  const O = Le?.isFirefox ? null : w.getExtension("WEBGL_debug_renderer_info");
152
152
  if (p = O ? w.getParameter(O.UNMASKED_RENDERER_WEBGL) : w.getParameter(w.RENDERER), !p)
153
153
  return m(1, "FALLBACK");
154
- E = p, p = cs(p), f = function(L, j, R) {
155
- return j === "apple gpu" ? ja(L, j, R) : [j];
154
+ E = p, p = ds(p), f = function(L, j, R) {
155
+ return j === "apple gpu" ? Fa(L, j, R) : [j];
156
156
  }(w, p, c);
157
157
  }
158
158
  const y = (yield Promise.all(f.map(function(w) {
159
159
  var O;
160
- return gi(this, void 0, void 0, function* () {
160
+ return _i(this, void 0, void 0, function* () {
161
161
  const L = ((W) => {
162
162
  const le = c ? ["adreno", "apple", "mali-t", "mali", "nvidia", "powervr", "samsung"] : ["intel", "apple", "amd", "radeon", "nvidia", "geforce", "adreno"];
163
163
  for (const Te of le)
@@ -171,7 +171,7 @@ const za = ({ 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 hs)
174
+ if (W instanceof us)
175
175
  throw W;
176
176
  return;
177
177
  }
@@ -186,7 +186,7 @@ const za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
186
186
  if (re === 0)
187
187
  return;
188
188
  const K = w.split(/[.,()\[\]/\s]/g).sort().filter((W, le, Te) => le === 0 || W !== Te[le - 1]).join(" ");
189
- let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, Na(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ce = Number.MAX_VALUE;
189
+ let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, za(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ce = Number.MAX_VALUE;
190
190
  const { devicePixelRatio: se } = window, je = l.width * se * l.height * se;
191
191
  for (const W of he) {
192
192
  const [le, Te] = W, vt = le * Te, it = Math.abs(je - vt);
@@ -197,9 +197,9 @@ const za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
197
197
  const [, , Ne, Fe] = $;
198
198
  return [Ce, Ne, Ue, Fe];
199
199
  });
200
- }))).filter(Fa).sort(([w = Number.MAX_VALUE, O], [L = Number.MAX_VALUE, j]) => w === L ? O - j : w - L);
200
+ }))).filter(Ha).sort(([w = Number.MAX_VALUE, O], [L = Number.MAX_VALUE, j]) => w === L ? O - j : w - L);
201
201
  if (!y.length) {
202
- const w = Ua.find((O) => p.includes(O));
202
+ const w = Na.find((O) => p.includes(O));
203
203
  return w ? m(0, "BLOCKLISTED", w) : m(1, "FALLBACK", `${p} (${E})`);
204
204
  }
205
205
  const [, T, g, v] = y[0];
@@ -211,10 +211,10 @@ const za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
211
211
  T >= S[w] && (C = w);
212
212
  return m(C, "BENCHMARK", g, T, v);
213
213
  });
214
- var Ha = /* @__PURE__ */ ((s) => (s[s.High = 0] = "High", s[s.Medium = 1] = "Medium", s[s.Low = 2] = "Low", s))(Ha || {});
215
- function vo(s) {
214
+ var Ba = /* @__PURE__ */ ((s) => (s[s.High = 0] = "High", s[s.Medium = 1] = "Medium", s[s.Low = 2] = "Low", s))(Ba || {});
215
+ function Co(s) {
216
216
  return new Promise((e) => {
217
- za().then((t) => {
217
+ Ya().then((t) => {
218
218
  let i = !1;
219
219
  const n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
220
220
  if (i = "transferControlToOffscreen" in s, n) {
@@ -238,22 +238,22 @@ function vo(s) {
238
238
  function $e(s, e, t) {
239
239
  return Math.min(e, Math.max(s, t));
240
240
  }
241
- function us(s, e, t) {
241
+ function ms(s, e, t) {
242
242
  return (t - s) / (e - s);
243
243
  }
244
- function Ri(s, e, t) {
244
+ function Ii(s, e, t) {
245
245
  return s * (1 - t) + e * t;
246
246
  }
247
- function yo(s, e) {
247
+ function Eo(s, e) {
248
248
  const t = s - e;
249
249
  return Math.sqrt(t * t);
250
250
  }
251
251
  function Ae(s, e = 1) {
252
252
  return Number(s.toFixed(e));
253
253
  }
254
- const bo = (s) => {
254
+ const So = (s) => {
255
255
  s?.dispose();
256
- }, Ya = (s) => {
256
+ }, Va = (s) => {
257
257
  s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
258
258
  }, He = (s) => {
259
259
  if (s) {
@@ -263,19 +263,19 @@ const bo = (s) => {
263
263
  }
264
264
  if (s.parent && s.parent.remove(s), s.isMesh) {
265
265
  const e = s;
266
- e.geometry?.dispose(), Ya(e.material);
266
+ e.geometry?.dispose(), Va(e.material);
267
267
  }
268
268
  s.dispose !== void 0 && s.dispose();
269
269
  }
270
270
  };
271
- let Ii = 0;
272
- const ps = () => {
273
- Ii = 0;
274
- }, Li = (s) => {
271
+ let Li = 0;
272
+ const fs = () => {
273
+ Li = 0;
274
+ }, ki = (s) => {
275
275
  if (!s)
276
276
  return;
277
277
  let e = s.name.replaceAll(" ", "").replaceAll("/", ".");
278
- if (e.length === 0 && (e = `obj_${Ii}`, Ii++), s.parent !== null && s.parent.uuid.length > 0 && (e = `${s.parent.uuid}.${e}`), s.uuid = e, s.isMesh !== void 0) {
278
+ if (e.length === 0 && (e = `obj_${Li}`, Li++), s.parent !== null && s.parent.uuid.length > 0 && (e = `${s.parent.uuid}.${e}`), s.uuid = e, s.isMesh !== void 0) {
279
279
  const t = s;
280
280
  if (Array.isArray(t.material))
281
281
  t.material.forEach((i, n) => {
@@ -286,7 +286,7 @@ const ps = () => {
286
286
  i.uuid = `${e}.material`;
287
287
  }
288
288
  }
289
- s.children.forEach((t) => Li(t));
289
+ s.children.forEach((t) => ki(t));
290
290
  };
291
291
  class ei {
292
292
  static renderer;
@@ -317,7 +317,7 @@ class ei {
317
317
  }
318
318
  static renderToCanvas(e) {
319
319
  if (this.material === null) {
320
- this.camera = new Pi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ys(), this.material = new Je();
320
+ this.camera = new Di(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Vs(), this.material = new Je();
321
321
  const t = new gt();
322
322
  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));
323
323
  const i = new M(t, this.material);
@@ -332,7 +332,93 @@ class ei {
332
332
  return this.renderer.domElement;
333
333
  }
334
334
  }
335
- class Co {
335
+ function wo(s) {
336
+ const e = new Vn(), t = e.parse(s.scene), i = new Zn(t);
337
+ if (s.animations.length > 0) {
338
+ const r = s.animations.map((o) => AnimationClip.parse(o));
339
+ i.clipAction(r[0]).play();
340
+ }
341
+ const n = [];
342
+ return s.cameras && s.cameras.length > 0 && s.cameras.forEach((r) => {
343
+ const a = e.parse(r);
344
+ n.push(a);
345
+ }), {
346
+ model: t,
347
+ mixer: i,
348
+ cameras: n
349
+ };
350
+ }
351
+ class Za extends zi {
352
+ style = {};
353
+ left = 0;
354
+ top = 0;
355
+ width = 0;
356
+ height = 0;
357
+ ownerDocument = void 0;
358
+ get clientWidth() {
359
+ return this.width;
360
+ }
361
+ set clientWidth(e) {
362
+ this.width = e;
363
+ }
364
+ get clientHeight() {
365
+ return this.height;
366
+ }
367
+ set clientHeight(e) {
368
+ this.height = e;
369
+ }
370
+ // OrbitControls call these as of r132. Implementing as no-ops
371
+ setPointerCapture() {
372
+ }
373
+ releasePointerCapture() {
374
+ }
375
+ getBoundingClientRect() {
376
+ return {
377
+ x: this.left,
378
+ y: this.top,
379
+ left: this.left,
380
+ top: this.top,
381
+ width: this.width,
382
+ height: this.height,
383
+ right: this.left + this.width,
384
+ bottom: this.top + this.height,
385
+ toJSON: () => ({})
386
+ // Satisfies the DOMRect interface
387
+ };
388
+ }
389
+ handleEvent(e) {
390
+ if (e.type === "size") {
391
+ this.left = e.left, this.top = e.top, this.width = e.width, this.height = e.height;
392
+ return;
393
+ }
394
+ e.preventDefault = ni, e.stopPropagation = ni, this.dispatchEvent(e);
395
+ }
396
+ focus() {
397
+ }
398
+ getRootNode() {
399
+ return this;
400
+ }
401
+ }
402
+ class xo {
403
+ targets = {};
404
+ constructor() {
405
+ this.handleEvent = this.handleEvent.bind(this);
406
+ }
407
+ makeProxy(e) {
408
+ const { id: t } = e, i = new Za();
409
+ this.targets[t] = i;
410
+ }
411
+ getProxy(e) {
412
+ return this.targets[e];
413
+ }
414
+ handleEvent(e) {
415
+ this.targets[e.id]?.handleEvent(e.data);
416
+ }
417
+ }
418
+ function Oo() {
419
+ return new Worker(new URL("/assets/LoadWorker-e3775bcc.js", self.location), { type: "module" });
420
+ }
421
+ class To {
336
422
  components = /* @__PURE__ */ new Map();
337
423
  listen;
338
424
  // Protected
@@ -391,8 +477,8 @@ class Co {
391
477
  }
392
478
  }
393
479
  var P = /* @__PURE__ */ ((s) => (s.CUSTOM = "ToolEvents::custom", s.SELECT_DROPDOWN = "ToolEvents::selectDropdown", s.DRAG_UPDATE = "ToolEvents::dragUpdate", s.ADD_SCENE = "ToolEvents::addScene", s.REFRESH_SCENE = "ToolEvents::refreshScene", s.REMOVE_SCENE = "ToolEvents::removeScene", s.SET_SCENE = "ToolEvents::setScene", s.GET_OBJECT = "ToolEvents::getObject", s.SET_OBJECT = "ToolEvents::setObject", s.UPDATE_OBJECT = "ToolEvents::updateObject", s.CREATE_TEXTURE = "ToolEvents::createTexture", s.REQUEST_METHOD = "ToolEvents::requestMethod", s.ADD_CAMERA = "ToolEvents::addCamera", s.REMOVE_CAMERA = "ToolEvents::removeCamera", s.ADD_GROUP = "ToolEvents::addGroup", s.REMOVE_GROUP = "ToolEvents::removeGroup", s.ADD_SPLINE = "ToolEvents::addSpline", s.ADD_RENDERER = "ToolEvents::addRenderer", s.UPDATE_RENDERER = "ToolEvents::updateRenderer", s))(P || {});
394
- const D = new Bs();
395
- class Hi {
480
+ const D = new zi();
481
+ class Bi {
396
482
  app;
397
483
  constructor(e) {
398
484
  this.app = e;
@@ -404,7 +490,7 @@ class Hi {
404
490
  handleEditor(e, t, i) {
405
491
  }
406
492
  }
407
- class Eo extends Hi {
493
+ class Mo extends Bi {
408
494
  selectDropdown(e, t) {
409
495
  this.app.send({
410
496
  event: "selectComponent",
@@ -436,7 +522,7 @@ class Eo extends Hi {
436
522
  }
437
523
  }
438
524
  }
439
- function So(s, e, t) {
525
+ function Ao(s, e, t) {
440
526
  if (s.editor) {
441
527
  t.ui.restore(), t.onSelectionChange((a) => {
442
528
  a.length < 1 || a.forEach((o) => {
@@ -479,7 +565,7 @@ function So(s, e, t) {
479
565
  } else
480
566
  t.ui.hide();
481
567
  }
482
- function wo() {
568
+ function Po() {
483
569
  setTimeout(() => {
484
570
  const s = document.getElementById("theatrejs-studio-root");
485
571
  if (s === null || s.shadowRoot === null)
@@ -505,7 +591,7 @@ function wo() {
505
591
  }
506
592
  }, 1e3);
507
593
  }
508
- class xo extends Hi {
594
+ class Do extends Bi {
509
595
  project;
510
596
  sheets = /* @__PURE__ */ new Map();
511
597
  sheetObjects = /* @__PURE__ */ new Map();
@@ -567,12 +653,12 @@ class xo extends Hi {
567
653
  return;
568
654
  const c = `${this.getSheetInstance(e, r)}_${t}`;
569
655
  let l = this.sheetObjects.get(c);
570
- l !== void 0 ? l = a.object(t, { ...i, ...l.value }, { reconfigure: !0 }) : l = a.object(t, i), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n : pn);
656
+ l !== void 0 ? l = a.object(t, { ...i, ...l.value }, { reconfigure: !0 }) : l = a.object(t, i), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n : ni);
571
657
  const d = l.onValuesChange((p) => {
572
658
  if (this.app.editor) {
573
659
  for (const f in p) {
574
660
  const E = p[f];
575
- typeof E == "object" && ka(E) && (p[f] = {
661
+ typeof E == "object" && ja(E) && (p[f] = {
576
662
  r: E.r,
577
663
  g: E.g,
578
664
  b: E.b,
@@ -679,7 +765,7 @@ class xo extends Hi {
679
765
  this.studio?.ui.hide();
680
766
  }
681
767
  }
682
- function Ba(s) {
768
+ function Wa(s) {
683
769
  if (s.name === "cameras")
684
770
  return "camera";
685
771
  if (s.name === "interactive")
@@ -704,7 +790,7 @@ function ut(s) {
704
790
  e.children.push(ut(t));
705
791
  }), e;
706
792
  }
707
- function Va(s) {
793
+ function Ga(s) {
708
794
  const e = {};
709
795
  for (const t in s) {
710
796
  const i = s[t].value;
@@ -720,7 +806,7 @@ function Va(s) {
720
806
  }
721
807
  return e;
722
808
  }
723
- function Za(s) {
809
+ function Xa(s) {
724
810
  switch (s) {
725
811
  case "blendSrcAlpha":
726
812
  case "blendDstAlpha":
@@ -735,7 +821,7 @@ function Za(s) {
735
821
  function at(s) {
736
822
  const e = {};
737
823
  for (const t in s) {
738
- if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || Za(t))
824
+ if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || Xa(t))
739
825
  continue;
740
826
  const i = typeof s[t], n = s[t];
741
827
  switch (i) {
@@ -749,7 +835,7 @@ function at(s) {
749
835
  src: ei.renderToBlob(n),
750
836
  offset: [n.offset.x, n.offset.y],
751
837
  repeat: [n.repeat.x, n.repeat.y]
752
- } : t === "uniforms" && (e[t] = Va(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
838
+ } : t === "uniforms" && (e[t] = Ga(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
753
839
  src: "",
754
840
  offset: [0, 0],
755
841
  repeat: [1, 1]
@@ -759,7 +845,7 @@ function at(s) {
759
845
  }
760
846
  return s.anisotropy !== void 0 && (e.anisotropy = s.anisotropy), s.clearcoat !== void 0 && (e.clearcoat = s.clearcoat), s.iridescence !== void 0 && (e.iridescence = s.iridescence), s.dispersion !== void 0 && (e.dispersion = s.dispersion), s.sheen !== void 0 && (e.sheen = s.sheen), s.transmission !== void 0 && (e.transmission = s.transmission), s.transmission !== void 0 && (e.transmission = s.transmission), e;
761
847
  }
762
- function vi(s) {
848
+ function yi(s) {
763
849
  s.updateMatrix();
764
850
  const e = {
765
851
  name: s.name,
@@ -840,7 +926,7 @@ function vi(s) {
840
926
  });
841
927
  return e;
842
928
  }
843
- function Wa(s, e) {
929
+ function $a(s, e) {
844
930
  const t = e.split(".");
845
931
  switch (t.length) {
846
932
  case 1:
@@ -857,7 +943,7 @@ function Wa(s, e) {
857
943
  return s[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
858
944
  }
859
945
  }
860
- function Ga(s, e) {
946
+ function qa(s, e) {
861
947
  for (const t in e)
862
948
  s[t] = e[t];
863
949
  }
@@ -902,19 +988,19 @@ function ie(s, e, t) {
902
988
  a = s[i[0]][i[1]][i[2]][i[3]][i[4]];
903
989
  break;
904
990
  }
905
- a != null && Ga(a, t);
991
+ a != null && qa(a, t);
906
992
  }
907
993
  }
908
994
  function fn(s) {
909
995
  return new Promise((e, t) => {
910
996
  const i = new Image();
911
997
  i.onload = () => {
912
- const n = new Vn(i);
913
- n.wrapS = ss, n.wrapT = ss, n.needsUpdate = !0, e(n);
998
+ const n = new Wn(i);
999
+ n.wrapS = as, n.wrapT = as, n.needsUpdate = !0, e(n);
914
1000
  }, i.onerror = t, i.src = s;
915
1001
  });
916
1002
  }
917
- class Oo extends Hi {
1003
+ class Ro extends Bi {
918
1004
  canvas = null;
919
1005
  // Canvas or OffscreenCanvas
920
1006
  inputElement = null;
@@ -940,7 +1026,7 @@ class Oo extends Hi {
940
1026
  }
941
1027
  setObject(e) {
942
1028
  this.renderer !== void 0 && (ei.renderer = this.renderer);
943
- const t = vi(e);
1029
+ const t = yi(e);
944
1030
  this.app.send({
945
1031
  event: "setObject",
946
1032
  target: "editor",
@@ -1027,7 +1113,7 @@ class Oo extends Hi {
1027
1113
  }
1028
1114
  // Renderer
1029
1115
  setRenderer(e, t = null) {
1030
- if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t, !this.app.debugEnabled)
1116
+ if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t !== null ? t : this.canvas, !this.app.debugEnabled)
1031
1117
  return;
1032
1118
  const i = `#${e.getClearColor(new et()).getHexString()}`;
1033
1119
  this.app.send({
@@ -1059,7 +1145,7 @@ class Oo extends Hi {
1059
1145
  addScene(e) {
1060
1146
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
1061
1147
  return;
1062
- ps(), Li(e);
1148
+ fs(), ki(e);
1063
1149
  const t = ut(e);
1064
1150
  this.app.send({
1065
1151
  event: "addScene",
@@ -1102,7 +1188,7 @@ class Oo extends Hi {
1102
1188
  setScene(e) {
1103
1189
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
1104
1190
  return;
1105
- this.renderer !== void 0 && (ei.renderer = this.renderer), ps(), Li(e);
1191
+ this.renderer !== void 0 && (ei.renderer = this.renderer), fs(), ki(e);
1106
1192
  const t = ut(e);
1107
1193
  this.app.send({
1108
1194
  event: "setScene",
@@ -1114,7 +1200,7 @@ class Oo extends Hi {
1114
1200
  addCamera(e) {
1115
1201
  if (!this.app.debugEnabled)
1116
1202
  return;
1117
- const t = vi(e);
1203
+ const t = yi(e);
1118
1204
  this.app.send({
1119
1205
  event: "addCamera",
1120
1206
  target: "editor",
@@ -1124,7 +1210,7 @@ class Oo extends Hi {
1124
1210
  removeCamera(e) {
1125
1211
  if (!this.app.debugEnabled)
1126
1212
  return;
1127
- const t = vi(e);
1213
+ const t = yi(e);
1128
1214
  this.app.send({
1129
1215
  event: "removeCamera",
1130
1216
  target: "editor",
@@ -1200,7 +1286,7 @@ class Oo extends Hi {
1200
1286
  }
1201
1287
  // Renderer
1202
1288
  addRT(e, t) {
1203
- const i = new Zn(32, 32, t);
1289
+ const i = new Gn(32, 32, t);
1204
1290
  i.texture.name = e, this.renderTargets.set(e, i);
1205
1291
  }
1206
1292
  resize(e, t) {
@@ -1224,7 +1310,7 @@ class Oo extends Hi {
1224
1310
  return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
1225
1311
  }
1226
1312
  }
1227
- var ki = { exports: {} }, Et = {};
1313
+ var Ui = { exports: {} }, Et = {};
1228
1314
  /**
1229
1315
  * @license React
1230
1316
  * react-jsx-runtime.production.min.js
@@ -1234,12 +1320,12 @@ var ki = { exports: {} }, Et = {};
1234
1320
  * This source code is licensed under the MIT license found in the
1235
1321
  * LICENSE file in the root directory of this source tree.
1236
1322
  */
1237
- var ms;
1238
- function Xa() {
1239
- if (ms)
1323
+ var gs;
1324
+ function Ka() {
1325
+ if (gs)
1240
1326
  return Et;
1241
- ms = 1;
1242
- var s = dn, 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 };
1327
+ gs = 1;
1328
+ var s = un, 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 };
1243
1329
  function a(o, c, l) {
1244
1330
  var d, p = {}, m = null, f = null;
1245
1331
  l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
@@ -1262,10 +1348,10 @@ var St = {};
1262
1348
  * This source code is licensed under the MIT license found in the
1263
1349
  * LICENSE file in the root directory of this source tree.
1264
1350
  */
1265
- var fs;
1266
- function $a() {
1267
- return fs || (fs = 1, process.env.NODE_ENV !== "production" && function() {
1268
- var s = dn, 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"), E = Symbol.iterator, y = "@@iterator";
1351
+ var _s;
1352
+ function Qa() {
1353
+ return _s || (_s = 1, process.env.NODE_ENV !== "production" && function() {
1354
+ var s = un, 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"), E = Symbol.iterator, y = "@@iterator";
1269
1355
  function T(h) {
1270
1356
  if (h === null || typeof h != "object")
1271
1357
  return null;
@@ -1430,13 +1516,13 @@ function $a() {
1430
1516
  ` + it + h;
1431
1517
  }
1432
1518
  }
1433
- var hi = !1, zt;
1519
+ var di = !1, zt;
1434
1520
  {
1435
1521
  var Cn = typeof WeakMap == "function" ? WeakMap : Map;
1436
1522
  zt = new Cn();
1437
1523
  }
1438
- function Bi(h, b) {
1439
- if (!h || hi)
1524
+ function Zi(h, b) {
1525
+ if (!h || di)
1440
1526
  return "";
1441
1527
  {
1442
1528
  var x = zt.get(h);
@@ -1444,7 +1530,7 @@ function $a() {
1444
1530
  return x;
1445
1531
  }
1446
1532
  var k;
1447
- hi = !0;
1533
+ di = !0;
1448
1534
  var H = Error.prepareStackTrace;
1449
1535
  Error.prepareStackTrace = void 0;
1450
1536
  var G;
@@ -1501,13 +1587,13 @@ function $a() {
1501
1587
  }
1502
1588
  }
1503
1589
  } finally {
1504
- hi = !1, vt.current = G, Te(), Error.prepareStackTrace = H;
1590
+ di = !1, vt.current = G, Te(), Error.prepareStackTrace = H;
1505
1591
  }
1506
- var nt = h ? h.displayName || h.name : "", is = nt ? Ft(nt) : "";
1507
- return typeof h == "function" && zt.set(h, is), is;
1592
+ var nt = h ? h.displayName || h.name : "", ns = nt ? Ft(nt) : "";
1593
+ return typeof h == "function" && zt.set(h, ns), ns;
1508
1594
  }
1509
1595
  function En(h, b, x) {
1510
- return Bi(h, !1);
1596
+ return Zi(h, !1);
1511
1597
  }
1512
1598
  function Sn(h) {
1513
1599
  var b = h.prototype;
@@ -1517,7 +1603,7 @@ function $a() {
1517
1603
  if (h == null)
1518
1604
  return "";
1519
1605
  if (typeof h == "function")
1520
- return Bi(h, Sn(h));
1606
+ return Zi(h, Sn(h));
1521
1607
  if (typeof h == "string")
1522
1608
  return Ft(h);
1523
1609
  switch (h) {
@@ -1542,13 +1628,13 @@ function $a() {
1542
1628
  }
1543
1629
  return "";
1544
1630
  }
1545
- var Yt = Object.prototype.hasOwnProperty, Vi = {}, Zi = g.ReactDebugCurrentFrame;
1631
+ var Yt = Object.prototype.hasOwnProperty, Wi = {}, Gi = g.ReactDebugCurrentFrame;
1546
1632
  function Bt(h) {
1547
1633
  if (h) {
1548
1634
  var b = h._owner, x = Ht(h.type, h._source, b ? b.type : null);
1549
- Zi.setExtraStackFrame(x);
1635
+ Gi.setExtraStackFrame(x);
1550
1636
  } else
1551
- Zi.setExtraStackFrame(null);
1637
+ Gi.setExtraStackFrame(null);
1552
1638
  }
1553
1639
  function wn(h, b, x, k, H) {
1554
1640
  {
@@ -1565,12 +1651,12 @@ function $a() {
1565
1651
  } catch (te) {
1566
1652
  N = te;
1567
1653
  }
1568
- N && !(N instanceof Error) && (Bt(H), v("%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", x, F, typeof N), Bt(null)), N instanceof Error && !(N.message in Vi) && (Vi[N.message] = !0, Bt(H), v("Failed %s type: %s", x, N.message), Bt(null));
1654
+ N && !(N instanceof Error) && (Bt(H), v("%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", x, F, typeof N), Bt(null)), N instanceof Error && !(N.message in Wi) && (Wi[N.message] = !0, Bt(H), v("Failed %s type: %s", x, N.message), Bt(null));
1569
1655
  }
1570
1656
  }
1571
1657
  }
1572
1658
  var xn = Array.isArray;
1573
- function di(h) {
1659
+ function ui(h) {
1574
1660
  return xn(h);
1575
1661
  }
1576
1662
  function On(h) {
@@ -1581,25 +1667,25 @@ function $a() {
1581
1667
  }
1582
1668
  function Tn(h) {
1583
1669
  try {
1584
- return Wi(h), !1;
1670
+ return Xi(h), !1;
1585
1671
  } catch {
1586
1672
  return !0;
1587
1673
  }
1588
1674
  }
1589
- function Wi(h) {
1675
+ function Xi(h) {
1590
1676
  return "" + h;
1591
1677
  }
1592
- function Gi(h) {
1678
+ function $i(h) {
1593
1679
  if (Tn(h))
1594
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", On(h)), Wi(h);
1680
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", On(h)), Xi(h);
1595
1681
  }
1596
1682
  var yt = g.ReactCurrentOwner, Mn = {
1597
1683
  key: !0,
1598
1684
  ref: !0,
1599
1685
  __self: !0,
1600
1686
  __source: !0
1601
- }, Xi, $i, ui;
1602
- ui = {};
1687
+ }, qi, Ki, pi;
1688
+ pi = {};
1603
1689
  function An(h) {
1604
1690
  if (Yt.call(h, "ref")) {
1605
1691
  var b = Object.getOwnPropertyDescriptor(h, "ref").get;
@@ -1619,13 +1705,13 @@ function $a() {
1619
1705
  function Dn(h, b) {
1620
1706
  if (typeof h.ref == "string" && yt.current && b && yt.current.stateNode !== b) {
1621
1707
  var x = re(yt.current.type);
1622
- ui[x] || (v('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(yt.current.type), h.ref), ui[x] = !0);
1708
+ pi[x] || (v('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(yt.current.type), h.ref), pi[x] = !0);
1623
1709
  }
1624
1710
  }
1625
1711
  function Rn(h, b) {
1626
1712
  {
1627
1713
  var x = function() {
1628
- Xi || (Xi = !0, v("%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));
1714
+ qi || (qi = !0, v("%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));
1629
1715
  };
1630
1716
  x.isReactWarning = !0, Object.defineProperty(h, "key", {
1631
1717
  get: x,
@@ -1636,7 +1722,7 @@ function $a() {
1636
1722
  function In(h, b) {
1637
1723
  {
1638
1724
  var x = function() {
1639
- $i || ($i = !0, v("%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));
1725
+ Ki || (Ki = !0, v("%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));
1640
1726
  };
1641
1727
  x.isReactWarning = !0, Object.defineProperty(h, "ref", {
1642
1728
  get: x,
@@ -1676,7 +1762,7 @@ function $a() {
1676
1762
  function kn(h, b, x, k, H) {
1677
1763
  {
1678
1764
  var G, F = {}, N = null, fe = null;
1679
- x !== void 0 && (Gi(x), N = "" + x), Pn(b) && (Gi(b.key), N = "" + b.key), An(b) && (fe = b.ref, Dn(b, H));
1765
+ x !== void 0 && ($i(x), N = "" + x), Pn(b) && ($i(b.key), N = "" + b.key), An(b) && (fe = b.ref, Dn(b, H));
1680
1766
  for (G in b)
1681
1767
  Yt.call(b, G) && !Mn.hasOwnProperty(G) && (F[G] = b[G]);
1682
1768
  if (h && h.defaultProps) {
@@ -1691,23 +1777,23 @@ function $a() {
1691
1777
  return Ln(h, N, fe, H, k, yt.current, F);
1692
1778
  }
1693
1779
  }
1694
- var pi = g.ReactCurrentOwner, qi = g.ReactDebugCurrentFrame;
1780
+ var mi = g.ReactCurrentOwner, Qi = g.ReactDebugCurrentFrame;
1695
1781
  function st(h) {
1696
1782
  if (h) {
1697
1783
  var b = h._owner, x = Ht(h.type, h._source, b ? b.type : null);
1698
- qi.setExtraStackFrame(x);
1784
+ Qi.setExtraStackFrame(x);
1699
1785
  } else
1700
- qi.setExtraStackFrame(null);
1786
+ Qi.setExtraStackFrame(null);
1701
1787
  }
1702
- var mi;
1703
- mi = !1;
1704
- function fi(h) {
1788
+ var fi;
1789
+ fi = !1;
1790
+ function gi(h) {
1705
1791
  return typeof h == "object" && h !== null && h.$$typeof === e;
1706
1792
  }
1707
- function Ki() {
1793
+ function Ji() {
1708
1794
  {
1709
- if (pi.current) {
1710
- var h = re(pi.current.type);
1795
+ if (mi.current) {
1796
+ var h = re(mi.current.type);
1711
1797
  if (h)
1712
1798
  return `
1713
1799
 
@@ -1727,10 +1813,10 @@ Check your code at ` + b + ":" + x + ".";
1727
1813
  return "";
1728
1814
  }
1729
1815
  }
1730
- var Qi = {};
1816
+ var es = {};
1731
1817
  function jn(h) {
1732
1818
  {
1733
- var b = Ki();
1819
+ var b = Ji();
1734
1820
  if (!b) {
1735
1821
  var x = typeof h == "string" ? h : h.displayName || h.name;
1736
1822
  x && (b = `
@@ -1740,35 +1826,35 @@ Check the top-level render call using <` + x + ">.");
1740
1826
  return b;
1741
1827
  }
1742
1828
  }
1743
- function Ji(h, b) {
1829
+ function ts(h, b) {
1744
1830
  {
1745
1831
  if (!h._store || h._store.validated || h.key != null)
1746
1832
  return;
1747
1833
  h._store.validated = !0;
1748
1834
  var x = jn(b);
1749
- if (Qi[x])
1835
+ if (es[x])
1750
1836
  return;
1751
- Qi[x] = !0;
1837
+ es[x] = !0;
1752
1838
  var k = "";
1753
- h && h._owner && h._owner !== pi.current && (k = " It was passed a child from " + re(h._owner.type) + "."), st(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, k), st(null);
1839
+ h && h._owner && h._owner !== mi.current && (k = " It was passed a child from " + re(h._owner.type) + "."), st(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', x, k), st(null);
1754
1840
  }
1755
1841
  }
1756
- function es(h, b) {
1842
+ function is(h, b) {
1757
1843
  {
1758
1844
  if (typeof h != "object")
1759
1845
  return;
1760
- if (di(h))
1846
+ if (ui(h))
1761
1847
  for (var x = 0; x < h.length; x++) {
1762
1848
  var k = h[x];
1763
- fi(k) && Ji(k, b);
1849
+ gi(k) && ts(k, b);
1764
1850
  }
1765
- else if (fi(h))
1851
+ else if (gi(h))
1766
1852
  h._store && (h._store.validated = !0);
1767
1853
  else if (h) {
1768
1854
  var H = T(h);
1769
1855
  if (typeof H == "function" && H !== h.entries)
1770
1856
  for (var G = H.call(h), F; !(F = G.next()).done; )
1771
- fi(F.value) && Ji(F.value, b);
1857
+ gi(F.value) && ts(F.value, b);
1772
1858
  }
1773
1859
  }
1774
1860
  }
@@ -1789,8 +1875,8 @@ Check the top-level render call using <` + x + ">.");
1789
1875
  if (x) {
1790
1876
  var k = re(b);
1791
1877
  wn(x, h.props, "prop", k, h);
1792
- } else if (b.PropTypes !== void 0 && !mi) {
1793
- mi = !0;
1878
+ } else if (b.PropTypes !== void 0 && !fi) {
1879
+ fi = !0;
1794
1880
  var H = re(b);
1795
1881
  v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
1796
1882
  }
@@ -1809,16 +1895,16 @@ Check the top-level render call using <` + x + ">.");
1809
1895
  h.ref !== null && (st(h), v("Invalid attribute `ref` supplied to `React.Fragment`."), st(null));
1810
1896
  }
1811
1897
  }
1812
- function ts(h, b, x, k, H, G) {
1898
+ function ss(h, b, x, k, H, G) {
1813
1899
  {
1814
1900
  var F = B(h);
1815
1901
  if (!F) {
1816
1902
  var N = "";
1817
1903
  (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.");
1818
1904
  var fe = Un(H);
1819
- fe ? N += fe : N += Ki();
1905
+ fe ? N += fe : N += Ji();
1820
1906
  var te;
1821
- h === null ? te = "null" : di(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, v("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);
1907
+ h === null ? te = "null" : ui(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, v("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);
1822
1908
  }
1823
1909
  var ne = kn(h, b, x, H, G);
1824
1910
  if (ne == null)
@@ -1827,38 +1913,38 @@ Check the top-level render call using <` + x + ">.");
1827
1913
  var we = b.children;
1828
1914
  if (we !== void 0)
1829
1915
  if (k)
1830
- if (di(we)) {
1916
+ if (ui(we)) {
1831
1917
  for (var nt = 0; nt < we.length; nt++)
1832
- es(we[nt], h);
1918
+ is(we[nt], h);
1833
1919
  Object.freeze && Object.freeze(we);
1834
1920
  } else
1835
1921
  v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1836
1922
  else
1837
- es(we, h);
1923
+ is(we, h);
1838
1924
  }
1839
1925
  return h === i ? Fn(ne) : Nn(ne), ne;
1840
1926
  }
1841
1927
  }
1842
1928
  function zn(h, b, x) {
1843
- return ts(h, b, x, !0);
1929
+ return ss(h, b, x, !0);
1844
1930
  }
1845
1931
  function Hn(h, b, x) {
1846
- return ts(h, b, x, !1);
1932
+ return ss(h, b, x, !1);
1847
1933
  }
1848
1934
  var Yn = Hn, Bn = zn;
1849
1935
  St.Fragment = i, St.jsx = Yn, St.jsxs = Bn;
1850
1936
  }()), St;
1851
1937
  }
1852
- process.env.NODE_ENV === "production" ? ki.exports = Xa() : ki.exports = $a();
1853
- var u = ki.exports;
1938
+ process.env.NODE_ENV === "production" ? Ui.exports = Ka() : Ui.exports = Qa();
1939
+ var u = Ui.exports;
1854
1940
  function gn(s) {
1855
1941
  return s.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ u.jsx("button", { children: s.title });
1856
1942
  }
1857
- const qa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1943
+ const Ja = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1858
1944
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1859
1945
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1860
1946
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1861
- ] }), Ka = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1947
+ ] }), er = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1862
1948
  "path",
1863
1949
  {
1864
1950
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1\r
@@ -1866,16 +1952,16 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1866
1952
  C11,8.22,10.74,8,10.43,8z`
1867
1953
  }
1868
1954
  ) });
1869
- function Qa(s) {
1870
- return /* @__PURE__ */ u.jsx(un.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1871
- Ka,
1955
+ function tr(s) {
1956
+ return /* @__PURE__ */ u.jsx(pn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1957
+ er,
1872
1958
  /* @__PURE__ */ u.jsx("span", { children: s.title }),
1873
1959
  /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1874
1960
  s.onDelete(s.index);
1875
- }, children: qa })
1961
+ }, children: Ja })
1876
1962
  ] }) }, s.title);
1877
1963
  }
1878
- function Ja(s) {
1964
+ function ir(s) {
1879
1965
  const [e, t] = Z(!1), [i, n] = Z(s.options), r = (l) => {
1880
1966
  s.onDragComplete(l), n(l);
1881
1967
  }, a = (l) => {
@@ -1883,18 +1969,18 @@ function Ja(s) {
1883
1969
  d.splice(l, 1), r(d);
1884
1970
  }, o = [];
1885
1971
  i.forEach((l, d) => {
1886
- o.push(/* @__PURE__ */ u.jsx(Qa, { index: d, title: l, onDelete: a }, l));
1972
+ o.push(/* @__PURE__ */ u.jsx(tr, { index: d, title: l, onDelete: a }, l));
1887
1973
  });
1888
1974
  let c = "dropdown draggable";
1889
1975
  return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
1890
1976
  /* @__PURE__ */ u.jsx(gn, { title: s.title }),
1891
- /* @__PURE__ */ u.jsx(un.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
1977
+ /* @__PURE__ */ u.jsx(pn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
1892
1978
  ] });
1893
1979
  }
1894
- function er(s) {
1980
+ function sr(s) {
1895
1981
  const [e, t] = Z(!1), i = [];
1896
1982
  s.options.map((r, a) => {
1897
- s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(tr, { option: r }, a));
1983
+ s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(nr, { option: r }, a));
1898
1984
  });
1899
1985
  let n = "dropdown";
1900
1986
  return s.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
@@ -1916,13 +2002,13 @@ function er(s) {
1916
2002
  }
1917
2003
  );
1918
2004
  }
1919
- function tr(s) {
2005
+ function nr(s) {
1920
2006
  const { option: e } = s, [t, i] = Z("");
1921
2007
  let n;
1922
2008
  switch (e.type) {
1923
2009
  case "draggable":
1924
2010
  n = /* @__PURE__ */ u.jsx(
1925
- Ja,
2011
+ ir,
1926
2012
  {
1927
2013
  title: e.title,
1928
2014
  options: e.value,
@@ -1935,7 +2021,7 @@ function tr(s) {
1935
2021
  break;
1936
2022
  case "dropdown":
1937
2023
  n = /* @__PURE__ */ u.jsx(
1938
- er,
2024
+ sr,
1939
2025
  {
1940
2026
  title: e.title,
1941
2027
  options: e.value,
@@ -1956,9 +2042,9 @@ function tr(s) {
1956
2042
  );
1957
2043
  break;
1958
2044
  }
1959
- return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, La());
2045
+ return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ua());
1960
2046
  }
1961
- function To(s, e, t) {
2047
+ function Io(s, e, t) {
1962
2048
  function i(r) {
1963
2049
  switch (e.forEach((a) => {
1964
2050
  a.callback(s, a.remote, r);
@@ -1981,7 +2067,7 @@ function To(s, e, t) {
1981
2067
  r.target === "editor" ? n(r) : i(r);
1982
2068
  };
1983
2069
  }
1984
- function ai(s) {
2070
+ function ri(s) {
1985
2071
  const [e, t] = Z(s.open !== void 0 ? s.open : !0), i = !e || s.children === void 0, n = () => {
1986
2072
  D.dispatchEvent({ type: P.REMOVE_SCENE, value: s.scene });
1987
2073
  };
@@ -2002,7 +2088,7 @@ function ai(s) {
2002
2088
  children: "Toggle"
2003
2089
  }
2004
2090
  ),
2005
- /* @__PURE__ */ u.jsx("p", { className: "label", children: ni(s.label) })
2091
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: ai(s.label) })
2006
2092
  ]
2007
2093
  }
2008
2094
  ),
@@ -2072,12 +2158,12 @@ function _n(s) {
2072
2158
  }
2073
2159
  }
2074
2160
  ),
2075
- /* @__PURE__ */ u.jsx("div", { className: `icon ${Ba(s.child)}` })
2161
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${Wa(s.child)}` })
2076
2162
  ] }),
2077
2163
  /* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
2078
2164
  ] }, Math.random()) });
2079
2165
  }
2080
- function gs(s) {
2166
+ function vs(s) {
2081
2167
  const e = [];
2082
2168
  return s.child?.children.map((t, i) => {
2083
2169
  e.push(/* @__PURE__ */ u.jsx(_n, { child: t, scene: s.scene, three: s.three }, i));
@@ -2168,13 +2254,13 @@ function Qe(s) {
2168
2254
  max: s.max,
2169
2255
  step: s.step,
2170
2256
  ref: t,
2171
- onChange: pn
2257
+ onChange: ni
2172
2258
  }
2173
2259
  )
2174
2260
  ] })
2175
2261
  ] });
2176
2262
  }
2177
- function ir(s) {
2263
+ function ar(s) {
2178
2264
  const e = J(null), t = J(null), i = J(null), n = J(null), r = J(null), a = J(null), o = J(null), c = J(null), l = J(null), d = J(null), [p, m] = Z(s.value.x), [f, E] = Z(s.value.y), [y, T] = Z({
2179
2265
  min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
2180
2266
  max: Math.max(s.max, Math.max(s.value.x, s.value.y))
@@ -2227,7 +2313,7 @@ function ir(s) {
2227
2313
  window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), v(!1);
2228
2314
  }
2229
2315
  function w(R) {
2230
- const B = r.current.getBoundingClientRect(), Se = $e(0, 99, R.clientX - B.left) / 99, _e = 1 - $e(0, 99, R.clientY - B.top) / 99, re = Ae(Ri(y.min, y.max, Se), 3), K = Ae(Ri(y.min, y.max, _e), 3);
2316
+ const B = r.current.getBoundingClientRect(), Se = $e(0, 99, R.clientX - B.left) / 99, _e = 1 - $e(0, 99, R.clientY - B.top) / 99, re = Ae(Ii(y.min, y.max, Se), 3), K = Ae(Ii(y.min, y.max, _e), 3);
2231
2317
  s.onChange({ target: { value: { x: re, y: K } } }), m(re), E(K);
2232
2318
  }
2233
2319
  function O() {
@@ -2239,7 +2325,7 @@ function ir(s) {
2239
2325
  T({ min: y.min, max: R }), p > R && m($e(y.min, R, p)), f > R && E($e(y.min, R, f));
2240
2326
  }
2241
2327
  tt(() => {
2242
- a.current.style.left = `${us(y.min, y.max, p) * 100}%`, a.current.style.top = `${(1 - us(y.min, y.max, f)) * 100}%`;
2328
+ a.current.style.left = `${ms(y.min, y.max, p) * 100}%`, a.current.style.top = `${(1 - ms(y.min, y.max, f)) * 100}%`;
2243
2329
  }, [y, p, f]);
2244
2330
  const j = s.step !== void 0 ? s.step : 0.01;
2245
2331
  return /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
@@ -2318,20 +2404,20 @@ function ir(s) {
2318
2404
  ] })
2319
2405
  ] });
2320
2406
  }
2321
- const sr = Math.PI / 180, nr = 180 / Math.PI;
2407
+ const rr = Math.PI / 180, or = 180 / Math.PI;
2322
2408
  function rt(s, e, t, i, n) {
2323
2409
  return i + (s - e) * (n - i) / (t - e);
2324
2410
  }
2325
2411
  function ot(s, e, t) {
2326
2412
  return (1 - t) * s + t * e;
2327
2413
  }
2328
- function Ui(s) {
2329
- return s * sr;
2414
+ function ji(s) {
2415
+ return s * rr;
2330
2416
  }
2331
- function ar(s) {
2332
- return s * nr;
2417
+ function lr(s) {
2418
+ return s * or;
2333
2419
  }
2334
- function _s(s) {
2420
+ function ys(s) {
2335
2421
  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 = [];
2336
2422
  if (t) {
2337
2423
  const a = Ut(() => s.value, []);
@@ -2343,13 +2429,13 @@ function _s(s) {
2343
2429
  /* @__PURE__ */ u.jsx(
2344
2430
  Qe,
2345
2431
  {
2346
- value: ar(a[c]),
2432
+ value: lr(a[c]),
2347
2433
  type: "number",
2348
2434
  prop: c,
2349
2435
  step: 0.1,
2350
2436
  labelRef: l,
2351
2437
  onChange: (d, p) => {
2352
- a[d] = Ui(p), s.onChange({ target: { value: a } });
2438
+ a[d] = ji(p), s.onChange({ target: { value: a } });
2353
2439
  }
2354
2440
  }
2355
2441
  )
@@ -2406,7 +2492,7 @@ function _s(s) {
2406
2492
  }
2407
2493
  return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: r }, Math.random().toString());
2408
2494
  }
2409
- function rr(s) {
2495
+ function cr(s) {
2410
2496
  const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
2411
2497
  if (e) {
2412
2498
  const n = Ut(() => s.value, []), r = (o, c) => {
@@ -2458,10 +2544,10 @@ function rr(s) {
2458
2544
  }
2459
2545
  return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: i });
2460
2546
  }
2461
- function or(s) {
2547
+ function hr(s) {
2462
2548
  return !(s === "defaultAttributeValues" || s === "forceSinglePass" || s === "linecap" || s === "linejoin" || s === "linewidth" || s === "normalMapType" || s === "precision" || s === "shadowSide" || s === "uniformsGroups" || s === "uniformsNeedUpdate" || s === "userData" || s === "version" || s === "wireframeLinecap" || s === "wireframeLinejoin" || s === "wireframeLinewidth" || s.slice(0, 4) === "clip" || s.slice(0, 7) === "polygon" || s.slice(0, 7) === "stencil" || s.slice(0, 2) === "is");
2463
2549
  }
2464
- function lr(s) {
2550
+ function dr(s) {
2465
2551
  switch (s) {
2466
2552
  case "Alpha Map":
2467
2553
  return "alphaMap";
@@ -2510,7 +2596,7 @@ function lr(s) {
2510
2596
  }
2511
2597
  return s;
2512
2598
  }
2513
- function li(s) {
2599
+ function ci(s) {
2514
2600
  switch (s) {
2515
2601
  case "alphaHash":
2516
2602
  return "Alpha Hash";
@@ -2717,7 +2803,7 @@ function vn(s) {
2717
2803
  const e = s.toLowerCase();
2718
2804
  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";
2719
2805
  }
2720
- function cr() {
2806
+ function ur() {
2721
2807
  const s = document.createElement("input");
2722
2808
  return s.type = "file", new Promise((e, t) => {
2723
2809
  s.addEventListener("change", function() {
@@ -2732,191 +2818,191 @@ function cr() {
2732
2818
  }), s.click();
2733
2819
  });
2734
2820
  }
2735
- const hr = [
2821
+ const pr = [
2736
2822
  {
2737
2823
  title: "Front",
2738
- value: Wn
2824
+ value: Xn
2739
2825
  },
2740
2826
  {
2741
2827
  title: "Back",
2742
- value: Vs
2828
+ value: Zs
2743
2829
  },
2744
2830
  {
2745
2831
  title: "Double",
2746
- value: Fi
2832
+ value: Hi
2747
2833
  }
2748
- ], dr = [
2834
+ ], mr = [
2749
2835
  {
2750
2836
  title: "No Blending",
2751
- value: Gn
2837
+ value: $n
2752
2838
  },
2753
2839
  {
2754
2840
  title: "Normal",
2755
- value: Xn
2841
+ value: qn
2756
2842
  },
2757
2843
  {
2758
2844
  title: "Additive",
2759
- value: $n
2845
+ value: Kn
2760
2846
  },
2761
2847
  {
2762
2848
  title: "Subtractive",
2763
- value: qn
2849
+ value: Qn
2764
2850
  },
2765
2851
  {
2766
2852
  title: "Multiply",
2767
- value: Kn
2853
+ value: Jn
2768
2854
  },
2769
2855
  {
2770
2856
  title: "Custom",
2771
- value: Qn
2857
+ value: ea
2772
2858
  }
2773
- ], ur = [
2859
+ ], fr = [
2774
2860
  {
2775
2861
  title: "Add",
2776
- value: Jn
2862
+ value: ta
2777
2863
  },
2778
2864
  {
2779
2865
  title: "Subtract",
2780
- value: ea
2866
+ value: ia
2781
2867
  },
2782
2868
  {
2783
2869
  title: "Reverse Subtract",
2784
- value: ta
2870
+ value: sa
2785
2871
  },
2786
2872
  {
2787
2873
  title: "Min",
2788
- value: ia
2874
+ value: na
2789
2875
  },
2790
2876
  {
2791
2877
  title: "Max",
2792
- value: sa
2878
+ value: aa
2793
2879
  }
2794
- ], pr = [
2880
+ ], gr = [
2795
2881
  {
2796
2882
  title: "Zero",
2797
- value: Zs
2883
+ value: Ws
2798
2884
  },
2799
2885
  {
2800
2886
  title: "One",
2801
- value: Ws
2887
+ value: Gs
2802
2888
  },
2803
2889
  {
2804
2890
  title: "Src Color",
2805
- value: Gs
2891
+ value: Xs
2806
2892
  },
2807
2893
  {
2808
2894
  title: "One Minus Src Color",
2809
- value: Xs
2895
+ value: $s
2810
2896
  },
2811
2897
  {
2812
2898
  title: "Src Alpha",
2813
- value: $s
2899
+ value: qs
2814
2900
  },
2815
2901
  {
2816
2902
  title: "One Minus Src Alpha",
2817
- value: qs
2903
+ value: Ks
2818
2904
  },
2819
2905
  {
2820
2906
  title: "Dst Alpha",
2821
- value: Ks
2907
+ value: Qs
2822
2908
  },
2823
2909
  {
2824
2910
  title: "One Minus Dst Alpha",
2825
- value: Qs
2911
+ value: Js
2826
2912
  },
2827
2913
  {
2828
2914
  title: "Dst Color",
2829
- value: Js
2915
+ value: en
2830
2916
  },
2831
2917
  {
2832
2918
  title: "One Minus Dst Color",
2833
- value: en
2919
+ value: tn
2834
2920
  },
2835
2921
  {
2836
2922
  title: "Src Alpha Saturate",
2837
- value: na
2923
+ value: ra
2838
2924
  },
2839
2925
  {
2840
2926
  title: "Constant Color",
2841
- value: tn
2927
+ value: sn
2842
2928
  },
2843
2929
  {
2844
2930
  title: "One Minus Constant Color",
2845
- value: sn
2931
+ value: nn
2846
2932
  },
2847
2933
  {
2848
2934
  title: "Constant Alpha",
2849
- value: nn
2935
+ value: an
2850
2936
  },
2851
2937
  {
2852
2938
  title: "One Minus Constant Alpha",
2853
- value: an
2939
+ value: rn
2854
2940
  }
2855
- ], mr = [
2941
+ ], _r = [
2856
2942
  {
2857
2943
  title: "Zero",
2858
- value: Zs
2944
+ value: Ws
2859
2945
  },
2860
2946
  {
2861
2947
  title: "One",
2862
- value: Ws
2948
+ value: Gs
2863
2949
  },
2864
2950
  {
2865
2951
  title: "Src Color",
2866
- value: Gs
2952
+ value: Xs
2867
2953
  },
2868
2954
  {
2869
2955
  title: "One Minus Src Color",
2870
- value: Xs
2956
+ value: $s
2871
2957
  },
2872
2958
  {
2873
2959
  title: "Src Alpha",
2874
- value: $s
2960
+ value: qs
2875
2961
  },
2876
2962
  {
2877
2963
  title: "One Minus Src Alpha",
2878
- value: qs
2964
+ value: Ks
2879
2965
  },
2880
2966
  {
2881
2967
  title: "Dst Alpha",
2882
- value: Ks
2968
+ value: Qs
2883
2969
  },
2884
2970
  {
2885
2971
  title: "One Minus Dst Alpha",
2886
- value: Qs
2972
+ value: Js
2887
2973
  },
2888
2974
  {
2889
2975
  title: "Dst Color",
2890
- value: Js
2976
+ value: en
2891
2977
  },
2892
2978
  {
2893
2979
  title: "One Minus Dst Color",
2894
- value: en
2980
+ value: tn
2895
2981
  },
2896
2982
  {
2897
2983
  title: "Constant Color",
2898
- value: tn
2984
+ value: sn
2899
2985
  },
2900
2986
  {
2901
2987
  title: "One Minus Constant Color",
2902
- value: sn
2988
+ value: nn
2903
2989
  },
2904
2990
  {
2905
2991
  title: "Constant Alpha",
2906
- value: nn
2992
+ value: an
2907
2993
  },
2908
2994
  {
2909
2995
  title: "One Minus Constant Alpha",
2910
- value: an
2996
+ value: rn
2911
2997
  }
2912
2998
  ];
2913
2999
  function wt(s, e) {
2914
3000
  s.needsUpdate = !0, s.type = "option", s.options = e;
2915
3001
  }
2916
- function fr(s, e, t, i) {
3002
+ function vr(s, e, t, i) {
2917
3003
  return {
2918
3004
  type: "boolean",
2919
- title: li(s),
3005
+ title: ci(s),
2920
3006
  prop: s,
2921
3007
  value: e,
2922
3008
  needsUpdate: !0,
@@ -2930,10 +3016,10 @@ function fr(s, e, t, i) {
2930
3016
  }
2931
3017
  };
2932
3018
  }
2933
- function gr(s, e, t, i) {
3019
+ function yr(s, e, t, i) {
2934
3020
  const n = {
2935
3021
  type: "number",
2936
- title: li(s),
3022
+ title: ci(s),
2937
3023
  prop: s,
2938
3024
  value: e,
2939
3025
  min: void 0,
@@ -2951,27 +3037,27 @@ function gr(s, e, t, i) {
2951
3037
  };
2952
3038
  switch (s) {
2953
3039
  case "blending":
2954
- wt(n, dr);
3040
+ wt(n, mr);
2955
3041
  break;
2956
3042
  case "blendDst":
2957
- wt(n, mr);
3043
+ wt(n, _r);
2958
3044
  break;
2959
3045
  case "blendEquation":
2960
- wt(n, ur);
3046
+ wt(n, fr);
2961
3047
  break;
2962
3048
  case "blendSrc":
2963
- wt(n, pr);
3049
+ wt(n, gr);
2964
3050
  break;
2965
3051
  case "side":
2966
- wt(n, hr);
3052
+ wt(n, pr);
2967
3053
  break;
2968
3054
  }
2969
3055
  return vn(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;
2970
3056
  }
2971
- function _r(s, e, t, i) {
3057
+ function br(s, e, t, i) {
2972
3058
  const n = {
2973
3059
  type: "string",
2974
- title: li(s),
3060
+ title: ci(s),
2975
3061
  prop: s,
2976
3062
  value: e,
2977
3063
  needsUpdate: !0,
@@ -3004,20 +3090,20 @@ function _r(s, e, t, i) {
3004
3090
  }
3005
3091
  }), n;
3006
3092
  }
3007
- function vr(s) {
3093
+ function Cr(s) {
3008
3094
  return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
3009
3095
  }
3010
- function yr(s) {
3096
+ function Er(s) {
3011
3097
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
3012
3098
  }
3013
- function br(s) {
3099
+ function Sr(s) {
3014
3100
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
3015
3101
  }
3016
- function ji(s) {
3102
+ function Ni(s) {
3017
3103
  s.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
3018
3104
  }
3019
3105
  function It(s, e, t, i, n = "", r = !1) {
3020
- const a = li(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, c = typeof e;
3106
+ const a = ci(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, c = typeof e;
3021
3107
  if (c === "boolean" || c === "string")
3022
3108
  return {
3023
3109
  title: a,
@@ -3083,12 +3169,12 @@ function It(s, e, t, i, n = "", r = !1) {
3083
3169
  }
3084
3170
  }
3085
3171
  if (l.length > 0)
3086
- return ji(l), {
3172
+ return Ni(l), {
3087
3173
  title: a,
3088
3174
  items: l
3089
3175
  };
3090
3176
  } else {
3091
- if (vr(e))
3177
+ if (Cr(e))
3092
3178
  return {
3093
3179
  title: a,
3094
3180
  prop: o,
@@ -3104,7 +3190,7 @@ function It(s, e, t, i, n = "", r = !1) {
3104
3190
  }
3105
3191
  }
3106
3192
  };
3107
- if (yr(e))
3193
+ if (Er(e))
3108
3194
  return {
3109
3195
  title: a,
3110
3196
  prop: o,
@@ -3120,7 +3206,7 @@ function It(s, e, t, i, n = "", r = !1) {
3120
3206
  }
3121
3207
  }
3122
3208
  };
3123
- if (br(e))
3209
+ if (Sr(e))
3124
3210
  return {
3125
3211
  title: a,
3126
3212
  prop: o,
@@ -3159,7 +3245,7 @@ function It(s, e, t, i, n = "", r = !1) {
3159
3245
  value: e,
3160
3246
  disabled: r,
3161
3247
  onChange: (l, d) => {
3162
- const p = lr(s), m = n.length > 0 ? `${n}.${p}` : p;
3248
+ const p = dr(s), m = n.length > 0 ? `${n}.${p}` : p;
3163
3249
  i.createTexture(t.uuid, `material.${m}`, d);
3164
3250
  const f = i.getScene(t.uuid);
3165
3251
  if (f !== null) {
@@ -3227,7 +3313,7 @@ function It(s, e, t, i, n = "", r = !1) {
3227
3313
  console.log("Issue cycling through material object:", s, e);
3228
3314
  }
3229
3315
  if (l.length > 0)
3230
- return ji(l), {
3316
+ return Ni(l), {
3231
3317
  title: a,
3232
3318
  items: l
3233
3319
  };
@@ -3235,25 +3321,25 @@ function It(s, e, t, i, n = "", r = !1) {
3235
3321
  }
3236
3322
  }
3237
3323
  }
3238
- function vs(s, e, t) {
3324
+ function bs(s, e, t) {
3239
3325
  const i = [];
3240
3326
  for (const n in s) {
3241
- if (!or(n))
3327
+ if (!hr(n))
3242
3328
  continue;
3243
3329
  const r = typeof s[n], a = s[n];
3244
3330
  if (r === "boolean")
3245
- i.push(fr(n, a, e, t));
3331
+ i.push(vr(n, a, e, t));
3246
3332
  else if (r === "number")
3247
- i.push(gr(n, a, e, t));
3333
+ i.push(yr(n, a, e, t));
3248
3334
  else if (r === "string")
3249
- i.push(_r(n, a, e, t));
3335
+ i.push(br(n, a, e, t));
3250
3336
  else if (r === "object") {
3251
3337
  const o = It(n, a, e, t);
3252
3338
  o !== void 0 && i.push(o);
3253
3339
  } else
3254
3340
  a !== void 0 && console.log("other:", n, r, a);
3255
3341
  }
3256
- return ji(i), i.push({
3342
+ return Ni(i), i.push({
3257
3343
  title: "Update Material",
3258
3344
  type: "button",
3259
3345
  onChange: () => {
@@ -3266,7 +3352,7 @@ function vs(s, e, t) {
3266
3352
  }
3267
3353
  }), i;
3268
3354
  }
3269
- function Cr(s, e) {
3355
+ function wr(s, e) {
3270
3356
  function t() {
3271
3357
  return `${e.app.appID}_material`;
3272
3358
  }
@@ -3283,7 +3369,7 @@ function Cr(s, e) {
3283
3369
  Oe,
3284
3370
  {
3285
3371
  title: `Material ${l}`,
3286
- items: vs(a[l], s, e)
3372
+ items: bs(a[l], s, e)
3287
3373
  },
3288
3374
  `Material ${l}`
3289
3375
  )
@@ -3294,7 +3380,7 @@ function Cr(s, e) {
3294
3380
  Oe,
3295
3381
  {
3296
3382
  title: "Material",
3297
- items: vs(a, s, e),
3383
+ items: bs(a, s, e),
3298
3384
  expanded: n,
3299
3385
  onToggle: (o) => {
3300
3386
  r(o);
@@ -3302,8 +3388,8 @@ function Cr(s, e) {
3302
3388
  }
3303
3389
  );
3304
3390
  }
3305
- const ys = "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==";
3306
- function Er(s) {
3391
+ const Cs = "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==";
3392
+ function xr(s) {
3307
3393
  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]), [E, y] = Z(s.value.repeat[1]);
3308
3394
  function T(v, S, C, w, O) {
3309
3395
  if (s.onChange !== void 0) {
@@ -3334,10 +3420,10 @@ function Er(s) {
3334
3420
  }
3335
3421
  return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
3336
3422
  /* @__PURE__ */ u.jsx("img", { alt: s.title, ref: t, onClick: () => {
3337
- cr().then((v) => {
3423
+ ur().then((v) => {
3338
3424
  t.current.src = v, T(v, c, d, m, E);
3339
3425
  });
3340
- }, src: o.src.length > 0 ? o.src : ys }),
3426
+ }, src: o.src.length > 0 ? o.src : Cs }),
3341
3427
  /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
3342
3428
  /* @__PURE__ */ u.jsxs("div", { children: [
3343
3429
  /* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
@@ -3386,14 +3472,14 @@ function Er(s) {
3386
3472
  )
3387
3473
  ] }),
3388
3474
  /* @__PURE__ */ u.jsx("button", { onClick: () => {
3389
- T("", c, d, m, E), t.current.src = ys;
3475
+ T("", c, d, m, E), t.current.src = Cs;
3390
3476
  }, children: "Clear" })
3391
3477
  ] })
3392
3478
  ] });
3393
3479
  }
3394
3480
  function ti(s) {
3395
3481
  let e = s.value;
3396
- e !== void 0 && (e.isColor !== void 0 ? e = ls(s.value) : s.type === "color" && (e = ls(new et().setStyle(s.value, jt))));
3482
+ e !== void 0 && (e.isColor !== void 0 ? e = hs(s.value) : s.type === "color" && (e = hs(new et().setStyle(s.value, jt))));
3397
3483
  const [t, i] = Z(e), n = J(null), r = (l) => {
3398
3484
  let d = l.target.value;
3399
3485
  if (s.type === "boolean")
@@ -3409,7 +3495,7 @@ function ti(s) {
3409
3495
  const o = s.type === "string" && (t.length > 100 || t.search(`
3410
3496
  `) > -1), c = o || s.type === "image" || s.type === "vector2";
3411
3497
  return /* @__PURE__ */ u.jsxs("div", { className: `field ${c ? "block" : ""}`, style: a, children: [
3412
- s.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: n, children: ni(s.title) }, "fieldLabel"),
3498
+ s.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: n, children: ai(s.title) }, "fieldLabel"),
3413
3499
  s.type === "string" && !o && /* @__PURE__ */ u.jsx(
3414
3500
  "input",
3415
3501
  {
@@ -3483,15 +3569,15 @@ function ti(s) {
3483
3569
  children: s.title
3484
3570
  }
3485
3571
  ),
3486
- s.type === "image" && /* @__PURE__ */ u.jsx(Er, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3487
- 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: ni(l.title) }, d)) }) }),
3488
- s.type === "vector2" && /* @__PURE__ */ u.jsx(ir, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
3489
- s.type === "grid3" && /* @__PURE__ */ u.jsx(_s, { step: s.step, value: t, onChange: r }),
3490
- s.type === "grid4" && /* @__PURE__ */ u.jsx(rr, { step: s.step, value: t, onChange: r }),
3491
- s.type === "euler" && /* @__PURE__ */ u.jsx(_s, { step: s.step, value: t, onChange: r })
3572
+ s.type === "image" && /* @__PURE__ */ u.jsx(xr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3573
+ 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: ai(l.title) }, d)) }) }),
3574
+ s.type === "vector2" && /* @__PURE__ */ u.jsx(ar, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
3575
+ s.type === "grid3" && /* @__PURE__ */ u.jsx(ys, { step: s.step, value: t, onChange: r }),
3576
+ s.type === "grid4" && /* @__PURE__ */ u.jsx(cr, { step: s.step, value: t, onChange: r }),
3577
+ s.type === "euler" && /* @__PURE__ */ u.jsx(ys, { step: s.step, value: t, onChange: r })
3492
3578
  ] });
3493
3579
  }
3494
- function Sr(s) {
3580
+ function Or(s) {
3495
3581
  return "items" in s;
3496
3582
  }
3497
3583
  class Oe extends Nt {
@@ -3546,9 +3632,9 @@ class Oe extends Nt {
3546
3632
  render() {
3547
3633
  const e = [];
3548
3634
  return this.props.items.forEach((t) => {
3549
- if (Sr(t))
3635
+ if (Or(t))
3550
3636
  e.push(
3551
- /* @__PURE__ */ u.jsx(Oe, { title: ni(t.title), items: t.items }, Math.random())
3637
+ /* @__PURE__ */ u.jsx(Oe, { title: ai(t.title), items: t.items }, Math.random())
3552
3638
  );
3553
3639
  else {
3554
3640
  const i = this.valueOverrides.get(t.title), n = i !== void 0 ? i : t.value;
@@ -3577,7 +3663,7 @@ class Oe extends Nt {
3577
3663
  );
3578
3664
  }
3579
3665
  }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ u.jsx(
3580
- ai,
3666
+ ri,
3581
3667
  {
3582
3668
  label: this.props.title,
3583
3669
  open: this.props.expanded === !0,
@@ -3679,7 +3765,7 @@ class ae extends Nt {
3679
3765
  }
3680
3766
  }
3681
3767
  }
3682
- function bs(s) {
3768
+ function Es(s) {
3683
3769
  switch (s) {
3684
3770
  case "fov":
3685
3771
  return "FOV";
@@ -3708,7 +3794,7 @@ function bs(s) {
3708
3794
  }
3709
3795
  return s;
3710
3796
  }
3711
- function wr(s, e) {
3797
+ function Tr(s, e) {
3712
3798
  function t() {
3713
3799
  return `${e.app.appID}_camera`;
3714
3800
  }
@@ -3720,7 +3806,7 @@ function wr(s, e) {
3720
3806
  if (s.perspectiveCameraInfo !== void 0)
3721
3807
  for (const o in s.perspectiveCameraInfo)
3722
3808
  a.push({
3723
- title: bs(o),
3809
+ title: Es(o),
3724
3810
  prop: o,
3725
3811
  type: "number",
3726
3812
  step: 0.01,
@@ -3737,7 +3823,7 @@ function wr(s, e) {
3737
3823
  else if (s.orthographicCameraInfo !== void 0)
3738
3824
  for (const o in s.orthographicCameraInfo)
3739
3825
  a.push({
3740
- title: bs(o),
3826
+ title: Es(o),
3741
3827
  prop: o,
3742
3828
  type: "number",
3743
3829
  step: 0.01,
@@ -3763,14 +3849,14 @@ function wr(s, e) {
3763
3849
  }
3764
3850
  );
3765
3851
  }
3766
- class xr extends Ie {
3852
+ class Mr extends Ie {
3767
3853
  constructor(e, t) {
3768
3854
  const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new gt();
3769
3855
  n.setAttribute("position", new Ke(i, 3)), n.computeBoundingSphere();
3770
- const r = new zi({ fog: !1 });
3856
+ const r = new Yi({ fog: !1 });
3771
3857
  super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
3772
3858
  const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new gt();
3773
- o.setAttribute("position", new Ke(a, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Vs, fog: !1 })));
3859
+ o.setAttribute("position", new Ke(a, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Zs, fog: !1 })));
3774
3860
  }
3775
3861
  updateMatrixWorld() {
3776
3862
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3786,7 +3872,7 @@ class xr extends Ie {
3786
3872
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3787
3873
  }
3788
3874
  }
3789
- const Cs = { type: "change" }, Yi = { type: "start" }, yn = { type: "end" }, Zt = new aa(), Es = new ra(), Or = Math.cos(70 * oa.DEG2RAD), oe = new A(), ye = 2 * Math.PI, V = {
3875
+ const Ss = { type: "change" }, Vi = { type: "start" }, yn = { type: "end" }, Zt = new oa(), ws = new la(), Ar = Math.cos(70 * ca.DEG2RAD), oe = new A(), ye = 2 * Math.PI, V = {
3790
3876
  NONE: -1,
3791
3877
  ROTATE: 0,
3792
3878
  DOLLY: 1,
@@ -3795,10 +3881,10 @@ const Cs = { type: "change" }, Yi = { type: "start" }, yn = { type: "end" }, Zt
3795
3881
  TOUCH_PAN: 4,
3796
3882
  TOUCH_DOLLY_PAN: 5,
3797
3883
  TOUCH_DOLLY_ROTATE: 6
3798
- }, yi = 1e-6;
3799
- class Tr extends rn {
3884
+ }, bi = 1e-6;
3885
+ class Pr extends on {
3800
3886
  constructor(e, t = null) {
3801
- super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new A(), this.cursor = new A(), 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: ft.ROTATE, MIDDLE: ft.DOLLY, RIGHT: ft.PAN }, this.touches = { ONE: mt.ROTATE, TWO: mt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new A(), this._lastQuaternion = new Ee(), this._lastTargetPosition = new A(), this._quat = new Ee().setFromUnitVectors(e.up, new A(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Di(), this._sphericalDelta = new Di(), this._scale = 1, this._panOffset = new A(), 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 A(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Ar.bind(this), this._onPointerDown = Mr.bind(this), this._onPointerUp = Pr.bind(this), this._onContextMenu = jr.bind(this), this._onMouseWheel = Ir.bind(this), this._onKeyDown = Lr.bind(this), this._onTouchStart = kr.bind(this), this._onTouchMove = Ur.bind(this), this._onMouseDown = Dr.bind(this), this._onMouseMove = Rr.bind(this), this._interceptControlDown = Nr.bind(this), this._interceptControlUp = Fr.bind(this), this.domElement !== null && this.connect(), this.update();
3887
+ super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new A(), this.cursor = new A(), 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: ft.ROTATE, MIDDLE: ft.DOLLY, RIGHT: ft.PAN }, this.touches = { ONE: mt.ROTATE, TWO: mt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new A(), this._lastQuaternion = new Ee(), this._lastTargetPosition = new A(), this._quat = new Ee().setFromUnitVectors(e.up, new A(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ri(), this._sphericalDelta = new Ri(), this._scale = 1, this._panOffset = new A(), 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 A(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Rr.bind(this), this._onPointerDown = Dr.bind(this), this._onPointerUp = Ir.bind(this), this._onContextMenu = zr.bind(this), this._onMouseWheel = Ur.bind(this), this._onKeyDown = jr.bind(this), this._onTouchStart = Nr.bind(this), this._onTouchMove = Fr.bind(this), this._onMouseDown = Lr.bind(this), this._onMouseMove = kr.bind(this), this._interceptControlDown = Hr.bind(this), this._interceptControlUp = Yr.bind(this), this.domElement !== null && this.connect(), this.update();
3802
3888
  }
3803
3889
  connect() {
3804
3890
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -3828,7 +3914,7 @@ class Tr extends rn {
3828
3914
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
3829
3915
  }
3830
3916
  reset() {
3831
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Cs), this.update(), this.state = V.NONE;
3917
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ss), this.update(), this.state = V.NONE;
3832
3918
  }
3833
3919
  update(e = null) {
3834
3920
  const t = this.object.position;
@@ -3858,12 +3944,12 @@ class Tr extends rn {
3858
3944
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = oe.length();
3859
3945
  } else
3860
3946
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
3861
- a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Zt.origin.copy(this.object.position), Zt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Zt.direction)) < Or ? this.object.lookAt(this.target) : (Es.setFromNormalAndCoplanarPoint(this.object.up, this.target), Zt.intersectPlane(Es, this.target))));
3947
+ a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (Zt.origin.copy(this.object.position), Zt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Zt.direction)) < Ar ? this.object.lookAt(this.target) : (ws.setFromNormalAndCoplanarPoint(this.object.up, this.target), Zt.intersectPlane(ws, this.target))));
3862
3948
  } else if (this.object.isOrthographicCamera) {
3863
3949
  const a = this.object.zoom;
3864
3950
  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);
3865
3951
  }
3866
- return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) > yi || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > yi || this._lastTargetPosition.distanceToSquared(this.target) > yi ? (this.dispatchEvent(Cs), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3952
+ return this._scale = 1, this._performCursorZoom = !1, r || this._lastPosition.distanceToSquared(this.object.position) > bi || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > bi || this._lastTargetPosition.distanceToSquared(this.target) > bi ? (this.dispatchEvent(Ss), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3867
3953
  }
3868
3954
  _getAutoRotationAngle(e) {
3869
3955
  return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
@@ -4057,13 +4143,13 @@ class Tr extends rn {
4057
4143
  return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
4058
4144
  }
4059
4145
  }
4060
- function Mr(s) {
4146
+ function Dr(s) {
4061
4147
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(s) && (this._addPointer(s), s.pointerType === "touch" ? this._onTouchStart(s) : this._onMouseDown(s)));
4062
4148
  }
4063
- function Ar(s) {
4149
+ function Rr(s) {
4064
4150
  this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
4065
4151
  }
4066
- function Pr(s) {
4152
+ function Ir(s) {
4067
4153
  switch (this._removePointer(s), this._pointers.length) {
4068
4154
  case 0:
4069
4155
  this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(yn), this.state = V.NONE;
@@ -4074,7 +4160,7 @@ function Pr(s) {
4074
4160
  break;
4075
4161
  }
4076
4162
  }
4077
- function Dr(s) {
4163
+ function Lr(s) {
4078
4164
  let e;
4079
4165
  switch (s.button) {
4080
4166
  case 0:
@@ -4120,9 +4206,9 @@ function Dr(s) {
4120
4206
  default:
4121
4207
  this.state = V.NONE;
4122
4208
  }
4123
- this.state !== V.NONE && this.dispatchEvent(Yi);
4209
+ this.state !== V.NONE && this.dispatchEvent(Vi);
4124
4210
  }
4125
- function Rr(s) {
4211
+ function kr(s) {
4126
4212
  switch (this.state) {
4127
4213
  case V.ROTATE:
4128
4214
  if (this.enableRotate === !1)
@@ -4141,13 +4227,13 @@ function Rr(s) {
4141
4227
  break;
4142
4228
  }
4143
4229
  }
4144
- function Ir(s) {
4145
- this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Yi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(yn));
4230
+ function Ur(s) {
4231
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Vi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(yn));
4146
4232
  }
4147
- function Lr(s) {
4233
+ function jr(s) {
4148
4234
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
4149
4235
  }
4150
- function kr(s) {
4236
+ function Nr(s) {
4151
4237
  switch (this._trackPointer(s), this._pointers.length) {
4152
4238
  case 1:
4153
4239
  switch (this.touches.ONE) {
@@ -4184,9 +4270,9 @@ function kr(s) {
4184
4270
  default:
4185
4271
  this.state = V.NONE;
4186
4272
  }
4187
- this.state !== V.NONE && this.dispatchEvent(Yi);
4273
+ this.state !== V.NONE && this.dispatchEvent(Vi);
4188
4274
  }
4189
- function Ur(s) {
4275
+ function Fr(s) {
4190
4276
  switch (this._trackPointer(s), this.state) {
4191
4277
  case V.TOUCH_ROTATE:
4192
4278
  if (this.enableRotate === !1)
@@ -4212,13 +4298,13 @@ function Ur(s) {
4212
4298
  this.state = V.NONE;
4213
4299
  }
4214
4300
  }
4215
- function jr(s) {
4301
+ function zr(s) {
4216
4302
  this.enabled !== !1 && s.preventDefault();
4217
4303
  }
4218
- function Nr(s) {
4304
+ function Hr(s) {
4219
4305
  s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4220
4306
  }
4221
- function Fr(s) {
4307
+ function Yr(s) {
4222
4308
  s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4223
4309
  }
4224
4310
  /*!
@@ -4260,7 +4346,7 @@ function Ze(s) {
4260
4346
  function Be(s) {
4261
4347
  return s.isOrthographicCamera;
4262
4348
  }
4263
- const ct = Math.PI * 2, Ss = Math.PI / 2, bn = 1e-5, xt = Math.PI / 180;
4349
+ const ct = Math.PI * 2, xs = Math.PI / 2, bn = 1e-5, xt = Math.PI / 180;
4264
4350
  function Me(s, e, t) {
4265
4351
  return Math.max(e, Math.min(t, s));
4266
4352
  }
@@ -4270,7 +4356,7 @@ function q(s, e = bn) {
4270
4356
  function Y(s, e, t = bn) {
4271
4357
  return q(s - e, t);
4272
4358
  }
4273
- function ws(s, e) {
4359
+ function Os(s, e) {
4274
4360
  return Math.round(s / e) * e;
4275
4361
  }
4276
4362
  function Ot(s) {
@@ -4290,7 +4376,7 @@ function Wt(s, e, t, i, n = 1 / 0, r) {
4290
4376
  let f = e + (l + m) * c;
4291
4377
  return d - s > 0 == f > d && (f = d, t.value = (f - d) / r), f;
4292
4378
  }
4293
- function xs(s, e, t, i, n = 1 / 0, r, a) {
4379
+ function Ts(s, e, t, i, n = 1 / 0, r, a) {
4294
4380
  i = Math.max(1e-4, i);
4295
4381
  const o = 2 / i, c = o * r, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
4296
4382
  let d = e.x, p = e.y, m = e.z, f = s.x - d, E = s.y - p, y = s.z - m;
@@ -4305,15 +4391,15 @@ function xs(s, e, t, i, n = 1 / 0, r, a) {
4305
4391
  const R = T - s.x, B = g - s.y, Se = v - s.z, _e = a.x - T, re = a.y - g, K = a.z - v;
4306
4392
  return R * _e + B * re + Se * K > 0 && (a.x = T, a.y = g, a.z = v, t.x = (a.x - T) / r, t.y = (a.y - g) / r, t.z = (a.z - v) / r), a;
4307
4393
  }
4308
- function bi(s, e) {
4394
+ function Ci(s, e) {
4309
4395
  e.set(0, 0), s.forEach((t) => {
4310
4396
  e.x += t.clientX, e.y += t.clientY;
4311
4397
  }), e.x /= s.length, e.y /= s.length;
4312
4398
  }
4313
- function Ci(s, e) {
4399
+ function Ei(s, e) {
4314
4400
  return Be(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
4315
4401
  }
4316
- class zr {
4402
+ class Br {
4317
4403
  constructor() {
4318
4404
  this._listeners = {};
4319
4405
  }
@@ -4377,10 +4463,10 @@ class zr {
4377
4463
  }
4378
4464
  }
4379
4465
  }
4380
- var Ei;
4381
- const Hr = "2.9.0", Gt = 1 / 8, Yr = /Mac/.test((Ei = globalThis?.navigator) === null || Ei === void 0 ? void 0 : Ei.platform);
4382
- let I, Os, Xt, Si, be, U, z, ht, Mt, Pe, De, We, Ts, Ms, xe, At, dt, As, wi, Ps, xi, Oi, $t;
4383
- class ke extends zr {
4466
+ var Si;
4467
+ const Vr = "2.9.0", Gt = 1 / 8, Zr = /Mac/.test((Si = globalThis?.navigator) === null || Si === void 0 ? void 0 : Si.platform);
4468
+ let I, Ms, Xt, wi, be, U, z, ht, Mt, Pe, De, We, As, Ps, xe, At, dt, Ds, xi, Rs, Oi, Ti, $t;
4469
+ class ke extends Br {
4384
4470
  /**
4385
4471
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
4386
4472
  *
@@ -4422,7 +4508,7 @@ class ke extends zr {
4422
4508
  * @category Statics
4423
4509
  */
4424
4510
  static install(e) {
4425
- I = e.THREE, Os = Object.freeze(new I.Vector3(0, 0, 0)), Xt = Object.freeze(new I.Vector3(0, 1, 0)), Si = Object.freeze(new I.Vector3(0, 0, 1)), be = new I.Vector2(), U = new I.Vector3(), z = new I.Vector3(), ht = new I.Vector3(), Mt = new I.Vector3(), Pe = new I.Vector3(), De = new I.Vector3(), We = new I.Vector3(), Ts = new I.Vector3(), Ms = new I.Vector3(), xe = new I.Spherical(), At = new I.Spherical(), dt = new I.Box3(), As = new I.Box3(), wi = new I.Sphere(), Ps = new I.Quaternion(), xi = new I.Quaternion(), Oi = new I.Matrix4(), $t = new I.Raycaster();
4511
+ I = e.THREE, Ms = Object.freeze(new I.Vector3(0, 0, 0)), Xt = Object.freeze(new I.Vector3(0, 1, 0)), wi = Object.freeze(new I.Vector3(0, 0, 1)), be = new I.Vector2(), U = new I.Vector3(), z = new I.Vector3(), ht = new I.Vector3(), Mt = new I.Vector3(), Pe = new I.Vector3(), De = new I.Vector3(), We = new I.Vector3(), As = new I.Vector3(), Ps = new I.Vector3(), xe = new I.Spherical(), At = new I.Spherical(), dt = new I.Box3(), Ds = new I.Box3(), xi = new I.Sphere(), Rs = new I.Quaternion(), Oi = new I.Quaternion(), Ti = new I.Matrix4(), $t = new I.Raycaster();
4426
4512
  }
4427
4513
  /**
4428
4514
  * list all ACTIONs
@@ -4565,7 +4651,7 @@ class ke extends zr {
4565
4651
  const O = performance.now();
4566
4652
  l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
4567
4653
  }
4568
- const v = Yr ? -1 : -3, S = g.deltaMode === 1 ? g.deltaY / v : g.deltaY / (v * 10), C = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4654
+ const v = Zr ? -1 : -3, S = g.deltaMode === 1 ? g.deltaY / v : g.deltaY / (v * 10), C = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4569
4655
  switch (this.mouseButtons.wheel) {
4570
4656
  case _.ROTATE: {
4571
4657
  this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
@@ -4601,7 +4687,7 @@ class ke extends zr {
4601
4687
  }, m = (g) => {
4602
4688
  if (!this._enabled)
4603
4689
  return;
4604
- if (bi(this._activePointers, be), this._getClientRect(this._elementRect), i.copy(be), n.copy(be), this._activePointers.length >= 2) {
4690
+ if (Ci(this._activePointers, be), this._getClientRect(this._elementRect), i.copy(be), n.copy(be), this._activePointers.length >= 2) {
4605
4691
  const S = be.x - this._activePointers[1].clientX, C = be.y - this._activePointers[1].clientY, w = Math.sqrt(S * S + C * C);
4606
4692
  r.set(0, w);
4607
4693
  const O = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, L = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
@@ -4627,7 +4713,7 @@ class ke extends zr {
4627
4713
  }, f = () => {
4628
4714
  if (!this._enabled || !this._dragNeedsUpdate)
4629
4715
  return;
4630
- this._dragNeedsUpdate = !1, bi(this._activePointers, be);
4716
+ this._dragNeedsUpdate = !1, Ci(this._activePointers, be);
4631
4717
  const v = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, S = v ? -v.deltaX : n.x - be.x, C = v ? -v.deltaY : n.y - be.y;
4632
4718
  if (n.copy(be), ((this._state & _.ROTATE) === _.ROTATE || (this._state & _.TOUCH_ROTATE) === _.TOUCH_ROTATE || (this._state & _.TOUCH_DOLLY_ROTATE) === _.TOUCH_DOLLY_ROTATE || (this._state & _.TOUCH_ZOOM_ROTATE) === _.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(S, C), this._isUserControllingRotate = !0), (this._state & _.DOLLY) === _.DOLLY || (this._state & _.ZOOM) === _.ZOOM) {
4633
4719
  const w = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, O = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, L = this.dollyDragInverted ? -1 : 1;
@@ -4641,7 +4727,7 @@ class ke extends zr {
4641
4727
  }
4642
4728
  ((this._state & _.TRUCK) === _.TRUCK || (this._state & _.TOUCH_TRUCK) === _.TOUCH_TRUCK || (this._state & _.TOUCH_DOLLY_TRUCK) === _.TOUCH_DOLLY_TRUCK || (this._state & _.TOUCH_ZOOM_TRUCK) === _.TOUCH_ZOOM_TRUCK) && (this._truckInternal(S, C, !1), this._isUserControllingTruck = !0), ((this._state & _.OFFSET) === _.OFFSET || (this._state & _.TOUCH_OFFSET) === _.TOUCH_OFFSET || (this._state & _.TOUCH_DOLLY_OFFSET) === _.TOUCH_DOLLY_OFFSET || (this._state & _.TOUCH_ZOOM_OFFSET) === _.TOUCH_ZOOM_OFFSET) && (this._truckInternal(S, C, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
4643
4729
  }, E = () => {
4644
- bi(this._activePointers, be), n.copy(be), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this.dispatchEvent({ type: "controlend" }));
4730
+ Ci(this._activePointers, be), n.copy(be), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this.dispatchEvent({ type: "controlend" }));
4645
4731
  };
4646
4732
  this.lockPointer = () => {
4647
4733
  !this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
@@ -5031,12 +5117,12 @@ class ke extends zr {
5031
5117
  fitToBox(e, t, { cover: i = !1, paddingLeft: n = 0, paddingRight: r = 0, paddingBottom: a = 0, paddingTop: o = 0 } = {}) {
5032
5118
  const c = [], l = e.isBox3 ? dt.copy(e) : dt.setFromObject(e);
5033
5119
  l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
5034
- const d = ws(this._sphericalEnd.theta, Ss), p = ws(this._sphericalEnd.phi, Ss);
5120
+ const d = Os(this._sphericalEnd.theta, xs), p = Os(this._sphericalEnd.phi, xs);
5035
5121
  c.push(this.rotateTo(d, p, t));
5036
- const m = U.setFromSpherical(this._sphericalEnd).normalize(), f = Ps.setFromUnitVectors(m, Si), E = Y(Math.abs(m.y), 1);
5037
- E && f.multiply(xi.setFromAxisAngle(Xt, d)), f.multiply(this._yAxisUpSpaceInverse);
5038
- const y = As.makeEmpty();
5039
- z.copy(l.min).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).applyQuaternion(f), y.expandByPoint(z), y.min.x -= n, y.min.y -= a, y.max.x += r, y.max.y += o, f.setFromUnitVectors(Si, m), E && f.premultiply(xi.invert()), f.premultiply(this._yAxisUpSpace);
5122
+ const m = U.setFromSpherical(this._sphericalEnd).normalize(), f = Rs.setFromUnitVectors(m, wi), E = Y(Math.abs(m.y), 1);
5123
+ E && f.multiply(Oi.setFromAxisAngle(Xt, d)), f.multiply(this._yAxisUpSpaceInverse);
5124
+ const y = Ds.makeEmpty();
5125
+ z.copy(l.min).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), y.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), y.expandByPoint(z), z.copy(l.max).applyQuaternion(f), y.expandByPoint(z), y.min.x -= n, y.min.y -= a, y.max.x += r, y.max.y += o, f.setFromUnitVectors(wi, m), E && f.premultiply(Oi.invert()), f.premultiply(this._yAxisUpSpace);
5040
5126
  const T = y.getSize(U), g = y.getCenter(z).applyQuaternion(f);
5041
5127
  if (Ze(this._camera)) {
5042
5128
  const v = this.getDistanceToFitBox(T.x, T.y, T.z, i);
@@ -5054,7 +5140,7 @@ class ke extends zr {
5054
5140
  * @category Methods
5055
5141
  */
5056
5142
  fitToSphere(e, t) {
5057
- const i = [], r = "isObject3D" in e ? ke.createBoundingSphere(e, wi) : wi.copy(e);
5143
+ const i = [], r = "isObject3D" in e ? ke.createBoundingSphere(e, xi) : xi.copy(e);
5058
5144
  if (i.push(this.moveTo(r.center.x, r.center.y, r.center.z, t)), Ze(this._camera)) {
5059
5145
  const a = this.getDistanceToFitSphere(r.radius);
5060
5146
  i.push(this.dollyTo(a, t));
@@ -5199,7 +5285,7 @@ class ke extends zr {
5199
5285
  * @category Methods
5200
5286
  */
5201
5287
  getDistanceToFitBox(e, t, i, n = !1) {
5202
- if (Ci(this._camera, "getDistanceToFitBox"))
5288
+ if (Ei(this._camera, "getDistanceToFitBox"))
5203
5289
  return this._spherical.radius;
5204
5290
  const r = e / t, a = this._camera.getEffectiveFOV() * xt, o = this._camera.aspect;
5205
5291
  return ((n ? r > o : r < o) ? t : e / o) * 0.5 / Math.tan(a * 0.5) + i * 0.5;
@@ -5211,7 +5297,7 @@ class ke extends zr {
5211
5297
  * @category Methods
5212
5298
  */
5213
5299
  getDistanceToFitSphere(e) {
5214
- if (Ci(this._camera, "getDistanceToFitSphere"))
5300
+ if (Ei(this._camera, "getDistanceToFitSphere"))
5215
5301
  return this._spherical.radius;
5216
5302
  const t = this._camera.getEffectiveFOV() * xt, i = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : i;
5217
5303
  return e / Math.sin(n * 0.5);
@@ -5317,7 +5403,7 @@ class ke extends zr {
5317
5403
  * @category Methods
5318
5404
  */
5319
5405
  update(e) {
5320
- const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r = Ts.subVectors(this._targetEnd, this._target), a = Ms.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5406
+ const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, r = As.subVectors(this._targetEnd, this._target), a = Ps.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5321
5407
  if (q(t))
5322
5408
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5323
5409
  else {
@@ -5340,13 +5426,13 @@ class ke extends zr {
5340
5426
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
5341
5427
  else {
5342
5428
  const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5343
- xs(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5429
+ Ts(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5344
5430
  }
5345
5431
  if (q(a.x) && q(a.y) && q(a.z))
5346
5432
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5347
5433
  else {
5348
5434
  const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5349
- xs(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5435
+ Ts(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5350
5436
  }
5351
5437
  if (q(o))
5352
5438
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
@@ -5430,7 +5516,7 @@ class ke extends zr {
5430
5516
  console.warn("camera-controls is already connected.");
5431
5517
  return;
5432
5518
  }
5433
- e.setAttribute("data-camera-controls-version", Hr), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5519
+ e.setAttribute("data-camera-controls-version", Vr), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5434
5520
  }
5435
5521
  /**
5436
5522
  * Detach all internal event handlers to disable drag control.
@@ -5490,13 +5576,13 @@ class ke extends zr {
5490
5576
  // lateUpdate
5491
5577
  _collisionTest() {
5492
5578
  let e = 1 / 0;
5493
- if (!(this.colliderMeshes.length >= 1) || Ci(this._camera, "_collisionTest"))
5579
+ if (!(this.colliderMeshes.length >= 1) || Ei(this._camera, "_collisionTest"))
5494
5580
  return e;
5495
5581
  const i = this._getTargetDirection(Mt);
5496
- Oi.lookAt(Os, i, this._camera.up);
5582
+ Ti.lookAt(Ms, i, this._camera.up);
5497
5583
  for (let n = 0; n < 4; n++) {
5498
5584
  const r = z.copy(this._nearPlaneCorners[n]);
5499
- r.applyMatrix4(Oi);
5585
+ r.applyMatrix4(Ti);
5500
5586
  const a = ht.addVectors(this._target, r);
5501
5587
  $t.set(a, i), $t.far = this._spherical.radius + 1;
5502
5588
  const o = $t.intersectObjects(this.colliderMeshes);
@@ -5575,7 +5661,7 @@ class ke extends zr {
5575
5661
  }), i.radius = Math.sqrt(r), i;
5576
5662
  }
5577
5663
  }
5578
- const ri = (s) => {
5664
+ const oi = (s) => {
5579
5665
  const [e, t] = Z(s.options[s.index]), i = () => {
5580
5666
  s.onToggle(!s.open);
5581
5667
  }, n = (r) => {
@@ -5585,7 +5671,7 @@ const ri = (s) => {
5585
5671
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: i, children: `${s.title}: ${e}` }),
5586
5672
  s.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: s.options.map((r) => /* @__PURE__ */ u.jsx("li", { onClick: () => n(r), children: r }, r)) })
5587
5673
  ] });
5588
- }, Ge = Ra(function(e, t) {
5674
+ }, Ge = La(function(e, t) {
5589
5675
  const i = [
5590
5676
  "Renderer",
5591
5677
  "Depth",
@@ -5599,7 +5685,7 @@ const ri = (s) => {
5599
5685
  } }),
5600
5686
  /* @__PURE__ */ u.jsxs("div", { className: "options", children: [
5601
5687
  e.camera !== null && /* @__PURE__ */ u.jsx(
5602
- ri,
5688
+ oi,
5603
5689
  {
5604
5690
  title: "Camera",
5605
5691
  index: e.options.indexOf(e.camera.name),
@@ -5613,7 +5699,7 @@ const ri = (s) => {
5613
5699
  }
5614
5700
  ),
5615
5701
  /* @__PURE__ */ u.jsx(
5616
- ri,
5702
+ oi,
5617
5703
  {
5618
5704
  title: "Mode",
5619
5705
  index: i.indexOf(n),
@@ -5634,15 +5720,15 @@ const ri = (s) => {
5634
5720
  ] })
5635
5721
  ] });
5636
5722
  });
5637
- class Br extends on {
5723
+ class Wr extends ln {
5638
5724
  constructor(e) {
5639
5725
  super({
5640
5726
  extensions: {
5641
5727
  // @ts-ignore
5642
5728
  derivatives: !0
5643
5729
  },
5644
- glslVersion: la,
5645
- side: Fi,
5730
+ glslVersion: ha,
5731
+ side: Hi,
5646
5732
  transparent: !0,
5647
5733
  uniforms: {
5648
5734
  uScale: {
@@ -5747,17 +5833,17 @@ class Br extends on {
5747
5833
  });
5748
5834
  }
5749
5835
  }
5750
- class Vr extends M {
5836
+ class Gr extends M {
5751
5837
  gridMaterial;
5752
5838
  constructor() {
5753
- const e = new Br();
5754
- super(new ln(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
5839
+ const e = new Wr();
5840
+ super(new cn(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
5755
5841
  }
5756
5842
  update() {
5757
5843
  this.gridMaterial.needsUpdate = !0;
5758
5844
  }
5759
5845
  }
5760
- function Ds(s) {
5846
+ function Is(s) {
5761
5847
  const [e, t] = Z(s.selected), i = "toggle" + (e ? " selected" : "");
5762
5848
  return /* @__PURE__ */ u.jsx(
5763
5849
  "button",
@@ -5776,7 +5862,7 @@ function Ds(s) {
5776
5862
  s.name
5777
5863
  );
5778
5864
  }
5779
- const Zr = `#include <common>
5865
+ const Xr = `#include <common>
5780
5866
  #include <batching_pars_vertex>
5781
5867
  #include <uv_pars_vertex>
5782
5868
  #include <color_pars_vertex>
@@ -5806,7 +5892,7 @@ void main() {
5806
5892
  #include <logdepthbuf_vertex>
5807
5893
  #include <clipping_planes_vertex>
5808
5894
  #include <worldpos_vertex>
5809
- }`, Wr = `
5895
+ }`, $r = `
5810
5896
  #include <common>
5811
5897
  #include <uv_pars_fragment>
5812
5898
  #include <clipping_planes_pars_fragment>
@@ -5815,30 +5901,30 @@ void main() {
5815
5901
  #include <clipping_planes_fragment>
5816
5902
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
5817
5903
  }`;
5818
- class Gr extends on {
5904
+ class qr extends ln {
5819
5905
  constructor() {
5820
5906
  super({
5821
5907
  defines: {
5822
5908
  USE_UV: ""
5823
5909
  },
5824
- vertexShader: Zr,
5825
- fragmentShader: Wr
5910
+ vertexShader: Xr,
5911
+ fragmentShader: $r
5826
5912
  });
5827
5913
  }
5828
5914
  }
5829
- const Xe = new si(), ue = new A(), Ye = new A(), Q = new Ee(), Rs = {
5915
+ const Xe = new si(), ue = new A(), Ye = new A(), Q = new Ee(), Ls = {
5830
5916
  X: new A(1, 0, 0),
5831
5917
  Y: new A(0, 1, 0),
5832
5918
  Z: new A(0, 0, 1)
5833
- }, Ti = { type: "change" }, Is = { type: "mouseDown", mode: null }, Ls = { type: "mouseUp", mode: null }, ks = { type: "objectChange" };
5834
- class Xr extends rn {
5919
+ }, Mi = { type: "change" }, ks = { type: "mouseDown", mode: null }, Us = { type: "mouseUp", mode: null }, js = { type: "objectChange" };
5920
+ class Kr extends on {
5835
5921
  constructor(e, t = null) {
5836
5922
  super(void 0, t);
5837
- const i = new eo(this);
5923
+ const i = new so(this);
5838
5924
  this._root = i;
5839
- const n = new to();
5925
+ const n = new no();
5840
5926
  this._gizmo = n, i.add(n);
5841
- const r = new io();
5927
+ const r = new ao();
5842
5928
  this._plane = r, i.add(r);
5843
5929
  const a = this;
5844
5930
  function o(S, C) {
@@ -5848,13 +5934,13 @@ class Xr extends rn {
5848
5934
  return w !== void 0 ? w : C;
5849
5935
  },
5850
5936
  set: function(O) {
5851
- w !== O && (w = O, r[S] = O, n[S] = O, a.dispatchEvent({ type: S + "-changed", value: O }), a.dispatchEvent(Ti));
5937
+ w !== O && (w = O, r[S] = O, n[S] = O, a.dispatchEvent({ type: S + "-changed", value: O }), a.dispatchEvent(Mi));
5852
5938
  }
5853
5939
  }), a[S] = C, r[S] = C, n[S] = C;
5854
5940
  }
5855
5941
  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);
5856
5942
  const c = new A(), l = new A(), d = new Ee(), p = new Ee(), m = new A(), f = new Ee(), E = new A(), y = new A(), T = new A(), g = 0, v = new A();
5857
- o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", E), o("pointEnd", y), o("rotationAxis", T), o("rotationAngle", g), o("eye", v), this._offset = new A(), this._startNorm = new A(), this._endNorm = new A(), this._cameraScale = new A(), this._parentPosition = new A(), this._parentQuaternion = new Ee(), this._parentQuaternionInv = new Ee(), this._parentScale = new A(), this._worldScaleStart = new A(), this._worldQuaternionInv = new Ee(), this._worldScale = new A(), this._positionStart = new A(), this._quaternionStart = new Ee(), this._scaleStart = new A(), this._getPointer = $r.bind(this), this._onPointerDown = Kr.bind(this), this._onPointerHover = qr.bind(this), this._onPointerMove = Qr.bind(this), this._onPointerUp = Jr.bind(this), t !== null && this.connect();
5943
+ o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", E), o("pointEnd", y), o("rotationAxis", T), o("rotationAngle", g), o("eye", v), this._offset = new A(), this._startNorm = new A(), this._endNorm = new A(), this._cameraScale = new A(), this._parentPosition = new A(), this._parentQuaternion = new Ee(), this._parentQuaternionInv = new Ee(), this._parentScale = new A(), this._worldScaleStart = new A(), this._worldQuaternionInv = new Ee(), this._worldScale = new A(), this._positionStart = new A(), this._quaternionStart = new Ee(), this._scaleStart = new A(), this._getPointer = Qr.bind(this), this._onPointerDown = eo.bind(this), this._onPointerHover = Jr.bind(this), this._onPointerMove = to.bind(this), this._onPointerUp = io.bind(this), t !== null && this.connect();
5858
5944
  }
5859
5945
  connect() {
5860
5946
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -5869,14 +5955,14 @@ class Xr extends rn {
5869
5955
  if (this.object === void 0 || this.dragging === !0)
5870
5956
  return;
5871
5957
  e !== null && Xe.setFromCamera(e, this.camera);
5872
- const t = Mi(this._gizmo.picker[this.mode], Xe);
5958
+ const t = Ai(this._gizmo.picker[this.mode], Xe);
5873
5959
  t ? this.axis = t.object.name : this.axis = null;
5874
5960
  }
5875
5961
  pointerDown(e) {
5876
5962
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
5877
5963
  e !== null && Xe.setFromCamera(e, this.camera);
5878
- const t = Mi(this._plane, Xe, !0);
5879
- 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, Is.mode = this.mode, this.dispatchEvent(Is);
5964
+ const t = Ai(this._plane, Xe, !0);
5965
+ 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, ks.mode = this.mode, this.dispatchEvent(ks);
5880
5966
  }
5881
5967
  }
5882
5968
  pointerMove(e) {
@@ -5885,7 +5971,7 @@ class Xr extends rn {
5885
5971
  if (i === "scale" ? r = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (r = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1)
5886
5972
  return;
5887
5973
  e !== null && Xe.setFromCamera(e, this.camera);
5888
- const a = Mi(this._plane, Xe, !0);
5974
+ const a = Ai(this._plane, Xe, !0);
5889
5975
  if (a) {
5890
5976
  if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), i === "translate")
5891
5977
  this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (n.position.applyQuaternion(Q.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), r === "world" && (n.parent && n.position.add(ue.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(ue.setFromMatrixPosition(n.parent.matrixWorld))));
@@ -5900,13 +5986,13 @@ class Xr extends rn {
5900
5986
  this._offset.copy(this.pointEnd).sub(this.pointStart);
5901
5987
  const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
5902
5988
  let c = !1;
5903
- 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(Rs[t]), ue.copy(Rs[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());
5989
+ 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(Ls[t]), ue.copy(Ls[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());
5904
5990
  }
5905
- this.dispatchEvent(Ti), this.dispatchEvent(ks);
5991
+ this.dispatchEvent(Mi), this.dispatchEvent(js);
5906
5992
  }
5907
5993
  }
5908
5994
  pointerUp(e) {
5909
- e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ls.mode = this.mode, this.dispatchEvent(Ls)), this.dragging = !1, this.axis = null);
5995
+ e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Us.mode = this.mode, this.dispatchEvent(Us)), this.dragging = !1, this.axis = null);
5910
5996
  }
5911
5997
  dispose() {
5912
5998
  this.disconnect(), this.traverse(function(e) {
@@ -5922,7 +6008,7 @@ class Xr extends rn {
5922
6008
  return this.object = void 0, this.axis = null, this._root.visible = !1, this;
5923
6009
  }
5924
6010
  reset() {
5925
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ti), this.dispatchEvent(ks), this.pointStart.copy(this.pointEnd));
6011
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Mi), this.dispatchEvent(js), this.pointStart.copy(this.pointEnd));
5926
6012
  }
5927
6013
  getRaycaster() {
5928
6014
  return Xe;
@@ -5950,7 +6036,7 @@ class Xr extends rn {
5950
6036
  this.space = e;
5951
6037
  }
5952
6038
  }
5953
- function $r(s) {
6039
+ function Qr(s) {
5954
6040
  if (this.domElement.ownerDocument.pointerLockElement)
5955
6041
  return {
5956
6042
  x: 0,
@@ -5966,7 +6052,7 @@ function $r(s) {
5966
6052
  };
5967
6053
  }
5968
6054
  }
5969
- function qr(s) {
6055
+ function Jr(s) {
5970
6056
  if (this.enabled)
5971
6057
  switch (s.pointerType) {
5972
6058
  case "mouse":
@@ -5975,24 +6061,24 @@ function qr(s) {
5975
6061
  break;
5976
6062
  }
5977
6063
  }
5978
- function Kr(s) {
6064
+ function eo(s) {
5979
6065
  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)));
5980
6066
  }
5981
- function Qr(s) {
6067
+ function to(s) {
5982
6068
  this.enabled && this.pointerMove(this._getPointer(s));
5983
6069
  }
5984
- function Jr(s) {
6070
+ function io(s) {
5985
6071
  this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
5986
6072
  }
5987
- function Mi(s, e, t) {
6073
+ function Ai(s, e, t) {
5988
6074
  const i = e.intersectObject(s, !0);
5989
6075
  for (let n = 0; n < i.length; n++)
5990
6076
  if (i[n].object.visible || t)
5991
6077
  return i[n];
5992
6078
  return !1;
5993
6079
  }
5994
- const qt = new cn(), X = new A(0, 1, 0), Us = new A(0, 0, 0), js = new oi(), Kt = new Ee(), ii = new Ee(), Re = new A(), Ns = new oi(), Lt = new A(1, 0, 0), qe = new A(0, 1, 0), kt = new A(0, 0, 1), Qt = new A(), Pt = new A(), Dt = new A();
5995
- class eo extends _t {
6080
+ const qt = new hn(), X = new A(0, 1, 0), Ns = new A(0, 0, 0), Fs = new li(), Kt = new Ee(), ii = new Ee(), Re = new A(), zs = new li(), Lt = new A(1, 0, 0), qe = new A(0, 1, 0), kt = new A(0, 0, 1), Qt = new A(), Pt = new A(), Dt = new A();
6081
+ class so extends _t {
5996
6082
  constructor(e) {
5997
6083
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
5998
6084
  }
@@ -6002,7 +6088,7 @@ class eo extends _t {
6002
6088
  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);
6003
6089
  }
6004
6090
  }
6005
- class to extends _t {
6091
+ class no extends _t {
6006
6092
  constructor() {
6007
6093
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
6008
6094
  const e = new Je({
@@ -6011,7 +6097,7 @@ class to extends _t {
6011
6097
  fog: !1,
6012
6098
  toneMapped: !1,
6013
6099
  transparent: !0
6014
- }), t = new zi({
6100
+ }), t = new Yi({
6015
6101
  depthTest: !1,
6016
6102
  depthWrite: !1,
6017
6103
  fog: !1,
@@ -6149,7 +6235,7 @@ class to extends _t {
6149
6235
  ]
6150
6236
  }, B = {
6151
6237
  XYZE: [
6152
- [new M(new hn(0.25, 10, 8), i)]
6238
+ [new M(new dn(0.25, 10, 8), i)]
6153
6239
  ],
6154
6240
  X: [
6155
6241
  [new M(new bt(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -6251,21 +6337,21 @@ class to extends _t {
6251
6337
  a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
6252
6338
  let o;
6253
6339
  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") {
6254
- 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(Lt).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(kt).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(js.lookAt(Us, 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));
6340
+ 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(Lt).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(kt).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(Fs.lookAt(Ns, 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));
6255
6341
  continue;
6256
6342
  }
6257
- a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(X.copy(Lt).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(kt).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(kt).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(Lt).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" && (Kt.copy(i), X.copy(this.eye).applyQuaternion(Q.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(js.lookAt(this.eye, Us, qe)), a.name === "X" && (Q.setFromAxisAngle(Lt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Kt, Q), a.quaternion.copy(Q)), a.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Kt, Q), a.quaternion.copy(Q)), a.name === "Z" && (Q.setFromAxisAngle(kt, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Kt, 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) {
6343
+ a.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(X.copy(Lt).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(kt).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(kt).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(Lt).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" && (Kt.copy(i), X.copy(this.eye).applyQuaternion(Q.copy(i).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Fs.lookAt(this.eye, Ns, qe)), a.name === "X" && (Q.setFromAxisAngle(Lt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Kt, Q), a.quaternion.copy(Q)), a.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Kt, Q), a.quaternion.copy(Q)), a.name === "Z" && (Q.setFromAxisAngle(kt, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Kt, 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) {
6258
6344
  return a.name === c;
6259
6345
  })) && (a.material.color.setHex(16776960), a.material.opacity = 1);
6260
6346
  }
6261
6347
  super.updateMatrixWorld(e);
6262
6348
  }
6263
6349
  }
6264
- class io extends M {
6350
+ class ao extends M {
6265
6351
  constructor() {
6266
6352
  super(
6267
- new ln(1e5, 1e5, 2, 2),
6268
- new Je({ visible: !1, wireframe: !0, side: Fi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6353
+ new cn(1e5, 1e5, 2, 2),
6354
+ new Je({ visible: !1, wireframe: !0, side: Hi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6269
6355
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
6270
6356
  }
6271
6357
  updateMatrixWorld(e) {
@@ -6302,10 +6388,10 @@ class io extends M {
6302
6388
  default:
6303
6389
  Re.set(0, 0, 0);
6304
6390
  }
6305
- Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Ns.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Ns)), super.updateMatrixWorld(e);
6391
+ Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (zs.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(zs)), super.updateMatrixWorld(e);
6306
6392
  }
6307
6393
  }
6308
- class ge extends Bs {
6394
+ class ge extends zi {
6309
6395
  static DRAG_START = "Transform::dragStart";
6310
6396
  static DRAG_END = "Transform::dragEnd";
6311
6397
  static _instance;
@@ -6328,7 +6414,7 @@ class ge extends Bs {
6328
6414
  let t = this.controls.get(e);
6329
6415
  if (t === void 0) {
6330
6416
  const i = document.querySelector(".clickable");
6331
- t = new Xr(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6417
+ t = new Kr(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6332
6418
  this.dispatchEvent({ type: ge.DRAG_START });
6333
6419
  }), t.addEventListener("mouseUp", () => {
6334
6420
  this.dispatchEvent({ type: ge.DRAG_END });
@@ -6374,9 +6460,9 @@ class ge extends Bs {
6374
6460
  return ge._instance || (ge._instance = new ge()), ge._instance;
6375
6461
  }
6376
6462
  }
6377
- const so = new de(), Ai = new pe();
6378
- class Fs extends _t {
6379
- curve = new ns();
6463
+ const ro = new de(), Pi = new pe();
6464
+ class Hs extends _t {
6465
+ curve = new rs();
6380
6466
  line;
6381
6467
  draggable;
6382
6468
  curvePos;
@@ -6397,7 +6483,7 @@ class Fs extends _t {
6397
6483
  group;
6398
6484
  constructor(e, t) {
6399
6485
  const i = new et(ot(0.5, 1, Math.random()), ot(0.5, 1, Math.random()), ot(0.5, 1, Math.random()));
6400
- super(), this.name = e, this.lineMaterial = new zi({ color: i }), this.line = new Ie(new gt(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new _t(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new hn(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 si(), this.raycaster.params.Line.threshold = 3, this.enable();
6486
+ super(), this.name = e, this.lineMaterial = new Yi({ color: i }), this.line = new Ie(new gt(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new _t(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new dn(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 si(), this.raycaster.params.Line.threshold = 3, this.enable();
6401
6487
  }
6402
6488
  enable() {
6403
6489
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6415,7 +6501,7 @@ class Fs extends _t {
6415
6501
  const e = [];
6416
6502
  this.draggable.children.forEach((t) => {
6417
6503
  e.push([Ae(t.position.x, 3), Ae(t.position.y, 3), Ae(t.position.z, 3)]);
6418
- }), Ia({
6504
+ }), ka({
6419
6505
  name: this.name,
6420
6506
  points: e,
6421
6507
  tension: this.tension,
@@ -6438,7 +6524,7 @@ class Fs extends _t {
6438
6524
  this.addPoint(new A(-50, 0, 0), !1), this.addPoint(new A(50, 0, 0));
6439
6525
  };
6440
6526
  addPoint = (e, t = !0) => {
6441
- const i = this.draggable.children.length, n = new M(so, this.draggedMat);
6527
+ const i = this.draggable.children.length, n = new M(ro, this.draggedMat);
6442
6528
  return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
6443
6529
  };
6444
6530
  addNextPt = () => {
@@ -6467,14 +6553,14 @@ class Fs extends _t {
6467
6553
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
6468
6554
  };
6469
6555
  updateSpline = () => {
6470
- this.curve = new ns(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6556
+ this.curve = new rs(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6471
6557
  };
6472
6558
  // Handlers
6473
6559
  onMouseClick = (e) => {
6474
6560
  if (!me.instance || this._transform && !this._transform.getHelper().visible)
6475
6561
  return;
6476
6562
  const i = me.instance.currentWindow.current.getBoundingClientRect();
6477
- Ai.x = (e.clientX - i.x) / i.width * 2 - 1, Ai.y = -((e.clientY - i.y) / i.height) * 2 + 1, this.raycaster.setFromCamera(Ai, this.camera);
6563
+ Pi.x = (e.clientX - i.x) / i.width * 2 - 1, Pi.y = -((e.clientY - i.y) / i.height) * 2 + 1, this.raycaster.setFromCamera(Pi, this.camera);
6478
6564
  const n = this.raycaster.intersectObjects(this.draggable.children, !1);
6479
6565
  if (n.length > 0) {
6480
6566
  const r = n[0].object;
@@ -6708,7 +6794,7 @@ class Fs extends _t {
6708
6794
  };
6709
6795
  }
6710
6796
  let Jt = 0;
6711
- class no extends _t {
6797
+ class oo extends _t {
6712
6798
  defaultScale = 10;
6713
6799
  _camera;
6714
6800
  group = null;
@@ -6767,7 +6853,7 @@ class no extends _t {
6767
6853
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
6768
6854
  }
6769
6855
  createSpline = (e = []) => {
6770
- const t = `Spline ${Jt + 1}`, i = new Fs(t, this._camera);
6856
+ const t = `Spline ${Jt + 1}`, i = new Hs(t, this._camera);
6771
6857
  return i.addPoints(e), this.addSpline(i), Jt++, i;
6772
6858
  };
6773
6859
  createSplineFromArray = (e) => {
@@ -6791,7 +6877,7 @@ class no extends _t {
6791
6877
  t.points.forEach((a) => {
6792
6878
  n.push(new A(a[0], a[1], a[2]));
6793
6879
  });
6794
- const r = new Fs(i, this.camera);
6880
+ const r = new Hs(i, this.camera);
6795
6881
  r.addPoints(n), this.addSpline(r), Jt++;
6796
6882
  };
6797
6883
  get camera() {
@@ -6804,15 +6890,15 @@ class no extends _t {
6804
6890
  });
6805
6891
  }
6806
6892
  }
6807
- const zs = [
6893
+ const Ys = [
6808
6894
  "Single",
6809
6895
  "Side by Side",
6810
6896
  "Stacked",
6811
6897
  "Quad"
6812
- ], ao = "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", ro = "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==";
6898
+ ], lo = "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", co = "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==";
6813
6899
  class me extends Nt {
6814
6900
  static instance = null;
6815
- scene = new Ys();
6901
+ scene = new Vs();
6816
6902
  renderer;
6817
6903
  currentScene;
6818
6904
  cameras = /* @__PURE__ */ new Map();
@@ -6822,17 +6908,17 @@ class me extends Nt {
6822
6908
  // RefObject to one of the "windows"
6823
6909
  cameraHelpers = /* @__PURE__ */ new Map();
6824
6910
  lightHelpers = /* @__PURE__ */ new Map();
6825
- helpersContainer = new ca();
6826
- grid = new Vr();
6827
- axisHelper = new as(500);
6828
- interactionHelper = new as(100);
6911
+ helpersContainer = new da();
6912
+ grid = new Gr();
6913
+ axisHelper = new os(500);
6914
+ interactionHelper = new os(100);
6829
6915
  currentTransform;
6830
6916
  // Tools
6831
6917
  splineEditor;
6832
6918
  // Override Materials
6833
- depthMaterial = new ha();
6834
- normalsMaterial = new da();
6835
- uvMaterial = new Gr();
6919
+ depthMaterial = new ua();
6920
+ normalsMaterial = new pa();
6921
+ uvMaterial = new qr();
6836
6922
  wireframeMaterial = new Je({
6837
6923
  opacity: 0.33,
6838
6924
  transparent: !0,
@@ -6883,12 +6969,12 @@ class me extends Nt {
6883
6969
  const r = {
6884
6970
  Vector2: pe,
6885
6971
  Vector3: A,
6886
- Vector4: ba,
6972
+ Vector4: Ea,
6887
6973
  Quaternion: Ee,
6888
- Matrix4: oi,
6889
- Spherical: Di,
6890
- Box3: Ca,
6891
- Sphere: Ea,
6974
+ Matrix4: li,
6975
+ Spherical: Ri,
6976
+ Box3: Sa,
6977
+ Sphere: wa,
6892
6978
  Raycaster: si
6893
6979
  };
6894
6980
  ke.install({ THREE: r }), this.setupScene(), this.setupTools();
@@ -7039,11 +7125,11 @@ class me extends Nt {
7039
7125
  ] }),
7040
7126
  /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
7041
7127
  /* @__PURE__ */ u.jsx(
7042
- ri,
7128
+ oi,
7043
7129
  {
7044
7130
  title: "View",
7045
- index: zs.indexOf(this.state.mode),
7046
- options: zs,
7131
+ index: Ys.indexOf(this.state.mode),
7132
+ options: Ys,
7047
7133
  onSelect: (t) => {
7048
7134
  t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
7049
7135
  },
@@ -7058,7 +7144,7 @@ class me extends Nt {
7058
7144
  }
7059
7145
  ),
7060
7146
  /* @__PURE__ */ u.jsx(
7061
- ri,
7147
+ oi,
7062
7148
  {
7063
7149
  title: "Interact",
7064
7150
  index: this.state.interactionMode === "Orbit" ? 0 : 1,
@@ -7080,10 +7166,10 @@ class me extends Nt {
7080
7166
  }
7081
7167
  ),
7082
7168
  /* @__PURE__ */ u.jsx(
7083
- Ds,
7169
+ Is,
7084
7170
  {
7085
7171
  name: "cameraHelper",
7086
- icon: ao,
7172
+ icon: lo,
7087
7173
  selected: this.cameraVisibility,
7088
7174
  height: 24,
7089
7175
  top: 2,
@@ -7098,10 +7184,10 @@ class me extends Nt {
7098
7184
  }
7099
7185
  ),
7100
7186
  /* @__PURE__ */ u.jsx(
7101
- Ds,
7187
+ Is,
7102
7188
  {
7103
7189
  name: "lightHelper",
7104
- icon: ro,
7190
+ icon: co,
7105
7191
  selected: this.lightVisibility,
7106
7192
  height: 24,
7107
7193
  top: 4,
@@ -7120,7 +7206,7 @@ class me extends Nt {
7120
7206
  }
7121
7207
  // Setup
7122
7208
  setupRenderer() {
7123
- this.renderer = new ua({
7209
+ this.renderer = new ma({
7124
7210
  canvas: this.canvasRef.current,
7125
7211
  stencil: !1
7126
7212
  }), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
@@ -7128,7 +7214,7 @@ class me extends Nt {
7128
7214
  setupScene() {
7129
7215
  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;
7130
7216
  const e = (n, r) => {
7131
- const a = new Pi(-100, 100, 100, -100, 50, 5e3);
7217
+ const a = new Di(-100, 100, 100, -100, 50, 5e3);
7132
7218
  return a.name = n, a.position.copy(r), a.lookAt(0, 0, 0), this.cameras.set(n, a), a;
7133
7219
  };
7134
7220
  e("Top", new A(0, 1e3, 0)), e("Bottom", new A(0, -1e3, 0)), e("Left", new A(-1e3, 0, 0)), e("Right", new A(1e3, 0, 0)), e("Front", new A(0, 0, 1e3)), e("Back", new A(0, 0, -1e3)), e("Orthographic", new A(1e3, 1e3, 1e3)), e("UI", new A()), 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;
@@ -7136,7 +7222,7 @@ class me extends Nt {
7136
7222
  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"));
7137
7223
  }
7138
7224
  setupTools() {
7139
- this.splineEditor = new no(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7225
+ this.splineEditor = new oo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7140
7226
  }
7141
7227
  // Public
7142
7228
  play() {
@@ -7204,7 +7290,7 @@ class me extends Nt {
7204
7290
  }
7205
7291
  const r = i / n;
7206
7292
  this.cameras.forEach((a) => {
7207
- a instanceof Pi ? (a.left = i / -2, a.right = i / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof Ct && (a.aspect = r, a.updateProjectionMatrix(), this.cameraHelpers.get(a.name)?.update());
7293
+ a instanceof Di ? (a.left = i / -2, a.right = i / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof Ct && (a.aspect = r, a.updateProjectionMatrix(), this.cameraHelpers.get(a.name)?.update());
7208
7294
  });
7209
7295
  };
7210
7296
  sceneUpdate = (e) => {
@@ -7218,7 +7304,7 @@ class me extends Nt {
7218
7304
  addCamera = (e) => {
7219
7305
  const t = e.value, i = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
7220
7306
  if (i !== void 0 && this.cameras.set(t.name, i), i instanceof Ct) {
7221
- const n = new pa(i);
7307
+ const n = new fa(i);
7222
7308
  n.visible = this.cameraVisibility, this.cameraHelpers.set(i.name, n), this.scene.add(n);
7223
7309
  }
7224
7310
  this.setState({ lastUpdate: Date.now() });
@@ -7269,7 +7355,7 @@ class me extends Nt {
7269
7355
  if (this.currentCamera.name === "UI")
7270
7356
  return;
7271
7357
  const t = this.controls.get(this.currentCamera.name);
7272
- e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof ma ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Ui(45), Ui(45), !0), this.updateCameraControls(t));
7358
+ e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof ga ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(ji(45), ji(45), !0), this.updateCameraControls(t));
7273
7359
  } else if (this.currentTransform !== void 0)
7274
7360
  switch (e.key) {
7275
7361
  case "r":
@@ -7306,7 +7392,7 @@ class me extends Nt {
7306
7392
  x: this.selectedItem.rotation.x,
7307
7393
  y: this.selectedItem.rotation.y,
7308
7394
  z: this.selectedItem.rotation.z
7309
- }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ci.instance.update());
7395
+ }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), hi.instance.update());
7310
7396
  };
7311
7397
  // Utils
7312
7398
  clearLightHelpers = () => {
@@ -7320,19 +7406,19 @@ class me extends Nt {
7320
7406
  let t;
7321
7407
  switch (e.type) {
7322
7408
  case "DirectionalLight":
7323
- t = new va(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7409
+ t = new ba(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7324
7410
  break;
7325
7411
  case "HemisphereLight":
7326
- t = new _a(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7412
+ t = new ya(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7327
7413
  break;
7328
7414
  case "RectAreaLight":
7329
- t = new xr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7415
+ t = new Mr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7330
7416
  break;
7331
7417
  case "PointLight":
7332
- t = new ga(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7418
+ t = new va(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7333
7419
  break;
7334
7420
  case "SpotLight":
7335
- t = new fa(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7421
+ t = new _a(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7336
7422
  break;
7337
7423
  }
7338
7424
  }
@@ -7342,7 +7428,7 @@ class me extends Nt {
7342
7428
  const i = this.controls.get(e.name);
7343
7429
  if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
7344
7430
  return;
7345
- const n = new Tr(e, t);
7431
+ const n = new Pr(e, t);
7346
7432
  switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
7347
7433
  case "Top":
7348
7434
  case "Bottom":
@@ -7403,11 +7489,11 @@ class me extends Nt {
7403
7489
  if (this.selectedItem === void 0)
7404
7490
  return;
7405
7491
  cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
7406
- const i = 0.15, n = new ya();
7492
+ const i = 0.15, n = new Ca();
7407
7493
  n.start(), this.selectedItem.getWorldPosition(e.target0);
7408
7494
  const r = () => {
7409
7495
  const a = n.getDelta();
7410
- this.cameraControls && this.cameraControls.update(a), t && (e.target.lerp(e.target0, i), e.object.position.lerp(e.position0, i), e.object.zoom = Ri(e.object.zoom, e.zoom0, i), e.object.updateProjectionMatrix(), e.dispatchEvent({ type: "change" })), n.getElapsedTime() >= 0.5 ? (cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.clearControls()) : this.cameraControlsRafID = requestAnimationFrame(r);
7496
+ this.cameraControls && this.cameraControls.update(a), t && (e.target.lerp(e.target0, i), e.object.position.lerp(e.position0, i), e.object.zoom = Ii(e.object.zoom, e.zoom0, i), e.object.updateProjectionMatrix(), e.dispatchEvent({ type: "change" })), n.getElapsedTime() >= 0.5 ? (cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.clearControls()) : this.cameraControlsRafID = requestAnimationFrame(r);
7411
7497
  };
7412
7498
  r();
7413
7499
  };
@@ -7471,11 +7557,11 @@ class me extends Nt {
7471
7557
  return `${this.appID}_multiviewLightVisibility`;
7472
7558
  }
7473
7559
  }
7474
- class ci extends Nt {
7560
+ class hi extends Nt {
7475
7561
  static instance;
7476
- matrix = new oi();
7562
+ matrix = new li();
7477
7563
  position = new A();
7478
- rotation = new cn();
7564
+ rotation = new hn();
7479
7565
  scale = new A();
7480
7566
  open = !1;
7481
7567
  constructor(e) {
@@ -7484,7 +7570,7 @@ class ci extends Nt {
7484
7570
  this.open = i, this.saveExpanded(), this.state = {
7485
7571
  lastUpdated: 0,
7486
7572
  expanded: i
7487
- }, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ci.instance = this;
7573
+ }, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), hi.instance = this;
7488
7574
  }
7489
7575
  update() {
7490
7576
  if (me.instance) {
@@ -7554,7 +7640,7 @@ class ci extends Nt {
7554
7640
  return `${this.props.three.app.appID}_transform`;
7555
7641
  }
7556
7642
  }
7557
- function Hs(s) {
7643
+ function Bs(s) {
7558
7644
  switch (s) {
7559
7645
  case "color":
7560
7646
  return "Color";
@@ -7577,7 +7663,7 @@ function Hs(s) {
7577
7663
  }
7578
7664
  return s;
7579
7665
  }
7580
- function oo(s, e) {
7666
+ function ho(s, e) {
7581
7667
  function t() {
7582
7668
  return `${e.app.appID}_light`;
7583
7669
  }
@@ -7590,7 +7676,7 @@ function oo(s, e) {
7590
7676
  for (const o in s.lightInfo) {
7591
7677
  const c = s.lightInfo[o];
7592
7678
  c !== void 0 && (c.isColor !== void 0 ? a.push({
7593
- title: Hs(o),
7679
+ title: Bs(o),
7594
7680
  prop: o,
7595
7681
  type: "color",
7596
7682
  value: c,
@@ -7604,7 +7690,7 @@ function oo(s, e) {
7604
7690
  }
7605
7691
  }
7606
7692
  }) : a.push({
7607
- title: Hs(o),
7693
+ title: Bs(o),
7608
7694
  prop: o,
7609
7695
  type: typeof c,
7610
7696
  value: c,
@@ -7631,7 +7717,7 @@ function oo(s, e) {
7631
7717
  }
7632
7718
  );
7633
7719
  }
7634
- function lo(s) {
7720
+ function uo(s) {
7635
7721
  const e = s.object, t = s.three;
7636
7722
  function i() {
7637
7723
  return `${t.app.appID}_animation`;
@@ -7702,7 +7788,7 @@ function lo(s) {
7702
7788
  }), o.push({
7703
7789
  title: "Mixer",
7704
7790
  items: y
7705
- }), d = new Sa(m), me.instance?.scene.add(d);
7791
+ }), d = new xa(m), me.instance?.scene.add(d);
7706
7792
  }
7707
7793
  }
7708
7794
  }
@@ -7720,7 +7806,7 @@ function lo(s) {
7720
7806
  }
7721
7807
  );
7722
7808
  }
7723
- const Ni = {
7809
+ const Fi = {
7724
7810
  name: "",
7725
7811
  uuid: "",
7726
7812
  type: "",
@@ -7733,15 +7819,15 @@ const Ni = {
7733
7819
  lightInfo: void 0,
7734
7820
  children: []
7735
7821
  };
7736
- let ce = { ...Ni };
7737
- function co(s) {
7822
+ let ce = { ...Fi };
7823
+ function po(s) {
7738
7824
  const [e, t] = Z(-1);
7739
7825
  tt(() => {
7740
7826
  function a(c) {
7741
7827
  ce = { ...c.value }, t(Date.now());
7742
7828
  }
7743
7829
  function o() {
7744
- ce = { ...Ni }, t(Date.now());
7830
+ ce = { ...Fi }, t(Date.now());
7745
7831
  }
7746
7832
  return D.addEventListener(P.SET_SCENE, o), D.addEventListener(P.SET_OBJECT, a), () => {
7747
7833
  D.removeEventListener(P.SET_SCENE, o), D.removeEventListener(P.SET_OBJECT, a);
@@ -7749,11 +7835,11 @@ function co(s) {
7749
7835
  }, []);
7750
7836
  const i = ce.type.toLowerCase(), n = ce.animations.length > 0 || ce.mixer !== void 0, r = i.search("mesh") > -1 || i.search("line") > -1 || i.search("points") > -1;
7751
7837
  return /* @__PURE__ */ u.jsx(
7752
- ai,
7838
+ ri,
7753
7839
  {
7754
7840
  label: "Inspector",
7755
7841
  button: ce.uuid.length > 0 ? /* @__PURE__ */ u.jsx("button", { className: "remove", onClick: () => {
7756
- ge.instance.remove(ce.name), ce = { ...Ni }, t(Date.now());
7842
+ ge.instance.remove(ce.name), ce = { ...Fi }, t(Date.now());
7757
7843
  } }) : void 0,
7758
7844
  children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: s.class, children: ce.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
7759
7845
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
@@ -7789,28 +7875,28 @@ function co(s) {
7789
7875
  )
7790
7876
  ] }),
7791
7877
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
7792
- /* @__PURE__ */ u.jsx(ci, { object: ce, three: s.three }),
7793
- n ? /* @__PURE__ */ u.jsx(lo, { object: ce, three: s.three }) : null,
7794
- i.search("camera") > -1 ? wr(ce, s.three) : null,
7795
- i.search("light") > -1 ? oo(ce, s.three) : null,
7796
- r ? Cr(ce, s.three) : null
7878
+ /* @__PURE__ */ u.jsx(hi, { object: ce, three: s.three }),
7879
+ n ? /* @__PURE__ */ u.jsx(uo, { object: ce, three: s.three }) : null,
7880
+ i.search("camera") > -1 ? Tr(ce, s.three) : null,
7881
+ i.search("light") > -1 ? ho(ce, s.three) : null,
7882
+ r ? wr(ce, s.three) : null
7797
7883
  ] })
7798
7884
  ] }) }, e)
7799
7885
  },
7800
7886
  "Inspector"
7801
7887
  );
7802
7888
  }
7803
- class ho extends Nt {
7889
+ class mo extends Nt {
7804
7890
  // Renderer
7805
7891
  autoClear = !0;
7806
7892
  autoClearColor = !0;
7807
7893
  autoClearDepth = !0;
7808
7894
  autoClearStencil = !0;
7809
- outputColorSpace = rs;
7895
+ outputColorSpace = ls;
7810
7896
  localClippingEnabled = !1;
7811
7897
  clearColor = new et(0);
7812
7898
  clearAlpha = 1;
7813
- toneMapping = os;
7899
+ toneMapping = cs;
7814
7900
  toneMappingExposure = 1;
7815
7901
  constructor(e) {
7816
7902
  super(e);
@@ -7934,11 +8020,11 @@ class ho extends Nt {
7934
8020
  options: [
7935
8021
  {
7936
8022
  title: "No Color Space",
7937
- value: wa
8023
+ value: Oa
7938
8024
  },
7939
8025
  {
7940
8026
  title: "SRB Color Space",
7941
- value: rs
8027
+ value: ls
7942
8028
  },
7943
8029
  {
7944
8030
  title: "Linear SRB Color Space",
@@ -7956,35 +8042,35 @@ class ho extends Nt {
7956
8042
  options: [
7957
8043
  {
7958
8044
  title: "None ",
7959
- value: os
8045
+ value: cs
7960
8046
  },
7961
8047
  {
7962
8048
  title: "Linear ",
7963
- value: xa
8049
+ value: Ta
7964
8050
  },
7965
8051
  {
7966
8052
  title: "Reinhard",
7967
- value: Oa
8053
+ value: Ma
7968
8054
  },
7969
8055
  {
7970
8056
  title: "Cineon ",
7971
- value: Ta
8057
+ value: Aa
7972
8058
  },
7973
8059
  {
7974
8060
  title: "ACES Filmic",
7975
- value: Ma
8061
+ value: Pa
7976
8062
  },
7977
8063
  {
7978
8064
  title: "AgX",
7979
- value: Aa
8065
+ value: Da
7980
8066
  },
7981
8067
  {
7982
8068
  title: "Neutral",
7983
- value: Pa
8069
+ value: Ra
7984
8070
  },
7985
8071
  {
7986
8072
  title: "Custom",
7987
- value: Da
8073
+ value: Ia
7988
8074
  }
7989
8075
  ],
7990
8076
  onChange: (t, i) => {
@@ -8017,12 +8103,12 @@ class ho extends Nt {
8017
8103
  return `${this.props.three.app.appID}_renderer`;
8018
8104
  }
8019
8105
  }
8020
- function uo(s) {
8106
+ function fo(s) {
8021
8107
  const [e] = Z([]), [t] = Z([]), [i, n] = Z(0), r = (c) => {
8022
8108
  const l = c.value;
8023
8109
  e.push(l), t.push(
8024
8110
  /* @__PURE__ */ u.jsx(
8025
- ai,
8111
+ ri,
8026
8112
  {
8027
8113
  label: `Scene: ${l.name}`,
8028
8114
  scene: l,
@@ -8030,7 +8116,7 @@ function uo(s) {
8030
8116
  onRefresh: () => {
8031
8117
  s.three.refreshScene(l.name);
8032
8118
  },
8033
- children: /* @__PURE__ */ u.jsx(gs, { child: l, scene: l, three: s.three })
8119
+ children: /* @__PURE__ */ u.jsx(vs, { child: l, scene: l, three: s.three })
8034
8120
  },
8035
8121
  Math.random()
8036
8122
  )
@@ -8040,7 +8126,7 @@ function uo(s) {
8040
8126
  for (let d = 0; d < e.length; d++)
8041
8127
  if (l.uuid === e[d].uuid) {
8042
8128
  e[d] = l, t[d] = /* @__PURE__ */ u.jsx(
8043
- ai,
8129
+ ri,
8044
8130
  {
8045
8131
  label: `Scene: ${l.name}`,
8046
8132
  scene: l,
@@ -8048,7 +8134,7 @@ function uo(s) {
8048
8134
  onRefresh: () => {
8049
8135
  s.three.refreshScene(l.name);
8050
8136
  },
8051
- children: /* @__PURE__ */ u.jsx(gs, { child: l, scene: l, three: s.three })
8137
+ children: /* @__PURE__ */ u.jsx(vs, { child: l, scene: l, three: s.three })
8052
8138
  },
8053
8139
  Math.random()
8054
8140
  ), n(Date.now());
@@ -8066,12 +8152,12 @@ function uo(s) {
8066
8152
  D.removeEventListener(P.ADD_SCENE, r), D.removeEventListener(P.REFRESH_SCENE, a), D.removeEventListener(P.REMOVE_SCENE, o);
8067
8153
  }), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
8068
8154
  /* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, i),
8069
- /* @__PURE__ */ u.jsx(co, { three: s.three }),
8070
- /* @__PURE__ */ u.jsx(ho, { three: s.three }),
8155
+ /* @__PURE__ */ u.jsx(po, { three: s.three }),
8156
+ /* @__PURE__ */ u.jsx(mo, { three: s.three }),
8071
8157
  /* @__PURE__ */ u.jsx(ae, { three: s.three })
8072
8158
  ] });
8073
8159
  }
8074
- function Mo(s) {
8160
+ function Lo(s) {
8075
8161
  return tt(() => {
8076
8162
  function e(o) {
8077
8163
  let c = null;
@@ -8120,7 +8206,7 @@ function Mo(s) {
8120
8206
  const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
8121
8207
  if (f !== void 0)
8122
8208
  try {
8123
- p !== void 0 ? Wa(f, p)[c](d) : f[c](d);
8209
+ p !== void 0 ? $a(f, p)[c](d) : f[c](d);
8124
8210
  } catch (E) {
8125
8211
  console.log("Error requesting method:"), console.log(E), console.log(c), console.log(d);
8126
8212
  }
@@ -8130,15 +8216,15 @@ function Mo(s) {
8130
8216
  };
8131
8217
  }, []), null;
8132
8218
  }
8133
- function po(s) {
8219
+ function go(s) {
8134
8220
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
8135
8221
  /* @__PURE__ */ u.jsx("div", { className: "header", children: s.header }),
8136
8222
  s.children,
8137
8223
  /* @__PURE__ */ u.jsx("div", { className: "footer", children: s.footer })
8138
8224
  ] });
8139
8225
  }
8140
- function Ao(s) {
8141
- return /* @__PURE__ */ u.jsx(po, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8226
+ function ko(s) {
8227
+ return /* @__PURE__ */ u.jsx(go, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8142
8228
  /* @__PURE__ */ u.jsx(
8143
8229
  me,
8144
8230
  {
@@ -8149,56 +8235,60 @@ function Ao(s) {
8149
8235
  onSceneUpdate: s.onSceneUpdate
8150
8236
  }
8151
8237
  ),
8152
- /* @__PURE__ */ u.jsx(uo, { three: s.three })
8238
+ /* @__PURE__ */ u.jsx(fo, { three: s.three })
8153
8239
  ] }) });
8154
8240
  }
8155
8241
  export {
8156
- ai as Accordion,
8157
- Co as Application,
8158
- Hi as BaseRemote,
8242
+ ri as Accordion,
8243
+ To as Application,
8244
+ Bi as BaseRemote,
8159
8245
  _n as ChildObject,
8160
- gs as ContainerObject,
8161
- Ja as Draggable,
8162
- Qa as DraggableItem,
8163
- er as Dropdown,
8164
- tr as DropdownItem,
8165
- po as Editor,
8246
+ vs as ContainerObject,
8247
+ Oo as CreateLoadWorker,
8248
+ ir as Draggable,
8249
+ tr as DraggableItem,
8250
+ sr as Dropdown,
8251
+ nr as DropdownItem,
8252
+ go as Editor,
8253
+ Za as ElementProxyReceiver,
8166
8254
  ei as ExportTexture,
8167
- co as Inspector,
8255
+ po as Inspector,
8168
8256
  me as MultiView,
8169
8257
  gn as NavButton,
8170
- Ha as QualityType,
8171
- Eo as RemoteComponents,
8172
- To as RemoteController,
8173
- xo as RemoteTheatre,
8174
- Oo as RemoteThree,
8175
- Mo as SceneInspector,
8176
- uo as SidePanel,
8177
- Fs as Spline,
8178
- no as SplineEditor,
8179
- Ao as ThreeEditor,
8258
+ xo as ProxyManager,
8259
+ Ba as QualityType,
8260
+ Mo as RemoteComponents,
8261
+ Io as RemoteController,
8262
+ Do as RemoteTheatre,
8263
+ Ro as RemoteThree,
8264
+ Lo as SceneInspector,
8265
+ fo as SidePanel,
8266
+ Hs as Spline,
8267
+ oo as SplineEditor,
8268
+ ko as ThreeEditor,
8180
8269
  P as ToolEvents,
8181
8270
  ge as Transform,
8182
- ni as capitalize,
8271
+ ai as capitalize,
8183
8272
  $e as clamp,
8184
- ls as colorToHex,
8185
- Ia as copyToClipboard,
8186
- wo as customizeTheatreElements,
8273
+ hs as colorToHex,
8274
+ ka as copyToClipboard,
8275
+ Po as customizeTheatreElements,
8187
8276
  D as debugDispatcher,
8188
- _o as defaultTheatreCallback,
8189
- vo as detectSettings,
8277
+ bo as defaultTheatreCallback,
8278
+ Co as detectSettings,
8190
8279
  He as dispose,
8191
- Ya as disposeMaterial,
8192
- bo as disposeTexture,
8193
- yo as distance,
8194
- Li as hierarchyUUID,
8195
- ka as isColor,
8196
- Ri as mix,
8197
- pn as noop,
8198
- us as normalize,
8199
- La as randomID,
8200
- ps as resetThreeObjects,
8280
+ Va as disposeMaterial,
8281
+ So as disposeTexture,
8282
+ Eo as distance,
8283
+ ki as hierarchyUUID,
8284
+ ja as isColor,
8285
+ Ii as mix,
8286
+ ni as noop,
8287
+ ms as normalize,
8288
+ wo as parseModelLite,
8289
+ Ua as randomID,
8290
+ fs as resetThreeObjects,
8201
8291
  Ae as round,
8202
- So as theatreEditorApp,
8203
- Ii as totalThreeObjects
8292
+ Ao as theatreEditorApp,
8293
+ Li as totalThreeObjects
8204
8294
  };