@tomorrowevening/hermes 0.0.125 → 0.0.126
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 +1 -1
- package/dist/hermes.es.js +281 -276
- package/package.json +3 -3
- package/types/utils/three.d.ts +5 -4
package/dist/hermes.es.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
import { OrthographicCamera as Ii, Scene as Gs, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as qe, Mesh as M, LinearSRGBColorSpace as Nt, ObjectLoader as Gn, AnimationMixer as Xn, EventDispatcher as Yi, Texture as
|
2
|
-
import fn, { useState as Z, useRef as J, useEffect as tt, useMemo as jt, Component as Ft, createRef as Ve, forwardRef as
|
1
|
+
import { OrthographicCamera as Ii, Scene as Gs, MeshBasicMaterial as Je, BufferGeometry as _t, Float32BufferAttribute as qe, Mesh as M, LinearSRGBColorSpace as Nt, ObjectLoader as Gn, AnimationMixer as Xn, AnimationClip as $n, EventDispatcher as Yi, Texture as Kn, RepeatWrapping as ls, Color as et, ColorManagement as mt, WebGLRenderTarget as qn, FrontSide as Qn, BackSide as Xs, DoubleSide as Bi, 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 $s, OneFactor as Ks, SrcColorFactor as qs, OneMinusSrcColorFactor as Qs, SrcAlphaFactor as Js, OneMinusSrcAlphaFactor as en, DstAlphaFactor as tn, OneMinusDstAlphaFactor as sn, DstColorFactor as nn, OneMinusDstColorFactor as an, SrcAlphaSaturateFactor as ha, ConstantColorFactor as rn, OneMinusConstantColorFactor as on, ConstantAlphaFactor as ln, OneMinusConstantAlphaFactor as cn, Line as Ie, LineBasicMaterial as Vi, Ray as da, Plane as ua, MathUtils as pa, Vector3 as P, Controls as hn, MOUSE as gt, TOUCH as ft, Quaternion as Ce, Spherical as Li, Vector2 as pe, ShaderMaterial as dn, GLSL3 as ma, PlaneGeometry as un, Raycaster as ni, Euler as pn, Matrix4 as ci, Object3D as vt, CylinderGeometry as ve, BoxGeometry as de, OctahedronGeometry as Zt, SphereGeometry as mn, TorusGeometry as Et, CatmullRomCurve3 as cs, Group as fa, AxesHelper as hs, MeshDepthMaterial as ga, MeshNormalMaterial as _a, PerspectiveCamera as Ct, WebGLRenderer as va, CameraHelper as ya, SkinnedMesh as ba, SpotLightHelper as Ea, PointLightHelper as Ca, HemisphereLightHelper as Sa, DirectionalLightHelper as wa, Clock as xa, Vector4 as Oa, Box3 as Ta, Sphere as Ma, SkeletonHelper as Pa, SRGBColorSpace as ds, NoToneMapping as us, NoColorSpace as Aa, LinearToneMapping as Da, ReinhardToneMapping as Ra, CineonToneMapping as Ia, ACESFilmicToneMapping as La, AgXToneMapping as ka, NeutralToneMapping as Ua, CustomToneMapping as ja } from "three";
|
2
|
+
import fn, { useState as Z, useRef as J, useEffect as tt, useMemo as jt, Component as Ft, createRef as Ve, forwardRef as Na } from "react";
|
3
3
|
import { Reorder as gn } from "framer-motion";
|
4
4
|
const ai = () => {
|
5
|
-
},
|
5
|
+
}, Ro = () => {
|
6
6
|
};
|
7
7
|
function ri(s) {
|
8
8
|
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
9
9
|
}
|
10
|
-
function
|
10
|
+
function Fa(s) {
|
11
11
|
const e = JSON.stringify(s);
|
12
12
|
return navigator.clipboard.writeText(e), e;
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function za() {
|
15
15
|
return Math.round(Math.random() * 1e6).toString();
|
16
16
|
}
|
17
|
-
function
|
17
|
+
function Ha(s) {
|
18
18
|
return s.r !== void 0 && s.g !== void 0 && s.b !== void 0;
|
19
19
|
}
|
20
20
|
function ps(s) {
|
@@ -49,7 +49,7 @@ function vi(s, e, t, i) {
|
|
49
49
|
c((i = i.apply(s, e || [])).next());
|
50
50
|
});
|
51
51
|
}
|
52
|
-
const
|
52
|
+
const Ya = ["geforce 320m", "geforce 8600", "geforce 8600m gt", "geforce 8800 gs", "geforce 8800 gt", "geforce 9400", "geforce 9400m g", "geforce 9400m", "geforce 9600m gt", "geforce 9600m", "geforce fx go5200", "geforce gt 120", "geforce gt 130", "geforce gt 330m", "geforce gtx 285", "google swiftshader", "intel g41", "intel g45", "intel gma 4500mhd", "intel gma x3100", "intel hd 3000", "intel q45", "legacy", "mali-2", "mali-3", "mali-4", "quadro fx 1500", "quadro fx 4", "quadro fx 5", "radeon hd 2400", "radeon hd 2600", "radeon hd 4670", "radeon hd 4850", "radeon hd 4870", "radeon hd 5670", "radeon hd 5750", "radeon hd 6290", "radeon hd 6300", "radeon hd 6310", "radeon hd 6320", "radeon hd 6490m", "radeon hd 6630m", "radeon hd 6750m", "radeon hd 6770m", "radeon hd 6970m", "sgx 543", "sgx543"];
|
53
53
|
function ms(s) {
|
54
54
|
return s = s.toLowerCase().replace(/.*angle ?\((.+)\)(?: on vulkan [0-9.]+)?$/i, "$1").replace(/\s(\d{1,2}gb|direct3d.+$)|\(r\)| \([^)]+\)$/g, "").replace(/(?:vulkan|opengl) \d+\.\d+(?:\.\d+)?(?: \((.*)\))?/, "$1");
|
55
55
|
}
|
@@ -59,7 +59,7 @@ const _n = typeof window > "u", Le = (() => {
|
|
59
59
|
const { userAgent: s, platform: e, maxTouchPoints: t } = window.navigator, i = /(iphone|ipod|ipad)/i.test(s), n = e === "iPad" || e === "MacIntel" && t > 0 && !window.MSStream;
|
60
60
|
return { isIpad: n, isMobile: /android/i.test(s) || i || n, isSafari12: /Version\/12.+Safari/.test(s), isFirefox: /Firefox/.test(s) };
|
61
61
|
})();
|
62
|
-
function
|
62
|
+
function Ba(s, e, t) {
|
63
63
|
if (!t)
|
64
64
|
return [e];
|
65
65
|
const i = function(l) {
|
@@ -100,7 +100,7 @@ class fs extends Error {
|
|
100
100
|
}
|
101
101
|
}
|
102
102
|
const yi = [], gs = [];
|
103
|
-
function
|
103
|
+
function Va(s, e) {
|
104
104
|
if (s === e)
|
105
105
|
return 0;
|
106
106
|
const t = s;
|
@@ -121,10 +121,10 @@ function Ba(s, e) {
|
|
121
121
|
c = r === gs[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 Za(s) {
|
125
125
|
return s != null;
|
126
126
|
}
|
127
|
-
const
|
127
|
+
const Wa = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60], override: t = {}, glContext: i, failIfMajorPerformanceCaveat: n = !1, benchmarksURL: r = "https://unpkg.com/detect-gpu@5.0.57/dist/benchmarks" } = {}) => vi(void 0, void 0, void 0, function* () {
|
128
128
|
const a = {};
|
129
129
|
if (_n)
|
130
130
|
return { tier: 0, type: "SSR" };
|
@@ -152,7 +152,7 @@ const Za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
152
152
|
if (p = O ? w.getParameter(O.UNMASKED_RENDERER_WEBGL) : w.getParameter(w.RENDERER), !p)
|
153
153
|
return m(1, "FALLBACK");
|
154
154
|
C = p, p = ms(p), f = function(L, j, R) {
|
155
|
-
return j === "apple gpu" ?
|
155
|
+
return j === "apple gpu" ? Ba(L, j, R) : [j];
|
156
156
|
}(w, p, c);
|
157
157
|
}
|
158
158
|
const y = (yield Promise.all(f.map(function(w) {
|
@@ -186,7 +186,7 @@ const Za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
186
186
|
if (re === 0)
|
187
187
|
return;
|
188
188
|
const q = w.split(/[.,()\[\]/\s]/g).sort().filter((W, le, Te) => le === 0 || W !== Te[le - 1]).join(" ");
|
189
|
-
let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W,
|
189
|
+
let $, [Ue, , , , he] = re > 1 ? _e.map((W) => [W, Va(q, W[2])]).sort(([, W], [, le]) => W - le)[0][0] : _e[0], Ee = Number.MAX_VALUE;
|
190
190
|
const { devicePixelRatio: se } = window, je = l.width * se * l.height * se;
|
191
191
|
for (const W of he) {
|
192
192
|
const [le, Te] = W, yt = le * Te, it = Math.abs(je - yt);
|
@@ -197,9 +197,9 @@ const Za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
197
197
|
const [, , Ne, Fe] = $;
|
198
198
|
return [Ee, Ne, Ue, Fe];
|
199
199
|
});
|
200
|
-
}))).filter(
|
200
|
+
}))).filter(Za).sort(([w = Number.MAX_VALUE, O], [L = Number.MAX_VALUE, j]) => w === L ? O - j : w - L);
|
201
201
|
if (!y.length) {
|
202
|
-
const w =
|
202
|
+
const w = Ya.find((O) => p.includes(O));
|
203
203
|
return w ? m(0, "BLOCKLISTED", w) : m(1, "FALLBACK", `${p} (${C})`);
|
204
204
|
}
|
205
205
|
const [, T, g, v] = y[0];
|
@@ -211,10 +211,10 @@ const Za = ({ mobileTiers: s = [0, 15, 30, 60], desktopTiers: e = [0, 15, 30, 60
|
|
211
211
|
T >= S[w] && (E = w);
|
212
212
|
return m(E, "BENCHMARK", g, T, v);
|
213
213
|
});
|
214
|
-
var
|
215
|
-
function
|
214
|
+
var Ga = /* @__PURE__ */ ((s) => (s[s.High = 0] = "High", s[s.Medium = 1] = "Medium", s[s.Low = 2] = "Low", s))(Ga || {});
|
215
|
+
function Io(s) {
|
216
216
|
return new Promise((e) => {
|
217
|
-
|
217
|
+
Wa().then((t) => {
|
218
218
|
let i = !1;
|
219
219
|
const n = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
220
220
|
if (i = "transferControlToOffscreen" in s, n) {
|
@@ -244,16 +244,16 @@ function _s(s, e, t) {
|
|
244
244
|
function ki(s, e, t) {
|
245
245
|
return s * (1 - t) + e * t;
|
246
246
|
}
|
247
|
-
function
|
247
|
+
function Lo(s, e) {
|
248
248
|
const t = s - e;
|
249
249
|
return Math.sqrt(t * t);
|
250
250
|
}
|
251
251
|
function Pe(s, e = 1) {
|
252
252
|
return Number(s.toFixed(e));
|
253
253
|
}
|
254
|
-
const
|
254
|
+
const ko = (s) => {
|
255
255
|
s?.dispose();
|
256
|
-
},
|
256
|
+
}, Xa = (s) => {
|
257
257
|
s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
|
258
258
|
}, He = (s) => {
|
259
259
|
if (s) {
|
@@ -263,7 +263,7 @@ const Lo = (s) => {
|
|
263
263
|
}
|
264
264
|
if (s.parent && s.parent.remove(s), s.isMesh) {
|
265
265
|
const e = s;
|
266
|
-
e.geometry?.dispose(),
|
266
|
+
e.geometry?.dispose(), Xa(e.material);
|
267
267
|
}
|
268
268
|
s.dispose !== void 0 && s.dispose();
|
269
269
|
}
|
@@ -332,21 +332,26 @@ class ti {
|
|
332
332
|
return this.renderer.domElement;
|
333
333
|
}
|
334
334
|
}
|
335
|
-
function
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
335
|
+
function Uo(s) {
|
336
|
+
return new Promise((e) => {
|
337
|
+
const t = new Gn();
|
338
|
+
t.parseAsync(s.scene).then((i) => {
|
339
|
+
const n = new Xn(i);
|
340
|
+
if (s.animations.length > 0) {
|
341
|
+
const a = s.animations.map((c) => $n.parse(c));
|
342
|
+
n.clipAction(a[0]).play();
|
343
|
+
}
|
344
|
+
const r = [];
|
345
|
+
s.cameras && s.cameras.length > 0 && s.cameras.forEach((a) => {
|
346
|
+
const o = t.parse(a);
|
347
|
+
r.push(o);
|
348
|
+
}), e({
|
349
|
+
model: i,
|
350
|
+
mixer: n,
|
351
|
+
cameras: r
|
352
|
+
});
|
353
|
+
});
|
354
|
+
});
|
350
355
|
}
|
351
356
|
const at = Zi([
|
352
357
|
"ctrlKey",
|
@@ -359,32 +364,32 @@ const at = Zi([
|
|
359
364
|
"clientY",
|
360
365
|
"pageX",
|
361
366
|
"pageY"
|
362
|
-
]),
|
367
|
+
]), $a = Zi([
|
363
368
|
"clientX",
|
364
369
|
"clientY",
|
365
370
|
"deltaX",
|
366
371
|
"deltaY",
|
367
372
|
"deltaMode"
|
368
|
-
]),
|
373
|
+
]), Ka = Zi([
|
369
374
|
"ctrlKey",
|
370
375
|
"metaKey",
|
371
376
|
"shiftKey",
|
372
377
|
"keyCode"
|
373
378
|
]);
|
374
|
-
function
|
375
|
-
s.preventDefault(),
|
379
|
+
function qa(s, e) {
|
380
|
+
s.preventDefault(), $a(s, e);
|
376
381
|
}
|
377
|
-
function
|
382
|
+
function Qa(s) {
|
378
383
|
s.preventDefault();
|
379
384
|
}
|
380
|
-
function
|
385
|
+
function Ja(s, e, t) {
|
381
386
|
for (const i of e)
|
382
387
|
t[i] = s[i];
|
383
388
|
}
|
384
389
|
function Zi(s) {
|
385
390
|
return function(t, i) {
|
386
391
|
const n = { type: t.type };
|
387
|
-
|
392
|
+
Ja(t, s, n), i(n);
|
388
393
|
};
|
389
394
|
}
|
390
395
|
function bi(s, e) {
|
@@ -398,7 +403,7 @@ function bi(s, e) {
|
|
398
403
|
}
|
399
404
|
e(i);
|
400
405
|
}
|
401
|
-
const
|
406
|
+
const er = {
|
402
407
|
37: !0,
|
403
408
|
// left
|
404
409
|
38: !0,
|
@@ -408,12 +413,12 @@ const Ja = {
|
|
408
413
|
40: !0
|
409
414
|
// down
|
410
415
|
};
|
411
|
-
function
|
416
|
+
function tr(s, e) {
|
412
417
|
const { keyCode: t } = s;
|
413
|
-
|
418
|
+
er[t] && (s.preventDefault(), Ka(s, e));
|
414
419
|
}
|
415
|
-
const
|
416
|
-
contextmenu:
|
420
|
+
const jo = {
|
421
|
+
contextmenu: Qa,
|
417
422
|
mousedown: at,
|
418
423
|
mousemove: at,
|
419
424
|
mouseup: at,
|
@@ -423,15 +428,15 @@ const Uo = {
|
|
423
428
|
touchstart: bi,
|
424
429
|
touchmove: bi,
|
425
430
|
touchend: bi,
|
426
|
-
wheel:
|
427
|
-
keydown:
|
431
|
+
wheel: qa,
|
432
|
+
keydown: tr
|
428
433
|
};
|
429
|
-
let
|
430
|
-
class
|
434
|
+
let ir = 0;
|
435
|
+
class No {
|
431
436
|
id;
|
432
437
|
worker;
|
433
438
|
constructor(e, t, i) {
|
434
|
-
this.id =
|
439
|
+
this.id = ir++, this.worker = t;
|
435
440
|
const n = (a) => {
|
436
441
|
this.worker.postMessage({
|
437
442
|
type: "event",
|
@@ -459,7 +464,7 @@ class jo {
|
|
459
464
|
window.addEventListener("resize", r), r();
|
460
465
|
}
|
461
466
|
}
|
462
|
-
class
|
467
|
+
class sr extends Yi {
|
463
468
|
style = {};
|
464
469
|
left = 0;
|
465
470
|
top = 0;
|
@@ -513,13 +518,13 @@ class ir extends Yi {
|
|
513
518
|
return this;
|
514
519
|
}
|
515
520
|
}
|
516
|
-
class
|
521
|
+
class Fo {
|
517
522
|
targets = {};
|
518
523
|
constructor() {
|
519
524
|
this.handleEvent = this.handleEvent.bind(this);
|
520
525
|
}
|
521
526
|
makeProxy(e) {
|
522
|
-
const { id: t } = e, i = new
|
527
|
+
const { id: t } = e, i = new sr();
|
523
528
|
this.targets[t] = i;
|
524
529
|
}
|
525
530
|
getProxy(e) {
|
@@ -529,7 +534,7 @@ class No {
|
|
529
534
|
this.targets[e.id]?.handleEvent(e.data);
|
530
535
|
}
|
531
536
|
}
|
532
|
-
class
|
537
|
+
class zo {
|
533
538
|
components = /* @__PURE__ */ new Map();
|
534
539
|
listen;
|
535
540
|
// Protected
|
@@ -601,7 +606,7 @@ class Wi {
|
|
601
606
|
handleEditor(e, t, i) {
|
602
607
|
}
|
603
608
|
}
|
604
|
-
class
|
609
|
+
class Ho extends Wi {
|
605
610
|
selectDropdown(e, t) {
|
606
611
|
this.app.send({
|
607
612
|
event: "selectComponent",
|
@@ -633,7 +638,7 @@ class zo extends Wi {
|
|
633
638
|
}
|
634
639
|
}
|
635
640
|
}
|
636
|
-
function
|
641
|
+
function Yo(s, e, t) {
|
637
642
|
if (s.editor) {
|
638
643
|
t.ui.restore(), t.onSelectionChange((a) => {
|
639
644
|
a.length < 1 || a.forEach((o) => {
|
@@ -676,7 +681,7 @@ function Ho(s, e, t) {
|
|
676
681
|
} else
|
677
682
|
t.ui.hide();
|
678
683
|
}
|
679
|
-
function
|
684
|
+
function Bo() {
|
680
685
|
setTimeout(() => {
|
681
686
|
const s = document.getElementById("theatrejs-studio-root");
|
682
687
|
if (s === null || s.shadowRoot === null)
|
@@ -702,7 +707,7 @@ function Yo() {
|
|
702
707
|
}
|
703
708
|
}, 1e3);
|
704
709
|
}
|
705
|
-
class
|
710
|
+
class Vo extends Wi {
|
706
711
|
project;
|
707
712
|
sheets = /* @__PURE__ */ new Map();
|
708
713
|
sheetObjects = /* @__PURE__ */ new Map();
|
@@ -769,7 +774,7 @@ class Bo extends Wi {
|
|
769
774
|
if (this.app.editor) {
|
770
775
|
for (const f in p) {
|
771
776
|
const C = p[f];
|
772
|
-
typeof C == "object" &&
|
777
|
+
typeof C == "object" && Ha(C) && (p[f] = {
|
773
778
|
r: C.r,
|
774
779
|
g: C.g,
|
775
780
|
b: C.b,
|
@@ -876,7 +881,7 @@ class Bo extends Wi {
|
|
876
881
|
this.studio?.ui.hide();
|
877
882
|
}
|
878
883
|
}
|
879
|
-
function
|
884
|
+
function nr(s) {
|
880
885
|
if (s.name === "cameras")
|
881
886
|
return "camera";
|
882
887
|
if (s.name === "interactive")
|
@@ -901,7 +906,7 @@ function pt(s) {
|
|
901
906
|
e.children.push(pt(t));
|
902
907
|
}), e;
|
903
908
|
}
|
904
|
-
function
|
909
|
+
function ar(s) {
|
905
910
|
const e = {};
|
906
911
|
for (const t in s) {
|
907
912
|
const i = s[t].value;
|
@@ -917,7 +922,7 @@ function nr(s) {
|
|
917
922
|
}
|
918
923
|
return e;
|
919
924
|
}
|
920
|
-
function
|
925
|
+
function rr(s) {
|
921
926
|
switch (s) {
|
922
927
|
case "blendSrcAlpha":
|
923
928
|
case "blendDstAlpha":
|
@@ -932,7 +937,7 @@ function ar(s) {
|
|
932
937
|
function rt(s) {
|
933
938
|
const e = {};
|
934
939
|
for (const t in s) {
|
935
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
940
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || rr(t))
|
936
941
|
continue;
|
937
942
|
const i = typeof s[t], n = s[t];
|
938
943
|
switch (i) {
|
@@ -946,7 +951,7 @@ function rt(s) {
|
|
946
951
|
src: ti.renderToBlob(n),
|
947
952
|
offset: [n.offset.x, n.offset.y],
|
948
953
|
repeat: [n.repeat.x, n.repeat.y]
|
949
|
-
} : t === "uniforms" && (e[t] =
|
954
|
+
} : t === "uniforms" && (e[t] = ar(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
950
955
|
src: "",
|
951
956
|
offset: [0, 0],
|
952
957
|
repeat: [1, 1]
|
@@ -1037,7 +1042,7 @@ function Ei(s) {
|
|
1037
1042
|
});
|
1038
1043
|
return e;
|
1039
1044
|
}
|
1040
|
-
function
|
1045
|
+
function or(s, e) {
|
1041
1046
|
const t = e.split(".");
|
1042
1047
|
switch (t.length) {
|
1043
1048
|
case 1:
|
@@ -1054,7 +1059,7 @@ function rr(s, e) {
|
|
1054
1059
|
return s[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
1055
1060
|
}
|
1056
1061
|
}
|
1057
|
-
function
|
1062
|
+
function lr(s, e) {
|
1058
1063
|
for (const t in e)
|
1059
1064
|
s[t] = e[t];
|
1060
1065
|
}
|
@@ -1099,19 +1104,19 @@ function ie(s, e, t) {
|
|
1099
1104
|
a = s[i[0]][i[1]][i[2]][i[3]][i[4]];
|
1100
1105
|
break;
|
1101
1106
|
}
|
1102
|
-
a != null &&
|
1107
|
+
a != null && lr(a, t);
|
1103
1108
|
}
|
1104
1109
|
}
|
1105
1110
|
function vn(s) {
|
1106
1111
|
return new Promise((e, t) => {
|
1107
1112
|
const i = new Image();
|
1108
1113
|
i.onload = () => {
|
1109
|
-
const n = new
|
1114
|
+
const n = new Kn(i);
|
1110
1115
|
n.wrapS = ls, n.wrapT = ls, n.needsUpdate = !0, e(n);
|
1111
1116
|
}, i.onerror = t, i.src = s;
|
1112
1117
|
});
|
1113
1118
|
}
|
1114
|
-
class
|
1119
|
+
class Zo extends Wi {
|
1115
1120
|
canvas = null;
|
1116
1121
|
// Canvas or OffscreenCanvas
|
1117
1122
|
inputElement = null;
|
@@ -1397,7 +1402,7 @@ class Vo extends Wi {
|
|
1397
1402
|
}
|
1398
1403
|
// Renderer
|
1399
1404
|
addRT(e, t) {
|
1400
|
-
const i = new
|
1405
|
+
const i = new qn(32, 32, t);
|
1401
1406
|
i.texture.name = e, this.renderTargets.set(e, i);
|
1402
1407
|
}
|
1403
1408
|
resize(e, t) {
|
@@ -1432,7 +1437,7 @@ var Ni = { exports: {} }, St = {};
|
|
1432
1437
|
* LICENSE file in the root directory of this source tree.
|
1433
1438
|
*/
|
1434
1439
|
var ys;
|
1435
|
-
function
|
1440
|
+
function cr() {
|
1436
1441
|
if (ys)
|
1437
1442
|
return St;
|
1438
1443
|
ys = 1;
|
@@ -1460,7 +1465,7 @@ var wt = {};
|
|
1460
1465
|
* LICENSE file in the root directory of this source tree.
|
1461
1466
|
*/
|
1462
1467
|
var bs;
|
1463
|
-
function
|
1468
|
+
function hr() {
|
1464
1469
|
return bs || (bs = 1, process.env.NODE_ENV !== "production" && function() {
|
1465
1470
|
var s = fn, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), C = Symbol.iterator, y = "@@iterator";
|
1466
1471
|
function T(h) {
|
@@ -2046,16 +2051,16 @@ Check the top-level render call using <` + x + ">.");
|
|
2046
2051
|
wt.Fragment = i, wt.jsx = Zn, wt.jsxs = Wn;
|
2047
2052
|
}()), wt;
|
2048
2053
|
}
|
2049
|
-
process.env.NODE_ENV === "production" ? Ni.exports =
|
2054
|
+
process.env.NODE_ENV === "production" ? Ni.exports = cr() : Ni.exports = hr();
|
2050
2055
|
var u = Ni.exports;
|
2051
2056
|
function yn(s) {
|
2052
2057
|
return s.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ u.jsx("button", { children: s.title });
|
2053
2058
|
}
|
2054
|
-
const
|
2059
|
+
const dr = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
2055
2060
|
/* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
2056
2061
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
2057
2062
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
2058
|
-
] }),
|
2063
|
+
] }), ur = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
|
2059
2064
|
"path",
|
2060
2065
|
{
|
2061
2066
|
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
|
@@ -2063,16 +2068,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
|
|
2063
2068
|
C11,8.22,10.74,8,10.43,8z`
|
2064
2069
|
}
|
2065
2070
|
) });
|
2066
|
-
function
|
2071
|
+
function pr(s) {
|
2067
2072
|
return /* @__PURE__ */ u.jsx(gn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
2068
|
-
|
2073
|
+
ur,
|
2069
2074
|
/* @__PURE__ */ u.jsx("span", { children: s.title }),
|
2070
2075
|
/* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
|
2071
2076
|
s.onDelete(s.index);
|
2072
|
-
}, children:
|
2077
|
+
}, children: dr })
|
2073
2078
|
] }) }, s.title);
|
2074
2079
|
}
|
2075
|
-
function
|
2080
|
+
function mr(s) {
|
2076
2081
|
const [e, t] = Z(!1), [i, n] = Z(s.options), r = (l) => {
|
2077
2082
|
s.onDragComplete(l), n(l);
|
2078
2083
|
}, a = (l) => {
|
@@ -2080,7 +2085,7 @@ function pr(s) {
|
|
2080
2085
|
d.splice(l, 1), r(d);
|
2081
2086
|
}, o = [];
|
2082
2087
|
i.forEach((l, d) => {
|
2083
|
-
o.push(/* @__PURE__ */ u.jsx(
|
2088
|
+
o.push(/* @__PURE__ */ u.jsx(pr, { index: d, title: l, onDelete: a }, l));
|
2084
2089
|
});
|
2085
2090
|
let c = "dropdown draggable";
|
2086
2091
|
return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
@@ -2088,10 +2093,10 @@ function pr(s) {
|
|
2088
2093
|
/* @__PURE__ */ u.jsx(gn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
|
2089
2094
|
] });
|
2090
2095
|
}
|
2091
|
-
function
|
2096
|
+
function fr(s) {
|
2092
2097
|
const [e, t] = Z(!1), i = [];
|
2093
2098
|
s.options.map((r, a) => {
|
2094
|
-
s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(
|
2099
|
+
s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(gr, { option: r }, a));
|
2095
2100
|
});
|
2096
2101
|
let n = "dropdown";
|
2097
2102
|
return s.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
|
@@ -2113,13 +2118,13 @@ function mr(s) {
|
|
2113
2118
|
}
|
2114
2119
|
);
|
2115
2120
|
}
|
2116
|
-
function
|
2121
|
+
function gr(s) {
|
2117
2122
|
const { option: e } = s, [t, i] = Z("");
|
2118
2123
|
let n;
|
2119
2124
|
switch (e.type) {
|
2120
2125
|
case "draggable":
|
2121
2126
|
n = /* @__PURE__ */ u.jsx(
|
2122
|
-
|
2127
|
+
mr,
|
2123
2128
|
{
|
2124
2129
|
title: e.title,
|
2125
2130
|
options: e.value,
|
@@ -2132,7 +2137,7 @@ function fr(s) {
|
|
2132
2137
|
break;
|
2133
2138
|
case "dropdown":
|
2134
2139
|
n = /* @__PURE__ */ u.jsx(
|
2135
|
-
|
2140
|
+
fr,
|
2136
2141
|
{
|
2137
2142
|
title: e.title,
|
2138
2143
|
options: e.value,
|
@@ -2153,9 +2158,9 @@ function fr(s) {
|
|
2153
2158
|
);
|
2154
2159
|
break;
|
2155
2160
|
}
|
2156
|
-
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n },
|
2161
|
+
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, za());
|
2157
2162
|
}
|
2158
|
-
function
|
2163
|
+
function Wo(s, e, t) {
|
2159
2164
|
function i(r) {
|
2160
2165
|
switch (e.forEach((a) => {
|
2161
2166
|
a.callback(s, a.remote, r);
|
@@ -2269,7 +2274,7 @@ function bn(s) {
|
|
2269
2274
|
}
|
2270
2275
|
}
|
2271
2276
|
),
|
2272
|
-
/* @__PURE__ */ u.jsx("div", { className: `icon ${
|
2277
|
+
/* @__PURE__ */ u.jsx("div", { className: `icon ${nr(s.child)}` })
|
2273
2278
|
] }),
|
2274
2279
|
/* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
|
2275
2280
|
] }, Math.random()) });
|
@@ -2371,7 +2376,7 @@ function Qe(s) {
|
|
2371
2376
|
] })
|
2372
2377
|
] });
|
2373
2378
|
}
|
2374
|
-
function
|
2379
|
+
function _r(s) {
|
2375
2380
|
const e = J(null), t = J(null), i = J(null), n = J(null), r = J(null), a = J(null), o = J(null), c = J(null), l = J(null), d = J(null), [p, m] = Z(s.value.x), [f, C] = Z(s.value.y), [y, T] = Z({
|
2376
2381
|
min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
|
2377
2382
|
max: Math.max(s.max, Math.max(s.value.x, s.value.y))
|
@@ -2515,7 +2520,7 @@ function gr(s) {
|
|
2515
2520
|
] })
|
2516
2521
|
] });
|
2517
2522
|
}
|
2518
|
-
const
|
2523
|
+
const vr = Math.PI / 180, yr = 180 / Math.PI;
|
2519
2524
|
function ot(s, e, t, i, n) {
|
2520
2525
|
return i + (s - e) * (n - i) / (t - e);
|
2521
2526
|
}
|
@@ -2523,11 +2528,11 @@ function lt(s, e, t) {
|
|
2523
2528
|
return (1 - t) * s + t * e;
|
2524
2529
|
}
|
2525
2530
|
function Fi(s) {
|
2526
|
-
return s * _r;
|
2527
|
-
}
|
2528
|
-
function yr(s) {
|
2529
2531
|
return s * vr;
|
2530
2532
|
}
|
2533
|
+
function br(s) {
|
2534
|
+
return s * yr;
|
2535
|
+
}
|
2531
2536
|
function Cs(s) {
|
2532
2537
|
const e = s.value.x !== void 0 && s.value.y !== void 0 && s.value.z !== void 0, t = s.value.isEuler !== void 0, i = s.value.elements !== void 0, n = s.step !== void 0 ? s.step : 0.01, r = [];
|
2533
2538
|
if (t) {
|
@@ -2540,7 +2545,7 @@ function Cs(s) {
|
|
2540
2545
|
/* @__PURE__ */ u.jsx(
|
2541
2546
|
Qe,
|
2542
2547
|
{
|
2543
|
-
value:
|
2548
|
+
value: br(a[c]),
|
2544
2549
|
type: "number",
|
2545
2550
|
prop: c,
|
2546
2551
|
step: 0.1,
|
@@ -2603,7 +2608,7 @@ function Cs(s) {
|
|
2603
2608
|
}
|
2604
2609
|
return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: r }, Math.random().toString());
|
2605
2610
|
}
|
2606
|
-
function
|
2611
|
+
function Er(s) {
|
2607
2612
|
const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
|
2608
2613
|
if (e) {
|
2609
2614
|
const n = jt(() => s.value, []), r = (o, c) => {
|
@@ -2655,10 +2660,10 @@ function br(s) {
|
|
2655
2660
|
}
|
2656
2661
|
return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: i });
|
2657
2662
|
}
|
2658
|
-
function
|
2663
|
+
function Cr(s) {
|
2659
2664
|
return !(s === "defaultAttributeValues" || s === "forceSinglePass" || s === "linecap" || s === "linejoin" || s === "linewidth" || s === "normalMapType" || s === "precision" || s === "shadowSide" || s === "uniformsGroups" || s === "uniformsNeedUpdate" || s === "userData" || s === "version" || s === "wireframeLinecap" || s === "wireframeLinejoin" || s === "wireframeLinewidth" || s.slice(0, 4) === "clip" || s.slice(0, 7) === "polygon" || s.slice(0, 7) === "stencil" || s.slice(0, 2) === "is");
|
2660
2665
|
}
|
2661
|
-
function
|
2666
|
+
function Sr(s) {
|
2662
2667
|
switch (s) {
|
2663
2668
|
case "Alpha Map":
|
2664
2669
|
return "alphaMap";
|
@@ -2914,7 +2919,7 @@ function En(s) {
|
|
2914
2919
|
const e = s.toLowerCase();
|
2915
2920
|
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";
|
2916
2921
|
}
|
2917
|
-
function
|
2922
|
+
function wr() {
|
2918
2923
|
const s = document.createElement("input");
|
2919
2924
|
return s.type = "file", new Promise((e, t) => {
|
2920
2925
|
s.addEventListener("change", function() {
|
@@ -2929,10 +2934,10 @@ function Sr() {
|
|
2929
2934
|
}), s.click();
|
2930
2935
|
});
|
2931
2936
|
}
|
2932
|
-
const
|
2937
|
+
const xr = [
|
2933
2938
|
{
|
2934
2939
|
title: "Front",
|
2935
|
-
value:
|
2940
|
+
value: Qn
|
2936
2941
|
},
|
2937
2942
|
{
|
2938
2943
|
title: "Back",
|
@@ -2942,53 +2947,53 @@ const wr = [
|
|
2942
2947
|
title: "Double",
|
2943
2948
|
value: Bi
|
2944
2949
|
}
|
2945
|
-
],
|
2950
|
+
], Or = [
|
2946
2951
|
{
|
2947
2952
|
title: "No Blending",
|
2948
|
-
value:
|
2953
|
+
value: Jn
|
2949
2954
|
},
|
2950
2955
|
{
|
2951
2956
|
title: "Normal",
|
2952
|
-
value:
|
2957
|
+
value: ea
|
2953
2958
|
},
|
2954
2959
|
{
|
2955
2960
|
title: "Additive",
|
2956
|
-
value:
|
2961
|
+
value: ta
|
2957
2962
|
},
|
2958
2963
|
{
|
2959
2964
|
title: "Subtractive",
|
2960
|
-
value:
|
2965
|
+
value: ia
|
2961
2966
|
},
|
2962
2967
|
{
|
2963
2968
|
title: "Multiply",
|
2964
|
-
value:
|
2969
|
+
value: sa
|
2965
2970
|
},
|
2966
2971
|
{
|
2967
2972
|
title: "Custom",
|
2968
|
-
value:
|
2973
|
+
value: na
|
2969
2974
|
}
|
2970
|
-
],
|
2975
|
+
], Tr = [
|
2971
2976
|
{
|
2972
2977
|
title: "Add",
|
2973
|
-
value:
|
2978
|
+
value: aa
|
2974
2979
|
},
|
2975
2980
|
{
|
2976
2981
|
title: "Subtract",
|
2977
|
-
value:
|
2982
|
+
value: ra
|
2978
2983
|
},
|
2979
2984
|
{
|
2980
2985
|
title: "Reverse Subtract",
|
2981
|
-
value:
|
2986
|
+
value: oa
|
2982
2987
|
},
|
2983
2988
|
{
|
2984
2989
|
title: "Min",
|
2985
|
-
value:
|
2990
|
+
value: la
|
2986
2991
|
},
|
2987
2992
|
{
|
2988
2993
|
title: "Max",
|
2989
|
-
value:
|
2994
|
+
value: ca
|
2990
2995
|
}
|
2991
|
-
],
|
2996
|
+
], Mr = [
|
2992
2997
|
{
|
2993
2998
|
title: "Zero",
|
2994
2999
|
value: $s
|
@@ -3031,7 +3036,7 @@ const wr = [
|
|
3031
3036
|
},
|
3032
3037
|
{
|
3033
3038
|
title: "Src Alpha Saturate",
|
3034
|
-
value:
|
3039
|
+
value: ha
|
3035
3040
|
},
|
3036
3041
|
{
|
3037
3042
|
title: "Constant Color",
|
@@ -3049,7 +3054,7 @@ const wr = [
|
|
3049
3054
|
title: "One Minus Constant Alpha",
|
3050
3055
|
value: cn
|
3051
3056
|
}
|
3052
|
-
],
|
3057
|
+
], Pr = [
|
3053
3058
|
{
|
3054
3059
|
title: "Zero",
|
3055
3060
|
value: $s
|
@@ -3110,7 +3115,7 @@ const wr = [
|
|
3110
3115
|
function xt(s, e) {
|
3111
3116
|
s.needsUpdate = !0, s.type = "option", s.options = e;
|
3112
3117
|
}
|
3113
|
-
function
|
3118
|
+
function Ar(s, e, t, i) {
|
3114
3119
|
return {
|
3115
3120
|
type: "boolean",
|
3116
3121
|
title: hi(s),
|
@@ -3127,7 +3132,7 @@ function Pr(s, e, t, i) {
|
|
3127
3132
|
}
|
3128
3133
|
};
|
3129
3134
|
}
|
3130
|
-
function
|
3135
|
+
function Dr(s, e, t, i) {
|
3131
3136
|
const n = {
|
3132
3137
|
type: "number",
|
3133
3138
|
title: hi(s),
|
@@ -3148,24 +3153,24 @@ function Ar(s, e, t, i) {
|
|
3148
3153
|
};
|
3149
3154
|
switch (s) {
|
3150
3155
|
case "blending":
|
3151
|
-
xt(n,
|
3156
|
+
xt(n, Or);
|
3152
3157
|
break;
|
3153
3158
|
case "blendDst":
|
3154
|
-
xt(n,
|
3159
|
+
xt(n, Pr);
|
3155
3160
|
break;
|
3156
3161
|
case "blendEquation":
|
3157
|
-
xt(n,
|
3162
|
+
xt(n, Tr);
|
3158
3163
|
break;
|
3159
3164
|
case "blendSrc":
|
3160
|
-
xt(n,
|
3165
|
+
xt(n, Mr);
|
3161
3166
|
break;
|
3162
3167
|
case "side":
|
3163
|
-
xt(n,
|
3168
|
+
xt(n, xr);
|
3164
3169
|
break;
|
3165
3170
|
}
|
3166
3171
|
return En(s) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
3167
3172
|
}
|
3168
|
-
function
|
3173
|
+
function Rr(s, e, t, i) {
|
3169
3174
|
const n = {
|
3170
3175
|
type: "string",
|
3171
3176
|
title: hi(s),
|
@@ -3201,13 +3206,13 @@ function Dr(s, e, t, i) {
|
|
3201
3206
|
}
|
3202
3207
|
}), n;
|
3203
3208
|
}
|
3204
|
-
function
|
3209
|
+
function Ir(s) {
|
3205
3210
|
return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
|
3206
3211
|
}
|
3207
|
-
function
|
3212
|
+
function Lr(s) {
|
3208
3213
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
|
3209
3214
|
}
|
3210
|
-
function
|
3215
|
+
function kr(s) {
|
3211
3216
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
|
3212
3217
|
}
|
3213
3218
|
function zi(s) {
|
@@ -3285,7 +3290,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3285
3290
|
items: l
|
3286
3291
|
};
|
3287
3292
|
} else {
|
3288
|
-
if (
|
3293
|
+
if (Ir(e))
|
3289
3294
|
return {
|
3290
3295
|
title: a,
|
3291
3296
|
prop: o,
|
@@ -3301,7 +3306,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3301
3306
|
}
|
3302
3307
|
}
|
3303
3308
|
};
|
3304
|
-
if (
|
3309
|
+
if (Lr(e))
|
3305
3310
|
return {
|
3306
3311
|
title: a,
|
3307
3312
|
prop: o,
|
@@ -3317,7 +3322,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3317
3322
|
}
|
3318
3323
|
}
|
3319
3324
|
};
|
3320
|
-
if (
|
3325
|
+
if (kr(e))
|
3321
3326
|
return {
|
3322
3327
|
title: a,
|
3323
3328
|
prop: o,
|
@@ -3356,7 +3361,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3356
3361
|
value: e,
|
3357
3362
|
disabled: r,
|
3358
3363
|
onChange: (l, d) => {
|
3359
|
-
const p =
|
3364
|
+
const p = Sr(s), m = n.length > 0 ? `${n}.${p}` : p;
|
3360
3365
|
i.createTexture(t.uuid, `material.${m}`, d);
|
3361
3366
|
const f = i.getScene(t.uuid);
|
3362
3367
|
if (f !== null) {
|
@@ -3435,15 +3440,15 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3435
3440
|
function Ss(s, e, t) {
|
3436
3441
|
const i = [];
|
3437
3442
|
for (const n in s) {
|
3438
|
-
if (!
|
3443
|
+
if (!Cr(n))
|
3439
3444
|
continue;
|
3440
3445
|
const r = typeof s[n], a = s[n];
|
3441
3446
|
if (r === "boolean")
|
3442
|
-
i.push(Pr(n, a, e, t));
|
3443
|
-
else if (r === "number")
|
3444
3447
|
i.push(Ar(n, a, e, t));
|
3445
|
-
else if (r === "
|
3448
|
+
else if (r === "number")
|
3446
3449
|
i.push(Dr(n, a, e, t));
|
3450
|
+
else if (r === "string")
|
3451
|
+
i.push(Rr(n, a, e, t));
|
3447
3452
|
else if (r === "object") {
|
3448
3453
|
const o = Lt(n, a, e, t);
|
3449
3454
|
o !== void 0 && i.push(o);
|
@@ -3463,7 +3468,7 @@ function Ss(s, e, t) {
|
|
3463
3468
|
}
|
3464
3469
|
}), i;
|
3465
3470
|
}
|
3466
|
-
function
|
3471
|
+
function Ur(s, e) {
|
3467
3472
|
function t() {
|
3468
3473
|
return `${e.app.appID}_material`;
|
3469
3474
|
}
|
@@ -3500,7 +3505,7 @@ function kr(s, e) {
|
|
3500
3505
|
);
|
3501
3506
|
}
|
3502
3507
|
const ws = "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==";
|
3503
|
-
function
|
3508
|
+
function jr(s) {
|
3504
3509
|
const e = s.step !== void 0 ? s.step : 0.01, t = J(null), i = J(null), n = J(null), r = J(null), a = J(null), [o] = Z(s.value), [c, l] = Z(s.value.offset[0]), [d, p] = Z(s.value.offset[1]), [m, f] = Z(s.value.repeat[0]), [C, y] = Z(s.value.repeat[1]);
|
3505
3510
|
function T(v, S, E, w, O) {
|
3506
3511
|
if (s.onChange !== void 0) {
|
@@ -3531,7 +3536,7 @@ function Ur(s) {
|
|
3531
3536
|
}
|
3532
3537
|
return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
|
3533
3538
|
/* @__PURE__ */ u.jsx("img", { alt: s.title, ref: t, onClick: () => {
|
3534
|
-
|
3539
|
+
wr().then((v) => {
|
3535
3540
|
t.current.src = v, T(v, c, d, m, C);
|
3536
3541
|
});
|
3537
3542
|
}, src: o.src.length > 0 ? o.src : ws }),
|
@@ -3680,15 +3685,15 @@ function ii(s) {
|
|
3680
3685
|
children: s.title
|
3681
3686
|
}
|
3682
3687
|
),
|
3683
|
-
s.type === "image" && /* @__PURE__ */ u.jsx(
|
3688
|
+
s.type === "image" && /* @__PURE__ */ u.jsx(jr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
|
3684
3689
|
s.type === "option" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx("select", { onChange: r, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((l, d) => /* @__PURE__ */ u.jsx("option", { value: l.value, children: ri(l.title) }, d)) }) }),
|
3685
|
-
s.type === "vector2" && /* @__PURE__ */ u.jsx(
|
3690
|
+
s.type === "vector2" && /* @__PURE__ */ u.jsx(_r, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
|
3686
3691
|
s.type === "grid3" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r }),
|
3687
|
-
s.type === "grid4" && /* @__PURE__ */ u.jsx(
|
3692
|
+
s.type === "grid4" && /* @__PURE__ */ u.jsx(Er, { step: s.step, value: t, onChange: r }),
|
3688
3693
|
s.type === "euler" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r })
|
3689
3694
|
] });
|
3690
3695
|
}
|
3691
|
-
function
|
3696
|
+
function Nr(s) {
|
3692
3697
|
return "items" in s;
|
3693
3698
|
}
|
3694
3699
|
class Oe extends Ft {
|
@@ -3743,7 +3748,7 @@ class Oe extends Ft {
|
|
3743
3748
|
render() {
|
3744
3749
|
const e = [];
|
3745
3750
|
return this.props.items.forEach((t) => {
|
3746
|
-
if (
|
3751
|
+
if (Nr(t))
|
3747
3752
|
e.push(
|
3748
3753
|
/* @__PURE__ */ u.jsx(Oe, { title: ri(t.title), items: t.items }, Math.random())
|
3749
3754
|
);
|
@@ -3905,7 +3910,7 @@ function xs(s) {
|
|
3905
3910
|
}
|
3906
3911
|
return s;
|
3907
3912
|
}
|
3908
|
-
function
|
3913
|
+
function Fr(s, e) {
|
3909
3914
|
function t() {
|
3910
3915
|
return `${e.app.appID}_camera`;
|
3911
3916
|
}
|
@@ -3960,7 +3965,7 @@ function Nr(s, e) {
|
|
3960
3965
|
}
|
3961
3966
|
);
|
3962
3967
|
}
|
3963
|
-
class
|
3968
|
+
class zr extends Ie {
|
3964
3969
|
constructor(e, t) {
|
3965
3970
|
const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new _t();
|
3966
3971
|
n.setAttribute("position", new qe(i, 3)), n.computeBoundingSphere();
|
@@ -3983,7 +3988,7 @@ class Fr extends Ie {
|
|
3983
3988
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3984
3989
|
}
|
3985
3990
|
}
|
3986
|
-
const Os = { type: "change" }, Gi = { type: "start" }, Cn = { type: "end" }, Wt = new
|
3991
|
+
const Os = { type: "change" }, Gi = { type: "start" }, Cn = { type: "end" }, Wt = new da(), Ts = new ua(), Hr = Math.cos(70 * pa.DEG2RAD), oe = new P(), ye = 2 * Math.PI, V = {
|
3987
3992
|
NONE: -1,
|
3988
3993
|
ROTATE: 0,
|
3989
3994
|
DOLLY: 1,
|
@@ -3993,9 +3998,9 @@ const Os = { type: "change" }, Gi = { type: "start" }, Cn = { type: "end" }, Wt
|
|
3993
3998
|
TOUCH_DOLLY_PAN: 5,
|
3994
3999
|
TOUCH_DOLLY_ROTATE: 6
|
3995
4000
|
}, Ci = 1e-6;
|
3996
|
-
class
|
4001
|
+
class Yr extends hn {
|
3997
4002
|
constructor(e, t = null) {
|
3998
|
-
super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Li(), this._sphericalDelta = new Li(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove =
|
4003
|
+
super(e, t), this.state = V.NONE, this.enabled = !0, this.target = new P(), this.cursor = new P(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: gt.ROTATE, MIDDLE: gt.DOLLY, RIGHT: gt.PAN }, this.touches = { ONE: ft.ROTATE, TWO: ft.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new P(), this._lastQuaternion = new Ce(), this._lastTargetPosition = new P(), this._quat = new Ce().setFromUnitVectors(e.up, new P(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Li(), this._sphericalDelta = new Li(), this._scale = 1, this._panOffset = new P(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new P(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Vr.bind(this), this._onPointerDown = Br.bind(this), this._onPointerUp = Zr.bind(this), this._onContextMenu = Qr.bind(this), this._onMouseWheel = Xr.bind(this), this._onKeyDown = $r.bind(this), this._onTouchStart = Kr.bind(this), this._onTouchMove = qr.bind(this), this._onMouseDown = Wr.bind(this), this._onMouseMove = Gr.bind(this), this._interceptControlDown = Jr.bind(this), this._interceptControlUp = eo.bind(this), this.domElement !== null && this.connect(), this.update();
|
3999
4004
|
}
|
4000
4005
|
connect() {
|
4001
4006
|
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";
|
@@ -4055,7 +4060,7 @@ class Hr extends hn {
|
|
4055
4060
|
l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = oe.length();
|
4056
4061
|
} else
|
4057
4062
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
4058
|
-
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).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)) <
|
4063
|
+
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).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)) < Hr ? this.object.lookAt(this.target) : (Ts.setFromNormalAndCoplanarPoint(this.object.up, this.target), Wt.intersectPlane(Ts, this.target))));
|
4059
4064
|
} else if (this.object.isOrthographicCamera) {
|
4060
4065
|
const a = this.object.zoom;
|
4061
4066
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
@@ -4254,13 +4259,13 @@ class Hr extends hn {
|
|
4254
4259
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
4255
4260
|
}
|
4256
4261
|
}
|
4257
|
-
function
|
4262
|
+
function Br(s) {
|
4258
4263
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(s) && (this._addPointer(s), s.pointerType === "touch" ? this._onTouchStart(s) : this._onMouseDown(s)));
|
4259
4264
|
}
|
4260
|
-
function
|
4265
|
+
function Vr(s) {
|
4261
4266
|
this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
|
4262
4267
|
}
|
4263
|
-
function
|
4268
|
+
function Zr(s) {
|
4264
4269
|
switch (this._removePointer(s), this._pointers.length) {
|
4265
4270
|
case 0:
|
4266
4271
|
this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Cn), this.state = V.NONE;
|
@@ -4271,7 +4276,7 @@ function Vr(s) {
|
|
4271
4276
|
break;
|
4272
4277
|
}
|
4273
4278
|
}
|
4274
|
-
function
|
4279
|
+
function Wr(s) {
|
4275
4280
|
let e;
|
4276
4281
|
switch (s.button) {
|
4277
4282
|
case 0:
|
@@ -4319,7 +4324,7 @@ function Zr(s) {
|
|
4319
4324
|
}
|
4320
4325
|
this.state !== V.NONE && this.dispatchEvent(Gi);
|
4321
4326
|
}
|
4322
|
-
function
|
4327
|
+
function Gr(s) {
|
4323
4328
|
switch (this.state) {
|
4324
4329
|
case V.ROTATE:
|
4325
4330
|
if (this.enableRotate === !1)
|
@@ -4338,13 +4343,13 @@ function Wr(s) {
|
|
4338
4343
|
break;
|
4339
4344
|
}
|
4340
4345
|
}
|
4341
|
-
function
|
4346
|
+
function Xr(s) {
|
4342
4347
|
this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Gi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(Cn));
|
4343
4348
|
}
|
4344
|
-
function
|
4349
|
+
function $r(s) {
|
4345
4350
|
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
|
4346
4351
|
}
|
4347
|
-
function
|
4352
|
+
function Kr(s) {
|
4348
4353
|
switch (this._trackPointer(s), this._pointers.length) {
|
4349
4354
|
case 1:
|
4350
4355
|
switch (this.touches.ONE) {
|
@@ -4383,7 +4388,7 @@ function $r(s) {
|
|
4383
4388
|
}
|
4384
4389
|
this.state !== V.NONE && this.dispatchEvent(Gi);
|
4385
4390
|
}
|
4386
|
-
function
|
4391
|
+
function qr(s) {
|
4387
4392
|
switch (this._trackPointer(s), this.state) {
|
4388
4393
|
case V.TOUCH_ROTATE:
|
4389
4394
|
if (this.enableRotate === !1)
|
@@ -4409,13 +4414,13 @@ function Kr(s) {
|
|
4409
4414
|
this.state = V.NONE;
|
4410
4415
|
}
|
4411
4416
|
}
|
4412
|
-
function
|
4417
|
+
function Qr(s) {
|
4413
4418
|
this.enabled !== !1 && s.preventDefault();
|
4414
4419
|
}
|
4415
|
-
function
|
4420
|
+
function Jr(s) {
|
4416
4421
|
s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4417
4422
|
}
|
4418
|
-
function
|
4423
|
+
function eo(s) {
|
4419
4424
|
s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4420
4425
|
}
|
4421
4426
|
/*!
|
@@ -4510,7 +4515,7 @@ function Si(s, e) {
|
|
4510
4515
|
function wi(s, e) {
|
4511
4516
|
return Be(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
4512
4517
|
}
|
4513
|
-
class
|
4518
|
+
class to {
|
4514
4519
|
constructor() {
|
4515
4520
|
this._listeners = {};
|
4516
4521
|
}
|
@@ -4575,9 +4580,9 @@ class eo {
|
|
4575
4580
|
}
|
4576
4581
|
}
|
4577
4582
|
var xi;
|
4578
|
-
const
|
4583
|
+
const io = "2.9.0", Xt = 1 / 8, so = /Mac/.test((xi = globalThis?.navigator) === null || xi === void 0 ? void 0 : xi.platform);
|
4579
4584
|
let I, Ds, $t, Oi, be, U, z, dt, Pt, Ae, De, We, Rs, Is, xe, At, ut, Ls, Ti, ks, Mi, Pi, Kt;
|
4580
|
-
class ke extends
|
4585
|
+
class ke extends to {
|
4581
4586
|
/**
|
4582
4587
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
4583
4588
|
*
|
@@ -4762,7 +4767,7 @@ class ke extends eo {
|
|
4762
4767
|
const O = performance.now();
|
4763
4768
|
l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
|
4764
4769
|
}
|
4765
|
-
const v =
|
4770
|
+
const v = so ? -1 : -3, S = g.deltaMode === 1 ? g.deltaY / v : g.deltaY / (v * 10), E = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
4766
4771
|
switch (this.mouseButtons.wheel) {
|
4767
4772
|
case _.ROTATE: {
|
4768
4773
|
this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
|
@@ -5627,7 +5632,7 @@ class ke extends eo {
|
|
5627
5632
|
console.warn("camera-controls is already connected.");
|
5628
5633
|
return;
|
5629
5634
|
}
|
5630
|
-
e.setAttribute("data-camera-controls-version",
|
5635
|
+
e.setAttribute("data-camera-controls-version", io), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
5631
5636
|
}
|
5632
5637
|
/**
|
5633
5638
|
* Detach all internal event handlers to disable drag control.
|
@@ -5782,7 +5787,7 @@ const li = (s) => {
|
|
5782
5787
|
/* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: i, children: `${s.title}: ${e}` }),
|
5783
5788
|
s.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: s.options.map((r) => /* @__PURE__ */ u.jsx("li", { onClick: () => n(r), children: r }, r)) })
|
5784
5789
|
] });
|
5785
|
-
}, Ge =
|
5790
|
+
}, Ge = Na(function(e, t) {
|
5786
5791
|
const i = [
|
5787
5792
|
"Renderer",
|
5788
5793
|
"Depth",
|
@@ -5831,14 +5836,14 @@ const li = (s) => {
|
|
5831
5836
|
] })
|
5832
5837
|
] });
|
5833
5838
|
});
|
5834
|
-
class
|
5839
|
+
class no extends dn {
|
5835
5840
|
constructor(e) {
|
5836
5841
|
super({
|
5837
5842
|
extensions: {
|
5838
5843
|
// @ts-ignore
|
5839
5844
|
derivatives: !0
|
5840
5845
|
},
|
5841
|
-
glslVersion:
|
5846
|
+
glslVersion: ma,
|
5842
5847
|
side: Bi,
|
5843
5848
|
transparent: !0,
|
5844
5849
|
uniforms: {
|
@@ -5944,10 +5949,10 @@ class so extends dn {
|
|
5944
5949
|
});
|
5945
5950
|
}
|
5946
5951
|
}
|
5947
|
-
class
|
5952
|
+
class ao extends M {
|
5948
5953
|
gridMaterial;
|
5949
5954
|
constructor() {
|
5950
|
-
const e = new
|
5955
|
+
const e = new no();
|
5951
5956
|
super(new un(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
5952
5957
|
}
|
5953
5958
|
update() {
|
@@ -5973,7 +5978,7 @@ function Us(s) {
|
|
5973
5978
|
s.name
|
5974
5979
|
);
|
5975
5980
|
}
|
5976
|
-
const
|
5981
|
+
const ro = `#include <common>
|
5977
5982
|
#include <batching_pars_vertex>
|
5978
5983
|
#include <uv_pars_vertex>
|
5979
5984
|
#include <color_pars_vertex>
|
@@ -6003,7 +6008,7 @@ void main() {
|
|
6003
6008
|
#include <logdepthbuf_vertex>
|
6004
6009
|
#include <clipping_planes_vertex>
|
6005
6010
|
#include <worldpos_vertex>
|
6006
|
-
}`,
|
6011
|
+
}`, oo = `
|
6007
6012
|
#include <common>
|
6008
6013
|
#include <uv_pars_fragment>
|
6009
6014
|
#include <clipping_planes_pars_fragment>
|
@@ -6012,14 +6017,14 @@ void main() {
|
|
6012
6017
|
#include <clipping_planes_fragment>
|
6013
6018
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
6014
6019
|
}`;
|
6015
|
-
class
|
6020
|
+
class lo extends dn {
|
6016
6021
|
constructor() {
|
6017
6022
|
super({
|
6018
6023
|
defines: {
|
6019
6024
|
USE_UV: ""
|
6020
6025
|
},
|
6021
|
-
vertexShader:
|
6022
|
-
fragmentShader:
|
6026
|
+
vertexShader: ro,
|
6027
|
+
fragmentShader: oo
|
6023
6028
|
});
|
6024
6029
|
}
|
6025
6030
|
}
|
@@ -6028,14 +6033,14 @@ const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(), js = {
|
|
6028
6033
|
Y: new P(0, 1, 0),
|
6029
6034
|
Z: new P(0, 0, 1)
|
6030
6035
|
}, Ai = { type: "change" }, Ns = { type: "mouseDown", mode: null }, Fs = { type: "mouseUp", mode: null }, zs = { type: "objectChange" };
|
6031
|
-
class
|
6036
|
+
class co extends hn {
|
6032
6037
|
constructor(e, t = null) {
|
6033
6038
|
super(void 0, t);
|
6034
|
-
const i = new
|
6039
|
+
const i = new go(this);
|
6035
6040
|
this._root = i;
|
6036
|
-
const n = new
|
6041
|
+
const n = new _o();
|
6037
6042
|
this._gizmo = n, i.add(n);
|
6038
|
-
const r = new
|
6043
|
+
const r = new vo();
|
6039
6044
|
this._plane = r, i.add(r);
|
6040
6045
|
const a = this;
|
6041
6046
|
function o(S, E) {
|
@@ -6051,7 +6056,7 @@ class lo extends hn {
|
|
6051
6056
|
}
|
6052
6057
|
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);
|
6053
6058
|
const c = new P(), l = new P(), d = new Ce(), p = new Ce(), m = new P(), f = new Ce(), C = new P(), y = new P(), T = new P(), g = 0, v = new P();
|
6054
|
-
o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", C), o("pointEnd", y), o("rotationAxis", T), o("rotationAngle", g), o("eye", v), 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 =
|
6059
|
+
o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", d), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", f), o("pointStart", C), o("pointEnd", y), o("rotationAxis", T), o("rotationAngle", g), o("eye", v), 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 = ho.bind(this), this._onPointerDown = po.bind(this), this._onPointerHover = uo.bind(this), this._onPointerMove = mo.bind(this), this._onPointerUp = fo.bind(this), t !== null && this.connect();
|
6055
6060
|
}
|
6056
6061
|
connect() {
|
6057
6062
|
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
@@ -6147,7 +6152,7 @@ class lo extends hn {
|
|
6147
6152
|
this.space = e;
|
6148
6153
|
}
|
6149
6154
|
}
|
6150
|
-
function
|
6155
|
+
function ho(s) {
|
6151
6156
|
if (this.domElement.ownerDocument.pointerLockElement)
|
6152
6157
|
return {
|
6153
6158
|
x: 0,
|
@@ -6163,7 +6168,7 @@ function co(s) {
|
|
6163
6168
|
};
|
6164
6169
|
}
|
6165
6170
|
}
|
6166
|
-
function
|
6171
|
+
function uo(s) {
|
6167
6172
|
if (this.enabled)
|
6168
6173
|
switch (s.pointerType) {
|
6169
6174
|
case "mouse":
|
@@ -6172,13 +6177,13 @@ function ho(s) {
|
|
6172
6177
|
break;
|
6173
6178
|
}
|
6174
6179
|
}
|
6175
|
-
function
|
6180
|
+
function po(s) {
|
6176
6181
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(s)), this.pointerDown(this._getPointer(s)));
|
6177
6182
|
}
|
6178
|
-
function
|
6183
|
+
function mo(s) {
|
6179
6184
|
this.enabled && this.pointerMove(this._getPointer(s));
|
6180
6185
|
}
|
6181
|
-
function
|
6186
|
+
function fo(s) {
|
6182
6187
|
this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
|
6183
6188
|
}
|
6184
6189
|
function Di(s, e, t) {
|
@@ -6189,7 +6194,7 @@ function Di(s, e, t) {
|
|
6189
6194
|
return !1;
|
6190
6195
|
}
|
6191
6196
|
const qt = new pn(), X = new P(0, 1, 0), Hs = new P(0, 0, 0), Ys = new ci(), Qt = new Ce(), si = new Ce(), Re = new P(), Bs = new ci(), kt = new P(1, 0, 0), Ke = new P(0, 1, 0), Ut = new P(0, 0, 1), Jt = new P(), Dt = new P(), Rt = new P();
|
6192
|
-
class
|
6197
|
+
class go extends vt {
|
6193
6198
|
constructor(e) {
|
6194
6199
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
6195
6200
|
}
|
@@ -6199,7 +6204,7 @@ class fo extends vt {
|
|
6199
6204
|
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);
|
6200
6205
|
}
|
6201
6206
|
}
|
6202
|
-
class
|
6207
|
+
class _o extends vt {
|
6203
6208
|
constructor() {
|
6204
6209
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
6205
6210
|
const e = new Je({
|
@@ -6458,7 +6463,7 @@ class go extends vt {
|
|
6458
6463
|
super.updateMatrixWorld(e);
|
6459
6464
|
}
|
6460
6465
|
}
|
6461
|
-
class
|
6466
|
+
class vo extends M {
|
6462
6467
|
constructor() {
|
6463
6468
|
super(
|
6464
6469
|
new un(1e5, 1e5, 2, 2),
|
@@ -6525,7 +6530,7 @@ class ge extends Yi {
|
|
6525
6530
|
let t = this.controls.get(e);
|
6526
6531
|
if (t === void 0) {
|
6527
6532
|
const i = document.querySelector(".clickable");
|
6528
|
-
t = new
|
6533
|
+
t = new co(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
|
6529
6534
|
this.dispatchEvent({ type: ge.DRAG_START });
|
6530
6535
|
}), t.addEventListener("mouseUp", () => {
|
6531
6536
|
this.dispatchEvent({ type: ge.DRAG_END });
|
@@ -6571,7 +6576,7 @@ class ge extends Yi {
|
|
6571
6576
|
return ge._instance || (ge._instance = new ge()), ge._instance;
|
6572
6577
|
}
|
6573
6578
|
}
|
6574
|
-
const
|
6579
|
+
const yo = new de(), Ri = new pe();
|
6575
6580
|
class Vs extends vt {
|
6576
6581
|
curve = new cs();
|
6577
6582
|
line;
|
@@ -6612,7 +6617,7 @@ class Vs extends vt {
|
|
6612
6617
|
const e = [];
|
6613
6618
|
this.draggable.children.forEach((t) => {
|
6614
6619
|
e.push([Pe(t.position.x, 3), Pe(t.position.y, 3), Pe(t.position.z, 3)]);
|
6615
|
-
}),
|
6620
|
+
}), Fa({
|
6616
6621
|
name: this.name,
|
6617
6622
|
points: e,
|
6618
6623
|
tension: this.tension,
|
@@ -6635,7 +6640,7 @@ class Vs extends vt {
|
|
6635
6640
|
this.addPoint(new P(-50, 0, 0), !1), this.addPoint(new P(50, 0, 0));
|
6636
6641
|
};
|
6637
6642
|
addPoint = (e, t = !0) => {
|
6638
|
-
const i = this.draggable.children.length, n = new M(
|
6643
|
+
const i = this.draggable.children.length, n = new M(yo, this.draggedMat);
|
6639
6644
|
return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
|
6640
6645
|
};
|
6641
6646
|
addNextPt = () => {
|
@@ -6905,7 +6910,7 @@ class Vs extends vt {
|
|
6905
6910
|
};
|
6906
6911
|
}
|
6907
6912
|
let ei = 0;
|
6908
|
-
class
|
6913
|
+
class bo extends vt {
|
6909
6914
|
defaultScale = 10;
|
6910
6915
|
_camera;
|
6911
6916
|
group = null;
|
@@ -7006,7 +7011,7 @@ const Zs = [
|
|
7006
7011
|
"Side by Side",
|
7007
7012
|
"Stacked",
|
7008
7013
|
"Quad"
|
7009
|
-
],
|
7014
|
+
], Eo = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", Co = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
|
7010
7015
|
class me extends Ft {
|
7011
7016
|
static instance = null;
|
7012
7017
|
scene = new Gs();
|
@@ -7019,17 +7024,17 @@ class me extends Ft {
|
|
7019
7024
|
// RefObject to one of the "windows"
|
7020
7025
|
cameraHelpers = /* @__PURE__ */ new Map();
|
7021
7026
|
lightHelpers = /* @__PURE__ */ new Map();
|
7022
|
-
helpersContainer = new
|
7023
|
-
grid = new
|
7027
|
+
helpersContainer = new fa();
|
7028
|
+
grid = new ao();
|
7024
7029
|
axisHelper = new hs(500);
|
7025
7030
|
interactionHelper = new hs(100);
|
7026
7031
|
currentTransform;
|
7027
7032
|
// Tools
|
7028
7033
|
splineEditor;
|
7029
7034
|
// Override Materials
|
7030
|
-
depthMaterial = new
|
7031
|
-
normalsMaterial = new
|
7032
|
-
uvMaterial = new
|
7035
|
+
depthMaterial = new ga();
|
7036
|
+
normalsMaterial = new _a();
|
7037
|
+
uvMaterial = new lo();
|
7033
7038
|
wireframeMaterial = new Je({
|
7034
7039
|
opacity: 0.33,
|
7035
7040
|
transparent: !0,
|
@@ -7080,12 +7085,12 @@ class me extends Ft {
|
|
7080
7085
|
const r = {
|
7081
7086
|
Vector2: pe,
|
7082
7087
|
Vector3: P,
|
7083
|
-
Vector4:
|
7088
|
+
Vector4: Oa,
|
7084
7089
|
Quaternion: Ce,
|
7085
7090
|
Matrix4: ci,
|
7086
7091
|
Spherical: Li,
|
7087
|
-
Box3:
|
7088
|
-
Sphere:
|
7092
|
+
Box3: Ta,
|
7093
|
+
Sphere: Ma,
|
7089
7094
|
Raycaster: ni
|
7090
7095
|
};
|
7091
7096
|
ke.install({ THREE: r }), this.setupScene(), this.setupTools();
|
@@ -7280,7 +7285,7 @@ class me extends Ft {
|
|
7280
7285
|
Us,
|
7281
7286
|
{
|
7282
7287
|
name: "cameraHelper",
|
7283
|
-
icon:
|
7288
|
+
icon: Eo,
|
7284
7289
|
selected: this.cameraVisibility,
|
7285
7290
|
height: 24,
|
7286
7291
|
top: 2,
|
@@ -7298,7 +7303,7 @@ class me extends Ft {
|
|
7298
7303
|
Us,
|
7299
7304
|
{
|
7300
7305
|
name: "lightHelper",
|
7301
|
-
icon:
|
7306
|
+
icon: Co,
|
7302
7307
|
selected: this.lightVisibility,
|
7303
7308
|
height: 24,
|
7304
7309
|
top: 4,
|
@@ -7317,7 +7322,7 @@ class me extends Ft {
|
|
7317
7322
|
}
|
7318
7323
|
// Setup
|
7319
7324
|
setupRenderer() {
|
7320
|
-
this.renderer = new
|
7325
|
+
this.renderer = new va({
|
7321
7326
|
canvas: this.canvasRef.current,
|
7322
7327
|
stencil: !1
|
7323
7328
|
}), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
|
@@ -7333,7 +7338,7 @@ class me extends Ft {
|
|
7333
7338
|
this.tlCam = this.cameras.get(t.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
|
7334
7339
|
}
|
7335
7340
|
setupTools() {
|
7336
|
-
this.splineEditor = new
|
7341
|
+
this.splineEditor = new bo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
|
7337
7342
|
}
|
7338
7343
|
// Public
|
7339
7344
|
play() {
|
@@ -7415,7 +7420,7 @@ class me extends Ft {
|
|
7415
7420
|
addCamera = (e) => {
|
7416
7421
|
const t = e.value, i = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
|
7417
7422
|
if (i !== void 0 && this.cameras.set(t.name, i), i instanceof Ct) {
|
7418
|
-
const n = new
|
7423
|
+
const n = new ya(i);
|
7419
7424
|
n.visible = this.cameraVisibility, this.cameraHelpers.set(i.name, n), this.scene.add(n);
|
7420
7425
|
}
|
7421
7426
|
this.setState({ lastUpdate: Date.now() });
|
@@ -7466,7 +7471,7 @@ class me extends Ft {
|
|
7466
7471
|
if (this.currentCamera.name === "UI")
|
7467
7472
|
return;
|
7468
7473
|
const t = this.controls.get(this.currentCamera.name);
|
7469
|
-
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof
|
7474
|
+
e.key === "0" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof M || this.selectedItem instanceof ba ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (e.preventDefault(), this.clearControls(), this.cameraControls = new ke(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Fi(45), Fi(45), !0), this.updateCameraControls(t));
|
7470
7475
|
} else if (this.currentTransform !== void 0)
|
7471
7476
|
switch (e.key) {
|
7472
7477
|
case "r":
|
@@ -7517,19 +7522,19 @@ class me extends Ft {
|
|
7517
7522
|
let t;
|
7518
7523
|
switch (e.type) {
|
7519
7524
|
case "DirectionalLight":
|
7520
|
-
t = new
|
7525
|
+
t = new wa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7521
7526
|
break;
|
7522
7527
|
case "HemisphereLight":
|
7523
|
-
t = new
|
7528
|
+
t = new Sa(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7524
7529
|
break;
|
7525
7530
|
case "RectAreaLight":
|
7526
|
-
t = new
|
7531
|
+
t = new zr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7527
7532
|
break;
|
7528
7533
|
case "PointLight":
|
7529
|
-
t = new
|
7534
|
+
t = new Ca(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7530
7535
|
break;
|
7531
7536
|
case "SpotLight":
|
7532
|
-
t = new
|
7537
|
+
t = new Ea(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7533
7538
|
break;
|
7534
7539
|
}
|
7535
7540
|
}
|
@@ -7539,7 +7544,7 @@ class me extends Ft {
|
|
7539
7544
|
const i = this.controls.get(e.name);
|
7540
7545
|
if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
|
7541
7546
|
return;
|
7542
|
-
const n = new
|
7547
|
+
const n = new Yr(e, t);
|
7543
7548
|
switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
|
7544
7549
|
case "Top":
|
7545
7550
|
case "Bottom":
|
@@ -7600,7 +7605,7 @@ class me extends Ft {
|
|
7600
7605
|
if (this.selectedItem === void 0)
|
7601
7606
|
return;
|
7602
7607
|
cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
|
7603
|
-
const i = 0.15, n = new
|
7608
|
+
const i = 0.15, n = new xa();
|
7604
7609
|
n.start(), this.selectedItem.getWorldPosition(e.target0);
|
7605
7610
|
const r = () => {
|
7606
7611
|
const a = n.getDelta();
|
@@ -7774,7 +7779,7 @@ function Ws(s) {
|
|
7774
7779
|
}
|
7775
7780
|
return s;
|
7776
7781
|
}
|
7777
|
-
function
|
7782
|
+
function So(s, e) {
|
7778
7783
|
function t() {
|
7779
7784
|
return `${e.app.appID}_light`;
|
7780
7785
|
}
|
@@ -7828,7 +7833,7 @@ function Co(s, e) {
|
|
7828
7833
|
}
|
7829
7834
|
);
|
7830
7835
|
}
|
7831
|
-
function
|
7836
|
+
function wo(s) {
|
7832
7837
|
const e = s.object, t = s.three;
|
7833
7838
|
function i() {
|
7834
7839
|
return `${t.app.appID}_animation`;
|
@@ -7899,7 +7904,7 @@ function So(s) {
|
|
7899
7904
|
}), o.push({
|
7900
7905
|
title: "Mixer",
|
7901
7906
|
items: y
|
7902
|
-
}), d = new
|
7907
|
+
}), d = new Pa(m), me.instance?.scene.add(d);
|
7903
7908
|
}
|
7904
7909
|
}
|
7905
7910
|
}
|
@@ -7931,7 +7936,7 @@ const Hi = {
|
|
7931
7936
|
children: []
|
7932
7937
|
};
|
7933
7938
|
let ce = { ...Hi };
|
7934
|
-
function
|
7939
|
+
function xo(s) {
|
7935
7940
|
const [e, t] = Z(-1);
|
7936
7941
|
tt(() => {
|
7937
7942
|
function a(c) {
|
@@ -7987,17 +7992,17 @@ function wo(s) {
|
|
7987
7992
|
] }),
|
7988
7993
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
7989
7994
|
/* @__PURE__ */ u.jsx(di, { object: ce, three: s.three }),
|
7990
|
-
n ? /* @__PURE__ */ u.jsx(
|
7991
|
-
i.search("camera") > -1 ?
|
7992
|
-
i.search("light") > -1 ?
|
7993
|
-
r ?
|
7995
|
+
n ? /* @__PURE__ */ u.jsx(wo, { object: ce, three: s.three }) : null,
|
7996
|
+
i.search("camera") > -1 ? Fr(ce, s.three) : null,
|
7997
|
+
i.search("light") > -1 ? So(ce, s.three) : null,
|
7998
|
+
r ? Ur(ce, s.three) : null
|
7994
7999
|
] })
|
7995
8000
|
] }) }, e)
|
7996
8001
|
},
|
7997
8002
|
"Inspector"
|
7998
8003
|
);
|
7999
8004
|
}
|
8000
|
-
class
|
8005
|
+
class Oo extends Ft {
|
8001
8006
|
// Renderer
|
8002
8007
|
autoClear = !0;
|
8003
8008
|
autoClearColor = !0;
|
@@ -8131,7 +8136,7 @@ class xo extends Ft {
|
|
8131
8136
|
options: [
|
8132
8137
|
{
|
8133
8138
|
title: "No Color Space",
|
8134
|
-
value:
|
8139
|
+
value: Aa
|
8135
8140
|
},
|
8136
8141
|
{
|
8137
8142
|
title: "SRB Color Space",
|
@@ -8157,31 +8162,31 @@ class xo extends Ft {
|
|
8157
8162
|
},
|
8158
8163
|
{
|
8159
8164
|
title: "Linear ",
|
8160
|
-
value:
|
8165
|
+
value: Da
|
8161
8166
|
},
|
8162
8167
|
{
|
8163
8168
|
title: "Reinhard",
|
8164
|
-
value:
|
8169
|
+
value: Ra
|
8165
8170
|
},
|
8166
8171
|
{
|
8167
8172
|
title: "Cineon ",
|
8168
|
-
value:
|
8173
|
+
value: Ia
|
8169
8174
|
},
|
8170
8175
|
{
|
8171
8176
|
title: "ACES Filmic",
|
8172
|
-
value:
|
8177
|
+
value: La
|
8173
8178
|
},
|
8174
8179
|
{
|
8175
8180
|
title: "AgX",
|
8176
|
-
value:
|
8181
|
+
value: ka
|
8177
8182
|
},
|
8178
8183
|
{
|
8179
8184
|
title: "Neutral",
|
8180
|
-
value:
|
8185
|
+
value: Ua
|
8181
8186
|
},
|
8182
8187
|
{
|
8183
8188
|
title: "Custom",
|
8184
|
-
value:
|
8189
|
+
value: ja
|
8185
8190
|
}
|
8186
8191
|
],
|
8187
8192
|
onChange: (t, i) => {
|
@@ -8214,7 +8219,7 @@ class xo extends Ft {
|
|
8214
8219
|
return `${this.props.three.app.appID}_renderer`;
|
8215
8220
|
}
|
8216
8221
|
}
|
8217
|
-
function
|
8222
|
+
function To(s) {
|
8218
8223
|
const [e] = Z([]), [t] = Z([]), [i, n] = Z(0), r = (c) => {
|
8219
8224
|
const l = c.value;
|
8220
8225
|
e.push(l), t.push(
|
@@ -8263,12 +8268,12 @@ function Oo(s) {
|
|
8263
8268
|
D.removeEventListener(A.ADD_SCENE, r), D.removeEventListener(A.REFRESH_SCENE, a), D.removeEventListener(A.REMOVE_SCENE, o);
|
8264
8269
|
}), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
|
8265
8270
|
/* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, i),
|
8266
|
-
/* @__PURE__ */ u.jsx(wo, { three: s.three }),
|
8267
8271
|
/* @__PURE__ */ u.jsx(xo, { three: s.three }),
|
8272
|
+
/* @__PURE__ */ u.jsx(Oo, { three: s.three }),
|
8268
8273
|
/* @__PURE__ */ u.jsx(ae, { three: s.three })
|
8269
8274
|
] });
|
8270
8275
|
}
|
8271
|
-
function
|
8276
|
+
function Go(s) {
|
8272
8277
|
return tt(() => {
|
8273
8278
|
function e(o) {
|
8274
8279
|
let c = null;
|
@@ -8317,7 +8322,7 @@ function Wo(s) {
|
|
8317
8322
|
const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
|
8318
8323
|
if (f !== void 0)
|
8319
8324
|
try {
|
8320
|
-
p !== void 0 ?
|
8325
|
+
p !== void 0 ? or(f, p)[c](d) : f[c](d);
|
8321
8326
|
} catch (C) {
|
8322
8327
|
console.log("Error requesting method:"), console.log(C), console.log(c), console.log(d);
|
8323
8328
|
}
|
@@ -8327,15 +8332,15 @@ function Wo(s) {
|
|
8327
8332
|
};
|
8328
8333
|
}, []), null;
|
8329
8334
|
}
|
8330
|
-
function
|
8335
|
+
function Mo(s) {
|
8331
8336
|
return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
|
8332
8337
|
/* @__PURE__ */ u.jsx("div", { className: "header", children: s.header }),
|
8333
8338
|
s.children,
|
8334
8339
|
/* @__PURE__ */ u.jsx("div", { className: "footer", children: s.footer })
|
8335
8340
|
] });
|
8336
8341
|
}
|
8337
|
-
function
|
8338
|
-
return /* @__PURE__ */ u.jsx(
|
8342
|
+
function Xo(s) {
|
8343
|
+
return /* @__PURE__ */ u.jsx(Mo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
8339
8344
|
/* @__PURE__ */ u.jsx(
|
8340
8345
|
me,
|
8341
8346
|
{
|
@@ -8346,61 +8351,61 @@ function Go(s) {
|
|
8346
8351
|
onSceneUpdate: s.onSceneUpdate
|
8347
8352
|
}
|
8348
8353
|
),
|
8349
|
-
/* @__PURE__ */ u.jsx(
|
8354
|
+
/* @__PURE__ */ u.jsx(To, { three: s.three })
|
8350
8355
|
] }) });
|
8351
8356
|
}
|
8352
8357
|
export {
|
8353
8358
|
oi as Accordion,
|
8354
|
-
|
8359
|
+
zo as Application,
|
8355
8360
|
Wi as BaseRemote,
|
8356
8361
|
bn as ChildObject,
|
8357
8362
|
Es as ContainerObject,
|
8358
|
-
|
8359
|
-
|
8360
|
-
|
8361
|
-
|
8362
|
-
|
8363
|
-
|
8364
|
-
|
8363
|
+
mr as Draggable,
|
8364
|
+
pr as DraggableItem,
|
8365
|
+
fr as Dropdown,
|
8366
|
+
gr as DropdownItem,
|
8367
|
+
Mo as Editor,
|
8368
|
+
No as ElementProxy,
|
8369
|
+
sr as ElementProxyReceiver,
|
8365
8370
|
ti as ExportTexture,
|
8366
|
-
|
8371
|
+
xo as Inspector,
|
8367
8372
|
me as MultiView,
|
8368
8373
|
yn as NavButton,
|
8369
|
-
|
8370
|
-
|
8371
|
-
|
8372
|
-
|
8373
|
-
|
8374
|
-
|
8375
|
-
|
8376
|
-
|
8374
|
+
Fo as ProxyManager,
|
8375
|
+
Ga as QualityType,
|
8376
|
+
Ho as RemoteComponents,
|
8377
|
+
Wo as RemoteController,
|
8378
|
+
Vo as RemoteTheatre,
|
8379
|
+
Zo as RemoteThree,
|
8380
|
+
Go as SceneInspector,
|
8381
|
+
To as SidePanel,
|
8377
8382
|
Vs as Spline,
|
8378
|
-
|
8379
|
-
|
8383
|
+
bo as SplineEditor,
|
8384
|
+
Xo as ThreeEditor,
|
8380
8385
|
A as ToolEvents,
|
8381
8386
|
ge as Transform,
|
8382
|
-
|
8387
|
+
jo as WebworkerEventHandlers,
|
8383
8388
|
ri as capitalize,
|
8384
8389
|
$e as clamp,
|
8385
8390
|
ps as colorToHex,
|
8386
|
-
|
8387
|
-
|
8391
|
+
Fa as copyToClipboard,
|
8392
|
+
Bo as customizeTheatreElements,
|
8388
8393
|
D as debugDispatcher,
|
8389
|
-
|
8390
|
-
|
8394
|
+
Ro as defaultTheatreCallback,
|
8395
|
+
Io as detectSettings,
|
8391
8396
|
He as dispose,
|
8392
|
-
|
8393
|
-
|
8394
|
-
|
8397
|
+
Xa as disposeMaterial,
|
8398
|
+
ko as disposeTexture,
|
8399
|
+
Lo as distance,
|
8395
8400
|
ji as hierarchyUUID,
|
8396
|
-
|
8401
|
+
Ha as isColor,
|
8397
8402
|
ki as mix,
|
8398
8403
|
ai as noop,
|
8399
8404
|
_s as normalize,
|
8400
|
-
|
8401
|
-
|
8405
|
+
Uo as parseModelLite,
|
8406
|
+
za as randomID,
|
8402
8407
|
vs as resetThreeObjects,
|
8403
8408
|
Pe as round,
|
8404
|
-
|
8409
|
+
Yo as theatreEditorApp,
|
8405
8410
|
Ui as totalThreeObjects
|
8406
8411
|
};
|