@tomorrowevening/hermes 0.0.131 → 0.0.132
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.cjs.js +14 -14
- package/dist/hermes.es.js +539 -523
- package/package.json +1 -1
package/dist/hermes.es.js
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
import {
|
2
|
-
import
|
3
|
-
import { Reorder as
|
1
|
+
import { Texture as Ii, OrthographicCamera as Li, Scene as Xs, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as Ke, Mesh as M, LinearSRGBColorSpace as jt, ObjectLoader as Xn, AnimationMixer as $n, AnimationClip as qn, EventDispatcher as Bi, RepeatWrapping as cs, Color as et, ColorManagement as mt, WebGLRenderTarget as Kn, FrontSide as Qn, BackSide as $s, DoubleSide as Vi, NoBlending as Jn, NormalBlending as ea, AdditiveBlending as ta, SubtractiveBlending as ia, MultiplyBlending as sa, CustomBlending as na, AddEquation as aa, SubtractEquation as ra, ReverseSubtractEquation as oa, MinEquation as la, MaxEquation as ca, ZeroFactor as qs, OneFactor as Ks, SrcColorFactor as Qs, OneMinusSrcColorFactor as Js, SrcAlphaFactor as en, OneMinusSrcAlphaFactor as tn, DstAlphaFactor as sn, OneMinusDstAlphaFactor as nn, DstColorFactor as an, OneMinusDstColorFactor as rn, SrcAlphaSaturateFactor as ha, ConstantColorFactor as on, OneMinusConstantColorFactor as ln, ConstantAlphaFactor as cn, OneMinusConstantAlphaFactor as hn, Line as Ie, LineBasicMaterial as Zi, Ray as da, Plane as ua, MathUtils as pa, Vector3 as P, Controls as dn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as ki, Vector2 as pe, ShaderMaterial as un, GLSL3 as ma, PlaneGeometry as pn, Raycaster as ni, Euler as mn, Matrix4 as ci, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Zt, SphereGeometry as fn, TorusGeometry as Et, CatmullRomCurve3 as hs, Group as fa, AxesHelper as ga, MeshDepthMaterial as _a, MeshNormalMaterial as va, WebGLRenderer as ya, PerspectiveCamera as ds, CameraHelper as ba, SkinnedMesh as Ea, SpotLightHelper as Ca, PointLightHelper as Sa, HemisphereLightHelper as wa, DirectionalLightHelper as xa, Clock as Oa, Vector4 as Ta, Box3 as Ma, Sphere as Pa, SkeletonHelper as Aa, SRGBColorSpace as us, NoToneMapping as ps, NoColorSpace as Da, LinearToneMapping as Ra, ReinhardToneMapping as Ia, CineonToneMapping as La, ACESFilmicToneMapping as ka, AgXToneMapping as Ua, NeutralToneMapping as ja, CustomToneMapping as Na } from "three";
|
2
|
+
import gn, { useState as Z, useRef as J, useEffect as tt, useMemo as Ut, Component as Ft, createRef as Ve, forwardRef as Fa } from "react";
|
3
|
+
import { Reorder as _n } from "framer-motion";
|
4
4
|
const ai = () => {
|
5
|
-
},
|
5
|
+
}, Ho = () => {
|
6
6
|
};
|
7
7
|
function ri(i) {
|
8
8
|
return i.substring(0, 1).toUpperCase() + i.substring(1);
|
9
9
|
}
|
10
|
-
function
|
10
|
+
function za(i) {
|
11
11
|
const e = JSON.stringify(i);
|
12
12
|
return navigator.clipboard.writeText(e), e;
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function Ha() {
|
15
15
|
return Math.round(Math.random() * 1e6).toString();
|
16
16
|
}
|
17
|
-
function
|
17
|
+
function Ya(i) {
|
18
18
|
return i.r !== void 0 && i.g !== void 0 && i.b !== void 0;
|
19
19
|
}
|
20
|
-
function
|
20
|
+
function ms(i) {
|
21
21
|
const e = Math.round(i.r * 255), t = Math.round(i.g * 255), s = Math.round(i.b * 255), n = (c) => {
|
22
22
|
const l = c.toString(16);
|
23
23
|
return l.length === 1 ? "0" + l : l;
|
@@ -49,17 +49,17 @@ function vi(i, e, t, s) {
|
|
49
49
|
c((s = s.apply(i, e || [])).next());
|
50
50
|
});
|
51
51
|
}
|
52
|
-
const
|
53
|
-
function
|
52
|
+
const Ba = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
|
53
|
+
function fs(i) {
|
54
54
|
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
55
|
}
|
56
|
-
const
|
57
|
-
if (
|
56
|
+
const vn = typeof window > "u", Le = (() => {
|
57
|
+
if (vn)
|
58
58
|
return;
|
59
59
|
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
60
|
return { isIpad: n, isMobile: /android/i.test(i) || s || n, isSafari12: /Version\/12.+Safari/.test(i), isFirefox: /Firefox/.test(i) };
|
61
61
|
})();
|
62
|
-
function
|
62
|
+
function Va(i, e, t) {
|
63
63
|
if (!t)
|
64
64
|
return [e];
|
65
65
|
const s = function(l) {
|
@@ -94,13 +94,13 @@ function Ba(i, e, t) {
|
|
94
94
|
let c;
|
95
95
|
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
96
|
}
|
97
|
-
class
|
97
|
+
class gs extends Error {
|
98
98
|
constructor(e) {
|
99
99
|
super(e), Object.setPrototypeOf(this, new.target.prototype);
|
100
100
|
}
|
101
101
|
}
|
102
|
-
const yi = [],
|
103
|
-
function
|
102
|
+
const yi = [], _s = [];
|
103
|
+
function Za(i, e) {
|
104
104
|
if (i === e)
|
105
105
|
return 0;
|
106
106
|
const t = i;
|
@@ -115,30 +115,30 @@ function Va(i, e) {
|
|
115
115
|
return n;
|
116
116
|
let o, c, l = 0, d = 0, p = 0;
|
117
117
|
for (; d < s; )
|
118
|
-
|
118
|
+
_s[d] = i.charCodeAt(r + d), yi[d] = ++d;
|
119
119
|
for (; p < n; )
|
120
120
|
for (a = e.charCodeAt(r + p), o = p++, l = p, d = 0; d < s; d++)
|
121
|
-
c = a ===
|
121
|
+
c = a === _s[d] ? o : o + 1, o = yi[d], l = yi[d] = o > l ? c > l ? l + 1 : c : c > o ? o + 1 : c;
|
122
122
|
return l;
|
123
123
|
}
|
124
|
-
function
|
124
|
+
function Wa(i) {
|
125
125
|
return i != null;
|
126
126
|
}
|
127
|
-
const
|
127
|
+
const Ga = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: s, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: a = "https://unpkg.com/detect-gpu@5.0.57/dist/benchmarks" } = {}) => vi(void 0, void 0, void 0, function* () {
|
128
128
|
const r = {};
|
129
|
-
if (
|
129
|
+
if (vn)
|
130
130
|
return { tier: 0, type: "SSR" };
|
131
131
|
const { isIpad: o = !!Le?.isIpad, isMobile: c = !!Le?.isMobile, screenSize: l = window.screen, loadBenchmarks: d = (S) => vi(void 0, void 0, void 0, function* () {
|
132
132
|
const O = yield fetch(`${a}/${S}`).then((I) => I.json());
|
133
133
|
if (parseInt(O.shift().split(".")[0], 10) < 4)
|
134
|
-
throw new
|
134
|
+
throw new gs("Detect GPU benchmark data is out of date. Please update to version 4x");
|
135
135
|
return O;
|
136
136
|
}) } = t;
|
137
137
|
let { renderer: p } = t;
|
138
138
|
const m = (S, O, I, U, R) => ({ device: R, fps: U, gpu: I, isMobile: c, tier: S, type: O });
|
139
139
|
let f, w = "";
|
140
140
|
if (p)
|
141
|
-
p =
|
141
|
+
p = fs(p), f = [p];
|
142
142
|
else {
|
143
143
|
const S = s || function(I, U = !1) {
|
144
144
|
const R = { alpha: !1, antialias: !1, depth: !1, failIfMajorPerformanceCaveat: U, powerPreference: "high-performance", stencil: !1 };
|
@@ -151,8 +151,8 @@ const Wa = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
151
151
|
const O = Le?.isFirefox ? null : S.getExtension("WEBGL_debug_renderer_info");
|
152
152
|
if (p = O ? S.getParameter(O.UNMASKED_RENDERER_WEBGL) : S.getParameter(S.RENDERER), !p)
|
153
153
|
return m(1, "FALLBACK");
|
154
|
-
w = p, p =
|
155
|
-
return U === "apple gpu" ?
|
154
|
+
w = p, p = fs(p), f = function(I, U, R) {
|
155
|
+
return U === "apple gpu" ? Va(I, U, R) : [U];
|
156
156
|
}(S, p, c);
|
157
157
|
}
|
158
158
|
const v = (yield Promise.all(f.map(function(S) {
|
@@ -171,7 +171,7 @@ const Wa = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
171
171
|
try {
|
172
172
|
B = yield R;
|
173
173
|
} catch (W) {
|
174
|
-
if (W instanceof
|
174
|
+
if (W instanceof gs)
|
175
175
|
throw W;
|
176
176
|
return;
|
177
177
|
}
|
@@ -186,7 +186,7 @@ const Wa = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
186
186
|
if (re === 0)
|
187
187
|
return;
|
188
188
|
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,
|
189
|
+
let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, Za(K, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ee = Number.MAX_VALUE;
|
190
190
|
const { devicePixelRatio: ne } = window, je = l.width * ne * l.height * ne;
|
191
191
|
for (const W of he) {
|
192
192
|
const [le, Te] = W, yt = le * Te, it = Math.abs(je - yt);
|
@@ -197,9 +197,9 @@ const Wa = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
197
197
|
const [, , Ne, Fe] = $;
|
198
198
|
return [Ee, Ne, Ue, Fe];
|
199
199
|
});
|
200
|
-
}))).filter(
|
200
|
+
}))).filter(Wa).sort(([S = Number.MAX_VALUE, O], [I = Number.MAX_VALUE, U]) => S === I ? O - U : S - I);
|
201
201
|
if (!v.length) {
|
202
|
-
const S =
|
202
|
+
const S = Ba.find((O) => p.includes(O));
|
203
203
|
return S ? m(0, "BLOCKLISTED", S) : m(1, "FALLBACK", `${p} (${w})`);
|
204
204
|
}
|
205
205
|
const [, x, g, y] = v[0];
|
@@ -211,10 +211,10 @@ const Wa = ({ mobileTiers: i = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
211
211
|
x >= E[S] && (C = S);
|
212
212
|
return m(C, "BENCHMARK", g, x, y);
|
213
213
|
});
|
214
|
-
var
|
215
|
-
function
|
214
|
+
var Xa = /* @__PURE__ */ ((i) => (i[i.High = 0] = "High", i[i.Medium = 1] = "Medium", i[i.Low = 2] = "Low", i))(Xa || {});
|
215
|
+
function Yo(i) {
|
216
216
|
return new Promise((e) => {
|
217
|
-
|
217
|
+
Ga().then((t) => {
|
218
218
|
let s = !1;
|
219
219
|
const n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
220
220
|
if (s = "transferControlToOffscreen" in i, n) {
|
@@ -238,61 +238,77 @@ function Ho(i) {
|
|
238
238
|
function $e(i, e, t) {
|
239
239
|
return Math.min(e, Math.max(i, t));
|
240
240
|
}
|
241
|
-
function
|
241
|
+
function Ui(i, e, t) {
|
242
242
|
return (t - i) / (e - i);
|
243
243
|
}
|
244
244
|
function Nt(i, e, t) {
|
245
245
|
return i * (1 - t) + e * t;
|
246
246
|
}
|
247
|
-
function
|
248
|
-
return Nt(t, s,
|
247
|
+
function Bo(i, e, t, s, n) {
|
248
|
+
return Nt(t, s, Ui(i, e, n));
|
249
249
|
}
|
250
|
-
function
|
250
|
+
function Vo(i, e) {
|
251
251
|
const t = i - e;
|
252
252
|
return Math.sqrt(t * t);
|
253
253
|
}
|
254
254
|
function Pe(i, e = 1) {
|
255
255
|
return Number(i.toFixed(e));
|
256
256
|
}
|
257
|
-
function
|
257
|
+
function Zo(i, e, t, s) {
|
258
258
|
return Nt(i, e, 1 - Math.exp(-t * s));
|
259
259
|
}
|
260
|
-
function
|
260
|
+
function Wo(i, e = 1) {
|
261
261
|
return Number(i.toFixed(e));
|
262
262
|
}
|
263
|
-
function
|
263
|
+
function $a(i, e, t, s) {
|
264
264
|
return i === e && t === s;
|
265
265
|
}
|
266
|
-
function
|
266
|
+
function qa(i, e, t, s) {
|
267
267
|
return 1 / (3 * e * i * i + 2 * t * i + s);
|
268
268
|
}
|
269
|
-
function
|
269
|
+
function Ka(i, e, t, s, n) {
|
270
270
|
return e * (i * i * i) + t * (i * i) + s * i + n;
|
271
271
|
}
|
272
|
-
function
|
272
|
+
function Qa(i, e, t, s, n) {
|
273
273
|
const a = i * i;
|
274
274
|
return e * (a * i) + t * a + s * i + n;
|
275
275
|
}
|
276
|
-
function
|
276
|
+
function Go(i, e, t, s, n) {
|
277
277
|
if (i <= 0)
|
278
278
|
return 0;
|
279
279
|
if (i >= 1)
|
280
280
|
return 1;
|
281
|
-
if (
|
281
|
+
if ($a(e, t, s, n))
|
282
282
|
return i;
|
283
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;
|
284
284
|
let S = i;
|
285
285
|
for (let O = 0; O < 5; O++) {
|
286
|
-
const I =
|
287
|
-
let U =
|
286
|
+
const I = Ka(S, f, w, v, x);
|
287
|
+
let U = qa(S, f, w, v);
|
288
288
|
U === 1 / 0 && (U = i), S -= (I - i) * U, S = Math.min(Math.max(S, 0), 1);
|
289
289
|
}
|
290
|
-
return
|
290
|
+
return Qa(S, g, y, E, C);
|
291
291
|
}
|
292
|
-
const
|
292
|
+
const vs = (i) => {
|
293
293
|
i?.dispose();
|
294
|
-
},
|
295
|
-
|
294
|
+
}, Ja = (i) => {
|
295
|
+
if (i)
|
296
|
+
if (Array.isArray(i))
|
297
|
+
i.forEach((e) => e.dispose());
|
298
|
+
else {
|
299
|
+
for (const e in i) {
|
300
|
+
const t = i[e];
|
301
|
+
t !== null && t instanceof Ii && vs(t);
|
302
|
+
}
|
303
|
+
if (i.isShaderMaterial === !0) {
|
304
|
+
const e = i;
|
305
|
+
for (const t in e.uniforms) {
|
306
|
+
const s = e.uniforms[t];
|
307
|
+
s.value !== null && s.value instanceof Ii && vs(s.value);
|
308
|
+
}
|
309
|
+
}
|
310
|
+
i.dispose();
|
311
|
+
}
|
296
312
|
}, He = (i) => {
|
297
313
|
if (i) {
|
298
314
|
for (; i.children.length > 0; ) {
|
@@ -301,19 +317,19 @@ const Go = (i) => {
|
|
301
317
|
}
|
302
318
|
if (i.parent && i.parent.remove(i), i.isMesh) {
|
303
319
|
const e = i;
|
304
|
-
e.geometry?.dispose(),
|
320
|
+
e.geometry?.dispose(), Ja(e.material);
|
305
321
|
}
|
306
322
|
i.dispose !== void 0 && i.dispose();
|
307
323
|
}
|
308
324
|
};
|
309
|
-
let
|
310
|
-
const
|
311
|
-
|
312
|
-
},
|
325
|
+
let ji = 0;
|
326
|
+
const ys = () => {
|
327
|
+
ji = 0;
|
328
|
+
}, Ni = (i) => {
|
313
329
|
if (!i)
|
314
330
|
return;
|
315
331
|
let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
|
316
|
-
if (e.length === 0 && (e = `obj_${
|
332
|
+
if (e.length === 0 && (e = `obj_${ji}`, ji++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
|
317
333
|
const t = i;
|
318
334
|
if (Array.isArray(t.material))
|
319
335
|
t.material.forEach((s, n) => {
|
@@ -324,7 +340,7 @@ const _s = () => {
|
|
324
340
|
s.uuid = `${e}.material`;
|
325
341
|
}
|
326
342
|
}
|
327
|
-
i.children.forEach((t) =>
|
343
|
+
i.children.forEach((t) => Ni(t));
|
328
344
|
};
|
329
345
|
class ti {
|
330
346
|
static renderer;
|
@@ -355,7 +371,7 @@ class ti {
|
|
355
371
|
}
|
356
372
|
static renderToCanvas(e) {
|
357
373
|
if (this.material === null) {
|
358
|
-
this.camera = new
|
374
|
+
this.camera = new Li(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Xs(), this.material = new Je();
|
359
375
|
const t = new _t();
|
360
376
|
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
377
|
const s = new M(t, this.material);
|
@@ -372,11 +388,11 @@ class ti {
|
|
372
388
|
}
|
373
389
|
function Xo(i) {
|
374
390
|
return new Promise((e) => {
|
375
|
-
const t = new
|
391
|
+
const t = new Xn();
|
376
392
|
t.parseAsync(i.scene).then((s) => {
|
377
|
-
const n = new
|
393
|
+
const n = new $n(s);
|
378
394
|
if (i.animations.length > 0) {
|
379
|
-
const r = i.animations.map((c) =>
|
395
|
+
const r = i.animations.map((c) => qn.parse(c));
|
380
396
|
n.clipAction(r[0]).play(), n.getRoot().animations = i.animations, n.getRoot().mixer = n;
|
381
397
|
}
|
382
398
|
const a = [];
|
@@ -392,7 +408,7 @@ function Xo(i) {
|
|
392
408
|
});
|
393
409
|
});
|
394
410
|
}
|
395
|
-
const at =
|
411
|
+
const at = Wi([
|
396
412
|
"ctrlKey",
|
397
413
|
"metaKey",
|
398
414
|
"shiftKey",
|
@@ -403,32 +419,32 @@ const at = Zi([
|
|
403
419
|
"clientY",
|
404
420
|
"pageX",
|
405
421
|
"pageY"
|
406
|
-
]),
|
422
|
+
]), er = Wi([
|
407
423
|
"clientX",
|
408
424
|
"clientY",
|
409
425
|
"deltaX",
|
410
426
|
"deltaY",
|
411
427
|
"deltaMode"
|
412
|
-
]),
|
428
|
+
]), tr = Wi([
|
413
429
|
"ctrlKey",
|
414
430
|
"metaKey",
|
415
431
|
"shiftKey",
|
416
432
|
"keyCode"
|
417
433
|
]);
|
418
|
-
function
|
419
|
-
i.preventDefault(),
|
434
|
+
function ir(i, e) {
|
435
|
+
i.preventDefault(), er(i, e);
|
420
436
|
}
|
421
|
-
function
|
437
|
+
function sr(i) {
|
422
438
|
i.preventDefault();
|
423
439
|
}
|
424
|
-
function
|
440
|
+
function nr(i, e, t) {
|
425
441
|
for (const s of e)
|
426
442
|
t[s] = i[s];
|
427
443
|
}
|
428
|
-
function
|
444
|
+
function Wi(i) {
|
429
445
|
return function(t, s) {
|
430
446
|
const n = { type: t.type };
|
431
|
-
|
447
|
+
nr(t, i, n), s(n);
|
432
448
|
};
|
433
449
|
}
|
434
450
|
function bi(i, e) {
|
@@ -442,7 +458,7 @@ function bi(i, e) {
|
|
442
458
|
}
|
443
459
|
e(s);
|
444
460
|
}
|
445
|
-
const
|
461
|
+
const ar = {
|
446
462
|
37: !0,
|
447
463
|
// left
|
448
464
|
38: !0,
|
@@ -452,12 +468,12 @@ const nr = {
|
|
452
468
|
40: !0
|
453
469
|
// down
|
454
470
|
};
|
455
|
-
function
|
471
|
+
function rr(i, e) {
|
456
472
|
const { keyCode: t } = i;
|
457
|
-
|
473
|
+
ar[t] && (i.preventDefault(), tr(i, e));
|
458
474
|
}
|
459
475
|
const $o = {
|
460
|
-
contextmenu:
|
476
|
+
contextmenu: sr,
|
461
477
|
mousedown: at,
|
462
478
|
mousemove: at,
|
463
479
|
mouseup: at,
|
@@ -467,15 +483,15 @@ const $o = {
|
|
467
483
|
touchstart: bi,
|
468
484
|
touchmove: bi,
|
469
485
|
touchend: bi,
|
470
|
-
wheel:
|
471
|
-
keydown:
|
486
|
+
wheel: ir,
|
487
|
+
keydown: rr
|
472
488
|
};
|
473
|
-
let
|
489
|
+
let or = 0;
|
474
490
|
class qo {
|
475
491
|
id;
|
476
492
|
worker;
|
477
493
|
constructor(e, t, s) {
|
478
|
-
this.id =
|
494
|
+
this.id = or++, this.worker = t;
|
479
495
|
const n = (r) => {
|
480
496
|
this.worker.postMessage({
|
481
497
|
type: "event",
|
@@ -503,7 +519,7 @@ class qo {
|
|
503
519
|
window.addEventListener("resize", a), a();
|
504
520
|
}
|
505
521
|
}
|
506
|
-
class
|
522
|
+
class lr extends Bi {
|
507
523
|
style = {};
|
508
524
|
left = 0;
|
509
525
|
top = 0;
|
@@ -563,7 +579,7 @@ class Ko {
|
|
563
579
|
this.handleEvent = this.handleEvent.bind(this);
|
564
580
|
}
|
565
581
|
makeProxy(e) {
|
566
|
-
const { id: t } = e, s = new
|
582
|
+
const { id: t } = e, s = new lr();
|
567
583
|
this.targets[t] = s;
|
568
584
|
}
|
569
585
|
getProxy(e) {
|
@@ -632,8 +648,8 @@ class Qo {
|
|
632
648
|
}
|
633
649
|
}
|
634
650
|
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
|
636
|
-
class
|
651
|
+
const D = new Bi();
|
652
|
+
class Gi {
|
637
653
|
app;
|
638
654
|
constructor(e) {
|
639
655
|
this.app = e;
|
@@ -645,7 +661,7 @@ class Wi {
|
|
645
661
|
handleEditor(e, t, s) {
|
646
662
|
}
|
647
663
|
}
|
648
|
-
class Jo extends
|
664
|
+
class Jo extends Gi {
|
649
665
|
selectDropdown(e, t) {
|
650
666
|
this.app.send({
|
651
667
|
event: "selectComponent",
|
@@ -746,15 +762,15 @@ function tl() {
|
|
746
762
|
}
|
747
763
|
}, 1e3);
|
748
764
|
}
|
749
|
-
function
|
765
|
+
function cr(i, e, t, s, n) {
|
750
766
|
const a = 1 - i;
|
751
767
|
return a * a * a * e + 3 * a * a * i * t + 3 * a * i * i * s + i * i * i * n;
|
752
768
|
}
|
753
|
-
function
|
769
|
+
function hr(i, e, t) {
|
754
770
|
if (i.type !== "bezier" || i.handles.length !== 4)
|
755
771
|
throw new Error("Invalid keyframe data for Bézier interpolation.");
|
756
772
|
const [s, n] = i.handles, a = (t - i.position) / (e.position - i.position);
|
757
|
-
return
|
773
|
+
return cr(
|
758
774
|
a,
|
759
775
|
i.value,
|
760
776
|
i.value + s,
|
@@ -762,7 +778,7 @@ function cr(i, e, t) {
|
|
762
778
|
e.value
|
763
779
|
);
|
764
780
|
}
|
765
|
-
class il extends
|
781
|
+
class il extends Gi {
|
766
782
|
project;
|
767
783
|
sheets = /* @__PURE__ */ new Map();
|
768
784
|
sheetObjects = /* @__PURE__ */ new Map();
|
@@ -829,7 +845,7 @@ class il extends Wi {
|
|
829
845
|
if (this.app.editor) {
|
830
846
|
for (const w in m) {
|
831
847
|
const v = m[w];
|
832
|
-
typeof v == "object" &&
|
848
|
+
typeof v == "object" && Ya(v) && (m[w] = {
|
833
849
|
r: v.r,
|
834
850
|
g: v.g,
|
835
851
|
b: v.b,
|
@@ -874,7 +890,7 @@ class il extends Wi {
|
|
874
890
|
if (!g || x.position === v)
|
875
891
|
return x.value;
|
876
892
|
if (x.type === "bezier")
|
877
|
-
return
|
893
|
+
return hr(x, g, v);
|
878
894
|
const y = (v - x.position) / (g.position - x.position);
|
879
895
|
return x.value + y * (g.value - x.value);
|
880
896
|
};
|
@@ -971,7 +987,7 @@ class il extends Wi {
|
|
971
987
|
this.studio?.ui.hide();
|
972
988
|
}
|
973
989
|
}
|
974
|
-
function
|
990
|
+
function dr(i) {
|
975
991
|
if (i.name === "cameras")
|
976
992
|
return "camera";
|
977
993
|
if (i.name === "interactive")
|
@@ -996,7 +1012,7 @@ function pt(i) {
|
|
996
1012
|
e.children.push(pt(t));
|
997
1013
|
}), e;
|
998
1014
|
}
|
999
|
-
function
|
1015
|
+
function ur(i) {
|
1000
1016
|
const e = {};
|
1001
1017
|
for (const t in i) {
|
1002
1018
|
const s = i[t].value;
|
@@ -1012,7 +1028,7 @@ function dr(i) {
|
|
1012
1028
|
}
|
1013
1029
|
return e;
|
1014
1030
|
}
|
1015
|
-
function
|
1031
|
+
function pr(i) {
|
1016
1032
|
switch (i) {
|
1017
1033
|
case "blendSrcAlpha":
|
1018
1034
|
case "blendDstAlpha":
|
@@ -1027,7 +1043,7 @@ function ur(i) {
|
|
1027
1043
|
function rt(i) {
|
1028
1044
|
const e = {};
|
1029
1045
|
for (const t in i) {
|
1030
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
1046
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || pr(t))
|
1031
1047
|
continue;
|
1032
1048
|
const s = typeof i[t], n = i[t];
|
1033
1049
|
switch (s) {
|
@@ -1041,7 +1057,7 @@ function rt(i) {
|
|
1041
1057
|
src: ti.renderToBlob(n),
|
1042
1058
|
offset: [n.offset.x, n.offset.y],
|
1043
1059
|
repeat: [n.repeat.x, n.repeat.y]
|
1044
|
-
} : t === "uniforms" && (e[t] =
|
1060
|
+
} : t === "uniforms" && (e[t] = ur(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
1045
1061
|
src: "",
|
1046
1062
|
offset: [0, 0],
|
1047
1063
|
repeat: [1, 1]
|
@@ -1132,7 +1148,7 @@ function Ei(i) {
|
|
1132
1148
|
});
|
1133
1149
|
return e;
|
1134
1150
|
}
|
1135
|
-
function
|
1151
|
+
function mr(i, e) {
|
1136
1152
|
const t = e.split(".");
|
1137
1153
|
switch (t.length) {
|
1138
1154
|
case 1:
|
@@ -1149,7 +1165,7 @@ function pr(i, e) {
|
|
1149
1165
|
return i[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
1150
1166
|
}
|
1151
1167
|
}
|
1152
|
-
function
|
1168
|
+
function fr(i, e) {
|
1153
1169
|
for (const t in e)
|
1154
1170
|
i[t] = e[t];
|
1155
1171
|
}
|
@@ -1194,19 +1210,19 @@ function se(i, e, t) {
|
|
1194
1210
|
r = i[s[0]][s[1]][s[2]][s[3]][s[4]];
|
1195
1211
|
break;
|
1196
1212
|
}
|
1197
|
-
r != null &&
|
1213
|
+
r != null && fr(r, t);
|
1198
1214
|
}
|
1199
1215
|
}
|
1200
|
-
function
|
1216
|
+
function yn(i) {
|
1201
1217
|
return new Promise((e, t) => {
|
1202
1218
|
const s = new Image();
|
1203
1219
|
s.onload = () => {
|
1204
|
-
const n = new
|
1205
|
-
n.wrapS =
|
1220
|
+
const n = new Ii(s);
|
1221
|
+
n.wrapS = cs, n.wrapT = cs, n.needsUpdate = !0, e(n);
|
1206
1222
|
}, s.onerror = t, s.src = i;
|
1207
1223
|
});
|
1208
1224
|
}
|
1209
|
-
class sl extends
|
1225
|
+
class sl extends Gi {
|
1210
1226
|
canvas = null;
|
1211
1227
|
// Canvas or OffscreenCanvas
|
1212
1228
|
inputElement = null;
|
@@ -1351,7 +1367,7 @@ class sl extends Wi {
|
|
1351
1367
|
addScene(e) {
|
1352
1368
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
|
1353
1369
|
return;
|
1354
|
-
|
1370
|
+
ys(), Ni(e);
|
1355
1371
|
const t = pt(e);
|
1356
1372
|
this.app.send({
|
1357
1373
|
event: "addScene",
|
@@ -1394,7 +1410,7 @@ class sl extends Wi {
|
|
1394
1410
|
setScene(e) {
|
1395
1411
|
if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
|
1396
1412
|
return;
|
1397
|
-
this.renderer !== void 0 && (ti.renderer = this.renderer),
|
1413
|
+
this.renderer !== void 0 && (ti.renderer = this.renderer), ys(), Ni(e);
|
1398
1414
|
const t = pt(e);
|
1399
1415
|
this.app.send({
|
1400
1416
|
event: "setScene",
|
@@ -1492,7 +1508,7 @@ class sl extends Wi {
|
|
1492
1508
|
}
|
1493
1509
|
// Renderer
|
1494
1510
|
addRT(e, t) {
|
1495
|
-
const s = new
|
1511
|
+
const s = new Kn(32, 32, t);
|
1496
1512
|
s.texture.name = e, this.renderTargets.set(e, s);
|
1497
1513
|
}
|
1498
1514
|
resize(e, t) {
|
@@ -1516,7 +1532,7 @@ class sl extends Wi {
|
|
1516
1532
|
return this.renderer !== void 0 ? this.renderer.domElement.height / this.dpr : 0;
|
1517
1533
|
}
|
1518
1534
|
}
|
1519
|
-
var
|
1535
|
+
var Fi = { exports: {} }, Ct = {};
|
1520
1536
|
/**
|
1521
1537
|
* @license React
|
1522
1538
|
* react-jsx-runtime.production.min.js
|
@@ -1526,12 +1542,12 @@ var Ni = { exports: {} }, Ct = {};
|
|
1526
1542
|
* This source code is licensed under the MIT license found in the
|
1527
1543
|
* LICENSE file in the root directory of this source tree.
|
1528
1544
|
*/
|
1529
|
-
var
|
1530
|
-
function
|
1531
|
-
if (
|
1545
|
+
var bs;
|
1546
|
+
function gr() {
|
1547
|
+
if (bs)
|
1532
1548
|
return Ct;
|
1533
|
-
|
1534
|
-
var i =
|
1549
|
+
bs = 1;
|
1550
|
+
var i = gn, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
1535
1551
|
function r(o, c, l) {
|
1536
1552
|
var d, p = {}, m = null, f = null;
|
1537
1553
|
l !== void 0 && (m = "" + l), c.key !== void 0 && (m = "" + c.key), c.ref !== void 0 && (f = c.ref);
|
@@ -1554,10 +1570,10 @@ var St = {};
|
|
1554
1570
|
* This source code is licensed under the MIT license found in the
|
1555
1571
|
* LICENSE file in the root directory of this source tree.
|
1556
1572
|
*/
|
1557
|
-
var
|
1558
|
-
function
|
1559
|
-
return
|
1560
|
-
var i =
|
1573
|
+
var Es;
|
1574
|
+
function _r() {
|
1575
|
+
return Es || (Es = 1, process.env.NODE_ENV !== "production" && function() {
|
1576
|
+
var i = gn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), w = Symbol.iterator, v = "@@iterator";
|
1561
1577
|
function x(h) {
|
1562
1578
|
if (h === null || typeof h != "object")
|
1563
1579
|
return null;
|
@@ -1724,10 +1740,10 @@ function gr() {
|
|
1724
1740
|
}
|
1725
1741
|
var ui = !1, Ht;
|
1726
1742
|
{
|
1727
|
-
var
|
1728
|
-
Ht = new
|
1743
|
+
var xn = typeof WeakMap == "function" ? WeakMap : Map;
|
1744
|
+
Ht = new xn();
|
1729
1745
|
}
|
1730
|
-
function
|
1746
|
+
function $i(h, b) {
|
1731
1747
|
if (!h || ui)
|
1732
1748
|
return "";
|
1733
1749
|
{
|
@@ -1795,13 +1811,13 @@ function gr() {
|
|
1795
1811
|
} finally {
|
1796
1812
|
ui = !1, yt.current = G, Te(), Error.prepareStackTrace = H;
|
1797
1813
|
}
|
1798
|
-
var nt = h ? h.displayName || h.name : "",
|
1799
|
-
return typeof h == "function" && Ht.set(h,
|
1814
|
+
var nt = h ? h.displayName || h.name : "", ls = nt ? zt(nt) : "";
|
1815
|
+
return typeof h == "function" && Ht.set(h, ls), ls;
|
1800
1816
|
}
|
1801
|
-
function
|
1802
|
-
return
|
1817
|
+
function On(h, b, T) {
|
1818
|
+
return $i(h, !1);
|
1803
1819
|
}
|
1804
|
-
function
|
1820
|
+
function Tn(h) {
|
1805
1821
|
var b = h.prototype;
|
1806
1822
|
return !!(b && b.isReactComponent);
|
1807
1823
|
}
|
@@ -1809,7 +1825,7 @@ function gr() {
|
|
1809
1825
|
if (h == null)
|
1810
1826
|
return "";
|
1811
1827
|
if (typeof h == "function")
|
1812
|
-
return
|
1828
|
+
return $i(h, Tn(h));
|
1813
1829
|
if (typeof h == "string")
|
1814
1830
|
return zt(h);
|
1815
1831
|
switch (h) {
|
@@ -1821,7 +1837,7 @@ function gr() {
|
|
1821
1837
|
if (typeof h == "object")
|
1822
1838
|
switch (h.$$typeof) {
|
1823
1839
|
case c:
|
1824
|
-
return
|
1840
|
+
return On(h.render);
|
1825
1841
|
case p:
|
1826
1842
|
return Yt(h.type, b, T);
|
1827
1843
|
case m: {
|
@@ -1834,15 +1850,15 @@ function gr() {
|
|
1834
1850
|
}
|
1835
1851
|
return "";
|
1836
1852
|
}
|
1837
|
-
var Bt = Object.prototype.hasOwnProperty,
|
1853
|
+
var Bt = Object.prototype.hasOwnProperty, qi = {}, Ki = g.ReactDebugCurrentFrame;
|
1838
1854
|
function Vt(h) {
|
1839
1855
|
if (h) {
|
1840
1856
|
var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
|
1841
|
-
|
1857
|
+
Ki.setExtraStackFrame(T);
|
1842
1858
|
} else
|
1843
|
-
|
1859
|
+
Ki.setExtraStackFrame(null);
|
1844
1860
|
}
|
1845
|
-
function
|
1861
|
+
function Mn(h, b, T, k, H) {
|
1846
1862
|
{
|
1847
1863
|
var G = Function.call.bind(Bt);
|
1848
1864
|
for (var F in h)
|
@@ -1857,42 +1873,42 @@ function gr() {
|
|
1857
1873
|
} catch (ie) {
|
1858
1874
|
N = ie;
|
1859
1875
|
}
|
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
|
1876
|
+
N && !(N instanceof Error) && (Vt(H), y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", k || "React class", T, F, typeof N), Vt(null)), N instanceof Error && !(N.message in qi) && (qi[N.message] = !0, Vt(H), y("Failed %s type: %s", T, N.message), Vt(null));
|
1861
1877
|
}
|
1862
1878
|
}
|
1863
1879
|
}
|
1864
|
-
var
|
1880
|
+
var Pn = Array.isArray;
|
1865
1881
|
function pi(h) {
|
1866
|
-
return
|
1882
|
+
return Pn(h);
|
1867
1883
|
}
|
1868
|
-
function
|
1884
|
+
function An(h) {
|
1869
1885
|
{
|
1870
1886
|
var b = typeof Symbol == "function" && Symbol.toStringTag, T = b && h[Symbol.toStringTag] || h.constructor.name || "Object";
|
1871
1887
|
return T;
|
1872
1888
|
}
|
1873
1889
|
}
|
1874
|
-
function
|
1890
|
+
function Dn(h) {
|
1875
1891
|
try {
|
1876
|
-
return
|
1892
|
+
return Qi(h), !1;
|
1877
1893
|
} catch {
|
1878
1894
|
return !0;
|
1879
1895
|
}
|
1880
1896
|
}
|
1881
|
-
function
|
1897
|
+
function Qi(h) {
|
1882
1898
|
return "" + h;
|
1883
1899
|
}
|
1884
|
-
function
|
1885
|
-
if (
|
1886
|
-
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
1900
|
+
function Ji(h) {
|
1901
|
+
if (Dn(h))
|
1902
|
+
return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", An(h)), Qi(h);
|
1887
1903
|
}
|
1888
|
-
var bt = g.ReactCurrentOwner,
|
1904
|
+
var bt = g.ReactCurrentOwner, Rn = {
|
1889
1905
|
key: !0,
|
1890
1906
|
ref: !0,
|
1891
1907
|
__self: !0,
|
1892
1908
|
__source: !0
|
1893
|
-
},
|
1909
|
+
}, es, ts, mi;
|
1894
1910
|
mi = {};
|
1895
|
-
function
|
1911
|
+
function In(h) {
|
1896
1912
|
if (Bt.call(h, "ref")) {
|
1897
1913
|
var b = Object.getOwnPropertyDescriptor(h, "ref").get;
|
1898
1914
|
if (b && b.isReactWarning)
|
@@ -1900,7 +1916,7 @@ function gr() {
|
|
1900
1916
|
}
|
1901
1917
|
return h.ref !== void 0;
|
1902
1918
|
}
|
1903
|
-
function
|
1919
|
+
function Ln(h) {
|
1904
1920
|
if (Bt.call(h, "key")) {
|
1905
1921
|
var b = Object.getOwnPropertyDescriptor(h, "key").get;
|
1906
1922
|
if (b && b.isReactWarning)
|
@@ -1908,16 +1924,16 @@ function gr() {
|
|
1908
1924
|
}
|
1909
1925
|
return h.key !== void 0;
|
1910
1926
|
}
|
1911
|
-
function
|
1927
|
+
function kn(h, b) {
|
1912
1928
|
if (typeof h.ref == "string" && bt.current && b && bt.current.stateNode !== b) {
|
1913
1929
|
var T = re(bt.current.type);
|
1914
1930
|
mi[T] || (y('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', re(bt.current.type), h.ref), mi[T] = !0);
|
1915
1931
|
}
|
1916
1932
|
}
|
1917
|
-
function
|
1933
|
+
function Un(h, b) {
|
1918
1934
|
{
|
1919
1935
|
var T = function() {
|
1920
|
-
|
1936
|
+
es || (es = !0, y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
1921
1937
|
};
|
1922
1938
|
T.isReactWarning = !0, Object.defineProperty(h, "key", {
|
1923
1939
|
get: T,
|
@@ -1925,10 +1941,10 @@ function gr() {
|
|
1925
1941
|
});
|
1926
1942
|
}
|
1927
1943
|
}
|
1928
|
-
function
|
1944
|
+
function jn(h, b) {
|
1929
1945
|
{
|
1930
1946
|
var T = function() {
|
1931
|
-
|
1947
|
+
ts || (ts = !0, y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", b));
|
1932
1948
|
};
|
1933
1949
|
T.isReactWarning = !0, Object.defineProperty(h, "ref", {
|
1934
1950
|
get: T,
|
@@ -1936,7 +1952,7 @@ function gr() {
|
|
1936
1952
|
});
|
1937
1953
|
}
|
1938
1954
|
}
|
1939
|
-
var
|
1955
|
+
var Nn = function(h, b, T, k, H, G, F) {
|
1940
1956
|
var N = {
|
1941
1957
|
// This tag allows us to uniquely identify this as a React Element
|
1942
1958
|
$$typeof: e,
|
@@ -1965,12 +1981,12 @@ function gr() {
|
|
1965
1981
|
value: H
|
1966
1982
|
}), Object.freeze && (Object.freeze(N.props), Object.freeze(N)), N;
|
1967
1983
|
};
|
1968
|
-
function
|
1984
|
+
function Fn(h, b, T, k, H) {
|
1969
1985
|
{
|
1970
1986
|
var G, F = {}, N = null, fe = null;
|
1971
|
-
T !== void 0 && (
|
1987
|
+
T !== void 0 && (Ji(T), N = "" + T), Ln(b) && (Ji(b.key), N = "" + b.key), In(b) && (fe = b.ref, kn(b, H));
|
1972
1988
|
for (G in b)
|
1973
|
-
Bt.call(b, G) && !
|
1989
|
+
Bt.call(b, G) && !Rn.hasOwnProperty(G) && (F[G] = b[G]);
|
1974
1990
|
if (h && h.defaultProps) {
|
1975
1991
|
var ie = h.defaultProps;
|
1976
1992
|
for (G in ie)
|
@@ -1978,25 +1994,25 @@ function gr() {
|
|
1978
1994
|
}
|
1979
1995
|
if (N || fe) {
|
1980
1996
|
var ae = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
1981
|
-
N &&
|
1997
|
+
N && Un(F, ae), fe && jn(F, ae);
|
1982
1998
|
}
|
1983
|
-
return
|
1999
|
+
return Nn(h, N, fe, H, k, bt.current, F);
|
1984
2000
|
}
|
1985
2001
|
}
|
1986
|
-
var fi = g.ReactCurrentOwner,
|
2002
|
+
var fi = g.ReactCurrentOwner, is = g.ReactDebugCurrentFrame;
|
1987
2003
|
function st(h) {
|
1988
2004
|
if (h) {
|
1989
2005
|
var b = h._owner, T = Yt(h.type, h._source, b ? b.type : null);
|
1990
|
-
|
2006
|
+
is.setExtraStackFrame(T);
|
1991
2007
|
} else
|
1992
|
-
|
2008
|
+
is.setExtraStackFrame(null);
|
1993
2009
|
}
|
1994
2010
|
var gi;
|
1995
2011
|
gi = !1;
|
1996
2012
|
function _i(h) {
|
1997
2013
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
1998
2014
|
}
|
1999
|
-
function
|
2015
|
+
function ss() {
|
2000
2016
|
{
|
2001
2017
|
if (fi.current) {
|
2002
2018
|
var h = re(fi.current.type);
|
@@ -2008,7 +2024,7 @@ Check the render method of \`` + h + "`.";
|
|
2008
2024
|
return "";
|
2009
2025
|
}
|
2010
2026
|
}
|
2011
|
-
function
|
2027
|
+
function zn(h) {
|
2012
2028
|
{
|
2013
2029
|
if (h !== void 0) {
|
2014
2030
|
var b = h.fileName.replace(/^.*[\\\/]/, ""), T = h.lineNumber;
|
@@ -2019,10 +2035,10 @@ Check your code at ` + b + ":" + T + ".";
|
|
2019
2035
|
return "";
|
2020
2036
|
}
|
2021
2037
|
}
|
2022
|
-
var
|
2023
|
-
function
|
2038
|
+
var ns = {};
|
2039
|
+
function Hn(h) {
|
2024
2040
|
{
|
2025
|
-
var b =
|
2041
|
+
var b = ss();
|
2026
2042
|
if (!b) {
|
2027
2043
|
var T = typeof h == "string" ? h : h.displayName || h.name;
|
2028
2044
|
T && (b = `
|
@@ -2032,27 +2048,27 @@ Check the top-level render call using <` + T + ">.");
|
|
2032
2048
|
return b;
|
2033
2049
|
}
|
2034
2050
|
}
|
2035
|
-
function
|
2051
|
+
function as(h, b) {
|
2036
2052
|
{
|
2037
2053
|
if (!h._store || h._store.validated || h.key != null)
|
2038
2054
|
return;
|
2039
2055
|
h._store.validated = !0;
|
2040
|
-
var T =
|
2041
|
-
if (
|
2056
|
+
var T = Hn(b);
|
2057
|
+
if (ns[T])
|
2042
2058
|
return;
|
2043
|
-
|
2059
|
+
ns[T] = !0;
|
2044
2060
|
var k = "";
|
2045
2061
|
h && h._owner && h._owner !== fi.current && (k = " It was passed a child from " + re(h._owner.type) + "."), st(h), y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, k), st(null);
|
2046
2062
|
}
|
2047
2063
|
}
|
2048
|
-
function
|
2064
|
+
function rs(h, b) {
|
2049
2065
|
{
|
2050
2066
|
if (typeof h != "object")
|
2051
2067
|
return;
|
2052
2068
|
if (pi(h))
|
2053
2069
|
for (var T = 0; T < h.length; T++) {
|
2054
2070
|
var k = h[T];
|
2055
|
-
_i(k) &&
|
2071
|
+
_i(k) && as(k, b);
|
2056
2072
|
}
|
2057
2073
|
else if (_i(h))
|
2058
2074
|
h._store && (h._store.validated = !0);
|
@@ -2060,11 +2076,11 @@ Check the top-level render call using <` + T + ">.");
|
|
2060
2076
|
var H = x(h);
|
2061
2077
|
if (typeof H == "function" && H !== h.entries)
|
2062
2078
|
for (var G = H.call(h), F; !(F = G.next()).done; )
|
2063
|
-
_i(F.value) &&
|
2079
|
+
_i(F.value) && as(F.value, b);
|
2064
2080
|
}
|
2065
2081
|
}
|
2066
2082
|
}
|
2067
|
-
function
|
2083
|
+
function Yn(h) {
|
2068
2084
|
{
|
2069
2085
|
var b = h.type;
|
2070
2086
|
if (b == null || typeof b == "string")
|
@@ -2080,7 +2096,7 @@ Check the top-level render call using <` + T + ">.");
|
|
2080
2096
|
return;
|
2081
2097
|
if (T) {
|
2082
2098
|
var k = re(b);
|
2083
|
-
|
2099
|
+
Mn(T, h.props, "prop", k, h);
|
2084
2100
|
} else if (b.PropTypes !== void 0 && !gi) {
|
2085
2101
|
gi = !0;
|
2086
2102
|
var H = re(b);
|
@@ -2089,7 +2105,7 @@ Check the top-level render call using <` + T + ">.");
|
|
2089
2105
|
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
2106
|
}
|
2091
2107
|
}
|
2092
|
-
function
|
2108
|
+
function Bn(h) {
|
2093
2109
|
{
|
2094
2110
|
for (var b = Object.keys(h.props), T = 0; T < b.length; T++) {
|
2095
2111
|
var k = b[T];
|
@@ -2101,18 +2117,18 @@ Check the top-level render call using <` + T + ">.");
|
|
2101
2117
|
h.ref !== null && (st(h), y("Invalid attribute `ref` supplied to `React.Fragment`."), st(null));
|
2102
2118
|
}
|
2103
2119
|
}
|
2104
|
-
function
|
2120
|
+
function os(h, b, T, k, H, G) {
|
2105
2121
|
{
|
2106
2122
|
var F = B(h);
|
2107
2123
|
if (!F) {
|
2108
2124
|
var N = "";
|
2109
2125
|
(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 =
|
2111
|
-
fe ? N += fe : N +=
|
2126
|
+
var fe = zn(H);
|
2127
|
+
fe ? N += fe : N += ss();
|
2112
2128
|
var ie;
|
2113
2129
|
h === null ? ie = "null" : pi(h) ? ie = "array" : h !== void 0 && h.$$typeof === e ? (ie = "<" + (re(h.type) || "Unknown") + " />", N = " Did you accidentally export a JSX literal instead of a component?") : ie = typeof h, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ie, N);
|
2114
2130
|
}
|
2115
|
-
var ae =
|
2131
|
+
var ae = Fn(h, b, T, H, G);
|
2116
2132
|
if (ae == null)
|
2117
2133
|
return ae;
|
2118
2134
|
if (F) {
|
@@ -2121,36 +2137,36 @@ Check the top-level render call using <` + T + ">.");
|
|
2121
2137
|
if (k)
|
2122
2138
|
if (pi(we)) {
|
2123
2139
|
for (var nt = 0; nt < we.length; nt++)
|
2124
|
-
|
2140
|
+
rs(we[nt], h);
|
2125
2141
|
Object.freeze && Object.freeze(we);
|
2126
2142
|
} else
|
2127
2143
|
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
2144
|
else
|
2129
|
-
|
2145
|
+
rs(we, h);
|
2130
2146
|
}
|
2131
|
-
return h === s ?
|
2147
|
+
return h === s ? Bn(ae) : Yn(ae), ae;
|
2132
2148
|
}
|
2133
2149
|
}
|
2134
|
-
function
|
2135
|
-
return
|
2150
|
+
function Vn(h, b, T) {
|
2151
|
+
return os(h, b, T, !0);
|
2136
2152
|
}
|
2137
|
-
function
|
2138
|
-
return
|
2153
|
+
function Zn(h, b, T) {
|
2154
|
+
return os(h, b, T, !1);
|
2139
2155
|
}
|
2140
|
-
var
|
2141
|
-
St.Fragment = s, St.jsx =
|
2156
|
+
var Wn = Zn, Gn = Vn;
|
2157
|
+
St.Fragment = s, St.jsx = Wn, St.jsxs = Gn;
|
2142
2158
|
}()), St;
|
2143
2159
|
}
|
2144
|
-
process.env.NODE_ENV === "production" ?
|
2145
|
-
var u =
|
2146
|
-
function
|
2160
|
+
process.env.NODE_ENV === "production" ? Fi.exports = gr() : Fi.exports = _r();
|
2161
|
+
var u = Fi.exports;
|
2162
|
+
function bn(i) {
|
2147
2163
|
return i.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ u.jsx("button", { children: i.title });
|
2148
2164
|
}
|
2149
|
-
const
|
2165
|
+
const vr = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
2150
2166
|
/* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
2151
2167
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
2152
2168
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
2153
|
-
] }),
|
2169
|
+
] }), yr = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
|
2154
2170
|
"path",
|
2155
2171
|
{
|
2156
2172
|
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,16 +2174,16 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
|
|
2158
2174
|
C11,8.22,10.74,8,10.43,8z`
|
2159
2175
|
}
|
2160
2176
|
) });
|
2161
|
-
function
|
2162
|
-
return /* @__PURE__ */ u.jsx(
|
2163
|
-
|
2177
|
+
function br(i) {
|
2178
|
+
return /* @__PURE__ */ u.jsx(_n.Item, { value: i.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
2179
|
+
yr,
|
2164
2180
|
/* @__PURE__ */ u.jsx("span", { children: i.title }),
|
2165
2181
|
/* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
|
2166
2182
|
i.onDelete(i.index);
|
2167
|
-
}, children:
|
2183
|
+
}, children: vr })
|
2168
2184
|
] }) }, i.title);
|
2169
2185
|
}
|
2170
|
-
function
|
2186
|
+
function Er(i) {
|
2171
2187
|
const [e, t] = Z(!1), [s, n] = Z(i.options), a = (l) => {
|
2172
2188
|
i.onDragComplete(l), n(l);
|
2173
2189
|
}, r = (l) => {
|
@@ -2175,18 +2191,18 @@ function br(i) {
|
|
2175
2191
|
d.splice(l, 1), a(d);
|
2176
2192
|
}, o = [];
|
2177
2193
|
s.forEach((l, d) => {
|
2178
|
-
o.push(/* @__PURE__ */ u.jsx(
|
2194
|
+
o.push(/* @__PURE__ */ u.jsx(br, { index: d, title: l, onDelete: r }, l));
|
2179
2195
|
});
|
2180
2196
|
let c = "dropdown draggable";
|
2181
2197
|
return i.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
2182
|
-
/* @__PURE__ */ u.jsx(
|
2183
|
-
/* @__PURE__ */ u.jsx(
|
2198
|
+
/* @__PURE__ */ u.jsx(bn, { title: i.title }),
|
2199
|
+
/* @__PURE__ */ u.jsx(_n.Group, { axis: "y", values: s, onReorder: a, style: { visibility: e ? "visible" : "hidden" }, children: o })
|
2184
2200
|
] });
|
2185
2201
|
}
|
2186
|
-
function
|
2202
|
+
function Cr(i) {
|
2187
2203
|
const [e, t] = Z(!1), s = [];
|
2188
2204
|
i.options.map((a, r) => {
|
2189
|
-
i.onSelect !== void 0 && (a.onSelect = i.onSelect), s.push(/* @__PURE__ */ u.jsx(
|
2205
|
+
i.onSelect !== void 0 && (a.onSelect = i.onSelect), s.push(/* @__PURE__ */ u.jsx(Sr, { option: a }, r));
|
2190
2206
|
});
|
2191
2207
|
let n = "dropdown";
|
2192
2208
|
return i.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
|
@@ -2196,7 +2212,7 @@ function Er(i) {
|
|
2196
2212
|
onMouseEnter: () => t(!0),
|
2197
2213
|
onMouseLeave: () => t(!1),
|
2198
2214
|
children: [
|
2199
|
-
/* @__PURE__ */ u.jsx(
|
2215
|
+
/* @__PURE__ */ u.jsx(bn, { title: i.title }),
|
2200
2216
|
/* @__PURE__ */ u.jsx(
|
2201
2217
|
"ul",
|
2202
2218
|
{
|
@@ -2208,13 +2224,13 @@ function Er(i) {
|
|
2208
2224
|
}
|
2209
2225
|
);
|
2210
2226
|
}
|
2211
|
-
function
|
2227
|
+
function Sr(i) {
|
2212
2228
|
const { option: e } = i, [t, s] = Z("");
|
2213
2229
|
let n;
|
2214
2230
|
switch (e.type) {
|
2215
2231
|
case "draggable":
|
2216
2232
|
n = /* @__PURE__ */ u.jsx(
|
2217
|
-
|
2233
|
+
Er,
|
2218
2234
|
{
|
2219
2235
|
title: e.title,
|
2220
2236
|
options: e.value,
|
@@ -2227,7 +2243,7 @@ function Cr(i) {
|
|
2227
2243
|
break;
|
2228
2244
|
case "dropdown":
|
2229
2245
|
n = /* @__PURE__ */ u.jsx(
|
2230
|
-
|
2246
|
+
Cr,
|
2231
2247
|
{
|
2232
2248
|
title: e.title,
|
2233
2249
|
options: e.value,
|
@@ -2248,7 +2264,7 @@ function Cr(i) {
|
|
2248
2264
|
);
|
2249
2265
|
break;
|
2250
2266
|
}
|
2251
|
-
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n },
|
2267
|
+
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, Ha());
|
2252
2268
|
}
|
2253
2269
|
function nl(i, e, t) {
|
2254
2270
|
function s(a) {
|
@@ -2306,10 +2322,10 @@ function oi(i) {
|
|
2306
2322
|
/* @__PURE__ */ u.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: i.children }) }, Math.random())
|
2307
2323
|
] });
|
2308
2324
|
}
|
2309
|
-
function
|
2325
|
+
function En(i) {
|
2310
2326
|
const e = J(null), [t, s] = Z(!1), n = i.child !== void 0 && i.child.children.length > 0, a = [];
|
2311
2327
|
return i.child !== void 0 && i.child.children.length > 0 && i.child.children.map((r, o) => {
|
2312
|
-
a.push(/* @__PURE__ */ u.jsx(
|
2328
|
+
a.push(/* @__PURE__ */ u.jsx(En, { child: r, three: i.three }, o));
|
2313
2329
|
}), tt(() => {
|
2314
2330
|
if (i.child) {
|
2315
2331
|
const r = i.three.getScene(i.child.uuid);
|
@@ -2364,15 +2380,15 @@ function yn(i) {
|
|
2364
2380
|
}
|
2365
2381
|
}
|
2366
2382
|
),
|
2367
|
-
/* @__PURE__ */ u.jsx("div", { className: `icon ${
|
2383
|
+
/* @__PURE__ */ u.jsx("div", { className: `icon ${dr(i.child)}` })
|
2368
2384
|
] }),
|
2369
2385
|
/* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: a }) })
|
2370
2386
|
] }, Math.random()) });
|
2371
2387
|
}
|
2372
|
-
function
|
2388
|
+
function Cs(i) {
|
2373
2389
|
const e = [];
|
2374
2390
|
return i.child?.children.map((t, s) => {
|
2375
|
-
e.push(/* @__PURE__ */ u.jsx(
|
2391
|
+
e.push(/* @__PURE__ */ u.jsx(En, { child: t, scene: i.scene, three: i.three }, s));
|
2376
2392
|
}), /* @__PURE__ */ u.jsx("div", { className: `scene ${i.class !== void 0 ? i.class : ""}`, children: e });
|
2377
2393
|
}
|
2378
2394
|
function Rt(i) {
|
@@ -2466,7 +2482,7 @@ function Qe(i) {
|
|
2466
2482
|
] })
|
2467
2483
|
] });
|
2468
2484
|
}
|
2469
|
-
function
|
2485
|
+
function wr(i) {
|
2470
2486
|
const e = J(null), t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), o = J(null), c = J(null), l = J(null), d = J(null), [p, m] = Z(i.value.x), [f, w] = Z(i.value.y), [v, x] = Z({
|
2471
2487
|
min: Math.min(i.min, Math.min(i.value.x, i.value.y)),
|
2472
2488
|
max: Math.max(i.max, Math.max(i.value.x, i.value.y))
|
@@ -2531,7 +2547,7 @@ function Sr(i) {
|
|
2531
2547
|
x({ min: v.min, max: R }), p > R && m($e(v.min, R, p)), f > R && w($e(v.min, R, f));
|
2532
2548
|
}
|
2533
2549
|
tt(() => {
|
2534
|
-
r.current.style.left = `${
|
2550
|
+
r.current.style.left = `${Ui(v.min, v.max, p) * 100}%`, r.current.style.top = `${(1 - Ui(v.min, v.max, f)) * 100}%`;
|
2535
2551
|
}, [v, p, f]);
|
2536
2552
|
const U = i.step !== void 0 ? i.step : 0.01;
|
2537
2553
|
return /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
|
@@ -2610,20 +2626,20 @@ function Sr(i) {
|
|
2610
2626
|
] })
|
2611
2627
|
] });
|
2612
2628
|
}
|
2613
|
-
const
|
2629
|
+
const xr = Math.PI / 180, Or = 180 / Math.PI;
|
2614
2630
|
function ot(i, e, t, s, n) {
|
2615
2631
|
return s + (i - e) * (n - s) / (t - e);
|
2616
2632
|
}
|
2617
2633
|
function lt(i, e, t) {
|
2618
2634
|
return (1 - t) * i + t * e;
|
2619
2635
|
}
|
2620
|
-
function
|
2621
|
-
return i * wr;
|
2622
|
-
}
|
2623
|
-
function Or(i) {
|
2636
|
+
function zi(i) {
|
2624
2637
|
return i * xr;
|
2625
2638
|
}
|
2626
|
-
function
|
2639
|
+
function Tr(i) {
|
2640
|
+
return i * Or;
|
2641
|
+
}
|
2642
|
+
function Ss(i) {
|
2627
2643
|
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
2644
|
if (t) {
|
2629
2645
|
const r = Ut(() => i.value, []);
|
@@ -2635,13 +2651,13 @@ function Es(i) {
|
|
2635
2651
|
/* @__PURE__ */ u.jsx(
|
2636
2652
|
Qe,
|
2637
2653
|
{
|
2638
|
-
value:
|
2654
|
+
value: Tr(r[c]),
|
2639
2655
|
type: "number",
|
2640
2656
|
prop: c,
|
2641
2657
|
step: 0.1,
|
2642
2658
|
labelRef: l,
|
2643
2659
|
onChange: (d, p) => {
|
2644
|
-
r[d] =
|
2660
|
+
r[d] = zi(p), i.onChange({ target: { value: r } });
|
2645
2661
|
}
|
2646
2662
|
}
|
2647
2663
|
)
|
@@ -2698,7 +2714,7 @@ function Es(i) {
|
|
2698
2714
|
}
|
2699
2715
|
return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: a }, Math.random().toString());
|
2700
2716
|
}
|
2701
|
-
function
|
2717
|
+
function Mr(i) {
|
2702
2718
|
const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
|
2703
2719
|
if (e) {
|
2704
2720
|
const n = Ut(() => i.value, []), a = (o, c) => {
|
@@ -2750,10 +2766,10 @@ function Tr(i) {
|
|
2750
2766
|
}
|
2751
2767
|
return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: s });
|
2752
2768
|
}
|
2753
|
-
function
|
2769
|
+
function Pr(i) {
|
2754
2770
|
return !(i === "defaultAttributeValues" || i === "forceSinglePass" || i === "linecap" || i === "linejoin" || i === "linewidth" || i === "normalMapType" || i === "precision" || i === "shadowSide" || i === "uniformsGroups" || i === "uniformsNeedUpdate" || i === "userData" || i === "version" || i === "wireframeLinecap" || i === "wireframeLinejoin" || i === "wireframeLinewidth" || i.slice(0, 4) === "clip" || i.slice(0, 7) === "polygon" || i.slice(0, 7) === "stencil" || i.slice(0, 2) === "is");
|
2755
2771
|
}
|
2756
|
-
function
|
2772
|
+
function Ar(i) {
|
2757
2773
|
switch (i) {
|
2758
2774
|
case "Alpha Map":
|
2759
2775
|
return "alphaMap";
|
@@ -3005,11 +3021,11 @@ function hi(i) {
|
|
3005
3021
|
}
|
3006
3022
|
return i;
|
3007
3023
|
}
|
3008
|
-
function
|
3024
|
+
function Cn(i) {
|
3009
3025
|
const e = i.toLowerCase();
|
3010
3026
|
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
3027
|
}
|
3012
|
-
function
|
3028
|
+
function Dr() {
|
3013
3029
|
const i = document.createElement("input");
|
3014
3030
|
return i.type = "file", new Promise((e, t) => {
|
3015
3031
|
i.addEventListener("change", function() {
|
@@ -3024,188 +3040,188 @@ function Ar() {
|
|
3024
3040
|
}), i.click();
|
3025
3041
|
});
|
3026
3042
|
}
|
3027
|
-
const
|
3043
|
+
const Rr = [
|
3028
3044
|
{
|
3029
3045
|
title: "Front",
|
3030
|
-
value:
|
3046
|
+
value: Qn
|
3031
3047
|
},
|
3032
3048
|
{
|
3033
3049
|
title: "Back",
|
3034
|
-
value:
|
3050
|
+
value: $s
|
3035
3051
|
},
|
3036
3052
|
{
|
3037
3053
|
title: "Double",
|
3038
|
-
value:
|
3054
|
+
value: Vi
|
3039
3055
|
}
|
3040
|
-
],
|
3056
|
+
], Ir = [
|
3041
3057
|
{
|
3042
3058
|
title: "No Blending",
|
3043
|
-
value:
|
3059
|
+
value: Jn
|
3044
3060
|
},
|
3045
3061
|
{
|
3046
3062
|
title: "Normal",
|
3047
|
-
value:
|
3063
|
+
value: ea
|
3048
3064
|
},
|
3049
3065
|
{
|
3050
3066
|
title: "Additive",
|
3051
|
-
value:
|
3067
|
+
value: ta
|
3052
3068
|
},
|
3053
3069
|
{
|
3054
3070
|
title: "Subtractive",
|
3055
|
-
value:
|
3071
|
+
value: ia
|
3056
3072
|
},
|
3057
3073
|
{
|
3058
3074
|
title: "Multiply",
|
3059
|
-
value:
|
3075
|
+
value: sa
|
3060
3076
|
},
|
3061
3077
|
{
|
3062
3078
|
title: "Custom",
|
3063
|
-
value:
|
3079
|
+
value: na
|
3064
3080
|
}
|
3065
|
-
],
|
3081
|
+
], Lr = [
|
3066
3082
|
{
|
3067
3083
|
title: "Add",
|
3068
|
-
value:
|
3084
|
+
value: aa
|
3069
3085
|
},
|
3070
3086
|
{
|
3071
3087
|
title: "Subtract",
|
3072
|
-
value:
|
3088
|
+
value: ra
|
3073
3089
|
},
|
3074
3090
|
{
|
3075
3091
|
title: "Reverse Subtract",
|
3076
|
-
value:
|
3092
|
+
value: oa
|
3077
3093
|
},
|
3078
3094
|
{
|
3079
3095
|
title: "Min",
|
3080
|
-
value:
|
3096
|
+
value: la
|
3081
3097
|
},
|
3082
3098
|
{
|
3083
3099
|
title: "Max",
|
3084
|
-
value:
|
3100
|
+
value: ca
|
3085
3101
|
}
|
3086
|
-
],
|
3102
|
+
], kr = [
|
3087
3103
|
{
|
3088
3104
|
title: "Zero",
|
3089
|
-
value:
|
3105
|
+
value: qs
|
3090
3106
|
},
|
3091
3107
|
{
|
3092
3108
|
title: "One",
|
3093
|
-
value:
|
3109
|
+
value: Ks
|
3094
3110
|
},
|
3095
3111
|
{
|
3096
3112
|
title: "Src Color",
|
3097
|
-
value:
|
3113
|
+
value: Qs
|
3098
3114
|
},
|
3099
3115
|
{
|
3100
3116
|
title: "One Minus Src Color",
|
3101
|
-
value:
|
3117
|
+
value: Js
|
3102
3118
|
},
|
3103
3119
|
{
|
3104
3120
|
title: "Src Alpha",
|
3105
|
-
value:
|
3121
|
+
value: en
|
3106
3122
|
},
|
3107
3123
|
{
|
3108
3124
|
title: "One Minus Src Alpha",
|
3109
|
-
value:
|
3125
|
+
value: tn
|
3110
3126
|
},
|
3111
3127
|
{
|
3112
3128
|
title: "Dst Alpha",
|
3113
|
-
value:
|
3129
|
+
value: sn
|
3114
3130
|
},
|
3115
3131
|
{
|
3116
3132
|
title: "One Minus Dst Alpha",
|
3117
|
-
value:
|
3133
|
+
value: nn
|
3118
3134
|
},
|
3119
3135
|
{
|
3120
3136
|
title: "Dst Color",
|
3121
|
-
value:
|
3137
|
+
value: an
|
3122
3138
|
},
|
3123
3139
|
{
|
3124
3140
|
title: "One Minus Dst Color",
|
3125
|
-
value:
|
3141
|
+
value: rn
|
3126
3142
|
},
|
3127
3143
|
{
|
3128
3144
|
title: "Src Alpha Saturate",
|
3129
|
-
value:
|
3145
|
+
value: ha
|
3130
3146
|
},
|
3131
3147
|
{
|
3132
3148
|
title: "Constant Color",
|
3133
|
-
value:
|
3149
|
+
value: on
|
3134
3150
|
},
|
3135
3151
|
{
|
3136
3152
|
title: "One Minus Constant Color",
|
3137
|
-
value:
|
3153
|
+
value: ln
|
3138
3154
|
},
|
3139
3155
|
{
|
3140
3156
|
title: "Constant Alpha",
|
3141
|
-
value:
|
3157
|
+
value: cn
|
3142
3158
|
},
|
3143
3159
|
{
|
3144
3160
|
title: "One Minus Constant Alpha",
|
3145
|
-
value:
|
3161
|
+
value: hn
|
3146
3162
|
}
|
3147
|
-
],
|
3163
|
+
], Ur = [
|
3148
3164
|
{
|
3149
3165
|
title: "Zero",
|
3150
|
-
value:
|
3166
|
+
value: qs
|
3151
3167
|
},
|
3152
3168
|
{
|
3153
3169
|
title: "One",
|
3154
|
-
value:
|
3170
|
+
value: Ks
|
3155
3171
|
},
|
3156
3172
|
{
|
3157
3173
|
title: "Src Color",
|
3158
|
-
value:
|
3174
|
+
value: Qs
|
3159
3175
|
},
|
3160
3176
|
{
|
3161
3177
|
title: "One Minus Src Color",
|
3162
|
-
value:
|
3178
|
+
value: Js
|
3163
3179
|
},
|
3164
3180
|
{
|
3165
3181
|
title: "Src Alpha",
|
3166
|
-
value:
|
3182
|
+
value: en
|
3167
3183
|
},
|
3168
3184
|
{
|
3169
3185
|
title: "One Minus Src Alpha",
|
3170
|
-
value:
|
3186
|
+
value: tn
|
3171
3187
|
},
|
3172
3188
|
{
|
3173
3189
|
title: "Dst Alpha",
|
3174
|
-
value:
|
3190
|
+
value: sn
|
3175
3191
|
},
|
3176
3192
|
{
|
3177
3193
|
title: "One Minus Dst Alpha",
|
3178
|
-
value:
|
3194
|
+
value: nn
|
3179
3195
|
},
|
3180
3196
|
{
|
3181
3197
|
title: "Dst Color",
|
3182
|
-
value:
|
3198
|
+
value: an
|
3183
3199
|
},
|
3184
3200
|
{
|
3185
3201
|
title: "One Minus Dst Color",
|
3186
|
-
value:
|
3202
|
+
value: rn
|
3187
3203
|
},
|
3188
3204
|
{
|
3189
3205
|
title: "Constant Color",
|
3190
|
-
value:
|
3206
|
+
value: on
|
3191
3207
|
},
|
3192
3208
|
{
|
3193
3209
|
title: "One Minus Constant Color",
|
3194
|
-
value:
|
3210
|
+
value: ln
|
3195
3211
|
},
|
3196
3212
|
{
|
3197
3213
|
title: "Constant Alpha",
|
3198
|
-
value:
|
3214
|
+
value: cn
|
3199
3215
|
},
|
3200
3216
|
{
|
3201
3217
|
title: "One Minus Constant Alpha",
|
3202
|
-
value:
|
3218
|
+
value: hn
|
3203
3219
|
}
|
3204
3220
|
];
|
3205
3221
|
function wt(i, e) {
|
3206
3222
|
i.needsUpdate = !0, i.type = "option", i.options = e;
|
3207
3223
|
}
|
3208
|
-
function
|
3224
|
+
function jr(i, e, t, s) {
|
3209
3225
|
return {
|
3210
3226
|
type: "boolean",
|
3211
3227
|
title: hi(i),
|
@@ -3222,7 +3238,7 @@ function Ur(i, e, t, s) {
|
|
3222
3238
|
}
|
3223
3239
|
};
|
3224
3240
|
}
|
3225
|
-
function
|
3241
|
+
function Nr(i, e, t, s) {
|
3226
3242
|
const n = {
|
3227
3243
|
type: "number",
|
3228
3244
|
title: hi(i),
|
@@ -3243,24 +3259,24 @@ function jr(i, e, t, s) {
|
|
3243
3259
|
};
|
3244
3260
|
switch (i) {
|
3245
3261
|
case "blending":
|
3246
|
-
wt(n,
|
3262
|
+
wt(n, Ir);
|
3247
3263
|
break;
|
3248
3264
|
case "blendDst":
|
3249
|
-
wt(n,
|
3265
|
+
wt(n, Ur);
|
3250
3266
|
break;
|
3251
3267
|
case "blendEquation":
|
3252
|
-
wt(n,
|
3268
|
+
wt(n, Lr);
|
3253
3269
|
break;
|
3254
3270
|
case "blendSrc":
|
3255
|
-
wt(n,
|
3271
|
+
wt(n, kr);
|
3256
3272
|
break;
|
3257
3273
|
case "side":
|
3258
|
-
wt(n,
|
3274
|
+
wt(n, Rr);
|
3259
3275
|
break;
|
3260
3276
|
}
|
3261
|
-
return
|
3277
|
+
return Cn(i) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
3262
3278
|
}
|
3263
|
-
function
|
3279
|
+
function Fr(i, e, t, s) {
|
3264
3280
|
const n = {
|
3265
3281
|
type: "string",
|
3266
3282
|
title: hi(i),
|
@@ -3296,16 +3312,16 @@ function Nr(i, e, t, s) {
|
|
3296
3312
|
}
|
3297
3313
|
}), n;
|
3298
3314
|
}
|
3299
|
-
function
|
3315
|
+
function zr(i) {
|
3300
3316
|
return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
|
3301
3317
|
}
|
3302
|
-
function
|
3318
|
+
function Hr(i) {
|
3303
3319
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w === void 0;
|
3304
3320
|
}
|
3305
|
-
function
|
3321
|
+
function Yr(i) {
|
3306
3322
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
|
3307
3323
|
}
|
3308
|
-
function
|
3324
|
+
function Hi(i) {
|
3309
3325
|
i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
|
3310
3326
|
}
|
3311
3327
|
function It(i, e, t, s, n = "", a = !1) {
|
@@ -3343,7 +3359,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3343
3359
|
}
|
3344
3360
|
}
|
3345
3361
|
};
|
3346
|
-
return
|
3362
|
+
return Cn(r) && (l.type = "range", l.min = 0, l.max = 1), l;
|
3347
3363
|
} else {
|
3348
3364
|
if (e.isColor)
|
3349
3365
|
return {
|
@@ -3375,12 +3391,12 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3375
3391
|
}
|
3376
3392
|
}
|
3377
3393
|
if (l.length > 0)
|
3378
|
-
return
|
3394
|
+
return Hi(l), {
|
3379
3395
|
title: r,
|
3380
3396
|
items: l
|
3381
3397
|
};
|
3382
3398
|
} else {
|
3383
|
-
if (
|
3399
|
+
if (zr(e))
|
3384
3400
|
return {
|
3385
3401
|
title: r,
|
3386
3402
|
prop: o,
|
@@ -3396,7 +3412,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3396
3412
|
}
|
3397
3413
|
}
|
3398
3414
|
};
|
3399
|
-
if (
|
3415
|
+
if (Hr(e))
|
3400
3416
|
return {
|
3401
3417
|
title: r,
|
3402
3418
|
prop: o,
|
@@ -3412,7 +3428,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3412
3428
|
}
|
3413
3429
|
}
|
3414
3430
|
};
|
3415
|
-
if (
|
3431
|
+
if (Yr(e))
|
3416
3432
|
return {
|
3417
3433
|
title: r,
|
3418
3434
|
prop: o,
|
@@ -3451,7 +3467,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3451
3467
|
value: e,
|
3452
3468
|
disabled: a,
|
3453
3469
|
onChange: (l, d) => {
|
3454
|
-
const p =
|
3470
|
+
const p = Ar(i), m = n.length > 0 ? `${n}.${p}` : p;
|
3455
3471
|
s.createTexture(t.uuid, `material.${m}`, d);
|
3456
3472
|
const f = s.getScene(t.uuid);
|
3457
3473
|
if (f !== null) {
|
@@ -3478,7 +3494,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3478
3494
|
}
|
3479
3495
|
g.needsUpdate = !0;
|
3480
3496
|
};
|
3481
|
-
d.src.length > 0 ?
|
3497
|
+
d.src.length > 0 ? yn(d.src).then((x) => {
|
3482
3498
|
x.offset.set(d.offset[0], d.offset[1]), x.repeat.set(d.repeat[0], d.repeat[1]), v(x);
|
3483
3499
|
}) : v(null);
|
3484
3500
|
}
|
@@ -3519,7 +3535,7 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3519
3535
|
console.log("Issue cycling through material object:", i, e);
|
3520
3536
|
}
|
3521
3537
|
if (l.length > 0)
|
3522
|
-
return
|
3538
|
+
return Hi(l), {
|
3523
3539
|
title: r,
|
3524
3540
|
items: l
|
3525
3541
|
};
|
@@ -3527,25 +3543,25 @@ function It(i, e, t, s, n = "", a = !1) {
|
|
3527
3543
|
}
|
3528
3544
|
}
|
3529
3545
|
}
|
3530
|
-
function
|
3546
|
+
function ws(i, e, t) {
|
3531
3547
|
const s = [];
|
3532
3548
|
for (const n in i) {
|
3533
|
-
if (!
|
3549
|
+
if (!Pr(n))
|
3534
3550
|
continue;
|
3535
3551
|
const a = typeof i[n], r = i[n];
|
3536
3552
|
if (a === "boolean")
|
3537
|
-
s.push(Ur(n, r, e, t));
|
3538
|
-
else if (a === "number")
|
3539
3553
|
s.push(jr(n, r, e, t));
|
3540
|
-
else if (a === "
|
3554
|
+
else if (a === "number")
|
3541
3555
|
s.push(Nr(n, r, e, t));
|
3556
|
+
else if (a === "string")
|
3557
|
+
s.push(Fr(n, r, e, t));
|
3542
3558
|
else if (a === "object") {
|
3543
3559
|
const o = It(n, r, e, t);
|
3544
3560
|
o !== void 0 && s.push(o);
|
3545
3561
|
} else
|
3546
3562
|
r !== void 0 && console.log("other:", n, a, r);
|
3547
3563
|
}
|
3548
|
-
return
|
3564
|
+
return Hi(s), s.push({
|
3549
3565
|
title: "Update Material",
|
3550
3566
|
type: "button",
|
3551
3567
|
onChange: () => {
|
@@ -3558,7 +3574,7 @@ function Cs(i, e, t) {
|
|
3558
3574
|
}
|
3559
3575
|
}), s;
|
3560
3576
|
}
|
3561
|
-
function
|
3577
|
+
function Br(i, e) {
|
3562
3578
|
function t() {
|
3563
3579
|
return `${e.app.appID}_material`;
|
3564
3580
|
}
|
@@ -3575,7 +3591,7 @@ function Yr(i, e) {
|
|
3575
3591
|
Oe,
|
3576
3592
|
{
|
3577
3593
|
title: `Material ${l}`,
|
3578
|
-
items:
|
3594
|
+
items: ws(r[l], i, e)
|
3579
3595
|
},
|
3580
3596
|
`Material ${l}`
|
3581
3597
|
)
|
@@ -3586,7 +3602,7 @@ function Yr(i, e) {
|
|
3586
3602
|
Oe,
|
3587
3603
|
{
|
3588
3604
|
title: "Material",
|
3589
|
-
items:
|
3605
|
+
items: ws(r, i, e),
|
3590
3606
|
expanded: n,
|
3591
3607
|
onToggle: (o) => {
|
3592
3608
|
a(o);
|
@@ -3594,8 +3610,8 @@ function Yr(i, e) {
|
|
3594
3610
|
}
|
3595
3611
|
);
|
3596
3612
|
}
|
3597
|
-
const
|
3598
|
-
function
|
3613
|
+
const xs = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
|
3614
|
+
function Vr(i) {
|
3599
3615
|
const e = i.step !== void 0 ? i.step : 0.01, t = J(null), s = J(null), n = J(null), a = J(null), r = J(null), [o] = Z(i.value), [c, l] = Z(i.value.offset[0]), [d, p] = Z(i.value.offset[1]), [m, f] = Z(i.value.repeat[0]), [w, v] = Z(i.value.repeat[1]);
|
3600
3616
|
function x(y, E, C, S, O) {
|
3601
3617
|
if (i.onChange !== void 0) {
|
@@ -3626,10 +3642,10 @@ function Br(i) {
|
|
3626
3642
|
}
|
3627
3643
|
return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
|
3628
3644
|
/* @__PURE__ */ u.jsx("img", { alt: i.title, ref: t, onClick: () => {
|
3629
|
-
|
3645
|
+
Dr().then((y) => {
|
3630
3646
|
t.current.src = y, x(y, c, d, m, w);
|
3631
3647
|
});
|
3632
|
-
}, src: o.src.length > 0 ? o.src :
|
3648
|
+
}, src: o.src.length > 0 ? o.src : xs }),
|
3633
3649
|
/* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
|
3634
3650
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
3635
3651
|
/* @__PURE__ */ u.jsx("label", { children: "Offset:" }),
|
@@ -3678,14 +3694,14 @@ function Br(i) {
|
|
3678
3694
|
)
|
3679
3695
|
] }),
|
3680
3696
|
/* @__PURE__ */ u.jsx("button", { onClick: () => {
|
3681
|
-
x("", c, d, m, w), t.current.src =
|
3697
|
+
x("", c, d, m, w), t.current.src = xs;
|
3682
3698
|
}, children: "Clear" })
|
3683
3699
|
] })
|
3684
3700
|
] });
|
3685
3701
|
}
|
3686
3702
|
function ii(i) {
|
3687
3703
|
let e = i.value;
|
3688
|
-
e !== void 0 && (e.isColor !== void 0 ? e =
|
3704
|
+
e !== void 0 && (e.isColor !== void 0 ? e = ms(i.value) : i.type === "color" && (e = ms(new et().setStyle(i.value, jt))));
|
3689
3705
|
const [t, s] = Z(e), n = J(null), a = (l) => {
|
3690
3706
|
let d = l.target.value;
|
3691
3707
|
if (i.type === "boolean")
|
@@ -3775,15 +3791,15 @@ function ii(i) {
|
|
3775
3791
|
children: i.title
|
3776
3792
|
}
|
3777
3793
|
),
|
3778
|
-
i.type === "image" && /* @__PURE__ */ u.jsx(
|
3794
|
+
i.type === "image" && /* @__PURE__ */ u.jsx(Vr, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
|
3779
3795
|
i.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: a, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, d) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: ri(l.title) }, d)) }) }),
|
3780
|
-
i.type === "vector2" && /* @__PURE__ */ u.jsx(
|
3781
|
-
i.type === "grid3" && /* @__PURE__ */ u.jsx(
|
3782
|
-
i.type === "grid4" && /* @__PURE__ */ u.jsx(
|
3783
|
-
i.type === "euler" && /* @__PURE__ */ u.jsx(
|
3796
|
+
i.type === "vector2" && /* @__PURE__ */ u.jsx(wr, { step: i.step, value: t, min: 0, max: 1, onChange: a }),
|
3797
|
+
i.type === "grid3" && /* @__PURE__ */ u.jsx(Ss, { step: i.step, value: t, onChange: a }),
|
3798
|
+
i.type === "grid4" && /* @__PURE__ */ u.jsx(Mr, { step: i.step, value: t, onChange: a }),
|
3799
|
+
i.type === "euler" && /* @__PURE__ */ u.jsx(Ss, { step: i.step, value: t, onChange: a })
|
3784
3800
|
] });
|
3785
3801
|
}
|
3786
|
-
function
|
3802
|
+
function Zr(i) {
|
3787
3803
|
return "items" in i;
|
3788
3804
|
}
|
3789
3805
|
class Oe extends Ft {
|
@@ -3838,7 +3854,7 @@ class Oe extends Ft {
|
|
3838
3854
|
render() {
|
3839
3855
|
const e = [];
|
3840
3856
|
return this.props.items.forEach((t) => {
|
3841
|
-
if (
|
3857
|
+
if (Zr(t))
|
3842
3858
|
e.push(
|
3843
3859
|
/* @__PURE__ */ u.jsx(Oe, { title: ri(t.title), items: t.items }, Math.random())
|
3844
3860
|
);
|
@@ -3971,7 +3987,7 @@ class te extends Ft {
|
|
3971
3987
|
}
|
3972
3988
|
}
|
3973
3989
|
}
|
3974
|
-
function
|
3990
|
+
function Os(i) {
|
3975
3991
|
switch (i) {
|
3976
3992
|
case "fov":
|
3977
3993
|
return "FOV";
|
@@ -4000,7 +4016,7 @@ function ws(i) {
|
|
4000
4016
|
}
|
4001
4017
|
return i;
|
4002
4018
|
}
|
4003
|
-
function
|
4019
|
+
function Wr(i, e) {
|
4004
4020
|
function t() {
|
4005
4021
|
return `${e.app.appID}_camera`;
|
4006
4022
|
}
|
@@ -4012,7 +4028,7 @@ function Zr(i, e) {
|
|
4012
4028
|
if (i.perspectiveCameraInfo !== void 0)
|
4013
4029
|
for (const o in i.perspectiveCameraInfo)
|
4014
4030
|
r.push({
|
4015
|
-
title:
|
4031
|
+
title: Os(o),
|
4016
4032
|
prop: o,
|
4017
4033
|
type: "number",
|
4018
4034
|
step: 0.01,
|
@@ -4029,7 +4045,7 @@ function Zr(i, e) {
|
|
4029
4045
|
else if (i.orthographicCameraInfo !== void 0)
|
4030
4046
|
for (const o in i.orthographicCameraInfo)
|
4031
4047
|
r.push({
|
4032
|
-
title:
|
4048
|
+
title: Os(o),
|
4033
4049
|
prop: o,
|
4034
4050
|
type: "number",
|
4035
4051
|
step: 0.01,
|
@@ -4055,14 +4071,14 @@ function Zr(i, e) {
|
|
4055
4071
|
}
|
4056
4072
|
);
|
4057
4073
|
}
|
4058
|
-
class
|
4074
|
+
class Gr extends Ie {
|
4059
4075
|
constructor(e, t) {
|
4060
4076
|
const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new _t();
|
4061
4077
|
n.setAttribute("position", new Ke(s, 3)), n.computeBoundingSphere();
|
4062
|
-
const a = new
|
4078
|
+
const a = new Zi({ fog: !1 });
|
4063
4079
|
super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
|
4064
4080
|
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:
|
4081
|
+
o.setAttribute("position", new Ke(r, 3)), o.computeBoundingSphere(), this.add(new M(o, new Je({ side: $s, fog: !1 })));
|
4066
4082
|
}
|
4067
4083
|
updateMatrixWorld() {
|
4068
4084
|
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
@@ -4078,7 +4094,7 @@ class Wr extends Ie {
|
|
4078
4094
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
4079
4095
|
}
|
4080
4096
|
}
|
4081
|
-
const
|
4097
|
+
const Ts = { type: "change" }, Xi = { type: "start" }, Sn = { type: "end" }, Wt = new da(), Ms = new ua(), Xr = Math.cos(70 * pa.DEG2RAD), oe = new P(), ye = 2 * Math.PI, V = {
|
4082
4098
|
NONE: -1,
|
4083
4099
|
ROTATE: 0,
|
4084
4100
|
DOLLY: 1,
|
@@ -4088,9 +4104,9 @@ const xs = { type: "change" }, Gi = { type: "start" }, En = { type: "end" }, Wt
|
|
4088
4104
|
TOUCH_DOLLY_PAN: 5,
|
4089
4105
|
TOUCH_DOLLY_ROTATE: 6
|
4090
4106
|
}, Ci = 1e-6;
|
4091
|
-
class
|
4107
|
+
class $r extends dn {
|
4092
4108
|
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
|
4109
|
+
super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new ki(), this._sphericalDelta = new ki(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Kr.bind(this), this._onPointerDown = qr.bind(this), this._onPointerUp = Qr.bind(this), this._onContextMenu = ao.bind(this), this._onMouseWheel = to.bind(this), this._onKeyDown = io.bind(this), this._onTouchStart = so.bind(this), this._onTouchMove = no.bind(this), this._onMouseDown = Jr.bind(this), this._onMouseMove = eo.bind(this), this._interceptControlDown = ro.bind(this), this._interceptControlUp = oo.bind(this), this.domElement !== null && this.connect(), this.update();
|
4094
4110
|
}
|
4095
4111
|
connect() {
|
4096
4112
|
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,7 +4136,7 @@ class Xr extends cn {
|
|
4120
4136
|
this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
|
4121
4137
|
}
|
4122
4138
|
reset() {
|
4123
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(
|
4139
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Ts), this.update(), this.state = V.NONE;
|
4124
4140
|
}
|
4125
4141
|
update(e = null) {
|
4126
4142
|
const t = this.object.position;
|
@@ -4150,12 +4166,12 @@ class Xr extends cn {
|
|
4150
4166
|
l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), r = oe.length();
|
4151
4167
|
} else
|
4152
4168
|
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)) <
|
4169
|
+
r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Wt.origin.copy(this.object.position), Wt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Wt.direction)) < Xr ? this.object.lookAt(this.target) : (Ms.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(Ms, this.target))));
|
4154
4170
|
} else if (this.object.isOrthographicCamera) {
|
4155
4171
|
const r = this.object.zoom;
|
4156
4172
|
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
4173
|
}
|
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(
|
4174
|
+
return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > Ci || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Ci || this._lastTargetPosition.distanceToSquared(this.target) > Ci ? (this.dispatchEvent(Ts), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
4159
4175
|
}
|
4160
4176
|
_getAutoRotationAngle(e) {
|
4161
4177
|
return e !== null ? ye / 60 * this.autoRotateSpeed * e : ye / 60 / 60 * this.autoRotateSpeed;
|
@@ -4349,16 +4365,16 @@ class Xr extends cn {
|
|
4349
4365
|
return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
|
4350
4366
|
}
|
4351
4367
|
}
|
4352
|
-
function
|
4368
|
+
function qr(i) {
|
4353
4369
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(i) && (this._addPointer(i), i.pointerType === "touch" ? this._onTouchStart(i) : this._onMouseDown(i)));
|
4354
4370
|
}
|
4355
|
-
function
|
4371
|
+
function Kr(i) {
|
4356
4372
|
this.enabled !== !1 && (i.pointerType === "touch" ? this._onTouchMove(i) : this._onMouseMove(i));
|
4357
4373
|
}
|
4358
|
-
function
|
4374
|
+
function Qr(i) {
|
4359
4375
|
switch (this._removePointer(i), this._pointers.length) {
|
4360
4376
|
case 0:
|
4361
|
-
this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
4377
|
+
this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Sn), this.state = V.NONE;
|
4362
4378
|
break;
|
4363
4379
|
case 1:
|
4364
4380
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
@@ -4366,7 +4382,7 @@ function Kr(i) {
|
|
4366
4382
|
break;
|
4367
4383
|
}
|
4368
4384
|
}
|
4369
|
-
function
|
4385
|
+
function Jr(i) {
|
4370
4386
|
let e;
|
4371
4387
|
switch (i.button) {
|
4372
4388
|
case 0:
|
@@ -4412,9 +4428,9 @@ function Qr(i) {
|
|
4412
4428
|
default:
|
4413
4429
|
this.state = V.NONE;
|
4414
4430
|
}
|
4415
|
-
this.state !== V.NONE && this.dispatchEvent(
|
4431
|
+
this.state !== V.NONE && this.dispatchEvent(Xi);
|
4416
4432
|
}
|
4417
|
-
function
|
4433
|
+
function eo(i) {
|
4418
4434
|
switch (this.state) {
|
4419
4435
|
case V.ROTATE:
|
4420
4436
|
if (this.enableRotate === !1)
|
@@ -4433,13 +4449,13 @@ function Jr(i) {
|
|
4433
4449
|
break;
|
4434
4450
|
}
|
4435
4451
|
}
|
4436
|
-
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));
|
4438
|
-
}
|
4439
4452
|
function to(i) {
|
4440
|
-
this.enabled === !1 || this.
|
4453
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (i.preventDefault(), this.dispatchEvent(Xi), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(Sn));
|
4441
4454
|
}
|
4442
4455
|
function io(i) {
|
4456
|
+
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(i);
|
4457
|
+
}
|
4458
|
+
function so(i) {
|
4443
4459
|
switch (this._trackPointer(i), this._pointers.length) {
|
4444
4460
|
case 1:
|
4445
4461
|
switch (this.touches.ONE) {
|
@@ -4476,9 +4492,9 @@ function io(i) {
|
|
4476
4492
|
default:
|
4477
4493
|
this.state = V.NONE;
|
4478
4494
|
}
|
4479
|
-
this.state !== V.NONE && this.dispatchEvent(
|
4495
|
+
this.state !== V.NONE && this.dispatchEvent(Xi);
|
4480
4496
|
}
|
4481
|
-
function
|
4497
|
+
function no(i) {
|
4482
4498
|
switch (this._trackPointer(i), this.state) {
|
4483
4499
|
case V.TOUCH_ROTATE:
|
4484
4500
|
if (this.enableRotate === !1)
|
@@ -4504,13 +4520,13 @@ function so(i) {
|
|
4504
4520
|
this.state = V.NONE;
|
4505
4521
|
}
|
4506
4522
|
}
|
4507
|
-
function
|
4523
|
+
function ao(i) {
|
4508
4524
|
this.enabled !== !1 && i.preventDefault();
|
4509
4525
|
}
|
4510
|
-
function
|
4526
|
+
function ro(i) {
|
4511
4527
|
i.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4512
4528
|
}
|
4513
|
-
function
|
4529
|
+
function oo(i) {
|
4514
4530
|
i.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4515
4531
|
}
|
4516
4532
|
/*!
|
@@ -4552,17 +4568,17 @@ function Ze(i) {
|
|
4552
4568
|
function Be(i) {
|
4553
4569
|
return i.isOrthographicCamera;
|
4554
4570
|
}
|
4555
|
-
const ht = Math.PI * 2,
|
4571
|
+
const ht = Math.PI * 2, Ps = Math.PI / 2, wn = 1e-5, xt = Math.PI / 180;
|
4556
4572
|
function Me(i, e, t) {
|
4557
4573
|
return Math.max(e, Math.min(t, i));
|
4558
4574
|
}
|
4559
|
-
function q(i, e =
|
4575
|
+
function q(i, e = wn) {
|
4560
4576
|
return Math.abs(i) < e;
|
4561
4577
|
}
|
4562
|
-
function Y(i, e, t =
|
4578
|
+
function Y(i, e, t = wn) {
|
4563
4579
|
return q(i - e, t);
|
4564
4580
|
}
|
4565
|
-
function
|
4581
|
+
function As(i, e) {
|
4566
4582
|
return Math.round(i / e) * e;
|
4567
4583
|
}
|
4568
4584
|
function Ot(i) {
|
@@ -4582,7 +4598,7 @@ function Gt(i, e, t, s, n = 1 / 0, a) {
|
|
4582
4598
|
let f = e + (l + m) * c;
|
4583
4599
|
return d - i > 0 == f > d && (f = d, t.value = (f - d) / a), f;
|
4584
4600
|
}
|
4585
|
-
function
|
4601
|
+
function Ds(i, e, t, s, n = 1 / 0, a, r) {
|
4586
4602
|
s = Math.max(1e-4, s);
|
4587
4603
|
const o = 2 / s, c = o * a, l = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
|
4588
4604
|
let d = e.x, p = e.y, m = e.z, f = i.x - d, w = i.y - p, v = i.z - m;
|
@@ -4605,7 +4621,7 @@ function Si(i, e) {
|
|
4605
4621
|
function wi(i, e) {
|
4606
4622
|
return Be(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
4607
4623
|
}
|
4608
|
-
class
|
4624
|
+
class lo {
|
4609
4625
|
constructor() {
|
4610
4626
|
this._listeners = {};
|
4611
4627
|
}
|
@@ -4670,9 +4686,9 @@ class oo {
|
|
4670
4686
|
}
|
4671
4687
|
}
|
4672
4688
|
var xi;
|
4673
|
-
const
|
4674
|
-
let L,
|
4675
|
-
class ke extends
|
4689
|
+
const co = "2.9.0", Xt = 1 / 8, ho = /Mac/.test((xi = globalThis?.navigator) === null || xi === void 0 ? void 0 : xi.platform);
|
4690
|
+
let L, Rs, $t, Oi, be, j, z, dt, Mt, Ae, De, We, Is, Ls, xe, Pt, ut, ks, Ti, Us, Mi, Pi, qt;
|
4691
|
+
class ke extends lo {
|
4676
4692
|
/**
|
4677
4693
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
4678
4694
|
*
|
@@ -4714,7 +4730,7 @@ class ke extends oo {
|
|
4714
4730
|
* @category Statics
|
4715
4731
|
*/
|
4716
4732
|
static install(e) {
|
4717
|
-
L = e.THREE,
|
4733
|
+
L = e.THREE, Rs = Object.freeze(new L.Vector3(0, 0, 0)), $t = Object.freeze(new L.Vector3(0, 1, 0)), Oi = Object.freeze(new L.Vector3(0, 0, 1)), be = new L.Vector2(), j = new L.Vector3(), z = new L.Vector3(), dt = new L.Vector3(), Mt = new L.Vector3(), Ae = new L.Vector3(), De = new L.Vector3(), We = new L.Vector3(), Is = new L.Vector3(), Ls = new L.Vector3(), xe = new L.Spherical(), Pt = new L.Spherical(), ut = new L.Box3(), ks = new L.Box3(), Ti = new L.Sphere(), Us = new L.Quaternion(), Mi = new L.Quaternion(), Pi = new L.Matrix4(), qt = new L.Raycaster();
|
4718
4734
|
}
|
4719
4735
|
/**
|
4720
4736
|
* list all ACTIONs
|
@@ -4857,7 +4873,7 @@ class ke extends oo {
|
|
4857
4873
|
const O = performance.now();
|
4858
4874
|
l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
|
4859
4875
|
}
|
4860
|
-
const y =
|
4876
|
+
const y = ho ? -1 : -3, E = g.deltaMode === 1 ? g.deltaY / y : g.deltaY / (y * 10), C = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, S = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
4861
4877
|
switch (this.mouseButtons.wheel) {
|
4862
4878
|
case _.ROTATE: {
|
4863
4879
|
this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
|
@@ -5323,11 +5339,11 @@ class ke extends oo {
|
|
5323
5339
|
fitToBox(e, t, { cover: s = !1, paddingLeft: n = 0, paddingRight: a = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
|
5324
5340
|
const c = [], l = e.isBox3 ? ut.copy(e) : ut.setFromObject(e);
|
5325
5341
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
5326
|
-
const d =
|
5342
|
+
const d = As(this._sphericalEnd.theta, Ps), p = As(this._sphericalEnd.phi, Ps);
|
5327
5343
|
c.push(this.rotateTo(d, p, t));
|
5328
|
-
const m = j.setFromSpherical(this._sphericalEnd).normalize(), f =
|
5344
|
+
const m = j.setFromSpherical(this._sphericalEnd).normalize(), f = Us.setFromUnitVectors(m, Oi), w = Y(Math.abs(m.y), 1);
|
5329
5345
|
w && f.multiply(Mi.setFromAxisAngle($t, d)), f.multiply(this._yAxisUpSpaceInverse);
|
5330
|
-
const v =
|
5346
|
+
const v = ks.makeEmpty();
|
5331
5347
|
z.copy(l.min).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setX(l.max.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setY(l.max.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setZ(l.min.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.min).setZ(l.max.z).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setY(l.min.y).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).setX(l.min.x).applyQuaternion(f), v.expandByPoint(z), z.copy(l.max).applyQuaternion(f), v.expandByPoint(z), v.min.x -= n, v.min.y -= r, v.max.x += a, v.max.y += o, f.setFromUnitVectors(Oi, m), w && f.premultiply(Mi.invert()), f.premultiply(this._yAxisUpSpace);
|
5332
5348
|
const x = v.getSize(j), g = v.getCenter(z).applyQuaternion(f);
|
5333
5349
|
if (Ze(this._camera)) {
|
@@ -5609,7 +5625,7 @@ class ke extends oo {
|
|
5609
5625
|
* @category Methods
|
5610
5626
|
*/
|
5611
5627
|
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 =
|
5628
|
+
const t = this._sphericalEnd.theta - this._spherical.theta, s = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a = Is.subVectors(this._targetEnd, this._target), r = Ls.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
|
5613
5629
|
if (q(t))
|
5614
5630
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
5615
5631
|
else {
|
@@ -5632,13 +5648,13 @@ class ke extends oo {
|
|
5632
5648
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
5633
5649
|
else {
|
5634
5650
|
const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
5635
|
-
|
5651
|
+
Ds(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
|
5636
5652
|
}
|
5637
5653
|
if (q(r.x) && q(r.y) && q(r.z))
|
5638
5654
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
5639
5655
|
else {
|
5640
5656
|
const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
5641
|
-
|
5657
|
+
Ds(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
5642
5658
|
}
|
5643
5659
|
if (q(o))
|
5644
5660
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
@@ -5722,7 +5738,7 @@ class ke extends oo {
|
|
5722
5738
|
console.warn("camera-controls is already connected.");
|
5723
5739
|
return;
|
5724
5740
|
}
|
5725
|
-
e.setAttribute("data-camera-controls-version",
|
5741
|
+
e.setAttribute("data-camera-controls-version", co), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
5726
5742
|
}
|
5727
5743
|
/**
|
5728
5744
|
* Detach all internal event handlers to disable drag control.
|
@@ -5785,7 +5801,7 @@ class ke extends oo {
|
|
5785
5801
|
if (!(this.colliderMeshes.length >= 1) || wi(this._camera, "_collisionTest"))
|
5786
5802
|
return e;
|
5787
5803
|
const s = this._getTargetDirection(Mt);
|
5788
|
-
Pi.lookAt(
|
5804
|
+
Pi.lookAt(Rs, s, this._camera.up);
|
5789
5805
|
for (let n = 0; n < 4; n++) {
|
5790
5806
|
const a = z.copy(this._nearPlaneCorners[n]);
|
5791
5807
|
a.applyMatrix4(Pi);
|
@@ -5877,7 +5893,7 @@ const li = (i) => {
|
|
5877
5893
|
/* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: s, children: `${i.title}: ${e}` }),
|
5878
5894
|
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
5895
|
] });
|
5880
|
-
}, Ge =
|
5896
|
+
}, Ge = Fa(function(e, t) {
|
5881
5897
|
const s = [
|
5882
5898
|
"Renderer",
|
5883
5899
|
"Depth",
|
@@ -5925,7 +5941,7 @@ const li = (i) => {
|
|
5925
5941
|
)
|
5926
5942
|
] })
|
5927
5943
|
] });
|
5928
|
-
}),
|
5944
|
+
}), uo = `out vec3 worldPosition;
|
5929
5945
|
uniform float uDistance;
|
5930
5946
|
|
5931
5947
|
void main() {
|
@@ -5934,7 +5950,7 @@ void main() {
|
|
5934
5950
|
worldPosition.xz += cameraPosition.xz;
|
5935
5951
|
|
5936
5952
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
5937
|
-
}`,
|
5953
|
+
}`, po = `out vec4 fragColor;
|
5938
5954
|
in vec3 worldPosition;
|
5939
5955
|
uniform float uDivisions;
|
5940
5956
|
uniform float uScale;
|
@@ -6001,7 +6017,7 @@ void main() {
|
|
6001
6017
|
|
6002
6018
|
if (fragColor.a <= 0.0) discard;
|
6003
6019
|
}`;
|
6004
|
-
class
|
6020
|
+
class mo extends un {
|
6005
6021
|
constructor(e) {
|
6006
6022
|
super({
|
6007
6023
|
extensions: {
|
@@ -6028,28 +6044,28 @@ class po extends hn {
|
|
6028
6044
|
value: e?.gridOpacity !== void 0 ? e?.gridOpacity : 0.25
|
6029
6045
|
}
|
6030
6046
|
},
|
6031
|
-
glslVersion:
|
6032
|
-
side:
|
6047
|
+
glslVersion: ma,
|
6048
|
+
side: Vi,
|
6033
6049
|
transparent: !0,
|
6034
6050
|
name: "InfiniteGrid",
|
6035
6051
|
depthTest: !1,
|
6036
6052
|
depthWrite: !1,
|
6037
|
-
vertexShader:
|
6038
|
-
fragmentShader:
|
6053
|
+
vertexShader: uo,
|
6054
|
+
fragmentShader: po
|
6039
6055
|
});
|
6040
6056
|
}
|
6041
6057
|
}
|
6042
|
-
class
|
6058
|
+
class fo extends M {
|
6043
6059
|
gridMaterial;
|
6044
6060
|
constructor(e) {
|
6045
|
-
const t = new
|
6046
|
-
super(new
|
6061
|
+
const t = new mo(e);
|
6062
|
+
super(new pn(), t), this.gridMaterial = t, this.frustumCulled = !1, this.name = "InfiniteGridHelper";
|
6047
6063
|
}
|
6048
6064
|
update() {
|
6049
6065
|
this.gridMaterial.needsUpdate = !0;
|
6050
6066
|
}
|
6051
6067
|
}
|
6052
|
-
function
|
6068
|
+
function js(i) {
|
6053
6069
|
const [e, t] = Z(i.selected), s = "toggle" + (e ? " selected" : "");
|
6054
6070
|
return /* @__PURE__ */ u.jsx(
|
6055
6071
|
"button",
|
@@ -6068,7 +6084,7 @@ function ks(i) {
|
|
6068
6084
|
i.name
|
6069
6085
|
);
|
6070
6086
|
}
|
6071
|
-
const
|
6087
|
+
const go = `#include <common>
|
6072
6088
|
#include <batching_pars_vertex>
|
6073
6089
|
#include <uv_pars_vertex>
|
6074
6090
|
#include <color_pars_vertex>
|
@@ -6098,7 +6114,7 @@ void main() {
|
|
6098
6114
|
#include <logdepthbuf_vertex>
|
6099
6115
|
#include <clipping_planes_vertex>
|
6100
6116
|
#include <worldpos_vertex>
|
6101
|
-
}`,
|
6117
|
+
}`, _o = `
|
6102
6118
|
#include <common>
|
6103
6119
|
#include <uv_pars_fragment>
|
6104
6120
|
#include <clipping_planes_pars_fragment>
|
@@ -6107,30 +6123,30 @@ void main() {
|
|
6107
6123
|
#include <clipping_planes_fragment>
|
6108
6124
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
6109
6125
|
}`;
|
6110
|
-
class
|
6126
|
+
class vo extends un {
|
6111
6127
|
constructor() {
|
6112
6128
|
super({
|
6113
6129
|
defines: {
|
6114
6130
|
USE_UV: ""
|
6115
6131
|
},
|
6116
|
-
vertexShader:
|
6117
|
-
fragmentShader:
|
6132
|
+
vertexShader: go,
|
6133
|
+
fragmentShader: _o
|
6118
6134
|
});
|
6119
6135
|
}
|
6120
6136
|
}
|
6121
|
-
const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(),
|
6137
|
+
const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(), Ns = {
|
6122
6138
|
X: new P(1, 0, 0),
|
6123
6139
|
Y: new P(0, 1, 0),
|
6124
6140
|
Z: new P(0, 0, 1)
|
6125
|
-
}, Ai = { type: "change" },
|
6126
|
-
class
|
6141
|
+
}, Ai = { type: "change" }, Fs = { type: "mouseDown", mode: null }, zs = { type: "mouseUp", mode: null }, Hs = { type: "objectChange" };
|
6142
|
+
class yo extends dn {
|
6127
6143
|
constructor(e, t = null) {
|
6128
6144
|
super(void 0, t);
|
6129
|
-
const s = new
|
6145
|
+
const s = new xo(this);
|
6130
6146
|
this._root = s;
|
6131
|
-
const n = new
|
6147
|
+
const n = new Oo();
|
6132
6148
|
this._gizmo = n, s.add(n);
|
6133
|
-
const a = new
|
6149
|
+
const a = new To();
|
6134
6150
|
this._plane = a, s.add(a);
|
6135
6151
|
const r = this;
|
6136
6152
|
function o(E, C) {
|
@@ -6146,7 +6162,7 @@ class vo extends cn {
|
|
6146
6162
|
}
|
6147
6163
|
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
6164
|
const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), w = new P(), v = new P(), x = new P(), g = 0, y = new P();
|
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 =
|
6165
|
+
o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", w), o("pointEnd", v), o("rotationAxis", x), o("rotationAngle", g), o("eye", y), this._offset = new P(), this._startNorm = new P(), this._endNorm = new P(), this._cameraScale = new P(), this._parentPosition = new P(), this._parentQuaternion = new Ce(), this._parentQuaternionInv = new Ce(), this._parentScale = new P(), this._worldScaleStart = new P(), this._worldQuaternionInv = new Ce(), this._worldScale = new P(), this._positionStart = new P(), this._quaternionStart = new Ce(), this._scaleStart = new P(), this._getPointer = bo.bind(this), this._onPointerDown = Co.bind(this), this._onPointerHover = Eo.bind(this), this._onPointerMove = So.bind(this), this._onPointerUp = wo.bind(this), t !== null && this.connect();
|
6150
6166
|
}
|
6151
6167
|
connect() {
|
6152
6168
|
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
@@ -6168,7 +6184,7 @@ class vo extends cn {
|
|
6168
6184
|
if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
|
6169
6185
|
e !== null && Xe.setFromCamera(e, this.camera);
|
6170
6186
|
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,
|
6187
|
+
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, Fs.mode = this.mode, this.dispatchEvent(Fs);
|
6172
6188
|
}
|
6173
6189
|
}
|
6174
6190
|
pointerMove(e) {
|
@@ -6192,13 +6208,13 @@ class vo extends cn {
|
|
6192
6208
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
6193
6209
|
const o = 20 / this.worldPosition.distanceTo(ue.setFromMatrixPosition(this.camera.matrixWorld));
|
6194
6210
|
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(
|
6211
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(ue.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Ns[t]), ue.copy(Ns[t]), a === "local" && ue.applyQuaternion(this.worldQuaternion), ue.cross(this.eye), ue.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(ue.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(Q.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
|
6196
6212
|
}
|
6197
|
-
this.dispatchEvent(Ai), this.dispatchEvent(
|
6213
|
+
this.dispatchEvent(Ai), this.dispatchEvent(Hs);
|
6198
6214
|
}
|
6199
6215
|
}
|
6200
6216
|
pointerUp(e) {
|
6201
|
-
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (
|
6217
|
+
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (zs.mode = this.mode, this.dispatchEvent(zs)), this.dragging = !1, this.axis = null);
|
6202
6218
|
}
|
6203
6219
|
dispose() {
|
6204
6220
|
this.disconnect(), this.traverse(function(e) {
|
@@ -6214,7 +6230,7 @@ class vo extends cn {
|
|
6214
6230
|
return this.object = void 0, this.axis = null, this._root.visible = !1, this;
|
6215
6231
|
}
|
6216
6232
|
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(
|
6233
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(Ai), this.dispatchEvent(Hs), this.pointStart.copy(this.pointEnd));
|
6218
6234
|
}
|
6219
6235
|
getRaycaster() {
|
6220
6236
|
return Xe;
|
@@ -6242,7 +6258,7 @@ class vo extends cn {
|
|
6242
6258
|
this.space = e;
|
6243
6259
|
}
|
6244
6260
|
}
|
6245
|
-
function
|
6261
|
+
function bo(i) {
|
6246
6262
|
if (this.domElement.ownerDocument.pointerLockElement)
|
6247
6263
|
return {
|
6248
6264
|
x: 0,
|
@@ -6258,7 +6274,7 @@ function yo(i) {
|
|
6258
6274
|
};
|
6259
6275
|
}
|
6260
6276
|
}
|
6261
|
-
function
|
6277
|
+
function Eo(i) {
|
6262
6278
|
if (this.enabled)
|
6263
6279
|
switch (i.pointerType) {
|
6264
6280
|
case "mouse":
|
@@ -6267,13 +6283,13 @@ function bo(i) {
|
|
6267
6283
|
break;
|
6268
6284
|
}
|
6269
6285
|
}
|
6270
|
-
function
|
6286
|
+
function Co(i) {
|
6271
6287
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(i)), this.pointerDown(this._getPointer(i)));
|
6272
6288
|
}
|
6273
|
-
function
|
6289
|
+
function So(i) {
|
6274
6290
|
this.enabled && this.pointerMove(this._getPointer(i));
|
6275
6291
|
}
|
6276
|
-
function
|
6292
|
+
function wo(i) {
|
6277
6293
|
this.enabled && (this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(i)));
|
6278
6294
|
}
|
6279
6295
|
function Di(i, e, t) {
|
@@ -6283,8 +6299,8 @@ function Di(i, e, t) {
|
|
6283
6299
|
return s[n];
|
6284
6300
|
return !1;
|
6285
6301
|
}
|
6286
|
-
const Kt = new
|
6287
|
-
class
|
6302
|
+
const Kt = new mn(), X = new P(0, 1, 0), Ys = new P(0, 0, 0), Bs = new ci(), Qt = new Ce(), si = new Ce(), Re = new P(), Vs = new ci(), Lt = new P(1, 0, 0), qe = new P(0, 1, 0), kt = new P(0, 0, 1), Jt = new P(), At = new P(), Dt = new P();
|
6303
|
+
class xo extends vt {
|
6288
6304
|
constructor(e) {
|
6289
6305
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
6290
6306
|
}
|
@@ -6294,7 +6310,7 @@ class wo extends vt {
|
|
6294
6310
|
t.object !== void 0 && (t.object.updateMatrixWorld(), t.object.parent === null ? console.error("TransformControls: The attached 3D object must be a part of the scene graph.") : t.object.parent.matrixWorld.decompose(t._parentPosition, t._parentQuaternion, t._parentScale), t.object.matrixWorld.decompose(t.worldPosition, t.worldQuaternion, t._worldScale), t._parentQuaternionInv.copy(t._parentQuaternion).invert(), t._worldQuaternionInv.copy(t.worldQuaternion).invert()), t.camera.updateMatrixWorld(), t.camera.matrixWorld.decompose(t.cameraPosition, t.cameraQuaternion, t._cameraScale), t.camera.isOrthographicCamera ? t.camera.getWorldDirection(t.eye).negate() : t.eye.copy(t.cameraPosition).sub(t.worldPosition).normalize(), super.updateMatrixWorld(e);
|
6295
6311
|
}
|
6296
6312
|
}
|
6297
|
-
class
|
6313
|
+
class Oo extends vt {
|
6298
6314
|
constructor() {
|
6299
6315
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
6300
6316
|
const e = new Je({
|
@@ -6303,7 +6319,7 @@ class xo extends vt {
|
|
6303
6319
|
fog: !1,
|
6304
6320
|
toneMapped: !1,
|
6305
6321
|
transparent: !0
|
6306
|
-
}), t = new
|
6322
|
+
}), t = new Zi({
|
6307
6323
|
depthTest: !1,
|
6308
6324
|
depthWrite: !1,
|
6309
6325
|
fog: !1,
|
@@ -6441,7 +6457,7 @@ class xo extends vt {
|
|
6441
6457
|
]
|
6442
6458
|
}, B = {
|
6443
6459
|
XYZE: [
|
6444
|
-
[new M(new
|
6460
|
+
[new M(new fn(0.25, 10, 8), s)]
|
6445
6461
|
],
|
6446
6462
|
X: [
|
6447
6463
|
[new M(new Et(0.5, 0.1, 4, 24), s), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
@@ -6543,21 +6559,21 @@ class xo extends vt {
|
|
6543
6559
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
6544
6560
|
let o;
|
6545
6561
|
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(
|
6562
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Q.setFromEuler(Kt.set(0, 0, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Q.setFromEuler(Kt.set(0, 0, Math.PI / 2)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), r.quaternion.copy(s).multiply(Q), Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Q.setFromEuler(Kt.set(0, Math.PI / 2, 0)), X.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Bs.lookAt(Ys, X, qe)), r.quaternion.multiply(Q), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), ue.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), ue.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(ue), r.visible = this.dragging) : (r.quaternion.copy(s), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
6547
6563
|
continue;
|
6548
6564
|
}
|
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(
|
6565
|
+
r.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(X.copy(kt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(X.copy(Lt).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(X.copy(qe).applyQuaternion(s).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Qt.copy(s), X.copy(this.eye).applyQuaternion(Q.copy(s).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Bs.lookAt(this.eye, Ys, qe)), r.name === "X" && (Q.setFromAxisAngle(Lt, Math.atan2(-X.y, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Y" && (Q.setFromAxisAngle(qe, Math.atan2(X.x, X.z)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q)), r.name === "Z" && (Q.setFromAxisAngle(kt, Math.atan2(X.y, X.x)), Q.multiplyQuaternions(Qt, Q), r.quaternion.copy(Q))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(c) {
|
6550
6566
|
return r.name === c;
|
6551
6567
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
6552
6568
|
}
|
6553
6569
|
super.updateMatrixWorld(e);
|
6554
6570
|
}
|
6555
6571
|
}
|
6556
|
-
class
|
6572
|
+
class To extends M {
|
6557
6573
|
constructor() {
|
6558
6574
|
super(
|
6559
|
-
new
|
6560
|
-
new Je({ visible: !1, wireframe: !0, side:
|
6575
|
+
new pn(1e5, 1e5, 2, 2),
|
6576
|
+
new Je({ visible: !1, wireframe: !0, side: Vi, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
6561
6577
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
6562
6578
|
}
|
6563
6579
|
updateMatrixWorld(e) {
|
@@ -6594,10 +6610,10 @@ class Oo extends M {
|
|
6594
6610
|
default:
|
6595
6611
|
Re.set(0, 0, 0);
|
6596
6612
|
}
|
6597
|
-
Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (
|
6613
|
+
Re.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Vs.lookAt(ue.set(0, 0, 0), Re, X), this.quaternion.setFromRotationMatrix(Vs)), super.updateMatrixWorld(e);
|
6598
6614
|
}
|
6599
6615
|
}
|
6600
|
-
class ge extends
|
6616
|
+
class ge extends Bi {
|
6601
6617
|
static DRAG_START = "Transform::dragStart";
|
6602
6618
|
static DRAG_END = "Transform::dragEnd";
|
6603
6619
|
static _instance;
|
@@ -6620,7 +6636,7 @@ class ge extends Yi {
|
|
6620
6636
|
let t = this.controls.get(e);
|
6621
6637
|
if (t === void 0) {
|
6622
6638
|
const s = document.querySelector(".clickable");
|
6623
|
-
t = new
|
6639
|
+
t = new yo(this.activeCamera, s), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
|
6624
6640
|
this.dispatchEvent({ type: ge.DRAG_START });
|
6625
6641
|
}), t.addEventListener("mouseUp", () => {
|
6626
6642
|
this.dispatchEvent({ type: ge.DRAG_END });
|
@@ -6666,9 +6682,9 @@ class ge extends Yi {
|
|
6666
6682
|
return ge._instance || (ge._instance = new ge()), ge._instance;
|
6667
6683
|
}
|
6668
6684
|
}
|
6669
|
-
const
|
6670
|
-
class
|
6671
|
-
curve = new
|
6685
|
+
const Mo = new de(), Ri = new pe();
|
6686
|
+
class Zs extends vt {
|
6687
|
+
curve = new hs();
|
6672
6688
|
line;
|
6673
6689
|
draggable;
|
6674
6690
|
curvePos;
|
@@ -6689,7 +6705,7 @@ class Bs extends vt {
|
|
6689
6705
|
group;
|
6690
6706
|
constructor(e, t) {
|
6691
6707
|
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
|
6708
|
+
super(), this.name = e, this.lineMaterial = new Zi({ color: s }), this.line = new Ie(new _t(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new vt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new M(new fn(1.5), new Je({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new ni(), this.raycaster.params.Line.threshold = 3, this.enable();
|
6693
6709
|
}
|
6694
6710
|
enable() {
|
6695
6711
|
document.addEventListener("pointerdown", this.onMouseClick);
|
@@ -6707,7 +6723,7 @@ class Bs extends vt {
|
|
6707
6723
|
const e = [];
|
6708
6724
|
this.draggable.children.forEach((t) => {
|
6709
6725
|
e.push([Pe(t.position.x, 3), Pe(t.position.y, 3), Pe(t.position.z, 3)]);
|
6710
|
-
}),
|
6726
|
+
}), za({
|
6711
6727
|
name: this.name,
|
6712
6728
|
points: e,
|
6713
6729
|
tension: this.tension,
|
@@ -6730,7 +6746,7 @@ class Bs extends vt {
|
|
6730
6746
|
this.addPoint(new P(-50, 0, 0), !1), this.addPoint(new P(50, 0, 0));
|
6731
6747
|
};
|
6732
6748
|
addPoint = (e, t = !0) => {
|
6733
|
-
const s = this.draggable.children.length, n = new M(
|
6749
|
+
const s = this.draggable.children.length, n = new M(Mo, this.draggedMat);
|
6734
6750
|
return n.name = `point_${s}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
|
6735
6751
|
};
|
6736
6752
|
addNextPt = () => {
|
@@ -6759,7 +6775,7 @@ class Bs extends vt {
|
|
6759
6775
|
this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
|
6760
6776
|
};
|
6761
6777
|
updateSpline = () => {
|
6762
|
-
this.curve = new
|
6778
|
+
this.curve = new hs(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
|
6763
6779
|
};
|
6764
6780
|
// Handlers
|
6765
6781
|
onMouseClick = (e) => {
|
@@ -7000,7 +7016,7 @@ class Bs extends vt {
|
|
7000
7016
|
};
|
7001
7017
|
}
|
7002
7018
|
let ei = 0;
|
7003
|
-
class
|
7019
|
+
class Po extends vt {
|
7004
7020
|
defaultScale = 10;
|
7005
7021
|
_camera;
|
7006
7022
|
group = null;
|
@@ -7059,7 +7075,7 @@ class Mo extends vt {
|
|
7059
7075
|
e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
|
7060
7076
|
}
|
7061
7077
|
createSpline = (e = []) => {
|
7062
|
-
const t = `Spline ${ei + 1}`, s = new
|
7078
|
+
const t = `Spline ${ei + 1}`, s = new Zs(t, this._camera);
|
7063
7079
|
return s.addPoints(e), this.addSpline(s), ei++, s;
|
7064
7080
|
};
|
7065
7081
|
createSplineFromArray = (e) => {
|
@@ -7083,7 +7099,7 @@ class Mo extends vt {
|
|
7083
7099
|
t.points.forEach((r) => {
|
7084
7100
|
n.push(new P(r[0], r[1], r[2]));
|
7085
7101
|
});
|
7086
|
-
const a = new
|
7102
|
+
const a = new Zs(s, this.camera);
|
7087
7103
|
a.addPoints(n), this.addSpline(a), ei++;
|
7088
7104
|
};
|
7089
7105
|
get camera() {
|
@@ -7096,15 +7112,15 @@ class Mo extends vt {
|
|
7096
7112
|
});
|
7097
7113
|
}
|
7098
7114
|
}
|
7099
|
-
const
|
7115
|
+
const Ws = [
|
7100
7116
|
"Single",
|
7101
7117
|
"Side by Side",
|
7102
7118
|
"Stacked",
|
7103
7119
|
"Quad"
|
7104
|
-
],
|
7120
|
+
], Ao = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", Do = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
|
7105
7121
|
class me extends Ft {
|
7106
7122
|
static instance = null;
|
7107
|
-
scene = new
|
7123
|
+
scene = new Xs();
|
7108
7124
|
renderer;
|
7109
7125
|
currentScene;
|
7110
7126
|
cameras = /* @__PURE__ */ new Map();
|
@@ -7114,16 +7130,16 @@ class me extends Ft {
|
|
7114
7130
|
// RefObject to one of the "windows"
|
7115
7131
|
cameraHelpers = /* @__PURE__ */ new Map();
|
7116
7132
|
lightHelpers = /* @__PURE__ */ new Map();
|
7117
|
-
helpersContainer = new
|
7118
|
-
grid = new
|
7119
|
-
interactionHelper = new
|
7133
|
+
helpersContainer = new fa();
|
7134
|
+
grid = new fo();
|
7135
|
+
interactionHelper = new ga(25);
|
7120
7136
|
currentTransform;
|
7121
7137
|
// Tools
|
7122
7138
|
splineEditor;
|
7123
7139
|
// Override Materials
|
7124
|
-
depthMaterial = new
|
7125
|
-
normalsMaterial = new
|
7126
|
-
uvMaterial = new
|
7140
|
+
depthMaterial = new _a();
|
7141
|
+
normalsMaterial = new va();
|
7142
|
+
uvMaterial = new vo();
|
7127
7143
|
wireframeMaterial = new Je({
|
7128
7144
|
opacity: 0.33,
|
7129
7145
|
transparent: !0,
|
@@ -7174,12 +7190,12 @@ class me extends Ft {
|
|
7174
7190
|
const a = {
|
7175
7191
|
Vector2: pe,
|
7176
7192
|
Vector3: P,
|
7177
|
-
Vector4:
|
7193
|
+
Vector4: Ta,
|
7178
7194
|
Quaternion: Ce,
|
7179
7195
|
Matrix4: ci,
|
7180
|
-
Spherical:
|
7181
|
-
Box3:
|
7182
|
-
Sphere:
|
7196
|
+
Spherical: ki,
|
7197
|
+
Box3: Ma,
|
7198
|
+
Sphere: Pa,
|
7183
7199
|
Raycaster: ni
|
7184
7200
|
};
|
7185
7201
|
ke.install({ THREE: a }), this.setupScene(), this.setupTools();
|
@@ -7333,8 +7349,8 @@ class me extends Ft {
|
|
7333
7349
|
li,
|
7334
7350
|
{
|
7335
7351
|
title: "View",
|
7336
|
-
index:
|
7337
|
-
options:
|
7352
|
+
index: Ws.indexOf(this.state.mode),
|
7353
|
+
options: Ws,
|
7338
7354
|
onSelect: (t) => {
|
7339
7355
|
t !== this.state.mode && (this.killControls(), this.setState({ mode: t }), localStorage.setItem(`${this.appID}_mode`, t));
|
7340
7356
|
},
|
@@ -7371,10 +7387,10 @@ class me extends Ft {
|
|
7371
7387
|
}
|
7372
7388
|
),
|
7373
7389
|
/* @__PURE__ */ u.jsx(
|
7374
|
-
|
7390
|
+
js,
|
7375
7391
|
{
|
7376
7392
|
name: "cameraHelper",
|
7377
|
-
icon:
|
7393
|
+
icon: Ao,
|
7378
7394
|
selected: this.cameraVisibility,
|
7379
7395
|
height: 24,
|
7380
7396
|
top: 2,
|
@@ -7389,10 +7405,10 @@ class me extends Ft {
|
|
7389
7405
|
}
|
7390
7406
|
),
|
7391
7407
|
/* @__PURE__ */ u.jsx(
|
7392
|
-
|
7408
|
+
js,
|
7393
7409
|
{
|
7394
7410
|
name: "lightHelper",
|
7395
|
-
icon:
|
7411
|
+
icon: Do,
|
7396
7412
|
selected: this.lightVisibility,
|
7397
7413
|
height: 24,
|
7398
7414
|
top: 4,
|
@@ -7411,7 +7427,7 @@ class me extends Ft {
|
|
7411
7427
|
}
|
7412
7428
|
// Setup
|
7413
7429
|
setupRenderer() {
|
7414
|
-
this.renderer = new
|
7430
|
+
this.renderer = new ya({
|
7415
7431
|
canvas: this.canvasRef.current,
|
7416
7432
|
stencil: !1
|
7417
7433
|
}), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
|
@@ -7419,10 +7435,10 @@ class me extends Ft {
|
|
7419
7435
|
setupScene() {
|
7420
7436
|
this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.interactionHelper.name = "interactionHelper", this.interactionHelper.visible = !1, this.helpersContainer.add(this.interactionHelper);
|
7421
7437
|
const e = (a, r) => {
|
7422
|
-
const o = new
|
7438
|
+
const o = new Li(-100, 100, 100, -100, 0, 3e3);
|
7423
7439
|
return o.name = a, o.position.copy(r), o.lookAt(0, 0, 0), this.cameras.set(a, o), o;
|
7424
7440
|
}, 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
|
7441
|
+
e("Top", new P(0, t, 0)), e("Bottom", new P(0, -t, 0)), e("Left", new P(-t, 0, 0)), e("Right", new P(t, 0, 0)), e("Front", new P(0, 0, t)), e("Back", new P(0, 0, -t)), e("Orthographic", new P(t, t, t)), e("UI", new P()), this.debugCamera = new ds(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
|
7426
7442
|
const s = localStorage, n = this.props.three.app.appID;
|
7427
7443
|
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
7444
|
}
|
@@ -7443,7 +7459,7 @@ class me extends Ft {
|
|
7443
7459
|
break;
|
7444
7460
|
}
|
7445
7461
|
}
|
7446
|
-
}), this.splineEditor = new
|
7462
|
+
}), this.splineEditor = new Po(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
|
7447
7463
|
}
|
7448
7464
|
// Public
|
7449
7465
|
play() {
|
@@ -7507,7 +7523,7 @@ class me extends Ft {
|
|
7507
7523
|
}
|
7508
7524
|
const a = s / n;
|
7509
7525
|
this.cameras.forEach((r) => {
|
7510
|
-
r instanceof
|
7526
|
+
r instanceof Li ? (r.left = s / -2, r.right = s / 2, r.top = n / 2, r.bottom = n / -2, r.name === "UI" && (r.position.x = this.width / 2, r.position.y = this.height / -2, r.position.z = 100), r.updateProjectionMatrix()) : r instanceof ds && (r.aspect = a, r.updateProjectionMatrix()), this.cameraHelpers.get(r.name)?.update();
|
7511
7527
|
});
|
7512
7528
|
};
|
7513
7529
|
sceneUpdate = (e) => {
|
@@ -7523,7 +7539,7 @@ class me extends Ft {
|
|
7523
7539
|
if (s !== void 0) {
|
7524
7540
|
const n = s;
|
7525
7541
|
this.cameras.set(t.name, n);
|
7526
|
-
const a = new
|
7542
|
+
const a = new ba(n);
|
7527
7543
|
a.visible = this.cameraVisibility, this.cameraHelpers.set(n.name, a), this.scene.add(a), this.setState({ lastUpdate: Date.now() });
|
7528
7544
|
}
|
7529
7545
|
};
|
@@ -7573,7 +7589,7 @@ class me extends Ft {
|
|
7573
7589
|
if (this.currentCamera.name === "UI")
|
7574
7590
|
return;
|
7575
7591
|
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
|
7592
|
+
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof Ea ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(zi(45), zi(45), !0), this.updateCameraControls(t));
|
7577
7593
|
} else if (this.currentTransform !== void 0)
|
7578
7594
|
switch (e.key) {
|
7579
7595
|
case "r":
|
@@ -7625,19 +7641,19 @@ class me extends Ft {
|
|
7625
7641
|
let t;
|
7626
7642
|
switch (e.type) {
|
7627
7643
|
case "DirectionalLight":
|
7628
|
-
t = new
|
7644
|
+
t = new xa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7629
7645
|
break;
|
7630
7646
|
case "HemisphereLight":
|
7631
|
-
t = new
|
7647
|
+
t = new wa(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7632
7648
|
break;
|
7633
7649
|
case "RectAreaLight":
|
7634
|
-
t = new
|
7650
|
+
t = new Gr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7635
7651
|
break;
|
7636
7652
|
case "PointLight":
|
7637
|
-
t = new
|
7653
|
+
t = new Sa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7638
7654
|
break;
|
7639
7655
|
case "SpotLight":
|
7640
|
-
t = new
|
7656
|
+
t = new Ca(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7641
7657
|
break;
|
7642
7658
|
}
|
7643
7659
|
}
|
@@ -7647,7 +7663,7 @@ class me extends Ft {
|
|
7647
7663
|
const s = this.controls.get(e.name);
|
7648
7664
|
if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI")
|
7649
7665
|
return;
|
7650
|
-
const n = new
|
7666
|
+
const n = new $r(e, t);
|
7651
7667
|
switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
|
7652
7668
|
case "Top":
|
7653
7669
|
case "Bottom":
|
@@ -7708,7 +7724,7 @@ class me extends Ft {
|
|
7708
7724
|
if (this.selectedItem === void 0)
|
7709
7725
|
return;
|
7710
7726
|
cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
|
7711
|
-
const s = 0.15, n = new
|
7727
|
+
const s = 0.15, n = new Oa();
|
7712
7728
|
n.start(), this.selectedItem.getWorldPosition(e.target0);
|
7713
7729
|
const a = () => {
|
7714
7730
|
const r = n.getDelta();
|
@@ -7793,7 +7809,7 @@ class di extends Ft {
|
|
7793
7809
|
static instance;
|
7794
7810
|
matrix = new ci();
|
7795
7811
|
position = new P();
|
7796
|
-
rotation = new
|
7812
|
+
rotation = new mn();
|
7797
7813
|
scale = new P();
|
7798
7814
|
open = !1;
|
7799
7815
|
constructor(e) {
|
@@ -7872,7 +7888,7 @@ class di extends Ft {
|
|
7872
7888
|
return `${this.props.three.app.appID}_transform`;
|
7873
7889
|
}
|
7874
7890
|
}
|
7875
|
-
function
|
7891
|
+
function Gs(i) {
|
7876
7892
|
switch (i) {
|
7877
7893
|
case "color":
|
7878
7894
|
return "Color";
|
@@ -7895,7 +7911,7 @@ function Zs(i) {
|
|
7895
7911
|
}
|
7896
7912
|
return i;
|
7897
7913
|
}
|
7898
|
-
function
|
7914
|
+
function Ro(i, e) {
|
7899
7915
|
function t() {
|
7900
7916
|
return `${e.app.appID}_light`;
|
7901
7917
|
}
|
@@ -7908,7 +7924,7 @@ function Do(i, e) {
|
|
7908
7924
|
for (const o in i.lightInfo) {
|
7909
7925
|
const c = i.lightInfo[o];
|
7910
7926
|
c !== void 0 && (c.isColor !== void 0 ? r.push({
|
7911
|
-
title:
|
7927
|
+
title: Gs(o),
|
7912
7928
|
prop: o,
|
7913
7929
|
type: "color",
|
7914
7930
|
value: c,
|
@@ -7922,7 +7938,7 @@ function Do(i, e) {
|
|
7922
7938
|
}
|
7923
7939
|
}
|
7924
7940
|
}) : r.push({
|
7925
|
-
title:
|
7941
|
+
title: Gs(o),
|
7926
7942
|
prop: o,
|
7927
7943
|
type: typeof c,
|
7928
7944
|
value: c,
|
@@ -7949,7 +7965,7 @@ function Do(i, e) {
|
|
7949
7965
|
}
|
7950
7966
|
);
|
7951
7967
|
}
|
7952
|
-
function
|
7968
|
+
function Io(i) {
|
7953
7969
|
const e = i.object, t = i.three;
|
7954
7970
|
function s() {
|
7955
7971
|
return `${t.app.appID}_animation`;
|
@@ -8020,7 +8036,7 @@ function Ro(i) {
|
|
8020
8036
|
}), o.push({
|
8021
8037
|
title: "Mixer",
|
8022
8038
|
items: v
|
8023
|
-
}), d = new
|
8039
|
+
}), d = new Aa(m), me.instance?.scene.add(d);
|
8024
8040
|
}
|
8025
8041
|
}
|
8026
8042
|
}
|
@@ -8038,7 +8054,7 @@ function Ro(i) {
|
|
8038
8054
|
}
|
8039
8055
|
);
|
8040
8056
|
}
|
8041
|
-
const
|
8057
|
+
const Yi = {
|
8042
8058
|
name: "",
|
8043
8059
|
uuid: "",
|
8044
8060
|
type: "",
|
@@ -8051,15 +8067,15 @@ const Hi = {
|
|
8051
8067
|
lightInfo: void 0,
|
8052
8068
|
children: []
|
8053
8069
|
};
|
8054
|
-
let ce = { ...
|
8055
|
-
function
|
8070
|
+
let ce = { ...Yi };
|
8071
|
+
function Lo(i) {
|
8056
8072
|
const [e, t] = Z(-1);
|
8057
8073
|
tt(() => {
|
8058
8074
|
function r(c) {
|
8059
8075
|
ce = { ...c.value }, t(Date.now());
|
8060
8076
|
}
|
8061
8077
|
function o() {
|
8062
|
-
ce = { ...
|
8078
|
+
ce = { ...Yi }, t(Date.now());
|
8063
8079
|
}
|
8064
8080
|
return D.addEventListener(A.SET_SCENE, o), D.addEventListener(A.SET_OBJECT, r), () => {
|
8065
8081
|
D.removeEventListener(A.SET_SCENE, o), D.removeEventListener(A.SET_OBJECT, r);
|
@@ -8071,7 +8087,7 @@ function Io(i) {
|
|
8071
8087
|
{
|
8072
8088
|
label: "Inspector",
|
8073
8089
|
button: ce.uuid.length > 0 ? /* @__PURE__ */ u.jsx("button", { className: "remove", onClick: () => {
|
8074
|
-
ge.instance.remove(ce.name), ce = { ...
|
8090
|
+
ge.instance.remove(ce.name), ce = { ...Yi }, t(Date.now());
|
8075
8091
|
} }) : void 0,
|
8076
8092
|
children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: i.class, children: ce.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
8077
8093
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
@@ -8108,27 +8124,27 @@ function Io(i) {
|
|
8108
8124
|
] }),
|
8109
8125
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
8110
8126
|
/* @__PURE__ */ u.jsx(di, { object: ce, three: i.three }),
|
8111
|
-
n ? /* @__PURE__ */ u.jsx(
|
8112
|
-
s.search("camera") > -1 ?
|
8113
|
-
s.search("light") > -1 ?
|
8114
|
-
a ?
|
8127
|
+
n ? /* @__PURE__ */ u.jsx(Io, { object: ce, three: i.three }) : null,
|
8128
|
+
s.search("camera") > -1 ? Wr(ce, i.three) : null,
|
8129
|
+
s.search("light") > -1 ? Ro(ce, i.three) : null,
|
8130
|
+
a ? Br(ce, i.three) : null
|
8115
8131
|
] })
|
8116
8132
|
] }) }, e)
|
8117
8133
|
},
|
8118
8134
|
"Inspector"
|
8119
8135
|
);
|
8120
8136
|
}
|
8121
|
-
class
|
8137
|
+
class ko extends Ft {
|
8122
8138
|
// Renderer
|
8123
8139
|
autoClear = !0;
|
8124
8140
|
autoClearColor = !0;
|
8125
8141
|
autoClearDepth = !0;
|
8126
8142
|
autoClearStencil = !0;
|
8127
|
-
outputColorSpace =
|
8143
|
+
outputColorSpace = us;
|
8128
8144
|
localClippingEnabled = !1;
|
8129
8145
|
clearColor = new et(0);
|
8130
8146
|
clearAlpha = 1;
|
8131
|
-
toneMapping =
|
8147
|
+
toneMapping = ps;
|
8132
8148
|
toneMappingExposure = 1;
|
8133
8149
|
constructor(e) {
|
8134
8150
|
super(e);
|
@@ -8252,11 +8268,11 @@ class Lo extends Ft {
|
|
8252
8268
|
options: [
|
8253
8269
|
{
|
8254
8270
|
title: "No Color Space",
|
8255
|
-
value:
|
8271
|
+
value: Da
|
8256
8272
|
},
|
8257
8273
|
{
|
8258
8274
|
title: "SRB Color Space",
|
8259
|
-
value:
|
8275
|
+
value: us
|
8260
8276
|
},
|
8261
8277
|
{
|
8262
8278
|
title: "Linear SRB Color Space",
|
@@ -8274,35 +8290,35 @@ class Lo extends Ft {
|
|
8274
8290
|
options: [
|
8275
8291
|
{
|
8276
8292
|
title: "None ",
|
8277
|
-
value:
|
8293
|
+
value: ps
|
8278
8294
|
},
|
8279
8295
|
{
|
8280
8296
|
title: "Linear ",
|
8281
|
-
value:
|
8297
|
+
value: Ra
|
8282
8298
|
},
|
8283
8299
|
{
|
8284
8300
|
title: "Reinhard",
|
8285
|
-
value:
|
8301
|
+
value: Ia
|
8286
8302
|
},
|
8287
8303
|
{
|
8288
8304
|
title: "Cineon ",
|
8289
|
-
value:
|
8305
|
+
value: La
|
8290
8306
|
},
|
8291
8307
|
{
|
8292
8308
|
title: "ACES Filmic",
|
8293
|
-
value:
|
8309
|
+
value: ka
|
8294
8310
|
},
|
8295
8311
|
{
|
8296
8312
|
title: "AgX",
|
8297
|
-
value:
|
8313
|
+
value: Ua
|
8298
8314
|
},
|
8299
8315
|
{
|
8300
8316
|
title: "Neutral",
|
8301
|
-
value:
|
8317
|
+
value: ja
|
8302
8318
|
},
|
8303
8319
|
{
|
8304
8320
|
title: "Custom",
|
8305
|
-
value:
|
8321
|
+
value: Na
|
8306
8322
|
}
|
8307
8323
|
],
|
8308
8324
|
onChange: (t, s) => {
|
@@ -8335,7 +8351,7 @@ class Lo extends Ft {
|
|
8335
8351
|
return `${this.props.three.app.appID}_renderer`;
|
8336
8352
|
}
|
8337
8353
|
}
|
8338
|
-
function
|
8354
|
+
function Uo(i) {
|
8339
8355
|
const [e] = Z([]), [t] = Z([]), [s, n] = Z(0), a = (c) => {
|
8340
8356
|
const l = c.value;
|
8341
8357
|
e.push(l), t.push(
|
@@ -8348,7 +8364,7 @@ function ko(i) {
|
|
8348
8364
|
onRefresh: () => {
|
8349
8365
|
i.three.refreshScene(l.name);
|
8350
8366
|
},
|
8351
|
-
children: /* @__PURE__ */ u.jsx(
|
8367
|
+
children: /* @__PURE__ */ u.jsx(Cs, { child: l, scene: l, three: i.three })
|
8352
8368
|
},
|
8353
8369
|
Math.random()
|
8354
8370
|
)
|
@@ -8366,7 +8382,7 @@ function ko(i) {
|
|
8366
8382
|
onRefresh: () => {
|
8367
8383
|
i.three.refreshScene(l.name);
|
8368
8384
|
},
|
8369
|
-
children: /* @__PURE__ */ u.jsx(
|
8385
|
+
children: /* @__PURE__ */ u.jsx(Cs, { child: l, scene: l, three: i.three })
|
8370
8386
|
},
|
8371
8387
|
Math.random()
|
8372
8388
|
), n(Date.now());
|
@@ -8384,8 +8400,8 @@ function ko(i) {
|
|
8384
8400
|
D.removeEventListener(A.ADD_SCENE, a), D.removeEventListener(A.REFRESH_SCENE, r), D.removeEventListener(A.REMOVE_SCENE, o);
|
8385
8401
|
}), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
|
8386
8402
|
/* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, s),
|
8387
|
-
/* @__PURE__ */ u.jsx(Io, { three: i.three }),
|
8388
8403
|
/* @__PURE__ */ u.jsx(Lo, { three: i.three }),
|
8404
|
+
/* @__PURE__ */ u.jsx(ko, { three: i.three }),
|
8389
8405
|
/* @__PURE__ */ u.jsx(te, { three: i.three })
|
8390
8406
|
] });
|
8391
8407
|
}
|
@@ -8430,7 +8446,7 @@ function al(i) {
|
|
8430
8446
|
}
|
8431
8447
|
d.material.needsUpdate = !0;
|
8432
8448
|
};
|
8433
|
-
c.value.src.length > 0 ?
|
8449
|
+
c.value.src.length > 0 ? yn(c.value.src).then((m) => {
|
8434
8450
|
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
8451
|
}) : p(null);
|
8436
8452
|
}
|
@@ -8438,7 +8454,7 @@ function al(i) {
|
|
8438
8454
|
const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
|
8439
8455
|
if (f !== void 0)
|
8440
8456
|
try {
|
8441
|
-
p !== void 0 ?
|
8457
|
+
p !== void 0 ? mr(f, p)[c](d) : f[c](d);
|
8442
8458
|
} catch (w) {
|
8443
8459
|
console.log("Error requesting method:"), console.log(w), console.log(c), console.log(d);
|
8444
8460
|
}
|
@@ -8448,7 +8464,7 @@ function al(i) {
|
|
8448
8464
|
};
|
8449
8465
|
}, []), null;
|
8450
8466
|
}
|
8451
|
-
function
|
8467
|
+
function jo(i) {
|
8452
8468
|
return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: i.ref, style: i.style, children: [
|
8453
8469
|
/* @__PURE__ */ u.jsx("div", { className: "header", children: i.header }),
|
8454
8470
|
i.children,
|
@@ -8456,7 +8472,7 @@ function Uo(i) {
|
|
8456
8472
|
] });
|
8457
8473
|
}
|
8458
8474
|
function rl(i) {
|
8459
|
-
return /* @__PURE__ */ u.jsx(
|
8475
|
+
return /* @__PURE__ */ u.jsx(jo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
8460
8476
|
/* @__PURE__ */ u.jsx(
|
8461
8477
|
me,
|
8462
8478
|
{
|
@@ -8467,65 +8483,65 @@ function rl(i) {
|
|
8467
8483
|
onSceneUpdate: i.onSceneUpdate
|
8468
8484
|
}
|
8469
8485
|
),
|
8470
|
-
/* @__PURE__ */ u.jsx(
|
8486
|
+
/* @__PURE__ */ u.jsx(Uo, { three: i.three })
|
8471
8487
|
] }) });
|
8472
8488
|
}
|
8473
8489
|
export {
|
8474
8490
|
oi as Accordion,
|
8475
8491
|
Qo as Application,
|
8476
|
-
|
8477
|
-
|
8478
|
-
|
8479
|
-
|
8480
|
-
|
8481
|
-
|
8482
|
-
|
8483
|
-
|
8492
|
+
Gi as BaseRemote,
|
8493
|
+
En as ChildObject,
|
8494
|
+
Cs as ContainerObject,
|
8495
|
+
Er as Draggable,
|
8496
|
+
br as DraggableItem,
|
8497
|
+
Cr as Dropdown,
|
8498
|
+
Sr as DropdownItem,
|
8499
|
+
jo as Editor,
|
8484
8500
|
qo as ElementProxy,
|
8485
|
-
|
8501
|
+
lr as ElementProxyReceiver,
|
8486
8502
|
ti as ExportTexture,
|
8487
|
-
|
8503
|
+
Lo as Inspector,
|
8488
8504
|
me as MultiView,
|
8489
|
-
|
8505
|
+
bn as NavButton,
|
8490
8506
|
Ko as ProxyManager,
|
8491
|
-
|
8507
|
+
Xa as QualityType,
|
8492
8508
|
Jo as RemoteComponents,
|
8493
8509
|
nl as RemoteController,
|
8494
8510
|
il as RemoteTheatre,
|
8495
8511
|
sl as RemoteThree,
|
8496
8512
|
al as SceneInspector,
|
8497
|
-
|
8498
|
-
|
8499
|
-
|
8513
|
+
Uo as SidePanel,
|
8514
|
+
Zs as Spline,
|
8515
|
+
Po as SplineEditor,
|
8500
8516
|
rl as ThreeEditor,
|
8501
8517
|
A as ToolEvents,
|
8502
8518
|
ge as Transform,
|
8503
8519
|
$o as WebworkerEventHandlers,
|
8504
8520
|
ri as capitalize,
|
8505
8521
|
$e as clamp,
|
8506
|
-
|
8507
|
-
|
8508
|
-
|
8522
|
+
ms as colorToHex,
|
8523
|
+
za as copyToClipboard,
|
8524
|
+
Go as cubicBezier,
|
8509
8525
|
tl as customizeTheatreElements,
|
8510
|
-
|
8526
|
+
Zo as damp,
|
8511
8527
|
D as debugDispatcher,
|
8512
|
-
|
8513
|
-
|
8528
|
+
Ho as defaultTheatreCallback,
|
8529
|
+
Yo as detectSettings,
|
8514
8530
|
He as dispose,
|
8515
|
-
|
8516
|
-
|
8517
|
-
|
8518
|
-
|
8519
|
-
|
8520
|
-
|
8531
|
+
Ja as disposeMaterial,
|
8532
|
+
vs as disposeTexture,
|
8533
|
+
Vo as distance,
|
8534
|
+
Ni as hierarchyUUID,
|
8535
|
+
Ya as isColor,
|
8536
|
+
Bo as map,
|
8521
8537
|
Nt as mix,
|
8522
8538
|
ai as noop,
|
8523
|
-
|
8539
|
+
Ui as normalize,
|
8524
8540
|
Xo as parseModelLite,
|
8525
|
-
|
8526
|
-
|
8541
|
+
Ha as randomID,
|
8542
|
+
ys as resetThreeObjects,
|
8527
8543
|
Pe as round,
|
8528
|
-
|
8544
|
+
Wo as roundTo,
|
8529
8545
|
el as theatreEditorApp,
|
8530
|
-
|
8546
|
+
ji as totalThreeObjects
|
8531
8547
|
};
|