@tomorrowevening/hermes 0.0.132 → 0.0.133

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,29 @@
1
- import { Texture as Ii, OrthographicCamera as Li, Scene as Xs, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, ObjectLoader as Xn, AnimationMixer as $n, AnimationClip as qn, EventDispatcher as Bi, RepeatWrapping as cs, Color as et, ColorManagement as mt, WebGLRenderTarget as Kn, FrontSide as Qn, BackSide as $s, DoubleSide as Vi, NoBlending as Jn, NormalBlending as ea, AdditiveBlending as ta, SubtractiveBlending as ia, MultiplyBlending as sa, CustomBlending as na, AddEquation as aa, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as la, MaxEquation as ca, ZeroFactor as qs, OneFactor as Ks, SrcColorFactor as Qs, OneMinusSrcColorFactor as Js, SrcAlphaFactor as en, OneMinusSrcAlphaFactor as tn, DstAlphaFactor as sn, OneMinusDstAlphaFactor as nn, DstColorFactor as an, OneMinusDstColorFactor as rn, SrcAlphaSaturateFactor as ha, ConstantColorFactor as on, OneMinusConstantColorFactor as ln, ConstantAlphaFactor as cn, OneMinusConstantAlphaFactor as hn, Line as Ie, LineBasicMaterial as Zi, Ray as da, Plane as ua, MathUtils as pa, Vector3 as P, Controls as dn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as ki, Vector2 as pe, ShaderMaterial as un, GLSL3 as ma, PlaneGeometry as pn, Raycaster as ni, Euler as mn, Matrix4 as ci, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Zt, SphereGeometry as fn, TorusGeometry as Et, CatmullRomCurve3 as hs, Group as fa, AxesHelper as ga, MeshDepthMaterial as _a, MeshNormalMaterial as va, WebGLRenderer as ya, PerspectiveCamera as ds, CameraHelper as ba, SkinnedMesh as Ea, SpotLightHelper as Ca, PointLightHelper as Sa, HemisphereLightHelper as wa, DirectionalLightHelper as xa, Clock as Oa, Vector4 as Ta, Box3 as Ma, Sphere as Pa, SkeletonHelper as Aa, SRGBColorSpace as us, NoToneMapping as ps, NoColorSpace as Da, LinearToneMapping as Ra, ReinhardToneMapping as Ia, CineonToneMapping as La, ACESFilmicToneMapping as ka, AgXToneMapping as Ua, NeutralToneMapping as ja, CustomToneMapping as Na } from "three";
2
- import gn, { useState as Z, useRef as J, useEffect as tt, useMemo as Ut, Component as Ft, createRef as Ve, forwardRef as Fa } from "react";
3
- import { Reorder as _n } from "framer-motion";
4
- const ai = () => {
5
- }, Ho = () => {
1
+ import { Texture as Li, OrthographicCamera as ki, Scene as Vi, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, ObjectLoader as Qn, AnimationMixer as Jn, AnimationClip as ea, EventDispatcher as Zi, Clock as qs, Group as ti, RepeatWrapping as ds, Color as et, ColorManagement as mt, WebGLRenderTarget as ta, FrontSide as ia, BackSide as Ks, DoubleSide as Wi, NoBlending as sa, NormalBlending as na, AdditiveBlending as aa, SubtractiveBlending as ra, MultiplyBlending as oa, CustomBlending as la, AddEquation as ca, SubtractEquation as ha, ReverseSubtractEquation as da, MinEquation as ua, MaxEquation as pa, ZeroFactor as Qs, OneFactor as Js, SrcColorFactor as en, OneMinusSrcColorFactor as tn, SrcAlphaFactor as sn, OneMinusSrcAlphaFactor as nn, DstAlphaFactor as an, OneMinusDstAlphaFactor as rn, DstColorFactor as on, OneMinusDstColorFactor as ln, SrcAlphaSaturateFactor as ma, ConstantColorFactor as cn, OneMinusConstantColorFactor as hn, ConstantAlphaFactor as dn, OneMinusConstantAlphaFactor as un, Line as Ie, LineBasicMaterial as Gi, Ray as fa, Plane as ga, MathUtils as _a, Vector3 as P, Controls as pn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as Ui, Vector2 as pe, ShaderMaterial as mn, GLSL3 as va, PlaneGeometry as fn, Raycaster as ai, Euler as gn, Matrix4 as hi, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Zt, SphereGeometry as _n, TorusGeometry as Et, CatmullRomCurve3 as us, AxesHelper as ya, MeshDepthMaterial as ba, MeshNormalMaterial as Ea, WebGLRenderer as Ca, PerspectiveCamera as ps, CameraHelper as wa, SkinnedMesh as Sa, SpotLightHelper as xa, PointLightHelper as Oa, HemisphereLightHelper as Ta, DirectionalLightHelper as Ma, Vector4 as Pa, Box3 as Aa, Sphere as Da, SkeletonHelper as Ra, SRGBColorSpace as ms, NoToneMapping as fs, NoColorSpace as Ia, LinearToneMapping as La, ReinhardToneMapping as ka, CineonToneMapping as Ua, ACESFilmicToneMapping as ja, AgXToneMapping as Na, NeutralToneMapping as Fa, CustomToneMapping as za } from "three";
2
+ import vn, { useState as B, useRef as J, useEffect as tt, useMemo as Ut, Component as Ft, createRef as Ve, forwardRef as Ha } from "react";
3
+ const ri = () => {
4
+ }, Fo = () => {
6
5
  };
7
- function ri(i) {
6
+ function oi(i) {
8
7
  return i.substring(0, 1).toUpperCase() + i.substring(1);
9
8
  }
10
- function za(i) {
9
+ function Ya(i) {
11
10
  const e = JSON.stringify(i);
12
11
  return navigator.clipboard.writeText(e), e;
13
12
  }
14
- function Ha() {
13
+ function Ba() {
15
14
  return Math.round(Math.random() * 1e6).toString();
16
15
  }
17
- function Ya(i) {
16
+ function Va(i) {
18
17
  return i.r !== void 0 && i.g !== void 0 && i.b !== void 0;
19
18
  }
20
- function ms(i) {
19
+ function gs(i) {
21
20
  const e = Math.round(i.r * 255), t = Math.round(i.g * 255), s = Math.round(i.b * 255), n = (c) => {
22
21
  const l = c.toString(16);
23
22
  return l.length === 1 ? "0" + l : l;
24
23
  }, a = n(e), r = n(t), o = n(s);
25
24
  return "#" + a + r + o;
26
25
  }
27
- function vi(i, e, t, s) {
26
+ function yi(i, e, t, s) {
28
27
  return new (t || (t = Promise))(function(n, a) {
29
28
  function r(l) {
30
29
  try {
@@ -49,17 +48,17 @@ function vi(i, e, t, s) {
49
48
  c((s = s.apply(i, e || [])).next());
50
49
  });
51
50
  }
52
- const Ba = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
53
- function fs(i) {
51
+ const Za = ["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"];
52
+ function _s(i) {
54
53
  return i = i.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
54
  }
56
- const vn = typeof window > "u", Le = (() => {
57
- if (vn)
55
+ const yn = typeof window > "u", Le = (() => {
56
+ if (yn)
58
57
  return;
59
58
  const { userAgent: i, platform: e, maxTouchPoints: t } = window.navigator, s = /(iphone|ipod|ipad)/i.test(i), n = e === "iPad" || e === "MacIntel" && t > 0 && !window.MSStream;
60
59
  return { isIpad: n, isMobile: /android/i.test(i) || s || n, isSafari12: /Version\/12.+Safari/.test(i), isFirefox: /Firefox/.test(i) };
61
60
  })();
62
- function Va(i, e, t) {
61
+ function Wa(i, e, t) {
63
62
  if (!t)
64
63
  return [e];
65
64
  const s = function(l) {
@@ -80,27 +79,27 @@ function Va(i, e, t) {
80
79
  enc -= enc.yzww * vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);
81
80
  gl_FragColor = enc;
82
81
  }
83
- `, m = l.createShader(35633), f = l.createShader(35632), w = l.createProgram();
84
- if (!(f && m && w))
82
+ `, m = l.createShader(35633), f = l.createShader(35632), E = l.createProgram();
83
+ if (!(f && m && E))
85
84
  return;
86
- l.shaderSource(m, d), l.shaderSource(f, p), l.compileShader(m), l.compileShader(f), l.attachShader(w, m), l.attachShader(w, f), l.linkProgram(w), l.detachShader(w, m), l.detachShader(w, f), l.deleteShader(m), l.deleteShader(f), l.useProgram(w);
85
+ l.shaderSource(m, d), l.shaderSource(f, p), l.compileShader(m), l.compileShader(f), l.attachShader(E, m), l.attachShader(E, f), l.linkProgram(E), l.detachShader(E, m), l.detachShader(E, f), l.deleteShader(m), l.deleteShader(f), l.useProgram(E);
87
86
  const v = l.createBuffer();
88
87
  l.bindBuffer(34962, v), l.bufferData(34962, new Float32Array([-1, -1, 0, 3, -1, 0, -1, 3, 0]), 35044);
89
- const x = l.getAttribLocation(w, "aPosition");
88
+ const x = l.getAttribLocation(E, "aPosition");
90
89
  l.vertexAttribPointer(x, 3, 5126, !1, 0, 0), l.enableVertexAttribArray(x), l.clearColor(1, 1, 1, 1), l.clear(16384), l.viewport(0, 0, 1, 1), l.drawArrays(4, 0, 3);
91
90
  const g = new Uint8Array(4);
92
- return l.readPixels(0, 0, 1, 1, 6408, 5121, g), l.deleteProgram(w), l.deleteBuffer(v), g.join("");
91
+ return l.readPixels(0, 0, 1, 1, 6408, 5121, g), l.deleteProgram(E), l.deleteBuffer(v), g.join("");
93
92
  }(i), n = "801621810", a = "8016218135", r = "80162181161", o = Le?.isIpad ? [["a7", r, 12], ["a8", a, 15], ["a8x", a, 15], ["a9", a, 15], ["a9x", a, 15], ["a10", a, 15], ["a10x", a, 15], ["a12", n, 15], ["a12x", n, 15], ["a12z", n, 15], ["a14", n, 15], ["a15", n, 15], ["m1", n, 15], ["m2", n, 15]] : [["a7", r, 12], ["a8", a, 12], ["a9", a, 15], ["a10", a, 15], ["a11", n, 15], ["a12", n, 15], ["a13", n, 15], ["a14", n, 15], ["a15", n, 15], ["a16", n, 15], ["a17", n, 15]];
94
93
  let c;
95
94
  return s === "80162181255" ? c = o.filter(([, , l]) => l >= 14) : (c = o.filter(([, l]) => l === s), c.length || (c = o)), c.map(([l]) => `apple ${l} gpu`);
96
95
  }
97
- class gs extends Error {
96
+ class vs extends Error {
98
97
  constructor(e) {
99
98
  super(e), Object.setPrototypeOf(this, new.target.prototype);
100
99
  }
101
100
  }
102
- const yi = [], _s = [];
103
- function Za(i, e) {
101
+ const bi = [], ys = [];
102
+ function Ga(i, e) {
104
103
  if (i === e)
105
104
  return 0;
106
105
  const t = i;
@@ -115,49 +114,49 @@ function Za(i, e) {
115
114
  return n;
116
115
  let o, c, l = 0, d = 0, p = 0;
117
116
  for (; d < s; )
118
- _s[d] = i.charCodeAt(r + d), yi[d] = ++d;
117
+ ys[d] = i.charCodeAt(r + d), bi[d] = ++d;
119
118
  for (; p < n; )
120
119
  for (a = e.charCodeAt(r + p), o = p++, l = p, d = 0; d < s; d++)
121
- c = a === _s[d] ? o : o + 1, o = yi[d], l = yi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
120
+ c = a === ys[d] ? o : o + 1, o = bi[d], l = bi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
122
121
  return l;
123
122
  }
124
- function Wa(i) {
123
+ function Xa(i) {
125
124
  return i != null;
126
125
  }
127
- const Ga = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: s, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: a = "https://unpkg.com/detect-gpu@5.0.57/dist/benchmarks" } = {}) => vi(void 0, void 0, void 0, function* () {
126
+ const $a = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: s, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: a = "https://unpkg.com/detect-gpu@5.0.57/dist/benchmarks" } = {}) => yi(void 0, void 0, void 0, function* () {
128
127
  const r = {};
129
- if (vn)
128
+ if (yn)
130
129
  return { tier: 0, type: "SSR" };
131
- const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (S) => vi(void 0, void 0, void 0, function* () {
130
+ const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (S) => yi(void 0, void 0, void 0, function* () {
132
131
  const O = yield fetch(`${a}/${S}`).then((I) => I.json());
133
132
  if (parseInt(O.shift().split(".")[0], 10) < 4)
134
- throw new gs("Detect GPU benchmark data is out of date. Please update to version 4x");
133
+ throw new vs("Detect GPU benchmark data is out of date. Please update to version 4x");
135
134
  return O;
136
135
  }) } = t;
137
136
  let { renderer: p } = t;
138
137
  const m = (S, O, I, U, R) => ({ device: R, fps: U, gpu: I, isMobile: c, tier: S, type: O });
139
- let f, w = "";
138
+ let f, E = "";
140
139
  if (p)
141
- p = fs(p), f = [p];
140
+ p = _s(p), f = [p];
142
141
  else {
143
142
  const S = s || function(I, U = !1) {
144
143
  const R = { alpha: !1, antialias: !1, depth: !1, failIfMajorPerformanceCaveat: U, powerPreference: "high-performance", stencil: !1 };
145
144
  I && delete R.powerPreference;
146
- const B = window.document.createElement("canvas"), Se = B.getContext("webgl", R) || B.getContext("experimental-webgl", R);
147
- return Se ?? void 0;
145
+ const V = window.document.createElement("canvas"), we = V.getContext("webgl", R) || V.getContext("experimental-webgl", R);
146
+ return we ?? void 0;
148
147
  }(Le?.isSafari12, n);
149
148
  if (!S)
150
149
  return m(0, "WEBGL_UNSUPPORTED");
151
150
  const O = Le?.isFirefox ? null : S.getExtension("WEBGL_debug_renderer_info");
152
151
  if (p = O ? S.getParameter(O.UNMASKED_RENDERER_WEBGL) : S.getParameter(S.RENDERER), !p)
153
152
  return m(1, "FALLBACK");
154
- w = p, p = fs(p), f = function(I, U, R) {
155
- return U === "apple gpu" ? Va(I, U, R) : [U];
153
+ E = p, p = _s(p), f = function(I, U, R) {
154
+ return U === "apple gpu" ? Wa(I, U, R) : [U];
156
155
  }(S, p, c);
157
156
  }
158
157
  const v = (yield Promise.all(f.map(function(S) {
159
158
  var O;
160
- return vi(this, void 0, void 0, function* () {
159
+ return yi(this, void 0, void 0, function* () {
161
160
  const I = ((W) => {
162
161
  const le = c ? ["adreno", "apple", "mali-t", "mali", "nvidia", "powervr", "samsung"] : ["intel", "apple", "amd", "radeon", "nvidia", "geforce", "adreno"];
163
162
  for (const Te of le)
@@ -167,26 +166,26 @@ const Ga = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
167
166
  if (!I)
168
167
  return;
169
168
  const U = `${c ? "m" : "d"}-${I}${o ? "-ipad" : ""}.json`, R = r[U] = (O = r[U]) !== null && O !== void 0 ? O : d(U);
170
- let B;
169
+ let V;
171
170
  try {
172
- B = yield R;
171
+ V = yield R;
173
172
  } catch (W) {
174
- if (W instanceof gs)
173
+ if (W instanceof vs)
175
174
  throw W;
176
175
  return;
177
176
  }
178
- const Se = function(W) {
177
+ const we = function(W) {
179
178
  var le;
180
179
  const Te = (W = W.replace(/\([^)]+\)/, "")).match(/\d+/) || W.match(/(\W|^)([A-Za-z]{1,3})(\W|$)/g);
181
180
  return (le = Te?.join("").replace(/\W|amd/g, "")) !== null && le !== void 0 ? le : "";
182
181
  }(S);
183
- let _e = B.filter(([, W]) => W === Se);
184
- _e.length || (_e = B.filter(([W]) => W.includes(S)));
182
+ let _e = V.filter(([, W]) => W === we);
183
+ _e.length || (_e = V.filter(([W]) => W.includes(S)));
185
184
  const re = _e.length;
186
185
  if (re === 0)
187
186
  return;
188
187
  const K = S.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, Za(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ee = Number.MAX_VALUE;
188
+ let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, Ga(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ee = Number.MAX_VALUE;
190
189
  const { devicePixelRatio: ne } = window, je = l.width * ne * l.height * ne;
191
190
  for (const W of he) {
192
191
  const [le, Te] = W, yt = le * Te, it = Math.abs(je - yt);
@@ -197,24 +196,24 @@ const Ga = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
197
196
  const [, , Ne, Fe] = $;
198
197
  return [Ee, Ne, Ue, Fe];
199
198
  });
200
- }))).filter(Wa).sort(([S = Number.MAX_VALUE, O], [I = Number.MAX_VALUE, U]) => S === I ? O - U : S - I);
199
+ }))).filter(Xa).sort(([S = Number.MAX_VALUE, O], [I = Number.MAX_VALUE, U]) => S === I ? O - U : S - I);
201
200
  if (!v.length) {
202
- const S = Ba.find((O) => p.includes(O));
203
- return S ? m(0, "BLOCKLISTED", S) : m(1, "FALLBACK", `${p} (${w})`);
201
+ const S = Za.find((O) => p.includes(O));
202
+ return S ? m(0, "BLOCKLISTED", S) : m(1, "FALLBACK", `${p} (${E})`);
204
203
  }
205
204
  const [, x, g, y] = v[0];
206
205
  if (x === -1)
207
206
  return m(0, "BLOCKLISTED", g, x, y);
208
- const E = c ? i : e;
209
- let C = 0;
210
- for (let S = 0; S < E.length; S++)
211
- x >= E[S] && (C = S);
212
- return m(C, "BENCHMARK", g, x, y);
207
+ const C = c ? i : e;
208
+ let w = 0;
209
+ for (let S = 0; S < C.length; S++)
210
+ x >= C[S] && (w = S);
211
+ return m(w, "BENCHMARK", g, x, y);
213
212
  });
214
- var Xa = /* @__PURE__ */ ((i) => (i[i.High = 0] = "High", i[i.Medium = 1] = "Medium", i[i.Low = 2] = "Low", i))(Xa || {});
215
- function Yo(i) {
213
+ var qa = /* @__PURE__ */ ((i) => (i[i.High = 0] = "High", i[i.Medium = 1] = "Medium", i[i.Low = 2] = "Low", i))(qa || {});
214
+ function zo(i) {
216
215
  return new Promise((e) => {
217
- Ga().then((t) => {
216
+ $a().then((t) => {
218
217
  let s = !1;
219
218
  const n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
220
219
  if (s = "transferControlToOffscreen" in i, n) {
@@ -238,73 +237,73 @@ function Yo(i) {
238
237
  function $e(i, e, t) {
239
238
  return Math.min(e, Math.max(i, t));
240
239
  }
241
- function Ui(i, e, t) {
240
+ function ji(i, e, t) {
242
241
  return (t - i) / (e - i);
243
242
  }
244
243
  function Nt(i, e, t) {
245
244
  return i * (1 - t) + e * t;
246
245
  }
247
- function Bo(i, e, t, s, n) {
248
- return Nt(t, s, Ui(i, e, n));
246
+ function Ho(i, e, t, s, n) {
247
+ return Nt(t, s, ji(i, e, n));
249
248
  }
250
- function Vo(i, e) {
249
+ function Yo(i, e) {
251
250
  const t = i - e;
252
251
  return Math.sqrt(t * t);
253
252
  }
254
253
  function Pe(i, e = 1) {
255
254
  return Number(i.toFixed(e));
256
255
  }
257
- function Zo(i, e, t, s) {
256
+ function Bo(i, e, t, s) {
258
257
  return Nt(i, e, 1 - Math.exp(-t * s));
259
258
  }
260
- function Wo(i, e = 1) {
259
+ function Vo(i, e = 1) {
261
260
  return Number(i.toFixed(e));
262
261
  }
263
- function $a(i, e, t, s) {
262
+ function Ka(i, e, t, s) {
264
263
  return i === e && t === s;
265
264
  }
266
- function qa(i, e, t, s) {
265
+ function Qa(i, e, t, s) {
267
266
  return 1 / (3 * e * i * i + 2 * t * i + s);
268
267
  }
269
- function Ka(i, e, t, s, n) {
268
+ function Ja(i, e, t, s, n) {
270
269
  return e * (i * i * i) + t * (i * i) + s * i + n;
271
270
  }
272
- function Qa(i, e, t, s, n) {
271
+ function er(i, e, t, s, n) {
273
272
  const a = i * i;
274
273
  return e * (a * i) + t * a + s * i + n;
275
274
  }
276
- function Go(i, e, t, s, n) {
275
+ function Zo(i, e, t, s, n) {
277
276
  if (i <= 0)
278
277
  return 0;
279
278
  if (i >= 1)
280
279
  return 1;
281
- if ($a(e, t, s, n))
280
+ if (Ka(e, t, s, n))
282
281
  return i;
283
- const a = 0, r = 0, o = e, c = t, l = s, d = n, p = 1, m = 1, f = p - 3 * l + 3 * o - a, w = 3 * l - 6 * o + 3 * a, v = 3 * o - 3 * a, x = a, g = m - 3 * d + 3 * c - r, y = 3 * d - 6 * c + 3 * r, E = 3 * c - 3 * r, C = r;
282
+ const a = 0, r = 0, o = e, c = t, l = s, d = n, p = 1, m = 1, f = p - 3 * l + 3 * o - a, E = 3 * l - 6 * o + 3 * a, v = 3 * o - 3 * a, x = a, g = m - 3 * d + 3 * c - r, y = 3 * d - 6 * c + 3 * r, C = 3 * c - 3 * r, w = r;
284
283
  let S = i;
285
284
  for (let O = 0; O < 5; O++) {
286
- const I = Ka(S, f, w, v, x);
287
- let U = qa(S, f, w, v);
285
+ const I = Ja(S, f, E, v, x);
286
+ let U = Qa(S, f, E, v);
288
287
  U === 1 / 0 && (U = i), S -= (I - i) * U, S = Math.min(Math.max(S, 0), 1);
289
288
  }
290
- return Qa(S, g, y, E, C);
289
+ return er(S, g, y, C, w);
291
290
  }
292
- const vs = (i) => {
291
+ const bs = (i) => {
293
292
  i?.dispose();
294
- }, Ja = (i) => {
293
+ }, bn = (i) => {
295
294
  if (i)
296
295
  if (Array.isArray(i))
297
- i.forEach((e) => e.dispose());
296
+ i.forEach((e) => bn(e));
298
297
  else {
299
298
  for (const e in i) {
300
299
  const t = i[e];
301
- t !== null && t instanceof Ii && vs(t);
300
+ t !== null && t instanceof Li && bs(t);
302
301
  }
303
302
  if (i.isShaderMaterial === !0) {
304
303
  const e = i;
305
304
  for (const t in e.uniforms) {
306
305
  const s = e.uniforms[t];
307
- s.value !== null && s.value instanceof Ii && vs(s.value);
306
+ s.value !== null && s.value instanceof Li && bs(s.value);
308
307
  }
309
308
  }
310
309
  i.dispose();
@@ -317,19 +316,19 @@ const vs = (i) => {
317
316
  }
318
317
  if (i.parent && i.parent.remove(i), i.isMesh) {
319
318
  const e = i;
320
- e.geometry?.dispose(), Ja(e.material);
319
+ e.geometry?.dispose(), bn(e.material);
321
320
  }
322
321
  i.dispose !== void 0 && i.dispose();
323
322
  }
324
323
  };
325
- let ji = 0;
326
- const ys = () => {
327
- ji = 0;
328
- }, Ni = (i) => {
324
+ let Ni = 0;
325
+ const Es = () => {
326
+ Ni = 0;
327
+ }, Fi = (i) => {
329
328
  if (!i)
330
329
  return;
331
330
  let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
332
- if (e.length === 0 && (e = `obj_${ji}`, ji++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
331
+ if (e.length === 0 && (e = `obj_${Ni}`, Ni++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
333
332
  const t = i;
334
333
  if (Array.isArray(t.material))
335
334
  t.material.forEach((s, n) => {
@@ -340,9 +339,9 @@ const ys = () => {
340
339
  s.uuid = `${e}.material`;
341
340
  }
342
341
  }
343
- i.children.forEach((t) => Ni(t));
342
+ i.children.forEach((t) => Fi(t));
344
343
  };
345
- class ti {
344
+ class ii {
346
345
  static renderer;
347
346
  static canvas;
348
347
  static context = null;
@@ -371,7 +370,7 @@ class ti {
371
370
  }
372
371
  static renderToCanvas(e) {
373
372
  if (this.material === null) {
374
- this.camera = new Li(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Xs(), this.material = new Je();
373
+ this.camera = new ki(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Vi(), this.material = new Je();
375
374
  const t = new _t();
376
375
  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));
377
376
  const s = new M(t, this.material);
@@ -386,13 +385,13 @@ class ti {
386
385
  return this.renderer.domElement;
387
386
  }
388
387
  }
389
- function Xo(i) {
388
+ function Wo(i) {
390
389
  return new Promise((e) => {
391
- const t = new Xn();
390
+ const t = new Qn();
392
391
  t.parseAsync(i.scene).then((s) => {
393
- const n = new $n(s);
392
+ const n = new Jn(s);
394
393
  if (i.animations.length > 0) {
395
- const r = i.animations.map((c) => qn.parse(c));
394
+ const r = i.animations.map((c) => ea.parse(c));
396
395
  n.clipAction(r[0]).play(), n.getRoot().animations = i.animations, n.getRoot().mixer = n;
397
396
  }
398
397
  const a = [];
@@ -408,7 +407,7 @@ function Xo(i) {
408
407
  });
409
408
  });
410
409
  }
411
- const at = Wi([
410
+ const at = Xi([
412
411
  "ctrlKey",
413
412
  "metaKey",
414
413
  "shiftKey",
@@ -419,35 +418,35 @@ const at = Wi([
419
418
  "clientY",
420
419
  "pageX",
421
420
  "pageY"
422
- ]), er = Wi([
421
+ ]), tr = Xi([
423
422
  "clientX",
424
423
  "clientY",
425
424
  "deltaX",
426
425
  "deltaY",
427
426
  "deltaMode"
428
- ]), tr = Wi([
427
+ ]), ir = Xi([
429
428
  "ctrlKey",
430
429
  "metaKey",
431
430
  "shiftKey",
432
431
  "keyCode"
433
432
  ]);
434
- function ir(i, e) {
435
- i.preventDefault(), er(i, e);
433
+ function sr(i, e) {
434
+ i.preventDefault(), tr(i, e);
436
435
  }
437
- function sr(i) {
436
+ function nr(i) {
438
437
  i.preventDefault();
439
438
  }
440
- function nr(i, e, t) {
439
+ function ar(i, e, t) {
441
440
  for (const s of e)
442
441
  t[s] = i[s];
443
442
  }
444
- function Wi(i) {
443
+ function Xi(i) {
445
444
  return function(t, s) {
446
445
  const n = { type: t.type };
447
- nr(t, i, n), s(n);
446
+ ar(t, i, n), s(n);
448
447
  };
449
448
  }
450
- function bi(i, e) {
449
+ function Ei(i, e) {
451
450
  const t = [], s = { type: i.type, touches: t };
452
451
  for (let n = 0; n < i.touches.length; ++n) {
453
452
  const a = i.touches[n];
@@ -458,7 +457,7 @@ function bi(i, e) {
458
457
  }
459
458
  e(s);
460
459
  }
461
- const ar = {
460
+ const rr = {
462
461
  37: !0,
463
462
  // left
464
463
  38: !0,
@@ -468,30 +467,30 @@ const ar = {
468
467
  40: !0
469
468
  // down
470
469
  };
471
- function rr(i, e) {
470
+ function or(i, e) {
472
471
  const { keyCode: t } = i;
473
- ar[t] && (i.preventDefault(), tr(i, e));
472
+ rr[t] && (i.preventDefault(), ir(i, e));
474
473
  }
475
- const $o = {
476
- contextmenu: sr,
474
+ const Go = {
475
+ contextmenu: nr,
477
476
  mousedown: at,
478
477
  mousemove: at,
479
478
  mouseup: at,
480
479
  pointerdown: at,
481
480
  pointermove: at,
482
481
  pointerup: at,
483
- touchstart: bi,
484
- touchmove: bi,
485
- touchend: bi,
486
- wheel: ir,
487
- keydown: rr
482
+ touchstart: Ei,
483
+ touchmove: Ei,
484
+ touchend: Ei,
485
+ wheel: sr,
486
+ keydown: or
488
487
  };
489
- let or = 0;
490
- class qo {
488
+ let lr = 0;
489
+ class Xo {
491
490
  id;
492
491
  worker;
493
492
  constructor(e, t, s) {
494
- this.id = or++, this.worker = t;
493
+ this.id = lr++, this.worker = t;
495
494
  const n = (r) => {
496
495
  this.worker.postMessage({
497
496
  type: "event",
@@ -519,7 +518,7 @@ class qo {
519
518
  window.addEventListener("resize", a), a();
520
519
  }
521
520
  }
522
- class lr extends Bi {
521
+ class cr extends Zi {
523
522
  style = {};
524
523
  left = 0;
525
524
  top = 0;
@@ -565,7 +564,7 @@ class lr extends Bi {
565
564
  this.left = e.left, this.top = e.top, this.width = e.width, this.height = e.height;
566
565
  return;
567
566
  }
568
- e.preventDefault = ai, e.stopPropagation = ai, this.dispatchEvent(e);
567
+ e.preventDefault = ri, e.stopPropagation = ri, this.dispatchEvent(e);
569
568
  }
570
569
  focus() {
571
570
  }
@@ -573,13 +572,13 @@ class lr extends Bi {
573
572
  return this;
574
573
  }
575
574
  }
576
- class Ko {
575
+ class $o {
577
576
  targets = {};
578
577
  constructor() {
579
578
  this.handleEvent = this.handleEvent.bind(this);
580
579
  }
581
580
  makeProxy(e) {
582
- const { id: t } = e, s = new lr();
581
+ const { id: t } = e, s = new cr();
583
582
  this.targets[t] = s;
584
583
  }
585
584
  getProxy(e) {
@@ -589,7 +588,7 @@ class Ko {
589
588
  this.targets[e.id]?.handleEvent(e.data);
590
589
  }
591
590
  }
592
- class Qo {
591
+ class qo {
593
592
  components = /* @__PURE__ */ new Map();
594
593
  listen;
595
594
  // Protected
@@ -647,9 +646,116 @@ class Qo {
647
646
  e && (this._mode = "editor");
648
647
  }
649
648
  }
649
+ class Ko {
650
+ canvas;
651
+ inputElement;
652
+ settings;
653
+ playing = !1;
654
+ rafID = -1;
655
+ constructor(e, t, s) {
656
+ this.canvas = e, this.inputElement = t, this.settings = s;
657
+ }
658
+ dispose() {
659
+ this.stop();
660
+ }
661
+ play() {
662
+ this.playing || (this.playing = !0, this.onUpdate());
663
+ }
664
+ stop() {
665
+ this.playing && (this.playing = !1, cancelAnimationFrame(this.rafID), this.rafID = -1);
666
+ }
667
+ update() {
668
+ }
669
+ draw() {
670
+ }
671
+ resize(e, t) {
672
+ this.settings.supportOffScreenCanvas && (this.inputElement.clientWidth = e, this.inputElement.clientHeight = t, this.inputElement.width = e, this.inputElement.height = t);
673
+ }
674
+ // Events
675
+ onResize = (e) => {
676
+ this.resize(e.width, e.height);
677
+ };
678
+ onUpdate = () => {
679
+ this.update(), this.draw(), this.rafID = requestAnimationFrame(this.onUpdate);
680
+ };
681
+ }
682
+ class Qo extends Vi {
683
+ clock;
684
+ cameras;
685
+ lights;
686
+ world;
687
+ constructor(e) {
688
+ super(), this.name = e, this.clock = new qs(), this.lights = new ti(), this.lights.name = "lights", this.add(this.lights), this.cameras = new ti(), this.cameras.name = "cameras", this.add(this.cameras), this.world = new ti(), this.world.name = "world", this.add(this.world);
689
+ }
690
+ init() {
691
+ return new Promise((e) => {
692
+ this.setupLights().then(() => this.setupCameras()).then(() => this.setupWorld()).then(() => this.setupPost()).then(() => this.setupAnimation()).then(() => this.setupDebug()).then(() => e());
693
+ });
694
+ }
695
+ setupLights() {
696
+ return new Promise((e) => {
697
+ e();
698
+ });
699
+ }
700
+ setupCameras() {
701
+ return new Promise((e) => {
702
+ e();
703
+ });
704
+ }
705
+ setupWorld() {
706
+ return new Promise((e) => {
707
+ e();
708
+ });
709
+ }
710
+ setupPost() {
711
+ return new Promise((e) => {
712
+ e();
713
+ });
714
+ }
715
+ setupAnimation() {
716
+ return new Promise((e) => {
717
+ e();
718
+ });
719
+ }
720
+ setupDebug() {
721
+ return new Promise((e) => {
722
+ e();
723
+ });
724
+ }
725
+ dispose() {
726
+ }
727
+ update() {
728
+ }
729
+ draw(e) {
730
+ }
731
+ postDraw() {
732
+ }
733
+ resize(e, t, s) {
734
+ }
735
+ show() {
736
+ this.clock.start(), this.showComplete();
737
+ }
738
+ showComplete() {
739
+ this.enable();
740
+ }
741
+ hide() {
742
+ this.disable(), this.hideComplete();
743
+ }
744
+ hideComplete() {
745
+ this.clock.stop();
746
+ }
747
+ enable() {
748
+ }
749
+ disable() {
750
+ }
751
+ // Getters
752
+ get deltaTime() {
753
+ return Math.min(this.clock.getDelta(), 1 / 30);
754
+ }
755
+ }
650
756
  var A = /* @__PURE__ */ ((i) => (i.CUSTOM = "ToolEvents::custom", i.SELECT_DROPDOWN = "ToolEvents::selectDropdown", i.DRAG_UPDATE = "ToolEvents::dragUpdate", i.ADD_SCENE = "ToolEvents::addScene", i.REFRESH_SCENE = "ToolEvents::refreshScene", i.REMOVE_SCENE = "ToolEvents::removeScene", i.SET_SCENE = "ToolEvents::setScene", i.GET_OBJECT = "ToolEvents::getObject", i.SET_OBJECT = "ToolEvents::setObject", i.UPDATE_OBJECT = "ToolEvents::updateObject", i.CREATE_TEXTURE = "ToolEvents::createTexture", i.REQUEST_METHOD = "ToolEvents::requestMethod", i.ADD_CAMERA = "ToolEvents::addCamera", i.REMOVE_CAMERA = "ToolEvents::removeCamera", i.ADD_GROUP = "ToolEvents::addGroup", i.REMOVE_GROUP = "ToolEvents::removeGroup", i.ADD_SPLINE = "ToolEvents::addSpline", i.ADD_RENDERER = "ToolEvents::addRenderer", i.UPDATE_RENDERER = "ToolEvents::updateRenderer", i))(A || {});
651
- const D = new Bi();
652
- class Gi {
757
+ const D = new Zi();
758
+ class $i {
653
759
  app;
654
760
  constructor(e) {
655
761
  this.app = e;
@@ -661,7 +767,7 @@ class Gi {
661
767
  handleEditor(e, t, s) {
662
768
  }
663
769
  }
664
- class Jo extends Gi {
770
+ class Jo extends $i {
665
771
  selectDropdown(e, t) {
666
772
  this.app.send({
667
773
  event: "selectComponent",
@@ -762,15 +868,15 @@ function tl() {
762
868
  }
763
869
  }, 1e3);
764
870
  }
765
- function cr(i, e, t, s, n) {
871
+ function hr(i, e, t, s, n) {
766
872
  const a = 1 - i;
767
873
  return a * a * a * e + 3 * a * a * i * t + 3 * a * i * i * s + i * i * i * n;
768
874
  }
769
- function hr(i, e, t) {
875
+ function dr(i, e, t) {
770
876
  if (i.type !== "bezier" || i.handles.length !== 4)
771
877
  throw new Error("Invalid keyframe data for Bézier interpolation.");
772
878
  const [s, n] = i.handles, a = (t - i.position) / (e.position - i.position);
773
- return cr(
879
+ return hr(
774
880
  a,
775
881
  i.value,
776
882
  i.value + s,
@@ -778,7 +884,7 @@ function hr(i, e, t) {
778
884
  e.value
779
885
  );
780
886
  }
781
- class il extends Gi {
887
+ class il extends $i {
782
888
  project;
783
889
  sheets = /* @__PURE__ */ new Map();
784
890
  sheetObjects = /* @__PURE__ */ new Map();
@@ -840,12 +946,12 @@ class il extends Gi {
840
946
  return;
841
947
  const c = `${this.getSheetInstance(e, a)}_${t}`;
842
948
  let l = this.sheetObjects.get(c), d = s;
843
- l !== void 0 && (d = { ...s, ...l.value }), l = r.object(t, d), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n : ai);
949
+ l !== void 0 && (d = { ...s, ...l.value }), l = r.object(t, d), this.sheetObjects.set(c, l), this.sheetObjectCBs.set(c, n !== void 0 ? n : ri);
844
950
  const p = l.onValuesChange((m) => {
845
951
  if (this.app.editor) {
846
- for (const w in m) {
847
- const v = m[w];
848
- typeof v == "object" && Ya(v) && (m[w] = {
952
+ for (const E in m) {
953
+ const v = m[E];
954
+ typeof v == "object" && Va(v) && (m[E] = {
849
955
  r: v.r,
850
956
  g: v.g,
851
957
  b: v.b,
@@ -883,14 +989,14 @@ class il extends Gi {
883
989
  return [];
884
990
  const r = [], o = s.sequence.__experimental_getKeyframes(a.props.x), c = s.sequence.__experimental_getKeyframes(a.props.y), l = s.sequence.__experimental_getKeyframes(a.props.z), d = /* @__PURE__ */ new Set();
885
991
  return o.forEach((m) => d.add(m.position)), c.forEach((m) => d.add(m.position)), l.forEach((m) => d.add(m.position)), Array.from(d).sort((m, f) => m - f).forEach((m) => {
886
- const f = (w, v) => {
887
- const x = w.find((E, C) => E.position <= v && (w[C + 1]?.position || 1 / 0) > v), g = w.find((E) => E.position > v);
992
+ const f = (E, v) => {
993
+ const x = E.find((C, w) => C.position <= v && (E[w + 1]?.position || 1 / 0) > v), g = E.find((C) => C.position > v);
888
994
  if (!x)
889
995
  return g?.value || 0;
890
996
  if (!g || x.position === v)
891
997
  return x.value;
892
998
  if (x.type === "bezier")
893
- return hr(x, g, v);
999
+ return dr(x, g, v);
894
1000
  const y = (v - x.position) / (g.position - x.position);
895
1001
  return x.value + y * (g.value - x.value);
896
1002
  };
@@ -987,7 +1093,7 @@ class il extends Gi {
987
1093
  this.studio?.ui.hide();
988
1094
  }
989
1095
  }
990
- function dr(i) {
1096
+ function ur(i) {
991
1097
  if (i.name === "cameras")
992
1098
  return "camera";
993
1099
  if (i.name === "interactive")
@@ -1012,7 +1118,7 @@ function pt(i) {
1012
1118
  e.children.push(pt(t));
1013
1119
  }), e;
1014
1120
  }
1015
- function ur(i) {
1121
+ function pr(i) {
1016
1122
  const e = {};
1017
1123
  for (const t in i) {
1018
1124
  const s = i[t].value;
@@ -1028,7 +1134,7 @@ function ur(i) {
1028
1134
  }
1029
1135
  return e;
1030
1136
  }
1031
- function pr(i) {
1137
+ function mr(i) {
1032
1138
  switch (i) {
1033
1139
  case "blendSrcAlpha":
1034
1140
  case "blendDstAlpha":
@@ -1043,7 +1149,7 @@ function pr(i) {
1043
1149
  function rt(i) {
1044
1150
  const e = {};
1045
1151
  for (const t in i) {
1046
- if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || pr(t))
1152
+ if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || mr(t))
1047
1153
  continue;
1048
1154
  const s = typeof i[t], n = i[t];
1049
1155
  switch (s) {
@@ -1054,10 +1160,10 @@ function rt(i) {
1054
1160
  break;
1055
1161
  case "object":
1056
1162
  n !== null ? (e[t] = n, n.isTexture ? e[t] = {
1057
- src: ti.renderToBlob(n),
1163
+ src: ii.renderToBlob(n),
1058
1164
  offset: [n.offset.x, n.offset.y],
1059
1165
  repeat: [n.repeat.x, n.repeat.y]
1060
- } : t === "uniforms" && (e[t] = ur(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
1166
+ } : t === "uniforms" && (e[t] = pr(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
1061
1167
  src: "",
1062
1168
  offset: [0, 0],
1063
1169
  repeat: [1, 1]
@@ -1067,7 +1173,7 @@ function rt(i) {
1067
1173
  }
1068
1174
  return i.anisotropy !== void 0 && (e.anisotropy = i.anisotropy), i.clearcoat !== void 0 && (e.clearcoat = i.clearcoat), i.iridescence !== void 0 && (e.iridescence = i.iridescence), i.dispersion !== void 0 && (e.dispersion = i.dispersion), i.sheen !== void 0 && (e.sheen = i.sheen), i.transmission !== void 0 && (e.transmission = i.transmission), i.transmission !== void 0 && (e.transmission = i.transmission), e;
1069
1175
  }
1070
- function Ei(i) {
1176
+ function Ci(i) {
1071
1177
  i.updateMatrix();
1072
1178
  const e = {
1073
1179
  name: i.name,
@@ -1148,7 +1254,7 @@ function Ei(i) {
1148
1254
  });
1149
1255
  return e;
1150
1256
  }
1151
- function mr(i, e) {
1257
+ function fr(i, e) {
1152
1258
  const t = e.split(".");
1153
1259
  switch (t.length) {
1154
1260
  case 1:
@@ -1165,7 +1271,7 @@ function mr(i, e) {
1165
1271
  return i[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
1166
1272
  }
1167
1273
  }
1168
- function fr(i, e) {
1274
+ function gr(i, e) {
1169
1275
  for (const t in e)
1170
1276
  i[t] = e[t];
1171
1277
  }
@@ -1210,19 +1316,19 @@ function se(i, e, t) {
1210
1316
  r = i[s[0]][s[1]][s[2]][s[3]][s[4]];
1211
1317
  break;
1212
1318
  }
1213
- r != null && fr(r, t);
1319
+ r != null && gr(r, t);
1214
1320
  }
1215
1321
  }
1216
- function yn(i) {
1322
+ function En(i) {
1217
1323
  return new Promise((e, t) => {
1218
1324
  const s = new Image();
1219
1325
  s.onload = () => {
1220
- const n = new Ii(s);
1221
- n.wrapS = cs, n.wrapT = cs, n.needsUpdate = !0, e(n);
1326
+ const n = new Li(s);
1327
+ n.wrapS = ds, n.wrapT = ds, n.needsUpdate = !0, e(n);
1222
1328
  }, s.onerror = t, s.src = i;
1223
1329
  });
1224
1330
  }
1225
- class sl extends Gi {
1331
+ class sl extends $i {
1226
1332
  canvas = null;
1227
1333
  // Canvas or OffscreenCanvas
1228
1334
  inputElement = null;
@@ -1240,15 +1346,15 @@ class sl extends Gi {
1240
1346
  }), this.renderTargets.clear(), this.renderer?.dispose();
1241
1347
  }
1242
1348
  getObject(e) {
1243
- this.app.debugEnabled && (this.renderer !== void 0 && (ti.renderer = this.renderer), this.app.send({
1349
+ this.app.debugEnabled && (this.renderer !== void 0 && (ii.renderer = this.renderer), this.app.send({
1244
1350
  event: "getObject",
1245
1351
  target: "app",
1246
1352
  data: e
1247
1353
  }));
1248
1354
  }
1249
1355
  setObject(e) {
1250
- this.renderer !== void 0 && (ti.renderer = this.renderer);
1251
- const t = Ei(e);
1356
+ this.renderer !== void 0 && (ii.renderer = this.renderer);
1357
+ const t = Ci(e);
1252
1358
  this.app.send({
1253
1359
  event: "setObject",
1254
1360
  target: "editor",
@@ -1367,7 +1473,7 @@ class sl extends Gi {
1367
1473
  addScene(e) {
1368
1474
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
1369
1475
  return;
1370
- ys(), Ni(e);
1476
+ Es(), Fi(e);
1371
1477
  const t = pt(e);
1372
1478
  this.app.send({
1373
1479
  event: "addScene",
@@ -1410,7 +1516,7 @@ class sl extends Gi {
1410
1516
  setScene(e) {
1411
1517
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
1412
1518
  return;
1413
- this.renderer !== void 0 && (ti.renderer = this.renderer), ys(), Ni(e);
1519
+ this.renderer !== void 0 && (ii.renderer = this.renderer), Es(), Fi(e);
1414
1520
  const t = pt(e);
1415
1521
  this.app.send({
1416
1522
  event: "setScene",
@@ -1422,7 +1528,7 @@ class sl extends Gi {
1422
1528
  addCamera(e) {
1423
1529
  if (!this.app.debugEnabled)
1424
1530
  return;
1425
- const t = Ei(e);
1531
+ const t = Ci(e);
1426
1532
  this.app.send({
1427
1533
  event: "addCamera",
1428
1534
  target: "editor",
@@ -1432,7 +1538,7 @@ class sl extends Gi {
1432
1538
  removeCamera(e) {
1433
1539
  if (!this.app.debugEnabled)
1434
1540
  return;
1435
- const t = Ei(e);
1541
+ const t = Ci(e);
1436
1542
  this.app.send({
1437
1543
  event: "removeCamera",
1438
1544
  target: "editor",
@@ -1508,7 +1614,7 @@ class sl extends Gi {
1508
1614
  }
1509
1615
  // Renderer
1510
1616
  addRT(e, t) {
1511
- const s = new Kn(32, 32, t);
1617
+ const s = new ta(32, 32, t);
1512
1618
  s.texture.name = e, this.renderTargets.set(e, s);
1513
1619
  }
1514
1620
  resize(e, t) {
@@ -1532,7 +1638,7 @@ class sl extends Gi {
1532
1638
  return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
1533
1639
  }
1534
1640
  }
1535
- var Fi = { exports: {} }, Ct = {};
1641
+ var zi = { exports: {} }, Ct = {};
1536
1642
  /**
1537
1643
  * @license React
1538
1644
  * react-jsx-runtime.production.min.js
@@ -1542,12 +1648,12 @@ var Fi = { exports: {} }, Ct = {};
1542
1648
  * This source code is licensed under the MIT license found in the
1543
1649
  * LICENSE file in the root directory of this source tree.
1544
1650
  */
1545
- var bs;
1546
- function gr() {
1547
- if (bs)
1651
+ var Cs;
1652
+ function _r() {
1653
+ if (Cs)
1548
1654
  return Ct;
1549
- bs = 1;
1550
- var i = gn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1655
+ Cs = 1;
1656
+ var i = vn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
1551
1657
  function r(o, c, l) {
1552
1658
  var d, p = {}, m = null, f = null;
1553
1659
  l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
@@ -1560,7 +1666,7 @@ function gr() {
1560
1666
  }
1561
1667
  return Ct.Fragment = t, Ct.jsx = r, Ct.jsxs = r, Ct;
1562
1668
  }
1563
- var St = {};
1669
+ var wt = {};
1564
1670
  /**
1565
1671
  * @license React
1566
1672
  * react-jsx-runtime.development.js
@@ -1570,14 +1676,14 @@ var St = {};
1570
1676
  * This source code is licensed under the MIT license found in the
1571
1677
  * LICENSE file in the root directory of this source tree.
1572
1678
  */
1573
- var Es;
1574
- function _r() {
1575
- return Es || (Es = 1, process.env.NODE_ENV !== "production" && function() {
1576
- var i = gn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), w = Symbol.iterator, v = "@@iterator";
1679
+ var ws;
1680
+ function vr() {
1681
+ return ws || (ws = 1, process.env.NODE_ENV !== "production" && function() {
1682
+ var i = vn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = 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, v = "@@iterator";
1577
1683
  function x(h) {
1578
1684
  if (h === null || typeof h != "object")
1579
1685
  return null;
1580
- var b = w && h[w] || h[v];
1686
+ var b = E && h[E] || h[v];
1581
1687
  return typeof b == "function" ? b : null;
1582
1688
  }
1583
1689
  var g = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -1585,10 +1691,10 @@ function _r() {
1585
1691
  {
1586
1692
  for (var b = arguments.length, T = new Array(b > 1 ? b - 1 : 0), k = 1; k < b; k++)
1587
1693
  T[k - 1] = arguments[k];
1588
- E("error", h, T);
1694
+ C("error", h, T);
1589
1695
  }
1590
1696
  }
1591
- function E(h, b, T) {
1697
+ function C(h, b, T) {
1592
1698
  {
1593
1699
  var k = g.ReactDebugCurrentFrame, H = k.getStackAddendum();
1594
1700
  H !== "" && (b += "%s", T = T.concat([H]));
@@ -1598,16 +1704,16 @@ function _r() {
1598
1704
  G.unshift("Warning: " + b), Function.prototype.apply.call(console[h], console, G);
1599
1705
  }
1600
1706
  }
1601
- var C = !1, S = !1, O = !1, I = !1, U = !1, R;
1707
+ var w = !1, S = !1, O = !1, I = !1, U = !1, R;
1602
1708
  R = Symbol.for("react.module.reference");
1603
- function B(h) {
1604
- return !!(typeof h == "string" || typeof h == "function" || h === s || h === a || U || h === n || h === l || h === d || I || h === f || C || S || O || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === p || h.$$typeof === r || h.$$typeof === o || h.$$typeof === c || // This needs to include all possible module reference object
1709
+ function V(h) {
1710
+ return !!(typeof h == "string" || typeof h == "function" || h === s || h === a || U || h === n || h === l || h === d || I || h === f || w || S || O || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === p || h.$$typeof === r || h.$$typeof === o || h.$$typeof === c || // This needs to include all possible module reference object
1605
1711
  // types supported by any Flight configuration anywhere since
1606
1712
  // we don't know which Flight build this will end up being used
1607
1713
  // with.
1608
1714
  h.$$typeof === R || h.getModuleId !== void 0));
1609
1715
  }
1610
- function Se(h, b, T) {
1716
+ function we(h, b, T) {
1611
1717
  var k = h.displayName;
1612
1718
  if (k)
1613
1719
  return k;
@@ -1647,7 +1753,7 @@ function _r() {
1647
1753
  var T = h;
1648
1754
  return _e(T._context) + ".Provider";
1649
1755
  case c:
1650
- return Se(h, h.render, "ForwardRef");
1756
+ return we(h, h.render, "ForwardRef");
1651
1757
  case p:
1652
1758
  var k = h.displayName || null;
1653
1759
  return k !== null ? k : re(h.type) || "Memo";
@@ -1738,13 +1844,13 @@ function _r() {
1738
1844
  ` + it + h;
1739
1845
  }
1740
1846
  }
1741
- var ui = !1, Ht;
1847
+ var pi = !1, Ht;
1742
1848
  {
1743
- var xn = typeof WeakMap == "function" ? WeakMap : Map;
1744
- Ht = new xn();
1849
+ var Pn = typeof WeakMap == "function" ? WeakMap : Map;
1850
+ Ht = new Pn();
1745
1851
  }
1746
- function $i(h, b) {
1747
- if (!h || ui)
1852
+ function Ki(h, b) {
1853
+ if (!h || pi)
1748
1854
  return "";
1749
1855
  {
1750
1856
  var T = Ht.get(h);
@@ -1752,7 +1858,7 @@ function _r() {
1752
1858
  return T;
1753
1859
  }
1754
1860
  var k;
1755
- ui = !0;
1861
+ pi = !0;
1756
1862
  var H = Error.prepareStackTrace;
1757
1863
  Error.prepareStackTrace = void 0;
1758
1864
  var G;
@@ -1800,24 +1906,24 @@ function _r() {
1800
1906
  if (ie !== 1 || ae !== 1)
1801
1907
  do
1802
1908
  if (ie--, ae--, ae < 0 || N[ie] !== fe[ae]) {
1803
- var we = `
1909
+ var Se = `
1804
1910
  ` + N[ie].replace(" at new ", " at ");
1805
- return h.displayName && we.includes("<anonymous>") && (we = we.replace("<anonymous>", h.displayName)), typeof h == "function" && Ht.set(h, we), we;
1911
+ return h.displayName && Se.includes("<anonymous>") && (Se = Se.replace("<anonymous>", h.displayName)), typeof h == "function" && Ht.set(h, Se), Se;
1806
1912
  }
1807
1913
  while (ie >= 1 && ae >= 0);
1808
1914
  break;
1809
1915
  }
1810
1916
  }
1811
1917
  } finally {
1812
- ui = !1, yt.current = G, Te(), Error.prepareStackTrace = H;
1918
+ pi = !1, yt.current = G, Te(), Error.prepareStackTrace = H;
1813
1919
  }
1814
- var nt = h ? h.displayName || h.name : "", ls = nt ? zt(nt) : "";
1815
- return typeof h == "function" && Ht.set(h, ls), ls;
1920
+ var nt = h ? h.displayName || h.name : "", hs = nt ? zt(nt) : "";
1921
+ return typeof h == "function" && Ht.set(h, hs), hs;
1816
1922
  }
1817
- function On(h, b, T) {
1818
- return $i(h, !1);
1923
+ function An(h, b, T) {
1924
+ return Ki(h, !1);
1819
1925
  }
1820
- function Tn(h) {
1926
+ function Dn(h) {
1821
1927
  var b = h.prototype;
1822
1928
  return !!(b && b.isReactComponent);
1823
1929
  }
@@ -1825,7 +1931,7 @@ function _r() {
1825
1931
  if (h == null)
1826
1932
  return "";
1827
1933
  if (typeof h == "function")
1828
- return $i(h, Tn(h));
1934
+ return Ki(h, Dn(h));
1829
1935
  if (typeof h == "string")
1830
1936
  return zt(h);
1831
1937
  switch (h) {
@@ -1837,7 +1943,7 @@ function _r() {
1837
1943
  if (typeof h == "object")
1838
1944
  switch (h.$$typeof) {
1839
1945
  case c:
1840
- return On(h.render);
1946
+ return An(h.render);
1841
1947
  case p:
1842
1948
  return Yt(h.type, b, T);
1843
1949
  case m: {
@@ -1850,15 +1956,15 @@ function _r() {
1850
1956
  }
1851
1957
  return "";
1852
1958
  }
1853
- var Bt = Object.prototype.hasOwnProperty, qi = {}, Ki = g.ReactDebugCurrentFrame;
1959
+ var Bt = Object.prototype.hasOwnProperty, Qi = {}, Ji = g.ReactDebugCurrentFrame;
1854
1960
  function Vt(h) {
1855
1961
  if (h) {
1856
1962
  var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
1857
- Ki.setExtraStackFrame(T);
1963
+ Ji.setExtraStackFrame(T);
1858
1964
  } else
1859
- Ki.setExtraStackFrame(null);
1965
+ Ji.setExtraStackFrame(null);
1860
1966
  }
1861
- function Mn(h, b, T, k, H) {
1967
+ function Rn(h, b, T, k, H) {
1862
1968
  {
1863
1969
  var G = Function.call.bind(Bt);
1864
1970
  for (var F in h)
@@ -1873,42 +1979,42 @@ function _r() {
1873
1979
  } catch (ie) {
1874
1980
  N = ie;
1875
1981
  }
1876
- N && !(N instanceof Error) && (Vt(H), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", T, F, typeof N), Vt(null)), N instanceof Error && !(N.message in qi) && (qi[N.message] = !0, Vt(H), y("Failed %s type: %s", T, N.message), Vt(null));
1982
+ N && !(N instanceof Error) && (Vt(H), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", T, F, typeof N), Vt(null)), N instanceof Error && !(N.message in Qi) && (Qi[N.message] = !0, Vt(H), y("Failed %s type: %s", T, N.message), Vt(null));
1877
1983
  }
1878
1984
  }
1879
1985
  }
1880
- var Pn = Array.isArray;
1881
- function pi(h) {
1882
- return Pn(h);
1986
+ var In = Array.isArray;
1987
+ function mi(h) {
1988
+ return In(h);
1883
1989
  }
1884
- function An(h) {
1990
+ function Ln(h) {
1885
1991
  {
1886
1992
  var b = typeof Symbol == "function" && Symbol.toStringTag, T = b && h[Symbol.toStringTag] || h.constructor.name || "Object";
1887
1993
  return T;
1888
1994
  }
1889
1995
  }
1890
- function Dn(h) {
1996
+ function kn(h) {
1891
1997
  try {
1892
- return Qi(h), !1;
1998
+ return es(h), !1;
1893
1999
  } catch {
1894
2000
  return !0;
1895
2001
  }
1896
2002
  }
1897
- function Qi(h) {
2003
+ function es(h) {
1898
2004
  return "" + h;
1899
2005
  }
1900
- function Ji(h) {
1901
- if (Dn(h))
1902
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", An(h)), Qi(h);
2006
+ function ts(h) {
2007
+ if (kn(h))
2008
+ return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ln(h)), es(h);
1903
2009
  }
1904
- var bt = g.ReactCurrentOwner, Rn = {
2010
+ var bt = g.ReactCurrentOwner, Un = {
1905
2011
  key: !0,
1906
2012
  ref: !0,
1907
2013
  __self: !0,
1908
2014
  __source: !0
1909
- }, es, ts, mi;
1910
- mi = {};
1911
- function In(h) {
2015
+ }, is, ss, fi;
2016
+ fi = {};
2017
+ function jn(h) {
1912
2018
  if (Bt.call(h, "ref")) {
1913
2019
  var b = Object.getOwnPropertyDescriptor(h, "ref").get;
1914
2020
  if (b && b.isReactWarning)
@@ -1916,7 +2022,7 @@ function _r() {
1916
2022
  }
1917
2023
  return h.ref !== void 0;
1918
2024
  }
1919
- function Ln(h) {
2025
+ function Nn(h) {
1920
2026
  if (Bt.call(h, "key")) {
1921
2027
  var b = Object.getOwnPropertyDescriptor(h, "key").get;
1922
2028
  if (b && b.isReactWarning)
@@ -1924,16 +2030,16 @@ function _r() {
1924
2030
  }
1925
2031
  return h.key !== void 0;
1926
2032
  }
1927
- function kn(h, b) {
2033
+ function Fn(h, b) {
1928
2034
  if (typeof h.ref == "string" && bt.current && b && bt.current.stateNode !== b) {
1929
2035
  var T = re(bt.current.type);
1930
- mi[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', re(bt.current.type), h.ref), mi[T] = !0);
2036
+ fi[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', re(bt.current.type), h.ref), fi[T] = !0);
1931
2037
  }
1932
2038
  }
1933
- function Un(h, b) {
2039
+ function zn(h, b) {
1934
2040
  {
1935
2041
  var T = function() {
1936
- es || (es = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
2042
+ is || (is = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
1937
2043
  };
1938
2044
  T.isReactWarning = !0, Object.defineProperty(h, "key", {
1939
2045
  get: T,
@@ -1941,10 +2047,10 @@ function _r() {
1941
2047
  });
1942
2048
  }
1943
2049
  }
1944
- function jn(h, b) {
2050
+ function Hn(h, b) {
1945
2051
  {
1946
2052
  var T = function() {
1947
- ts || (ts = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
2053
+ ss || (ss = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
1948
2054
  };
1949
2055
  T.isReactWarning = !0, Object.defineProperty(h, "ref", {
1950
2056
  get: T,
@@ -1952,7 +2058,7 @@ function _r() {
1952
2058
  });
1953
2059
  }
1954
2060
  }
1955
- var Nn = function(h, b, T, k, H, G, F) {
2061
+ var Yn = function(h, b, T, k, H, G, F) {
1956
2062
  var N = {
1957
2063
  // This tag allows us to uniquely identify this as a React Element
1958
2064
  $$typeof: e,
@@ -1981,12 +2087,12 @@ function _r() {
1981
2087
  value: H
1982
2088
  }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
1983
2089
  };
1984
- function Fn(h, b, T, k, H) {
2090
+ function Bn(h, b, T, k, H) {
1985
2091
  {
1986
2092
  var G, F = {}, N = null, fe = null;
1987
- T !== void 0 && (Ji(T), N = "" + T), Ln(b) && (Ji(b.key), N = "" + b.key), In(b) && (fe = b.ref, kn(b, H));
2093
+ T !== void 0 && (ts(T), N = "" + T), Nn(b) && (ts(b.key), N = "" + b.key), jn(b) && (fe = b.ref, Fn(b, H));
1988
2094
  for (G in b)
1989
- Bt.call(b, G) && !Rn.hasOwnProperty(G) && (F[G] = b[G]);
2095
+ Bt.call(b, G) && !Un.hasOwnProperty(G) && (F[G] = b[G]);
1990
2096
  if (h && h.defaultProps) {
1991
2097
  var ie = h.defaultProps;
1992
2098
  for (G in ie)
@@ -1994,28 +2100,28 @@ function _r() {
1994
2100
  }
1995
2101
  if (N || fe) {
1996
2102
  var ae = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1997
- N && Un(F, ae), fe && jn(F, ae);
2103
+ N && zn(F, ae), fe && Hn(F, ae);
1998
2104
  }
1999
- return Nn(h, N, fe, H, k, bt.current, F);
2105
+ return Yn(h, N, fe, H, k, bt.current, F);
2000
2106
  }
2001
2107
  }
2002
- var fi = g.ReactCurrentOwner, is = g.ReactDebugCurrentFrame;
2108
+ var gi = g.ReactCurrentOwner, ns = g.ReactDebugCurrentFrame;
2003
2109
  function st(h) {
2004
2110
  if (h) {
2005
2111
  var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
2006
- is.setExtraStackFrame(T);
2112
+ ns.setExtraStackFrame(T);
2007
2113
  } else
2008
- is.setExtraStackFrame(null);
2114
+ ns.setExtraStackFrame(null);
2009
2115
  }
2010
- var gi;
2011
- gi = !1;
2012
- function _i(h) {
2116
+ var _i;
2117
+ _i = !1;
2118
+ function vi(h) {
2013
2119
  return typeof h == "object" && h !== null && h.$$typeof === e;
2014
2120
  }
2015
- function ss() {
2121
+ function as() {
2016
2122
  {
2017
- if (fi.current) {
2018
- var h = re(fi.current.type);
2123
+ if (gi.current) {
2124
+ var h = re(gi.current.type);
2019
2125
  if (h)
2020
2126
  return `
2021
2127
 
@@ -2024,7 +2130,7 @@ Check the render method of \`` + h + "`.";
2024
2130
  return "";
2025
2131
  }
2026
2132
  }
2027
- function zn(h) {
2133
+ function Vn(h) {
2028
2134
  {
2029
2135
  if (h !== void 0) {
2030
2136
  var b = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
@@ -2035,10 +2141,10 @@ Check your code at ` + b + ":" + T + ".";
2035
2141
  return "";
2036
2142
  }
2037
2143
  }
2038
- var ns = {};
2039
- function Hn(h) {
2144
+ var rs = {};
2145
+ function Zn(h) {
2040
2146
  {
2041
- var b = ss();
2147
+ var b = as();
2042
2148
  if (!b) {
2043
2149
  var T = typeof h == "string" ? h : h.displayName || h.name;
2044
2150
  T && (b = `
@@ -2048,39 +2154,39 @@ Check the top-level render call using <` + T + ">.");
2048
2154
  return b;
2049
2155
  }
2050
2156
  }
2051
- function as(h, b) {
2157
+ function os(h, b) {
2052
2158
  {
2053
2159
  if (!h._store || h._store.validated || h.key != null)
2054
2160
  return;
2055
2161
  h._store.validated = !0;
2056
- var T = Hn(b);
2057
- if (ns[T])
2162
+ var T = Zn(b);
2163
+ if (rs[T])
2058
2164
  return;
2059
- ns[T] = !0;
2165
+ rs[T] = !0;
2060
2166
  var k = "";
2061
- h && h._owner && h._owner !== fi.current && (k = " It was passed a child from " + re(h._owner.type) + "."), st(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, k), st(null);
2167
+ h && h._owner && h._owner !== gi.current && (k = " It was passed a child from " + re(h._owner.type) + "."), st(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, k), st(null);
2062
2168
  }
2063
2169
  }
2064
- function rs(h, b) {
2170
+ function ls(h, b) {
2065
2171
  {
2066
2172
  if (typeof h != "object")
2067
2173
  return;
2068
- if (pi(h))
2174
+ if (mi(h))
2069
2175
  for (var T = 0; T < h.length; T++) {
2070
2176
  var k = h[T];
2071
- _i(k) && as(k, b);
2177
+ vi(k) && os(k, b);
2072
2178
  }
2073
- else if (_i(h))
2179
+ else if (vi(h))
2074
2180
  h._store && (h._store.validated = !0);
2075
2181
  else if (h) {
2076
2182
  var H = x(h);
2077
2183
  if (typeof H == "function" && H !== h.entries)
2078
2184
  for (var G = H.call(h), F; !(F = G.next()).done; )
2079
- _i(F.value) && as(F.value, b);
2185
+ vi(F.value) && os(F.value, b);
2080
2186
  }
2081
2187
  }
2082
2188
  }
2083
- function Yn(h) {
2189
+ function Wn(h) {
2084
2190
  {
2085
2191
  var b = h.type;
2086
2192
  if (b == null || typeof b == "string")
@@ -2096,16 +2202,16 @@ Check the top-level render call using <` + T + ">.");
2096
2202
  return;
2097
2203
  if (T) {
2098
2204
  var k = re(b);
2099
- Mn(T, h.props, "prop", k, h);
2100
- } else if (b.PropTypes !== void 0 && !gi) {
2101
- gi = !0;
2205
+ Rn(T, h.props, "prop", k, h);
2206
+ } else if (b.PropTypes !== void 0 && !_i) {
2207
+ _i = !0;
2102
2208
  var H = re(b);
2103
2209
  y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
2104
2210
  }
2105
2211
  typeof b.getDefaultProps == "function" && !b.getDefaultProps.isReactClassApproved && y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2106
2212
  }
2107
2213
  }
2108
- function Bn(h) {
2214
+ function Gn(h) {
2109
2215
  {
2110
2216
  for (var b = Object.keys(h.props), T = 0; T < b.length; T++) {
2111
2217
  var k = b[T];
@@ -2117,56 +2223,56 @@ Check the top-level render call using <` + T + ">.");
2117
2223
  h.ref !== null && (st(h), y("Invalid attribute `ref` supplied to `React.Fragment`."), st(null));
2118
2224
  }
2119
2225
  }
2120
- function os(h, b, T, k, H, G) {
2226
+ function cs(h, b, T, k, H, G) {
2121
2227
  {
2122
- var F = B(h);
2228
+ var F = V(h);
2123
2229
  if (!F) {
2124
2230
  var N = "";
2125
2231
  (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.");
2126
- var fe = zn(H);
2127
- fe ? N += fe : N += ss();
2232
+ var fe = Vn(H);
2233
+ fe ? N += fe : N += as();
2128
2234
  var ie;
2129
- h === null ? ie = "null" : pi(h) ? ie = "array" : h !== void 0 && h.$$typeof === e ? (ie = "<" + (re(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, N);
2235
+ h === null ? ie = "null" : mi(h) ? ie = "array" : h !== void 0 && h.$$typeof === e ? (ie = "<" + (re(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, N);
2130
2236
  }
2131
- var ae = Fn(h, b, T, H, G);
2237
+ var ae = Bn(h, b, T, H, G);
2132
2238
  if (ae == null)
2133
2239
  return ae;
2134
2240
  if (F) {
2135
- var we = b.children;
2136
- if (we !== void 0)
2241
+ var Se = b.children;
2242
+ if (Se !== void 0)
2137
2243
  if (k)
2138
- if (pi(we)) {
2139
- for (var nt = 0; nt < we.length; nt++)
2140
- rs(we[nt], h);
2141
- Object.freeze && Object.freeze(we);
2244
+ if (mi(Se)) {
2245
+ for (var nt = 0; nt < Se.length; nt++)
2246
+ ls(Se[nt], h);
2247
+ Object.freeze && Object.freeze(Se);
2142
2248
  } else
2143
2249
  y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2144
2250
  else
2145
- rs(we, h);
2251
+ ls(Se, h);
2146
2252
  }
2147
- return h === s ? Bn(ae) : Yn(ae), ae;
2253
+ return h === s ? Gn(ae) : Wn(ae), ae;
2148
2254
  }
2149
2255
  }
2150
- function Vn(h, b, T) {
2151
- return os(h, b, T, !0);
2256
+ function Xn(h, b, T) {
2257
+ return cs(h, b, T, !0);
2152
2258
  }
2153
- function Zn(h, b, T) {
2154
- return os(h, b, T, !1);
2259
+ function $n(h, b, T) {
2260
+ return cs(h, b, T, !1);
2155
2261
  }
2156
- var Wn = Zn, Gn = Vn;
2157
- St.Fragment = s, St.jsx = Wn, St.jsxs = Gn;
2158
- }()), St;
2262
+ var qn = $n, Kn = Xn;
2263
+ wt.Fragment = s, wt.jsx = qn, wt.jsxs = Kn;
2264
+ }()), wt;
2159
2265
  }
2160
- process.env.NODE_ENV === "production" ? Fi.exports = gr() : Fi.exports = _r();
2161
- var u = Fi.exports;
2162
- function bn(i) {
2266
+ process.env.NODE_ENV === "production" ? zi.exports = _r() : zi.exports = vr();
2267
+ var u = zi.exports;
2268
+ function Cn(i) {
2163
2269
  return i.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ u.jsx("button", { children: i.title });
2164
2270
  }
2165
- const vr = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
2271
+ const yr = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
2166
2272
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
2167
2273
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
2168
2274
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
2169
- ] }), yr = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
2275
+ ] }), br = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
2170
2276
  "path",
2171
2277
  {
2172
2278
  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
@@ -2174,35 +2280,63 @@ 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
2174
2280
  C11,8.22,10.74,8,10.43,8z`
2175
2281
  }
2176
2282
  ) });
2177
- function br(i) {
2178
- return /* @__PURE__ */ u.jsx(_n.Item, { value: i.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
2179
- yr,
2180
- /* @__PURE__ */ u.jsx("span", { children: i.title }),
2181
- /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
2182
- i.onDelete(i.index);
2183
- }, children: vr })
2184
- ] }) }, i.title);
2185
- }
2186
2283
  function Er(i) {
2187
- const [e, t] = Z(!1), [s, n] = Z(i.options), a = (l) => {
2188
- i.onDragComplete(l), n(l);
2189
- }, r = (l) => {
2190
- const d = [...s];
2191
- d.splice(l, 1), a(d);
2192
- }, o = [];
2193
- s.forEach((l, d) => {
2194
- o.push(/* @__PURE__ */ u.jsx(br, { index: d, title: l, onDelete: r }, l));
2195
- });
2196
- let c = "dropdown draggable";
2197
- return i.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2198
- /* @__PURE__ */ u.jsx(bn, { title: i.title }),
2199
- /* @__PURE__ */ u.jsx(_n.Group, { axis: "y", values: s, onReorder: a, style: { visibility: e ? "visible" : "hidden" }, children: o })
2284
+ return /* @__PURE__ */ u.jsx(
2285
+ "li",
2286
+ {
2287
+ className: `reorder-item ${i.draggingIndex === i.index ? "dragging" : ""}`,
2288
+ draggable: !0,
2289
+ onDragStart: () => i.onDragStart(i.index),
2290
+ onDragOver: (e) => {
2291
+ e.preventDefault(), i.onDragOver(i.index);
2292
+ },
2293
+ onDragEnd: i.onDragEnd,
2294
+ children: /* @__PURE__ */ u.jsxs("div", { children: [
2295
+ br,
2296
+ /* @__PURE__ */ u.jsx("span", { children: i.title }),
2297
+ /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => i.onDelete(i.index), children: yr })
2298
+ ] })
2299
+ }
2300
+ );
2301
+ }
2302
+ function wn(i) {
2303
+ const [e, t] = B(!1), [s, n] = B(i.options), [a, r] = B(null), o = (f) => {
2304
+ i.onDragComplete(f), n(f);
2305
+ }, c = (f) => {
2306
+ const E = [...s];
2307
+ E.splice(f, 1), o(E);
2308
+ }, l = (f) => {
2309
+ r(f);
2310
+ }, d = (f) => {
2311
+ if (a === f || a === null)
2312
+ return;
2313
+ const E = [...s], v = E.splice(a, 1)[0];
2314
+ E.splice(f, 0, v), r(f), n(E);
2315
+ }, p = () => {
2316
+ i.onDragComplete(s), r(null);
2317
+ };
2318
+ let m = "dropdown draggable";
2319
+ return i.subdropdown && (m += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: m, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2320
+ /* @__PURE__ */ u.jsx(Cn, { title: i.title }),
2321
+ /* @__PURE__ */ u.jsx("ul", { className: "reorder-list", style: { display: e ? "block" : "none" }, children: s.map((f, E) => /* @__PURE__ */ u.jsx(
2322
+ Er,
2323
+ {
2324
+ title: f,
2325
+ index: E,
2326
+ draggingIndex: a,
2327
+ onDelete: c,
2328
+ onDragStart: l,
2329
+ onDragOver: d,
2330
+ onDragEnd: p
2331
+ },
2332
+ f
2333
+ )) })
2200
2334
  ] });
2201
2335
  }
2202
- function Cr(i) {
2203
- const [e, t] = Z(!1), s = [];
2336
+ function Sn(i) {
2337
+ const [e, t] = B(!1), s = [];
2204
2338
  i.options.map((a, r) => {
2205
- i.onSelect !== void 0 && (a.onSelect = i.onSelect), s.push(/* @__PURE__ */ u.jsx(Sr, { option: a }, r));
2339
+ i.onSelect !== void 0 && (a.onSelect = i.onSelect), s.push(/* @__PURE__ */ u.jsx(Cr, { option: a }, r));
2206
2340
  });
2207
2341
  let n = "dropdown";
2208
2342
  return i.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
@@ -2212,7 +2346,7 @@ function Cr(i) {
2212
2346
  onMouseEnter: () => t(!0),
2213
2347
  onMouseLeave: () => t(!1),
2214
2348
  children: [
2215
- /* @__PURE__ */ u.jsx(bn, { title: i.title }),
2349
+ /* @__PURE__ */ u.jsx(Cn, { title: i.title }),
2216
2350
  /* @__PURE__ */ u.jsx(
2217
2351
  "ul",
2218
2352
  {
@@ -2224,13 +2358,13 @@ function Cr(i) {
2224
2358
  }
2225
2359
  );
2226
2360
  }
2227
- function Sr(i) {
2228
- const { option: e } = i, [t, s] = Z("");
2361
+ function Cr(i) {
2362
+ const { option: e } = i, [t, s] = B("");
2229
2363
  let n;
2230
2364
  switch (e.type) {
2231
2365
  case "draggable":
2232
2366
  n = /* @__PURE__ */ u.jsx(
2233
- Er,
2367
+ wn,
2234
2368
  {
2235
2369
  title: e.title,
2236
2370
  options: e.value,
@@ -2243,7 +2377,7 @@ function Sr(i) {
2243
2377
  break;
2244
2378
  case "dropdown":
2245
2379
  n = /* @__PURE__ */ u.jsx(
2246
- Cr,
2380
+ Sn,
2247
2381
  {
2248
2382
  title: e.title,
2249
2383
  options: e.value,
@@ -2264,7 +2398,7 @@ function Sr(i) {
2264
2398
  );
2265
2399
  break;
2266
2400
  }
2267
- return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ha());
2401
+ return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ba());
2268
2402
  }
2269
2403
  function nl(i, e, t) {
2270
2404
  function s(a) {
@@ -2289,8 +2423,8 @@ function nl(i, e, t) {
2289
2423
  a.target === "editor" ? n(a) : s(a);
2290
2424
  };
2291
2425
  }
2292
- function oi(i) {
2293
- const [e, t] = Z(i.open !== void 0 ? i.open : !0), s = !e || i.children === void 0, n = () => {
2426
+ function li(i) {
2427
+ const [e, t] = B(i.open !== void 0 ? i.open : !0), s = !e || i.children === void 0, n = () => {
2294
2428
  D.dispatchEvent({ type: A.REMOVE_SCENE, value: i.scene });
2295
2429
  };
2296
2430
  return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${s ? "hide" : ""}`, children: [
@@ -2310,7 +2444,7 @@ function oi(i) {
2310
2444
  children: "Toggle"
2311
2445
  }
2312
2446
  ),
2313
- /* @__PURE__ */ u.jsx("p", { className: "label", children: ri(i.label) })
2447
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: oi(i.label) })
2314
2448
  ]
2315
2449
  }
2316
2450
  ),
@@ -2322,10 +2456,10 @@ function oi(i) {
2322
2456
  /* @__PURE__ */ u.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: i.children }) }, Math.random())
2323
2457
  ] });
2324
2458
  }
2325
- function En(i) {
2326
- const e = J(null), [t, s] = Z(!1), n = i.child !== void 0 && i.child.children.length > 0, a = [];
2459
+ function xn(i) {
2460
+ const e = J(null), [t, s] = B(!1), n = i.child !== void 0 && i.child.children.length > 0, a = [];
2327
2461
  return i.child !== void 0 && i.child.children.length > 0 && i.child.children.map((r, o) => {
2328
- a.push(/* @__PURE__ */ u.jsx(En, { child: r, three: i.three }, o));
2462
+ a.push(/* @__PURE__ */ u.jsx(xn, { child: r, three: i.three }, o));
2329
2463
  }), tt(() => {
2330
2464
  if (i.child) {
2331
2465
  const r = i.three.getScene(i.child.uuid);
@@ -2380,19 +2514,19 @@ function En(i) {
2380
2514
  }
2381
2515
  }
2382
2516
  ),
2383
- /* @__PURE__ */ u.jsx("div", { className: `icon ${dr(i.child)}` })
2517
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${ur(i.child)}` })
2384
2518
  ] }),
2385
2519
  /* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: a }) })
2386
2520
  ] }, Math.random()) });
2387
2521
  }
2388
- function Cs(i) {
2522
+ function Ss(i) {
2389
2523
  const e = [];
2390
2524
  return i.child?.children.map((t, s) => {
2391
- e.push(/* @__PURE__ */ u.jsx(En, { child: t, scene: i.scene, three: i.three }, s));
2525
+ e.push(/* @__PURE__ */ u.jsx(xn, { child: t, scene: i.scene, three: i.three }, s));
2392
2526
  }), /* @__PURE__ */ u.jsx("div", { className: `scene ${i.class !== void 0 ? i.class : ""}`, children: e });
2393
2527
  }
2394
2528
  function Rt(i) {
2395
- const [e, t] = Z(i.defaultValue);
2529
+ const [e, t] = B(i.defaultValue);
2396
2530
  return tt(() => {
2397
2531
  let s = !1, n = -1, a = 0, r = i.defaultValue, o = !1;
2398
2532
  const c = (f) => {
@@ -2402,13 +2536,13 @@ function Rt(i) {
2402
2536
  }, d = (f) => {
2403
2537
  if (!s)
2404
2538
  return;
2405
- const w = i.step !== void 0 ? i.step : 1, v = (f.clientX - n) * w * (o ? 10 : 1);
2539
+ const E = i.step !== void 0 ? i.step : 1, v = (f.clientX - n) * E * (o ? 10 : 1);
2406
2540
  r = Number((a + v).toFixed(4)), i.min !== void 0 && (r = Math.max(r, i.min)), i.max !== void 0 && (r = Math.min(r, i.max)), i.onChange !== void 0 && i.onChange(r), t(r);
2407
2541
  }, p = () => {
2408
2542
  s = !1, document.removeEventListener("mouseup", p), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", p);
2409
2543
  }, m = (f) => {
2410
- const w = Number(f.target.value);
2411
- i.onChange !== void 0 && i.onChange(w), t(w);
2544
+ const E = Number(f.target.value);
2545
+ i.onChange !== void 0 && i.onChange(E), t(E);
2412
2546
  };
2413
2547
  return i.label.current?.addEventListener("mousedown", l, !1), i.sliderRef !== void 0 && i.sliderRef.current?.addEventListener("input", m), document.addEventListener("keydown", c, !1), document.addEventListener("keyup", c, !1), () => {
2414
2548
  i.label.current?.removeEventListener("mousedown", l), i.sliderRef !== void 0 && i.sliderRef.current?.removeEventListener("input", m), document.removeEventListener("mouseup", p), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", p), document.removeEventListener("keydown", c), document.addEventListener("keyup", c, !1);
@@ -2416,7 +2550,7 @@ function Rt(i) {
2416
2550
  }, []), e;
2417
2551
  }
2418
2552
  function Qe(i) {
2419
- const e = J(null), t = J(null), [s, n] = Z(i.value);
2553
+ const e = J(null), t = J(null), [s, n] = B(i.value);
2420
2554
  return Rt({
2421
2555
  label: i.labelRef,
2422
2556
  input: e,
@@ -2476,17 +2610,17 @@ function Qe(i) {
2476
2610
  max: i.max,
2477
2611
  step: i.step,
2478
2612
  ref: t,
2479
- onChange: ai
2613
+ onChange: ri
2480
2614
  }
2481
2615
  )
2482
2616
  ] })
2483
2617
  ] });
2484
2618
  }
2485
2619
  function wr(i) {
2486
- const e = J(null), t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), o = J(null), c = J(null), l = J(null), d = J(null), [p, m] = Z(i.value.x), [f, w] = Z(i.value.y), [v, x] = Z({
2620
+ const e = J(null), t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), o = J(null), c = J(null), l = J(null), d = J(null), [p, m] = B(i.value.x), [f, E] = B(i.value.y), [v, x] = B({
2487
2621
  min: Math.min(i.min, Math.min(i.value.x, i.value.y)),
2488
2622
  max: Math.max(i.max, Math.max(i.value.x, i.value.y))
2489
- }), [g, y] = Z(!1);
2623
+ }), [g, y] = B(!1);
2490
2624
  Rt({
2491
2625
  label: o,
2492
2626
  input: e,
@@ -2505,7 +2639,7 @@ function wr(i) {
2505
2639
  max: v.max,
2506
2640
  step: 0.01,
2507
2641
  onChange: (R) => {
2508
- w(R), i.onChange({ target: { value: { x: p, y: R } } });
2642
+ E(R), i.onChange({ target: { value: { x: p, y: R } } });
2509
2643
  }
2510
2644
  }), Rt({
2511
2645
  label: l,
@@ -2528,26 +2662,26 @@ function wr(i) {
2528
2662
  x({ min: v.min, max: R });
2529
2663
  }
2530
2664
  });
2531
- function E() {
2532
- g || (window.addEventListener("mousemove", S), window.addEventListener("mouseup", C), y(!0));
2533
- }
2534
2665
  function C() {
2535
- window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", C), y(!1);
2666
+ g || (window.addEventListener("mousemove", S), window.addEventListener("mouseup", w), y(!0));
2667
+ }
2668
+ function w() {
2669
+ window.removeEventListener("mousemove", S), window.removeEventListener("mouseup", w), y(!1);
2536
2670
  }
2537
2671
  function S(R) {
2538
- const B = a.current.getBoundingClientRect(), Se = $e(0, 99, R.clientX - B.left) / 99, _e = 1 - $e(0, 99, R.clientY - B.top) / 99, re = Pe(Nt(v.min, v.max, Se), 3), K = Pe(Nt(v.min, v.max, _e), 3);
2539
- i.onChange({ target: { value: { x: re, y: K } } }), m(re), w(K);
2672
+ const V = a.current.getBoundingClientRect(), we = $e(0, 99, R.clientX - V.left) / 99, _e = 1 - $e(0, 99, R.clientY - V.top) / 99, re = Pe(Nt(v.min, v.max, we), 3), K = Pe(Nt(v.min, v.max, _e), 3);
2673
+ i.onChange({ target: { value: { x: re, y: K } } }), m(re), E(K);
2540
2674
  }
2541
2675
  function O() {
2542
2676
  const R = Number(s.current.value);
2543
- x({ min: R, max: v.max }), p < R && m($e(R, v.max, p)), f < R && w($e(R, v.max, f));
2677
+ x({ min: R, max: v.max }), p < R && m($e(R, v.max, p)), f < R && E($e(R, v.max, f));
2544
2678
  }
2545
2679
  function I() {
2546
2680
  const R = Number(n.current.value);
2547
- x({ min: v.min, max: R }), p > R && m($e(v.min, R, p)), f > R && w($e(v.min, R, f));
2681
+ x({ min: v.min, max: R }), p > R && m($e(v.min, R, p)), f > R && E($e(v.min, R, f));
2548
2682
  }
2549
2683
  tt(() => {
2550
- r.current.style.left = `${Ui(v.min, v.max, p) * 100}%`, r.current.style.top = `${(1 - Ui(v.min, v.max, f)) * 100}%`;
2684
+ r.current.style.left = `${ji(v.min, v.max, p) * 100}%`, r.current.style.top = `${(1 - ji(v.min, v.max, f)) * 100}%`;
2551
2685
  }, [v, p, f]);
2552
2686
  const U = i.step !== void 0 ? i.step : 0.01;
2553
2687
  return /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
@@ -2566,8 +2700,8 @@ function wr(i) {
2566
2700
  onChange: (R) => {
2567
2701
  if (m(R.target.value), R.target.value.length === 0)
2568
2702
  return;
2569
- const B = Number(R.target.value);
2570
- isNaN(B) || (i.onChange({ target: { value: { x: B, y: f } } }), B < v.min && x({ min: B, max: v.max }));
2703
+ const V = Number(R.target.value);
2704
+ isNaN(V) || (i.onChange({ target: { value: { x: V, y: f } } }), V < v.min && x({ min: V, max: v.max }));
2571
2705
  }
2572
2706
  }
2573
2707
  )
@@ -2584,10 +2718,10 @@ function wr(i) {
2584
2718
  max: v.max,
2585
2719
  step: U,
2586
2720
  onChange: (R) => {
2587
- if (w(R.target.value), R.target.value.length === 0)
2721
+ if (E(R.target.value), R.target.value.length === 0)
2588
2722
  return;
2589
- const B = Number(R.target.value);
2590
- isNaN(B) || (i.onChange({ target: { value: { x: p, y: B } } }), B > v.max && x({ min: v.min, max: B }));
2723
+ const V = Number(R.target.value);
2724
+ isNaN(V) || (i.onChange({ target: { value: { x: p, y: V } } }), V > v.max && x({ min: v.min, max: V }));
2591
2725
  }
2592
2726
  }
2593
2727
  )
@@ -2619,27 +2753,27 @@ function wr(i) {
2619
2753
  )
2620
2754
  ] })
2621
2755
  ] }),
2622
- /* @__PURE__ */ u.jsxs("div", { className: "input", ref: a, onMouseDown: E, onMouseUp: C, children: [
2756
+ /* @__PURE__ */ u.jsxs("div", { className: "input", ref: a, onMouseDown: C, onMouseUp: w, children: [
2623
2757
  /* @__PURE__ */ u.jsx("div", { className: "x" }),
2624
2758
  /* @__PURE__ */ u.jsx("div", { className: "y" }),
2625
2759
  /* @__PURE__ */ u.jsx("div", { className: "pt", ref: r })
2626
2760
  ] })
2627
2761
  ] });
2628
2762
  }
2629
- const xr = Math.PI / 180, Or = 180 / Math.PI;
2763
+ const Sr = Math.PI / 180, xr = 180 / Math.PI;
2630
2764
  function ot(i, e, t, s, n) {
2631
2765
  return s + (i - e) * (n - s) / (t - e);
2632
2766
  }
2633
2767
  function lt(i, e, t) {
2634
2768
  return (1 - t) * i + t * e;
2635
2769
  }
2636
- function zi(i) {
2637
- return i * xr;
2770
+ function Hi(i) {
2771
+ return i * Sr;
2638
2772
  }
2639
- function Tr(i) {
2640
- return i * Or;
2773
+ function Or(i) {
2774
+ return i * xr;
2641
2775
  }
2642
- function Ss(i) {
2776
+ function xs(i) {
2643
2777
  const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, t = i.value.isEuler !== void 0, s = i.value.elements !== void 0, n = i.step !== void 0 ? i.step : 0.01, a = [];
2644
2778
  if (t) {
2645
2779
  const r = Ut(() => i.value, []);
@@ -2651,13 +2785,13 @@ function Ss(i) {
2651
2785
  /* @__PURE__ */ u.jsx(
2652
2786
  Qe,
2653
2787
  {
2654
- value: Tr(r[c]),
2788
+ value: Or(r[c]),
2655
2789
  type: "number",
2656
2790
  prop: c,
2657
2791
  step: 0.1,
2658
2792
  labelRef: l,
2659
2793
  onChange: (d, p) => {
2660
- r[d] = zi(p), i.onChange({ target: { value: r } });
2794
+ r[d] = Hi(p), i.onChange({ target: { value: r } });
2661
2795
  }
2662
2796
  }
2663
2797
  )
@@ -2714,7 +2848,7 @@ function Ss(i) {
2714
2848
  }
2715
2849
  return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: a }, Math.random().toString());
2716
2850
  }
2717
- function Mr(i) {
2851
+ function Tr(i) {
2718
2852
  const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
2719
2853
  if (e) {
2720
2854
  const n = Ut(() => i.value, []), a = (o, c) => {
@@ -2766,10 +2900,10 @@ function Mr(i) {
2766
2900
  }
2767
2901
  return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: s });
2768
2902
  }
2769
- function Pr(i) {
2903
+ function Mr(i) {
2770
2904
  return !(i === "defaultAttributeValues" || i === "forceSinglePass" || i === "linecap" || i === "linejoin" || i === "linewidth" || i === "normalMapType" || i === "precision" || i === "shadowSide" || i === "uniformsGroups" || i === "uniformsNeedUpdate" || i === "userData" || i === "version" || i === "wireframeLinecap" || i === "wireframeLinejoin" || i === "wireframeLinewidth" || i.slice(0, 4) === "clip" || i.slice(0, 7) === "polygon" || i.slice(0, 7) === "stencil" || i.slice(0, 2) === "is");
2771
2905
  }
2772
- function Ar(i) {
2906
+ function Pr(i) {
2773
2907
  switch (i) {
2774
2908
  case "Alpha Map":
2775
2909
  return "alphaMap";
@@ -2818,7 +2952,7 @@ function Ar(i) {
2818
2952
  }
2819
2953
  return i;
2820
2954
  }
2821
- function hi(i) {
2955
+ function di(i) {
2822
2956
  switch (i) {
2823
2957
  case "alphaHash":
2824
2958
  return "Alpha Hash";
@@ -3021,11 +3155,11 @@ function hi(i) {
3021
3155
  }
3022
3156
  return i;
3023
3157
  }
3024
- function Cn(i) {
3158
+ function On(i) {
3025
3159
  const e = i.toLowerCase();
3026
3160
  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";
3027
3161
  }
3028
- function Dr() {
3162
+ function Ar() {
3029
3163
  const i = document.createElement("input");
3030
3164
  return i.type = "file", new Promise((e, t) => {
3031
3165
  i.addEventListener("change", function() {
@@ -3040,191 +3174,191 @@ function Dr() {
3040
3174
  }), i.click();
3041
3175
  });
3042
3176
  }
3043
- const Rr = [
3177
+ const Dr = [
3044
3178
  {
3045
3179
  title: "Front",
3046
- value: Qn
3180
+ value: ia
3047
3181
  },
3048
3182
  {
3049
3183
  title: "Back",
3050
- value: $s
3184
+ value: Ks
3051
3185
  },
3052
3186
  {
3053
3187
  title: "Double",
3054
- value: Vi
3188
+ value: Wi
3055
3189
  }
3056
- ], Ir = [
3190
+ ], Rr = [
3057
3191
  {
3058
3192
  title: "No Blending",
3059
- value: Jn
3193
+ value: sa
3060
3194
  },
3061
3195
  {
3062
3196
  title: "Normal",
3063
- value: ea
3197
+ value: na
3064
3198
  },
3065
3199
  {
3066
3200
  title: "Additive",
3067
- value: ta
3201
+ value: aa
3068
3202
  },
3069
3203
  {
3070
3204
  title: "Subtractive",
3071
- value: ia
3205
+ value: ra
3072
3206
  },
3073
3207
  {
3074
3208
  title: "Multiply",
3075
- value: sa
3209
+ value: oa
3076
3210
  },
3077
3211
  {
3078
3212
  title: "Custom",
3079
- value: na
3213
+ value: la
3080
3214
  }
3081
- ], Lr = [
3215
+ ], Ir = [
3082
3216
  {
3083
3217
  title: "Add",
3084
- value: aa
3218
+ value: ca
3085
3219
  },
3086
3220
  {
3087
3221
  title: "Subtract",
3088
- value: ra
3222
+ value: ha
3089
3223
  },
3090
3224
  {
3091
3225
  title: "Reverse Subtract",
3092
- value: oa
3226
+ value: da
3093
3227
  },
3094
3228
  {
3095
3229
  title: "Min",
3096
- value: la
3230
+ value: ua
3097
3231
  },
3098
3232
  {
3099
3233
  title: "Max",
3100
- value: ca
3234
+ value: pa
3101
3235
  }
3102
- ], kr = [
3236
+ ], Lr = [
3103
3237
  {
3104
3238
  title: "Zero",
3105
- value: qs
3239
+ value: Qs
3106
3240
  },
3107
3241
  {
3108
3242
  title: "One",
3109
- value: Ks
3243
+ value: Js
3110
3244
  },
3111
3245
  {
3112
3246
  title: "Src Color",
3113
- value: Qs
3247
+ value: en
3114
3248
  },
3115
3249
  {
3116
3250
  title: "One Minus Src Color",
3117
- value: Js
3251
+ value: tn
3118
3252
  },
3119
3253
  {
3120
3254
  title: "Src Alpha",
3121
- value: en
3255
+ value: sn
3122
3256
  },
3123
3257
  {
3124
3258
  title: "One Minus Src Alpha",
3125
- value: tn
3259
+ value: nn
3126
3260
  },
3127
3261
  {
3128
3262
  title: "Dst Alpha",
3129
- value: sn
3263
+ value: an
3130
3264
  },
3131
3265
  {
3132
3266
  title: "One Minus Dst Alpha",
3133
- value: nn
3267
+ value: rn
3134
3268
  },
3135
3269
  {
3136
3270
  title: "Dst Color",
3137
- value: an
3271
+ value: on
3138
3272
  },
3139
3273
  {
3140
3274
  title: "One Minus Dst Color",
3141
- value: rn
3275
+ value: ln
3142
3276
  },
3143
3277
  {
3144
3278
  title: "Src Alpha Saturate",
3145
- value: ha
3279
+ value: ma
3146
3280
  },
3147
3281
  {
3148
3282
  title: "Constant Color",
3149
- value: on
3283
+ value: cn
3150
3284
  },
3151
3285
  {
3152
3286
  title: "One Minus Constant Color",
3153
- value: ln
3287
+ value: hn
3154
3288
  },
3155
3289
  {
3156
3290
  title: "Constant Alpha",
3157
- value: cn
3291
+ value: dn
3158
3292
  },
3159
3293
  {
3160
3294
  title: "One Minus Constant Alpha",
3161
- value: hn
3295
+ value: un
3162
3296
  }
3163
- ], Ur = [
3297
+ ], kr = [
3164
3298
  {
3165
3299
  title: "Zero",
3166
- value: qs
3300
+ value: Qs
3167
3301
  },
3168
3302
  {
3169
3303
  title: "One",
3170
- value: Ks
3304
+ value: Js
3171
3305
  },
3172
3306
  {
3173
3307
  title: "Src Color",
3174
- value: Qs
3308
+ value: en
3175
3309
  },
3176
3310
  {
3177
3311
  title: "One Minus Src Color",
3178
- value: Js
3312
+ value: tn
3179
3313
  },
3180
3314
  {
3181
3315
  title: "Src Alpha",
3182
- value: en
3316
+ value: sn
3183
3317
  },
3184
3318
  {
3185
3319
  title: "One Minus Src Alpha",
3186
- value: tn
3320
+ value: nn
3187
3321
  },
3188
3322
  {
3189
3323
  title: "Dst Alpha",
3190
- value: sn
3324
+ value: an
3191
3325
  },
3192
3326
  {
3193
3327
  title: "One Minus Dst Alpha",
3194
- value: nn
3328
+ value: rn
3195
3329
  },
3196
3330
  {
3197
3331
  title: "Dst Color",
3198
- value: an
3332
+ value: on
3199
3333
  },
3200
3334
  {
3201
3335
  title: "One Minus Dst Color",
3202
- value: rn
3336
+ value: ln
3203
3337
  },
3204
3338
  {
3205
3339
  title: "Constant Color",
3206
- value: on
3340
+ value: cn
3207
3341
  },
3208
3342
  {
3209
3343
  title: "One Minus Constant Color",
3210
- value: ln
3344
+ value: hn
3211
3345
  },
3212
3346
  {
3213
3347
  title: "Constant Alpha",
3214
- value: cn
3348
+ value: dn
3215
3349
  },
3216
3350
  {
3217
3351
  title: "One Minus Constant Alpha",
3218
- value: hn
3352
+ value: un
3219
3353
  }
3220
3354
  ];
3221
- function wt(i, e) {
3355
+ function St(i, e) {
3222
3356
  i.needsUpdate = !0, i.type = "option", i.options = e;
3223
3357
  }
3224
- function jr(i, e, t, s) {
3358
+ function Ur(i, e, t, s) {
3225
3359
  return {
3226
3360
  type: "boolean",
3227
- title: hi(i),
3361
+ title: di(i),
3228
3362
  prop: i,
3229
3363
  value: e,
3230
3364
  needsUpdate: !0,
@@ -3238,10 +3372,10 @@ function jr(i, e, t, s) {
3238
3372
  }
3239
3373
  };
3240
3374
  }
3241
- function Nr(i, e, t, s) {
3375
+ function jr(i, e, t, s) {
3242
3376
  const n = {
3243
3377
  type: "number",
3244
- title: hi(i),
3378
+ title: di(i),
3245
3379
  prop: i,
3246
3380
  value: e,
3247
3381
  min: void 0,
@@ -3259,27 +3393,27 @@ function Nr(i, e, t, s) {
3259
3393
  };
3260
3394
  switch (i) {
3261
3395
  case "blending":
3262
- wt(n, Ir);
3396
+ St(n, Rr);
3263
3397
  break;
3264
3398
  case "blendDst":
3265
- wt(n, Ur);
3399
+ St(n, kr);
3266
3400
  break;
3267
3401
  case "blendEquation":
3268
- wt(n, Lr);
3402
+ St(n, Ir);
3269
3403
  break;
3270
3404
  case "blendSrc":
3271
- wt(n, kr);
3405
+ St(n, Lr);
3272
3406
  break;
3273
3407
  case "side":
3274
- wt(n, Rr);
3408
+ St(n, Dr);
3275
3409
  break;
3276
3410
  }
3277
- return Cn(i) && (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;
3411
+ return On(i) && (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;
3278
3412
  }
3279
- function Fr(i, e, t, s) {
3413
+ function Nr(i, e, t, s) {
3280
3414
  const n = {
3281
3415
  type: "string",
3282
- title: hi(i),
3416
+ title: di(i),
3283
3417
  prop: i,
3284
3418
  value: e,
3285
3419
  needsUpdate: !0,
@@ -3312,20 +3446,20 @@ function Fr(i, e, t, s) {
3312
3446
  }
3313
3447
  }), n;
3314
3448
  }
3315
- function zr(i) {
3449
+ function Fr(i) {
3316
3450
  return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
3317
3451
  }
3318
- function Hr(i) {
3452
+ function zr(i) {
3319
3453
  return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w === void 0;
3320
3454
  }
3321
- function Yr(i) {
3455
+ function Hr(i) {
3322
3456
  return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
3323
3457
  }
3324
- function Hi(i) {
3458
+ function Yi(i) {
3325
3459
  i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
3326
3460
  }
3327
3461
  function It(i, e, t, s, n = "", a = !1) {
3328
- const r = hi(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
3462
+ const r = di(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
3329
3463
  if (c === "boolean" || c === "string")
3330
3464
  return {
3331
3465
  title: r,
@@ -3359,7 +3493,7 @@ function It(i, e, t, s, n = "", a = !1) {
3359
3493
  }
3360
3494
  }
3361
3495
  };
3362
- return Cn(r) && (l.type = "range", l.min = 0, l.max = 1), l;
3496
+ return On(r) && (l.type = "range", l.min = 0, l.max = 1), l;
3363
3497
  } else {
3364
3498
  if (e.isColor)
3365
3499
  return {
@@ -3391,12 +3525,12 @@ function It(i, e, t, s, n = "", a = !1) {
3391
3525
  }
3392
3526
  }
3393
3527
  if (l.length > 0)
3394
- return Hi(l), {
3528
+ return Yi(l), {
3395
3529
  title: r,
3396
3530
  items: l
3397
3531
  };
3398
3532
  } else {
3399
- if (zr(e))
3533
+ if (Fr(e))
3400
3534
  return {
3401
3535
  title: r,
3402
3536
  prop: o,
@@ -3412,7 +3546,7 @@ function It(i, e, t, s, n = "", a = !1) {
3412
3546
  }
3413
3547
  }
3414
3548
  };
3415
- if (Hr(e))
3549
+ if (zr(e))
3416
3550
  return {
3417
3551
  title: r,
3418
3552
  prop: o,
@@ -3428,7 +3562,7 @@ function It(i, e, t, s, n = "", a = !1) {
3428
3562
  }
3429
3563
  }
3430
3564
  };
3431
- if (Yr(e))
3565
+ if (Hr(e))
3432
3566
  return {
3433
3567
  title: r,
3434
3568
  prop: o,
@@ -3467,14 +3601,14 @@ function It(i, e, t, s, n = "", a = !1) {
3467
3601
  value: e,
3468
3602
  disabled: a,
3469
3603
  onChange: (l, d) => {
3470
- const p = Ar(i), m = n.length > 0 ? `${n}.${p}` : p;
3604
+ const p = Pr(i), m = n.length > 0 ? `${n}.${p}` : p;
3471
3605
  s.createTexture(t.uuid, `material.${m}`, d);
3472
3606
  const f = s.getScene(t.uuid);
3473
3607
  if (f !== null) {
3474
- const w = f.getObjectByProperty("uuid", t.uuid);
3475
- if (w !== void 0) {
3608
+ const E = f.getObjectByProperty("uuid", t.uuid);
3609
+ if (E !== void 0) {
3476
3610
  const v = (x) => {
3477
- const g = w.material, y = m.split(".");
3611
+ const g = E.material, y = m.split(".");
3478
3612
  switch (y.length) {
3479
3613
  case 1:
3480
3614
  g[y[0]] = x;
@@ -3494,7 +3628,7 @@ function It(i, e, t, s, n = "", a = !1) {
3494
3628
  }
3495
3629
  g.needsUpdate = !0;
3496
3630
  };
3497
- d.src.length > 0 ? yn(d.src).then((x) => {
3631
+ d.src.length > 0 ? En(d.src).then((x) => {
3498
3632
  x.offset.set(d.offset[0], d.offset[1]), x.repeat.set(d.repeat[0], d.repeat[1]), v(x);
3499
3633
  }) : v(null);
3500
3634
  }
@@ -3535,7 +3669,7 @@ function It(i, e, t, s, n = "", a = !1) {
3535
3669
  console.log("Issue cycling through material object:", i, e);
3536
3670
  }
3537
3671
  if (l.length > 0)
3538
- return Hi(l), {
3672
+ return Yi(l), {
3539
3673
  title: r,
3540
3674
  items: l
3541
3675
  };
@@ -3543,25 +3677,25 @@ function It(i, e, t, s, n = "", a = !1) {
3543
3677
  }
3544
3678
  }
3545
3679
  }
3546
- function ws(i, e, t) {
3680
+ function Os(i, e, t) {
3547
3681
  const s = [];
3548
3682
  for (const n in i) {
3549
- if (!Pr(n))
3683
+ if (!Mr(n))
3550
3684
  continue;
3551
3685
  const a = typeof i[n], r = i[n];
3552
3686
  if (a === "boolean")
3553
- s.push(jr(n, r, e, t));
3687
+ s.push(Ur(n, r, e, t));
3554
3688
  else if (a === "number")
3555
- s.push(Nr(n, r, e, t));
3689
+ s.push(jr(n, r, e, t));
3556
3690
  else if (a === "string")
3557
- s.push(Fr(n, r, e, t));
3691
+ s.push(Nr(n, r, e, t));
3558
3692
  else if (a === "object") {
3559
3693
  const o = It(n, r, e, t);
3560
3694
  o !== void 0 && s.push(o);
3561
3695
  } else
3562
3696
  r !== void 0 && console.log("other:", n, a, r);
3563
3697
  }
3564
- return Hi(s), s.push({
3698
+ return Yi(s), s.push({
3565
3699
  title: "Update Material",
3566
3700
  type: "button",
3567
3701
  onChange: () => {
@@ -3574,7 +3708,7 @@ function ws(i, e, t) {
3574
3708
  }
3575
3709
  }), s;
3576
3710
  }
3577
- function Br(i, e) {
3711
+ function Yr(i, e) {
3578
3712
  function t() {
3579
3713
  return `${e.app.appID}_material`;
3580
3714
  }
@@ -3591,7 +3725,7 @@ function Br(i, e) {
3591
3725
  Oe,
3592
3726
  {
3593
3727
  title: `Material ${l}`,
3594
- items: ws(r[l], i, e)
3728
+ items: Os(r[l], i, e)
3595
3729
  },
3596
3730
  `Material ${l}`
3597
3731
  )
@@ -3602,7 +3736,7 @@ function Br(i, e) {
3602
3736
  Oe,
3603
3737
  {
3604
3738
  title: "Material",
3605
- items: ws(r, i, e),
3739
+ items: Os(r, i, e),
3606
3740
  expanded: n,
3607
3741
  onToggle: (o) => {
3608
3742
  a(o);
@@ -3610,42 +3744,42 @@ function Br(i, e) {
3610
3744
  }
3611
3745
  );
3612
3746
  }
3613
- const xs = "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==";
3614
- function Vr(i) {
3615
- const e = i.step !== void 0 ? i.step : 0.01, t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), [o] = Z(i.value), [c, l] = Z(i.value.offset[0]), [d, p] = Z(i.value.offset[1]), [m, f] = Z(i.value.repeat[0]), [w, v] = Z(i.value.repeat[1]);
3616
- function x(y, E, C, S, O) {
3747
+ const Ts = "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==";
3748
+ function Br(i) {
3749
+ const e = i.step !== void 0 ? i.step : 0.01, t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), [o] = B(i.value), [c, l] = B(i.value.offset[0]), [d, p] = B(i.value.offset[1]), [m, f] = B(i.value.repeat[0]), [E, v] = B(i.value.repeat[1]);
3750
+ function x(y, C, w, S, O) {
3617
3751
  if (i.onChange !== void 0) {
3618
3752
  const I = i.prop !== void 0 ? i.prop : i.title;
3619
3753
  i.onChange(I, {
3620
3754
  src: y,
3621
- offset: [E, C],
3755
+ offset: [C, w],
3622
3756
  repeat: [S, O]
3623
3757
  });
3624
3758
  }
3625
3759
  }
3626
3760
  function g(y) {
3627
- const E = t.current.src, C = y.target.value;
3761
+ const C = t.current.src, w = y.target.value;
3628
3762
  switch (y.target) {
3629
3763
  case s.current:
3630
- l(C), x(E, C, d, m, w);
3764
+ l(w), x(C, w, d, m, E);
3631
3765
  break;
3632
3766
  case n.current:
3633
- p(C), x(E, c, C, m, w);
3767
+ p(w), x(C, c, w, m, E);
3634
3768
  break;
3635
3769
  case a.current:
3636
- f(C), x(E, c, d, C, w);
3770
+ f(w), x(C, c, d, w, E);
3637
3771
  break;
3638
3772
  case r.current:
3639
- v(C), x(E, c, d, m, C);
3773
+ v(w), x(C, c, d, m, w);
3640
3774
  break;
3641
3775
  }
3642
3776
  }
3643
3777
  return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
3644
3778
  /* @__PURE__ */ u.jsx("img", { alt: i.title, ref: t, onClick: () => {
3645
- Dr().then((y) => {
3646
- t.current.src = y, x(y, c, d, m, w);
3779
+ Ar().then((y) => {
3780
+ t.current.src = y, x(y, c, d, m, E);
3647
3781
  });
3648
- }, src: o.src.length > 0 ? o.src : xs }),
3782
+ }, src: o.src.length > 0 ? o.src : Ts }),
3649
3783
  /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
3650
3784
  /* @__PURE__ */ u.jsxs("div", { children: [
3651
3785
  /* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
@@ -3687,22 +3821,22 @@ function Vr(i) {
3687
3821
  {
3688
3822
  ref: r,
3689
3823
  type: "number",
3690
- value: w,
3824
+ value: E,
3691
3825
  step: e,
3692
3826
  onChange: g
3693
3827
  }
3694
3828
  )
3695
3829
  ] }),
3696
3830
  /* @__PURE__ */ u.jsx("button", { onClick: () => {
3697
- x("", c, d, m, w), t.current.src = xs;
3831
+ x("", c, d, m, E), t.current.src = Ts;
3698
3832
  }, children: "Clear" })
3699
3833
  ] })
3700
3834
  ] });
3701
3835
  }
3702
- function ii(i) {
3836
+ function si(i) {
3703
3837
  let e = i.value;
3704
- e !== void 0 && (e.isColor !== void 0 ? e = ms(i.value) : i.type === "color" && (e = ms(new et().setStyle(i.value, jt))));
3705
- const [t, s] = Z(e), n = J(null), a = (l) => {
3838
+ e !== void 0 && (e.isColor !== void 0 ? e = gs(i.value) : i.type === "color" && (e = gs(new et().setStyle(i.value, jt))));
3839
+ const [t, s] = B(e), n = J(null), a = (l) => {
3706
3840
  let d = l.target.value;
3707
3841
  if (i.type === "boolean")
3708
3842
  d = l.target.checked;
@@ -3717,7 +3851,7 @@ function ii(i) {
3717
3851
  const o = i.type === "string" && (t.length > 100 || t.search(`
3718
3852
  `) > -1), c = o || i.type === "image" || i.type === "vector2";
3719
3853
  return /* @__PURE__ */ u.jsxs("div", { className: `field ${c ? "block" : ""}`, style: r, children: [
3720
- i.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: n, children: ri(i.title) }, "fieldLabel"),
3854
+ i.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: n, children: oi(i.title) }, "fieldLabel"),
3721
3855
  i.type === "string" && !o && /* @__PURE__ */ u.jsx(
3722
3856
  "input",
3723
3857
  {
@@ -3791,15 +3925,15 @@ function ii(i) {
3791
3925
  children: i.title
3792
3926
  }
3793
3927
  ),
3794
- i.type === "image" && /* @__PURE__ */ u.jsx(Vr, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
3795
- i.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: a, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, d) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: ri(l.title) }, d)) }) }),
3928
+ i.type === "image" && /* @__PURE__ */ u.jsx(Br, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
3929
+ i.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: a, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, d) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: oi(l.title) }, d)) }) }),
3796
3930
  i.type === "vector2" && /* @__PURE__ */ u.jsx(wr, { step: i.step, value: t, min: 0, max: 1, onChange: a }),
3797
- i.type === "grid3" && /* @__PURE__ */ u.jsx(Ss, { step: i.step, value: t, onChange: a }),
3798
- i.type === "grid4" && /* @__PURE__ */ u.jsx(Mr, { step: i.step, value: t, onChange: a }),
3799
- i.type === "euler" && /* @__PURE__ */ u.jsx(Ss, { step: i.step, value: t, onChange: a })
3931
+ i.type === "grid3" && /* @__PURE__ */ u.jsx(xs, { step: i.step, value: t, onChange: a }),
3932
+ i.type === "grid4" && /* @__PURE__ */ u.jsx(Tr, { step: i.step, value: t, onChange: a }),
3933
+ i.type === "euler" && /* @__PURE__ */ u.jsx(xs, { step: i.step, value: t, onChange: a })
3800
3934
  ] });
3801
3935
  }
3802
- function Zr(i) {
3936
+ function Vr(i) {
3803
3937
  return "items" in i;
3804
3938
  }
3805
3939
  class Oe extends Ft {
@@ -3854,15 +3988,15 @@ class Oe extends Ft {
3854
3988
  render() {
3855
3989
  const e = [];
3856
3990
  return this.props.items.forEach((t) => {
3857
- if (Zr(t))
3991
+ if (Vr(t))
3858
3992
  e.push(
3859
- /* @__PURE__ */ u.jsx(Oe, { title: ri(t.title), items: t.items }, Math.random())
3993
+ /* @__PURE__ */ u.jsx(Oe, { title: oi(t.title), items: t.items }, Math.random())
3860
3994
  );
3861
3995
  else {
3862
3996
  const s = this.valueOverrides.get(t.title), n = s !== void 0 ? s : t.value;
3863
3997
  e.push(
3864
3998
  /* @__PURE__ */ u.jsx(
3865
- ii,
3999
+ si,
3866
4000
  {
3867
4001
  title: t.title,
3868
4002
  prop: t.prop,
@@ -3885,7 +4019,7 @@ class Oe extends Ft {
3885
4019
  );
3886
4020
  }
3887
4021
  }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ u.jsx(
3888
- oi,
4022
+ li,
3889
4023
  {
3890
4024
  label: this.props.title,
3891
4025
  open: this.props.expanded === !0,
@@ -3987,7 +4121,7 @@ class te extends Ft {
3987
4121
  }
3988
4122
  }
3989
4123
  }
3990
- function Os(i) {
4124
+ function Ms(i) {
3991
4125
  switch (i) {
3992
4126
  case "fov":
3993
4127
  return "FOV";
@@ -4016,7 +4150,7 @@ function Os(i) {
4016
4150
  }
4017
4151
  return i;
4018
4152
  }
4019
- function Wr(i, e) {
4153
+ function Zr(i, e) {
4020
4154
  function t() {
4021
4155
  return `${e.app.appID}_camera`;
4022
4156
  }
@@ -4028,7 +4162,7 @@ function Wr(i, e) {
4028
4162
  if (i.perspectiveCameraInfo !== void 0)
4029
4163
  for (const o in i.perspectiveCameraInfo)
4030
4164
  r.push({
4031
- title: Os(o),
4165
+ title: Ms(o),
4032
4166
  prop: o,
4033
4167
  type: "number",
4034
4168
  step: 0.01,
@@ -4045,7 +4179,7 @@ function Wr(i, e) {
4045
4179
  else if (i.orthographicCameraInfo !== void 0)
4046
4180
  for (const o in i.orthographicCameraInfo)
4047
4181
  r.push({
4048
- title: Os(o),
4182
+ title: Ms(o),
4049
4183
  prop: o,
4050
4184
  type: "number",
4051
4185
  step: 0.01,
@@ -4071,14 +4205,14 @@ function Wr(i, e) {
4071
4205
  }
4072
4206
  );
4073
4207
  }
4074
- class Gr extends Ie {
4208
+ class Wr extends Ie {
4075
4209
  constructor(e, t) {
4076
4210
  const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new _t();
4077
4211
  n.setAttribute("position", new Ke(s, 3)), n.computeBoundingSphere();
4078
- const a = new Zi({ fog: !1 });
4212
+ const a = new Gi({ fog: !1 });
4079
4213
  super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
4080
4214
  const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new _t();
4081
- o.setAttribute("position", new Ke(r, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: $s, fog: !1 })));
4215
+ o.setAttribute("position", new Ke(r, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Ks, fog: !1 })));
4082
4216
  }
4083
4217
  updateMatrixWorld() {
4084
4218
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -4094,7 +4228,7 @@ class Gr extends Ie {
4094
4228
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
4095
4229
  }
4096
4230
  }
4097
- const Ts = { type: "change" }, Xi = { type: "start" }, Sn = { type: "end" }, Wt = new da(), Ms = new ua(), Xr = Math.cos(70 * pa.DEG2RAD), oe = new P(), ye = 2 * Math.PI, V = {
4231
+ const Ps = { type: "change" }, qi = { type: "start" }, Tn = { type: "end" }, Wt = new fa(), As = new ga(), Gr = Math.cos(70 * _a.DEG2RAD), oe = new P(), ye = 2 * Math.PI, Z = {
4098
4232
  NONE: -1,
4099
4233
  ROTATE: 0,
4100
4234
  DOLLY: 1,
@@ -4103,10 +4237,10 @@ const Ts = { type: "change" }, Xi = { type: "start" }, Sn = { type: "end" }, Wt
4103
4237
  TOUCH_PAN: 4,
4104
4238
  TOUCH_DOLLY_PAN: 5,
4105
4239
  TOUCH_DOLLY_ROTATE: 6
4106
- }, Ci = 1e-6;
4107
- class $r extends dn {
4240
+ }, wi = 1e-6;
4241
+ class Xr extends pn {
4108
4242
  constructor(e, t = null) {
4109
- super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ki(), this._sphericalDelta = new ki(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Kr.bind(this), this._onPointerDown = qr.bind(this), this._onPointerUp = Qr.bind(this), this._onContextMenu = ao.bind(this), this._onMouseWheel = to.bind(this), this._onKeyDown = io.bind(this), this._onTouchStart = so.bind(this), this._onTouchMove = no.bind(this), this._onMouseDown = Jr.bind(this), this._onMouseMove = eo.bind(this), this._interceptControlDown = ro.bind(this), this._interceptControlUp = oo.bind(this), this.domElement !== null && this.connect(), this.update();
4243
+ super(e, t), this.state = Z.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ui(), this._sphericalDelta = new Ui(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = qr.bind(this), this._onPointerDown = $r.bind(this), this._onPointerUp = Kr.bind(this), this._onContextMenu = no.bind(this), this._onMouseWheel = eo.bind(this), this._onKeyDown = to.bind(this), this._onTouchStart = io.bind(this), this._onTouchMove = so.bind(this), this._onMouseDown = Qr.bind(this), this._onMouseMove = Jr.bind(this), this._interceptControlDown = ao.bind(this), this._interceptControlUp = ro.bind(this), this.domElement !== null && this.connect(), this.update();
4110
4244
  }
4111
4245
  connect() {
4112
4246
  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";
@@ -4136,11 +4270,11 @@ class $r extends dn {
4136
4270
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
4137
4271
  }
4138
4272
  reset() {
4139
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ts), this.update(), this.state = V.NONE;
4273
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ps), this.update(), this.state = Z.NONE;
4140
4274
  }
4141
4275
  update(e = null) {
4142
4276
  const t = this.object.position;
4143
- oe.copy(t).sub(this.target), oe.applyQuaternion(this._quat), this._spherical.setFromVector3(oe), this.autoRotate && this.state === V.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
4277
+ oe.copy(t).sub(this.target), oe.applyQuaternion(this._quat), this._spherical.setFromVector3(oe), this.autoRotate && this.state === Z.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
4144
4278
  let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
4145
4279
  isFinite(s) && isFinite(n) && (s < -Math.PI ? s += ye : s > Math.PI && (s -= ye), n < -Math.PI ? n += ye : n > Math.PI && (n -= ye), s <= n ? this._spherical.theta = Math.max(s, Math.min(n, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (s + n) / 2 ? Math.max(s, this._spherical.theta) : Math.min(n, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
4146
4280
  let a = !1;
@@ -4166,12 +4300,12 @@ class $r extends dn {
4166
4300
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), r = oe.length();
4167
4301
  } else
4168
4302
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
4169
- r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wt.origin.copy(this.object.position), Wt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wt.direction)) < Xr ? this.object.lookAt(this.target) : (Ms.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(Ms, this.target))));
4303
+ r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wt.origin.copy(this.object.position), Wt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wt.direction)) < Gr ? this.object.lookAt(this.target) : (As.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(As, this.target))));
4170
4304
  } else if (this.object.isOrthographicCamera) {
4171
4305
  const r = this.object.zoom;
4172
4306
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), r !== this.object.zoom && (this.object.updateProjectionMatrix(), a = !0);
4173
4307
  }
4174
- return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > Ci || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Ci || this._lastTargetPosition.distanceToSquared(this.target) > Ci ? (this.dispatchEvent(Ts), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
4308
+ return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > wi || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > wi || this._lastTargetPosition.distanceToSquared(this.target) > wi ? (this.dispatchEvent(Ps), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
4175
4309
  }
4176
4310
  _getAutoRotationAngle(e) {
4177
4311
  return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
@@ -4365,16 +4499,16 @@ class $r extends dn {
4365
4499
  return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
4366
4500
  }
4367
4501
  }
4368
- function qr(i) {
4502
+ function $r(i) {
4369
4503
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(i) && (this._addPointer(i), i.pointerType === "touch" ? this._onTouchStart(i) : this._onMouseDown(i)));
4370
4504
  }
4371
- function Kr(i) {
4505
+ function qr(i) {
4372
4506
  this.enabled !== !1 && (i.pointerType === "touch" ? this._onTouchMove(i) : this._onMouseMove(i));
4373
4507
  }
4374
- function Qr(i) {
4508
+ function Kr(i) {
4375
4509
  switch (this._removePointer(i), this._pointers.length) {
4376
4510
  case 0:
4377
- this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Sn), this.state = V.NONE;
4511
+ this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Tn), this.state = Z.NONE;
4378
4512
  break;
4379
4513
  case 1:
4380
4514
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -4382,7 +4516,7 @@ function Qr(i) {
4382
4516
  break;
4383
4517
  }
4384
4518
  }
4385
- function Jr(i) {
4519
+ function Qr(i) {
4386
4520
  let e;
4387
4521
  switch (i.button) {
4388
4522
  case 0:
@@ -4401,76 +4535,76 @@ function Jr(i) {
4401
4535
  case gt.DOLLY:
4402
4536
  if (this.enableZoom === !1)
4403
4537
  return;
4404
- this._handleMouseDownDolly(i), this.state = V.DOLLY;
4538
+ this._handleMouseDownDolly(i), this.state = Z.DOLLY;
4405
4539
  break;
4406
4540
  case gt.ROTATE:
4407
4541
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
4408
4542
  if (this.enablePan === !1)
4409
4543
  return;
4410
- this._handleMouseDownPan(i), this.state = V.PAN;
4544
+ this._handleMouseDownPan(i), this.state = Z.PAN;
4411
4545
  } else {
4412
4546
  if (this.enableRotate === !1)
4413
4547
  return;
4414
- this._handleMouseDownRotate(i), this.state = V.ROTATE;
4548
+ this._handleMouseDownRotate(i), this.state = Z.ROTATE;
4415
4549
  }
4416
4550
  break;
4417
4551
  case gt.PAN:
4418
4552
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
4419
4553
  if (this.enableRotate === !1)
4420
4554
  return;
4421
- this._handleMouseDownRotate(i), this.state = V.ROTATE;
4555
+ this._handleMouseDownRotate(i), this.state = Z.ROTATE;
4422
4556
  } else {
4423
4557
  if (this.enablePan === !1)
4424
4558
  return;
4425
- this._handleMouseDownPan(i), this.state = V.PAN;
4559
+ this._handleMouseDownPan(i), this.state = Z.PAN;
4426
4560
  }
4427
4561
  break;
4428
4562
  default:
4429
- this.state = V.NONE;
4563
+ this.state = Z.NONE;
4430
4564
  }
4431
- this.state !== V.NONE && this.dispatchEvent(Xi);
4565
+ this.state !== Z.NONE && this.dispatchEvent(qi);
4432
4566
  }
4433
- function eo(i) {
4567
+ function Jr(i) {
4434
4568
  switch (this.state) {
4435
- case V.ROTATE:
4569
+ case Z.ROTATE:
4436
4570
  if (this.enableRotate === !1)
4437
4571
  return;
4438
4572
  this._handleMouseMoveRotate(i);
4439
4573
  break;
4440
- case V.DOLLY:
4574
+ case Z.DOLLY:
4441
4575
  if (this.enableZoom === !1)
4442
4576
  return;
4443
4577
  this._handleMouseMoveDolly(i);
4444
4578
  break;
4445
- case V.PAN:
4579
+ case Z.PAN:
4446
4580
  if (this.enablePan === !1)
4447
4581
  return;
4448
4582
  this._handleMouseMovePan(i);
4449
4583
  break;
4450
4584
  }
4451
4585
  }
4452
- function to(i) {
4453
- this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (i.preventDefault(), this.dispatchEvent(Xi), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(Sn));
4586
+ function eo(i) {
4587
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== Z.NONE || (i.preventDefault(), this.dispatchEvent(qi), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(Tn));
4454
4588
  }
4455
- function io(i) {
4589
+ function to(i) {
4456
4590
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(i);
4457
4591
  }
4458
- function so(i) {
4592
+ function io(i) {
4459
4593
  switch (this._trackPointer(i), this._pointers.length) {
4460
4594
  case 1:
4461
4595
  switch (this.touches.ONE) {
4462
4596
  case ft.ROTATE:
4463
4597
  if (this.enableRotate === !1)
4464
4598
  return;
4465
- this._handleTouchStartRotate(i), this.state = V.TOUCH_ROTATE;
4599
+ this._handleTouchStartRotate(i), this.state = Z.TOUCH_ROTATE;
4466
4600
  break;
4467
4601
  case ft.PAN:
4468
4602
  if (this.enablePan === !1)
4469
4603
  return;
4470
- this._handleTouchStartPan(i), this.state = V.TOUCH_PAN;
4604
+ this._handleTouchStartPan(i), this.state = Z.TOUCH_PAN;
4471
4605
  break;
4472
4606
  default:
4473
- this.state = V.NONE;
4607
+ this.state = Z.NONE;
4474
4608
  }
4475
4609
  break;
4476
4610
  case 2:
@@ -4478,55 +4612,55 @@ function so(i) {
4478
4612
  case ft.DOLLY_PAN:
4479
4613
  if (this.enableZoom === !1 && this.enablePan === !1)
4480
4614
  return;
4481
- this._handleTouchStartDollyPan(i), this.state = V.TOUCH_DOLLY_PAN;
4615
+ this._handleTouchStartDollyPan(i), this.state = Z.TOUCH_DOLLY_PAN;
4482
4616
  break;
4483
4617
  case ft.DOLLY_ROTATE:
4484
4618
  if (this.enableZoom === !1 && this.enableRotate === !1)
4485
4619
  return;
4486
- this._handleTouchStartDollyRotate(i), this.state = V.TOUCH_DOLLY_ROTATE;
4620
+ this._handleTouchStartDollyRotate(i), this.state = Z.TOUCH_DOLLY_ROTATE;
4487
4621
  break;
4488
4622
  default:
4489
- this.state = V.NONE;
4623
+ this.state = Z.NONE;
4490
4624
  }
4491
4625
  break;
4492
4626
  default:
4493
- this.state = V.NONE;
4627
+ this.state = Z.NONE;
4494
4628
  }
4495
- this.state !== V.NONE && this.dispatchEvent(Xi);
4629
+ this.state !== Z.NONE && this.dispatchEvent(qi);
4496
4630
  }
4497
- function no(i) {
4631
+ function so(i) {
4498
4632
  switch (this._trackPointer(i), this.state) {
4499
- case V.TOUCH_ROTATE:
4633
+ case Z.TOUCH_ROTATE:
4500
4634
  if (this.enableRotate === !1)
4501
4635
  return;
4502
4636
  this._handleTouchMoveRotate(i), this.update();
4503
4637
  break;
4504
- case V.TOUCH_PAN:
4638
+ case Z.TOUCH_PAN:
4505
4639
  if (this.enablePan === !1)
4506
4640
  return;
4507
4641
  this._handleTouchMovePan(i), this.update();
4508
4642
  break;
4509
- case V.TOUCH_DOLLY_PAN:
4643
+ case Z.TOUCH_DOLLY_PAN:
4510
4644
  if (this.enableZoom === !1 && this.enablePan === !1)
4511
4645
  return;
4512
4646
  this._handleTouchMoveDollyPan(i), this.update();
4513
4647
  break;
4514
- case V.TOUCH_DOLLY_ROTATE:
4648
+ case Z.TOUCH_DOLLY_ROTATE:
4515
4649
  if (this.enableZoom === !1 && this.enableRotate === !1)
4516
4650
  return;
4517
4651
  this._handleTouchMoveDollyRotate(i), this.update();
4518
4652
  break;
4519
4653
  default:
4520
- this.state = V.NONE;
4654
+ this.state = Z.NONE;
4521
4655
  }
4522
4656
  }
4523
- function ao(i) {
4657
+ function no(i) {
4524
4658
  this.enabled !== !1 && i.preventDefault();
4525
4659
  }
4526
- function ro(i) {
4660
+ function ao(i) {
4527
4661
  i.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4528
4662
  }
4529
- function oo(i) {
4663
+ function ro(i) {
4530
4664
  i.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
4531
4665
  }
4532
4666
  /*!
@@ -4568,17 +4702,17 @@ function Ze(i) {
4568
4702
  function Be(i) {
4569
4703
  return i.isOrthographicCamera;
4570
4704
  }
4571
- const ht = Math.PI * 2, Ps = Math.PI / 2, wn = 1e-5, xt = Math.PI / 180;
4705
+ const ht = Math.PI * 2, Ds = Math.PI / 2, Mn = 1e-5, xt = Math.PI / 180;
4572
4706
  function Me(i, e, t) {
4573
4707
  return Math.max(e, Math.min(t, i));
4574
4708
  }
4575
- function q(i, e = wn) {
4709
+ function q(i, e = Mn) {
4576
4710
  return Math.abs(i) < e;
4577
4711
  }
4578
- function Y(i, e, t = wn) {
4712
+ function Y(i, e, t = Mn) {
4579
4713
  return q(i - e, t);
4580
4714
  }
4581
- function As(i, e) {
4715
+ function Rs(i, e) {
4582
4716
  return Math.round(i / e) * e;
4583
4717
  }
4584
4718
  function Ot(i) {
@@ -4598,30 +4732,30 @@ function Gt(i, e, t, s, n = 1 / 0, a) {
4598
4732
  let f = e + (l + m) * c;
4599
4733
  return d - i > 0 == f > d && (f = d, t.value = (f - d) / a), f;
4600
4734
  }
4601
- function Ds(i, e, t, s, n = 1 / 0, a, r) {
4735
+ function Is(i, e, t, s, n = 1 / 0, a, r) {
4602
4736
  s = Math.max(1e-4, s);
4603
4737
  const o = 2 / s, c = o * a, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
4604
- let d = e.x, p = e.y, m = e.z, f = i.x - d, w = i.y - p, v = i.z - m;
4605
- const x = d, g = p, y = m, E = n * s, C = E * E, S = f * f + w * w + v * v;
4606
- if (S > C) {
4738
+ let d = e.x, p = e.y, m = e.z, f = i.x - d, E = i.y - p, v = i.z - m;
4739
+ const x = d, g = p, y = m, C = n * s, w = C * C, S = f * f + E * E + v * v;
4740
+ if (S > w) {
4607
4741
  const $ = Math.sqrt(S);
4608
- f = f / $ * E, w = w / $ * E, v = v / $ * E;
4742
+ f = f / $ * C, E = E / $ * C, v = v / $ * C;
4609
4743
  }
4610
- d = i.x - f, p = i.y - w, m = i.z - v;
4611
- const O = (t.x + o * f) * a, I = (t.y + o * w) * a, U = (t.z + o * v) * a;
4612
- t.x = (t.x - o * O) * l, t.y = (t.y - o * I) * l, t.z = (t.z - o * U) * l, r.x = d + (f + O) * l, r.y = p + (w + I) * l, r.z = m + (v + U) * l;
4613
- const R = x - i.x, B = g - i.y, Se = y - i.z, _e = r.x - x, re = r.y - g, K = r.z - y;
4614
- return R * _e + B * re + Se * K > 0 && (r.x = x, r.y = g, r.z = y, t.x = (r.x - x) / a, t.y = (r.y - g) / a, t.z = (r.z - y) / a), r;
4744
+ d = i.x - f, p = i.y - E, m = i.z - v;
4745
+ const O = (t.x + o * f) * a, I = (t.y + o * E) * a, U = (t.z + o * v) * a;
4746
+ t.x = (t.x - o * O) * l, t.y = (t.y - o * I) * l, t.z = (t.z - o * U) * l, r.x = d + (f + O) * l, r.y = p + (E + I) * l, r.z = m + (v + U) * l;
4747
+ const R = x - i.x, V = g - i.y, we = y - i.z, _e = r.x - x, re = r.y - g, K = r.z - y;
4748
+ return R * _e + V * re + we * K > 0 && (r.x = x, r.y = g, r.z = y, t.x = (r.x - x) / a, t.y = (r.y - g) / a, t.z = (r.z - y) / a), r;
4615
4749
  }
4616
4750
  function Si(i, e) {
4617
4751
  e.set(0, 0), i.forEach((t) => {
4618
4752
  e.x += t.clientX, e.y += t.clientY;
4619
4753
  }), e.x /= i.length, e.y /= i.length;
4620
4754
  }
4621
- function wi(i, e) {
4755
+ function xi(i, e) {
4622
4756
  return Be(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
4623
4757
  }
4624
- class lo {
4758
+ class oo {
4625
4759
  constructor() {
4626
4760
  this._listeners = {};
4627
4761
  }
@@ -4685,10 +4819,10 @@ class lo {
4685
4819
  }
4686
4820
  }
4687
4821
  }
4688
- var xi;
4689
- const co = "2.9.0", Xt = 1 / 8, ho = /Mac/.test((xi = globalThis?.navigator) === null || xi === void 0 ? void 0 : xi.platform);
4690
- let L, Rs, $t, Oi, be, j, z, dt, Mt, Ae, De, We, Is, Ls, xe, Pt, ut, ks, Ti, Us, Mi, Pi, qt;
4691
- class ke extends lo {
4822
+ var Oi;
4823
+ const lo = "2.9.0", Xt = 1 / 8, co = /Mac/.test((Oi = globalThis?.navigator) === null || Oi === void 0 ? void 0 : Oi.platform);
4824
+ let L, Ls, $t, Ti, be, j, z, dt, Mt, Ae, De, We, ks, Us, xe, Pt, ut, js, Mi, Ns, Pi, Ai, qt;
4825
+ class ke extends oo {
4692
4826
  /**
4693
4827
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
4694
4828
  *
@@ -4730,7 +4864,7 @@ class ke extends lo {
4730
4864
  * @category Statics
4731
4865
  */
4732
4866
  static install(e) {
4733
- L = e.THREE, Rs = Object.freeze(new L.Vector3(0, 0, 0)), $t = Object.freeze(new L.Vector3(0, 1, 0)), Oi = Object.freeze(new L.Vector3(0, 0, 1)), be = new L.Vector2(), j = new L.Vector3(), z = new L.Vector3(), dt = new L.Vector3(), Mt = new L.Vector3(), Ae = new L.Vector3(), De = new L.Vector3(), We = new L.Vector3(), Is = new L.Vector3(), Ls = new L.Vector3(), xe = new L.Spherical(), Pt = new L.Spherical(), ut = new L.Box3(), ks = new L.Box3(), Ti = new L.Sphere(), Us = new L.Quaternion(), Mi = new L.Quaternion(), Pi = new L.Matrix4(), qt = new L.Raycaster();
4867
+ L = e.THREE, Ls = Object.freeze(new L.Vector3(0, 0, 0)), $t = Object.freeze(new L.Vector3(0, 1, 0)), Ti = Object.freeze(new L.Vector3(0, 0, 1)), be = new L.Vector2(), j = new L.Vector3(), z = new L.Vector3(), dt = new L.Vector3(), Mt = new L.Vector3(), Ae = new L.Vector3(), De = new L.Vector3(), We = new L.Vector3(), ks = new L.Vector3(), Us = new L.Vector3(), xe = new L.Spherical(), Pt = new L.Spherical(), ut = new L.Box3(), js = new L.Box3(), Mi = new L.Sphere(), Ns = new L.Quaternion(), Pi = new L.Quaternion(), Ai = new L.Matrix4(), qt = new L.Raycaster();
4734
4868
  }
4735
4869
  /**
4736
4870
  * list all ACTIONs
@@ -4758,26 +4892,26 @@ class ke extends lo {
4758
4892
  */
4759
4893
  constructor(e, t) {
4760
4894
  super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
4761
- }, this._enabled = !0, this._state = _.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = ct.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new L.Vector3(), this._focalOffsetVelocity = new L.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, y, E) => {
4762
- let C, S;
4895
+ }, this._enabled = !0, this._state = _.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = ct.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new L.Vector3(), this._focalOffsetVelocity = new L.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, y, C) => {
4896
+ let w, S;
4763
4897
  if (Ze(this._camera)) {
4764
4898
  const O = j.copy(this._camera.position).sub(this._target), I = this._camera.getEffectiveFOV() * xt, U = O.length() * Math.tan(I * 0.5);
4765
- C = this.truckSpeed * g * U / this._elementRect.height, S = this.truckSpeed * y * U / this._elementRect.height;
4899
+ w = this.truckSpeed * g * U / this._elementRect.height, S = this.truckSpeed * y * U / this._elementRect.height;
4766
4900
  } else if (Be(this._camera)) {
4767
4901
  const O = this._camera;
4768
- C = g * (O.right - O.left) / O.zoom / this._elementRect.width, S = y * (O.top - O.bottom) / O.zoom / this._elementRect.height;
4902
+ w = g * (O.right - O.left) / O.zoom / this._elementRect.width, S = y * (O.top - O.bottom) / O.zoom / this._elementRect.height;
4769
4903
  } else
4770
4904
  return;
4771
- this.verticalDragToForward ? (E ? this.setFocalOffset(this._focalOffsetEnd.x + C, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(C, 0, !0), this.forward(-S, !0)) : E ? this.setFocalOffset(this._focalOffsetEnd.x + C, this._focalOffsetEnd.y + S, this._focalOffsetEnd.z, !0) : this.truck(C, S, !0);
4905
+ this.verticalDragToForward ? (C ? this.setFocalOffset(this._focalOffsetEnd.x + w, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(w, 0, !0), this.forward(-S, !0)) : C ? this.setFocalOffset(this._focalOffsetEnd.x + w, this._focalOffsetEnd.y + S, this._focalOffsetEnd.z, !0) : this.truck(w, S, !0);
4772
4906
  }, this._rotateInternal = (g, y) => {
4773
- const E = ht * this.azimuthRotateSpeed * g / this._elementRect.height, C = ht * this.polarRotateSpeed * y / this._elementRect.height;
4774
- this.rotate(E, C, !0);
4775
- }, this._dollyInternal = (g, y, E) => {
4776
- const C = Math.pow(0.95, -g * this.dollySpeed), S = this._sphericalEnd.radius, O = this._sphericalEnd.radius * C, I = Me(O, this.minDistance, this.maxDistance), U = I - O;
4777
- this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(O, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(U, !0), this._dollyToNoClamp(I, !0)) : this._dollyToNoClamp(I, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? O : I) - S, this._dollyControlCoord.set(y, E)), this._lastDollyDirection = Math.sign(-g);
4778
- }, this._zoomInternal = (g, y, E) => {
4779
- const C = Math.pow(0.95, g * this.dollySpeed), S = this._zoom, O = this._zoom * C;
4780
- this.zoomTo(O, !0), this.dollyToCursor && (this._changedZoom += O - S, this._dollyControlCoord.set(y, E));
4907
+ const C = ht * this.azimuthRotateSpeed * g / this._elementRect.height, w = ht * this.polarRotateSpeed * y / this._elementRect.height;
4908
+ this.rotate(C, w, !0);
4909
+ }, this._dollyInternal = (g, y, C) => {
4910
+ const w = Math.pow(0.95, -g * this.dollySpeed), S = this._sphericalEnd.radius, O = this._sphericalEnd.radius * w, I = Me(O, this.minDistance, this.maxDistance), U = I - O;
4911
+ this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(O, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(U, !0), this._dollyToNoClamp(I, !0)) : this._dollyToNoClamp(I, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? O : I) - S, this._dollyControlCoord.set(y, C)), this._lastDollyDirection = Math.sign(-g);
4912
+ }, this._zoomInternal = (g, y, C) => {
4913
+ const w = Math.pow(0.95, g * this.dollySpeed), S = this._zoom, O = this._zoom * w;
4914
+ this.zoomTo(O, !0), this.dollyToCursor && (this._changedZoom += O - S, this._dollyControlCoord.set(y, C));
4781
4915
  }, typeof L > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new L.Quaternion().setFromUnitVectors(this._camera.up, $t), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = _.NONE, this._target = new L.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new L.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new L.Spherical().setFromVector3(j.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
4782
4916
  new L.Vector3(),
4783
4917
  new L.Vector3(),
@@ -4797,18 +4931,18 @@ class ke extends lo {
4797
4931
  if (!this._enabled || !this._domElement)
4798
4932
  return;
4799
4933
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
4800
- const C = this._domElement.getBoundingClientRect(), S = g.clientX / C.width, O = g.clientY / C.height;
4934
+ const w = this._domElement.getBoundingClientRect(), S = g.clientX / w.width, O = g.clientY / w.height;
4801
4935
  if (S < this._interactiveArea.left || S > this._interactiveArea.right || O < this._interactiveArea.top || O > this._interactiveArea.bottom)
4802
4936
  return;
4803
4937
  }
4804
4938
  const y = g.pointerType !== "mouse" ? null : (g.buttons & ee.LEFT) === ee.LEFT ? ee.LEFT : (g.buttons & ee.MIDDLE) === ee.MIDDLE ? ee.MIDDLE : (g.buttons & ee.RIGHT) === ee.RIGHT ? ee.RIGHT : null;
4805
4939
  if (y !== null) {
4806
- const C = this._findPointerByMouseButton(y);
4807
- C && this._disposePointer(C);
4940
+ const w = this._findPointerByMouseButton(y);
4941
+ w && this._disposePointer(w);
4808
4942
  }
4809
4943
  if ((g.buttons & ee.LEFT) === ee.LEFT && this._lockedPointer)
4810
4944
  return;
4811
- const E = {
4945
+ const C = {
4812
4946
  pointerId: g.pointerId,
4813
4947
  clientX: g.clientX,
4814
4948
  clientY: g.clientY,
@@ -4816,12 +4950,12 @@ class ke extends lo {
4816
4950
  deltaY: 0,
4817
4951
  mouseButton: y
4818
4952
  };
4819
- this._activePointers.push(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", c), this._isDragging = !0, m(g);
4953
+ this._activePointers.push(C), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", c), this._isDragging = !0, m(g);
4820
4954
  }, o = (g) => {
4821
4955
  g.cancelable && g.preventDefault();
4822
- const y = g.pointerId, E = this._lockedPointer || this._findPointerById(y);
4823
- if (E) {
4824
- if (E.clientX = g.clientX, E.clientY = g.clientY, E.deltaX = g.movementX, E.deltaY = g.movementY, this._state = 0, g.pointerType === "touch")
4956
+ const y = g.pointerId, C = this._lockedPointer || this._findPointerById(y);
4957
+ if (C) {
4958
+ if (C.clientX = g.clientX, C.clientY = g.clientY, C.deltaX = g.movementX, C.deltaY = g.movementY, this._state = 0, g.pointerType === "touch")
4825
4959
  switch (this._activePointers.length) {
4826
4960
  case 1:
4827
4961
  this._state = this.touches.one;
@@ -4857,7 +4991,7 @@ class ke extends lo {
4857
4991
  }
4858
4992
  else
4859
4993
  this._state = _.NONE;
4860
- w();
4994
+ E();
4861
4995
  }
4862
4996
  };
4863
4997
  let l = -1;
@@ -4873,7 +5007,7 @@ class ke extends lo {
4873
5007
  const O = performance.now();
4874
5008
  l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
4875
5009
  }
4876
- const y = ho ? -1 : -3, E = g.deltaMode === 1 ? g.deltaY / y : g.deltaY / (y * 10), C = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, S = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
5010
+ const y = co ? -1 : -3, C = g.deltaMode === 1 ? g.deltaY / y : g.deltaY / (y * 10), w = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, S = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4877
5011
  switch (this.mouseButtons.wheel) {
4878
5012
  case _.ROTATE: {
4879
5013
  this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
@@ -4888,11 +5022,11 @@ class ke extends lo {
4888
5022
  break;
4889
5023
  }
4890
5024
  case _.DOLLY: {
4891
- this._dollyInternal(-E, C, S), this._isUserControllingDolly = !0;
5025
+ this._dollyInternal(-C, w, S), this._isUserControllingDolly = !0;
4892
5026
  break;
4893
5027
  }
4894
5028
  case _.ZOOM: {
4895
- this._zoomInternal(-E, C, S), this._isUserControllingZoom = !0;
5029
+ this._zoomInternal(-C, w, S), this._isUserControllingZoom = !0;
4896
5030
  break;
4897
5031
  }
4898
5032
  }
@@ -4900,8 +5034,8 @@ class ke extends lo {
4900
5034
  }, p = (g) => {
4901
5035
  if (!(!this._domElement || !this._enabled)) {
4902
5036
  if (this.mouseButtons.right === ke.ACTION.NONE) {
4903
- const y = g instanceof PointerEvent ? g.pointerId : 0, E = this._findPointerById(y);
4904
- E && this._disposePointer(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c);
5037
+ const y = g instanceof PointerEvent ? g.pointerId : 0, C = this._findPointerById(y);
5038
+ C && this._disposePointer(C), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c);
4905
5039
  return;
4906
5040
  }
4907
5041
  g.preventDefault();
@@ -4910,7 +5044,7 @@ class ke extends lo {
4910
5044
  if (!this._enabled)
4911
5045
  return;
4912
5046
  if (Si(this._activePointers, be), this._getClientRect(this._elementRect), s.copy(be), n.copy(be), this._activePointers.length >= 2) {
4913
- const E = be.x - this._activePointers[1].clientX, C = be.y - this._activePointers[1].clientY, S = Math.sqrt(E * E + C * C);
5047
+ const C = be.x - this._activePointers[1].clientX, w = be.y - this._activePointers[1].clientY, S = Math.sqrt(C * C + w * w);
4914
5048
  a.set(0, S);
4915
5049
  const O = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, I = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
4916
5050
  n.set(O, I);
@@ -4936,19 +5070,19 @@ class ke extends lo {
4936
5070
  if (!this._enabled || !this._dragNeedsUpdate)
4937
5071
  return;
4938
5072
  this._dragNeedsUpdate = !1, Si(this._activePointers, be);
4939
- const y = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = y ? -y.deltaX : n.x - be.x, C = y ? -y.deltaY : n.y - be.y;
4940
- 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(E, C), this._isUserControllingRotate = !0), (this._state & _.DOLLY) === _.DOLLY || (this._state & _.ZOOM) === _.ZOOM) {
5073
+ const y = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, C = y ? -y.deltaX : n.x - be.x, w = y ? -y.deltaY : n.y - be.y;
5074
+ 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(C, w), this._isUserControllingRotate = !0), (this._state & _.DOLLY) === _.DOLLY || (this._state & _.ZOOM) === _.ZOOM) {
4941
5075
  const S = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, O = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, I = this.dollyDragInverted ? -1 : 1;
4942
- (this._state & _.DOLLY) === _.DOLLY ? (this._dollyInternal(I * C * Xt, S, O), this._isUserControllingDolly = !0) : (this._zoomInternal(I * C * Xt, S, O), this._isUserControllingZoom = !0);
5076
+ (this._state & _.DOLLY) === _.DOLLY ? (this._dollyInternal(I * w * Xt, S, O), this._isUserControllingDolly = !0) : (this._zoomInternal(I * w * Xt, S, O), this._isUserControllingZoom = !0);
4943
5077
  }
4944
5078
  if ((this._state & _.TOUCH_DOLLY) === _.TOUCH_DOLLY || (this._state & _.TOUCH_ZOOM) === _.TOUCH_ZOOM || (this._state & _.TOUCH_DOLLY_TRUCK) === _.TOUCH_DOLLY_TRUCK || (this._state & _.TOUCH_ZOOM_TRUCK) === _.TOUCH_ZOOM_TRUCK || (this._state & _.TOUCH_DOLLY_OFFSET) === _.TOUCH_DOLLY_OFFSET || (this._state & _.TOUCH_ZOOM_OFFSET) === _.TOUCH_ZOOM_OFFSET || (this._state & _.TOUCH_DOLLY_ROTATE) === _.TOUCH_DOLLY_ROTATE || (this._state & _.TOUCH_ZOOM_ROTATE) === _.TOUCH_ZOOM_ROTATE) {
4945
5079
  const S = be.x - this._activePointers[1].clientX, O = be.y - this._activePointers[1].clientY, I = Math.sqrt(S * S + O * O), U = a.y - I;
4946
5080
  a.set(0, I);
4947
- const R = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, B = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4948
- (this._state & _.TOUCH_DOLLY) === _.TOUCH_DOLLY || (this._state & _.TOUCH_DOLLY_ROTATE) === _.TOUCH_DOLLY_ROTATE || (this._state & _.TOUCH_DOLLY_TRUCK) === _.TOUCH_DOLLY_TRUCK || (this._state & _.TOUCH_DOLLY_OFFSET) === _.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(U * Xt, R, B), this._isUserControllingDolly = !0) : (this._zoomInternal(U * Xt, R, B), this._isUserControllingZoom = !0);
5081
+ const R = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, V = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
5082
+ (this._state & _.TOUCH_DOLLY) === _.TOUCH_DOLLY || (this._state & _.TOUCH_DOLLY_ROTATE) === _.TOUCH_DOLLY_ROTATE || (this._state & _.TOUCH_DOLLY_TRUCK) === _.TOUCH_DOLLY_TRUCK || (this._state & _.TOUCH_DOLLY_OFFSET) === _.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(U * Xt, R, V), this._isUserControllingDolly = !0) : (this._zoomInternal(U * Xt, R, V), this._isUserControllingZoom = !0);
4949
5083
  }
4950
- ((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(E, 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(E, C, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
4951
- }, w = () => {
5084
+ ((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(C, w, !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(C, w, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
5085
+ }, E = () => {
4952
5086
  Si(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" }));
4953
5087
  };
4954
5088
  this.lockPointer = () => {
@@ -4961,8 +5095,8 @@ class ke extends lo {
4961
5095
  mouseButton: null
4962
5096
  }, this._activePointers.push(this._lockedPointer), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.requestPointerLock(), this._domElement.ownerDocument.addEventListener("pointerlockchange", v), this._domElement.ownerDocument.addEventListener("pointerlockerror", x), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", c), m());
4963
5097
  }, this.unlockPointer = () => {
4964
- var g, y, E;
4965
- this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), this._lockedPointer = null), (g = this._domElement) === null || g === void 0 || g.ownerDocument.exitPointerLock(), (y = this._domElement) === null || y === void 0 || y.ownerDocument.removeEventListener("pointerlockchange", v), (E = this._domElement) === null || E === void 0 || E.ownerDocument.removeEventListener("pointerlockerror", x), this.cancel();
5098
+ var g, y, C;
5099
+ this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), this._lockedPointer = null), (g = this._domElement) === null || g === void 0 || g.ownerDocument.exitPointerLock(), (y = this._domElement) === null || y === void 0 || y.ownerDocument.removeEventListener("pointerlockchange", v), (C = this._domElement) === null || C === void 0 || C.ownerDocument.removeEventListener("pointerlockerror", x), this.cancel();
4966
5100
  };
4967
5101
  const v = () => {
4968
5102
  this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement || this.unlockPointer();
@@ -4974,7 +5108,7 @@ class ke extends lo {
4974
5108
  }, this._removeAllEventListeners = () => {
4975
5109
  this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("pointercancel", c), this._domElement.removeEventListener("wheel", d, { passive: !1 }), this._domElement.removeEventListener("contextmenu", p), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.removeEventListener("pointerlockchange", v), this._domElement.ownerDocument.removeEventListener("pointerlockerror", x));
4976
5110
  }, this.cancel = () => {
4977
- this._state !== _.NONE && (this._state = _.NONE, this._activePointers.length = 0, w());
5111
+ this._state !== _.NONE && (this._state = _.NONE, this._activePointers.length = 0, E());
4978
5112
  }, t && this.connect(t), this.update(0);
4979
5113
  }
4980
5114
  /**
@@ -5339,18 +5473,18 @@ class ke extends lo {
5339
5473
  fitToBox(e, t, { cover: s = !1, paddingLeft: n = 0, paddingRight: a = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
5340
5474
  const c = [], l = e.isBox3 ? ut.copy(e) : ut.setFromObject(e);
5341
5475
  l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
5342
- const d = As(this._sphericalEnd.theta, Ps), p = As(this._sphericalEnd.phi, Ps);
5476
+ const d = Rs(this._sphericalEnd.theta, Ds), p = Rs(this._sphericalEnd.phi, Ds);
5343
5477
  c.push(this.rotateTo(d, p, t));
5344
- const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = Us.setFromUnitVectors(m, Oi), w = Y(Math.abs(m.y), 1);
5345
- w && f.multiply(Mi.setFromAxisAngle($t, d)), f.multiply(this._yAxisUpSpaceInverse);
5346
- const v = ks.makeEmpty();
5347
- z.copy(l.min).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).applyQuaternion(f), v.expandByPoint(z), v.min.x -= n, v.min.y -= r, v.max.x += a, v.max.y += o, f.setFromUnitVectors(Oi, m), w && f.premultiply(Mi.invert()), f.premultiply(this._yAxisUpSpace);
5478
+ const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = Ns.setFromUnitVectors(m, Ti), E = Y(Math.abs(m.y), 1);
5479
+ E && f.multiply(Pi.setFromAxisAngle($t, d)), f.multiply(this._yAxisUpSpaceInverse);
5480
+ const v = js.makeEmpty();
5481
+ z.copy(l.min).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).applyQuaternion(f), v.expandByPoint(z), v.min.x -= n, v.min.y -= r, v.max.x += a, v.max.y += o, f.setFromUnitVectors(Ti, m), E && f.premultiply(Pi.invert()), f.premultiply(this._yAxisUpSpace);
5348
5482
  const x = v.getSize(j), g = v.getCenter(z).applyQuaternion(f);
5349
5483
  if (Ze(this._camera)) {
5350
5484
  const y = this.getDistanceToFitBox(x.x, x.y, x.z, s);
5351
5485
  c.push(this.moveTo(g.x, g.y, g.z, t)), c.push(this.dollyTo(y, t)), c.push(this.setFocalOffset(0, 0, 0, t));
5352
5486
  } else if (Be(this._camera)) {
5353
- const y = this._camera, E = y.right - y.left, C = y.top - y.bottom, S = s ? Math.max(E / x.x, C / x.y) : Math.min(E / x.x, C / x.y);
5487
+ const y = this._camera, C = y.right - y.left, w = y.top - y.bottom, S = s ? Math.max(C / x.x, w / x.y) : Math.min(C / x.x, w / x.y);
5354
5488
  c.push(this.moveTo(g.x, g.y, g.z, t)), c.push(this.zoomTo(S, t)), c.push(this.setFocalOffset(0, 0, 0, t));
5355
5489
  }
5356
5490
  return Promise.all(c);
@@ -5362,7 +5496,7 @@ class ke extends lo {
5362
5496
  * @category Methods
5363
5497
  */
5364
5498
  fitToSphere(e, t) {
5365
- const s = [], a = "isObject3D" in e ? ke.createBoundingSphere(e, Ti) : Ti.copy(e);
5499
+ const s = [], a = "isObject3D" in e ? ke.createBoundingSphere(e, Mi) : Mi.copy(e);
5366
5500
  if (s.push(this.moveTo(a.center.x, a.center.y, a.center.z, t)), Ze(this._camera)) {
5367
5501
  const r = this.getDistanceToFitSphere(a.radius);
5368
5502
  s.push(this.dollyTo(r, t));
@@ -5408,15 +5542,15 @@ class ke extends lo {
5408
5542
  * @param enableTransition
5409
5543
  * @category Methods
5410
5544
  */
5411
- lerpLookAt(e, t, s, n, a, r, o, c, l, d, p, m, f, w = !1) {
5545
+ lerpLookAt(e, t, s, n, a, r, o, c, l, d, p, m, f, E = !1) {
5412
5546
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = ct.NONE, this._changedDolly = 0;
5413
5547
  const v = j.set(n, a, r), x = z.set(e, t, s);
5414
5548
  xe.setFromVector3(x.sub(v).applyQuaternion(this._yAxisUpSpace));
5415
5549
  const g = dt.set(d, p, m), y = z.set(o, c, l);
5416
5550
  Pt.setFromVector3(y.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(g, f));
5417
- const E = Pt.theta - xe.theta, C = Pt.phi - xe.phi, S = Pt.radius - xe.radius;
5418
- this._sphericalEnd.set(xe.radius + S * f, xe.phi + C * f, xe.theta + E * f), this.normalizeRotations(), this._needsUpdate = !0, w || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
5419
- const O = !w || Y(this._target.x, this._targetEnd.x, this.restThreshold) && Y(this._target.y, this._targetEnd.y, this.restThreshold) && Y(this._target.z, this._targetEnd.z, this.restThreshold) && Y(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Y(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Y(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
5551
+ const C = Pt.theta - xe.theta, w = Pt.phi - xe.phi, S = Pt.radius - xe.radius;
5552
+ this._sphericalEnd.set(xe.radius + S * f, xe.phi + w * f, xe.theta + C * f), this.normalizeRotations(), this._needsUpdate = !0, E || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
5553
+ const O = !E || Y(this._target.x, this._targetEnd.x, this.restThreshold) && Y(this._target.y, this._targetEnd.y, this.restThreshold) && Y(this._target.z, this._targetEnd.z, this.restThreshold) && Y(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && Y(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && Y(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
5420
5554
  return this._createOnRestPromise(O);
5421
5555
  }
5422
5556
  /**
@@ -5507,7 +5641,7 @@ class ke extends lo {
5507
5641
  * @category Methods
5508
5642
  */
5509
5643
  getDistanceToFitBox(e, t, s, n = !1) {
5510
- if (wi(this._camera, "getDistanceToFitBox"))
5644
+ if (xi(this._camera, "getDistanceToFitBox"))
5511
5645
  return this._spherical.radius;
5512
5646
  const a = e / t, r = this._camera.getEffectiveFOV() * xt, o = this._camera.aspect;
5513
5647
  return ((n ? a > o : a < o) ? t : e / o) * 0.5 / Math.tan(r * 0.5) + s * 0.5;
@@ -5519,7 +5653,7 @@ class ke extends lo {
5519
5653
  * @category Methods
5520
5654
  */
5521
5655
  getDistanceToFitSphere(e) {
5522
- if (wi(this._camera, "getDistanceToFitSphere"))
5656
+ if (xi(this._camera, "getDistanceToFitSphere"))
5523
5657
  return this._spherical.radius;
5524
5658
  const t = this._camera.getEffectiveFOV() * xt, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : s;
5525
5659
  return e / Math.sin(n * 0.5);
@@ -5625,7 +5759,7 @@ class ke extends lo {
5625
5759
  * @category Methods
5626
5760
  */
5627
5761
  update(e) {
5628
- const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a = Is.subVectors(this._targetEnd, this._target), r = Ls.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5762
+ const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a = ks.subVectors(this._targetEnd, this._target), r = Us.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
5629
5763
  if (q(t))
5630
5764
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5631
5765
  else {
@@ -5648,13 +5782,13 @@ class ke extends lo {
5648
5782
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
5649
5783
  else {
5650
5784
  const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5651
- Ds(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5785
+ Is(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5652
5786
  }
5653
5787
  if (q(r.x) && q(r.y) && q(r.z))
5654
5788
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5655
5789
  else {
5656
5790
  const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5657
- Ds(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5791
+ Is(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5658
5792
  }
5659
5793
  if (q(o))
5660
5794
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
@@ -5664,22 +5798,22 @@ class ke extends lo {
5664
5798
  }
5665
5799
  if (this.dollyToCursor) {
5666
5800
  if (Ze(this._camera) && this._changedDolly !== 0) {
5667
- const p = this._spherical.radius - this._lastDistance, m = this._camera, f = this._getCameraDirection(Mt), w = j.copy(f).cross(m.up).normalize();
5668
- w.lengthSq() === 0 && (w.x = 1);
5669
- const v = z.crossVectors(w, f), x = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * xt * 0.5), y = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = dt.copy(this._targetEnd).add(w.multiplyScalar(this._dollyControlCoord.x * x * m.aspect)).add(v.multiplyScalar(this._dollyControlCoord.y * x)), C = j.copy(this._targetEnd).lerp(E, y), S = this._lastDollyDirection === ct.IN && this._spherical.radius <= this.minDistance, O = this._lastDollyDirection === ct.OUT && this.maxDistance <= this._spherical.radius;
5801
+ const p = this._spherical.radius - this._lastDistance, m = this._camera, f = this._getCameraDirection(Mt), E = j.copy(f).cross(m.up).normalize();
5802
+ E.lengthSq() === 0 && (E.x = 1);
5803
+ const v = z.crossVectors(E, f), x = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * xt * 0.5), y = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, C = dt.copy(this._targetEnd).add(E.multiplyScalar(this._dollyControlCoord.x * x * m.aspect)).add(v.multiplyScalar(this._dollyControlCoord.y * x)), w = j.copy(this._targetEnd).lerp(C, y), S = this._lastDollyDirection === ct.IN && this._spherical.radius <= this.minDistance, O = this._lastDollyDirection === ct.OUT && this.maxDistance <= this._spherical.radius;
5670
5804
  if (this.infinityDolly && (S || O)) {
5671
5805
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
5672
5806
  const U = z.copy(f).multiplyScalar(-p);
5673
- C.add(U);
5807
+ w.add(U);
5674
5808
  }
5675
- this._boundary.clampPoint(C, C);
5676
- const I = z.subVectors(C, this._targetEnd);
5677
- this._targetEnd.copy(C), this._target.add(I), this._changedDolly -= p, q(this._changedDolly) && (this._changedDolly = 0);
5809
+ this._boundary.clampPoint(w, w);
5810
+ const I = z.subVectors(w, this._targetEnd);
5811
+ this._targetEnd.copy(w), this._target.add(I), this._changedDolly -= p, q(this._changedDolly) && (this._changedDolly = 0);
5678
5812
  } else if (Be(this._camera) && this._changedZoom !== 0) {
5679
- const p = this._zoom - this._lastZoom, m = this._camera, f = j.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), w = z.set(0, 0, -1).applyQuaternion(m.quaternion), v = dt.copy(f).add(w.multiplyScalar(-f.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, y = this._getCameraDirection(Mt), E = this._targetEnd.dot(y), C = j.copy(this._targetEnd).lerp(v, g), S = C.dot(y), O = y.multiplyScalar(S - E);
5680
- C.sub(O), this._boundary.clampPoint(C, C);
5681
- const I = z.subVectors(C, this._targetEnd);
5682
- this._targetEnd.copy(C), this._target.add(I), this._changedZoom -= p, q(this._changedZoom) && (this._changedZoom = 0);
5813
+ const p = this._zoom - this._lastZoom, m = this._camera, f = j.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), E = z.set(0, 0, -1).applyQuaternion(m.quaternion), v = dt.copy(f).add(E.multiplyScalar(-f.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, y = this._getCameraDirection(Mt), C = this._targetEnd.dot(y), w = j.copy(this._targetEnd).lerp(v, g), S = w.dot(y), O = y.multiplyScalar(S - C);
5814
+ w.sub(O), this._boundary.clampPoint(w, w);
5815
+ const I = z.subVectors(w, this._targetEnd);
5816
+ this._targetEnd.copy(w), this._target.add(I), this._changedZoom -= p, q(this._changedZoom) && (this._changedZoom = 0);
5683
5817
  }
5684
5818
  }
5685
5819
  this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
@@ -5738,7 +5872,7 @@ class ke extends lo {
5738
5872
  console.warn("camera-controls is already connected.");
5739
5873
  return;
5740
5874
  }
5741
- e.setAttribute("data-camera-controls-version", co), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5875
+ e.setAttribute("data-camera-controls-version", lo), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5742
5876
  }
5743
5877
  /**
5744
5878
  * Detach all internal event handlers to disable drag control.
@@ -5798,13 +5932,13 @@ class ke extends lo {
5798
5932
  // lateUpdate
5799
5933
  _collisionTest() {
5800
5934
  let e = 1 / 0;
5801
- if (!(this.colliderMeshes.length >= 1) || wi(this._camera, "_collisionTest"))
5935
+ if (!(this.colliderMeshes.length >= 1) || xi(this._camera, "_collisionTest"))
5802
5936
  return e;
5803
5937
  const s = this._getTargetDirection(Mt);
5804
- Pi.lookAt(Rs, s, this._camera.up);
5938
+ Ai.lookAt(Ls, s, this._camera.up);
5805
5939
  for (let n = 0; n < 4; n++) {
5806
5940
  const a = z.copy(this._nearPlaneCorners[n]);
5807
- a.applyMatrix4(Pi);
5941
+ a.applyMatrix4(Ai);
5808
5942
  const r = dt.addVectors(this._target, a);
5809
5943
  qt.set(r, s), qt.far = this._spherical.radius + 1;
5810
5944
  const o = qt.intersectObjects(this.colliderMeshes);
@@ -5883,8 +6017,8 @@ class ke extends lo {
5883
6017
  }), s.radius = Math.sqrt(a), s;
5884
6018
  }
5885
6019
  }
5886
- const li = (i) => {
5887
- const [e, t] = Z(i.options[i.index]), s = () => {
6020
+ const ci = (i) => {
6021
+ const [e, t] = B(i.options[i.index]), s = () => {
5888
6022
  i.onToggle(!i.open);
5889
6023
  }, n = (a) => {
5890
6024
  a !== e && (i.onSelect(a), t(a)), i.onToggle(!1);
@@ -5893,21 +6027,21 @@ const li = (i) => {
5893
6027
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${i.title}: ${e}` }),
5894
6028
  i.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: i.options.map((a) => /* @__PURE__ */ u.jsx("li", { onClick: () => n(a), children: a }, a)) })
5895
6029
  ] });
5896
- }, Ge = Fa(function(e, t) {
6030
+ }, Ge = Ha(function(e, t) {
5897
6031
  const s = [
5898
6032
  "Renderer",
5899
6033
  "Depth",
5900
6034
  "Normals",
5901
6035
  "UVs",
5902
6036
  "Wireframe"
5903
- ], [n, a] = Z("Renderer"), [r, o] = Z(!1), [c, l] = Z(!1), [d, p] = Z(!1);
6037
+ ], [n, a] = B("Renderer"), [r, o] = B(!1), [c, l] = B(!1), [d, p] = B(!1);
5904
6038
  return /* @__PURE__ */ u.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
5905
6039
  /* @__PURE__ */ u.jsx("div", { ref: t, className: "clickable", onClick: () => {
5906
6040
  d && p(!1);
5907
6041
  } }),
5908
6042
  /* @__PURE__ */ u.jsxs("div", { className: "options", children: [
5909
6043
  e.camera !== null && /* @__PURE__ */ u.jsx(
5910
- li,
6044
+ ci,
5911
6045
  {
5912
6046
  title: "Camera",
5913
6047
  index: e.options.indexOf(e.camera.name),
@@ -5921,7 +6055,7 @@ const li = (i) => {
5921
6055
  }
5922
6056
  ),
5923
6057
  /* @__PURE__ */ u.jsx(
5924
- li,
6058
+ ci,
5925
6059
  {
5926
6060
  title: "Mode",
5927
6061
  index: s.indexOf(n),
@@ -5941,7 +6075,7 @@ const li = (i) => {
5941
6075
  )
5942
6076
  ] })
5943
6077
  ] });
5944
- }), uo = `out vec3 worldPosition;
6078
+ }), ho = `out vec3 worldPosition;
5945
6079
  uniform float uDistance;
5946
6080
 
5947
6081
  void main() {
@@ -5950,7 +6084,7 @@ void main() {
5950
6084
  worldPosition.xz += cameraPosition.xz;
5951
6085
 
5952
6086
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
5953
- }`, po = `out vec4 fragColor;
6087
+ }`, uo = `out vec4 fragColor;
5954
6088
  in vec3 worldPosition;
5955
6089
  uniform float uDivisions;
5956
6090
  uniform float uScale;
@@ -6017,7 +6151,7 @@ void main() {
6017
6151
 
6018
6152
  if (fragColor.a <= 0.0) discard;
6019
6153
  }`;
6020
- class mo extends un {
6154
+ class po extends mn {
6021
6155
  constructor(e) {
6022
6156
  super({
6023
6157
  extensions: {
@@ -6044,29 +6178,27 @@ class mo extends un {
6044
6178
  value: e?.gridOpacity !== void 0 ? e?.gridOpacity : 0.25
6045
6179
  }
6046
6180
  },
6047
- glslVersion: ma,
6048
- side: Vi,
6181
+ glslVersion: va,
6182
+ side: Wi,
6049
6183
  transparent: !0,
6050
6184
  name: "InfiniteGrid",
6051
- depthTest: !1,
6052
- depthWrite: !1,
6053
- vertexShader: uo,
6054
- fragmentShader: po
6185
+ vertexShader: ho,
6186
+ fragmentShader: uo
6055
6187
  });
6056
6188
  }
6057
6189
  }
6058
- class fo extends M {
6190
+ class mo extends M {
6059
6191
  gridMaterial;
6060
6192
  constructor(e) {
6061
- const t = new mo(e);
6062
- super(new pn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
6193
+ const t = new po(e);
6194
+ super(new fn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
6063
6195
  }
6064
6196
  update() {
6065
6197
  this.gridMaterial.needsUpdate = !0;
6066
6198
  }
6067
6199
  }
6068
- function js(i) {
6069
- const [e, t] = Z(i.selected), s = "toggle" + (e ? " selected" : "");
6200
+ function Fs(i) {
6201
+ const [e, t] = B(i.selected), s = "toggle" + (e ? " selected" : "");
6070
6202
  return /* @__PURE__ */ u.jsx(
6071
6203
  "button",
6072
6204
  {
@@ -6084,7 +6216,7 @@ function js(i) {
6084
6216
  i.name
6085
6217
  );
6086
6218
  }
6087
- const go = `#include <common>
6219
+ const fo = `#include <common>
6088
6220
  #include <batching_pars_vertex>
6089
6221
  #include <uv_pars_vertex>
6090
6222
  #include <color_pars_vertex>
@@ -6114,7 +6246,7 @@ void main() {
6114
6246
  #include <logdepthbuf_vertex>
6115
6247
  #include <clipping_planes_vertex>
6116
6248
  #include <worldpos_vertex>
6117
- }`, _o = `
6249
+ }`, go = `
6118
6250
  #include <common>
6119
6251
  #include <uv_pars_fragment>
6120
6252
  #include <clipping_planes_pars_fragment>
@@ -6123,46 +6255,46 @@ void main() {
6123
6255
  #include <clipping_planes_fragment>
6124
6256
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
6125
6257
  }`;
6126
- class vo extends un {
6258
+ class _o extends mn {
6127
6259
  constructor() {
6128
6260
  super({
6129
6261
  defines: {
6130
6262
  USE_UV: ""
6131
6263
  },
6132
- vertexShader: go,
6133
- fragmentShader: _o
6264
+ vertexShader: fo,
6265
+ fragmentShader: go
6134
6266
  });
6135
6267
  }
6136
6268
  }
6137
- const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(), Ns = {
6269
+ const Xe = new ai(), ue = new P(), Ye = new P(), Q = new Ce(), zs = {
6138
6270
  X: new P(1, 0, 0),
6139
6271
  Y: new P(0, 1, 0),
6140
6272
  Z: new P(0, 0, 1)
6141
- }, Ai = { type: "change" }, Fs = { type: "mouseDown", mode: null }, zs = { type: "mouseUp", mode: null }, Hs = { type: "objectChange" };
6142
- class yo extends dn {
6273
+ }, Di = { type: "change" }, Hs = { type: "mouseDown", mode: null }, Ys = { type: "mouseUp", mode: null }, Bs = { type: "objectChange" };
6274
+ class vo extends pn {
6143
6275
  constructor(e, t = null) {
6144
6276
  super(void 0, t);
6145
- const s = new xo(this);
6277
+ const s = new So(this);
6146
6278
  this._root = s;
6147
- const n = new Oo();
6279
+ const n = new xo();
6148
6280
  this._gizmo = n, s.add(n);
6149
- const a = new To();
6281
+ const a = new Oo();
6150
6282
  this._plane = a, s.add(a);
6151
6283
  const r = this;
6152
- function o(E, C) {
6153
- let S = C;
6154
- Object.defineProperty(r, E, {
6284
+ function o(C, w) {
6285
+ let S = w;
6286
+ Object.defineProperty(r, C, {
6155
6287
  get: function() {
6156
- return S !== void 0 ? S : C;
6288
+ return S !== void 0 ? S : w;
6157
6289
  },
6158
6290
  set: function(O) {
6159
- S !== O && (S = O, a[E] = O, n[E] = O, r.dispatchEvent({ type: E + "-changed", value: O }), r.dispatchEvent(Ai));
6291
+ S !== O && (S = O, a[C] = O, n[C] = O, r.dispatchEvent({ type: C + "-changed", value: O }), r.dispatchEvent(Di));
6160
6292
  }
6161
- }), r[E] = C, a[E] = C, n[E] = C;
6293
+ }), r[C] = w, a[C] = w, n[C] = w;
6162
6294
  }
6163
6295
  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);
6164
- const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), w = new P(), v = new P(), x = new P(), g = 0, y = new P();
6165
- o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", w), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = bo.bind(this), this._onPointerDown = Co.bind(this), this._onPointerHover = Eo.bind(this), this._onPointerMove = So.bind(this), this._onPointerUp = wo.bind(this), t !== null && this.connect();
6296
+ const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), E = new P(), v = new P(), x = new P(), g = 0, y = new P();
6297
+ o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", E), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = yo.bind(this), this._onPointerDown = Eo.bind(this), this._onPointerHover = bo.bind(this), this._onPointerMove = Co.bind(this), this._onPointerUp = wo.bind(this), t !== null && this.connect();
6166
6298
  }
6167
6299
  connect() {
6168
6300
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -6177,14 +6309,14 @@ class yo extends dn {
6177
6309
  if (this.object === void 0 || this.dragging === !0)
6178
6310
  return;
6179
6311
  e !== null && Xe.setFromCamera(e, this.camera);
6180
- const t = Di(this._gizmo.picker[this.mode], Xe);
6312
+ const t = Ri(this._gizmo.picker[this.mode], Xe);
6181
6313
  t ? this.axis = t.object.name : this.axis = null;
6182
6314
  }
6183
6315
  pointerDown(e) {
6184
6316
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
6185
6317
  e !== null && Xe.setFromCamera(e, this.camera);
6186
- const t = Di(this._plane, Xe, !0);
6187
- 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, Fs.mode = this.mode, this.dispatchEvent(Fs);
6318
+ const t = Ri(this._plane, Xe, !0);
6319
+ 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, Hs.mode = this.mode, this.dispatchEvent(Hs);
6188
6320
  }
6189
6321
  }
6190
6322
  pointerMove(e) {
@@ -6193,7 +6325,7 @@ class yo extends dn {
6193
6325
  if (s === "scale" ? a = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (a = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1)
6194
6326
  return;
6195
6327
  e !== null && Xe.setFromCamera(e, this.camera);
6196
- const r = Di(this._plane, Xe, !0);
6328
+ const r = Ri(this._plane, Xe, !0);
6197
6329
  if (r) {
6198
6330
  if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), s === "translate")
6199
6331
  this._offset.copy(this.pointEnd).sub(this.pointStart), a === "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), a === "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 && (a === "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)), a === "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))));
@@ -6208,13 +6340,13 @@ class yo extends dn {
6208
6340
  this._offset.copy(this.pointEnd).sub(this.pointStart);
6209
6341
  const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
6210
6342
  let c = !1;
6211
- 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(Ns[t]), ue.copy(Ns[t]), a === "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), a === "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());
6343
+ 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(zs[t]), ue.copy(zs[t]), a === "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), a === "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());
6212
6344
  }
6213
- this.dispatchEvent(Ai), this.dispatchEvent(Hs);
6345
+ this.dispatchEvent(Di), this.dispatchEvent(Bs);
6214
6346
  }
6215
6347
  }
6216
6348
  pointerUp(e) {
6217
- e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (zs.mode = this.mode, this.dispatchEvent(zs)), this.dragging = !1, this.axis = null);
6349
+ e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ys.mode = this.mode, this.dispatchEvent(Ys)), this.dragging = !1, this.axis = null);
6218
6350
  }
6219
6351
  dispose() {
6220
6352
  this.disconnect(), this.traverse(function(e) {
@@ -6230,7 +6362,7 @@ class yo extends dn {
6230
6362
  return this.object = void 0, this.axis = null, this._root.visible = !1, this;
6231
6363
  }
6232
6364
  reset() {
6233
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ai), this.dispatchEvent(Hs), this.pointStart.copy(this.pointEnd));
6365
+ this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Di), this.dispatchEvent(Bs), this.pointStart.copy(this.pointEnd));
6234
6366
  }
6235
6367
  getRaycaster() {
6236
6368
  return Xe;
@@ -6258,7 +6390,7 @@ class yo extends dn {
6258
6390
  this.space = e;
6259
6391
  }
6260
6392
  }
6261
- function bo(i) {
6393
+ function yo(i) {
6262
6394
  if (this.domElement.ownerDocument.pointerLockElement)
6263
6395
  return {
6264
6396
  x: 0,
@@ -6274,7 +6406,7 @@ function bo(i) {
6274
6406
  };
6275
6407
  }
6276
6408
  }
6277
- function Eo(i) {
6409
+ function bo(i) {
6278
6410
  if (this.enabled)
6279
6411
  switch (i.pointerType) {
6280
6412
  case "mouse":
@@ -6283,24 +6415,24 @@ function Eo(i) {
6283
6415
  break;
6284
6416
  }
6285
6417
  }
6286
- function Co(i) {
6418
+ function Eo(i) {
6287
6419
  this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(i)), this.pointerDown(this._getPointer(i)));
6288
6420
  }
6289
- function So(i) {
6421
+ function Co(i) {
6290
6422
  this.enabled && this.pointerMove(this._getPointer(i));
6291
6423
  }
6292
6424
  function wo(i) {
6293
6425
  this.enabled && (this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(i)));
6294
6426
  }
6295
- function Di(i, e, t) {
6427
+ function Ri(i, e, t) {
6296
6428
  const s = e.intersectObject(i, !0);
6297
6429
  for (let n = 0; n < s.length; n++)
6298
6430
  if (s[n].object.visible || t)
6299
6431
  return s[n];
6300
6432
  return !1;
6301
6433
  }
6302
- const Kt = new mn(), X = new P(0, 1, 0), Ys = new P(0, 0, 0), Bs = new ci(), Qt = new Ce(), si = new Ce(), Re = new P(), Vs = new ci(), Lt = new P(1, 0, 0), qe = new P(0, 1, 0), kt = new P(0, 0, 1), Jt = new P(), At = new P(), Dt = new P();
6303
- class xo extends vt {
6434
+ const Kt = new gn(), X = new P(0, 1, 0), Vs = new P(0, 0, 0), Zs = new hi(), Qt = new Ce(), ni = new Ce(), Re = new P(), Ws = new hi(), Lt = new P(1, 0, 0), qe = new P(0, 1, 0), kt = new P(0, 0, 1), Jt = new P(), At = new P(), Dt = new P();
6435
+ class So extends vt {
6304
6436
  constructor(e) {
6305
6437
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
6306
6438
  }
@@ -6310,7 +6442,7 @@ class xo extends vt {
6310
6442
  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);
6311
6443
  }
6312
6444
  }
6313
- class Oo extends vt {
6445
+ class xo extends vt {
6314
6446
  constructor() {
6315
6447
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
6316
6448
  const e = new Je({
@@ -6319,7 +6451,7 @@ class Oo extends vt {
6319
6451
  fog: !1,
6320
6452
  toneMapped: !1,
6321
6453
  transparent: !0
6322
- }), t = new Zi({
6454
+ }), t = new Gi({
6323
6455
  depthTest: !1,
6324
6456
  depthWrite: !1,
6325
6457
  fog: !1,
@@ -6345,8 +6477,8 @@ class Oo extends vt {
6345
6477
  p.opacity = 0.25;
6346
6478
  const m = e.clone();
6347
6479
  m.color.setHex(16776960), m.opacity = 0.25, e.clone().color.setHex(16776960);
6348
- const w = e.clone();
6349
- w.color.setHex(7895160);
6480
+ const E = e.clone();
6481
+ E.color.setHex(7895160);
6350
6482
  const v = new ve(0, 0.04, 0.1, 12);
6351
6483
  v.translate(0, 0.05, 0);
6352
6484
  const x = new de(0.08, 0.08, 0.08);
@@ -6355,11 +6487,11 @@ class Oo extends vt {
6355
6487
  g.setAttribute("position", new Ke([0, 0, 0, 1, 0, 0], 3));
6356
6488
  const y = new ve(75e-4, 75e-4, 0.5, 3);
6357
6489
  y.translate(0, 0.25, 0);
6358
- function E($, Ue) {
6490
+ function C($, Ue) {
6359
6491
  const he = new Et($, 75e-4, 3, 64, Ue * Math.PI * 2);
6360
6492
  return he.rotateY(Math.PI / 2), he.rotateX(Math.PI / 2), he;
6361
6493
  }
6362
- function C() {
6494
+ function w() {
6363
6495
  const $ = new _t();
6364
6496
  return $.setAttribute("position", new Ke([0, 0, 0, 1, 1, 1], 3)), $;
6365
6497
  }
@@ -6424,7 +6556,7 @@ class Oo extends vt {
6424
6556
  [new M(new Zt(0.01, 2), n), null, null, null, "helper"]
6425
6557
  ],
6426
6558
  DELTA: [
6427
- [new Ie(C(), n), null, null, null, "helper"]
6559
+ [new Ie(w(), n), null, null, null, "helper"]
6428
6560
  ],
6429
6561
  X: [
6430
6562
  [new Ie(g, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
@@ -6437,27 +6569,27 @@ class Oo extends vt {
6437
6569
  ]
6438
6570
  }, U = {
6439
6571
  XYZE: [
6440
- [new M(E(0.5, 1), w), null, [0, Math.PI / 2, 0]]
6572
+ [new M(C(0.5, 1), E), null, [0, Math.PI / 2, 0]]
6441
6573
  ],
6442
6574
  X: [
6443
- [new M(E(0.5, 0.5), a)]
6575
+ [new M(C(0.5, 0.5), a)]
6444
6576
  ],
6445
6577
  Y: [
6446
- [new M(E(0.5, 0.5), r), null, [0, 0, -Math.PI / 2]]
6578
+ [new M(C(0.5, 0.5), r), null, [0, 0, -Math.PI / 2]]
6447
6579
  ],
6448
6580
  Z: [
6449
- [new M(E(0.5, 0.5), o), null, [0, Math.PI / 2, 0]]
6581
+ [new M(C(0.5, 0.5), o), null, [0, Math.PI / 2, 0]]
6450
6582
  ],
6451
6583
  E: [
6452
- [new M(E(0.75, 1), m), null, [0, Math.PI / 2, 0]]
6584
+ [new M(C(0.75, 1), m), null, [0, Math.PI / 2, 0]]
6453
6585
  ]
6454
6586
  }, R = {
6455
6587
  AXIS: [
6456
6588
  [new Ie(g, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
6457
6589
  ]
6458
- }, B = {
6590
+ }, V = {
6459
6591
  XYZE: [
6460
- [new M(new fn(0.25, 10, 8), s)]
6592
+ [new M(new _n(0.25, 10, 8), s)]
6461
6593
  ],
6462
6594
  X: [
6463
6595
  [new M(new Et(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -6471,7 +6603,7 @@ class Oo extends vt {
6471
6603
  E: [
6472
6604
  [new M(new Et(0.75, 0.1, 2, 24), s)]
6473
6605
  ]
6474
- }, Se = {
6606
+ }, we = {
6475
6607
  X: [
6476
6608
  [new M(x, a), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
6477
6609
  [new M(y, a), [0, 0, 0], [0, 0, -Math.PI / 2]],
@@ -6546,11 +6678,11 @@ class Oo extends vt {
6546
6678
  }
6547
6679
  return Ue;
6548
6680
  }
6549
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = K(S)), this.add(this.gizmo.rotate = K(U)), this.add(this.gizmo.scale = K(Se)), this.add(this.picker.translate = K(O)), this.add(this.picker.rotate = K(B)), this.add(this.picker.scale = K(_e)), this.add(this.helper.translate = K(I)), this.add(this.helper.rotate = K(R)), this.add(this.helper.scale = K(re)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
6681
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = K(S)), this.add(this.gizmo.rotate = K(U)), this.add(this.gizmo.scale = K(we)), this.add(this.picker.translate = K(O)), this.add(this.picker.rotate = K(V)), this.add(this.picker.scale = K(_e)), this.add(this.helper.translate = K(I)), this.add(this.helper.rotate = K(R)), this.add(this.helper.scale = K(re)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
6550
6682
  }
6551
6683
  // updateMatrixWorld will update transformations and appearance of individual handles
6552
6684
  updateMatrixWorld(e) {
6553
- const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : si;
6685
+ const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : ni;
6554
6686
  this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
6555
6687
  let n = [];
6556
6688
  n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
@@ -6559,26 +6691,26 @@ class Oo extends vt {
6559
6691
  r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
6560
6692
  let o;
6561
6693
  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), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
6562
- r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Q.setFromEuler(Kt.set(0, 0, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Q.setFromEuler(Kt.set(0, 0, Math.PI / 2)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), X.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Bs.lookAt(Ys, X, qe)), r.quaternion.multiply(Q), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.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()), r.scale.copy(ue), r.visible = this.dragging) : (r.quaternion.copy(s), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
6694
+ r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Q.setFromEuler(Kt.set(0, 0, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Q.setFromEuler(Kt.set(0, 0, Math.PI / 2)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), X.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Zs.lookAt(Vs, X, qe)), r.quaternion.multiply(Q), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.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()), r.scale.copy(ue), r.visible = this.dragging) : (r.quaternion.copy(s), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
6563
6695
  continue;
6564
6696
  }
6565
- r.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Qt.copy(s), X.copy(this.eye).applyQuaternion(Q.copy(s).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Bs.lookAt(this.eye, Ys, qe)), r.name === "X" && (Q.setFromAxisAngle(Lt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Z" && (Q.setFromAxisAngle(kt, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(c) {
6697
+ r.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Qt.copy(s), X.copy(this.eye).applyQuaternion(Q.copy(s).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Zs.lookAt(this.eye, Vs, qe)), r.name === "X" && (Q.setFromAxisAngle(Lt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Z" && (Q.setFromAxisAngle(kt, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(c) {
6566
6698
  return r.name === c;
6567
6699
  })) && (r.material.color.setHex(16776960), r.material.opacity = 1);
6568
6700
  }
6569
6701
  super.updateMatrixWorld(e);
6570
6702
  }
6571
6703
  }
6572
- class To extends M {
6704
+ class Oo extends M {
6573
6705
  constructor() {
6574
6706
  super(
6575
- new pn(1e5, 1e5, 2, 2),
6576
- new Je({ visible: !1, wireframe: !0, side: Vi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6707
+ new fn(1e5, 1e5, 2, 2),
6708
+ new Je({ visible: !1, wireframe: !0, side: Wi, transparent: !0, opacity: 0.1, toneMapped: !1 })
6577
6709
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
6578
6710
  }
6579
6711
  updateMatrixWorld(e) {
6580
6712
  let t = this.space;
6581
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Jt.copy(Lt).applyQuaternion(t === "local" ? this.worldQuaternion : si), At.copy(qe).applyQuaternion(t === "local" ? this.worldQuaternion : si), Dt.copy(kt).applyQuaternion(t === "local" ? this.worldQuaternion : si), X.copy(At), this.mode) {
6713
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Jt.copy(Lt).applyQuaternion(t === "local" ? this.worldQuaternion : ni), At.copy(qe).applyQuaternion(t === "local" ? this.worldQuaternion : ni), Dt.copy(kt).applyQuaternion(t === "local" ? this.worldQuaternion : ni), X.copy(At), this.mode) {
6582
6714
  case "translate":
6583
6715
  case "scale":
6584
6716
  switch (this.axis) {
@@ -6610,10 +6742,10 @@ class To extends M {
6610
6742
  default:
6611
6743
  Re.set(0, 0, 0);
6612
6744
  }
6613
- Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Vs.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Vs)), super.updateMatrixWorld(e);
6745
+ Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Ws.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Ws)), super.updateMatrixWorld(e);
6614
6746
  }
6615
6747
  }
6616
- class ge extends Bi {
6748
+ class ge extends Zi {
6617
6749
  static DRAG_START = "Transform::dragStart";
6618
6750
  static DRAG_END = "Transform::dragEnd";
6619
6751
  static _instance;
@@ -6636,7 +6768,7 @@ class ge extends Bi {
6636
6768
  let t = this.controls.get(e);
6637
6769
  if (t === void 0) {
6638
6770
  const s = document.querySelector(".clickable");
6639
- t = new yo(this.activeCamera, s), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6771
+ t = new vo(this.activeCamera, s), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
6640
6772
  this.dispatchEvent({ type: ge.DRAG_START });
6641
6773
  }), t.addEventListener("mouseUp", () => {
6642
6774
  this.dispatchEvent({ type: ge.DRAG_END });
@@ -6682,9 +6814,9 @@ class ge extends Bi {
6682
6814
  return ge._instance || (ge._instance = new ge()), ge._instance;
6683
6815
  }
6684
6816
  }
6685
- const Mo = new de(), Ri = new pe();
6686
- class Zs extends vt {
6687
- curve = new hs();
6817
+ const To = new de(), Ii = new pe();
6818
+ class Gs extends vt {
6819
+ curve = new us();
6688
6820
  line;
6689
6821
  draggable;
6690
6822
  curvePos;
@@ -6705,7 +6837,7 @@ class Zs extends vt {
6705
6837
  group;
6706
6838
  constructor(e, t) {
6707
6839
  const s = new et(lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()));
6708
- super(), this.name = e, this.lineMaterial = new Zi({ color: s }), this.line = new Ie(new _t(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new vt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new fn(1.5), new Je({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new ni(), this.raycaster.params.Line.threshold = 3, this.enable();
6840
+ super(), this.name = e, this.lineMaterial = new Gi({ color: s }), this.line = new Ie(new _t(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new vt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new _n(1.5), new Je({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new ai(), this.raycaster.params.Line.threshold = 3, this.enable();
6709
6841
  }
6710
6842
  enable() {
6711
6843
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6723,7 +6855,7 @@ class Zs extends vt {
6723
6855
  const e = [];
6724
6856
  this.draggable.children.forEach((t) => {
6725
6857
  e.push([Pe(t.position.x, 3), Pe(t.position.y, 3), Pe(t.position.z, 3)]);
6726
- }), za({
6858
+ }), Ya({
6727
6859
  name: this.name,
6728
6860
  points: e,
6729
6861
  tension: this.tension,
@@ -6746,7 +6878,7 @@ class Zs extends vt {
6746
6878
  this.addPoint(new P(-50, 0, 0), !1), this.addPoint(new P(50, 0, 0));
6747
6879
  };
6748
6880
  addPoint = (e, t = !0) => {
6749
- const s = this.draggable.children.length, n = new M(Mo, this.draggedMat);
6881
+ const s = this.draggable.children.length, n = new M(To, this.draggedMat);
6750
6882
  return n.name = `point_${s}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
6751
6883
  };
6752
6884
  addNextPt = () => {
@@ -6775,14 +6907,14 @@ class Zs extends vt {
6775
6907
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
6776
6908
  };
6777
6909
  updateSpline = () => {
6778
- this.curve = new hs(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6910
+ this.curve = new us(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6779
6911
  };
6780
6912
  // Handlers
6781
6913
  onMouseClick = (e) => {
6782
6914
  if (!me.instance || this._transform && !this._transform.getHelper().visible)
6783
6915
  return;
6784
6916
  const s = me.instance.currentWindow.current.getBoundingClientRect();
6785
- Ri.x = (e.clientX - s.x) / s.width * 2 - 1, Ri.y = -((e.clientY - s.y) / s.height) * 2 + 1, this.raycaster.setFromCamera(Ri, this.camera);
6917
+ Ii.x = (e.clientX - s.x) / s.width * 2 - 1, Ii.y = -((e.clientY - s.y) / s.height) * 2 + 1, this.raycaster.setFromCamera(Ii, this.camera);
6786
6918
  const n = this.raycaster.intersectObjects(this.draggable.children, !1);
6787
6919
  if (n.length > 0) {
6788
6920
  const a = n[0].object;
@@ -7016,7 +7148,7 @@ class Zs extends vt {
7016
7148
  };
7017
7149
  }
7018
7150
  let ei = 0;
7019
- class Po extends vt {
7151
+ class Mo extends vt {
7020
7152
  defaultScale = 10;
7021
7153
  _camera;
7022
7154
  group = null;
@@ -7075,7 +7207,7 @@ class Po extends vt {
7075
7207
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
7076
7208
  }
7077
7209
  createSpline = (e = []) => {
7078
- const t = `Spline ${ei + 1}`, s = new Zs(t, this._camera);
7210
+ const t = `Spline ${ei + 1}`, s = new Gs(t, this._camera);
7079
7211
  return s.addPoints(e), this.addSpline(s), ei++, s;
7080
7212
  };
7081
7213
  createSplineFromArray = (e) => {
@@ -7099,7 +7231,7 @@ class Po extends vt {
7099
7231
  t.points.forEach((r) => {
7100
7232
  n.push(new P(r[0], r[1], r[2]));
7101
7233
  });
7102
- const a = new Zs(s, this.camera);
7234
+ const a = new Gs(s, this.camera);
7103
7235
  a.addPoints(n), this.addSpline(a), ei++;
7104
7236
  };
7105
7237
  get camera() {
@@ -7112,15 +7244,15 @@ class Po extends vt {
7112
7244
  });
7113
7245
  }
7114
7246
  }
7115
- const Ws = [
7247
+ const Xs = [
7116
7248
  "Single",
7117
7249
  "Side by Side",
7118
7250
  "Stacked",
7119
7251
  "Quad"
7120
- ], 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", Do = "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==";
7252
+ ], Po = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", Ao = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
7121
7253
  class me extends Ft {
7122
7254
  static instance = null;
7123
- scene = new Xs();
7255
+ scene = new Vi();
7124
7256
  renderer;
7125
7257
  currentScene;
7126
7258
  cameras = /* @__PURE__ */ new Map();
@@ -7130,16 +7262,16 @@ class me extends Ft {
7130
7262
  // RefObject to one of the "windows"
7131
7263
  cameraHelpers = /* @__PURE__ */ new Map();
7132
7264
  lightHelpers = /* @__PURE__ */ new Map();
7133
- helpersContainer = new fa();
7134
- grid = new fo();
7135
- interactionHelper = new ga(25);
7265
+ helpersContainer = new ti();
7266
+ grid = new mo();
7267
+ interactionHelper = new ya(25);
7136
7268
  currentTransform;
7137
7269
  // Tools
7138
7270
  splineEditor;
7139
7271
  // Override Materials
7140
- depthMaterial = new _a();
7141
- normalsMaterial = new va();
7142
- uvMaterial = new vo();
7272
+ depthMaterial = new ba();
7273
+ normalsMaterial = new Ea();
7274
+ uvMaterial = new _o();
7143
7275
  wireframeMaterial = new Je({
7144
7276
  opacity: 0.33,
7145
7277
  transparent: !0,
@@ -7166,7 +7298,7 @@ class me extends Ft {
7166
7298
  // Interactions
7167
7299
  selectedItem = void 0;
7168
7300
  debugCamera;
7169
- raycaster = new ni();
7301
+ raycaster = new ai();
7170
7302
  pointer = new pe();
7171
7303
  cameraControls = void 0;
7172
7304
  // References
@@ -7190,13 +7322,13 @@ class me extends Ft {
7190
7322
  const a = {
7191
7323
  Vector2: pe,
7192
7324
  Vector3: P,
7193
- Vector4: Ta,
7325
+ Vector4: Pa,
7194
7326
  Quaternion: Ce,
7195
- Matrix4: ci,
7196
- Spherical: ki,
7197
- Box3: Ma,
7198
- Sphere: Pa,
7199
- Raycaster: ni
7327
+ Matrix4: hi,
7328
+ Spherical: Ui,
7329
+ Box3: Aa,
7330
+ Sphere: Da,
7331
+ Raycaster: ai
7200
7332
  };
7201
7333
  ke.install({ THREE: a }), this.setupScene(), this.setupTools();
7202
7334
  const r = localStorage.getItem(this.expandedCameraVisibility);
@@ -7346,11 +7478,11 @@ class me extends Ft {
7346
7478
  ] }),
7347
7479
  /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
7348
7480
  /* @__PURE__ */ u.jsx(
7349
- li,
7481
+ ci,
7350
7482
  {
7351
7483
  title: "View",
7352
- index: Ws.indexOf(this.state.mode),
7353
- options: Ws,
7484
+ index: Xs.indexOf(this.state.mode),
7485
+ options: Xs,
7354
7486
  onSelect: (t) => {
7355
7487
  t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
7356
7488
  },
@@ -7365,7 +7497,7 @@ class me extends Ft {
7365
7497
  }
7366
7498
  ),
7367
7499
  /* @__PURE__ */ u.jsx(
7368
- li,
7500
+ ci,
7369
7501
  {
7370
7502
  title: "Interact",
7371
7503
  index: this.state.interactionMode === "Orbit" ? 0 : 1,
@@ -7387,10 +7519,10 @@ class me extends Ft {
7387
7519
  }
7388
7520
  ),
7389
7521
  /* @__PURE__ */ u.jsx(
7390
- js,
7522
+ Fs,
7391
7523
  {
7392
7524
  name: "cameraHelper",
7393
- icon: Ao,
7525
+ icon: Po,
7394
7526
  selected: this.cameraVisibility,
7395
7527
  height: 24,
7396
7528
  top: 2,
@@ -7405,10 +7537,10 @@ class me extends Ft {
7405
7537
  }
7406
7538
  ),
7407
7539
  /* @__PURE__ */ u.jsx(
7408
- js,
7540
+ Fs,
7409
7541
  {
7410
7542
  name: "lightHelper",
7411
- icon: Do,
7543
+ icon: Ao,
7412
7544
  selected: this.lightVisibility,
7413
7545
  height: 24,
7414
7546
  top: 4,
@@ -7427,18 +7559,18 @@ class me extends Ft {
7427
7559
  }
7428
7560
  // Setup
7429
7561
  setupRenderer() {
7430
- this.renderer = new ya({
7562
+ this.renderer = new Ca({
7431
7563
  canvas: this.canvasRef.current,
7432
7564
  stencil: !1
7433
7565
  }), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
7434
7566
  }
7435
7567
  setupScene() {
7436
- this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
7568
+ this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.grid.position.y = -1, this.helpersContainer.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
7437
7569
  const e = (a, r) => {
7438
- const o = new Li(-100, 100, 100, -100, 0, 3e3);
7570
+ const o = new ki(-100, 100, 100, -100, 0, 3e3);
7439
7571
  return o.name = a, o.position.copy(r), o.lookAt(0, 0, 0), this.cameras.set(a, o), o;
7440
7572
  }, t = 1e3;
7441
- e("Top", new P(0, t, 0)), e("Bottom", new P(0, -t, 0)), e("Left", new P(-t, 0, 0)), e("Right", new P(t, 0, 0)), e("Front", new P(0, 0, t)), e("Back", new P(0, 0, -t)), e("Orthographic", new P(t, t, t)), e("UI", new P()), this.debugCamera = new ds(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;
7573
+ e("Top", new P(0, t, 0)), e("Bottom", new P(0, -t, 0)), e("Left", new P(-t, 0, 0)), e("Right", new P(t, 0, 0)), e("Front", new P(0, 0, t)), e("Back", new P(0, 0, -t)), e("Orthographic", new P(t, t, t)), e("UI", new P()), this.debugCamera = new ps(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;
7442
7574
  const s = localStorage, n = this.props.three.app.appID;
7443
7575
  this.tlCam = this.cameras.get(s.getItem(`${n}_tlCam`)), this.trCam = this.cameras.get(s.getItem(`${n}_trCam`)), this.blCam = this.cameras.get(s.getItem(`${n}_blCam`)), this.brCam = this.cameras.get(s.getItem(`${n}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
7444
7576
  }
@@ -7459,7 +7591,7 @@ class me extends Ft {
7459
7591
  break;
7460
7592
  }
7461
7593
  }
7462
- }), this.splineEditor = new Po(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7594
+ }), this.splineEditor = new Mo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
7463
7595
  }
7464
7596
  // Public
7465
7597
  play() {
@@ -7523,7 +7655,7 @@ class me extends Ft {
7523
7655
  }
7524
7656
  const a = s / n;
7525
7657
  this.cameras.forEach((r) => {
7526
- r instanceof Li ? (r.left = s / -2, r.right = s / 2, r.top = n / 2, r.bottom = n / -2, r.name === "UI" && (r.position.x = this.width / 2, r.position.y = this.height / -2, r.position.z = 100), r.updateProjectionMatrix()) : r instanceof ds && (r.aspect = a, r.updateProjectionMatrix()), this.cameraHelpers.get(r.name)?.update();
7658
+ r instanceof ki ? (r.left = s / -2, r.right = s / 2, r.top = n / 2, r.bottom = n / -2, r.name === "UI" && (r.position.x = this.width / 2, r.position.y = this.height / -2, r.position.z = 100), r.updateProjectionMatrix()) : r instanceof ps && (r.aspect = a, r.updateProjectionMatrix()), this.cameraHelpers.get(r.name)?.update();
7527
7659
  });
7528
7660
  };
7529
7661
  sceneUpdate = (e) => {
@@ -7539,7 +7671,7 @@ class me extends Ft {
7539
7671
  if (s !== void 0) {
7540
7672
  const n = s;
7541
7673
  this.cameras.set(t.name, n);
7542
- const a = new ba(n);
7674
+ const a = new wa(n);
7543
7675
  a.visible = this.cameraVisibility, this.cameraHelpers.set(n.name, a), this.scene.add(a), this.setState({ lastUpdate: Date.now() });
7544
7676
  }
7545
7677
  };
@@ -7589,7 +7721,7 @@ class me extends Ft {
7589
7721
  if (this.currentCamera.name === "UI")
7590
7722
  return;
7591
7723
  const t = this.controls.get(this.currentCamera.name);
7592
- e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof Ea ? (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(zi(45), zi(45), !0), this.updateCameraControls(t));
7724
+ e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof Sa ? (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(Hi(45), Hi(45), !0), this.updateCameraControls(t));
7593
7725
  } else if (this.currentTransform !== void 0)
7594
7726
  switch (e.key) {
7595
7727
  case "r":
@@ -7627,7 +7759,7 @@ class me extends Ft {
7627
7759
  x: this.selectedItem.rotation.x,
7628
7760
  y: this.selectedItem.rotation.y,
7629
7761
  z: this.selectedItem.rotation.z
7630
- }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), di.instance.update());
7762
+ }), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ui.instance.update());
7631
7763
  };
7632
7764
  // Utils
7633
7765
  clearLightHelpers = () => {
@@ -7641,19 +7773,19 @@ class me extends Ft {
7641
7773
  let t;
7642
7774
  switch (e.type) {
7643
7775
  case "DirectionalLight":
7644
- t = new xa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7776
+ t = new Ma(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7645
7777
  break;
7646
7778
  case "HemisphereLight":
7647
- t = new wa(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7779
+ t = new Ta(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7648
7780
  break;
7649
7781
  case "RectAreaLight":
7650
- t = new Gr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7782
+ t = new Wr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7651
7783
  break;
7652
7784
  case "PointLight":
7653
- t = new Sa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7785
+ t = new Oa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7654
7786
  break;
7655
7787
  case "SpotLight":
7656
- t = new Ca(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7788
+ t = new xa(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7657
7789
  break;
7658
7790
  }
7659
7791
  }
@@ -7663,7 +7795,7 @@ class me extends Ft {
7663
7795
  const s = this.controls.get(e.name);
7664
7796
  if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI")
7665
7797
  return;
7666
- const n = new $r(e, t);
7798
+ const n = new Xr(e, t);
7667
7799
  switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
7668
7800
  case "Top":
7669
7801
  case "Bottom":
@@ -7724,7 +7856,7 @@ class me extends Ft {
7724
7856
  if (this.selectedItem === void 0)
7725
7857
  return;
7726
7858
  cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
7727
- const s = 0.15, n = new Oa();
7859
+ const s = 0.15, n = new qs();
7728
7860
  n.start(), this.selectedItem.getWorldPosition(e.target0);
7729
7861
  const a = () => {
7730
7862
  const r = n.getDelta();
@@ -7805,11 +7937,11 @@ class me extends Ft {
7805
7937
  return `${this.appID}_multiviewLightVisibility`;
7806
7938
  }
7807
7939
  }
7808
- class di extends Ft {
7940
+ class ui extends Ft {
7809
7941
  static instance;
7810
- matrix = new ci();
7942
+ matrix = new hi();
7811
7943
  position = new P();
7812
- rotation = new mn();
7944
+ rotation = new gn();
7813
7945
  scale = new P();
7814
7946
  open = !1;
7815
7947
  constructor(e) {
@@ -7818,7 +7950,7 @@ class di extends Ft {
7818
7950
  this.open = s, this.saveExpanded(), this.state = {
7819
7951
  lastUpdated: 0,
7820
7952
  expanded: s
7821
- }, 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)), di.instance = this;
7953
+ }, 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)), ui.instance = this;
7822
7954
  }
7823
7955
  update() {
7824
7956
  if (me.instance) {
@@ -7888,7 +8020,7 @@ class di extends Ft {
7888
8020
  return `${this.props.three.app.appID}_transform`;
7889
8021
  }
7890
8022
  }
7891
- function Gs(i) {
8023
+ function $s(i) {
7892
8024
  switch (i) {
7893
8025
  case "color":
7894
8026
  return "Color";
@@ -7911,7 +8043,7 @@ function Gs(i) {
7911
8043
  }
7912
8044
  return i;
7913
8045
  }
7914
- function Ro(i, e) {
8046
+ function Do(i, e) {
7915
8047
  function t() {
7916
8048
  return `${e.app.appID}_light`;
7917
8049
  }
@@ -7924,7 +8056,7 @@ function Ro(i, e) {
7924
8056
  for (const o in i.lightInfo) {
7925
8057
  const c = i.lightInfo[o];
7926
8058
  c !== void 0 && (c.isColor !== void 0 ? r.push({
7927
- title: Gs(o),
8059
+ title: $s(o),
7928
8060
  prop: o,
7929
8061
  type: "color",
7930
8062
  value: c,
@@ -7938,7 +8070,7 @@ function Ro(i, e) {
7938
8070
  }
7939
8071
  }
7940
8072
  }) : r.push({
7941
- title: Gs(o),
8073
+ title: $s(o),
7942
8074
  prop: o,
7943
8075
  type: typeof c,
7944
8076
  value: c,
@@ -7965,7 +8097,7 @@ function Ro(i, e) {
7965
8097
  }
7966
8098
  );
7967
8099
  }
7968
- function Io(i) {
8100
+ function Ro(i) {
7969
8101
  const e = i.object, t = i.three;
7970
8102
  function s() {
7971
8103
  return `${t.app.appID}_animation`;
@@ -8036,7 +8168,7 @@ function Io(i) {
8036
8168
  }), o.push({
8037
8169
  title: "Mixer",
8038
8170
  items: v
8039
- }), d = new Aa(m), me.instance?.scene.add(d);
8171
+ }), d = new Ra(m), me.instance?.scene.add(d);
8040
8172
  }
8041
8173
  }
8042
8174
  }
@@ -8054,7 +8186,7 @@ function Io(i) {
8054
8186
  }
8055
8187
  );
8056
8188
  }
8057
- const Yi = {
8189
+ const Bi = {
8058
8190
  name: "",
8059
8191
  uuid: "",
8060
8192
  type: "",
@@ -8067,15 +8199,15 @@ const Yi = {
8067
8199
  lightInfo: void 0,
8068
8200
  children: []
8069
8201
  };
8070
- let ce = { ...Yi };
8071
- function Lo(i) {
8072
- const [e, t] = Z(-1);
8202
+ let ce = { ...Bi };
8203
+ function Io(i) {
8204
+ const [e, t] = B(-1);
8073
8205
  tt(() => {
8074
8206
  function r(c) {
8075
8207
  ce = { ...c.value }, t(Date.now());
8076
8208
  }
8077
8209
  function o() {
8078
- ce = { ...Yi }, t(Date.now());
8210
+ ce = { ...Bi }, t(Date.now());
8079
8211
  }
8080
8212
  return D.addEventListener(A.SET_SCENE, o), D.addEventListener(A.SET_OBJECT, r), () => {
8081
8213
  D.removeEventListener(A.SET_SCENE, o), D.removeEventListener(A.SET_OBJECT, r);
@@ -8083,16 +8215,16 @@ function Lo(i) {
8083
8215
  }, []);
8084
8216
  const s = ce.type.toLowerCase(), n = ce.animations.length > 0 || ce.mixer !== void 0, a = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
8085
8217
  return /* @__PURE__ */ u.jsx(
8086
- oi,
8218
+ li,
8087
8219
  {
8088
8220
  label: "Inspector",
8089
8221
  button: ce.uuid.length > 0 ? /* @__PURE__ */ u.jsx("button", { className: "remove", onClick: () => {
8090
- ge.instance.remove(ce.name), ce = { ...Yi }, t(Date.now());
8222
+ ge.instance.remove(ce.name), ce = { ...Bi }, t(Date.now());
8091
8223
  } }) : void 0,
8092
8224
  children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: i.class, children: ce.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8093
8225
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8094
8226
  /* @__PURE__ */ u.jsx(
8095
- ii,
8227
+ si,
8096
8228
  {
8097
8229
  type: "string",
8098
8230
  title: "Name",
@@ -8102,7 +8234,7 @@ function Lo(i) {
8102
8234
  }
8103
8235
  ),
8104
8236
  /* @__PURE__ */ u.jsx(
8105
- ii,
8237
+ si,
8106
8238
  {
8107
8239
  type: "string",
8108
8240
  title: "Type",
@@ -8112,7 +8244,7 @@ function Lo(i) {
8112
8244
  }
8113
8245
  ),
8114
8246
  /* @__PURE__ */ u.jsx(
8115
- ii,
8247
+ si,
8116
8248
  {
8117
8249
  type: "string",
8118
8250
  title: "UUID",
@@ -8123,28 +8255,28 @@ function Lo(i) {
8123
8255
  )
8124
8256
  ] }),
8125
8257
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8126
- /* @__PURE__ */ u.jsx(di, { object: ce, three: i.three }),
8127
- n ? /* @__PURE__ */ u.jsx(Io, { object: ce, three: i.three }) : null,
8128
- s.search("camera") > -1 ? Wr(ce, i.three) : null,
8129
- s.search("light") > -1 ? Ro(ce, i.three) : null,
8130
- a ? Br(ce, i.three) : null
8258
+ /* @__PURE__ */ u.jsx(ui, { object: ce, three: i.three }),
8259
+ n ? /* @__PURE__ */ u.jsx(Ro, { object: ce, three: i.three }) : null,
8260
+ s.search("camera") > -1 ? Zr(ce, i.three) : null,
8261
+ s.search("light") > -1 ? Do(ce, i.three) : null,
8262
+ a ? Yr(ce, i.three) : null
8131
8263
  ] })
8132
8264
  ] }) }, e)
8133
8265
  },
8134
8266
  "Inspector"
8135
8267
  );
8136
8268
  }
8137
- class ko extends Ft {
8269
+ class Lo extends Ft {
8138
8270
  // Renderer
8139
8271
  autoClear = !0;
8140
8272
  autoClearColor = !0;
8141
8273
  autoClearDepth = !0;
8142
8274
  autoClearStencil = !0;
8143
- outputColorSpace = us;
8275
+ outputColorSpace = ms;
8144
8276
  localClippingEnabled = !1;
8145
8277
  clearColor = new et(0);
8146
8278
  clearAlpha = 1;
8147
- toneMapping = ps;
8279
+ toneMapping = fs;
8148
8280
  toneMappingExposure = 1;
8149
8281
  constructor(e) {
8150
8282
  super(e);
@@ -8268,11 +8400,11 @@ class ko extends Ft {
8268
8400
  options: [
8269
8401
  {
8270
8402
  title: "No Color Space",
8271
- value: Da
8403
+ value: Ia
8272
8404
  },
8273
8405
  {
8274
8406
  title: "SRB Color Space",
8275
- value: us
8407
+ value: ms
8276
8408
  },
8277
8409
  {
8278
8410
  title: "Linear SRB Color Space",
@@ -8290,35 +8422,35 @@ class ko extends Ft {
8290
8422
  options: [
8291
8423
  {
8292
8424
  title: "None ",
8293
- value: ps
8425
+ value: fs
8294
8426
  },
8295
8427
  {
8296
8428
  title: "Linear ",
8297
- value: Ra
8429
+ value: La
8298
8430
  },
8299
8431
  {
8300
8432
  title: "Reinhard",
8301
- value: Ia
8433
+ value: ka
8302
8434
  },
8303
8435
  {
8304
8436
  title: "Cineon ",
8305
- value: La
8437
+ value: Ua
8306
8438
  },
8307
8439
  {
8308
8440
  title: "ACES Filmic",
8309
- value: ka
8441
+ value: ja
8310
8442
  },
8311
8443
  {
8312
8444
  title: "AgX",
8313
- value: Ua
8445
+ value: Na
8314
8446
  },
8315
8447
  {
8316
8448
  title: "Neutral",
8317
- value: ja
8449
+ value: Fa
8318
8450
  },
8319
8451
  {
8320
8452
  title: "Custom",
8321
- value: Na
8453
+ value: za
8322
8454
  }
8323
8455
  ],
8324
8456
  onChange: (t, s) => {
@@ -8351,12 +8483,12 @@ class ko extends Ft {
8351
8483
  return `${this.props.three.app.appID}_renderer`;
8352
8484
  }
8353
8485
  }
8354
- function Uo(i) {
8355
- const [e] = Z([]), [t] = Z([]), [s, n] = Z(0), a = (c) => {
8486
+ function ko(i) {
8487
+ const [e] = B([]), [t] = B([]), [s, n] = B(0), a = (c) => {
8356
8488
  const l = c.value;
8357
8489
  e.push(l), t.push(
8358
8490
  /* @__PURE__ */ u.jsx(
8359
- oi,
8491
+ li,
8360
8492
  {
8361
8493
  label: `Scene: ${l.name}`,
8362
8494
  scene: l,
@@ -8364,7 +8496,7 @@ function Uo(i) {
8364
8496
  onRefresh: () => {
8365
8497
  i.three.refreshScene(l.name);
8366
8498
  },
8367
- children: /* @__PURE__ */ u.jsx(Cs, { child: l, scene: l, three: i.three })
8499
+ children: /* @__PURE__ */ u.jsx(Ss, { child: l, scene: l, three: i.three })
8368
8500
  },
8369
8501
  Math.random()
8370
8502
  )
@@ -8374,7 +8506,7 @@ function Uo(i) {
8374
8506
  for (let d = 0; d < e.length; d++)
8375
8507
  if (l.uuid === e[d].uuid) {
8376
8508
  e[d] = l, t[d] = /* @__PURE__ */ u.jsx(
8377
- oi,
8509
+ li,
8378
8510
  {
8379
8511
  label: `Scene: ${l.name}`,
8380
8512
  scene: l,
@@ -8382,7 +8514,7 @@ function Uo(i) {
8382
8514
  onRefresh: () => {
8383
8515
  i.three.refreshScene(l.name);
8384
8516
  },
8385
- children: /* @__PURE__ */ u.jsx(Cs, { child: l, scene: l, three: i.three })
8517
+ children: /* @__PURE__ */ u.jsx(Ss, { child: l, scene: l, three: i.three })
8386
8518
  },
8387
8519
  Math.random()
8388
8520
  ), n(Date.now());
@@ -8400,8 +8532,8 @@ function Uo(i) {
8400
8532
  D.removeEventListener(A.ADD_SCENE, a), D.removeEventListener(A.REFRESH_SCENE, r), D.removeEventListener(A.REMOVE_SCENE, o);
8401
8533
  }), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
8402
8534
  /* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, s),
8535
+ /* @__PURE__ */ u.jsx(Io, { three: i.three }),
8403
8536
  /* @__PURE__ */ u.jsx(Lo, { three: i.three }),
8404
- /* @__PURE__ */ u.jsx(ko, { three: i.three }),
8405
8537
  /* @__PURE__ */ u.jsx(te, { three: i.three })
8406
8538
  ] });
8407
8539
  }
@@ -8446,7 +8578,7 @@ function al(i) {
8446
8578
  }
8447
8579
  d.material.needsUpdate = !0;
8448
8580
  };
8449
- c.value.src.length > 0 ? yn(c.value.src).then((m) => {
8581
+ c.value.src.length > 0 ? En(c.value.src).then((m) => {
8450
8582
  m.offset.set(c.value.offset[0], c.value.offset[1]), m.repeat.set(c.value.repeat[0], c.value.repeat[1]), p(m);
8451
8583
  }) : p(null);
8452
8584
  }
@@ -8454,9 +8586,9 @@ function al(i) {
8454
8586
  const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
8455
8587
  if (f !== void 0)
8456
8588
  try {
8457
- p !== void 0 ? mr(f, p)[c](d) : f[c](d);
8458
- } catch (w) {
8459
- console.log("Error requesting method:"), console.log(w), console.log(c), console.log(d);
8589
+ p !== void 0 ? fr(f, p)[c](d) : f[c](d);
8590
+ } catch (E) {
8591
+ console.log("Error requesting method:"), console.log(E), console.log(c), console.log(d);
8460
8592
  }
8461
8593
  };
8462
8594
  return D.addEventListener(A.GET_OBJECT, t), D.addEventListener(A.UPDATE_OBJECT, n), D.addEventListener(A.CREATE_TEXTURE, a), D.addEventListener(A.REQUEST_METHOD, r), () => {
@@ -8464,7 +8596,7 @@ function al(i) {
8464
8596
  };
8465
8597
  }, []), null;
8466
8598
  }
8467
- function jo(i) {
8599
+ function Uo(i) {
8468
8600
  return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: i.ref, style: i.style, children: [
8469
8601
  /* @__PURE__ */ u.jsx("div", { className: "header", children: i.header }),
8470
8602
  i.children,
@@ -8472,76 +8604,127 @@ function jo(i) {
8472
8604
  ] });
8473
8605
  }
8474
8606
  function rl(i) {
8475
- return /* @__PURE__ */ u.jsx(jo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8476
- /* @__PURE__ */ u.jsx(
8477
- me,
8478
- {
8479
- three: i.three,
8480
- scenes: i.scenes,
8481
- onSceneResize: i.onSceneResize,
8482
- onSceneSet: i.onSceneSet,
8483
- onSceneUpdate: i.onSceneUpdate
8484
- }
8485
- ),
8486
- /* @__PURE__ */ u.jsx(Uo, { three: i.three })
8487
- ] }) });
8607
+ return /* @__PURE__ */ u.jsx(
8608
+ Uo,
8609
+ {
8610
+ header: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8611
+ /* @__PURE__ */ u.jsx(
8612
+ Sn,
8613
+ {
8614
+ title: "Options",
8615
+ options: [
8616
+ {
8617
+ type: "option",
8618
+ title: "Option 1",
8619
+ value: "Option 1"
8620
+ },
8621
+ {
8622
+ type: "option",
8623
+ title: "Option 2",
8624
+ value: "Option 2"
8625
+ },
8626
+ {
8627
+ type: "option",
8628
+ title: "Option 3",
8629
+ value: "Option 3"
8630
+ }
8631
+ ],
8632
+ onSelect: (e) => {
8633
+ console.log("Option >", e);
8634
+ }
8635
+ }
8636
+ ),
8637
+ /* @__PURE__ */ u.jsx(
8638
+ wn,
8639
+ {
8640
+ title: "Draggable",
8641
+ options: [
8642
+ "Drag 1",
8643
+ "Drag 2",
8644
+ "Dragggggable 3",
8645
+ "Drag 4",
8646
+ "Drag 5"
8647
+ ],
8648
+ onDragComplete: (e) => {
8649
+ console.log("Draggable >", e);
8650
+ }
8651
+ }
8652
+ )
8653
+ ] }),
8654
+ children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8655
+ /* @__PURE__ */ u.jsx(
8656
+ me,
8657
+ {
8658
+ three: i.three,
8659
+ scenes: i.scenes,
8660
+ onSceneResize: i.onSceneResize,
8661
+ onSceneSet: i.onSceneSet,
8662
+ onSceneUpdate: i.onSceneUpdate
8663
+ }
8664
+ ),
8665
+ /* @__PURE__ */ u.jsx(ko, { three: i.three })
8666
+ ] })
8667
+ }
8668
+ );
8488
8669
  }
8489
8670
  export {
8490
- oi as Accordion,
8491
- Qo as Application,
8492
- Gi as BaseRemote,
8493
- En as ChildObject,
8494
- Cs as ContainerObject,
8495
- Er as Draggable,
8496
- br as DraggableItem,
8497
- Cr as Dropdown,
8498
- Sr as DropdownItem,
8499
- jo as Editor,
8500
- qo as ElementProxy,
8501
- lr as ElementProxyReceiver,
8502
- ti as ExportTexture,
8503
- Lo as Inspector,
8671
+ li as Accordion,
8672
+ Ko as AppRunner,
8673
+ qo as Application,
8674
+ $i as BaseRemote,
8675
+ Qo as BaseScene,
8676
+ xn as ChildObject,
8677
+ Ss as ContainerObject,
8678
+ wn as Draggable,
8679
+ Er as DraggableItem,
8680
+ Sn as Dropdown,
8681
+ Cr as DropdownItem,
8682
+ Uo as Editor,
8683
+ Xo as ElementProxy,
8684
+ cr as ElementProxyReceiver,
8685
+ ii as ExportTexture,
8686
+ Io as Inspector,
8504
8687
  me as MultiView,
8505
- bn as NavButton,
8506
- Ko as ProxyManager,
8507
- Xa as QualityType,
8688
+ Cn as NavButton,
8689
+ $o as ProxyManager,
8690
+ qa as QualityType,
8508
8691
  Jo as RemoteComponents,
8509
8692
  nl as RemoteController,
8510
8693
  il as RemoteTheatre,
8511
8694
  sl as RemoteThree,
8512
8695
  al as SceneInspector,
8513
- Uo as SidePanel,
8514
- Zs as Spline,
8515
- Po as SplineEditor,
8696
+ ko as SidePanel,
8697
+ Gs as Spline,
8698
+ Mo as SplineEditor,
8516
8699
  rl as ThreeEditor,
8517
8700
  A as ToolEvents,
8518
8701
  ge as Transform,
8519
- $o as WebworkerEventHandlers,
8520
- ri as capitalize,
8702
+ Go as WebworkerEventHandlers,
8703
+ oi as capitalize,
8521
8704
  $e as clamp,
8522
- ms as colorToHex,
8523
- za as copyToClipboard,
8524
- Go as cubicBezier,
8705
+ gs as colorToHex,
8706
+ Ya as copyToClipboard,
8707
+ Zo as cubicBezier,
8525
8708
  tl as customizeTheatreElements,
8526
- Zo as damp,
8709
+ Bo as damp,
8527
8710
  D as debugDispatcher,
8528
- Ho as defaultTheatreCallback,
8529
- Yo as detectSettings,
8711
+ Fo as defaultTheatreCallback,
8712
+ zo as detectSettings,
8530
8713
  He as dispose,
8531
- Ja as disposeMaterial,
8532
- vs as disposeTexture,
8533
- Vo as distance,
8534
- Ni as hierarchyUUID,
8535
- Ya as isColor,
8536
- Bo as map,
8714
+ bn as disposeMaterial,
8715
+ bs as disposeTexture,
8716
+ Yo as distance,
8717
+ Fi as hierarchyUUID,
8718
+ Va as isColor,
8719
+ Ho as map,
8537
8720
  Nt as mix,
8538
- ai as noop,
8539
- Ui as normalize,
8540
- Xo as parseModelLite,
8541
- Ha as randomID,
8542
- ys as resetThreeObjects,
8721
+ ri as noop,
8722
+ ji as normalize,
8723
+ Wo as parseModelLite,
8724
+ Ba as randomID,
8725
+ Es as resetThreeObjects,
8543
8726
  Pe as round,
8544
- Wo as roundTo,
8727
+ Vo as roundTo,
8545
8728
  el as theatreEditorApp,
8546
- ji as totalThreeObjects
8729
+ Ni as totalThreeObjects
8547
8730
  };