@tomorrowevening/hermes 0.0.120 → 0.0.121

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,90 @@ 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
+ class Oo {
336
419
  components = /* @__PURE__ */ new Map();
337
420
  listen;
338
421
  // Protected
@@ -391,8 +474,8 @@ class Co {
391
474
  }
392
475
  }
393
476
  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 {
477
+ const D = new zi();
478
+ class Bi {
396
479
  app;
397
480
  constructor(e) {
398
481
  this.app = e;
@@ -404,7 +487,7 @@ class Hi {
404
487
  handleEditor(e, t, i) {
405
488
  }
406
489
  }
407
- class Eo extends Hi {
490
+ class To extends Bi {
408
491
  selectDropdown(e, t) {
409
492
  this.app.send({
410
493
  event: "selectComponent",
@@ -436,7 +519,7 @@ class Eo extends Hi {
436
519
  }
437
520
  }
438
521
  }
439
- function So(s, e, t) {
522
+ function Mo(s, e, t) {
440
523
  if (s.editor) {
441
524
  t.ui.restore(), t.onSelectionChange((a) => {
442
525
  a.length < 1 || a.forEach((o) => {
@@ -479,7 +562,7 @@ function So(s, e, t) {
479
562
  } else
480
563
  t.ui.hide();
481
564
  }
482
- function wo() {
565
+ function Ao() {
483
566
  setTimeout(() => {
484
567
  const s = document.getElementById("theatrejs-studio-root");
485
568
  if (s === null || s.shadowRoot === null)
@@ -505,7 +588,7 @@ function wo() {
505
588
  }
506
589
  }, 1e3);
507
590
  }
508
- class xo extends Hi {
591
+ class Po extends Bi {
509
592
  project;
510
593
  sheets = /* @__PURE__ */ new Map();
511
594
  sheetObjects = /* @__PURE__ */ new Map();
@@ -567,12 +650,12 @@ class xo extends Hi {
567
650
  return;
568
651
  const c = `${this.getSheetInstance(e, r)}_${t}`;
569
652
  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);
653
+ 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
654
  const d = l.onValuesChange((p) => {
572
655
  if (this.app.editor) {
573
656
  for (const f in p) {
574
657
  const E = p[f];
575
- typeof E == "object" && ka(E) && (p[f] = {
658
+ typeof E == "object" && ja(E) && (p[f] = {
576
659
  r: E.r,
577
660
  g: E.g,
578
661
  b: E.b,
@@ -679,7 +762,7 @@ class xo extends Hi {
679
762
  this.studio?.ui.hide();
680
763
  }
681
764
  }
682
- function Ba(s) {
765
+ function Wa(s) {
683
766
  if (s.name === "cameras")
684
767
  return "camera";
685
768
  if (s.name === "interactive")
@@ -704,7 +787,7 @@ function ut(s) {
704
787
  e.children.push(ut(t));
705
788
  }), e;
706
789
  }
707
- function Va(s) {
790
+ function Ga(s) {
708
791
  const e = {};
709
792
  for (const t in s) {
710
793
  const i = s[t].value;
@@ -720,7 +803,7 @@ function Va(s) {
720
803
  }
721
804
  return e;
722
805
  }
723
- function Za(s) {
806
+ function Xa(s) {
724
807
  switch (s) {
725
808
  case "blendSrcAlpha":
726
809
  case "blendDstAlpha":
@@ -735,7 +818,7 @@ function Za(s) {
735
818
  function at(s) {
736
819
  const e = {};
737
820
  for (const t in s) {
738
- if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || Za(t))
821
+ if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || Xa(t))
739
822
  continue;
740
823
  const i = typeof s[t], n = s[t];
741
824
  switch (i) {
@@ -749,7 +832,7 @@ function at(s) {
749
832
  src: ei.renderToBlob(n),
750
833
  offset: [n.offset.x, n.offset.y],
751
834
  repeat: [n.repeat.x, n.repeat.y]
752
- } : t === "uniforms" && (e[t] = Va(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
835
+ } : t === "uniforms" && (e[t] = Ga(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
753
836
  src: "",
754
837
  offset: [0, 0],
755
838
  repeat: [1, 1]
@@ -759,7 +842,7 @@ function at(s) {
759
842
  }
760
843
  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
844
  }
762
- function vi(s) {
845
+ function yi(s) {
763
846
  s.updateMatrix();
764
847
  const e = {
765
848
  name: s.name,
@@ -840,7 +923,7 @@ function vi(s) {
840
923
  });
841
924
  return e;
842
925
  }
843
- function Wa(s, e) {
926
+ function $a(s, e) {
844
927
  const t = e.split(".");
845
928
  switch (t.length) {
846
929
  case 1:
@@ -857,7 +940,7 @@ function Wa(s, e) {
857
940
  return s[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
858
941
  }
859
942
  }
860
- function Ga(s, e) {
943
+ function qa(s, e) {
861
944
  for (const t in e)
862
945
  s[t] = e[t];
863
946
  }
@@ -902,19 +985,19 @@ function ie(s, e, t) {
902
985
  a = s[i[0]][i[1]][i[2]][i[3]][i[4]];
903
986
  break;
904
987
  }
905
- a != null && Ga(a, t);
988
+ a != null && qa(a, t);
906
989
  }
907
990
  }
908
991
  function fn(s) {
909
992
  return new Promise((e, t) => {
910
993
  const i = new Image();
911
994
  i.onload = () => {
912
- const n = new Vn(i);
913
- n.wrapS = ss, n.wrapT = ss, n.needsUpdate = !0, e(n);
995
+ const n = new Wn(i);
996
+ n.wrapS = as, n.wrapT = as, n.needsUpdate = !0, e(n);
914
997
  }, i.onerror = t, i.src = s;
915
998
  });
916
999
  }
917
- class Oo extends Hi {
1000
+ class Do extends Bi {
918
1001
  canvas = null;
919
1002
  // Canvas or OffscreenCanvas
920
1003
  inputElement = null;
@@ -940,7 +1023,7 @@ class Oo extends Hi {
940
1023
  }
941
1024
  setObject(e) {
942
1025
  this.renderer !== void 0 && (ei.renderer = this.renderer);
943
- const t = vi(e);
1026
+ const t = yi(e);
944
1027
  this.app.send({
945
1028
  event: "setObject",
946
1029
  target: "editor",
@@ -1027,7 +1110,7 @@ class Oo extends Hi {
1027
1110
  }
1028
1111
  // Renderer
1029
1112
  setRenderer(e, t = null) {
1030
- if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t, !this.app.debugEnabled)
1113
+ if (this.renderer = e, this.canvas = e.domElement, this.inputElement = t !== null ? t : this.canvas, !this.app.debugEnabled)
1031
1114
  return;
1032
1115
  const i = `#${e.getClearColor(new et()).getHexString()}`;
1033
1116
  this.app.send({
@@ -1059,7 +1142,7 @@ class Oo extends Hi {
1059
1142
  addScene(e) {
1060
1143
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
1061
1144
  return;
1062
- ps(), Li(e);
1145
+ fs(), ki(e);
1063
1146
  const t = ut(e);
1064
1147
  this.app.send({
1065
1148
  event: "addScene",
@@ -1102,7 +1185,7 @@ class Oo extends Hi {
1102
1185
  setScene(e) {
1103
1186
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
1104
1187
  return;
1105
- this.renderer !== void 0 && (ei.renderer = this.renderer), ps(), Li(e);
1188
+ this.renderer !== void 0 && (ei.renderer = this.renderer), fs(), ki(e);
1106
1189
  const t = ut(e);
1107
1190
  this.app.send({
1108
1191
  event: "setScene",
@@ -1114,7 +1197,7 @@ class Oo extends Hi {
1114
1197
  addCamera(e) {
1115
1198
  if (!this.app.debugEnabled)
1116
1199
  return;
1117
- const t = vi(e);
1200
+ const t = yi(e);
1118
1201
  this.app.send({
1119
1202
  event: "addCamera",
1120
1203
  target: "editor",
@@ -1124,7 +1207,7 @@ class Oo extends Hi {
1124
1207
  removeCamera(e) {
1125
1208
  if (!this.app.debugEnabled)
1126
1209
  return;
1127
- const t = vi(e);
1210
+ const t = yi(e);
1128
1211
  this.app.send({
1129
1212
  event: "removeCamera",
1130
1213
  target: "editor",
@@ -1200,7 +1283,7 @@ class Oo extends Hi {
1200
1283
  }
1201
1284
  // Renderer
1202
1285
  addRT(e, t) {
1203
- const i = new Zn(32, 32, t);
1286
+ const i = new Gn(32, 32, t);
1204
1287
  i.texture.name = e, this.renderTargets.set(e, i);
1205
1288
  }
1206
1289
  resize(e, t) {
@@ -1224,7 +1307,7 @@ class Oo extends Hi {
1224
1307
  return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
1225
1308
  }
1226
1309
  }
1227
- var ki = { exports: {} }, Et = {};
1310
+ var Ui = { exports: {} }, Et = {};
1228
1311
  /**
1229
1312
  * @license React
1230
1313
  * react-jsx-runtime.production.min.js
@@ -1234,12 +1317,12 @@ var ki = { exports: {} }, Et = {};
1234
1317
  * This source code is licensed under the MIT license found in the
1235
1318
  * LICENSE file in the root directory of this source tree.
1236
1319
  */
1237
- var ms;
1238
- function Xa() {
1239
- if (ms)
1320
+ var gs;
1321
+ function Ka() {
1322
+ if (gs)
1240
1323
  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 };
1324
+ gs = 1;
1325
+ 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
1326
  function a(o, c, l) {
1244
1327
  var d, p = {}, m = null, f = null;
1245
1328
  l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
@@ -1262,10 +1345,10 @@ var St = {};
1262
1345
  * This source code is licensed under the MIT license found in the
1263
1346
  * LICENSE file in the root directory of this source tree.
1264
1347
  */
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";
1348
+ var _s;
1349
+ function Qa() {
1350
+ return _s || (_s = 1, process.env.NODE_ENV !== "production" && function() {
1351
+ 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
1352
  function T(h) {
1270
1353
  if (h === null || typeof h != "object")
1271
1354
  return null;
@@ -1430,13 +1513,13 @@ function $a() {
1430
1513
  ` + it + h;
1431
1514
  }
1432
1515
  }
1433
- var hi = !1, zt;
1516
+ var di = !1, zt;
1434
1517
  {
1435
1518
  var Cn = typeof WeakMap == "function" ? WeakMap : Map;
1436
1519
  zt = new Cn();
1437
1520
  }
1438
- function Bi(h, b) {
1439
- if (!h || hi)
1521
+ function Zi(h, b) {
1522
+ if (!h || di)
1440
1523
  return "";
1441
1524
  {
1442
1525
  var x = zt.get(h);
@@ -1444,7 +1527,7 @@ function $a() {
1444
1527
  return x;
1445
1528
  }
1446
1529
  var k;
1447
- hi = !0;
1530
+ di = !0;
1448
1531
  var H = Error.prepareStackTrace;
1449
1532
  Error.prepareStackTrace = void 0;
1450
1533
  var G;
@@ -1501,13 +1584,13 @@ function $a() {
1501
1584
  }
1502
1585
  }
1503
1586
  } finally {
1504
- hi = !1, vt.current = G, Te(), Error.prepareStackTrace = H;
1587
+ di = !1, vt.current = G, Te(), Error.prepareStackTrace = H;
1505
1588
  }
1506
- var nt = h ? h.displayName || h.name : "", is = nt ? Ft(nt) : "";
1507
- return typeof h == "function" && zt.set(h, is), is;
1589
+ var nt = h ? h.displayName || h.name : "", ns = nt ? Ft(nt) : "";
1590
+ return typeof h == "function" && zt.set(h, ns), ns;
1508
1591
  }
1509
1592
  function En(h, b, x) {
1510
- return Bi(h, !1);
1593
+ return Zi(h, !1);
1511
1594
  }
1512
1595
  function Sn(h) {
1513
1596
  var b = h.prototype;
@@ -1517,7 +1600,7 @@ function $a() {
1517
1600
  if (h == null)
1518
1601
  return "";
1519
1602
  if (typeof h == "function")
1520
- return Bi(h, Sn(h));
1603
+ return Zi(h, Sn(h));
1521
1604
  if (typeof h == "string")
1522
1605
  return Ft(h);
1523
1606
  switch (h) {
@@ -1542,13 +1625,13 @@ function $a() {
1542
1625
  }
1543
1626
  return "";
1544
1627
  }
1545
- var Yt = Object.prototype.hasOwnProperty, Vi = {}, Zi = g.ReactDebugCurrentFrame;
1628
+ var Yt = Object.prototype.hasOwnProperty, Wi = {}, Gi = g.ReactDebugCurrentFrame;
1546
1629
  function Bt(h) {
1547
1630
  if (h) {
1548
1631
  var b = h._owner, x = Ht(h.type, h._source, b ? b.type : null);
1549
- Zi.setExtraStackFrame(x);
1632
+ Gi.setExtraStackFrame(x);
1550
1633
  } else
1551
- Zi.setExtraStackFrame(null);
1634
+ Gi.setExtraStackFrame(null);
1552
1635
  }
1553
1636
  function wn(h, b, x, k, H) {
1554
1637
  {
@@ -1565,12 +1648,12 @@ function $a() {
1565
1648
  } catch (te) {
1566
1649
  N = te;
1567
1650
  }
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));
1651
+ 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
1652
  }
1570
1653
  }
1571
1654
  }
1572
1655
  var xn = Array.isArray;
1573
- function di(h) {
1656
+ function ui(h) {
1574
1657
  return xn(h);
1575
1658
  }
1576
1659
  function On(h) {
@@ -1581,25 +1664,25 @@ function $a() {
1581
1664
  }
1582
1665
  function Tn(h) {
1583
1666
  try {
1584
- return Wi(h), !1;
1667
+ return Xi(h), !1;
1585
1668
  } catch {
1586
1669
  return !0;
1587
1670
  }
1588
1671
  }
1589
- function Wi(h) {
1672
+ function Xi(h) {
1590
1673
  return "" + h;
1591
1674
  }
1592
- function Gi(h) {
1675
+ function $i(h) {
1593
1676
  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);
1677
+ 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
1678
  }
1596
1679
  var yt = g.ReactCurrentOwner, Mn = {
1597
1680
  key: !0,
1598
1681
  ref: !0,
1599
1682
  __self: !0,
1600
1683
  __source: !0
1601
- }, Xi, $i, ui;
1602
- ui = {};
1684
+ }, qi, Ki, pi;
1685
+ pi = {};
1603
1686
  function An(h) {
1604
1687
  if (Yt.call(h, "ref")) {
1605
1688
  var b = Object.getOwnPropertyDescriptor(h, "ref").get;
@@ -1619,13 +1702,13 @@ function $a() {
1619
1702
  function Dn(h, b) {
1620
1703
  if (typeof h.ref == "string" && yt.current && b && yt.current.stateNode !== b) {
1621
1704
  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);
1705
+ 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
1706
  }
1624
1707
  }
1625
1708
  function Rn(h, b) {
1626
1709
  {
1627
1710
  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));
1711
+ 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
1712
  };
1630
1713
  x.isReactWarning = !0, Object.defineProperty(h, "key", {
1631
1714
  get: x,
@@ -1636,7 +1719,7 @@ function $a() {
1636
1719
  function In(h, b) {
1637
1720
  {
1638
1721
  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));
1722
+ 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
1723
  };
1641
1724
  x.isReactWarning = !0, Object.defineProperty(h, "ref", {
1642
1725
  get: x,
@@ -1676,7 +1759,7 @@ function $a() {
1676
1759
  function kn(h, b, x, k, H) {
1677
1760
  {
1678
1761
  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));
1762
+ x !== void 0 && ($i(x), N = "" + x), Pn(b) && ($i(b.key), N = "" + b.key), An(b) && (fe = b.ref, Dn(b, H));
1680
1763
  for (G in b)
1681
1764
  Yt.call(b, G) && !Mn.hasOwnProperty(G) && (F[G] = b[G]);
1682
1765
  if (h && h.defaultProps) {
@@ -1691,23 +1774,23 @@ function $a() {
1691
1774
  return Ln(h, N, fe, H, k, yt.current, F);
1692
1775
  }
1693
1776
  }
1694
- var pi = g.ReactCurrentOwner, qi = g.ReactDebugCurrentFrame;
1777
+ var mi = g.ReactCurrentOwner, Qi = g.ReactDebugCurrentFrame;
1695
1778
  function st(h) {
1696
1779
  if (h) {
1697
1780
  var b = h._owner, x = Ht(h.type, h._source, b ? b.type : null);
1698
- qi.setExtraStackFrame(x);
1781
+ Qi.setExtraStackFrame(x);
1699
1782
  } else
1700
- qi.setExtraStackFrame(null);
1783
+ Qi.setExtraStackFrame(null);
1701
1784
  }
1702
- var mi;
1703
- mi = !1;
1704
- function fi(h) {
1785
+ var fi;
1786
+ fi = !1;
1787
+ function gi(h) {
1705
1788
  return typeof h == "object" && h !== null && h.$$typeof === e;
1706
1789
  }
1707
- function Ki() {
1790
+ function Ji() {
1708
1791
  {
1709
- if (pi.current) {
1710
- var h = re(pi.current.type);
1792
+ if (mi.current) {
1793
+ var h = re(mi.current.type);
1711
1794
  if (h)
1712
1795
  return `
1713
1796
 
@@ -1727,10 +1810,10 @@ Check your code at ` + b + ":" + x + ".";
1727
1810
  return "";
1728
1811
  }
1729
1812
  }
1730
- var Qi = {};
1813
+ var es = {};
1731
1814
  function jn(h) {
1732
1815
  {
1733
- var b = Ki();
1816
+ var b = Ji();
1734
1817
  if (!b) {
1735
1818
  var x = typeof h == "string" ? h : h.displayName || h.name;
1736
1819
  x && (b = `
@@ -1740,35 +1823,35 @@ Check the top-level render call using <` + x + ">.");
1740
1823
  return b;
1741
1824
  }
1742
1825
  }
1743
- function Ji(h, b) {
1826
+ function ts(h, b) {
1744
1827
  {
1745
1828
  if (!h._store || h._store.validated || h.key != null)
1746
1829
  return;
1747
1830
  h._store.validated = !0;
1748
1831
  var x = jn(b);
1749
- if (Qi[x])
1832
+ if (es[x])
1750
1833
  return;
1751
- Qi[x] = !0;
1834
+ es[x] = !0;
1752
1835
  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);
1836
+ 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
1837
  }
1755
1838
  }
1756
- function es(h, b) {
1839
+ function is(h, b) {
1757
1840
  {
1758
1841
  if (typeof h != "object")
1759
1842
  return;
1760
- if (di(h))
1843
+ if (ui(h))
1761
1844
  for (var x = 0; x < h.length; x++) {
1762
1845
  var k = h[x];
1763
- fi(k) && Ji(k, b);
1846
+ gi(k) && ts(k, b);
1764
1847
  }
1765
- else if (fi(h))
1848
+ else if (gi(h))
1766
1849
  h._store && (h._store.validated = !0);
1767
1850
  else if (h) {
1768
1851
  var H = T(h);
1769
1852
  if (typeof H == "function" && H !== h.entries)
1770
1853
  for (var G = H.call(h), F; !(F = G.next()).done; )
1771
- fi(F.value) && Ji(F.value, b);
1854
+ gi(F.value) && ts(F.value, b);
1772
1855
  }
1773
1856
  }
1774
1857
  }
@@ -1789,8 +1872,8 @@ Check the top-level render call using <` + x + ">.");
1789
1872
  if (x) {
1790
1873
  var k = re(b);
1791
1874
  wn(x, h.props, "prop", k, h);
1792
- } else if (b.PropTypes !== void 0 && !mi) {
1793
- mi = !0;
1875
+ } else if (b.PropTypes !== void 0 && !fi) {
1876
+ fi = !0;
1794
1877
  var H = re(b);
1795
1878
  v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
1796
1879
  }
@@ -1809,16 +1892,16 @@ Check the top-level render call using <` + x + ">.");
1809
1892
  h.ref !== null && (st(h), v("Invalid attribute `ref` supplied to `React.Fragment`."), st(null));
1810
1893
  }
1811
1894
  }
1812
- function ts(h, b, x, k, H, G) {
1895
+ function ss(h, b, x, k, H, G) {
1813
1896
  {
1814
1897
  var F = B(h);
1815
1898
  if (!F) {
1816
1899
  var N = "";
1817
1900
  (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
1901
  var fe = Un(H);
1819
- fe ? N += fe : N += Ki();
1902
+ fe ? N += fe : N += Ji();
1820
1903
  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);
1904
+ 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
1905
  }
1823
1906
  var ne = kn(h, b, x, H, G);
1824
1907
  if (ne == null)
@@ -1827,38 +1910,38 @@ Check the top-level render call using <` + x + ">.");
1827
1910
  var we = b.children;
1828
1911
  if (we !== void 0)
1829
1912
  if (k)
1830
- if (di(we)) {
1913
+ if (ui(we)) {
1831
1914
  for (var nt = 0; nt < we.length; nt++)
1832
- es(we[nt], h);
1915
+ is(we[nt], h);
1833
1916
  Object.freeze && Object.freeze(we);
1834
1917
  } else
1835
1918
  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
1919
  else
1837
- es(we, h);
1920
+ is(we, h);
1838
1921
  }
1839
1922
  return h === i ? Fn(ne) : Nn(ne), ne;
1840
1923
  }
1841
1924
  }
1842
1925
  function zn(h, b, x) {
1843
- return ts(h, b, x, !0);
1926
+ return ss(h, b, x, !0);
1844
1927
  }
1845
1928
  function Hn(h, b, x) {
1846
- return ts(h, b, x, !1);
1929
+ return ss(h, b, x, !1);
1847
1930
  }
1848
1931
  var Yn = Hn, Bn = zn;
1849
1932
  St.Fragment = i, St.jsx = Yn, St.jsxs = Bn;
1850
1933
  }()), St;
1851
1934
  }
1852
- process.env.NODE_ENV === "production" ? ki.exports = Xa() : ki.exports = $a();
1853
- var u = ki.exports;
1935
+ process.env.NODE_ENV === "production" ? Ui.exports = Ka() : Ui.exports = Qa();
1936
+ var u = Ui.exports;
1854
1937
  function gn(s) {
1855
1938
  return s.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ u.jsx("button", { children: s.title });
1856
1939
  }
1857
- const qa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1940
+ const Ja = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1858
1941
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1859
1942
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1860
1943
  /* @__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(
1944
+ ] }), er = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1862
1945
  "path",
1863
1946
  {
1864
1947
  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 +1949,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
1949
  C11,8.22,10.74,8,10.43,8z`
1867
1950
  }
1868
1951
  ) });
1869
- function Qa(s) {
1870
- return /* @__PURE__ */ u.jsx(un.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1871
- Ka,
1952
+ function tr(s) {
1953
+ return /* @__PURE__ */ u.jsx(pn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1954
+ er,
1872
1955
  /* @__PURE__ */ u.jsx("span", { children: s.title }),
1873
1956
  /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1874
1957
  s.onDelete(s.index);
1875
- }, children: qa })
1958
+ }, children: Ja })
1876
1959
  ] }) }, s.title);
1877
1960
  }
1878
- function Ja(s) {
1961
+ function ir(s) {
1879
1962
  const [e, t] = Z(!1), [i, n] = Z(s.options), r = (l) => {
1880
1963
  s.onDragComplete(l), n(l);
1881
1964
  }, a = (l) => {
@@ -1883,18 +1966,18 @@ function Ja(s) {
1883
1966
  d.splice(l, 1), r(d);
1884
1967
  }, o = [];
1885
1968
  i.forEach((l, d) => {
1886
- o.push(/* @__PURE__ */ u.jsx(Qa, { index: d, title: l, onDelete: a }, l));
1969
+ o.push(/* @__PURE__ */ u.jsx(tr, { index: d, title: l, onDelete: a }, l));
1887
1970
  });
1888
1971
  let c = "dropdown draggable";
1889
1972
  return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
1890
1973
  /* @__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 })
1974
+ /* @__PURE__ */ u.jsx(pn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
1892
1975
  ] });
1893
1976
  }
1894
- function er(s) {
1977
+ function sr(s) {
1895
1978
  const [e, t] = Z(!1), i = [];
1896
1979
  s.options.map((r, a) => {
1897
- s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(tr, { option: r }, a));
1980
+ s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(nr, { option: r }, a));
1898
1981
  });
1899
1982
  let n = "dropdown";
1900
1983
  return s.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
@@ -1916,13 +1999,13 @@ function er(s) {
1916
1999
  }
1917
2000
  );
1918
2001
  }
1919
- function tr(s) {
2002
+ function nr(s) {
1920
2003
  const { option: e } = s, [t, i] = Z("");
1921
2004
  let n;
1922
2005
  switch (e.type) {
1923
2006
  case "draggable":
1924
2007
  n = /* @__PURE__ */ u.jsx(
1925
- Ja,
2008
+ ir,
1926
2009
  {
1927
2010
  title: e.title,
1928
2011
  options: e.value,
@@ -1935,7 +2018,7 @@ function tr(s) {
1935
2018
  break;
1936
2019
  case "dropdown":
1937
2020
  n = /* @__PURE__ */ u.jsx(
1938
- er,
2021
+ sr,
1939
2022
  {
1940
2023
  title: e.title,
1941
2024
  options: e.value,
@@ -1956,9 +2039,9 @@ function tr(s) {
1956
2039
  );
1957
2040
  break;
1958
2041
  }
1959
- return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, La());
2042
+ return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ua());
1960
2043
  }
1961
- function To(s, e, t) {
2044
+ function Ro(s, e, t) {
1962
2045
  function i(r) {
1963
2046
  switch (e.forEach((a) => {
1964
2047
  a.callback(s, a.remote, r);
@@ -1981,7 +2064,7 @@ function To(s, e, t) {
1981
2064
  r.target === "editor" ? n(r) : i(r);
1982
2065
  };
1983
2066
  }
1984
- function ai(s) {
2067
+ function ri(s) {
1985
2068
  const [e, t] = Z(s.open !== void 0 ? s.open : !0), i = !e || s.children === void 0, n = () => {
1986
2069
  D.dispatchEvent({ type: P.REMOVE_SCENE, value: s.scene });
1987
2070
  };
@@ -2002,7 +2085,7 @@ function ai(s) {
2002
2085
  children: "Toggle"
2003
2086
  }
2004
2087
  ),
2005
- /* @__PURE__ */ u.jsx("p", { className: "label", children: ni(s.label) })
2088
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: ai(s.label) })
2006
2089
  ]
2007
2090
  }
2008
2091
  ),
@@ -2072,12 +2155,12 @@ function _n(s) {
2072
2155
  }
2073
2156
  }
2074
2157
  ),
2075
- /* @__PURE__ */ u.jsx("div", { className: `icon ${Ba(s.child)}` })
2158
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${Wa(s.child)}` })
2076
2159
  ] }),
2077
2160
  /* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
2078
2161
  ] }, Math.random()) });
2079
2162
  }
2080
- function gs(s) {
2163
+ function vs(s) {
2081
2164
  const e = [];
2082
2165
  return s.child?.children.map((t, i) => {
2083
2166
  e.push(/* @__PURE__ */ u.jsx(_n, { child: t, scene: s.scene, three: s.three }, i));
@@ -2168,13 +2251,13 @@ function Qe(s) {
2168
2251
  max: s.max,
2169
2252
  step: s.step,
2170
2253
  ref: t,
2171
- onChange: pn
2254
+ onChange: ni
2172
2255
  }
2173
2256
  )
2174
2257
  ] })
2175
2258
  ] });
2176
2259
  }
2177
- function ir(s) {
2260
+ function ar(s) {
2178
2261
  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
2262
  min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
2180
2263
  max: Math.max(s.max, Math.max(s.value.x, s.value.y))
@@ -2227,7 +2310,7 @@ function ir(s) {
2227
2310
  window.removeEventListener("mousemove", w), window.removeEventListener("mouseup", C), v(!1);
2228
2311
  }
2229
2312
  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);
2313
+ 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
2314
  s.onChange({ target: { value: { x: re, y: K } } }), m(re), E(K);
2232
2315
  }
2233
2316
  function O() {
@@ -2239,7 +2322,7 @@ function ir(s) {
2239
2322
  T({ min: y.min, max: R }), p > R && m($e(y.min, R, p)), f > R && E($e(y.min, R, f));
2240
2323
  }
2241
2324
  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}%`;
2325
+ a.current.style.left = `${ms(y.min, y.max, p) * 100}%`, a.current.style.top = `${(1 - ms(y.min, y.max, f)) * 100}%`;
2243
2326
  }, [y, p, f]);
2244
2327
  const j = s.step !== void 0 ? s.step : 0.01;
2245
2328
  return /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
@@ -2318,20 +2401,20 @@ function ir(s) {
2318
2401
  ] })
2319
2402
  ] });
2320
2403
  }
2321
- const sr = Math.PI / 180, nr = 180 / Math.PI;
2404
+ const rr = Math.PI / 180, or = 180 / Math.PI;
2322
2405
  function rt(s, e, t, i, n) {
2323
2406
  return i + (s - e) * (n - i) / (t - e);
2324
2407
  }
2325
2408
  function ot(s, e, t) {
2326
2409
  return (1 - t) * s + t * e;
2327
2410
  }
2328
- function Ui(s) {
2329
- return s * sr;
2411
+ function ji(s) {
2412
+ return s * rr;
2330
2413
  }
2331
- function ar(s) {
2332
- return s * nr;
2414
+ function lr(s) {
2415
+ return s * or;
2333
2416
  }
2334
- function _s(s) {
2417
+ function ys(s) {
2335
2418
  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
2419
  if (t) {
2337
2420
  const a = Ut(() => s.value, []);
@@ -2343,13 +2426,13 @@ function _s(s) {
2343
2426
  /* @__PURE__ */ u.jsx(
2344
2427
  Qe,
2345
2428
  {
2346
- value: ar(a[c]),
2429
+ value: lr(a[c]),
2347
2430
  type: "number",
2348
2431
  prop: c,
2349
2432
  step: 0.1,
2350
2433
  labelRef: l,
2351
2434
  onChange: (d, p) => {
2352
- a[d] = Ui(p), s.onChange({ target: { value: a } });
2435
+ a[d] = ji(p), s.onChange({ target: { value: a } });
2353
2436
  }
2354
2437
  }
2355
2438
  )
@@ -2406,7 +2489,7 @@ function _s(s) {
2406
2489
  }
2407
2490
  return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: r }, Math.random().toString());
2408
2491
  }
2409
- function rr(s) {
2492
+ function cr(s) {
2410
2493
  const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
2411
2494
  if (e) {
2412
2495
  const n = Ut(() => s.value, []), r = (o, c) => {
@@ -2458,10 +2541,10 @@ function rr(s) {
2458
2541
  }
2459
2542
  return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: i });
2460
2543
  }
2461
- function or(s) {
2544
+ function hr(s) {
2462
2545
  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
2546
  }
2464
- function lr(s) {
2547
+ function dr(s) {
2465
2548
  switch (s) {
2466
2549
  case "Alpha Map":
2467
2550
  return "alphaMap";
@@ -2510,7 +2593,7 @@ function lr(s) {
2510
2593
  }
2511
2594
  return s;
2512
2595
  }
2513
- function li(s) {
2596
+ function ci(s) {
2514
2597
  switch (s) {
2515
2598
  case "alphaHash":
2516
2599
  return "Alpha Hash";
@@ -2717,7 +2800,7 @@ function vn(s) {
2717
2800
  const e = s.toLowerCase();
2718
2801
  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
2802
  }
2720
- function cr() {
2803
+ function ur() {
2721
2804
  const s = document.createElement("input");
2722
2805
  return s.type = "file", new Promise((e, t) => {
2723
2806
  s.addEventListener("change", function() {
@@ -2732,191 +2815,191 @@ function cr() {
2732
2815
  }), s.click();
2733
2816
  });
2734
2817
  }
2735
- const hr = [
2818
+ const pr = [
2736
2819
  {
2737
2820
  title: "Front",
2738
- value: Wn
2821
+ value: Xn
2739
2822
  },
2740
2823
  {
2741
2824
  title: "Back",
2742
- value: Vs
2825
+ value: Zs
2743
2826
  },
2744
2827
  {
2745
2828
  title: "Double",
2746
- value: Fi
2829
+ value: Hi
2747
2830
  }
2748
- ], dr = [
2831
+ ], mr = [
2749
2832
  {
2750
2833
  title: "No Blending",
2751
- value: Gn
2834
+ value: $n
2752
2835
  },
2753
2836
  {
2754
2837
  title: "Normal",
2755
- value: Xn
2838
+ value: qn
2756
2839
  },
2757
2840
  {
2758
2841
  title: "Additive",
2759
- value: $n
2842
+ value: Kn
2760
2843
  },
2761
2844
  {
2762
2845
  title: "Subtractive",
2763
- value: qn
2846
+ value: Qn
2764
2847
  },
2765
2848
  {
2766
2849
  title: "Multiply",
2767
- value: Kn
2850
+ value: Jn
2768
2851
  },
2769
2852
  {
2770
2853
  title: "Custom",
2771
- value: Qn
2854
+ value: ea
2772
2855
  }
2773
- ], ur = [
2856
+ ], fr = [
2774
2857
  {
2775
2858
  title: "Add",
2776
- value: Jn
2859
+ value: ta
2777
2860
  },
2778
2861
  {
2779
2862
  title: "Subtract",
2780
- value: ea
2863
+ value: ia
2781
2864
  },
2782
2865
  {
2783
2866
  title: "Reverse Subtract",
2784
- value: ta
2867
+ value: sa
2785
2868
  },
2786
2869
  {
2787
2870
  title: "Min",
2788
- value: ia
2871
+ value: na
2789
2872
  },
2790
2873
  {
2791
2874
  title: "Max",
2792
- value: sa
2875
+ value: aa
2793
2876
  }
2794
- ], pr = [
2877
+ ], gr = [
2795
2878
  {
2796
2879
  title: "Zero",
2797
- value: Zs
2880
+ value: Ws
2798
2881
  },
2799
2882
  {
2800
2883
  title: "One",
2801
- value: Ws
2884
+ value: Gs
2802
2885
  },
2803
2886
  {
2804
2887
  title: "Src Color",
2805
- value: Gs
2888
+ value: Xs
2806
2889
  },
2807
2890
  {
2808
2891
  title: "One Minus Src Color",
2809
- value: Xs
2892
+ value: $s
2810
2893
  },
2811
2894
  {
2812
2895
  title: "Src Alpha",
2813
- value: $s
2896
+ value: qs
2814
2897
  },
2815
2898
  {
2816
2899
  title: "One Minus Src Alpha",
2817
- value: qs
2900
+ value: Ks
2818
2901
  },
2819
2902
  {
2820
2903
  title: "Dst Alpha",
2821
- value: Ks
2904
+ value: Qs
2822
2905
  },
2823
2906
  {
2824
2907
  title: "One Minus Dst Alpha",
2825
- value: Qs
2908
+ value: Js
2826
2909
  },
2827
2910
  {
2828
2911
  title: "Dst Color",
2829
- value: Js
2912
+ value: en
2830
2913
  },
2831
2914
  {
2832
2915
  title: "One Minus Dst Color",
2833
- value: en
2916
+ value: tn
2834
2917
  },
2835
2918
  {
2836
2919
  title: "Src Alpha Saturate",
2837
- value: na
2920
+ value: ra
2838
2921
  },
2839
2922
  {
2840
2923
  title: "Constant Color",
2841
- value: tn
2924
+ value: sn
2842
2925
  },
2843
2926
  {
2844
2927
  title: "One Minus Constant Color",
2845
- value: sn
2928
+ value: nn
2846
2929
  },
2847
2930
  {
2848
2931
  title: "Constant Alpha",
2849
- value: nn
2932
+ value: an
2850
2933
  },
2851
2934
  {
2852
2935
  title: "One Minus Constant Alpha",
2853
- value: an
2936
+ value: rn
2854
2937
  }
2855
- ], mr = [
2938
+ ], _r = [
2856
2939
  {
2857
2940
  title: "Zero",
2858
- value: Zs
2941
+ value: Ws
2859
2942
  },
2860
2943
  {
2861
2944
  title: "One",
2862
- value: Ws
2945
+ value: Gs
2863
2946
  },
2864
2947
  {
2865
2948
  title: "Src Color",
2866
- value: Gs
2949
+ value: Xs
2867
2950
  },
2868
2951
  {
2869
2952
  title: "One Minus Src Color",
2870
- value: Xs
2953
+ value: $s
2871
2954
  },
2872
2955
  {
2873
2956
  title: "Src Alpha",
2874
- value: $s
2957
+ value: qs
2875
2958
  },
2876
2959
  {
2877
2960
  title: "One Minus Src Alpha",
2878
- value: qs
2961
+ value: Ks
2879
2962
  },
2880
2963
  {
2881
2964
  title: "Dst Alpha",
2882
- value: Ks
2965
+ value: Qs
2883
2966
  },
2884
2967
  {
2885
2968
  title: "One Minus Dst Alpha",
2886
- value: Qs
2969
+ value: Js
2887
2970
  },
2888
2971
  {
2889
2972
  title: "Dst Color",
2890
- value: Js
2973
+ value: en
2891
2974
  },
2892
2975
  {
2893
2976
  title: "One Minus Dst Color",
2894
- value: en
2977
+ value: tn
2895
2978
  },
2896
2979
  {
2897
2980
  title: "Constant Color",
2898
- value: tn
2981
+ value: sn
2899
2982
  },
2900
2983
  {
2901
2984
  title: "One Minus Constant Color",
2902
- value: sn
2985
+ value: nn
2903
2986
  },
2904
2987
  {
2905
2988
  title: "Constant Alpha",
2906
- value: nn
2989
+ value: an
2907
2990
  },
2908
2991
  {
2909
2992
  title: "One Minus Constant Alpha",
2910
- value: an
2993
+ value: rn
2911
2994
  }
2912
2995
  ];
2913
2996
  function wt(s, e) {
2914
2997
  s.needsUpdate = !0, s.type = "option", s.options = e;
2915
2998
  }
2916
- function fr(s, e, t, i) {
2999
+ function vr(s, e, t, i) {
2917
3000
  return {
2918
3001
  type: "boolean",
2919
- title: li(s),
3002
+ title: ci(s),
2920
3003
  prop: s,
2921
3004
  value: e,
2922
3005
  needsUpdate: !0,
@@ -2930,10 +3013,10 @@ function fr(s, e, t, i) {
2930
3013
  }
2931
3014
  };
2932
3015
  }
2933
- function gr(s, e, t, i) {
3016
+ function yr(s, e, t, i) {
2934
3017
  const n = {
2935
3018
  type: "number",
2936
- title: li(s),
3019
+ title: ci(s),
2937
3020
  prop: s,
2938
3021
  value: e,
2939
3022
  min: void 0,
@@ -2951,27 +3034,27 @@ function gr(s, e, t, i) {
2951
3034
  };
2952
3035
  switch (s) {
2953
3036
  case "blending":
2954
- wt(n, dr);
3037
+ wt(n, mr);
2955
3038
  break;
2956
3039
  case "blendDst":
2957
- wt(n, mr);
3040
+ wt(n, _r);
2958
3041
  break;
2959
3042
  case "blendEquation":
2960
- wt(n, ur);
3043
+ wt(n, fr);
2961
3044
  break;
2962
3045
  case "blendSrc":
2963
- wt(n, pr);
3046
+ wt(n, gr);
2964
3047
  break;
2965
3048
  case "side":
2966
- wt(n, hr);
3049
+ wt(n, pr);
2967
3050
  break;
2968
3051
  }
2969
3052
  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
3053
  }
2971
- function _r(s, e, t, i) {
3054
+ function br(s, e, t, i) {
2972
3055
  const n = {
2973
3056
  type: "string",
2974
- title: li(s),
3057
+ title: ci(s),
2975
3058
  prop: s,
2976
3059
  value: e,
2977
3060
  needsUpdate: !0,
@@ -3004,20 +3087,20 @@ function _r(s, e, t, i) {
3004
3087
  }
3005
3088
  }), n;
3006
3089
  }
3007
- function vr(s) {
3090
+ function Cr(s) {
3008
3091
  return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
3009
3092
  }
3010
- function yr(s) {
3093
+ function Er(s) {
3011
3094
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
3012
3095
  }
3013
- function br(s) {
3096
+ function Sr(s) {
3014
3097
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
3015
3098
  }
3016
- function ji(s) {
3099
+ function Ni(s) {
3017
3100
  s.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
3018
3101
  }
3019
3102
  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;
3103
+ const a = ci(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, c = typeof e;
3021
3104
  if (c === "boolean" || c === "string")
3022
3105
  return {
3023
3106
  title: a,
@@ -3083,12 +3166,12 @@ function It(s, e, t, i, n = "", r = !1) {
3083
3166
  }
3084
3167
  }
3085
3168
  if (l.length > 0)
3086
- return ji(l), {
3169
+ return Ni(l), {
3087
3170
  title: a,
3088
3171
  items: l
3089
3172
  };
3090
3173
  } else {
3091
- if (vr(e))
3174
+ if (Cr(e))
3092
3175
  return {
3093
3176
  title: a,
3094
3177
  prop: o,
@@ -3104,7 +3187,7 @@ function It(s, e, t, i, n = "", r = !1) {
3104
3187
  }
3105
3188
  }
3106
3189
  };
3107
- if (yr(e))
3190
+ if (Er(e))
3108
3191
  return {
3109
3192
  title: a,
3110
3193
  prop: o,
@@ -3120,7 +3203,7 @@ function It(s, e, t, i, n = "", r = !1) {
3120
3203
  }
3121
3204
  }
3122
3205
  };
3123
- if (br(e))
3206
+ if (Sr(e))
3124
3207
  return {
3125
3208
  title: a,
3126
3209
  prop: o,
@@ -3159,7 +3242,7 @@ function It(s, e, t, i, n = "", r = !1) {
3159
3242
  value: e,
3160
3243
  disabled: r,
3161
3244
  onChange: (l, d) => {
3162
- const p = lr(s), m = n.length > 0 ? `${n}.${p}` : p;
3245
+ const p = dr(s), m = n.length > 0 ? `${n}.${p}` : p;
3163
3246
  i.createTexture(t.uuid, `material.${m}`, d);
3164
3247
  const f = i.getScene(t.uuid);
3165
3248
  if (f !== null) {
@@ -3227,7 +3310,7 @@ function It(s, e, t, i, n = "", r = !1) {
3227
3310
  console.log("Issue cycling through material object:", s, e);
3228
3311
  }
3229
3312
  if (l.length > 0)
3230
- return ji(l), {
3313
+ return Ni(l), {
3231
3314
  title: a,
3232
3315
  items: l
3233
3316
  };
@@ -3235,25 +3318,25 @@ function It(s, e, t, i, n = "", r = !1) {
3235
3318
  }
3236
3319
  }
3237
3320
  }
3238
- function vs(s, e, t) {
3321
+ function bs(s, e, t) {
3239
3322
  const i = [];
3240
3323
  for (const n in s) {
3241
- if (!or(n))
3324
+ if (!hr(n))
3242
3325
  continue;
3243
3326
  const r = typeof s[n], a = s[n];
3244
3327
  if (r === "boolean")
3245
- i.push(fr(n, a, e, t));
3328
+ i.push(vr(n, a, e, t));
3246
3329
  else if (r === "number")
3247
- i.push(gr(n, a, e, t));
3330
+ i.push(yr(n, a, e, t));
3248
3331
  else if (r === "string")
3249
- i.push(_r(n, a, e, t));
3332
+ i.push(br(n, a, e, t));
3250
3333
  else if (r === "object") {
3251
3334
  const o = It(n, a, e, t);
3252
3335
  o !== void 0 && i.push(o);
3253
3336
  } else
3254
3337
  a !== void 0 && console.log("other:", n, r, a);
3255
3338
  }
3256
- return ji(i), i.push({
3339
+ return Ni(i), i.push({
3257
3340
  title: "Update Material",
3258
3341
  type: "button",
3259
3342
  onChange: () => {
@@ -3266,7 +3349,7 @@ function vs(s, e, t) {
3266
3349
  }
3267
3350
  }), i;
3268
3351
  }
3269
- function Cr(s, e) {
3352
+ function wr(s, e) {
3270
3353
  function t() {
3271
3354
  return `${e.app.appID}_material`;
3272
3355
  }
@@ -3283,7 +3366,7 @@ function Cr(s, e) {
3283
3366
  Oe,
3284
3367
  {
3285
3368
  title: `Material ${l}`,
3286
- items: vs(a[l], s, e)
3369
+ items: bs(a[l], s, e)
3287
3370
  },
3288
3371
  `Material ${l}`
3289
3372
  )
@@ -3294,7 +3377,7 @@ function Cr(s, e) {
3294
3377
  Oe,
3295
3378
  {
3296
3379
  title: "Material",
3297
- items: vs(a, s, e),
3380
+ items: bs(a, s, e),
3298
3381
  expanded: n,
3299
3382
  onToggle: (o) => {
3300
3383
  r(o);
@@ -3302,8 +3385,8 @@ function Cr(s, e) {
3302
3385
  }
3303
3386
  );
3304
3387
  }
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) {
3388
+ 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==";
3389
+ function xr(s) {
3307
3390
  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
3391
  function T(v, S, C, w, O) {
3309
3392
  if (s.onChange !== void 0) {
@@ -3334,10 +3417,10 @@ function Er(s) {
3334
3417
  }
3335
3418
  return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
3336
3419
  /* @__PURE__ */ u.jsx("img", { alt: s.title, ref: t, onClick: () => {
3337
- cr().then((v) => {
3420
+ ur().then((v) => {
3338
3421
  t.current.src = v, T(v, c, d, m, E);
3339
3422
  });
3340
- }, src: o.src.length > 0 ? o.src : ys }),
3423
+ }, src: o.src.length > 0 ? o.src : Cs }),
3341
3424
  /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
3342
3425
  /* @__PURE__ */ u.jsxs("div", { children: [
3343
3426
  /* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
@@ -3386,14 +3469,14 @@ function Er(s) {
3386
3469
  )
3387
3470
  ] }),
3388
3471
  /* @__PURE__ */ u.jsx("button", { onClick: () => {
3389
- T("", c, d, m, E), t.current.src = ys;
3472
+ T("", c, d, m, E), t.current.src = Cs;
3390
3473
  }, children: "Clear" })
3391
3474
  ] })
3392
3475
  ] });
3393
3476
  }
3394
3477
  function ti(s) {
3395
3478
  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))));
3479
+ e !== void 0 && (e.isColor !== void 0 ? e = hs(s.value) : s.type === "color" && (e = hs(new et().setStyle(s.value, jt))));
3397
3480
  const [t, i] = Z(e), n = J(null), r = (l) => {
3398
3481
  let d = l.target.value;
3399
3482
  if (s.type === "boolean")
@@ -3409,7 +3492,7 @@ function ti(s) {
3409
3492
  const o = s.type === "string" && (t.length > 100 || t.search(`
3410
3493
  `) > -1), c = o || s.type === "image" || s.type === "vector2";
3411
3494
  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"),
3495
+ s.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: n, children: ai(s.title) }, "fieldLabel"),
3413
3496
  s.type === "string" && !o && /* @__PURE__ */ u.jsx(
3414
3497
  "input",
3415
3498
  {
@@ -3483,15 +3566,15 @@ function ti(s) {
3483
3566
  children: s.title
3484
3567
  }
3485
3568
  ),
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 })
3569
+ s.type === "image" && /* @__PURE__ */ u.jsx(xr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3570
+ 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)) }) }),
3571
+ s.type === "vector2" && /* @__PURE__ */ u.jsx(ar, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
3572
+ s.type === "grid3" && /* @__PURE__ */ u.jsx(ys, { step: s.step, value: t, onChange: r }),
3573
+ s.type === "grid4" && /* @__PURE__ */ u.jsx(cr, { step: s.step, value: t, onChange: r }),
3574
+ s.type === "euler" && /* @__PURE__ */ u.jsx(ys, { step: s.step, value: t, onChange: r })
3492
3575
  ] });
3493
3576
  }
3494
- function Sr(s) {
3577
+ function Or(s) {
3495
3578
  return "items" in s;
3496
3579
  }
3497
3580
  class Oe extends Nt {
@@ -3546,9 +3629,9 @@ class Oe extends Nt {
3546
3629
  render() {
3547
3630
  const e = [];
3548
3631
  return this.props.items.forEach((t) => {
3549
- if (Sr(t))
3632
+ if (Or(t))
3550
3633
  e.push(
3551
- /* @__PURE__ */ u.jsx(Oe, { title: ni(t.title), items: t.items }, Math.random())
3634
+ /* @__PURE__ */ u.jsx(Oe, { title: ai(t.title), items: t.items }, Math.random())
3552
3635
  );
3553
3636
  else {
3554
3637
  const i = this.valueOverrides.get(t.title), n = i !== void 0 ? i : t.value;
@@ -3577,7 +3660,7 @@ class Oe extends Nt {
3577
3660
  );
3578
3661
  }
3579
3662
  }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ u.jsx(
3580
- ai,
3663
+ ri,
3581
3664
  {
3582
3665
  label: this.props.title,
3583
3666
  open: this.props.expanded === !0,
@@ -3679,7 +3762,7 @@ class ae extends Nt {
3679
3762
  }
3680
3763
  }
3681
3764
  }
3682
- function bs(s) {
3765
+ function Es(s) {
3683
3766
  switch (s) {
3684
3767
  case "fov":
3685
3768
  return "FOV";
@@ -3708,7 +3791,7 @@ function bs(s) {
3708
3791
  }
3709
3792
  return s;
3710
3793
  }
3711
- function wr(s, e) {
3794
+ function Tr(s, e) {
3712
3795
  function t() {
3713
3796
  return `${e.app.appID}_camera`;
3714
3797
  }
@@ -3720,7 +3803,7 @@ function wr(s, e) {
3720
3803
  if (s.perspectiveCameraInfo !== void 0)
3721
3804
  for (const o in s.perspectiveCameraInfo)
3722
3805
  a.push({
3723
- title: bs(o),
3806
+ title: Es(o),
3724
3807
  prop: o,
3725
3808
  type: "number",
3726
3809
  step: 0.01,
@@ -3737,7 +3820,7 @@ function wr(s, e) {
3737
3820
  else if (s.orthographicCameraInfo !== void 0)
3738
3821
  for (const o in s.orthographicCameraInfo)
3739
3822
  a.push({
3740
- title: bs(o),
3823
+ title: Es(o),
3741
3824
  prop: o,
3742
3825
  type: "number",
3743
3826
  step: 0.01,
@@ -3763,14 +3846,14 @@ function wr(s, e) {
3763
3846
  }
3764
3847
  );
3765
3848
  }
3766
- class xr extends Ie {
3849
+ class Mr extends Ie {
3767
3850
  constructor(e, t) {
3768
3851
  const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new gt();
3769
3852
  n.setAttribute("position", new Ke(i, 3)), n.computeBoundingSphere();
3770
- const r = new zi({ fog: !1 });
3853
+ const r = new Yi({ fog: !1 });
3771
3854
  super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
3772
3855
  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 })));
3856
+ o.setAttribute("position", new Ke(a, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Zs, fog: !1 })));
3774
3857
  }
3775
3858
  updateMatrixWorld() {
3776
3859
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3786,7 +3869,7 @@ class xr extends Ie {
3786
3869
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3787
3870
  }
3788
3871
  }
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 = {
3872
+ 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
3873
  NONE: -1,
3791
3874
  ROTATE: 0,
3792
3875
  DOLLY: 1,
@@ -3795,10 +3878,10 @@ const Cs = { type: "change" }, Yi = { type: "start" }, yn = { type: "end" }, Zt
3795
3878
  TOUCH_PAN: 4,
3796
3879
  TOUCH_DOLLY_PAN: 5,
3797
3880
  TOUCH_DOLLY_ROTATE: 6
3798
- }, yi = 1e-6;
3799
- class Tr extends rn {
3881
+ }, bi = 1e-6;
3882
+ class Pr extends on {
3800
3883
  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();
3884
+ 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
3885
  }
3803
3886
  connect() {
3804
3887
  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 +3911,7 @@ class Tr extends rn {
3828
3911
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
3829
3912
  }
3830
3913
  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;
3914
+ 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
3915
  }
3833
3916
  update(e = null) {
3834
3917
  const t = this.object.position;
@@ -3858,12 +3941,12 @@ class Tr extends rn {
3858
3941
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = oe.length();
3859
3942
  } else
3860
3943
  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))));
3944
+ 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
3945
  } else if (this.object.isOrthographicCamera) {
3863
3946
  const a = this.object.zoom;
3864
3947
  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
3948
  }
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;
3949
+ 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
3950
  }
3868
3951
  _getAutoRotationAngle(e) {
3869
3952
  return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
@@ -4057,13 +4140,13 @@ class Tr extends rn {
4057
4140
  return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
4058
4141
  }
4059
4142
  }
4060
- function Mr(s) {
4143
+ function Dr(s) {
4061
4144
  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
4145
  }
4063
- function Ar(s) {
4146
+ function Rr(s) {
4064
4147
  this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
4065
4148
  }
4066
- function Pr(s) {
4149
+ function Ir(s) {
4067
4150
  switch (this._removePointer(s), this._pointers.length) {
4068
4151
  case 0:
4069
4152
  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 +4157,7 @@ function Pr(s) {
4074
4157
  break;
4075
4158
  }
4076
4159
  }
4077
- function Dr(s) {
4160
+ function Lr(s) {
4078
4161
  let e;
4079
4162
  switch (s.button) {
4080
4163
  case 0:
@@ -4120,9 +4203,9 @@ function Dr(s) {
4120
4203
  default:
4121
4204
  this.state = V.NONE;
4122
4205
  }
4123
- this.state !== V.NONE && this.dispatchEvent(Yi);
4206
+ this.state !== V.NONE && this.dispatchEvent(Vi);
4124
4207
  }
4125
- function Rr(s) {
4208
+ function kr(s) {
4126
4209
  switch (this.state) {
4127
4210
  case V.ROTATE:
4128
4211
  if (this.enableRotate === !1)
@@ -4141,13 +4224,13 @@ function Rr(s) {
4141
4224
  break;
4142
4225
  }
4143
4226
  }
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));
4227
+ function Ur(s) {
4228
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Vi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(yn));
4146
4229
  }
4147
- function Lr(s) {
4230
+ function jr(s) {
4148
4231
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
4149
4232
  }
4150
- function kr(s) {
4233
+ function Nr(s) {
4151
4234
  switch (this._trackPointer(s), this._pointers.length) {
4152
4235
  case 1:
4153
4236
  switch (this.touches.ONE) {
@@ -4184,9 +4267,9 @@ function kr(s) {
4184
4267
  default:
4185
4268
  this.state = V.NONE;
4186
4269
  }
4187
- this.state !== V.NONE && this.dispatchEvent(Yi);
4270
+ this.state !== V.NONE && this.dispatchEvent(Vi);
4188
4271
  }
4189
- function Ur(s) {
4272
+ function Fr(s) {
4190
4273
  switch (this._trackPointer(s), this.state) {
4191
4274
  case V.TOUCH_ROTATE:
4192
4275
  if (this.enableRotate === !1)
@@ -4212,13 +4295,13 @@ function Ur(s) {
4212
4295
  this.state = V.NONE;
4213
4296
  }
4214
4297
  }
4215
- function jr(s) {
4298
+ function zr(s) {
4216
4299
  this.enabled !== !1 && s.preventDefault();
4217
4300
  }
4218
- function Nr(s) {
4301
+ function Hr(s) {
4219
4302
  s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4220
4303
  }
4221
- function Fr(s) {
4304
+ function Yr(s) {
4222
4305
  s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4223
4306
  }
4224
4307
  /*!
@@ -4260,7 +4343,7 @@ function Ze(s) {
4260
4343
  function Be(s) {
4261
4344
  return s.isOrthographicCamera;
4262
4345
  }
4263
- const ct = Math.PI * 2, Ss = Math.PI / 2, bn = 1e-5, xt = Math.PI / 180;
4346
+ const ct = Math.PI * 2, xs = Math.PI / 2, bn = 1e-5, xt = Math.PI / 180;
4264
4347
  function Me(s, e, t) {
4265
4348
  return Math.max(e, Math.min(t, s));
4266
4349
  }
@@ -4270,7 +4353,7 @@ function q(s, e = bn) {
4270
4353
  function Y(s, e, t = bn) {
4271
4354
  return q(s - e, t);
4272
4355
  }
4273
- function ws(s, e) {
4356
+ function Os(s, e) {
4274
4357
  return Math.round(s / e) * e;
4275
4358
  }
4276
4359
  function Ot(s) {
@@ -4290,7 +4373,7 @@ function Wt(s, e, t, i, n = 1 / 0, r) {
4290
4373
  let f = e + (l + m) * c;
4291
4374
  return d - s > 0 == f > d && (f = d, t.value = (f - d) / r), f;
4292
4375
  }
4293
- function xs(s, e, t, i, n = 1 / 0, r, a) {
4376
+ function Ts(s, e, t, i, n = 1 / 0, r, a) {
4294
4377
  i = Math.max(1e-4, i);
4295
4378
  const o = 2 / i, c = o * r, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
4296
4379
  let d = e.x, p = e.y, m = e.z, f = s.x - d, E = s.y - p, y = s.z - m;
@@ -4305,15 +4388,15 @@ function xs(s, e, t, i, n = 1 / 0, r, a) {
4305
4388
  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
4389
  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
4390
  }
4308
- function bi(s, e) {
4391
+ function Ci(s, e) {
4309
4392
  e.set(0, 0), s.forEach((t) => {
4310
4393
  e.x += t.clientX, e.y += t.clientY;
4311
4394
  }), e.x /= s.length, e.y /= s.length;
4312
4395
  }
4313
- function Ci(s, e) {
4396
+ function Ei(s, e) {
4314
4397
  return Be(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
4315
4398
  }
4316
- class zr {
4399
+ class Br {
4317
4400
  constructor() {
4318
4401
  this._listeners = {};
4319
4402
  }
@@ -4377,10 +4460,10 @@ class zr {
4377
4460
  }
4378
4461
  }
4379
4462
  }
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 {
4463
+ var Si;
4464
+ const Vr = "2.9.0", Gt = 1 / 8, Zr = /Mac/.test((Si = globalThis?.navigator) === null || Si === void 0 ? void 0 : Si.platform);
4465
+ let I, Ms, Xt, wi, be, U, z, ht, Mt, Pe, De, We, As, Ps, xe, At, dt, Ds, xi, Rs, Oi, Ti, $t;
4466
+ class ke extends Br {
4384
4467
  /**
4385
4468
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
4386
4469
  *
@@ -4422,7 +4505,7 @@ class ke extends zr {
4422
4505
  * @category Statics
4423
4506
  */
4424
4507
  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();
4508
+ 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
4509
  }
4427
4510
  /**
4428
4511
  * list all ACTIONs
@@ -4565,7 +4648,7 @@ class ke extends zr {
4565
4648
  const O = performance.now();
4566
4649
  l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
4567
4650
  }
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;
4651
+ 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
4652
  switch (this.mouseButtons.wheel) {
4570
4653
  case _.ROTATE: {
4571
4654
  this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
@@ -4601,7 +4684,7 @@ class ke extends zr {
4601
4684
  }, m = (g) => {
4602
4685
  if (!this._enabled)
4603
4686
  return;
4604
- if (bi(this._activePointers, be), this._getClientRect(this._elementRect), i.copy(be), n.copy(be), this._activePointers.length >= 2) {
4687
+ if (Ci(this._activePointers, be), this._getClientRect(this._elementRect), i.copy(be), n.copy(be), this._activePointers.length >= 2) {
4605
4688
  const S = be.x - this._activePointers[1].clientX, C = be.y - this._activePointers[1].clientY, w = Math.sqrt(S * S + C * C);
4606
4689
  r.set(0, w);
4607
4690
  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 +4710,7 @@ class ke extends zr {
4627
4710
  }, f = () => {
4628
4711
  if (!this._enabled || !this._dragNeedsUpdate)
4629
4712
  return;
4630
- this._dragNeedsUpdate = !1, bi(this._activePointers, be);
4713
+ this._dragNeedsUpdate = !1, Ci(this._activePointers, be);
4631
4714
  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
4715
  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
4716
  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 +4724,7 @@ class ke extends zr {
4641
4724
  }
4642
4725
  ((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
4726
  }, 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" }));
4727
+ 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
4728
  };
4646
4729
  this.lockPointer = () => {
4647
4730
  !this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
@@ -5031,12 +5114,12 @@ class ke extends zr {
5031
5114
  fitToBox(e, t, { cover: i = !1, paddingLeft: n = 0, paddingRight: r = 0, paddingBottom: a = 0, paddingTop: o = 0 } = {}) {
5032
5115
  const c = [], l = e.isBox3 ? dt.copy(e) : dt.setFromObject(e);
5033
5116
  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);
5117
+ const d = Os(this._sphericalEnd.theta, xs), p = Os(this._sphericalEnd.phi, xs);
5035
5118
  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);
5119
+ const m = U.setFromSpherical(this._sphericalEnd).normalize(), f = Rs.setFromUnitVectors(m, wi), E = Y(Math.abs(m.y), 1);
5120
+ E && f.multiply(Oi.setFromAxisAngle(Xt, d)), f.multiply(this._yAxisUpSpaceInverse);
5121
+ const y = Ds.makeEmpty();
5122
+ 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
5123
  const T = y.getSize(U), g = y.getCenter(z).applyQuaternion(f);
5041
5124
  if (Ze(this._camera)) {
5042
5125
  const v = this.getDistanceToFitBox(T.x, T.y, T.z, i);
@@ -5054,7 +5137,7 @@ class ke extends zr {
5054
5137
  * @category Methods
5055
5138
  */
5056
5139
  fitToSphere(e, t) {
5057
- const i = [], r = "isObject3D" in e ? ke.createBoundingSphere(e, wi) : wi.copy(e);
5140
+ const i = [], r = "isObject3D" in e ? ke.createBoundingSphere(e, xi) : xi.copy(e);
5058
5141
  if (i.push(this.moveTo(r.center.x, r.center.y, r.center.z, t)), Ze(this._camera)) {
5059
5142
  const a = this.getDistanceToFitSphere(r.radius);
5060
5143
  i.push(this.dollyTo(a, t));
@@ -5199,7 +5282,7 @@ class ke extends zr {
5199
5282
  * @category Methods
5200
5283
  */
5201
5284
  getDistanceToFitBox(e, t, i, n = !1) {
5202
- if (Ci(this._camera, "getDistanceToFitBox"))
5285
+ if (Ei(this._camera, "getDistanceToFitBox"))
5203
5286
  return this._spherical.radius;
5204
5287
  const r = e / t, a = this._camera.getEffectiveFOV() * xt, o = this._camera.aspect;
5205
5288
  return ((n ? r > o : r < o) ? t : e / o) * 0.5 / Math.tan(a * 0.5) + i * 0.5;
@@ -5211,7 +5294,7 @@ class ke extends zr {
5211
5294
  * @category Methods
5212
5295
  */
5213
5296
  getDistanceToFitSphere(e) {
5214
- if (Ci(this._camera, "getDistanceToFitSphere"))
5297
+ if (Ei(this._camera, "getDistanceToFitSphere"))
5215
5298
  return this._spherical.radius;
5216
5299
  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
5300
  return e / Math.sin(n * 0.5);
@@ -5317,7 +5400,7 @@ class ke extends zr {
5317
5400
  * @category Methods
5318
5401
  */
5319
5402
  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;
5403
+ 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
5404
  if (q(t))
5322
5405
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5323
5406
  else {
@@ -5340,13 +5423,13 @@ class ke extends zr {
5340
5423
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
5341
5424
  else {
5342
5425
  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;
5426
+ Ts(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5344
5427
  }
5345
5428
  if (q(a.x) && q(a.y) && q(a.z))
5346
5429
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5347
5430
  else {
5348
5431
  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;
5432
+ Ts(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5350
5433
  }
5351
5434
  if (q(o))
5352
5435
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
@@ -5430,7 +5513,7 @@ class ke extends zr {
5430
5513
  console.warn("camera-controls is already connected.");
5431
5514
  return;
5432
5515
  }
5433
- e.setAttribute("data-camera-controls-version", Hr), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5516
+ e.setAttribute("data-camera-controls-version", Vr), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5434
5517
  }
5435
5518
  /**
5436
5519
  * Detach all internal event handlers to disable drag control.
@@ -5490,13 +5573,13 @@ class ke extends zr {
5490
5573
  // lateUpdate
5491
5574
  _collisionTest() {
5492
5575
  let e = 1 / 0;
5493
- if (!(this.colliderMeshes.length >= 1) || Ci(this._camera, "_collisionTest"))
5576
+ if (!(this.colliderMeshes.length >= 1) || Ei(this._camera, "_collisionTest"))
5494
5577
  return e;
5495
5578
  const i = this._getTargetDirection(Mt);
5496
- Oi.lookAt(Os, i, this._camera.up);
5579
+ Ti.lookAt(Ms, i, this._camera.up);
5497
5580
  for (let n = 0; n < 4; n++) {
5498
5581
  const r = z.copy(this._nearPlaneCorners[n]);
5499
- r.applyMatrix4(Oi);
5582
+ r.applyMatrix4(Ti);
5500
5583
  const a = ht.addVectors(this._target, r);
5501
5584
  $t.set(a, i), $t.far = this._spherical.radius + 1;
5502
5585
  const o = $t.intersectObjects(this.colliderMeshes);
@@ -5575,7 +5658,7 @@ class ke extends zr {
5575
5658
  }), i.radius = Math.sqrt(r), i;
5576
5659
  }
5577
5660
  }
5578
- const ri = (s) => {
5661
+ const oi = (s) => {
5579
5662
  const [e, t] = Z(s.options[s.index]), i = () => {
5580
5663
  s.onToggle(!s.open);
5581
5664
  }, n = (r) => {
@@ -5585,7 +5668,7 @@ const ri = (s) => {
5585
5668
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: i, children: `${s.title}: ${e}` }),
5586
5669
  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
5670
  ] });
5588
- }, Ge = Ra(function(e, t) {
5671
+ }, Ge = La(function(e, t) {
5589
5672
  const i = [
5590
5673
  "Renderer",
5591
5674
  "Depth",
@@ -5599,7 +5682,7 @@ const ri = (s) => {
5599
5682
  } }),
5600
5683
  /* @__PURE__ */ u.jsxs("div", { className: "options", children: [
5601
5684
  e.camera !== null && /* @__PURE__ */ u.jsx(
5602
- ri,
5685
+ oi,
5603
5686
  {
5604
5687
  title: "Camera",
5605
5688
  index: e.options.indexOf(e.camera.name),
@@ -5613,7 +5696,7 @@ const ri = (s) => {
5613
5696
  }
5614
5697
  ),
5615
5698
  /* @__PURE__ */ u.jsx(
5616
- ri,
5699
+ oi,
5617
5700
  {
5618
5701
  title: "Mode",
5619
5702
  index: i.indexOf(n),
@@ -5634,15 +5717,15 @@ const ri = (s) => {
5634
5717
  ] })
5635
5718
  ] });
5636
5719
  });
5637
- class Br extends on {
5720
+ class Wr extends ln {
5638
5721
  constructor(e) {
5639
5722
  super({
5640
5723
  extensions: {
5641
5724
  // @ts-ignore
5642
5725
  derivatives: !0
5643
5726
  },
5644
- glslVersion: la,
5645
- side: Fi,
5727
+ glslVersion: ha,
5728
+ side: Hi,
5646
5729
  transparent: !0,
5647
5730
  uniforms: {
5648
5731
  uScale: {
@@ -5747,17 +5830,17 @@ class Br extends on {
5747
5830
  });
5748
5831
  }
5749
5832
  }
5750
- class Vr extends M {
5833
+ class Gr extends M {
5751
5834
  gridMaterial;
5752
5835
  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;
5836
+ const e = new Wr();
5837
+ super(new cn(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
5755
5838
  }
5756
5839
  update() {
5757
5840
  this.gridMaterial.needsUpdate = !0;
5758
5841
  }
5759
5842
  }
5760
- function Ds(s) {
5843
+ function Is(s) {
5761
5844
  const [e, t] = Z(s.selected), i = "toggle" + (e ? " selected" : "");
5762
5845
  return /* @__PURE__ */ u.jsx(
5763
5846
  "button",
@@ -5776,7 +5859,7 @@ function Ds(s) {
5776
5859
  s.name
5777
5860
  );
5778
5861
  }
5779
- const Zr = `#include <common>
5862
+ const Xr = `#include <common>
5780
5863
  #include <batching_pars_vertex>
5781
5864
  #include <uv_pars_vertex>
5782
5865
  #include <color_pars_vertex>
@@ -5806,7 +5889,7 @@ void main() {
5806
5889
  #include <logdepthbuf_vertex>
5807
5890
  #include <clipping_planes_vertex>
5808
5891
  #include <worldpos_vertex>
5809
- }`, Wr = `
5892
+ }`, $r = `
5810
5893
  #include <common>
5811
5894
  #include <uv_pars_fragment>
5812
5895
  #include <clipping_planes_pars_fragment>
@@ -5815,30 +5898,30 @@ void main() {
5815
5898
  #include <clipping_planes_fragment>
5816
5899
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
5817
5900
  }`;
5818
- class Gr extends on {
5901
+ class qr extends ln {
5819
5902
  constructor() {
5820
5903
  super({
5821
5904
  defines: {
5822
5905
  USE_UV: ""
5823
5906
  },
5824
- vertexShader: Zr,
5825
- fragmentShader: Wr
5907
+ vertexShader: Xr,
5908
+ fragmentShader: $r
5826
5909
  });
5827
5910
  }
5828
5911
  }
5829
- const Xe = new si(), ue = new A(), Ye = new A(), Q = new Ee(), Rs = {
5912
+ const Xe = new si(), ue = new A(), Ye = new A(), Q = new Ee(), Ls = {
5830
5913
  X: new A(1, 0, 0),
5831
5914
  Y: new A(0, 1, 0),
5832
5915
  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 {
5916
+ }, Mi = { type: "change" }, ks = { type: "mouseDown", mode: null }, Us = { type: "mouseUp", mode: null }, js = { type: "objectChange" };
5917
+ class Kr extends on {
5835
5918
  constructor(e, t = null) {
5836
5919
  super(void 0, t);
5837
- const i = new eo(this);
5920
+ const i = new so(this);
5838
5921
  this._root = i;
5839
- const n = new to();
5922
+ const n = new no();
5840
5923
  this._gizmo = n, i.add(n);
5841
- const r = new io();
5924
+ const r = new ao();
5842
5925
  this._plane = r, i.add(r);
5843
5926
  const a = this;
5844
5927
  function o(S, C) {
@@ -5848,13 +5931,13 @@ class Xr extends rn {
5848
5931
  return w !== void 0 ? w : C;
5849
5932
  },
5850
5933
  set: function(O) {
5851
- w !== O && (w = O, r[S] = O, n[S] = O, a.dispatchEvent({ type: S + "-changed", value: O }), a.dispatchEvent(Ti));
5934
+ w !== O && (w = O, r[S] = O, n[S] = O, a.dispatchEvent({ type: S + "-changed", value: O }), a.dispatchEvent(Mi));
5852
5935
  }
5853
5936
  }), a[S] = C, r[S] = C, n[S] = C;
5854
5937
  }
5855
5938
  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
5939
  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();
5940
+ 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
5941
  }
5859
5942
  connect() {
5860
5943
  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 +5952,14 @@ class Xr extends rn {
5869
5952
  if (this.object === void 0 || this.dragging === !0)
5870
5953
  return;
5871
5954
  e !== null && Xe.setFromCamera(e, this.camera);
5872
- const t = Mi(this._gizmo.picker[this.mode], Xe);
5955
+ const t = Ai(this._gizmo.picker[this.mode], Xe);
5873
5956
  t ? this.axis = t.object.name : this.axis = null;
5874
5957
  }
5875
5958
  pointerDown(e) {
5876
5959
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
5877
5960
  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);
5961
+ const t = Ai(this._plane, Xe, !0);
5962
+ 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
5963
  }
5881
5964
  }
5882
5965
  pointerMove(e) {
@@ -5885,7 +5968,7 @@ class Xr extends rn {
5885
5968
  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
5969
  return;
5887
5970
  e !== null && Xe.setFromCamera(e, this.camera);
5888
- const a = Mi(this._plane, Xe, !0);
5971
+ const a = Ai(this._plane, Xe, !0);
5889
5972
  if (a) {
5890
5973
  if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), i === "translate")
5891
5974
  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 +5983,13 @@ class Xr extends rn {
5900
5983
  this._offset.copy(this.pointEnd).sub(this.pointStart);
5901
5984
  const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
5902
5985
  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());
5986
+ 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
5987
  }
5905
- this.dispatchEvent(Ti), this.dispatchEvent(ks);
5988
+ this.dispatchEvent(Mi), this.dispatchEvent(js);
5906
5989
  }
5907
5990
  }
5908
5991
  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);
5992
+ e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Us.mode = this.mode, this.dispatchEvent(Us)), this.dragging = !1, this.axis = null);
5910
5993
  }
5911
5994
  dispose() {
5912
5995
  this.disconnect(), this.traverse(function(e) {
@@ -5922,7 +6005,7 @@ class Xr extends rn {
5922
6005
  return this.object = void 0, this.axis = null, this._root.visible = !1, this;
5923
6006
  }
5924
6007
  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));
6008
+ 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
6009
  }
5927
6010
  getRaycaster() {
5928
6011
  return Xe;
@@ -5950,7 +6033,7 @@ class Xr extends rn {
5950
6033
  this.space = e;
5951
6034
  }
5952
6035
  }
5953
- function $r(s) {
6036
+ function Qr(s) {
5954
6037
  if (this.domElement.ownerDocument.pointerLockElement)
5955
6038
  return {
5956
6039
  x: 0,
@@ -5966,7 +6049,7 @@ function $r(s) {
5966
6049
  };
5967
6050
  }
5968
6051
  }
5969
- function qr(s) {
6052
+ function Jr(s) {
5970
6053
  if (this.enabled)
5971
6054
  switch (s.pointerType) {
5972
6055
  case "mouse":
@@ -5975,24 +6058,24 @@ function qr(s) {
5975
6058
  break;
5976
6059
  }
5977
6060
  }
5978
- function Kr(s) {
6061
+ function eo(s) {
5979
6062
  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
6063
  }
5981
- function Qr(s) {
6064
+ function to(s) {
5982
6065
  this.enabled && this.pointerMove(this._getPointer(s));
5983
6066
  }
5984
- function Jr(s) {
6067
+ function io(s) {
5985
6068
  this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
5986
6069
  }
5987
- function Mi(s, e, t) {
6070
+ function Ai(s, e, t) {
5988
6071
  const i = e.intersectObject(s, !0);
5989
6072
  for (let n = 0; n < i.length; n++)
5990
6073
  if (i[n].object.visible || t)
5991
6074
  return i[n];
5992
6075
  return !1;
5993
6076
  }
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 {
6077
+ 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();
6078
+ class so extends _t {
5996
6079
  constructor(e) {
5997
6080
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
5998
6081
  }
@@ -6002,7 +6085,7 @@ class eo extends _t {
6002
6085
  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
6086
  }
6004
6087
  }
6005
- class to extends _t {
6088
+ class no extends _t {
6006
6089
  constructor() {
6007
6090
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
6008
6091
  const e = new Je({
@@ -6011,7 +6094,7 @@ class to extends _t {
6011
6094
  fog: !1,
6012
6095
  toneMapped: !1,
6013
6096
  transparent: !0
6014
- }), t = new zi({
6097
+ }), t = new Yi({
6015
6098
  depthTest: !1,
6016
6099
  depthWrite: !1,
6017
6100
  fog: !1,
@@ -6149,7 +6232,7 @@ class to extends _t {
6149
6232
  ]
6150
6233
  }, B = {
6151
6234
  XYZE: [
6152
- [new M(new hn(0.25, 10, 8), i)]
6235
+ [new M(new dn(0.25, 10, 8), i)]
6153
6236
  ],
6154
6237
  X: [
6155
6238
  [new M(new bt(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -6251,21 +6334,21 @@ class to extends _t {
6251
6334
  a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
6252
6335
  let o;
6253
6336
  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));
6337
+ 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
6338
  continue;
6256
6339
  }
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) {
6340
+ 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
6341
  return a.name === c;
6259
6342
  })) && (a.material.color.setHex(16776960), a.material.opacity = 1);
6260
6343
  }
6261
6344
  super.updateMatrixWorld(e);
6262
6345
  }
6263
6346
  }
6264
- class io extends M {
6347
+ class ao extends M {
6265
6348
  constructor() {
6266
6349
  super(
6267
- new ln(1e5, 1e5, 2, 2),
6268
- new Je({ visible: !1, wireframe: !0, side: Fi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6350
+ new cn(1e5, 1e5, 2, 2),
6351
+ new Je({ visible: !1, wireframe: !0, side: Hi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6269
6352
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
6270
6353
  }
6271
6354
  updateMatrixWorld(e) {
@@ -6302,10 +6385,10 @@ class io extends M {
6302
6385
  default:
6303
6386
  Re.set(0, 0, 0);
6304
6387
  }
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);
6388
+ 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
6389
  }
6307
6390
  }
6308
- class ge extends Bs {
6391
+ class ge extends zi {
6309
6392
  static DRAG_START = "Transform::dragStart";
6310
6393
  static DRAG_END = "Transform::dragEnd";
6311
6394
  static _instance;
@@ -6328,7 +6411,7 @@ class ge extends Bs {
6328
6411
  let t = this.controls.get(e);
6329
6412
  if (t === void 0) {
6330
6413
  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", () => {
6414
+ 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
6415
  this.dispatchEvent({ type: ge.DRAG_START });
6333
6416
  }), t.addEventListener("mouseUp", () => {
6334
6417
  this.dispatchEvent({ type: ge.DRAG_END });
@@ -6374,9 +6457,9 @@ class ge extends Bs {
6374
6457
  return ge._instance || (ge._instance = new ge()), ge._instance;
6375
6458
  }
6376
6459
  }
6377
- const so = new de(), Ai = new pe();
6378
- class Fs extends _t {
6379
- curve = new ns();
6460
+ const ro = new de(), Pi = new pe();
6461
+ class Hs extends _t {
6462
+ curve = new rs();
6380
6463
  line;
6381
6464
  draggable;
6382
6465
  curvePos;
@@ -6397,7 +6480,7 @@ class Fs extends _t {
6397
6480
  group;
6398
6481
  constructor(e, t) {
6399
6482
  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();
6483
+ 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
6484
  }
6402
6485
  enable() {
6403
6486
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6415,7 +6498,7 @@ class Fs extends _t {
6415
6498
  const e = [];
6416
6499
  this.draggable.children.forEach((t) => {
6417
6500
  e.push([Ae(t.position.x, 3), Ae(t.position.y, 3), Ae(t.position.z, 3)]);
6418
- }), Ia({
6501
+ }), ka({
6419
6502
  name: this.name,
6420
6503
  points: e,
6421
6504
  tension: this.tension,
@@ -6438,7 +6521,7 @@ class Fs extends _t {
6438
6521
  this.addPoint(new A(-50, 0, 0), !1), this.addPoint(new A(50, 0, 0));
6439
6522
  };
6440
6523
  addPoint = (e, t = !0) => {
6441
- const i = this.draggable.children.length, n = new M(so, this.draggedMat);
6524
+ const i = this.draggable.children.length, n = new M(ro, this.draggedMat);
6442
6525
  return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
6443
6526
  };
6444
6527
  addNextPt = () => {
@@ -6467,14 +6550,14 @@ class Fs extends _t {
6467
6550
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
6468
6551
  };
6469
6552
  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));
6553
+ 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
6554
  };
6472
6555
  // Handlers
6473
6556
  onMouseClick = (e) => {
6474
6557
  if (!me.instance || this._transform && !this._transform.getHelper().visible)
6475
6558
  return;
6476
6559
  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);
6560
+ 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
6561
  const n = this.raycaster.intersectObjects(this.draggable.children, !1);
6479
6562
  if (n.length > 0) {
6480
6563
  const r = n[0].object;
@@ -6708,7 +6791,7 @@ class Fs extends _t {
6708
6791
  };
6709
6792
  }
6710
6793
  let Jt = 0;
6711
- class no extends _t {
6794
+ class oo extends _t {
6712
6795
  defaultScale = 10;
6713
6796
  _camera;
6714
6797
  group = null;
@@ -6767,7 +6850,7 @@ class no extends _t {
6767
6850
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
6768
6851
  }
6769
6852
  createSpline = (e = []) => {
6770
- const t = `Spline ${Jt + 1}`, i = new Fs(t, this._camera);
6853
+ const t = `Spline ${Jt + 1}`, i = new Hs(t, this._camera);
6771
6854
  return i.addPoints(e), this.addSpline(i), Jt++, i;
6772
6855
  };
6773
6856
  createSplineFromArray = (e) => {
@@ -6791,7 +6874,7 @@ class no extends _t {
6791
6874
  t.points.forEach((a) => {
6792
6875
  n.push(new A(a[0], a[1], a[2]));
6793
6876
  });
6794
- const r = new Fs(i, this.camera);
6877
+ const r = new Hs(i, this.camera);
6795
6878
  r.addPoints(n), this.addSpline(r), Jt++;
6796
6879
  };
6797
6880
  get camera() {
@@ -6804,15 +6887,15 @@ class no extends _t {
6804
6887
  });
6805
6888
  }
6806
6889
  }
6807
- const zs = [
6890
+ const Ys = [
6808
6891
  "Single",
6809
6892
  "Side by Side",
6810
6893
  "Stacked",
6811
6894
  "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==";
6895
+ ], 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
6896
  class me extends Nt {
6814
6897
  static instance = null;
6815
- scene = new Ys();
6898
+ scene = new Vs();
6816
6899
  renderer;
6817
6900
  currentScene;
6818
6901
  cameras = /* @__PURE__ */ new Map();
@@ -6822,17 +6905,17 @@ class me extends Nt {
6822
6905
  // RefObject to one of the "windows"
6823
6906
  cameraHelpers = /* @__PURE__ */ new Map();
6824
6907
  lightHelpers = /* @__PURE__ */ new Map();
6825
- helpersContainer = new ca();
6826
- grid = new Vr();
6827
- axisHelper = new as(500);
6828
- interactionHelper = new as(100);
6908
+ helpersContainer = new da();
6909
+ grid = new Gr();
6910
+ axisHelper = new os(500);
6911
+ interactionHelper = new os(100);
6829
6912
  currentTransform;
6830
6913
  // Tools
6831
6914
  splineEditor;
6832
6915
  // Override Materials
6833
- depthMaterial = new ha();
6834
- normalsMaterial = new da();
6835
- uvMaterial = new Gr();
6916
+ depthMaterial = new ua();
6917
+ normalsMaterial = new pa();
6918
+ uvMaterial = new qr();
6836
6919
  wireframeMaterial = new Je({
6837
6920
  opacity: 0.33,
6838
6921
  transparent: !0,
@@ -6883,12 +6966,12 @@ class me extends Nt {
6883
6966
  const r = {
6884
6967
  Vector2: pe,
6885
6968
  Vector3: A,
6886
- Vector4: ba,
6969
+ Vector4: Ea,
6887
6970
  Quaternion: Ee,
6888
- Matrix4: oi,
6889
- Spherical: Di,
6890
- Box3: Ca,
6891
- Sphere: Ea,
6971
+ Matrix4: li,
6972
+ Spherical: Ri,
6973
+ Box3: Sa,
6974
+ Sphere: wa,
6892
6975
  Raycaster: si
6893
6976
  };
6894
6977
  ke.install({ THREE: r }), this.setupScene(), this.setupTools();
@@ -7039,11 +7122,11 @@ class me extends Nt {
7039
7122
  ] }),
7040
7123
  /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
7041
7124
  /* @__PURE__ */ u.jsx(
7042
- ri,
7125
+ oi,
7043
7126
  {
7044
7127
  title: "View",
7045
- index: zs.indexOf(this.state.mode),
7046
- options: zs,
7128
+ index: Ys.indexOf(this.state.mode),
7129
+ options: Ys,
7047
7130
  onSelect: (t) => {
7048
7131
  t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
7049
7132
  },
@@ -7058,7 +7141,7 @@ class me extends Nt {
7058
7141
  }
7059
7142
  ),
7060
7143
  /* @__PURE__ */ u.jsx(
7061
- ri,
7144
+ oi,
7062
7145
  {
7063
7146
  title: "Interact",
7064
7147
  index: this.state.interactionMode === "Orbit" ? 0 : 1,
@@ -7080,10 +7163,10 @@ class me extends Nt {
7080
7163
  }
7081
7164
  ),
7082
7165
  /* @__PURE__ */ u.jsx(
7083
- Ds,
7166
+ Is,
7084
7167
  {
7085
7168
  name: "cameraHelper",
7086
- icon: ao,
7169
+ icon: lo,
7087
7170
  selected: this.cameraVisibility,
7088
7171
  height: 24,
7089
7172
  top: 2,
@@ -7098,10 +7181,10 @@ class me extends Nt {
7098
7181
  }
7099
7182
  ),
7100
7183
  /* @__PURE__ */ u.jsx(
7101
- Ds,
7184
+ Is,
7102
7185
  {
7103
7186
  name: "lightHelper",
7104
- icon: ro,
7187
+ icon: co,
7105
7188
  selected: this.lightVisibility,
7106
7189
  height: 24,
7107
7190
  top: 4,
@@ -7120,7 +7203,7 @@ class me extends Nt {
7120
7203
  }
7121
7204
  // Setup
7122
7205
  setupRenderer() {
7123
- this.renderer = new ua({
7206
+ this.renderer = new ma({
7124
7207
  canvas: this.canvasRef.current,
7125
7208
  stencil: !1
7126
7209
  }), 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 +7211,7 @@ class me extends Nt {
7128
7211
  setupScene() {
7129
7212
  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
7213
  const e = (n, r) => {
7131
- const a = new Pi(-100, 100, 100, -100, 50, 5e3);
7214
+ const a = new Di(-100, 100, 100, -100, 50, 5e3);
7132
7215
  return a.name = n, a.position.copy(r), a.lookAt(0, 0, 0), this.cameras.set(n, a), a;
7133
7216
  };
7134
7217
  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 +7219,7 @@ class me extends Nt {
7136
7219
  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
7220
  }
7138
7221
  setupTools() {
7139
- this.splineEditor = new no(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7222
+ this.splineEditor = new oo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7140
7223
  }
7141
7224
  // Public
7142
7225
  play() {
@@ -7204,7 +7287,7 @@ class me extends Nt {
7204
7287
  }
7205
7288
  const r = i / n;
7206
7289
  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());
7290
+ 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
7291
  });
7209
7292
  };
7210
7293
  sceneUpdate = (e) => {
@@ -7218,7 +7301,7 @@ class me extends Nt {
7218
7301
  addCamera = (e) => {
7219
7302
  const t = e.value, i = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
7220
7303
  if (i !== void 0 && this.cameras.set(t.name, i), i instanceof Ct) {
7221
- const n = new pa(i);
7304
+ const n = new fa(i);
7222
7305
  n.visible = this.cameraVisibility, this.cameraHelpers.set(i.name, n), this.scene.add(n);
7223
7306
  }
7224
7307
  this.setState({ lastUpdate: Date.now() });
@@ -7269,7 +7352,7 @@ class me extends Nt {
7269
7352
  if (this.currentCamera.name === "UI")
7270
7353
  return;
7271
7354
  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));
7355
+ 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
7356
  } else if (this.currentTransform !== void 0)
7274
7357
  switch (e.key) {
7275
7358
  case "r":
@@ -7306,7 +7389,7 @@ class me extends Nt {
7306
7389
  x: this.selectedItem.rotation.x,
7307
7390
  y: this.selectedItem.rotation.y,
7308
7391
  z: this.selectedItem.rotation.z
7309
- }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ci.instance.update());
7392
+ }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), hi.instance.update());
7310
7393
  };
7311
7394
  // Utils
7312
7395
  clearLightHelpers = () => {
@@ -7320,19 +7403,19 @@ class me extends Nt {
7320
7403
  let t;
7321
7404
  switch (e.type) {
7322
7405
  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);
7406
+ 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
7407
  break;
7325
7408
  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);
7409
+ 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
7410
  break;
7328
7411
  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);
7412
+ t = new Mr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7330
7413
  break;
7331
7414
  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);
7415
+ 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
7416
  break;
7334
7417
  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);
7418
+ t = new _a(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7336
7419
  break;
7337
7420
  }
7338
7421
  }
@@ -7342,7 +7425,7 @@ class me extends Nt {
7342
7425
  const i = this.controls.get(e.name);
7343
7426
  if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
7344
7427
  return;
7345
- const n = new Tr(e, t);
7428
+ const n = new Pr(e, t);
7346
7429
  switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
7347
7430
  case "Top":
7348
7431
  case "Bottom":
@@ -7403,11 +7486,11 @@ class me extends Nt {
7403
7486
  if (this.selectedItem === void 0)
7404
7487
  return;
7405
7488
  cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
7406
- const i = 0.15, n = new ya();
7489
+ const i = 0.15, n = new Ca();
7407
7490
  n.start(), this.selectedItem.getWorldPosition(e.target0);
7408
7491
  const r = () => {
7409
7492
  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);
7493
+ 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
7494
  };
7412
7495
  r();
7413
7496
  };
@@ -7471,11 +7554,11 @@ class me extends Nt {
7471
7554
  return `${this.appID}_multiviewLightVisibility`;
7472
7555
  }
7473
7556
  }
7474
- class ci extends Nt {
7557
+ class hi extends Nt {
7475
7558
  static instance;
7476
- matrix = new oi();
7559
+ matrix = new li();
7477
7560
  position = new A();
7478
- rotation = new cn();
7561
+ rotation = new hn();
7479
7562
  scale = new A();
7480
7563
  open = !1;
7481
7564
  constructor(e) {
@@ -7484,7 +7567,7 @@ class ci extends Nt {
7484
7567
  this.open = i, this.saveExpanded(), this.state = {
7485
7568
  lastUpdated: 0,
7486
7569
  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;
7570
+ }, 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
7571
  }
7489
7572
  update() {
7490
7573
  if (me.instance) {
@@ -7554,7 +7637,7 @@ class ci extends Nt {
7554
7637
  return `${this.props.three.app.appID}_transform`;
7555
7638
  }
7556
7639
  }
7557
- function Hs(s) {
7640
+ function Bs(s) {
7558
7641
  switch (s) {
7559
7642
  case "color":
7560
7643
  return "Color";
@@ -7577,7 +7660,7 @@ function Hs(s) {
7577
7660
  }
7578
7661
  return s;
7579
7662
  }
7580
- function oo(s, e) {
7663
+ function ho(s, e) {
7581
7664
  function t() {
7582
7665
  return `${e.app.appID}_light`;
7583
7666
  }
@@ -7590,7 +7673,7 @@ function oo(s, e) {
7590
7673
  for (const o in s.lightInfo) {
7591
7674
  const c = s.lightInfo[o];
7592
7675
  c !== void 0 && (c.isColor !== void 0 ? a.push({
7593
- title: Hs(o),
7676
+ title: Bs(o),
7594
7677
  prop: o,
7595
7678
  type: "color",
7596
7679
  value: c,
@@ -7604,7 +7687,7 @@ function oo(s, e) {
7604
7687
  }
7605
7688
  }
7606
7689
  }) : a.push({
7607
- title: Hs(o),
7690
+ title: Bs(o),
7608
7691
  prop: o,
7609
7692
  type: typeof c,
7610
7693
  value: c,
@@ -7631,7 +7714,7 @@ function oo(s, e) {
7631
7714
  }
7632
7715
  );
7633
7716
  }
7634
- function lo(s) {
7717
+ function uo(s) {
7635
7718
  const e = s.object, t = s.three;
7636
7719
  function i() {
7637
7720
  return `${t.app.appID}_animation`;
@@ -7702,7 +7785,7 @@ function lo(s) {
7702
7785
  }), o.push({
7703
7786
  title: "Mixer",
7704
7787
  items: y
7705
- }), d = new Sa(m), me.instance?.scene.add(d);
7788
+ }), d = new xa(m), me.instance?.scene.add(d);
7706
7789
  }
7707
7790
  }
7708
7791
  }
@@ -7720,7 +7803,7 @@ function lo(s) {
7720
7803
  }
7721
7804
  );
7722
7805
  }
7723
- const Ni = {
7806
+ const Fi = {
7724
7807
  name: "",
7725
7808
  uuid: "",
7726
7809
  type: "",
@@ -7733,15 +7816,15 @@ const Ni = {
7733
7816
  lightInfo: void 0,
7734
7817
  children: []
7735
7818
  };
7736
- let ce = { ...Ni };
7737
- function co(s) {
7819
+ let ce = { ...Fi };
7820
+ function po(s) {
7738
7821
  const [e, t] = Z(-1);
7739
7822
  tt(() => {
7740
7823
  function a(c) {
7741
7824
  ce = { ...c.value }, t(Date.now());
7742
7825
  }
7743
7826
  function o() {
7744
- ce = { ...Ni }, t(Date.now());
7827
+ ce = { ...Fi }, t(Date.now());
7745
7828
  }
7746
7829
  return D.addEventListener(P.SET_SCENE, o), D.addEventListener(P.SET_OBJECT, a), () => {
7747
7830
  D.removeEventListener(P.SET_SCENE, o), D.removeEventListener(P.SET_OBJECT, a);
@@ -7749,11 +7832,11 @@ function co(s) {
7749
7832
  }, []);
7750
7833
  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
7834
  return /* @__PURE__ */ u.jsx(
7752
- ai,
7835
+ ri,
7753
7836
  {
7754
7837
  label: "Inspector",
7755
7838
  button: ce.uuid.length > 0 ? /* @__PURE__ */ u.jsx("button", { className: "remove", onClick: () => {
7756
- ge.instance.remove(ce.name), ce = { ...Ni }, t(Date.now());
7839
+ ge.instance.remove(ce.name), ce = { ...Fi }, t(Date.now());
7757
7840
  } }) : void 0,
7758
7841
  children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: s.class, children: ce.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
7759
7842
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
@@ -7789,28 +7872,28 @@ function co(s) {
7789
7872
  )
7790
7873
  ] }),
7791
7874
  /* @__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
7875
+ /* @__PURE__ */ u.jsx(hi, { object: ce, three: s.three }),
7876
+ n ? /* @__PURE__ */ u.jsx(uo, { object: ce, three: s.three }) : null,
7877
+ i.search("camera") > -1 ? Tr(ce, s.three) : null,
7878
+ i.search("light") > -1 ? ho(ce, s.three) : null,
7879
+ r ? wr(ce, s.three) : null
7797
7880
  ] })
7798
7881
  ] }) }, e)
7799
7882
  },
7800
7883
  "Inspector"
7801
7884
  );
7802
7885
  }
7803
- class ho extends Nt {
7886
+ class mo extends Nt {
7804
7887
  // Renderer
7805
7888
  autoClear = !0;
7806
7889
  autoClearColor = !0;
7807
7890
  autoClearDepth = !0;
7808
7891
  autoClearStencil = !0;
7809
- outputColorSpace = rs;
7892
+ outputColorSpace = ls;
7810
7893
  localClippingEnabled = !1;
7811
7894
  clearColor = new et(0);
7812
7895
  clearAlpha = 1;
7813
- toneMapping = os;
7896
+ toneMapping = cs;
7814
7897
  toneMappingExposure = 1;
7815
7898
  constructor(e) {
7816
7899
  super(e);
@@ -7934,11 +8017,11 @@ class ho extends Nt {
7934
8017
  options: [
7935
8018
  {
7936
8019
  title: "No Color Space",
7937
- value: wa
8020
+ value: Oa
7938
8021
  },
7939
8022
  {
7940
8023
  title: "SRB Color Space",
7941
- value: rs
8024
+ value: ls
7942
8025
  },
7943
8026
  {
7944
8027
  title: "Linear SRB Color Space",
@@ -7956,35 +8039,35 @@ class ho extends Nt {
7956
8039
  options: [
7957
8040
  {
7958
8041
  title: "None ",
7959
- value: os
8042
+ value: cs
7960
8043
  },
7961
8044
  {
7962
8045
  title: "Linear ",
7963
- value: xa
8046
+ value: Ta
7964
8047
  },
7965
8048
  {
7966
8049
  title: "Reinhard",
7967
- value: Oa
8050
+ value: Ma
7968
8051
  },
7969
8052
  {
7970
8053
  title: "Cineon ",
7971
- value: Ta
8054
+ value: Aa
7972
8055
  },
7973
8056
  {
7974
8057
  title: "ACES Filmic",
7975
- value: Ma
8058
+ value: Pa
7976
8059
  },
7977
8060
  {
7978
8061
  title: "AgX",
7979
- value: Aa
8062
+ value: Da
7980
8063
  },
7981
8064
  {
7982
8065
  title: "Neutral",
7983
- value: Pa
8066
+ value: Ra
7984
8067
  },
7985
8068
  {
7986
8069
  title: "Custom",
7987
- value: Da
8070
+ value: Ia
7988
8071
  }
7989
8072
  ],
7990
8073
  onChange: (t, i) => {
@@ -8017,12 +8100,12 @@ class ho extends Nt {
8017
8100
  return `${this.props.three.app.appID}_renderer`;
8018
8101
  }
8019
8102
  }
8020
- function uo(s) {
8103
+ function fo(s) {
8021
8104
  const [e] = Z([]), [t] = Z([]), [i, n] = Z(0), r = (c) => {
8022
8105
  const l = c.value;
8023
8106
  e.push(l), t.push(
8024
8107
  /* @__PURE__ */ u.jsx(
8025
- ai,
8108
+ ri,
8026
8109
  {
8027
8110
  label: `Scene: ${l.name}`,
8028
8111
  scene: l,
@@ -8030,7 +8113,7 @@ function uo(s) {
8030
8113
  onRefresh: () => {
8031
8114
  s.three.refreshScene(l.name);
8032
8115
  },
8033
- children: /* @__PURE__ */ u.jsx(gs, { child: l, scene: l, three: s.three })
8116
+ children: /* @__PURE__ */ u.jsx(vs, { child: l, scene: l, three: s.three })
8034
8117
  },
8035
8118
  Math.random()
8036
8119
  )
@@ -8040,7 +8123,7 @@ function uo(s) {
8040
8123
  for (let d = 0; d < e.length; d++)
8041
8124
  if (l.uuid === e[d].uuid) {
8042
8125
  e[d] = l, t[d] = /* @__PURE__ */ u.jsx(
8043
- ai,
8126
+ ri,
8044
8127
  {
8045
8128
  label: `Scene: ${l.name}`,
8046
8129
  scene: l,
@@ -8048,7 +8131,7 @@ function uo(s) {
8048
8131
  onRefresh: () => {
8049
8132
  s.three.refreshScene(l.name);
8050
8133
  },
8051
- children: /* @__PURE__ */ u.jsx(gs, { child: l, scene: l, three: s.three })
8134
+ children: /* @__PURE__ */ u.jsx(vs, { child: l, scene: l, three: s.three })
8052
8135
  },
8053
8136
  Math.random()
8054
8137
  ), n(Date.now());
@@ -8066,12 +8149,12 @@ function uo(s) {
8066
8149
  D.removeEventListener(P.ADD_SCENE, r), D.removeEventListener(P.REFRESH_SCENE, a), D.removeEventListener(P.REMOVE_SCENE, o);
8067
8150
  }), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
8068
8151
  /* @__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 }),
8152
+ /* @__PURE__ */ u.jsx(po, { three: s.three }),
8153
+ /* @__PURE__ */ u.jsx(mo, { three: s.three }),
8071
8154
  /* @__PURE__ */ u.jsx(ae, { three: s.three })
8072
8155
  ] });
8073
8156
  }
8074
- function Mo(s) {
8157
+ function Io(s) {
8075
8158
  return tt(() => {
8076
8159
  function e(o) {
8077
8160
  let c = null;
@@ -8120,7 +8203,7 @@ function Mo(s) {
8120
8203
  const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
8121
8204
  if (f !== void 0)
8122
8205
  try {
8123
- p !== void 0 ? Wa(f, p)[c](d) : f[c](d);
8206
+ p !== void 0 ? $a(f, p)[c](d) : f[c](d);
8124
8207
  } catch (E) {
8125
8208
  console.log("Error requesting method:"), console.log(E), console.log(c), console.log(d);
8126
8209
  }
@@ -8130,15 +8213,15 @@ function Mo(s) {
8130
8213
  };
8131
8214
  }, []), null;
8132
8215
  }
8133
- function po(s) {
8216
+ function go(s) {
8134
8217
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
8135
8218
  /* @__PURE__ */ u.jsx("div", { className: "header", children: s.header }),
8136
8219
  s.children,
8137
8220
  /* @__PURE__ */ u.jsx("div", { className: "footer", children: s.footer })
8138
8221
  ] });
8139
8222
  }
8140
- function Ao(s) {
8141
- return /* @__PURE__ */ u.jsx(po, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8223
+ function Lo(s) {
8224
+ return /* @__PURE__ */ u.jsx(go, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8142
8225
  /* @__PURE__ */ u.jsx(
8143
8226
  me,
8144
8227
  {
@@ -8149,56 +8232,59 @@ function Ao(s) {
8149
8232
  onSceneUpdate: s.onSceneUpdate
8150
8233
  }
8151
8234
  ),
8152
- /* @__PURE__ */ u.jsx(uo, { three: s.three })
8235
+ /* @__PURE__ */ u.jsx(fo, { three: s.three })
8153
8236
  ] }) });
8154
8237
  }
8155
8238
  export {
8156
- ai as Accordion,
8157
- Co as Application,
8158
- Hi as BaseRemote,
8239
+ ri as Accordion,
8240
+ Oo as Application,
8241
+ Bi as BaseRemote,
8159
8242
  _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,
8243
+ vs as ContainerObject,
8244
+ ir as Draggable,
8245
+ tr as DraggableItem,
8246
+ sr as Dropdown,
8247
+ nr as DropdownItem,
8248
+ go as Editor,
8249
+ Za as ElementProxyReceiver,
8166
8250
  ei as ExportTexture,
8167
- co as Inspector,
8251
+ po as Inspector,
8168
8252
  me as MultiView,
8169
8253
  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,
8254
+ xo as ProxyManager,
8255
+ Ba as QualityType,
8256
+ To as RemoteComponents,
8257
+ Ro as RemoteController,
8258
+ Po as RemoteTheatre,
8259
+ Do as RemoteThree,
8260
+ Io as SceneInspector,
8261
+ fo as SidePanel,
8262
+ Hs as Spline,
8263
+ oo as SplineEditor,
8264
+ Lo as ThreeEditor,
8180
8265
  P as ToolEvents,
8181
8266
  ge as Transform,
8182
- ni as capitalize,
8267
+ ai as capitalize,
8183
8268
  $e as clamp,
8184
- ls as colorToHex,
8185
- Ia as copyToClipboard,
8186
- wo as customizeTheatreElements,
8269
+ hs as colorToHex,
8270
+ ka as copyToClipboard,
8271
+ Ao as customizeTheatreElements,
8187
8272
  D as debugDispatcher,
8188
- _o as defaultTheatreCallback,
8189
- vo as detectSettings,
8273
+ bo as defaultTheatreCallback,
8274
+ Co as detectSettings,
8190
8275
  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,
8276
+ Va as disposeMaterial,
8277
+ So as disposeTexture,
8278
+ Eo as distance,
8279
+ ki as hierarchyUUID,
8280
+ ja as isColor,
8281
+ Ii as mix,
8282
+ ni as noop,
8283
+ ms as normalize,
8284
+ wo as parseModelLite,
8285
+ Ua as randomID,
8286
+ fs as resetThreeObjects,
8201
8287
  Ae as round,
8202
- So as theatreEditorApp,
8203
- Ii as totalThreeObjects
8288
+ Mo as theatreEditorApp,
8289
+ Li as totalThreeObjects
8204
8290
  };