@tomorrowevening/hermes 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hermes.js +260 -217
- package/dist/hermes.umd.cjs +13 -13
- package/package.json +1 -1
- package/src/core/Application.ts +2 -0
- package/src/core/RemoteController.ts +3 -2
- package/src/core/remote/RemoteTheatre.ts +46 -1
- package/src/core/remote/RemoteThree.ts +5 -0
- package/src/core/types.ts +2 -0
- package/types/core/Application.d.ts +1 -0
- package/types/core/remote/RemoteTheatre.d.ts +4 -1
- package/types/core/types.d.ts +1 -1
package/dist/hermes.js
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
var _n = Object.defineProperty;
|
2
2
|
var kn = (t, n, a) => n in t ? _n(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
|
3
|
-
var
|
4
|
-
import { PositionalAudio as Dn, EventDispatcher as cn, Texture as ln, CubeTexture as An, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Nn, Color as Bt, Mesh as Ln, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as
|
3
|
+
var Y = (t, n, a) => (kn(t, typeof n != "symbol" ? n + "" : n, a), a);
|
4
|
+
import { PositionalAudio as Dn, EventDispatcher as cn, Texture as ln, CubeTexture as An, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Nn, Color as Bt, Mesh as Ln, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as W, Euler as Bn, Ray as $n, Plane as Gn, MathUtils as Vn, MOUSE as He, TOUCH as Ke, Quaternion as Ht, Spherical as Kt, Vector2 as de, PerspectiveCamera as Nt, MeshDepthMaterial as zn, MeshNormalMaterial as Yn, MeshBasicMaterial as Wn, OrthographicCamera as dn, Scene as fn, Group as Hn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
|
5
5
|
import { getProject as Zn, createRafDriver as Jn } from "@theatre/core";
|
6
6
|
import st from "@theatre/studio";
|
7
7
|
import { Pane as Qn } from "tweakpane";
|
8
8
|
import * as ea from "@tweakpane/plugin-essentials";
|
9
9
|
import pn, { useState as oe, useRef as Ce, useEffect as Fe, Component as ta, forwardRef as na } from "react";
|
10
10
|
import { Reorder as mn } from "framer-motion";
|
11
|
-
function
|
11
|
+
function ui(t, n, a) {
|
12
12
|
return Math.min(n, Math.max(t, a));
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function di(t, n) {
|
15
15
|
const a = t - n;
|
16
16
|
return Math.sqrt(a * a);
|
17
17
|
}
|
@@ -41,7 +41,7 @@ const oa = () => {
|
|
41
41
|
n.length === 0 && (n = `obj_${Lt}`, Lt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
42
42
|
gn(a);
|
43
43
|
});
|
44
|
-
},
|
44
|
+
}, fi = (t) => {
|
45
45
|
t == null || t.dispose();
|
46
46
|
}, sa = (t) => {
|
47
47
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
@@ -59,13 +59,14 @@ const oa = () => {
|
|
59
59
|
t.dispose !== void 0 && t.dispose();
|
60
60
|
}
|
61
61
|
};
|
62
|
-
class
|
62
|
+
class hi {
|
63
63
|
constructor(n, a, e = "editor") {
|
64
|
-
|
65
|
-
|
64
|
+
Y(this, "channel");
|
65
|
+
Y(this, "components", /* @__PURE__ */ new Map());
|
66
|
+
Y(this, "debugEnabled");
|
66
67
|
// Protected
|
67
|
-
|
68
|
-
this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
|
68
|
+
Y(this, "_mode", "app");
|
69
|
+
this.editor = a && document.location.hash.search(e) > -1, this.debugEnabled = a, a && (this.channel = new BroadcastChannel(n));
|
69
70
|
}
|
70
71
|
addComponent(n, a) {
|
71
72
|
this.components.set(n, a);
|
@@ -116,7 +117,7 @@ const j = new cn(), _ = {
|
|
116
117
|
};
|
117
118
|
class Ot {
|
118
119
|
constructor(n) {
|
119
|
-
|
120
|
+
Y(this, "app");
|
120
121
|
this.app = n;
|
121
122
|
}
|
122
123
|
dispose() {
|
@@ -155,14 +156,14 @@ function la(t, n) {
|
|
155
156
|
}
|
156
157
|
}
|
157
158
|
const bn = () => {
|
158
|
-
},
|
159
|
+
}, qe = class qe extends Ot {
|
159
160
|
constructor() {
|
160
161
|
super(...arguments);
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
Y(this, "project");
|
163
|
+
Y(this, "sheets", /* @__PURE__ */ new Map());
|
164
|
+
Y(this, "sheetObjects", /* @__PURE__ */ new Map());
|
165
|
+
Y(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
|
166
|
+
Y(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
|
166
167
|
}
|
167
168
|
init(a, e) {
|
168
169
|
return this.project = Zn(a, e), this.project.ready;
|
@@ -179,6 +180,27 @@ const bn = () => {
|
|
179
180
|
let e = this.sheets.get(a);
|
180
181
|
return e !== void 0 || (e = (r = this.project) == null ? void 0 : r.sheet(a), this.sheets.set(a, e)), e;
|
181
182
|
}
|
183
|
+
playSheet(a, e) {
|
184
|
+
var r;
|
185
|
+
(r = this.sheet(a)) == null || r.sequence.play(e), this.app.send({
|
186
|
+
event: "playSheet",
|
187
|
+
target: "editor",
|
188
|
+
data: {
|
189
|
+
sheet: a,
|
190
|
+
value: e
|
191
|
+
}
|
192
|
+
});
|
193
|
+
}
|
194
|
+
pauseSheet(a) {
|
195
|
+
var e;
|
196
|
+
(e = this.sheet(a)) == null || e.sequence.pause(), this.app.send({
|
197
|
+
event: "pauseSheet",
|
198
|
+
target: "editor",
|
199
|
+
data: {
|
200
|
+
sheet: a
|
201
|
+
}
|
202
|
+
});
|
203
|
+
}
|
182
204
|
clearSheetObjects(a) {
|
183
205
|
this.sheetObjects.forEach((e, r) => {
|
184
206
|
r.search(`${a}_`) > -1 && this.unsubscribe(e);
|
@@ -231,14 +253,14 @@ const bn = () => {
|
|
231
253
|
l !== void 0 && (this.sheetObjects.delete(u), this.sheetObjectCBs.delete(u), this.sheetObjectUnsubscribe.delete(u), l());
|
232
254
|
}
|
233
255
|
static getRafDriver() {
|
234
|
-
return
|
256
|
+
return qe.rafDriver || (qe.rafDriver = Jn()), qe.rafDriver;
|
235
257
|
}
|
236
258
|
};
|
237
|
-
|
238
|
-
let
|
259
|
+
Y(qe, "rafDriver", null);
|
260
|
+
let Ue = qe, Me;
|
239
261
|
function ua(t, n) {
|
240
262
|
t.components.forEach((a) => {
|
241
|
-
if (a instanceof
|
263
|
+
if (a instanceof Ue) {
|
242
264
|
let e;
|
243
265
|
const r = a;
|
244
266
|
switch (n.event) {
|
@@ -262,7 +284,7 @@ function da(t) {
|
|
262
284
|
if (t.editor) {
|
263
285
|
let n;
|
264
286
|
t.components.forEach((s) => {
|
265
|
-
s instanceof
|
287
|
+
s instanceof Ue && (n = s);
|
266
288
|
}), st.ui.restore(), st.onSelectionChange((s) => {
|
267
289
|
s.length < 1 || s.forEach((u) => {
|
268
290
|
let l = u.address.sheetId, d = "setSheet", p = {};
|
@@ -285,7 +307,7 @@ function da(t) {
|
|
285
307
|
});
|
286
308
|
let a = 0;
|
287
309
|
const e = () => {
|
288
|
-
if (
|
310
|
+
if (Ue.getRafDriver().tick(performance.now()), Me !== void 0 && a !== Me.sequence.position) {
|
289
311
|
a = Me.sequence.position;
|
290
312
|
const s = Me;
|
291
313
|
t.send({
|
@@ -304,7 +326,24 @@ function da(t) {
|
|
304
326
|
} else
|
305
327
|
st.ui.hide();
|
306
328
|
}
|
307
|
-
function fa(t) {
|
329
|
+
function fa(t, n) {
|
330
|
+
t.editor && t.components.forEach((a) => {
|
331
|
+
var e, r;
|
332
|
+
if (a instanceof Ue) {
|
333
|
+
const s = a;
|
334
|
+
switch (n.event) {
|
335
|
+
case "playSheet":
|
336
|
+
(e = s.sheet(n.data.sheet)) == null || e.sequence.play(n.data.value);
|
337
|
+
break;
|
338
|
+
case "pauseSheet":
|
339
|
+
(r = s.sheet(n.data.sheet)) == null || r.sequence.pause();
|
340
|
+
break;
|
341
|
+
}
|
342
|
+
return;
|
343
|
+
}
|
344
|
+
});
|
345
|
+
}
|
346
|
+
function ha(t) {
|
308
347
|
if (t.name === "cameras")
|
309
348
|
return "camera";
|
310
349
|
if (t.name === "interactive")
|
@@ -329,7 +368,7 @@ function yn(t) {
|
|
329
368
|
n.children.push(yn(a));
|
330
369
|
}), n;
|
331
370
|
}
|
332
|
-
function
|
371
|
+
function pa(t) {
|
333
372
|
const n = {};
|
334
373
|
for (const a in t) {
|
335
374
|
const e = t[a].value;
|
@@ -337,7 +376,7 @@ function ha(t) {
|
|
337
376
|
}
|
338
377
|
return n;
|
339
378
|
}
|
340
|
-
function
|
379
|
+
function ma(t) {
|
341
380
|
switch (t) {
|
342
381
|
case "blendSrcAlpha":
|
343
382
|
case "blendDstAlpha":
|
@@ -352,7 +391,7 @@ function pa(t) {
|
|
352
391
|
function Xt(t) {
|
353
392
|
const n = {};
|
354
393
|
for (const a in t) {
|
355
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
394
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ma(a))
|
356
395
|
continue;
|
357
396
|
const e = typeof t[a], r = t[a];
|
358
397
|
switch (e) {
|
@@ -370,7 +409,7 @@ function Xt(t) {
|
|
370
409
|
} else
|
371
410
|
r instanceof An && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
|
372
411
|
else
|
373
|
-
a === "uniforms" && (n[a] =
|
412
|
+
a === "uniforms" && (n[a] = pa(n[a]));
|
374
413
|
else
|
375
414
|
n[a] = { src: "" };
|
376
415
|
break;
|
@@ -467,13 +506,13 @@ function Ft(t) {
|
|
467
506
|
}, e.onerror = a, e.src = t;
|
468
507
|
});
|
469
508
|
}
|
470
|
-
class
|
509
|
+
class ga extends Ot {
|
471
510
|
constructor() {
|
472
511
|
super(...arguments);
|
473
|
-
|
512
|
+
Y(this, "scene");
|
474
513
|
}
|
475
514
|
getObject(a) {
|
476
|
-
this.app.send({
|
515
|
+
this.app.debugEnabled && this.app.send({
|
477
516
|
event: "getObject",
|
478
517
|
target: "app",
|
479
518
|
data: a
|
@@ -521,9 +560,9 @@ class ma extends Ot {
|
|
521
560
|
});
|
522
561
|
}
|
523
562
|
setScene(a) {
|
524
|
-
if (a === void 0)
|
563
|
+
if (a === void 0 || (this.scene = a, !this.app.debugEnabled))
|
525
564
|
return;
|
526
|
-
|
565
|
+
oa(), gn(this.scene);
|
527
566
|
const e = yn(this.scene);
|
528
567
|
this.app.send({
|
529
568
|
event: "setScene",
|
@@ -532,6 +571,8 @@ class ma extends Ot {
|
|
532
571
|
});
|
533
572
|
}
|
534
573
|
addCamera(a) {
|
574
|
+
if (!this.app.debugEnabled)
|
575
|
+
return;
|
535
576
|
const e = Dt(a);
|
536
577
|
this.app.send({
|
537
578
|
event: "addCamera",
|
@@ -540,6 +581,8 @@ class ma extends Ot {
|
|
540
581
|
});
|
541
582
|
}
|
542
583
|
removeCamera(a) {
|
584
|
+
if (!this.app.debugEnabled)
|
585
|
+
return;
|
543
586
|
const e = Dt(a);
|
544
587
|
this.app.send({
|
545
588
|
event: "removeCamera",
|
@@ -548,7 +591,7 @@ class ma extends Ot {
|
|
548
591
|
});
|
549
592
|
}
|
550
593
|
}
|
551
|
-
function
|
594
|
+
function va(t, n) {
|
552
595
|
switch (n.event) {
|
553
596
|
case "getObject":
|
554
597
|
j.dispatchEvent({ type: _.GET_OBJECT, value: n.data });
|
@@ -564,7 +607,7 @@ function ga(t, n) {
|
|
564
607
|
break;
|
565
608
|
}
|
566
609
|
}
|
567
|
-
function
|
610
|
+
function ba(t, n) {
|
568
611
|
switch (n.event) {
|
569
612
|
case "setObject":
|
570
613
|
j.dispatchEvent({ type: _.SET_OBJECT, value: n.data });
|
@@ -583,12 +626,12 @@ function va(t, n) {
|
|
583
626
|
class En extends Ot {
|
584
627
|
constructor(a) {
|
585
628
|
super(a);
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
629
|
+
Y(this, "bindCBs");
|
630
|
+
Y(this, "buttonCBs");
|
631
|
+
Y(this, "pane");
|
632
|
+
Y(this, "appCallbacks", 0);
|
633
|
+
Y(this, "editorCallbacks", 0);
|
634
|
+
Y(this, "inspectorFolder");
|
592
635
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
|
593
636
|
}
|
594
637
|
createGUI() {
|
@@ -680,7 +723,7 @@ class En extends Ot {
|
|
680
723
|
this.inspectorFolder.remove(this.inspectorFolder.children[e]);
|
681
724
|
}
|
682
725
|
}
|
683
|
-
function
|
726
|
+
function ya(t, n) {
|
684
727
|
t.components.forEach((a) => {
|
685
728
|
if (a instanceof En) {
|
686
729
|
const e = a;
|
@@ -716,7 +759,7 @@ var Ut = { exports: {} }, it = {};
|
|
716
759
|
* LICENSE file in the root directory of this source tree.
|
717
760
|
*/
|
718
761
|
var qt;
|
719
|
-
function
|
762
|
+
function Ea() {
|
720
763
|
if (qt)
|
721
764
|
return it;
|
722
765
|
qt = 1;
|
@@ -744,7 +787,7 @@ var rt = {};
|
|
744
787
|
* LICENSE file in the root directory of this source tree.
|
745
788
|
*/
|
746
789
|
var Zt;
|
747
|
-
function
|
790
|
+
function wa() {
|
748
791
|
return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
|
749
792
|
var t = pn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), M = Symbol.iterator, G = "@@iterator";
|
750
793
|
function se(i) {
|
@@ -911,13 +954,13 @@ function Ea() {
|
|
911
954
|
` + Qe + i;
|
912
955
|
}
|
913
956
|
}
|
914
|
-
var
|
957
|
+
var Ge = !1, je;
|
915
958
|
{
|
916
959
|
var Pt = typeof WeakMap == "function" ? WeakMap : Map;
|
917
960
|
je = new Pt();
|
918
961
|
}
|
919
962
|
function dt(i, h) {
|
920
|
-
if (!i ||
|
963
|
+
if (!i || Ge)
|
921
964
|
return "";
|
922
965
|
{
|
923
966
|
var g = je.get(i);
|
@@ -925,7 +968,7 @@ function Ea() {
|
|
925
968
|
return g;
|
926
969
|
}
|
927
970
|
var w;
|
928
|
-
|
971
|
+
Ge = !0;
|
929
972
|
var k = Error.prepareStackTrace;
|
930
973
|
Error.prepareStackTrace = void 0;
|
931
974
|
var L;
|
@@ -966,25 +1009,25 @@ function Ea() {
|
|
966
1009
|
if (Ee && w && typeof Ee.stack == "string") {
|
967
1010
|
for (var T = Ee.stack.split(`
|
968
1011
|
`), ce = w.stack.split(`
|
969
|
-
`),
|
1012
|
+
`), H = T.length - 1, Z = ce.length - 1; H >= 1 && Z >= 0 && T[H] !== ce[Z]; )
|
970
1013
|
Z--;
|
971
|
-
for (;
|
972
|
-
if (T[
|
973
|
-
if (
|
1014
|
+
for (; H >= 1 && Z >= 0; H--, Z--)
|
1015
|
+
if (T[H] !== ce[Z]) {
|
1016
|
+
if (H !== 1 || Z !== 1)
|
974
1017
|
do
|
975
|
-
if (
|
1018
|
+
if (H--, Z--, Z < 0 || T[H] !== ce[Z]) {
|
976
1019
|
var ge = `
|
977
|
-
` + T[
|
1020
|
+
` + T[H].replace(" at new ", " at ");
|
978
1021
|
return i.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", i.displayName)), typeof i == "function" && je.set(i, ge), ge;
|
979
1022
|
}
|
980
|
-
while (
|
1023
|
+
while (H >= 1 && Z >= 0);
|
981
1024
|
break;
|
982
1025
|
}
|
983
1026
|
}
|
984
1027
|
} finally {
|
985
|
-
|
1028
|
+
Ge = !1, Je.current = L, Rt(), Error.prepareStackTrace = k;
|
986
1029
|
}
|
987
|
-
var
|
1030
|
+
var We = i ? i.displayName || i.name : "", Yt = We ? Pe(We) : "";
|
988
1031
|
return typeof i == "function" && je.set(i, Yt), Yt;
|
989
1032
|
}
|
990
1033
|
function ft(i, h, g) {
|
@@ -1023,7 +1066,7 @@ function Ea() {
|
|
1023
1066
|
}
|
1024
1067
|
return "";
|
1025
1068
|
}
|
1026
|
-
var
|
1069
|
+
var Ve = Object.prototype.hasOwnProperty, pt = {}, et = K.ReactDebugCurrentFrame;
|
1027
1070
|
function Se(i) {
|
1028
1071
|
if (i) {
|
1029
1072
|
var h = i._owner, g = _e(i.type, i._source, h ? h.type : null);
|
@@ -1033,7 +1076,7 @@ function Ea() {
|
|
1033
1076
|
}
|
1034
1077
|
function ke(i, h, g, w, k) {
|
1035
1078
|
{
|
1036
|
-
var L = Function.call.bind(
|
1079
|
+
var L = Function.call.bind(Ve);
|
1037
1080
|
for (var P in i)
|
1038
1081
|
if (L(i, P)) {
|
1039
1082
|
var T = void 0;
|
@@ -1043,8 +1086,8 @@ function Ea() {
|
|
1043
1086
|
throw ce.name = "Invariant Violation", ce;
|
1044
1087
|
}
|
1045
1088
|
T = i[P](h, P, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1046
|
-
} catch (
|
1047
|
-
T =
|
1089
|
+
} catch (H) {
|
1090
|
+
T = H;
|
1048
1091
|
}
|
1049
1092
|
T && !(T instanceof Error) && (Se(k), S("%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).", w || "React class", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in pt) && (pt[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
|
1050
1093
|
}
|
@@ -1082,7 +1125,7 @@ function Ea() {
|
|
1082
1125
|
}, bt, at, ve;
|
1083
1126
|
ve = {};
|
1084
1127
|
function o(i) {
|
1085
|
-
if (
|
1128
|
+
if (Ve.call(i, "ref")) {
|
1086
1129
|
var h = Object.getOwnPropertyDescriptor(i, "ref").get;
|
1087
1130
|
if (h && h.isReactWarning)
|
1088
1131
|
return !1;
|
@@ -1090,7 +1133,7 @@ function Ea() {
|
|
1090
1133
|
return i.ref !== void 0;
|
1091
1134
|
}
|
1092
1135
|
function y(i) {
|
1093
|
-
if (
|
1136
|
+
if (Ve.call(i, "key")) {
|
1094
1137
|
var h = Object.getOwnPropertyDescriptor(i, "key").get;
|
1095
1138
|
if (h && h.isReactWarning)
|
1096
1139
|
return !1;
|
@@ -1159,11 +1202,11 @@ function Ea() {
|
|
1159
1202
|
var L, P = {}, T = null, ce = null;
|
1160
1203
|
g !== void 0 && (vt(g), T = "" + g), y(h) && (vt(h.key), T = "" + h.key), o(h) && (ce = h.ref, D(h, k));
|
1161
1204
|
for (L in h)
|
1162
|
-
|
1205
|
+
Ve.call(h, L) && !_t.hasOwnProperty(L) && (P[L] = h[L]);
|
1163
1206
|
if (i && i.defaultProps) {
|
1164
|
-
var
|
1165
|
-
for (L in
|
1166
|
-
P[L] === void 0 && (P[L] =
|
1207
|
+
var H = i.defaultProps;
|
1208
|
+
for (L in H)
|
1209
|
+
P[L] === void 0 && (P[L] = H[L]);
|
1167
1210
|
}
|
1168
1211
|
if (T || ce) {
|
1169
1212
|
var Z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
@@ -1185,7 +1228,7 @@ function Ea() {
|
|
1185
1228
|
function pe(i) {
|
1186
1229
|
return typeof i == "object" && i !== null && i.$$typeof === n;
|
1187
1230
|
}
|
1188
|
-
function
|
1231
|
+
function ze() {
|
1189
1232
|
{
|
1190
1233
|
if (yt.current) {
|
1191
1234
|
var i = F(yt.current.type);
|
@@ -1209,9 +1252,9 @@ Check your code at ` + h + ":" + g + ".";
|
|
1209
1252
|
}
|
1210
1253
|
}
|
1211
1254
|
var Te = {};
|
1212
|
-
function
|
1255
|
+
function Ye(i) {
|
1213
1256
|
{
|
1214
|
-
var h =
|
1257
|
+
var h = ze();
|
1215
1258
|
if (!h) {
|
1216
1259
|
var g = typeof i == "string" ? i : i.displayName || i.name;
|
1217
1260
|
g && (h = `
|
@@ -1226,7 +1269,7 @@ Check the top-level render call using <` + g + ">.");
|
|
1226
1269
|
if (!i._store || i._store.validated || i.key != null)
|
1227
1270
|
return;
|
1228
1271
|
i._store.validated = !0;
|
1229
|
-
var g =
|
1272
|
+
var g = Ye(h);
|
1230
1273
|
if (Te[g])
|
1231
1274
|
return;
|
1232
1275
|
Te[g] = !0;
|
@@ -1297,9 +1340,9 @@ Check the top-level render call using <` + g + ">.");
|
|
1297
1340
|
var T = "";
|
1298
1341
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1299
1342
|
var ce = De(k);
|
1300
|
-
ce ? T += ce : T +=
|
1301
|
-
var
|
1302
|
-
i === null ?
|
1343
|
+
ce ? T += ce : T += ze();
|
1344
|
+
var H;
|
1345
|
+
i === null ? H = "null" : tt(i) ? H = "array" : i !== void 0 && i.$$typeof === n ? (H = "<" + (F(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : H = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", H, T);
|
1303
1346
|
}
|
1304
1347
|
var Z = ue(i, h, g, k, L);
|
1305
1348
|
if (Z == null)
|
@@ -1309,8 +1352,8 @@ Check the top-level render call using <` + g + ">.");
|
|
1309
1352
|
if (ge !== void 0)
|
1310
1353
|
if (w)
|
1311
1354
|
if (tt(ge)) {
|
1312
|
-
for (var
|
1313
|
-
Vt(ge[
|
1355
|
+
for (var We = 0; We < ge.length; We++)
|
1356
|
+
Vt(ge[We], i);
|
1314
1357
|
Object.freeze && Object.freeze(ge);
|
1315
1358
|
} else
|
1316
1359
|
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
@@ -1330,16 +1373,16 @@ Check the top-level render call using <` + g + ">.");
|
|
1330
1373
|
rt.Fragment = e, rt.jsx = Pn, rt.jsxs = jn;
|
1331
1374
|
}()), rt;
|
1332
1375
|
}
|
1333
|
-
process.env.NODE_ENV === "production" ? Ut.exports =
|
1376
|
+
process.env.NODE_ENV === "production" ? Ut.exports = Ea() : Ut.exports = wa();
|
1334
1377
|
var c = Ut.exports;
|
1335
1378
|
function wn(t) {
|
1336
1379
|
return t.title.search("<") > -1 ? /* @__PURE__ */ c.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ c.jsx("button", { children: t.title });
|
1337
1380
|
}
|
1338
|
-
const
|
1381
|
+
const xa = /* @__PURE__ */ c.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1339
1382
|
/* @__PURE__ */ c.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1340
1383
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1341
1384
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1342
|
-
] }),
|
1385
|
+
] }), Ca = /* @__PURE__ */ c.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ c.jsx(
|
1343
1386
|
"path",
|
1344
1387
|
{
|
1345
1388
|
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
|
@@ -1347,16 +1390,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
|
|
1347
1390
|
C11,8.22,10.74,8,10.43,8z`
|
1348
1391
|
}
|
1349
1392
|
) });
|
1350
|
-
function
|
1393
|
+
function Sa(t) {
|
1351
1394
|
return /* @__PURE__ */ c.jsx(mn.Item, { value: t.title, children: /* @__PURE__ */ c.jsxs("div", { children: [
|
1352
|
-
|
1395
|
+
Ca,
|
1353
1396
|
/* @__PURE__ */ c.jsx("span", { children: t.title }),
|
1354
1397
|
/* @__PURE__ */ c.jsx("button", { className: "closeIcon", onClick: () => {
|
1355
1398
|
t.onDelete(t.index);
|
1356
|
-
}, children:
|
1399
|
+
}, children: xa })
|
1357
1400
|
] }) }, t.title);
|
1358
1401
|
}
|
1359
|
-
function
|
1402
|
+
function Oa(t) {
|
1360
1403
|
const [n, a] = oe(!1), [e, r] = oe(t.options), s = (p) => {
|
1361
1404
|
t.onDragComplete(p), r(p);
|
1362
1405
|
}, u = (p) => {
|
@@ -1364,7 +1407,7 @@ function Sa(t) {
|
|
1364
1407
|
v.splice(p, 1), s(v);
|
1365
1408
|
}, l = [];
|
1366
1409
|
e.forEach((p, v) => {
|
1367
|
-
l.push(/* @__PURE__ */ c.jsx(
|
1410
|
+
l.push(/* @__PURE__ */ c.jsx(Sa, { index: v, title: p, onDelete: u }, p));
|
1368
1411
|
});
|
1369
1412
|
let d = "dropdown draggable";
|
1370
1413
|
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ c.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
@@ -1372,10 +1415,10 @@ function Sa(t) {
|
|
1372
1415
|
/* @__PURE__ */ c.jsx(mn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: l })
|
1373
1416
|
] });
|
1374
1417
|
}
|
1375
|
-
function
|
1418
|
+
function Ta(t) {
|
1376
1419
|
const [n, a] = oe(!1), e = [];
|
1377
1420
|
t.options.map((s, u) => {
|
1378
|
-
t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ c.jsx(
|
1421
|
+
t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ c.jsx(Ma, { option: s }, u));
|
1379
1422
|
});
|
1380
1423
|
let r = "dropdown";
|
1381
1424
|
return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ c.jsxs(
|
@@ -1397,13 +1440,13 @@ function Oa(t) {
|
|
1397
1440
|
}
|
1398
1441
|
);
|
1399
1442
|
}
|
1400
|
-
function
|
1443
|
+
function Ma(t) {
|
1401
1444
|
const { option: n } = t, [a, e] = oe("");
|
1402
1445
|
let r;
|
1403
1446
|
switch (n.type) {
|
1404
1447
|
case "draggable":
|
1405
1448
|
r = /* @__PURE__ */ c.jsx(
|
1406
|
-
|
1449
|
+
Oa,
|
1407
1450
|
{
|
1408
1451
|
title: n.title,
|
1409
1452
|
options: n.value,
|
@@ -1416,7 +1459,7 @@ function Ta(t) {
|
|
1416
1459
|
break;
|
1417
1460
|
case "dropdown":
|
1418
1461
|
r = /* @__PURE__ */ c.jsx(
|
1419
|
-
|
1462
|
+
Ta,
|
1420
1463
|
{
|
1421
1464
|
title: n.title,
|
1422
1465
|
options: n.value,
|
@@ -1439,10 +1482,10 @@ function Ta(t) {
|
|
1439
1482
|
}
|
1440
1483
|
return /* @__PURE__ */ c.jsx("li", { className: a === n.title ? "selected" : "", children: r }, aa());
|
1441
1484
|
}
|
1442
|
-
function
|
1485
|
+
function pi(t) {
|
1443
1486
|
const n = [], a = [];
|
1444
1487
|
t.components.forEach((s) => {
|
1445
|
-
s instanceof ca ? n.push(la) : s instanceof
|
1488
|
+
s instanceof ca ? n.push(la) : s instanceof Ue ? (n.push(ua), a.push(fa), da(t)) : s instanceof ga ? (n.push(va), a.push(ba)) : s instanceof En && n.push(ya);
|
1446
1489
|
});
|
1447
1490
|
function e(s) {
|
1448
1491
|
switch (n.forEach((u) => u(t, s)), s.event) {
|
@@ -1462,7 +1505,7 @@ function hi(t) {
|
|
1462
1505
|
t.editor ? r(s) : e(s);
|
1463
1506
|
});
|
1464
1507
|
}
|
1465
|
-
const
|
1508
|
+
const Ra = `out vec3 worldPosition;
|
1466
1509
|
uniform float uDistance;
|
1467
1510
|
|
1468
1511
|
void main() {
|
@@ -1471,7 +1514,7 @@ void main() {
|
|
1471
1514
|
worldPosition.xz += cameraPosition.xz;
|
1472
1515
|
|
1473
1516
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1474
|
-
}`,
|
1517
|
+
}`, Pa = `out vec4 fragColor;
|
1475
1518
|
in vec3 worldPosition;
|
1476
1519
|
|
1477
1520
|
uniform float uDivisions;
|
@@ -1539,7 +1582,7 @@ void main() {
|
|
1539
1582
|
|
1540
1583
|
if (fragColor.a <= 0.0) discard;
|
1541
1584
|
}`;
|
1542
|
-
class
|
1585
|
+
class ja extends un {
|
1543
1586
|
constructor(n) {
|
1544
1587
|
super({
|
1545
1588
|
extensions: {
|
@@ -1568,25 +1611,25 @@ class Pa extends un {
|
|
1568
1611
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
1569
1612
|
}
|
1570
1613
|
},
|
1571
|
-
vertexShader:
|
1572
|
-
fragmentShader:
|
1614
|
+
vertexShader: Ra,
|
1615
|
+
fragmentShader: Pa,
|
1573
1616
|
name: "InfiniteGrid",
|
1574
1617
|
depthWrite: !1
|
1575
1618
|
});
|
1576
1619
|
}
|
1577
1620
|
}
|
1578
|
-
class
|
1621
|
+
class _a extends Ln {
|
1579
1622
|
constructor() {
|
1580
|
-
const a = new
|
1623
|
+
const a = new ja();
|
1581
1624
|
super(new Fn(2, 2), a);
|
1582
|
-
|
1625
|
+
Y(this, "gridMaterial");
|
1583
1626
|
this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1584
1627
|
}
|
1585
1628
|
update() {
|
1586
1629
|
this.gridMaterial.needsUpdate = !0;
|
1587
1630
|
}
|
1588
1631
|
}
|
1589
|
-
const
|
1632
|
+
const ka = `#include <common>
|
1590
1633
|
#include <batching_pars_vertex>
|
1591
1634
|
#include <uv_pars_vertex>
|
1592
1635
|
#include <color_pars_vertex>
|
@@ -1616,7 +1659,7 @@ void main() {
|
|
1616
1659
|
#include <logdepthbuf_vertex>
|
1617
1660
|
#include <clipping_planes_vertex>
|
1618
1661
|
#include <worldpos_vertex>
|
1619
|
-
}`,
|
1662
|
+
}`, Da = `
|
1620
1663
|
#include <common>
|
1621
1664
|
#include <uv_pars_fragment>
|
1622
1665
|
#include <clipping_planes_pars_fragment>
|
@@ -1625,14 +1668,14 @@ void main() {
|
|
1625
1668
|
#include <clipping_planes_fragment>
|
1626
1669
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1627
1670
|
}`;
|
1628
|
-
class
|
1671
|
+
class Aa extends un {
|
1629
1672
|
constructor() {
|
1630
1673
|
super({
|
1631
1674
|
defines: {
|
1632
1675
|
USE_UV: ""
|
1633
1676
|
},
|
1634
|
-
vertexShader:
|
1635
|
-
fragmentShader:
|
1677
|
+
vertexShader: ka,
|
1678
|
+
fragmentShader: Da
|
1636
1679
|
});
|
1637
1680
|
}
|
1638
1681
|
}
|
@@ -1694,26 +1737,26 @@ function xn(t) {
|
|
1694
1737
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1695
1738
|
}
|
1696
1739
|
),
|
1697
|
-
/* @__PURE__ */ c.jsx("div", { className: `icon ${
|
1740
|
+
/* @__PURE__ */ c.jsx("div", { className: `icon ${ha(t.child)}` })
|
1698
1741
|
] }),
|
1699
1742
|
/* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { className: "container", children: r }) })
|
1700
1743
|
] }, Math.random());
|
1701
1744
|
}
|
1702
|
-
function
|
1745
|
+
function Ia(t) {
|
1703
1746
|
const n = [];
|
1704
1747
|
return t.child.children.map((a) => {
|
1705
1748
|
n.push(/* @__PURE__ */ c.jsx(xn, { child: a, three: t.three }, Math.random()));
|
1706
1749
|
}), /* @__PURE__ */ c.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1707
1750
|
}
|
1708
|
-
const
|
1709
|
-
function
|
1751
|
+
const Na = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1752
|
+
function La(t) {
|
1710
1753
|
return "items" in t;
|
1711
1754
|
}
|
1712
|
-
function
|
1755
|
+
function Be(t) {
|
1713
1756
|
const n = [];
|
1714
1757
|
return t.items.forEach((a) => {
|
1715
|
-
|
1716
|
-
/* @__PURE__ */ c.jsx(
|
1758
|
+
La(a) ? n.push(
|
1759
|
+
/* @__PURE__ */ c.jsx(Be, { title: a.title, items: a.items }, Math.random())
|
1717
1760
|
) : n.push(
|
1718
1761
|
/* @__PURE__ */ c.jsx(
|
1719
1762
|
ot,
|
@@ -1735,7 +1778,7 @@ function Ue(t) {
|
|
1735
1778
|
);
|
1736
1779
|
}), /* @__PURE__ */ c.jsx($t, { label: t.title, open: t.expanded === !0, children: n });
|
1737
1780
|
}
|
1738
|
-
function
|
1781
|
+
function Fa(t) {
|
1739
1782
|
return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
|
1740
1783
|
}
|
1741
1784
|
function Ae(t) {
|
@@ -1887,10 +1930,10 @@ function Ae(t) {
|
|
1887
1930
|
}
|
1888
1931
|
return t;
|
1889
1932
|
}
|
1890
|
-
function
|
1933
|
+
function Ua(t) {
|
1891
1934
|
return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
|
1892
1935
|
}
|
1893
|
-
function
|
1936
|
+
function Ba() {
|
1894
1937
|
const t = document.createElement("input");
|
1895
1938
|
return t.type = "file", new Promise((n, a) => {
|
1896
1939
|
t.addEventListener("change", function() {
|
@@ -1908,7 +1951,7 @@ function Ua() {
|
|
1908
1951
|
function Jt(t, n, a) {
|
1909
1952
|
const e = [];
|
1910
1953
|
for (const r in t) {
|
1911
|
-
if (!
|
1954
|
+
if (!Fa(r))
|
1912
1955
|
continue;
|
1913
1956
|
const s = typeof t[r], u = t[r];
|
1914
1957
|
if (s === "boolean" || s === "number" || s === "string") {
|
@@ -1926,7 +1969,7 @@ function Jt(t, n, a) {
|
|
1926
1969
|
v !== void 0 && Q(v, `material.${d}`, p);
|
1927
1970
|
}
|
1928
1971
|
};
|
1929
|
-
|
1972
|
+
Ua(r) && (l.value = Number(u), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
|
1930
1973
|
} else if (s === "object")
|
1931
1974
|
if (u.isColor)
|
1932
1975
|
e.push({
|
@@ -2036,14 +2079,14 @@ function Jt(t, n, a) {
|
|
2036
2079
|
}
|
2037
2080
|
}), e;
|
2038
2081
|
}
|
2039
|
-
function
|
2082
|
+
function $a(t, n) {
|
2040
2083
|
const a = t.material;
|
2041
2084
|
if (Array.isArray(a)) {
|
2042
2085
|
const e = [], r = a.length;
|
2043
2086
|
for (let s = 0; s < r; s++)
|
2044
2087
|
e.push(
|
2045
2088
|
/* @__PURE__ */ c.jsx(
|
2046
|
-
|
2089
|
+
Be,
|
2047
2090
|
{
|
2048
2091
|
title: `Material ${s}`,
|
2049
2092
|
items: Jt(a[s], t, n)
|
@@ -2054,7 +2097,7 @@ function Ba(t, n) {
|
|
2054
2097
|
return /* @__PURE__ */ c.jsx(c.Fragment, { children: e });
|
2055
2098
|
} else
|
2056
2099
|
return /* @__PURE__ */ c.jsx(
|
2057
|
-
|
2100
|
+
Be,
|
2058
2101
|
{
|
2059
2102
|
title: "Material",
|
2060
2103
|
items: Jt(a, t, n)
|
@@ -2161,10 +2204,10 @@ function ot(t) {
|
|
2161
2204
|
}
|
2162
2205
|
),
|
2163
2206
|
t.type === "image" && /* @__PURE__ */ c.jsx("img", { ref: u, onClick: () => {
|
2164
|
-
|
2207
|
+
Ba().then((v) => {
|
2165
2208
|
u.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
|
2166
2209
|
});
|
2167
|
-
}, src: a.length > 0 ? a :
|
2210
|
+
}, src: a.length > 0 ? a : Na })
|
2168
2211
|
] });
|
2169
2212
|
}
|
2170
2213
|
function Qt(t) {
|
@@ -2196,7 +2239,7 @@ function Qt(t) {
|
|
2196
2239
|
}
|
2197
2240
|
return t;
|
2198
2241
|
}
|
2199
|
-
function
|
2242
|
+
function Ga(t, n) {
|
2200
2243
|
const a = [];
|
2201
2244
|
if (t.perspectiveCameraInfo !== void 0)
|
2202
2245
|
for (const e in t.perspectiveCameraInfo)
|
@@ -2229,27 +2272,27 @@ function $a(t, n) {
|
|
2229
2272
|
}
|
2230
2273
|
});
|
2231
2274
|
return /* @__PURE__ */ c.jsx(
|
2232
|
-
|
2275
|
+
Be,
|
2233
2276
|
{
|
2234
2277
|
title: "Camera",
|
2235
2278
|
items: a
|
2236
2279
|
}
|
2237
2280
|
);
|
2238
2281
|
}
|
2239
|
-
const
|
2240
|
-
function
|
2282
|
+
const Va = Math.PI / 180, za = 180 / Math.PI;
|
2283
|
+
function Xe(t, n, a, e, r) {
|
2241
2284
|
return e + (t - n) * (r - e) / (a - n);
|
2242
2285
|
}
|
2243
|
-
function
|
2244
|
-
return t *
|
2286
|
+
function Ya(t) {
|
2287
|
+
return t * Va;
|
2245
2288
|
}
|
2246
2289
|
function At(t) {
|
2247
|
-
return t *
|
2290
|
+
return t * za;
|
2248
2291
|
}
|
2249
|
-
function
|
2292
|
+
function Wa(t, n) {
|
2250
2293
|
const a = new Un();
|
2251
2294
|
a.elements = t.matrix;
|
2252
|
-
const e = new
|
2295
|
+
const e = new W(), r = new Bn(), s = new W();
|
2253
2296
|
t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
|
2254
2297
|
const u = (d, p) => {
|
2255
2298
|
var E;
|
@@ -2257,10 +2300,10 @@ function Ya(t, n) {
|
|
2257
2300
|
const v = (E = n.scene) == null ? void 0 : E.getObjectByProperty("uuid", t.uuid);
|
2258
2301
|
v !== void 0 && Q(v, d, p);
|
2259
2302
|
}, l = (d, p) => {
|
2260
|
-
u(d,
|
2303
|
+
u(d, Ya(p));
|
2261
2304
|
};
|
2262
2305
|
return /* @__PURE__ */ c.jsx(
|
2263
|
-
|
2306
|
+
Be,
|
2264
2307
|
{
|
2265
2308
|
title: "Transform",
|
2266
2309
|
items: [
|
@@ -2362,7 +2405,7 @@ function en(t) {
|
|
2362
2405
|
}
|
2363
2406
|
return t;
|
2364
2407
|
}
|
2365
|
-
function
|
2408
|
+
function Ha(t, n) {
|
2366
2409
|
const a = [];
|
2367
2410
|
if (t.lightInfo !== void 0)
|
2368
2411
|
for (const e in t.lightInfo) {
|
@@ -2394,14 +2437,14 @@ function Wa(t, n) {
|
|
2394
2437
|
}));
|
2395
2438
|
}
|
2396
2439
|
return /* @__PURE__ */ c.jsx(
|
2397
|
-
|
2440
|
+
Be,
|
2398
2441
|
{
|
2399
2442
|
title: "Light",
|
2400
2443
|
items: a
|
2401
2444
|
}
|
2402
2445
|
);
|
2403
2446
|
}
|
2404
|
-
function
|
2447
|
+
function Ka(t, n) {
|
2405
2448
|
const a = [];
|
2406
2449
|
return t.animations.forEach((e) => {
|
2407
2450
|
a.push({
|
@@ -2441,7 +2484,7 @@ function Ha(t, n) {
|
|
2441
2484
|
u !== void 0 && Q(u, r, s);
|
2442
2485
|
}
|
2443
2486
|
});
|
2444
|
-
}), /* @__PURE__ */ c.jsx(
|
2487
|
+
}), /* @__PURE__ */ c.jsx(Be, { title: "Animations", items: a });
|
2445
2488
|
}
|
2446
2489
|
const Cn = {
|
2447
2490
|
name: "",
|
@@ -2456,7 +2499,7 @@ const Cn = {
|
|
2456
2499
|
lightInfo: void 0
|
2457
2500
|
};
|
2458
2501
|
let ae = { ...Cn };
|
2459
|
-
function
|
2502
|
+
function Xa(t) {
|
2460
2503
|
const [n, a] = oe(-1);
|
2461
2504
|
Fe(() => {
|
2462
2505
|
function r(u) {
|
@@ -2519,20 +2562,20 @@ function Ka(t) {
|
|
2519
2562
|
)
|
2520
2563
|
] }),
|
2521
2564
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2522
|
-
|
2523
|
-
ae.animations.length > 0 ?
|
2524
|
-
e.search("camera") > -1 ?
|
2525
|
-
e.search("light") > -1 ?
|
2526
|
-
e.search("mesh") > -1 ?
|
2565
|
+
Wa(ae, t.three),
|
2566
|
+
ae.animations.length > 0 ? Ka(ae, t.three) : null,
|
2567
|
+
e.search("camera") > -1 ? Ga(ae, t.three) : null,
|
2568
|
+
e.search("light") > -1 ? Ha(ae, t.three) : null,
|
2569
|
+
e.search("mesh") > -1 ? $a(ae, t.three) : null
|
2527
2570
|
] })
|
2528
2571
|
] }) }, n) }, "Inspector");
|
2529
2572
|
}
|
2530
|
-
class
|
2573
|
+
class mi extends ta {
|
2531
2574
|
constructor(a) {
|
2532
2575
|
super(a);
|
2533
|
-
|
2576
|
+
Y(this, "three");
|
2534
2577
|
// Private
|
2535
|
-
|
2578
|
+
Y(this, "setScene", (a) => {
|
2536
2579
|
this.setState(() => ({
|
2537
2580
|
scene: a.value
|
2538
2581
|
}));
|
@@ -2548,8 +2591,8 @@ class pi extends ta {
|
|
2548
2591
|
var r;
|
2549
2592
|
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
|
2550
2593
|
return /* @__PURE__ */ c.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2551
|
-
/* @__PURE__ */ c.jsx($t, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(
|
2552
|
-
/* @__PURE__ */ c.jsx(
|
2594
|
+
/* @__PURE__ */ c.jsx($t, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(Ia, { child: this.componentState.scene, three: this.three }) }) }),
|
2595
|
+
/* @__PURE__ */ c.jsx(Xa, { three: this.three })
|
2553
2596
|
] }) }, "SidePanel");
|
2554
2597
|
}
|
2555
2598
|
// Getters / Setters
|
@@ -2557,7 +2600,7 @@ class pi extends ta {
|
|
2557
2600
|
return this.state;
|
2558
2601
|
}
|
2559
2602
|
}
|
2560
|
-
function
|
2603
|
+
function gi(t) {
|
2561
2604
|
function n() {
|
2562
2605
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2563
2606
|
}
|
@@ -2601,10 +2644,10 @@ function mi(t) {
|
|
2601
2644
|
j.removeEventListener(_.GET_OBJECT, a), j.removeEventListener(_.UPDATE_OBJECT, r), j.removeEventListener(_.CREATE_TEXTURE, s), j.removeEventListener(_.REQUEST_METHOD, u);
|
2602
2645
|
}), []), null;
|
2603
2646
|
}
|
2604
|
-
const tn = { type: "change" }, It = { type: "start" }, nn = { type: "end" }, wt = new $n(), an = new Gn(),
|
2605
|
-
class
|
2647
|
+
const tn = { type: "change" }, It = { type: "start" }, nn = { type: "end" }, wt = new $n(), an = new Gn(), qa = Math.cos(70 * Vn.DEG2RAD);
|
2648
|
+
class Za extends cn {
|
2606
2649
|
constructor(n, a) {
|
2607
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
2650
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new W(), this.cursor = new W(), 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: He.ROTATE, MIDDLE: He.DOLLY, RIGHT: He.PAN }, this.touches = { ONE: Ke.ROTATE, TWO: Ke.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2608
2651
|
return l.phi;
|
2609
2652
|
}, this.getAzimuthalAngle = function() {
|
2610
2653
|
return l.theta;
|
@@ -2619,31 +2662,31 @@ class qa extends cn {
|
|
2619
2662
|
}, this.reset = function() {
|
2620
2663
|
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), s = r.NONE;
|
2621
2664
|
}, this.update = function() {
|
2622
|
-
const o = new
|
2665
|
+
const o = new W(), y = new Ht().setFromUnitVectors(n.up, new W(0, 1, 0)), D = y.clone().invert(), N = new W(), te = new Ht(), be = new W(), ue = 2 * Math.PI;
|
2623
2666
|
return function(Et = null) {
|
2624
2667
|
const ye = e.object.position;
|
2625
2668
|
o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && B(b(Et)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
|
2626
2669
|
let he = e.minAzimuthAngle, pe = e.maxAzimuthAngle;
|
2627
2670
|
isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius = q(l.radius) : l.radius = q(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(D), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
|
2628
|
-
let
|
2671
|
+
let ze = !1;
|
2629
2672
|
if (e.zoomToCursor && ee) {
|
2630
2673
|
let De = null;
|
2631
2674
|
if (e.object.isPerspectiveCamera) {
|
2632
2675
|
const Te = o.length();
|
2633
2676
|
De = q(Te * p);
|
2634
|
-
const
|
2635
|
-
e.object.position.addScaledVector(fe,
|
2677
|
+
const Ye = Te - De;
|
2678
|
+
e.object.position.addScaledVector(fe, Ye), e.object.updateMatrixWorld();
|
2636
2679
|
} else if (e.object.isOrthographicCamera) {
|
2637
|
-
const Te = new
|
2638
|
-
Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(),
|
2639
|
-
const
|
2640
|
-
|
2680
|
+
const Te = new W(le.x, le.y, 0);
|
2681
|
+
Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), ze = !0;
|
2682
|
+
const Ye = new W(le.x, le.y, 0);
|
2683
|
+
Ye.unproject(e.object), e.object.position.sub(Ye).add(Te), e.object.updateMatrixWorld(), De = o.length();
|
2641
2684
|
} else
|
2642
2685
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2643
|
-
De !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(De).add(e.object.position) : (wt.origin.copy(e.object.position), wt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(wt.direction)) <
|
2686
|
+
De !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(De).add(e.object.position) : (wt.origin.copy(e.object.position), wt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(wt.direction)) < qa ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), wt.intersectPlane(an, e.target))));
|
2644
2687
|
} else
|
2645
|
-
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(),
|
2646
|
-
return p = 1, ee = !1,
|
2688
|
+
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), ze = !0);
|
2689
|
+
return p = 1, ee = !1, ze || N.distanceToSquared(e.object.position) > u || 8 * (1 - te.dot(e.object.quaternion)) > u || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), N.copy(e.object.position), te.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
|
2647
2690
|
};
|
2648
2691
|
}(), this.dispose = function() {
|
2649
2692
|
e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", et), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", mt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
|
@@ -2661,7 +2704,7 @@ class qa extends cn {
|
|
2661
2704
|
let s = r.NONE;
|
2662
2705
|
const u = 1e-6, l = new Kt(), d = new Kt();
|
2663
2706
|
let p = 1;
|
2664
|
-
const v = new
|
2707
|
+
const v = new W(), E = new de(), x = new de(), C = new de(), M = new de(), G = new de(), se = new de(), K = new de(), S = new de(), X = new de(), fe = new W(), le = new de();
|
2665
2708
|
let ee = !1;
|
2666
2709
|
const f = [], m = {};
|
2667
2710
|
function b(o) {
|
@@ -2678,17 +2721,17 @@ class qa extends cn {
|
|
2678
2721
|
d.phi -= o;
|
2679
2722
|
}
|
2680
2723
|
const F = function() {
|
2681
|
-
const o = new
|
2724
|
+
const o = new W();
|
2682
2725
|
return function(D, N) {
|
2683
2726
|
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-D), v.add(o);
|
2684
2727
|
};
|
2685
2728
|
}(), A = function() {
|
2686
|
-
const o = new
|
2729
|
+
const o = new W();
|
2687
2730
|
return function(D, N) {
|
2688
2731
|
e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(D), v.add(o);
|
2689
2732
|
};
|
2690
2733
|
}(), U = function() {
|
2691
|
-
const o = new
|
2734
|
+
const o = new W();
|
2692
2735
|
return function(D, N) {
|
2693
2736
|
const te = e.domElement;
|
2694
2737
|
if (e.object.isPerspectiveCamera) {
|
@@ -2765,7 +2808,7 @@ class qa extends cn {
|
|
2765
2808
|
E.set(D, N);
|
2766
2809
|
}
|
2767
2810
|
}
|
2768
|
-
function
|
2811
|
+
function Ge(o) {
|
2769
2812
|
if (f.length === 1)
|
2770
2813
|
M.set(o.pageX, o.pageY);
|
2771
2814
|
else {
|
@@ -2778,7 +2821,7 @@ class qa extends cn {
|
|
2778
2821
|
K.set(0, te);
|
2779
2822
|
}
|
2780
2823
|
function Pt(o) {
|
2781
|
-
e.enableZoom && je(o), e.enablePan &&
|
2824
|
+
e.enableZoom && je(o), e.enablePan && Ge(o);
|
2782
2825
|
}
|
2783
2826
|
function dt(o) {
|
2784
2827
|
e.enableZoom && je(o), e.enableRotate && Pe(o);
|
@@ -2809,7 +2852,7 @@ class qa extends cn {
|
|
2809
2852
|
const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
|
2810
2853
|
I(be, ue);
|
2811
2854
|
}
|
2812
|
-
function
|
2855
|
+
function Ve(o) {
|
2813
2856
|
e.enableZoom && _e(o), e.enablePan && ht(o);
|
2814
2857
|
}
|
2815
2858
|
function pt(o) {
|
@@ -2840,12 +2883,12 @@ class qa extends cn {
|
|
2840
2883
|
y = -1;
|
2841
2884
|
}
|
2842
2885
|
switch (y) {
|
2843
|
-
case
|
2886
|
+
case He.DOLLY:
|
2844
2887
|
if (e.enableZoom === !1)
|
2845
2888
|
return;
|
2846
2889
|
Re(o), s = r.DOLLY;
|
2847
2890
|
break;
|
2848
|
-
case
|
2891
|
+
case He.ROTATE:
|
2849
2892
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2850
2893
|
if (e.enablePan === !1)
|
2851
2894
|
return;
|
@@ -2856,7 +2899,7 @@ class qa extends cn {
|
|
2856
2899
|
me(o), s = r.ROTATE;
|
2857
2900
|
}
|
2858
2901
|
break;
|
2859
|
-
case
|
2902
|
+
case He.PAN:
|
2860
2903
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2861
2904
|
if (e.enableRotate === !1)
|
2862
2905
|
return;
|
@@ -2901,15 +2944,15 @@ class qa extends cn {
|
|
2901
2944
|
switch (at(o), f.length) {
|
2902
2945
|
case 1:
|
2903
2946
|
switch (e.touches.ONE) {
|
2904
|
-
case
|
2947
|
+
case Ke.ROTATE:
|
2905
2948
|
if (e.enableRotate === !1)
|
2906
2949
|
return;
|
2907
2950
|
Pe(o), s = r.TOUCH_ROTATE;
|
2908
2951
|
break;
|
2909
|
-
case
|
2952
|
+
case Ke.PAN:
|
2910
2953
|
if (e.enablePan === !1)
|
2911
2954
|
return;
|
2912
|
-
|
2955
|
+
Ge(o), s = r.TOUCH_PAN;
|
2913
2956
|
break;
|
2914
2957
|
default:
|
2915
2958
|
s = r.NONE;
|
@@ -2917,12 +2960,12 @@ class qa extends cn {
|
|
2917
2960
|
break;
|
2918
2961
|
case 2:
|
2919
2962
|
switch (e.touches.TWO) {
|
2920
|
-
case
|
2963
|
+
case Ke.DOLLY_PAN:
|
2921
2964
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2922
2965
|
return;
|
2923
2966
|
Pt(o), s = r.TOUCH_DOLLY_PAN;
|
2924
2967
|
break;
|
2925
|
-
case
|
2968
|
+
case Ke.DOLLY_ROTATE:
|
2926
2969
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2927
2970
|
return;
|
2928
2971
|
dt(o), s = r.TOUCH_DOLLY_ROTATE;
|
@@ -2951,7 +2994,7 @@ class qa extends cn {
|
|
2951
2994
|
case r.TOUCH_DOLLY_PAN:
|
2952
2995
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2953
2996
|
return;
|
2954
|
-
|
2997
|
+
Ve(o), e.update();
|
2955
2998
|
break;
|
2956
2999
|
case r.TOUCH_DOLLY_ROTATE:
|
2957
3000
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
@@ -3023,17 +3066,17 @@ const St = (t) => {
|
|
3023
3066
|
"Stacked",
|
3024
3067
|
"Quad"
|
3025
3068
|
], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
|
3026
|
-
function
|
3069
|
+
function $e(t, n) {
|
3027
3070
|
const a = new dn(-100, 100, 100, -100, 50, 3e3);
|
3028
3071
|
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
|
3029
3072
|
}
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3033
|
-
|
3034
|
-
|
3035
|
-
|
3036
|
-
|
3073
|
+
$e("Top", new W(0, 1e3, 0));
|
3074
|
+
$e("Bottom", new W(0, -1e3, 0));
|
3075
|
+
$e("Left", new W(-1e3, 0, 0));
|
3076
|
+
$e("Right", new W(1e3, 0, 0));
|
3077
|
+
$e("Front", new W(0, 0, 1e3));
|
3078
|
+
$e("Back", new W(0, 0, -1e3));
|
3079
|
+
$e("Orthographic", new W(1e3, 1e3, 1e3));
|
3037
3080
|
const Tt = new Nt(60, 1, 50, 3e3);
|
3038
3081
|
Tt.name = "Debug";
|
3039
3082
|
Tt.position.set(500, 500, 500);
|
@@ -3045,7 +3088,7 @@ const on = [
|
|
3045
3088
|
"Normals",
|
3046
3089
|
"UVs",
|
3047
3090
|
"Wireframe"
|
3048
|
-
],
|
3091
|
+
], Ja = new zn(), Qa = new Yn(), ei = new Aa(), ti = new Wn({
|
3049
3092
|
opacity: 0.33,
|
3050
3093
|
transparent: !0,
|
3051
3094
|
wireframe: !0
|
@@ -3058,8 +3101,8 @@ z.add(xe);
|
|
3058
3101
|
const lt = new Hn();
|
3059
3102
|
lt.name = "helpers";
|
3060
3103
|
z.add(lt);
|
3061
|
-
const
|
3062
|
-
lt.add(
|
3104
|
+
const ni = new _a();
|
3105
|
+
lt.add(ni);
|
3063
3106
|
const Sn = new hn(500);
|
3064
3107
|
Sn.name = "axisHelper";
|
3065
3108
|
lt.add(Sn);
|
@@ -3068,13 +3111,13 @@ ct.name = "interactionHelper";
|
|
3068
3111
|
lt.add(ct);
|
3069
3112
|
ct.visible = !1;
|
3070
3113
|
let Ct = !1, V = ne.get("Debug"), re = ne.get("Orthographic"), Ne = ne.get("Front"), Le = ne.get("Top"), sn = !1;
|
3071
|
-
function
|
3114
|
+
function vi(t) {
|
3072
3115
|
const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, u] = oe(!1), [l, d] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), G = Ce(null), se = Ce(null), K = Ce(null), S = (f, m) => {
|
3073
3116
|
const b = ie.get(f.name);
|
3074
3117
|
b !== void 0 && b.dispose(), ie.delete(f.name);
|
3075
3118
|
const O = we.get(f.name);
|
3076
3119
|
O !== void 0 && (z.remove(O), O.dispose()), we.delete(f.name);
|
3077
|
-
const B = new
|
3120
|
+
const B = new Za(f, m);
|
3078
3121
|
switch (B.enableDamping = !0, B.dampingFactor = 0.05, f.name) {
|
3079
3122
|
case "Top":
|
3080
3123
|
case "Bottom":
|
@@ -3215,11 +3258,11 @@ function gi(t) {
|
|
3215
3258
|
const A = new de();
|
3216
3259
|
e.getSize(A);
|
3217
3260
|
const U = Math.min(F.clientX, A.x), J = Math.min(F.clientY, A.y);
|
3218
|
-
m.x =
|
3261
|
+
m.x = Xe(U, 0, A.x, -1, 1), m.y = Xe(J, 0, A.y, 1, -1);
|
3219
3262
|
const R = A.x / 2, I = A.y / 2, q = () => {
|
3220
|
-
U < R ? m.x =
|
3263
|
+
U < R ? m.x = Xe(U, 0, R, -1, 1) : m.x = Xe(U, R, A.x, -1, 1);
|
3221
3264
|
}, me = () => {
|
3222
|
-
J < I ? m.y =
|
3265
|
+
J < I ? m.y = Xe(J, 0, I, 1, -1) : m.y = Xe(J, I, A.y, 1, -1);
|
3223
3266
|
};
|
3224
3267
|
switch (n) {
|
3225
3268
|
case "Quad":
|
@@ -3327,20 +3370,20 @@ function gi(t) {
|
|
3327
3370
|
if (f !== xt)
|
3328
3371
|
switch (xt = f, xt) {
|
3329
3372
|
case "Depth":
|
3330
|
-
z.overrideMaterial =
|
3373
|
+
z.overrideMaterial = Ja;
|
3331
3374
|
break;
|
3332
3375
|
case "Normals":
|
3333
|
-
z.overrideMaterial =
|
3376
|
+
z.overrideMaterial = Qa;
|
3334
3377
|
break;
|
3335
3378
|
default:
|
3336
3379
|
case "Renderer":
|
3337
3380
|
z.overrideMaterial = null;
|
3338
3381
|
break;
|
3339
3382
|
case "Wireframe":
|
3340
|
-
z.overrideMaterial =
|
3383
|
+
z.overrideMaterial = ti;
|
3341
3384
|
break;
|
3342
3385
|
case "UVs":
|
3343
|
-
z.overrideMaterial =
|
3386
|
+
z.overrideMaterial = ei;
|
3344
3387
|
break;
|
3345
3388
|
}
|
3346
3389
|
},
|
@@ -3370,7 +3413,7 @@ function gi(t) {
|
|
3370
3413
|
] })
|
3371
3414
|
] });
|
3372
3415
|
}
|
3373
|
-
function
|
3416
|
+
function bi(t) {
|
3374
3417
|
return /* @__PURE__ */ c.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3375
3418
|
/* @__PURE__ */ c.jsx("header", { children: t.header }),
|
3376
3419
|
t.children,
|
@@ -3379,35 +3422,35 @@ function vi(t) {
|
|
3379
3422
|
}
|
3380
3423
|
export {
|
3381
3424
|
$t as Accordion,
|
3382
|
-
|
3425
|
+
hi as Application,
|
3383
3426
|
Ot as BaseRemote,
|
3384
3427
|
xn as ChildObject,
|
3385
|
-
|
3386
|
-
|
3387
|
-
|
3388
|
-
|
3389
|
-
|
3390
|
-
|
3391
|
-
|
3392
|
-
|
3393
|
-
|
3428
|
+
Ia as ContainerObject,
|
3429
|
+
Oa as Draggable,
|
3430
|
+
Sa as DraggableItem,
|
3431
|
+
Ta as Dropdown,
|
3432
|
+
Ma as DropdownItem,
|
3433
|
+
bi as Editor,
|
3434
|
+
_a as InfiniteGridHelper,
|
3435
|
+
Xa as Inspector,
|
3436
|
+
vi as MultiView,
|
3394
3437
|
wn as NavButton,
|
3395
3438
|
ca as RemoteComponents,
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3439
|
+
pi as RemoteController,
|
3440
|
+
Ue as RemoteTheatre,
|
3441
|
+
ga as RemoteThree,
|
3399
3442
|
En as RemoteTweakpane,
|
3400
|
-
|
3401
|
-
|
3443
|
+
gi as SceneInspector,
|
3444
|
+
mi as SidePanel,
|
3402
3445
|
_ as ToolEvents,
|
3403
|
-
|
3404
|
-
|
3446
|
+
Aa as UVMaterial,
|
3447
|
+
ui as clamp,
|
3405
3448
|
ra as colorToHex,
|
3406
3449
|
j as debugDispatcher,
|
3407
3450
|
vn as dispose,
|
3408
3451
|
sa as disposeMaterial,
|
3409
|
-
|
3410
|
-
|
3452
|
+
fi as disposeTexture,
|
3453
|
+
di as distance,
|
3411
3454
|
gn as hierarchyUUID,
|
3412
3455
|
ia as isColor,
|
3413
3456
|
aa as randomID,
|