@tomorrowevening/hermes 0.0.47 → 0.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hermes.cjs.js +15 -15
- package/dist/hermes.es.js +1217 -1168
- package/package.json +1 -1
- package/types/core/Application.d.ts +2 -0
- package/types/core/remote/RemoteThree.d.ts +6 -0
- package/types/editor/multiView/MultiView.d.ts +0 -2
package/dist/hermes.es.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as
|
1
|
+
import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as Ct, FrontSide as Nn, BackSide as Ln, DoubleSide as sn, NoBlending as Fn, NormalBlending as Bn, AdditiveBlending as Un, SubtractiveBlending as $n, MultiplyBlending as zn, CustomBlending as Yn, AddEquation as Vn, SubtractEquation as Gn, ReverseSubtractEquation as Hn, MinEquation as Wn, MaxEquation as qn, ZeroFactor as on, OneFactor as cn, SrcColorFactor as ln, OneMinusSrcColorFactor as un, SrcAlphaFactor as dn, OneMinusSrcAlphaFactor as hn, DstAlphaFactor as fn, OneMinusDstAlphaFactor as pn, DstColorFactor as mn, OneMinusDstColorFactor as vn, SrcAlphaSaturateFactor as Kn, ConstantColorFactor as gn, OneMinusConstantColorFactor as bn, ConstantAlphaFactor as yn, OneMinusConstantAlphaFactor as En, Matrix4 as Xn, Vector3 as q, Euler as Zn, Ray as Jn, Plane as Qn, MathUtils as ea, MOUSE as et, TOUCH as tt, Quaternion as zt, Spherical as Yt, Vector2 as me, ShaderMaterial as xn, GLSL3 as ta, Mesh as na, PlaneGeometry as aa, Scene as ia, Group as ra, AxesHelper as Vt, MeshDepthMaterial as sa, MeshNormalMaterial as oa, MeshBasicMaterial as ca, WebGLRenderer as la, PerspectiveCamera as Pt, Raycaster as ua, OrthographicCamera as Gt, CameraHelper as da } from "three";
|
2
2
|
import { Pane as ha } from "tweakpane";
|
3
3
|
import * as fa from "@tweakpane/plugin-essentials";
|
4
|
-
import Cn, { useState as
|
4
|
+
import Cn, { useState as ae, useRef as fe, useEffect as ke, forwardRef as pa, useMemo as xe } from "react";
|
5
5
|
import { Reorder as Sn } from "framer-motion";
|
6
6
|
const wn = () => {
|
7
|
-
},
|
7
|
+
}, fi = () => {
|
8
8
|
};
|
9
|
-
function
|
9
|
+
function St(t) {
|
10
10
|
return t.substring(0, 1).toUpperCase() + t.substring(1);
|
11
11
|
}
|
12
|
-
function
|
12
|
+
function Xe(t, n, a) {
|
13
13
|
return Math.min(n, Math.max(t, a));
|
14
14
|
}
|
15
15
|
function Ht(t, n, a) {
|
@@ -18,7 +18,7 @@ function Ht(t, n, a) {
|
|
18
18
|
function Wt(t, n, a) {
|
19
19
|
return t * (1 - a) + n * a;
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function pi(t, n) {
|
22
22
|
const a = t - n;
|
23
23
|
return Math.sqrt(a * a);
|
24
24
|
}
|
@@ -29,13 +29,13 @@ function va(t) {
|
|
29
29
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
30
30
|
}
|
31
31
|
function ga(t) {
|
32
|
-
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (
|
33
|
-
const
|
34
|
-
return
|
35
|
-
},
|
36
|
-
return "#" +
|
32
|
+
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (u) => {
|
33
|
+
const d = u.toString(16);
|
34
|
+
return d.length === 1 ? "0" + d : d;
|
35
|
+
}, c = i(n), h = i(a), o = i(e);
|
36
|
+
return "#" + c + h + o;
|
37
37
|
}
|
38
|
-
function
|
38
|
+
function ht(t, n = 1) {
|
39
39
|
return Number(t.toFixed(n));
|
40
40
|
}
|
41
41
|
let Dt = 0;
|
@@ -48,7 +48,7 @@ const ba = () => {
|
|
48
48
|
n.length === 0 && (n = `obj_${Dt}`, Dt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
49
49
|
On(a);
|
50
50
|
});
|
51
|
-
},
|
51
|
+
}, mi = (t) => {
|
52
52
|
t?.dispose();
|
53
53
|
}, ya = (t) => {
|
54
54
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
@@ -65,10 +65,11 @@ const ba = () => {
|
|
65
65
|
t.dispose !== void 0 && t.dispose();
|
66
66
|
}
|
67
67
|
};
|
68
|
-
class
|
68
|
+
class vi {
|
69
69
|
components = /* @__PURE__ */ new Map();
|
70
70
|
listen;
|
71
71
|
// Protected
|
72
|
+
_appID = "";
|
72
73
|
_debugEnabled;
|
73
74
|
_broadcastChannel = void 0;
|
74
75
|
_webSocket = void 0;
|
@@ -76,7 +77,7 @@ class fi {
|
|
76
77
|
_connected = !1;
|
77
78
|
_useBC = !1;
|
78
79
|
constructor(n, a, e = !0) {
|
79
|
-
this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
|
80
|
+
this._appID = n, this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
|
80
81
|
}
|
81
82
|
addComponent(n, a) {
|
82
83
|
this.components.set(n, a);
|
@@ -100,6 +101,9 @@ class fi {
|
|
100
101
|
this._connected = !1;
|
101
102
|
};
|
102
103
|
// Getters / Setters
|
104
|
+
get appID() {
|
105
|
+
return this._appID;
|
106
|
+
}
|
103
107
|
get connected() {
|
104
108
|
return this._connected;
|
105
109
|
}
|
@@ -147,7 +151,7 @@ class wt {
|
|
147
151
|
handleEditor(n, a, e) {
|
148
152
|
}
|
149
153
|
}
|
150
|
-
class
|
154
|
+
class gi extends wt {
|
151
155
|
selectDropdown(n, a) {
|
152
156
|
this.app.send({
|
153
157
|
event: "selectComponent",
|
@@ -228,17 +232,17 @@ class Lt extends wt {
|
|
228
232
|
console.error("Theatre Project hasn't been created yet.");
|
229
233
|
return;
|
230
234
|
}
|
231
|
-
const
|
232
|
-
if (
|
235
|
+
const c = this.sheet(n);
|
236
|
+
if (c === void 0)
|
233
237
|
return;
|
234
238
|
const h = `${n}_${a}`;
|
235
|
-
let
|
236
|
-
|
237
|
-
const
|
239
|
+
let o = this.sheetObjects.get(h);
|
240
|
+
o !== void 0 ? o = c.object(a, { ...e, ...o.value }, { reconfigure: !0 }) : o = c.object(a, e), this.sheetObjects.set(h, o), this.sheetObjectCBs.set(h, i !== void 0 ? i : wn);
|
241
|
+
const u = o.onValuesChange((d) => {
|
238
242
|
if (this.app.editor) {
|
239
|
-
for (const b in
|
240
|
-
const E =
|
241
|
-
typeof E == "object" && va(E) && (
|
243
|
+
for (const b in d) {
|
244
|
+
const E = d[b];
|
245
|
+
typeof E == "object" && va(E) && (d[b] = {
|
242
246
|
r: E.r,
|
243
247
|
g: E.g,
|
244
248
|
b: E.b,
|
@@ -251,14 +255,14 @@ class Lt extends wt {
|
|
251
255
|
data: {
|
252
256
|
sheet: n,
|
253
257
|
sheetObject: h,
|
254
|
-
values:
|
258
|
+
values: d
|
255
259
|
}
|
256
260
|
});
|
257
261
|
}
|
258
|
-
const
|
259
|
-
|
262
|
+
const f = this.sheetObjectCBs.get(h);
|
263
|
+
f !== void 0 && f(d);
|
260
264
|
});
|
261
|
-
return this.sheetObjectUnsubscribe.set(h,
|
265
|
+
return this.sheetObjectUnsubscribe.set(h, u), o;
|
262
266
|
}
|
263
267
|
unsubscribe(n) {
|
264
268
|
if (this.project === void 0) {
|
@@ -267,24 +271,24 @@ class Lt extends wt {
|
|
267
271
|
}
|
268
272
|
const a = n.address.sheetId, e = n.address.objectKey;
|
269
273
|
this.sheets.get(a)?.detachObject(e);
|
270
|
-
const
|
271
|
-
h !== void 0 && (this.sheetObjects.delete(
|
274
|
+
const c = `${a}_${e}`, h = this.sheetObjectUnsubscribe.get(c);
|
275
|
+
h !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), h());
|
272
276
|
}
|
273
277
|
handleApp(n, a, e) {
|
274
278
|
const i = a;
|
275
|
-
let
|
279
|
+
let c;
|
276
280
|
switch (e.event) {
|
277
281
|
case "setSheet":
|
278
|
-
|
282
|
+
c = i.sheets.get(e.data.sheet), c !== void 0 && (i.activeSheet = c, this.studio?.setSelection([c]));
|
279
283
|
break;
|
280
284
|
case "setSheetObject":
|
281
|
-
|
285
|
+
c = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), c !== void 0 && this.studio?.setSelection([c]);
|
282
286
|
break;
|
283
287
|
case "updateSheetObject":
|
284
|
-
|
288
|
+
c = i.sheets.get(e.data.sheet), c !== void 0 && c.sequence.pause(), c = i.sheetObjectCBs.get(e.data.sheetObject), c !== void 0 && c(e.data.values);
|
285
289
|
break;
|
286
290
|
case "updateTimeline":
|
287
|
-
|
291
|
+
c = i.sheets.get(e.data.sheet), i.activeSheet !== void 0 && (i.activeSheet.sequence.position = e.data.position);
|
288
292
|
break;
|
289
293
|
}
|
290
294
|
}
|
@@ -304,23 +308,23 @@ class Lt extends wt {
|
|
304
308
|
handleEditorApp(n, a) {
|
305
309
|
if (n.editor) {
|
306
310
|
this.studio?.ui.restore(), this.studio?.onSelectionChange((h) => {
|
307
|
-
h.length < 1 || h.forEach((
|
308
|
-
let
|
309
|
-
switch (
|
311
|
+
h.length < 1 || h.forEach((o) => {
|
312
|
+
let u = o.address.sheetId, d = "setSheet", f = {};
|
313
|
+
switch (o.type) {
|
310
314
|
case "Theatre_Sheet_PublicAPI":
|
311
|
-
|
312
|
-
sheet:
|
313
|
-
}, a.activeSheet = a.sheets.get(
|
315
|
+
d = "setSheet", f = {
|
316
|
+
sheet: o.address.sheetId
|
317
|
+
}, a.activeSheet = a.sheets.get(o.address.sheetId);
|
314
318
|
break;
|
315
319
|
case "Theatre_SheetObject_PublicAPI":
|
316
|
-
|
317
|
-
id:
|
318
|
-
sheet:
|
319
|
-
key:
|
320
|
-
}, a.activeSheet = a.sheets.get(
|
320
|
+
d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
|
321
|
+
id: u,
|
322
|
+
sheet: o.address.sheetId,
|
323
|
+
key: o.address.objectKey
|
324
|
+
}, a.activeSheet = a.sheets.get(o.address.sheetId);
|
321
325
|
break;
|
322
326
|
}
|
323
|
-
n.send({ event:
|
327
|
+
n.send({ event: d, target: "app", data: f });
|
324
328
|
});
|
325
329
|
});
|
326
330
|
let e = -1;
|
@@ -337,34 +341,34 @@ class Lt extends wt {
|
|
337
341
|
}
|
338
342
|
});
|
339
343
|
}
|
340
|
-
},
|
341
|
-
i(), requestAnimationFrame(
|
344
|
+
}, c = () => {
|
345
|
+
i(), requestAnimationFrame(c);
|
342
346
|
};
|
343
|
-
i(),
|
347
|
+
i(), c();
|
344
348
|
} else
|
345
349
|
this.studio?.ui.hide();
|
346
350
|
}
|
347
351
|
}
|
348
|
-
function
|
352
|
+
function bi(t, n, a) {
|
349
353
|
if (t.editor) {
|
350
354
|
a.ui.restore(), a.onSelectionChange((h) => {
|
351
|
-
h.length < 1 || h.forEach((
|
352
|
-
let
|
353
|
-
switch (
|
355
|
+
h.length < 1 || h.forEach((o) => {
|
356
|
+
let u = o.address.sheetId, d = "setSheet", f = {};
|
357
|
+
switch (o.type) {
|
354
358
|
case "Theatre_Sheet_PublicAPI":
|
355
|
-
|
356
|
-
sheet:
|
357
|
-
}, n.activeSheet = n.sheets.get(
|
359
|
+
d = "setSheet", f = {
|
360
|
+
sheet: o.address.sheetId
|
361
|
+
}, n.activeSheet = n.sheets.get(o.address.sheetId);
|
358
362
|
break;
|
359
363
|
case "Theatre_SheetObject_PublicAPI":
|
360
|
-
|
361
|
-
id:
|
362
|
-
sheet:
|
363
|
-
key:
|
364
|
-
}, n.activeSheet = n.sheets.get(
|
364
|
+
d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
|
365
|
+
id: u,
|
366
|
+
sheet: o.address.sheetId,
|
367
|
+
key: o.address.objectKey
|
368
|
+
}, n.activeSheet = n.sheets.get(o.address.sheetId);
|
365
369
|
break;
|
366
370
|
}
|
367
|
-
t.send({ event:
|
371
|
+
t.send({ event: d, target: "app", data: f });
|
368
372
|
});
|
369
373
|
});
|
370
374
|
let e = -1;
|
@@ -381,10 +385,10 @@ function mi(t, n, a) {
|
|
381
385
|
}
|
382
386
|
});
|
383
387
|
}
|
384
|
-
},
|
385
|
-
i(), requestAnimationFrame(
|
388
|
+
}, c = () => {
|
389
|
+
i(), requestAnimationFrame(c);
|
386
390
|
};
|
387
|
-
i(),
|
391
|
+
i(), c();
|
388
392
|
} else
|
389
393
|
a.ui.hide();
|
390
394
|
}
|
@@ -433,7 +437,7 @@ function Ca(t) {
|
|
433
437
|
}
|
434
438
|
return !1;
|
435
439
|
}
|
436
|
-
function
|
440
|
+
function nt(t) {
|
437
441
|
const n = {};
|
438
442
|
for (const a in t) {
|
439
443
|
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ca(a))
|
@@ -449,8 +453,8 @@ function Qe(t) {
|
|
449
453
|
if (i !== null)
|
450
454
|
if (n[a] = i, i.isTexture)
|
451
455
|
if (i instanceof rn) {
|
452
|
-
const
|
453
|
-
n[a] = { src:
|
456
|
+
const c = i.source.toJSON();
|
457
|
+
n[a] = { src: c.url };
|
454
458
|
} else
|
455
459
|
i instanceof In && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
|
456
460
|
else
|
@@ -488,29 +492,29 @@ function At(t) {
|
|
488
492
|
const e = t;
|
489
493
|
if (Array.isArray(e.material)) {
|
490
494
|
const i = [];
|
491
|
-
e.material.forEach((
|
492
|
-
i.push(
|
495
|
+
e.material.forEach((c) => {
|
496
|
+
i.push(nt(c));
|
493
497
|
}), n.material = i;
|
494
498
|
} else
|
495
|
-
n.material =
|
499
|
+
n.material = nt(e.material);
|
496
500
|
} else if (a.search("points") > -1) {
|
497
501
|
const e = t;
|
498
502
|
if (Array.isArray(e.material)) {
|
499
503
|
const i = [];
|
500
|
-
e.material.forEach((
|
501
|
-
i.push(
|
504
|
+
e.material.forEach((c) => {
|
505
|
+
i.push(nt(c));
|
502
506
|
}), n.material = i;
|
503
507
|
} else
|
504
|
-
n.material =
|
508
|
+
n.material = nt(e.material);
|
505
509
|
} else if (a.search("line") > -1) {
|
506
510
|
const e = t;
|
507
511
|
if (Array.isArray(e.material)) {
|
508
512
|
const i = [];
|
509
|
-
e.material.forEach((
|
510
|
-
i.push(
|
513
|
+
e.material.forEach((c) => {
|
514
|
+
i.push(nt(c));
|
511
515
|
}), n.material = i;
|
512
516
|
} else
|
513
|
-
n.material =
|
517
|
+
n.material = nt(e.material);
|
514
518
|
} else
|
515
519
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
516
520
|
fov: t.fov,
|
@@ -557,7 +561,7 @@ function Sa(t, n) {
|
|
557
561
|
return t[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
|
558
562
|
}
|
559
563
|
}
|
560
|
-
function
|
564
|
+
function K(t, n, a) {
|
561
565
|
const e = n.split(".");
|
562
566
|
switch (e.length) {
|
563
567
|
case 1:
|
@@ -586,7 +590,7 @@ function It(t) {
|
|
586
590
|
}, e.onerror = a, e.src = t;
|
587
591
|
});
|
588
592
|
}
|
589
|
-
class
|
593
|
+
class yi extends wt {
|
590
594
|
scene = void 0;
|
591
595
|
renderer = void 0;
|
592
596
|
getObject(n) {
|
@@ -701,8 +705,27 @@ class vi extends wt {
|
|
701
705
|
break;
|
702
706
|
}
|
703
707
|
}
|
708
|
+
// Renderer
|
709
|
+
resize(n, a) {
|
710
|
+
this.renderer?.setSize(n, a);
|
711
|
+
}
|
712
|
+
set dpr(n) {
|
713
|
+
this.renderer?.setPixelRatio(Xe(1, 2, n));
|
714
|
+
}
|
715
|
+
get dpr() {
|
716
|
+
return this.renderer !== void 0 ? this.renderer?.getPixelRatio() : 1;
|
717
|
+
}
|
718
|
+
get width() {
|
719
|
+
return this.renderer !== void 0 ? this.renderer?.domElement.width / this.dpr : 0;
|
720
|
+
}
|
721
|
+
get height() {
|
722
|
+
return this.renderer !== void 0 ? this.renderer?.domElement.height / this.dpr : 0;
|
723
|
+
}
|
724
|
+
get canvas() {
|
725
|
+
return this.renderer !== void 0 ? this.renderer?.domElement : null;
|
726
|
+
}
|
704
727
|
}
|
705
|
-
class
|
728
|
+
class Ei extends wt {
|
706
729
|
bindCBs;
|
707
730
|
buttonCBs;
|
708
731
|
pane = void 0;
|
@@ -739,21 +762,21 @@ class gi extends wt {
|
|
739
762
|
}
|
740
763
|
// Binding
|
741
764
|
bind(n, a, e, i = void 0) {
|
742
|
-
const
|
743
|
-
this.bindCBs.set(
|
765
|
+
const c = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
|
766
|
+
this.bindCBs.set(c, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (u) => {
|
744
767
|
this.app.send({
|
745
768
|
event: "updateBind",
|
746
769
|
target: "app",
|
747
770
|
data: {
|
748
|
-
id:
|
749
|
-
value:
|
771
|
+
id: c,
|
772
|
+
value: u.value
|
750
773
|
}
|
751
774
|
});
|
752
775
|
}), this.editorCallbacks++) : (this.app.send({
|
753
776
|
event: "bindObject",
|
754
777
|
target: "app",
|
755
778
|
data: {
|
756
|
-
id:
|
779
|
+
id: c,
|
757
780
|
name: a,
|
758
781
|
params: e,
|
759
782
|
parent: i
|
@@ -820,7 +843,7 @@ class gi extends wt {
|
|
820
843
|
}
|
821
844
|
}
|
822
845
|
}
|
823
|
-
var Nt = { exports: {} },
|
846
|
+
var Nt = { exports: {} }, ct = {};
|
824
847
|
/**
|
825
848
|
* @license React
|
826
849
|
* react-jsx-runtime.production.min.js
|
@@ -833,22 +856,22 @@ var Nt = { exports: {} }, st = {};
|
|
833
856
|
var qt;
|
834
857
|
function wa() {
|
835
858
|
if (qt)
|
836
|
-
return
|
859
|
+
return ct;
|
837
860
|
qt = 1;
|
838
|
-
var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
839
|
-
function h(
|
840
|
-
var
|
841
|
-
|
842
|
-
for (
|
843
|
-
e.call(
|
844
|
-
if (
|
845
|
-
for (
|
846
|
-
b[
|
847
|
-
return { $$typeof: n, type:
|
848
|
-
}
|
849
|
-
return
|
850
|
-
}
|
851
|
-
var
|
861
|
+
var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
862
|
+
function h(o, u, d) {
|
863
|
+
var f, b = {}, E = null, x = null;
|
864
|
+
d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
|
865
|
+
for (f in u)
|
866
|
+
e.call(u, f) && !c.hasOwnProperty(f) && (b[f] = u[f]);
|
867
|
+
if (o && o.defaultProps)
|
868
|
+
for (f in u = o.defaultProps, u)
|
869
|
+
b[f] === void 0 && (b[f] = u[f]);
|
870
|
+
return { $$typeof: n, type: o, key: E, ref: x, props: b, _owner: i.current };
|
871
|
+
}
|
872
|
+
return ct.Fragment = a, ct.jsx = h, ct.jsxs = h, ct;
|
873
|
+
}
|
874
|
+
var lt = {};
|
852
875
|
/**
|
853
876
|
* @license React
|
854
877
|
* react-jsx-runtime.development.js
|
@@ -861,54 +884,54 @@ var ot = {};
|
|
861
884
|
var Kt;
|
862
885
|
function Oa() {
|
863
886
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
864
|
-
var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"),
|
865
|
-
function
|
887
|
+
var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), o = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
|
888
|
+
function V(r) {
|
866
889
|
if (r === null || typeof r != "object")
|
867
890
|
return null;
|
868
|
-
var
|
869
|
-
return typeof
|
891
|
+
var m = M && r[M] || r[P];
|
892
|
+
return typeof m == "function" ? m : null;
|
870
893
|
}
|
871
|
-
var
|
872
|
-
function
|
894
|
+
var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
895
|
+
function j(r) {
|
873
896
|
{
|
874
|
-
for (var
|
875
|
-
g[
|
876
|
-
|
897
|
+
for (var m = arguments.length, g = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
|
898
|
+
g[w - 1] = arguments[w];
|
899
|
+
O("error", r, g);
|
877
900
|
}
|
878
901
|
}
|
879
|
-
function
|
902
|
+
function O(r, m, g) {
|
880
903
|
{
|
881
|
-
var
|
882
|
-
N !== "" && (
|
883
|
-
var B = g.map(function(
|
884
|
-
return String(
|
904
|
+
var w = U.ReactDebugCurrentFrame, N = w.getStackAddendum();
|
905
|
+
N !== "" && (m += "%s", g = g.concat([N]));
|
906
|
+
var B = g.map(function(k) {
|
907
|
+
return String(k);
|
885
908
|
});
|
886
|
-
B.unshift("Warning: " +
|
909
|
+
B.unshift("Warning: " + m), Function.prototype.apply.call(console[r], console, B);
|
887
910
|
}
|
888
911
|
}
|
889
|
-
var
|
890
|
-
|
891
|
-
function
|
892
|
-
return !!(typeof r == "string" || typeof r == "function" || r === e || r ===
|
912
|
+
var re = !1, Q = !1, Ce = !1, G = !1, ee = !1, ve;
|
913
|
+
ve = Symbol.for("react.module.reference");
|
914
|
+
function ze(r) {
|
915
|
+
return !!(typeof r == "string" || typeof r == "function" || r === e || r === c || ee || r === i || r === d || r === f || G || r === x || re || Q || Ce || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === o || r.$$typeof === u || // This needs to include all possible module reference object
|
893
916
|
// types supported by any Flight configuration anywhere since
|
894
917
|
// we don't know which Flight build this will end up being used
|
895
918
|
// with.
|
896
|
-
r.$$typeof ===
|
919
|
+
r.$$typeof === ve || r.getModuleId !== void 0));
|
897
920
|
}
|
898
|
-
function Me(r,
|
899
|
-
var
|
900
|
-
if (
|
901
|
-
return
|
902
|
-
var N =
|
921
|
+
function Me(r, m, g) {
|
922
|
+
var w = r.displayName;
|
923
|
+
if (w)
|
924
|
+
return w;
|
925
|
+
var N = m.displayName || m.name || "";
|
903
926
|
return N !== "" ? g + "(" + N + ")" : g;
|
904
927
|
}
|
905
|
-
function
|
928
|
+
function $(r) {
|
906
929
|
return r.displayName || "Context";
|
907
930
|
}
|
908
|
-
function
|
931
|
+
function le(r) {
|
909
932
|
if (r == null)
|
910
933
|
return null;
|
911
|
-
if (typeof r.tag == "number" &&
|
934
|
+
if (typeof r.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
912
935
|
return r.displayName || r.name || null;
|
913
936
|
if (typeof r == "string")
|
914
937
|
return r;
|
@@ -917,32 +940,32 @@ function Oa() {
|
|
917
940
|
return "Fragment";
|
918
941
|
case a:
|
919
942
|
return "Portal";
|
920
|
-
case
|
943
|
+
case c:
|
921
944
|
return "Profiler";
|
922
945
|
case i:
|
923
946
|
return "StrictMode";
|
924
|
-
case
|
947
|
+
case d:
|
925
948
|
return "Suspense";
|
926
|
-
case
|
949
|
+
case f:
|
927
950
|
return "SuspenseList";
|
928
951
|
}
|
929
952
|
if (typeof r == "object")
|
930
953
|
switch (r.$$typeof) {
|
931
|
-
case
|
932
|
-
var
|
933
|
-
return
|
954
|
+
case o:
|
955
|
+
var m = r;
|
956
|
+
return $(m) + ".Consumer";
|
934
957
|
case h:
|
935
958
|
var g = r;
|
936
|
-
return
|
937
|
-
case
|
959
|
+
return $(g._context) + ".Provider";
|
960
|
+
case u:
|
938
961
|
return Me(r, r.render, "ForwardRef");
|
939
962
|
case b:
|
940
|
-
var
|
941
|
-
return
|
963
|
+
var w = r.displayName || null;
|
964
|
+
return w !== null ? w : le(r.type) || "Memo";
|
942
965
|
case E: {
|
943
|
-
var N = r, B = N._payload,
|
966
|
+
var N = r, B = N._payload, k = N._init;
|
944
967
|
try {
|
945
|
-
return
|
968
|
+
return le(k(B));
|
946
969
|
} catch {
|
947
970
|
return null;
|
948
971
|
}
|
@@ -950,18 +973,18 @@ function Oa() {
|
|
950
973
|
}
|
951
974
|
return null;
|
952
975
|
}
|
953
|
-
var
|
954
|
-
function
|
976
|
+
var S = Object.assign, Te = 0, ge, _e, je, Re, Pe, De, Ye;
|
977
|
+
function te() {
|
955
978
|
}
|
956
|
-
|
957
|
-
function
|
979
|
+
te.__reactDisabledLog = !0;
|
980
|
+
function Se() {
|
958
981
|
{
|
959
|
-
if (
|
960
|
-
|
982
|
+
if (Te === 0) {
|
983
|
+
ge = console.log, _e = console.info, je = console.warn, Re = console.error, Pe = console.group, De = console.groupCollapsed, Ye = console.groupEnd;
|
961
984
|
var r = {
|
962
985
|
configurable: !0,
|
963
986
|
enumerable: !0,
|
964
|
-
value:
|
987
|
+
value: te,
|
965
988
|
writable: !0
|
966
989
|
};
|
967
990
|
Object.defineProperties(console, {
|
@@ -974,254 +997,254 @@ function Oa() {
|
|
974
997
|
groupEnd: r
|
975
998
|
});
|
976
999
|
}
|
977
|
-
|
1000
|
+
Te++;
|
978
1001
|
}
|
979
1002
|
}
|
980
|
-
function
|
1003
|
+
function it() {
|
981
1004
|
{
|
982
|
-
if (
|
1005
|
+
if (Te--, Te === 0) {
|
983
1006
|
var r = {
|
984
1007
|
configurable: !0,
|
985
1008
|
enumerable: !0,
|
986
1009
|
writable: !0
|
987
1010
|
};
|
988
1011
|
Object.defineProperties(console, {
|
989
|
-
log:
|
990
|
-
value:
|
1012
|
+
log: S({}, r, {
|
1013
|
+
value: ge
|
991
1014
|
}),
|
992
|
-
info:
|
993
|
-
value:
|
1015
|
+
info: S({}, r, {
|
1016
|
+
value: _e
|
994
1017
|
}),
|
995
|
-
warn:
|
996
|
-
value:
|
1018
|
+
warn: S({}, r, {
|
1019
|
+
value: je
|
997
1020
|
}),
|
998
|
-
error:
|
999
|
-
value:
|
1021
|
+
error: S({}, r, {
|
1022
|
+
value: Re
|
1000
1023
|
}),
|
1001
|
-
group:
|
1002
|
-
value:
|
1024
|
+
group: S({}, r, {
|
1025
|
+
value: Pe
|
1003
1026
|
}),
|
1004
|
-
groupCollapsed:
|
1005
|
-
value:
|
1027
|
+
groupCollapsed: S({}, r, {
|
1028
|
+
value: De
|
1006
1029
|
}),
|
1007
|
-
groupEnd:
|
1008
|
-
value:
|
1030
|
+
groupEnd: S({}, r, {
|
1031
|
+
value: Ye
|
1009
1032
|
})
|
1010
1033
|
});
|
1011
1034
|
}
|
1012
|
-
|
1035
|
+
Te < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
1013
1036
|
}
|
1014
1037
|
}
|
1015
|
-
var
|
1016
|
-
function
|
1038
|
+
var Ve = U.ReactCurrentDispatcher, pe;
|
1039
|
+
function p(r, m, g) {
|
1017
1040
|
{
|
1018
|
-
if (
|
1041
|
+
if (pe === void 0)
|
1019
1042
|
try {
|
1020
1043
|
throw Error();
|
1021
1044
|
} catch (N) {
|
1022
|
-
var
|
1023
|
-
|
1045
|
+
var w = N.stack.trim().match(/\n( *(at )?)/);
|
1046
|
+
pe = w && w[1] || "";
|
1024
1047
|
}
|
1025
1048
|
return `
|
1026
|
-
` +
|
1049
|
+
` + pe + r;
|
1027
1050
|
}
|
1028
1051
|
}
|
1029
|
-
var
|
1052
|
+
var v = !1, C;
|
1030
1053
|
{
|
1031
|
-
var
|
1032
|
-
|
1054
|
+
var _ = typeof WeakMap == "function" ? WeakMap : Map;
|
1055
|
+
C = new _();
|
1033
1056
|
}
|
1034
|
-
function
|
1035
|
-
if (!r ||
|
1057
|
+
function H(r, m) {
|
1058
|
+
if (!r || v)
|
1036
1059
|
return "";
|
1037
1060
|
{
|
1038
|
-
var g =
|
1061
|
+
var g = C.get(r);
|
1039
1062
|
if (g !== void 0)
|
1040
1063
|
return g;
|
1041
1064
|
}
|
1042
|
-
var
|
1043
|
-
|
1065
|
+
var w;
|
1066
|
+
v = !0;
|
1044
1067
|
var N = Error.prepareStackTrace;
|
1045
1068
|
Error.prepareStackTrace = void 0;
|
1046
1069
|
var B;
|
1047
|
-
B =
|
1070
|
+
B = Ve.current, Ve.current = null, Se();
|
1048
1071
|
try {
|
1049
|
-
if (
|
1050
|
-
var
|
1072
|
+
if (m) {
|
1073
|
+
var k = function() {
|
1051
1074
|
throw Error();
|
1052
1075
|
};
|
1053
|
-
if (Object.defineProperty(
|
1076
|
+
if (Object.defineProperty(k.prototype, "props", {
|
1054
1077
|
set: function() {
|
1055
1078
|
throw Error();
|
1056
1079
|
}
|
1057
1080
|
}), typeof Reflect == "object" && Reflect.construct) {
|
1058
1081
|
try {
|
1059
|
-
Reflect.construct(
|
1060
|
-
} catch (
|
1061
|
-
|
1082
|
+
Reflect.construct(k, []);
|
1083
|
+
} catch (Ie) {
|
1084
|
+
w = Ie;
|
1062
1085
|
}
|
1063
|
-
Reflect.construct(r, [],
|
1086
|
+
Reflect.construct(r, [], k);
|
1064
1087
|
} else {
|
1065
1088
|
try {
|
1066
|
-
|
1067
|
-
} catch (
|
1068
|
-
|
1089
|
+
k.call();
|
1090
|
+
} catch (Ie) {
|
1091
|
+
w = Ie;
|
1069
1092
|
}
|
1070
|
-
r.call(
|
1093
|
+
r.call(k.prototype);
|
1071
1094
|
}
|
1072
1095
|
} else {
|
1073
1096
|
try {
|
1074
1097
|
throw Error();
|
1075
|
-
} catch (
|
1076
|
-
|
1098
|
+
} catch (Ie) {
|
1099
|
+
w = Ie;
|
1077
1100
|
}
|
1078
1101
|
r();
|
1079
1102
|
}
|
1080
|
-
} catch (
|
1081
|
-
if (
|
1082
|
-
for (var
|
1083
|
-
`),
|
1084
|
-
`),
|
1085
|
-
|
1086
|
-
for (;
|
1087
|
-
if (
|
1088
|
-
if (
|
1103
|
+
} catch (Ie) {
|
1104
|
+
if (Ie && w && typeof Ie.stack == "string") {
|
1105
|
+
for (var R = Ie.stack.split(`
|
1106
|
+
`), he = w.stack.split(`
|
1107
|
+
`), J = R.length - 1, ne = he.length - 1; J >= 1 && ne >= 0 && R[J] !== he[ne]; )
|
1108
|
+
ne--;
|
1109
|
+
for (; J >= 1 && ne >= 0; J--, ne--)
|
1110
|
+
if (R[J] !== he[ne]) {
|
1111
|
+
if (J !== 1 || ne !== 1)
|
1089
1112
|
do
|
1090
|
-
if (
|
1091
|
-
var
|
1092
|
-
` +
|
1093
|
-
return r.displayName &&
|
1113
|
+
if (J--, ne--, ne < 0 || R[J] !== he[ne]) {
|
1114
|
+
var Ee = `
|
1115
|
+
` + R[J].replace(" at new ", " at ");
|
1116
|
+
return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && C.set(r, Ee), Ee;
|
1094
1117
|
}
|
1095
|
-
while (
|
1118
|
+
while (J >= 1 && ne >= 0);
|
1096
1119
|
break;
|
1097
1120
|
}
|
1098
1121
|
}
|
1099
1122
|
} finally {
|
1100
|
-
|
1123
|
+
v = !1, Ve.current = B, it(), Error.prepareStackTrace = N;
|
1101
1124
|
}
|
1102
|
-
var
|
1103
|
-
return typeof r == "function" &&
|
1125
|
+
var Qe = r ? r.displayName || r.name : "", Ut = Qe ? p(Qe) : "";
|
1126
|
+
return typeof r == "function" && C.set(r, Ut), Ut;
|
1104
1127
|
}
|
1105
|
-
function
|
1106
|
-
return
|
1128
|
+
function X(r, m, g) {
|
1129
|
+
return H(r, !1);
|
1107
1130
|
}
|
1108
|
-
function
|
1109
|
-
var
|
1110
|
-
return !!(
|
1131
|
+
function de(r) {
|
1132
|
+
var m = r.prototype;
|
1133
|
+
return !!(m && m.isReactComponent);
|
1111
1134
|
}
|
1112
|
-
function
|
1135
|
+
function z(r, m, g) {
|
1113
1136
|
if (r == null)
|
1114
1137
|
return "";
|
1115
1138
|
if (typeof r == "function")
|
1116
|
-
return
|
1139
|
+
return H(r, de(r));
|
1117
1140
|
if (typeof r == "string")
|
1118
|
-
return
|
1141
|
+
return p(r);
|
1119
1142
|
switch (r) {
|
1120
|
-
case
|
1121
|
-
return
|
1122
|
-
case
|
1123
|
-
return
|
1143
|
+
case d:
|
1144
|
+
return p("Suspense");
|
1145
|
+
case f:
|
1146
|
+
return p("SuspenseList");
|
1124
1147
|
}
|
1125
1148
|
if (typeof r == "object")
|
1126
1149
|
switch (r.$$typeof) {
|
1127
|
-
case
|
1128
|
-
return
|
1150
|
+
case u:
|
1151
|
+
return X(r.render);
|
1129
1152
|
case b:
|
1130
|
-
return
|
1153
|
+
return z(r.type, m, g);
|
1131
1154
|
case E: {
|
1132
|
-
var
|
1155
|
+
var w = r, N = w._payload, B = w._init;
|
1133
1156
|
try {
|
1134
|
-
return
|
1157
|
+
return z(B(N), m, g);
|
1135
1158
|
} catch {
|
1136
1159
|
}
|
1137
1160
|
}
|
1138
1161
|
}
|
1139
1162
|
return "";
|
1140
1163
|
}
|
1141
|
-
var
|
1142
|
-
function
|
1164
|
+
var Z = Object.prototype.hasOwnProperty, se = {}, A = U.ReactDebugCurrentFrame;
|
1165
|
+
function L(r) {
|
1143
1166
|
if (r) {
|
1144
|
-
var
|
1145
|
-
|
1167
|
+
var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
|
1168
|
+
A.setExtraStackFrame(g);
|
1146
1169
|
} else
|
1147
|
-
|
1170
|
+
A.setExtraStackFrame(null);
|
1148
1171
|
}
|
1149
|
-
function
|
1172
|
+
function ie(r, m, g, w, N) {
|
1150
1173
|
{
|
1151
|
-
var B = Function.call.bind(
|
1152
|
-
for (var
|
1153
|
-
if (B(r,
|
1154
|
-
var
|
1174
|
+
var B = Function.call.bind(Z);
|
1175
|
+
for (var k in r)
|
1176
|
+
if (B(r, k)) {
|
1177
|
+
var R = void 0;
|
1155
1178
|
try {
|
1156
|
-
if (typeof r[
|
1157
|
-
var
|
1158
|
-
throw
|
1179
|
+
if (typeof r[k] != "function") {
|
1180
|
+
var he = Error((w || "React class") + ": " + g + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
1181
|
+
throw he.name = "Invariant Violation", he;
|
1159
1182
|
}
|
1160
|
-
|
1161
|
-
} catch (
|
1162
|
-
|
1183
|
+
R = r[k](m, k, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1184
|
+
} catch (J) {
|
1185
|
+
R = J;
|
1163
1186
|
}
|
1164
|
-
|
1187
|
+
R && !(R instanceof Error) && (L(N), j("%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, k, typeof R), L(null)), R instanceof Error && !(R.message in se) && (se[R.message] = !0, L(N), j("Failed %s type: %s", g, R.message), L(null));
|
1165
1188
|
}
|
1166
1189
|
}
|
1167
1190
|
}
|
1168
|
-
var
|
1169
|
-
function
|
1170
|
-
return
|
1191
|
+
var we = Array.isArray;
|
1192
|
+
function Ne(r) {
|
1193
|
+
return we(r);
|
1171
1194
|
}
|
1172
1195
|
function Ot(r) {
|
1173
1196
|
{
|
1174
|
-
var
|
1197
|
+
var m = typeof Symbol == "function" && Symbol.toStringTag, g = m && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
1175
1198
|
return g;
|
1176
1199
|
}
|
1177
1200
|
}
|
1178
|
-
function
|
1201
|
+
function ft(r) {
|
1179
1202
|
try {
|
1180
|
-
return
|
1203
|
+
return pt(r), !1;
|
1181
1204
|
} catch {
|
1182
1205
|
return !0;
|
1183
1206
|
}
|
1184
1207
|
}
|
1185
|
-
function
|
1208
|
+
function pt(r) {
|
1186
1209
|
return "" + r;
|
1187
1210
|
}
|
1188
|
-
function
|
1189
|
-
if (
|
1190
|
-
return
|
1211
|
+
function mt(r) {
|
1212
|
+
if (ft(r))
|
1213
|
+
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ot(r)), pt(r);
|
1191
1214
|
}
|
1192
|
-
var
|
1215
|
+
var Le = U.ReactCurrentOwner, rt = {
|
1193
1216
|
key: !0,
|
1194
1217
|
ref: !0,
|
1195
1218
|
__self: !0,
|
1196
1219
|
__source: !0
|
1197
|
-
},
|
1198
|
-
|
1220
|
+
}, st, vt, Je;
|
1221
|
+
Je = {};
|
1199
1222
|
function Mt(r) {
|
1200
|
-
if (
|
1201
|
-
var
|
1202
|
-
if (
|
1223
|
+
if (Z.call(r, "ref")) {
|
1224
|
+
var m = Object.getOwnPropertyDescriptor(r, "ref").get;
|
1225
|
+
if (m && m.isReactWarning)
|
1203
1226
|
return !1;
|
1204
1227
|
}
|
1205
1228
|
return r.ref !== void 0;
|
1206
1229
|
}
|
1207
1230
|
function Tt(r) {
|
1208
|
-
if (
|
1209
|
-
var
|
1210
|
-
if (
|
1231
|
+
if (Z.call(r, "key")) {
|
1232
|
+
var m = Object.getOwnPropertyDescriptor(r, "key").get;
|
1233
|
+
if (m && m.isReactWarning)
|
1211
1234
|
return !1;
|
1212
1235
|
}
|
1213
1236
|
return r.key !== void 0;
|
1214
1237
|
}
|
1215
|
-
function
|
1216
|
-
if (typeof r.ref == "string" &&
|
1217
|
-
var g =
|
1218
|
-
|
1238
|
+
function gt(r, m) {
|
1239
|
+
if (typeof r.ref == "string" && Le.current && m && Le.current.stateNode !== m) {
|
1240
|
+
var g = le(Le.current.type);
|
1241
|
+
Je[g] || (j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', le(Le.current.type), r.ref), Je[g] = !0);
|
1219
1242
|
}
|
1220
1243
|
}
|
1221
|
-
function
|
1244
|
+
function Fe(r, m) {
|
1222
1245
|
{
|
1223
1246
|
var g = function() {
|
1224
|
-
|
1247
|
+
st || (st = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
1225
1248
|
};
|
1226
1249
|
g.isReactWarning = !0, Object.defineProperty(r, "key", {
|
1227
1250
|
get: g,
|
@@ -1229,10 +1252,10 @@ function Oa() {
|
|
1229
1252
|
});
|
1230
1253
|
}
|
1231
1254
|
}
|
1232
|
-
function Bt(r,
|
1255
|
+
function Bt(r, m) {
|
1233
1256
|
{
|
1234
1257
|
var g = function() {
|
1235
|
-
|
1258
|
+
vt || (vt = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", m));
|
1236
1259
|
};
|
1237
1260
|
g.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
1238
1261
|
get: g,
|
@@ -1240,70 +1263,70 @@ function Oa() {
|
|
1240
1263
|
});
|
1241
1264
|
}
|
1242
1265
|
}
|
1243
|
-
var s = function(r,
|
1244
|
-
var
|
1266
|
+
var s = function(r, m, g, w, N, B, k) {
|
1267
|
+
var R = {
|
1245
1268
|
// This tag allows us to uniquely identify this as a React Element
|
1246
1269
|
$$typeof: n,
|
1247
1270
|
// Built-in properties that belong on the element
|
1248
1271
|
type: r,
|
1249
|
-
key:
|
1272
|
+
key: m,
|
1250
1273
|
ref: g,
|
1251
|
-
props:
|
1274
|
+
props: k,
|
1252
1275
|
// Record the component responsible for creating this element.
|
1253
1276
|
_owner: B
|
1254
1277
|
};
|
1255
|
-
return
|
1278
|
+
return R._store = {}, Object.defineProperty(R._store, "validated", {
|
1256
1279
|
configurable: !1,
|
1257
1280
|
enumerable: !1,
|
1258
1281
|
writable: !0,
|
1259
1282
|
value: !1
|
1260
|
-
}), Object.defineProperty(
|
1283
|
+
}), Object.defineProperty(R, "_self", {
|
1261
1284
|
configurable: !1,
|
1262
1285
|
enumerable: !1,
|
1263
1286
|
writable: !1,
|
1264
|
-
value:
|
1265
|
-
}), Object.defineProperty(
|
1287
|
+
value: w
|
1288
|
+
}), Object.defineProperty(R, "_source", {
|
1266
1289
|
configurable: !1,
|
1267
1290
|
enumerable: !1,
|
1268
1291
|
writable: !1,
|
1269
1292
|
value: N
|
1270
|
-
}), Object.freeze && (Object.freeze(
|
1293
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
1271
1294
|
};
|
1272
|
-
function y(r,
|
1295
|
+
function y(r, m, g, w, N) {
|
1273
1296
|
{
|
1274
|
-
var B,
|
1275
|
-
g !== void 0 && (
|
1276
|
-
for (B in
|
1277
|
-
|
1297
|
+
var B, k = {}, R = null, he = null;
|
1298
|
+
g !== void 0 && (mt(g), R = "" + g), Tt(m) && (mt(m.key), R = "" + m.key), Mt(m) && (he = m.ref, gt(m, N));
|
1299
|
+
for (B in m)
|
1300
|
+
Z.call(m, B) && !rt.hasOwnProperty(B) && (k[B] = m[B]);
|
1278
1301
|
if (r && r.defaultProps) {
|
1279
|
-
var
|
1280
|
-
for (B in
|
1281
|
-
|
1302
|
+
var J = r.defaultProps;
|
1303
|
+
for (B in J)
|
1304
|
+
k[B] === void 0 && (k[B] = J[B]);
|
1282
1305
|
}
|
1283
|
-
if (
|
1284
|
-
var
|
1285
|
-
|
1306
|
+
if (R || he) {
|
1307
|
+
var ne = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
1308
|
+
R && Fe(k, ne), he && Bt(k, ne);
|
1286
1309
|
}
|
1287
|
-
return s(r,
|
1310
|
+
return s(r, R, he, N, w, Le.current, k);
|
1288
1311
|
}
|
1289
1312
|
}
|
1290
|
-
var T =
|
1291
|
-
function
|
1313
|
+
var T = U.ReactCurrentOwner, F = U.ReactDebugCurrentFrame;
|
1314
|
+
function W(r) {
|
1292
1315
|
if (r) {
|
1293
|
-
var
|
1294
|
-
|
1316
|
+
var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
|
1317
|
+
F.setExtraStackFrame(g);
|
1295
1318
|
} else
|
1296
|
-
|
1319
|
+
F.setExtraStackFrame(null);
|
1297
1320
|
}
|
1298
|
-
var
|
1299
|
-
|
1321
|
+
var be;
|
1322
|
+
be = !1;
|
1300
1323
|
function ue(r) {
|
1301
1324
|
return typeof r == "object" && r !== null && r.$$typeof === n;
|
1302
1325
|
}
|
1303
|
-
function
|
1326
|
+
function _t() {
|
1304
1327
|
{
|
1305
1328
|
if (T.current) {
|
1306
|
-
var r =
|
1329
|
+
var r = le(T.current.type);
|
1307
1330
|
if (r)
|
1308
1331
|
return `
|
1309
1332
|
|
@@ -1312,142 +1335,142 @@ Check the render method of \`` + r + "`.";
|
|
1312
1335
|
return "";
|
1313
1336
|
}
|
1314
1337
|
}
|
1315
|
-
function
|
1338
|
+
function Rt(r) {
|
1316
1339
|
{
|
1317
1340
|
if (r !== void 0) {
|
1318
|
-
var
|
1341
|
+
var m = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
|
1319
1342
|
return `
|
1320
1343
|
|
1321
|
-
Check your code at ` +
|
1344
|
+
Check your code at ` + m + ":" + g + ".";
|
1322
1345
|
}
|
1323
1346
|
return "";
|
1324
1347
|
}
|
1325
1348
|
}
|
1326
|
-
var
|
1349
|
+
var ot = {};
|
1327
1350
|
function Oe(r) {
|
1328
1351
|
{
|
1329
|
-
var
|
1330
|
-
if (!
|
1352
|
+
var m = _t();
|
1353
|
+
if (!m) {
|
1331
1354
|
var g = typeof r == "string" ? r : r.displayName || r.name;
|
1332
|
-
g && (
|
1355
|
+
g && (m = `
|
1333
1356
|
|
1334
1357
|
Check the top-level render call using <` + g + ">.");
|
1335
1358
|
}
|
1336
|
-
return
|
1359
|
+
return m;
|
1337
1360
|
}
|
1338
1361
|
}
|
1339
|
-
function
|
1362
|
+
function ye(r, m) {
|
1340
1363
|
{
|
1341
1364
|
if (!r._store || r._store.validated || r.key != null)
|
1342
1365
|
return;
|
1343
1366
|
r._store.validated = !0;
|
1344
|
-
var g = Oe(
|
1345
|
-
if (
|
1367
|
+
var g = Oe(m);
|
1368
|
+
if (ot[g])
|
1346
1369
|
return;
|
1347
|
-
|
1348
|
-
var
|
1349
|
-
r && r._owner && r._owner !== T.current && (
|
1370
|
+
ot[g] = !0;
|
1371
|
+
var w = "";
|
1372
|
+
r && r._owner && r._owner !== T.current && (w = " It was passed a child from " + le(r._owner.type) + "."), W(r), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), W(null);
|
1350
1373
|
}
|
1351
1374
|
}
|
1352
|
-
function
|
1375
|
+
function Ge(r, m) {
|
1353
1376
|
{
|
1354
1377
|
if (typeof r != "object")
|
1355
1378
|
return;
|
1356
|
-
if (
|
1379
|
+
if (Ne(r))
|
1357
1380
|
for (var g = 0; g < r.length; g++) {
|
1358
|
-
var
|
1359
|
-
ue(
|
1381
|
+
var w = r[g];
|
1382
|
+
ue(w) && ye(w, m);
|
1360
1383
|
}
|
1361
1384
|
else if (ue(r))
|
1362
1385
|
r._store && (r._store.validated = !0);
|
1363
1386
|
else if (r) {
|
1364
|
-
var N =
|
1387
|
+
var N = V(r);
|
1365
1388
|
if (typeof N == "function" && N !== r.entries)
|
1366
|
-
for (var B = N.call(r),
|
1367
|
-
ue(
|
1389
|
+
for (var B = N.call(r), k; !(k = B.next()).done; )
|
1390
|
+
ue(k.value) && ye(k.value, m);
|
1368
1391
|
}
|
1369
1392
|
}
|
1370
1393
|
}
|
1371
|
-
function
|
1394
|
+
function He(r) {
|
1372
1395
|
{
|
1373
|
-
var
|
1374
|
-
if (
|
1396
|
+
var m = r.type;
|
1397
|
+
if (m == null || typeof m == "string")
|
1375
1398
|
return;
|
1376
1399
|
var g;
|
1377
|
-
if (typeof
|
1378
|
-
g =
|
1379
|
-
else if (typeof
|
1400
|
+
if (typeof m == "function")
|
1401
|
+
g = m.propTypes;
|
1402
|
+
else if (typeof m == "object" && (m.$$typeof === u || // Note: Memo only checks outer props here.
|
1380
1403
|
// Inner props are checked in the reconciler.
|
1381
|
-
|
1382
|
-
g =
|
1404
|
+
m.$$typeof === b))
|
1405
|
+
g = m.propTypes;
|
1383
1406
|
else
|
1384
1407
|
return;
|
1385
1408
|
if (g) {
|
1386
|
-
var
|
1387
|
-
|
1388
|
-
} else if (
|
1389
|
-
|
1390
|
-
var N =
|
1391
|
-
|
1409
|
+
var w = le(m);
|
1410
|
+
ie(g, r.props, "prop", w, r);
|
1411
|
+
} else if (m.PropTypes !== void 0 && !be) {
|
1412
|
+
be = !0;
|
1413
|
+
var N = le(m);
|
1414
|
+
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
1392
1415
|
}
|
1393
|
-
typeof
|
1416
|
+
typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1394
1417
|
}
|
1395
1418
|
}
|
1396
|
-
function
|
1419
|
+
function We(r) {
|
1397
1420
|
{
|
1398
|
-
for (var
|
1399
|
-
var
|
1400
|
-
if (
|
1401
|
-
|
1421
|
+
for (var m = Object.keys(r.props), g = 0; g < m.length; g++) {
|
1422
|
+
var w = m[g];
|
1423
|
+
if (w !== "children" && w !== "key") {
|
1424
|
+
W(r), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), W(null);
|
1402
1425
|
break;
|
1403
1426
|
}
|
1404
1427
|
}
|
1405
|
-
r.ref !== null && (
|
1428
|
+
r.ref !== null && (W(r), j("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
1406
1429
|
}
|
1407
1430
|
}
|
1408
|
-
function
|
1431
|
+
function qe(r, m, g, w, N, B) {
|
1409
1432
|
{
|
1410
|
-
var
|
1411
|
-
if (!
|
1412
|
-
var
|
1413
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
1414
|
-
var
|
1415
|
-
|
1416
|
-
var
|
1417
|
-
r === null ?
|
1433
|
+
var k = ze(r);
|
1434
|
+
if (!k) {
|
1435
|
+
var R = "";
|
1436
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1437
|
+
var he = Rt(N);
|
1438
|
+
he ? R += he : R += _t();
|
1439
|
+
var J;
|
1440
|
+
r === null ? J = "null" : Ne(r) ? J = "array" : r !== void 0 && r.$$typeof === n ? (J = "<" + (le(r.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : J = typeof r, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, R);
|
1418
1441
|
}
|
1419
|
-
var
|
1420
|
-
if (
|
1421
|
-
return
|
1422
|
-
if (
|
1423
|
-
var
|
1424
|
-
if (
|
1425
|
-
if (
|
1426
|
-
if (
|
1427
|
-
for (var
|
1428
|
-
|
1429
|
-
Object.freeze && Object.freeze(
|
1442
|
+
var ne = y(r, m, g, N, B);
|
1443
|
+
if (ne == null)
|
1444
|
+
return ne;
|
1445
|
+
if (k) {
|
1446
|
+
var Ee = m.children;
|
1447
|
+
if (Ee !== void 0)
|
1448
|
+
if (w)
|
1449
|
+
if (Ne(Ee)) {
|
1450
|
+
for (var Qe = 0; Qe < Ee.length; Qe++)
|
1451
|
+
Ge(Ee[Qe], r);
|
1452
|
+
Object.freeze && Object.freeze(Ee);
|
1430
1453
|
} else
|
1431
|
-
|
1454
|
+
j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1432
1455
|
else
|
1433
|
-
|
1456
|
+
Ge(Ee, r);
|
1434
1457
|
}
|
1435
|
-
return r === e ?
|
1458
|
+
return r === e ? We(ne) : He(ne), ne;
|
1436
1459
|
}
|
1437
1460
|
}
|
1438
|
-
function An(r,
|
1439
|
-
return
|
1461
|
+
function An(r, m, g) {
|
1462
|
+
return qe(r, m, g, !0);
|
1440
1463
|
}
|
1441
|
-
function kn(r,
|
1442
|
-
return
|
1464
|
+
function kn(r, m, g) {
|
1465
|
+
return qe(r, m, g, !1);
|
1443
1466
|
}
|
1444
1467
|
var jn = kn, Dn = An;
|
1445
|
-
|
1446
|
-
}()),
|
1468
|
+
lt.Fragment = e, lt.jsx = jn, lt.jsxs = Dn;
|
1469
|
+
}()), lt;
|
1447
1470
|
}
|
1448
1471
|
process.env.NODE_ENV === "production" ? Nt.exports = wa() : Nt.exports = Oa();
|
1449
1472
|
var l = Nt.exports;
|
1450
|
-
function
|
1473
|
+
function _n(t) {
|
1451
1474
|
return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
|
1452
1475
|
}
|
1453
1476
|
const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
@@ -1462,7 +1485,7 @@ 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
|
|
1462
1485
|
C11,8.22,10.74,8,10.43,8z`
|
1463
1486
|
}
|
1464
1487
|
) });
|
1465
|
-
function
|
1488
|
+
function _a(t) {
|
1466
1489
|
return /* @__PURE__ */ l.jsx(Sn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
|
1467
1490
|
Ta,
|
1468
1491
|
/* @__PURE__ */ l.jsx("span", { children: t.title }),
|
@@ -1471,26 +1494,26 @@ function Ra(t) {
|
|
1471
1494
|
}, children: Ma })
|
1472
1495
|
] }) }, t.title);
|
1473
1496
|
}
|
1474
|
-
function
|
1475
|
-
const [n, a] =
|
1476
|
-
t.onDragComplete(
|
1477
|
-
}, h = (
|
1478
|
-
const
|
1479
|
-
|
1480
|
-
},
|
1481
|
-
e.forEach((
|
1482
|
-
|
1497
|
+
function Ra(t) {
|
1498
|
+
const [n, a] = ae(!1), [e, i] = ae(t.options), c = (d) => {
|
1499
|
+
t.onDragComplete(d), i(d);
|
1500
|
+
}, h = (d) => {
|
1501
|
+
const f = [...e];
|
1502
|
+
f.splice(d, 1), c(f);
|
1503
|
+
}, o = [];
|
1504
|
+
e.forEach((d, f) => {
|
1505
|
+
o.push(/* @__PURE__ */ l.jsx(_a, { index: f, title: d, onDelete: h }, d));
|
1483
1506
|
});
|
1484
|
-
let
|
1485
|
-
return t.subdropdown && (
|
1486
|
-
/* @__PURE__ */ l.jsx(
|
1487
|
-
/* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder:
|
1507
|
+
let u = "dropdown draggable";
|
1508
|
+
return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1509
|
+
/* @__PURE__ */ l.jsx(_n, { title: t.title }),
|
1510
|
+
/* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
|
1488
1511
|
] });
|
1489
1512
|
}
|
1490
1513
|
function Pa(t) {
|
1491
|
-
const [n, a] =
|
1492
|
-
t.options.map((
|
1493
|
-
t.onSelect !== void 0 && (
|
1514
|
+
const [n, a] = ae(!1), e = [];
|
1515
|
+
t.options.map((c, h) => {
|
1516
|
+
t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: c }, h));
|
1494
1517
|
});
|
1495
1518
|
let i = "dropdown";
|
1496
1519
|
return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
|
@@ -1500,7 +1523,7 @@ function Pa(t) {
|
|
1500
1523
|
onMouseEnter: () => a(!0),
|
1501
1524
|
onMouseLeave: () => a(!1),
|
1502
1525
|
children: [
|
1503
|
-
/* @__PURE__ */ l.jsx(
|
1526
|
+
/* @__PURE__ */ l.jsx(_n, { title: t.title }),
|
1504
1527
|
/* @__PURE__ */ l.jsx(
|
1505
1528
|
"ul",
|
1506
1529
|
{
|
@@ -1513,17 +1536,17 @@ function Pa(t) {
|
|
1513
1536
|
);
|
1514
1537
|
}
|
1515
1538
|
function Aa(t) {
|
1516
|
-
const { option: n } = t, [a, e] =
|
1539
|
+
const { option: n } = t, [a, e] = ae("");
|
1517
1540
|
let i;
|
1518
1541
|
switch (n.type) {
|
1519
1542
|
case "draggable":
|
1520
1543
|
i = /* @__PURE__ */ l.jsx(
|
1521
|
-
|
1544
|
+
Ra,
|
1522
1545
|
{
|
1523
1546
|
title: n.title,
|
1524
1547
|
options: n.value,
|
1525
|
-
onDragComplete: (
|
1526
|
-
n.onDragComplete !== void 0 && n.onDragComplete(
|
1548
|
+
onDragComplete: (c) => {
|
1549
|
+
n.onDragComplete !== void 0 && n.onDragComplete(c);
|
1527
1550
|
},
|
1528
1551
|
subdropdown: !0
|
1529
1552
|
}
|
@@ -1554,31 +1577,31 @@ function Aa(t) {
|
|
1554
1577
|
}
|
1555
1578
|
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ma());
|
1556
1579
|
}
|
1557
|
-
function
|
1558
|
-
function e(
|
1580
|
+
function xi(t, n, a) {
|
1581
|
+
function e(c) {
|
1559
1582
|
switch (n.forEach((h) => {
|
1560
|
-
h.callback(t, h.remote,
|
1561
|
-
}),
|
1583
|
+
h.callback(t, h.remote, c);
|
1584
|
+
}), c.event) {
|
1562
1585
|
case "custom":
|
1563
|
-
D.dispatchEvent({ type: I.CUSTOM, value:
|
1586
|
+
D.dispatchEvent({ type: I.CUSTOM, value: c.data });
|
1564
1587
|
break;
|
1565
1588
|
}
|
1566
1589
|
}
|
1567
|
-
function i(
|
1590
|
+
function i(c) {
|
1568
1591
|
switch (a.forEach((h) => {
|
1569
|
-
h.callback(t, h.remote,
|
1570
|
-
}),
|
1592
|
+
h.callback(t, h.remote, c);
|
1593
|
+
}), c.event) {
|
1571
1594
|
case "custom":
|
1572
|
-
D.dispatchEvent({ type: I.CUSTOM, value:
|
1595
|
+
D.dispatchEvent({ type: I.CUSTOM, value: c.data });
|
1573
1596
|
break;
|
1574
1597
|
}
|
1575
1598
|
}
|
1576
|
-
t.listen = (
|
1577
|
-
|
1599
|
+
t.listen = (c) => {
|
1600
|
+
c.target === "editor" ? i(c) : e(c);
|
1578
1601
|
};
|
1579
1602
|
}
|
1580
1603
|
function Ft(t) {
|
1581
|
-
const [n, a] =
|
1604
|
+
const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1582
1605
|
return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1583
1606
|
/* @__PURE__ */ l.jsxs(
|
1584
1607
|
"button",
|
@@ -1596,7 +1619,7 @@ function Ft(t) {
|
|
1596
1619
|
children: "Toggle"
|
1597
1620
|
}
|
1598
1621
|
),
|
1599
|
-
/* @__PURE__ */ l.jsx("p", { className: "label", children:
|
1622
|
+
/* @__PURE__ */ l.jsx("p", { className: "label", children: St(t.label) })
|
1600
1623
|
]
|
1601
1624
|
}
|
1602
1625
|
),
|
@@ -1604,10 +1627,10 @@ function Ft(t) {
|
|
1604
1627
|
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
|
1605
1628
|
] });
|
1606
1629
|
}
|
1607
|
-
function
|
1608
|
-
const [n, a] =
|
1609
|
-
return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((
|
1610
|
-
i.push(/* @__PURE__ */ l.jsx(
|
1630
|
+
function Rn(t) {
|
1631
|
+
const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
|
1632
|
+
return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((c) => {
|
1633
|
+
i.push(/* @__PURE__ */ l.jsx(Rn, { child: c, three: t.three }, Math.random()));
|
1611
1634
|
}), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
|
1612
1635
|
/* @__PURE__ */ l.jsxs("div", { className: "child", children: [
|
1613
1636
|
e ? /* @__PURE__ */ l.jsx(
|
@@ -1643,21 +1666,21 @@ function _n(t) {
|
|
1643
1666
|
function ka(t) {
|
1644
1667
|
const n = [];
|
1645
1668
|
return t.child?.children.map((a) => {
|
1646
|
-
n.push(/* @__PURE__ */ l.jsx(
|
1669
|
+
n.push(/* @__PURE__ */ l.jsx(Rn, { child: a, three: t.three }, Math.random()));
|
1647
1670
|
}), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1648
1671
|
}
|
1649
1672
|
const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1650
1673
|
function Da(t) {
|
1651
1674
|
return "items" in t;
|
1652
1675
|
}
|
1653
|
-
function
|
1676
|
+
function Ze(t) {
|
1654
1677
|
const n = [];
|
1655
1678
|
return t.items.forEach((a) => {
|
1656
1679
|
Da(a) ? n.push(
|
1657
|
-
/* @__PURE__ */ l.jsx(
|
1680
|
+
/* @__PURE__ */ l.jsx(Ze, { title: St(a.title), items: a.items }, Math.random())
|
1658
1681
|
) : n.push(
|
1659
1682
|
/* @__PURE__ */ l.jsx(
|
1660
|
-
|
1683
|
+
dt,
|
1661
1684
|
{
|
1662
1685
|
title: a.title,
|
1663
1686
|
prop: a.prop,
|
@@ -1680,7 +1703,7 @@ function We(t) {
|
|
1680
1703
|
function Ia(t) {
|
1681
1704
|
return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
|
1682
1705
|
}
|
1683
|
-
function
|
1706
|
+
function Ae(t) {
|
1684
1707
|
switch (t) {
|
1685
1708
|
case "alphaMap":
|
1686
1709
|
return "Alpha Map";
|
@@ -1864,8 +1887,8 @@ function La() {
|
|
1864
1887
|
a();
|
1865
1888
|
else {
|
1866
1889
|
const e = t.files[0], i = new FileReader();
|
1867
|
-
i.onload = function(
|
1868
|
-
n(
|
1890
|
+
i.onload = function(c) {
|
1891
|
+
n(c.target.result);
|
1869
1892
|
}, i.readAsDataURL(e);
|
1870
1893
|
}
|
1871
1894
|
}), t.click();
|
@@ -2049,256 +2072,283 @@ const Fa = [
|
|
2049
2072
|
valye: En
|
2050
2073
|
}
|
2051
2074
|
];
|
2052
|
-
function
|
2075
|
+
function ut(t, n) {
|
2053
2076
|
t.needsUpdate = !0, t.type = "option", t.options = n;
|
2054
2077
|
}
|
2078
|
+
function Ya(t, n, a, e) {
|
2079
|
+
return {
|
2080
|
+
type: "boolean",
|
2081
|
+
title: Ae(t),
|
2082
|
+
prop: t,
|
2083
|
+
value: n,
|
2084
|
+
needsUpdate: !0,
|
2085
|
+
onChange: (i, c) => {
|
2086
|
+
e.updateObject(a.uuid, `material.${t}`, c), e.updateObject(a.uuid, "material.needsUpdate", !0);
|
2087
|
+
const h = e.scene?.getObjectByProperty("uuid", a.uuid);
|
2088
|
+
h !== void 0 && K(h, `material.${t}`, c);
|
2089
|
+
}
|
2090
|
+
};
|
2091
|
+
}
|
2092
|
+
function Va(t, n, a, e) {
|
2093
|
+
const i = {
|
2094
|
+
type: "number",
|
2095
|
+
title: Ae(t),
|
2096
|
+
prop: t,
|
2097
|
+
value: n,
|
2098
|
+
min: void 0,
|
2099
|
+
max: void 0,
|
2100
|
+
step: 0.01,
|
2101
|
+
needsUpdate: !0,
|
2102
|
+
onChange: (c, h) => {
|
2103
|
+
e.updateObject(a.uuid, `material.${t}`, h), e.updateObject(a.uuid, "material.needsUpdate", !0);
|
2104
|
+
const o = e.scene?.getObjectByProperty("uuid", a.uuid);
|
2105
|
+
o !== void 0 && K(o, `material.${t}`, h);
|
2106
|
+
}
|
2107
|
+
};
|
2108
|
+
switch (t) {
|
2109
|
+
case "blending":
|
2110
|
+
ut(i, Ba);
|
2111
|
+
break;
|
2112
|
+
case "blendDst":
|
2113
|
+
ut(i, za);
|
2114
|
+
break;
|
2115
|
+
case "blendEquation":
|
2116
|
+
ut(i, Ua);
|
2117
|
+
break;
|
2118
|
+
case "blendSrc":
|
2119
|
+
ut(i, $a);
|
2120
|
+
break;
|
2121
|
+
case "side":
|
2122
|
+
ut(i, Fa);
|
2123
|
+
break;
|
2124
|
+
}
|
2125
|
+
return Na(t) && (i.value = Number(n), i.type = "range", i.min = 0, i.max = 1, i.step = 0.01), i;
|
2126
|
+
}
|
2127
|
+
function Ga(t, n, a, e) {
|
2128
|
+
const i = {
|
2129
|
+
type: "string",
|
2130
|
+
title: Ae(t),
|
2131
|
+
prop: t,
|
2132
|
+
value: n,
|
2133
|
+
needsUpdate: !0,
|
2134
|
+
onChange: (h, o) => {
|
2135
|
+
e.updateObject(a.uuid, `material.${t}`, o), e.updateObject(a.uuid, "material.needsUpdate", !0);
|
2136
|
+
const u = e.scene?.getObjectByProperty("uuid", a.uuid);
|
2137
|
+
u !== void 0 && K(u, `material.${t}`, o);
|
2138
|
+
}
|
2139
|
+
};
|
2140
|
+
return (t === "vertexShader" || t === "fragmentShader") && (i.disabled = !1, i.latest = i.value, i.onChange = (h, o) => {
|
2141
|
+
i.latest = o;
|
2142
|
+
}), i;
|
2143
|
+
}
|
2055
2144
|
function Xt(t, n, a) {
|
2056
2145
|
const e = [];
|
2057
2146
|
for (const i in t) {
|
2058
2147
|
if (!Ia(i))
|
2059
2148
|
continue;
|
2060
|
-
const
|
2061
|
-
if (
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2065
|
-
|
2066
|
-
|
2067
|
-
|
2068
|
-
max: void 0,
|
2069
|
-
needsUpdate: o === "boolean",
|
2070
|
-
onChange: (u, m) => {
|
2071
|
-
a.updateObject(n.uuid, `material.${u}`, m), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
|
2072
|
-
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2073
|
-
b !== void 0 && ee(b, `material.${u}`, m);
|
2074
|
-
}
|
2075
|
-
};
|
2076
|
-
switch (i) {
|
2077
|
-
case "blending":
|
2078
|
-
ct(c, Ba);
|
2079
|
-
break;
|
2080
|
-
case "blendDst":
|
2081
|
-
ct(c, za);
|
2082
|
-
break;
|
2083
|
-
case "blendEquation":
|
2084
|
-
ct(c, Ua);
|
2085
|
-
break;
|
2086
|
-
case "blendSrc":
|
2087
|
-
ct(c, $a);
|
2088
|
-
break;
|
2089
|
-
case "side":
|
2090
|
-
ct(c, Fa);
|
2091
|
-
break;
|
2092
|
-
}
|
2093
|
-
Na(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
|
2094
|
-
const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
|
2095
|
-
d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, m) => {
|
2096
|
-
c.latest = m;
|
2097
|
-
}), e.push(c), d && e.push({
|
2098
|
-
title: `${dt(i)} - Update`,
|
2099
|
-
type: "button",
|
2100
|
-
onChange: () => {
|
2101
|
-
a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
|
2102
|
-
const u = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2103
|
-
u !== void 0 && (ee(u, `material.${i}`, c.latest), u.material.needsUpdate = !0);
|
2104
|
-
}
|
2105
|
-
});
|
2106
|
-
} else if (o === "object")
|
2149
|
+
const c = typeof t[i], h = t[i];
|
2150
|
+
if (c === "boolean")
|
2151
|
+
e.push(Ya(i, h, n, a));
|
2152
|
+
else if (c === "number")
|
2153
|
+
e.push(Va(i, h, n, a));
|
2154
|
+
else if (c === "string")
|
2155
|
+
e.push(Ga(i, h, n, a));
|
2156
|
+
else if (c === "object")
|
2107
2157
|
if (h.isColor)
|
2108
2158
|
e.push({
|
2109
|
-
title:
|
2159
|
+
title: Ae(i),
|
2110
2160
|
prop: i,
|
2111
2161
|
type: "color",
|
2112
2162
|
value: h,
|
2113
|
-
onChange: (
|
2114
|
-
const
|
2115
|
-
a.updateObject(n.uuid, `material.${
|
2116
|
-
const
|
2117
|
-
|
2163
|
+
onChange: (o, u) => {
|
2164
|
+
const d = new Ct(u);
|
2165
|
+
a.updateObject(n.uuid, `material.${o}`, d);
|
2166
|
+
const f = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2167
|
+
f !== void 0 && K(f, `material.${o}`, d);
|
2118
2168
|
}
|
2119
2169
|
});
|
2120
2170
|
else if (Array.isArray(h)) {
|
2121
|
-
const
|
2122
|
-
for (const
|
2123
|
-
|
2124
|
-
title: `${
|
2125
|
-
type: `${typeof h[
|
2126
|
-
value: h[
|
2127
|
-
onChange: (
|
2128
|
-
a.updateObject(n.uuid, `material.${i}`,
|
2171
|
+
const o = [];
|
2172
|
+
for (const u in h)
|
2173
|
+
o.push({
|
2174
|
+
title: `${u}`,
|
2175
|
+
type: `${typeof h[u]}`,
|
2176
|
+
value: h[u],
|
2177
|
+
onChange: (d, f) => {
|
2178
|
+
a.updateObject(n.uuid, `material.${i}`, f);
|
2129
2179
|
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2130
|
-
b !== void 0 &&
|
2180
|
+
b !== void 0 && K(b, `material.${i}`, f);
|
2131
2181
|
}
|
2132
2182
|
});
|
2133
2183
|
e.push({
|
2134
|
-
title:
|
2135
|
-
items:
|
2184
|
+
title: Ae(i),
|
2185
|
+
items: o
|
2136
2186
|
});
|
2137
2187
|
} else if (h.x !== void 0 && h.y !== void 0 && h.z === void 0)
|
2138
2188
|
e.push({
|
2139
|
-
title:
|
2189
|
+
title: Ae(i),
|
2140
2190
|
prop: i,
|
2141
2191
|
type: "vector",
|
2142
2192
|
value: h,
|
2143
|
-
onChange: (
|
2144
|
-
a.updateObject(n.uuid, `material.${
|
2145
|
-
const
|
2146
|
-
|
2193
|
+
onChange: (o, u) => {
|
2194
|
+
a.updateObject(n.uuid, `material.${o}`, u);
|
2195
|
+
const d = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2196
|
+
d !== void 0 && K(d, `material.${o}`, u);
|
2147
2197
|
}
|
2148
2198
|
});
|
2149
2199
|
else {
|
2150
|
-
const
|
2151
|
-
for (const
|
2152
|
-
const
|
2153
|
-
switch (typeof
|
2200
|
+
const o = [];
|
2201
|
+
for (const u in h) {
|
2202
|
+
const d = h[u];
|
2203
|
+
switch (typeof d) {
|
2154
2204
|
case "boolean":
|
2155
2205
|
case "number":
|
2156
2206
|
case "string":
|
2157
|
-
|
2158
|
-
title:
|
2207
|
+
u === "src" ? e.push({
|
2208
|
+
title: Ae(i),
|
2159
2209
|
type: "image",
|
2160
|
-
value:
|
2210
|
+
value: d,
|
2161
2211
|
onChange: (b, E) => {
|
2162
2212
|
a.createTexture(n.uuid, `material.${i}`, E);
|
2163
2213
|
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2164
|
-
x !== void 0 && It(E).then((
|
2165
|
-
|
2214
|
+
x !== void 0 && It(E).then((M) => {
|
2215
|
+
K(x, `material.${i}`, M), K(x, "material.needsUpdate", !0);
|
2166
2216
|
});
|
2167
2217
|
}
|
2168
|
-
}) :
|
2169
|
-
title: `${
|
2170
|
-
prop: `material.${i}.${
|
2171
|
-
type: `${typeof t[i][
|
2172
|
-
value: h[
|
2218
|
+
}) : o.push({
|
2219
|
+
title: `${Ae(u)}`,
|
2220
|
+
prop: `material.${i}.${u}`,
|
2221
|
+
type: `${typeof t[i][u]}`,
|
2222
|
+
value: h[u],
|
2173
2223
|
onChange: (b, E) => {
|
2174
|
-
a.updateObject(n.uuid, `material.${i}.${
|
2224
|
+
a.updateObject(n.uuid, `material.${i}.${u}`, E);
|
2175
2225
|
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2176
|
-
x !== void 0 &&
|
2226
|
+
x !== void 0 && K(x, `material.${i}.${u}`, E);
|
2177
2227
|
}
|
2178
2228
|
});
|
2179
2229
|
break;
|
2180
2230
|
case "object":
|
2181
|
-
if (
|
2182
|
-
|
2183
|
-
title:
|
2231
|
+
if (d.value !== void 0 && d.value.src !== void 0)
|
2232
|
+
o.push({
|
2233
|
+
title: Ae(u),
|
2184
2234
|
type: "image",
|
2185
|
-
value:
|
2235
|
+
value: d.value.src,
|
2186
2236
|
onChange: (b, E) => {
|
2187
|
-
a.createTexture(n.uuid, `material.${i}.${
|
2237
|
+
a.createTexture(n.uuid, `material.${i}.${u}.value`, h);
|
2188
2238
|
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2189
|
-
x !== void 0 && It(E).then((
|
2190
|
-
|
2239
|
+
x !== void 0 && It(E).then((M) => {
|
2240
|
+
K(x, `material.${i}.${u}.value`, M);
|
2191
2241
|
});
|
2192
2242
|
}
|
2193
2243
|
});
|
2194
2244
|
else if (i === "uniforms") {
|
2195
|
-
const b =
|
2245
|
+
const b = d.value, E = (x, M, P) => ({
|
2196
2246
|
title: x,
|
2197
2247
|
type: "number",
|
2198
2248
|
value: P,
|
2199
2249
|
step: 0.01,
|
2200
|
-
onChange: (
|
2201
|
-
const
|
2202
|
-
a.updateObject(n.uuid,
|
2203
|
-
const
|
2204
|
-
|
2250
|
+
onChange: (V, U) => {
|
2251
|
+
const j = `material.uniforms.${u}.value.${M}`;
|
2252
|
+
a.updateObject(n.uuid, j, U);
|
2253
|
+
const O = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2254
|
+
O !== void 0 && K(O, j, U);
|
2205
2255
|
}
|
2206
2256
|
});
|
2207
|
-
if (typeof
|
2208
|
-
|
2209
|
-
title:
|
2257
|
+
if (typeof d.value == "number")
|
2258
|
+
o.push({
|
2259
|
+
title: u,
|
2210
2260
|
type: "number",
|
2211
|
-
value:
|
2261
|
+
value: d.value,
|
2212
2262
|
step: 0.01,
|
2213
|
-
onChange: (x,
|
2263
|
+
onChange: (x, M) => {
|
2214
2264
|
const P = `material.${i}.${x}.value`;
|
2215
|
-
a.updateObject(n.uuid, P,
|
2216
|
-
const
|
2217
|
-
|
2265
|
+
a.updateObject(n.uuid, P, M);
|
2266
|
+
const V = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2267
|
+
V !== void 0 && K(V, P, M);
|
2218
2268
|
}
|
2219
2269
|
});
|
2220
2270
|
else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
|
2221
|
-
|
2222
|
-
title:
|
2271
|
+
o.push({
|
2272
|
+
title: u,
|
2223
2273
|
type: "color",
|
2224
|
-
value:
|
2225
|
-
onChange: (x,
|
2226
|
-
const P = new
|
2227
|
-
a.updateObject(n.uuid,
|
2228
|
-
const
|
2229
|
-
|
2274
|
+
value: d.value,
|
2275
|
+
onChange: (x, M) => {
|
2276
|
+
const P = new Ct(M), V = `material.${i}.${x}.value`;
|
2277
|
+
a.updateObject(n.uuid, V, P);
|
2278
|
+
const U = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2279
|
+
U !== void 0 && K(U, V, P);
|
2230
2280
|
}
|
2231
2281
|
});
|
2232
2282
|
else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
|
2233
|
-
|
2234
|
-
title:
|
2283
|
+
o.push({
|
2284
|
+
title: u,
|
2235
2285
|
type: "vector",
|
2236
|
-
value:
|
2237
|
-
prop: `material.${i}.${
|
2238
|
-
onChange: (x,
|
2239
|
-
a.updateObject(n.uuid, x,
|
2286
|
+
value: d.value,
|
2287
|
+
prop: `material.${i}.${u}.value`,
|
2288
|
+
onChange: (x, M) => {
|
2289
|
+
a.updateObject(n.uuid, x, M);
|
2240
2290
|
const P = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2241
|
-
P !== void 0 &&
|
2291
|
+
P !== void 0 && K(P, x, M);
|
2242
2292
|
}
|
2243
2293
|
});
|
2244
2294
|
else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
|
2245
|
-
|
2295
|
+
o.push(
|
2246
2296
|
{
|
2247
|
-
title:
|
2297
|
+
title: u,
|
2248
2298
|
items: [
|
2249
|
-
E("X", "x",
|
2250
|
-
E("Y", "y",
|
2251
|
-
E("Z", "z",
|
2299
|
+
E("X", "x", d.value.x),
|
2300
|
+
E("Y", "y", d.value.y),
|
2301
|
+
E("Z", "z", d.value.z)
|
2252
2302
|
]
|
2253
2303
|
}
|
2254
2304
|
);
|
2255
2305
|
else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
|
2256
|
-
|
2306
|
+
o.push(
|
2257
2307
|
{
|
2258
|
-
title:
|
2308
|
+
title: u,
|
2259
2309
|
items: [
|
2260
|
-
E("X", "x",
|
2261
|
-
E("Y", "y",
|
2262
|
-
E("Z", "z",
|
2263
|
-
E("W", "w",
|
2310
|
+
E("X", "x", d.value.x),
|
2311
|
+
E("Y", "y", d.value.y),
|
2312
|
+
E("Z", "z", d.value.z),
|
2313
|
+
E("W", "w", d.value.w)
|
2264
2314
|
]
|
2265
2315
|
}
|
2266
2316
|
);
|
2267
2317
|
else if (b.elements !== void 0) {
|
2268
|
-
const x = b.elements,
|
2318
|
+
const x = b.elements, M = [];
|
2269
2319
|
for (let P = 0; P < x.length; P++)
|
2270
|
-
|
2271
|
-
|
2320
|
+
M.push(E(P.toString(), P.toString(), x[P]));
|
2321
|
+
o.push(
|
2272
2322
|
{
|
2273
|
-
title:
|
2274
|
-
items:
|
2323
|
+
title: u,
|
2324
|
+
items: M
|
2275
2325
|
}
|
2276
2326
|
);
|
2277
2327
|
} else
|
2278
|
-
console.log(">>> need to add this format:",
|
2328
|
+
console.log(">>> need to add this format:", u, b);
|
2279
2329
|
} else
|
2280
|
-
|
2281
|
-
title:
|
2282
|
-
type: `${typeof
|
2283
|
-
value:
|
2330
|
+
o.push({
|
2331
|
+
title: u,
|
2332
|
+
type: `${typeof d.value}`,
|
2333
|
+
value: d.value,
|
2284
2334
|
onChange: (b, E) => {
|
2285
|
-
a.updateObject(n.uuid, `material.${i}.${
|
2335
|
+
a.updateObject(n.uuid, `material.${i}.${u}.value`, E);
|
2286
2336
|
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2287
|
-
x !== void 0 &&
|
2337
|
+
x !== void 0 && K(x, `material.${i}.${u}.value`, E);
|
2288
2338
|
}
|
2289
2339
|
});
|
2290
2340
|
break;
|
2291
2341
|
}
|
2292
2342
|
}
|
2293
|
-
|
2294
|
-
title:
|
2295
|
-
items:
|
2343
|
+
o.length > 0 && e.push({
|
2344
|
+
title: Ae(i),
|
2345
|
+
items: o
|
2296
2346
|
});
|
2297
2347
|
}
|
2298
2348
|
else
|
2299
|
-
h !== void 0 && console.log("other:", i,
|
2349
|
+
h !== void 0 && console.log("other:", i, c, h);
|
2300
2350
|
}
|
2301
|
-
return e.sort((i,
|
2351
|
+
return e.sort((i, c) => i.title < c.title ? -1 : i.title > c.title ? 1 : 0), e.push({
|
2302
2352
|
title: "Update Material",
|
2303
2353
|
type: "button",
|
2304
2354
|
onChange: () => {
|
@@ -2306,60 +2356,59 @@ function Xt(t, n, a) {
|
|
2306
2356
|
}
|
2307
2357
|
}), e;
|
2308
2358
|
}
|
2309
|
-
function
|
2359
|
+
function Ha(t, n) {
|
2310
2360
|
const a = t.material;
|
2311
2361
|
if (Array.isArray(a)) {
|
2312
2362
|
const e = [], i = a.length;
|
2313
|
-
for (let
|
2363
|
+
for (let c = 0; c < i; c++)
|
2314
2364
|
e.push(
|
2315
2365
|
/* @__PURE__ */ l.jsx(
|
2316
|
-
|
2366
|
+
Ze,
|
2317
2367
|
{
|
2318
|
-
title: `Material ${
|
2319
|
-
items: Xt(a[
|
2368
|
+
title: `Material ${c}`,
|
2369
|
+
items: Xt(a[c], t, n)
|
2320
2370
|
},
|
2321
|
-
`Material ${
|
2371
|
+
`Material ${c}`
|
2322
2372
|
)
|
2323
2373
|
);
|
2324
2374
|
return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
|
2325
2375
|
} else
|
2326
2376
|
return /* @__PURE__ */ l.jsx(
|
2327
|
-
|
2377
|
+
Ze,
|
2328
2378
|
{
|
2329
2379
|
title: "Material",
|
2330
2380
|
items: Xt(a, t, n)
|
2331
2381
|
}
|
2332
2382
|
);
|
2333
2383
|
}
|
2334
|
-
function
|
2335
|
-
const n =
|
2384
|
+
function Wa(t) {
|
2385
|
+
const n = fe(null), a = fe(null), e = fe(null), i = fe(null), c = fe(null), h = fe(null), [o, u] = ae(t.value), [d, f] = ae({ min: t.min, max: t.max }), [b, E] = ae(!1);
|
2336
2386
|
function x() {
|
2337
|
-
b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup",
|
2387
|
+
b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", M), window.addEventListener("mouseup", M), E(!0));
|
2388
|
+
}
|
2389
|
+
function M() {
|
2390
|
+
window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", M), E(!1);
|
2338
2391
|
}
|
2339
|
-
function
|
2340
|
-
|
2392
|
+
function P(O) {
|
2393
|
+
const re = c.current.getBoundingClientRect(), Q = Xe(0, 99, O.clientX - re.left) / 99, Ce = Xe(0, 99, O.clientY - re.top) / 99, G = ht(Wt(d.min, d.max, Q), 3), ee = ht(Wt(d.min, d.max, Ce), 3);
|
2394
|
+
t.onChange({ target: { value: { x: G, y: ee } } }), u({ x: G, y: ee });
|
2341
2395
|
}
|
2342
|
-
function
|
2343
|
-
|
2344
|
-
|
2396
|
+
function V(O) {
|
2397
|
+
let re = o.x, Q = o.y;
|
2398
|
+
O.target === n.current ? re = Number(O.target.value) : Q = Number(O.target.value), u({ x: re, y: Q });
|
2345
2399
|
}
|
2346
|
-
function
|
2347
|
-
|
2348
|
-
|
2400
|
+
function U() {
|
2401
|
+
const O = Number(e.current.value);
|
2402
|
+
f({ min: O, max: d.max }), (o.x < O || o.y < O) && u({ x: Xe(O, d.max, o.x), y: Xe(O, d.max, o.y) });
|
2349
2403
|
}
|
2350
|
-
function
|
2351
|
-
const
|
2352
|
-
|
2404
|
+
function j() {
|
2405
|
+
const O = Number(i.current.value);
|
2406
|
+
f({ min: d.min, max: O }), (o.x > O || o.y > O) && u({ x: Xe(d.min, O, o.x), y: Xe(d.min, O, o.y) });
|
2353
2407
|
}
|
2354
|
-
|
2355
|
-
const
|
2356
|
-
|
2357
|
-
}
|
2358
|
-
return Re(() => {
|
2359
|
-
console.log(u.min, u.max, c.x, c.y);
|
2360
|
-
const w = Ht(u.min, u.max, c.x), ae = Ht(u.min, u.max, c.y);
|
2361
|
-
h.current.style.left = `${w * 100}%`, h.current.style.top = `${ae * 100}%`;
|
2362
|
-
}, [u, c]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
|
2408
|
+
return ke(() => {
|
2409
|
+
const O = Ht(d.min, d.max, o.x), re = Ht(d.min, d.max, o.y);
|
2410
|
+
h.current.style.left = `${O * 100}%`, h.current.style.top = `${re * 100}%`;
|
2411
|
+
}, [d, o]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
|
2363
2412
|
/* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
|
2364
2413
|
/* @__PURE__ */ l.jsxs("div", { children: [
|
2365
2414
|
/* @__PURE__ */ l.jsx("label", { children: "X:" }),
|
@@ -2368,11 +2417,11 @@ function Va(t) {
|
|
2368
2417
|
{
|
2369
2418
|
ref: n,
|
2370
2419
|
type: "number",
|
2371
|
-
value:
|
2372
|
-
min:
|
2373
|
-
max:
|
2420
|
+
value: o.x,
|
2421
|
+
min: d.min,
|
2422
|
+
max: d.max,
|
2374
2423
|
step: 0.01,
|
2375
|
-
onChange:
|
2424
|
+
onChange: V
|
2376
2425
|
}
|
2377
2426
|
)
|
2378
2427
|
] }),
|
@@ -2383,11 +2432,11 @@ function Va(t) {
|
|
2383
2432
|
{
|
2384
2433
|
ref: a,
|
2385
2434
|
type: "number",
|
2386
|
-
value:
|
2387
|
-
min:
|
2388
|
-
max:
|
2435
|
+
value: o.y,
|
2436
|
+
min: d.min,
|
2437
|
+
max: d.max,
|
2389
2438
|
step: 0.01,
|
2390
|
-
onChange:
|
2439
|
+
onChange: V
|
2391
2440
|
}
|
2392
2441
|
)
|
2393
2442
|
] }),
|
@@ -2398,9 +2447,9 @@ function Va(t) {
|
|
2398
2447
|
{
|
2399
2448
|
ref: e,
|
2400
2449
|
type: "number",
|
2401
|
-
value:
|
2450
|
+
value: d.min,
|
2402
2451
|
step: 0.01,
|
2403
|
-
onChange:
|
2452
|
+
onChange: U
|
2404
2453
|
}
|
2405
2454
|
)
|
2406
2455
|
] }),
|
@@ -2411,65 +2460,65 @@ function Va(t) {
|
|
2411
2460
|
{
|
2412
2461
|
ref: i,
|
2413
2462
|
type: "number",
|
2414
|
-
value:
|
2463
|
+
value: d.max,
|
2415
2464
|
step: 0.01,
|
2416
|
-
onChange:
|
2465
|
+
onChange: j
|
2417
2466
|
}
|
2418
2467
|
)
|
2419
2468
|
] })
|
2420
2469
|
] }),
|
2421
|
-
/* @__PURE__ */ l.jsxs("div", { className: "input", ref:
|
2470
|
+
/* @__PURE__ */ l.jsxs("div", { className: "input", ref: c, onMouseDown: x, onMouseUp: M, children: [
|
2422
2471
|
/* @__PURE__ */ l.jsx("div", { className: "x" }),
|
2423
2472
|
/* @__PURE__ */ l.jsx("div", { className: "y" }),
|
2424
2473
|
/* @__PURE__ */ l.jsx("div", { className: "pt", ref: h })
|
2425
2474
|
] })
|
2426
2475
|
] });
|
2427
2476
|
}
|
2428
|
-
function
|
2477
|
+
function dt(t) {
|
2429
2478
|
let n = t.value;
|
2430
2479
|
n !== void 0 && n.isColor !== void 0 && (n = ga(t.value));
|
2431
|
-
const [a, e] =
|
2432
|
-
|
2433
|
-
let
|
2434
|
-
const
|
2435
|
-
|
2436
|
-
}, P = (
|
2437
|
-
if (!
|
2480
|
+
const [a, e] = ae(n), i = fe(null), c = fe(null), h = fe(null);
|
2481
|
+
ke(() => {
|
2482
|
+
let f = !1, b = -1, E = 0, x = Number(a);
|
2483
|
+
const M = (O) => {
|
2484
|
+
f = !0, E = x, b = O.clientX;
|
2485
|
+
}, P = (O) => {
|
2486
|
+
if (!f)
|
2438
2487
|
return;
|
2439
|
-
const
|
2440
|
-
x = Number((E +
|
2441
|
-
},
|
2442
|
-
|
2443
|
-
},
|
2444
|
-
|
2445
|
-
},
|
2446
|
-
return
|
2447
|
-
|
2488
|
+
const re = t.step !== void 0 ? t.step : 1, Q = (O.clientX - b) * re;
|
2489
|
+
x = Number((E + Q).toFixed(4)), c.current !== null && (c.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
|
2490
|
+
}, V = () => {
|
2491
|
+
f = !1;
|
2492
|
+
}, U = () => {
|
2493
|
+
f = !1;
|
2494
|
+
}, j = t.type === "number";
|
2495
|
+
return j && (i.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", V, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", U, !1)), () => {
|
2496
|
+
j && (i.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", V), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", U));
|
2448
2497
|
};
|
2449
2498
|
}, [a]);
|
2450
|
-
const
|
2451
|
-
`) > -1),
|
2452
|
-
let b =
|
2453
|
-
t.type === "boolean" ? b =
|
2499
|
+
const o = t.type === "string" && (a.length > 100 || a.search(`
|
2500
|
+
`) > -1), u = o || t.type === "image" || t.type === "vector", d = (f) => {
|
2501
|
+
let b = f.target.value;
|
2502
|
+
t.type === "boolean" ? b = f.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
|
2454
2503
|
};
|
2455
|
-
return /* @__PURE__ */ l.jsxs("div", { className: `field ${
|
2456
|
-
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children:
|
2457
|
-
t.type === "string" && !
|
2504
|
+
return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
|
2505
|
+
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: St(t.title) }, "fieldLabel"),
|
2506
|
+
t.type === "string" && !o && /* @__PURE__ */ l.jsx(
|
2458
2507
|
"input",
|
2459
2508
|
{
|
2460
2509
|
type: "text",
|
2461
2510
|
disabled: t.disabled,
|
2462
|
-
onChange:
|
2511
|
+
onChange: d,
|
2463
2512
|
value: a
|
2464
2513
|
}
|
2465
2514
|
),
|
2466
|
-
t.type === "string" &&
|
2515
|
+
t.type === "string" && o && /* @__PURE__ */ l.jsx(
|
2467
2516
|
"textarea",
|
2468
2517
|
{
|
2469
2518
|
cols: 50,
|
2470
2519
|
rows: 10,
|
2471
2520
|
disabled: t.disabled !== void 0 ? t.disabled : !0,
|
2472
|
-
onChange:
|
2521
|
+
onChange: d,
|
2473
2522
|
value: a
|
2474
2523
|
}
|
2475
2524
|
),
|
@@ -2478,25 +2527,25 @@ function lt(t) {
|
|
2478
2527
|
{
|
2479
2528
|
type: "checkbox",
|
2480
2529
|
disabled: t.disabled,
|
2481
|
-
onChange:
|
2530
|
+
onChange: d,
|
2482
2531
|
checked: a
|
2483
2532
|
}
|
2484
2533
|
),
|
2485
2534
|
t.type === "number" && /* @__PURE__ */ l.jsx(
|
2486
2535
|
"input",
|
2487
2536
|
{
|
2488
|
-
ref:
|
2537
|
+
ref: c,
|
2489
2538
|
type: "number",
|
2490
2539
|
value: a,
|
2491
2540
|
min: t.min,
|
2492
2541
|
max: t.max,
|
2493
2542
|
step: t.step,
|
2494
2543
|
disabled: t.disabled,
|
2495
|
-
onChange:
|
2544
|
+
onChange: d
|
2496
2545
|
}
|
2497
2546
|
),
|
2498
2547
|
t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2499
|
-
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange:
|
2548
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
|
2500
2549
|
/* @__PURE__ */ l.jsx(
|
2501
2550
|
"input",
|
2502
2551
|
{
|
@@ -2506,13 +2555,13 @@ function lt(t) {
|
|
2506
2555
|
min: t.min,
|
2507
2556
|
max: t.max,
|
2508
2557
|
step: t.step,
|
2509
|
-
onChange:
|
2558
|
+
onChange: d
|
2510
2559
|
}
|
2511
2560
|
)
|
2512
2561
|
] }),
|
2513
2562
|
t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2514
|
-
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange:
|
2515
|
-
/* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange:
|
2563
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
|
2564
|
+
/* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
|
2516
2565
|
] }),
|
2517
2566
|
t.type === "button" && /* @__PURE__ */ l.jsx(
|
2518
2567
|
"button",
|
@@ -2525,12 +2574,12 @@ function lt(t) {
|
|
2525
2574
|
}
|
2526
2575
|
),
|
2527
2576
|
t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
|
2528
|
-
La().then((
|
2529
|
-
h.current.src =
|
2577
|
+
La().then((f) => {
|
2578
|
+
h.current.src = f, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, f);
|
2530
2579
|
});
|
2531
2580
|
}, src: a.length > 0 ? a : ja }),
|
2532
|
-
t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange:
|
2533
|
-
t.type === "vector" && /* @__PURE__ */ l.jsx(
|
2581
|
+
t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((f, b) => /* @__PURE__ */ l.jsx("option", { value: f.value, children: St(f.title) }, b)) }) }),
|
2582
|
+
t.type === "vector" && /* @__PURE__ */ l.jsx(Wa, { value: a, min: -1, max: 1, onChange: d })
|
2534
2583
|
] });
|
2535
2584
|
}
|
2536
2585
|
function Zt(t) {
|
@@ -2562,7 +2611,7 @@ function Zt(t) {
|
|
2562
2611
|
}
|
2563
2612
|
return t;
|
2564
2613
|
}
|
2565
|
-
function
|
2614
|
+
function qa(t, n) {
|
2566
2615
|
const a = [];
|
2567
2616
|
if (t.perspectiveCameraInfo !== void 0)
|
2568
2617
|
for (const e in t.perspectiveCameraInfo)
|
@@ -2572,10 +2621,10 @@ function Ga(t, n) {
|
|
2572
2621
|
type: "number",
|
2573
2622
|
step: 0.01,
|
2574
2623
|
value: t.perspectiveCameraInfo[e],
|
2575
|
-
onChange: (i,
|
2576
|
-
n.updateObject(t.uuid, i,
|
2624
|
+
onChange: (i, c) => {
|
2625
|
+
n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2577
2626
|
const h = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2578
|
-
h !== void 0 && (
|
2627
|
+
h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
|
2579
2628
|
}
|
2580
2629
|
});
|
2581
2630
|
else if (t.orthographicCameraInfo !== void 0)
|
@@ -2586,44 +2635,44 @@ function Ga(t, n) {
|
|
2586
2635
|
type: "number",
|
2587
2636
|
step: 0.01,
|
2588
2637
|
value: t.perspectiveCameraInfo[e],
|
2589
|
-
onChange: (i,
|
2590
|
-
n.updateObject(t.uuid, i,
|
2638
|
+
onChange: (i, c) => {
|
2639
|
+
n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2591
2640
|
const h = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2592
|
-
h !== void 0 && (
|
2641
|
+
h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
|
2593
2642
|
}
|
2594
2643
|
});
|
2595
2644
|
return /* @__PURE__ */ l.jsx(
|
2596
|
-
|
2645
|
+
Ze,
|
2597
2646
|
{
|
2598
2647
|
title: "Camera",
|
2599
2648
|
items: a
|
2600
2649
|
}
|
2601
2650
|
);
|
2602
2651
|
}
|
2603
|
-
const
|
2604
|
-
function
|
2652
|
+
const Ka = Math.PI / 180, Xa = 180 / Math.PI;
|
2653
|
+
function at(t, n, a, e, i) {
|
2605
2654
|
return e + (t - n) * (i - e) / (a - n);
|
2606
2655
|
}
|
2607
|
-
function
|
2608
|
-
return t *
|
2656
|
+
function Za(t) {
|
2657
|
+
return t * Ka;
|
2609
2658
|
}
|
2610
2659
|
function kt(t) {
|
2611
|
-
return t *
|
2660
|
+
return t * Xa;
|
2612
2661
|
}
|
2613
|
-
function
|
2662
|
+
function Ja(t, n) {
|
2614
2663
|
const a = new Xn();
|
2615
2664
|
a.elements = t.matrix;
|
2616
|
-
const e = new
|
2617
|
-
t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a),
|
2618
|
-
const h = (
|
2619
|
-
n.updateObject(t.uuid,
|
2620
|
-
const
|
2621
|
-
|
2622
|
-
},
|
2623
|
-
h(
|
2665
|
+
const e = new q(), i = new Zn(), c = new q();
|
2666
|
+
t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), c.setFromMatrixScale(a));
|
2667
|
+
const h = (u, d) => {
|
2668
|
+
n.updateObject(t.uuid, u, d);
|
2669
|
+
const f = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2670
|
+
f !== void 0 && K(f, u, d);
|
2671
|
+
}, o = (u, d) => {
|
2672
|
+
h(u, Za(d));
|
2624
2673
|
};
|
2625
2674
|
return /* @__PURE__ */ l.jsx(
|
2626
|
-
|
2675
|
+
Ze,
|
2627
2676
|
{
|
2628
2677
|
title: "Transform",
|
2629
2678
|
items: [
|
@@ -2652,37 +2701,37 @@ function Ka(t, n) {
|
|
2652
2701
|
title: "Rotation X",
|
2653
2702
|
prop: "rotation.x",
|
2654
2703
|
type: "number",
|
2655
|
-
value:
|
2704
|
+
value: ht(kt(i.x)),
|
2656
2705
|
min: -360,
|
2657
2706
|
max: 360,
|
2658
2707
|
step: 0.1,
|
2659
|
-
onChange:
|
2708
|
+
onChange: o
|
2660
2709
|
},
|
2661
2710
|
{
|
2662
2711
|
title: "Rotation Y",
|
2663
2712
|
prop: "rotation.y",
|
2664
2713
|
type: "number",
|
2665
|
-
value:
|
2714
|
+
value: ht(kt(i.y)),
|
2666
2715
|
min: -360,
|
2667
2716
|
max: 360,
|
2668
2717
|
step: 0.1,
|
2669
|
-
onChange:
|
2718
|
+
onChange: o
|
2670
2719
|
},
|
2671
2720
|
{
|
2672
2721
|
title: "Rotation Z",
|
2673
2722
|
prop: "rotation.z",
|
2674
2723
|
type: "number",
|
2675
|
-
value:
|
2724
|
+
value: ht(kt(i.z)),
|
2676
2725
|
min: -360,
|
2677
2726
|
max: 360,
|
2678
2727
|
step: 0.1,
|
2679
|
-
onChange:
|
2728
|
+
onChange: o
|
2680
2729
|
},
|
2681
2730
|
{
|
2682
2731
|
title: "Scale X",
|
2683
2732
|
prop: "scale.x",
|
2684
2733
|
type: "number",
|
2685
|
-
value:
|
2734
|
+
value: c.x,
|
2686
2735
|
step: 0.01,
|
2687
2736
|
onChange: h
|
2688
2737
|
},
|
@@ -2690,7 +2739,7 @@ function Ka(t, n) {
|
|
2690
2739
|
title: "Scale Y",
|
2691
2740
|
prop: "scale.y",
|
2692
2741
|
type: "number",
|
2693
|
-
value:
|
2742
|
+
value: c.y,
|
2694
2743
|
step: 0.01,
|
2695
2744
|
onChange: h
|
2696
2745
|
},
|
@@ -2698,7 +2747,7 @@ function Ka(t, n) {
|
|
2698
2747
|
title: "Scale Z",
|
2699
2748
|
prop: "scale.z",
|
2700
2749
|
type: "number",
|
2701
|
-
value:
|
2750
|
+
value: c.z,
|
2702
2751
|
step: 0.01,
|
2703
2752
|
onChange: h
|
2704
2753
|
}
|
@@ -2725,7 +2774,7 @@ function Jt(t) {
|
|
2725
2774
|
}
|
2726
2775
|
return t;
|
2727
2776
|
}
|
2728
|
-
function
|
2777
|
+
function Qa(t, n) {
|
2729
2778
|
const a = [];
|
2730
2779
|
if (t.lightInfo !== void 0)
|
2731
2780
|
for (const e in t.lightInfo) {
|
@@ -2735,11 +2784,11 @@ function Xa(t, n) {
|
|
2735
2784
|
prop: e,
|
2736
2785
|
type: "color",
|
2737
2786
|
value: i,
|
2738
|
-
onChange: (
|
2739
|
-
const
|
2740
|
-
n.updateObject(t.uuid,
|
2741
|
-
const
|
2742
|
-
|
2787
|
+
onChange: (c, h) => {
|
2788
|
+
const o = new Ct(h);
|
2789
|
+
n.updateObject(t.uuid, c, o);
|
2790
|
+
const u = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2791
|
+
u !== void 0 && K(u, c, o);
|
2743
2792
|
}
|
2744
2793
|
}) : a.push({
|
2745
2794
|
title: Jt(e),
|
@@ -2747,32 +2796,32 @@ function Xa(t, n) {
|
|
2747
2796
|
type: typeof i,
|
2748
2797
|
value: i,
|
2749
2798
|
step: typeof i == "number" ? 0.01 : void 0,
|
2750
|
-
onChange: (
|
2751
|
-
n.updateObject(t.uuid,
|
2752
|
-
const
|
2753
|
-
|
2799
|
+
onChange: (c, h) => {
|
2800
|
+
n.updateObject(t.uuid, c, h);
|
2801
|
+
const o = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2802
|
+
o !== void 0 && K(o, c, h);
|
2754
2803
|
}
|
2755
2804
|
}));
|
2756
2805
|
}
|
2757
2806
|
return /* @__PURE__ */ l.jsx(
|
2758
|
-
|
2807
|
+
Ze,
|
2759
2808
|
{
|
2760
2809
|
title: "Light",
|
2761
2810
|
items: a
|
2762
2811
|
}
|
2763
2812
|
);
|
2764
2813
|
}
|
2765
|
-
function
|
2814
|
+
function ei(t, n) {
|
2766
2815
|
const a = [], e = [];
|
2767
2816
|
let i = 0;
|
2768
|
-
t.animations.forEach((
|
2769
|
-
i = Math.max(i,
|
2770
|
-
title:
|
2817
|
+
t.animations.forEach((o) => {
|
2818
|
+
i = Math.max(i, o.duration), o.duration > 0 && e.push({
|
2819
|
+
title: o.name,
|
2771
2820
|
items: [
|
2772
2821
|
{
|
2773
2822
|
title: "Duration",
|
2774
2823
|
type: "number",
|
2775
|
-
value:
|
2824
|
+
value: o.duration,
|
2776
2825
|
disabled: !0
|
2777
2826
|
},
|
2778
2827
|
{
|
@@ -2796,37 +2845,37 @@ function Za(t, n) {
|
|
2796
2845
|
title: "Animations",
|
2797
2846
|
items: e
|
2798
2847
|
});
|
2799
|
-
const
|
2848
|
+
const c = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2800
2849
|
let h = !1;
|
2801
|
-
if (
|
2802
|
-
const
|
2803
|
-
if (h =
|
2804
|
-
const
|
2850
|
+
if (c !== void 0) {
|
2851
|
+
const o = c.mixer;
|
2852
|
+
if (h = o !== void 0, h) {
|
2853
|
+
const u = [
|
2805
2854
|
{
|
2806
2855
|
title: "Time Scale",
|
2807
2856
|
type: "range",
|
2808
|
-
value:
|
2857
|
+
value: o.timeScale,
|
2809
2858
|
step: 0.01,
|
2810
2859
|
min: -1,
|
2811
2860
|
max: 2,
|
2812
|
-
onChange: (
|
2813
|
-
|
2861
|
+
onChange: (d, f) => {
|
2862
|
+
o.timeScale = f, n.updateObject(t.uuid, "mixer.timeScale", f);
|
2814
2863
|
}
|
2815
2864
|
}
|
2816
2865
|
];
|
2817
|
-
|
2866
|
+
u.push({
|
2818
2867
|
title: "Stop All",
|
2819
2868
|
type: "button",
|
2820
2869
|
onChange: () => {
|
2821
|
-
|
2870
|
+
o.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
|
2822
2871
|
}
|
2823
2872
|
}), a.push({
|
2824
2873
|
title: "Mixer",
|
2825
|
-
items:
|
2874
|
+
items: u
|
2826
2875
|
});
|
2827
2876
|
}
|
2828
2877
|
}
|
2829
|
-
return /* @__PURE__ */ l.jsx(
|
2878
|
+
return /* @__PURE__ */ l.jsx(Ze, { title: "Animation", items: a });
|
2830
2879
|
}
|
2831
2880
|
const Pn = {
|
2832
2881
|
name: "",
|
@@ -2840,180 +2889,180 @@ const Pn = {
|
|
2840
2889
|
orthographicCameraInfo: void 0,
|
2841
2890
|
lightInfo: void 0
|
2842
2891
|
};
|
2843
|
-
let
|
2844
|
-
function
|
2845
|
-
const [n, a] =
|
2846
|
-
|
2847
|
-
function h(
|
2848
|
-
|
2849
|
-
}
|
2850
|
-
function
|
2851
|
-
|
2852
|
-
}
|
2853
|
-
return D.addEventListener(I.SET_SCENE,
|
2854
|
-
D.removeEventListener(I.SET_SCENE,
|
2892
|
+
let oe = { ...Pn };
|
2893
|
+
function ti(t) {
|
2894
|
+
const [n, a] = ae(-1);
|
2895
|
+
ke(() => {
|
2896
|
+
function h(u) {
|
2897
|
+
oe = { ...u.value }, a(Date.now());
|
2898
|
+
}
|
2899
|
+
function o() {
|
2900
|
+
oe = { ...Pn }, a(Date.now());
|
2901
|
+
}
|
2902
|
+
return D.addEventListener(I.SET_SCENE, o), D.addEventListener(I.SET_OBJECT, h), () => {
|
2903
|
+
D.removeEventListener(I.SET_SCENE, o), D.removeEventListener(I.SET_OBJECT, h);
|
2855
2904
|
};
|
2856
2905
|
}, []);
|
2857
|
-
const e =
|
2858
|
-
return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children:
|
2906
|
+
const e = oe.type.toLowerCase(), i = oe.animations.length > 0 || oe.mixer !== void 0, c = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
|
2907
|
+
return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: oe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2859
2908
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2860
2909
|
/* @__PURE__ */ l.jsx(
|
2861
|
-
|
2910
|
+
dt,
|
2862
2911
|
{
|
2863
2912
|
type: "string",
|
2864
2913
|
title: "Name",
|
2865
2914
|
prop: "name",
|
2866
|
-
value:
|
2915
|
+
value: oe.name,
|
2867
2916
|
disabled: !0
|
2868
2917
|
}
|
2869
2918
|
),
|
2870
2919
|
/* @__PURE__ */ l.jsx(
|
2871
|
-
|
2920
|
+
dt,
|
2872
2921
|
{
|
2873
2922
|
type: "string",
|
2874
2923
|
title: "Type",
|
2875
2924
|
prop: "type",
|
2876
|
-
value:
|
2925
|
+
value: oe.type,
|
2877
2926
|
disabled: !0
|
2878
2927
|
}
|
2879
2928
|
),
|
2880
2929
|
/* @__PURE__ */ l.jsx(
|
2881
|
-
|
2930
|
+
dt,
|
2882
2931
|
{
|
2883
2932
|
type: "string",
|
2884
2933
|
title: "UUID",
|
2885
2934
|
prop: "uuid",
|
2886
|
-
value:
|
2935
|
+
value: oe.uuid,
|
2887
2936
|
disabled: !0
|
2888
2937
|
}
|
2889
2938
|
),
|
2890
2939
|
/* @__PURE__ */ l.jsx(
|
2891
|
-
|
2940
|
+
dt,
|
2892
2941
|
{
|
2893
2942
|
type: "boolean",
|
2894
2943
|
title: "Visible",
|
2895
2944
|
prop: "visible",
|
2896
|
-
value:
|
2897
|
-
onChange: (h,
|
2898
|
-
t.three.updateObject(
|
2899
|
-
const
|
2900
|
-
|
2945
|
+
value: oe.visible,
|
2946
|
+
onChange: (h, o) => {
|
2947
|
+
t.three.updateObject(oe.uuid, h, o);
|
2948
|
+
const u = t.three.scene?.getObjectByProperty("uuid", oe.uuid);
|
2949
|
+
u !== void 0 && K(u, h, o);
|
2901
2950
|
}
|
2902
2951
|
}
|
2903
2952
|
)
|
2904
2953
|
] }),
|
2905
2954
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2906
|
-
|
2907
|
-
i ?
|
2908
|
-
e.search("camera") > -1 ?
|
2909
|
-
e.search("light") > -1 ?
|
2910
|
-
|
2955
|
+
Ja(oe, t.three),
|
2956
|
+
i ? ei(oe, t.three) : null,
|
2957
|
+
e.search("camera") > -1 ? qa(oe, t.three) : null,
|
2958
|
+
e.search("light") > -1 ? Qa(oe, t.three) : null,
|
2959
|
+
c ? Ha(oe, t.three) : null
|
2911
2960
|
] })
|
2912
2961
|
] }) }, n) }, "Inspector");
|
2913
2962
|
}
|
2914
|
-
function
|
2915
|
-
const [n, a] =
|
2916
|
-
|
2917
|
-
const
|
2963
|
+
function Ci(t) {
|
2964
|
+
const [n, a] = ae(t.scene);
|
2965
|
+
ke(() => {
|
2966
|
+
const c = (h) => {
|
2918
2967
|
a(h.value);
|
2919
2968
|
};
|
2920
|
-
return D.addEventListener(I.SET_SCENE,
|
2921
|
-
D.removeEventListener(I.SET_SCENE,
|
2969
|
+
return D.addEventListener(I.SET_SCENE, c), () => {
|
2970
|
+
D.removeEventListener(I.SET_SCENE, c);
|
2922
2971
|
};
|
2923
2972
|
}, []);
|
2924
2973
|
const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
|
2925
2974
|
return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
|
2926
2975
|
/* @__PURE__ */ l.jsx(Ft, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(ka, { child: n, three: t.three }) }) }),
|
2927
|
-
/* @__PURE__ */ l.jsx(
|
2976
|
+
/* @__PURE__ */ l.jsx(ti, { three: t.three })
|
2928
2977
|
] }, "SidePanel");
|
2929
2978
|
}
|
2930
|
-
function
|
2979
|
+
function Si(t) {
|
2931
2980
|
function n() {
|
2932
2981
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2933
2982
|
}
|
2934
|
-
const a = (
|
2983
|
+
const a = (o) => {
|
2935
2984
|
if (!n())
|
2936
2985
|
return;
|
2937
|
-
const
|
2938
|
-
|
2939
|
-
}, e = (
|
2986
|
+
const u = t.three.scene?.getObjectByProperty("uuid", o.value);
|
2987
|
+
u !== void 0 && t.three.setObject(u);
|
2988
|
+
}, e = (o, u, d) => {
|
2940
2989
|
if (!n())
|
2941
2990
|
return;
|
2942
|
-
const
|
2943
|
-
|
2944
|
-
}, i = (
|
2991
|
+
const f = t.three.scene?.getObjectByProperty("uuid", o);
|
2992
|
+
f !== void 0 && K(f, u, d);
|
2993
|
+
}, i = (o) => {
|
2945
2994
|
if (!n())
|
2946
2995
|
return;
|
2947
|
-
const
|
2948
|
-
e(b,
|
2949
|
-
},
|
2996
|
+
const u = o.value, { key: d, value: f, uuid: b } = u;
|
2997
|
+
e(b, d, f);
|
2998
|
+
}, c = (o) => {
|
2950
2999
|
if (!n())
|
2951
3000
|
return;
|
2952
|
-
const
|
2953
|
-
It(
|
2954
|
-
e(
|
3001
|
+
const u = o.value;
|
3002
|
+
It(u.value).then((d) => {
|
3003
|
+
e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
|
2955
3004
|
});
|
2956
|
-
}, h = (
|
3005
|
+
}, h = (o) => {
|
2957
3006
|
if (!n())
|
2958
3007
|
return;
|
2959
|
-
const { key:
|
3008
|
+
const { key: u, uuid: d, value: f, subitem: b } = o.value, E = t.three.scene?.getObjectByProperty("uuid", d);
|
2960
3009
|
if (E !== void 0)
|
2961
3010
|
try {
|
2962
|
-
b !== void 0 ? Sa(E, b)[
|
3011
|
+
b !== void 0 ? Sa(E, b)[u](f) : E[u](f);
|
2963
3012
|
} catch (x) {
|
2964
|
-
console.log("Error requesting method:"), console.log(x), console.log(
|
3013
|
+
console.log("Error requesting method:"), console.log(x), console.log(u), console.log(f);
|
2965
3014
|
}
|
2966
3015
|
};
|
2967
|
-
return
|
2968
|
-
D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE,
|
3016
|
+
return ke(() => (D.addEventListener(I.GET_OBJECT, a), D.addEventListener(I.UPDATE_OBJECT, i), D.addEventListener(I.CREATE_TEXTURE, c), D.addEventListener(I.REQUEST_METHOD, h), () => {
|
3017
|
+
D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE, c), D.removeEventListener(I.REQUEST_METHOD, h);
|
2969
3018
|
}), []), null;
|
2970
3019
|
}
|
2971
|
-
const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" },
|
2972
|
-
class
|
3020
|
+
const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" }, bt = new Jn(), tn = new Qn(), ni = Math.cos(70 * ea.DEG2RAD);
|
3021
|
+
class ai extends an {
|
2973
3022
|
constructor(n, a) {
|
2974
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
2975
|
-
return
|
3023
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new q(), this.cursor = new q(), 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: et.ROTATE, MIDDLE: et.DOLLY, RIGHT: et.PAN }, this.touches = { ONE: tt.ROTATE, TWO: tt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
3024
|
+
return o.phi;
|
2976
3025
|
}, this.getAzimuthalAngle = function() {
|
2977
|
-
return
|
3026
|
+
return o.theta;
|
2978
3027
|
}, this.getDistance = function() {
|
2979
3028
|
return this.object.position.distanceTo(this.target);
|
2980
3029
|
}, this.listenToKeyEvents = function(s) {
|
2981
|
-
s.addEventListener("keydown",
|
3030
|
+
s.addEventListener("keydown", rt), this._domElementKeyEvents = s;
|
2982
3031
|
}, this.stopListenToKeyEvents = function() {
|
2983
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
3032
|
+
this._domElementKeyEvents.removeEventListener("keydown", rt), this._domElementKeyEvents = null;
|
2984
3033
|
}, this.saveState = function() {
|
2985
3034
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2986
3035
|
}, this.reset = function() {
|
2987
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Qt), e.update(),
|
3036
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Qt), e.update(), c = i.NONE;
|
2988
3037
|
}, this.update = function() {
|
2989
|
-
const s = new
|
2990
|
-
return function(
|
2991
|
-
const
|
2992
|
-
s.copy(
|
2993
|
-
let Oe = e.minAzimuthAngle,
|
2994
|
-
isFinite(Oe) && isFinite(
|
2995
|
-
let
|
2996
|
-
if (e.zoomToCursor &&
|
2997
|
-
let
|
3038
|
+
const s = new q(), y = new zt().setFromUnitVectors(n.up, new q(0, 1, 0)), T = y.clone().invert(), F = new q(), W = new zt(), be = new q(), ue = 2 * Math.PI;
|
3039
|
+
return function(Rt = null) {
|
3040
|
+
const ot = e.object.position;
|
3041
|
+
s.copy(ot).sub(e.target), s.applyQuaternion(y), o.setFromVector3(s), e.autoRotate && c === i.NONE && $(ze(Rt)), e.enableDamping ? (o.theta += u.theta * e.dampingFactor, o.phi += u.phi * e.dampingFactor) : (o.theta += u.theta, o.phi += u.phi);
|
3042
|
+
let Oe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
|
3043
|
+
isFinite(Oe) && isFinite(ye) && (Oe < -Math.PI ? Oe += ue : Oe > Math.PI && (Oe -= ue), ye < -Math.PI ? ye += ue : ye > Math.PI && (ye -= ue), Oe <= ye ? o.theta = Math.max(Oe, Math.min(ye, o.theta)) : o.theta = o.theta > (Oe + ye) / 2 ? Math.max(Oe, o.theta) : Math.min(ye, o.theta)), o.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, o.phi)), o.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(f, e.dampingFactor) : e.target.add(f), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Ce || e.object.isOrthographicCamera ? o.radius = Pe(o.radius) : o.radius = Pe(o.radius * d), s.setFromSpherical(o), s.applyQuaternion(T), ot.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, f.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), f.set(0, 0, 0));
|
3044
|
+
let Ge = !1;
|
3045
|
+
if (e.zoomToCursor && Ce) {
|
3046
|
+
let He = null;
|
2998
3047
|
if (e.object.isPerspectiveCamera) {
|
2999
|
-
const
|
3000
|
-
|
3001
|
-
const
|
3002
|
-
e.object.position.addScaledVector(
|
3048
|
+
const We = s.length();
|
3049
|
+
He = Pe(We * d);
|
3050
|
+
const qe = We - He;
|
3051
|
+
e.object.position.addScaledVector(re, qe), e.object.updateMatrixWorld();
|
3003
3052
|
} else if (e.object.isOrthographicCamera) {
|
3004
|
-
const
|
3005
|
-
|
3006
|
-
const
|
3007
|
-
|
3053
|
+
const We = new q(Q.x, Q.y, 0);
|
3054
|
+
We.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), Ge = !0;
|
3055
|
+
const qe = new q(Q.x, Q.y, 0);
|
3056
|
+
qe.unproject(e.object), e.object.position.sub(qe).add(We), e.object.updateMatrixWorld(), He = s.length();
|
3008
3057
|
} else
|
3009
3058
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
3010
|
-
|
3059
|
+
He !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(He).add(e.object.position) : (bt.origin.copy(e.object.position), bt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(bt.direction)) < ni ? n.lookAt(e.target) : (tn.setFromNormalAndCoplanarPoint(e.object.up, e.target), bt.intersectPlane(tn, e.target))));
|
3011
3060
|
} else
|
3012
|
-
e.object.isOrthographicCamera && (
|
3013
|
-
return
|
3061
|
+
e.object.isOrthographicCamera && (Ge = d !== 1, Ge && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
|
3062
|
+
return d = 1, Ce = !1, Ge || F.distanceToSquared(e.object.position) > h || 8 * (1 - W.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Qt), F.copy(e.object.position), W.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
|
3014
3063
|
};
|
3015
3064
|
}(), this.dispose = function() {
|
3016
|
-
e.domElement.removeEventListener("contextmenu",
|
3065
|
+
e.domElement.removeEventListener("contextmenu", Je), e.domElement.removeEventListener("pointerdown", L), e.domElement.removeEventListener("pointercancel", we), e.domElement.removeEventListener("wheel", ft), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", rt), e._domElementKeyEvents = null);
|
3017
3066
|
};
|
3018
3067
|
const e = this, i = {
|
3019
3068
|
NONE: -1,
|
@@ -3025,182 +3074,182 @@ class ei extends an {
|
|
3025
3074
|
TOUCH_DOLLY_PAN: 5,
|
3026
3075
|
TOUCH_DOLLY_ROTATE: 6
|
3027
3076
|
};
|
3028
|
-
let
|
3029
|
-
const h = 1e-6,
|
3030
|
-
let
|
3031
|
-
const
|
3032
|
-
let
|
3033
|
-
const
|
3034
|
-
let
|
3035
|
-
function
|
3077
|
+
let c = i.NONE;
|
3078
|
+
const h = 1e-6, o = new Yt(), u = new Yt();
|
3079
|
+
let d = 1;
|
3080
|
+
const f = new q(), b = new me(), E = new me(), x = new me(), M = new me(), P = new me(), V = new me(), U = new me(), j = new me(), O = new me(), re = new q(), Q = new me();
|
3081
|
+
let Ce = !1;
|
3082
|
+
const G = [], ee = {};
|
3083
|
+
let ve = !1;
|
3084
|
+
function ze(s) {
|
3036
3085
|
return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
3037
3086
|
}
|
3038
3087
|
function Me(s) {
|
3039
3088
|
const y = Math.abs(s * 0.01);
|
3040
3089
|
return Math.pow(0.95, e.zoomSpeed * y);
|
3041
3090
|
}
|
3042
|
-
function
|
3043
|
-
|
3091
|
+
function $(s) {
|
3092
|
+
u.theta -= s;
|
3044
3093
|
}
|
3045
|
-
function
|
3046
|
-
|
3094
|
+
function le(s) {
|
3095
|
+
u.phi -= s;
|
3047
3096
|
}
|
3048
|
-
const
|
3049
|
-
const s = new
|
3050
|
-
return function(T,
|
3051
|
-
s.setFromMatrixColumn(
|
3097
|
+
const S = function() {
|
3098
|
+
const s = new q();
|
3099
|
+
return function(T, F) {
|
3100
|
+
s.setFromMatrixColumn(F, 0), s.multiplyScalar(-T), f.add(s);
|
3052
3101
|
};
|
3053
|
-
}(),
|
3054
|
-
const s = new
|
3055
|
-
return function(T,
|
3056
|
-
e.screenSpacePanning === !0 ? s.setFromMatrixColumn(
|
3102
|
+
}(), Te = function() {
|
3103
|
+
const s = new q();
|
3104
|
+
return function(T, F) {
|
3105
|
+
e.screenSpacePanning === !0 ? s.setFromMatrixColumn(F, 1) : (s.setFromMatrixColumn(F, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), f.add(s);
|
3057
3106
|
};
|
3058
|
-
}(),
|
3059
|
-
const s = new
|
3060
|
-
return function(T,
|
3061
|
-
const
|
3107
|
+
}(), ge = function() {
|
3108
|
+
const s = new q();
|
3109
|
+
return function(T, F) {
|
3110
|
+
const W = e.domElement;
|
3062
3111
|
if (e.object.isPerspectiveCamera) {
|
3063
|
-
const
|
3064
|
-
s.copy(
|
3112
|
+
const be = e.object.position;
|
3113
|
+
s.copy(be).sub(e.target);
|
3065
3114
|
let ue = s.length();
|
3066
|
-
ue *= Math.tan(e.object.fov / 2 * Math.PI / 180),
|
3115
|
+
ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), S(2 * T * ue / W.clientHeight, e.object.matrix), Te(2 * F * ue / W.clientHeight, e.object.matrix);
|
3067
3116
|
} else
|
3068
|
-
e.object.isOrthographicCamera ? (
|
3117
|
+
e.object.isOrthographicCamera ? (S(T * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), Te(F * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
|
3069
3118
|
};
|
3070
3119
|
}();
|
3071
|
-
function
|
3072
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
3120
|
+
function _e(s) {
|
3121
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
3073
3122
|
}
|
3074
|
-
function
|
3075
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
3123
|
+
function je(s) {
|
3124
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
3076
3125
|
}
|
3077
|
-
function
|
3126
|
+
function Re(s, y) {
|
3078
3127
|
if (!e.zoomToCursor)
|
3079
3128
|
return;
|
3080
|
-
|
3081
|
-
const T = e.domElement.getBoundingClientRect(),
|
3082
|
-
|
3129
|
+
Ce = !0;
|
3130
|
+
const T = e.domElement.getBoundingClientRect(), F = s - T.left, W = y - T.top, be = T.width, ue = T.height;
|
3131
|
+
Q.x = F / be * 2 - 1, Q.y = -(W / ue) * 2 + 1, re.set(Q.x, Q.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
3083
3132
|
}
|
3084
|
-
function
|
3133
|
+
function Pe(s) {
|
3085
3134
|
return Math.max(e.minDistance, Math.min(e.maxDistance, s));
|
3086
3135
|
}
|
3087
|
-
function
|
3136
|
+
function De(s) {
|
3088
3137
|
b.set(s.clientX, s.clientY);
|
3089
3138
|
}
|
3090
|
-
function
|
3091
|
-
|
3139
|
+
function Ye(s) {
|
3140
|
+
Re(s.clientX, s.clientX), U.set(s.clientX, s.clientY);
|
3092
3141
|
}
|
3093
|
-
function
|
3094
|
-
|
3142
|
+
function te(s) {
|
3143
|
+
M.set(s.clientX, s.clientY);
|
3095
3144
|
}
|
3096
|
-
function
|
3145
|
+
function Se(s) {
|
3097
3146
|
E.set(s.clientX, s.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
3098
3147
|
const y = e.domElement;
|
3099
|
-
|
3148
|
+
$(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
|
3100
3149
|
}
|
3101
|
-
function
|
3102
|
-
|
3150
|
+
function it(s) {
|
3151
|
+
j.set(s.clientX, s.clientY), O.subVectors(j, U), O.y > 0 ? _e(Me(O.y)) : O.y < 0 && je(Me(O.y)), U.copy(j), e.update();
|
3103
3152
|
}
|
3104
|
-
function
|
3105
|
-
P.set(s.clientX, s.clientY),
|
3153
|
+
function Ve(s) {
|
3154
|
+
P.set(s.clientX, s.clientY), V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P), e.update();
|
3106
3155
|
}
|
3107
|
-
function
|
3108
|
-
|
3156
|
+
function pe(s) {
|
3157
|
+
Re(s.clientX, s.clientY), s.deltaY < 0 ? je(Me(s.deltaY)) : s.deltaY > 0 && _e(Me(s.deltaY)), e.update();
|
3109
3158
|
}
|
3110
|
-
function
|
3159
|
+
function p(s) {
|
3111
3160
|
let y = !1;
|
3112
3161
|
switch (s.code) {
|
3113
3162
|
case e.keys.UP:
|
3114
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3163
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? le(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
|
3115
3164
|
break;
|
3116
3165
|
case e.keys.BOTTOM:
|
3117
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3166
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? le(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
|
3118
3167
|
break;
|
3119
3168
|
case e.keys.LEFT:
|
3120
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3169
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
|
3121
3170
|
break;
|
3122
3171
|
case e.keys.RIGHT:
|
3123
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3172
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
|
3124
3173
|
break;
|
3125
3174
|
}
|
3126
3175
|
y && (s.preventDefault(), e.update());
|
3127
3176
|
}
|
3128
|
-
function
|
3129
|
-
if (
|
3177
|
+
function v(s) {
|
3178
|
+
if (G.length === 1)
|
3130
3179
|
b.set(s.pageX, s.pageY);
|
3131
3180
|
else {
|
3132
|
-
const y =
|
3133
|
-
b.set(T,
|
3181
|
+
const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
|
3182
|
+
b.set(T, F);
|
3134
3183
|
}
|
3135
3184
|
}
|
3136
|
-
function
|
3137
|
-
if (
|
3138
|
-
|
3185
|
+
function C(s) {
|
3186
|
+
if (G.length === 1)
|
3187
|
+
M.set(s.pageX, s.pageY);
|
3139
3188
|
else {
|
3140
|
-
const y =
|
3141
|
-
|
3189
|
+
const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
|
3190
|
+
M.set(T, F);
|
3142
3191
|
}
|
3143
3192
|
}
|
3144
|
-
function
|
3145
|
-
const y =
|
3146
|
-
|
3193
|
+
function _(s) {
|
3194
|
+
const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
|
3195
|
+
U.set(0, W);
|
3147
3196
|
}
|
3148
|
-
function
|
3149
|
-
e.enableZoom &&
|
3197
|
+
function H(s) {
|
3198
|
+
e.enableZoom && _(s), e.enablePan && C(s);
|
3150
3199
|
}
|
3151
|
-
function
|
3152
|
-
e.enableZoom &&
|
3200
|
+
function X(s) {
|
3201
|
+
e.enableZoom && _(s), e.enableRotate && v(s);
|
3153
3202
|
}
|
3154
|
-
function
|
3155
|
-
if (
|
3203
|
+
function de(s) {
|
3204
|
+
if (G.length == 1)
|
3156
3205
|
E.set(s.pageX, s.pageY);
|
3157
3206
|
else {
|
3158
|
-
const T =
|
3159
|
-
E.set(
|
3207
|
+
const T = Fe(s), F = 0.5 * (s.pageX + T.x), W = 0.5 * (s.pageY + T.y);
|
3208
|
+
E.set(F, W);
|
3160
3209
|
}
|
3161
3210
|
x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
3162
3211
|
const y = e.domElement;
|
3163
|
-
|
3212
|
+
$(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
|
3164
3213
|
}
|
3165
|
-
function
|
3166
|
-
if (
|
3214
|
+
function z(s) {
|
3215
|
+
if (G.length === 1)
|
3167
3216
|
P.set(s.pageX, s.pageY);
|
3168
3217
|
else {
|
3169
|
-
const y =
|
3170
|
-
P.set(T,
|
3218
|
+
const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
|
3219
|
+
P.set(T, F);
|
3171
3220
|
}
|
3172
|
-
|
3221
|
+
V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P);
|
3173
3222
|
}
|
3174
|
-
function
|
3175
|
-
const y =
|
3176
|
-
|
3177
|
-
const
|
3178
|
-
|
3223
|
+
function Z(s) {
|
3224
|
+
const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
|
3225
|
+
j.set(0, W), O.set(0, Math.pow(j.y / U.y, e.zoomSpeed)), _e(O.y), U.copy(j);
|
3226
|
+
const be = (s.pageX + y.x) * 0.5, ue = (s.pageY + y.y) * 0.5;
|
3227
|
+
Re(be, ue);
|
3179
3228
|
}
|
3180
|
-
function
|
3181
|
-
e.enableZoom &&
|
3229
|
+
function se(s) {
|
3230
|
+
e.enableZoom && Z(s), e.enablePan && z(s);
|
3182
3231
|
}
|
3183
|
-
function
|
3184
|
-
e.enableZoom &&
|
3232
|
+
function A(s) {
|
3233
|
+
e.enableZoom && Z(s), e.enableRotate && de(s);
|
3185
3234
|
}
|
3186
|
-
function
|
3187
|
-
e.enabled !== !1 && (
|
3235
|
+
function L(s) {
|
3236
|
+
e.enabled !== !1 && (G.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", ie), e.domElement.addEventListener("pointerup", we)), Mt(s), s.pointerType === "touch" ? st(s) : Ne(s));
|
3188
3237
|
}
|
3189
|
-
function
|
3190
|
-
e.enabled !== !1 && (s.pointerType === "touch" ?
|
3238
|
+
function ie(s) {
|
3239
|
+
e.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : Ot(s));
|
3191
3240
|
}
|
3192
|
-
function
|
3193
|
-
switch (Tt(s),
|
3241
|
+
function we(s) {
|
3242
|
+
switch (Tt(s), G.length) {
|
3194
3243
|
case 0:
|
3195
|
-
e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove",
|
3244
|
+
e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e.dispatchEvent(en), c = i.NONE;
|
3196
3245
|
break;
|
3197
3246
|
case 1:
|
3198
|
-
const y =
|
3199
|
-
|
3247
|
+
const y = G[0], T = ee[y];
|
3248
|
+
st({ pointerId: y, pageX: T.x, pageY: T.y });
|
3200
3249
|
break;
|
3201
3250
|
}
|
3202
3251
|
}
|
3203
|
-
function
|
3252
|
+
function Ne(s) {
|
3204
3253
|
let y;
|
3205
3254
|
switch (s.button) {
|
3206
3255
|
case 0:
|
@@ -3216,61 +3265,61 @@ class ei extends an {
|
|
3216
3265
|
y = -1;
|
3217
3266
|
}
|
3218
3267
|
switch (y) {
|
3219
|
-
case
|
3268
|
+
case et.DOLLY:
|
3220
3269
|
if (e.enableZoom === !1)
|
3221
3270
|
return;
|
3222
|
-
|
3271
|
+
Ye(s), c = i.DOLLY;
|
3223
3272
|
break;
|
3224
|
-
case
|
3273
|
+
case et.ROTATE:
|
3225
3274
|
if (s.ctrlKey || s.metaKey || s.shiftKey) {
|
3226
3275
|
if (e.enablePan === !1)
|
3227
3276
|
return;
|
3228
|
-
|
3277
|
+
te(s), c = i.PAN;
|
3229
3278
|
} else {
|
3230
3279
|
if (e.enableRotate === !1)
|
3231
3280
|
return;
|
3232
|
-
|
3281
|
+
De(s), c = i.ROTATE;
|
3233
3282
|
}
|
3234
3283
|
break;
|
3235
|
-
case
|
3284
|
+
case et.PAN:
|
3236
3285
|
if (s.ctrlKey || s.metaKey || s.shiftKey) {
|
3237
3286
|
if (e.enableRotate === !1)
|
3238
3287
|
return;
|
3239
|
-
|
3288
|
+
De(s), c = i.ROTATE;
|
3240
3289
|
} else {
|
3241
3290
|
if (e.enablePan === !1)
|
3242
3291
|
return;
|
3243
|
-
|
3292
|
+
te(s), c = i.PAN;
|
3244
3293
|
}
|
3245
3294
|
break;
|
3246
3295
|
default:
|
3247
|
-
|
3296
|
+
c = i.NONE;
|
3248
3297
|
}
|
3249
|
-
|
3298
|
+
c !== i.NONE && e.dispatchEvent(jt);
|
3250
3299
|
}
|
3251
3300
|
function Ot(s) {
|
3252
|
-
switch (
|
3301
|
+
switch (c) {
|
3253
3302
|
case i.ROTATE:
|
3254
3303
|
if (e.enableRotate === !1)
|
3255
3304
|
return;
|
3256
|
-
|
3305
|
+
Se(s);
|
3257
3306
|
break;
|
3258
3307
|
case i.DOLLY:
|
3259
3308
|
if (e.enableZoom === !1)
|
3260
3309
|
return;
|
3261
|
-
|
3310
|
+
it(s);
|
3262
3311
|
break;
|
3263
3312
|
case i.PAN:
|
3264
3313
|
if (e.enablePan === !1)
|
3265
3314
|
return;
|
3266
|
-
|
3315
|
+
Ve(s);
|
3267
3316
|
break;
|
3268
3317
|
}
|
3269
3318
|
}
|
3270
|
-
function
|
3271
|
-
e.enabled === !1 || e.enableZoom === !1 ||
|
3319
|
+
function ft(s) {
|
3320
|
+
e.enabled === !1 || e.enableZoom === !1 || c !== i.NONE || (s.preventDefault(), e.dispatchEvent(jt), pe(pt(s)), e.dispatchEvent(en));
|
3272
3321
|
}
|
3273
|
-
function
|
3322
|
+
function pt(s) {
|
3274
3323
|
const y = s.deltaMode, T = {
|
3275
3324
|
clientX: s.clientX,
|
3276
3325
|
clientY: s.clientY,
|
@@ -3284,127 +3333,127 @@ class ei extends an {
|
|
3284
3333
|
T.deltaY *= 100;
|
3285
3334
|
break;
|
3286
3335
|
}
|
3287
|
-
return s.ctrlKey && !
|
3336
|
+
return s.ctrlKey && !ve && (T.deltaY *= 10), T;
|
3288
3337
|
}
|
3289
|
-
function
|
3290
|
-
s.key === "Control" && (
|
3338
|
+
function mt(s) {
|
3339
|
+
s.key === "Control" && (ve = !0, e.domElement.getRootNode().addEventListener("keyup", Le, { passive: !0, capture: !0 }));
|
3291
3340
|
}
|
3292
|
-
function
|
3293
|
-
s.key === "Control" && (
|
3341
|
+
function Le(s) {
|
3342
|
+
s.key === "Control" && (ve = !1, e.domElement.getRootNode().removeEventListener("keyup", Le, { passive: !0, capture: !0 }));
|
3294
3343
|
}
|
3295
|
-
function
|
3296
|
-
e.enabled === !1 || e.enablePan === !1 ||
|
3344
|
+
function rt(s) {
|
3345
|
+
e.enabled === !1 || e.enablePan === !1 || p(s);
|
3297
3346
|
}
|
3298
|
-
function
|
3299
|
-
switch (
|
3347
|
+
function st(s) {
|
3348
|
+
switch (gt(s), G.length) {
|
3300
3349
|
case 1:
|
3301
3350
|
switch (e.touches.ONE) {
|
3302
|
-
case
|
3351
|
+
case tt.ROTATE:
|
3303
3352
|
if (e.enableRotate === !1)
|
3304
3353
|
return;
|
3305
|
-
|
3354
|
+
v(s), c = i.TOUCH_ROTATE;
|
3306
3355
|
break;
|
3307
|
-
case
|
3356
|
+
case tt.PAN:
|
3308
3357
|
if (e.enablePan === !1)
|
3309
3358
|
return;
|
3310
|
-
|
3359
|
+
C(s), c = i.TOUCH_PAN;
|
3311
3360
|
break;
|
3312
3361
|
default:
|
3313
|
-
|
3362
|
+
c = i.NONE;
|
3314
3363
|
}
|
3315
3364
|
break;
|
3316
3365
|
case 2:
|
3317
3366
|
switch (e.touches.TWO) {
|
3318
|
-
case
|
3367
|
+
case tt.DOLLY_PAN:
|
3319
3368
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3320
3369
|
return;
|
3321
|
-
|
3370
|
+
H(s), c = i.TOUCH_DOLLY_PAN;
|
3322
3371
|
break;
|
3323
|
-
case
|
3372
|
+
case tt.DOLLY_ROTATE:
|
3324
3373
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3325
3374
|
return;
|
3326
|
-
|
3375
|
+
X(s), c = i.TOUCH_DOLLY_ROTATE;
|
3327
3376
|
break;
|
3328
3377
|
default:
|
3329
|
-
|
3378
|
+
c = i.NONE;
|
3330
3379
|
}
|
3331
3380
|
break;
|
3332
3381
|
default:
|
3333
|
-
|
3382
|
+
c = i.NONE;
|
3334
3383
|
}
|
3335
|
-
|
3384
|
+
c !== i.NONE && e.dispatchEvent(jt);
|
3336
3385
|
}
|
3337
|
-
function
|
3338
|
-
switch (
|
3386
|
+
function vt(s) {
|
3387
|
+
switch (gt(s), c) {
|
3339
3388
|
case i.TOUCH_ROTATE:
|
3340
3389
|
if (e.enableRotate === !1)
|
3341
3390
|
return;
|
3342
|
-
|
3391
|
+
de(s), e.update();
|
3343
3392
|
break;
|
3344
3393
|
case i.TOUCH_PAN:
|
3345
3394
|
if (e.enablePan === !1)
|
3346
3395
|
return;
|
3347
|
-
|
3396
|
+
z(s), e.update();
|
3348
3397
|
break;
|
3349
3398
|
case i.TOUCH_DOLLY_PAN:
|
3350
3399
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3351
3400
|
return;
|
3352
|
-
|
3401
|
+
se(s), e.update();
|
3353
3402
|
break;
|
3354
3403
|
case i.TOUCH_DOLLY_ROTATE:
|
3355
3404
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3356
3405
|
return;
|
3357
|
-
|
3406
|
+
A(s), e.update();
|
3358
3407
|
break;
|
3359
3408
|
default:
|
3360
|
-
|
3409
|
+
c = i.NONE;
|
3361
3410
|
}
|
3362
3411
|
}
|
3363
|
-
function
|
3412
|
+
function Je(s) {
|
3364
3413
|
e.enabled !== !1 && s.preventDefault();
|
3365
3414
|
}
|
3366
3415
|
function Mt(s) {
|
3367
|
-
|
3416
|
+
G.push(s.pointerId);
|
3368
3417
|
}
|
3369
3418
|
function Tt(s) {
|
3370
|
-
delete
|
3371
|
-
for (let y = 0; y <
|
3372
|
-
if (
|
3373
|
-
|
3419
|
+
delete ee[s.pointerId];
|
3420
|
+
for (let y = 0; y < G.length; y++)
|
3421
|
+
if (G[y] == s.pointerId) {
|
3422
|
+
G.splice(y, 1);
|
3374
3423
|
return;
|
3375
3424
|
}
|
3376
3425
|
}
|
3377
|
-
function
|
3378
|
-
let y =
|
3379
|
-
y === void 0 && (y = new me(),
|
3426
|
+
function gt(s) {
|
3427
|
+
let y = ee[s.pointerId];
|
3428
|
+
y === void 0 && (y = new me(), ee[s.pointerId] = y), y.set(s.pageX, s.pageY);
|
3380
3429
|
}
|
3381
|
-
function
|
3382
|
-
const y = s.pointerId ===
|
3383
|
-
return
|
3430
|
+
function Fe(s) {
|
3431
|
+
const y = s.pointerId === G[0] ? G[1] : G[0];
|
3432
|
+
return ee[y];
|
3384
3433
|
}
|
3385
|
-
e.domElement.addEventListener("contextmenu",
|
3434
|
+
e.domElement.addEventListener("contextmenu", Je), e.domElement.addEventListener("pointerdown", L), e.domElement.addEventListener("pointercancel", we), e.domElement.addEventListener("wheel", ft, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", mt, { passive: !0, capture: !0 }), this.update();
|
3386
3435
|
}
|
3387
3436
|
}
|
3388
|
-
const
|
3389
|
-
const [n, a] =
|
3437
|
+
const xt = (t) => {
|
3438
|
+
const [n, a] = ae(t.options[t.index]), e = () => {
|
3390
3439
|
t.onToggle(!t.open);
|
3391
|
-
}, i = (
|
3392
|
-
|
3440
|
+
}, i = (c) => {
|
3441
|
+
c !== n && (t.onSelect(c), a(c)), t.onToggle(!1);
|
3393
3442
|
};
|
3394
3443
|
return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
|
3395
3444
|
/* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
3396
|
-
t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((
|
3445
|
+
t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(c), children: c }, c)) })
|
3397
3446
|
] });
|
3398
|
-
},
|
3399
|
-
const [e, i] =
|
3447
|
+
}, Ke = pa(function(n, a) {
|
3448
|
+
const [e, i] = ae(!1), c = n.options.indexOf(n.camera.name);
|
3400
3449
|
return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
|
3401
3450
|
/* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
3402
3451
|
e && i(!1);
|
3403
3452
|
} }),
|
3404
3453
|
/* @__PURE__ */ l.jsx(
|
3405
|
-
|
3454
|
+
xt,
|
3406
3455
|
{
|
3407
|
-
index:
|
3456
|
+
index: c,
|
3408
3457
|
open: e,
|
3409
3458
|
options: n.options,
|
3410
3459
|
onSelect: n.onSelect,
|
@@ -3416,7 +3465,7 @@ const Ct = (t) => {
|
|
3416
3465
|
)
|
3417
3466
|
] });
|
3418
3467
|
});
|
3419
|
-
class
|
3468
|
+
class ii extends xn {
|
3420
3469
|
constructor(n) {
|
3421
3470
|
super({
|
3422
3471
|
extensions: {
|
@@ -3433,7 +3482,7 @@ class ti extends xn {
|
|
3433
3482
|
value: n?.divisions !== void 0 ? n?.divisions : 10
|
3434
3483
|
},
|
3435
3484
|
uColor: {
|
3436
|
-
value: n?.color !== void 0 ? n?.color : new
|
3485
|
+
value: n?.color !== void 0 ? n?.color : new Ct(16777215)
|
3437
3486
|
},
|
3438
3487
|
uDistance: {
|
3439
3488
|
value: n?.distance !== void 0 ? n?.distance : 1e4
|
@@ -3528,17 +3577,17 @@ class ti extends xn {
|
|
3528
3577
|
});
|
3529
3578
|
}
|
3530
3579
|
}
|
3531
|
-
class
|
3580
|
+
class ri extends na {
|
3532
3581
|
gridMaterial;
|
3533
3582
|
constructor() {
|
3534
|
-
const n = new
|
3583
|
+
const n = new ii();
|
3535
3584
|
super(new aa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
3536
3585
|
}
|
3537
3586
|
update() {
|
3538
3587
|
this.gridMaterial.needsUpdate = !0;
|
3539
3588
|
}
|
3540
3589
|
}
|
3541
|
-
const
|
3590
|
+
const si = `#include <common>
|
3542
3591
|
#include <batching_pars_vertex>
|
3543
3592
|
#include <uv_pars_vertex>
|
3544
3593
|
#include <color_pars_vertex>
|
@@ -3568,7 +3617,7 @@ void main() {
|
|
3568
3617
|
#include <logdepthbuf_vertex>
|
3569
3618
|
#include <clipping_planes_vertex>
|
3570
3619
|
#include <worldpos_vertex>
|
3571
|
-
}`,
|
3620
|
+
}`, oi = `
|
3572
3621
|
#include <common>
|
3573
3622
|
#include <uv_pars_fragment>
|
3574
3623
|
#include <clipping_planes_pars_fragment>
|
@@ -3577,320 +3626,320 @@ void main() {
|
|
3577
3626
|
#include <clipping_planes_fragment>
|
3578
3627
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
3579
3628
|
}`;
|
3580
|
-
class
|
3629
|
+
class ci extends xn {
|
3581
3630
|
constructor() {
|
3582
3631
|
super({
|
3583
3632
|
defines: {
|
3584
3633
|
USE_UV: ""
|
3585
3634
|
},
|
3586
|
-
vertexShader:
|
3587
|
-
fragmentShader:
|
3635
|
+
vertexShader: si,
|
3636
|
+
fragmentShader: oi
|
3588
3637
|
});
|
3589
3638
|
}
|
3590
3639
|
}
|
3591
|
-
let
|
3592
|
-
function
|
3593
|
-
const n =
|
3640
|
+
let yt = "Renderer", Be, Et = !1, nn = !1, Y = null, ce = null, Ue = null, $e = null;
|
3641
|
+
function wi(t) {
|
3642
|
+
const n = t.three.app.appID, a = localStorage.getItem(`${n}_mode`), e = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", h = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", o = xe(() => /* @__PURE__ */ new Map(), []), u = xe(() => /* @__PURE__ */ new Map(), []), d = xe(() => /* @__PURE__ */ new Map(), []), f = xe(() => new ia(), []), b = xe(() => new ra(), []), E = xe(() => new ri(), []), x = xe(() => new Vt(500), []), M = xe(() => new Vt(100), []), P = xe(() => new sa(), []), V = xe(() => new oa(), []), U = xe(() => new ci(), []), j = xe(() => new ca({
|
3594
3643
|
opacity: 0.33,
|
3595
3644
|
transparent: !0,
|
3596
3645
|
wireframe: !0
|
3597
3646
|
}), []);
|
3598
|
-
function
|
3599
|
-
const
|
3600
|
-
return
|
3647
|
+
function O(p, v) {
|
3648
|
+
const C = new Gt(-100, 100, 100, -100, 50, 3e3);
|
3649
|
+
return C.name = p, C.position.copy(v), C.lookAt(0, 0, 0), o.set(p, C), C;
|
3601
3650
|
}
|
3602
|
-
const
|
3651
|
+
const re = [
|
3603
3652
|
"Renderer",
|
3604
3653
|
"Depth",
|
3605
3654
|
"Normals",
|
3606
3655
|
"UVs",
|
3607
3656
|
"Wireframe"
|
3608
|
-
],
|
3657
|
+
], Q = [
|
3609
3658
|
"Single",
|
3610
3659
|
"Side by Side",
|
3611
3660
|
"Stacked",
|
3612
3661
|
"Quad"
|
3613
|
-
];
|
3614
|
-
|
3615
|
-
|
3616
|
-
const
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3620
|
-
const
|
3621
|
-
|
3622
|
-
const A = e.get(p.name);
|
3623
|
-
A !== void 0 && (i.remove(A), A.dispose()), e.delete(p.name);
|
3624
|
-
const G = new ei(p, v);
|
3625
|
-
switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
|
3662
|
+
], Ce = fe(null), G = fe(null), ee = fe(null), ve = fe(null), ze = fe(null), Me = fe(null), [$, le] = ae(a !== null ? a : "Single"), [S, Te] = ae(null), [ge, _e] = ae(!1), [je, Re] = ae(!1), [Pe, De] = ae(!1), [, Ye] = ae(Date.now());
|
3663
|
+
localStorage.setItem(`${n}_mode`, $), localStorage.setItem(`${n}_tlCam`, e), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, c), localStorage.setItem(`${n}_brCam`, h);
|
3664
|
+
const te = (p, v) => {
|
3665
|
+
const C = u.get(p.name);
|
3666
|
+
C !== void 0 && C.dispose(), u.delete(p.name);
|
3667
|
+
const _ = d.get(p.name);
|
3668
|
+
_ !== void 0 && (f.remove(_), _.dispose()), d.delete(p.name);
|
3669
|
+
const H = new ai(p, v);
|
3670
|
+
switch (H.enableDamping = !0, H.dampingFactor = 0.05, p.name) {
|
3626
3671
|
case "Top":
|
3627
3672
|
case "Bottom":
|
3628
3673
|
case "Left":
|
3629
3674
|
case "Right":
|
3630
3675
|
case "Front":
|
3631
3676
|
case "Back":
|
3632
|
-
|
3677
|
+
H.enableRotate = !1;
|
3633
3678
|
break;
|
3634
3679
|
}
|
3635
|
-
if (
|
3636
|
-
const
|
3637
|
-
|
3638
|
-
}
|
3639
|
-
},
|
3640
|
-
const v =
|
3641
|
-
v !== void 0 && (
|
3642
|
-
const
|
3643
|
-
|
3644
|
-
},
|
3645
|
-
|
3680
|
+
if (u.set(p.name, H), p instanceof Pt) {
|
3681
|
+
const X = new da(p);
|
3682
|
+
d.set(p.name, X), f.add(X);
|
3683
|
+
}
|
3684
|
+
}, Se = (p) => {
|
3685
|
+
const v = d.get(p.name);
|
3686
|
+
v !== void 0 && (f.remove(v), v.dispose(), d.delete(p.name));
|
3687
|
+
const C = u.get(p.name);
|
3688
|
+
C !== void 0 && (C.dispose(), u.delete(p.name));
|
3689
|
+
}, it = () => {
|
3690
|
+
u.forEach((p, v) => {
|
3646
3691
|
p.dispose();
|
3647
|
-
const
|
3648
|
-
|
3649
|
-
}),
|
3650
|
-
},
|
3692
|
+
const C = d.get(v);
|
3693
|
+
C !== void 0 && (f.remove(C), C.dispose()), d.delete(v), u.delete(v);
|
3694
|
+
}), u.clear(), d.clear();
|
3695
|
+
}, Ve = () => {
|
3651
3696
|
switch ($) {
|
3652
3697
|
case "Single":
|
3653
|
-
|
3698
|
+
te(Y, ee.current);
|
3654
3699
|
break;
|
3655
3700
|
case "Side by Side":
|
3656
3701
|
case "Stacked":
|
3657
|
-
|
3702
|
+
te(Y, ee.current), te(ce, ve.current);
|
3658
3703
|
break;
|
3659
3704
|
case "Quad":
|
3660
|
-
|
3705
|
+
te(Y, ee.current), te(ce, ve.current), te(Ue, ze.current), te($e, Me.current);
|
3661
3706
|
break;
|
3662
3707
|
}
|
3663
3708
|
};
|
3664
|
-
|
3709
|
+
ke(() => {
|
3665
3710
|
const p = new la({
|
3666
|
-
canvas:
|
3711
|
+
canvas: Ce.current,
|
3667
3712
|
stencil: !1
|
3668
3713
|
});
|
3669
|
-
p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p,
|
3670
|
-
}, []),
|
3671
|
-
|
3672
|
-
|
3673
|
-
|
3674
|
-
|
3675
|
-
|
3676
|
-
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3714
|
+
p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Te(p);
|
3715
|
+
}, []), ke(() => {
|
3716
|
+
f.name = "Debug Scene", b.name = "helpers", f.add(b), b.add(E), x.name = "axisHelper", b.add(x), M.name = "interactionHelper", b.add(M), M.visible = !1, O("Top", new q(0, 1e3, 0)), O("Bottom", new q(0, -1e3, 0)), O("Left", new q(-1e3, 0, 0)), O("Right", new q(1e3, 0, 0)), O("Front", new q(0, 0, 1e3)), O("Back", new q(0, 0, -1e3)), O("Orthographic", new q(1e3, 1e3, 1e3));
|
3717
|
+
const p = new Pt(60, 1, 50, 3e3);
|
3718
|
+
p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), o.set("Debug", p), Y = o.get(localStorage.getItem(`${n}_tlCam`)), ce = o.get(localStorage.getItem(`${n}_trCam`)), Ue = o.get(localStorage.getItem(`${n}_blCam`)), $e = o.get(localStorage.getItem(`${n}_brCam`));
|
3719
|
+
}, []), ke(() => {
|
3720
|
+
const p = (_) => {
|
3721
|
+
Mn(Be), f.remove(Be);
|
3722
|
+
const H = t.scenes.get(_.value.name);
|
3723
|
+
if (H !== void 0) {
|
3724
|
+
const X = new H();
|
3725
|
+
t.onSceneSet !== void 0 && t.onSceneSet(X), Be = X, t.three.scene = Be, f.add(Be), nn = !0;
|
3726
|
+
}
|
3727
|
+
}, v = (_) => {
|
3728
|
+
const H = _.value, X = t.three.scene?.getObjectByProperty("uuid", H.uuid);
|
3729
|
+
X !== void 0 && o.set(H.name, X), Ye(Date.now());
|
3730
|
+
}, C = (_) => {
|
3731
|
+
o.delete(_.value.name), Ye(Date.now());
|
3683
3732
|
};
|
3684
|
-
return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA,
|
3685
|
-
D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA,
|
3733
|
+
return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA, C), () => {
|
3734
|
+
D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA, C);
|
3686
3735
|
};
|
3687
|
-
}, []),
|
3688
|
-
if (
|
3736
|
+
}, []), ke(() => {
|
3737
|
+
if (S === null)
|
3689
3738
|
return;
|
3690
|
-
let p = window.innerWidth, v = window.innerHeight,
|
3691
|
-
const
|
3692
|
-
p = window.innerWidth - 300, v = window.innerHeight,
|
3693
|
-
let
|
3739
|
+
let p = window.innerWidth, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), H = -1;
|
3740
|
+
const X = () => {
|
3741
|
+
p = window.innerWidth - 300, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), S.setSize(p, v);
|
3742
|
+
let A = p, L = v;
|
3694
3743
|
switch ($) {
|
3695
3744
|
case "Side by Side":
|
3696
|
-
|
3745
|
+
A = C, L = v;
|
3697
3746
|
break;
|
3698
3747
|
case "Stacked":
|
3699
|
-
|
3748
|
+
A = p, L = _;
|
3700
3749
|
break;
|
3701
3750
|
case "Quad":
|
3702
|
-
|
3751
|
+
A = C, L = _;
|
3703
3752
|
break;
|
3704
3753
|
}
|
3705
|
-
|
3706
|
-
|
3754
|
+
o.forEach((ie) => {
|
3755
|
+
ie instanceof Gt ? (ie.left = A / -2, ie.right = A / 2, ie.top = L / 2, ie.bottom = L / -2, ie.updateProjectionMatrix()) : ie instanceof Pt && (ie.aspect = A / L, ie.updateProjectionMatrix(), d.get(ie.name)?.update());
|
3707
3756
|
});
|
3708
|
-
},
|
3709
|
-
|
3757
|
+
}, de = () => {
|
3758
|
+
S.setViewport(0, 0, p, v), S.setScissor(0, 0, p, v), S.render(f, Y);
|
3710
3759
|
}, z = () => {
|
3711
3760
|
if ($ === "Side by Side")
|
3712
|
-
|
3761
|
+
S.setViewport(0, 0, C, v), S.setScissor(0, 0, C, v), S.render(f, Y), S.setViewport(C, 0, C, v), S.setScissor(C, 0, C, v), S.render(f, ce);
|
3713
3762
|
else {
|
3714
|
-
const
|
3715
|
-
|
3716
|
-
}
|
3717
|
-
},
|
3718
|
-
let
|
3719
|
-
|
3720
|
-
},
|
3721
|
-
switch (
|
3722
|
-
|
3723
|
-
}), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(
|
3763
|
+
const A = v - _;
|
3764
|
+
S.setViewport(0, A, p, _), S.setScissor(0, A, p, _), S.render(f, Y), S.setViewport(0, 0, p, _), S.setScissor(0, 0, p, _), S.render(f, ce);
|
3765
|
+
}
|
3766
|
+
}, Z = () => {
|
3767
|
+
let A = 0, L = 0;
|
3768
|
+
L = v - _, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Y), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, ce), L = 0, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Ue), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, $e);
|
3769
|
+
}, se = () => {
|
3770
|
+
switch (u.forEach((A) => {
|
3771
|
+
A.update();
|
3772
|
+
}), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(Be), S.clear(), $) {
|
3724
3773
|
case "Single":
|
3725
|
-
|
3774
|
+
de();
|
3726
3775
|
break;
|
3727
3776
|
case "Side by Side":
|
3728
3777
|
case "Stacked":
|
3729
3778
|
z();
|
3730
3779
|
break;
|
3731
3780
|
case "Quad":
|
3732
|
-
|
3781
|
+
Z();
|
3733
3782
|
break;
|
3734
3783
|
}
|
3735
|
-
|
3784
|
+
H = requestAnimationFrame(se);
|
3736
3785
|
};
|
3737
|
-
return
|
3738
|
-
window.removeEventListener("resize",
|
3786
|
+
return Ve(), window.addEventListener("resize", X), X(), se(), () => {
|
3787
|
+
window.removeEventListener("resize", X), cancelAnimationFrame(H), H = -1;
|
3739
3788
|
};
|
3740
|
-
}, [$,
|
3741
|
-
if (
|
3742
|
-
const p = new ua(), v = new me(),
|
3789
|
+
}, [$, S]), ke(() => {
|
3790
|
+
if (S !== null) {
|
3791
|
+
const p = new ua(), v = new me(), C = (de, z, Z, se) => {
|
3743
3792
|
switch ($) {
|
3744
3793
|
case "Quad":
|
3745
|
-
|
3794
|
+
de < Z ? z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, Ue) : z < se ? p.setFromCamera(v, ce) : p.setFromCamera(v, $e);
|
3746
3795
|
break;
|
3747
3796
|
case "Side by Side":
|
3748
|
-
|
3797
|
+
de < Z ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
|
3749
3798
|
break;
|
3750
3799
|
case "Single":
|
3751
|
-
p.setFromCamera(v,
|
3800
|
+
p.setFromCamera(v, Y);
|
3752
3801
|
break;
|
3753
3802
|
case "Stacked":
|
3754
|
-
z <
|
3803
|
+
z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
|
3755
3804
|
break;
|
3756
3805
|
}
|
3757
|
-
},
|
3758
|
-
if (!
|
3806
|
+
}, _ = (de) => {
|
3807
|
+
if (!Et)
|
3759
3808
|
return;
|
3760
3809
|
const z = new me();
|
3761
|
-
|
3762
|
-
const
|
3763
|
-
v.x =
|
3764
|
-
const
|
3765
|
-
|
3810
|
+
S.getSize(z);
|
3811
|
+
const Z = Math.min(de.clientX, z.x), se = Math.min(de.clientY, z.y);
|
3812
|
+
v.x = at(Z, 0, z.x, -1, 1), v.y = at(se, 0, z.y, 1, -1);
|
3813
|
+
const A = z.x / 2, L = z.y / 2, ie = () => {
|
3814
|
+
Z < A ? v.x = at(Z, 0, A, -1, 1) : v.x = at(Z, A, z.x, -1, 1);
|
3766
3815
|
}, we = () => {
|
3767
|
-
|
3816
|
+
se < L ? v.y = at(se, 0, L, 1, -1) : v.y = at(se, L, z.y, 1, -1);
|
3768
3817
|
};
|
3769
3818
|
switch ($) {
|
3770
3819
|
case "Quad":
|
3771
|
-
|
3820
|
+
ie(), we();
|
3772
3821
|
break;
|
3773
3822
|
case "Side by Side":
|
3774
|
-
|
3823
|
+
ie();
|
3775
3824
|
break;
|
3776
3825
|
case "Stacked":
|
3777
3826
|
we(), we();
|
3778
3827
|
break;
|
3779
3828
|
}
|
3780
|
-
|
3781
|
-
const
|
3782
|
-
|
3783
|
-
},
|
3784
|
-
if (!
|
3829
|
+
C(Z, se, A, L);
|
3830
|
+
const Ne = p.intersectObjects(Be.children);
|
3831
|
+
Ne.length > 0 && M.position.copy(Ne[0].point);
|
3832
|
+
}, H = (de) => {
|
3833
|
+
if (!Et)
|
3785
3834
|
return;
|
3786
3835
|
const z = new me();
|
3787
|
-
if (
|
3836
|
+
if (S.getSize(z), de.clientX >= z.x)
|
3788
3837
|
return;
|
3789
|
-
|
3790
|
-
const
|
3791
|
-
|
3792
|
-
},
|
3793
|
-
return
|
3794
|
-
|
3838
|
+
_(de);
|
3839
|
+
const Z = p.intersectObjects(Be.children);
|
3840
|
+
Z.length > 0 && t.three.getObject(Z[0].object.uuid);
|
3841
|
+
}, X = G.current;
|
3842
|
+
return X.addEventListener("mousemove", _, !1), X.addEventListener("click", H, !1), () => {
|
3843
|
+
X.removeEventListener("mousemove", _), X.removeEventListener("click", H);
|
3795
3844
|
};
|
3796
3845
|
}
|
3797
|
-
}, [$,
|
3846
|
+
}, [$, S]);
|
3798
3847
|
const pe = [];
|
3799
|
-
return
|
3848
|
+
return o.forEach((p, v) => {
|
3800
3849
|
pe.push(v);
|
3801
3850
|
}), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
|
3802
|
-
/* @__PURE__ */ l.jsx("canvas", { ref:
|
3803
|
-
|
3804
|
-
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref:
|
3805
|
-
$ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(
|
3806
|
-
|
3807
|
-
const v =
|
3808
|
-
v !== void 0 && (
|
3851
|
+
/* @__PURE__ */ l.jsx("canvas", { ref: Ce }),
|
3852
|
+
S !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3853
|
+
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref: G, children: [
|
3854
|
+
$ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
|
3855
|
+
u.get(Y.name)?.dispose();
|
3856
|
+
const v = o.get(p);
|
3857
|
+
v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
|
3809
3858
|
} }) }),
|
3810
3859
|
($ === "Side by Side" || $ === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3811
|
-
/* @__PURE__ */ l.jsx(
|
3812
|
-
|
3813
|
-
const v =
|
3814
|
-
v !== void 0 && (
|
3860
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
|
3861
|
+
u.get(Y.name)?.dispose();
|
3862
|
+
const v = o.get(p);
|
3863
|
+
v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
|
3815
3864
|
} }),
|
3816
|
-
/* @__PURE__ */ l.jsx(
|
3817
|
-
|
3818
|
-
const v =
|
3819
|
-
v !== void 0 && (
|
3865
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
|
3866
|
+
u.get(ce.name)?.dispose();
|
3867
|
+
const v = o.get(p);
|
3868
|
+
v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
|
3820
3869
|
} })
|
3821
3870
|
] }),
|
3822
3871
|
$ === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3823
|
-
/* @__PURE__ */ l.jsx(
|
3824
|
-
|
3825
|
-
const v =
|
3826
|
-
v !== void 0 && (
|
3872
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
|
3873
|
+
u.get(Y.name)?.dispose();
|
3874
|
+
const v = o.get(p);
|
3875
|
+
v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
|
3827
3876
|
} }),
|
3828
|
-
/* @__PURE__ */ l.jsx(
|
3829
|
-
|
3830
|
-
const v =
|
3831
|
-
v !== void 0 && (
|
3877
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
|
3878
|
+
u.get(ce.name)?.dispose();
|
3879
|
+
const v = o.get(p);
|
3880
|
+
v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
|
3832
3881
|
} }),
|
3833
|
-
/* @__PURE__ */ l.jsx(
|
3834
|
-
|
3835
|
-
const v =
|
3836
|
-
v !== void 0 && (
|
3882
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: Ue, options: pe, ref: ze, onSelect: (p) => {
|
3883
|
+
u.get(Ue.name)?.dispose();
|
3884
|
+
const v = o.get(p);
|
3885
|
+
v !== void 0 && (Se(Ue), Ue = v, localStorage.setItem(`${n}_blCam`, v.name), te(v, ze.current));
|
3837
3886
|
} }),
|
3838
|
-
/* @__PURE__ */ l.jsx(
|
3839
|
-
|
3840
|
-
const v =
|
3841
|
-
v !== void 0 && (
|
3887
|
+
/* @__PURE__ */ l.jsx(Ke, { camera: $e, options: pe, ref: Me, onSelect: (p) => {
|
3888
|
+
u.get($e.name)?.dispose();
|
3889
|
+
const v = o.get(p);
|
3890
|
+
v !== void 0 && (Se($e), $e = v, localStorage.setItem(`${n}_brCam`, v.name), te(v, Me.current));
|
3842
3891
|
} })
|
3843
3892
|
] })
|
3844
3893
|
] }),
|
3845
3894
|
/* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
|
3846
3895
|
/* @__PURE__ */ l.jsx(
|
3847
|
-
|
3896
|
+
xt,
|
3848
3897
|
{
|
3849
|
-
index:
|
3850
|
-
options:
|
3898
|
+
index: Q.indexOf($),
|
3899
|
+
options: Q,
|
3851
3900
|
onSelect: (p) => {
|
3852
|
-
p !== $ && (
|
3901
|
+
p !== $ && (it(), le(p));
|
3853
3902
|
},
|
3854
|
-
open:
|
3903
|
+
open: ge,
|
3855
3904
|
onToggle: (p) => {
|
3856
|
-
|
3905
|
+
_e(p), je && Re(!1), Pe && De(!1);
|
3857
3906
|
}
|
3858
3907
|
}
|
3859
3908
|
),
|
3860
3909
|
/* @__PURE__ */ l.jsx(
|
3861
|
-
|
3910
|
+
xt,
|
3862
3911
|
{
|
3863
|
-
index:
|
3864
|
-
options:
|
3912
|
+
index: re.indexOf(yt),
|
3913
|
+
options: re,
|
3865
3914
|
onSelect: (p) => {
|
3866
|
-
if (p !==
|
3867
|
-
switch (
|
3915
|
+
if (p !== yt)
|
3916
|
+
switch (yt = p, yt) {
|
3868
3917
|
case "Depth":
|
3869
|
-
|
3918
|
+
f.overrideMaterial = P;
|
3870
3919
|
break;
|
3871
3920
|
case "Normals":
|
3872
|
-
|
3921
|
+
f.overrideMaterial = V;
|
3873
3922
|
break;
|
3874
3923
|
default:
|
3875
3924
|
case "Renderer":
|
3876
|
-
|
3925
|
+
f.overrideMaterial = null;
|
3877
3926
|
break;
|
3878
3927
|
case "Wireframe":
|
3879
|
-
|
3928
|
+
f.overrideMaterial = j;
|
3880
3929
|
break;
|
3881
3930
|
case "UVs":
|
3882
|
-
|
3931
|
+
f.overrideMaterial = U;
|
3883
3932
|
break;
|
3884
3933
|
}
|
3885
3934
|
},
|
3886
|
-
open:
|
3935
|
+
open: je,
|
3887
3936
|
onToggle: (p) => {
|
3888
|
-
|
3937
|
+
ge && _e(!1), Re(p), Pe && De(!1);
|
3889
3938
|
}
|
3890
3939
|
}
|
3891
3940
|
),
|
3892
3941
|
/* @__PURE__ */ l.jsx(
|
3893
|
-
|
3942
|
+
xt,
|
3894
3943
|
{
|
3895
3944
|
index: 0,
|
3896
3945
|
options: [
|
@@ -3898,11 +3947,11 @@ function xi(t) {
|
|
3898
3947
|
"Selection Mode"
|
3899
3948
|
],
|
3900
3949
|
onSelect: (p) => {
|
3901
|
-
|
3950
|
+
Et = p === "Selection Mode", M.visible = Et;
|
3902
3951
|
},
|
3903
|
-
open:
|
3952
|
+
open: Pe,
|
3904
3953
|
onToggle: (p) => {
|
3905
|
-
|
3954
|
+
ge && _e(!1), je && Re(!1), De(p);
|
3906
3955
|
}
|
3907
3956
|
}
|
3908
3957
|
)
|
@@ -3910,7 +3959,7 @@ function xi(t) {
|
|
3910
3959
|
] })
|
3911
3960
|
] });
|
3912
3961
|
}
|
3913
|
-
function
|
3962
|
+
function Oi(t) {
|
3914
3963
|
return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3915
3964
|
/* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
|
3916
3965
|
t.children,
|
@@ -3919,35 +3968,35 @@ function Ci(t) {
|
|
3919
3968
|
}
|
3920
3969
|
export {
|
3921
3970
|
Ft as Accordion,
|
3922
|
-
|
3971
|
+
vi as Application,
|
3923
3972
|
wt as BaseRemote,
|
3924
|
-
|
3973
|
+
Rn as ChildObject,
|
3925
3974
|
ka as ContainerObject,
|
3926
|
-
|
3927
|
-
|
3975
|
+
Ra as Draggable,
|
3976
|
+
_a as DraggableItem,
|
3928
3977
|
Pa as Dropdown,
|
3929
3978
|
Aa as DropdownItem,
|
3930
|
-
|
3931
|
-
|
3932
|
-
|
3933
|
-
|
3934
|
-
|
3935
|
-
|
3979
|
+
Oi as Editor,
|
3980
|
+
ti as Inspector,
|
3981
|
+
wi as MultiView,
|
3982
|
+
_n as NavButton,
|
3983
|
+
gi as RemoteComponents,
|
3984
|
+
xi as RemoteController,
|
3936
3985
|
Lt as RemoteTheatre,
|
3937
|
-
|
3938
|
-
|
3939
|
-
|
3940
|
-
|
3986
|
+
yi as RemoteThree,
|
3987
|
+
Ei as RemoteTweakpane,
|
3988
|
+
Si as SceneInspector,
|
3989
|
+
Ci as SidePanel,
|
3941
3990
|
I as ToolEvents,
|
3942
|
-
|
3943
|
-
|
3991
|
+
St as capitalize,
|
3992
|
+
Xe as clamp,
|
3944
3993
|
ga as colorToHex,
|
3945
3994
|
D as debugDispatcher,
|
3946
|
-
|
3995
|
+
fi as defaultTheatreCallback,
|
3947
3996
|
Mn as dispose,
|
3948
3997
|
ya as disposeMaterial,
|
3949
|
-
|
3950
|
-
|
3998
|
+
mi as disposeTexture,
|
3999
|
+
pi as distance,
|
3951
4000
|
On as hierarchyUUID,
|
3952
4001
|
va as isColor,
|
3953
4002
|
Wt as mix,
|
@@ -3955,7 +4004,7 @@ export {
|
|
3955
4004
|
Ht as normalize,
|
3956
4005
|
ma as randomID,
|
3957
4006
|
ba as resetThreeObjects,
|
3958
|
-
|
3959
|
-
|
4007
|
+
ht as round,
|
4008
|
+
bi as theatreEditorApp,
|
3960
4009
|
Dt as totalThreeObjects
|
3961
4010
|
};
|