@tomorrowevening/hermes 0.0.125 → 0.0.127
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 +282 -276
- package/package.json +3 -3
- package/types/utils/three.d.ts +6 -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,27 @@ 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
|
+
animations: s.animations,
|
350
|
+
model: i,
|
351
|
+
mixer: n,
|
352
|
+
cameras: r
|
353
|
+
});
|
354
|
+
});
|
355
|
+
});
|
350
356
|
}
|
351
357
|
const at = Zi([
|
352
358
|
"ctrlKey",
|
@@ -359,32 +365,32 @@ const at = Zi([
|
|
359
365
|
"clientY",
|
360
366
|
"pageX",
|
361
367
|
"pageY"
|
362
|
-
]),
|
368
|
+
]), $a = Zi([
|
363
369
|
"clientX",
|
364
370
|
"clientY",
|
365
371
|
"deltaX",
|
366
372
|
"deltaY",
|
367
373
|
"deltaMode"
|
368
|
-
]),
|
374
|
+
]), Ka = Zi([
|
369
375
|
"ctrlKey",
|
370
376
|
"metaKey",
|
371
377
|
"shiftKey",
|
372
378
|
"keyCode"
|
373
379
|
]);
|
374
|
-
function
|
375
|
-
s.preventDefault(),
|
380
|
+
function qa(s, e) {
|
381
|
+
s.preventDefault(), $a(s, e);
|
376
382
|
}
|
377
|
-
function
|
383
|
+
function Qa(s) {
|
378
384
|
s.preventDefault();
|
379
385
|
}
|
380
|
-
function
|
386
|
+
function Ja(s, e, t) {
|
381
387
|
for (const i of e)
|
382
388
|
t[i] = s[i];
|
383
389
|
}
|
384
390
|
function Zi(s) {
|
385
391
|
return function(t, i) {
|
386
392
|
const n = { type: t.type };
|
387
|
-
|
393
|
+
Ja(t, s, n), i(n);
|
388
394
|
};
|
389
395
|
}
|
390
396
|
function bi(s, e) {
|
@@ -398,7 +404,7 @@ function bi(s, e) {
|
|
398
404
|
}
|
399
405
|
e(i);
|
400
406
|
}
|
401
|
-
const
|
407
|
+
const er = {
|
402
408
|
37: !0,
|
403
409
|
// left
|
404
410
|
38: !0,
|
@@ -408,12 +414,12 @@ const Ja = {
|
|
408
414
|
40: !0
|
409
415
|
// down
|
410
416
|
};
|
411
|
-
function
|
417
|
+
function tr(s, e) {
|
412
418
|
const { keyCode: t } = s;
|
413
|
-
|
419
|
+
er[t] && (s.preventDefault(), Ka(s, e));
|
414
420
|
}
|
415
|
-
const
|
416
|
-
contextmenu:
|
421
|
+
const jo = {
|
422
|
+
contextmenu: Qa,
|
417
423
|
mousedown: at,
|
418
424
|
mousemove: at,
|
419
425
|
mouseup: at,
|
@@ -423,15 +429,15 @@ const Uo = {
|
|
423
429
|
touchstart: bi,
|
424
430
|
touchmove: bi,
|
425
431
|
touchend: bi,
|
426
|
-
wheel:
|
427
|
-
keydown:
|
432
|
+
wheel: qa,
|
433
|
+
keydown: tr
|
428
434
|
};
|
429
|
-
let
|
430
|
-
class
|
435
|
+
let ir = 0;
|
436
|
+
class No {
|
431
437
|
id;
|
432
438
|
worker;
|
433
439
|
constructor(e, t, i) {
|
434
|
-
this.id =
|
440
|
+
this.id = ir++, this.worker = t;
|
435
441
|
const n = (a) => {
|
436
442
|
this.worker.postMessage({
|
437
443
|
type: "event",
|
@@ -459,7 +465,7 @@ class jo {
|
|
459
465
|
window.addEventListener("resize", r), r();
|
460
466
|
}
|
461
467
|
}
|
462
|
-
class
|
468
|
+
class sr extends Yi {
|
463
469
|
style = {};
|
464
470
|
left = 0;
|
465
471
|
top = 0;
|
@@ -513,13 +519,13 @@ class ir extends Yi {
|
|
513
519
|
return this;
|
514
520
|
}
|
515
521
|
}
|
516
|
-
class
|
522
|
+
class Fo {
|
517
523
|
targets = {};
|
518
524
|
constructor() {
|
519
525
|
this.handleEvent = this.handleEvent.bind(this);
|
520
526
|
}
|
521
527
|
makeProxy(e) {
|
522
|
-
const { id: t } = e, i = new
|
528
|
+
const { id: t } = e, i = new sr();
|
523
529
|
this.targets[t] = i;
|
524
530
|
}
|
525
531
|
getProxy(e) {
|
@@ -529,7 +535,7 @@ class No {
|
|
529
535
|
this.targets[e.id]?.handleEvent(e.data);
|
530
536
|
}
|
531
537
|
}
|
532
|
-
class
|
538
|
+
class zo {
|
533
539
|
components = /* @__PURE__ */ new Map();
|
534
540
|
listen;
|
535
541
|
// Protected
|
@@ -601,7 +607,7 @@ class Wi {
|
|
601
607
|
handleEditor(e, t, i) {
|
602
608
|
}
|
603
609
|
}
|
604
|
-
class
|
610
|
+
class Ho extends Wi {
|
605
611
|
selectDropdown(e, t) {
|
606
612
|
this.app.send({
|
607
613
|
event: "selectComponent",
|
@@ -633,7 +639,7 @@ class zo extends Wi {
|
|
633
639
|
}
|
634
640
|
}
|
635
641
|
}
|
636
|
-
function
|
642
|
+
function Yo(s, e, t) {
|
637
643
|
if (s.editor) {
|
638
644
|
t.ui.restore(), t.onSelectionChange((a) => {
|
639
645
|
a.length < 1 || a.forEach((o) => {
|
@@ -676,7 +682,7 @@ function Ho(s, e, t) {
|
|
676
682
|
} else
|
677
683
|
t.ui.hide();
|
678
684
|
}
|
679
|
-
function
|
685
|
+
function Bo() {
|
680
686
|
setTimeout(() => {
|
681
687
|
const s = document.getElementById("theatrejs-studio-root");
|
682
688
|
if (s === null || s.shadowRoot === null)
|
@@ -702,7 +708,7 @@ function Yo() {
|
|
702
708
|
}
|
703
709
|
}, 1e3);
|
704
710
|
}
|
705
|
-
class
|
711
|
+
class Vo extends Wi {
|
706
712
|
project;
|
707
713
|
sheets = /* @__PURE__ */ new Map();
|
708
714
|
sheetObjects = /* @__PURE__ */ new Map();
|
@@ -769,7 +775,7 @@ class Bo extends Wi {
|
|
769
775
|
if (this.app.editor) {
|
770
776
|
for (const f in p) {
|
771
777
|
const C = p[f];
|
772
|
-
typeof C == "object" &&
|
778
|
+
typeof C == "object" && Ha(C) && (p[f] = {
|
773
779
|
r: C.r,
|
774
780
|
g: C.g,
|
775
781
|
b: C.b,
|
@@ -876,7 +882,7 @@ class Bo extends Wi {
|
|
876
882
|
this.studio?.ui.hide();
|
877
883
|
}
|
878
884
|
}
|
879
|
-
function
|
885
|
+
function nr(s) {
|
880
886
|
if (s.name === "cameras")
|
881
887
|
return "camera";
|
882
888
|
if (s.name === "interactive")
|
@@ -901,7 +907,7 @@ function pt(s) {
|
|
901
907
|
e.children.push(pt(t));
|
902
908
|
}), e;
|
903
909
|
}
|
904
|
-
function
|
910
|
+
function ar(s) {
|
905
911
|
const e = {};
|
906
912
|
for (const t in s) {
|
907
913
|
const i = s[t].value;
|
@@ -917,7 +923,7 @@ function nr(s) {
|
|
917
923
|
}
|
918
924
|
return e;
|
919
925
|
}
|
920
|
-
function
|
926
|
+
function rr(s) {
|
921
927
|
switch (s) {
|
922
928
|
case "blendSrcAlpha":
|
923
929
|
case "blendDstAlpha":
|
@@ -932,7 +938,7 @@ function ar(s) {
|
|
932
938
|
function rt(s) {
|
933
939
|
const e = {};
|
934
940
|
for (const t in s) {
|
935
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
941
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || rr(t))
|
936
942
|
continue;
|
937
943
|
const i = typeof s[t], n = s[t];
|
938
944
|
switch (i) {
|
@@ -946,7 +952,7 @@ function rt(s) {
|
|
946
952
|
src: ti.renderToBlob(n),
|
947
953
|
offset: [n.offset.x, n.offset.y],
|
948
954
|
repeat: [n.repeat.x, n.repeat.y]
|
949
|
-
} : t === "uniforms" && (e[t] =
|
955
|
+
} : t === "uniforms" && (e[t] = ar(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
950
956
|
src: "",
|
951
957
|
offset: [0, 0],
|
952
958
|
repeat: [1, 1]
|
@@ -1037,7 +1043,7 @@ function Ei(s) {
|
|
1037
1043
|
});
|
1038
1044
|
return e;
|
1039
1045
|
}
|
1040
|
-
function
|
1046
|
+
function or(s, e) {
|
1041
1047
|
const t = e.split(".");
|
1042
1048
|
switch (t.length) {
|
1043
1049
|
case 1:
|
@@ -1054,7 +1060,7 @@ function rr(s, e) {
|
|
1054
1060
|
return s[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
1055
1061
|
}
|
1056
1062
|
}
|
1057
|
-
function
|
1063
|
+
function lr(s, e) {
|
1058
1064
|
for (const t in e)
|
1059
1065
|
s[t] = e[t];
|
1060
1066
|
}
|
@@ -1099,19 +1105,19 @@ function ie(s, e, t) {
|
|
1099
1105
|
a = s[i[0]][i[1]][i[2]][i[3]][i[4]];
|
1100
1106
|
break;
|
1101
1107
|
}
|
1102
|
-
a != null &&
|
1108
|
+
a != null && lr(a, t);
|
1103
1109
|
}
|
1104
1110
|
}
|
1105
1111
|
function vn(s) {
|
1106
1112
|
return new Promise((e, t) => {
|
1107
1113
|
const i = new Image();
|
1108
1114
|
i.onload = () => {
|
1109
|
-
const n = new
|
1115
|
+
const n = new Kn(i);
|
1110
1116
|
n.wrapS = ls, n.wrapT = ls, n.needsUpdate = !0, e(n);
|
1111
1117
|
}, i.onerror = t, i.src = s;
|
1112
1118
|
});
|
1113
1119
|
}
|
1114
|
-
class
|
1120
|
+
class Zo extends Wi {
|
1115
1121
|
canvas = null;
|
1116
1122
|
// Canvas or OffscreenCanvas
|
1117
1123
|
inputElement = null;
|
@@ -1397,7 +1403,7 @@ class Vo extends Wi {
|
|
1397
1403
|
}
|
1398
1404
|
// Renderer
|
1399
1405
|
addRT(e, t) {
|
1400
|
-
const i = new
|
1406
|
+
const i = new qn(32, 32, t);
|
1401
1407
|
i.texture.name = e, this.renderTargets.set(e, i);
|
1402
1408
|
}
|
1403
1409
|
resize(e, t) {
|
@@ -1432,7 +1438,7 @@ var Ni = { exports: {} }, St = {};
|
|
1432
1438
|
* LICENSE file in the root directory of this source tree.
|
1433
1439
|
*/
|
1434
1440
|
var ys;
|
1435
|
-
function
|
1441
|
+
function cr() {
|
1436
1442
|
if (ys)
|
1437
1443
|
return St;
|
1438
1444
|
ys = 1;
|
@@ -1460,7 +1466,7 @@ var wt = {};
|
|
1460
1466
|
* LICENSE file in the root directory of this source tree.
|
1461
1467
|
*/
|
1462
1468
|
var bs;
|
1463
|
-
function
|
1469
|
+
function hr() {
|
1464
1470
|
return bs || (bs = 1, process.env.NODE_ENV !== "production" && function() {
|
1465
1471
|
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
1472
|
function T(h) {
|
@@ -2046,16 +2052,16 @@ Check the top-level render call using <` + x + ">.");
|
|
2046
2052
|
wt.Fragment = i, wt.jsx = Zn, wt.jsxs = Wn;
|
2047
2053
|
}()), wt;
|
2048
2054
|
}
|
2049
|
-
process.env.NODE_ENV === "production" ? Ni.exports =
|
2055
|
+
process.env.NODE_ENV === "production" ? Ni.exports = cr() : Ni.exports = hr();
|
2050
2056
|
var u = Ni.exports;
|
2051
2057
|
function yn(s) {
|
2052
2058
|
return s.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ u.jsx("button", { children: s.title });
|
2053
2059
|
}
|
2054
|
-
const
|
2060
|
+
const dr = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
2055
2061
|
/* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
2056
2062
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
2057
2063
|
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
2058
|
-
] }),
|
2064
|
+
] }), ur = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
|
2059
2065
|
"path",
|
2060
2066
|
{
|
2061
2067
|
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 +2069,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
2069
|
C11,8.22,10.74,8,10.43,8z`
|
2064
2070
|
}
|
2065
2071
|
) });
|
2066
|
-
function
|
2072
|
+
function pr(s) {
|
2067
2073
|
return /* @__PURE__ */ u.jsx(gn.Item, { value: s.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
2068
|
-
|
2074
|
+
ur,
|
2069
2075
|
/* @__PURE__ */ u.jsx("span", { children: s.title }),
|
2070
2076
|
/* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
|
2071
2077
|
s.onDelete(s.index);
|
2072
|
-
}, children:
|
2078
|
+
}, children: dr })
|
2073
2079
|
] }) }, s.title);
|
2074
2080
|
}
|
2075
|
-
function
|
2081
|
+
function mr(s) {
|
2076
2082
|
const [e, t] = Z(!1), [i, n] = Z(s.options), r = (l) => {
|
2077
2083
|
s.onDragComplete(l), n(l);
|
2078
2084
|
}, a = (l) => {
|
@@ -2080,7 +2086,7 @@ function pr(s) {
|
|
2080
2086
|
d.splice(l, 1), r(d);
|
2081
2087
|
}, o = [];
|
2082
2088
|
i.forEach((l, d) => {
|
2083
|
-
o.push(/* @__PURE__ */ u.jsx(
|
2089
|
+
o.push(/* @__PURE__ */ u.jsx(pr, { index: d, title: l, onDelete: a }, l));
|
2084
2090
|
});
|
2085
2091
|
let c = "dropdown draggable";
|
2086
2092
|
return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
@@ -2088,10 +2094,10 @@ function pr(s) {
|
|
2088
2094
|
/* @__PURE__ */ u.jsx(gn.Group, { axis: "y", values: i, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
|
2089
2095
|
] });
|
2090
2096
|
}
|
2091
|
-
function
|
2097
|
+
function fr(s) {
|
2092
2098
|
const [e, t] = Z(!1), i = [];
|
2093
2099
|
s.options.map((r, a) => {
|
2094
|
-
s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(
|
2100
|
+
s.onSelect !== void 0 && (r.onSelect = s.onSelect), i.push(/* @__PURE__ */ u.jsx(gr, { option: r }, a));
|
2095
2101
|
});
|
2096
2102
|
let n = "dropdown";
|
2097
2103
|
return s.subdropdown && (n += " subdropdown"), /* @__PURE__ */ u.jsxs(
|
@@ -2113,13 +2119,13 @@ function mr(s) {
|
|
2113
2119
|
}
|
2114
2120
|
);
|
2115
2121
|
}
|
2116
|
-
function
|
2122
|
+
function gr(s) {
|
2117
2123
|
const { option: e } = s, [t, i] = Z("");
|
2118
2124
|
let n;
|
2119
2125
|
switch (e.type) {
|
2120
2126
|
case "draggable":
|
2121
2127
|
n = /* @__PURE__ */ u.jsx(
|
2122
|
-
|
2128
|
+
mr,
|
2123
2129
|
{
|
2124
2130
|
title: e.title,
|
2125
2131
|
options: e.value,
|
@@ -2132,7 +2138,7 @@ function fr(s) {
|
|
2132
2138
|
break;
|
2133
2139
|
case "dropdown":
|
2134
2140
|
n = /* @__PURE__ */ u.jsx(
|
2135
|
-
|
2141
|
+
fr,
|
2136
2142
|
{
|
2137
2143
|
title: e.title,
|
2138
2144
|
options: e.value,
|
@@ -2153,9 +2159,9 @@ function fr(s) {
|
|
2153
2159
|
);
|
2154
2160
|
break;
|
2155
2161
|
}
|
2156
|
-
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n },
|
2162
|
+
return /* @__PURE__ */ u.jsx("li", { className: t === e.title ? "selected" : "", children: n }, za());
|
2157
2163
|
}
|
2158
|
-
function
|
2164
|
+
function Wo(s, e, t) {
|
2159
2165
|
function i(r) {
|
2160
2166
|
switch (e.forEach((a) => {
|
2161
2167
|
a.callback(s, a.remote, r);
|
@@ -2269,7 +2275,7 @@ function bn(s) {
|
|
2269
2275
|
}
|
2270
2276
|
}
|
2271
2277
|
),
|
2272
|
-
/* @__PURE__ */ u.jsx("div", { className: `icon ${
|
2278
|
+
/* @__PURE__ */ u.jsx("div", { className: `icon ${nr(s.child)}` })
|
2273
2279
|
] }),
|
2274
2280
|
/* @__PURE__ */ u.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
|
2275
2281
|
] }, Math.random()) });
|
@@ -2371,7 +2377,7 @@ function Qe(s) {
|
|
2371
2377
|
] })
|
2372
2378
|
] });
|
2373
2379
|
}
|
2374
|
-
function
|
2380
|
+
function _r(s) {
|
2375
2381
|
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
2382
|
min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
|
2377
2383
|
max: Math.max(s.max, Math.max(s.value.x, s.value.y))
|
@@ -2515,7 +2521,7 @@ function gr(s) {
|
|
2515
2521
|
] })
|
2516
2522
|
] });
|
2517
2523
|
}
|
2518
|
-
const
|
2524
|
+
const vr = Math.PI / 180, yr = 180 / Math.PI;
|
2519
2525
|
function ot(s, e, t, i, n) {
|
2520
2526
|
return i + (s - e) * (n - i) / (t - e);
|
2521
2527
|
}
|
@@ -2523,11 +2529,11 @@ function lt(s, e, t) {
|
|
2523
2529
|
return (1 - t) * s + t * e;
|
2524
2530
|
}
|
2525
2531
|
function Fi(s) {
|
2526
|
-
return s * _r;
|
2527
|
-
}
|
2528
|
-
function yr(s) {
|
2529
2532
|
return s * vr;
|
2530
2533
|
}
|
2534
|
+
function br(s) {
|
2535
|
+
return s * yr;
|
2536
|
+
}
|
2531
2537
|
function Cs(s) {
|
2532
2538
|
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
2539
|
if (t) {
|
@@ -2540,7 +2546,7 @@ function Cs(s) {
|
|
2540
2546
|
/* @__PURE__ */ u.jsx(
|
2541
2547
|
Qe,
|
2542
2548
|
{
|
2543
|
-
value:
|
2549
|
+
value: br(a[c]),
|
2544
2550
|
type: "number",
|
2545
2551
|
prop: c,
|
2546
2552
|
step: 0.1,
|
@@ -2603,7 +2609,7 @@ function Cs(s) {
|
|
2603
2609
|
}
|
2604
2610
|
return /* @__PURE__ */ u.jsx("div", { className: "grid3", children: r }, Math.random().toString());
|
2605
2611
|
}
|
2606
|
-
function
|
2612
|
+
function Er(s) {
|
2607
2613
|
const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
|
2608
2614
|
if (e) {
|
2609
2615
|
const n = jt(() => s.value, []), r = (o, c) => {
|
@@ -2655,10 +2661,10 @@ function br(s) {
|
|
2655
2661
|
}
|
2656
2662
|
return /* @__PURE__ */ u.jsx("div", { className: "grid4", children: i });
|
2657
2663
|
}
|
2658
|
-
function
|
2664
|
+
function Cr(s) {
|
2659
2665
|
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
2666
|
}
|
2661
|
-
function
|
2667
|
+
function Sr(s) {
|
2662
2668
|
switch (s) {
|
2663
2669
|
case "Alpha Map":
|
2664
2670
|
return "alphaMap";
|
@@ -2914,7 +2920,7 @@ function En(s) {
|
|
2914
2920
|
const e = s.toLowerCase();
|
2915
2921
|
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
2922
|
}
|
2917
|
-
function
|
2923
|
+
function wr() {
|
2918
2924
|
const s = document.createElement("input");
|
2919
2925
|
return s.type = "file", new Promise((e, t) => {
|
2920
2926
|
s.addEventListener("change", function() {
|
@@ -2929,10 +2935,10 @@ function Sr() {
|
|
2929
2935
|
}), s.click();
|
2930
2936
|
});
|
2931
2937
|
}
|
2932
|
-
const
|
2938
|
+
const xr = [
|
2933
2939
|
{
|
2934
2940
|
title: "Front",
|
2935
|
-
value:
|
2941
|
+
value: Qn
|
2936
2942
|
},
|
2937
2943
|
{
|
2938
2944
|
title: "Back",
|
@@ -2942,53 +2948,53 @@ const wr = [
|
|
2942
2948
|
title: "Double",
|
2943
2949
|
value: Bi
|
2944
2950
|
}
|
2945
|
-
],
|
2951
|
+
], Or = [
|
2946
2952
|
{
|
2947
2953
|
title: "No Blending",
|
2948
|
-
value:
|
2954
|
+
value: Jn
|
2949
2955
|
},
|
2950
2956
|
{
|
2951
2957
|
title: "Normal",
|
2952
|
-
value:
|
2958
|
+
value: ea
|
2953
2959
|
},
|
2954
2960
|
{
|
2955
2961
|
title: "Additive",
|
2956
|
-
value:
|
2962
|
+
value: ta
|
2957
2963
|
},
|
2958
2964
|
{
|
2959
2965
|
title: "Subtractive",
|
2960
|
-
value:
|
2966
|
+
value: ia
|
2961
2967
|
},
|
2962
2968
|
{
|
2963
2969
|
title: "Multiply",
|
2964
|
-
value:
|
2970
|
+
value: sa
|
2965
2971
|
},
|
2966
2972
|
{
|
2967
2973
|
title: "Custom",
|
2968
|
-
value:
|
2974
|
+
value: na
|
2969
2975
|
}
|
2970
|
-
],
|
2976
|
+
], Tr = [
|
2971
2977
|
{
|
2972
2978
|
title: "Add",
|
2973
|
-
value:
|
2979
|
+
value: aa
|
2974
2980
|
},
|
2975
2981
|
{
|
2976
2982
|
title: "Subtract",
|
2977
|
-
value:
|
2983
|
+
value: ra
|
2978
2984
|
},
|
2979
2985
|
{
|
2980
2986
|
title: "Reverse Subtract",
|
2981
|
-
value:
|
2987
|
+
value: oa
|
2982
2988
|
},
|
2983
2989
|
{
|
2984
2990
|
title: "Min",
|
2985
|
-
value:
|
2991
|
+
value: la
|
2986
2992
|
},
|
2987
2993
|
{
|
2988
2994
|
title: "Max",
|
2989
|
-
value:
|
2995
|
+
value: ca
|
2990
2996
|
}
|
2991
|
-
],
|
2997
|
+
], Mr = [
|
2992
2998
|
{
|
2993
2999
|
title: "Zero",
|
2994
3000
|
value: $s
|
@@ -3031,7 +3037,7 @@ const wr = [
|
|
3031
3037
|
},
|
3032
3038
|
{
|
3033
3039
|
title: "Src Alpha Saturate",
|
3034
|
-
value:
|
3040
|
+
value: ha
|
3035
3041
|
},
|
3036
3042
|
{
|
3037
3043
|
title: "Constant Color",
|
@@ -3049,7 +3055,7 @@ const wr = [
|
|
3049
3055
|
title: "One Minus Constant Alpha",
|
3050
3056
|
value: cn
|
3051
3057
|
}
|
3052
|
-
],
|
3058
|
+
], Pr = [
|
3053
3059
|
{
|
3054
3060
|
title: "Zero",
|
3055
3061
|
value: $s
|
@@ -3110,7 +3116,7 @@ const wr = [
|
|
3110
3116
|
function xt(s, e) {
|
3111
3117
|
s.needsUpdate = !0, s.type = "option", s.options = e;
|
3112
3118
|
}
|
3113
|
-
function
|
3119
|
+
function Ar(s, e, t, i) {
|
3114
3120
|
return {
|
3115
3121
|
type: "boolean",
|
3116
3122
|
title: hi(s),
|
@@ -3127,7 +3133,7 @@ function Pr(s, e, t, i) {
|
|
3127
3133
|
}
|
3128
3134
|
};
|
3129
3135
|
}
|
3130
|
-
function
|
3136
|
+
function Dr(s, e, t, i) {
|
3131
3137
|
const n = {
|
3132
3138
|
type: "number",
|
3133
3139
|
title: hi(s),
|
@@ -3148,24 +3154,24 @@ function Ar(s, e, t, i) {
|
|
3148
3154
|
};
|
3149
3155
|
switch (s) {
|
3150
3156
|
case "blending":
|
3151
|
-
xt(n,
|
3157
|
+
xt(n, Or);
|
3152
3158
|
break;
|
3153
3159
|
case "blendDst":
|
3154
|
-
xt(n,
|
3160
|
+
xt(n, Pr);
|
3155
3161
|
break;
|
3156
3162
|
case "blendEquation":
|
3157
|
-
xt(n,
|
3163
|
+
xt(n, Tr);
|
3158
3164
|
break;
|
3159
3165
|
case "blendSrc":
|
3160
|
-
xt(n,
|
3166
|
+
xt(n, Mr);
|
3161
3167
|
break;
|
3162
3168
|
case "side":
|
3163
|
-
xt(n,
|
3169
|
+
xt(n, xr);
|
3164
3170
|
break;
|
3165
3171
|
}
|
3166
3172
|
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
3173
|
}
|
3168
|
-
function
|
3174
|
+
function Rr(s, e, t, i) {
|
3169
3175
|
const n = {
|
3170
3176
|
type: "string",
|
3171
3177
|
title: hi(s),
|
@@ -3201,13 +3207,13 @@ function Dr(s, e, t, i) {
|
|
3201
3207
|
}
|
3202
3208
|
}), n;
|
3203
3209
|
}
|
3204
|
-
function
|
3210
|
+
function Ir(s) {
|
3205
3211
|
return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
|
3206
3212
|
}
|
3207
|
-
function
|
3213
|
+
function Lr(s) {
|
3208
3214
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
|
3209
3215
|
}
|
3210
|
-
function
|
3216
|
+
function kr(s) {
|
3211
3217
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
|
3212
3218
|
}
|
3213
3219
|
function zi(s) {
|
@@ -3285,7 +3291,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3285
3291
|
items: l
|
3286
3292
|
};
|
3287
3293
|
} else {
|
3288
|
-
if (
|
3294
|
+
if (Ir(e))
|
3289
3295
|
return {
|
3290
3296
|
title: a,
|
3291
3297
|
prop: o,
|
@@ -3301,7 +3307,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3301
3307
|
}
|
3302
3308
|
}
|
3303
3309
|
};
|
3304
|
-
if (
|
3310
|
+
if (Lr(e))
|
3305
3311
|
return {
|
3306
3312
|
title: a,
|
3307
3313
|
prop: o,
|
@@ -3317,7 +3323,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3317
3323
|
}
|
3318
3324
|
}
|
3319
3325
|
};
|
3320
|
-
if (
|
3326
|
+
if (kr(e))
|
3321
3327
|
return {
|
3322
3328
|
title: a,
|
3323
3329
|
prop: o,
|
@@ -3356,7 +3362,7 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3356
3362
|
value: e,
|
3357
3363
|
disabled: r,
|
3358
3364
|
onChange: (l, d) => {
|
3359
|
-
const p =
|
3365
|
+
const p = Sr(s), m = n.length > 0 ? `${n}.${p}` : p;
|
3360
3366
|
i.createTexture(t.uuid, `material.${m}`, d);
|
3361
3367
|
const f = i.getScene(t.uuid);
|
3362
3368
|
if (f !== null) {
|
@@ -3435,15 +3441,15 @@ function Lt(s, e, t, i, n = "", r = !1) {
|
|
3435
3441
|
function Ss(s, e, t) {
|
3436
3442
|
const i = [];
|
3437
3443
|
for (const n in s) {
|
3438
|
-
if (!
|
3444
|
+
if (!Cr(n))
|
3439
3445
|
continue;
|
3440
3446
|
const r = typeof s[n], a = s[n];
|
3441
3447
|
if (r === "boolean")
|
3442
|
-
i.push(Pr(n, a, e, t));
|
3443
|
-
else if (r === "number")
|
3444
3448
|
i.push(Ar(n, a, e, t));
|
3445
|
-
else if (r === "
|
3449
|
+
else if (r === "number")
|
3446
3450
|
i.push(Dr(n, a, e, t));
|
3451
|
+
else if (r === "string")
|
3452
|
+
i.push(Rr(n, a, e, t));
|
3447
3453
|
else if (r === "object") {
|
3448
3454
|
const o = Lt(n, a, e, t);
|
3449
3455
|
o !== void 0 && i.push(o);
|
@@ -3463,7 +3469,7 @@ function Ss(s, e, t) {
|
|
3463
3469
|
}
|
3464
3470
|
}), i;
|
3465
3471
|
}
|
3466
|
-
function
|
3472
|
+
function Ur(s, e) {
|
3467
3473
|
function t() {
|
3468
3474
|
return `${e.app.appID}_material`;
|
3469
3475
|
}
|
@@ -3500,7 +3506,7 @@ function kr(s, e) {
|
|
3500
3506
|
);
|
3501
3507
|
}
|
3502
3508
|
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
|
3509
|
+
function jr(s) {
|
3504
3510
|
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
3511
|
function T(v, S, E, w, O) {
|
3506
3512
|
if (s.onChange !== void 0) {
|
@@ -3531,7 +3537,7 @@ function Ur(s) {
|
|
3531
3537
|
}
|
3532
3538
|
return /* @__PURE__ */ u.jsxs("div", { className: "imageField", children: [
|
3533
3539
|
/* @__PURE__ */ u.jsx("img", { alt: s.title, ref: t, onClick: () => {
|
3534
|
-
|
3540
|
+
wr().then((v) => {
|
3535
3541
|
t.current.src = v, T(v, c, d, m, C);
|
3536
3542
|
});
|
3537
3543
|
}, src: o.src.length > 0 ? o.src : ws }),
|
@@ -3680,15 +3686,15 @@ function ii(s) {
|
|
3680
3686
|
children: s.title
|
3681
3687
|
}
|
3682
3688
|
),
|
3683
|
-
s.type === "image" && /* @__PURE__ */ u.jsx(
|
3689
|
+
s.type === "image" && /* @__PURE__ */ u.jsx(jr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
|
3684
3690
|
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(
|
3691
|
+
s.type === "vector2" && /* @__PURE__ */ u.jsx(_r, { step: s.step, value: t, min: 0, max: 1, onChange: r }),
|
3686
3692
|
s.type === "grid3" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r }),
|
3687
|
-
s.type === "grid4" && /* @__PURE__ */ u.jsx(
|
3693
|
+
s.type === "grid4" && /* @__PURE__ */ u.jsx(Er, { step: s.step, value: t, onChange: r }),
|
3688
3694
|
s.type === "euler" && /* @__PURE__ */ u.jsx(Cs, { step: s.step, value: t, onChange: r })
|
3689
3695
|
] });
|
3690
3696
|
}
|
3691
|
-
function
|
3697
|
+
function Nr(s) {
|
3692
3698
|
return "items" in s;
|
3693
3699
|
}
|
3694
3700
|
class Oe extends Ft {
|
@@ -3743,7 +3749,7 @@ class Oe extends Ft {
|
|
3743
3749
|
render() {
|
3744
3750
|
const e = [];
|
3745
3751
|
return this.props.items.forEach((t) => {
|
3746
|
-
if (
|
3752
|
+
if (Nr(t))
|
3747
3753
|
e.push(
|
3748
3754
|
/* @__PURE__ */ u.jsx(Oe, { title: ri(t.title), items: t.items }, Math.random())
|
3749
3755
|
);
|
@@ -3905,7 +3911,7 @@ function xs(s) {
|
|
3905
3911
|
}
|
3906
3912
|
return s;
|
3907
3913
|
}
|
3908
|
-
function
|
3914
|
+
function Fr(s, e) {
|
3909
3915
|
function t() {
|
3910
3916
|
return `${e.app.appID}_camera`;
|
3911
3917
|
}
|
@@ -3960,7 +3966,7 @@ function Nr(s, e) {
|
|
3960
3966
|
}
|
3961
3967
|
);
|
3962
3968
|
}
|
3963
|
-
class
|
3969
|
+
class zr extends Ie {
|
3964
3970
|
constructor(e, t) {
|
3965
3971
|
const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new _t();
|
3966
3972
|
n.setAttribute("position", new qe(i, 3)), n.computeBoundingSphere();
|
@@ -3983,7 +3989,7 @@ class Fr extends Ie {
|
|
3983
3989
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3984
3990
|
}
|
3985
3991
|
}
|
3986
|
-
const Os = { type: "change" }, Gi = { type: "start" }, Cn = { type: "end" }, Wt = new
|
3992
|
+
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
3993
|
NONE: -1,
|
3988
3994
|
ROTATE: 0,
|
3989
3995
|
DOLLY: 1,
|
@@ -3993,9 +3999,9 @@ const Os = { type: "change" }, Gi = { type: "start" }, Cn = { type: "end" }, Wt
|
|
3993
3999
|
TOUCH_DOLLY_PAN: 5,
|
3994
4000
|
TOUCH_DOLLY_ROTATE: 6
|
3995
4001
|
}, Ci = 1e-6;
|
3996
|
-
class
|
4002
|
+
class Yr extends hn {
|
3997
4003
|
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 =
|
4004
|
+
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
4005
|
}
|
4000
4006
|
connect() {
|
4001
4007
|
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 +4061,7 @@ class Hr extends hn {
|
|
4055
4061
|
l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = oe.length();
|
4056
4062
|
} else
|
4057
4063
|
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)) <
|
4064
|
+
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
4065
|
} else if (this.object.isOrthographicCamera) {
|
4060
4066
|
const a = this.object.zoom;
|
4061
4067
|
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 +4260,13 @@ class Hr extends hn {
|
|
4254
4260
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
4255
4261
|
}
|
4256
4262
|
}
|
4257
|
-
function
|
4263
|
+
function Br(s) {
|
4258
4264
|
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
4265
|
}
|
4260
|
-
function
|
4266
|
+
function Vr(s) {
|
4261
4267
|
this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
|
4262
4268
|
}
|
4263
|
-
function
|
4269
|
+
function Zr(s) {
|
4264
4270
|
switch (this._removePointer(s), this._pointers.length) {
|
4265
4271
|
case 0:
|
4266
4272
|
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 +4277,7 @@ function Vr(s) {
|
|
4271
4277
|
break;
|
4272
4278
|
}
|
4273
4279
|
}
|
4274
|
-
function
|
4280
|
+
function Wr(s) {
|
4275
4281
|
let e;
|
4276
4282
|
switch (s.button) {
|
4277
4283
|
case 0:
|
@@ -4319,7 +4325,7 @@ function Zr(s) {
|
|
4319
4325
|
}
|
4320
4326
|
this.state !== V.NONE && this.dispatchEvent(Gi);
|
4321
4327
|
}
|
4322
|
-
function
|
4328
|
+
function Gr(s) {
|
4323
4329
|
switch (this.state) {
|
4324
4330
|
case V.ROTATE:
|
4325
4331
|
if (this.enableRotate === !1)
|
@@ -4338,13 +4344,13 @@ function Wr(s) {
|
|
4338
4344
|
break;
|
4339
4345
|
}
|
4340
4346
|
}
|
4341
|
-
function
|
4347
|
+
function Xr(s) {
|
4342
4348
|
this.enabled === !1 || this.enableZoom === !1 || this.state !== V.NONE || (s.preventDefault(), this.dispatchEvent(Gi), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(Cn));
|
4343
4349
|
}
|
4344
|
-
function
|
4350
|
+
function $r(s) {
|
4345
4351
|
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
|
4346
4352
|
}
|
4347
|
-
function
|
4353
|
+
function Kr(s) {
|
4348
4354
|
switch (this._trackPointer(s), this._pointers.length) {
|
4349
4355
|
case 1:
|
4350
4356
|
switch (this.touches.ONE) {
|
@@ -4383,7 +4389,7 @@ function $r(s) {
|
|
4383
4389
|
}
|
4384
4390
|
this.state !== V.NONE && this.dispatchEvent(Gi);
|
4385
4391
|
}
|
4386
|
-
function
|
4392
|
+
function qr(s) {
|
4387
4393
|
switch (this._trackPointer(s), this.state) {
|
4388
4394
|
case V.TOUCH_ROTATE:
|
4389
4395
|
if (this.enableRotate === !1)
|
@@ -4409,13 +4415,13 @@ function Kr(s) {
|
|
4409
4415
|
this.state = V.NONE;
|
4410
4416
|
}
|
4411
4417
|
}
|
4412
|
-
function
|
4418
|
+
function Qr(s) {
|
4413
4419
|
this.enabled !== !1 && s.preventDefault();
|
4414
4420
|
}
|
4415
|
-
function
|
4421
|
+
function Jr(s) {
|
4416
4422
|
s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4417
4423
|
}
|
4418
|
-
function
|
4424
|
+
function eo(s) {
|
4419
4425
|
s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
4420
4426
|
}
|
4421
4427
|
/*!
|
@@ -4510,7 +4516,7 @@ function Si(s, e) {
|
|
4510
4516
|
function wi(s, e) {
|
4511
4517
|
return Be(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
4512
4518
|
}
|
4513
|
-
class
|
4519
|
+
class to {
|
4514
4520
|
constructor() {
|
4515
4521
|
this._listeners = {};
|
4516
4522
|
}
|
@@ -4575,9 +4581,9 @@ class eo {
|
|
4575
4581
|
}
|
4576
4582
|
}
|
4577
4583
|
var xi;
|
4578
|
-
const
|
4584
|
+
const io = "2.9.0", Xt = 1 / 8, so = /Mac/.test((xi = globalThis?.navigator) === null || xi === void 0 ? void 0 : xi.platform);
|
4579
4585
|
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
|
4586
|
+
class ke extends to {
|
4581
4587
|
/**
|
4582
4588
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
4583
4589
|
*
|
@@ -4762,7 +4768,7 @@ class ke extends eo {
|
|
4762
4768
|
const O = performance.now();
|
4763
4769
|
l - O < 1e3 && this._getClientRect(this._elementRect), l = O;
|
4764
4770
|
}
|
4765
|
-
const v =
|
4771
|
+
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
4772
|
switch (this.mouseButtons.wheel) {
|
4767
4773
|
case _.ROTATE: {
|
4768
4774
|
this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
|
@@ -5627,7 +5633,7 @@ class ke extends eo {
|
|
5627
5633
|
console.warn("camera-controls is already connected.");
|
5628
5634
|
return;
|
5629
5635
|
}
|
5630
|
-
e.setAttribute("data-camera-controls-version",
|
5636
|
+
e.setAttribute("data-camera-controls-version", io), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
5631
5637
|
}
|
5632
5638
|
/**
|
5633
5639
|
* Detach all internal event handlers to disable drag control.
|
@@ -5782,7 +5788,7 @@ const li = (s) => {
|
|
5782
5788
|
/* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: i, children: `${s.title}: ${e}` }),
|
5783
5789
|
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
5790
|
] });
|
5785
|
-
}, Ge =
|
5791
|
+
}, Ge = Na(function(e, t) {
|
5786
5792
|
const i = [
|
5787
5793
|
"Renderer",
|
5788
5794
|
"Depth",
|
@@ -5831,14 +5837,14 @@ const li = (s) => {
|
|
5831
5837
|
] })
|
5832
5838
|
] });
|
5833
5839
|
});
|
5834
|
-
class
|
5840
|
+
class no extends dn {
|
5835
5841
|
constructor(e) {
|
5836
5842
|
super({
|
5837
5843
|
extensions: {
|
5838
5844
|
// @ts-ignore
|
5839
5845
|
derivatives: !0
|
5840
5846
|
},
|
5841
|
-
glslVersion:
|
5847
|
+
glslVersion: ma,
|
5842
5848
|
side: Bi,
|
5843
5849
|
transparent: !0,
|
5844
5850
|
uniforms: {
|
@@ -5944,10 +5950,10 @@ class so extends dn {
|
|
5944
5950
|
});
|
5945
5951
|
}
|
5946
5952
|
}
|
5947
|
-
class
|
5953
|
+
class ao extends M {
|
5948
5954
|
gridMaterial;
|
5949
5955
|
constructor() {
|
5950
|
-
const e = new
|
5956
|
+
const e = new no();
|
5951
5957
|
super(new un(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
5952
5958
|
}
|
5953
5959
|
update() {
|
@@ -5973,7 +5979,7 @@ function Us(s) {
|
|
5973
5979
|
s.name
|
5974
5980
|
);
|
5975
5981
|
}
|
5976
|
-
const
|
5982
|
+
const ro = `#include <common>
|
5977
5983
|
#include <batching_pars_vertex>
|
5978
5984
|
#include <uv_pars_vertex>
|
5979
5985
|
#include <color_pars_vertex>
|
@@ -6003,7 +6009,7 @@ void main() {
|
|
6003
6009
|
#include <logdepthbuf_vertex>
|
6004
6010
|
#include <clipping_planes_vertex>
|
6005
6011
|
#include <worldpos_vertex>
|
6006
|
-
}`,
|
6012
|
+
}`, oo = `
|
6007
6013
|
#include <common>
|
6008
6014
|
#include <uv_pars_fragment>
|
6009
6015
|
#include <clipping_planes_pars_fragment>
|
@@ -6012,14 +6018,14 @@ void main() {
|
|
6012
6018
|
#include <clipping_planes_fragment>
|
6013
6019
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
6014
6020
|
}`;
|
6015
|
-
class
|
6021
|
+
class lo extends dn {
|
6016
6022
|
constructor() {
|
6017
6023
|
super({
|
6018
6024
|
defines: {
|
6019
6025
|
USE_UV: ""
|
6020
6026
|
},
|
6021
|
-
vertexShader:
|
6022
|
-
fragmentShader:
|
6027
|
+
vertexShader: ro,
|
6028
|
+
fragmentShader: oo
|
6023
6029
|
});
|
6024
6030
|
}
|
6025
6031
|
}
|
@@ -6028,14 +6034,14 @@ const Xe = new ni(), ue = new P(), Ye = new P(), Q = new Ce(), js = {
|
|
6028
6034
|
Y: new P(0, 1, 0),
|
6029
6035
|
Z: new P(0, 0, 1)
|
6030
6036
|
}, Ai = { type: "change" }, Ns = { type: "mouseDown", mode: null }, Fs = { type: "mouseUp", mode: null }, zs = { type: "objectChange" };
|
6031
|
-
class
|
6037
|
+
class co extends hn {
|
6032
6038
|
constructor(e, t = null) {
|
6033
6039
|
super(void 0, t);
|
6034
|
-
const i = new
|
6040
|
+
const i = new go(this);
|
6035
6041
|
this._root = i;
|
6036
|
-
const n = new
|
6042
|
+
const n = new _o();
|
6037
6043
|
this._gizmo = n, i.add(n);
|
6038
|
-
const r = new
|
6044
|
+
const r = new vo();
|
6039
6045
|
this._plane = r, i.add(r);
|
6040
6046
|
const a = this;
|
6041
6047
|
function o(S, E) {
|
@@ -6051,7 +6057,7 @@ class lo extends hn {
|
|
6051
6057
|
}
|
6052
6058
|
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
6059
|
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 =
|
6060
|
+
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
6061
|
}
|
6056
6062
|
connect() {
|
6057
6063
|
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 +6153,7 @@ class lo extends hn {
|
|
6147
6153
|
this.space = e;
|
6148
6154
|
}
|
6149
6155
|
}
|
6150
|
-
function
|
6156
|
+
function ho(s) {
|
6151
6157
|
if (this.domElement.ownerDocument.pointerLockElement)
|
6152
6158
|
return {
|
6153
6159
|
x: 0,
|
@@ -6163,7 +6169,7 @@ function co(s) {
|
|
6163
6169
|
};
|
6164
6170
|
}
|
6165
6171
|
}
|
6166
|
-
function
|
6172
|
+
function uo(s) {
|
6167
6173
|
if (this.enabled)
|
6168
6174
|
switch (s.pointerType) {
|
6169
6175
|
case "mouse":
|
@@ -6172,13 +6178,13 @@ function ho(s) {
|
|
6172
6178
|
break;
|
6173
6179
|
}
|
6174
6180
|
}
|
6175
|
-
function
|
6181
|
+
function po(s) {
|
6176
6182
|
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
6183
|
}
|
6178
|
-
function
|
6184
|
+
function mo(s) {
|
6179
6185
|
this.enabled && this.pointerMove(this._getPointer(s));
|
6180
6186
|
}
|
6181
|
-
function
|
6187
|
+
function fo(s) {
|
6182
6188
|
this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
|
6183
6189
|
}
|
6184
6190
|
function Di(s, e, t) {
|
@@ -6189,7 +6195,7 @@ function Di(s, e, t) {
|
|
6189
6195
|
return !1;
|
6190
6196
|
}
|
6191
6197
|
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
|
6198
|
+
class go extends vt {
|
6193
6199
|
constructor(e) {
|
6194
6200
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
6195
6201
|
}
|
@@ -6199,7 +6205,7 @@ class fo extends vt {
|
|
6199
6205
|
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
6206
|
}
|
6201
6207
|
}
|
6202
|
-
class
|
6208
|
+
class _o extends vt {
|
6203
6209
|
constructor() {
|
6204
6210
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
6205
6211
|
const e = new Je({
|
@@ -6458,7 +6464,7 @@ class go extends vt {
|
|
6458
6464
|
super.updateMatrixWorld(e);
|
6459
6465
|
}
|
6460
6466
|
}
|
6461
|
-
class
|
6467
|
+
class vo extends M {
|
6462
6468
|
constructor() {
|
6463
6469
|
super(
|
6464
6470
|
new un(1e5, 1e5, 2, 2),
|
@@ -6525,7 +6531,7 @@ class ge extends Yi {
|
|
6525
6531
|
let t = this.controls.get(e);
|
6526
6532
|
if (t === void 0) {
|
6527
6533
|
const i = document.querySelector(".clickable");
|
6528
|
-
t = new
|
6534
|
+
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
6535
|
this.dispatchEvent({ type: ge.DRAG_START });
|
6530
6536
|
}), t.addEventListener("mouseUp", () => {
|
6531
6537
|
this.dispatchEvent({ type: ge.DRAG_END });
|
@@ -6571,7 +6577,7 @@ class ge extends Yi {
|
|
6571
6577
|
return ge._instance || (ge._instance = new ge()), ge._instance;
|
6572
6578
|
}
|
6573
6579
|
}
|
6574
|
-
const
|
6580
|
+
const yo = new de(), Ri = new pe();
|
6575
6581
|
class Vs extends vt {
|
6576
6582
|
curve = new cs();
|
6577
6583
|
line;
|
@@ -6612,7 +6618,7 @@ class Vs extends vt {
|
|
6612
6618
|
const e = [];
|
6613
6619
|
this.draggable.children.forEach((t) => {
|
6614
6620
|
e.push([Pe(t.position.x, 3), Pe(t.position.y, 3), Pe(t.position.z, 3)]);
|
6615
|
-
}),
|
6621
|
+
}), Fa({
|
6616
6622
|
name: this.name,
|
6617
6623
|
points: e,
|
6618
6624
|
tension: this.tension,
|
@@ -6635,7 +6641,7 @@ class Vs extends vt {
|
|
6635
6641
|
this.addPoint(new P(-50, 0, 0), !1), this.addPoint(new P(50, 0, 0));
|
6636
6642
|
};
|
6637
6643
|
addPoint = (e, t = !0) => {
|
6638
|
-
const i = this.draggable.children.length, n = new M(
|
6644
|
+
const i = this.draggable.children.length, n = new M(yo, this.draggedMat);
|
6639
6645
|
return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
|
6640
6646
|
};
|
6641
6647
|
addNextPt = () => {
|
@@ -6905,7 +6911,7 @@ class Vs extends vt {
|
|
6905
6911
|
};
|
6906
6912
|
}
|
6907
6913
|
let ei = 0;
|
6908
|
-
class
|
6914
|
+
class bo extends vt {
|
6909
6915
|
defaultScale = 10;
|
6910
6916
|
_camera;
|
6911
6917
|
group = null;
|
@@ -7006,7 +7012,7 @@ const Zs = [
|
|
7006
7012
|
"Side by Side",
|
7007
7013
|
"Stacked",
|
7008
7014
|
"Quad"
|
7009
|
-
],
|
7015
|
+
], 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
7016
|
class me extends Ft {
|
7011
7017
|
static instance = null;
|
7012
7018
|
scene = new Gs();
|
@@ -7019,17 +7025,17 @@ class me extends Ft {
|
|
7019
7025
|
// RefObject to one of the "windows"
|
7020
7026
|
cameraHelpers = /* @__PURE__ */ new Map();
|
7021
7027
|
lightHelpers = /* @__PURE__ */ new Map();
|
7022
|
-
helpersContainer = new
|
7023
|
-
grid = new
|
7028
|
+
helpersContainer = new fa();
|
7029
|
+
grid = new ao();
|
7024
7030
|
axisHelper = new hs(500);
|
7025
7031
|
interactionHelper = new hs(100);
|
7026
7032
|
currentTransform;
|
7027
7033
|
// Tools
|
7028
7034
|
splineEditor;
|
7029
7035
|
// Override Materials
|
7030
|
-
depthMaterial = new
|
7031
|
-
normalsMaterial = new
|
7032
|
-
uvMaterial = new
|
7036
|
+
depthMaterial = new ga();
|
7037
|
+
normalsMaterial = new _a();
|
7038
|
+
uvMaterial = new lo();
|
7033
7039
|
wireframeMaterial = new Je({
|
7034
7040
|
opacity: 0.33,
|
7035
7041
|
transparent: !0,
|
@@ -7080,12 +7086,12 @@ class me extends Ft {
|
|
7080
7086
|
const r = {
|
7081
7087
|
Vector2: pe,
|
7082
7088
|
Vector3: P,
|
7083
|
-
Vector4:
|
7089
|
+
Vector4: Oa,
|
7084
7090
|
Quaternion: Ce,
|
7085
7091
|
Matrix4: ci,
|
7086
7092
|
Spherical: Li,
|
7087
|
-
Box3:
|
7088
|
-
Sphere:
|
7093
|
+
Box3: Ta,
|
7094
|
+
Sphere: Ma,
|
7089
7095
|
Raycaster: ni
|
7090
7096
|
};
|
7091
7097
|
ke.install({ THREE: r }), this.setupScene(), this.setupTools();
|
@@ -7280,7 +7286,7 @@ class me extends Ft {
|
|
7280
7286
|
Us,
|
7281
7287
|
{
|
7282
7288
|
name: "cameraHelper",
|
7283
|
-
icon:
|
7289
|
+
icon: Eo,
|
7284
7290
|
selected: this.cameraVisibility,
|
7285
7291
|
height: 24,
|
7286
7292
|
top: 2,
|
@@ -7298,7 +7304,7 @@ class me extends Ft {
|
|
7298
7304
|
Us,
|
7299
7305
|
{
|
7300
7306
|
name: "lightHelper",
|
7301
|
-
icon:
|
7307
|
+
icon: Co,
|
7302
7308
|
selected: this.lightVisibility,
|
7303
7309
|
height: 24,
|
7304
7310
|
top: 4,
|
@@ -7317,7 +7323,7 @@ class me extends Ft {
|
|
7317
7323
|
}
|
7318
7324
|
// Setup
|
7319
7325
|
setupRenderer() {
|
7320
|
-
this.renderer = new
|
7326
|
+
this.renderer = new va({
|
7321
7327
|
canvas: this.canvasRef.current,
|
7322
7328
|
stencil: !1
|
7323
7329
|
}), 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 +7339,7 @@ class me extends Ft {
|
|
7333
7339
|
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
7340
|
}
|
7335
7341
|
setupTools() {
|
7336
|
-
this.splineEditor = new
|
7342
|
+
this.splineEditor = new bo(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
|
7337
7343
|
}
|
7338
7344
|
// Public
|
7339
7345
|
play() {
|
@@ -7415,7 +7421,7 @@ class me extends Ft {
|
|
7415
7421
|
addCamera = (e) => {
|
7416
7422
|
const t = e.value, i = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
|
7417
7423
|
if (i !== void 0 && this.cameras.set(t.name, i), i instanceof Ct) {
|
7418
|
-
const n = new
|
7424
|
+
const n = new ya(i);
|
7419
7425
|
n.visible = this.cameraVisibility, this.cameraHelpers.set(i.name, n), this.scene.add(n);
|
7420
7426
|
}
|
7421
7427
|
this.setState({ lastUpdate: Date.now() });
|
@@ -7466,7 +7472,7 @@ class me extends Ft {
|
|
7466
7472
|
if (this.currentCamera.name === "UI")
|
7467
7473
|
return;
|
7468
7474
|
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
|
7475
|
+
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
7476
|
} else if (this.currentTransform !== void 0)
|
7471
7477
|
switch (e.key) {
|
7472
7478
|
case "r":
|
@@ -7517,19 +7523,19 @@ class me extends Ft {
|
|
7517
7523
|
let t;
|
7518
7524
|
switch (e.type) {
|
7519
7525
|
case "DirectionalLight":
|
7520
|
-
t = new
|
7526
|
+
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
7527
|
break;
|
7522
7528
|
case "HemisphereLight":
|
7523
|
-
t = new
|
7529
|
+
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
7530
|
break;
|
7525
7531
|
case "RectAreaLight":
|
7526
|
-
t = new
|
7532
|
+
t = new zr(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7527
7533
|
break;
|
7528
7534
|
case "PointLight":
|
7529
|
-
t = new
|
7535
|
+
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
7536
|
break;
|
7531
7537
|
case "SpotLight":
|
7532
|
-
t = new
|
7538
|
+
t = new Ea(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
7533
7539
|
break;
|
7534
7540
|
}
|
7535
7541
|
}
|
@@ -7539,7 +7545,7 @@ class me extends Ft {
|
|
7539
7545
|
const i = this.controls.get(e.name);
|
7540
7546
|
if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
|
7541
7547
|
return;
|
7542
|
-
const n = new
|
7548
|
+
const n = new Yr(e, t);
|
7543
7549
|
switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
|
7544
7550
|
case "Top":
|
7545
7551
|
case "Bottom":
|
@@ -7600,7 +7606,7 @@ class me extends Ft {
|
|
7600
7606
|
if (this.selectedItem === void 0)
|
7601
7607
|
return;
|
7602
7608
|
cancelAnimationFrame(this.cameraControlsRafID), this.cameraControlsRafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
|
7603
|
-
const i = 0.15, n = new
|
7609
|
+
const i = 0.15, n = new xa();
|
7604
7610
|
n.start(), this.selectedItem.getWorldPosition(e.target0);
|
7605
7611
|
const r = () => {
|
7606
7612
|
const a = n.getDelta();
|
@@ -7774,7 +7780,7 @@ function Ws(s) {
|
|
7774
7780
|
}
|
7775
7781
|
return s;
|
7776
7782
|
}
|
7777
|
-
function
|
7783
|
+
function So(s, e) {
|
7778
7784
|
function t() {
|
7779
7785
|
return `${e.app.appID}_light`;
|
7780
7786
|
}
|
@@ -7828,7 +7834,7 @@ function Co(s, e) {
|
|
7828
7834
|
}
|
7829
7835
|
);
|
7830
7836
|
}
|
7831
|
-
function
|
7837
|
+
function wo(s) {
|
7832
7838
|
const e = s.object, t = s.three;
|
7833
7839
|
function i() {
|
7834
7840
|
return `${t.app.appID}_animation`;
|
@@ -7899,7 +7905,7 @@ function So(s) {
|
|
7899
7905
|
}), o.push({
|
7900
7906
|
title: "Mixer",
|
7901
7907
|
items: y
|
7902
|
-
}), d = new
|
7908
|
+
}), d = new Pa(m), me.instance?.scene.add(d);
|
7903
7909
|
}
|
7904
7910
|
}
|
7905
7911
|
}
|
@@ -7931,7 +7937,7 @@ const Hi = {
|
|
7931
7937
|
children: []
|
7932
7938
|
};
|
7933
7939
|
let ce = { ...Hi };
|
7934
|
-
function
|
7940
|
+
function xo(s) {
|
7935
7941
|
const [e, t] = Z(-1);
|
7936
7942
|
tt(() => {
|
7937
7943
|
function a(c) {
|
@@ -7987,17 +7993,17 @@ function wo(s) {
|
|
7987
7993
|
] }),
|
7988
7994
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
7989
7995
|
/* @__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 ?
|
7996
|
+
n ? /* @__PURE__ */ u.jsx(wo, { object: ce, three: s.three }) : null,
|
7997
|
+
i.search("camera") > -1 ? Fr(ce, s.three) : null,
|
7998
|
+
i.search("light") > -1 ? So(ce, s.three) : null,
|
7999
|
+
r ? Ur(ce, s.three) : null
|
7994
8000
|
] })
|
7995
8001
|
] }) }, e)
|
7996
8002
|
},
|
7997
8003
|
"Inspector"
|
7998
8004
|
);
|
7999
8005
|
}
|
8000
|
-
class
|
8006
|
+
class Oo extends Ft {
|
8001
8007
|
// Renderer
|
8002
8008
|
autoClear = !0;
|
8003
8009
|
autoClearColor = !0;
|
@@ -8131,7 +8137,7 @@ class xo extends Ft {
|
|
8131
8137
|
options: [
|
8132
8138
|
{
|
8133
8139
|
title: "No Color Space",
|
8134
|
-
value:
|
8140
|
+
value: Aa
|
8135
8141
|
},
|
8136
8142
|
{
|
8137
8143
|
title: "SRB Color Space",
|
@@ -8157,31 +8163,31 @@ class xo extends Ft {
|
|
8157
8163
|
},
|
8158
8164
|
{
|
8159
8165
|
title: "Linear ",
|
8160
|
-
value:
|
8166
|
+
value: Da
|
8161
8167
|
},
|
8162
8168
|
{
|
8163
8169
|
title: "Reinhard",
|
8164
|
-
value:
|
8170
|
+
value: Ra
|
8165
8171
|
},
|
8166
8172
|
{
|
8167
8173
|
title: "Cineon ",
|
8168
|
-
value:
|
8174
|
+
value: Ia
|
8169
8175
|
},
|
8170
8176
|
{
|
8171
8177
|
title: "ACES Filmic",
|
8172
|
-
value:
|
8178
|
+
value: La
|
8173
8179
|
},
|
8174
8180
|
{
|
8175
8181
|
title: "AgX",
|
8176
|
-
value:
|
8182
|
+
value: ka
|
8177
8183
|
},
|
8178
8184
|
{
|
8179
8185
|
title: "Neutral",
|
8180
|
-
value:
|
8186
|
+
value: Ua
|
8181
8187
|
},
|
8182
8188
|
{
|
8183
8189
|
title: "Custom",
|
8184
|
-
value:
|
8190
|
+
value: ja
|
8185
8191
|
}
|
8186
8192
|
],
|
8187
8193
|
onChange: (t, i) => {
|
@@ -8214,7 +8220,7 @@ class xo extends Ft {
|
|
8214
8220
|
return `${this.props.three.app.appID}_renderer`;
|
8215
8221
|
}
|
8216
8222
|
}
|
8217
|
-
function
|
8223
|
+
function To(s) {
|
8218
8224
|
const [e] = Z([]), [t] = Z([]), [i, n] = Z(0), r = (c) => {
|
8219
8225
|
const l = c.value;
|
8220
8226
|
e.push(l), t.push(
|
@@ -8263,12 +8269,12 @@ function Oo(s) {
|
|
8263
8269
|
D.removeEventListener(A.ADD_SCENE, r), D.removeEventListener(A.REFRESH_SCENE, a), D.removeEventListener(A.REMOVE_SCENE, o);
|
8264
8270
|
}), []), /* @__PURE__ */ u.jsxs("div", { id: "SidePanel", children: [
|
8265
8271
|
/* @__PURE__ */ u.jsx("div", { className: "scenes", children: t }, i),
|
8266
|
-
/* @__PURE__ */ u.jsx(wo, { three: s.three }),
|
8267
8272
|
/* @__PURE__ */ u.jsx(xo, { three: s.three }),
|
8273
|
+
/* @__PURE__ */ u.jsx(Oo, { three: s.three }),
|
8268
8274
|
/* @__PURE__ */ u.jsx(ae, { three: s.three })
|
8269
8275
|
] });
|
8270
8276
|
}
|
8271
|
-
function
|
8277
|
+
function Go(s) {
|
8272
8278
|
return tt(() => {
|
8273
8279
|
function e(o) {
|
8274
8280
|
let c = null;
|
@@ -8317,7 +8323,7 @@ function Wo(s) {
|
|
8317
8323
|
const { key: c, uuid: l, value: d, subitem: p } = o.value, f = e(l)?.getObjectByProperty("uuid", l);
|
8318
8324
|
if (f !== void 0)
|
8319
8325
|
try {
|
8320
|
-
p !== void 0 ?
|
8326
|
+
p !== void 0 ? or(f, p)[c](d) : f[c](d);
|
8321
8327
|
} catch (C) {
|
8322
8328
|
console.log("Error requesting method:"), console.log(C), console.log(c), console.log(d);
|
8323
8329
|
}
|
@@ -8327,15 +8333,15 @@ function Wo(s) {
|
|
8327
8333
|
};
|
8328
8334
|
}, []), null;
|
8329
8335
|
}
|
8330
|
-
function
|
8336
|
+
function Mo(s) {
|
8331
8337
|
return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
|
8332
8338
|
/* @__PURE__ */ u.jsx("div", { className: "header", children: s.header }),
|
8333
8339
|
s.children,
|
8334
8340
|
/* @__PURE__ */ u.jsx("div", { className: "footer", children: s.footer })
|
8335
8341
|
] });
|
8336
8342
|
}
|
8337
|
-
function
|
8338
|
-
return /* @__PURE__ */ u.jsx(
|
8343
|
+
function Xo(s) {
|
8344
|
+
return /* @__PURE__ */ u.jsx(Mo, { children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
8339
8345
|
/* @__PURE__ */ u.jsx(
|
8340
8346
|
me,
|
8341
8347
|
{
|
@@ -8346,61 +8352,61 @@ function Go(s) {
|
|
8346
8352
|
onSceneUpdate: s.onSceneUpdate
|
8347
8353
|
}
|
8348
8354
|
),
|
8349
|
-
/* @__PURE__ */ u.jsx(
|
8355
|
+
/* @__PURE__ */ u.jsx(To, { three: s.three })
|
8350
8356
|
] }) });
|
8351
8357
|
}
|
8352
8358
|
export {
|
8353
8359
|
oi as Accordion,
|
8354
|
-
|
8360
|
+
zo as Application,
|
8355
8361
|
Wi as BaseRemote,
|
8356
8362
|
bn as ChildObject,
|
8357
8363
|
Es as ContainerObject,
|
8358
|
-
|
8359
|
-
|
8360
|
-
|
8361
|
-
|
8362
|
-
|
8363
|
-
|
8364
|
-
|
8364
|
+
mr as Draggable,
|
8365
|
+
pr as DraggableItem,
|
8366
|
+
fr as Dropdown,
|
8367
|
+
gr as DropdownItem,
|
8368
|
+
Mo as Editor,
|
8369
|
+
No as ElementProxy,
|
8370
|
+
sr as ElementProxyReceiver,
|
8365
8371
|
ti as ExportTexture,
|
8366
|
-
|
8372
|
+
xo as Inspector,
|
8367
8373
|
me as MultiView,
|
8368
8374
|
yn as NavButton,
|
8369
|
-
|
8370
|
-
|
8371
|
-
|
8372
|
-
|
8373
|
-
|
8374
|
-
|
8375
|
-
|
8376
|
-
|
8375
|
+
Fo as ProxyManager,
|
8376
|
+
Ga as QualityType,
|
8377
|
+
Ho as RemoteComponents,
|
8378
|
+
Wo as RemoteController,
|
8379
|
+
Vo as RemoteTheatre,
|
8380
|
+
Zo as RemoteThree,
|
8381
|
+
Go as SceneInspector,
|
8382
|
+
To as SidePanel,
|
8377
8383
|
Vs as Spline,
|
8378
|
-
|
8379
|
-
|
8384
|
+
bo as SplineEditor,
|
8385
|
+
Xo as ThreeEditor,
|
8380
8386
|
A as ToolEvents,
|
8381
8387
|
ge as Transform,
|
8382
|
-
|
8388
|
+
jo as WebworkerEventHandlers,
|
8383
8389
|
ri as capitalize,
|
8384
8390
|
$e as clamp,
|
8385
8391
|
ps as colorToHex,
|
8386
|
-
|
8387
|
-
|
8392
|
+
Fa as copyToClipboard,
|
8393
|
+
Bo as customizeTheatreElements,
|
8388
8394
|
D as debugDispatcher,
|
8389
|
-
|
8390
|
-
|
8395
|
+
Ro as defaultTheatreCallback,
|
8396
|
+
Io as detectSettings,
|
8391
8397
|
He as dispose,
|
8392
|
-
|
8393
|
-
|
8394
|
-
|
8398
|
+
Xa as disposeMaterial,
|
8399
|
+
ko as disposeTexture,
|
8400
|
+
Lo as distance,
|
8395
8401
|
ji as hierarchyUUID,
|
8396
|
-
|
8402
|
+
Ha as isColor,
|
8397
8403
|
ki as mix,
|
8398
8404
|
ai as noop,
|
8399
8405
|
_s as normalize,
|
8400
|
-
|
8401
|
-
|
8406
|
+
Uo as parseModelLite,
|
8407
|
+
za as randomID,
|
8402
8408
|
vs as resetThreeObjects,
|
8403
8409
|
Pe as round,
|
8404
|
-
|
8410
|
+
Yo as theatreEditorApp,
|
8405
8411
|
Ui as totalThreeObjects
|
8406
8412
|
};
|