@tomorrowevening/hermes 0.0.131 → 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 { OrthographicCamera as Ii, Scene as Ws, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, ObjectLoader as Wn, AnimationMixer as Gn, AnimationClip as Xn, EventDispatcher as Yi, Texture as $n, RepeatWrapping as ls, Color as et, ColorManagement as mt, WebGLRenderTarget as qn, FrontSide as Kn, BackSide as Gs, DoubleSide as Bi, NoBlending as Qn, NormalBlending as Jn, AdditiveBlending as ea, SubtractiveBlending as ta, MultiplyBlending as ia, CustomBlending as sa, AddEquation as na, SubtractEquation as aa, ReverseSubtractEquation as ra, MinEquation as oa, MaxEquation as la, ZeroFactor as Xs, OneFactor as $s, SrcColorFactor as qs, OneMinusSrcColorFactor as Ks, SrcAlphaFactor as Qs, OneMinusSrcAlphaFactor as Js, DstAlphaFactor as en, OneMinusDstAlphaFactor as tn, DstColorFactor as sn, OneMinusDstColorFactor as nn, SrcAlphaSaturateFactor as ca, ConstantColorFactor as an, OneMinusConstantColorFactor as rn, ConstantAlphaFactor as on, OneMinusConstantAlphaFactor as ln, Line as Ie, LineBasicMaterial as Vi, Ray as ha, Plane as da, MathUtils as ua, Vector3 as P, Controls as cn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as Li, Vector2 as pe, ShaderMaterial as hn, GLSL3 as pa, PlaneGeometry as dn, Raycaster as ni, Euler as un, Matrix4 as ci, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Zt, SphereGeometry as pn, TorusGeometry as Et, CatmullRomCurve3 as cs, Group as ma, AxesHelper as fa, MeshDepthMaterial as ga, MeshNormalMaterial as _a, WebGLRenderer as va, PerspectiveCamera as hs, CameraHelper as ya, SkinnedMesh as ba, SpotLightHelper as Ea, PointLightHelper as Ca, HemisphereLightHelper as Sa, DirectionalLightHelper as wa, Clock as xa, Vector4 as Oa, Box3 as Ta, Sphere as Ma, SkeletonHelper as Pa, SRGBColorSpace as ds, NoToneMapping as us, NoColorSpace as Aa, LinearToneMapping as Da, ReinhardToneMapping as Ra, CineonToneMapping as Ia, ACESFilmicToneMapping as La, AgXToneMapping as ka, NeutralToneMapping as Ua, CustomToneMapping as ja } from "three";
2
- import mn, { useState as Z, useRef as J, useEffect as tt, useMemo as Ut, Component as Ft, createRef as Ve, forwardRef as Na } from "react";
3
- import { Reorder as fn } from "framer-motion";
4
- const ai = () => {
5
- }, zo = () => {
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 Fa(i) {
9
+ function Ya(i) {
11
10
  const e = JSON.stringify(i);
12
11
  return navigator.clipboard.writeText(e), e;
13
12
  }
14
- function za() {
13
+ function Ba() {
15
14
  return Math.round(Math.random() * 1e6).toString();
16
15
  }
17
- function Ha(i) {
16
+ function Va(i) {
18
17
  return i.r !== void 0 && i.g !== void 0 && i.b !== void 0;
19
18
  }
20
- function ps(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 Ya = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
53
- function ms(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 gn = typeof window > "u", Le = (() => {
57
- if (gn)
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 Ba(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 Ba(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 fs 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 = [], gs = [];
103
- function Va(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 Va(i, e) {
115
114
  return n;
116
115
  let o, c, l = 0, d = 0, p = 0;
117
116
  for (; d < s; )
118
- gs[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 === gs[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 Za(i) {
123
+ function Xa(i) {
125
124
  return i != null;
126
125
  }
127
- const Wa = ({ 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 (gn)
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 fs("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 = ms(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 = ms(p), f = function(I, U, R) {
155
- return U === "apple gpu" ? Ba(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 Wa = ({ 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 fs)
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, Va(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 Wa = ({ 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(Za).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 = Ya.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 Ga = /* @__PURE__ */ ((i) => (i[i.High = 0] = "High", i[i.Medium = 1] = "Medium", i[i.Low = 2] = "Low", i))(Ga || {});
215
- function Ho(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
- Wa().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,61 +237,77 @@ function Ho(i) {
238
237
  function $e(i, e, t) {
239
238
  return Math.min(e, Math.max(i, t));
240
239
  }
241
- function ki(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 Yo(i, e, t, s, n) {
248
- return Nt(t, s, ki(i, e, n));
246
+ function Ho(i, e, t, s, n) {
247
+ return Nt(t, s, ji(i, e, n));
249
248
  }
250
- function Bo(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 Vo(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 Zo(i, e = 1) {
259
+ function Vo(i, e = 1) {
261
260
  return Number(i.toFixed(e));
262
261
  }
263
- function Xa(i, e, t, s) {
262
+ function Ka(i, e, t, s) {
264
263
  return i === e && t === s;
265
264
  }
266
- function $a(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 qa(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 Ka(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 Wo(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 (Xa(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 = qa(S, f, w, v, x);
287
- let U = $a(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 Ka(S, g, y, E, C);
289
+ return er(S, g, y, C, w);
291
290
  }
292
- const Go = (i) => {
291
+ const bs = (i) => {
293
292
  i?.dispose();
294
- }, Qa = (i) => {
295
- i && (Array.isArray(i) ? i.forEach((e) => e.dispose()) : i.dispose());
293
+ }, bn = (i) => {
294
+ if (i)
295
+ if (Array.isArray(i))
296
+ i.forEach((e) => bn(e));
297
+ else {
298
+ for (const e in i) {
299
+ const t = i[e];
300
+ t !== null && t instanceof Li && bs(t);
301
+ }
302
+ if (i.isShaderMaterial === !0) {
303
+ const e = i;
304
+ for (const t in e.uniforms) {
305
+ const s = e.uniforms[t];
306
+ s.value !== null && s.value instanceof Li && bs(s.value);
307
+ }
308
+ }
309
+ i.dispose();
310
+ }
296
311
  }, He = (i) => {
297
312
  if (i) {
298
313
  for (; i.children.length > 0; ) {
@@ -301,19 +316,19 @@ const Go = (i) => {
301
316
  }
302
317
  if (i.parent && i.parent.remove(i), i.isMesh) {
303
318
  const e = i;
304
- e.geometry?.dispose(), Qa(e.material);
319
+ e.geometry?.dispose(), bn(e.material);
305
320
  }
306
321
  i.dispose !== void 0 && i.dispose();
307
322
  }
308
323
  };
309
- let Ui = 0;
310
- const _s = () => {
311
- Ui = 0;
312
- }, ji = (i) => {
324
+ let Ni = 0;
325
+ const Es = () => {
326
+ Ni = 0;
327
+ }, Fi = (i) => {
313
328
  if (!i)
314
329
  return;
315
330
  let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
316
- if (e.length === 0 && (e = `obj_${Ui}`, Ui++), 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) {
317
332
  const t = i;
318
333
  if (Array.isArray(t.material))
319
334
  t.material.forEach((s, n) => {
@@ -324,9 +339,9 @@ const _s = () => {
324
339
  s.uuid = `${e}.material`;
325
340
  }
326
341
  }
327
- i.children.forEach((t) => ji(t));
342
+ i.children.forEach((t) => Fi(t));
328
343
  };
329
- class ti {
344
+ class ii {
330
345
  static renderer;
331
346
  static canvas;
332
347
  static context = null;
@@ -355,7 +370,7 @@ class ti {
355
370
  }
356
371
  static renderToCanvas(e) {
357
372
  if (this.material === null) {
358
- this.camera = new Ii(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ws(), 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();
359
374
  const t = new _t();
360
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));
361
376
  const s = new M(t, this.material);
@@ -370,13 +385,13 @@ class ti {
370
385
  return this.renderer.domElement;
371
386
  }
372
387
  }
373
- function Xo(i) {
388
+ function Wo(i) {
374
389
  return new Promise((e) => {
375
- const t = new Wn();
390
+ const t = new Qn();
376
391
  t.parseAsync(i.scene).then((s) => {
377
- const n = new Gn(s);
392
+ const n = new Jn(s);
378
393
  if (i.animations.length > 0) {
379
- const r = i.animations.map((c) => Xn.parse(c));
394
+ const r = i.animations.map((c) => ea.parse(c));
380
395
  n.clipAction(r[0]).play(), n.getRoot().animations = i.animations, n.getRoot().mixer = n;
381
396
  }
382
397
  const a = [];
@@ -392,7 +407,7 @@ function Xo(i) {
392
407
  });
393
408
  });
394
409
  }
395
- const at = Zi([
410
+ const at = Xi([
396
411
  "ctrlKey",
397
412
  "metaKey",
398
413
  "shiftKey",
@@ -403,35 +418,35 @@ const at = Zi([
403
418
  "clientY",
404
419
  "pageX",
405
420
  "pageY"
406
- ]), Ja = Zi([
421
+ ]), tr = Xi([
407
422
  "clientX",
408
423
  "clientY",
409
424
  "deltaX",
410
425
  "deltaY",
411
426
  "deltaMode"
412
- ]), er = Zi([
427
+ ]), ir = Xi([
413
428
  "ctrlKey",
414
429
  "metaKey",
415
430
  "shiftKey",
416
431
  "keyCode"
417
432
  ]);
418
- function tr(i, e) {
419
- i.preventDefault(), Ja(i, e);
433
+ function sr(i, e) {
434
+ i.preventDefault(), tr(i, e);
420
435
  }
421
- function ir(i) {
436
+ function nr(i) {
422
437
  i.preventDefault();
423
438
  }
424
- function sr(i, e, t) {
439
+ function ar(i, e, t) {
425
440
  for (const s of e)
426
441
  t[s] = i[s];
427
442
  }
428
- function Zi(i) {
443
+ function Xi(i) {
429
444
  return function(t, s) {
430
445
  const n = { type: t.type };
431
- sr(t, i, n), s(n);
446
+ ar(t, i, n), s(n);
432
447
  };
433
448
  }
434
- function bi(i, e) {
449
+ function Ei(i, e) {
435
450
  const t = [], s = { type: i.type, touches: t };
436
451
  for (let n = 0; n < i.touches.length; ++n) {
437
452
  const a = i.touches[n];
@@ -442,7 +457,7 @@ function bi(i, e) {
442
457
  }
443
458
  e(s);
444
459
  }
445
- const nr = {
460
+ const rr = {
446
461
  37: !0,
447
462
  // left
448
463
  38: !0,
@@ -452,30 +467,30 @@ const nr = {
452
467
  40: !0
453
468
  // down
454
469
  };
455
- function ar(i, e) {
470
+ function or(i, e) {
456
471
  const { keyCode: t } = i;
457
- nr[t] && (i.preventDefault(), er(i, e));
472
+ rr[t] && (i.preventDefault(), ir(i, e));
458
473
  }
459
- const $o = {
460
- contextmenu: ir,
474
+ const Go = {
475
+ contextmenu: nr,
461
476
  mousedown: at,
462
477
  mousemove: at,
463
478
  mouseup: at,
464
479
  pointerdown: at,
465
480
  pointermove: at,
466
481
  pointerup: at,
467
- touchstart: bi,
468
- touchmove: bi,
469
- touchend: bi,
470
- wheel: tr,
471
- keydown: ar
482
+ touchstart: Ei,
483
+ touchmove: Ei,
484
+ touchend: Ei,
485
+ wheel: sr,
486
+ keydown: or
472
487
  };
473
- let rr = 0;
474
- class qo {
488
+ let lr = 0;
489
+ class Xo {
475
490
  id;
476
491
  worker;
477
492
  constructor(e, t, s) {
478
- this.id = rr++, this.worker = t;
493
+ this.id = lr++, this.worker = t;
479
494
  const n = (r) => {
480
495
  this.worker.postMessage({
481
496
  type: "event",
@@ -503,7 +518,7 @@ class qo {
503
518
  window.addEventListener("resize", a), a();
504
519
  }
505
520
  }
506
- class or extends Yi {
521
+ class cr extends Zi {
507
522
  style = {};
508
523
  left = 0;
509
524
  top = 0;
@@ -549,7 +564,7 @@ class or extends Yi {
549
564
  this.left = e.left, this.top = e.top, this.width = e.width, this.height = e.height;
550
565
  return;
551
566
  }
552
- e.preventDefault = ai, e.stopPropagation = ai, this.dispatchEvent(e);
567
+ e.preventDefault = ri, e.stopPropagation = ri, this.dispatchEvent(e);
553
568
  }
554
569
  focus() {
555
570
  }
@@ -557,13 +572,13 @@ class or extends Yi {
557
572
  return this;
558
573
  }
559
574
  }
560
- class Ko {
575
+ class $o {
561
576
  targets = {};
562
577
  constructor() {
563
578
  this.handleEvent = this.handleEvent.bind(this);
564
579
  }
565
580
  makeProxy(e) {
566
- const { id: t } = e, s = new or();
581
+ const { id: t } = e, s = new cr();
567
582
  this.targets[t] = s;
568
583
  }
569
584
  getProxy(e) {
@@ -573,7 +588,7 @@ class Ko {
573
588
  this.targets[e.id]?.handleEvent(e.data);
574
589
  }
575
590
  }
576
- class Qo {
591
+ class qo {
577
592
  components = /* @__PURE__ */ new Map();
578
593
  listen;
579
594
  // Protected
@@ -631,9 +646,116 @@ class Qo {
631
646
  e && (this._mode = "editor");
632
647
  }
633
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
+ }
634
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 || {});
635
- const D = new Yi();
636
- class Wi {
757
+ const D = new Zi();
758
+ class $i {
637
759
  app;
638
760
  constructor(e) {
639
761
  this.app = e;
@@ -645,7 +767,7 @@ class Wi {
645
767
  handleEditor(e, t, s) {
646
768
  }
647
769
  }
648
- class Jo extends Wi {
770
+ class Jo extends $i {
649
771
  selectDropdown(e, t) {
650
772
  this.app.send({
651
773
  event: "selectComponent",
@@ -746,15 +868,15 @@ function tl() {
746
868
  }
747
869
  }, 1e3);
748
870
  }
749
- function lr(i, e, t, s, n) {
871
+ function hr(i, e, t, s, n) {
750
872
  const a = 1 - i;
751
873
  return a * a * a * e + 3 * a * a * i * t + 3 * a * i * i * s + i * i * i * n;
752
874
  }
753
- function cr(i, e, t) {
875
+ function dr(i, e, t) {
754
876
  if (i.type !== "bezier" || i.handles.length !== 4)
755
877
  throw new Error("Invalid keyframe data for Bézier interpolation.");
756
878
  const [s, n] = i.handles, a = (t - i.position) / (e.position - i.position);
757
- return lr(
879
+ return hr(
758
880
  a,
759
881
  i.value,
760
882
  i.value + s,
@@ -762,7 +884,7 @@ function cr(i, e, t) {
762
884
  e.value
763
885
  );
764
886
  }
765
- class il extends Wi {
887
+ class il extends $i {
766
888
  project;
767
889
  sheets = /* @__PURE__ */ new Map();
768
890
  sheetObjects = /* @__PURE__ */ new Map();
@@ -824,12 +946,12 @@ class il extends Wi {
824
946
  return;
825
947
  const c = `${this.getSheetInstance(e, a)}_${t}`;
826
948
  let l = this.sheetObjects.get(c), d = s;
827
- 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);
828
950
  const p = l.onValuesChange((m) => {
829
951
  if (this.app.editor) {
830
- for (const w in m) {
831
- const v = m[w];
832
- typeof v == "object" && Ha(v) && (m[w] = {
952
+ for (const E in m) {
953
+ const v = m[E];
954
+ typeof v == "object" && Va(v) && (m[E] = {
833
955
  r: v.r,
834
956
  g: v.g,
835
957
  b: v.b,
@@ -867,14 +989,14 @@ class il extends Wi {
867
989
  return [];
868
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();
869
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) => {
870
- const f = (w, v) => {
871
- 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);
872
994
  if (!x)
873
995
  return g?.value || 0;
874
996
  if (!g || x.position === v)
875
997
  return x.value;
876
998
  if (x.type === "bezier")
877
- return cr(x, g, v);
999
+ return dr(x, g, v);
878
1000
  const y = (v - x.position) / (g.position - x.position);
879
1001
  return x.value + y * (g.value - x.value);
880
1002
  };
@@ -971,7 +1093,7 @@ class il extends Wi {
971
1093
  this.studio?.ui.hide();
972
1094
  }
973
1095
  }
974
- function hr(i) {
1096
+ function ur(i) {
975
1097
  if (i.name === "cameras")
976
1098
  return "camera";
977
1099
  if (i.name === "interactive")
@@ -996,7 +1118,7 @@ function pt(i) {
996
1118
  e.children.push(pt(t));
997
1119
  }), e;
998
1120
  }
999
- function dr(i) {
1121
+ function pr(i) {
1000
1122
  const e = {};
1001
1123
  for (const t in i) {
1002
1124
  const s = i[t].value;
@@ -1012,7 +1134,7 @@ function dr(i) {
1012
1134
  }
1013
1135
  return e;
1014
1136
  }
1015
- function ur(i) {
1137
+ function mr(i) {
1016
1138
  switch (i) {
1017
1139
  case "blendSrcAlpha":
1018
1140
  case "blendDstAlpha":
@@ -1027,7 +1149,7 @@ function ur(i) {
1027
1149
  function rt(i) {
1028
1150
  const e = {};
1029
1151
  for (const t in i) {
1030
- if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || ur(t))
1152
+ if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || mr(t))
1031
1153
  continue;
1032
1154
  const s = typeof i[t], n = i[t];
1033
1155
  switch (s) {
@@ -1038,10 +1160,10 @@ function rt(i) {
1038
1160
  break;
1039
1161
  case "object":
1040
1162
  n !== null ? (e[t] = n, n.isTexture ? e[t] = {
1041
- src: ti.renderToBlob(n),
1163
+ src: ii.renderToBlob(n),
1042
1164
  offset: [n.offset.x, n.offset.y],
1043
1165
  repeat: [n.repeat.x, n.repeat.y]
1044
- } : t === "uniforms" && (e[t] = dr(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
1166
+ } : t === "uniforms" && (e[t] = pr(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
1045
1167
  src: "",
1046
1168
  offset: [0, 0],
1047
1169
  repeat: [1, 1]
@@ -1051,7 +1173,7 @@ function rt(i) {
1051
1173
  }
1052
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;
1053
1175
  }
1054
- function Ei(i) {
1176
+ function Ci(i) {
1055
1177
  i.updateMatrix();
1056
1178
  const e = {
1057
1179
  name: i.name,
@@ -1132,7 +1254,7 @@ function Ei(i) {
1132
1254
  });
1133
1255
  return e;
1134
1256
  }
1135
- function pr(i, e) {
1257
+ function fr(i, e) {
1136
1258
  const t = e.split(".");
1137
1259
  switch (t.length) {
1138
1260
  case 1:
@@ -1149,7 +1271,7 @@ function pr(i, e) {
1149
1271
  return i[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
1150
1272
  }
1151
1273
  }
1152
- function mr(i, e) {
1274
+ function gr(i, e) {
1153
1275
  for (const t in e)
1154
1276
  i[t] = e[t];
1155
1277
  }
@@ -1194,19 +1316,19 @@ function se(i, e, t) {
1194
1316
  r = i[s[0]][s[1]][s[2]][s[3]][s[4]];
1195
1317
  break;
1196
1318
  }
1197
- r != null && mr(r, t);
1319
+ r != null && gr(r, t);
1198
1320
  }
1199
1321
  }
1200
- function _n(i) {
1322
+ function En(i) {
1201
1323
  return new Promise((e, t) => {
1202
1324
  const s = new Image();
1203
1325
  s.onload = () => {
1204
- const n = new $n(s);
1205
- n.wrapS = ls, n.wrapT = ls, n.needsUpdate = !0, e(n);
1326
+ const n = new Li(s);
1327
+ n.wrapS = ds, n.wrapT = ds, n.needsUpdate = !0, e(n);
1206
1328
  }, s.onerror = t, s.src = i;
1207
1329
  });
1208
1330
  }
1209
- class sl extends Wi {
1331
+ class sl extends $i {
1210
1332
  canvas = null;
1211
1333
  // Canvas or OffscreenCanvas
1212
1334
  inputElement = null;
@@ -1224,15 +1346,15 @@ class sl extends Wi {
1224
1346
  }), this.renderTargets.clear(), this.renderer?.dispose();
1225
1347
  }
1226
1348
  getObject(e) {
1227
- 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({
1228
1350
  event: "getObject",
1229
1351
  target: "app",
1230
1352
  data: e
1231
1353
  }));
1232
1354
  }
1233
1355
  setObject(e) {
1234
- this.renderer !== void 0 && (ti.renderer = this.renderer);
1235
- const t = Ei(e);
1356
+ this.renderer !== void 0 && (ii.renderer = this.renderer);
1357
+ const t = Ci(e);
1236
1358
  this.app.send({
1237
1359
  event: "setObject",
1238
1360
  target: "editor",
@@ -1351,7 +1473,7 @@ class sl extends Wi {
1351
1473
  addScene(e) {
1352
1474
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
1353
1475
  return;
1354
- _s(), ji(e);
1476
+ Es(), Fi(e);
1355
1477
  const t = pt(e);
1356
1478
  this.app.send({
1357
1479
  event: "addScene",
@@ -1394,7 +1516,7 @@ class sl extends Wi {
1394
1516
  setScene(e) {
1395
1517
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
1396
1518
  return;
1397
- this.renderer !== void 0 && (ti.renderer = this.renderer), _s(), ji(e);
1519
+ this.renderer !== void 0 && (ii.renderer = this.renderer), Es(), Fi(e);
1398
1520
  const t = pt(e);
1399
1521
  this.app.send({
1400
1522
  event: "setScene",
@@ -1406,7 +1528,7 @@ class sl extends Wi {
1406
1528
  addCamera(e) {
1407
1529
  if (!this.app.debugEnabled)
1408
1530
  return;
1409
- const t = Ei(e);
1531
+ const t = Ci(e);
1410
1532
  this.app.send({
1411
1533
  event: "addCamera",
1412
1534
  target: "editor",
@@ -1416,7 +1538,7 @@ class sl extends Wi {
1416
1538
  removeCamera(e) {
1417
1539
  if (!this.app.debugEnabled)
1418
1540
  return;
1419
- const t = Ei(e);
1541
+ const t = Ci(e);
1420
1542
  this.app.send({
1421
1543
  event: "removeCamera",
1422
1544
  target: "editor",
@@ -1492,7 +1614,7 @@ class sl extends Wi {
1492
1614
  }
1493
1615
  // Renderer
1494
1616
  addRT(e, t) {
1495
- const s = new qn(32, 32, t);
1617
+ const s = new ta(32, 32, t);
1496
1618
  s.texture.name = e, this.renderTargets.set(e, s);
1497
1619
  }
1498
1620
  resize(e, t) {
@@ -1516,7 +1638,7 @@ class sl extends Wi {
1516
1638
  return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
1517
1639
  }
1518
1640
  }
1519
- var Ni = { exports: {} }, Ct = {};
1641
+ var zi = { exports: {} }, Ct = {};
1520
1642
  /**
1521
1643
  * @license React
1522
1644
  * react-jsx-runtime.production.min.js
@@ -1526,12 +1648,12 @@ var Ni = { exports: {} }, Ct = {};
1526
1648
  * This source code is licensed under the MIT license found in the
1527
1649
  * LICENSE file in the root directory of this source tree.
1528
1650
  */
1529
- var vs;
1530
- function fr() {
1531
- if (vs)
1651
+ var Cs;
1652
+ function _r() {
1653
+ if (Cs)
1532
1654
  return Ct;
1533
- vs = 1;
1534
- var i = mn, 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 };
1535
1657
  function r(o, c, l) {
1536
1658
  var d, p = {}, m = null, f = null;
1537
1659
  l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
@@ -1544,7 +1666,7 @@ function fr() {
1544
1666
  }
1545
1667
  return Ct.Fragment = t, Ct.jsx = r, Ct.jsxs = r, Ct;
1546
1668
  }
1547
- var St = {};
1669
+ var wt = {};
1548
1670
  /**
1549
1671
  * @license React
1550
1672
  * react-jsx-runtime.development.js
@@ -1554,14 +1676,14 @@ var St = {};
1554
1676
  * This source code is licensed under the MIT license found in the
1555
1677
  * LICENSE file in the root directory of this source tree.
1556
1678
  */
1557
- var ys;
1558
- function gr() {
1559
- return ys || (ys = 1, process.env.NODE_ENV !== "production" && function() {
1560
- var i = mn, 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";
1561
1683
  function x(h) {
1562
1684
  if (h === null || typeof h != "object")
1563
1685
  return null;
1564
- var b = w && h[w] || h[v];
1686
+ var b = E && h[E] || h[v];
1565
1687
  return typeof b == "function" ? b : null;
1566
1688
  }
1567
1689
  var g = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
@@ -1569,10 +1691,10 @@ function gr() {
1569
1691
  {
1570
1692
  for (var b = arguments.length, T = new Array(b > 1 ? b - 1 : 0), k = 1; k < b; k++)
1571
1693
  T[k - 1] = arguments[k];
1572
- E("error", h, T);
1694
+ C("error", h, T);
1573
1695
  }
1574
1696
  }
1575
- function E(h, b, T) {
1697
+ function C(h, b, T) {
1576
1698
  {
1577
1699
  var k = g.ReactDebugCurrentFrame, H = k.getStackAddendum();
1578
1700
  H !== "" && (b += "%s", T = T.concat([H]));
@@ -1582,16 +1704,16 @@ function gr() {
1582
1704
  G.unshift("Warning: " + b), Function.prototype.apply.call(console[h], console, G);
1583
1705
  }
1584
1706
  }
1585
- 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;
1586
1708
  R = Symbol.for("react.module.reference");
1587
- function B(h) {
1588
- 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
1589
1711
  // types supported by any Flight configuration anywhere since
1590
1712
  // we don't know which Flight build this will end up being used
1591
1713
  // with.
1592
1714
  h.$$typeof === R || h.getModuleId !== void 0));
1593
1715
  }
1594
- function Se(h, b, T) {
1716
+ function we(h, b, T) {
1595
1717
  var k = h.displayName;
1596
1718
  if (k)
1597
1719
  return k;
@@ -1631,7 +1753,7 @@ function gr() {
1631
1753
  var T = h;
1632
1754
  return _e(T._context) + ".Provider";
1633
1755
  case c:
1634
- return Se(h, h.render, "ForwardRef");
1756
+ return we(h, h.render, "ForwardRef");
1635
1757
  case p:
1636
1758
  var k = h.displayName || null;
1637
1759
  return k !== null ? k : re(h.type) || "Memo";
@@ -1722,13 +1844,13 @@ function gr() {
1722
1844
  ` + it + h;
1723
1845
  }
1724
1846
  }
1725
- var ui = !1, Ht;
1847
+ var pi = !1, Ht;
1726
1848
  {
1727
- var Sn = typeof WeakMap == "function" ? WeakMap : Map;
1728
- Ht = new Sn();
1849
+ var Pn = typeof WeakMap == "function" ? WeakMap : Map;
1850
+ Ht = new Pn();
1729
1851
  }
1730
- function Xi(h, b) {
1731
- if (!h || ui)
1852
+ function Ki(h, b) {
1853
+ if (!h || pi)
1732
1854
  return "";
1733
1855
  {
1734
1856
  var T = Ht.get(h);
@@ -1736,7 +1858,7 @@ function gr() {
1736
1858
  return T;
1737
1859
  }
1738
1860
  var k;
1739
- ui = !0;
1861
+ pi = !0;
1740
1862
  var H = Error.prepareStackTrace;
1741
1863
  Error.prepareStackTrace = void 0;
1742
1864
  var G;
@@ -1784,24 +1906,24 @@ function gr() {
1784
1906
  if (ie !== 1 || ae !== 1)
1785
1907
  do
1786
1908
  if (ie--, ae--, ae < 0 || N[ie] !== fe[ae]) {
1787
- var we = `
1909
+ var Se = `
1788
1910
  ` + N[ie].replace(" at new ", " at ");
1789
- 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;
1790
1912
  }
1791
1913
  while (ie >= 1 && ae >= 0);
1792
1914
  break;
1793
1915
  }
1794
1916
  }
1795
1917
  } finally {
1796
- ui = !1, yt.current = G, Te(), Error.prepareStackTrace = H;
1918
+ pi = !1, yt.current = G, Te(), Error.prepareStackTrace = H;
1797
1919
  }
1798
- var nt = h ? h.displayName || h.name : "", os = nt ? zt(nt) : "";
1799
- return typeof h == "function" && Ht.set(h, os), os;
1920
+ var nt = h ? h.displayName || h.name : "", hs = nt ? zt(nt) : "";
1921
+ return typeof h == "function" && Ht.set(h, hs), hs;
1800
1922
  }
1801
- function wn(h, b, T) {
1802
- return Xi(h, !1);
1923
+ function An(h, b, T) {
1924
+ return Ki(h, !1);
1803
1925
  }
1804
- function xn(h) {
1926
+ function Dn(h) {
1805
1927
  var b = h.prototype;
1806
1928
  return !!(b && b.isReactComponent);
1807
1929
  }
@@ -1809,7 +1931,7 @@ function gr() {
1809
1931
  if (h == null)
1810
1932
  return "";
1811
1933
  if (typeof h == "function")
1812
- return Xi(h, xn(h));
1934
+ return Ki(h, Dn(h));
1813
1935
  if (typeof h == "string")
1814
1936
  return zt(h);
1815
1937
  switch (h) {
@@ -1821,7 +1943,7 @@ function gr() {
1821
1943
  if (typeof h == "object")
1822
1944
  switch (h.$$typeof) {
1823
1945
  case c:
1824
- return wn(h.render);
1946
+ return An(h.render);
1825
1947
  case p:
1826
1948
  return Yt(h.type, b, T);
1827
1949
  case m: {
@@ -1834,15 +1956,15 @@ function gr() {
1834
1956
  }
1835
1957
  return "";
1836
1958
  }
1837
- var Bt = Object.prototype.hasOwnProperty, $i = {}, qi = g.ReactDebugCurrentFrame;
1959
+ var Bt = Object.prototype.hasOwnProperty, Qi = {}, Ji = g.ReactDebugCurrentFrame;
1838
1960
  function Vt(h) {
1839
1961
  if (h) {
1840
1962
  var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
1841
- qi.setExtraStackFrame(T);
1963
+ Ji.setExtraStackFrame(T);
1842
1964
  } else
1843
- qi.setExtraStackFrame(null);
1965
+ Ji.setExtraStackFrame(null);
1844
1966
  }
1845
- function On(h, b, T, k, H) {
1967
+ function Rn(h, b, T, k, H) {
1846
1968
  {
1847
1969
  var G = Function.call.bind(Bt);
1848
1970
  for (var F in h)
@@ -1857,42 +1979,42 @@ function gr() {
1857
1979
  } catch (ie) {
1858
1980
  N = ie;
1859
1981
  }
1860
- 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 $i) && ($i[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));
1861
1983
  }
1862
1984
  }
1863
1985
  }
1864
- var Tn = Array.isArray;
1865
- function pi(h) {
1866
- return Tn(h);
1986
+ var In = Array.isArray;
1987
+ function mi(h) {
1988
+ return In(h);
1867
1989
  }
1868
- function Mn(h) {
1990
+ function Ln(h) {
1869
1991
  {
1870
1992
  var b = typeof Symbol == "function" && Symbol.toStringTag, T = b && h[Symbol.toStringTag] || h.constructor.name || "Object";
1871
1993
  return T;
1872
1994
  }
1873
1995
  }
1874
- function Pn(h) {
1996
+ function kn(h) {
1875
1997
  try {
1876
- return Ki(h), !1;
1998
+ return es(h), !1;
1877
1999
  } catch {
1878
2000
  return !0;
1879
2001
  }
1880
2002
  }
1881
- function Ki(h) {
2003
+ function es(h) {
1882
2004
  return "" + h;
1883
2005
  }
1884
- function Qi(h) {
1885
- if (Pn(h))
1886
- return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Mn(h)), Ki(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);
1887
2009
  }
1888
- var bt = g.ReactCurrentOwner, An = {
2010
+ var bt = g.ReactCurrentOwner, Un = {
1889
2011
  key: !0,
1890
2012
  ref: !0,
1891
2013
  __self: !0,
1892
2014
  __source: !0
1893
- }, Ji, es, mi;
1894
- mi = {};
1895
- function Dn(h) {
2015
+ }, is, ss, fi;
2016
+ fi = {};
2017
+ function jn(h) {
1896
2018
  if (Bt.call(h, "ref")) {
1897
2019
  var b = Object.getOwnPropertyDescriptor(h, "ref").get;
1898
2020
  if (b && b.isReactWarning)
@@ -1900,7 +2022,7 @@ function gr() {
1900
2022
  }
1901
2023
  return h.ref !== void 0;
1902
2024
  }
1903
- function Rn(h) {
2025
+ function Nn(h) {
1904
2026
  if (Bt.call(h, "key")) {
1905
2027
  var b = Object.getOwnPropertyDescriptor(h, "key").get;
1906
2028
  if (b && b.isReactWarning)
@@ -1908,16 +2030,16 @@ function gr() {
1908
2030
  }
1909
2031
  return h.key !== void 0;
1910
2032
  }
1911
- function In(h, b) {
2033
+ function Fn(h, b) {
1912
2034
  if (typeof h.ref == "string" && bt.current && b && bt.current.stateNode !== b) {
1913
2035
  var T = re(bt.current.type);
1914
- 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);
1915
2037
  }
1916
2038
  }
1917
- function Ln(h, b) {
2039
+ function zn(h, b) {
1918
2040
  {
1919
2041
  var T = function() {
1920
- Ji || (Ji = !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));
1921
2043
  };
1922
2044
  T.isReactWarning = !0, Object.defineProperty(h, "key", {
1923
2045
  get: T,
@@ -1925,10 +2047,10 @@ function gr() {
1925
2047
  });
1926
2048
  }
1927
2049
  }
1928
- function kn(h, b) {
2050
+ function Hn(h, b) {
1929
2051
  {
1930
2052
  var T = function() {
1931
- es || (es = !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));
1932
2054
  };
1933
2055
  T.isReactWarning = !0, Object.defineProperty(h, "ref", {
1934
2056
  get: T,
@@ -1936,7 +2058,7 @@ function gr() {
1936
2058
  });
1937
2059
  }
1938
2060
  }
1939
- var Un = function(h, b, T, k, H, G, F) {
2061
+ var Yn = function(h, b, T, k, H, G, F) {
1940
2062
  var N = {
1941
2063
  // This tag allows us to uniquely identify this as a React Element
1942
2064
  $$typeof: e,
@@ -1965,12 +2087,12 @@ function gr() {
1965
2087
  value: H
1966
2088
  }), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
1967
2089
  };
1968
- function jn(h, b, T, k, H) {
2090
+ function Bn(h, b, T, k, H) {
1969
2091
  {
1970
2092
  var G, F = {}, N = null, fe = null;
1971
- T !== void 0 && (Qi(T), N = "" + T), Rn(b) && (Qi(b.key), N = "" + b.key), Dn(b) && (fe = b.ref, In(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));
1972
2094
  for (G in b)
1973
- Bt.call(b, G) && !An.hasOwnProperty(G) && (F[G] = b[G]);
2095
+ Bt.call(b, G) && !Un.hasOwnProperty(G) && (F[G] = b[G]);
1974
2096
  if (h && h.defaultProps) {
1975
2097
  var ie = h.defaultProps;
1976
2098
  for (G in ie)
@@ -1978,28 +2100,28 @@ function gr() {
1978
2100
  }
1979
2101
  if (N || fe) {
1980
2102
  var ae = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
1981
- N && Ln(F, ae), fe && kn(F, ae);
2103
+ N && zn(F, ae), fe && Hn(F, ae);
1982
2104
  }
1983
- return Un(h, N, fe, H, k, bt.current, F);
2105
+ return Yn(h, N, fe, H, k, bt.current, F);
1984
2106
  }
1985
2107
  }
1986
- var fi = g.ReactCurrentOwner, ts = g.ReactDebugCurrentFrame;
2108
+ var gi = g.ReactCurrentOwner, ns = g.ReactDebugCurrentFrame;
1987
2109
  function st(h) {
1988
2110
  if (h) {
1989
2111
  var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
1990
- ts.setExtraStackFrame(T);
2112
+ ns.setExtraStackFrame(T);
1991
2113
  } else
1992
- ts.setExtraStackFrame(null);
2114
+ ns.setExtraStackFrame(null);
1993
2115
  }
1994
- var gi;
1995
- gi = !1;
1996
- function _i(h) {
2116
+ var _i;
2117
+ _i = !1;
2118
+ function vi(h) {
1997
2119
  return typeof h == "object" && h !== null && h.$$typeof === e;
1998
2120
  }
1999
- function is() {
2121
+ function as() {
2000
2122
  {
2001
- if (fi.current) {
2002
- var h = re(fi.current.type);
2123
+ if (gi.current) {
2124
+ var h = re(gi.current.type);
2003
2125
  if (h)
2004
2126
  return `
2005
2127
 
@@ -2008,7 +2130,7 @@ Check the render method of \`` + h + "`.";
2008
2130
  return "";
2009
2131
  }
2010
2132
  }
2011
- function Nn(h) {
2133
+ function Vn(h) {
2012
2134
  {
2013
2135
  if (h !== void 0) {
2014
2136
  var b = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
@@ -2019,10 +2141,10 @@ Check your code at ` + b + ":" + T + ".";
2019
2141
  return "";
2020
2142
  }
2021
2143
  }
2022
- var ss = {};
2023
- function Fn(h) {
2144
+ var rs = {};
2145
+ function Zn(h) {
2024
2146
  {
2025
- var b = is();
2147
+ var b = as();
2026
2148
  if (!b) {
2027
2149
  var T = typeof h == "string" ? h : h.displayName || h.name;
2028
2150
  T && (b = `
@@ -2032,39 +2154,39 @@ Check the top-level render call using <` + T + ">.");
2032
2154
  return b;
2033
2155
  }
2034
2156
  }
2035
- function ns(h, b) {
2157
+ function os(h, b) {
2036
2158
  {
2037
2159
  if (!h._store || h._store.validated || h.key != null)
2038
2160
  return;
2039
2161
  h._store.validated = !0;
2040
- var T = Fn(b);
2041
- if (ss[T])
2162
+ var T = Zn(b);
2163
+ if (rs[T])
2042
2164
  return;
2043
- ss[T] = !0;
2165
+ rs[T] = !0;
2044
2166
  var k = "";
2045
- 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);
2046
2168
  }
2047
2169
  }
2048
- function as(h, b) {
2170
+ function ls(h, b) {
2049
2171
  {
2050
2172
  if (typeof h != "object")
2051
2173
  return;
2052
- if (pi(h))
2174
+ if (mi(h))
2053
2175
  for (var T = 0; T < h.length; T++) {
2054
2176
  var k = h[T];
2055
- _i(k) && ns(k, b);
2177
+ vi(k) && os(k, b);
2056
2178
  }
2057
- else if (_i(h))
2179
+ else if (vi(h))
2058
2180
  h._store && (h._store.validated = !0);
2059
2181
  else if (h) {
2060
2182
  var H = x(h);
2061
2183
  if (typeof H == "function" && H !== h.entries)
2062
2184
  for (var G = H.call(h), F; !(F = G.next()).done; )
2063
- _i(F.value) && ns(F.value, b);
2185
+ vi(F.value) && os(F.value, b);
2064
2186
  }
2065
2187
  }
2066
2188
  }
2067
- function zn(h) {
2189
+ function Wn(h) {
2068
2190
  {
2069
2191
  var b = h.type;
2070
2192
  if (b == null || typeof b == "string")
@@ -2080,16 +2202,16 @@ Check the top-level render call using <` + T + ">.");
2080
2202
  return;
2081
2203
  if (T) {
2082
2204
  var k = re(b);
2083
- On(T, h.props, "prop", k, h);
2084
- } else if (b.PropTypes !== void 0 && !gi) {
2085
- gi = !0;
2205
+ Rn(T, h.props, "prop", k, h);
2206
+ } else if (b.PropTypes !== void 0 && !_i) {
2207
+ _i = !0;
2086
2208
  var H = re(b);
2087
2209
  y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
2088
2210
  }
2089
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.");
2090
2212
  }
2091
2213
  }
2092
- function Hn(h) {
2214
+ function Gn(h) {
2093
2215
  {
2094
2216
  for (var b = Object.keys(h.props), T = 0; T < b.length; T++) {
2095
2217
  var k = b[T];
@@ -2101,56 +2223,56 @@ Check the top-level render call using <` + T + ">.");
2101
2223
  h.ref !== null && (st(h), y("Invalid attribute `ref` supplied to `React.Fragment`."), st(null));
2102
2224
  }
2103
2225
  }
2104
- function rs(h, b, T, k, H, G) {
2226
+ function cs(h, b, T, k, H, G) {
2105
2227
  {
2106
- var F = B(h);
2228
+ var F = V(h);
2107
2229
  if (!F) {
2108
2230
  var N = "";
2109
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.");
2110
- var fe = Nn(H);
2111
- fe ? N += fe : N += is();
2232
+ var fe = Vn(H);
2233
+ fe ? N += fe : N += as();
2112
2234
  var ie;
2113
- 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);
2114
2236
  }
2115
- var ae = jn(h, b, T, H, G);
2237
+ var ae = Bn(h, b, T, H, G);
2116
2238
  if (ae == null)
2117
2239
  return ae;
2118
2240
  if (F) {
2119
- var we = b.children;
2120
- if (we !== void 0)
2241
+ var Se = b.children;
2242
+ if (Se !== void 0)
2121
2243
  if (k)
2122
- if (pi(we)) {
2123
- for (var nt = 0; nt < we.length; nt++)
2124
- as(we[nt], h);
2125
- 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);
2126
2248
  } else
2127
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.");
2128
2250
  else
2129
- as(we, h);
2251
+ ls(Se, h);
2130
2252
  }
2131
- return h === s ? Hn(ae) : zn(ae), ae;
2253
+ return h === s ? Gn(ae) : Wn(ae), ae;
2132
2254
  }
2133
2255
  }
2134
- function Yn(h, b, T) {
2135
- return rs(h, b, T, !0);
2256
+ function Xn(h, b, T) {
2257
+ return cs(h, b, T, !0);
2136
2258
  }
2137
- function Bn(h, b, T) {
2138
- return rs(h, b, T, !1);
2259
+ function $n(h, b, T) {
2260
+ return cs(h, b, T, !1);
2139
2261
  }
2140
- var Vn = Bn, Zn = Yn;
2141
- St.Fragment = s, St.jsx = Vn, St.jsxs = Zn;
2142
- }()), St;
2262
+ var qn = $n, Kn = Xn;
2263
+ wt.Fragment = s, wt.jsx = qn, wt.jsxs = Kn;
2264
+ }()), wt;
2143
2265
  }
2144
- process.env.NODE_ENV === "production" ? Ni.exports = fr() : Ni.exports = gr();
2145
- var u = Ni.exports;
2146
- function vn(i) {
2266
+ process.env.NODE_ENV === "production" ? zi.exports = _r() : zi.exports = vr();
2267
+ var u = zi.exports;
2268
+ function Cn(i) {
2147
2269
  return i.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ u.jsx("button", { children: i.title });
2148
2270
  }
2149
- const _r = /* @__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: [
2150
2272
  /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
2151
2273
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
2152
2274
  /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
2153
- ] }), vr = /* @__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(
2154
2276
  "path",
2155
2277
  {
2156
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
@@ -2158,33 +2280,61 @@ 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
2158
2280
  C11,8.22,10.74,8,10.43,8z`
2159
2281
  }
2160
2282
  ) });
2161
- function yr(i) {
2162
- return /* @__PURE__ */ u.jsx(fn.Item, { value: i.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
2163
- vr,
2164
- /* @__PURE__ */ u.jsx("span", { children: i.title }),
2165
- /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
2166
- i.onDelete(i.index);
2167
- }, children: _r })
2168
- ] }) }, i.title);
2169
- }
2170
- function br(i) {
2171
- const [e, t] = Z(!1), [s, n] = Z(i.options), a = (l) => {
2172
- i.onDragComplete(l), n(l);
2173
- }, r = (l) => {
2174
- const d = [...s];
2175
- d.splice(l, 1), a(d);
2176
- }, o = [];
2177
- s.forEach((l, d) => {
2178
- o.push(/* @__PURE__ */ u.jsx(yr, { index: d, title: l, onDelete: r }, l));
2179
- });
2180
- let c = "dropdown draggable";
2181
- return i.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
2182
- /* @__PURE__ */ u.jsx(vn, { title: i.title }),
2183
- /* @__PURE__ */ u.jsx(fn.Group, { axis: "y", values: s, onReorder: a, style: { visibility: e ? "visible" : "hidden" }, children: o })
2283
+ function Er(i) {
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
+ )) })
2184
2334
  ] });
2185
2335
  }
2186
- function Er(i) {
2187
- const [e, t] = Z(!1), s = [];
2336
+ function Sn(i) {
2337
+ const [e, t] = B(!1), s = [];
2188
2338
  i.options.map((a, r) => {
2189
2339
  i.onSelect !== void 0 && (a.onSelect = i.onSelect), s.push(/* @__PURE__ */ u.jsx(Cr, { option: a }, r));
2190
2340
  });
@@ -2196,7 +2346,7 @@ function Er(i) {
2196
2346
  onMouseEnter: () => t(!0),
2197
2347
  onMouseLeave: () => t(!1),
2198
2348
  children: [
2199
- /* @__PURE__ */ u.jsx(vn, { title: i.title }),
2349
+ /* @__PURE__ */ u.jsx(Cn, { title: i.title }),
2200
2350
  /* @__PURE__ */ u.jsx(
2201
2351
  "ul",
2202
2352
  {
@@ -2209,12 +2359,12 @@ function Er(i) {
2209
2359
  );
2210
2360
  }
2211
2361
  function Cr(i) {
2212
- const { option: e } = i, [t, s] = Z("");
2362
+ const { option: e } = i, [t, s] = B("");
2213
2363
  let n;
2214
2364
  switch (e.type) {
2215
2365
  case "draggable":
2216
2366
  n = /* @__PURE__ */ u.jsx(
2217
- br,
2367
+ wn,
2218
2368
  {
2219
2369
  title: e.title,
2220
2370
  options: e.value,
@@ -2227,7 +2377,7 @@ function Cr(i) {
2227
2377
  break;
2228
2378
  case "dropdown":
2229
2379
  n = /* @__PURE__ */ u.jsx(
2230
- Er,
2380
+ Sn,
2231
2381
  {
2232
2382
  title: e.title,
2233
2383
  options: e.value,
@@ -2248,7 +2398,7 @@ function Cr(i) {
2248
2398
  );
2249
2399
  break;
2250
2400
  }
2251
- return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, za());
2401
+ return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ba());
2252
2402
  }
2253
2403
  function nl(i, e, t) {
2254
2404
  function s(a) {
@@ -2273,8 +2423,8 @@ function nl(i, e, t) {
2273
2423
  a.target === "editor" ? n(a) : s(a);
2274
2424
  };
2275
2425
  }
2276
- function oi(i) {
2277
- 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 = () => {
2278
2428
  D.dispatchEvent({ type: A.REMOVE_SCENE, value: i.scene });
2279
2429
  };
2280
2430
  return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${s ? "hide" : ""}`, children: [
@@ -2294,7 +2444,7 @@ function oi(i) {
2294
2444
  children: "Toggle"
2295
2445
  }
2296
2446
  ),
2297
- /* @__PURE__ */ u.jsx("p", { className: "label", children: ri(i.label) })
2447
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: oi(i.label) })
2298
2448
  ]
2299
2449
  }
2300
2450
  ),
@@ -2306,10 +2456,10 @@ function oi(i) {
2306
2456
  /* @__PURE__ */ u.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: i.children }) }, Math.random())
2307
2457
  ] });
2308
2458
  }
2309
- function yn(i) {
2310
- 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 = [];
2311
2461
  return i.child !== void 0 && i.child.children.length > 0 && i.child.children.map((r, o) => {
2312
- a.push(/* @__PURE__ */ u.jsx(yn, { child: r, three: i.three }, o));
2462
+ a.push(/* @__PURE__ */ u.jsx(xn, { child: r, three: i.three }, o));
2313
2463
  }), tt(() => {
2314
2464
  if (i.child) {
2315
2465
  const r = i.three.getScene(i.child.uuid);
@@ -2364,19 +2514,19 @@ function yn(i) {
2364
2514
  }
2365
2515
  }
2366
2516
  ),
2367
- /* @__PURE__ */ u.jsx("div", { className: `icon ${hr(i.child)}` })
2517
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${ur(i.child)}` })
2368
2518
  ] }),
2369
2519
  /* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: a }) })
2370
2520
  ] }, Math.random()) });
2371
2521
  }
2372
- function bs(i) {
2522
+ function Ss(i) {
2373
2523
  const e = [];
2374
2524
  return i.child?.children.map((t, s) => {
2375
- e.push(/* @__PURE__ */ u.jsx(yn, { 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));
2376
2526
  }), /* @__PURE__ */ u.jsx("div", { className: `scene ${i.class !== void 0 ? i.class : ""}`, children: e });
2377
2527
  }
2378
2528
  function Rt(i) {
2379
- const [e, t] = Z(i.defaultValue);
2529
+ const [e, t] = B(i.defaultValue);
2380
2530
  return tt(() => {
2381
2531
  let s = !1, n = -1, a = 0, r = i.defaultValue, o = !1;
2382
2532
  const c = (f) => {
@@ -2386,13 +2536,13 @@ function Rt(i) {
2386
2536
  }, d = (f) => {
2387
2537
  if (!s)
2388
2538
  return;
2389
- 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);
2390
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);
2391
2541
  }, p = () => {
2392
2542
  s = !1, document.removeEventListener("mouseup", p), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", p);
2393
2543
  }, m = (f) => {
2394
- const w = Number(f.target.value);
2395
- 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);
2396
2546
  };
2397
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), () => {
2398
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);
@@ -2400,7 +2550,7 @@ function Rt(i) {
2400
2550
  }, []), e;
2401
2551
  }
2402
2552
  function Qe(i) {
2403
- 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);
2404
2554
  return Rt({
2405
2555
  label: i.labelRef,
2406
2556
  input: e,
@@ -2460,17 +2610,17 @@ function Qe(i) {
2460
2610
  max: i.max,
2461
2611
  step: i.step,
2462
2612
  ref: t,
2463
- onChange: ai
2613
+ onChange: ri
2464
2614
  }
2465
2615
  )
2466
2616
  ] })
2467
2617
  ] });
2468
2618
  }
2469
- function Sr(i) {
2470
- 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({
2619
+ function wr(i) {
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({
2471
2621
  min: Math.min(i.min, Math.min(i.value.x, i.value.y)),
2472
2622
  max: Math.max(i.max, Math.max(i.value.x, i.value.y))
2473
- }), [g, y] = Z(!1);
2623
+ }), [g, y] = B(!1);
2474
2624
  Rt({
2475
2625
  label: o,
2476
2626
  input: e,
@@ -2489,7 +2639,7 @@ function Sr(i) {
2489
2639
  max: v.max,
2490
2640
  step: 0.01,
2491
2641
  onChange: (R) => {
2492
- w(R), i.onChange({ target: { value: { x: p, y: R } } });
2642
+ E(R), i.onChange({ target: { value: { x: p, y: R } } });
2493
2643
  }
2494
2644
  }), Rt({
2495
2645
  label: l,
@@ -2512,26 +2662,26 @@ function Sr(i) {
2512
2662
  x({ min: v.min, max: R });
2513
2663
  }
2514
2664
  });
2515
- function E() {
2516
- g || (window.addEventListener("mousemove", S), window.addEventListener("mouseup", C), y(!0));
2517
- }
2518
2665
  function C() {
2519
- 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);
2520
2670
  }
2521
2671
  function S(R) {
2522
- 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);
2523
- 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);
2524
2674
  }
2525
2675
  function O() {
2526
2676
  const R = Number(s.current.value);
2527
- 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));
2528
2678
  }
2529
2679
  function I() {
2530
2680
  const R = Number(n.current.value);
2531
- 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));
2532
2682
  }
2533
2683
  tt(() => {
2534
- r.current.style.left = `${ki(v.min, v.max, p) * 100}%`, r.current.style.top = `${(1 - ki(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}%`;
2535
2685
  }, [v, p, f]);
2536
2686
  const U = i.step !== void 0 ? i.step : 0.01;
2537
2687
  return /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
@@ -2550,8 +2700,8 @@ function Sr(i) {
2550
2700
  onChange: (R) => {
2551
2701
  if (m(R.target.value), R.target.value.length === 0)
2552
2702
  return;
2553
- const B = Number(R.target.value);
2554
- 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 }));
2555
2705
  }
2556
2706
  }
2557
2707
  )
@@ -2568,10 +2718,10 @@ function Sr(i) {
2568
2718
  max: v.max,
2569
2719
  step: U,
2570
2720
  onChange: (R) => {
2571
- if (w(R.target.value), R.target.value.length === 0)
2721
+ if (E(R.target.value), R.target.value.length === 0)
2572
2722
  return;
2573
- const B = Number(R.target.value);
2574
- 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 }));
2575
2725
  }
2576
2726
  }
2577
2727
  )
@@ -2603,27 +2753,27 @@ function Sr(i) {
2603
2753
  )
2604
2754
  ] })
2605
2755
  ] }),
2606
- /* @__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: [
2607
2757
  /* @__PURE__ */ u.jsx("div", { className: "x" }),
2608
2758
  /* @__PURE__ */ u.jsx("div", { className: "y" }),
2609
2759
  /* @__PURE__ */ u.jsx("div", { className: "pt", ref: r })
2610
2760
  ] })
2611
2761
  ] });
2612
2762
  }
2613
- const wr = Math.PI / 180, xr = 180 / Math.PI;
2763
+ const Sr = Math.PI / 180, xr = 180 / Math.PI;
2614
2764
  function ot(i, e, t, s, n) {
2615
2765
  return s + (i - e) * (n - s) / (t - e);
2616
2766
  }
2617
2767
  function lt(i, e, t) {
2618
2768
  return (1 - t) * i + t * e;
2619
2769
  }
2620
- function Fi(i) {
2621
- return i * wr;
2770
+ function Hi(i) {
2771
+ return i * Sr;
2622
2772
  }
2623
2773
  function Or(i) {
2624
2774
  return i * xr;
2625
2775
  }
2626
- function Es(i) {
2776
+ function xs(i) {
2627
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 = [];
2628
2778
  if (t) {
2629
2779
  const r = Ut(() => i.value, []);
@@ -2641,7 +2791,7 @@ function Es(i) {
2641
2791
  step: 0.1,
2642
2792
  labelRef: l,
2643
2793
  onChange: (d, p) => {
2644
- r[d] = Fi(p), i.onChange({ target: { value: r } });
2794
+ r[d] = Hi(p), i.onChange({ target: { value: r } });
2645
2795
  }
2646
2796
  }
2647
2797
  )
@@ -2802,7 +2952,7 @@ function Pr(i) {
2802
2952
  }
2803
2953
  return i;
2804
2954
  }
2805
- function hi(i) {
2955
+ function di(i) {
2806
2956
  switch (i) {
2807
2957
  case "alphaHash":
2808
2958
  return "Alpha Hash";
@@ -3005,7 +3155,7 @@ function hi(i) {
3005
3155
  }
3006
3156
  return i;
3007
3157
  }
3008
- function bn(i) {
3158
+ function On(i) {
3009
3159
  const e = i.toLowerCase();
3010
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";
3011
3161
  }
@@ -3027,188 +3177,188 @@ function Ar() {
3027
3177
  const Dr = [
3028
3178
  {
3029
3179
  title: "Front",
3030
- value: Kn
3180
+ value: ia
3031
3181
  },
3032
3182
  {
3033
3183
  title: "Back",
3034
- value: Gs
3184
+ value: Ks
3035
3185
  },
3036
3186
  {
3037
3187
  title: "Double",
3038
- value: Bi
3188
+ value: Wi
3039
3189
  }
3040
3190
  ], Rr = [
3041
3191
  {
3042
3192
  title: "No Blending",
3043
- value: Qn
3193
+ value: sa
3044
3194
  },
3045
3195
  {
3046
3196
  title: "Normal",
3047
- value: Jn
3197
+ value: na
3048
3198
  },
3049
3199
  {
3050
3200
  title: "Additive",
3051
- value: ea
3201
+ value: aa
3052
3202
  },
3053
3203
  {
3054
3204
  title: "Subtractive",
3055
- value: ta
3205
+ value: ra
3056
3206
  },
3057
3207
  {
3058
3208
  title: "Multiply",
3059
- value: ia
3209
+ value: oa
3060
3210
  },
3061
3211
  {
3062
3212
  title: "Custom",
3063
- value: sa
3213
+ value: la
3064
3214
  }
3065
3215
  ], Ir = [
3066
3216
  {
3067
3217
  title: "Add",
3068
- value: na
3218
+ value: ca
3069
3219
  },
3070
3220
  {
3071
3221
  title: "Subtract",
3072
- value: aa
3222
+ value: ha
3073
3223
  },
3074
3224
  {
3075
3225
  title: "Reverse Subtract",
3076
- value: ra
3226
+ value: da
3077
3227
  },
3078
3228
  {
3079
3229
  title: "Min",
3080
- value: oa
3230
+ value: ua
3081
3231
  },
3082
3232
  {
3083
3233
  title: "Max",
3084
- value: la
3234
+ value: pa
3085
3235
  }
3086
3236
  ], Lr = [
3087
3237
  {
3088
3238
  title: "Zero",
3089
- value: Xs
3239
+ value: Qs
3090
3240
  },
3091
3241
  {
3092
3242
  title: "One",
3093
- value: $s
3243
+ value: Js
3094
3244
  },
3095
3245
  {
3096
3246
  title: "Src Color",
3097
- value: qs
3247
+ value: en
3098
3248
  },
3099
3249
  {
3100
3250
  title: "One Minus Src Color",
3101
- value: Ks
3251
+ value: tn
3102
3252
  },
3103
3253
  {
3104
3254
  title: "Src Alpha",
3105
- value: Qs
3255
+ value: sn
3106
3256
  },
3107
3257
  {
3108
3258
  title: "One Minus Src Alpha",
3109
- value: Js
3259
+ value: nn
3110
3260
  },
3111
3261
  {
3112
3262
  title: "Dst Alpha",
3113
- value: en
3263
+ value: an
3114
3264
  },
3115
3265
  {
3116
3266
  title: "One Minus Dst Alpha",
3117
- value: tn
3267
+ value: rn
3118
3268
  },
3119
3269
  {
3120
3270
  title: "Dst Color",
3121
- value: sn
3271
+ value: on
3122
3272
  },
3123
3273
  {
3124
3274
  title: "One Minus Dst Color",
3125
- value: nn
3275
+ value: ln
3126
3276
  },
3127
3277
  {
3128
3278
  title: "Src Alpha Saturate",
3129
- value: ca
3279
+ value: ma
3130
3280
  },
3131
3281
  {
3132
3282
  title: "Constant Color",
3133
- value: an
3283
+ value: cn
3134
3284
  },
3135
3285
  {
3136
3286
  title: "One Minus Constant Color",
3137
- value: rn
3287
+ value: hn
3138
3288
  },
3139
3289
  {
3140
3290
  title: "Constant Alpha",
3141
- value: on
3291
+ value: dn
3142
3292
  },
3143
3293
  {
3144
3294
  title: "One Minus Constant Alpha",
3145
- value: ln
3295
+ value: un
3146
3296
  }
3147
3297
  ], kr = [
3148
3298
  {
3149
3299
  title: "Zero",
3150
- value: Xs
3300
+ value: Qs
3151
3301
  },
3152
3302
  {
3153
3303
  title: "One",
3154
- value: $s
3304
+ value: Js
3155
3305
  },
3156
3306
  {
3157
3307
  title: "Src Color",
3158
- value: qs
3308
+ value: en
3159
3309
  },
3160
3310
  {
3161
3311
  title: "One Minus Src Color",
3162
- value: Ks
3312
+ value: tn
3163
3313
  },
3164
3314
  {
3165
3315
  title: "Src Alpha",
3166
- value: Qs
3316
+ value: sn
3167
3317
  },
3168
3318
  {
3169
3319
  title: "One Minus Src Alpha",
3170
- value: Js
3320
+ value: nn
3171
3321
  },
3172
3322
  {
3173
3323
  title: "Dst Alpha",
3174
- value: en
3324
+ value: an
3175
3325
  },
3176
3326
  {
3177
3327
  title: "One Minus Dst Alpha",
3178
- value: tn
3328
+ value: rn
3179
3329
  },
3180
3330
  {
3181
3331
  title: "Dst Color",
3182
- value: sn
3332
+ value: on
3183
3333
  },
3184
3334
  {
3185
3335
  title: "One Minus Dst Color",
3186
- value: nn
3336
+ value: ln
3187
3337
  },
3188
3338
  {
3189
3339
  title: "Constant Color",
3190
- value: an
3340
+ value: cn
3191
3341
  },
3192
3342
  {
3193
3343
  title: "One Minus Constant Color",
3194
- value: rn
3344
+ value: hn
3195
3345
  },
3196
3346
  {
3197
3347
  title: "Constant Alpha",
3198
- value: on
3348
+ value: dn
3199
3349
  },
3200
3350
  {
3201
3351
  title: "One Minus Constant Alpha",
3202
- value: ln
3352
+ value: un
3203
3353
  }
3204
3354
  ];
3205
- function wt(i, e) {
3355
+ function St(i, e) {
3206
3356
  i.needsUpdate = !0, i.type = "option", i.options = e;
3207
3357
  }
3208
3358
  function Ur(i, e, t, s) {
3209
3359
  return {
3210
3360
  type: "boolean",
3211
- title: hi(i),
3361
+ title: di(i),
3212
3362
  prop: i,
3213
3363
  value: e,
3214
3364
  needsUpdate: !0,
@@ -3225,7 +3375,7 @@ function Ur(i, e, t, s) {
3225
3375
  function jr(i, e, t, s) {
3226
3376
  const n = {
3227
3377
  type: "number",
3228
- title: hi(i),
3378
+ title: di(i),
3229
3379
  prop: i,
3230
3380
  value: e,
3231
3381
  min: void 0,
@@ -3243,27 +3393,27 @@ function jr(i, e, t, s) {
3243
3393
  };
3244
3394
  switch (i) {
3245
3395
  case "blending":
3246
- wt(n, Rr);
3396
+ St(n, Rr);
3247
3397
  break;
3248
3398
  case "blendDst":
3249
- wt(n, kr);
3399
+ St(n, kr);
3250
3400
  break;
3251
3401
  case "blendEquation":
3252
- wt(n, Ir);
3402
+ St(n, Ir);
3253
3403
  break;
3254
3404
  case "blendSrc":
3255
- wt(n, Lr);
3405
+ St(n, Lr);
3256
3406
  break;
3257
3407
  case "side":
3258
- wt(n, Dr);
3408
+ St(n, Dr);
3259
3409
  break;
3260
3410
  }
3261
- return bn(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;
3262
3412
  }
3263
3413
  function Nr(i, e, t, s) {
3264
3414
  const n = {
3265
3415
  type: "string",
3266
- title: hi(i),
3416
+ title: di(i),
3267
3417
  prop: i,
3268
3418
  value: e,
3269
3419
  needsUpdate: !0,
@@ -3305,11 +3455,11 @@ function zr(i) {
3305
3455
  function Hr(i) {
3306
3456
  return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
3307
3457
  }
3308
- function zi(i) {
3458
+ function Yi(i) {
3309
3459
  i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
3310
3460
  }
3311
3461
  function It(i, e, t, s, n = "", a = !1) {
3312
- 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;
3313
3463
  if (c === "boolean" || c === "string")
3314
3464
  return {
3315
3465
  title: r,
@@ -3343,7 +3493,7 @@ function It(i, e, t, s, n = "", a = !1) {
3343
3493
  }
3344
3494
  }
3345
3495
  };
3346
- return bn(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;
3347
3497
  } else {
3348
3498
  if (e.isColor)
3349
3499
  return {
@@ -3375,7 +3525,7 @@ function It(i, e, t, s, n = "", a = !1) {
3375
3525
  }
3376
3526
  }
3377
3527
  if (l.length > 0)
3378
- return zi(l), {
3528
+ return Yi(l), {
3379
3529
  title: r,
3380
3530
  items: l
3381
3531
  };
@@ -3455,10 +3605,10 @@ function It(i, e, t, s, n = "", a = !1) {
3455
3605
  s.createTexture(t.uuid, `material.${m}`, d);
3456
3606
  const f = s.getScene(t.uuid);
3457
3607
  if (f !== null) {
3458
- const w = f.getObjectByProperty("uuid", t.uuid);
3459
- if (w !== void 0) {
3608
+ const E = f.getObjectByProperty("uuid", t.uuid);
3609
+ if (E !== void 0) {
3460
3610
  const v = (x) => {
3461
- const g = w.material, y = m.split(".");
3611
+ const g = E.material, y = m.split(".");
3462
3612
  switch (y.length) {
3463
3613
  case 1:
3464
3614
  g[y[0]] = x;
@@ -3478,7 +3628,7 @@ function It(i, e, t, s, n = "", a = !1) {
3478
3628
  }
3479
3629
  g.needsUpdate = !0;
3480
3630
  };
3481
- d.src.length > 0 ? _n(d.src).then((x) => {
3631
+ d.src.length > 0 ? En(d.src).then((x) => {
3482
3632
  x.offset.set(d.offset[0], d.offset[1]), x.repeat.set(d.repeat[0], d.repeat[1]), v(x);
3483
3633
  }) : v(null);
3484
3634
  }
@@ -3519,7 +3669,7 @@ function It(i, e, t, s, n = "", a = !1) {
3519
3669
  console.log("Issue cycling through material object:", i, e);
3520
3670
  }
3521
3671
  if (l.length > 0)
3522
- return zi(l), {
3672
+ return Yi(l), {
3523
3673
  title: r,
3524
3674
  items: l
3525
3675
  };
@@ -3527,7 +3677,7 @@ function It(i, e, t, s, n = "", a = !1) {
3527
3677
  }
3528
3678
  }
3529
3679
  }
3530
- function Cs(i, e, t) {
3680
+ function Os(i, e, t) {
3531
3681
  const s = [];
3532
3682
  for (const n in i) {
3533
3683
  if (!Mr(n))
@@ -3545,7 +3695,7 @@ function Cs(i, e, t) {
3545
3695
  } else
3546
3696
  r !== void 0 && console.log("other:", n, a, r);
3547
3697
  }
3548
- return zi(s), s.push({
3698
+ return Yi(s), s.push({
3549
3699
  title: "Update Material",
3550
3700
  type: "button",
3551
3701
  onChange: () => {
@@ -3575,7 +3725,7 @@ function Yr(i, e) {
3575
3725
  Oe,
3576
3726
  {
3577
3727
  title: `Material ${l}`,
3578
- items: Cs(r[l], i, e)
3728
+ items: Os(r[l], i, e)
3579
3729
  },
3580
3730
  `Material ${l}`
3581
3731
  )
@@ -3586,7 +3736,7 @@ function Yr(i, e) {
3586
3736
  Oe,
3587
3737
  {
3588
3738
  title: "Material",
3589
- items: Cs(r, i, e),
3739
+ items: Os(r, i, e),
3590
3740
  expanded: n,
3591
3741
  onToggle: (o) => {
3592
3742
  a(o);
@@ -3594,42 +3744,42 @@ function Yr(i, e) {
3594
3744
  }
3595
3745
  );
3596
3746
  }
3597
- const Ss = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
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==";
3598
3748
  function Br(i) {
3599
- 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]);
3600
- function x(y, E, C, S, O) {
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) {
3601
3751
  if (i.onChange !== void 0) {
3602
3752
  const I = i.prop !== void 0 ? i.prop : i.title;
3603
3753
  i.onChange(I, {
3604
3754
  src: y,
3605
- offset: [E, C],
3755
+ offset: [C, w],
3606
3756
  repeat: [S, O]
3607
3757
  });
3608
3758
  }
3609
3759
  }
3610
3760
  function g(y) {
3611
- const E = t.current.src, C = y.target.value;
3761
+ const C = t.current.src, w = y.target.value;
3612
3762
  switch (y.target) {
3613
3763
  case s.current:
3614
- l(C), x(E, C, d, m, w);
3764
+ l(w), x(C, w, d, m, E);
3615
3765
  break;
3616
3766
  case n.current:
3617
- p(C), x(E, c, C, m, w);
3767
+ p(w), x(C, c, w, m, E);
3618
3768
  break;
3619
3769
  case a.current:
3620
- f(C), x(E, c, d, C, w);
3770
+ f(w), x(C, c, d, w, E);
3621
3771
  break;
3622
3772
  case r.current:
3623
- v(C), x(E, c, d, m, C);
3773
+ v(w), x(C, c, d, m, w);
3624
3774
  break;
3625
3775
  }
3626
3776
  }
3627
3777
  return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
3628
3778
  /* @__PURE__ */ u.jsx("img", { alt: i.title, ref: t, onClick: () => {
3629
3779
  Ar().then((y) => {
3630
- t.current.src = y, x(y, c, d, m, w);
3780
+ t.current.src = y, x(y, c, d, m, E);
3631
3781
  });
3632
- }, src: o.src.length > 0 ? o.src : Ss }),
3782
+ }, src: o.src.length > 0 ? o.src : Ts }),
3633
3783
  /* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
3634
3784
  /* @__PURE__ */ u.jsxs("div", { children: [
3635
3785
  /* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
@@ -3671,22 +3821,22 @@ function Br(i) {
3671
3821
  {
3672
3822
  ref: r,
3673
3823
  type: "number",
3674
- value: w,
3824
+ value: E,
3675
3825
  step: e,
3676
3826
  onChange: g
3677
3827
  }
3678
3828
  )
3679
3829
  ] }),
3680
3830
  /* @__PURE__ */ u.jsx("button", { onClick: () => {
3681
- x("", c, d, m, w), t.current.src = Ss;
3831
+ x("", c, d, m, E), t.current.src = Ts;
3682
3832
  }, children: "Clear" })
3683
3833
  ] })
3684
3834
  ] });
3685
3835
  }
3686
- function ii(i) {
3836
+ function si(i) {
3687
3837
  let e = i.value;
3688
- e !== void 0 && (e.isColor !== void 0 ? e = ps(i.value) : i.type === "color" && (e = ps(new et().setStyle(i.value, jt))));
3689
- 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) => {
3690
3840
  let d = l.target.value;
3691
3841
  if (i.type === "boolean")
3692
3842
  d = l.target.checked;
@@ -3701,7 +3851,7 @@ function ii(i) {
3701
3851
  const o = i.type === "string" && (t.length > 100 || t.search(`
3702
3852
  `) > -1), c = o || i.type === "image" || i.type === "vector2";
3703
3853
  return /* @__PURE__ */ u.jsxs("div", { className: `field ${c ? "block" : ""}`, style: r, children: [
3704
- 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"),
3705
3855
  i.type === "string" && !o && /* @__PURE__ */ u.jsx(
3706
3856
  "input",
3707
3857
  {
@@ -3776,11 +3926,11 @@ function ii(i) {
3776
3926
  }
3777
3927
  ),
3778
3928
  i.type === "image" && /* @__PURE__ */ u.jsx(Br, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
3779
- 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)) }) }),
3780
- i.type === "vector2" && /* @__PURE__ */ u.jsx(Sr, { step: i.step, value: t, min: 0, max: 1, onChange: a }),
3781
- i.type === "grid3" && /* @__PURE__ */ u.jsx(Es, { step: i.step, value: t, onChange: a }),
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)) }) }),
3930
+ i.type === "vector2" && /* @__PURE__ */ u.jsx(wr, { step: i.step, value: t, min: 0, max: 1, onChange: a }),
3931
+ i.type === "grid3" && /* @__PURE__ */ u.jsx(xs, { step: i.step, value: t, onChange: a }),
3782
3932
  i.type === "grid4" && /* @__PURE__ */ u.jsx(Tr, { step: i.step, value: t, onChange: a }),
3783
- i.type === "euler" && /* @__PURE__ */ u.jsx(Es, { step: i.step, value: t, onChange: a })
3933
+ i.type === "euler" && /* @__PURE__ */ u.jsx(xs, { step: i.step, value: t, onChange: a })
3784
3934
  ] });
3785
3935
  }
3786
3936
  function Vr(i) {
@@ -3840,13 +3990,13 @@ class Oe extends Ft {
3840
3990
  return this.props.items.forEach((t) => {
3841
3991
  if (Vr(t))
3842
3992
  e.push(
3843
- /* @__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())
3844
3994
  );
3845
3995
  else {
3846
3996
  const s = this.valueOverrides.get(t.title), n = s !== void 0 ? s : t.value;
3847
3997
  e.push(
3848
3998
  /* @__PURE__ */ u.jsx(
3849
- ii,
3999
+ si,
3850
4000
  {
3851
4001
  title: t.title,
3852
4002
  prop: t.prop,
@@ -3869,7 +4019,7 @@ class Oe extends Ft {
3869
4019
  );
3870
4020
  }
3871
4021
  }), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ u.jsx(
3872
- oi,
4022
+ li,
3873
4023
  {
3874
4024
  label: this.props.title,
3875
4025
  open: this.props.expanded === !0,
@@ -3971,7 +4121,7 @@ class te extends Ft {
3971
4121
  }
3972
4122
  }
3973
4123
  }
3974
- function ws(i) {
4124
+ function Ms(i) {
3975
4125
  switch (i) {
3976
4126
  case "fov":
3977
4127
  return "FOV";
@@ -4012,7 +4162,7 @@ function Zr(i, e) {
4012
4162
  if (i.perspectiveCameraInfo !== void 0)
4013
4163
  for (const o in i.perspectiveCameraInfo)
4014
4164
  r.push({
4015
- title: ws(o),
4165
+ title: Ms(o),
4016
4166
  prop: o,
4017
4167
  type: "number",
4018
4168
  step: 0.01,
@@ -4029,7 +4179,7 @@ function Zr(i, e) {
4029
4179
  else if (i.orthographicCameraInfo !== void 0)
4030
4180
  for (const o in i.orthographicCameraInfo)
4031
4181
  r.push({
4032
- title: ws(o),
4182
+ title: Ms(o),
4033
4183
  prop: o,
4034
4184
  type: "number",
4035
4185
  step: 0.01,
@@ -4059,10 +4209,10 @@ class Wr extends Ie {
4059
4209
  constructor(e, t) {
4060
4210
  const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new _t();
4061
4211
  n.setAttribute("position", new Ke(s, 3)), n.computeBoundingSphere();
4062
- const a = new Vi({ fog: !1 });
4212
+ const a = new Gi({ fog: !1 });
4063
4213
  super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
4064
4214
  const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new _t();
4065
- o.setAttribute("position", new Ke(r, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Gs, fog: !1 })));
4215
+ o.setAttribute("position", new Ke(r, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: Ks, fog: !1 })));
4066
4216
  }
4067
4217
  updateMatrixWorld() {
4068
4218
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -4078,7 +4228,7 @@ class Wr extends Ie {
4078
4228
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
4079
4229
  }
4080
4230
  }
4081
- const xs = { type: "change" }, Gi = { type: "start" }, En = { type: "end" }, Wt = new ha(), Os = new da(), Gr = Math.cos(70 * ua.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 = {
4082
4232
  NONE: -1,
4083
4233
  ROTATE: 0,
4084
4234
  DOLLY: 1,
@@ -4087,10 +4237,10 @@ const xs = { type: "change" }, Gi = { type: "start" }, En = { type: "end" }, Wt
4087
4237
  TOUCH_PAN: 4,
4088
4238
  TOUCH_DOLLY_PAN: 5,
4089
4239
  TOUCH_DOLLY_ROTATE: 6
4090
- }, Ci = 1e-6;
4091
- class Xr extends cn {
4240
+ }, wi = 1e-6;
4241
+ class Xr extends pn {
4092
4242
  constructor(e, t = null) {
4093
- super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Li(), this._sphericalDelta = new Li(), 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();
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();
4094
4244
  }
4095
4245
  connect() {
4096
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";
@@ -4120,11 +4270,11 @@ class Xr extends cn {
4120
4270
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
4121
4271
  }
4122
4272
  reset() {
4123
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(xs), this.update(), this.state = V.NONE;
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;
4124
4274
  }
4125
4275
  update(e = null) {
4126
4276
  const t = this.object.position;
4127
- 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);
4128
4278
  let s = this.minAzimuthAngle, n = this.maxAzimuthAngle;
4129
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);
4130
4280
  let a = !1;
@@ -4150,12 +4300,12 @@ class Xr extends cn {
4150
4300
  l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), r = oe.length();
4151
4301
  } else
4152
4302
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
4153
- 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) : (Os.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(Os, 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))));
4154
4304
  } else if (this.object.isOrthographicCamera) {
4155
4305
  const r = this.object.zoom;
4156
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);
4157
4307
  }
4158
- 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(xs), 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;
4159
4309
  }
4160
4310
  _getAutoRotationAngle(e) {
4161
4311
  return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
@@ -4358,7 +4508,7 @@ function qr(i) {
4358
4508
  function Kr(i) {
4359
4509
  switch (this._removePointer(i), this._pointers.length) {
4360
4510
  case 0:
4361
- this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(En), 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;
4362
4512
  break;
4363
4513
  case 1:
4364
4514
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -4385,48 +4535,48 @@ function Qr(i) {
4385
4535
  case gt.DOLLY:
4386
4536
  if (this.enableZoom === !1)
4387
4537
  return;
4388
- this._handleMouseDownDolly(i), this.state = V.DOLLY;
4538
+ this._handleMouseDownDolly(i), this.state = Z.DOLLY;
4389
4539
  break;
4390
4540
  case gt.ROTATE:
4391
4541
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
4392
4542
  if (this.enablePan === !1)
4393
4543
  return;
4394
- this._handleMouseDownPan(i), this.state = V.PAN;
4544
+ this._handleMouseDownPan(i), this.state = Z.PAN;
4395
4545
  } else {
4396
4546
  if (this.enableRotate === !1)
4397
4547
  return;
4398
- this._handleMouseDownRotate(i), this.state = V.ROTATE;
4548
+ this._handleMouseDownRotate(i), this.state = Z.ROTATE;
4399
4549
  }
4400
4550
  break;
4401
4551
  case gt.PAN:
4402
4552
  if (i.ctrlKey || i.metaKey || i.shiftKey) {
4403
4553
  if (this.enableRotate === !1)
4404
4554
  return;
4405
- this._handleMouseDownRotate(i), this.state = V.ROTATE;
4555
+ this._handleMouseDownRotate(i), this.state = Z.ROTATE;
4406
4556
  } else {
4407
4557
  if (this.enablePan === !1)
4408
4558
  return;
4409
- this._handleMouseDownPan(i), this.state = V.PAN;
4559
+ this._handleMouseDownPan(i), this.state = Z.PAN;
4410
4560
  }
4411
4561
  break;
4412
4562
  default:
4413
- this.state = V.NONE;
4563
+ this.state = Z.NONE;
4414
4564
  }
4415
- this.state !== V.NONE && this.dispatchEvent(Gi);
4565
+ this.state !== Z.NONE && this.dispatchEvent(qi);
4416
4566
  }
4417
4567
  function Jr(i) {
4418
4568
  switch (this.state) {
4419
- case V.ROTATE:
4569
+ case Z.ROTATE:
4420
4570
  if (this.enableRotate === !1)
4421
4571
  return;
4422
4572
  this._handleMouseMoveRotate(i);
4423
4573
  break;
4424
- case V.DOLLY:
4574
+ case Z.DOLLY:
4425
4575
  if (this.enableZoom === !1)
4426
4576
  return;
4427
4577
  this._handleMouseMoveDolly(i);
4428
4578
  break;
4429
- case V.PAN:
4579
+ case Z.PAN:
4430
4580
  if (this.enablePan === !1)
4431
4581
  return;
4432
4582
  this._handleMouseMovePan(i);
@@ -4434,7 +4584,7 @@ function Jr(i) {
4434
4584
  }
4435
4585
  }
4436
4586
  function eo(i) {
4437
- this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (i.preventDefault(), this.dispatchEvent(Gi), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(En));
4587
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== Z.NONE || (i.preventDefault(), this.dispatchEvent(qi), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(Tn));
4438
4588
  }
4439
4589
  function to(i) {
4440
4590
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(i);
@@ -4446,15 +4596,15 @@ function io(i) {
4446
4596
  case ft.ROTATE:
4447
4597
  if (this.enableRotate === !1)
4448
4598
  return;
4449
- this._handleTouchStartRotate(i), this.state = V.TOUCH_ROTATE;
4599
+ this._handleTouchStartRotate(i), this.state = Z.TOUCH_ROTATE;
4450
4600
  break;
4451
4601
  case ft.PAN:
4452
4602
  if (this.enablePan === !1)
4453
4603
  return;
4454
- this._handleTouchStartPan(i), this.state = V.TOUCH_PAN;
4604
+ this._handleTouchStartPan(i), this.state = Z.TOUCH_PAN;
4455
4605
  break;
4456
4606
  default:
4457
- this.state = V.NONE;
4607
+ this.state = Z.NONE;
4458
4608
  }
4459
4609
  break;
4460
4610
  case 2:
@@ -4462,46 +4612,46 @@ function io(i) {
4462
4612
  case ft.DOLLY_PAN:
4463
4613
  if (this.enableZoom === !1 && this.enablePan === !1)
4464
4614
  return;
4465
- this._handleTouchStartDollyPan(i), this.state = V.TOUCH_DOLLY_PAN;
4615
+ this._handleTouchStartDollyPan(i), this.state = Z.TOUCH_DOLLY_PAN;
4466
4616
  break;
4467
4617
  case ft.DOLLY_ROTATE:
4468
4618
  if (this.enableZoom === !1 && this.enableRotate === !1)
4469
4619
  return;
4470
- this._handleTouchStartDollyRotate(i), this.state = V.TOUCH_DOLLY_ROTATE;
4620
+ this._handleTouchStartDollyRotate(i), this.state = Z.TOUCH_DOLLY_ROTATE;
4471
4621
  break;
4472
4622
  default:
4473
- this.state = V.NONE;
4623
+ this.state = Z.NONE;
4474
4624
  }
4475
4625
  break;
4476
4626
  default:
4477
- this.state = V.NONE;
4627
+ this.state = Z.NONE;
4478
4628
  }
4479
- this.state !== V.NONE && this.dispatchEvent(Gi);
4629
+ this.state !== Z.NONE && this.dispatchEvent(qi);
4480
4630
  }
4481
4631
  function so(i) {
4482
4632
  switch (this._trackPointer(i), this.state) {
4483
- case V.TOUCH_ROTATE:
4633
+ case Z.TOUCH_ROTATE:
4484
4634
  if (this.enableRotate === !1)
4485
4635
  return;
4486
4636
  this._handleTouchMoveRotate(i), this.update();
4487
4637
  break;
4488
- case V.TOUCH_PAN:
4638
+ case Z.TOUCH_PAN:
4489
4639
  if (this.enablePan === !1)
4490
4640
  return;
4491
4641
  this._handleTouchMovePan(i), this.update();
4492
4642
  break;
4493
- case V.TOUCH_DOLLY_PAN:
4643
+ case Z.TOUCH_DOLLY_PAN:
4494
4644
  if (this.enableZoom === !1 && this.enablePan === !1)
4495
4645
  return;
4496
4646
  this._handleTouchMoveDollyPan(i), this.update();
4497
4647
  break;
4498
- case V.TOUCH_DOLLY_ROTATE:
4648
+ case Z.TOUCH_DOLLY_ROTATE:
4499
4649
  if (this.enableZoom === !1 && this.enableRotate === !1)
4500
4650
  return;
4501
4651
  this._handleTouchMoveDollyRotate(i), this.update();
4502
4652
  break;
4503
4653
  default:
4504
- this.state = V.NONE;
4654
+ this.state = Z.NONE;
4505
4655
  }
4506
4656
  }
4507
4657
  function no(i) {
@@ -4552,17 +4702,17 @@ function Ze(i) {
4552
4702
  function Be(i) {
4553
4703
  return i.isOrthographicCamera;
4554
4704
  }
4555
- const ht = Math.PI * 2, Ts = Math.PI / 2, Cn = 1e-5, xt = Math.PI / 180;
4705
+ const ht = Math.PI * 2, Ds = Math.PI / 2, Mn = 1e-5, xt = Math.PI / 180;
4556
4706
  function Me(i, e, t) {
4557
4707
  return Math.max(e, Math.min(t, i));
4558
4708
  }
4559
- function q(i, e = Cn) {
4709
+ function q(i, e = Mn) {
4560
4710
  return Math.abs(i) < e;
4561
4711
  }
4562
- function Y(i, e, t = Cn) {
4712
+ function Y(i, e, t = Mn) {
4563
4713
  return q(i - e, t);
4564
4714
  }
4565
- function Ms(i, e) {
4715
+ function Rs(i, e) {
4566
4716
  return Math.round(i / e) * e;
4567
4717
  }
4568
4718
  function Ot(i) {
@@ -4582,27 +4732,27 @@ function Gt(i, e, t, s, n = 1 / 0, a) {
4582
4732
  let f = e + (l + m) * c;
4583
4733
  return d - i > 0 == f > d && (f = d, t.value = (f - d) / a), f;
4584
4734
  }
4585
- function Ps(i, e, t, s, n = 1 / 0, a, r) {
4735
+ function Is(i, e, t, s, n = 1 / 0, a, r) {
4586
4736
  s = Math.max(1e-4, s);
4587
4737
  const o = 2 / s, c = o * a, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
4588
- let d = e.x, p = e.y, m = e.z, f = i.x - d, w = i.y - p, v = i.z - m;
4589
- const x = d, g = p, y = m, E = n * s, C = E * E, S = f * f + w * w + v * v;
4590
- 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) {
4591
4741
  const $ = Math.sqrt(S);
4592
- f = f / $ * E, w = w / $ * E, v = v / $ * E;
4742
+ f = f / $ * C, E = E / $ * C, v = v / $ * C;
4593
4743
  }
4594
- d = i.x - f, p = i.y - w, m = i.z - v;
4595
- const O = (t.x + o * f) * a, I = (t.y + o * w) * a, U = (t.z + o * v) * a;
4596
- 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;
4597
- 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;
4598
- 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;
4599
4749
  }
4600
4750
  function Si(i, e) {
4601
4751
  e.set(0, 0), i.forEach((t) => {
4602
4752
  e.x += t.clientX, e.y += t.clientY;
4603
4753
  }), e.x /= i.length, e.y /= i.length;
4604
4754
  }
4605
- function wi(i, e) {
4755
+ function xi(i, e) {
4606
4756
  return Be(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
4607
4757
  }
4608
4758
  class oo {
@@ -4669,9 +4819,9 @@ class oo {
4669
4819
  }
4670
4820
  }
4671
4821
  }
4672
- var xi;
4673
- const lo = "2.9.0", Xt = 1 / 8, co = /Mac/.test((xi = globalThis?.navigator) === null || xi === void 0 ? void 0 : xi.platform);
4674
- let L, As, $t, Oi, be, j, z, dt, Mt, Ae, De, We, Ds, Rs, xe, Pt, ut, Is, Ti, Ls, Mi, Pi, qt;
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;
4675
4825
  class ke extends oo {
4676
4826
  /**
4677
4827
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
@@ -4714,7 +4864,7 @@ class ke extends oo {
4714
4864
  * @category Statics
4715
4865
  */
4716
4866
  static install(e) {
4717
- L = e.THREE, As = 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(), Ds = new L.Vector3(), Rs = new L.Vector3(), xe = new L.Spherical(), Pt = new L.Spherical(), ut = new L.Box3(), Is = new L.Box3(), Ti = new L.Sphere(), Ls = 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();
4718
4868
  }
4719
4869
  /**
4720
4870
  * list all ACTIONs
@@ -4742,26 +4892,26 @@ class ke extends oo {
4742
4892
  */
4743
4893
  constructor(e, t) {
4744
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 = () => {
4745
- }, 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) => {
4746
- 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;
4747
4897
  if (Ze(this._camera)) {
4748
4898
  const O = j.copy(this._camera.position).sub(this._target), I = this._camera.getEffectiveFOV() * xt, U = O.length() * Math.tan(I * 0.5);
4749
- 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;
4750
4900
  } else if (Be(this._camera)) {
4751
4901
  const O = this._camera;
4752
- 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;
4753
4903
  } else
4754
4904
  return;
4755
- 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);
4756
4906
  }, this._rotateInternal = (g, y) => {
4757
- const E = ht * this.azimuthRotateSpeed * g / this._elementRect.height, C = ht * this.polarRotateSpeed * y / this._elementRect.height;
4758
- this.rotate(E, C, !0);
4759
- }, this._dollyInternal = (g, y, E) => {
4760
- 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;
4761
- 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);
4762
- }, this._zoomInternal = (g, y, E) => {
4763
- const C = Math.pow(0.95, g * this.dollySpeed), S = this._zoom, O = this._zoom * C;
4764
- 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));
4765
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 = [
4766
4916
  new L.Vector3(),
4767
4917
  new L.Vector3(),
@@ -4781,18 +4931,18 @@ class ke extends oo {
4781
4931
  if (!this._enabled || !this._domElement)
4782
4932
  return;
4783
4933
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
4784
- 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;
4785
4935
  if (S < this._interactiveArea.left || S > this._interactiveArea.right || O < this._interactiveArea.top || O > this._interactiveArea.bottom)
4786
4936
  return;
4787
4937
  }
4788
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;
4789
4939
  if (y !== null) {
4790
- const C = this._findPointerByMouseButton(y);
4791
- C && this._disposePointer(C);
4940
+ const w = this._findPointerByMouseButton(y);
4941
+ w && this._disposePointer(w);
4792
4942
  }
4793
4943
  if ((g.buttons & ee.LEFT) === ee.LEFT && this._lockedPointer)
4794
4944
  return;
4795
- const E = {
4945
+ const C = {
4796
4946
  pointerId: g.pointerId,
4797
4947
  clientX: g.clientX,
4798
4948
  clientY: g.clientY,
@@ -4800,12 +4950,12 @@ class ke extends oo {
4800
4950
  deltaY: 0,
4801
4951
  mouseButton: y
4802
4952
  };
4803
- 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);
4804
4954
  }, o = (g) => {
4805
4955
  g.cancelable && g.preventDefault();
4806
- const y = g.pointerId, E = this._lockedPointer || this._findPointerById(y);
4807
- if (E) {
4808
- 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")
4809
4959
  switch (this._activePointers.length) {
4810
4960
  case 1:
4811
4961
  this._state = this.touches.one;
@@ -4841,7 +4991,7 @@ class ke extends oo {
4841
4991
  }
4842
4992
  else
4843
4993
  this._state = _.NONE;
4844
- w();
4994
+ E();
4845
4995
  }
4846
4996
  };
4847
4997
  let l = -1;
@@ -4857,7 +5007,7 @@ class ke extends oo {
4857
5007
  const O = performance.now();
4858
5008
  l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
4859
5009
  }
4860
- const y = co ? -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;
4861
5011
  switch (this.mouseButtons.wheel) {
4862
5012
  case _.ROTATE: {
4863
5013
  this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
@@ -4872,11 +5022,11 @@ class ke extends oo {
4872
5022
  break;
4873
5023
  }
4874
5024
  case _.DOLLY: {
4875
- this._dollyInternal(-E, C, S), this._isUserControllingDolly = !0;
5025
+ this._dollyInternal(-C, w, S), this._isUserControllingDolly = !0;
4876
5026
  break;
4877
5027
  }
4878
5028
  case _.ZOOM: {
4879
- this._zoomInternal(-E, C, S), this._isUserControllingZoom = !0;
5029
+ this._zoomInternal(-C, w, S), this._isUserControllingZoom = !0;
4880
5030
  break;
4881
5031
  }
4882
5032
  }
@@ -4884,8 +5034,8 @@ class ke extends oo {
4884
5034
  }, p = (g) => {
4885
5035
  if (!(!this._domElement || !this._enabled)) {
4886
5036
  if (this.mouseButtons.right === ke.ACTION.NONE) {
4887
- const y = g instanceof PointerEvent ? g.pointerId : 0, E = this._findPointerById(y);
4888
- 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);
4889
5039
  return;
4890
5040
  }
4891
5041
  g.preventDefault();
@@ -4894,7 +5044,7 @@ class ke extends oo {
4894
5044
  if (!this._enabled)
4895
5045
  return;
4896
5046
  if (Si(this._activePointers, be), this._getClientRect(this._elementRect), s.copy(be), n.copy(be), this._activePointers.length >= 2) {
4897
- 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);
4898
5048
  a.set(0, S);
4899
5049
  const O = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, I = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
4900
5050
  n.set(O, I);
@@ -4920,19 +5070,19 @@ class ke extends oo {
4920
5070
  if (!this._enabled || !this._dragNeedsUpdate)
4921
5071
  return;
4922
5072
  this._dragNeedsUpdate = !1, Si(this._activePointers, be);
4923
- 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;
4924
- 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) {
4925
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;
4926
- (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);
4927
5077
  }
4928
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) {
4929
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;
4930
5080
  a.set(0, I);
4931
- 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;
4932
- (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);
4933
5083
  }
4934
- ((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" });
4935
- }, 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 = () => {
4936
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" }));
4937
5087
  };
4938
5088
  this.lockPointer = () => {
@@ -4945,8 +5095,8 @@ class ke extends oo {
4945
5095
  mouseButton: null
4946
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());
4947
5097
  }, this.unlockPointer = () => {
4948
- var g, y, E;
4949
- 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();
4950
5100
  };
4951
5101
  const v = () => {
4952
5102
  this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement || this.unlockPointer();
@@ -4958,7 +5108,7 @@ class ke extends oo {
4958
5108
  }, this._removeAllEventListeners = () => {
4959
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));
4960
5110
  }, this.cancel = () => {
4961
- this._state !== _.NONE && (this._state = _.NONE, this._activePointers.length = 0, w());
5111
+ this._state !== _.NONE && (this._state = _.NONE, this._activePointers.length = 0, E());
4962
5112
  }, t && this.connect(t), this.update(0);
4963
5113
  }
4964
5114
  /**
@@ -5323,18 +5473,18 @@ class ke extends oo {
5323
5473
  fitToBox(e, t, { cover: s = !1, paddingLeft: n = 0, paddingRight: a = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
5324
5474
  const c = [], l = e.isBox3 ? ut.copy(e) : ut.setFromObject(e);
5325
5475
  l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
5326
- const d = Ms(this._sphericalEnd.theta, Ts), p = Ms(this._sphericalEnd.phi, Ts);
5476
+ const d = Rs(this._sphericalEnd.theta, Ds), p = Rs(this._sphericalEnd.phi, Ds);
5327
5477
  c.push(this.rotateTo(d, p, t));
5328
- const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = Ls.setFromUnitVectors(m, Oi), w = Y(Math.abs(m.y), 1);
5329
- w && f.multiply(Mi.setFromAxisAngle($t, d)), f.multiply(this._yAxisUpSpaceInverse);
5330
- const v = Is.makeEmpty();
5331
- z.copy(l.min).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).applyQuaternion(f), v.expandByPoint(z), v.min.x -= n, v.min.y -= 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);
5332
5482
  const x = v.getSize(j), g = v.getCenter(z).applyQuaternion(f);
5333
5483
  if (Ze(this._camera)) {
5334
5484
  const y = this.getDistanceToFitBox(x.x, x.y, x.z, s);
5335
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));
5336
5486
  } else if (Be(this._camera)) {
5337
- 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);
5338
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));
5339
5489
  }
5340
5490
  return Promise.all(c);
@@ -5346,7 +5496,7 @@ class ke extends oo {
5346
5496
  * @category Methods
5347
5497
  */
5348
5498
  fitToSphere(e, t) {
5349
- 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);
5350
5500
  if (s.push(this.moveTo(a.center.x, a.center.y, a.center.z, t)), Ze(this._camera)) {
5351
5501
  const r = this.getDistanceToFitSphere(a.radius);
5352
5502
  s.push(this.dollyTo(r, t));
@@ -5392,15 +5542,15 @@ class ke extends oo {
5392
5542
  * @param enableTransition
5393
5543
  * @category Methods
5394
5544
  */
5395
- 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) {
5396
5546
  this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = ct.NONE, this._changedDolly = 0;
5397
5547
  const v = j.set(n, a, r), x = z.set(e, t, s);
5398
5548
  xe.setFromVector3(x.sub(v).applyQuaternion(this._yAxisUpSpace));
5399
5549
  const g = dt.set(d, p, m), y = z.set(o, c, l);
5400
5550
  Pt.setFromVector3(y.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(v.lerp(g, f));
5401
- const E = Pt.theta - xe.theta, C = Pt.phi - xe.phi, S = Pt.radius - xe.radius;
5402
- 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));
5403
- 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);
5404
5554
  return this._createOnRestPromise(O);
5405
5555
  }
5406
5556
  /**
@@ -5491,7 +5641,7 @@ class ke extends oo {
5491
5641
  * @category Methods
5492
5642
  */
5493
5643
  getDistanceToFitBox(e, t, s, n = !1) {
5494
- if (wi(this._camera, "getDistanceToFitBox"))
5644
+ if (xi(this._camera, "getDistanceToFitBox"))
5495
5645
  return this._spherical.radius;
5496
5646
  const a = e / t, r = this._camera.getEffectiveFOV() * xt, o = this._camera.aspect;
5497
5647
  return ((n ? a > o : a < o) ? t : e / o) * 0.5 / Math.tan(r * 0.5) + s * 0.5;
@@ -5503,7 +5653,7 @@ class ke extends oo {
5503
5653
  * @category Methods
5504
5654
  */
5505
5655
  getDistanceToFitSphere(e) {
5506
- if (wi(this._camera, "getDistanceToFitSphere"))
5656
+ if (xi(this._camera, "getDistanceToFitSphere"))
5507
5657
  return this._spherical.radius;
5508
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;
5509
5659
  return e / Math.sin(n * 0.5);
@@ -5609,7 +5759,7 @@ class ke extends oo {
5609
5759
  * @category Methods
5610
5760
  */
5611
5761
  update(e) {
5612
- const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a = Ds.subVectors(this._targetEnd, this._target), r = Rs.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;
5613
5763
  if (q(t))
5614
5764
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
5615
5765
  else {
@@ -5632,13 +5782,13 @@ class ke extends oo {
5632
5782
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
5633
5783
  else {
5634
5784
  const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5635
- Ps(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;
5636
5786
  }
5637
5787
  if (q(r.x) && q(r.y) && q(r.z))
5638
5788
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5639
5789
  else {
5640
5790
  const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5641
- Ps(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;
5642
5792
  }
5643
5793
  if (q(o))
5644
5794
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
@@ -5648,22 +5798,22 @@ class ke extends oo {
5648
5798
  }
5649
5799
  if (this.dollyToCursor) {
5650
5800
  if (Ze(this._camera) && this._changedDolly !== 0) {
5651
- const p = this._spherical.radius - this._lastDistance, m = this._camera, f = this._getCameraDirection(Mt), w = j.copy(f).cross(m.up).normalize();
5652
- w.lengthSq() === 0 && (w.x = 1);
5653
- 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;
5654
5804
  if (this.infinityDolly && (S || O)) {
5655
5805
  this._sphericalEnd.radius -= p, this._spherical.radius -= p;
5656
5806
  const U = z.copy(f).multiplyScalar(-p);
5657
- C.add(U);
5807
+ w.add(U);
5658
5808
  }
5659
- this._boundary.clampPoint(C, C);
5660
- const I = z.subVectors(C, this._targetEnd);
5661
- 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);
5662
5812
  } else if (Be(this._camera) && this._changedZoom !== 0) {
5663
- 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);
5664
- C.sub(O), this._boundary.clampPoint(C, C);
5665
- const I = z.subVectors(C, this._targetEnd);
5666
- 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);
5667
5817
  }
5668
5818
  }
5669
5819
  this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
@@ -5782,13 +5932,13 @@ class ke extends oo {
5782
5932
  // lateUpdate
5783
5933
  _collisionTest() {
5784
5934
  let e = 1 / 0;
5785
- if (!(this.colliderMeshes.length >= 1) || wi(this._camera, "_collisionTest"))
5935
+ if (!(this.colliderMeshes.length >= 1) || xi(this._camera, "_collisionTest"))
5786
5936
  return e;
5787
5937
  const s = this._getTargetDirection(Mt);
5788
- Pi.lookAt(As, s, this._camera.up);
5938
+ Ai.lookAt(Ls, s, this._camera.up);
5789
5939
  for (let n = 0; n < 4; n++) {
5790
5940
  const a = z.copy(this._nearPlaneCorners[n]);
5791
- a.applyMatrix4(Pi);
5941
+ a.applyMatrix4(Ai);
5792
5942
  const r = dt.addVectors(this._target, a);
5793
5943
  qt.set(r, s), qt.far = this._spherical.radius + 1;
5794
5944
  const o = qt.intersectObjects(this.colliderMeshes);
@@ -5867,8 +6017,8 @@ class ke extends oo {
5867
6017
  }), s.radius = Math.sqrt(a), s;
5868
6018
  }
5869
6019
  }
5870
- const li = (i) => {
5871
- const [e, t] = Z(i.options[i.index]), s = () => {
6020
+ const ci = (i) => {
6021
+ const [e, t] = B(i.options[i.index]), s = () => {
5872
6022
  i.onToggle(!i.open);
5873
6023
  }, n = (a) => {
5874
6024
  a !== e && (i.onSelect(a), t(a)), i.onToggle(!1);
@@ -5877,21 +6027,21 @@ const li = (i) => {
5877
6027
  /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${i.title}: ${e}` }),
5878
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)) })
5879
6029
  ] });
5880
- }, Ge = Na(function(e, t) {
6030
+ }, Ge = Ha(function(e, t) {
5881
6031
  const s = [
5882
6032
  "Renderer",
5883
6033
  "Depth",
5884
6034
  "Normals",
5885
6035
  "UVs",
5886
6036
  "Wireframe"
5887
- ], [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);
5888
6038
  return /* @__PURE__ */ u.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
5889
6039
  /* @__PURE__ */ u.jsx("div", { ref: t, className: "clickable", onClick: () => {
5890
6040
  d && p(!1);
5891
6041
  } }),
5892
6042
  /* @__PURE__ */ u.jsxs("div", { className: "options", children: [
5893
6043
  e.camera !== null && /* @__PURE__ */ u.jsx(
5894
- li,
6044
+ ci,
5895
6045
  {
5896
6046
  title: "Camera",
5897
6047
  index: e.options.indexOf(e.camera.name),
@@ -5905,7 +6055,7 @@ const li = (i) => {
5905
6055
  }
5906
6056
  ),
5907
6057
  /* @__PURE__ */ u.jsx(
5908
- li,
6058
+ ci,
5909
6059
  {
5910
6060
  title: "Mode",
5911
6061
  index: s.indexOf(n),
@@ -6001,7 +6151,7 @@ void main() {
6001
6151
 
6002
6152
  if (fragColor.a <= 0.0) discard;
6003
6153
  }`;
6004
- class po extends hn {
6154
+ class po extends mn {
6005
6155
  constructor(e) {
6006
6156
  super({
6007
6157
  extensions: {
@@ -6028,12 +6178,10 @@ class po extends hn {
6028
6178
  value: e?.gridOpacity !== void 0 ? e?.gridOpacity : 0.25
6029
6179
  }
6030
6180
  },
6031
- glslVersion: pa,
6032
- side: Bi,
6181
+ glslVersion: va,
6182
+ side: Wi,
6033
6183
  transparent: !0,
6034
6184
  name: "InfiniteGrid",
6035
- depthTest: !1,
6036
- depthWrite: !1,
6037
6185
  vertexShader: ho,
6038
6186
  fragmentShader: uo
6039
6187
  });
@@ -6043,14 +6191,14 @@ class mo extends M {
6043
6191
  gridMaterial;
6044
6192
  constructor(e) {
6045
6193
  const t = new po(e);
6046
- super(new dn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
6194
+ super(new fn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
6047
6195
  }
6048
6196
  update() {
6049
6197
  this.gridMaterial.needsUpdate = !0;
6050
6198
  }
6051
6199
  }
6052
- function ks(i) {
6053
- 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" : "");
6054
6202
  return /* @__PURE__ */ u.jsx(
6055
6203
  "button",
6056
6204
  {
@@ -6107,7 +6255,7 @@ void main() {
6107
6255
  #include <clipping_planes_fragment>
6108
6256
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
6109
6257
  }`;
6110
- class _o extends hn {
6258
+ class _o extends mn {
6111
6259
  constructor() {
6112
6260
  super({
6113
6261
  defines: {
@@ -6118,35 +6266,35 @@ class _o extends hn {
6118
6266
  });
6119
6267
  }
6120
6268
  }
6121
- const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(), Us = {
6269
+ const Xe = new ai(), ue = new P(), Ye = new P(), Q = new Ce(), zs = {
6122
6270
  X: new P(1, 0, 0),
6123
6271
  Y: new P(0, 1, 0),
6124
6272
  Z: new P(0, 0, 1)
6125
- }, Ai = { type: "change" }, js = { type: "mouseDown", mode: null }, Ns = { type: "mouseUp", mode: null }, Fs = { type: "objectChange" };
6126
- class vo extends cn {
6273
+ }, Di = { type: "change" }, Hs = { type: "mouseDown", mode: null }, Ys = { type: "mouseUp", mode: null }, Bs = { type: "objectChange" };
6274
+ class vo extends pn {
6127
6275
  constructor(e, t = null) {
6128
6276
  super(void 0, t);
6129
- const s = new wo(this);
6277
+ const s = new So(this);
6130
6278
  this._root = s;
6131
6279
  const n = new xo();
6132
6280
  this._gizmo = n, s.add(n);
6133
6281
  const a = new Oo();
6134
6282
  this._plane = a, s.add(a);
6135
6283
  const r = this;
6136
- function o(E, C) {
6137
- let S = C;
6138
- Object.defineProperty(r, E, {
6284
+ function o(C, w) {
6285
+ let S = w;
6286
+ Object.defineProperty(r, C, {
6139
6287
  get: function() {
6140
- return S !== void 0 ? S : C;
6288
+ return S !== void 0 ? S : w;
6141
6289
  },
6142
6290
  set: function(O) {
6143
- 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));
6144
6292
  }
6145
- }), r[E] = C, a[E] = C, n[E] = C;
6293
+ }), r[C] = w, a[C] = w, n[C] = w;
6146
6294
  }
6147
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);
6148
- const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), w = new P(), v = new P(), x = new P(), g = 0, y = new P();
6149
- o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", w), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = yo.bind(this), this._onPointerDown = Eo.bind(this), this._onPointerHover = bo.bind(this), this._onPointerMove = Co.bind(this), this._onPointerUp = So.bind(this), t !== null && this.connect();
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();
6150
6298
  }
6151
6299
  connect() {
6152
6300
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -6161,14 +6309,14 @@ class vo extends cn {
6161
6309
  if (this.object === void 0 || this.dragging === !0)
6162
6310
  return;
6163
6311
  e !== null && Xe.setFromCamera(e, this.camera);
6164
- const t = Di(this._gizmo.picker[this.mode], Xe);
6312
+ const t = Ri(this._gizmo.picker[this.mode], Xe);
6165
6313
  t ? this.axis = t.object.name : this.axis = null;
6166
6314
  }
6167
6315
  pointerDown(e) {
6168
6316
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
6169
6317
  e !== null && Xe.setFromCamera(e, this.camera);
6170
- const t = Di(this._plane, Xe, !0);
6171
- t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, js.mode = this.mode, this.dispatchEvent(js);
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);
6172
6320
  }
6173
6321
  }
6174
6322
  pointerMove(e) {
@@ -6177,7 +6325,7 @@ class vo extends cn {
6177
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)
6178
6326
  return;
6179
6327
  e !== null && Xe.setFromCamera(e, this.camera);
6180
- const r = Di(this._plane, Xe, !0);
6328
+ const r = Ri(this._plane, Xe, !0);
6181
6329
  if (r) {
6182
6330
  if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), s === "translate")
6183
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))));
@@ -6192,13 +6340,13 @@ class vo extends cn {
6192
6340
  this._offset.copy(this.pointEnd).sub(this.pointStart);
6193
6341
  const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
6194
6342
  let c = !1;
6195
- t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(ue.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Us[t]), ue.copy(Us[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());
6196
6344
  }
6197
- this.dispatchEvent(Ai), this.dispatchEvent(Fs);
6345
+ this.dispatchEvent(Di), this.dispatchEvent(Bs);
6198
6346
  }
6199
6347
  }
6200
6348
  pointerUp(e) {
6201
- e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Ns.mode = this.mode, this.dispatchEvent(Ns)), 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);
6202
6350
  }
6203
6351
  dispose() {
6204
6352
  this.disconnect(), this.traverse(function(e) {
@@ -6214,7 +6362,7 @@ class vo extends cn {
6214
6362
  return this.object = void 0, this.axis = null, this._root.visible = !1, this;
6215
6363
  }
6216
6364
  reset() {
6217
- this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ai), this.dispatchEvent(Fs), 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));
6218
6366
  }
6219
6367
  getRaycaster() {
6220
6368
  return Xe;
@@ -6273,18 +6421,18 @@ function Eo(i) {
6273
6421
  function Co(i) {
6274
6422
  this.enabled && this.pointerMove(this._getPointer(i));
6275
6423
  }
6276
- function So(i) {
6424
+ function wo(i) {
6277
6425
  this.enabled && (this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(i)));
6278
6426
  }
6279
- function Di(i, e, t) {
6427
+ function Ri(i, e, t) {
6280
6428
  const s = e.intersectObject(i, !0);
6281
6429
  for (let n = 0; n < s.length; n++)
6282
6430
  if (s[n].object.visible || t)
6283
6431
  return s[n];
6284
6432
  return !1;
6285
6433
  }
6286
- const Kt = new un(), X = new P(0, 1, 0), zs = new P(0, 0, 0), Hs = new ci(), Qt = new Ce(), si = new Ce(), Re = new P(), Ys = 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();
6287
- class wo 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 {
6288
6436
  constructor(e) {
6289
6437
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
6290
6438
  }
@@ -6303,7 +6451,7 @@ class xo extends vt {
6303
6451
  fog: !1,
6304
6452
  toneMapped: !1,
6305
6453
  transparent: !0
6306
- }), t = new Vi({
6454
+ }), t = new Gi({
6307
6455
  depthTest: !1,
6308
6456
  depthWrite: !1,
6309
6457
  fog: !1,
@@ -6329,8 +6477,8 @@ class xo extends vt {
6329
6477
  p.opacity = 0.25;
6330
6478
  const m = e.clone();
6331
6479
  m.color.setHex(16776960), m.opacity = 0.25, e.clone().color.setHex(16776960);
6332
- const w = e.clone();
6333
- w.color.setHex(7895160);
6480
+ const E = e.clone();
6481
+ E.color.setHex(7895160);
6334
6482
  const v = new ve(0, 0.04, 0.1, 12);
6335
6483
  v.translate(0, 0.05, 0);
6336
6484
  const x = new de(0.08, 0.08, 0.08);
@@ -6339,11 +6487,11 @@ class xo extends vt {
6339
6487
  g.setAttribute("position", new Ke([0, 0, 0, 1, 0, 0], 3));
6340
6488
  const y = new ve(75e-4, 75e-4, 0.5, 3);
6341
6489
  y.translate(0, 0.25, 0);
6342
- function E($, Ue) {
6490
+ function C($, Ue) {
6343
6491
  const he = new Et($, 75e-4, 3, 64, Ue * Math.PI * 2);
6344
6492
  return he.rotateY(Math.PI / 2), he.rotateX(Math.PI / 2), he;
6345
6493
  }
6346
- function C() {
6494
+ function w() {
6347
6495
  const $ = new _t();
6348
6496
  return $.setAttribute("position", new Ke([0, 0, 0, 1, 1, 1], 3)), $;
6349
6497
  }
@@ -6408,7 +6556,7 @@ class xo extends vt {
6408
6556
  [new M(new Zt(0.01, 2), n), null, null, null, "helper"]
6409
6557
  ],
6410
6558
  DELTA: [
6411
- [new Ie(C(), n), null, null, null, "helper"]
6559
+ [new Ie(w(), n), null, null, null, "helper"]
6412
6560
  ],
6413
6561
  X: [
6414
6562
  [new Ie(g, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
@@ -6421,27 +6569,27 @@ class xo extends vt {
6421
6569
  ]
6422
6570
  }, U = {
6423
6571
  XYZE: [
6424
- [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]]
6425
6573
  ],
6426
6574
  X: [
6427
- [new M(E(0.5, 0.5), a)]
6575
+ [new M(C(0.5, 0.5), a)]
6428
6576
  ],
6429
6577
  Y: [
6430
- [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]]
6431
6579
  ],
6432
6580
  Z: [
6433
- [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]]
6434
6582
  ],
6435
6583
  E: [
6436
- [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]]
6437
6585
  ]
6438
6586
  }, R = {
6439
6587
  AXIS: [
6440
6588
  [new Ie(g, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
6441
6589
  ]
6442
- }, B = {
6590
+ }, V = {
6443
6591
  XYZE: [
6444
- [new M(new pn(0.25, 10, 8), s)]
6592
+ [new M(new _n(0.25, 10, 8), s)]
6445
6593
  ],
6446
6594
  X: [
6447
6595
  [new M(new Et(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
@@ -6455,7 +6603,7 @@ class xo extends vt {
6455
6603
  E: [
6456
6604
  [new M(new Et(0.75, 0.1, 2, 24), s)]
6457
6605
  ]
6458
- }, Se = {
6606
+ }, we = {
6459
6607
  X: [
6460
6608
  [new M(x, a), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
6461
6609
  [new M(y, a), [0, 0, 0], [0, 0, -Math.PI / 2]],
@@ -6530,11 +6678,11 @@ class xo extends vt {
6530
6678
  }
6531
6679
  return Ue;
6532
6680
  }
6533
- 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;
6534
6682
  }
6535
6683
  // updateMatrixWorld will update transformations and appearance of individual handles
6536
6684
  updateMatrixWorld(e) {
6537
- 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;
6538
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";
6539
6687
  let n = [];
6540
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);
@@ -6543,10 +6691,10 @@ class xo extends vt {
6543
6691
  r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
6544
6692
  let o;
6545
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") {
6546
- 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(Hs.lookAt(zs, 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));
6547
6695
  continue;
6548
6696
  }
6549
- 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(Hs.lookAt(this.eye, zs, 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) {
6550
6698
  return r.name === c;
6551
6699
  })) && (r.material.color.setHex(16776960), r.material.opacity = 1);
6552
6700
  }
@@ -6556,13 +6704,13 @@ class xo extends vt {
6556
6704
  class Oo extends M {
6557
6705
  constructor() {
6558
6706
  super(
6559
- new dn(1e5, 1e5, 2, 2),
6560
- new Je({ visible: !1, wireframe: !0, side: Bi, 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 })
6561
6709
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
6562
6710
  }
6563
6711
  updateMatrixWorld(e) {
6564
6712
  let t = this.space;
6565
- 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) {
6566
6714
  case "translate":
6567
6715
  case "scale":
6568
6716
  switch (this.axis) {
@@ -6594,10 +6742,10 @@ class Oo extends M {
6594
6742
  default:
6595
6743
  Re.set(0, 0, 0);
6596
6744
  }
6597
- Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Ys.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Ys)), super.updateMatrixWorld(e);
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);
6598
6746
  }
6599
6747
  }
6600
- class ge extends Yi {
6748
+ class ge extends Zi {
6601
6749
  static DRAG_START = "Transform::dragStart";
6602
6750
  static DRAG_END = "Transform::dragEnd";
6603
6751
  static _instance;
@@ -6666,9 +6814,9 @@ class ge extends Yi {
6666
6814
  return ge._instance || (ge._instance = new ge()), ge._instance;
6667
6815
  }
6668
6816
  }
6669
- const To = new de(), Ri = new pe();
6670
- class Bs extends vt {
6671
- curve = new cs();
6817
+ const To = new de(), Ii = new pe();
6818
+ class Gs extends vt {
6819
+ curve = new us();
6672
6820
  line;
6673
6821
  draggable;
6674
6822
  curvePos;
@@ -6689,7 +6837,7 @@ class Bs extends vt {
6689
6837
  group;
6690
6838
  constructor(e, t) {
6691
6839
  const s = new et(lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()), lt(0.5, 1, Math.random()));
6692
- super(), this.name = e, this.lineMaterial = new Vi({ 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 pn(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();
6693
6841
  }
6694
6842
  enable() {
6695
6843
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6707,7 +6855,7 @@ class Bs extends vt {
6707
6855
  const e = [];
6708
6856
  this.draggable.children.forEach((t) => {
6709
6857
  e.push([Pe(t.position.x, 3), Pe(t.position.y, 3), Pe(t.position.z, 3)]);
6710
- }), Fa({
6858
+ }), Ya({
6711
6859
  name: this.name,
6712
6860
  points: e,
6713
6861
  tension: this.tension,
@@ -6759,14 +6907,14 @@ class Bs extends vt {
6759
6907
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
6760
6908
  };
6761
6909
  updateSpline = () => {
6762
- this.curve = new cs(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));
6763
6911
  };
6764
6912
  // Handlers
6765
6913
  onMouseClick = (e) => {
6766
6914
  if (!me.instance || this._transform && !this._transform.getHelper().visible)
6767
6915
  return;
6768
6916
  const s = me.instance.currentWindow.current.getBoundingClientRect();
6769
- 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);
6770
6918
  const n = this.raycaster.intersectObjects(this.draggable.children, !1);
6771
6919
  if (n.length > 0) {
6772
6920
  const a = n[0].object;
@@ -7059,7 +7207,7 @@ class Mo extends vt {
7059
7207
  e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
7060
7208
  }
7061
7209
  createSpline = (e = []) => {
7062
- const t = `Spline ${ei + 1}`, s = new Bs(t, this._camera);
7210
+ const t = `Spline ${ei + 1}`, s = new Gs(t, this._camera);
7063
7211
  return s.addPoints(e), this.addSpline(s), ei++, s;
7064
7212
  };
7065
7213
  createSplineFromArray = (e) => {
@@ -7083,7 +7231,7 @@ class Mo extends vt {
7083
7231
  t.points.forEach((r) => {
7084
7232
  n.push(new P(r[0], r[1], r[2]));
7085
7233
  });
7086
- const a = new Bs(s, this.camera);
7234
+ const a = new Gs(s, this.camera);
7087
7235
  a.addPoints(n), this.addSpline(a), ei++;
7088
7236
  };
7089
7237
  get camera() {
@@ -7096,7 +7244,7 @@ class Mo extends vt {
7096
7244
  });
7097
7245
  }
7098
7246
  }
7099
- const Vs = [
7247
+ const Xs = [
7100
7248
  "Single",
7101
7249
  "Side by Side",
7102
7250
  "Stacked",
@@ -7104,7 +7252,7 @@ const Vs = [
7104
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==";
7105
7253
  class me extends Ft {
7106
7254
  static instance = null;
7107
- scene = new Ws();
7255
+ scene = new Vi();
7108
7256
  renderer;
7109
7257
  currentScene;
7110
7258
  cameras = /* @__PURE__ */ new Map();
@@ -7114,15 +7262,15 @@ class me extends Ft {
7114
7262
  // RefObject to one of the "windows"
7115
7263
  cameraHelpers = /* @__PURE__ */ new Map();
7116
7264
  lightHelpers = /* @__PURE__ */ new Map();
7117
- helpersContainer = new ma();
7265
+ helpersContainer = new ti();
7118
7266
  grid = new mo();
7119
- interactionHelper = new fa(25);
7267
+ interactionHelper = new ya(25);
7120
7268
  currentTransform;
7121
7269
  // Tools
7122
7270
  splineEditor;
7123
7271
  // Override Materials
7124
- depthMaterial = new ga();
7125
- normalsMaterial = new _a();
7272
+ depthMaterial = new ba();
7273
+ normalsMaterial = new Ea();
7126
7274
  uvMaterial = new _o();
7127
7275
  wireframeMaterial = new Je({
7128
7276
  opacity: 0.33,
@@ -7150,7 +7298,7 @@ class me extends Ft {
7150
7298
  // Interactions
7151
7299
  selectedItem = void 0;
7152
7300
  debugCamera;
7153
- raycaster = new ni();
7301
+ raycaster = new ai();
7154
7302
  pointer = new pe();
7155
7303
  cameraControls = void 0;
7156
7304
  // References
@@ -7174,13 +7322,13 @@ class me extends Ft {
7174
7322
  const a = {
7175
7323
  Vector2: pe,
7176
7324
  Vector3: P,
7177
- Vector4: Oa,
7325
+ Vector4: Pa,
7178
7326
  Quaternion: Ce,
7179
- Matrix4: ci,
7180
- Spherical: Li,
7181
- Box3: Ta,
7182
- Sphere: Ma,
7183
- Raycaster: ni
7327
+ Matrix4: hi,
7328
+ Spherical: Ui,
7329
+ Box3: Aa,
7330
+ Sphere: Da,
7331
+ Raycaster: ai
7184
7332
  };
7185
7333
  ke.install({ THREE: a }), this.setupScene(), this.setupTools();
7186
7334
  const r = localStorage.getItem(this.expandedCameraVisibility);
@@ -7330,11 +7478,11 @@ class me extends Ft {
7330
7478
  ] }),
7331
7479
  /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
7332
7480
  /* @__PURE__ */ u.jsx(
7333
- li,
7481
+ ci,
7334
7482
  {
7335
7483
  title: "View",
7336
- index: Vs.indexOf(this.state.mode),
7337
- options: Vs,
7484
+ index: Xs.indexOf(this.state.mode),
7485
+ options: Xs,
7338
7486
  onSelect: (t) => {
7339
7487
  t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
7340
7488
  },
@@ -7349,7 +7497,7 @@ class me extends Ft {
7349
7497
  }
7350
7498
  ),
7351
7499
  /* @__PURE__ */ u.jsx(
7352
- li,
7500
+ ci,
7353
7501
  {
7354
7502
  title: "Interact",
7355
7503
  index: this.state.interactionMode === "Orbit" ? 0 : 1,
@@ -7371,7 +7519,7 @@ class me extends Ft {
7371
7519
  }
7372
7520
  ),
7373
7521
  /* @__PURE__ */ u.jsx(
7374
- ks,
7522
+ Fs,
7375
7523
  {
7376
7524
  name: "cameraHelper",
7377
7525
  icon: Po,
@@ -7389,7 +7537,7 @@ class me extends Ft {
7389
7537
  }
7390
7538
  ),
7391
7539
  /* @__PURE__ */ u.jsx(
7392
- ks,
7540
+ Fs,
7393
7541
  {
7394
7542
  name: "lightHelper",
7395
7543
  icon: Ao,
@@ -7411,18 +7559,18 @@ class me extends Ft {
7411
7559
  }
7412
7560
  // Setup
7413
7561
  setupRenderer() {
7414
- this.renderer = new va({
7562
+ this.renderer = new Ca({
7415
7563
  canvas: this.canvasRef.current,
7416
7564
  stencil: !1
7417
7565
  }), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
7418
7566
  }
7419
7567
  setupScene() {
7420
- this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
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);
7421
7569
  const e = (a, r) => {
7422
- const o = new Ii(-100, 100, 100, -100, 0, 3e3);
7570
+ const o = new ki(-100, 100, 100, -100, 0, 3e3);
7423
7571
  return o.name = a, o.position.copy(r), o.lookAt(0, 0, 0), this.cameras.set(a, o), o;
7424
7572
  }, t = 1e3;
7425
- e("Top", new P(0, t, 0)), e("Bottom", new P(0, -t, 0)), e("Left", new P(-t, 0, 0)), e("Right", new P(t, 0, 0)), e("Front", new P(0, 0, t)), e("Back", new P(0, 0, -t)), e("Orthographic", new P(t, t, t)), e("UI", new P()), this.debugCamera = new hs(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;
7426
7574
  const s = localStorage, n = this.props.three.app.appID;
7427
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"));
7428
7576
  }
@@ -7507,7 +7655,7 @@ class me extends Ft {
7507
7655
  }
7508
7656
  const a = s / n;
7509
7657
  this.cameras.forEach((r) => {
7510
- r instanceof Ii ? (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 hs && (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();
7511
7659
  });
7512
7660
  };
7513
7661
  sceneUpdate = (e) => {
@@ -7523,7 +7671,7 @@ class me extends Ft {
7523
7671
  if (s !== void 0) {
7524
7672
  const n = s;
7525
7673
  this.cameras.set(t.name, n);
7526
- const a = new ya(n);
7674
+ const a = new wa(n);
7527
7675
  a.visible = this.cameraVisibility, this.cameraHelpers.set(n.name, a), this.scene.add(a), this.setState({ lastUpdate: Date.now() });
7528
7676
  }
7529
7677
  };
@@ -7573,7 +7721,7 @@ class me extends Ft {
7573
7721
  if (this.currentCamera.name === "UI")
7574
7722
  return;
7575
7723
  const t = this.controls.get(this.currentCamera.name);
7576
- e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof ba ? (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(Fi(45), Fi(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));
7577
7725
  } else if (this.currentTransform !== void 0)
7578
7726
  switch (e.key) {
7579
7727
  case "r":
@@ -7611,7 +7759,7 @@ class me extends Ft {
7611
7759
  x: this.selectedItem.rotation.x,
7612
7760
  y: this.selectedItem.rotation.y,
7613
7761
  z: this.selectedItem.rotation.z
7614
- }), 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());
7615
7763
  };
7616
7764
  // Utils
7617
7765
  clearLightHelpers = () => {
@@ -7625,19 +7773,19 @@ class me extends Ft {
7625
7773
  let t;
7626
7774
  switch (e.type) {
7627
7775
  case "DirectionalLight":
7628
- t = new wa(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);
7629
7777
  break;
7630
7778
  case "HemisphereLight":
7631
- t = new Sa(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);
7632
7780
  break;
7633
7781
  case "RectAreaLight":
7634
7782
  t = new Wr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
7635
7783
  break;
7636
7784
  case "PointLight":
7637
- t = new Ca(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);
7638
7786
  break;
7639
7787
  case "SpotLight":
7640
- t = new Ea(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);
7641
7789
  break;
7642
7790
  }
7643
7791
  }
@@ -7708,7 +7856,7 @@ class me extends Ft {
7708
7856
  if (this.selectedItem === void 0)
7709
7857
  return;
7710
7858
  cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
7711
- const s = 0.15, n = new xa();
7859
+ const s = 0.15, n = new qs();
7712
7860
  n.start(), this.selectedItem.getWorldPosition(e.target0);
7713
7861
  const a = () => {
7714
7862
  const r = n.getDelta();
@@ -7789,11 +7937,11 @@ class me extends Ft {
7789
7937
  return `${this.appID}_multiviewLightVisibility`;
7790
7938
  }
7791
7939
  }
7792
- class di extends Ft {
7940
+ class ui extends Ft {
7793
7941
  static instance;
7794
- matrix = new ci();
7942
+ matrix = new hi();
7795
7943
  position = new P();
7796
- rotation = new un();
7944
+ rotation = new gn();
7797
7945
  scale = new P();
7798
7946
  open = !1;
7799
7947
  constructor(e) {
@@ -7802,7 +7950,7 @@ class di extends Ft {
7802
7950
  this.open = s, this.saveExpanded(), this.state = {
7803
7951
  lastUpdated: 0,
7804
7952
  expanded: s
7805
- }, 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;
7806
7954
  }
7807
7955
  update() {
7808
7956
  if (me.instance) {
@@ -7872,7 +8020,7 @@ class di extends Ft {
7872
8020
  return `${this.props.three.app.appID}_transform`;
7873
8021
  }
7874
8022
  }
7875
- function Zs(i) {
8023
+ function $s(i) {
7876
8024
  switch (i) {
7877
8025
  case "color":
7878
8026
  return "Color";
@@ -7908,7 +8056,7 @@ function Do(i, e) {
7908
8056
  for (const o in i.lightInfo) {
7909
8057
  const c = i.lightInfo[o];
7910
8058
  c !== void 0 && (c.isColor !== void 0 ? r.push({
7911
- title: Zs(o),
8059
+ title: $s(o),
7912
8060
  prop: o,
7913
8061
  type: "color",
7914
8062
  value: c,
@@ -7922,7 +8070,7 @@ function Do(i, e) {
7922
8070
  }
7923
8071
  }
7924
8072
  }) : r.push({
7925
- title: Zs(o),
8073
+ title: $s(o),
7926
8074
  prop: o,
7927
8075
  type: typeof c,
7928
8076
  value: c,
@@ -8020,7 +8168,7 @@ function Ro(i) {
8020
8168
  }), o.push({
8021
8169
  title: "Mixer",
8022
8170
  items: v
8023
- }), d = new Pa(m), me.instance?.scene.add(d);
8171
+ }), d = new Ra(m), me.instance?.scene.add(d);
8024
8172
  }
8025
8173
  }
8026
8174
  }
@@ -8038,7 +8186,7 @@ function Ro(i) {
8038
8186
  }
8039
8187
  );
8040
8188
  }
8041
- const Hi = {
8189
+ const Bi = {
8042
8190
  name: "",
8043
8191
  uuid: "",
8044
8192
  type: "",
@@ -8051,15 +8199,15 @@ const Hi = {
8051
8199
  lightInfo: void 0,
8052
8200
  children: []
8053
8201
  };
8054
- let ce = { ...Hi };
8202
+ let ce = { ...Bi };
8055
8203
  function Io(i) {
8056
- const [e, t] = Z(-1);
8204
+ const [e, t] = B(-1);
8057
8205
  tt(() => {
8058
8206
  function r(c) {
8059
8207
  ce = { ...c.value }, t(Date.now());
8060
8208
  }
8061
8209
  function o() {
8062
- ce = { ...Hi }, t(Date.now());
8210
+ ce = { ...Bi }, t(Date.now());
8063
8211
  }
8064
8212
  return D.addEventListener(A.SET_SCENE, o), D.addEventListener(A.SET_OBJECT, r), () => {
8065
8213
  D.removeEventListener(A.SET_SCENE, o), D.removeEventListener(A.SET_OBJECT, r);
@@ -8067,16 +8215,16 @@ function Io(i) {
8067
8215
  }, []);
8068
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;
8069
8217
  return /* @__PURE__ */ u.jsx(
8070
- oi,
8218
+ li,
8071
8219
  {
8072
8220
  label: "Inspector",
8073
8221
  button: ce.uuid.length > 0 ? /* @__PURE__ */ u.jsx("button", { className: "remove", onClick: () => {
8074
- ge.instance.remove(ce.name), ce = { ...Hi }, t(Date.now());
8222
+ ge.instance.remove(ce.name), ce = { ...Bi }, t(Date.now());
8075
8223
  } }) : void 0,
8076
8224
  children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: i.class, children: ce.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8077
8225
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8078
8226
  /* @__PURE__ */ u.jsx(
8079
- ii,
8227
+ si,
8080
8228
  {
8081
8229
  type: "string",
8082
8230
  title: "Name",
@@ -8086,7 +8234,7 @@ function Io(i) {
8086
8234
  }
8087
8235
  ),
8088
8236
  /* @__PURE__ */ u.jsx(
8089
- ii,
8237
+ si,
8090
8238
  {
8091
8239
  type: "string",
8092
8240
  title: "Type",
@@ -8096,7 +8244,7 @@ function Io(i) {
8096
8244
  }
8097
8245
  ),
8098
8246
  /* @__PURE__ */ u.jsx(
8099
- ii,
8247
+ si,
8100
8248
  {
8101
8249
  type: "string",
8102
8250
  title: "UUID",
@@ -8107,7 +8255,7 @@ function Io(i) {
8107
8255
  )
8108
8256
  ] }),
8109
8257
  /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8110
- /* @__PURE__ */ u.jsx(di, { object: ce, three: i.three }),
8258
+ /* @__PURE__ */ u.jsx(ui, { object: ce, three: i.three }),
8111
8259
  n ? /* @__PURE__ */ u.jsx(Ro, { object: ce, three: i.three }) : null,
8112
8260
  s.search("camera") > -1 ? Zr(ce, i.three) : null,
8113
8261
  s.search("light") > -1 ? Do(ce, i.three) : null,
@@ -8124,11 +8272,11 @@ class Lo extends Ft {
8124
8272
  autoClearColor = !0;
8125
8273
  autoClearDepth = !0;
8126
8274
  autoClearStencil = !0;
8127
- outputColorSpace = ds;
8275
+ outputColorSpace = ms;
8128
8276
  localClippingEnabled = !1;
8129
8277
  clearColor = new et(0);
8130
8278
  clearAlpha = 1;
8131
- toneMapping = us;
8279
+ toneMapping = fs;
8132
8280
  toneMappingExposure = 1;
8133
8281
  constructor(e) {
8134
8282
  super(e);
@@ -8252,11 +8400,11 @@ class Lo extends Ft {
8252
8400
  options: [
8253
8401
  {
8254
8402
  title: "No Color Space",
8255
- value: Aa
8403
+ value: Ia
8256
8404
  },
8257
8405
  {
8258
8406
  title: "SRB Color Space",
8259
- value: ds
8407
+ value: ms
8260
8408
  },
8261
8409
  {
8262
8410
  title: "Linear SRB Color Space",
@@ -8274,35 +8422,35 @@ class Lo extends Ft {
8274
8422
  options: [
8275
8423
  {
8276
8424
  title: "None ",
8277
- value: us
8425
+ value: fs
8278
8426
  },
8279
8427
  {
8280
8428
  title: "Linear ",
8281
- value: Da
8429
+ value: La
8282
8430
  },
8283
8431
  {
8284
8432
  title: "Reinhard",
8285
- value: Ra
8433
+ value: ka
8286
8434
  },
8287
8435
  {
8288
8436
  title: "Cineon ",
8289
- value: Ia
8437
+ value: Ua
8290
8438
  },
8291
8439
  {
8292
8440
  title: "ACES Filmic",
8293
- value: La
8441
+ value: ja
8294
8442
  },
8295
8443
  {
8296
8444
  title: "AgX",
8297
- value: ka
8445
+ value: Na
8298
8446
  },
8299
8447
  {
8300
8448
  title: "Neutral",
8301
- value: Ua
8449
+ value: Fa
8302
8450
  },
8303
8451
  {
8304
8452
  title: "Custom",
8305
- value: ja
8453
+ value: za
8306
8454
  }
8307
8455
  ],
8308
8456
  onChange: (t, s) => {
@@ -8336,11 +8484,11 @@ class Lo extends Ft {
8336
8484
  }
8337
8485
  }
8338
8486
  function ko(i) {
8339
- const [e] = Z([]), [t] = Z([]), [s, n] = Z(0), a = (c) => {
8487
+ const [e] = B([]), [t] = B([]), [s, n] = B(0), a = (c) => {
8340
8488
  const l = c.value;
8341
8489
  e.push(l), t.push(
8342
8490
  /* @__PURE__ */ u.jsx(
8343
- oi,
8491
+ li,
8344
8492
  {
8345
8493
  label: `Scene: ${l.name}`,
8346
8494
  scene: l,
@@ -8348,7 +8496,7 @@ function ko(i) {
8348
8496
  onRefresh: () => {
8349
8497
  i.three.refreshScene(l.name);
8350
8498
  },
8351
- children: /* @__PURE__ */ u.jsx(bs, { child: l, scene: l, three: i.three })
8499
+ children: /* @__PURE__ */ u.jsx(Ss, { child: l, scene: l, three: i.three })
8352
8500
  },
8353
8501
  Math.random()
8354
8502
  )
@@ -8358,7 +8506,7 @@ function ko(i) {
8358
8506
  for (let d = 0; d < e.length; d++)
8359
8507
  if (l.uuid === e[d].uuid) {
8360
8508
  e[d] = l, t[d] = /* @__PURE__ */ u.jsx(
8361
- oi,
8509
+ li,
8362
8510
  {
8363
8511
  label: `Scene: ${l.name}`,
8364
8512
  scene: l,
@@ -8366,7 +8514,7 @@ function ko(i) {
8366
8514
  onRefresh: () => {
8367
8515
  i.three.refreshScene(l.name);
8368
8516
  },
8369
- children: /* @__PURE__ */ u.jsx(bs, { child: l, scene: l, three: i.three })
8517
+ children: /* @__PURE__ */ u.jsx(Ss, { child: l, scene: l, three: i.three })
8370
8518
  },
8371
8519
  Math.random()
8372
8520
  ), n(Date.now());
@@ -8430,7 +8578,7 @@ function al(i) {
8430
8578
  }
8431
8579
  d.material.needsUpdate = !0;
8432
8580
  };
8433
- c.value.src.length > 0 ? _n(c.value.src).then((m) => {
8581
+ c.value.src.length > 0 ? En(c.value.src).then((m) => {
8434
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);
8435
8583
  }) : p(null);
8436
8584
  }
@@ -8438,9 +8586,9 @@ function al(i) {
8438
8586
  const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
8439
8587
  if (f !== void 0)
8440
8588
  try {
8441
- p !== void 0 ? pr(f, p)[c](d) : f[c](d);
8442
- } catch (w) {
8443
- 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);
8444
8592
  }
8445
8593
  };
8446
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), () => {
@@ -8456,76 +8604,127 @@ function Uo(i) {
8456
8604
  ] });
8457
8605
  }
8458
8606
  function rl(i) {
8459
- return /* @__PURE__ */ u.jsx(Uo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
8460
- /* @__PURE__ */ u.jsx(
8461
- me,
8462
- {
8463
- three: i.three,
8464
- scenes: i.scenes,
8465
- onSceneResize: i.onSceneResize,
8466
- onSceneSet: i.onSceneSet,
8467
- onSceneUpdate: i.onSceneUpdate
8468
- }
8469
- ),
8470
- /* @__PURE__ */ u.jsx(ko, { three: i.three })
8471
- ] }) });
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
+ );
8472
8669
  }
8473
8670
  export {
8474
- oi as Accordion,
8475
- Qo as Application,
8476
- Wi as BaseRemote,
8477
- yn as ChildObject,
8478
- bs as ContainerObject,
8479
- br as Draggable,
8480
- yr as DraggableItem,
8481
- Er as Dropdown,
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,
8482
8681
  Cr as DropdownItem,
8483
8682
  Uo as Editor,
8484
- qo as ElementProxy,
8485
- or as ElementProxyReceiver,
8486
- ti as ExportTexture,
8683
+ Xo as ElementProxy,
8684
+ cr as ElementProxyReceiver,
8685
+ ii as ExportTexture,
8487
8686
  Io as Inspector,
8488
8687
  me as MultiView,
8489
- vn as NavButton,
8490
- Ko as ProxyManager,
8491
- Ga as QualityType,
8688
+ Cn as NavButton,
8689
+ $o as ProxyManager,
8690
+ qa as QualityType,
8492
8691
  Jo as RemoteComponents,
8493
8692
  nl as RemoteController,
8494
8693
  il as RemoteTheatre,
8495
8694
  sl as RemoteThree,
8496
8695
  al as SceneInspector,
8497
8696
  ko as SidePanel,
8498
- Bs as Spline,
8697
+ Gs as Spline,
8499
8698
  Mo as SplineEditor,
8500
8699
  rl as ThreeEditor,
8501
8700
  A as ToolEvents,
8502
8701
  ge as Transform,
8503
- $o as WebworkerEventHandlers,
8504
- ri as capitalize,
8702
+ Go as WebworkerEventHandlers,
8703
+ oi as capitalize,
8505
8704
  $e as clamp,
8506
- ps as colorToHex,
8507
- Fa as copyToClipboard,
8508
- Wo as cubicBezier,
8705
+ gs as colorToHex,
8706
+ Ya as copyToClipboard,
8707
+ Zo as cubicBezier,
8509
8708
  tl as customizeTheatreElements,
8510
- Vo as damp,
8709
+ Bo as damp,
8511
8710
  D as debugDispatcher,
8512
- zo as defaultTheatreCallback,
8513
- Ho as detectSettings,
8711
+ Fo as defaultTheatreCallback,
8712
+ zo as detectSettings,
8514
8713
  He as dispose,
8515
- Qa as disposeMaterial,
8516
- Go as disposeTexture,
8517
- Bo as distance,
8518
- ji as hierarchyUUID,
8519
- Ha as isColor,
8520
- Yo 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,
8521
8720
  Nt as mix,
8522
- ai as noop,
8523
- ki as normalize,
8524
- Xo as parseModelLite,
8525
- za as randomID,
8526
- _s as resetThreeObjects,
8721
+ ri as noop,
8722
+ ji as normalize,
8723
+ Wo as parseModelLite,
8724
+ Ba as randomID,
8725
+ Es as resetThreeObjects,
8527
8726
  Pe as round,
8528
- Zo as roundTo,
8727
+ Vo as roundTo,
8529
8728
  el as theatreEditorApp,
8530
- Ui as totalThreeObjects
8729
+ Ni as totalThreeObjects
8531
8730
  };