@tomorrowevening/hermes 0.0.108 → 0.0.110
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +11 -11
- package/dist/hermes.es.js +262 -247
- package/package.json +1 -1
- package/types/editor/tools/Transform.d.ts +23 -23
package/dist/hermes.es.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as We, BufferGeometry as
|
2
|
-
import Js, { useState as Z, useRef as ee, useEffect as
|
1
|
+
import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as We, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Rs, Texture as In, RepeatWrapping as qi, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Is, DoubleSide as Ri, 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 Vn, MinEquation as Zn, MaxEquation as Gn, ZeroFactor as Ls, OneFactor as ks, SrcColorFactor as Us, OneMinusSrcColorFactor as js, SrcAlphaFactor as Ns, OneMinusSrcAlphaFactor as Fs, DstAlphaFactor as zs, OneMinusDstAlphaFactor as Hs, DstColorFactor as Ys, OneMinusDstColorFactor as Bs, SrcAlphaSaturateFactor as Wn, ConstantColorFactor as Vs, OneMinusConstantColorFactor as Zs, ConstantAlphaFactor as Gs, OneMinusConstantAlphaFactor as Ws, Line as xe, LineBasicMaterial as Ii, Ray as Xn, Plane as Qn, MathUtils as $n, Vector3 as O, Controls as Xs, MOUSE as rt, TOUCH as at, Quaternion as fe, Spherical as Si, Vector2 as oe, ShaderMaterial as Qs, GLSL3 as qn, PlaneGeometry as $s, Raycaster as Xt, Euler as qs, Matrix4 as Kt, Object3D as lt, CylinderGeometry as de, BoxGeometry as ae, OctahedronGeometry as kt, SphereGeometry as Ks, TorusGeometry as ut, CatmullRomCurve3 as Ki, Group as Kn, AxesHelper as Ji, MeshDepthMaterial as Jn, MeshNormalMaterial as ea, WebGLRenderer as ta, PerspectiveCamera as hi, CameraHelper as ia, SkinnedMesh as sa, SpotLightHelper as na, PointLightHelper as aa, HemisphereLightHelper as ra, DirectionalLightHelper as oa, Clock as la, Vector4 as ca, Box3 as ha, Sphere as da } from "three";
|
2
|
+
import Js, { useState as Z, useRef as ee, useEffect as ct, useMemo as Ot, Component as Jt, createRef as Ie, forwardRef as ua } from "react";
|
3
3
|
import { Reorder as en } from "framer-motion";
|
4
4
|
const tn = () => {
|
5
|
-
},
|
5
|
+
}, Vr = () => {
|
6
6
|
};
|
7
7
|
function Qt(i) {
|
8
8
|
return i.substring(0, 1).toUpperCase() + i.substring(1);
|
@@ -20,7 +20,7 @@ function es(i, e, t) {
|
|
20
20
|
function xi(i, e, t) {
|
21
21
|
return i * (1 - t) + e * t;
|
22
22
|
}
|
23
|
-
function
|
23
|
+
function Zr(i, e) {
|
24
24
|
const t = i - e;
|
25
25
|
return Math.sqrt(t * t);
|
26
26
|
}
|
@@ -59,7 +59,7 @@ const is = () => {
|
|
59
59
|
}
|
60
60
|
}
|
61
61
|
i.children.forEach((t) => Ti(t));
|
62
|
-
},
|
62
|
+
}, Gr = (i) => {
|
63
63
|
i?.dispose();
|
64
64
|
}, ga = (i) => {
|
65
65
|
i && (Array.isArray(i) ? i.forEach((e) => e.dispose()) : i.dispose());
|
@@ -106,7 +106,7 @@ class Zt {
|
|
106
106
|
static renderToCanvas(e) {
|
107
107
|
if (this.material === null) {
|
108
108
|
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ds(), this.material = new We();
|
109
|
-
const t = new
|
109
|
+
const t = new ot();
|
110
110
|
t.setAttribute("position", new Ze([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ze([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ze([0, 0, 2, 0, 0, 2], 2));
|
111
111
|
const s = new w(t, this.material);
|
112
112
|
this.scene.add(s);
|
@@ -120,7 +120,7 @@ class Zt {
|
|
120
120
|
return this.renderer.domElement;
|
121
121
|
}
|
122
122
|
}
|
123
|
-
class
|
123
|
+
class Wr {
|
124
124
|
components = /* @__PURE__ */ new Map();
|
125
125
|
listen;
|
126
126
|
// Protected
|
@@ -192,7 +192,7 @@ class Li {
|
|
192
192
|
handleEditor(e, t, s) {
|
193
193
|
}
|
194
194
|
}
|
195
|
-
class
|
195
|
+
class Xr extends Li {
|
196
196
|
selectDropdown(e, t) {
|
197
197
|
this.app.send({
|
198
198
|
event: "selectComponent",
|
@@ -224,7 +224,7 @@ class Qr extends Li {
|
|
224
224
|
}
|
225
225
|
}
|
226
226
|
}
|
227
|
-
function
|
227
|
+
function Qr(i, e, t) {
|
228
228
|
if (i.editor) {
|
229
229
|
t.ui.restore(), t.onSelectionChange((a) => {
|
230
230
|
a.length < 1 || a.forEach((o) => {
|
@@ -267,14 +267,31 @@ function $r(i, e, t) {
|
|
267
267
|
} else
|
268
268
|
t.ui.hide();
|
269
269
|
}
|
270
|
-
function
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
270
|
+
function $r() {
|
271
|
+
setTimeout(() => {
|
272
|
+
const i = document.getElementById("theatrejs-studio-root");
|
273
|
+
if (i === null || i.shadowRoot === null)
|
274
|
+
return;
|
275
|
+
const e = i.shadowRoot.getElementById("pointer-root");
|
276
|
+
if (e === null)
|
277
|
+
return;
|
278
|
+
const t = e.children[0];
|
279
|
+
if (t === null)
|
280
|
+
return;
|
281
|
+
const s = t.children[1];
|
282
|
+
s.style.justifyContent = "left";
|
283
|
+
try {
|
284
|
+
const n = s.children[1];
|
285
|
+
for (n.style.transform = "translateX(10px)"; n.children.length > 1; )
|
286
|
+
n.removeChild(n.children[0]);
|
287
|
+
} catch {
|
288
|
+
}
|
289
|
+
try {
|
290
|
+
const n = t.children[3];
|
291
|
+
n.style.top = "0", n.style.right = "300px";
|
292
|
+
} catch {
|
293
|
+
}
|
294
|
+
}, 1e3);
|
278
295
|
}
|
279
296
|
class qr extends Li {
|
280
297
|
project;
|
@@ -450,7 +467,7 @@ class qr extends Li {
|
|
450
467
|
this.studio?.ui.hide();
|
451
468
|
}
|
452
469
|
}
|
453
|
-
function
|
470
|
+
function _a(i) {
|
454
471
|
if (i.name === "cameras")
|
455
472
|
return "camera";
|
456
473
|
if (i.name === "interactive")
|
@@ -464,7 +481,7 @@ function va(i) {
|
|
464
481
|
const e = i.type;
|
465
482
|
return e.search("Helper") > -1 ? "icon_utils" : e.search("Camera") > -1 ? "camera" : e.search("Light") > -1 ? "light" : "obj3D";
|
466
483
|
}
|
467
|
-
function
|
484
|
+
function nt(i) {
|
468
485
|
const e = {
|
469
486
|
name: i.name,
|
470
487
|
type: i.type,
|
@@ -472,10 +489,10 @@ function at(i) {
|
|
472
489
|
children: []
|
473
490
|
};
|
474
491
|
return i.children.forEach((t) => {
|
475
|
-
e.children.push(
|
492
|
+
e.children.push(nt(t));
|
476
493
|
}), e;
|
477
494
|
}
|
478
|
-
function
|
495
|
+
function va(i) {
|
479
496
|
const e = {};
|
480
497
|
for (const t in i) {
|
481
498
|
const s = i[t].value;
|
@@ -491,7 +508,7 @@ function ya(i) {
|
|
491
508
|
}
|
492
509
|
return e;
|
493
510
|
}
|
494
|
-
function
|
511
|
+
function ya(i) {
|
495
512
|
switch (i) {
|
496
513
|
case "blendSrcAlpha":
|
497
514
|
case "blendDstAlpha":
|
@@ -503,10 +520,10 @@ function ba(i) {
|
|
503
520
|
}
|
504
521
|
return !1;
|
505
522
|
}
|
506
|
-
function
|
523
|
+
function qe(i) {
|
507
524
|
const e = {};
|
508
525
|
for (const t in i) {
|
509
|
-
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" ||
|
526
|
+
if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || ya(t))
|
510
527
|
continue;
|
511
528
|
const s = typeof i[t], n = i[t];
|
512
529
|
switch (s) {
|
@@ -520,7 +537,7 @@ function Ke(i) {
|
|
520
537
|
src: Zt.renderToBlob(n),
|
521
538
|
offset: [n.offset.x, n.offset.y],
|
522
539
|
repeat: [n.repeat.x, n.repeat.y]
|
523
|
-
} : t === "uniforms" && (e[t] =
|
540
|
+
} : t === "uniforms" && (e[t] = va(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
524
541
|
src: "",
|
525
542
|
offset: [0, 0],
|
526
543
|
repeat: [1, 1]
|
@@ -558,28 +575,28 @@ function di(i) {
|
|
558
575
|
if (Array.isArray(s.material)) {
|
559
576
|
const n = [];
|
560
577
|
s.material.forEach((r) => {
|
561
|
-
n.push(
|
578
|
+
n.push(qe(r));
|
562
579
|
}), e.material = n;
|
563
580
|
} else
|
564
|
-
e.material =
|
581
|
+
e.material = qe(s.material);
|
565
582
|
} else if (t.search("points") > -1) {
|
566
583
|
const s = i;
|
567
584
|
if (Array.isArray(s.material)) {
|
568
585
|
const n = [];
|
569
586
|
s.material.forEach((r) => {
|
570
|
-
n.push(
|
587
|
+
n.push(qe(r));
|
571
588
|
}), e.material = n;
|
572
589
|
} else
|
573
|
-
e.material =
|
590
|
+
e.material = qe(s.material);
|
574
591
|
} else if (t.search("line") > -1) {
|
575
592
|
const s = i;
|
576
593
|
if (Array.isArray(s.material)) {
|
577
594
|
const n = [];
|
578
595
|
s.material.forEach((r) => {
|
579
|
-
n.push(
|
596
|
+
n.push(qe(r));
|
580
597
|
}), e.material = n;
|
581
598
|
} else
|
582
|
-
e.material =
|
599
|
+
e.material = qe(s.material);
|
583
600
|
} else
|
584
601
|
t.search("camera") > -1 ? i.type === "PerspectiveCamera" ? e.perspectiveCameraInfo = {
|
585
602
|
fov: i.fov,
|
@@ -611,7 +628,7 @@ function di(i) {
|
|
611
628
|
});
|
612
629
|
return e;
|
613
630
|
}
|
614
|
-
function
|
631
|
+
function ba(i, e) {
|
615
632
|
const t = e.split(".");
|
616
633
|
switch (t.length) {
|
617
634
|
case 1:
|
@@ -628,7 +645,7 @@ function Ea(i, e) {
|
|
628
645
|
return i[t[0]][t[1]][t[2]][t[3]][t[4]][t[5]];
|
629
646
|
}
|
630
647
|
}
|
631
|
-
function
|
648
|
+
function Ea(i, e) {
|
632
649
|
for (const t in e)
|
633
650
|
i[t] = e[t];
|
634
651
|
}
|
@@ -673,7 +690,7 @@ function K(i, e, t) {
|
|
673
690
|
a = i[s[0]][s[1]][s[2]][s[3]][s[4]];
|
674
691
|
break;
|
675
692
|
}
|
676
|
-
a != null &&
|
693
|
+
a != null && Ea(a, t);
|
677
694
|
}
|
678
695
|
}
|
679
696
|
function sn(i) {
|
@@ -797,7 +814,7 @@ class Kr extends Li {
|
|
797
814
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
|
798
815
|
return;
|
799
816
|
is(), Ti(e);
|
800
|
-
const t =
|
817
|
+
const t = nt(e);
|
801
818
|
this.app.send({
|
802
819
|
event: "addScene",
|
803
820
|
target: "editor",
|
@@ -809,7 +826,7 @@ class Kr extends Li {
|
|
809
826
|
return;
|
810
827
|
const t = this.scenes.get(e);
|
811
828
|
if (t !== void 0) {
|
812
|
-
const s =
|
829
|
+
const s = nt(t);
|
813
830
|
this.app.send({
|
814
831
|
event: "refreshScene",
|
815
832
|
target: "app",
|
@@ -820,7 +837,7 @@ class Kr extends Li {
|
|
820
837
|
removeScene(e) {
|
821
838
|
if (e === void 0 || (this.scenes.delete(e.name), !this.app.debugEnabled))
|
822
839
|
return;
|
823
|
-
const t =
|
840
|
+
const t = nt(e);
|
824
841
|
this.app.send({
|
825
842
|
event: "removeScene",
|
826
843
|
target: "editor",
|
@@ -840,7 +857,7 @@ class Kr extends Li {
|
|
840
857
|
if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
|
841
858
|
return;
|
842
859
|
this.renderer !== void 0 && (Zt.renderer = this.renderer), is(), Ti(e);
|
843
|
-
const t =
|
860
|
+
const t = nt(e);
|
844
861
|
this.app.send({
|
845
862
|
event: "setScene",
|
846
863
|
target: "editor",
|
@@ -887,7 +904,7 @@ class Kr extends Li {
|
|
887
904
|
e.send({
|
888
905
|
event: "refreshScene",
|
889
906
|
target: "editor",
|
890
|
-
data:
|
907
|
+
data: nt(n.scenes.get(s.data.name))
|
891
908
|
});
|
892
909
|
break;
|
893
910
|
}
|
@@ -968,7 +985,7 @@ var Mi = { exports: {} }, pt = {};
|
|
968
985
|
* LICENSE file in the root directory of this source tree.
|
969
986
|
*/
|
970
987
|
var ss;
|
971
|
-
function
|
988
|
+
function Ca() {
|
972
989
|
if (ss)
|
973
990
|
return pt;
|
974
991
|
ss = 1;
|
@@ -996,7 +1013,7 @@ var mt = {};
|
|
996
1013
|
* LICENSE file in the root directory of this source tree.
|
997
1014
|
*/
|
998
1015
|
var ns;
|
999
|
-
function
|
1016
|
+
function wa() {
|
1000
1017
|
return ns || (ns = 1, process.env.NODE_ENV !== "production" && function() {
|
1001
1018
|
var i = Js, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), _ = Symbol.for("react.offscreen"), S = Symbol.iterator, T = "@@iterator";
|
1002
1019
|
function M(h) {
|
@@ -1039,7 +1056,7 @@ function Sa() {
|
|
1039
1056
|
var F = y.displayName || y.name || "";
|
1040
1057
|
return F !== "" ? C + "(" + F + ")" : C;
|
1041
1058
|
}
|
1042
|
-
function
|
1059
|
+
function Xe(h) {
|
1043
1060
|
return h.displayName || "Context";
|
1044
1061
|
}
|
1045
1062
|
function me(h) {
|
@@ -1067,10 +1084,10 @@ function Sa() {
|
|
1067
1084
|
switch (h.$$typeof) {
|
1068
1085
|
case o:
|
1069
1086
|
var y = h;
|
1070
|
-
return
|
1087
|
+
return Xe(y) + ".Consumer";
|
1071
1088
|
case a:
|
1072
1089
|
var C = h;
|
1073
|
-
return
|
1090
|
+
return Xe(C._context) + ".Provider";
|
1074
1091
|
case c:
|
1075
1092
|
return ht(h, h.render, "ForwardRef");
|
1076
1093
|
case p:
|
@@ -1236,7 +1253,7 @@ function Sa() {
|
|
1236
1253
|
} finally {
|
1237
1254
|
ni = !1, ii.current = Y, cn(), Error.prepareStackTrace = F;
|
1238
1255
|
}
|
1239
|
-
var
|
1256
|
+
var $e = h ? h.displayName || h.name : "", Qi = $e ? At($e) : "";
|
1240
1257
|
return typeof h == "function" && Dt.set(h, Qi), Qi;
|
1241
1258
|
}
|
1242
1259
|
function dn(h, y, C) {
|
@@ -1425,7 +1442,7 @@ function Sa() {
|
|
1425
1442
|
}
|
1426
1443
|
}
|
1427
1444
|
var oi = g.ReactCurrentOwner, Bi = g.ReactDebugCurrentFrame;
|
1428
|
-
function
|
1445
|
+
function Qe(h) {
|
1429
1446
|
if (h) {
|
1430
1447
|
var y = h._owner, C = Rt(h.type, h._source, y ? y.type : null);
|
1431
1448
|
Bi.setExtraStackFrame(C);
|
@@ -1483,7 +1500,7 @@ Check the top-level render call using <` + C + ">.");
|
|
1483
1500
|
return;
|
1484
1501
|
Zi[C] = !0;
|
1485
1502
|
var I = "";
|
1486
|
-
h && h._owner && h._owner !== oi.current && (I = " It was passed a child from " + me(h._owner.type) + "."),
|
1503
|
+
h && h._owner && h._owner !== oi.current && (I = " It was passed a child from " + me(h._owner.type) + "."), Qe(h), 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), Qe(null);
|
1487
1504
|
}
|
1488
1505
|
}
|
1489
1506
|
function Wi(h, y) {
|
@@ -1535,11 +1552,11 @@ Check the top-level render call using <` + C + ">.");
|
|
1535
1552
|
for (var y = Object.keys(h.props), C = 0; C < y.length; C++) {
|
1536
1553
|
var I = y[C];
|
1537
1554
|
if (I !== "children" && I !== "key") {
|
1538
|
-
|
1555
|
+
Qe(h), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), Qe(null);
|
1539
1556
|
break;
|
1540
1557
|
}
|
1541
1558
|
}
|
1542
|
-
h.ref !== null && (
|
1559
|
+
h.ref !== null && (Qe(h), v("Invalid attribute `ref` supplied to `React.Fragment`."), Qe(null));
|
1543
1560
|
}
|
1544
1561
|
}
|
1545
1562
|
function Xi(h, y, C, I, F, Y) {
|
@@ -1561,8 +1578,8 @@ Check the top-level render call using <` + C + ">.");
|
|
1561
1578
|
if (_e !== void 0)
|
1562
1579
|
if (I)
|
1563
1580
|
if (ai(_e)) {
|
1564
|
-
for (var
|
1565
|
-
Wi(_e[
|
1581
|
+
for (var $e = 0; $e < _e.length; $e++)
|
1582
|
+
Wi(_e[$e], h);
|
1566
1583
|
Object.freeze && Object.freeze(_e);
|
1567
1584
|
} else
|
1568
1585
|
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.");
|
@@ -1582,16 +1599,16 @@ Check the top-level render call using <` + C + ">.");
|
|
1582
1599
|
mt.Fragment = s, mt.jsx = Dn, mt.jsxs = Rn;
|
1583
1600
|
}()), mt;
|
1584
1601
|
}
|
1585
|
-
process.env.NODE_ENV === "production" ? Mi.exports =
|
1602
|
+
process.env.NODE_ENV === "production" ? Mi.exports = Ca() : Mi.exports = wa();
|
1586
1603
|
var d = Mi.exports;
|
1587
1604
|
function nn(i) {
|
1588
1605
|
return i.title.search("<") > -1 ? /* @__PURE__ */ d.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ d.jsx("button", { children: i.title });
|
1589
1606
|
}
|
1590
|
-
const
|
1607
|
+
const Sa = /* @__PURE__ */ d.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1591
1608
|
/* @__PURE__ */ d.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1592
1609
|
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1593
1610
|
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1594
|
-
] }),
|
1611
|
+
] }), xa = /* @__PURE__ */ d.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ d.jsx(
|
1595
1612
|
"path",
|
1596
1613
|
{
|
1597
1614
|
d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1\r
|
@@ -1599,16 +1616,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
|
|
1599
1616
|
C11,8.22,10.74,8,10.43,8z`
|
1600
1617
|
}
|
1601
1618
|
) });
|
1602
|
-
function
|
1619
|
+
function Oa(i) {
|
1603
1620
|
return /* @__PURE__ */ d.jsx(en.Item, { value: i.title, children: /* @__PURE__ */ d.jsxs("div", { children: [
|
1604
|
-
|
1621
|
+
xa,
|
1605
1622
|
/* @__PURE__ */ d.jsx("span", { children: i.title }),
|
1606
1623
|
/* @__PURE__ */ d.jsx("button", { className: "closeIcon", onClick: () => {
|
1607
1624
|
i.onDelete(i.index);
|
1608
|
-
}, children:
|
1625
|
+
}, children: Sa })
|
1609
1626
|
] }) }, i.title);
|
1610
1627
|
}
|
1611
|
-
function
|
1628
|
+
function Ta(i) {
|
1612
1629
|
const [e, t] = Z(!1), [s, n] = Z(i.options), r = (l) => {
|
1613
1630
|
i.onDragComplete(l), n(l);
|
1614
1631
|
}, a = (l) => {
|
@@ -1616,7 +1633,7 @@ function Ma(i) {
|
|
1616
1633
|
u.splice(l, 1), r(u);
|
1617
1634
|
}, o = [];
|
1618
1635
|
s.forEach((l, u) => {
|
1619
|
-
o.push(/* @__PURE__ */ d.jsx(
|
1636
|
+
o.push(/* @__PURE__ */ d.jsx(Oa, { index: u, title: l, onDelete: a }, l));
|
1620
1637
|
});
|
1621
1638
|
let c = "dropdown draggable";
|
1622
1639
|
return i.subdropdown && (c += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
|
@@ -1624,10 +1641,10 @@ function Ma(i) {
|
|
1624
1641
|
/* @__PURE__ */ d.jsx(en.Group, { axis: "y", values: s, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: o })
|
1625
1642
|
] });
|
1626
1643
|
}
|
1627
|
-
function
|
1644
|
+
function Ma(i) {
|
1628
1645
|
const [e, t] = Z(!1), s = [];
|
1629
1646
|
i.options.map((r, a) => {
|
1630
|
-
i.onSelect !== void 0 && (r.onSelect = i.onSelect), s.push(/* @__PURE__ */ d.jsx(
|
1647
|
+
i.onSelect !== void 0 && (r.onSelect = i.onSelect), s.push(/* @__PURE__ */ d.jsx(Pa, { option: r }, a));
|
1631
1648
|
});
|
1632
1649
|
let n = "dropdown";
|
1633
1650
|
return i.subdropdown && (n += " subdropdown"), /* @__PURE__ */ d.jsxs(
|
@@ -1649,13 +1666,13 @@ function Pa(i) {
|
|
1649
1666
|
}
|
1650
1667
|
);
|
1651
1668
|
}
|
1652
|
-
function
|
1669
|
+
function Pa(i) {
|
1653
1670
|
const { option: e } = i, [t, s] = Z("");
|
1654
1671
|
let n;
|
1655
1672
|
switch (e.type) {
|
1656
1673
|
case "draggable":
|
1657
1674
|
n = /* @__PURE__ */ d.jsx(
|
1658
|
-
|
1675
|
+
Ta,
|
1659
1676
|
{
|
1660
1677
|
title: e.title,
|
1661
1678
|
options: e.value,
|
@@ -1668,7 +1685,7 @@ function Aa(i) {
|
|
1668
1685
|
break;
|
1669
1686
|
case "dropdown":
|
1670
1687
|
n = /* @__PURE__ */ d.jsx(
|
1671
|
-
|
1688
|
+
Ma,
|
1672
1689
|
{
|
1673
1690
|
title: e.title,
|
1674
1691
|
options: e.value,
|
@@ -1751,7 +1768,7 @@ function an(i) {
|
|
1751
1768
|
const e = ee(null), [t, s] = Z(!1), n = i.child !== void 0 && i.child.children.length > 0, r = [];
|
1752
1769
|
return i.child !== void 0 && i.child.children.length > 0 && i.child.children.map((a, o) => {
|
1753
1770
|
r.push(/* @__PURE__ */ d.jsx(an, { child: a, three: i.three }, o));
|
1754
|
-
}),
|
1771
|
+
}), ct(() => {
|
1755
1772
|
if (i.child) {
|
1756
1773
|
const a = i.three.getScene(i.child.uuid);
|
1757
1774
|
if (a !== null) {
|
@@ -1805,7 +1822,7 @@ function an(i) {
|
|
1805
1822
|
}
|
1806
1823
|
}
|
1807
1824
|
),
|
1808
|
-
/* @__PURE__ */ d.jsx("div", { className: `icon ${
|
1825
|
+
/* @__PURE__ */ d.jsx("div", { className: `icon ${_a(i.child)}` })
|
1809
1826
|
] }),
|
1810
1827
|
/* @__PURE__ */ d.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: r }) })
|
1811
1828
|
] }, Math.random()) });
|
@@ -1816,9 +1833,9 @@ function as(i) {
|
|
1816
1833
|
e.push(/* @__PURE__ */ d.jsx(an, { child: t, scene: i.scene, three: i.three }, s));
|
1817
1834
|
}), /* @__PURE__ */ d.jsx("div", { className: `scene ${i.class !== void 0 ? i.class : ""}`, children: e });
|
1818
1835
|
}
|
1819
|
-
function
|
1836
|
+
function Aa(i) {
|
1820
1837
|
const [e, t] = Z(i.defaultValue);
|
1821
|
-
return
|
1838
|
+
return ct(() => {
|
1822
1839
|
let s = !1, n = -1, r = 0, a = i.defaultValue;
|
1823
1840
|
const o = (m) => {
|
1824
1841
|
s = !0, r = Number(i.input.current?.value), n = m.clientX, document.addEventListener("mouseup", l, !1), document.addEventListener("mousemove", c, !1), document.addEventListener("contextmenu", l, !1);
|
@@ -1842,7 +1859,7 @@ function Da(i) {
|
|
1842
1859
|
}, []), e;
|
1843
1860
|
}
|
1844
1861
|
function Ge(i) {
|
1845
|
-
const e = ee(null), t = ee(null), s =
|
1862
|
+
const e = ee(null), t = ee(null), s = Aa({
|
1846
1863
|
label: i.labelRef,
|
1847
1864
|
input: e,
|
1848
1865
|
sliderRef: t,
|
@@ -1904,7 +1921,7 @@ function Ge(i) {
|
|
1904
1921
|
] })
|
1905
1922
|
] });
|
1906
1923
|
}
|
1907
|
-
function
|
1924
|
+
function Da(i) {
|
1908
1925
|
const e = ee(null), t = ee(null), s = ee(null), n = ee(null), r = ee(null), a = ee(null), [o, c] = Z(i.value), [l, u] = Z({
|
1909
1926
|
min: Math.min(i.min, Math.min(i.value.x, i.value.y)),
|
1910
1927
|
max: Math.max(i.max, Math.max(i.value.x, i.value.y))
|
@@ -1931,7 +1948,7 @@ function Ra(i) {
|
|
1931
1948
|
const b = Number(n.current.value);
|
1932
1949
|
u({ min: l.min, max: b }), (o.x > b || o.y > b) && c({ x: Be(l.min, b, o.x), y: Be(l.min, b, o.y) });
|
1933
1950
|
}
|
1934
|
-
|
1951
|
+
ct(() => {
|
1935
1952
|
const b = es(l.min, l.max, o.x), P = es(l.min, l.max, o.y);
|
1936
1953
|
a.current.style.left = `${b * 100}%`, a.current.style.top = `${P * 100}%`;
|
1937
1954
|
}, [l, o]);
|
@@ -2002,18 +2019,18 @@ function Ra(i) {
|
|
2002
2019
|
] })
|
2003
2020
|
] });
|
2004
2021
|
}
|
2005
|
-
const
|
2006
|
-
function
|
2022
|
+
const Ra = Math.PI / 180, Ia = 180 / Math.PI;
|
2023
|
+
function Ke(i, e, t, s, n) {
|
2007
2024
|
return s + (i - e) * (n - s) / (t - e);
|
2008
2025
|
}
|
2009
|
-
function
|
2026
|
+
function Je(i, e, t) {
|
2010
2027
|
return (1 - t) * i + t * e;
|
2011
2028
|
}
|
2012
2029
|
function Pi(i) {
|
2013
|
-
return i *
|
2030
|
+
return i * Ra;
|
2014
2031
|
}
|
2015
|
-
function
|
2016
|
-
return i *
|
2032
|
+
function La(i) {
|
2033
|
+
return i * Ia;
|
2017
2034
|
}
|
2018
2035
|
function rs(i) {
|
2019
2036
|
const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, t = i.value.isEuler !== void 0, s = i.value.elements !== void 0, n = i.step !== void 0 ? i.step : 0.01, r = [];
|
@@ -2027,7 +2044,7 @@ function rs(i) {
|
|
2027
2044
|
/* @__PURE__ */ d.jsx(
|
2028
2045
|
Ge,
|
2029
2046
|
{
|
2030
|
-
value:
|
2047
|
+
value: La(a[c]),
|
2031
2048
|
type: "number",
|
2032
2049
|
prop: c,
|
2033
2050
|
step: 0.1,
|
@@ -2090,7 +2107,7 @@ function rs(i) {
|
|
2090
2107
|
}
|
2091
2108
|
return /* @__PURE__ */ d.jsx("div", { className: "grid3", children: r }, Math.random().toString());
|
2092
2109
|
}
|
2093
|
-
function
|
2110
|
+
function ka(i) {
|
2094
2111
|
const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
|
2095
2112
|
if (e) {
|
2096
2113
|
const n = Ot(() => i.value, []), r = (o, c) => {
|
@@ -2142,10 +2159,10 @@ function Ua(i) {
|
|
2142
2159
|
}
|
2143
2160
|
return /* @__PURE__ */ d.jsx("div", { className: "grid4", children: s });
|
2144
2161
|
}
|
2145
|
-
function
|
2162
|
+
function Ua(i) {
|
2146
2163
|
return !(i === "defaultAttributeValues" || i === "forceSinglePass" || i === "linecap" || i === "linejoin" || i === "linewidth" || i === "normalMapType" || i === "precision" || i === "shadowSide" || i === "uniformsGroups" || i === "uniformsNeedUpdate" || i === "userData" || i === "version" || i === "wireframeLinecap" || i === "wireframeLinejoin" || i === "wireframeLinewidth" || i.slice(0, 4) === "clip" || i.slice(0, 7) === "polygon" || i.slice(0, 7) === "stencil" || i.slice(0, 2) === "is");
|
2147
2164
|
}
|
2148
|
-
function
|
2165
|
+
function ja(i) {
|
2149
2166
|
switch (i) {
|
2150
2167
|
case "Alpha Map":
|
2151
2168
|
return "alphaMap";
|
@@ -2401,7 +2418,7 @@ function rn(i) {
|
|
2401
2418
|
const e = i.toLowerCase();
|
2402
2419
|
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";
|
2403
2420
|
}
|
2404
|
-
function
|
2421
|
+
function Na() {
|
2405
2422
|
const i = document.createElement("input");
|
2406
2423
|
return i.type = "file", new Promise((e, t) => {
|
2407
2424
|
i.addEventListener("change", function() {
|
@@ -2416,7 +2433,7 @@ function Fa() {
|
|
2416
2433
|
}), i.click();
|
2417
2434
|
});
|
2418
2435
|
}
|
2419
|
-
const
|
2436
|
+
const Fa = [
|
2420
2437
|
{
|
2421
2438
|
title: "Front",
|
2422
2439
|
value: kn
|
@@ -2429,7 +2446,7 @@ const za = [
|
|
2429
2446
|
title: "Double",
|
2430
2447
|
value: Ri
|
2431
2448
|
}
|
2432
|
-
],
|
2449
|
+
], za = [
|
2433
2450
|
{
|
2434
2451
|
title: "No Blending",
|
2435
2452
|
value: Un
|
@@ -2454,7 +2471,7 @@ const za = [
|
|
2454
2471
|
title: "Custom",
|
2455
2472
|
value: Hn
|
2456
2473
|
}
|
2457
|
-
],
|
2474
|
+
], Ha = [
|
2458
2475
|
{
|
2459
2476
|
title: "Add",
|
2460
2477
|
value: Yn
|
@@ -2475,7 +2492,7 @@ const za = [
|
|
2475
2492
|
title: "Max",
|
2476
2493
|
value: Gn
|
2477
2494
|
}
|
2478
|
-
],
|
2495
|
+
], Ya = [
|
2479
2496
|
{
|
2480
2497
|
title: "Zero",
|
2481
2498
|
value: Ls
|
@@ -2536,7 +2553,7 @@ const za = [
|
|
2536
2553
|
title: "One Minus Constant Alpha",
|
2537
2554
|
value: Ws
|
2538
2555
|
}
|
2539
|
-
],
|
2556
|
+
], Ba = [
|
2540
2557
|
{
|
2541
2558
|
title: "Zero",
|
2542
2559
|
value: Ls
|
@@ -2597,7 +2614,7 @@ const za = [
|
|
2597
2614
|
function ft(i, e) {
|
2598
2615
|
i.needsUpdate = !0, i.type = "option", i.options = e;
|
2599
2616
|
}
|
2600
|
-
function
|
2617
|
+
function Va(i, e, t, s) {
|
2601
2618
|
return {
|
2602
2619
|
type: "boolean",
|
2603
2620
|
title: ei(i),
|
@@ -2614,7 +2631,7 @@ function Za(i, e, t, s) {
|
|
2614
2631
|
}
|
2615
2632
|
};
|
2616
2633
|
}
|
2617
|
-
function
|
2634
|
+
function Za(i, e, t, s) {
|
2618
2635
|
const n = {
|
2619
2636
|
type: "number",
|
2620
2637
|
title: ei(i),
|
@@ -2635,24 +2652,24 @@ function Ga(i, e, t, s) {
|
|
2635
2652
|
};
|
2636
2653
|
switch (i) {
|
2637
2654
|
case "blending":
|
2638
|
-
ft(n,
|
2655
|
+
ft(n, za);
|
2639
2656
|
break;
|
2640
2657
|
case "blendDst":
|
2641
|
-
ft(n,
|
2658
|
+
ft(n, Ba);
|
2642
2659
|
break;
|
2643
2660
|
case "blendEquation":
|
2644
|
-
ft(n,
|
2661
|
+
ft(n, Ha);
|
2645
2662
|
break;
|
2646
2663
|
case "blendSrc":
|
2647
|
-
ft(n,
|
2664
|
+
ft(n, Ya);
|
2648
2665
|
break;
|
2649
2666
|
case "side":
|
2650
|
-
ft(n,
|
2667
|
+
ft(n, Fa);
|
2651
2668
|
break;
|
2652
2669
|
}
|
2653
2670
|
return rn(i) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
2654
2671
|
}
|
2655
|
-
function
|
2672
|
+
function Ga(i, e, t, s) {
|
2656
2673
|
const n = {
|
2657
2674
|
type: "string",
|
2658
2675
|
title: ei(i),
|
@@ -2688,13 +2705,13 @@ function Wa(i, e, t, s) {
|
|
2688
2705
|
}
|
2689
2706
|
}), n;
|
2690
2707
|
}
|
2691
|
-
function
|
2708
|
+
function Wa(i) {
|
2692
2709
|
return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
|
2693
2710
|
}
|
2694
|
-
function
|
2711
|
+
function Xa(i) {
|
2695
2712
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w === void 0;
|
2696
2713
|
}
|
2697
|
-
function
|
2714
|
+
function Qa(i) {
|
2698
2715
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
|
2699
2716
|
}
|
2700
2717
|
function Ai(i) {
|
@@ -2772,7 +2789,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2772
2789
|
items: l
|
2773
2790
|
};
|
2774
2791
|
} else {
|
2775
|
-
if (
|
2792
|
+
if (Wa(e))
|
2776
2793
|
return {
|
2777
2794
|
title: a,
|
2778
2795
|
prop: o,
|
@@ -2788,7 +2805,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2788
2805
|
}
|
2789
2806
|
}
|
2790
2807
|
};
|
2791
|
-
if (
|
2808
|
+
if (Xa(e))
|
2792
2809
|
return {
|
2793
2810
|
title: a,
|
2794
2811
|
prop: o,
|
@@ -2804,7 +2821,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2804
2821
|
}
|
2805
2822
|
}
|
2806
2823
|
};
|
2807
|
-
if (
|
2824
|
+
if (Qa(e))
|
2808
2825
|
return {
|
2809
2826
|
title: a,
|
2810
2827
|
prop: o,
|
@@ -2843,7 +2860,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2843
2860
|
value: e,
|
2844
2861
|
disabled: r,
|
2845
2862
|
onChange: (l, u) => {
|
2846
|
-
const p =
|
2863
|
+
const p = ja(i), m = n.length > 0 ? `${n}.${p}` : p;
|
2847
2864
|
s.createTexture(t.uuid, `material.${m}`, u);
|
2848
2865
|
const _ = s.getScene(t.uuid);
|
2849
2866
|
if (_ !== null) {
|
@@ -2922,15 +2939,15 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2922
2939
|
function os(i, e, t) {
|
2923
2940
|
const s = [];
|
2924
2941
|
for (const n in i) {
|
2925
|
-
if (!
|
2942
|
+
if (!Ua(n))
|
2926
2943
|
continue;
|
2927
2944
|
const r = typeof i[n], a = i[n];
|
2928
2945
|
if (r === "boolean")
|
2929
|
-
s.push(
|
2946
|
+
s.push(Va(n, a, e, t));
|
2930
2947
|
else if (r === "number")
|
2931
|
-
s.push(
|
2948
|
+
s.push(Za(n, a, e, t));
|
2932
2949
|
else if (r === "string")
|
2933
|
-
s.push(
|
2950
|
+
s.push(Ga(n, a, e, t));
|
2934
2951
|
else if (r === "object") {
|
2935
2952
|
const o = wt(n, a, e, t);
|
2936
2953
|
o !== void 0 && s.push(o);
|
@@ -2950,7 +2967,7 @@ function os(i, e, t) {
|
|
2950
2967
|
}
|
2951
2968
|
}), s;
|
2952
2969
|
}
|
2953
|
-
function
|
2970
|
+
function $a(i, e) {
|
2954
2971
|
function t() {
|
2955
2972
|
return `${e.app.appID}_material`;
|
2956
2973
|
}
|
@@ -2987,7 +3004,7 @@ function qa(i, e) {
|
|
2987
3004
|
);
|
2988
3005
|
}
|
2989
3006
|
const ls = "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==";
|
2990
|
-
function
|
3007
|
+
function qa(i) {
|
2991
3008
|
const e = i.step !== void 0 ? i.step : 0.01, t = ee(null), s = ee(null), n = ee(null), r = ee(null), a = ee(null), [o] = Z(i.value), [c, l] = Z(i.value.offset[0]), [u, p] = Z(i.value.offset[1]), [m, _] = Z(i.value.repeat[0]), [S, T] = Z(i.value.repeat[1]);
|
2992
3009
|
function M(v, E, b, P, x) {
|
2993
3010
|
if (i.onChange !== void 0) {
|
@@ -3018,7 +3035,7 @@ function Ka(i) {
|
|
3018
3035
|
}
|
3019
3036
|
return /* @__PURE__ */ d.jsxs("div", { className: "imageField", children: [
|
3020
3037
|
/* @__PURE__ */ d.jsx("img", { alt: i.title, ref: t, onClick: () => {
|
3021
|
-
|
3038
|
+
Na().then((v) => {
|
3022
3039
|
t.current.src = v, M(v, c, u, m, S);
|
3023
3040
|
});
|
3024
3041
|
}, src: o.src.length > 0 ? o.src : ls }),
|
@@ -3167,15 +3184,15 @@ function Gt(i) {
|
|
3167
3184
|
children: i.title
|
3168
3185
|
}
|
3169
3186
|
),
|
3170
|
-
i.type === "image" && /* @__PURE__ */ d.jsx(
|
3187
|
+
i.type === "image" && /* @__PURE__ */ d.jsx(qa, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
|
3171
3188
|
i.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, u) => /* @__PURE__ */ d.jsx("option", { value: l.value, children: Qt(l.title) }, u)) }) }),
|
3172
|
-
i.type === "vector2" && /* @__PURE__ */ d.jsx(
|
3189
|
+
i.type === "vector2" && /* @__PURE__ */ d.jsx(Da, { step: i.step, value: t, min: 0, max: 1, onChange: r }),
|
3173
3190
|
i.type === "grid3" && /* @__PURE__ */ d.jsx(rs, { step: i.step, value: t, onChange: r }),
|
3174
|
-
i.type === "grid4" && /* @__PURE__ */ d.jsx(
|
3191
|
+
i.type === "grid4" && /* @__PURE__ */ d.jsx(ka, { step: i.step, value: t, onChange: r }),
|
3175
3192
|
i.type === "euler" && /* @__PURE__ */ d.jsx(rs, { step: i.step, value: t, onChange: r })
|
3176
3193
|
] });
|
3177
3194
|
}
|
3178
|
-
function
|
3195
|
+
function Ka(i) {
|
3179
3196
|
return "items" in i;
|
3180
3197
|
}
|
3181
3198
|
class Ee extends Jt {
|
@@ -3230,7 +3247,7 @@ class Ee extends Jt {
|
|
3230
3247
|
render() {
|
3231
3248
|
const e = [];
|
3232
3249
|
return this.props.items.forEach((t) => {
|
3233
|
-
if (
|
3250
|
+
if (Ka(t))
|
3234
3251
|
e.push(
|
3235
3252
|
/* @__PURE__ */ d.jsx(Ee, { title: Qt(t.title), items: t.items }, Math.random())
|
3236
3253
|
);
|
@@ -3393,7 +3410,7 @@ function cs(i) {
|
|
3393
3410
|
}
|
3394
3411
|
return i;
|
3395
3412
|
}
|
3396
|
-
function
|
3413
|
+
function Ja(i, e) {
|
3397
3414
|
function t() {
|
3398
3415
|
return `${e.app.appID}_camera`;
|
3399
3416
|
}
|
@@ -3448,13 +3465,13 @@ function er(i, e) {
|
|
3448
3465
|
}
|
3449
3466
|
);
|
3450
3467
|
}
|
3451
|
-
class
|
3468
|
+
class er extends xe {
|
3452
3469
|
constructor(e, t) {
|
3453
|
-
const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new
|
3470
|
+
const s = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new ot();
|
3454
3471
|
n.setAttribute("position", new Ze(s, 3)), n.computeBoundingSphere();
|
3455
3472
|
const r = new Ii({ fog: !1 });
|
3456
3473
|
super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
|
3457
|
-
const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new
|
3474
|
+
const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new ot();
|
3458
3475
|
o.setAttribute("position", new Ze(a, 3)), o.computeBoundingSphere(), this.add(new w(o, new We({ side: Is, fog: !1 })));
|
3459
3476
|
}
|
3460
3477
|
updateMatrixWorld() {
|
@@ -3471,7 +3488,7 @@ class tr extends xe {
|
|
3471
3488
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3472
3489
|
}
|
3473
3490
|
}
|
3474
|
-
const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, Ut = new Xn(), ds = new Qn(),
|
3491
|
+
const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, Ut = new Xn(), ds = new Qn(), tr = Math.cos(70 * $n.DEG2RAD), ie = new O(), ue = 2 * Math.PI, H = {
|
3475
3492
|
NONE: -1,
|
3476
3493
|
ROTATE: 0,
|
3477
3494
|
DOLLY: 1,
|
@@ -3481,9 +3498,9 @@ const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, Ut
|
|
3481
3498
|
TOUCH_DOLLY_PAN: 5,
|
3482
3499
|
TOUCH_DOLLY_ROTATE: 6
|
3483
3500
|
}, ui = 1e-6;
|
3484
|
-
class
|
3501
|
+
class ir extends Xs {
|
3485
3502
|
constructor(e, t = null) {
|
3486
|
-
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:
|
3503
|
+
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: at.ROTATE, TWO: at.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 oe(), this._rotateEnd = new oe(), this._rotateDelta = new oe(), this._panStart = new oe(), this._panEnd = new oe(), this._panDelta = new oe(), this._dollyStart = new oe(), this._dollyEnd = new oe(), this._dollyDelta = new oe(), this._dollyDirection = new O(), this._mouse = new oe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = nr.bind(this), this._onPointerDown = sr.bind(this), this._onPointerUp = ar.bind(this), this._onContextMenu = ur.bind(this), this._onMouseWheel = lr.bind(this), this._onKeyDown = cr.bind(this), this._onTouchStart = hr.bind(this), this._onTouchMove = dr.bind(this), this._onMouseDown = rr.bind(this), this._onMouseMove = or.bind(this), this._interceptControlDown = pr.bind(this), this._interceptControlUp = mr.bind(this), this.domElement !== null && this.connect(), this.update();
|
3487
3504
|
}
|
3488
3505
|
connect() {
|
3489
3506
|
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";
|
@@ -3543,7 +3560,7 @@ class sr extends Xs {
|
|
3543
3560
|
l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = ie.length();
|
3544
3561
|
} else
|
3545
3562
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
3546
|
-
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).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)) <
|
3563
|
+
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).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)) < tr ? this.object.lookAt(this.target) : (ds.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(ds, this.target))));
|
3547
3564
|
} else if (this.object.isOrthographicCamera) {
|
3548
3565
|
const a = this.object.zoom;
|
3549
3566
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
@@ -3742,13 +3759,13 @@ class sr extends Xs {
|
|
3742
3759
|
return e.ctrlKey && !this._controlActive && (s.deltaY *= 10), s;
|
3743
3760
|
}
|
3744
3761
|
}
|
3745
|
-
function
|
3762
|
+
function sr(i) {
|
3746
3763
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(i) && (this._addPointer(i), i.pointerType === "touch" ? this._onTouchStart(i) : this._onMouseDown(i)));
|
3747
3764
|
}
|
3748
|
-
function
|
3765
|
+
function nr(i) {
|
3749
3766
|
this.enabled !== !1 && (i.pointerType === "touch" ? this._onTouchMove(i) : this._onMouseMove(i));
|
3750
3767
|
}
|
3751
|
-
function
|
3768
|
+
function ar(i) {
|
3752
3769
|
switch (this._removePointer(i), this._pointers.length) {
|
3753
3770
|
case 0:
|
3754
3771
|
this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(on), this.state = H.NONE;
|
@@ -3759,7 +3776,7 @@ function rr(i) {
|
|
3759
3776
|
break;
|
3760
3777
|
}
|
3761
3778
|
}
|
3762
|
-
function
|
3779
|
+
function rr(i) {
|
3763
3780
|
let e;
|
3764
3781
|
switch (i.button) {
|
3765
3782
|
case 0:
|
@@ -3775,12 +3792,12 @@ function or(i) {
|
|
3775
3792
|
e = -1;
|
3776
3793
|
}
|
3777
3794
|
switch (e) {
|
3778
|
-
case
|
3795
|
+
case rt.DOLLY:
|
3779
3796
|
if (this.enableZoom === !1)
|
3780
3797
|
return;
|
3781
3798
|
this._handleMouseDownDolly(i), this.state = H.DOLLY;
|
3782
3799
|
break;
|
3783
|
-
case
|
3800
|
+
case rt.ROTATE:
|
3784
3801
|
if (i.ctrlKey || i.metaKey || i.shiftKey) {
|
3785
3802
|
if (this.enablePan === !1)
|
3786
3803
|
return;
|
@@ -3791,7 +3808,7 @@ function or(i) {
|
|
3791
3808
|
this._handleMouseDownRotate(i), this.state = H.ROTATE;
|
3792
3809
|
}
|
3793
3810
|
break;
|
3794
|
-
case
|
3811
|
+
case rt.PAN:
|
3795
3812
|
if (i.ctrlKey || i.metaKey || i.shiftKey) {
|
3796
3813
|
if (this.enableRotate === !1)
|
3797
3814
|
return;
|
@@ -3807,7 +3824,7 @@ function or(i) {
|
|
3807
3824
|
}
|
3808
3825
|
this.state !== H.NONE && this.dispatchEvent(ki);
|
3809
3826
|
}
|
3810
|
-
function
|
3827
|
+
function or(i) {
|
3811
3828
|
switch (this.state) {
|
3812
3829
|
case H.ROTATE:
|
3813
3830
|
if (this.enableRotate === !1)
|
@@ -3826,22 +3843,22 @@ function lr(i) {
|
|
3826
3843
|
break;
|
3827
3844
|
}
|
3828
3845
|
}
|
3829
|
-
function
|
3846
|
+
function lr(i) {
|
3830
3847
|
this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (i.preventDefault(), this.dispatchEvent(ki), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(on));
|
3831
3848
|
}
|
3832
|
-
function
|
3849
|
+
function cr(i) {
|
3833
3850
|
this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(i);
|
3834
3851
|
}
|
3835
|
-
function
|
3852
|
+
function hr(i) {
|
3836
3853
|
switch (this._trackPointer(i), this._pointers.length) {
|
3837
3854
|
case 1:
|
3838
3855
|
switch (this.touches.ONE) {
|
3839
|
-
case
|
3856
|
+
case at.ROTATE:
|
3840
3857
|
if (this.enableRotate === !1)
|
3841
3858
|
return;
|
3842
3859
|
this._handleTouchStartRotate(i), this.state = H.TOUCH_ROTATE;
|
3843
3860
|
break;
|
3844
|
-
case
|
3861
|
+
case at.PAN:
|
3845
3862
|
if (this.enablePan === !1)
|
3846
3863
|
return;
|
3847
3864
|
this._handleTouchStartPan(i), this.state = H.TOUCH_PAN;
|
@@ -3852,12 +3869,12 @@ function dr(i) {
|
|
3852
3869
|
break;
|
3853
3870
|
case 2:
|
3854
3871
|
switch (this.touches.TWO) {
|
3855
|
-
case
|
3872
|
+
case at.DOLLY_PAN:
|
3856
3873
|
if (this.enableZoom === !1 && this.enablePan === !1)
|
3857
3874
|
return;
|
3858
3875
|
this._handleTouchStartDollyPan(i), this.state = H.TOUCH_DOLLY_PAN;
|
3859
3876
|
break;
|
3860
|
-
case
|
3877
|
+
case at.DOLLY_ROTATE:
|
3861
3878
|
if (this.enableZoom === !1 && this.enableRotate === !1)
|
3862
3879
|
return;
|
3863
3880
|
this._handleTouchStartDollyRotate(i), this.state = H.TOUCH_DOLLY_ROTATE;
|
@@ -3871,7 +3888,7 @@ function dr(i) {
|
|
3871
3888
|
}
|
3872
3889
|
this.state !== H.NONE && this.dispatchEvent(ki);
|
3873
3890
|
}
|
3874
|
-
function
|
3891
|
+
function dr(i) {
|
3875
3892
|
switch (this._trackPointer(i), this.state) {
|
3876
3893
|
case H.TOUCH_ROTATE:
|
3877
3894
|
if (this.enableRotate === !1)
|
@@ -3897,13 +3914,13 @@ function ur(i) {
|
|
3897
3914
|
this.state = H.NONE;
|
3898
3915
|
}
|
3899
3916
|
}
|
3900
|
-
function
|
3917
|
+
function ur(i) {
|
3901
3918
|
this.enabled !== !1 && i.preventDefault();
|
3902
3919
|
}
|
3903
|
-
function
|
3920
|
+
function pr(i) {
|
3904
3921
|
i.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
3905
3922
|
}
|
3906
|
-
function
|
3923
|
+
function mr(i) {
|
3907
3924
|
i.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
|
3908
3925
|
}
|
3909
3926
|
/*!
|
@@ -3934,7 +3951,7 @@ const W = {
|
|
3934
3951
|
TOUCH_ZOOM_TRUCK: 8192,
|
3935
3952
|
TOUCH_ZOOM_OFFSET: 16384,
|
3936
3953
|
TOUCH_ZOOM_ROTATE: 32768
|
3937
|
-
}),
|
3954
|
+
}), et = {
|
3938
3955
|
NONE: 0,
|
3939
3956
|
IN: 1,
|
3940
3957
|
OUT: -1
|
@@ -3945,7 +3962,7 @@ function Fe(i) {
|
|
3945
3962
|
function Re(i) {
|
3946
3963
|
return i.isOrthographicCamera;
|
3947
3964
|
}
|
3948
|
-
const
|
3965
|
+
const tt = Math.PI * 2, us = Math.PI / 2, ln = 1e-5, gt = Math.PI / 180;
|
3949
3966
|
function ye(i, e, t) {
|
3950
3967
|
return Math.max(e, Math.min(t, i));
|
3951
3968
|
}
|
@@ -3987,8 +4004,8 @@ function ms(i, e, t, s, n = 1 / 0, r, a) {
|
|
3987
4004
|
u = i.x - _, p = i.y - S, m = i.z - T;
|
3988
4005
|
const x = (t.x + o * _) * r, j = (t.y + o * S) * r, X = (t.z + o * T) * r;
|
3989
4006
|
t.x = (t.x - o * x) * l, t.y = (t.y - o * j) * l, t.z = (t.z - o * X) * l, a.x = u + (_ + x) * l, a.y = p + (S + j) * l, a.z = m + (T + X) * l;
|
3990
|
-
const ge = M - i.x, Ae = g - i.y, ht = v - i.z,
|
3991
|
-
return ge *
|
4007
|
+
const ge = M - i.x, Ae = g - i.y, ht = v - i.z, Xe = a.x - M, me = a.y - g, te = a.z - v;
|
4008
|
+
return ge * Xe + Ae * me + ht * te > 0 && (a.x = M, a.y = g, a.z = v, t.x = (a.x - M) / r, t.y = (a.y - g) / r, t.z = (a.z - v) / r), a;
|
3992
4009
|
}
|
3993
4010
|
function pi(i, e) {
|
3994
4011
|
e.set(0, 0), i.forEach((t) => {
|
@@ -3998,7 +4015,7 @@ function pi(i, e) {
|
|
3998
4015
|
function mi(i, e) {
|
3999
4016
|
return Re(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
4000
4017
|
}
|
4001
|
-
class
|
4018
|
+
class fr {
|
4002
4019
|
constructor() {
|
4003
4020
|
this._listeners = {};
|
4004
4021
|
}
|
@@ -4063,9 +4080,9 @@ class gr {
|
|
4063
4080
|
}
|
4064
4081
|
}
|
4065
4082
|
var fi;
|
4066
|
-
const
|
4067
|
-
let R, fs, Ft, gi, pe, L, N,
|
4068
|
-
class Oe extends
|
4083
|
+
const gr = "2.9.0", Nt = 1 / 8, _r = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
|
4084
|
+
let R, fs, Ft, gi, pe, L, N, it, yt, Ce, we, ze, gs, _s, ve, bt, st, vs, _i, ys, vi, yi, zt;
|
4085
|
+
class Oe extends fr {
|
4069
4086
|
/**
|
4070
4087
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
4071
4088
|
*
|
@@ -4107,7 +4124,7 @@ class Oe extends gr {
|
|
4107
4124
|
* @category Statics
|
4108
4125
|
*/
|
4109
4126
|
static install(e) {
|
4110
|
-
R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)), Ft = Object.freeze(new R.Vector3(0, 1, 0)), gi = Object.freeze(new R.Vector3(0, 0, 1)), pe = new R.Vector2(), L = new R.Vector3(), N = new R.Vector3(),
|
4127
|
+
R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)), Ft = Object.freeze(new R.Vector3(0, 1, 0)), gi = Object.freeze(new R.Vector3(0, 0, 1)), pe = new R.Vector2(), L = new R.Vector3(), N = new R.Vector3(), it = new R.Vector3(), yt = new R.Vector3(), Ce = new R.Vector3(), we = new R.Vector3(), ze = new R.Vector3(), gs = new R.Vector3(), _s = new R.Vector3(), ve = new R.Spherical(), bt = new R.Spherical(), st = new R.Box3(), vs = new R.Box3(), _i = new R.Sphere(), ys = new R.Quaternion(), vi = new R.Quaternion(), yi = new R.Matrix4(), zt = new R.Raycaster();
|
4111
4128
|
}
|
4112
4129
|
/**
|
4113
4130
|
* list all ACTIONs
|
@@ -4135,7 +4152,7 @@ class Oe extends gr {
|
|
4135
4152
|
*/
|
4136
4153
|
constructor(e, t) {
|
4137
4154
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
4138
|
-
}, this._enabled = !0, this._state = f.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection =
|
4155
|
+
}, this._enabled = !0, this._state = f.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = et.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new R.Vector3(), this._focalOffsetVelocity = new R.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, v, E) => {
|
4139
4156
|
let b, P;
|
4140
4157
|
if (Fe(this._camera)) {
|
4141
4158
|
const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * gt, X = x.length() * Math.tan(j * 0.5);
|
@@ -4147,7 +4164,7 @@ class Oe extends gr {
|
|
4147
4164
|
return;
|
4148
4165
|
this.verticalDragToForward ? (E ? this.setFocalOffset(this._focalOffsetEnd.x + b, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(b, 0, !0), this.forward(-P, !0)) : E ? this.setFocalOffset(this._focalOffsetEnd.x + b, this._focalOffsetEnd.y + P, this._focalOffsetEnd.z, !0) : this.truck(b, P, !0);
|
4149
4166
|
}, this._rotateInternal = (g, v) => {
|
4150
|
-
const E =
|
4167
|
+
const E = tt * this.azimuthRotateSpeed * g / this._elementRect.height, b = tt * this.polarRotateSpeed * v / this._elementRect.height;
|
4151
4168
|
this.rotate(E, b, !0);
|
4152
4169
|
}, this._dollyInternal = (g, v, E) => {
|
4153
4170
|
const b = Math.pow(0.95, -g * this.dollySpeed), P = this._sphericalEnd.radius, x = this._sphericalEnd.radius * b, j = ye(x, this.minDistance, this.maxDistance), X = j - x;
|
@@ -4250,7 +4267,7 @@ class Oe extends gr {
|
|
4250
4267
|
const x = performance.now();
|
4251
4268
|
l - x < 1e3 && this._getClientRect(this._elementRect), l = x;
|
4252
4269
|
}
|
4253
|
-
const v =
|
4270
|
+
const v = _r ? -1 : -3, E = g.deltaMode === 1 ? g.deltaY / v : g.deltaY / (v * 10), b = this.dollyToCursor ? (g.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, P = this.dollyToCursor ? (g.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
4254
4271
|
switch (this.mouseButtons.wheel) {
|
4255
4272
|
case f.ROTATE: {
|
4256
4273
|
this._rotateInternal(g.deltaX, g.deltaY), this._isUserControllingRotate = !0;
|
@@ -4584,7 +4601,7 @@ class Oe extends gr {
|
|
4584
4601
|
* @category Methods
|
4585
4602
|
*/
|
4586
4603
|
dollyTo(e, t = !1) {
|
4587
|
-
return this._isUserControllingDolly = !1, this._lastDollyDirection =
|
4604
|
+
return this._isUserControllingDolly = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0, this._dollyToNoClamp(ye(e, this.minDistance, this.maxDistance), t);
|
4588
4605
|
}
|
4589
4606
|
_dollyToNoClamp(e, t = !1) {
|
4590
4607
|
const s = this._sphericalEnd.radius;
|
@@ -4714,7 +4731,7 @@ class Oe extends gr {
|
|
4714
4731
|
* @category Methods
|
4715
4732
|
*/
|
4716
4733
|
fitToBox(e, t, { cover: s = !1, paddingLeft: n = 0, paddingRight: r = 0, paddingBottom: a = 0, paddingTop: o = 0 } = {}) {
|
4717
|
-
const c = [], l = e.isBox3 ?
|
4734
|
+
const c = [], l = e.isBox3 ? st.copy(e) : st.setFromObject(e);
|
4718
4735
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
4719
4736
|
const u = ps(this._sphericalEnd.theta, us), p = ps(this._sphericalEnd.phi, us);
|
4720
4737
|
c.push(this.rotateTo(u, p, t));
|
@@ -4761,7 +4778,7 @@ class Oe extends gr {
|
|
4761
4778
|
* @category Methods
|
4762
4779
|
*/
|
4763
4780
|
setLookAt(e, t, s, n, r, a, o = !1) {
|
4764
|
-
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection =
|
4781
|
+
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0;
|
4765
4782
|
const c = N.set(n, r, a), l = L.set(e, t, s);
|
4766
4783
|
this._targetEnd.copy(c), this._sphericalEnd.setFromVector3(l.sub(c).applyQuaternion(this._yAxisUpSpace)), this.normalizeRotations(), this._needsUpdate = !0, o || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
4767
4784
|
const u = !o || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold) && z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
@@ -4786,10 +4803,10 @@ class Oe extends gr {
|
|
4786
4803
|
* @category Methods
|
4787
4804
|
*/
|
4788
4805
|
lerpLookAt(e, t, s, n, r, a, o, c, l, u, p, m, _, S = !1) {
|
4789
|
-
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection =
|
4806
|
+
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0;
|
4790
4807
|
const T = L.set(n, r, a), M = N.set(e, t, s);
|
4791
4808
|
ve.setFromVector3(M.sub(T).applyQuaternion(this._yAxisUpSpace));
|
4792
|
-
const g =
|
4809
|
+
const g = it.set(u, p, m), v = N.set(o, c, l);
|
4793
4810
|
bt.setFromVector3(v.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(T.lerp(g, _));
|
4794
4811
|
const E = bt.theta - ve.theta, b = bt.phi - ve.phi, P = bt.radius - ve.radius;
|
4795
4812
|
this._sphericalEnd.set(ve.radius + P * _, ve.phi + b * _, ve.theta + E * _), this.normalizeRotations(), this._needsUpdate = !0, S || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
@@ -4942,7 +4959,7 @@ class Oe extends gr {
|
|
4942
4959
|
* @category Methods
|
4943
4960
|
*/
|
4944
4961
|
normalizeRotations() {
|
4945
|
-
this._sphericalEnd.theta = this._sphericalEnd.theta %
|
4962
|
+
this._sphericalEnd.theta = this._sphericalEnd.theta % tt, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += tt), this._spherical.theta += tt * Math.round((this._sphericalEnd.theta - this._spherical.theta) / tt);
|
4946
4963
|
}
|
4947
4964
|
/**
|
4948
4965
|
* stop all transitions.
|
@@ -5043,7 +5060,7 @@ class Oe extends gr {
|
|
5043
5060
|
if (Fe(this._camera) && this._changedDolly !== 0) {
|
5044
5061
|
const p = this._spherical.radius - this._lastDistance, m = this._camera, _ = this._getCameraDirection(yt), S = L.copy(_).cross(m.up).normalize();
|
5045
5062
|
S.lengthSq() === 0 && (S.x = 1);
|
5046
|
-
const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * gt * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E =
|
5063
|
+
const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * gt * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = it.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * M * m.aspect)).add(T.multiplyScalar(this._dollyControlCoord.y * M)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === et.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === et.OUT && this.maxDistance <= this._spherical.radius;
|
5047
5064
|
if (this.infinityDolly && (P || x)) {
|
5048
5065
|
this._sphericalEnd.radius -= p, this._spherical.radius -= p;
|
5049
5066
|
const X = N.copy(_).multiplyScalar(-p);
|
@@ -5053,7 +5070,7 @@ class Oe extends gr {
|
|
5053
5070
|
const j = N.subVectors(b, this._targetEnd);
|
5054
5071
|
this._targetEnd.copy(b), this._target.add(j), this._changedDolly -= p, V(this._changedDolly) && (this._changedDolly = 0);
|
5055
5072
|
} else if (Re(this._camera) && this._changedZoom !== 0) {
|
5056
|
-
const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T =
|
5073
|
+
const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T = it.copy(_).add(S.multiplyScalar(-_.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(yt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(T, g), P = b.dot(v), x = v.multiplyScalar(P - E);
|
5057
5074
|
b.sub(x), this._boundary.clampPoint(b, b);
|
5058
5075
|
const j = N.subVectors(b, this._targetEnd);
|
5059
5076
|
this._targetEnd.copy(b), this._target.add(j), this._changedZoom -= p, V(this._changedZoom) && (this._changedZoom = 0);
|
@@ -5115,7 +5132,7 @@ class Oe extends gr {
|
|
5115
5132
|
console.warn("camera-controls is already connected.");
|
5116
5133
|
return;
|
5117
5134
|
}
|
5118
|
-
e.setAttribute("data-camera-controls-version",
|
5135
|
+
e.setAttribute("data-camera-controls-version", gr), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
|
5119
5136
|
}
|
5120
5137
|
/**
|
5121
5138
|
* Detach all internal event handlers to disable drag control.
|
@@ -5151,7 +5168,7 @@ class Oe extends gr {
|
|
5151
5168
|
const n = t.lengthSq();
|
5152
5169
|
if (n === 0)
|
5153
5170
|
return e;
|
5154
|
-
const r = N.copy(t).add(e), o = this._boundary.clampPoint(r,
|
5171
|
+
const r = N.copy(t).add(e), o = this._boundary.clampPoint(r, it).sub(r), c = o.lengthSq();
|
5155
5172
|
if (c === 0)
|
5156
5173
|
return e.add(t);
|
5157
5174
|
if (c === n)
|
@@ -5182,7 +5199,7 @@ class Oe extends gr {
|
|
5182
5199
|
for (let n = 0; n < 4; n++) {
|
5183
5200
|
const r = N.copy(this._nearPlaneCorners[n]);
|
5184
5201
|
r.applyMatrix4(yi);
|
5185
|
-
const a =
|
5202
|
+
const a = it.addVectors(this._target, r);
|
5186
5203
|
zt.set(a, s), zt.far = this._spherical.radius + 1;
|
5187
5204
|
const o = zt.intersectObjects(this.colliderMeshes);
|
5188
5205
|
o.length !== 0 && o[0].distance < e && (e = o[0].distance);
|
@@ -5245,9 +5262,9 @@ class Oe extends gr {
|
|
5245
5262
|
}
|
5246
5263
|
static createBoundingSphere(e, t = new R.Sphere()) {
|
5247
5264
|
const s = t, n = s.center;
|
5248
|
-
|
5249
|
-
a.isMesh &&
|
5250
|
-
}),
|
5265
|
+
st.makeEmpty(), e.traverseVisible((a) => {
|
5266
|
+
a.isMesh && st.expandByObject(a);
|
5267
|
+
}), st.getCenter(n);
|
5251
5268
|
let r = 0;
|
5252
5269
|
return e.traverseVisible((a) => {
|
5253
5270
|
if (!a.isMesh)
|
@@ -5319,7 +5336,7 @@ const qt = (i) => {
|
|
5319
5336
|
] })
|
5320
5337
|
] });
|
5321
5338
|
});
|
5322
|
-
class
|
5339
|
+
class vr extends Qs {
|
5323
5340
|
constructor(e) {
|
5324
5341
|
super({
|
5325
5342
|
extensions: {
|
@@ -5432,10 +5449,10 @@ class yr extends Qs {
|
|
5432
5449
|
});
|
5433
5450
|
}
|
5434
5451
|
}
|
5435
|
-
class
|
5452
|
+
class yr extends w {
|
5436
5453
|
gridMaterial;
|
5437
5454
|
constructor() {
|
5438
|
-
const e = new
|
5455
|
+
const e = new vr();
|
5439
5456
|
super(new $s(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
5440
5457
|
}
|
5441
5458
|
update() {
|
@@ -5461,7 +5478,7 @@ function bs(i) {
|
|
5461
5478
|
i.name
|
5462
5479
|
);
|
5463
5480
|
}
|
5464
|
-
const
|
5481
|
+
const br = `#include <common>
|
5465
5482
|
#include <batching_pars_vertex>
|
5466
5483
|
#include <uv_pars_vertex>
|
5467
5484
|
#include <color_pars_vertex>
|
@@ -5491,7 +5508,7 @@ void main() {
|
|
5491
5508
|
#include <logdepthbuf_vertex>
|
5492
5509
|
#include <clipping_planes_vertex>
|
5493
5510
|
#include <worldpos_vertex>
|
5494
|
-
}`,
|
5511
|
+
}`, Er = `
|
5495
5512
|
#include <common>
|
5496
5513
|
#include <uv_pars_fragment>
|
5497
5514
|
#include <clipping_planes_pars_fragment>
|
@@ -5500,14 +5517,14 @@ void main() {
|
|
5500
5517
|
#include <clipping_planes_fragment>
|
5501
5518
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
5502
5519
|
}`;
|
5503
|
-
class
|
5520
|
+
class Cr extends Qs {
|
5504
5521
|
constructor() {
|
5505
5522
|
super({
|
5506
5523
|
defines: {
|
5507
5524
|
USE_UV: ""
|
5508
5525
|
},
|
5509
|
-
vertexShader:
|
5510
|
-
fragmentShader:
|
5526
|
+
vertexShader: br,
|
5527
|
+
fragmentShader: Er
|
5511
5528
|
});
|
5512
5529
|
}
|
5513
5530
|
}
|
@@ -5516,14 +5533,14 @@ const Ye = new Xt(), re = new O(), De = new O(), G = new fe(), Es = {
|
|
5516
5533
|
Y: new O(0, 1, 0),
|
5517
5534
|
Z: new O(0, 0, 1)
|
5518
5535
|
}, bi = { type: "change" }, Cs = { type: "mouseDown", mode: null }, ws = { type: "mouseUp", mode: null }, Ss = { type: "objectChange" };
|
5519
|
-
class
|
5536
|
+
class wr extends Xs {
|
5520
5537
|
constructor(e, t = null) {
|
5521
5538
|
super(void 0, t);
|
5522
|
-
const s = new
|
5539
|
+
const s = new Pr(this);
|
5523
5540
|
this._root = s;
|
5524
|
-
const n = new
|
5541
|
+
const n = new Ar();
|
5525
5542
|
this._gizmo = n, s.add(n);
|
5526
|
-
const r = new
|
5543
|
+
const r = new Dr();
|
5527
5544
|
this._plane = r, s.add(r);
|
5528
5545
|
const a = this;
|
5529
5546
|
function o(E, b) {
|
@@ -5539,7 +5556,7 @@ class Sr extends Xs {
|
|
5539
5556
|
}
|
5540
5557
|
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);
|
5541
5558
|
const c = new O(), l = new O(), u = new fe(), p = new fe(), m = new O(), _ = new fe(), S = new O(), T = new O(), M = new O(), g = 0, v = new O();
|
5542
|
-
o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", u), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", _), o("pointStart", S), o("pointEnd", T), o("rotationAxis", M), o("rotationAngle", g), 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 =
|
5559
|
+
o("worldPosition", c), o("worldPositionStart", l), o("worldQuaternion", u), o("worldQuaternionStart", p), o("cameraPosition", m), o("cameraQuaternion", _), o("pointStart", S), o("pointEnd", T), o("rotationAxis", M), o("rotationAngle", g), 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 = Sr.bind(this), this._onPointerDown = Or.bind(this), this._onPointerHover = xr.bind(this), this._onPointerMove = Tr.bind(this), this._onPointerUp = Mr.bind(this), t !== null && this.connect();
|
5543
5560
|
}
|
5544
5561
|
connect() {
|
5545
5562
|
this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
@@ -5635,7 +5652,7 @@ class Sr extends Xs {
|
|
5635
5652
|
this.space = e;
|
5636
5653
|
}
|
5637
5654
|
}
|
5638
|
-
function
|
5655
|
+
function Sr(i) {
|
5639
5656
|
if (this.domElement.ownerDocument.pointerLockElement)
|
5640
5657
|
return {
|
5641
5658
|
x: 0,
|
@@ -5651,7 +5668,7 @@ function xr(i) {
|
|
5651
5668
|
};
|
5652
5669
|
}
|
5653
5670
|
}
|
5654
|
-
function
|
5671
|
+
function xr(i) {
|
5655
5672
|
if (this.enabled)
|
5656
5673
|
switch (i.pointerType) {
|
5657
5674
|
case "mouse":
|
@@ -5660,13 +5677,13 @@ function Or(i) {
|
|
5660
5677
|
break;
|
5661
5678
|
}
|
5662
5679
|
}
|
5663
|
-
function
|
5680
|
+
function Or(i) {
|
5664
5681
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(i)), this.pointerDown(this._getPointer(i)));
|
5665
5682
|
}
|
5666
|
-
function
|
5683
|
+
function Tr(i) {
|
5667
5684
|
this.enabled && this.pointerMove(this._getPointer(i));
|
5668
5685
|
}
|
5669
|
-
function
|
5686
|
+
function Mr(i) {
|
5670
5687
|
this.enabled && (this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(i)));
|
5671
5688
|
}
|
5672
5689
|
function Ei(i, e, t) {
|
@@ -5677,7 +5694,7 @@ function Ei(i, e, t) {
|
|
5677
5694
|
return !1;
|
5678
5695
|
}
|
5679
5696
|
const Ht = new qs(), B = new O(0, 1, 0), xs = new O(0, 0, 0), Os = new Kt(), Yt = new fe(), Wt = new fe(), Se = new O(), Ts = new Kt(), St = new O(1, 0, 0), Ve = new O(0, 1, 0), xt = new O(0, 0, 1), Bt = new O(), Et = new O(), Ct = new O();
|
5680
|
-
class
|
5697
|
+
class Pr extends lt {
|
5681
5698
|
constructor(e) {
|
5682
5699
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
5683
5700
|
}
|
@@ -5687,7 +5704,7 @@ class Ar extends ct {
|
|
5687
5704
|
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);
|
5688
5705
|
}
|
5689
5706
|
}
|
5690
|
-
class
|
5707
|
+
class Ar extends lt {
|
5691
5708
|
constructor() {
|
5692
5709
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
5693
5710
|
const e = new We({
|
@@ -5728,7 +5745,7 @@ class Dr extends ct {
|
|
5728
5745
|
T.translate(0, 0.05, 0);
|
5729
5746
|
const M = new ae(0.08, 0.08, 0.08);
|
5730
5747
|
M.translate(0, 0.04, 0);
|
5731
|
-
const g = new
|
5748
|
+
const g = new ot();
|
5732
5749
|
g.setAttribute("position", new Ze([0, 0, 0, 1, 0, 0], 3));
|
5733
5750
|
const v = new de(75e-4, 75e-4, 0.5, 3);
|
5734
5751
|
v.translate(0, 0.25, 0);
|
@@ -5737,7 +5754,7 @@ class Dr extends ct {
|
|
5737
5754
|
return he.rotateY(Math.PI / 2), he.rotateX(Math.PI / 2), he;
|
5738
5755
|
}
|
5739
5756
|
function b() {
|
5740
|
-
const Q = new
|
5757
|
+
const Q = new ot();
|
5741
5758
|
return Q.setAttribute("position", new Ze([0, 0, 0, 1, 1, 1], 3)), Q;
|
5742
5759
|
}
|
5743
5760
|
const P = {
|
@@ -5876,7 +5893,7 @@ class Dr extends ct {
|
|
5876
5893
|
XYZ: [
|
5877
5894
|
[new w(new ae(0.1, 0.1, 0.1), p.clone())]
|
5878
5895
|
]
|
5879
|
-
},
|
5896
|
+
}, Xe = {
|
5880
5897
|
X: [
|
5881
5898
|
[new w(new de(0.2, 0, 0.6, 4), s), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
|
5882
5899
|
[new w(new de(0.2, 0, 0.6, 4), s), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
|
@@ -5913,7 +5930,7 @@ class Dr extends ct {
|
|
5913
5930
|
]
|
5914
5931
|
};
|
5915
5932
|
function te(Q) {
|
5916
|
-
const ke = new
|
5933
|
+
const ke = new lt();
|
5917
5934
|
for (const he in Q)
|
5918
5935
|
for (let Te = Q[he].length; Te--; ) {
|
5919
5936
|
const se = Q[he][Te][0].clone(), Ue = Q[he][Te][1], je = Q[he][Te][2], Ne = Q[he][Te][3], Mt = Q[he][Te][4];
|
@@ -5923,7 +5940,7 @@ class Dr extends ct {
|
|
5923
5940
|
}
|
5924
5941
|
return ke;
|
5925
5942
|
}
|
5926
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = te(P)), this.add(this.gizmo.rotate = te(X)), this.add(this.gizmo.scale = te(ht)), this.add(this.picker.translate = te(x)), this.add(this.picker.rotate = te(Ae)), this.add(this.picker.scale = te(
|
5943
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = te(P)), this.add(this.gizmo.rotate = te(X)), this.add(this.gizmo.scale = te(ht)), this.add(this.picker.translate = te(x)), this.add(this.picker.rotate = te(Ae)), this.add(this.picker.scale = te(Xe)), this.add(this.helper.translate = te(j)), this.add(this.helper.rotate = te(ge)), this.add(this.helper.scale = te(me)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
5927
5944
|
}
|
5928
5945
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
5929
5946
|
updateMatrixWorld(e) {
|
@@ -5946,7 +5963,7 @@ class Dr extends ct {
|
|
5946
5963
|
super.updateMatrixWorld(e);
|
5947
5964
|
}
|
5948
5965
|
}
|
5949
|
-
class
|
5966
|
+
class Dr extends w {
|
5950
5967
|
constructor() {
|
5951
5968
|
super(
|
5952
5969
|
new $s(1e5, 1e5, 2, 2),
|
@@ -6013,7 +6030,7 @@ class ce extends Rs {
|
|
6013
6030
|
let t = this.controls.get(e);
|
6014
6031
|
if (t === void 0) {
|
6015
6032
|
const s = document.querySelector(".clickable");
|
6016
|
-
t = new
|
6033
|
+
t = new wr(this.activeCamera, s), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
|
6017
6034
|
this.dispatchEvent({ type: ce.DRAG_START });
|
6018
6035
|
}), t.addEventListener("mouseUp", () => {
|
6019
6036
|
this.dispatchEvent({ type: ce.DRAG_END });
|
@@ -6059,8 +6076,8 @@ class ce extends Rs {
|
|
6059
6076
|
return ce._instance || (ce._instance = new ce()), ce._instance;
|
6060
6077
|
}
|
6061
6078
|
}
|
6062
|
-
const
|
6063
|
-
class Ms extends
|
6079
|
+
const Rr = new ae(), Ci = new oe();
|
6080
|
+
class Ms extends lt {
|
6064
6081
|
curve = new Ki();
|
6065
6082
|
line;
|
6066
6083
|
draggable;
|
@@ -6081,8 +6098,8 @@ class Ms extends ct {
|
|
6081
6098
|
parentGroup;
|
6082
6099
|
group;
|
6083
6100
|
constructor(e, t) {
|
6084
|
-
const s = new Tt(
|
6085
|
-
super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new
|
6101
|
+
const s = new Tt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
|
6102
|
+
super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Ks(1.5), new We({ color: s })), 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();
|
6086
6103
|
}
|
6087
6104
|
enable() {
|
6088
6105
|
document.addEventListener("pointerdown", this.onMouseClick);
|
@@ -6123,14 +6140,14 @@ class Ms extends ct {
|
|
6123
6140
|
this.addPoint(new O(-50, 0, 0), !1), this.addPoint(new O(50, 0, 0));
|
6124
6141
|
};
|
6125
6142
|
addPoint = (e, t = !0) => {
|
6126
|
-
const s = this.draggable.children.length, n = new w(
|
6143
|
+
const s = this.draggable.children.length, n = new w(Rr, this.draggedMat);
|
6127
6144
|
return n.name = `point_${s}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
|
6128
6145
|
};
|
6129
6146
|
addNextPt = () => {
|
6130
6147
|
const e = this.draggable.children.length, t = new O(
|
6131
|
-
|
6132
|
-
|
6133
|
-
|
6148
|
+
Je(-this.offset, this.offset, Math.random()),
|
6149
|
+
Je(-this.offset, this.offset, Math.random()),
|
6150
|
+
Je(-this.offset, this.offset, Math.random())
|
6134
6151
|
);
|
6135
6152
|
e > 0 && t.add(this.draggable.children[e - 1].position);
|
6136
6153
|
const s = this.addPoint(t);
|
@@ -6393,7 +6410,7 @@ class Ms extends ct {
|
|
6393
6410
|
};
|
6394
6411
|
}
|
6395
6412
|
let Vt = 0;
|
6396
|
-
class
|
6413
|
+
class Ir extends lt {
|
6397
6414
|
defaultScale = 10;
|
6398
6415
|
_camera;
|
6399
6416
|
group = null;
|
@@ -6494,7 +6511,7 @@ const Ps = [
|
|
6494
6511
|
"Side by Side",
|
6495
6512
|
"Stacked",
|
6496
6513
|
"Quad"
|
6497
|
-
],
|
6514
|
+
], Lr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", kr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
|
6498
6515
|
class Pe extends Jt {
|
6499
6516
|
static instance = null;
|
6500
6517
|
scene = new Ds();
|
@@ -6508,7 +6525,7 @@ class Pe extends Jt {
|
|
6508
6525
|
cameraHelpers = /* @__PURE__ */ new Map();
|
6509
6526
|
lightHelpers = /* @__PURE__ */ new Map();
|
6510
6527
|
helpersContainer = new Kn();
|
6511
|
-
grid = new
|
6528
|
+
grid = new yr();
|
6512
6529
|
axisHelper = new Ji(500);
|
6513
6530
|
interactionHelper = new Ji(100);
|
6514
6531
|
currentTransform;
|
@@ -6517,7 +6534,7 @@ class Pe extends Jt {
|
|
6517
6534
|
// Override Materials
|
6518
6535
|
depthMaterial = new Jn();
|
6519
6536
|
normalsMaterial = new ea();
|
6520
|
-
uvMaterial = new
|
6537
|
+
uvMaterial = new Cr();
|
6521
6538
|
wireframeMaterial = new We({
|
6522
6539
|
opacity: 0.33,
|
6523
6540
|
transparent: !0,
|
@@ -6767,7 +6784,7 @@ class Pe extends Jt {
|
|
6767
6784
|
bs,
|
6768
6785
|
{
|
6769
6786
|
name: "cameraHelper",
|
6770
|
-
icon:
|
6787
|
+
icon: Lr,
|
6771
6788
|
selected: this.cameraVisibility,
|
6772
6789
|
height: 24,
|
6773
6790
|
top: 2,
|
@@ -6782,7 +6799,7 @@ class Pe extends Jt {
|
|
6782
6799
|
bs,
|
6783
6800
|
{
|
6784
6801
|
name: "lightHelper",
|
6785
|
-
icon:
|
6802
|
+
icon: kr,
|
6786
6803
|
selected: this.lightVisibility,
|
6787
6804
|
height: 24,
|
6788
6805
|
top: 4,
|
@@ -6814,7 +6831,7 @@ class Pe extends Jt {
|
|
6814
6831
|
this.tlCam = this.cameras.get(t.getItem(`${s}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${s}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${s}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${s}_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"));
|
6815
6832
|
}
|
6816
6833
|
setupTools() {
|
6817
|
-
this.splineEditor = new
|
6834
|
+
this.splineEditor = new Ir(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
|
6818
6835
|
}
|
6819
6836
|
// Public
|
6820
6837
|
play() {
|
@@ -6909,11 +6926,11 @@ class Pe extends Jt {
|
|
6909
6926
|
const t = new oe();
|
6910
6927
|
this.renderer.getSize(t);
|
6911
6928
|
const s = Math.min(e.clientX, t.x), n = Math.min(e.clientY, t.y);
|
6912
|
-
this.pointer.x =
|
6929
|
+
this.pointer.x = Ke(s, 0, t.x, -1, 1), this.pointer.y = Ke(n, 0, t.y, 1, -1);
|
6913
6930
|
const r = t.x / 2, a = t.y / 2, o = () => {
|
6914
|
-
s < r ? this.pointer.x =
|
6931
|
+
s < r ? this.pointer.x = Ke(s, 0, r, -1, 1) : this.pointer.x = Ke(s, r, t.x, -1, 1);
|
6915
6932
|
}, c = () => {
|
6916
|
-
n < a ? this.pointer.y =
|
6933
|
+
n < a ? this.pointer.y = Ke(n, 0, a, 1, -1) : this.pointer.y = Ke(n, a, t.y, 1, -1);
|
6917
6934
|
};
|
6918
6935
|
switch (this.state.mode) {
|
6919
6936
|
case "Quad":
|
@@ -6993,7 +7010,7 @@ class Pe extends Jt {
|
|
6993
7010
|
t = new ra(e, 250), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6994
7011
|
break;
|
6995
7012
|
case "RectAreaLight":
|
6996
|
-
t = new
|
7013
|
+
t = new er(e), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
6997
7014
|
break;
|
6998
7015
|
case "PointLight":
|
6999
7016
|
t = new aa(e, 100), t.name = `${e.name}Helper`, t.visible = this.lightVisibility, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
|
@@ -7009,7 +7026,7 @@ class Pe extends Jt {
|
|
7009
7026
|
const s = this.controls.get(e.name);
|
7010
7027
|
if (s !== void 0 && s.dispose(), this.controls.delete(e.name), e.name === "UI")
|
7011
7028
|
return;
|
7012
|
-
const n = new
|
7029
|
+
const n = new ir(e, t);
|
7013
7030
|
switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
|
7014
7031
|
case "Top":
|
7015
7032
|
case "Bottom":
|
@@ -7244,7 +7261,7 @@ function As(i) {
|
|
7244
7261
|
}
|
7245
7262
|
return i;
|
7246
7263
|
}
|
7247
|
-
function
|
7264
|
+
function Ur(i, e) {
|
7248
7265
|
function t() {
|
7249
7266
|
return `${e.app.appID}_light`;
|
7250
7267
|
}
|
@@ -7298,7 +7315,7 @@ function jr(i, e) {
|
|
7298
7315
|
}
|
7299
7316
|
);
|
7300
7317
|
}
|
7301
|
-
function
|
7318
|
+
function jr(i, e) {
|
7302
7319
|
function t() {
|
7303
7320
|
return `${e.app.appID}_animation`;
|
7304
7321
|
}
|
@@ -7398,9 +7415,9 @@ const Di = {
|
|
7398
7415
|
children: []
|
7399
7416
|
};
|
7400
7417
|
let ne = { ...Di };
|
7401
|
-
function
|
7418
|
+
function Nr(i) {
|
7402
7419
|
const [e, t] = Z(-1);
|
7403
|
-
|
7420
|
+
ct(() => {
|
7404
7421
|
function a(c) {
|
7405
7422
|
ne = { ...c.value }, t(Date.now());
|
7406
7423
|
}
|
@@ -7454,17 +7471,17 @@ function Fr(i) {
|
|
7454
7471
|
] }),
|
7455
7472
|
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7456
7473
|
/* @__PURE__ */ d.jsx(ti, { object: ne, three: i.three }),
|
7457
|
-
n ?
|
7458
|
-
s.search("camera") > -1 ?
|
7459
|
-
s.search("light") > -1 ?
|
7460
|
-
r ?
|
7474
|
+
n ? jr(ne, i.three) : null,
|
7475
|
+
s.search("camera") > -1 ? Ja(ne, i.three) : null,
|
7476
|
+
s.search("light") > -1 ? Ur(ne, i.three) : null,
|
7477
|
+
r ? $a(ne, i.three) : null
|
7461
7478
|
] })
|
7462
7479
|
] }) }, e)
|
7463
7480
|
},
|
7464
7481
|
"Inspector"
|
7465
7482
|
);
|
7466
7483
|
}
|
7467
|
-
function
|
7484
|
+
function Fr(i) {
|
7468
7485
|
const [e] = Z([]), [t] = Z([]), [s, n] = Z(0), r = (c) => {
|
7469
7486
|
const l = c.value;
|
7470
7487
|
e.push(l), t.push(
|
@@ -7509,16 +7526,16 @@ function zr(i) {
|
|
7509
7526
|
return;
|
7510
7527
|
}
|
7511
7528
|
};
|
7512
|
-
return
|
7529
|
+
return ct(() => (D.addEventListener(A.ADD_SCENE, r), D.addEventListener(A.REFRESH_SCENE, a), D.addEventListener(A.REMOVE_SCENE, o), () => {
|
7513
7530
|
D.removeEventListener(A.ADD_SCENE, r), D.removeEventListener(A.REFRESH_SCENE, a), D.removeEventListener(A.REMOVE_SCENE, o);
|
7514
7531
|
}), []), /* @__PURE__ */ d.jsxs("div", { id: "SidePanel", children: [
|
7515
7532
|
/* @__PURE__ */ d.jsx("div", { className: "scenes", children: t }, s),
|
7516
|
-
/* @__PURE__ */ d.jsx(
|
7533
|
+
/* @__PURE__ */ d.jsx(Nr, { three: i.three }),
|
7517
7534
|
/* @__PURE__ */ d.jsx(q, { three: i.three })
|
7518
7535
|
] });
|
7519
7536
|
}
|
7520
7537
|
function eo(i) {
|
7521
|
-
return
|
7538
|
+
return ct(() => {
|
7522
7539
|
function e(o) {
|
7523
7540
|
let c = null;
|
7524
7541
|
return i.three.scenes.forEach((l) => {
|
@@ -7566,7 +7583,7 @@ function eo(i) {
|
|
7566
7583
|
const { key: c, uuid: l, value: u, subitem: p } = o.value, _ = e(l)?.getObjectByProperty("uuid", l);
|
7567
7584
|
if (_ !== void 0)
|
7568
7585
|
try {
|
7569
|
-
p !== void 0 ?
|
7586
|
+
p !== void 0 ? ba(_, p)[c](u) : _[c](u);
|
7570
7587
|
} catch (S) {
|
7571
7588
|
console.log("Error requesting method:"), console.log(S), console.log(c), console.log(u);
|
7572
7589
|
}
|
@@ -7576,7 +7593,7 @@ function eo(i) {
|
|
7576
7593
|
};
|
7577
7594
|
}, []), null;
|
7578
7595
|
}
|
7579
|
-
function
|
7596
|
+
function zr(i) {
|
7580
7597
|
return /* @__PURE__ */ d.jsxs("div", { className: "editor", ref: i.ref, style: i.style, children: [
|
7581
7598
|
/* @__PURE__ */ d.jsx("div", { className: "header", children: i.header }),
|
7582
7599
|
i.children,
|
@@ -7584,9 +7601,7 @@ function Hr(i) {
|
|
7584
7601
|
] });
|
7585
7602
|
}
|
7586
7603
|
function to(i) {
|
7587
|
-
return
|
7588
|
-
_a();
|
7589
|
-
}, []), /* @__PURE__ */ d.jsx(Hr, { children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7604
|
+
return /* @__PURE__ */ d.jsx(zr, { children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7590
7605
|
/* @__PURE__ */ d.jsx(
|
7591
7606
|
Pe,
|
7592
7607
|
{
|
@@ -7597,32 +7612,32 @@ function to(i) {
|
|
7597
7612
|
onSceneUpdate: i.onSceneUpdate
|
7598
7613
|
}
|
7599
7614
|
),
|
7600
|
-
/* @__PURE__ */ d.jsx(
|
7615
|
+
/* @__PURE__ */ d.jsx(Fr, { three: i.three })
|
7601
7616
|
] }) });
|
7602
7617
|
}
|
7603
7618
|
export {
|
7604
7619
|
$t as Accordion,
|
7605
|
-
|
7620
|
+
Wr as Application,
|
7606
7621
|
Li as BaseRemote,
|
7607
7622
|
an as ChildObject,
|
7608
7623
|
as as ContainerObject,
|
7609
|
-
|
7610
|
-
|
7611
|
-
|
7612
|
-
|
7613
|
-
|
7624
|
+
Ta as Draggable,
|
7625
|
+
Oa as DraggableItem,
|
7626
|
+
Ma as Dropdown,
|
7627
|
+
Pa as DropdownItem,
|
7628
|
+
zr as Editor,
|
7614
7629
|
Zt as ExportTexture,
|
7615
|
-
|
7630
|
+
Nr as Inspector,
|
7616
7631
|
Pe as MultiView,
|
7617
7632
|
nn as NavButton,
|
7618
|
-
|
7633
|
+
Xr as RemoteComponents,
|
7619
7634
|
Jr as RemoteController,
|
7620
7635
|
qr as RemoteTheatre,
|
7621
7636
|
Kr as RemoteThree,
|
7622
7637
|
eo as SceneInspector,
|
7623
|
-
|
7638
|
+
Fr as SidePanel,
|
7624
7639
|
Ms as Spline,
|
7625
|
-
|
7640
|
+
Ir as SplineEditor,
|
7626
7641
|
to as ThreeEditor,
|
7627
7642
|
A as ToolEvents,
|
7628
7643
|
ce as Transform,
|
@@ -7630,13 +7645,13 @@ export {
|
|
7630
7645
|
Be as clamp,
|
7631
7646
|
ts as colorToHex,
|
7632
7647
|
pa as copyToClipboard,
|
7633
|
-
|
7648
|
+
$r as customizeTheatreElements,
|
7634
7649
|
D as debugDispatcher,
|
7635
|
-
|
7650
|
+
Vr as defaultTheatreCallback,
|
7636
7651
|
Le as dispose,
|
7637
7652
|
ga as disposeMaterial,
|
7638
|
-
|
7639
|
-
|
7653
|
+
Gr as disposeTexture,
|
7654
|
+
Zr as distance,
|
7640
7655
|
Ti as hierarchyUUID,
|
7641
7656
|
fa as isColor,
|
7642
7657
|
xi as mix,
|
@@ -7645,6 +7660,6 @@ export {
|
|
7645
7660
|
ma as randomID,
|
7646
7661
|
is as resetThreeObjects,
|
7647
7662
|
be as round,
|
7648
|
-
|
7663
|
+
Qr as theatreEditorApp,
|
7649
7664
|
Oi as totalThreeObjects
|
7650
7665
|
};
|