@tomorrowevening/hermes 0.0.101 → 0.0.102
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +14 -14
- package/dist/hermes.es.js +534 -513
- package/package.json +1 -1
- package/types/core/remote/RemoteThree.d.ts +2 -1
- package/types/core/types.d.ts +1 -1
- package/types/editor/global.d.ts +2 -1
- package/types/editor/tools/splineEditor/Spline.d.ts +1 -1
- package/types/editor/tools/splineEditor/index.d.ts +2 -0
- package/types/editor/sidePanel/CustomAccordion.d.ts +0 -6
package/dist/hermes.es.js
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
import { OrthographicCamera as
|
2
|
-
import
|
3
|
-
import { Reorder as
|
4
|
-
const
|
1
|
+
import { OrthographicCamera as wi, Scene as Ps, MeshBasicMaterial as Ge, BufferGeometry as at, Float32BufferAttribute as Be, Mesh as w, LinearSRGBColorSpace as Xi, EventDispatcher as Ds, Texture as In, RepeatWrapping as $i, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Rs, DoubleSide as Di, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as Fn, MultiplyBlending as zn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Zn, MinEquation as Gn, MaxEquation as Wn, ZeroFactor as As, OneFactor as Is, SrcColorFactor as Ls, OneMinusSrcColorFactor as ks, SrcAlphaFactor as Us, OneMinusSrcAlphaFactor as js, DstAlphaFactor as Ns, OneMinusDstAlphaFactor as Fs, DstColorFactor as zs, OneMinusDstColorFactor as Hs, SrcAlphaSaturateFactor as Vn, ConstantColorFactor as Ys, OneMinusConstantColorFactor as Bs, ConstantAlphaFactor as Zs, OneMinusConstantAlphaFactor as Gs, Line as Se, LineBasicMaterial as Ri, Ray as Xn, Plane as $n, MathUtils as Qn, Vector3 as O, Controls as Ws, MOUSE as rt, TOUCH as nt, Quaternion as fe, Spherical as Si, Vector2 as ae, ShaderMaterial as Vs, GLSL3 as qn, PlaneGeometry as Xs, Raycaster as Xt, Euler as $s, Matrix4 as Kt, Object3D as ot, CylinderGeometry as ce, BoxGeometry as ne, OctahedronGeometry as kt, SphereGeometry as Qs, TorusGeometry as dt, CatmullRomCurve3 as Qi, Group as Kn, AxesHelper as qi, MeshDepthMaterial as Jn, MeshNormalMaterial as er, WebGLRenderer as tr, PerspectiveCamera as hi, CameraHelper as ir, SkinnedMesh as sr, SpotLightHelper as nr, PointLightHelper as rr, HemisphereLightHelper as ar, DirectionalLightHelper as or, Clock as lr, Vector4 as cr, Box3 as hr, Sphere as dr } from "three";
|
2
|
+
import qs, { useState as G, useRef as ee, useEffect as lt, useMemo as xt, Component as Jt, createRef as Ae, forwardRef as ur } from "react";
|
3
|
+
import { Reorder as Ks } from "framer-motion";
|
4
|
+
const Js = () => {
|
5
5
|
}, za = () => {
|
6
6
|
};
|
7
|
-
function
|
7
|
+
function $t(s) {
|
8
8
|
return s.substring(0, 1).toUpperCase() + s.substring(1);
|
9
9
|
}
|
10
|
-
function
|
10
|
+
function pr(s) {
|
11
11
|
const e = JSON.stringify(s);
|
12
12
|
return navigator.clipboard.writeText(e), e;
|
13
13
|
}
|
14
14
|
function He(s, e, t) {
|
15
15
|
return Math.min(e, Math.max(s, t));
|
16
16
|
}
|
17
|
-
function
|
17
|
+
function Ki(s, e, t) {
|
18
18
|
return (t - s) / (e - s);
|
19
19
|
}
|
20
|
-
function
|
20
|
+
function xi(s, e, t) {
|
21
21
|
return s * (1 - t) + e * t;
|
22
22
|
}
|
23
23
|
function Ha(s, e) {
|
24
24
|
const t = s - e;
|
25
25
|
return Math.sqrt(t * t);
|
26
26
|
}
|
27
|
-
function
|
27
|
+
function mr() {
|
28
28
|
return Math.round(Math.random() * 1e6).toString();
|
29
29
|
}
|
30
|
-
function
|
30
|
+
function fr(s) {
|
31
31
|
return s.r !== void 0 && s.g !== void 0 && s.b !== void 0;
|
32
32
|
}
|
33
|
-
function
|
33
|
+
function Ji(s) {
|
34
34
|
const e = Math.round(s.r * 255), t = Math.round(s.g * 255), i = Math.round(s.b * 255), n = (h) => {
|
35
35
|
const c = h.toString(16);
|
36
36
|
return c.length === 1 ? "0" + c : c;
|
@@ -40,14 +40,14 @@ function Ki(s) {
|
|
40
40
|
function Ot(s, e = 1) {
|
41
41
|
return Number(s.toFixed(e));
|
42
42
|
}
|
43
|
-
let
|
44
|
-
const
|
45
|
-
|
46
|
-
},
|
43
|
+
let Oi = 0;
|
44
|
+
const es = () => {
|
45
|
+
Oi = 0;
|
46
|
+
}, Ti = (s) => {
|
47
47
|
if (!s)
|
48
48
|
return;
|
49
49
|
let e = s.name.replaceAll(" ", "").replaceAll("/", ".");
|
50
|
-
if (e.length === 0 && (e = `obj_${
|
50
|
+
if (e.length === 0 && (e = `obj_${Oi}`, Oi++), s.parent !== null && s.parent.uuid.length > 0 && (e = `${s.parent.uuid}.${e}`), s.uuid = e, s.isMesh !== void 0) {
|
51
51
|
const t = s;
|
52
52
|
if (Array.isArray(t.material))
|
53
53
|
t.material.forEach((i, n) => {
|
@@ -58,10 +58,10 @@ const Ji = () => {
|
|
58
58
|
i.uuid = `${e}.material`;
|
59
59
|
}
|
60
60
|
}
|
61
|
-
s.children.forEach((t) =>
|
61
|
+
s.children.forEach((t) => Ti(t));
|
62
62
|
}, Ya = (s) => {
|
63
63
|
s?.dispose();
|
64
|
-
},
|
64
|
+
}, _r = (s) => {
|
65
65
|
s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
|
66
66
|
}, We = (s) => {
|
67
67
|
if (s) {
|
@@ -71,12 +71,12 @@ const Ji = () => {
|
|
71
71
|
}
|
72
72
|
if (s.parent && s.parent.remove(s), s.isMesh) {
|
73
73
|
const e = s;
|
74
|
-
e.geometry?.dispose(),
|
74
|
+
e.geometry?.dispose(), _r(e.material);
|
75
75
|
}
|
76
76
|
s.dispose !== void 0 && s.dispose();
|
77
77
|
}
|
78
78
|
};
|
79
|
-
class
|
79
|
+
class Gt {
|
80
80
|
static renderer;
|
81
81
|
static canvas;
|
82
82
|
static context = null;
|
@@ -105,7 +105,7 @@ class Zt {
|
|
105
105
|
}
|
106
106
|
static renderToCanvas(e) {
|
107
107
|
if (this.material === null) {
|
108
|
-
this.camera = new
|
108
|
+
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ps(), this.material = new Ge();
|
109
109
|
const t = new at();
|
110
110
|
t.setAttribute("position", new Be([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Be([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Be([0, 0, 2, 0, 0, 2], 2));
|
111
111
|
const i = new w(t, this.material);
|
@@ -115,7 +115,7 @@ class Zt {
|
|
115
115
|
this.material.map = e, this.renderer.render(this.scene, this.camera);
|
116
116
|
else {
|
117
117
|
const t = this.renderer.outputColorSpace, i = e.colorSpace;
|
118
|
-
this.renderer.outputColorSpace =
|
118
|
+
this.renderer.outputColorSpace = Xi, e.colorSpace = Xi, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = t, e.colorSpace = i;
|
119
119
|
}
|
120
120
|
return this.renderer.domElement;
|
121
121
|
}
|
@@ -178,9 +178,9 @@ class Ba {
|
|
178
178
|
e && (this._mode = "editor");
|
179
179
|
}
|
180
180
|
}
|
181
|
-
var D = /* @__PURE__ */ ((s) => (s.CUSTOM = "ToolEvents::custom", s.SELECT_DROPDOWN = "ToolEvents::selectDropdown", s.DRAG_UPDATE = "ToolEvents::dragUpdate", s.ADD_SCENE = "ToolEvents::addScene", s.REFRESH_SCENE = "ToolEvents::refreshScene", s.REMOVE_SCENE = "ToolEvents::removeScene", s.SET_SCENE = "ToolEvents::setScene", s.GET_OBJECT = "ToolEvents::getObject", s.SET_OBJECT = "ToolEvents::setObject", s.UPDATE_OBJECT = "ToolEvents::updateObject", s.CREATE_TEXTURE = "ToolEvents::createTexture", s.REQUEST_METHOD = "ToolEvents::requestMethod", s.ADD_CAMERA = "ToolEvents::addCamera", s.REMOVE_CAMERA = "ToolEvents::removeCamera", s.ADD_GROUP = "ToolEvents::addGroup", s.REMOVE_GROUP = "ToolEvents::removeGroup", s))(D || {});
|
182
|
-
const R = new
|
183
|
-
class
|
181
|
+
var D = /* @__PURE__ */ ((s) => (s.CUSTOM = "ToolEvents::custom", s.SELECT_DROPDOWN = "ToolEvents::selectDropdown", s.DRAG_UPDATE = "ToolEvents::dragUpdate", s.ADD_SCENE = "ToolEvents::addScene", s.REFRESH_SCENE = "ToolEvents::refreshScene", s.REMOVE_SCENE = "ToolEvents::removeScene", s.SET_SCENE = "ToolEvents::setScene", s.GET_OBJECT = "ToolEvents::getObject", s.SET_OBJECT = "ToolEvents::setObject", s.UPDATE_OBJECT = "ToolEvents::updateObject", s.CREATE_TEXTURE = "ToolEvents::createTexture", s.REQUEST_METHOD = "ToolEvents::requestMethod", s.ADD_CAMERA = "ToolEvents::addCamera", s.REMOVE_CAMERA = "ToolEvents::removeCamera", s.ADD_GROUP = "ToolEvents::addGroup", s.REMOVE_GROUP = "ToolEvents::removeGroup", s.ADD_SPLINE = "ToolEvents::addSpline", s))(D || {});
|
182
|
+
const R = new Ds();
|
183
|
+
class Ai {
|
184
184
|
app;
|
185
185
|
constructor(e) {
|
186
186
|
this.app = e;
|
@@ -192,7 +192,7 @@ class Ri {
|
|
192
192
|
handleEditor(e, t, i) {
|
193
193
|
}
|
194
194
|
}
|
195
|
-
class Za extends
|
195
|
+
class Za extends Ai {
|
196
196
|
selectDropdown(e, t) {
|
197
197
|
this.app.send({
|
198
198
|
event: "selectComponent",
|
@@ -275,7 +275,7 @@ function Wa() {
|
|
275
275
|
const i = s?.children[3];
|
276
276
|
i.style.top = "0", i.style.right = "300px";
|
277
277
|
}
|
278
|
-
class
|
278
|
+
class en extends Ai {
|
279
279
|
project;
|
280
280
|
sheets = /* @__PURE__ */ new Map();
|
281
281
|
sheetObjects = /* @__PURE__ */ new Map();
|
@@ -310,7 +310,7 @@ class Js extends Ri {
|
|
310
310
|
}
|
311
311
|
}), new Promise((n) => {
|
312
312
|
const a = t !== void 0 ? { ...t } : {};
|
313
|
-
a.rafDriver =
|
313
|
+
a.rafDriver = en.rafDriver, this.sheet(e, i)?.sequence.play(a).then((r) => n(r));
|
314
314
|
});
|
315
315
|
}
|
316
316
|
pauseSheet(e, t) {
|
@@ -338,12 +338,12 @@ class Js extends Ri {
|
|
338
338
|
return;
|
339
339
|
const h = `${this.getSheetInstance(e, a)}_${t}`;
|
340
340
|
let c = this.sheetObjects.get(h);
|
341
|
-
c !== void 0 ? c = r.object(t, { ...i, ...c.value }, { reconfigure: !0 }) : c = r.object(t, i), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, n !== void 0 ? n :
|
341
|
+
c !== void 0 ? c = r.object(t, { ...i, ...c.value }, { reconfigure: !0 }) : c = r.object(t, i), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, n !== void 0 ? n : Js);
|
342
342
|
const u = c.onValuesChange((m) => {
|
343
343
|
if (this.app.editor) {
|
344
344
|
for (const g in m) {
|
345
345
|
const S = m[g];
|
346
|
-
typeof S == "object" &&
|
346
|
+
typeof S == "object" && fr(S) && (m[g] = {
|
347
347
|
r: S.r,
|
348
348
|
g: S.g,
|
349
349
|
b: S.b,
|
@@ -450,7 +450,7 @@ class Js extends Ri {
|
|
450
450
|
this.studio?.ui.hide();
|
451
451
|
}
|
452
452
|
}
|
453
|
-
function
|
453
|
+
function gr(s) {
|
454
454
|
if (s.name === "cameras")
|
455
455
|
return "camera";
|
456
456
|
if (s.name === "interactive")
|
@@ -475,7 +475,7 @@ function st(s) {
|
|
475
475
|
e.children.push(st(t));
|
476
476
|
}), e;
|
477
477
|
}
|
478
|
-
function
|
478
|
+
function vr(s) {
|
479
479
|
const e = {};
|
480
480
|
for (const t in s) {
|
481
481
|
const i = s[t].value;
|
@@ -491,7 +491,7 @@ function gr(s) {
|
|
491
491
|
}
|
492
492
|
return e;
|
493
493
|
}
|
494
|
-
function
|
494
|
+
function yr(s) {
|
495
495
|
switch (s) {
|
496
496
|
case "blendSrcAlpha":
|
497
497
|
case "blendDstAlpha":
|
@@ -506,7 +506,7 @@ function vr(s) {
|
|
506
506
|
function Qe(s) {
|
507
507
|
const e = {};
|
508
508
|
for (const t in s) {
|
509
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
509
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || yr(t))
|
510
510
|
continue;
|
511
511
|
const i = typeof s[t], n = s[t];
|
512
512
|
switch (i) {
|
@@ -517,10 +517,10 @@ function Qe(s) {
|
|
517
517
|
break;
|
518
518
|
case "object":
|
519
519
|
n !== null ? (e[t] = n, n.isTexture ? e[t] = {
|
520
|
-
src:
|
520
|
+
src: Gt.renderToBlob(n),
|
521
521
|
offset: [n.offset.x, n.offset.y],
|
522
522
|
repeat: [n.repeat.x, n.repeat.y]
|
523
|
-
} : t === "uniforms" && (e[t] =
|
523
|
+
} : t === "uniforms" && (e[t] = vr(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
524
524
|
src: "",
|
525
525
|
offset: [0, 0],
|
526
526
|
repeat: [1, 1]
|
@@ -530,7 +530,7 @@ function Qe(s) {
|
|
530
530
|
}
|
531
531
|
return s.anisotropy !== void 0 && (e.anisotropy = s.anisotropy), s.clearcoat !== void 0 && (e.clearcoat = s.clearcoat), s.iridescence !== void 0 && (e.iridescence = s.iridescence), s.dispersion !== void 0 && (e.dispersion = s.dispersion), s.sheen !== void 0 && (e.sheen = s.sheen), s.transmission !== void 0 && (e.transmission = s.transmission), s.transmission !== void 0 && (e.transmission = s.transmission), e;
|
532
532
|
}
|
533
|
-
function
|
533
|
+
function di(s) {
|
534
534
|
s.updateMatrix();
|
535
535
|
const e = {
|
536
536
|
name: s.name,
|
@@ -611,7 +611,7 @@ function hi(s) {
|
|
611
611
|
});
|
612
612
|
return e;
|
613
613
|
}
|
614
|
-
function
|
614
|
+
function br(s, e) {
|
615
615
|
const t = e.split(".");
|
616
616
|
switch (t.length) {
|
617
617
|
case 1:
|
@@ -628,7 +628,7 @@ function yr(s, e) {
|
|
628
628
|
return s[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
629
629
|
}
|
630
630
|
}
|
631
|
-
function
|
631
|
+
function Er(s, e) {
|
632
632
|
for (const t in e)
|
633
633
|
s[t] = e[t];
|
634
634
|
}
|
@@ -673,19 +673,19 @@ function K(s, e, t) {
|
|
673
673
|
r = s[i[0]][i[1]][i[2]][i[3]][i[4]];
|
674
674
|
break;
|
675
675
|
}
|
676
|
-
r != null &&
|
676
|
+
r != null && Er(r, t);
|
677
677
|
}
|
678
678
|
}
|
679
|
-
function
|
679
|
+
function tn(s) {
|
680
680
|
return new Promise((e, t) => {
|
681
681
|
const i = new Image();
|
682
682
|
i.onload = () => {
|
683
|
-
const n = new
|
684
|
-
n.wrapS =
|
683
|
+
const n = new In(i);
|
684
|
+
n.wrapS = $i, n.wrapT = $i, n.needsUpdate = !0, e(n);
|
685
685
|
}, i.onerror = t, i.src = s;
|
686
686
|
});
|
687
687
|
}
|
688
|
-
class Va extends
|
688
|
+
class Va extends Ai {
|
689
689
|
scene = void 0;
|
690
690
|
scenes = /* @__PURE__ */ new Map();
|
691
691
|
renderer = void 0;
|
@@ -699,15 +699,15 @@ class Va extends Ri {
|
|
699
699
|
}), this.renderTargets.clear(), this.renderer?.dispose();
|
700
700
|
}
|
701
701
|
getObject(e) {
|
702
|
-
this.app.debugEnabled && (this.renderer !== void 0 && (
|
702
|
+
this.app.debugEnabled && (this.renderer !== void 0 && (Gt.renderer = this.renderer), this.app.send({
|
703
703
|
event: "getObject",
|
704
704
|
target: "app",
|
705
705
|
data: e
|
706
706
|
}));
|
707
707
|
}
|
708
708
|
setObject(e) {
|
709
|
-
this.renderer !== void 0 && (
|
710
|
-
const t =
|
709
|
+
this.renderer !== void 0 && (Gt.renderer = this.renderer);
|
710
|
+
const t = di(e);
|
711
711
|
this.app.send({
|
712
712
|
event: "setObject",
|
713
713
|
target: "editor",
|
@@ -783,11 +783,18 @@ class Va extends Ri {
|
|
783
783
|
});
|
784
784
|
}), this.groups.clear();
|
785
785
|
}
|
786
|
+
addSpline(e) {
|
787
|
+
this.app.send({
|
788
|
+
event: "addSpline",
|
789
|
+
target: "editor",
|
790
|
+
data: JSON.stringify(e.toJSON())
|
791
|
+
});
|
792
|
+
}
|
786
793
|
// Scenes
|
787
794
|
addScene(e) {
|
788
795
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
|
789
796
|
return;
|
790
|
-
|
797
|
+
es(), Ti(e);
|
791
798
|
const t = st(e);
|
792
799
|
this.app.send({
|
793
800
|
event: "addScene",
|
@@ -830,7 +837,7 @@ class Va extends Ri {
|
|
830
837
|
setScene(e) {
|
831
838
|
if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
|
832
839
|
return;
|
833
|
-
this.renderer !== void 0 && (
|
840
|
+
this.renderer !== void 0 && (Gt.renderer = this.renderer), es(), Ti(e);
|
834
841
|
const t = st(e);
|
835
842
|
this.app.send({
|
836
843
|
event: "setScene",
|
@@ -842,7 +849,7 @@ class Va extends Ri {
|
|
842
849
|
addCamera(e) {
|
843
850
|
if (!this.app.debugEnabled)
|
844
851
|
return;
|
845
|
-
const t =
|
852
|
+
const t = di(e);
|
846
853
|
this.app.send({
|
847
854
|
event: "addCamera",
|
848
855
|
target: "editor",
|
@@ -852,7 +859,7 @@ class Va extends Ri {
|
|
852
859
|
removeCamera(e) {
|
853
860
|
if (!this.app.debugEnabled)
|
854
861
|
return;
|
855
|
-
const t =
|
862
|
+
const t = di(e);
|
856
863
|
this.app.send({
|
857
864
|
event: "removeCamera",
|
858
865
|
target: "editor",
|
@@ -916,11 +923,14 @@ class Va extends Ri {
|
|
916
923
|
case "removeGroup":
|
917
924
|
R.dispatchEvent({ type: D.REMOVE_GROUP, value: i.data });
|
918
925
|
break;
|
926
|
+
case "addSpline":
|
927
|
+
R.dispatchEvent({ type: D.ADD_SPLINE, value: i.data });
|
928
|
+
break;
|
919
929
|
}
|
920
930
|
}
|
921
931
|
// Renderer
|
922
932
|
addRT(e, t) {
|
923
|
-
const i = new
|
933
|
+
const i = new Ln(32, 32, t);
|
924
934
|
i.texture.name = e, this.renderTargets.set(e, i);
|
925
935
|
}
|
926
936
|
resize(e, t) {
|
@@ -945,7 +955,7 @@ class Va extends Ri {
|
|
945
955
|
return this.renderer !== void 0 ? this.renderer?.domElement : null;
|
946
956
|
}
|
947
957
|
}
|
948
|
-
var
|
958
|
+
var Mi = { exports: {} }, ut = {};
|
949
959
|
/**
|
950
960
|
* @license React
|
951
961
|
* react-jsx-runtime.production.min.js
|
@@ -955,12 +965,12 @@ var Ti = { exports: {} }, ut = {};
|
|
955
965
|
* This source code is licensed under the MIT license found in the
|
956
966
|
* LICENSE file in the root directory of this source tree.
|
957
967
|
*/
|
958
|
-
var
|
959
|
-
function
|
960
|
-
if (
|
968
|
+
var ts;
|
969
|
+
function Cr() {
|
970
|
+
if (ts)
|
961
971
|
return ut;
|
962
|
-
|
963
|
-
var s =
|
972
|
+
ts = 1;
|
973
|
+
var s = qs, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
|
964
974
|
function r(o, h, c) {
|
965
975
|
var u, m = {}, _ = null, g = null;
|
966
976
|
c !== void 0 && (_ = "" + c), h.key !== void 0 && (_ = "" + h.key), h.ref !== void 0 && (g = h.ref);
|
@@ -983,10 +993,10 @@ var pt = {};
|
|
983
993
|
* This source code is licensed under the MIT license found in the
|
984
994
|
* LICENSE file in the root directory of this source tree.
|
985
995
|
*/
|
986
|
-
var
|
987
|
-
function
|
988
|
-
return
|
989
|
-
var s =
|
996
|
+
var is;
|
997
|
+
function wr() {
|
998
|
+
return is || (is = 1, process.env.NODE_ENV !== "production" && function() {
|
999
|
+
var s = qs, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), S = Symbol.iterator, M = "@@iterator";
|
990
1000
|
function T(l) {
|
991
1001
|
if (l === null || typeof l != "object")
|
992
1002
|
return null;
|
@@ -1102,7 +1112,7 @@ function Cr() {
|
|
1102
1112
|
$++;
|
1103
1113
|
}
|
1104
1114
|
}
|
1105
|
-
function
|
1115
|
+
function cn() {
|
1106
1116
|
{
|
1107
1117
|
if ($--, $ === 0) {
|
1108
1118
|
var l = {
|
@@ -1137,27 +1147,27 @@ function Cr() {
|
|
1137
1147
|
$ < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
1138
1148
|
}
|
1139
1149
|
}
|
1140
|
-
var
|
1150
|
+
var ii = f.ReactCurrentDispatcher, si;
|
1141
1151
|
function Dt(l, y, C) {
|
1142
1152
|
{
|
1143
|
-
if (
|
1153
|
+
if (si === void 0)
|
1144
1154
|
try {
|
1145
1155
|
throw Error();
|
1146
1156
|
} catch (F) {
|
1147
1157
|
var I = F.stack.trim().match(/\n( *(at )?)/);
|
1148
|
-
|
1158
|
+
si = I && I[1] || "";
|
1149
1159
|
}
|
1150
1160
|
return `
|
1151
|
-
` +
|
1161
|
+
` + si + l;
|
1152
1162
|
}
|
1153
1163
|
}
|
1154
|
-
var
|
1164
|
+
var ni = !1, Rt;
|
1155
1165
|
{
|
1156
|
-
var
|
1157
|
-
Rt = new
|
1166
|
+
var hn = typeof WeakMap == "function" ? WeakMap : Map;
|
1167
|
+
Rt = new hn();
|
1158
1168
|
}
|
1159
|
-
function
|
1160
|
-
if (!l ||
|
1169
|
+
function Li(l, y) {
|
1170
|
+
if (!l || ni)
|
1161
1171
|
return "";
|
1162
1172
|
{
|
1163
1173
|
var C = Rt.get(l);
|
@@ -1165,11 +1175,11 @@ function Cr() {
|
|
1165
1175
|
return C;
|
1166
1176
|
}
|
1167
1177
|
var I;
|
1168
|
-
|
1178
|
+
ni = !0;
|
1169
1179
|
var F = Error.prepareStackTrace;
|
1170
1180
|
Error.prepareStackTrace = void 0;
|
1171
1181
|
var Y;
|
1172
|
-
Y =
|
1182
|
+
Y = ii.current, ii.current = null, Pt();
|
1173
1183
|
try {
|
1174
1184
|
if (y) {
|
1175
1185
|
var U = function() {
|
@@ -1222,15 +1232,15 @@ function Cr() {
|
|
1222
1232
|
}
|
1223
1233
|
}
|
1224
1234
|
} finally {
|
1225
|
-
|
1235
|
+
ni = !1, ii.current = Y, cn(), Error.prepareStackTrace = F;
|
1226
1236
|
}
|
1227
|
-
var $e = l ? l.displayName || l.name : "",
|
1228
|
-
return typeof l == "function" && Rt.set(l,
|
1237
|
+
var $e = l ? l.displayName || l.name : "", Vi = $e ? Dt($e) : "";
|
1238
|
+
return typeof l == "function" && Rt.set(l, Vi), Vi;
|
1229
1239
|
}
|
1230
|
-
function
|
1231
|
-
return
|
1240
|
+
function dn(l, y, C) {
|
1241
|
+
return Li(l, !1);
|
1232
1242
|
}
|
1233
|
-
function
|
1243
|
+
function un(l) {
|
1234
1244
|
var y = l.prototype;
|
1235
1245
|
return !!(y && y.isReactComponent);
|
1236
1246
|
}
|
@@ -1238,7 +1248,7 @@ function Cr() {
|
|
1238
1248
|
if (l == null)
|
1239
1249
|
return "";
|
1240
1250
|
if (typeof l == "function")
|
1241
|
-
return
|
1251
|
+
return Li(l, un(l));
|
1242
1252
|
if (typeof l == "string")
|
1243
1253
|
return Dt(l);
|
1244
1254
|
switch (l) {
|
@@ -1250,7 +1260,7 @@ function Cr() {
|
|
1250
1260
|
if (typeof l == "object")
|
1251
1261
|
switch (l.$$typeof) {
|
1252
1262
|
case h:
|
1253
|
-
return
|
1263
|
+
return dn(l.render);
|
1254
1264
|
case m:
|
1255
1265
|
return At(l.type, y, C);
|
1256
1266
|
case _: {
|
@@ -1263,15 +1273,15 @@ function Cr() {
|
|
1263
1273
|
}
|
1264
1274
|
return "";
|
1265
1275
|
}
|
1266
|
-
var It = Object.prototype.hasOwnProperty,
|
1276
|
+
var It = Object.prototype.hasOwnProperty, ki = {}, Ui = f.ReactDebugCurrentFrame;
|
1267
1277
|
function Lt(l) {
|
1268
1278
|
if (l) {
|
1269
1279
|
var y = l._owner, C = At(l.type, l._source, y ? y.type : null);
|
1270
|
-
|
1280
|
+
Ui.setExtraStackFrame(C);
|
1271
1281
|
} else
|
1272
|
-
|
1282
|
+
Ui.setExtraStackFrame(null);
|
1273
1283
|
}
|
1274
|
-
function
|
1284
|
+
function pn(l, y, C, I, F) {
|
1275
1285
|
{
|
1276
1286
|
var Y = Function.call.bind(It);
|
1277
1287
|
for (var U in l)
|
@@ -1286,42 +1296,42 @@ function Cr() {
|
|
1286
1296
|
} catch (Q) {
|
1287
1297
|
k = Q;
|
1288
1298
|
}
|
1289
|
-
k && !(k instanceof Error) && (Lt(F), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", C, U, typeof k), Lt(null)), k instanceof Error && !(k.message in
|
1299
|
+
k && !(k instanceof Error) && (Lt(F), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", C, U, typeof k), Lt(null)), k instanceof Error && !(k.message in ki) && (ki[k.message] = !0, Lt(F), v("Failed %s type: %s", C, k.message), Lt(null));
|
1290
1300
|
}
|
1291
1301
|
}
|
1292
1302
|
}
|
1293
|
-
var
|
1294
|
-
function
|
1295
|
-
return
|
1303
|
+
var mn = Array.isArray;
|
1304
|
+
function ri(l) {
|
1305
|
+
return mn(l);
|
1296
1306
|
}
|
1297
|
-
function
|
1307
|
+
function fn(l) {
|
1298
1308
|
{
|
1299
1309
|
var y = typeof Symbol == "function" && Symbol.toStringTag, C = y && l[Symbol.toStringTag] || l.constructor.name || "Object";
|
1300
1310
|
return C;
|
1301
1311
|
}
|
1302
1312
|
}
|
1303
|
-
function
|
1313
|
+
function _n(l) {
|
1304
1314
|
try {
|
1305
|
-
return
|
1315
|
+
return ji(l), !1;
|
1306
1316
|
} catch {
|
1307
1317
|
return !0;
|
1308
1318
|
}
|
1309
1319
|
}
|
1310
|
-
function
|
1320
|
+
function ji(l) {
|
1311
1321
|
return "" + l;
|
1312
1322
|
}
|
1313
|
-
function
|
1314
|
-
if (
|
1315
|
-
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
1323
|
+
function Ni(l) {
|
1324
|
+
if (_n(l))
|
1325
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fn(l)), ji(l);
|
1316
1326
|
}
|
1317
|
-
var ht = f.ReactCurrentOwner,
|
1327
|
+
var ht = f.ReactCurrentOwner, gn = {
|
1318
1328
|
key: !0,
|
1319
1329
|
ref: !0,
|
1320
1330
|
__self: !0,
|
1321
1331
|
__source: !0
|
1322
|
-
},
|
1323
|
-
|
1324
|
-
function
|
1332
|
+
}, Fi, zi, ai;
|
1333
|
+
ai = {};
|
1334
|
+
function vn(l) {
|
1325
1335
|
if (It.call(l, "ref")) {
|
1326
1336
|
var y = Object.getOwnPropertyDescriptor(l, "ref").get;
|
1327
1337
|
if (y && y.isReactWarning)
|
@@ -1329,7 +1339,7 @@ function Cr() {
|
|
1329
1339
|
}
|
1330
1340
|
return l.ref !== void 0;
|
1331
1341
|
}
|
1332
|
-
function
|
1342
|
+
function yn(l) {
|
1333
1343
|
if (It.call(l, "key")) {
|
1334
1344
|
var y = Object.getOwnPropertyDescriptor(l, "key").get;
|
1335
1345
|
if (y && y.isReactWarning)
|
@@ -1337,16 +1347,16 @@ function Cr() {
|
|
1337
1347
|
}
|
1338
1348
|
return l.key !== void 0;
|
1339
1349
|
}
|
1340
|
-
function
|
1350
|
+
function bn(l, y) {
|
1341
1351
|
if (typeof l.ref == "string" && ht.current && y && ht.current.stateNode !== y) {
|
1342
1352
|
var C = me(ht.current.type);
|
1343
|
-
|
1353
|
+
ai[C] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', me(ht.current.type), l.ref), ai[C] = !0);
|
1344
1354
|
}
|
1345
1355
|
}
|
1346
|
-
function
|
1356
|
+
function En(l, y) {
|
1347
1357
|
{
|
1348
1358
|
var C = function() {
|
1349
|
-
|
1359
|
+
Fi || (Fi = !0, v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
|
1350
1360
|
};
|
1351
1361
|
C.isReactWarning = !0, Object.defineProperty(l, "key", {
|
1352
1362
|
get: C,
|
@@ -1354,10 +1364,10 @@ function Cr() {
|
|
1354
1364
|
});
|
1355
1365
|
}
|
1356
1366
|
}
|
1357
|
-
function
|
1367
|
+
function Cn(l, y) {
|
1358
1368
|
{
|
1359
1369
|
var C = function() {
|
1360
|
-
|
1370
|
+
zi || (zi = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
|
1361
1371
|
};
|
1362
1372
|
C.isReactWarning = !0, Object.defineProperty(l, "ref", {
|
1363
1373
|
get: C,
|
@@ -1365,7 +1375,7 @@ function Cr() {
|
|
1365
1375
|
});
|
1366
1376
|
}
|
1367
1377
|
}
|
1368
|
-
var
|
1378
|
+
var wn = function(l, y, C, I, F, Y, U) {
|
1369
1379
|
var k = {
|
1370
1380
|
// This tag allows us to uniquely identify this as a React Element
|
1371
1381
|
$$typeof: e,
|
@@ -1394,12 +1404,12 @@ function Cr() {
|
|
1394
1404
|
value: F
|
1395
1405
|
}), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
|
1396
1406
|
};
|
1397
|
-
function
|
1407
|
+
function Sn(l, y, C, I, F) {
|
1398
1408
|
{
|
1399
1409
|
var Y, U = {}, k = null, oe = null;
|
1400
|
-
C !== void 0 && (
|
1410
|
+
C !== void 0 && (Ni(C), k = "" + C), yn(y) && (Ni(y.key), k = "" + y.key), vn(y) && (oe = y.ref, bn(y, F));
|
1401
1411
|
for (Y in y)
|
1402
|
-
It.call(y, Y) && !
|
1412
|
+
It.call(y, Y) && !gn.hasOwnProperty(Y) && (U[Y] = y[Y]);
|
1403
1413
|
if (l && l.defaultProps) {
|
1404
1414
|
var Q = l.defaultProps;
|
1405
1415
|
for (Y in Q)
|
@@ -1407,28 +1417,28 @@ function Cr() {
|
|
1407
1417
|
}
|
1408
1418
|
if (k || oe) {
|
1409
1419
|
var J = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
|
1410
|
-
k &&
|
1420
|
+
k && En(U, J), oe && Cn(U, J);
|
1411
1421
|
}
|
1412
|
-
return
|
1422
|
+
return wn(l, k, oe, F, I, ht.current, U);
|
1413
1423
|
}
|
1414
1424
|
}
|
1415
|
-
var
|
1425
|
+
var oi = f.ReactCurrentOwner, Hi = f.ReactDebugCurrentFrame;
|
1416
1426
|
function Xe(l) {
|
1417
1427
|
if (l) {
|
1418
1428
|
var y = l._owner, C = At(l.type, l._source, y ? y.type : null);
|
1419
|
-
|
1429
|
+
Hi.setExtraStackFrame(C);
|
1420
1430
|
} else
|
1421
|
-
|
1431
|
+
Hi.setExtraStackFrame(null);
|
1422
1432
|
}
|
1423
|
-
var
|
1424
|
-
|
1425
|
-
function
|
1433
|
+
var li;
|
1434
|
+
li = !1;
|
1435
|
+
function ci(l) {
|
1426
1436
|
return typeof l == "object" && l !== null && l.$$typeof === e;
|
1427
1437
|
}
|
1428
|
-
function
|
1438
|
+
function Yi() {
|
1429
1439
|
{
|
1430
|
-
if (
|
1431
|
-
var l = me(
|
1440
|
+
if (oi.current) {
|
1441
|
+
var l = me(oi.current.type);
|
1432
1442
|
if (l)
|
1433
1443
|
return `
|
1434
1444
|
|
@@ -1437,7 +1447,7 @@ Check the render method of \`` + l + "`.";
|
|
1437
1447
|
return "";
|
1438
1448
|
}
|
1439
1449
|
}
|
1440
|
-
function
|
1450
|
+
function xn(l) {
|
1441
1451
|
{
|
1442
1452
|
if (l !== void 0) {
|
1443
1453
|
var y = l.fileName.replace(/^.*[\\\/]/, ""), C = l.lineNumber;
|
@@ -1448,10 +1458,10 @@ Check your code at ` + y + ":" + C + ".";
|
|
1448
1458
|
return "";
|
1449
1459
|
}
|
1450
1460
|
}
|
1451
|
-
var
|
1452
|
-
function
|
1461
|
+
var Bi = {};
|
1462
|
+
function On(l) {
|
1453
1463
|
{
|
1454
|
-
var y =
|
1464
|
+
var y = Yi();
|
1455
1465
|
if (!y) {
|
1456
1466
|
var C = typeof l == "string" ? l : l.displayName || l.name;
|
1457
1467
|
C && (y = `
|
@@ -1461,39 +1471,39 @@ Check the top-level render call using <` + C + ">.");
|
|
1461
1471
|
return y;
|
1462
1472
|
}
|
1463
1473
|
}
|
1464
|
-
function
|
1474
|
+
function Zi(l, y) {
|
1465
1475
|
{
|
1466
1476
|
if (!l._store || l._store.validated || l.key != null)
|
1467
1477
|
return;
|
1468
1478
|
l._store.validated = !0;
|
1469
|
-
var C =
|
1470
|
-
if (
|
1479
|
+
var C = On(y);
|
1480
|
+
if (Bi[C])
|
1471
1481
|
return;
|
1472
|
-
|
1482
|
+
Bi[C] = !0;
|
1473
1483
|
var I = "";
|
1474
|
-
l && l._owner && l._owner !==
|
1484
|
+
l && l._owner && l._owner !== oi.current && (I = " It was passed a child from " + me(l._owner.type) + "."), Xe(l), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), Xe(null);
|
1475
1485
|
}
|
1476
1486
|
}
|
1477
|
-
function
|
1487
|
+
function Gi(l, y) {
|
1478
1488
|
{
|
1479
1489
|
if (typeof l != "object")
|
1480
1490
|
return;
|
1481
|
-
if (
|
1491
|
+
if (ri(l))
|
1482
1492
|
for (var C = 0; C < l.length; C++) {
|
1483
1493
|
var I = l[C];
|
1484
|
-
|
1494
|
+
ci(I) && Zi(I, y);
|
1485
1495
|
}
|
1486
|
-
else if (
|
1496
|
+
else if (ci(l))
|
1487
1497
|
l._store && (l._store.validated = !0);
|
1488
1498
|
else if (l) {
|
1489
1499
|
var F = T(l);
|
1490
1500
|
if (typeof F == "function" && F !== l.entries)
|
1491
1501
|
for (var Y = F.call(l), U; !(U = Y.next()).done; )
|
1492
|
-
|
1502
|
+
ci(U.value) && Zi(U.value, y);
|
1493
1503
|
}
|
1494
1504
|
}
|
1495
1505
|
}
|
1496
|
-
function
|
1506
|
+
function Tn(l) {
|
1497
1507
|
{
|
1498
1508
|
var y = l.type;
|
1499
1509
|
if (y == null || typeof y == "string")
|
@@ -1509,16 +1519,16 @@ Check the top-level render call using <` + C + ">.");
|
|
1509
1519
|
return;
|
1510
1520
|
if (C) {
|
1511
1521
|
var I = me(y);
|
1512
|
-
|
1513
|
-
} else if (y.PropTypes !== void 0 && !
|
1514
|
-
|
1522
|
+
pn(C, l.props, "prop", I, l);
|
1523
|
+
} else if (y.PropTypes !== void 0 && !li) {
|
1524
|
+
li = !0;
|
1515
1525
|
var F = me(y);
|
1516
1526
|
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
|
1517
1527
|
}
|
1518
1528
|
typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1519
1529
|
}
|
1520
1530
|
}
|
1521
|
-
function
|
1531
|
+
function Mn(l) {
|
1522
1532
|
{
|
1523
1533
|
for (var y = Object.keys(l.props), C = 0; C < y.length; C++) {
|
1524
1534
|
var I = y[C];
|
@@ -1530,56 +1540,56 @@ Check the top-level render call using <` + C + ">.");
|
|
1530
1540
|
l.ref !== null && (Xe(l), v("Invalid attribute `ref` supplied to `React.Fragment`."), Xe(null));
|
1531
1541
|
}
|
1532
1542
|
}
|
1533
|
-
function
|
1543
|
+
function Wi(l, y, C, I, F, Y) {
|
1534
1544
|
{
|
1535
1545
|
var U = Pe(l);
|
1536
1546
|
if (!U) {
|
1537
1547
|
var k = "";
|
1538
1548
|
(l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1539
|
-
var oe =
|
1540
|
-
oe ? k += oe : k +=
|
1549
|
+
var oe = xn(F);
|
1550
|
+
oe ? k += oe : k += Yi();
|
1541
1551
|
var Q;
|
1542
|
-
l === null ? Q = "null" :
|
1552
|
+
l === null ? Q = "null" : ri(l) ? Q = "array" : l !== void 0 && l.$$typeof === e ? (Q = "<" + (me(l.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof l, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, k);
|
1543
1553
|
}
|
1544
|
-
var J =
|
1554
|
+
var J = Sn(l, y, C, F, Y);
|
1545
1555
|
if (J == null)
|
1546
1556
|
return J;
|
1547
1557
|
if (U) {
|
1548
1558
|
var ge = y.children;
|
1549
1559
|
if (ge !== void 0)
|
1550
1560
|
if (I)
|
1551
|
-
if (
|
1561
|
+
if (ri(ge)) {
|
1552
1562
|
for (var $e = 0; $e < ge.length; $e++)
|
1553
|
-
|
1563
|
+
Gi(ge[$e], l);
|
1554
1564
|
Object.freeze && Object.freeze(ge);
|
1555
1565
|
} else
|
1556
1566
|
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1557
1567
|
else
|
1558
|
-
|
1568
|
+
Gi(ge, l);
|
1559
1569
|
}
|
1560
|
-
return l === i ?
|
1570
|
+
return l === i ? Mn(J) : Tn(J), J;
|
1561
1571
|
}
|
1562
1572
|
}
|
1563
|
-
function Mn(l, y, C) {
|
1564
|
-
return Gi(l, y, C, !0);
|
1565
|
-
}
|
1566
1573
|
function Pn(l, y, C) {
|
1567
|
-
return
|
1574
|
+
return Wi(l, y, C, !0);
|
1575
|
+
}
|
1576
|
+
function Dn(l, y, C) {
|
1577
|
+
return Wi(l, y, C, !1);
|
1568
1578
|
}
|
1569
|
-
var
|
1570
|
-
pt.Fragment = i, pt.jsx =
|
1579
|
+
var Rn = Dn, An = Pn;
|
1580
|
+
pt.Fragment = i, pt.jsx = Rn, pt.jsxs = An;
|
1571
1581
|
}()), pt;
|
1572
1582
|
}
|
1573
|
-
process.env.NODE_ENV === "production" ?
|
1574
|
-
var d =
|
1575
|
-
function
|
1583
|
+
process.env.NODE_ENV === "production" ? Mi.exports = Cr() : Mi.exports = wr();
|
1584
|
+
var d = Mi.exports;
|
1585
|
+
function sn(s) {
|
1576
1586
|
return s.title.search("<") > -1 ? /* @__PURE__ */ d.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: s.title } }) : /* @__PURE__ */ d.jsx("button", { children: s.title });
|
1577
1587
|
}
|
1578
|
-
const
|
1588
|
+
const Sr = /* @__PURE__ */ d.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1579
1589
|
/* @__PURE__ */ d.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1580
1590
|
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1581
1591
|
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1582
|
-
] }),
|
1592
|
+
] }), xr = /* @__PURE__ */ d.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ d.jsx(
|
1583
1593
|
"path",
|
1584
1594
|
{
|
1585
1595
|
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
|
@@ -1587,16 +1597,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
|
|
1587
1597
|
C11,8.22,10.74,8,10.43,8z`
|
1588
1598
|
}
|
1589
1599
|
) });
|
1590
|
-
function
|
1591
|
-
return /* @__PURE__ */ d.jsx(
|
1592
|
-
|
1600
|
+
function Or(s) {
|
1601
|
+
return /* @__PURE__ */ d.jsx(Ks.Item, { value: s.title, children: /* @__PURE__ */ d.jsxs("div", { children: [
|
1602
|
+
xr,
|
1593
1603
|
/* @__PURE__ */ d.jsx("span", { children: s.title }),
|
1594
1604
|
/* @__PURE__ */ d.jsx("button", { className: "closeIcon", onClick: () => {
|
1595
1605
|
s.onDelete(s.index);
|
1596
|
-
}, children:
|
1606
|
+
}, children: Sr })
|
1597
1607
|
] }) }, s.title);
|
1598
1608
|
}
|
1599
|
-
function
|
1609
|
+
function Tr(s) {
|
1600
1610
|
const [e, t] = G(!1), [i, n] = G(s.options), a = (c) => {
|
1601
1611
|
s.onDragComplete(c), n(c);
|
1602
1612
|
}, r = (c) => {
|
@@ -1604,18 +1614,18 @@ function Or(s) {
|
|
1604
1614
|
u.splice(c, 1), a(u);
|
1605
1615
|
}, o = [];
|
1606
1616
|
i.forEach((c, u) => {
|
1607
|
-
o.push(/* @__PURE__ */ d.jsx(
|
1617
|
+
o.push(/* @__PURE__ */ d.jsx(Or, { index: u, title: c, onDelete: r }, c));
|
1608
1618
|
});
|
1609
1619
|
let h = "dropdown draggable";
|
1610
1620
|
return s.subdropdown && (h += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: h, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
1611
|
-
/* @__PURE__ */ d.jsx(
|
1612
|
-
/* @__PURE__ */ d.jsx(
|
1621
|
+
/* @__PURE__ */ d.jsx(sn, { title: s.title }),
|
1622
|
+
/* @__PURE__ */ d.jsx(Ks.Group, { axis: "y", values: i, onReorder: a, style: { visibility: e ? "visible" : "hidden" }, children: o })
|
1613
1623
|
] });
|
1614
1624
|
}
|
1615
|
-
function
|
1625
|
+
function Mr(s) {
|
1616
1626
|
const [e, t] = G(!1), i = [];
|
1617
1627
|
s.options.map((a, r) => {
|
1618
|
-
s.onSelect !== void 0 && (a.onSelect = s.onSelect), i.push(/* @__PURE__ */ d.jsx(
|
1628
|
+
s.onSelect !== void 0 && (a.onSelect = s.onSelect), i.push(/* @__PURE__ */ d.jsx(Pr, { option: a }, r));
|
1619
1629
|
});
|
1620
1630
|
let n = "dropdown";
|
1621
1631
|
return s.subdropdown && (n += " subdropdown"), /* @__PURE__ */ d.jsxs(
|
@@ -1625,7 +1635,7 @@ function Tr(s) {
|
|
1625
1635
|
onMouseEnter: () => t(!0),
|
1626
1636
|
onMouseLeave: () => t(!1),
|
1627
1637
|
children: [
|
1628
|
-
/* @__PURE__ */ d.jsx(
|
1638
|
+
/* @__PURE__ */ d.jsx(sn, { title: s.title }),
|
1629
1639
|
/* @__PURE__ */ d.jsx(
|
1630
1640
|
"ul",
|
1631
1641
|
{
|
@@ -1637,13 +1647,13 @@ function Tr(s) {
|
|
1637
1647
|
}
|
1638
1648
|
);
|
1639
1649
|
}
|
1640
|
-
function
|
1650
|
+
function Pr(s) {
|
1641
1651
|
const { option: e } = s, [t, i] = G("");
|
1642
1652
|
let n;
|
1643
1653
|
switch (e.type) {
|
1644
1654
|
case "draggable":
|
1645
1655
|
n = /* @__PURE__ */ d.jsx(
|
1646
|
-
|
1656
|
+
Tr,
|
1647
1657
|
{
|
1648
1658
|
title: e.title,
|
1649
1659
|
options: e.value,
|
@@ -1656,7 +1666,7 @@ function Mr(s) {
|
|
1656
1666
|
break;
|
1657
1667
|
case "dropdown":
|
1658
1668
|
n = /* @__PURE__ */ d.jsx(
|
1659
|
-
|
1669
|
+
Mr,
|
1660
1670
|
{
|
1661
1671
|
title: e.title,
|
1662
1672
|
options: e.value,
|
@@ -1677,7 +1687,7 @@ function Mr(s) {
|
|
1677
1687
|
);
|
1678
1688
|
break;
|
1679
1689
|
}
|
1680
|
-
return /* @__PURE__ */ d.jsx("li", { className: t === e.title ? "selected" : "", children: n },
|
1690
|
+
return /* @__PURE__ */ d.jsx("li", { className: t === e.title ? "selected" : "", children: n }, mr());
|
1681
1691
|
}
|
1682
1692
|
function Xa(s, e, t) {
|
1683
1693
|
function i(a) {
|
@@ -1702,7 +1712,7 @@ function Xa(s, e, t) {
|
|
1702
1712
|
a.target === "editor" ? n(a) : i(a);
|
1703
1713
|
};
|
1704
1714
|
}
|
1705
|
-
function
|
1715
|
+
function Qt(s) {
|
1706
1716
|
const [e, t] = G(s.open !== void 0 ? s.open : !0), i = !e || s.children === void 0, n = () => {
|
1707
1717
|
R.dispatchEvent({ type: D.REMOVE_SCENE, value: s.scene });
|
1708
1718
|
};
|
@@ -1723,7 +1733,7 @@ function $t(s) {
|
|
1723
1733
|
children: "Toggle"
|
1724
1734
|
}
|
1725
1735
|
),
|
1726
|
-
/* @__PURE__ */ d.jsx("p", { className: "label", children:
|
1736
|
+
/* @__PURE__ */ d.jsx("p", { className: "label", children: $t(s.label) })
|
1727
1737
|
]
|
1728
1738
|
}
|
1729
1739
|
),
|
@@ -1735,10 +1745,10 @@ function $t(s) {
|
|
1735
1745
|
/* @__PURE__ */ d.jsx("div", { className: e ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { children: s.children }) }, Math.random())
|
1736
1746
|
] });
|
1737
1747
|
}
|
1738
|
-
function
|
1748
|
+
function nn(s) {
|
1739
1749
|
const e = ee(null), [t, i] = G(!1), n = s.child !== void 0 && s.child.children.length > 0, a = [];
|
1740
1750
|
return s.child !== void 0 && s.child.children.length > 0 && s.child.children.map((r, o) => {
|
1741
|
-
a.push(/* @__PURE__ */ d.jsx(
|
1751
|
+
a.push(/* @__PURE__ */ d.jsx(nn, { child: r, three: s.three }, o));
|
1742
1752
|
}), lt(() => {
|
1743
1753
|
if (s.child) {
|
1744
1754
|
const r = s.three.getScene(s.child.uuid);
|
@@ -1793,18 +1803,18 @@ function sn(s) {
|
|
1793
1803
|
}
|
1794
1804
|
}
|
1795
1805
|
),
|
1796
|
-
/* @__PURE__ */ d.jsx("div", { className: `icon ${
|
1806
|
+
/* @__PURE__ */ d.jsx("div", { className: `icon ${gr(s.child)}` })
|
1797
1807
|
] }),
|
1798
1808
|
/* @__PURE__ */ d.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: a }) })
|
1799
1809
|
] }, Math.random()) });
|
1800
1810
|
}
|
1801
|
-
function
|
1811
|
+
function ss(s) {
|
1802
1812
|
const e = [];
|
1803
1813
|
return s.child?.children.map((t, i) => {
|
1804
|
-
e.push(/* @__PURE__ */ d.jsx(
|
1814
|
+
e.push(/* @__PURE__ */ d.jsx(nn, { child: t, scene: s.scene, three: s.three }, i));
|
1805
1815
|
}), /* @__PURE__ */ d.jsx("div", { className: `scene ${s.class !== void 0 ? s.class : ""}`, children: e });
|
1806
1816
|
}
|
1807
|
-
function
|
1817
|
+
function Dr(s) {
|
1808
1818
|
const [e, t] = G(s.defaultValue);
|
1809
1819
|
return lt(() => {
|
1810
1820
|
let i = !1, n = -1, a = 0, r = s.defaultValue;
|
@@ -1830,7 +1840,7 @@ function Pr(s) {
|
|
1830
1840
|
}, []), e;
|
1831
1841
|
}
|
1832
1842
|
function Ze(s) {
|
1833
|
-
const e = ee(null), t = ee(null), i =
|
1843
|
+
const e = ee(null), t = ee(null), i = Dr({
|
1834
1844
|
label: s.labelRef,
|
1835
1845
|
input: e,
|
1836
1846
|
sliderRef: t,
|
@@ -1886,13 +1896,13 @@ function Ze(s) {
|
|
1886
1896
|
max: s.max,
|
1887
1897
|
step: s.step,
|
1888
1898
|
ref: t,
|
1889
|
-
onChange:
|
1899
|
+
onChange: Js
|
1890
1900
|
}
|
1891
1901
|
)
|
1892
1902
|
] })
|
1893
1903
|
] });
|
1894
1904
|
}
|
1895
|
-
function
|
1905
|
+
function Rr(s) {
|
1896
1906
|
const e = ee(null), t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o, h] = G(s.value), [c, u] = G({
|
1897
1907
|
min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
|
1898
1908
|
max: Math.max(s.max, Math.max(s.value.x, s.value.y))
|
@@ -1904,7 +1914,7 @@ function Dr(s) {
|
|
1904
1914
|
window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", S), _(!1);
|
1905
1915
|
}
|
1906
1916
|
function M(b) {
|
1907
|
-
const P = a.current.getBoundingClientRect(), x = He(0, 99, b.clientX - P.left) / 99, j = He(0, 99, b.clientY - P.top) / 99, X = Ot(
|
1917
|
+
const P = a.current.getBoundingClientRect(), x = He(0, 99, b.clientX - P.left) / 99, j = He(0, 99, b.clientY - P.top) / 99, X = Ot(xi(c.min, c.max, x), 3), _e = Ot(xi(c.min, c.max, j), 3);
|
1908
1918
|
s.onChange({ target: { value: { x: X, y: _e } } }), h({ x: X, y: _e });
|
1909
1919
|
}
|
1910
1920
|
function T(b) {
|
@@ -1920,7 +1930,7 @@ function Dr(s) {
|
|
1920
1930
|
u({ min: c.min, max: b }), (o.x > b || o.y > b) && h({ x: He(c.min, b, o.x), y: He(c.min, b, o.y) });
|
1921
1931
|
}
|
1922
1932
|
lt(() => {
|
1923
|
-
const b =
|
1933
|
+
const b = Ki(c.min, c.max, o.x), P = Ki(c.min, c.max, o.y);
|
1924
1934
|
r.current.style.left = `${b * 100}%`, r.current.style.top = `${P * 100}%`;
|
1925
1935
|
}, [c, o]);
|
1926
1936
|
const E = s.step !== void 0 ? s.step : 0.01;
|
@@ -1990,7 +2000,7 @@ function Dr(s) {
|
|
1990
2000
|
] })
|
1991
2001
|
] });
|
1992
2002
|
}
|
1993
|
-
function
|
2003
|
+
function ns(s) {
|
1994
2004
|
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, a = [];
|
1995
2005
|
if (e) {
|
1996
2006
|
const r = xt(() => s.value, []), o = (c, u) => {
|
@@ -2065,7 +2075,7 @@ function ss(s) {
|
|
2065
2075
|
}
|
2066
2076
|
return /* @__PURE__ */ d.jsx("div", { className: "grid3", children: a }, Math.random().toString());
|
2067
2077
|
}
|
2068
|
-
function
|
2078
|
+
function Ar(s) {
|
2069
2079
|
const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
|
2070
2080
|
if (e) {
|
2071
2081
|
const n = xt(() => s.value, []), a = (o, h) => {
|
@@ -2117,10 +2127,10 @@ function Rr(s) {
|
|
2117
2127
|
}
|
2118
2128
|
return /* @__PURE__ */ d.jsx("div", { className: "grid4", children: i });
|
2119
2129
|
}
|
2120
|
-
function
|
2130
|
+
function Ir(s) {
|
2121
2131
|
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");
|
2122
2132
|
}
|
2123
|
-
function
|
2133
|
+
function Lr(s) {
|
2124
2134
|
switch (s) {
|
2125
2135
|
case "Alpha Map":
|
2126
2136
|
return "alphaMap";
|
@@ -2169,7 +2179,7 @@ function Ir(s) {
|
|
2169
2179
|
}
|
2170
2180
|
return s;
|
2171
2181
|
}
|
2172
|
-
function
|
2182
|
+
function ei(s) {
|
2173
2183
|
switch (s) {
|
2174
2184
|
case "alphaHash":
|
2175
2185
|
return "Alpha Hash";
|
@@ -2372,11 +2382,11 @@ function Jt(s) {
|
|
2372
2382
|
}
|
2373
2383
|
return s;
|
2374
2384
|
}
|
2375
|
-
function
|
2385
|
+
function rn(s) {
|
2376
2386
|
const e = s.toLowerCase();
|
2377
2387
|
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";
|
2378
2388
|
}
|
2379
|
-
function
|
2389
|
+
function kr() {
|
2380
2390
|
const s = document.createElement("input");
|
2381
2391
|
return s.type = "file", new Promise((e, t) => {
|
2382
2392
|
s.addEventListener("change", function() {
|
@@ -2391,191 +2401,191 @@ function Lr() {
|
|
2391
2401
|
}), s.click();
|
2392
2402
|
});
|
2393
2403
|
}
|
2394
|
-
const
|
2404
|
+
const Ur = [
|
2395
2405
|
{
|
2396
2406
|
title: "Front",
|
2397
|
-
value:
|
2407
|
+
value: kn
|
2398
2408
|
},
|
2399
2409
|
{
|
2400
2410
|
title: "Back",
|
2401
|
-
value:
|
2411
|
+
value: Rs
|
2402
2412
|
},
|
2403
2413
|
{
|
2404
2414
|
title: "Double",
|
2405
|
-
value:
|
2415
|
+
value: Di
|
2406
2416
|
}
|
2407
|
-
],
|
2417
|
+
], jr = [
|
2408
2418
|
{
|
2409
2419
|
title: "No Blending",
|
2410
|
-
value:
|
2420
|
+
value: Un
|
2411
2421
|
},
|
2412
2422
|
{
|
2413
2423
|
title: "Normal",
|
2414
|
-
value:
|
2424
|
+
value: jn
|
2415
2425
|
},
|
2416
2426
|
{
|
2417
2427
|
title: "Additive",
|
2418
|
-
value:
|
2428
|
+
value: Nn
|
2419
2429
|
},
|
2420
2430
|
{
|
2421
2431
|
title: "Subtractive",
|
2422
|
-
value:
|
2432
|
+
value: Fn
|
2423
2433
|
},
|
2424
2434
|
{
|
2425
2435
|
title: "Multiply",
|
2426
|
-
value:
|
2436
|
+
value: zn
|
2427
2437
|
},
|
2428
2438
|
{
|
2429
2439
|
title: "Custom",
|
2430
|
-
value:
|
2440
|
+
value: Hn
|
2431
2441
|
}
|
2432
|
-
],
|
2442
|
+
], Nr = [
|
2433
2443
|
{
|
2434
2444
|
title: "Add",
|
2435
|
-
value:
|
2445
|
+
value: Yn
|
2436
2446
|
},
|
2437
2447
|
{
|
2438
2448
|
title: "Subtract",
|
2439
|
-
value:
|
2449
|
+
value: Bn
|
2440
2450
|
},
|
2441
2451
|
{
|
2442
2452
|
title: "Reverse Subtract",
|
2443
|
-
value:
|
2453
|
+
value: Zn
|
2444
2454
|
},
|
2445
2455
|
{
|
2446
2456
|
title: "Min",
|
2447
|
-
value:
|
2457
|
+
value: Gn
|
2448
2458
|
},
|
2449
2459
|
{
|
2450
2460
|
title: "Max",
|
2451
|
-
value:
|
2461
|
+
value: Wn
|
2452
2462
|
}
|
2453
|
-
],
|
2463
|
+
], Fr = [
|
2454
2464
|
{
|
2455
2465
|
title: "Zero",
|
2456
|
-
value:
|
2466
|
+
value: As
|
2457
2467
|
},
|
2458
2468
|
{
|
2459
2469
|
title: "One",
|
2460
|
-
value:
|
2470
|
+
value: Is
|
2461
2471
|
},
|
2462
2472
|
{
|
2463
2473
|
title: "Src Color",
|
2464
|
-
value:
|
2474
|
+
value: Ls
|
2465
2475
|
},
|
2466
2476
|
{
|
2467
2477
|
title: "One Minus Src Color",
|
2468
|
-
value:
|
2478
|
+
value: ks
|
2469
2479
|
},
|
2470
2480
|
{
|
2471
2481
|
title: "Src Alpha",
|
2472
|
-
value:
|
2482
|
+
value: Us
|
2473
2483
|
},
|
2474
2484
|
{
|
2475
2485
|
title: "One Minus Src Alpha",
|
2476
|
-
value:
|
2486
|
+
value: js
|
2477
2487
|
},
|
2478
2488
|
{
|
2479
2489
|
title: "Dst Alpha",
|
2480
|
-
value:
|
2490
|
+
value: Ns
|
2481
2491
|
},
|
2482
2492
|
{
|
2483
2493
|
title: "One Minus Dst Alpha",
|
2484
|
-
value:
|
2494
|
+
value: Fs
|
2485
2495
|
},
|
2486
2496
|
{
|
2487
2497
|
title: "Dst Color",
|
2488
|
-
value:
|
2498
|
+
value: zs
|
2489
2499
|
},
|
2490
2500
|
{
|
2491
2501
|
title: "One Minus Dst Color",
|
2492
|
-
value:
|
2502
|
+
value: Hs
|
2493
2503
|
},
|
2494
2504
|
{
|
2495
2505
|
title: "Src Alpha Saturate",
|
2496
|
-
value:
|
2506
|
+
value: Vn
|
2497
2507
|
},
|
2498
2508
|
{
|
2499
2509
|
title: "Constant Color",
|
2500
|
-
value:
|
2510
|
+
value: Ys
|
2501
2511
|
},
|
2502
2512
|
{
|
2503
2513
|
title: "One Minus Constant Color",
|
2504
|
-
value:
|
2514
|
+
value: Bs
|
2505
2515
|
},
|
2506
2516
|
{
|
2507
2517
|
title: "Constant Alpha",
|
2508
|
-
value:
|
2518
|
+
value: Zs
|
2509
2519
|
},
|
2510
2520
|
{
|
2511
2521
|
title: "One Minus Constant Alpha",
|
2512
|
-
value:
|
2522
|
+
value: Gs
|
2513
2523
|
}
|
2514
|
-
],
|
2524
|
+
], zr = [
|
2515
2525
|
{
|
2516
2526
|
title: "Zero",
|
2517
|
-
value:
|
2527
|
+
value: As
|
2518
2528
|
},
|
2519
2529
|
{
|
2520
2530
|
title: "One",
|
2521
|
-
value:
|
2531
|
+
value: Is
|
2522
2532
|
},
|
2523
2533
|
{
|
2524
2534
|
title: "Src Color",
|
2525
|
-
value:
|
2535
|
+
value: Ls
|
2526
2536
|
},
|
2527
2537
|
{
|
2528
2538
|
title: "One Minus Src Color",
|
2529
|
-
value:
|
2539
|
+
value: ks
|
2530
2540
|
},
|
2531
2541
|
{
|
2532
2542
|
title: "Src Alpha",
|
2533
|
-
value:
|
2543
|
+
value: Us
|
2534
2544
|
},
|
2535
2545
|
{
|
2536
2546
|
title: "One Minus Src Alpha",
|
2537
|
-
value:
|
2547
|
+
value: js
|
2538
2548
|
},
|
2539
2549
|
{
|
2540
2550
|
title: "Dst Alpha",
|
2541
|
-
value:
|
2551
|
+
value: Ns
|
2542
2552
|
},
|
2543
2553
|
{
|
2544
2554
|
title: "One Minus Dst Alpha",
|
2545
|
-
value:
|
2555
|
+
value: Fs
|
2546
2556
|
},
|
2547
2557
|
{
|
2548
2558
|
title: "Dst Color",
|
2549
|
-
value:
|
2559
|
+
value: zs
|
2550
2560
|
},
|
2551
2561
|
{
|
2552
2562
|
title: "One Minus Dst Color",
|
2553
|
-
value:
|
2563
|
+
value: Hs
|
2554
2564
|
},
|
2555
2565
|
{
|
2556
2566
|
title: "Constant Color",
|
2557
|
-
value:
|
2567
|
+
value: Ys
|
2558
2568
|
},
|
2559
2569
|
{
|
2560
2570
|
title: "One Minus Constant Color",
|
2561
|
-
value:
|
2571
|
+
value: Bs
|
2562
2572
|
},
|
2563
2573
|
{
|
2564
2574
|
title: "Constant Alpha",
|
2565
|
-
value:
|
2575
|
+
value: Zs
|
2566
2576
|
},
|
2567
2577
|
{
|
2568
2578
|
title: "One Minus Constant Alpha",
|
2569
|
-
value:
|
2579
|
+
value: Gs
|
2570
2580
|
}
|
2571
2581
|
];
|
2572
2582
|
function mt(s, e) {
|
2573
2583
|
s.needsUpdate = !0, s.type = "option", s.options = e;
|
2574
2584
|
}
|
2575
|
-
function
|
2585
|
+
function Hr(s, e, t, i) {
|
2576
2586
|
return {
|
2577
2587
|
type: "boolean",
|
2578
|
-
title:
|
2588
|
+
title: ei(s),
|
2579
2589
|
prop: s,
|
2580
2590
|
value: e,
|
2581
2591
|
needsUpdate: !0,
|
@@ -2589,10 +2599,10 @@ function zr(s, e, t, i) {
|
|
2589
2599
|
}
|
2590
2600
|
};
|
2591
2601
|
}
|
2592
|
-
function
|
2602
|
+
function Yr(s, e, t, i) {
|
2593
2603
|
const n = {
|
2594
2604
|
type: "number",
|
2595
|
-
title:
|
2605
|
+
title: ei(s),
|
2596
2606
|
prop: s,
|
2597
2607
|
value: e,
|
2598
2608
|
min: void 0,
|
@@ -2610,27 +2620,27 @@ function Hr(s, e, t, i) {
|
|
2610
2620
|
};
|
2611
2621
|
switch (s) {
|
2612
2622
|
case "blending":
|
2613
|
-
mt(n,
|
2623
|
+
mt(n, jr);
|
2614
2624
|
break;
|
2615
2625
|
case "blendDst":
|
2616
|
-
mt(n,
|
2626
|
+
mt(n, zr);
|
2617
2627
|
break;
|
2618
2628
|
case "blendEquation":
|
2619
|
-
mt(n,
|
2629
|
+
mt(n, Nr);
|
2620
2630
|
break;
|
2621
2631
|
case "blendSrc":
|
2622
|
-
mt(n,
|
2632
|
+
mt(n, Fr);
|
2623
2633
|
break;
|
2624
2634
|
case "side":
|
2625
|
-
mt(n,
|
2635
|
+
mt(n, Ur);
|
2626
2636
|
break;
|
2627
2637
|
}
|
2628
|
-
return
|
2638
|
+
return rn(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;
|
2629
2639
|
}
|
2630
|
-
function
|
2640
|
+
function Br(s, e, t, i) {
|
2631
2641
|
const n = {
|
2632
2642
|
type: "string",
|
2633
|
-
title:
|
2643
|
+
title: ei(s),
|
2634
2644
|
prop: s,
|
2635
2645
|
value: e,
|
2636
2646
|
needsUpdate: !0,
|
@@ -2663,20 +2673,20 @@ function Yr(s, e, t, i) {
|
|
2663
2673
|
}
|
2664
2674
|
}), n;
|
2665
2675
|
}
|
2666
|
-
function
|
2676
|
+
function Zr(s) {
|
2667
2677
|
return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
|
2668
2678
|
}
|
2669
|
-
function
|
2679
|
+
function Gr(s) {
|
2670
2680
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
|
2671
2681
|
}
|
2672
|
-
function
|
2682
|
+
function Wr(s) {
|
2673
2683
|
return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
|
2674
2684
|
}
|
2675
|
-
function
|
2685
|
+
function Pi(s) {
|
2676
2686
|
s.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
|
2677
2687
|
}
|
2678
2688
|
function Ct(s, e, t, i, n = "", a = !1) {
|
2679
|
-
const r =
|
2689
|
+
const r = ei(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, h = typeof e;
|
2680
2690
|
if (h === "boolean" || h === "string")
|
2681
2691
|
return {
|
2682
2692
|
title: r,
|
@@ -2710,7 +2720,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2710
2720
|
}
|
2711
2721
|
}
|
2712
2722
|
};
|
2713
|
-
return
|
2723
|
+
return rn(r) && (c.type = "range", c.min = 0, c.max = 1), c;
|
2714
2724
|
} else {
|
2715
2725
|
if (e.isColor)
|
2716
2726
|
return {
|
@@ -2742,12 +2752,12 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2742
2752
|
}
|
2743
2753
|
}
|
2744
2754
|
if (c.length > 0)
|
2745
|
-
return
|
2755
|
+
return Pi(c), {
|
2746
2756
|
title: r,
|
2747
2757
|
items: c
|
2748
2758
|
};
|
2749
2759
|
} else {
|
2750
|
-
if (
|
2760
|
+
if (Zr(e))
|
2751
2761
|
return {
|
2752
2762
|
title: r,
|
2753
2763
|
prop: o,
|
@@ -2763,7 +2773,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2763
2773
|
}
|
2764
2774
|
}
|
2765
2775
|
};
|
2766
|
-
if (
|
2776
|
+
if (Gr(e))
|
2767
2777
|
return {
|
2768
2778
|
title: r,
|
2769
2779
|
prop: o,
|
@@ -2779,7 +2789,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2779
2789
|
}
|
2780
2790
|
}
|
2781
2791
|
};
|
2782
|
-
if (
|
2792
|
+
if (Wr(e))
|
2783
2793
|
return {
|
2784
2794
|
title: r,
|
2785
2795
|
prop: o,
|
@@ -2818,7 +2828,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2818
2828
|
value: e,
|
2819
2829
|
disabled: a,
|
2820
2830
|
onChange: (c, u) => {
|
2821
|
-
const m =
|
2831
|
+
const m = Lr(s), _ = n.length > 0 ? `${n}.${m}` : m;
|
2822
2832
|
i.createTexture(t.uuid, `material.${_}`, u);
|
2823
2833
|
const g = i.getScene(t.uuid);
|
2824
2834
|
if (g !== null) {
|
@@ -2845,7 +2855,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2845
2855
|
}
|
2846
2856
|
f.needsUpdate = !0;
|
2847
2857
|
};
|
2848
|
-
u.src.length > 0 ?
|
2858
|
+
u.src.length > 0 ? tn(u.src).then((T) => {
|
2849
2859
|
T.offset.set(u.offset[0], u.offset[1]), T.repeat.set(u.repeat[0], u.repeat[1]), M(T);
|
2850
2860
|
}) : M(null);
|
2851
2861
|
}
|
@@ -2886,7 +2896,7 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2886
2896
|
console.log("Issue cycling through material object:", s, e);
|
2887
2897
|
}
|
2888
2898
|
if (c.length > 0)
|
2889
|
-
return
|
2899
|
+
return Pi(c), {
|
2890
2900
|
title: r,
|
2891
2901
|
items: c
|
2892
2902
|
};
|
@@ -2894,25 +2904,25 @@ function Ct(s, e, t, i, n = "", a = !1) {
|
|
2894
2904
|
}
|
2895
2905
|
}
|
2896
2906
|
}
|
2897
|
-
function
|
2907
|
+
function rs(s, e, t) {
|
2898
2908
|
const i = [];
|
2899
2909
|
for (const n in s) {
|
2900
|
-
if (!
|
2910
|
+
if (!Ir(n))
|
2901
2911
|
continue;
|
2902
2912
|
const a = typeof s[n], r = s[n];
|
2903
2913
|
if (a === "boolean")
|
2904
|
-
i.push(zr(n, r, e, t));
|
2905
|
-
else if (a === "number")
|
2906
2914
|
i.push(Hr(n, r, e, t));
|
2907
|
-
else if (a === "
|
2915
|
+
else if (a === "number")
|
2908
2916
|
i.push(Yr(n, r, e, t));
|
2917
|
+
else if (a === "string")
|
2918
|
+
i.push(Br(n, r, e, t));
|
2909
2919
|
else if (a === "object") {
|
2910
2920
|
const o = Ct(n, r, e, t);
|
2911
2921
|
o !== void 0 && i.push(o);
|
2912
2922
|
} else
|
2913
2923
|
r !== void 0 && console.log("other:", n, a, r);
|
2914
2924
|
}
|
2915
|
-
return
|
2925
|
+
return Pi(i), i.push({
|
2916
2926
|
title: "Update Material",
|
2917
2927
|
type: "button",
|
2918
2928
|
onChange: () => {
|
@@ -2925,7 +2935,7 @@ function ns(s, e, t) {
|
|
2925
2935
|
}
|
2926
2936
|
}), i;
|
2927
2937
|
}
|
2928
|
-
function
|
2938
|
+
function Vr(s, e) {
|
2929
2939
|
const t = s.material;
|
2930
2940
|
if (Array.isArray(t)) {
|
2931
2941
|
const i = [], n = t.length;
|
@@ -2935,7 +2945,7 @@ function Wr(s, e) {
|
|
2935
2945
|
be,
|
2936
2946
|
{
|
2937
2947
|
title: `Material ${a}`,
|
2938
|
-
items:
|
2948
|
+
items: rs(t[a], s, e)
|
2939
2949
|
},
|
2940
2950
|
`Material ${a}`
|
2941
2951
|
)
|
@@ -2946,12 +2956,12 @@ function Wr(s, e) {
|
|
2946
2956
|
be,
|
2947
2957
|
{
|
2948
2958
|
title: "Material",
|
2949
|
-
items:
|
2959
|
+
items: rs(t, s, e)
|
2950
2960
|
}
|
2951
2961
|
);
|
2952
2962
|
}
|
2953
|
-
const
|
2954
|
-
function
|
2963
|
+
const as = "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==";
|
2964
|
+
function Xr(s) {
|
2955
2965
|
const e = s.step !== void 0 ? s.step : 0.01, t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o] = G(s.value), [h, c] = G(s.value.offset[0]), [u, m] = G(s.value.offset[1]), [_, g] = G(s.value.repeat[0]), [S, M] = G(s.value.repeat[1]);
|
2956
2966
|
function T(v, E, b, P, x) {
|
2957
2967
|
if (s.onChange !== void 0) {
|
@@ -2982,10 +2992,10 @@ function Vr(s) {
|
|
2982
2992
|
}
|
2983
2993
|
return /* @__PURE__ */ d.jsxs("div", { className: "imageField", children: [
|
2984
2994
|
/* @__PURE__ */ d.jsx("img", { alt: s.title, ref: t, onClick: () => {
|
2985
|
-
|
2995
|
+
kr().then((v) => {
|
2986
2996
|
t.current.src = v, T(v, h, u, _, S);
|
2987
2997
|
});
|
2988
|
-
}, src: o.src.length > 0 ? o.src :
|
2998
|
+
}, src: o.src.length > 0 ? o.src : as }),
|
2989
2999
|
/* @__PURE__ */ d.jsxs("div", { className: "fields", children: [
|
2990
3000
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2991
3001
|
/* @__PURE__ */ d.jsx("label", { children: "Offset:" }),
|
@@ -3034,14 +3044,14 @@ function Vr(s) {
|
|
3034
3044
|
)
|
3035
3045
|
] }),
|
3036
3046
|
/* @__PURE__ */ d.jsx("button", { onClick: () => {
|
3037
|
-
T("", h, u, _, S), t.current.src =
|
3047
|
+
T("", h, u, _, S), t.current.src = as;
|
3038
3048
|
}, children: "Clear" })
|
3039
3049
|
] })
|
3040
3050
|
] });
|
3041
3051
|
}
|
3042
|
-
function
|
3052
|
+
function Wt(s) {
|
3043
3053
|
let e = s.value;
|
3044
|
-
e !== void 0 && (e.isColor !== void 0 ? e =
|
3054
|
+
e !== void 0 && (e.isColor !== void 0 ? e = Ji(s.value) : s.type === "color" && (e = Ji(new Tt(s.value))));
|
3045
3055
|
const [t, i] = G(e), n = ee(null), a = (c) => {
|
3046
3056
|
let u = c.target.value;
|
3047
3057
|
if (s.type === "boolean")
|
@@ -3057,7 +3067,7 @@ function Gt(s) {
|
|
3057
3067
|
const o = s.type === "string" && (t.length > 100 || t.search(`
|
3058
3068
|
`) > -1), h = o || s.type === "image" || s.type === "vector2";
|
3059
3069
|
return /* @__PURE__ */ d.jsxs("div", { className: `field ${h ? "block" : ""}`, style: r, children: [
|
3060
|
-
s.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children:
|
3070
|
+
s.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children: $t(s.title) }, "fieldLabel"),
|
3061
3071
|
s.type === "string" && !o && /* @__PURE__ */ d.jsx(
|
3062
3072
|
"input",
|
3063
3073
|
{
|
@@ -3131,18 +3141,18 @@ function Gt(s) {
|
|
3131
3141
|
children: s.title
|
3132
3142
|
}
|
3133
3143
|
),
|
3134
|
-
s.type === "image" && /* @__PURE__ */ d.jsx(
|
3135
|
-
s.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: a, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((c, u) => /* @__PURE__ */ d.jsx("option", { value: c.value, children:
|
3136
|
-
s.type === "vector2" && /* @__PURE__ */ d.jsx(
|
3137
|
-
s.type === "grid3" && /* @__PURE__ */ d.jsx(
|
3138
|
-
s.type === "grid4" && /* @__PURE__ */ d.jsx(
|
3139
|
-
s.type === "euler" && /* @__PURE__ */ d.jsx(
|
3144
|
+
s.type === "image" && /* @__PURE__ */ d.jsx(Xr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
|
3145
|
+
s.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: a, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((c, u) => /* @__PURE__ */ d.jsx("option", { value: c.value, children: $t(c.title) }, u)) }) }),
|
3146
|
+
s.type === "vector2" && /* @__PURE__ */ d.jsx(Rr, { step: s.step, value: t, min: 0, max: 1, onChange: a }),
|
3147
|
+
s.type === "grid3" && /* @__PURE__ */ d.jsx(ns, { step: s.step, value: t, onChange: a }),
|
3148
|
+
s.type === "grid4" && /* @__PURE__ */ d.jsx(Ar, { step: s.step, value: t, onChange: a }),
|
3149
|
+
s.type === "euler" && /* @__PURE__ */ d.jsx(ns, { step: s.step, value: t, onChange: a })
|
3140
3150
|
] });
|
3141
3151
|
}
|
3142
|
-
function
|
3152
|
+
function $r(s) {
|
3143
3153
|
return "items" in s;
|
3144
3154
|
}
|
3145
|
-
class be extends
|
3155
|
+
class be extends Jt {
|
3146
3156
|
subgroupNames = [];
|
3147
3157
|
subgroupElements = [];
|
3148
3158
|
valueOverrides = /* @__PURE__ */ new Map();
|
@@ -3194,15 +3204,15 @@ class be extends Kt {
|
|
3194
3204
|
render() {
|
3195
3205
|
const e = [];
|
3196
3206
|
return this.props.items.forEach((t) => {
|
3197
|
-
if (
|
3207
|
+
if ($r(t))
|
3198
3208
|
e.push(
|
3199
|
-
/* @__PURE__ */ d.jsx(be, { title:
|
3209
|
+
/* @__PURE__ */ d.jsx(be, { title: $t(t.title), items: t.items }, Math.random())
|
3200
3210
|
);
|
3201
3211
|
else {
|
3202
3212
|
const i = this.valueOverrides.get(t.title), n = i !== void 0 ? i : t.value;
|
3203
3213
|
e.push(
|
3204
3214
|
/* @__PURE__ */ d.jsx(
|
3205
|
-
|
3215
|
+
Wt,
|
3206
3216
|
{
|
3207
3217
|
title: t.title,
|
3208
3218
|
prop: t.prop,
|
@@ -3225,7 +3235,7 @@ class be extends Kt {
|
|
3225
3235
|
);
|
3226
3236
|
}
|
3227
3237
|
}), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ d.jsx(
|
3228
|
-
|
3238
|
+
Qt,
|
3229
3239
|
{
|
3230
3240
|
label: this.props.title,
|
3231
3241
|
open: this.props.expanded === !0,
|
@@ -3237,7 +3247,7 @@ class be extends Kt {
|
|
3237
3247
|
);
|
3238
3248
|
}
|
3239
3249
|
}
|
3240
|
-
class q extends
|
3250
|
+
class q extends Jt {
|
3241
3251
|
static instance;
|
3242
3252
|
static groups = [];
|
3243
3253
|
static groupsRefs = [];
|
@@ -3328,7 +3338,7 @@ class q extends Kt {
|
|
3328
3338
|
}
|
3329
3339
|
}
|
3330
3340
|
}
|
3331
|
-
function
|
3341
|
+
function os(s) {
|
3332
3342
|
switch (s) {
|
3333
3343
|
case "fov":
|
3334
3344
|
return "FOV";
|
@@ -3357,12 +3367,12 @@ function as(s) {
|
|
3357
3367
|
}
|
3358
3368
|
return s;
|
3359
3369
|
}
|
3360
|
-
function
|
3370
|
+
function Qr(s, e) {
|
3361
3371
|
const t = [];
|
3362
3372
|
if (s.perspectiveCameraInfo !== void 0)
|
3363
3373
|
for (const i in s.perspectiveCameraInfo)
|
3364
3374
|
t.push({
|
3365
|
-
title:
|
3375
|
+
title: os(i),
|
3366
3376
|
prop: i,
|
3367
3377
|
type: "number",
|
3368
3378
|
step: 0.01,
|
@@ -3379,7 +3389,7 @@ function $r(s, e) {
|
|
3379
3389
|
else if (s.orthographicCameraInfo !== void 0)
|
3380
3390
|
for (const i in s.orthographicCameraInfo)
|
3381
3391
|
t.push({
|
3382
|
-
title:
|
3392
|
+
title: os(i),
|
3383
3393
|
prop: i,
|
3384
3394
|
type: "number",
|
3385
3395
|
step: 0.01,
|
@@ -3401,14 +3411,14 @@ function $r(s, e) {
|
|
3401
3411
|
}
|
3402
3412
|
);
|
3403
3413
|
}
|
3404
|
-
class
|
3414
|
+
class qr extends Se {
|
3405
3415
|
constructor(e, t) {
|
3406
3416
|
const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new at();
|
3407
3417
|
n.setAttribute("position", new Be(i, 3)), n.computeBoundingSphere();
|
3408
|
-
const a = new
|
3418
|
+
const a = new Ri({ fog: !1 });
|
3409
3419
|
super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
|
3410
3420
|
const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new at();
|
3411
|
-
o.setAttribute("position", new Be(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ge({ side:
|
3421
|
+
o.setAttribute("position", new Be(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ge({ side: Rs, fog: !1 })));
|
3412
3422
|
}
|
3413
3423
|
updateMatrixWorld() {
|
3414
3424
|
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
@@ -3424,7 +3434,7 @@ class Qr extends Se {
|
|
3424
3434
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3425
3435
|
}
|
3426
3436
|
}
|
3427
|
-
const
|
3437
|
+
const ls = { type: "change" }, Ii = { type: "start" }, an = { type: "end" }, Ut = new Xn(), cs = new $n(), Kr = Math.cos(70 * Qn.DEG2RAD), ie = new O(), he = 2 * Math.PI, H = {
|
3428
3438
|
NONE: -1,
|
3429
3439
|
ROTATE: 0,
|
3430
3440
|
DOLLY: 1,
|
@@ -3433,10 +3443,10 @@ const os = { type: "change" }, Ai = { type: "start" }, rn = { type: "end" }, Ut
|
|
3433
3443
|
TOUCH_PAN: 4,
|
3434
3444
|
TOUCH_DOLLY_PAN: 5,
|
3435
3445
|
TOUCH_DOLLY_ROTATE: 6
|
3436
|
-
},
|
3437
|
-
class
|
3446
|
+
}, ui = 1e-6;
|
3447
|
+
class Jr extends Ws {
|
3438
3448
|
constructor(e, t = null) {
|
3439
|
-
super(e, t), this.state = H.NONE, this.enabled = !0, this.target = new O(), this.cursor = new O(), 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: rt.ROTATE, MIDDLE: rt.DOLLY, RIGHT: rt.PAN }, this.touches = { ONE: nt.ROTATE, TWO: nt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new O(), this._lastQuaternion = new fe(), this._lastTargetPosition = new O(), this._quat = new fe().setFromUnitVectors(e.up, new O(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new
|
3449
|
+
super(e, t), this.state = H.NONE, this.enabled = !0, this.target = new O(), this.cursor = new O(), 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: rt.ROTATE, MIDDLE: rt.DOLLY, RIGHT: rt.PAN }, this.touches = { ONE: nt.ROTATE, TWO: nt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new O(), this._lastQuaternion = new fe(), this._lastTargetPosition = new O(), this._quat = new fe().setFromUnitVectors(e.up, new O(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Si(), this._sphericalDelta = new Si(), this._scale = 1, this._panOffset = new O(), this._rotateStart = new ae(), this._rotateEnd = new ae(), this._rotateDelta = new ae(), this._panStart = new ae(), this._panEnd = new ae(), this._panDelta = new ae(), this._dollyStart = new ae(), this._dollyEnd = new ae(), this._dollyDelta = new ae(), this._dollyDirection = new O(), this._mouse = new ae(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ta.bind(this), this._onPointerDown = ea.bind(this), this._onPointerUp = ia.bind(this), this._onContextMenu = ca.bind(this), this._onMouseWheel = ra.bind(this), this._onKeyDown = aa.bind(this), this._onTouchStart = oa.bind(this), this._onTouchMove = la.bind(this), this._onMouseDown = sa.bind(this), this._onMouseMove = na.bind(this), this._interceptControlDown = ha.bind(this), this._interceptControlUp = da.bind(this), this.domElement !== null && this.connect(), this.update();
|
3440
3450
|
}
|
3441
3451
|
connect() {
|
3442
3452
|
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";
|
@@ -3466,7 +3476,7 @@ class Kr extends Gs {
|
|
3466
3476
|
this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
|
3467
3477
|
}
|
3468
3478
|
reset() {
|
3469
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(
|
3479
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(ls), this.update(), this.state = H.NONE;
|
3470
3480
|
}
|
3471
3481
|
update(e = null) {
|
3472
3482
|
const t = this.object.position;
|
@@ -3496,12 +3506,12 @@ class Kr extends Gs {
|
|
3496
3506
|
c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), r = ie.length();
|
3497
3507
|
} else
|
3498
3508
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
3499
|
-
r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) <
|
3509
|
+
r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < Kr ? this.object.lookAt(this.target) : (cs.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(cs, this.target))));
|
3500
3510
|
} else if (this.object.isOrthographicCamera) {
|
3501
3511
|
const r = this.object.zoom;
|
3502
3512
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), r !== this.object.zoom && (this.object.updateProjectionMatrix(), a = !0);
|
3503
3513
|
}
|
3504
|
-
return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) >
|
3514
|
+
return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > ui || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ui || this._lastTargetPosition.distanceToSquared(this.target) > ui ? (this.dispatchEvent(ls), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
3505
3515
|
}
|
3506
3516
|
_getAutoRotationAngle(e) {
|
3507
3517
|
return e !== null ? he / 60 * this.autoRotateSpeed * e : he / 60 / 60 * this.autoRotateSpeed;
|
@@ -3695,16 +3705,16 @@ class Kr extends Gs {
|
|
3695
3705
|
return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
|
3696
3706
|
}
|
3697
3707
|
}
|
3698
|
-
function
|
3708
|
+
function ea(s) {
|
3699
3709
|
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)));
|
3700
3710
|
}
|
3701
|
-
function
|
3711
|
+
function ta(s) {
|
3702
3712
|
this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
|
3703
3713
|
}
|
3704
|
-
function
|
3714
|
+
function ia(s) {
|
3705
3715
|
switch (this._removePointer(s), this._pointers.length) {
|
3706
3716
|
case 0:
|
3707
|
-
this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
3717
|
+
this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(an), this.state = H.NONE;
|
3708
3718
|
break;
|
3709
3719
|
case 1:
|
3710
3720
|
const e = this._pointers[0], t = this._pointerPositions[e];
|
@@ -3712,7 +3722,7 @@ function ta(s) {
|
|
3712
3722
|
break;
|
3713
3723
|
}
|
3714
3724
|
}
|
3715
|
-
function
|
3725
|
+
function sa(s) {
|
3716
3726
|
let e;
|
3717
3727
|
switch (s.button) {
|
3718
3728
|
case 0:
|
@@ -3758,9 +3768,9 @@ function ia(s) {
|
|
3758
3768
|
default:
|
3759
3769
|
this.state = H.NONE;
|
3760
3770
|
}
|
3761
|
-
this.state !== H.NONE && this.dispatchEvent(
|
3771
|
+
this.state !== H.NONE && this.dispatchEvent(Ii);
|
3762
3772
|
}
|
3763
|
-
function
|
3773
|
+
function na(s) {
|
3764
3774
|
switch (this.state) {
|
3765
3775
|
case H.ROTATE:
|
3766
3776
|
if (this.enableRotate === !1)
|
@@ -3779,13 +3789,13 @@ function sa(s) {
|
|
3779
3789
|
break;
|
3780
3790
|
}
|
3781
3791
|
}
|
3782
|
-
function na(s) {
|
3783
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (s.preventDefault(), this.dispatchEvent(Ai), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(rn));
|
3784
|
-
}
|
3785
3792
|
function ra(s) {
|
3786
|
-
this.enabled === !1 || this.
|
3793
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (s.preventDefault(), this.dispatchEvent(Ii), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(an));
|
3787
3794
|
}
|
3788
3795
|
function aa(s) {
|
3796
|
+
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
|
3797
|
+
}
|
3798
|
+
function oa(s) {
|
3789
3799
|
switch (this._trackPointer(s), this._pointers.length) {
|
3790
3800
|
case 1:
|
3791
3801
|
switch (this.touches.ONE) {
|
@@ -3822,9 +3832,9 @@ function aa(s) {
|
|
3822
3832
|
default:
|
3823
3833
|
this.state = H.NONE;
|
3824
3834
|
}
|
3825
|
-
this.state !== H.NONE && this.dispatchEvent(
|
3835
|
+
this.state !== H.NONE && this.dispatchEvent(Ii);
|
3826
3836
|
}
|
3827
|
-
function
|
3837
|
+
function la(s) {
|
3828
3838
|
switch (this._trackPointer(s), this.state) {
|
3829
3839
|
case H.TOUCH_ROTATE:
|
3830
3840
|
if (this.enableRotate === !1)
|
@@ -3850,24 +3860,24 @@ function oa(s) {
|
|
3850
3860
|
this.state = H.NONE;
|
3851
3861
|
}
|
3852
3862
|
}
|
3853
|
-
function
|
3863
|
+
function ca(s) {
|
3854
3864
|
this.enabled !== !1 && s.preventDefault();
|
3855
3865
|
}
|
3856
|
-
function
|
3866
|
+
function ha(s) {
|
3857
3867
|
s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
3858
3868
|
}
|
3859
|
-
function
|
3869
|
+
function da(s) {
|
3860
3870
|
s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
3861
3871
|
}
|
3862
|
-
const
|
3872
|
+
const ua = Math.PI / 180;
|
3863
3873
|
function qe(s, e, t, i, n) {
|
3864
3874
|
return i + (s - e) * (n - i) / (t - e);
|
3865
3875
|
}
|
3866
3876
|
function Ke(s, e, t) {
|
3867
3877
|
return (1 - t) * s + t * e;
|
3868
3878
|
}
|
3869
|
-
function
|
3870
|
-
return s *
|
3879
|
+
function hs(s) {
|
3880
|
+
return s * ua;
|
3871
3881
|
}
|
3872
3882
|
/*!
|
3873
3883
|
* camera-controls
|
@@ -3908,17 +3918,17 @@ function je(s) {
|
|
3908
3918
|
function Re(s) {
|
3909
3919
|
return s.isOrthographicCamera;
|
3910
3920
|
}
|
3911
|
-
const et = Math.PI * 2,
|
3921
|
+
const et = Math.PI * 2, ds = Math.PI / 2, on = 1e-5, ft = Math.PI / 180;
|
3912
3922
|
function ye(s, e, t) {
|
3913
3923
|
return Math.max(e, Math.min(t, s));
|
3914
3924
|
}
|
3915
|
-
function Z(s, e =
|
3925
|
+
function Z(s, e = on) {
|
3916
3926
|
return Math.abs(s) < e;
|
3917
3927
|
}
|
3918
|
-
function z(s, e, t =
|
3928
|
+
function z(s, e, t = on) {
|
3919
3929
|
return Z(s - e, t);
|
3920
3930
|
}
|
3921
|
-
function
|
3931
|
+
function us(s, e) {
|
3922
3932
|
return Math.round(s / e) * e;
|
3923
3933
|
}
|
3924
3934
|
function _t(s) {
|
@@ -3938,7 +3948,7 @@ function jt(s, e, t, i, n = 1 / 0, a) {
|
|
3938
3948
|
let g = e + (c + _) * h;
|
3939
3949
|
return u - s > 0 == g > u && (g = u, t.value = (g - u) / a), g;
|
3940
3950
|
}
|
3941
|
-
function
|
3951
|
+
function ps(s, e, t, i, n = 1 / 0, a, r) {
|
3942
3952
|
i = Math.max(1e-4, i);
|
3943
3953
|
const o = 2 / i, h = o * a, c = 1 / (1 + h + 0.48 * h * h + 0.235 * h * h * h);
|
3944
3954
|
let u = e.x, m = e.y, _ = e.z, g = s.x - u, S = s.y - m, M = s.z - _;
|
@@ -3953,15 +3963,15 @@ function us(s, e, t, i, n = 1 / 0, a, r) {
|
|
3953
3963
|
const _e = T - s.x, Pe = f - s.y, ct = v - s.z, Ve = r.x - T, me = r.y - f, te = r.z - v;
|
3954
3964
|
return _e * Ve + Pe * me + ct * te > 0 && (r.x = T, r.y = f, r.z = v, t.x = (r.x - T) / a, t.y = (r.y - f) / a, t.z = (r.z - v) / a), r;
|
3955
3965
|
}
|
3956
|
-
function
|
3966
|
+
function pi(s, e) {
|
3957
3967
|
e.set(0, 0), s.forEach((t) => {
|
3958
3968
|
e.x += t.clientX, e.y += t.clientY;
|
3959
3969
|
}), e.x /= s.length, e.y /= s.length;
|
3960
3970
|
}
|
3961
|
-
function
|
3971
|
+
function mi(s, e) {
|
3962
3972
|
return Re(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
3963
3973
|
}
|
3964
|
-
class
|
3974
|
+
class pa {
|
3965
3975
|
constructor() {
|
3966
3976
|
this._listeners = {};
|
3967
3977
|
}
|
@@ -4025,10 +4035,10 @@ class ua {
|
|
4025
4035
|
}
|
4026
4036
|
}
|
4027
4037
|
}
|
4028
|
-
var
|
4029
|
-
const
|
4030
|
-
let A,
|
4031
|
-
class xe extends
|
4038
|
+
var fi;
|
4039
|
+
const ma = "2.9.0", Nt = 1 / 8, fa = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
|
4040
|
+
let A, ms, Ft, _i, de, L, N, tt, vt, Ee, Ce, Ne, fs, _s, ve, yt, it, gs, gi, vs, vi, yi, zt;
|
4041
|
+
class xe extends pa {
|
4032
4042
|
/**
|
4033
4043
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
4034
4044
|
*
|
@@ -4070,7 +4080,7 @@ class xe extends ua {
|
|
4070
4080
|
* @category Statics
|
4071
4081
|
*/
|
4072
4082
|
static install(e) {
|
4073
|
-
A = e.THREE,
|
4083
|
+
A = e.THREE, ms = Object.freeze(new A.Vector3(0, 0, 0)), Ft = Object.freeze(new A.Vector3(0, 1, 0)), _i = Object.freeze(new A.Vector3(0, 0, 1)), de = new A.Vector2(), L = new A.Vector3(), N = new A.Vector3(), tt = new A.Vector3(), vt = new A.Vector3(), Ee = new A.Vector3(), Ce = new A.Vector3(), Ne = new A.Vector3(), fs = new A.Vector3(), _s = new A.Vector3(), ve = new A.Spherical(), yt = new A.Spherical(), it = new A.Box3(), gs = new A.Box3(), gi = new A.Sphere(), vs = new A.Quaternion(), vi = new A.Quaternion(), yi = new A.Matrix4(), zt = new A.Raycaster();
|
4074
4084
|
}
|
4075
4085
|
/**
|
4076
4086
|
* list all ACTIONs
|
@@ -4213,7 +4223,7 @@ class xe extends ua {
|
|
4213
4223
|
const x = performance.now();
|
4214
4224
|
c - x < 1e3 && this._getClientRect(this._elementRect), c = x;
|
4215
4225
|
}
|
4216
|
-
const v =
|
4226
|
+
const v = fa ? -1 : -3, E = f.deltaMode === 1 ? f.deltaY / v : f.deltaY / (v * 10), b = this.dollyToCursor ? (f.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, P = this.dollyToCursor ? (f.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
4217
4227
|
switch (this.mouseButtons.wheel) {
|
4218
4228
|
case p.ROTATE: {
|
4219
4229
|
this._rotateInternal(f.deltaX, f.deltaY), this._isUserControllingRotate = !0;
|
@@ -4249,7 +4259,7 @@ class xe extends ua {
|
|
4249
4259
|
}, _ = (f) => {
|
4250
4260
|
if (!this._enabled)
|
4251
4261
|
return;
|
4252
|
-
if (
|
4262
|
+
if (pi(this._activePointers, de), this._getClientRect(this._elementRect), i.copy(de), n.copy(de), this._activePointers.length >= 2) {
|
4253
4263
|
const E = de.x - this._activePointers[1].clientX, b = de.y - this._activePointers[1].clientY, P = Math.sqrt(E * E + b * b);
|
4254
4264
|
a.set(0, P);
|
4255
4265
|
const x = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, j = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
@@ -4275,7 +4285,7 @@ class xe extends ua {
|
|
4275
4285
|
}, g = () => {
|
4276
4286
|
if (!this._enabled || !this._dragNeedsUpdate)
|
4277
4287
|
return;
|
4278
|
-
this._dragNeedsUpdate = !1,
|
4288
|
+
this._dragNeedsUpdate = !1, pi(this._activePointers, de);
|
4279
4289
|
const v = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = v ? -v.deltaX : n.x - de.x, b = v ? -v.deltaY : n.y - de.y;
|
4280
4290
|
if (n.copy(de), ((this._state & p.ROTATE) === p.ROTATE || (this._state & p.TOUCH_ROTATE) === p.TOUCH_ROTATE || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, b), this._isUserControllingRotate = !0), (this._state & p.DOLLY) === p.DOLLY || (this._state & p.ZOOM) === p.ZOOM) {
|
4281
4291
|
const P = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, j = this.dollyDragInverted ? -1 : 1;
|
@@ -4289,7 +4299,7 @@ class xe extends ua {
|
|
4289
4299
|
}
|
4290
4300
|
((this._state & p.TRUCK) === p.TRUCK || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, b, !1), this._isUserControllingTruck = !0), ((this._state & p.OFFSET) === p.OFFSET || (this._state & p.TOUCH_OFFSET) === p.TOUCH_OFFSET || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
4291
4301
|
}, S = () => {
|
4292
|
-
|
4302
|
+
pi(this._activePointers, de), n.copy(de), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this.dispatchEvent({ type: "controlend" }));
|
4293
4303
|
};
|
4294
4304
|
this.lockPointer = () => {
|
4295
4305
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
@@ -4679,12 +4689,12 @@ class xe extends ua {
|
|
4679
4689
|
fitToBox(e, t, { cover: i = !1, paddingLeft: n = 0, paddingRight: a = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
|
4680
4690
|
const h = [], c = e.isBox3 ? it.copy(e) : it.setFromObject(e);
|
4681
4691
|
c.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
4682
|
-
const u =
|
4692
|
+
const u = us(this._sphericalEnd.theta, ds), m = us(this._sphericalEnd.phi, ds);
|
4683
4693
|
h.push(this.rotateTo(u, m, t));
|
4684
|
-
const _ = L.setFromSpherical(this._sphericalEnd).normalize(), g =
|
4685
|
-
S && g.multiply(
|
4686
|
-
const M =
|
4687
|
-
N.copy(c.min).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setX(c.max.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setY(c.max.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setZ(c.min.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setZ(c.max.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setY(c.min.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setX(c.min.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).applyQuaternion(g), M.expandByPoint(N), M.min.x -= n, M.min.y -= r, M.max.x += a, M.max.y += o, g.setFromUnitVectors(
|
4694
|
+
const _ = L.setFromSpherical(this._sphericalEnd).normalize(), g = vs.setFromUnitVectors(_, _i), S = z(Math.abs(_.y), 1);
|
4695
|
+
S && g.multiply(vi.setFromAxisAngle(Ft, u)), g.multiply(this._yAxisUpSpaceInverse);
|
4696
|
+
const M = gs.makeEmpty();
|
4697
|
+
N.copy(c.min).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setX(c.max.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setY(c.max.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setZ(c.min.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setZ(c.max.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setY(c.min.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setX(c.min.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).applyQuaternion(g), M.expandByPoint(N), M.min.x -= n, M.min.y -= r, M.max.x += a, M.max.y += o, g.setFromUnitVectors(_i, _), S && g.premultiply(vi.invert()), g.premultiply(this._yAxisUpSpace);
|
4688
4698
|
const T = M.getSize(L), f = M.getCenter(N).applyQuaternion(g);
|
4689
4699
|
if (je(this._camera)) {
|
4690
4700
|
const v = this.getDistanceToFitBox(T.x, T.y, T.z, i);
|
@@ -4702,7 +4712,7 @@ class xe extends ua {
|
|
4702
4712
|
* @category Methods
|
4703
4713
|
*/
|
4704
4714
|
fitToSphere(e, t) {
|
4705
|
-
const i = [], a = "isObject3D" in e ? xe.createBoundingSphere(e,
|
4715
|
+
const i = [], a = "isObject3D" in e ? xe.createBoundingSphere(e, gi) : gi.copy(e);
|
4706
4716
|
if (i.push(this.moveTo(a.center.x, a.center.y, a.center.z, t)), je(this._camera)) {
|
4707
4717
|
const r = this.getDistanceToFitSphere(a.radius);
|
4708
4718
|
i.push(this.dollyTo(r, t));
|
@@ -4847,7 +4857,7 @@ class xe extends ua {
|
|
4847
4857
|
* @category Methods
|
4848
4858
|
*/
|
4849
4859
|
getDistanceToFitBox(e, t, i, n = !1) {
|
4850
|
-
if (
|
4860
|
+
if (mi(this._camera, "getDistanceToFitBox"))
|
4851
4861
|
return this._spherical.radius;
|
4852
4862
|
const a = e / t, r = this._camera.getEffectiveFOV() * ft, o = this._camera.aspect;
|
4853
4863
|
return ((n ? a > o : a < o) ? t : e / o) * 0.5 / Math.tan(r * 0.5) + i * 0.5;
|
@@ -4859,7 +4869,7 @@ class xe extends ua {
|
|
4859
4869
|
* @category Methods
|
4860
4870
|
*/
|
4861
4871
|
getDistanceToFitSphere(e) {
|
4862
|
-
if (
|
4872
|
+
if (mi(this._camera, "getDistanceToFitSphere"))
|
4863
4873
|
return this._spherical.radius;
|
4864
4874
|
const t = this._camera.getEffectiveFOV() * ft, i = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : i;
|
4865
4875
|
return e / Math.sin(n * 0.5);
|
@@ -4965,7 +4975,7 @@ class xe extends ua {
|
|
4965
4975
|
* @category Methods
|
4966
4976
|
*/
|
4967
4977
|
update(e) {
|
4968
|
-
const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a =
|
4978
|
+
const t = this._sphericalEnd.theta - this._spherical.theta, i = this._sphericalEnd.phi - this._spherical.phi, n = this._sphericalEnd.radius - this._spherical.radius, a = fs.subVectors(this._targetEnd, this._target), r = _s.subVectors(this._focalOffsetEnd, this._focalOffset), o = this._zoomEnd - this._zoom;
|
4969
4979
|
if (Z(t))
|
4970
4980
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
4971
4981
|
else {
|
@@ -4988,13 +4998,13 @@ class xe extends ua {
|
|
4988
4998
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
4989
4999
|
else {
|
4990
5000
|
const m = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
4991
|
-
|
5001
|
+
ps(this._target, this._targetEnd, this._targetVelocity, m, this.maxSpeed, e, this._target), this._needsUpdate = !0;
|
4992
5002
|
}
|
4993
5003
|
if (Z(r.x) && Z(r.y) && Z(r.z))
|
4994
5004
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
4995
5005
|
else {
|
4996
5006
|
const m = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
4997
|
-
|
5007
|
+
ps(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, m, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
4998
5008
|
}
|
4999
5009
|
if (Z(o))
|
5000
5010
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
@@ -5078,7 +5088,7 @@ class xe extends ua {
|
|
5078
5088
|
console.warn("camera-controls is already connected.");
|
5079
5089
|
return;
|
5080
5090
|
}
|
5081
|
-
e.setAttribute("data-camera-controls-version",
|
5091
|
+
e.setAttribute("data-camera-controls-version", ma), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
5082
5092
|
}
|
5083
5093
|
/**
|
5084
5094
|
* Detach all internal event handlers to disable drag control.
|
@@ -5138,13 +5148,13 @@ class xe extends ua {
|
|
5138
5148
|
// lateUpdate
|
5139
5149
|
_collisionTest() {
|
5140
5150
|
let e = 1 / 0;
|
5141
|
-
if (!(this.colliderMeshes.length >= 1) ||
|
5151
|
+
if (!(this.colliderMeshes.length >= 1) || mi(this._camera, "_collisionTest"))
|
5142
5152
|
return e;
|
5143
5153
|
const i = this._getTargetDirection(vt);
|
5144
|
-
|
5154
|
+
yi.lookAt(ms, i, this._camera.up);
|
5145
5155
|
for (let n = 0; n < 4; n++) {
|
5146
5156
|
const a = N.copy(this._nearPlaneCorners[n]);
|
5147
|
-
a.applyMatrix4(
|
5157
|
+
a.applyMatrix4(yi);
|
5148
5158
|
const r = tt.addVectors(this._target, a);
|
5149
5159
|
zt.set(r, i), zt.far = this._spherical.radius + 1;
|
5150
5160
|
const o = zt.intersectObjects(this.colliderMeshes);
|
@@ -5223,7 +5233,7 @@ class xe extends ua {
|
|
5223
5233
|
}), i.radius = Math.sqrt(a), i;
|
5224
5234
|
}
|
5225
5235
|
}
|
5226
|
-
const
|
5236
|
+
const qt = (s) => {
|
5227
5237
|
const [e, t] = G(s.options[s.index]), i = () => {
|
5228
5238
|
s.onToggle(!s.open);
|
5229
5239
|
}, n = (a) => {
|
@@ -5233,7 +5243,7 @@ const Qt = (s) => {
|
|
5233
5243
|
/* @__PURE__ */ d.jsx("div", { className: "dropdown-toggle", onClick: i, children: `${s.title}: ${e}` }),
|
5234
5244
|
s.open && /* @__PURE__ */ d.jsx("ul", { className: "dropdown-menu", children: s.options.map((a) => /* @__PURE__ */ d.jsx("li", { onClick: () => n(a), children: a }, a)) })
|
5235
5245
|
] });
|
5236
|
-
}, Fe =
|
5246
|
+
}, Fe = ur(function(e, t) {
|
5237
5247
|
const i = [
|
5238
5248
|
"Renderer",
|
5239
5249
|
"Depth",
|
@@ -5247,7 +5257,7 @@ const Qt = (s) => {
|
|
5247
5257
|
} }),
|
5248
5258
|
/* @__PURE__ */ d.jsxs("div", { className: "options", children: [
|
5249
5259
|
e.camera !== null && /* @__PURE__ */ d.jsx(
|
5250
|
-
|
5260
|
+
qt,
|
5251
5261
|
{
|
5252
5262
|
title: "Camera",
|
5253
5263
|
index: e.options.indexOf(e.camera.name),
|
@@ -5261,7 +5271,7 @@ const Qt = (s) => {
|
|
5261
5271
|
}
|
5262
5272
|
),
|
5263
5273
|
/* @__PURE__ */ d.jsx(
|
5264
|
-
|
5274
|
+
qt,
|
5265
5275
|
{
|
5266
5276
|
title: "Mode",
|
5267
5277
|
index: i.indexOf(n),
|
@@ -5282,15 +5292,15 @@ const Qt = (s) => {
|
|
5282
5292
|
] })
|
5283
5293
|
] });
|
5284
5294
|
});
|
5285
|
-
class
|
5295
|
+
class _a extends Vs {
|
5286
5296
|
constructor(e) {
|
5287
5297
|
super({
|
5288
5298
|
extensions: {
|
5289
5299
|
// @ts-ignore
|
5290
5300
|
derivatives: !0
|
5291
5301
|
},
|
5292
|
-
glslVersion:
|
5293
|
-
side:
|
5302
|
+
glslVersion: qn,
|
5303
|
+
side: Di,
|
5294
5304
|
transparent: !0,
|
5295
5305
|
uniforms: {
|
5296
5306
|
uScale: {
|
@@ -5395,17 +5405,17 @@ class fa extends Ws {
|
|
5395
5405
|
});
|
5396
5406
|
}
|
5397
5407
|
}
|
5398
|
-
class
|
5408
|
+
class ga extends w {
|
5399
5409
|
gridMaterial;
|
5400
5410
|
constructor() {
|
5401
|
-
const e = new
|
5402
|
-
super(new
|
5411
|
+
const e = new _a();
|
5412
|
+
super(new Xs(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
5403
5413
|
}
|
5404
5414
|
update() {
|
5405
5415
|
this.gridMaterial.needsUpdate = !0;
|
5406
5416
|
}
|
5407
5417
|
}
|
5408
|
-
const
|
5418
|
+
const va = `#include <common>
|
5409
5419
|
#include <batching_pars_vertex>
|
5410
5420
|
#include <uv_pars_vertex>
|
5411
5421
|
#include <color_pars_vertex>
|
@@ -5435,7 +5445,7 @@ void main() {
|
|
5435
5445
|
#include <logdepthbuf_vertex>
|
5436
5446
|
#include <clipping_planes_vertex>
|
5437
5447
|
#include <worldpos_vertex>
|
5438
|
-
}`,
|
5448
|
+
}`, ya = `
|
5439
5449
|
#include <common>
|
5440
5450
|
#include <uv_pars_fragment>
|
5441
5451
|
#include <clipping_planes_pars_fragment>
|
@@ -5444,30 +5454,30 @@ void main() {
|
|
5444
5454
|
#include <clipping_planes_fragment>
|
5445
5455
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
5446
5456
|
}`;
|
5447
|
-
class
|
5457
|
+
class ba extends Vs {
|
5448
5458
|
constructor() {
|
5449
5459
|
super({
|
5450
5460
|
defines: {
|
5451
5461
|
USE_UV: ""
|
5452
5462
|
},
|
5453
|
-
vertexShader:
|
5454
|
-
fragmentShader:
|
5463
|
+
vertexShader: va,
|
5464
|
+
fragmentShader: ya
|
5455
5465
|
});
|
5456
5466
|
}
|
5457
5467
|
}
|
5458
|
-
const ze = new
|
5468
|
+
const ze = new Xt(), re = new O(), De = new O(), W = new fe(), ys = {
|
5459
5469
|
X: new O(1, 0, 0),
|
5460
5470
|
Y: new O(0, 1, 0),
|
5461
5471
|
Z: new O(0, 0, 1)
|
5462
|
-
},
|
5463
|
-
class
|
5472
|
+
}, bi = { type: "change" }, bs = { type: "mouseDown", mode: null }, Es = { type: "mouseUp", mode: null }, Cs = { type: "objectChange" };
|
5473
|
+
class Ea extends Ws {
|
5464
5474
|
constructor(e, t = null) {
|
5465
5475
|
super(void 0, t);
|
5466
|
-
const i = new
|
5476
|
+
const i = new Ta(this);
|
5467
5477
|
this._root = i;
|
5468
|
-
const n = new
|
5478
|
+
const n = new Ma();
|
5469
5479
|
this._gizmo = n, i.add(n);
|
5470
|
-
const a = new
|
5480
|
+
const a = new Pa();
|
5471
5481
|
this._plane = a, i.add(a);
|
5472
5482
|
const r = this;
|
5473
5483
|
function o(E, b) {
|
@@ -5477,13 +5487,13 @@ class ba extends Gs {
|
|
5477
5487
|
return P !== void 0 ? P : b;
|
5478
5488
|
},
|
5479
5489
|
set: function(x) {
|
5480
|
-
P !== x && (P = x, a[E] = x, n[E] = x, r.dispatchEvent({ type: E + "-changed", value: x }), r.dispatchEvent(
|
5490
|
+
P !== x && (P = x, a[E] = x, n[E] = x, r.dispatchEvent({ type: E + "-changed", value: x }), r.dispatchEvent(bi));
|
5481
5491
|
}
|
5482
5492
|
}), r[E] = b, a[E] = b, n[E] = b;
|
5483
5493
|
}
|
5484
5494
|
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);
|
5485
5495
|
const h = new O(), c = new O(), u = new fe(), m = new fe(), _ = new O(), g = new fe(), S = new O(), M = new O(), T = new O(), f = 0, v = new O();
|
5486
|
-
o("worldPosition", h), o("worldPositionStart", c), o("worldQuaternion", u), o("worldQuaternionStart", m), o("cameraPosition", _), o("cameraQuaternion", g), o("pointStart", S), o("pointEnd", M), o("rotationAxis", T), o("rotationAngle", f), o("eye", v), this._offset = new O(), this._startNorm = new O(), this._endNorm = new O(), this._cameraScale = new O(), this._parentPosition = new O(), this._parentQuaternion = new fe(), this._parentQuaternionInv = new fe(), this._parentScale = new O(), this._worldScaleStart = new O(), this._worldQuaternionInv = new fe(), this._worldScale = new O(), this._positionStart = new O(), this._quaternionStart = new fe(), this._scaleStart = new O(), this._getPointer =
|
5496
|
+
o("worldPosition", h), o("worldPositionStart", c), o("worldQuaternion", u), o("worldQuaternionStart", m), o("cameraPosition", _), o("cameraQuaternion", g), o("pointStart", S), o("pointEnd", M), o("rotationAxis", T), o("rotationAngle", f), o("eye", v), this._offset = new O(), this._startNorm = new O(), this._endNorm = new O(), this._cameraScale = new O(), this._parentPosition = new O(), this._parentQuaternion = new fe(), this._parentQuaternionInv = new fe(), this._parentScale = new O(), this._worldScaleStart = new O(), this._worldQuaternionInv = new fe(), this._worldScale = new O(), this._positionStart = new O(), this._quaternionStart = new fe(), this._scaleStart = new O(), this._getPointer = Ca.bind(this), this._onPointerDown = Sa.bind(this), this._onPointerHover = wa.bind(this), this._onPointerMove = xa.bind(this), this._onPointerUp = Oa.bind(this), t !== null && this.connect();
|
5487
5497
|
}
|
5488
5498
|
connect() {
|
5489
5499
|
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
@@ -5498,14 +5508,14 @@ class ba extends Gs {
|
|
5498
5508
|
if (this.object === void 0 || this.dragging === !0)
|
5499
5509
|
return;
|
5500
5510
|
e !== null && ze.setFromCamera(e, this.camera);
|
5501
|
-
const t =
|
5511
|
+
const t = Ei(this._gizmo.picker[this.mode], ze);
|
5502
5512
|
t ? this.axis = t.object.name : this.axis = null;
|
5503
5513
|
}
|
5504
5514
|
pointerDown(e) {
|
5505
5515
|
if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
|
5506
5516
|
e !== null && ze.setFromCamera(e, this.camera);
|
5507
|
-
const t =
|
5508
|
-
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0,
|
5517
|
+
const t = Ei(this._plane, ze, !0);
|
5518
|
+
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, bs.mode = this.mode, this.dispatchEvent(bs);
|
5509
5519
|
}
|
5510
5520
|
}
|
5511
5521
|
pointerMove(e) {
|
@@ -5514,7 +5524,7 @@ class ba extends Gs {
|
|
5514
5524
|
if (i === "scale" ? a = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (a = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1)
|
5515
5525
|
return;
|
5516
5526
|
e !== null && ze.setFromCamera(e, this.camera);
|
5517
|
-
const r =
|
5527
|
+
const r = Ei(this._plane, ze, !0);
|
5518
5528
|
if (r) {
|
5519
5529
|
if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), i === "translate")
|
5520
5530
|
this._offset.copy(this.pointEnd).sub(this.pointStart), a === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), a === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (a === "local" && (n.position.applyQuaternion(W.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), a === "world" && (n.parent && n.position.add(re.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(re.setFromMatrixPosition(n.parent.matrixWorld))));
|
@@ -5529,13 +5539,13 @@ class ba extends Gs {
|
|
5529
5539
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
5530
5540
|
const o = 20 / this.worldPosition.distanceTo(re.setFromMatrixPosition(this.camera.matrixWorld));
|
5531
5541
|
let h = !1;
|
5532
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(
|
5542
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ys[t]), re.copy(ys[t]), a === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? h = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || h) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
|
5533
5543
|
}
|
5534
|
-
this.dispatchEvent(
|
5544
|
+
this.dispatchEvent(bi), this.dispatchEvent(Cs);
|
5535
5545
|
}
|
5536
5546
|
}
|
5537
5547
|
pointerUp(e) {
|
5538
|
-
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (
|
5548
|
+
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (Es.mode = this.mode, this.dispatchEvent(Es)), this.dragging = !1, this.axis = null);
|
5539
5549
|
}
|
5540
5550
|
dispose() {
|
5541
5551
|
this.disconnect(), this.traverse(function(e) {
|
@@ -5551,7 +5561,7 @@ class ba extends Gs {
|
|
5551
5561
|
return this.object = void 0, this.axis = null, this._root.visible = !1, this;
|
5552
5562
|
}
|
5553
5563
|
reset() {
|
5554
|
-
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(
|
5564
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(bi), this.dispatchEvent(Cs), this.pointStart.copy(this.pointEnd));
|
5555
5565
|
}
|
5556
5566
|
getRaycaster() {
|
5557
5567
|
return ze;
|
@@ -5579,7 +5589,7 @@ class ba extends Gs {
|
|
5579
5589
|
this.space = e;
|
5580
5590
|
}
|
5581
5591
|
}
|
5582
|
-
function
|
5592
|
+
function Ca(s) {
|
5583
5593
|
if (this.domElement.ownerDocument.pointerLockElement)
|
5584
5594
|
return {
|
5585
5595
|
x: 0,
|
@@ -5595,7 +5605,7 @@ function Ea(s) {
|
|
5595
5605
|
};
|
5596
5606
|
}
|
5597
5607
|
}
|
5598
|
-
function
|
5608
|
+
function wa(s) {
|
5599
5609
|
if (this.enabled)
|
5600
5610
|
switch (s.pointerType) {
|
5601
5611
|
case "mouse":
|
@@ -5604,24 +5614,24 @@ function Ca(s) {
|
|
5604
5614
|
break;
|
5605
5615
|
}
|
5606
5616
|
}
|
5607
|
-
function
|
5617
|
+
function Sa(s) {
|
5608
5618
|
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)));
|
5609
5619
|
}
|
5610
|
-
function
|
5620
|
+
function xa(s) {
|
5611
5621
|
this.enabled && this.pointerMove(this._getPointer(s));
|
5612
5622
|
}
|
5613
|
-
function
|
5623
|
+
function Oa(s) {
|
5614
5624
|
this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
|
5615
5625
|
}
|
5616
|
-
function
|
5626
|
+
function Ei(s, e, t) {
|
5617
5627
|
const i = e.intersectObject(s, !0);
|
5618
5628
|
for (let n = 0; n < i.length; n++)
|
5619
5629
|
if (i[n].object.visible || t)
|
5620
5630
|
return i[n];
|
5621
5631
|
return !1;
|
5622
5632
|
}
|
5623
|
-
const Ht = new
|
5624
|
-
class
|
5633
|
+
const Ht = new $s(), B = new O(0, 1, 0), ws = new O(0, 0, 0), Ss = new Kt(), Yt = new fe(), Vt = new fe(), we = new O(), xs = new Kt(), wt = new O(1, 0, 0), Ye = new O(0, 1, 0), St = new O(0, 0, 1), Bt = new O(), bt = new O(), Et = new O();
|
5634
|
+
class Ta extends ot {
|
5625
5635
|
constructor(e) {
|
5626
5636
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
5627
5637
|
}
|
@@ -5631,7 +5641,7 @@ class Oa extends ot {
|
|
5631
5641
|
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);
|
5632
5642
|
}
|
5633
5643
|
}
|
5634
|
-
class
|
5644
|
+
class Ma extends ot {
|
5635
5645
|
constructor() {
|
5636
5646
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
5637
5647
|
const e = new Ge({
|
@@ -5640,7 +5650,7 @@ class Ta extends ot {
|
|
5640
5650
|
fog: !1,
|
5641
5651
|
toneMapped: !1,
|
5642
5652
|
transparent: !0
|
5643
|
-
}), t = new
|
5653
|
+
}), t = new Ri({
|
5644
5654
|
depthTest: !1,
|
5645
5655
|
depthWrite: !1,
|
5646
5656
|
fog: !1,
|
@@ -5778,7 +5788,7 @@ class Ta extends ot {
|
|
5778
5788
|
]
|
5779
5789
|
}, Pe = {
|
5780
5790
|
XYZE: [
|
5781
|
-
[new w(new
|
5791
|
+
[new w(new Qs(0.25, 10, 8), i)]
|
5782
5792
|
],
|
5783
5793
|
X: [
|
5784
5794
|
[new w(new dt(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
@@ -5871,7 +5881,7 @@ class Ta extends ot {
|
|
5871
5881
|
}
|
5872
5882
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
5873
5883
|
updateMatrixWorld(e) {
|
5874
|
-
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
5884
|
+
const i = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Vt;
|
5875
5885
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
5876
5886
|
let n = [];
|
5877
5887
|
n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
|
@@ -5880,26 +5890,26 @@ class Ta extends ot {
|
|
5880
5890
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
5881
5891
|
let o;
|
5882
5892
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
|
5883
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Ht.set(0, 0, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (W.setFromEuler(Ht.set(0, 0, Math.PI / 2)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(
|
5893
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Ht.set(0, 0, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (W.setFromEuler(Ht.set(0, 0, Math.PI / 2)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Ss.lookAt(ws, B, Ye)), r.quaternion.multiply(W), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(re), r.visible = this.dragging) : (r.quaternion.copy(i), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
5884
5894
|
continue;
|
5885
5895
|
}
|
5886
|
-
r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(W.copy(i).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(
|
5896
|
+
r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(W.copy(i).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Ss.lookAt(this.eye, ws, Ye)), r.name === "X" && (W.setFromAxisAngle(wt, Math.atan2(-B.y, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Y" && (W.setFromAxisAngle(Ye, Math.atan2(B.x, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Z" && (W.setFromAxisAngle(St, Math.atan2(B.y, B.x)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(h) {
|
5887
5897
|
return r.name === h;
|
5888
5898
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
5889
5899
|
}
|
5890
5900
|
super.updateMatrixWorld(e);
|
5891
5901
|
}
|
5892
5902
|
}
|
5893
|
-
class
|
5903
|
+
class Pa extends w {
|
5894
5904
|
constructor() {
|
5895
5905
|
super(
|
5896
|
-
new
|
5897
|
-
new Ge({ visible: !1, wireframe: !0, side:
|
5906
|
+
new Xs(1e5, 1e5, 2, 2),
|
5907
|
+
new Ge({ visible: !1, wireframe: !0, side: Di, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
5898
5908
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
5899
5909
|
}
|
5900
5910
|
updateMatrixWorld(e) {
|
5901
5911
|
let t = this.space;
|
5902
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion :
|
5912
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), bt.copy(Ye).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), Et.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), B.copy(bt), this.mode) {
|
5903
5913
|
case "translate":
|
5904
5914
|
case "scale":
|
5905
5915
|
switch (this.axis) {
|
@@ -5931,10 +5941,10 @@ class Ma extends w {
|
|
5931
5941
|
default:
|
5932
5942
|
we.set(0, 0, 0);
|
5933
5943
|
}
|
5934
|
-
we.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (
|
5944
|
+
we.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (xs.lookAt(re.set(0, 0, 0), we, B), this.quaternion.setFromRotationMatrix(xs)), super.updateMatrixWorld(e);
|
5935
5945
|
}
|
5936
5946
|
}
|
5937
|
-
class pe extends
|
5947
|
+
class pe extends Ds {
|
5938
5948
|
static DRAG_START = "Transform::dragStart";
|
5939
5949
|
static DRAG_END = "Transform::dragEnd";
|
5940
5950
|
static _instance;
|
@@ -5955,7 +5965,7 @@ class pe extends Ps {
|
|
5955
5965
|
let t = this.controls.get(e);
|
5956
5966
|
if (t === void 0) {
|
5957
5967
|
const i = document.querySelector(".clickable");
|
5958
|
-
t = new
|
5968
|
+
t = new Ea(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
|
5959
5969
|
this.dispatchEvent({ type: pe.DRAG_START });
|
5960
5970
|
}), t.addEventListener("mouseUp", () => {
|
5961
5971
|
this.dispatchEvent({ type: pe.DRAG_END });
|
@@ -6070,9 +6080,9 @@ class pe extends Ps {
|
|
6070
6080
|
return pe._instance || (pe._instance = new pe()), pe._instance;
|
6071
6081
|
}
|
6072
6082
|
}
|
6073
|
-
const
|
6074
|
-
class
|
6075
|
-
curve = new
|
6083
|
+
const Da = new ne(), Ci = new ae();
|
6084
|
+
class Os extends ot {
|
6085
|
+
curve = new Qi();
|
6076
6086
|
line;
|
6077
6087
|
draggable;
|
6078
6088
|
curvePos;
|
@@ -6093,7 +6103,7 @@ class Da extends ot {
|
|
6093
6103
|
group;
|
6094
6104
|
constructor(e, t) {
|
6095
6105
|
const i = new Tt(Ke(0.5, 1, Math.random()), Ke(0.5, 1, Math.random()), Ke(0.5, 1, Math.random()));
|
6096
|
-
super(), this.name = e, this.lineMaterial = new
|
6106
|
+
super(), this.name = e, this.lineMaterial = new Ri({ color: i }), this.line = new Se(new at(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new ot(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Qs(1.5), new Ge({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Xt(), this.raycaster.params.Line.threshold = 3, this.enable();
|
6097
6107
|
}
|
6098
6108
|
enable() {
|
6099
6109
|
document.addEventListener("pointerdown", this.onMouseClick);
|
@@ -6111,7 +6121,7 @@ class Da extends ot {
|
|
6111
6121
|
const e = [];
|
6112
6122
|
this.draggable.children.forEach((t) => {
|
6113
6123
|
e.push([Ot(t.position.x, 3), Ot(t.position.y, 3), Ot(t.position.z, 3)]);
|
6114
|
-
}),
|
6124
|
+
}), pr({
|
6115
6125
|
name: this.name,
|
6116
6126
|
points: e,
|
6117
6127
|
tension: this.tension,
|
@@ -6134,7 +6144,7 @@ class Da extends ot {
|
|
6134
6144
|
this.addPoint(new O(-50, 0, 0), !1), this.addPoint(new O(50, 0, 0));
|
6135
6145
|
};
|
6136
6146
|
addPoint = (e, t = !0) => {
|
6137
|
-
const i = this.draggable.children.length, n = new w(
|
6147
|
+
const i = this.draggable.children.length, n = new w(Da, this.draggedMat);
|
6138
6148
|
return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
|
6139
6149
|
};
|
6140
6150
|
addNextPt = () => {
|
@@ -6163,14 +6173,14 @@ class Da extends ot {
|
|
6163
6173
|
this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
|
6164
6174
|
};
|
6165
6175
|
updateSpline = () => {
|
6166
|
-
this.curve = new
|
6176
|
+
this.curve = new Qi(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
|
6167
6177
|
};
|
6168
6178
|
// Handlers
|
6169
6179
|
onMouseClick = (e) => {
|
6170
6180
|
if (!Me.instance)
|
6171
6181
|
return;
|
6172
6182
|
const i = Me.instance.currentWindow.current.getBoundingClientRect();
|
6173
|
-
|
6183
|
+
Ci.x = (e.clientX - i.x) / i.width * 2 - 1, Ci.y = -((e.clientY - i.y) / i.height) * 2 + 1, this.raycaster.setFromCamera(Ci, this.camera);
|
6174
6184
|
const n = this.raycaster.intersectObjects(this.draggable.children, !1);
|
6175
6185
|
if (n.length > 0) {
|
6176
6186
|
const a = n[0].object;
|
@@ -6396,13 +6406,13 @@ class Da extends ot {
|
|
6396
6406
|
e.name, e.visible = this.draggable.visible;
|
6397
6407
|
};
|
6398
6408
|
}
|
6399
|
-
let
|
6409
|
+
let Zt = 0;
|
6400
6410
|
class Ra extends ot {
|
6401
6411
|
defaultScale = 10;
|
6402
6412
|
_camera;
|
6403
6413
|
group = null;
|
6404
6414
|
constructor(e) {
|
6405
|
-
super(), this.name = "Spline Editor", this._camera = e;
|
6415
|
+
super(), this.name = "Spline Editor", this._camera = e, R.addEventListener(D.ADD_SPLINE, this.onAddSpline);
|
6406
6416
|
}
|
6407
6417
|
initDebug() {
|
6408
6418
|
this.group = q.addEditorGroup({
|
@@ -6450,11 +6460,14 @@ class Ra extends ot {
|
|
6450
6460
|
});
|
6451
6461
|
}
|
6452
6462
|
dispose() {
|
6453
|
-
q.removeEditorGroup(this.name);
|
6463
|
+
R.removeEventListener(D.ADD_SPLINE, this.onAddSpline), q.removeEditorGroup(this.name);
|
6464
|
+
}
|
6465
|
+
addSpline(e) {
|
6466
|
+
e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
|
6454
6467
|
}
|
6455
6468
|
createSpline = (e = []) => {
|
6456
|
-
const t = `Spline ${
|
6457
|
-
return i.
|
6469
|
+
const t = `Spline ${Zt + 1}`, i = new Os(t, this._camera);
|
6470
|
+
return i.addPoints(e), this.addSpline(i), Zt++, i;
|
6458
6471
|
};
|
6459
6472
|
createSplineFromArray = (e) => {
|
6460
6473
|
const t = [];
|
@@ -6472,6 +6485,14 @@ class Ra extends ot {
|
|
6472
6485
|
t.showPoints(e);
|
6473
6486
|
});
|
6474
6487
|
};
|
6488
|
+
onAddSpline = (e) => {
|
6489
|
+
const t = JSON.parse(e.value), i = `Spline ${Zt + 1}`, n = [];
|
6490
|
+
t.points.forEach((r) => {
|
6491
|
+
n.push(new O(r[0], r[1], 0));
|
6492
|
+
});
|
6493
|
+
const a = new Os(i, this.camera);
|
6494
|
+
a.addPoints(n), this.addSpline(a), Zt++;
|
6495
|
+
};
|
6475
6496
|
get camera() {
|
6476
6497
|
return this._camera;
|
6477
6498
|
}
|
@@ -6482,15 +6503,15 @@ class Ra extends ot {
|
|
6482
6503
|
});
|
6483
6504
|
}
|
6484
6505
|
}
|
6485
|
-
const
|
6506
|
+
const Ts = [
|
6486
6507
|
"Single",
|
6487
6508
|
"Side by Side",
|
6488
6509
|
"Stacked",
|
6489
6510
|
"Quad"
|
6490
6511
|
];
|
6491
|
-
class Me extends
|
6512
|
+
class Me extends Jt {
|
6492
6513
|
static instance = null;
|
6493
|
-
scene = new
|
6514
|
+
scene = new Ps();
|
6494
6515
|
renderer;
|
6495
6516
|
currentScene;
|
6496
6517
|
cameras = /* @__PURE__ */ new Map();
|
@@ -6500,17 +6521,17 @@ class Me extends Kt {
|
|
6500
6521
|
// RefObject to one of the "windows"
|
6501
6522
|
cameraHelpers = /* @__PURE__ */ new Map();
|
6502
6523
|
lightHelpers = /* @__PURE__ */ new Map();
|
6503
|
-
helpersContainer = new
|
6504
|
-
grid = new
|
6505
|
-
axisHelper = new
|
6506
|
-
interactionHelper = new
|
6524
|
+
helpersContainer = new Kn();
|
6525
|
+
grid = new ga();
|
6526
|
+
axisHelper = new qi(500);
|
6527
|
+
interactionHelper = new qi(100);
|
6507
6528
|
currentTransform;
|
6508
6529
|
// Tools
|
6509
6530
|
splineEditor;
|
6510
6531
|
// Override Materials
|
6511
|
-
depthMaterial = new
|
6512
|
-
normalsMaterial = new
|
6513
|
-
uvMaterial = new
|
6532
|
+
depthMaterial = new Jn();
|
6533
|
+
normalsMaterial = new er();
|
6534
|
+
uvMaterial = new ba();
|
6514
6535
|
wireframeMaterial = new Ge({
|
6515
6536
|
opacity: 0.33,
|
6516
6537
|
transparent: !0,
|
@@ -6534,7 +6555,7 @@ class Me extends Kt {
|
|
6534
6555
|
// Interactions
|
6535
6556
|
selectedItem = void 0;
|
6536
6557
|
debugCamera;
|
6537
|
-
raycaster = new
|
6558
|
+
raycaster = new Xt();
|
6538
6559
|
pointer = new ae();
|
6539
6560
|
cameraControls = void 0;
|
6540
6561
|
// References
|
@@ -6558,13 +6579,13 @@ class Me extends Kt {
|
|
6558
6579
|
const a = {
|
6559
6580
|
Vector2: ae,
|
6560
6581
|
Vector3: O,
|
6561
|
-
Vector4:
|
6582
|
+
Vector4: cr,
|
6562
6583
|
Quaternion: fe,
|
6563
|
-
Matrix4:
|
6564
|
-
Spherical:
|
6565
|
-
Box3:
|
6566
|
-
Sphere:
|
6567
|
-
Raycaster:
|
6584
|
+
Matrix4: Kt,
|
6585
|
+
Spherical: Si,
|
6586
|
+
Box3: hr,
|
6587
|
+
Sphere: dr,
|
6588
|
+
Raycaster: Xt
|
6568
6589
|
};
|
6569
6590
|
xe.install({ THREE: a }), this.setupScene(), this.setupTools(), Me.instance = this;
|
6570
6591
|
}
|
@@ -6710,11 +6731,11 @@ class Me extends Kt {
|
|
6710
6731
|
] }),
|
6711
6732
|
/* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
|
6712
6733
|
/* @__PURE__ */ d.jsx(
|
6713
|
-
|
6734
|
+
qt,
|
6714
6735
|
{
|
6715
6736
|
title: "View",
|
6716
|
-
index:
|
6717
|
-
options:
|
6737
|
+
index: Ts.indexOf(this.state.mode),
|
6738
|
+
options: Ts,
|
6718
6739
|
onSelect: (t) => {
|
6719
6740
|
t !== this.state.mode && (this.killControls(), this.setState({ mode: t }));
|
6720
6741
|
},
|
@@ -6729,7 +6750,7 @@ class Me extends Kt {
|
|
6729
6750
|
}
|
6730
6751
|
),
|
6731
6752
|
/* @__PURE__ */ d.jsx(
|
6732
|
-
|
6753
|
+
qt,
|
6733
6754
|
{
|
6734
6755
|
title: "Interact",
|
6735
6756
|
index: this.state.interactionMode === "Orbit" ? 0 : 1,
|
@@ -6755,7 +6776,7 @@ class Me extends Kt {
|
|
6755
6776
|
}
|
6756
6777
|
// Setup
|
6757
6778
|
setupRenderer() {
|
6758
|
-
this.renderer = new
|
6779
|
+
this.renderer = new tr({
|
6759
6780
|
canvas: this.canvasRef.current,
|
6760
6781
|
stencil: !1
|
6761
6782
|
}), this.renderer.autoClear = !1, this.renderer.shadowMap.enabled = !0, this.renderer.setPixelRatio(devicePixelRatio), this.renderer.setClearColor(0), this.props.three.renderer = this.renderer;
|
@@ -6763,10 +6784,10 @@ class Me extends Kt {
|
|
6763
6784
|
setupScene() {
|
6764
6785
|
this.scene.name = "Debug Scene", this.scene.uuid = "", this.helpersContainer.name = "helpers", this.scene.add(this.helpersContainer), this.helpersContainer.add(this.grid), this.axisHelper.name = "axisHelper", this.helpersContainer.add(this.axisHelper), this.interactionHelper.name = "interactionHelper", this.helpersContainer.add(this.interactionHelper), this.interactionHelper.visible = !1;
|
6765
6786
|
const e = (n, a) => {
|
6766
|
-
const r = new
|
6787
|
+
const r = new wi(-100, 100, 100, -100, 50, 5e3);
|
6767
6788
|
return r.name = n, r.position.copy(a), r.lookAt(0, 0, 0), this.cameras.set(n, r), r;
|
6768
6789
|
};
|
6769
|
-
e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new
|
6790
|
+
e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new hi(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
|
6770
6791
|
const t = localStorage, i = this.props.three.app.appID;
|
6771
6792
|
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"));
|
6772
6793
|
}
|
@@ -6839,7 +6860,7 @@ class Me extends Kt {
|
|
6839
6860
|
}
|
6840
6861
|
const a = i / n;
|
6841
6862
|
this.cameras.forEach((r) => {
|
6842
|
-
r instanceof
|
6863
|
+
r instanceof wi ? (r.left = i / -2, r.right = i / 2, r.top = n / 2, r.bottom = n / -2, r.name === "UI" && (r.position.x = this.width / 2, r.position.y = this.height / -2, r.position.z = 100), r.updateProjectionMatrix()) : r instanceof hi && (r.aspect = a, r.updateProjectionMatrix(), this.cameraHelpers.get(r.name)?.update());
|
6843
6864
|
});
|
6844
6865
|
};
|
6845
6866
|
sceneUpdate = (e) => {
|
@@ -6852,8 +6873,8 @@ class Me extends Kt {
|
|
6852
6873
|
};
|
6853
6874
|
addCamera = (e) => {
|
6854
6875
|
const t = e.value, i = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
|
6855
|
-
if (i !== void 0 && this.cameras.set(t.name, i), i instanceof
|
6856
|
-
const n = new
|
6876
|
+
if (i !== void 0 && this.cameras.set(t.name, i), i instanceof hi) {
|
6877
|
+
const n = new ir(i);
|
6857
6878
|
this.cameraHelpers.set(i.name, n), this.scene.add(n);
|
6858
6879
|
}
|
6859
6880
|
this.setState({ lastUpdate: Date.now() });
|
@@ -6904,7 +6925,7 @@ class Me extends Kt {
|
|
6904
6925
|
if (this.currentCamera.name === "UI")
|
6905
6926
|
return;
|
6906
6927
|
const t = this.controls.get(this.currentCamera.name);
|
6907
|
-
e.key === "0" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof w || this.selectedItem instanceof
|
6928
|
+
e.key === "0" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof w || this.selectedItem instanceof sr ? (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" ? (this.clearControls(), this.cameraControls = new xe(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" ? (this.clearControls(), this.cameraControls = new xe(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" ? (this.clearControls(), this.cameraControls = new xe(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" ? (this.clearControls(), this.cameraControls = new xe(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" && (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(hs(45), hs(45), !0), this.updateCameraControls(t));
|
6908
6929
|
} else if (this.currentTransform !== void 0)
|
6909
6930
|
switch (e.key) {
|
6910
6931
|
case "r":
|
@@ -6927,7 +6948,7 @@ class Me extends Kt {
|
|
6927
6948
|
x: this.selectedItem.rotation.x,
|
6928
6949
|
y: this.selectedItem.rotation.y,
|
6929
6950
|
z: this.selectedItem.rotation.z
|
6930
|
-
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale),
|
6951
|
+
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ti.instance.update());
|
6931
6952
|
};
|
6932
6953
|
// Utils
|
6933
6954
|
clearLightHelpers = () => {
|
@@ -6941,19 +6962,19 @@ class Me extends Kt {
|
|
6941
6962
|
let t;
|
6942
6963
|
switch (e.type) {
|
6943
6964
|
case "DirectionalLight":
|
6944
|
-
t = new
|
6965
|
+
t = new or(e, 100), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6945
6966
|
break;
|
6946
6967
|
case "HemisphereLight":
|
6947
|
-
t = new
|
6968
|
+
t = new ar(e, 250), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6948
6969
|
break;
|
6949
6970
|
case "RectAreaLight":
|
6950
|
-
t = new
|
6971
|
+
t = new qr(e), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6951
6972
|
break;
|
6952
6973
|
case "PointLight":
|
6953
|
-
t = new
|
6974
|
+
t = new rr(e, 100), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6954
6975
|
break;
|
6955
6976
|
case "SpotLight":
|
6956
|
-
t = new
|
6977
|
+
t = new nr(e), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6957
6978
|
break;
|
6958
6979
|
}
|
6959
6980
|
}
|
@@ -6963,7 +6984,7 @@ class Me extends Kt {
|
|
6963
6984
|
const i = this.controls.get(e.name);
|
6964
6985
|
if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
|
6965
6986
|
return;
|
6966
|
-
const n = new
|
6987
|
+
const n = new Jr(e, t);
|
6967
6988
|
switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
|
6968
6989
|
case "Top":
|
6969
6990
|
case "Bottom":
|
@@ -7024,11 +7045,11 @@ class Me extends Kt {
|
|
7024
7045
|
if (this.selectedItem === void 0)
|
7025
7046
|
return;
|
7026
7047
|
cancelAnimationFrame(this.rafID), this.rafID = -1, this.cameraControls && (this.cameraControls.smoothTime = 0.1);
|
7027
|
-
const i = 0.15, n = new
|
7048
|
+
const i = 0.15, n = new lr();
|
7028
7049
|
n.start(), this.selectedItem.getWorldPosition(e.target0);
|
7029
7050
|
const a = () => {
|
7030
7051
|
const r = n.getDelta();
|
7031
|
-
this.cameraControls && this.cameraControls.update(r), t && (e.target.lerp(e.target0, i), e.object.position.lerp(e.position0, i), e.object.zoom =
|
7052
|
+
this.cameraControls && this.cameraControls.update(r), t && (e.target.lerp(e.target0, i), e.object.position.lerp(e.position0, i), e.object.zoom = xi(e.object.zoom, e.zoom0, i), e.object.updateProjectionMatrix(), e.dispatchEvent({ type: "change" })), n.getElapsedTime() >= 0.5 ? (cancelAnimationFrame(this.rafID), this.rafID = -1, this.clearControls()) : this.rafID = requestAnimationFrame(a);
|
7032
7053
|
};
|
7033
7054
|
a();
|
7034
7055
|
};
|
@@ -7080,18 +7101,18 @@ class Me extends Kt {
|
|
7080
7101
|
return this.props.three;
|
7081
7102
|
}
|
7082
7103
|
}
|
7083
|
-
class
|
7104
|
+
class ti extends Jt {
|
7084
7105
|
static instance;
|
7085
|
-
matrix = new
|
7106
|
+
matrix = new Kt();
|
7086
7107
|
position = new O();
|
7087
|
-
rotation = new
|
7108
|
+
rotation = new $s();
|
7088
7109
|
scale = new O();
|
7089
7110
|
open = !1;
|
7090
7111
|
constructor(e) {
|
7091
7112
|
super(e), this.state = {
|
7092
7113
|
lastUpdated: 0,
|
7093
7114
|
expanded: !1
|
7094
|
-
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)),
|
7115
|
+
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ti.instance = this;
|
7095
7116
|
}
|
7096
7117
|
update() {
|
7097
7118
|
if (Me.instance) {
|
@@ -7155,7 +7176,7 @@ class ei extends Kt {
|
|
7155
7176
|
}
|
7156
7177
|
};
|
7157
7178
|
}
|
7158
|
-
function
|
7179
|
+
function Ms(s) {
|
7159
7180
|
switch (s) {
|
7160
7181
|
case "color":
|
7161
7182
|
return "Color";
|
@@ -7184,7 +7205,7 @@ function Aa(s, e) {
|
|
7184
7205
|
for (const i in s.lightInfo) {
|
7185
7206
|
const n = s.lightInfo[i];
|
7186
7207
|
n !== void 0 && (n.isColor !== void 0 ? t.push({
|
7187
|
-
title:
|
7208
|
+
title: Ms(i),
|
7188
7209
|
prop: i,
|
7189
7210
|
type: "color",
|
7190
7211
|
value: n,
|
@@ -7198,7 +7219,7 @@ function Aa(s, e) {
|
|
7198
7219
|
}
|
7199
7220
|
}
|
7200
7221
|
}) : t.push({
|
7201
|
-
title:
|
7222
|
+
title: Ms(i),
|
7202
7223
|
prop: i,
|
7203
7224
|
type: typeof n,
|
7204
7225
|
value: n,
|
@@ -7290,7 +7311,7 @@ function Ia(s, e) {
|
|
7290
7311
|
}
|
7291
7312
|
return /* @__PURE__ */ d.jsx(be, { title: "Animation", items: t });
|
7292
7313
|
}
|
7293
|
-
const
|
7314
|
+
const ln = {
|
7294
7315
|
name: "",
|
7295
7316
|
uuid: "",
|
7296
7317
|
type: "",
|
@@ -7303,7 +7324,7 @@ const on = {
|
|
7303
7324
|
lightInfo: void 0,
|
7304
7325
|
children: []
|
7305
7326
|
};
|
7306
|
-
let ue = { ...
|
7327
|
+
let ue = { ...ln };
|
7307
7328
|
function La(s) {
|
7308
7329
|
const [e, t] = G(-1);
|
7309
7330
|
lt(() => {
|
@@ -7311,17 +7332,17 @@ function La(s) {
|
|
7311
7332
|
ue = { ...h.value }, t(Date.now());
|
7312
7333
|
}
|
7313
7334
|
function o() {
|
7314
|
-
ue = { ...
|
7335
|
+
ue = { ...ln }, t(Date.now());
|
7315
7336
|
}
|
7316
7337
|
return R.addEventListener(D.SET_SCENE, o), R.addEventListener(D.SET_OBJECT, r), () => {
|
7317
7338
|
R.removeEventListener(D.SET_SCENE, o), R.removeEventListener(D.SET_OBJECT, r);
|
7318
7339
|
};
|
7319
7340
|
}, []);
|
7320
7341
|
const i = ue.type.toLowerCase(), n = ue.animations.length > 0 || ue.mixer !== void 0, a = i.search("mesh") > -1 || i.search("line") > -1 || i.search("points") > -1;
|
7321
|
-
return /* @__PURE__ */ d.jsx(
|
7342
|
+
return /* @__PURE__ */ d.jsx(Qt, { label: "Inspector", children: /* @__PURE__ */ d.jsx("div", { id: "Inspector", className: s.class, children: ue.uuid.length > 0 && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7322
7343
|
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7323
7344
|
/* @__PURE__ */ d.jsx(
|
7324
|
-
|
7345
|
+
Wt,
|
7325
7346
|
{
|
7326
7347
|
type: "string",
|
7327
7348
|
title: "Name",
|
@@ -7331,7 +7352,7 @@ function La(s) {
|
|
7331
7352
|
}
|
7332
7353
|
),
|
7333
7354
|
/* @__PURE__ */ d.jsx(
|
7334
|
-
|
7355
|
+
Wt,
|
7335
7356
|
{
|
7336
7357
|
type: "string",
|
7337
7358
|
title: "Type",
|
@@ -7341,7 +7362,7 @@ function La(s) {
|
|
7341
7362
|
}
|
7342
7363
|
),
|
7343
7364
|
/* @__PURE__ */ d.jsx(
|
7344
|
-
|
7365
|
+
Wt,
|
7345
7366
|
{
|
7346
7367
|
type: "string",
|
7347
7368
|
title: "UUID",
|
@@ -7352,11 +7373,11 @@ function La(s) {
|
|
7352
7373
|
)
|
7353
7374
|
] }),
|
7354
7375
|
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7355
|
-
/* @__PURE__ */ d.jsx(
|
7376
|
+
/* @__PURE__ */ d.jsx(ti, { object: ue, three: s.three }),
|
7356
7377
|
n ? Ia(ue, s.three) : null,
|
7357
|
-
i.search("camera") > -1 ?
|
7378
|
+
i.search("camera") > -1 ? Qr(ue, s.three) : null,
|
7358
7379
|
i.search("light") > -1 ? Aa(ue, s.three) : null,
|
7359
|
-
a ?
|
7380
|
+
a ? Vr(ue, s.three) : null
|
7360
7381
|
] })
|
7361
7382
|
] }) }, e) }, "Inspector");
|
7362
7383
|
}
|
@@ -7365,7 +7386,7 @@ function ka(s) {
|
|
7365
7386
|
const c = h.value;
|
7366
7387
|
e.push(c), t.push(
|
7367
7388
|
/* @__PURE__ */ d.jsx(
|
7368
|
-
|
7389
|
+
Qt,
|
7369
7390
|
{
|
7370
7391
|
label: `Scene: ${c.name}`,
|
7371
7392
|
scene: c,
|
@@ -7373,7 +7394,7 @@ function ka(s) {
|
|
7373
7394
|
onRefresh: () => {
|
7374
7395
|
s.three.refreshScene(c.name);
|
7375
7396
|
},
|
7376
|
-
children: /* @__PURE__ */ d.jsx(
|
7397
|
+
children: /* @__PURE__ */ d.jsx(ss, { child: c, scene: c, three: s.three })
|
7377
7398
|
},
|
7378
7399
|
Math.random()
|
7379
7400
|
)
|
@@ -7383,7 +7404,7 @@ function ka(s) {
|
|
7383
7404
|
for (let u = 0; u < e.length; u++)
|
7384
7405
|
if (c.uuid === e[u].uuid) {
|
7385
7406
|
e[u] = c, t[u] = /* @__PURE__ */ d.jsx(
|
7386
|
-
|
7407
|
+
Qt,
|
7387
7408
|
{
|
7388
7409
|
label: `Scene: ${c.name}`,
|
7389
7410
|
scene: c,
|
@@ -7391,7 +7412,7 @@ function ka(s) {
|
|
7391
7412
|
onRefresh: () => {
|
7392
7413
|
s.three.refreshScene(c.name);
|
7393
7414
|
},
|
7394
|
-
children: /* @__PURE__ */ d.jsx(
|
7415
|
+
children: /* @__PURE__ */ d.jsx(ss, { child: c, scene: c, three: s.three })
|
7395
7416
|
},
|
7396
7417
|
Math.random()
|
7397
7418
|
), n(Date.now());
|
@@ -7454,7 +7475,7 @@ function $a(s) {
|
|
7454
7475
|
}
|
7455
7476
|
u.material.needsUpdate = !0;
|
7456
7477
|
};
|
7457
|
-
h.value.src.length > 0 ?
|
7478
|
+
h.value.src.length > 0 ? tn(h.value.src).then((_) => {
|
7458
7479
|
_.offset.set(h.value.offset[0], h.value.offset[1]), _.repeat.set(h.value.repeat[0], h.value.repeat[1]), m(_);
|
7459
7480
|
}) : m(null);
|
7460
7481
|
}
|
@@ -7462,7 +7483,7 @@ function $a(s) {
|
|
7462
7483
|
const { key: h, uuid: c, value: u, subitem: m } = o.value, g = e(c)?.getObjectByProperty("uuid", c);
|
7463
7484
|
if (g !== void 0)
|
7464
7485
|
try {
|
7465
|
-
m !== void 0 ?
|
7486
|
+
m !== void 0 ? br(g, m)[h](u) : g[h](u);
|
7466
7487
|
} catch (S) {
|
7467
7488
|
console.log("Error requesting method:"), console.log(S), console.log(h), console.log(u);
|
7468
7489
|
}
|
@@ -7495,47 +7516,47 @@ function Qa(s) {
|
|
7495
7516
|
] }) });
|
7496
7517
|
}
|
7497
7518
|
export {
|
7498
|
-
|
7519
|
+
Qt as Accordion,
|
7499
7520
|
Ba as Application,
|
7500
|
-
|
7501
|
-
|
7502
|
-
|
7503
|
-
|
7504
|
-
|
7505
|
-
|
7506
|
-
|
7521
|
+
Ai as BaseRemote,
|
7522
|
+
nn as ChildObject,
|
7523
|
+
ss as ContainerObject,
|
7524
|
+
Tr as Draggable,
|
7525
|
+
Or as DraggableItem,
|
7526
|
+
Mr as Dropdown,
|
7527
|
+
Pr as DropdownItem,
|
7507
7528
|
Ua as Editor,
|
7508
|
-
|
7529
|
+
Gt as ExportTexture,
|
7509
7530
|
La as Inspector,
|
7510
7531
|
Me as MultiView,
|
7511
|
-
|
7532
|
+
sn as NavButton,
|
7512
7533
|
Za as RemoteComponents,
|
7513
7534
|
Xa as RemoteController,
|
7514
|
-
|
7535
|
+
en as RemoteTheatre,
|
7515
7536
|
Va as RemoteThree,
|
7516
7537
|
$a as SceneInspector,
|
7517
7538
|
ka as SidePanel,
|
7518
7539
|
Qa as ThreeEditor,
|
7519
7540
|
D as ToolEvents,
|
7520
|
-
|
7541
|
+
$t as capitalize,
|
7521
7542
|
He as clamp,
|
7522
|
-
|
7523
|
-
|
7543
|
+
Ji as colorToHex,
|
7544
|
+
pr as copyToClipboard,
|
7524
7545
|
Wa as customizeTheatreElements,
|
7525
7546
|
R as debugDispatcher,
|
7526
7547
|
za as defaultTheatreCallback,
|
7527
7548
|
We as dispose,
|
7528
|
-
|
7549
|
+
_r as disposeMaterial,
|
7529
7550
|
Ya as disposeTexture,
|
7530
7551
|
Ha as distance,
|
7531
|
-
|
7532
|
-
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7536
|
-
|
7537
|
-
|
7552
|
+
Ti as hierarchyUUID,
|
7553
|
+
fr as isColor,
|
7554
|
+
xi as mix,
|
7555
|
+
Js as noop,
|
7556
|
+
Ki as normalize,
|
7557
|
+
mr as randomID,
|
7558
|
+
es as resetThreeObjects,
|
7538
7559
|
Ot as round,
|
7539
7560
|
Ga as theatreEditorApp,
|
7540
|
-
|
7561
|
+
Oi as totalThreeObjects
|
7541
7562
|
};
|