@tomorrowevening/hermes 0.0.45 → 0.0.47
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 +1133 -1014
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/types/core/remote/RemoteTheatre.d.ts +1 -1
- package/types/core/remote/RemoteThree.d.ts +2 -1
- package/types/editor/sidePanel/inspector/InspectVector.d.ts +8 -0
- package/types/editor/sidePanel/inspector/InspectorField.d.ts +1 -1
- package/types/editor/utils.d.ts +2 -0
package/dist/hermes.es.js
CHANGED
@@ -1,65 +1,71 @@
|
|
1
|
-
import { EventDispatcher as
|
2
|
-
import { Pane as
|
3
|
-
import * as
|
4
|
-
import
|
5
|
-
import { Reorder as
|
6
|
-
const
|
7
|
-
},
|
1
|
+
import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as St, 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 K, Euler as Zn, Ray as Jn, Plane as Qn, MathUtils as ea, MOUSE as Xe, TOUCH as Ze, 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, PerspectiveCamera as Pt, WebGLRenderer as la, Raycaster as ua, OrthographicCamera as Gt, CameraHelper as da } from "three";
|
2
|
+
import { Pane as ha } from "tweakpane";
|
3
|
+
import * as fa from "@tweakpane/plugin-essentials";
|
4
|
+
import Cn, { useState as ne, useRef as he, useEffect as Re, forwardRef as pa, useMemo as Se } from "react";
|
5
|
+
import { Reorder as Sn } from "framer-motion";
|
6
|
+
const wn = () => {
|
7
|
+
}, ui = () => {
|
8
8
|
};
|
9
|
-
function
|
9
|
+
function dt(t) {
|
10
10
|
return t.substring(0, 1).toUpperCase() + t.substring(1);
|
11
11
|
}
|
12
|
-
function
|
12
|
+
function Je(t, n, a) {
|
13
13
|
return Math.min(n, Math.max(t, a));
|
14
14
|
}
|
15
|
-
function
|
15
|
+
function Ht(t, n, a) {
|
16
|
+
return (a - t) / (n - t);
|
17
|
+
}
|
18
|
+
function Wt(t, n, a) {
|
19
|
+
return t * (1 - a) + n * a;
|
20
|
+
}
|
21
|
+
function di(t, n) {
|
16
22
|
const a = t - n;
|
17
23
|
return Math.sqrt(a * a);
|
18
24
|
}
|
19
|
-
function
|
25
|
+
function ma() {
|
20
26
|
return Math.round(Math.random() * 1e6).toString();
|
21
27
|
}
|
22
|
-
function
|
28
|
+
function va(t) {
|
23
29
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
24
30
|
}
|
25
|
-
function
|
31
|
+
function ga(t) {
|
26
32
|
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
|
27
33
|
const u = d.toString(16);
|
28
34
|
return u.length === 1 ? "0" + u : u;
|
29
35
|
}, o = i(n), h = i(a), c = i(e);
|
30
36
|
return "#" + o + h + c;
|
31
37
|
}
|
32
|
-
function
|
38
|
+
function ut(t, n = 1) {
|
33
39
|
return Number(t.toFixed(n));
|
34
40
|
}
|
35
|
-
let
|
36
|
-
const
|
37
|
-
|
38
|
-
},
|
41
|
+
let Dt = 0;
|
42
|
+
const ba = () => {
|
43
|
+
Dt = 0;
|
44
|
+
}, On = (t) => {
|
39
45
|
if (!t)
|
40
46
|
return;
|
41
47
|
let n = t.name.replace(" ", "");
|
42
|
-
n.length === 0 && (n = `obj_${
|
43
|
-
|
48
|
+
n.length === 0 && (n = `obj_${Dt}`, Dt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
49
|
+
On(a);
|
44
50
|
});
|
45
|
-
},
|
51
|
+
}, hi = (t) => {
|
46
52
|
t?.dispose();
|
47
|
-
},
|
53
|
+
}, ya = (t) => {
|
48
54
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
49
|
-
},
|
55
|
+
}, Mn = (t) => {
|
50
56
|
if (t) {
|
51
57
|
for (; t.children.length > 0; ) {
|
52
58
|
const n = t.children[0];
|
53
|
-
n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) :
|
59
|
+
n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : Mn(n);
|
54
60
|
}
|
55
61
|
if (t.parent && t.parent.remove(t), t.isMesh) {
|
56
62
|
const n = t;
|
57
|
-
n.geometry?.dispose(),
|
63
|
+
n.geometry?.dispose(), ya(n.material);
|
58
64
|
}
|
59
65
|
t.dispose !== void 0 && t.dispose();
|
60
66
|
}
|
61
67
|
};
|
62
|
-
class
|
68
|
+
class fi {
|
63
69
|
components = /* @__PURE__ */ new Map();
|
64
70
|
listen;
|
65
71
|
// Protected
|
@@ -113,7 +119,7 @@ class di {
|
|
113
119
|
n && (this._mode = "editor");
|
114
120
|
}
|
115
121
|
}
|
116
|
-
const
|
122
|
+
const D = new an(), I = {
|
117
123
|
CUSTOM: "ToolEvents::custom",
|
118
124
|
// Components
|
119
125
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -129,7 +135,7 @@ const P = new en(), k = {
|
|
129
135
|
ADD_CAMERA: "ToolEvents::addCamera",
|
130
136
|
REMOVE_CAMERA: "ToolEvents::removeCamera"
|
131
137
|
};
|
132
|
-
class
|
138
|
+
class wt {
|
133
139
|
app;
|
134
140
|
constructor(n) {
|
135
141
|
this.app = n;
|
@@ -141,7 +147,7 @@ class Ct {
|
|
141
147
|
handleEditor(n, a, e) {
|
142
148
|
}
|
143
149
|
}
|
144
|
-
class
|
150
|
+
class pi extends wt {
|
145
151
|
selectDropdown(n, a) {
|
146
152
|
this.app.send({
|
147
153
|
event: "selectComponent",
|
@@ -165,22 +171,22 @@ class ui extends Ct {
|
|
165
171
|
handleApp(n, a, e) {
|
166
172
|
switch (e.event) {
|
167
173
|
case "selectComponent":
|
168
|
-
|
174
|
+
D.dispatchEvent({ type: I.SELECT_DROPDOWN, value: e.data });
|
169
175
|
break;
|
170
176
|
case "draggableListUpdate":
|
171
|
-
|
177
|
+
D.dispatchEvent({ type: I.DRAG_UPDATE, value: e.data });
|
172
178
|
break;
|
173
179
|
}
|
174
180
|
}
|
175
181
|
}
|
176
|
-
class
|
182
|
+
class Lt extends wt {
|
177
183
|
project;
|
178
184
|
sheets = /* @__PURE__ */ new Map();
|
179
185
|
sheetObjects = /* @__PURE__ */ new Map();
|
180
186
|
sheetObjectCBs = /* @__PURE__ */ new Map();
|
181
187
|
sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
182
188
|
activeSheet;
|
183
|
-
studio;
|
189
|
+
studio = void 0;
|
184
190
|
static rafDriver = void 0;
|
185
191
|
dispose() {
|
186
192
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
@@ -227,12 +233,12 @@ class Nt extends Ct {
|
|
227
233
|
return;
|
228
234
|
const h = `${n}_${a}`;
|
229
235
|
let c = this.sheetObjects.get(h);
|
230
|
-
c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i :
|
236
|
+
c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i : wn);
|
231
237
|
const d = c.onValuesChange((u) => {
|
232
238
|
if (this.app.editor) {
|
233
239
|
for (const b in u) {
|
234
240
|
const E = u[b];
|
235
|
-
typeof E == "object" &&
|
241
|
+
typeof E == "object" && va(E) && (u[b] = {
|
236
242
|
r: E.r,
|
237
243
|
g: E.g,
|
238
244
|
b: E.b,
|
@@ -249,8 +255,8 @@ class Nt extends Ct {
|
|
249
255
|
}
|
250
256
|
});
|
251
257
|
}
|
252
|
-
const
|
253
|
-
|
258
|
+
const m = this.sheetObjectCBs.get(h);
|
259
|
+
m !== void 0 && m(u);
|
254
260
|
});
|
255
261
|
return this.sheetObjectUnsubscribe.set(h, d), c;
|
256
262
|
}
|
@@ -269,10 +275,10 @@ class Nt extends Ct {
|
|
269
275
|
let o;
|
270
276
|
switch (e.event) {
|
271
277
|
case "setSheet":
|
272
|
-
o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio
|
278
|
+
o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio?.setSelection([o]));
|
273
279
|
break;
|
274
280
|
case "setSheetObject":
|
275
|
-
o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio
|
281
|
+
o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio?.setSelection([o]);
|
276
282
|
break;
|
277
283
|
case "updateSheetObject":
|
278
284
|
o = i.sheets.get(e.data.sheet), o !== void 0 && o.sequence.pause(), o = i.sheetObjectCBs.get(e.data.sheetObject), o !== void 0 && o(e.data.values);
|
@@ -297,29 +303,29 @@ class Nt extends Ct {
|
|
297
303
|
}
|
298
304
|
handleEditorApp(n, a) {
|
299
305
|
if (n.editor) {
|
300
|
-
this.studio
|
306
|
+
this.studio?.ui.restore(), this.studio?.onSelectionChange((h) => {
|
301
307
|
h.length < 1 || h.forEach((c) => {
|
302
|
-
let d = c.address.sheetId, u = "setSheet",
|
308
|
+
let d = c.address.sheetId, u = "setSheet", m = {};
|
303
309
|
switch (c.type) {
|
304
310
|
case "Theatre_Sheet_PublicAPI":
|
305
|
-
u = "setSheet",
|
311
|
+
u = "setSheet", m = {
|
306
312
|
sheet: c.address.sheetId
|
307
313
|
}, a.activeSheet = a.sheets.get(c.address.sheetId);
|
308
314
|
break;
|
309
315
|
case "Theatre_SheetObject_PublicAPI":
|
310
|
-
u = "setSheetObject", d += `_${c.address.objectKey}`,
|
316
|
+
u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
|
311
317
|
id: d,
|
312
318
|
sheet: c.address.sheetId,
|
313
319
|
key: c.address.objectKey
|
314
320
|
}, a.activeSheet = a.sheets.get(c.address.sheetId);
|
315
321
|
break;
|
316
322
|
}
|
317
|
-
n.send({ event: u, target: "app", data:
|
323
|
+
n.send({ event: u, target: "app", data: m });
|
318
324
|
});
|
319
325
|
});
|
320
326
|
let e = -1;
|
321
327
|
const i = () => {
|
322
|
-
if (
|
328
|
+
if (Lt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
|
323
329
|
e = a.activeSheet.sequence.position;
|
324
330
|
const h = a.activeSheet;
|
325
331
|
n.send({
|
@@ -336,34 +342,34 @@ class Nt extends Ct {
|
|
336
342
|
};
|
337
343
|
i(), o();
|
338
344
|
} else
|
339
|
-
this.studio
|
345
|
+
this.studio?.ui.hide();
|
340
346
|
}
|
341
347
|
}
|
342
|
-
function
|
348
|
+
function mi(t, n, a) {
|
343
349
|
if (t.editor) {
|
344
350
|
a.ui.restore(), a.onSelectionChange((h) => {
|
345
351
|
h.length < 1 || h.forEach((c) => {
|
346
|
-
let d = c.address.sheetId, u = "setSheet",
|
352
|
+
let d = c.address.sheetId, u = "setSheet", m = {};
|
347
353
|
switch (c.type) {
|
348
354
|
case "Theatre_Sheet_PublicAPI":
|
349
|
-
u = "setSheet",
|
355
|
+
u = "setSheet", m = {
|
350
356
|
sheet: c.address.sheetId
|
351
357
|
}, n.activeSheet = n.sheets.get(c.address.sheetId);
|
352
358
|
break;
|
353
359
|
case "Theatre_SheetObject_PublicAPI":
|
354
|
-
u = "setSheetObject", d += `_${c.address.objectKey}`,
|
360
|
+
u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
|
355
361
|
id: d,
|
356
362
|
sheet: c.address.sheetId,
|
357
363
|
key: c.address.objectKey
|
358
364
|
}, n.activeSheet = n.sheets.get(c.address.sheetId);
|
359
365
|
break;
|
360
366
|
}
|
361
|
-
t.send({ event: u, target: "app", data:
|
367
|
+
t.send({ event: u, target: "app", data: m });
|
362
368
|
});
|
363
369
|
});
|
364
370
|
let e = -1;
|
365
371
|
const i = () => {
|
366
|
-
if (
|
372
|
+
if (Lt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
|
367
373
|
e = n.activeSheet.sequence.position;
|
368
374
|
const h = n.activeSheet;
|
369
375
|
t.send({
|
@@ -382,7 +388,7 @@ function hi(t, n, a) {
|
|
382
388
|
} else
|
383
389
|
a.ui.hide();
|
384
390
|
}
|
385
|
-
function
|
391
|
+
function Ea(t) {
|
386
392
|
if (t.name === "cameras")
|
387
393
|
return "camera";
|
388
394
|
if (t.name === "interactive")
|
@@ -396,7 +402,7 @@ function ga(t) {
|
|
396
402
|
const n = t.type;
|
397
403
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
398
404
|
}
|
399
|
-
function
|
405
|
+
function Tn(t) {
|
400
406
|
const n = {
|
401
407
|
name: t.name,
|
402
408
|
type: t.type,
|
@@ -404,10 +410,10 @@ function wn(t) {
|
|
404
410
|
children: []
|
405
411
|
};
|
406
412
|
return t.children.forEach((a) => {
|
407
|
-
n.children.push(
|
413
|
+
n.children.push(Tn(a));
|
408
414
|
}), n;
|
409
415
|
}
|
410
|
-
function
|
416
|
+
function xa(t) {
|
411
417
|
const n = {};
|
412
418
|
for (const a in t) {
|
413
419
|
const e = t[a].value;
|
@@ -415,7 +421,7 @@ function ba(t) {
|
|
415
421
|
}
|
416
422
|
return n;
|
417
423
|
}
|
418
|
-
function
|
424
|
+
function Ca(t) {
|
419
425
|
switch (t) {
|
420
426
|
case "blendSrcAlpha":
|
421
427
|
case "blendDstAlpha":
|
@@ -427,10 +433,10 @@ function ya(t) {
|
|
427
433
|
}
|
428
434
|
return !1;
|
429
435
|
}
|
430
|
-
function
|
436
|
+
function Qe(t) {
|
431
437
|
const n = {};
|
432
438
|
for (const a in t) {
|
433
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
439
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ca(a))
|
434
440
|
continue;
|
435
441
|
const e = typeof t[a], i = t[a];
|
436
442
|
switch (e) {
|
@@ -442,13 +448,13 @@ function Je(t) {
|
|
442
448
|
case "object":
|
443
449
|
if (i !== null)
|
444
450
|
if (n[a] = i, i.isTexture)
|
445
|
-
if (i instanceof
|
451
|
+
if (i instanceof rn) {
|
446
452
|
const o = i.source.toJSON();
|
447
453
|
n[a] = { src: o.url };
|
448
454
|
} else
|
449
|
-
i instanceof
|
455
|
+
i instanceof In && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
|
450
456
|
else
|
451
|
-
a === "uniforms" && (n[a] =
|
457
|
+
a === "uniforms" && (n[a] = xa(n[a]));
|
452
458
|
else
|
453
459
|
n[a] = { src: "" };
|
454
460
|
break;
|
@@ -483,28 +489,28 @@ function At(t) {
|
|
483
489
|
if (Array.isArray(e.material)) {
|
484
490
|
const i = [];
|
485
491
|
e.material.forEach((o) => {
|
486
|
-
i.push(
|
492
|
+
i.push(Qe(o));
|
487
493
|
}), n.material = i;
|
488
494
|
} else
|
489
|
-
n.material =
|
495
|
+
n.material = Qe(e.material);
|
490
496
|
} else if (a.search("points") > -1) {
|
491
497
|
const e = t;
|
492
498
|
if (Array.isArray(e.material)) {
|
493
499
|
const i = [];
|
494
500
|
e.material.forEach((o) => {
|
495
|
-
i.push(
|
501
|
+
i.push(Qe(o));
|
496
502
|
}), n.material = i;
|
497
503
|
} else
|
498
|
-
n.material =
|
504
|
+
n.material = Qe(e.material);
|
499
505
|
} else if (a.search("line") > -1) {
|
500
506
|
const e = t;
|
501
507
|
if (Array.isArray(e.material)) {
|
502
508
|
const i = [];
|
503
509
|
e.material.forEach((o) => {
|
504
|
-
i.push(
|
510
|
+
i.push(Qe(o));
|
505
511
|
}), n.material = i;
|
506
512
|
} else
|
507
|
-
n.material =
|
513
|
+
n.material = Qe(e.material);
|
508
514
|
} else
|
509
515
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
510
516
|
fov: t.fov,
|
@@ -534,7 +540,7 @@ function At(t) {
|
|
534
540
|
});
|
535
541
|
return n;
|
536
542
|
}
|
537
|
-
function
|
543
|
+
function Sa(t, n) {
|
538
544
|
const a = n.split(".");
|
539
545
|
switch (a.length) {
|
540
546
|
case 1:
|
@@ -571,17 +577,18 @@ function ee(t, n, a) {
|
|
571
577
|
break;
|
572
578
|
}
|
573
579
|
}
|
574
|
-
function
|
580
|
+
function It(t) {
|
575
581
|
return new Promise((n, a) => {
|
576
582
|
const e = new Image();
|
577
583
|
e.onload = () => {
|
578
|
-
const i = new
|
579
|
-
i.wrapS =
|
584
|
+
const i = new rn(e);
|
585
|
+
i.wrapS = $t, i.wrapT = $t, i.needsUpdate = !0, n(i);
|
580
586
|
}, e.onerror = a, e.src = t;
|
581
587
|
});
|
582
588
|
}
|
583
|
-
class
|
589
|
+
class vi extends wt {
|
584
590
|
scene = void 0;
|
591
|
+
renderer = void 0;
|
585
592
|
getObject(n) {
|
586
593
|
this.app.debugEnabled && this.app.send({
|
587
594
|
event: "getObject",
|
@@ -634,8 +641,8 @@ class fi extends Ct {
|
|
634
641
|
setScene(n) {
|
635
642
|
if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
|
636
643
|
return;
|
637
|
-
|
638
|
-
const a =
|
644
|
+
ba(), On(this.scene);
|
645
|
+
const a = Tn(this.scene);
|
639
646
|
this.app.send({
|
640
647
|
event: "setScene",
|
641
648
|
target: "editor",
|
@@ -665,37 +672,37 @@ class fi extends Ct {
|
|
665
672
|
handleApp(n, a, e) {
|
666
673
|
switch (e.event) {
|
667
674
|
case "getObject":
|
668
|
-
|
675
|
+
D.dispatchEvent({ type: I.GET_OBJECT, value: e.data });
|
669
676
|
break;
|
670
677
|
case "updateObject":
|
671
|
-
|
678
|
+
D.dispatchEvent({ type: I.UPDATE_OBJECT, value: e.data });
|
672
679
|
break;
|
673
680
|
case "createTexture":
|
674
|
-
|
681
|
+
D.dispatchEvent({ type: I.CREATE_TEXTURE, value: e.data });
|
675
682
|
break;
|
676
683
|
case "requestMethod":
|
677
|
-
|
684
|
+
D.dispatchEvent({ type: I.REQUEST_METHOD, value: e.data });
|
678
685
|
break;
|
679
686
|
}
|
680
687
|
}
|
681
688
|
handleEditor(n, a, e) {
|
682
689
|
switch (e.event) {
|
683
690
|
case "setObject":
|
684
|
-
|
691
|
+
D.dispatchEvent({ type: I.SET_OBJECT, value: e.data });
|
685
692
|
break;
|
686
693
|
case "setScene":
|
687
|
-
|
694
|
+
D.dispatchEvent({ type: I.SET_SCENE, value: e.data });
|
688
695
|
break;
|
689
696
|
case "addCamera":
|
690
|
-
|
697
|
+
D.dispatchEvent({ type: I.ADD_CAMERA, value: e.data });
|
691
698
|
break;
|
692
699
|
case "removeCamera":
|
693
|
-
|
700
|
+
D.dispatchEvent({ type: I.REMOVE_CAMERA, value: e.data });
|
694
701
|
break;
|
695
702
|
}
|
696
703
|
}
|
697
704
|
}
|
698
|
-
class
|
705
|
+
class gi extends wt {
|
699
706
|
bindCBs;
|
700
707
|
buttonCBs;
|
701
708
|
pane = void 0;
|
@@ -706,7 +713,7 @@ class pi extends Ct {
|
|
706
713
|
super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
|
707
714
|
}
|
708
715
|
createGUI() {
|
709
|
-
this.pane = new
|
716
|
+
this.pane = new ha({ title: "GUI" }), this.pane.registerPlugin(fa);
|
710
717
|
}
|
711
718
|
dispose() {
|
712
719
|
this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
|
@@ -732,7 +739,7 @@ class pi extends Ct {
|
|
732
739
|
}
|
733
740
|
// Binding
|
734
741
|
bind(n, a, e, i = void 0) {
|
735
|
-
const o = this.bindID, h = e.onChange !== void 0 ? e.onChange :
|
742
|
+
const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
|
736
743
|
this.bindCBs.set(o, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (d) => {
|
737
744
|
this.app.send({
|
738
745
|
event: "updateBind",
|
@@ -813,7 +820,7 @@ class pi extends Ct {
|
|
813
820
|
}
|
814
821
|
}
|
815
822
|
}
|
816
|
-
var
|
823
|
+
var Nt = { exports: {} }, st = {};
|
817
824
|
/**
|
818
825
|
* @license React
|
819
826
|
* react-jsx-runtime.production.min.js
|
@@ -823,25 +830,25 @@ var It = { exports: {} }, rt = {};
|
|
823
830
|
* This source code is licensed under the MIT license found in the
|
824
831
|
* LICENSE file in the root directory of this source tree.
|
825
832
|
*/
|
826
|
-
var
|
827
|
-
function
|
828
|
-
if (
|
829
|
-
return
|
830
|
-
|
831
|
-
var t =
|
833
|
+
var qt;
|
834
|
+
function wa() {
|
835
|
+
if (qt)
|
836
|
+
return st;
|
837
|
+
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, o = { key: !0, ref: !0, __self: !0, __source: !0 };
|
832
839
|
function h(c, d, u) {
|
833
|
-
var
|
834
|
-
u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (
|
835
|
-
for (
|
836
|
-
e.call(d,
|
840
|
+
var m, b = {}, E = null, x = null;
|
841
|
+
u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (x = d.ref);
|
842
|
+
for (m in d)
|
843
|
+
e.call(d, m) && !o.hasOwnProperty(m) && (b[m] = d[m]);
|
837
844
|
if (c && c.defaultProps)
|
838
|
-
for (
|
839
|
-
b[
|
840
|
-
return { $$typeof: n, type: c, key: E, ref:
|
845
|
+
for (m in d = c.defaultProps, d)
|
846
|
+
b[m] === void 0 && (b[m] = d[m]);
|
847
|
+
return { $$typeof: n, type: c, key: E, ref: x, props: b, _owner: i.current };
|
841
848
|
}
|
842
|
-
return
|
849
|
+
return st.Fragment = a, st.jsx = h, st.jsxs = h, st;
|
843
850
|
}
|
844
|
-
var
|
851
|
+
var ot = {};
|
845
852
|
/**
|
846
853
|
* @license React
|
847
854
|
* react-jsx-runtime.development.js
|
@@ -851,54 +858,54 @@ var st = {};
|
|
851
858
|
* This source code is licensed under the MIT license found in the
|
852
859
|
* LICENSE file in the root directory of this source tree.
|
853
860
|
*/
|
854
|
-
var
|
855
|
-
function
|
856
|
-
return
|
857
|
-
var t =
|
858
|
-
function
|
861
|
+
var Kt;
|
862
|
+
function Oa() {
|
863
|
+
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"), o = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), R = Symbol.iterator, P = "@@iterator";
|
865
|
+
function Y(r) {
|
859
866
|
if (r === null || typeof r != "object")
|
860
867
|
return null;
|
861
|
-
var f =
|
868
|
+
var f = R && r[R] || r[P];
|
862
869
|
return typeof f == "function" ? f : null;
|
863
870
|
}
|
864
|
-
var
|
871
|
+
var F = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
865
872
|
function M(r) {
|
866
873
|
{
|
867
|
-
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0),
|
868
|
-
g[
|
869
|
-
|
874
|
+
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), S = 1; S < f; S++)
|
875
|
+
g[S - 1] = arguments[S];
|
876
|
+
w("error", r, g);
|
870
877
|
}
|
871
878
|
}
|
872
|
-
function
|
879
|
+
function w(r, f, g) {
|
873
880
|
{
|
874
|
-
var
|
875
|
-
|
876
|
-
var
|
877
|
-
return String(
|
881
|
+
var S = F.ReactDebugCurrentFrame, N = S.getStackAddendum();
|
882
|
+
N !== "" && (f += "%s", g = g.concat([N]));
|
883
|
+
var B = g.map(function(j) {
|
884
|
+
return String(j);
|
878
885
|
});
|
879
|
-
|
886
|
+
B.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, B);
|
880
887
|
}
|
881
888
|
}
|
882
|
-
var
|
883
|
-
|
884
|
-
function
|
885
|
-
return !!(typeof r == "string" || typeof r == "function" || r === e || r === o ||
|
889
|
+
var ae = !1, X = !1, $ = !1, W = !1, C = !1, Pe;
|
890
|
+
Pe = Symbol.for("react.module.reference");
|
891
|
+
function Be(r) {
|
892
|
+
return !!(typeof r == "string" || typeof r == "function" || r === e || r === o || C || r === i || r === u || r === m || W || r === x || ae || X || $ || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
|
886
893
|
// types supported by any Flight configuration anywhere since
|
887
894
|
// we don't know which Flight build this will end up being used
|
888
895
|
// with.
|
889
|
-
r.$$typeof ===
|
896
|
+
r.$$typeof === Pe || r.getModuleId !== void 0));
|
890
897
|
}
|
891
|
-
function
|
892
|
-
var
|
893
|
-
if (
|
894
|
-
return
|
895
|
-
var
|
896
|
-
return
|
898
|
+
function Me(r, f, g) {
|
899
|
+
var S = r.displayName;
|
900
|
+
if (S)
|
901
|
+
return S;
|
902
|
+
var N = f.displayName || f.name || "";
|
903
|
+
return N !== "" ? g + "(" + N + ")" : g;
|
897
904
|
}
|
898
|
-
function
|
905
|
+
function ge(r) {
|
899
906
|
return r.displayName || "Context";
|
900
907
|
}
|
901
|
-
function
|
908
|
+
function ie(r) {
|
902
909
|
if (r == null)
|
903
910
|
return null;
|
904
911
|
if (typeof r.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
@@ -916,26 +923,26 @@ function Ca() {
|
|
916
923
|
return "StrictMode";
|
917
924
|
case u:
|
918
925
|
return "Suspense";
|
919
|
-
case
|
926
|
+
case m:
|
920
927
|
return "SuspenseList";
|
921
928
|
}
|
922
929
|
if (typeof r == "object")
|
923
930
|
switch (r.$$typeof) {
|
924
931
|
case c:
|
925
932
|
var f = r;
|
926
|
-
return
|
933
|
+
return ge(f) + ".Consumer";
|
927
934
|
case h:
|
928
935
|
var g = r;
|
929
|
-
return
|
936
|
+
return ge(g._context) + ".Provider";
|
930
937
|
case d:
|
931
|
-
return
|
938
|
+
return Me(r, r.render, "ForwardRef");
|
932
939
|
case b:
|
933
|
-
var
|
934
|
-
return
|
940
|
+
var S = r.displayName || null;
|
941
|
+
return S !== null ? S : ie(r.type) || "Memo";
|
935
942
|
case E: {
|
936
|
-
var
|
943
|
+
var N = r, B = N._payload, j = N._init;
|
937
944
|
try {
|
938
|
-
return
|
945
|
+
return ie(j(B));
|
939
946
|
} catch {
|
940
947
|
return null;
|
941
948
|
}
|
@@ -943,18 +950,18 @@ function Ca() {
|
|
943
950
|
}
|
944
951
|
return null;
|
945
952
|
}
|
946
|
-
var
|
947
|
-
function
|
953
|
+
var fe = Object.assign, be = 0, ye, Z, ve, Ae, ke, pe, p;
|
954
|
+
function v() {
|
948
955
|
}
|
949
|
-
|
950
|
-
function
|
956
|
+
v.__reactDisabledLog = !0;
|
957
|
+
function O() {
|
951
958
|
{
|
952
|
-
if (
|
953
|
-
|
959
|
+
if (be === 0) {
|
960
|
+
ye = console.log, Z = console.info, ve = console.warn, Ae = console.error, ke = console.group, pe = console.groupCollapsed, p = console.groupEnd;
|
954
961
|
var r = {
|
955
962
|
configurable: !0,
|
956
963
|
enumerable: !0,
|
957
|
-
value:
|
964
|
+
value: v,
|
958
965
|
writable: !0
|
959
966
|
};
|
960
967
|
Object.defineProperties(console, {
|
@@ -967,254 +974,254 @@ function Ca() {
|
|
967
974
|
groupEnd: r
|
968
975
|
});
|
969
976
|
}
|
970
|
-
|
977
|
+
be++;
|
971
978
|
}
|
972
979
|
}
|
973
|
-
function
|
980
|
+
function A() {
|
974
981
|
{
|
975
|
-
if (
|
982
|
+
if (be--, be === 0) {
|
976
983
|
var r = {
|
977
984
|
configurable: !0,
|
978
985
|
enumerable: !0,
|
979
986
|
writable: !0
|
980
987
|
};
|
981
988
|
Object.defineProperties(console, {
|
982
|
-
log:
|
983
|
-
value:
|
989
|
+
log: fe({}, r, {
|
990
|
+
value: ye
|
984
991
|
}),
|
985
|
-
info:
|
986
|
-
value:
|
992
|
+
info: fe({}, r, {
|
993
|
+
value: Z
|
987
994
|
}),
|
988
|
-
warn:
|
989
|
-
value:
|
995
|
+
warn: fe({}, r, {
|
996
|
+
value: ve
|
990
997
|
}),
|
991
|
-
error:
|
992
|
-
value:
|
998
|
+
error: fe({}, r, {
|
999
|
+
value: Ae
|
993
1000
|
}),
|
994
|
-
group:
|
1001
|
+
group: fe({}, r, {
|
995
1002
|
value: ke
|
996
1003
|
}),
|
997
|
-
groupCollapsed:
|
998
|
-
value:
|
1004
|
+
groupCollapsed: fe({}, r, {
|
1005
|
+
value: pe
|
999
1006
|
}),
|
1000
|
-
groupEnd:
|
1007
|
+
groupEnd: fe({}, r, {
|
1001
1008
|
value: p
|
1002
1009
|
})
|
1003
1010
|
});
|
1004
1011
|
}
|
1005
|
-
|
1012
|
+
be < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
1006
1013
|
}
|
1007
1014
|
}
|
1008
|
-
var G =
|
1009
|
-
function
|
1015
|
+
var G = F.ReactCurrentDispatcher, H;
|
1016
|
+
function se(r, f, g) {
|
1010
1017
|
{
|
1011
|
-
if (
|
1018
|
+
if (H === void 0)
|
1012
1019
|
try {
|
1013
1020
|
throw Error();
|
1014
|
-
} catch (
|
1015
|
-
var
|
1016
|
-
|
1021
|
+
} catch (N) {
|
1022
|
+
var S = N.stack.trim().match(/\n( *(at )?)/);
|
1023
|
+
H = S && S[1] || "";
|
1017
1024
|
}
|
1018
1025
|
return `
|
1019
|
-
` +
|
1026
|
+
` + H + r;
|
1020
1027
|
}
|
1021
1028
|
}
|
1022
|
-
var
|
1029
|
+
var z = !1, J;
|
1023
1030
|
{
|
1024
|
-
var
|
1025
|
-
|
1031
|
+
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
1032
|
+
J = new oe();
|
1026
1033
|
}
|
1027
|
-
function
|
1028
|
-
if (!r ||
|
1034
|
+
function k(r, f) {
|
1035
|
+
if (!r || z)
|
1029
1036
|
return "";
|
1030
1037
|
{
|
1031
|
-
var g =
|
1038
|
+
var g = J.get(r);
|
1032
1039
|
if (g !== void 0)
|
1033
1040
|
return g;
|
1034
1041
|
}
|
1035
|
-
var
|
1036
|
-
|
1037
|
-
var
|
1042
|
+
var S;
|
1043
|
+
z = !0;
|
1044
|
+
var N = Error.prepareStackTrace;
|
1038
1045
|
Error.prepareStackTrace = void 0;
|
1039
|
-
var
|
1040
|
-
|
1046
|
+
var B;
|
1047
|
+
B = G.current, G.current = null, O();
|
1041
1048
|
try {
|
1042
1049
|
if (f) {
|
1043
|
-
var
|
1050
|
+
var j = function() {
|
1044
1051
|
throw Error();
|
1045
1052
|
};
|
1046
|
-
if (Object.defineProperty(
|
1053
|
+
if (Object.defineProperty(j.prototype, "props", {
|
1047
1054
|
set: function() {
|
1048
1055
|
throw Error();
|
1049
1056
|
}
|
1050
1057
|
}), typeof Reflect == "object" && Reflect.construct) {
|
1051
1058
|
try {
|
1052
|
-
Reflect.construct(
|
1053
|
-
} catch (
|
1054
|
-
|
1059
|
+
Reflect.construct(j, []);
|
1060
|
+
} catch (_e) {
|
1061
|
+
S = _e;
|
1055
1062
|
}
|
1056
|
-
Reflect.construct(r, [],
|
1063
|
+
Reflect.construct(r, [], j);
|
1057
1064
|
} else {
|
1058
1065
|
try {
|
1059
|
-
|
1060
|
-
} catch (
|
1061
|
-
|
1066
|
+
j.call();
|
1067
|
+
} catch (_e) {
|
1068
|
+
S = _e;
|
1062
1069
|
}
|
1063
|
-
r.call(
|
1070
|
+
r.call(j.prototype);
|
1064
1071
|
}
|
1065
1072
|
} else {
|
1066
1073
|
try {
|
1067
1074
|
throw Error();
|
1068
|
-
} catch (
|
1069
|
-
|
1075
|
+
} catch (_e) {
|
1076
|
+
S = _e;
|
1070
1077
|
}
|
1071
1078
|
r();
|
1072
1079
|
}
|
1073
|
-
} catch (
|
1074
|
-
if (
|
1075
|
-
for (var
|
1076
|
-
`), de =
|
1077
|
-
`),
|
1078
|
-
|
1079
|
-
for (;
|
1080
|
-
if (
|
1081
|
-
if (
|
1080
|
+
} catch (_e) {
|
1081
|
+
if (_e && S && typeof _e.stack == "string") {
|
1082
|
+
for (var _ = _e.stack.split(`
|
1083
|
+
`), de = S.stack.split(`
|
1084
|
+
`), Q = _.length - 1, te = de.length - 1; Q >= 1 && te >= 0 && _[Q] !== de[te]; )
|
1085
|
+
te--;
|
1086
|
+
for (; Q >= 1 && te >= 0; Q--, te--)
|
1087
|
+
if (_[Q] !== de[te]) {
|
1088
|
+
if (Q !== 1 || te !== 1)
|
1082
1089
|
do
|
1083
|
-
if (
|
1084
|
-
var
|
1085
|
-
` +
|
1086
|
-
return r.displayName &&
|
1090
|
+
if (Q--, te--, te < 0 || _[Q] !== de[te]) {
|
1091
|
+
var Ce = `
|
1092
|
+
` + _[Q].replace(" at new ", " at ");
|
1093
|
+
return r.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", r.displayName)), typeof r == "function" && J.set(r, Ce), Ce;
|
1087
1094
|
}
|
1088
|
-
while (
|
1095
|
+
while (Q >= 1 && te >= 0);
|
1089
1096
|
break;
|
1090
1097
|
}
|
1091
1098
|
}
|
1092
1099
|
} finally {
|
1093
|
-
|
1100
|
+
z = !1, G.current = B, A(), Error.prepareStackTrace = N;
|
1094
1101
|
}
|
1095
|
-
var Ke = r ? r.displayName || r.name : "",
|
1096
|
-
return typeof r == "function" &&
|
1102
|
+
var Ke = r ? r.displayName || r.name : "", Ut = Ke ? se(Ke) : "";
|
1103
|
+
return typeof r == "function" && J.set(r, Ut), Ut;
|
1097
1104
|
}
|
1098
|
-
function
|
1099
|
-
return
|
1105
|
+
function U(r, f, g) {
|
1106
|
+
return k(r, !1);
|
1100
1107
|
}
|
1101
|
-
function
|
1108
|
+
function re(r) {
|
1102
1109
|
var f = r.prototype;
|
1103
1110
|
return !!(f && f.isReactComponent);
|
1104
1111
|
}
|
1105
|
-
function
|
1112
|
+
function we(r, f, g) {
|
1106
1113
|
if (r == null)
|
1107
1114
|
return "";
|
1108
1115
|
if (typeof r == "function")
|
1109
|
-
return
|
1116
|
+
return k(r, re(r));
|
1110
1117
|
if (typeof r == "string")
|
1111
|
-
return
|
1118
|
+
return se(r);
|
1112
1119
|
switch (r) {
|
1113
1120
|
case u:
|
1114
|
-
return
|
1115
|
-
case
|
1116
|
-
return
|
1121
|
+
return se("Suspense");
|
1122
|
+
case m:
|
1123
|
+
return se("SuspenseList");
|
1117
1124
|
}
|
1118
1125
|
if (typeof r == "object")
|
1119
1126
|
switch (r.$$typeof) {
|
1120
1127
|
case d:
|
1121
|
-
return
|
1128
|
+
return U(r.render);
|
1122
1129
|
case b:
|
1123
|
-
return
|
1130
|
+
return we(r.type, f, g);
|
1124
1131
|
case E: {
|
1125
|
-
var
|
1132
|
+
var S = r, N = S._payload, B = S._init;
|
1126
1133
|
try {
|
1127
|
-
return
|
1134
|
+
return we(B(N), f, g);
|
1128
1135
|
} catch {
|
1129
1136
|
}
|
1130
1137
|
}
|
1131
1138
|
}
|
1132
1139
|
return "";
|
1133
1140
|
}
|
1134
|
-
var
|
1135
|
-
function
|
1141
|
+
var Te = Object.prototype.hasOwnProperty, ht = {}, ft = F.ReactDebugCurrentFrame;
|
1142
|
+
function Ue(r) {
|
1136
1143
|
if (r) {
|
1137
|
-
var f = r._owner, g =
|
1138
|
-
|
1144
|
+
var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
|
1145
|
+
ft.setExtraStackFrame(g);
|
1139
1146
|
} else
|
1140
|
-
|
1147
|
+
ft.setExtraStackFrame(null);
|
1141
1148
|
}
|
1142
|
-
function
|
1149
|
+
function tt(r, f, g, S, N) {
|
1143
1150
|
{
|
1144
|
-
var
|
1145
|
-
for (var
|
1146
|
-
if (
|
1147
|
-
var
|
1151
|
+
var B = Function.call.bind(Te);
|
1152
|
+
for (var j in r)
|
1153
|
+
if (B(r, j)) {
|
1154
|
+
var _ = void 0;
|
1148
1155
|
try {
|
1149
|
-
if (typeof r[
|
1150
|
-
var de = Error((
|
1156
|
+
if (typeof r[j] != "function") {
|
1157
|
+
var de = Error((S || "React class") + ": " + g + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
1151
1158
|
throw de.name = "Invariant Violation", de;
|
1152
1159
|
}
|
1153
|
-
|
1154
|
-
} catch (
|
1155
|
-
|
1160
|
+
_ = r[j](f, j, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1161
|
+
} catch (Q) {
|
1162
|
+
_ = Q;
|
1156
1163
|
}
|
1157
|
-
|
1164
|
+
_ && !(_ instanceof Error) && (Ue(N), M("%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).", S || "React class", g, j, typeof _), Ue(null)), _ instanceof Error && !(_.message in ht) && (ht[_.message] = !0, Ue(N), M("Failed %s type: %s", g, _.message), Ue(null));
|
1158
1165
|
}
|
1159
1166
|
}
|
1160
1167
|
}
|
1161
|
-
var
|
1162
|
-
function
|
1163
|
-
return
|
1168
|
+
var $e = Array.isArray;
|
1169
|
+
function nt(r) {
|
1170
|
+
return $e(r);
|
1164
1171
|
}
|
1165
|
-
function
|
1172
|
+
function Ot(r) {
|
1166
1173
|
{
|
1167
1174
|
var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
1168
1175
|
return g;
|
1169
1176
|
}
|
1170
1177
|
}
|
1171
|
-
function
|
1178
|
+
function pt(r) {
|
1172
1179
|
try {
|
1173
|
-
return
|
1180
|
+
return mt(r), !1;
|
1174
1181
|
} catch {
|
1175
1182
|
return !0;
|
1176
1183
|
}
|
1177
1184
|
}
|
1178
|
-
function
|
1185
|
+
function mt(r) {
|
1179
1186
|
return "" + r;
|
1180
1187
|
}
|
1181
|
-
function
|
1182
|
-
if (
|
1183
|
-
return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
1188
|
+
function vt(r) {
|
1189
|
+
if (pt(r))
|
1190
|
+
return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ot(r)), mt(r);
|
1184
1191
|
}
|
1185
|
-
var je =
|
1192
|
+
var je = F.ReactCurrentOwner, at = {
|
1186
1193
|
key: !0,
|
1187
1194
|
ref: !0,
|
1188
1195
|
__self: !0,
|
1189
1196
|
__source: !0
|
1190
|
-
},
|
1197
|
+
}, it, gt, qe;
|
1191
1198
|
qe = {};
|
1192
|
-
function
|
1193
|
-
if (
|
1199
|
+
function Mt(r) {
|
1200
|
+
if (Te.call(r, "ref")) {
|
1194
1201
|
var f = Object.getOwnPropertyDescriptor(r, "ref").get;
|
1195
1202
|
if (f && f.isReactWarning)
|
1196
1203
|
return !1;
|
1197
1204
|
}
|
1198
1205
|
return r.ref !== void 0;
|
1199
1206
|
}
|
1200
|
-
function
|
1201
|
-
if (
|
1207
|
+
function Tt(r) {
|
1208
|
+
if (Te.call(r, "key")) {
|
1202
1209
|
var f = Object.getOwnPropertyDescriptor(r, "key").get;
|
1203
1210
|
if (f && f.isReactWarning)
|
1204
1211
|
return !1;
|
1205
1212
|
}
|
1206
1213
|
return r.key !== void 0;
|
1207
1214
|
}
|
1208
|
-
function
|
1215
|
+
function bt(r, f) {
|
1209
1216
|
if (typeof r.ref == "string" && je.current && f && je.current.stateNode !== f) {
|
1210
|
-
var g =
|
1211
|
-
qe[g] || (M('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',
|
1217
|
+
var g = ie(je.current.type);
|
1218
|
+
qe[g] || (M('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', ie(je.current.type), r.ref), qe[g] = !0);
|
1212
1219
|
}
|
1213
1220
|
}
|
1214
1221
|
function De(r, f) {
|
1215
1222
|
{
|
1216
1223
|
var g = function() {
|
1217
|
-
|
1224
|
+
it || (it = !0, M("%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)", f));
|
1218
1225
|
};
|
1219
1226
|
g.isReactWarning = !0, Object.defineProperty(r, "key", {
|
1220
1227
|
get: g,
|
@@ -1222,10 +1229,10 @@ function Ca() {
|
|
1222
1229
|
});
|
1223
1230
|
}
|
1224
1231
|
}
|
1225
|
-
function
|
1232
|
+
function Bt(r, f) {
|
1226
1233
|
{
|
1227
1234
|
var g = function() {
|
1228
|
-
|
1235
|
+
gt || (gt = !0, M("%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)", f));
|
1229
1236
|
};
|
1230
1237
|
g.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
1231
1238
|
get: g,
|
@@ -1233,70 +1240,70 @@ function Ca() {
|
|
1233
1240
|
});
|
1234
1241
|
}
|
1235
1242
|
}
|
1236
|
-
var s = function(r, f, g,
|
1237
|
-
var
|
1243
|
+
var s = function(r, f, g, S, N, B, j) {
|
1244
|
+
var _ = {
|
1238
1245
|
// This tag allows us to uniquely identify this as a React Element
|
1239
1246
|
$$typeof: n,
|
1240
1247
|
// Built-in properties that belong on the element
|
1241
1248
|
type: r,
|
1242
1249
|
key: f,
|
1243
1250
|
ref: g,
|
1244
|
-
props:
|
1251
|
+
props: j,
|
1245
1252
|
// Record the component responsible for creating this element.
|
1246
|
-
_owner:
|
1253
|
+
_owner: B
|
1247
1254
|
};
|
1248
|
-
return
|
1255
|
+
return _._store = {}, Object.defineProperty(_._store, "validated", {
|
1249
1256
|
configurable: !1,
|
1250
1257
|
enumerable: !1,
|
1251
1258
|
writable: !0,
|
1252
1259
|
value: !1
|
1253
|
-
}), Object.defineProperty(
|
1260
|
+
}), Object.defineProperty(_, "_self", {
|
1254
1261
|
configurable: !1,
|
1255
1262
|
enumerable: !1,
|
1256
1263
|
writable: !1,
|
1257
|
-
value:
|
1258
|
-
}), Object.defineProperty(
|
1264
|
+
value: S
|
1265
|
+
}), Object.defineProperty(_, "_source", {
|
1259
1266
|
configurable: !1,
|
1260
1267
|
enumerable: !1,
|
1261
1268
|
writable: !1,
|
1262
|
-
value:
|
1263
|
-
}), Object.freeze && (Object.freeze(
|
1269
|
+
value: N
|
1270
|
+
}), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
|
1264
1271
|
};
|
1265
|
-
function y(r, f, g,
|
1272
|
+
function y(r, f, g, S, N) {
|
1266
1273
|
{
|
1267
|
-
var
|
1268
|
-
g !== void 0 && (
|
1269
|
-
for (
|
1270
|
-
|
1274
|
+
var B, j = {}, _ = null, de = null;
|
1275
|
+
g !== void 0 && (vt(g), _ = "" + g), Tt(f) && (vt(f.key), _ = "" + f.key), Mt(f) && (de = f.ref, bt(f, N));
|
1276
|
+
for (B in f)
|
1277
|
+
Te.call(f, B) && !at.hasOwnProperty(B) && (j[B] = f[B]);
|
1271
1278
|
if (r && r.defaultProps) {
|
1272
|
-
var
|
1273
|
-
for (
|
1274
|
-
|
1279
|
+
var Q = r.defaultProps;
|
1280
|
+
for (B in Q)
|
1281
|
+
j[B] === void 0 && (j[B] = Q[B]);
|
1275
1282
|
}
|
1276
|
-
if (
|
1277
|
-
var
|
1278
|
-
|
1283
|
+
if (_ || de) {
|
1284
|
+
var te = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
1285
|
+
_ && De(j, te), de && Bt(j, te);
|
1279
1286
|
}
|
1280
|
-
return s(r,
|
1287
|
+
return s(r, _, de, N, S, je.current, j);
|
1281
1288
|
}
|
1282
1289
|
}
|
1283
|
-
var
|
1284
|
-
function
|
1290
|
+
var T = F.ReactCurrentOwner, L = F.ReactDebugCurrentFrame;
|
1291
|
+
function q(r) {
|
1285
1292
|
if (r) {
|
1286
|
-
var f = r._owner, g =
|
1287
|
-
|
1293
|
+
var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
|
1294
|
+
L.setExtraStackFrame(g);
|
1288
1295
|
} else
|
1289
|
-
|
1296
|
+
L.setExtraStackFrame(null);
|
1290
1297
|
}
|
1291
|
-
var
|
1292
|
-
|
1293
|
-
function
|
1298
|
+
var Ee;
|
1299
|
+
Ee = !1;
|
1300
|
+
function ue(r) {
|
1294
1301
|
return typeof r == "object" && r !== null && r.$$typeof === n;
|
1295
1302
|
}
|
1296
|
-
function
|
1303
|
+
function Rt() {
|
1297
1304
|
{
|
1298
|
-
if (
|
1299
|
-
var r =
|
1305
|
+
if (T.current) {
|
1306
|
+
var r = ie(T.current.type);
|
1300
1307
|
if (r)
|
1301
1308
|
return `
|
1302
1309
|
|
@@ -1305,7 +1312,7 @@ Check the render method of \`` + r + "`.";
|
|
1305
1312
|
return "";
|
1306
1313
|
}
|
1307
1314
|
}
|
1308
|
-
function
|
1315
|
+
function _t(r) {
|
1309
1316
|
{
|
1310
1317
|
if (r !== void 0) {
|
1311
1318
|
var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
|
@@ -1316,10 +1323,10 @@ Check your code at ` + f + ":" + g + ".";
|
|
1316
1323
|
return "";
|
1317
1324
|
}
|
1318
1325
|
}
|
1319
|
-
var
|
1320
|
-
function
|
1326
|
+
var rt = {};
|
1327
|
+
function Oe(r) {
|
1321
1328
|
{
|
1322
|
-
var f =
|
1329
|
+
var f = Rt();
|
1323
1330
|
if (!f) {
|
1324
1331
|
var g = typeof r == "string" ? r : r.displayName || r.name;
|
1325
1332
|
g && (f = `
|
@@ -1329,39 +1336,39 @@ Check the top-level render call using <` + g + ">.");
|
|
1329
1336
|
return f;
|
1330
1337
|
}
|
1331
1338
|
}
|
1332
|
-
function
|
1339
|
+
function xe(r, f) {
|
1333
1340
|
{
|
1334
1341
|
if (!r._store || r._store.validated || r.key != null)
|
1335
1342
|
return;
|
1336
1343
|
r._store.validated = !0;
|
1337
|
-
var g =
|
1338
|
-
if (
|
1344
|
+
var g = Oe(f);
|
1345
|
+
if (rt[g])
|
1339
1346
|
return;
|
1340
|
-
|
1341
|
-
var
|
1342
|
-
r && r._owner && r._owner !==
|
1347
|
+
rt[g] = !0;
|
1348
|
+
var S = "";
|
1349
|
+
r && r._owner && r._owner !== T.current && (S = " It was passed a child from " + ie(r._owner.type) + "."), q(r), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, S), q(null);
|
1343
1350
|
}
|
1344
1351
|
}
|
1345
|
-
function
|
1352
|
+
function ze(r, f) {
|
1346
1353
|
{
|
1347
1354
|
if (typeof r != "object")
|
1348
1355
|
return;
|
1349
|
-
if (
|
1356
|
+
if (nt(r))
|
1350
1357
|
for (var g = 0; g < r.length; g++) {
|
1351
|
-
var
|
1352
|
-
|
1358
|
+
var S = r[g];
|
1359
|
+
ue(S) && xe(S, f);
|
1353
1360
|
}
|
1354
|
-
else if (
|
1361
|
+
else if (ue(r))
|
1355
1362
|
r._store && (r._store.validated = !0);
|
1356
1363
|
else if (r) {
|
1357
|
-
var
|
1358
|
-
if (typeof
|
1359
|
-
for (var
|
1360
|
-
|
1364
|
+
var N = Y(r);
|
1365
|
+
if (typeof N == "function" && N !== r.entries)
|
1366
|
+
for (var B = N.call(r), j; !(j = B.next()).done; )
|
1367
|
+
ue(j.value) && xe(j.value, f);
|
1361
1368
|
}
|
1362
1369
|
}
|
1363
1370
|
}
|
1364
|
-
function
|
1371
|
+
function Ye(r) {
|
1365
1372
|
{
|
1366
1373
|
var f = r.type;
|
1367
1374
|
if (f == null || typeof f == "string")
|
@@ -1376,78 +1383,78 @@ Check the top-level render call using <` + g + ">.");
|
|
1376
1383
|
else
|
1377
1384
|
return;
|
1378
1385
|
if (g) {
|
1379
|
-
var
|
1380
|
-
|
1381
|
-
} else if (f.PropTypes !== void 0 && !
|
1382
|
-
|
1383
|
-
var
|
1384
|
-
M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
1386
|
+
var S = ie(f);
|
1387
|
+
tt(g, r.props, "prop", S, r);
|
1388
|
+
} else if (f.PropTypes !== void 0 && !Ee) {
|
1389
|
+
Ee = !0;
|
1390
|
+
var N = ie(f);
|
1391
|
+
M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
1385
1392
|
}
|
1386
1393
|
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1387
1394
|
}
|
1388
1395
|
}
|
1389
|
-
function
|
1396
|
+
function Ve(r) {
|
1390
1397
|
{
|
1391
1398
|
for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
|
1392
|
-
var
|
1393
|
-
if (
|
1394
|
-
|
1399
|
+
var S = f[g];
|
1400
|
+
if (S !== "children" && S !== "key") {
|
1401
|
+
q(r), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), q(null);
|
1395
1402
|
break;
|
1396
1403
|
}
|
1397
1404
|
}
|
1398
|
-
r.ref !== null && (
|
1405
|
+
r.ref !== null && (q(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
|
1399
1406
|
}
|
1400
1407
|
}
|
1401
|
-
function Ge(r, f, g,
|
1408
|
+
function Ge(r, f, g, S, N, B) {
|
1402
1409
|
{
|
1403
|
-
var
|
1404
|
-
if (!
|
1405
|
-
var
|
1406
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
1407
|
-
var de =
|
1408
|
-
de ?
|
1409
|
-
var
|
1410
|
-
r === null ?
|
1410
|
+
var j = Be(r);
|
1411
|
+
if (!j) {
|
1412
|
+
var _ = "";
|
1413
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1414
|
+
var de = _t(N);
|
1415
|
+
de ? _ += de : _ += Rt();
|
1416
|
+
var Q;
|
1417
|
+
r === null ? Q = "null" : nt(r) ? Q = "array" : r !== void 0 && r.$$typeof === n ? (Q = "<" + (ie(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof r, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, _);
|
1411
1418
|
}
|
1412
|
-
var
|
1413
|
-
if (
|
1414
|
-
return
|
1415
|
-
if (
|
1416
|
-
var
|
1417
|
-
if (
|
1418
|
-
if (
|
1419
|
-
if (
|
1420
|
-
for (var Ke = 0; Ke <
|
1421
|
-
|
1422
|
-
Object.freeze && Object.freeze(
|
1419
|
+
var te = y(r, f, g, N, B);
|
1420
|
+
if (te == null)
|
1421
|
+
return te;
|
1422
|
+
if (j) {
|
1423
|
+
var Ce = f.children;
|
1424
|
+
if (Ce !== void 0)
|
1425
|
+
if (S)
|
1426
|
+
if (nt(Ce)) {
|
1427
|
+
for (var Ke = 0; Ke < Ce.length; Ke++)
|
1428
|
+
ze(Ce[Ke], r);
|
1429
|
+
Object.freeze && Object.freeze(Ce);
|
1423
1430
|
} else
|
1424
1431
|
M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1425
1432
|
else
|
1426
|
-
|
1433
|
+
ze(Ce, r);
|
1427
1434
|
}
|
1428
|
-
return r === e ?
|
1435
|
+
return r === e ? Ve(te) : Ye(te), te;
|
1429
1436
|
}
|
1430
1437
|
}
|
1431
|
-
function
|
1438
|
+
function An(r, f, g) {
|
1432
1439
|
return Ge(r, f, g, !0);
|
1433
1440
|
}
|
1434
|
-
function
|
1441
|
+
function kn(r, f, g) {
|
1435
1442
|
return Ge(r, f, g, !1);
|
1436
1443
|
}
|
1437
|
-
var
|
1438
|
-
|
1439
|
-
}()),
|
1444
|
+
var jn = kn, Dn = An;
|
1445
|
+
ot.Fragment = e, ot.jsx = jn, ot.jsxs = Dn;
|
1446
|
+
}()), ot;
|
1440
1447
|
}
|
1441
|
-
process.env.NODE_ENV === "production" ?
|
1442
|
-
var l =
|
1443
|
-
function
|
1448
|
+
process.env.NODE_ENV === "production" ? Nt.exports = wa() : Nt.exports = Oa();
|
1449
|
+
var l = Nt.exports;
|
1450
|
+
function Rn(t) {
|
1444
1451
|
return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
|
1445
1452
|
}
|
1446
|
-
const
|
1453
|
+
const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1447
1454
|
/* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1448
1455
|
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1449
1456
|
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1450
|
-
] }),
|
1457
|
+
] }), Ta = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
|
1451
1458
|
"path",
|
1452
1459
|
{
|
1453
1460
|
d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
|
@@ -1455,35 +1462,35 @@ 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
|
|
1455
1462
|
C11,8.22,10.74,8,10.43,8z`
|
1456
1463
|
}
|
1457
1464
|
) });
|
1458
|
-
function
|
1459
|
-
return /* @__PURE__ */ l.jsx(
|
1460
|
-
|
1465
|
+
function Ra(t) {
|
1466
|
+
return /* @__PURE__ */ l.jsx(Sn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
|
1467
|
+
Ta,
|
1461
1468
|
/* @__PURE__ */ l.jsx("span", { children: t.title }),
|
1462
1469
|
/* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
|
1463
1470
|
t.onDelete(t.index);
|
1464
|
-
}, children:
|
1471
|
+
}, children: Ma })
|
1465
1472
|
] }) }, t.title);
|
1466
1473
|
}
|
1467
|
-
function
|
1468
|
-
const [n, a] =
|
1474
|
+
function _a(t) {
|
1475
|
+
const [n, a] = ne(!1), [e, i] = ne(t.options), o = (u) => {
|
1469
1476
|
t.onDragComplete(u), i(u);
|
1470
1477
|
}, h = (u) => {
|
1471
|
-
const
|
1472
|
-
|
1478
|
+
const m = [...e];
|
1479
|
+
m.splice(u, 1), o(m);
|
1473
1480
|
}, c = [];
|
1474
|
-
e.forEach((u,
|
1475
|
-
c.push(/* @__PURE__ */ l.jsx(
|
1481
|
+
e.forEach((u, m) => {
|
1482
|
+
c.push(/* @__PURE__ */ l.jsx(Ra, { index: m, title: u, onDelete: h }, u));
|
1476
1483
|
});
|
1477
1484
|
let d = "dropdown draggable";
|
1478
1485
|
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1479
|
-
/* @__PURE__ */ l.jsx(
|
1480
|
-
/* @__PURE__ */ l.jsx(
|
1486
|
+
/* @__PURE__ */ l.jsx(Rn, { title: t.title }),
|
1487
|
+
/* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
|
1481
1488
|
] });
|
1482
1489
|
}
|
1483
|
-
function
|
1484
|
-
const [n, a] =
|
1490
|
+
function Pa(t) {
|
1491
|
+
const [n, a] = ne(!1), e = [];
|
1485
1492
|
t.options.map((o, h) => {
|
1486
|
-
t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(
|
1493
|
+
t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: o }, h));
|
1487
1494
|
});
|
1488
1495
|
let i = "dropdown";
|
1489
1496
|
return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
|
@@ -1493,7 +1500,7 @@ function Ta(t) {
|
|
1493
1500
|
onMouseEnter: () => a(!0),
|
1494
1501
|
onMouseLeave: () => a(!1),
|
1495
1502
|
children: [
|
1496
|
-
/* @__PURE__ */ l.jsx(
|
1503
|
+
/* @__PURE__ */ l.jsx(Rn, { title: t.title }),
|
1497
1504
|
/* @__PURE__ */ l.jsx(
|
1498
1505
|
"ul",
|
1499
1506
|
{
|
@@ -1505,13 +1512,13 @@ function Ta(t) {
|
|
1505
1512
|
}
|
1506
1513
|
);
|
1507
1514
|
}
|
1508
|
-
function
|
1509
|
-
const { option: n } = t, [a, e] =
|
1515
|
+
function Aa(t) {
|
1516
|
+
const { option: n } = t, [a, e] = ne("");
|
1510
1517
|
let i;
|
1511
1518
|
switch (n.type) {
|
1512
1519
|
case "draggable":
|
1513
1520
|
i = /* @__PURE__ */ l.jsx(
|
1514
|
-
|
1521
|
+
_a,
|
1515
1522
|
{
|
1516
1523
|
title: n.title,
|
1517
1524
|
options: n.value,
|
@@ -1524,7 +1531,7 @@ function Ra(t) {
|
|
1524
1531
|
break;
|
1525
1532
|
case "dropdown":
|
1526
1533
|
i = /* @__PURE__ */ l.jsx(
|
1527
|
-
|
1534
|
+
Pa,
|
1528
1535
|
{
|
1529
1536
|
title: n.title,
|
1530
1537
|
options: n.value,
|
@@ -1545,15 +1552,15 @@ function Ra(t) {
|
|
1545
1552
|
);
|
1546
1553
|
break;
|
1547
1554
|
}
|
1548
|
-
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i },
|
1555
|
+
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ma());
|
1549
1556
|
}
|
1550
|
-
function
|
1557
|
+
function bi(t, n, a) {
|
1551
1558
|
function e(o) {
|
1552
1559
|
switch (n.forEach((h) => {
|
1553
1560
|
h.callback(t, h.remote, o);
|
1554
1561
|
}), o.event) {
|
1555
1562
|
case "custom":
|
1556
|
-
|
1563
|
+
D.dispatchEvent({ type: I.CUSTOM, value: o.data });
|
1557
1564
|
break;
|
1558
1565
|
}
|
1559
1566
|
}
|
@@ -1562,7 +1569,7 @@ function mi(t, n, a) {
|
|
1562
1569
|
h.callback(t, h.remote, o);
|
1563
1570
|
}), o.event) {
|
1564
1571
|
case "custom":
|
1565
|
-
|
1572
|
+
D.dispatchEvent({ type: I.CUSTOM, value: o.data });
|
1566
1573
|
break;
|
1567
1574
|
}
|
1568
1575
|
}
|
@@ -1570,8 +1577,8 @@ function mi(t, n, a) {
|
|
1570
1577
|
o.target === "editor" ? i(o) : e(o);
|
1571
1578
|
};
|
1572
1579
|
}
|
1573
|
-
function
|
1574
|
-
const [n, a] =
|
1580
|
+
function Ft(t) {
|
1581
|
+
const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1575
1582
|
return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1576
1583
|
/* @__PURE__ */ l.jsxs(
|
1577
1584
|
"button",
|
@@ -1589,7 +1596,7 @@ function Lt(t) {
|
|
1589
1596
|
children: "Toggle"
|
1590
1597
|
}
|
1591
1598
|
),
|
1592
|
-
/* @__PURE__ */ l.jsx("p", { className: "label", children:
|
1599
|
+
/* @__PURE__ */ l.jsx("p", { className: "label", children: dt(t.label) })
|
1593
1600
|
]
|
1594
1601
|
}
|
1595
1602
|
),
|
@@ -1597,10 +1604,10 @@ function Lt(t) {
|
|
1597
1604
|
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
|
1598
1605
|
] });
|
1599
1606
|
}
|
1600
|
-
function
|
1601
|
-
const [n, a] =
|
1607
|
+
function _n(t) {
|
1608
|
+
const [n, a] = ne(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
|
1602
1609
|
return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((o) => {
|
1603
|
-
i.push(/* @__PURE__ */ l.jsx(
|
1610
|
+
i.push(/* @__PURE__ */ l.jsx(_n, { child: o, three: t.three }, Math.random()));
|
1604
1611
|
}), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
|
1605
1612
|
/* @__PURE__ */ l.jsxs("div", { className: "child", children: [
|
1606
1613
|
e ? /* @__PURE__ */ l.jsx(
|
@@ -1628,29 +1635,29 @@ function Mn(t) {
|
|
1628
1635
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1629
1636
|
}
|
1630
1637
|
),
|
1631
|
-
/* @__PURE__ */ l.jsx("div", { className: `icon ${
|
1638
|
+
/* @__PURE__ */ l.jsx("div", { className: `icon ${Ea(t.child)}` })
|
1632
1639
|
] }),
|
1633
1640
|
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
|
1634
1641
|
] }, Math.random()) });
|
1635
1642
|
}
|
1636
|
-
function
|
1643
|
+
function ka(t) {
|
1637
1644
|
const n = [];
|
1638
1645
|
return t.child?.children.map((a) => {
|
1639
|
-
n.push(/* @__PURE__ */ l.jsx(
|
1646
|
+
n.push(/* @__PURE__ */ l.jsx(_n, { child: a, three: t.three }, Math.random()));
|
1640
1647
|
}), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1641
1648
|
}
|
1642
|
-
const
|
1643
|
-
function
|
1649
|
+
const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1650
|
+
function Da(t) {
|
1644
1651
|
return "items" in t;
|
1645
1652
|
}
|
1646
1653
|
function We(t) {
|
1647
1654
|
const n = [];
|
1648
1655
|
return t.items.forEach((a) => {
|
1649
|
-
|
1650
|
-
/* @__PURE__ */ l.jsx(We, { title:
|
1656
|
+
Da(a) ? n.push(
|
1657
|
+
/* @__PURE__ */ l.jsx(We, { title: dt(a.title), items: a.items }, Math.random())
|
1651
1658
|
) : n.push(
|
1652
1659
|
/* @__PURE__ */ l.jsx(
|
1653
|
-
|
1660
|
+
lt,
|
1654
1661
|
{
|
1655
1662
|
title: a.title,
|
1656
1663
|
prop: a.prop,
|
@@ -1668,12 +1675,12 @@ function We(t) {
|
|
1668
1675
|
Math.random()
|
1669
1676
|
)
|
1670
1677
|
);
|
1671
|
-
}), /* @__PURE__ */ l.jsx(
|
1678
|
+
}), /* @__PURE__ */ l.jsx(Ft, { label: t.title, open: t.expanded === !0, children: n });
|
1672
1679
|
}
|
1673
|
-
function
|
1680
|
+
function Ia(t) {
|
1674
1681
|
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");
|
1675
1682
|
}
|
1676
|
-
function
|
1683
|
+
function Ie(t) {
|
1677
1684
|
switch (t) {
|
1678
1685
|
case "alphaMap":
|
1679
1686
|
return "Alpha Map";
|
@@ -1846,10 +1853,10 @@ function Ve(t) {
|
|
1846
1853
|
}
|
1847
1854
|
return t;
|
1848
1855
|
}
|
1849
|
-
function
|
1856
|
+
function Na(t) {
|
1850
1857
|
return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
|
1851
1858
|
}
|
1852
|
-
function
|
1859
|
+
function La() {
|
1853
1860
|
const t = document.createElement("input");
|
1854
1861
|
return t.type = "file", new Promise((n, a) => {
|
1855
1862
|
t.addEventListener("change", function() {
|
@@ -1864,231 +1871,231 @@ function Da() {
|
|
1864
1871
|
}), t.click();
|
1865
1872
|
});
|
1866
1873
|
}
|
1867
|
-
const
|
1874
|
+
const Fa = [
|
1868
1875
|
{
|
1869
1876
|
title: "Front",
|
1870
|
-
value:
|
1877
|
+
value: Nn
|
1871
1878
|
},
|
1872
1879
|
{
|
1873
1880
|
title: "Back",
|
1874
|
-
value:
|
1881
|
+
value: Ln
|
1875
1882
|
},
|
1876
1883
|
{
|
1877
1884
|
title: "Double",
|
1878
|
-
value:
|
1885
|
+
value: sn
|
1879
1886
|
}
|
1880
|
-
],
|
1887
|
+
], Ba = [
|
1881
1888
|
{
|
1882
1889
|
title: "No Blending",
|
1883
|
-
value:
|
1890
|
+
value: Fn
|
1884
1891
|
},
|
1885
1892
|
{
|
1886
1893
|
title: "Normal",
|
1887
|
-
value:
|
1894
|
+
value: Bn
|
1888
1895
|
},
|
1889
1896
|
{
|
1890
1897
|
title: "Additive",
|
1891
|
-
value:
|
1898
|
+
value: Un
|
1892
1899
|
},
|
1893
1900
|
{
|
1894
1901
|
title: "Subtractive",
|
1895
|
-
value:
|
1902
|
+
value: $n
|
1896
1903
|
},
|
1897
1904
|
{
|
1898
1905
|
title: "Multiply",
|
1899
|
-
value:
|
1906
|
+
value: zn
|
1900
1907
|
},
|
1901
1908
|
{
|
1902
1909
|
title: "Custom",
|
1903
|
-
value:
|
1910
|
+
value: Yn
|
1904
1911
|
}
|
1905
|
-
],
|
1912
|
+
], Ua = [
|
1906
1913
|
{
|
1907
1914
|
title: "Add",
|
1908
|
-
value:
|
1915
|
+
value: Vn
|
1909
1916
|
},
|
1910
1917
|
{
|
1911
1918
|
title: "Subtract",
|
1912
|
-
value:
|
1919
|
+
value: Gn
|
1913
1920
|
},
|
1914
1921
|
{
|
1915
1922
|
title: "Reverse Subtract",
|
1916
|
-
value:
|
1923
|
+
value: Hn
|
1917
1924
|
},
|
1918
1925
|
{
|
1919
1926
|
title: "Min",
|
1920
|
-
value:
|
1927
|
+
value: Wn
|
1921
1928
|
},
|
1922
1929
|
{
|
1923
1930
|
title: "Max",
|
1924
|
-
value:
|
1931
|
+
value: qn
|
1925
1932
|
}
|
1926
|
-
],
|
1933
|
+
], $a = [
|
1927
1934
|
{
|
1928
1935
|
title: "Zero",
|
1929
|
-
valye:
|
1936
|
+
valye: on
|
1930
1937
|
},
|
1931
1938
|
{
|
1932
1939
|
title: "One",
|
1933
|
-
valye:
|
1940
|
+
valye: cn
|
1934
1941
|
},
|
1935
1942
|
{
|
1936
1943
|
title: "Src Color",
|
1937
|
-
valye:
|
1944
|
+
valye: ln
|
1938
1945
|
},
|
1939
1946
|
{
|
1940
1947
|
title: "One Minus Src Color",
|
1941
|
-
valye:
|
1948
|
+
valye: un
|
1942
1949
|
},
|
1943
1950
|
{
|
1944
1951
|
title: "Src Alpha",
|
1945
|
-
valye:
|
1952
|
+
valye: dn
|
1946
1953
|
},
|
1947
1954
|
{
|
1948
1955
|
title: "One Minus Src Alpha",
|
1949
|
-
valye:
|
1956
|
+
valye: hn
|
1950
1957
|
},
|
1951
1958
|
{
|
1952
1959
|
title: "Dst Alpha",
|
1953
|
-
valye:
|
1960
|
+
valye: fn
|
1954
1961
|
},
|
1955
1962
|
{
|
1956
1963
|
title: "One Minus Dst Alpha",
|
1957
|
-
valye:
|
1964
|
+
valye: pn
|
1958
1965
|
},
|
1959
1966
|
{
|
1960
1967
|
title: "Dst Color",
|
1961
|
-
valye:
|
1968
|
+
valye: mn
|
1962
1969
|
},
|
1963
1970
|
{
|
1964
1971
|
title: "One Minus Dst Color",
|
1965
|
-
valye:
|
1972
|
+
valye: vn
|
1966
1973
|
},
|
1967
1974
|
{
|
1968
1975
|
title: "Src Alpha Saturate",
|
1969
|
-
valye:
|
1976
|
+
valye: Kn
|
1970
1977
|
},
|
1971
1978
|
{
|
1972
1979
|
title: "Constant Color",
|
1973
|
-
valye:
|
1980
|
+
valye: gn
|
1974
1981
|
},
|
1975
1982
|
{
|
1976
1983
|
title: "One Minus Constant Color",
|
1977
|
-
valye:
|
1984
|
+
valye: bn
|
1978
1985
|
},
|
1979
1986
|
{
|
1980
1987
|
title: "Constant Alpha",
|
1981
|
-
valye:
|
1988
|
+
valye: yn
|
1982
1989
|
},
|
1983
1990
|
{
|
1984
1991
|
title: "One Minus Constant Alpha",
|
1985
|
-
valye:
|
1992
|
+
valye: En
|
1986
1993
|
}
|
1987
|
-
],
|
1994
|
+
], za = [
|
1988
1995
|
{
|
1989
1996
|
title: "Zero",
|
1990
|
-
valye:
|
1997
|
+
valye: on
|
1991
1998
|
},
|
1992
1999
|
{
|
1993
2000
|
title: "One",
|
1994
|
-
valye:
|
2001
|
+
valye: cn
|
1995
2002
|
},
|
1996
2003
|
{
|
1997
2004
|
title: "Src Color",
|
1998
|
-
valye:
|
2005
|
+
valye: ln
|
1999
2006
|
},
|
2000
2007
|
{
|
2001
2008
|
title: "One Minus Src Color",
|
2002
|
-
valye:
|
2009
|
+
valye: un
|
2003
2010
|
},
|
2004
2011
|
{
|
2005
2012
|
title: "Src Alpha",
|
2006
|
-
valye:
|
2013
|
+
valye: dn
|
2007
2014
|
},
|
2008
2015
|
{
|
2009
2016
|
title: "One Minus Src Alpha",
|
2010
|
-
valye:
|
2017
|
+
valye: hn
|
2011
2018
|
},
|
2012
2019
|
{
|
2013
2020
|
title: "Dst Alpha",
|
2014
|
-
valye:
|
2021
|
+
valye: fn
|
2015
2022
|
},
|
2016
2023
|
{
|
2017
2024
|
title: "One Minus Dst Alpha",
|
2018
|
-
valye:
|
2025
|
+
valye: pn
|
2019
2026
|
},
|
2020
2027
|
{
|
2021
2028
|
title: "Dst Color",
|
2022
|
-
valye:
|
2029
|
+
valye: mn
|
2023
2030
|
},
|
2024
2031
|
{
|
2025
2032
|
title: "One Minus Dst Color",
|
2026
|
-
valye:
|
2033
|
+
valye: vn
|
2027
2034
|
},
|
2028
2035
|
{
|
2029
2036
|
title: "Constant Color",
|
2030
|
-
valye:
|
2037
|
+
valye: gn
|
2031
2038
|
},
|
2032
2039
|
{
|
2033
2040
|
title: "One Minus Constant Color",
|
2034
|
-
valye:
|
2041
|
+
valye: bn
|
2035
2042
|
},
|
2036
2043
|
{
|
2037
2044
|
title: "Constant Alpha",
|
2038
|
-
valye:
|
2045
|
+
valye: yn
|
2039
2046
|
},
|
2040
2047
|
{
|
2041
2048
|
title: "One Minus Constant Alpha",
|
2042
|
-
valye:
|
2049
|
+
valye: En
|
2043
2050
|
}
|
2044
2051
|
];
|
2045
|
-
function
|
2052
|
+
function ct(t, n) {
|
2046
2053
|
t.needsUpdate = !0, t.type = "option", t.options = n;
|
2047
2054
|
}
|
2048
|
-
function
|
2055
|
+
function Xt(t, n, a) {
|
2049
2056
|
const e = [];
|
2050
2057
|
for (const i in t) {
|
2051
|
-
if (!
|
2058
|
+
if (!Ia(i))
|
2052
2059
|
continue;
|
2053
2060
|
const o = typeof t[i], h = t[i];
|
2054
2061
|
if (o === "boolean" || o === "number" || o === "string") {
|
2055
2062
|
const c = {
|
2056
|
-
title:
|
2063
|
+
title: Ie(i),
|
2057
2064
|
prop: i,
|
2058
2065
|
type: o,
|
2059
2066
|
value: h,
|
2060
2067
|
min: void 0,
|
2061
2068
|
max: void 0,
|
2062
2069
|
needsUpdate: o === "boolean",
|
2063
|
-
onChange: (u,
|
2064
|
-
a.updateObject(n.uuid, `material.${u}`,
|
2070
|
+
onChange: (u, m) => {
|
2071
|
+
a.updateObject(n.uuid, `material.${u}`, m), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
|
2065
2072
|
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2066
|
-
b !== void 0 && ee(b, `material.${u}`,
|
2073
|
+
b !== void 0 && ee(b, `material.${u}`, m);
|
2067
2074
|
}
|
2068
2075
|
};
|
2069
2076
|
switch (i) {
|
2070
2077
|
case "blending":
|
2071
|
-
|
2078
|
+
ct(c, Ba);
|
2072
2079
|
break;
|
2073
2080
|
case "blendDst":
|
2074
|
-
|
2081
|
+
ct(c, za);
|
2075
2082
|
break;
|
2076
2083
|
case "blendEquation":
|
2077
|
-
|
2084
|
+
ct(c, Ua);
|
2078
2085
|
break;
|
2079
2086
|
case "blendSrc":
|
2080
|
-
|
2087
|
+
ct(c, $a);
|
2081
2088
|
break;
|
2082
2089
|
case "side":
|
2083
|
-
|
2090
|
+
ct(c, Fa);
|
2084
2091
|
break;
|
2085
2092
|
}
|
2086
|
-
|
2093
|
+
Na(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
|
2087
2094
|
const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
|
2088
|
-
d && (c.disabled = !1, c.latest = c.value, c.onChange = (u,
|
2089
|
-
c.latest =
|
2095
|
+
d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, m) => {
|
2096
|
+
c.latest = m;
|
2090
2097
|
}), e.push(c), d && e.push({
|
2091
|
-
title: `${
|
2098
|
+
title: `${dt(i)} - Update`,
|
2092
2099
|
type: "button",
|
2093
2100
|
onChange: () => {
|
2094
2101
|
a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
|
@@ -2099,15 +2106,15 @@ function Wt(t, n, a) {
|
|
2099
2106
|
} else if (o === "object")
|
2100
2107
|
if (h.isColor)
|
2101
2108
|
e.push({
|
2102
|
-
title:
|
2109
|
+
title: Ie(i),
|
2103
2110
|
prop: i,
|
2104
2111
|
type: "color",
|
2105
2112
|
value: h,
|
2106
2113
|
onChange: (c, d) => {
|
2107
2114
|
const u = new St(d);
|
2108
2115
|
a.updateObject(n.uuid, `material.${c}`, u);
|
2109
|
-
const
|
2110
|
-
|
2116
|
+
const m = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2117
|
+
m !== void 0 && ee(m, `material.${c}`, u);
|
2111
2118
|
}
|
2112
2119
|
});
|
2113
2120
|
else if (Array.isArray(h)) {
|
@@ -2117,17 +2124,29 @@ function Wt(t, n, a) {
|
|
2117
2124
|
title: `${d}`,
|
2118
2125
|
type: `${typeof h[d]}`,
|
2119
2126
|
value: h[d],
|
2120
|
-
onChange: (u,
|
2121
|
-
a.updateObject(n.uuid, `material.${i}`,
|
2127
|
+
onChange: (u, m) => {
|
2128
|
+
a.updateObject(n.uuid, `material.${i}`, m);
|
2122
2129
|
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2123
|
-
b !== void 0 && ee(b, `material.${i}`,
|
2130
|
+
b !== void 0 && ee(b, `material.${i}`, m);
|
2124
2131
|
}
|
2125
2132
|
});
|
2126
2133
|
e.push({
|
2127
|
-
title:
|
2134
|
+
title: Ie(i),
|
2128
2135
|
items: c
|
2129
2136
|
});
|
2130
|
-
} else
|
2137
|
+
} else if (h.x !== void 0 && h.y !== void 0 && h.z === void 0)
|
2138
|
+
e.push({
|
2139
|
+
title: Ie(i),
|
2140
|
+
prop: i,
|
2141
|
+
type: "vector",
|
2142
|
+
value: h,
|
2143
|
+
onChange: (c, d) => {
|
2144
|
+
a.updateObject(n.uuid, `material.${c}`, d);
|
2145
|
+
const u = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2146
|
+
u !== void 0 && ee(u, `material.${c}`, d);
|
2147
|
+
}
|
2148
|
+
});
|
2149
|
+
else {
|
2131
2150
|
const c = [];
|
2132
2151
|
for (const d in h) {
|
2133
2152
|
const u = h[d];
|
@@ -2136,53 +2155,53 @@ function Wt(t, n, a) {
|
|
2136
2155
|
case "number":
|
2137
2156
|
case "string":
|
2138
2157
|
d === "src" ? e.push({
|
2139
|
-
title:
|
2158
|
+
title: Ie(i),
|
2140
2159
|
type: "image",
|
2141
2160
|
value: u,
|
2142
2161
|
onChange: (b, E) => {
|
2143
2162
|
a.createTexture(n.uuid, `material.${i}`, E);
|
2144
|
-
const
|
2145
|
-
|
2146
|
-
ee(
|
2163
|
+
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2164
|
+
x !== void 0 && It(E).then((R) => {
|
2165
|
+
ee(x, `material.${i}`, R), ee(x, "material.needsUpdate", !0);
|
2147
2166
|
});
|
2148
2167
|
}
|
2149
2168
|
}) : c.push({
|
2150
|
-
title: `${
|
2169
|
+
title: `${Ie(d)}`,
|
2151
2170
|
prop: `material.${i}.${d}`,
|
2152
2171
|
type: `${typeof t[i][d]}`,
|
2153
2172
|
value: h[d],
|
2154
2173
|
onChange: (b, E) => {
|
2155
2174
|
a.updateObject(n.uuid, `material.${i}.${d}`, E);
|
2156
|
-
const
|
2157
|
-
|
2175
|
+
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2176
|
+
x !== void 0 && ee(x, `material.${i}.${d}`, E);
|
2158
2177
|
}
|
2159
2178
|
});
|
2160
2179
|
break;
|
2161
2180
|
case "object":
|
2162
2181
|
if (u.value !== void 0 && u.value.src !== void 0)
|
2163
2182
|
c.push({
|
2164
|
-
title:
|
2183
|
+
title: Ie(d),
|
2165
2184
|
type: "image",
|
2166
2185
|
value: u.value.src,
|
2167
2186
|
onChange: (b, E) => {
|
2168
2187
|
a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
|
2169
|
-
const
|
2170
|
-
|
2171
|
-
ee(
|
2188
|
+
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2189
|
+
x !== void 0 && It(E).then((R) => {
|
2190
|
+
ee(x, `material.${i}.${d}.value`, R);
|
2172
2191
|
});
|
2173
2192
|
}
|
2174
2193
|
});
|
2175
2194
|
else if (i === "uniforms") {
|
2176
|
-
const b = u.value, E = (
|
2177
|
-
title:
|
2195
|
+
const b = u.value, E = (x, R, P) => ({
|
2196
|
+
title: x,
|
2178
2197
|
type: "number",
|
2179
|
-
value:
|
2198
|
+
value: P,
|
2180
2199
|
step: 0.01,
|
2181
|
-
onChange: (
|
2182
|
-
const M = `material.uniforms.${d}.value.${
|
2183
|
-
a.updateObject(n.uuid, M,
|
2184
|
-
const
|
2185
|
-
|
2200
|
+
onChange: (Y, F) => {
|
2201
|
+
const M = `material.uniforms.${d}.value.${R}`;
|
2202
|
+
a.updateObject(n.uuid, M, F);
|
2203
|
+
const w = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2204
|
+
w !== void 0 && ee(w, M, F);
|
2186
2205
|
}
|
2187
2206
|
});
|
2188
2207
|
if (typeof u.value == "number")
|
@@ -2190,11 +2209,12 @@ function Wt(t, n, a) {
|
|
2190
2209
|
title: d,
|
2191
2210
|
type: "number",
|
2192
2211
|
value: u.value,
|
2193
|
-
|
2194
|
-
|
2195
|
-
|
2196
|
-
|
2197
|
-
|
2212
|
+
step: 0.01,
|
2213
|
+
onChange: (x, R) => {
|
2214
|
+
const P = `material.${i}.${x}.value`;
|
2215
|
+
a.updateObject(n.uuid, P, R);
|
2216
|
+
const Y = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2217
|
+
Y !== void 0 && ee(Y, P, R);
|
2198
2218
|
}
|
2199
2219
|
});
|
2200
2220
|
else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
|
@@ -2202,23 +2222,25 @@ function Wt(t, n, a) {
|
|
2202
2222
|
title: d,
|
2203
2223
|
type: "color",
|
2204
2224
|
value: u.value,
|
2205
|
-
onChange: (
|
2206
|
-
const
|
2207
|
-
a.updateObject(n.uuid,
|
2208
|
-
const
|
2209
|
-
|
2225
|
+
onChange: (x, R) => {
|
2226
|
+
const P = new St(R), Y = `material.${i}.${x}.value`;
|
2227
|
+
a.updateObject(n.uuid, Y, P);
|
2228
|
+
const F = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2229
|
+
F !== void 0 && ee(F, Y, P);
|
2210
2230
|
}
|
2211
2231
|
});
|
2212
2232
|
else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
|
2213
|
-
c.push(
|
2214
|
-
|
2215
|
-
|
2216
|
-
|
2217
|
-
|
2218
|
-
|
2219
|
-
|
2233
|
+
c.push({
|
2234
|
+
title: d,
|
2235
|
+
type: "vector",
|
2236
|
+
value: u.value,
|
2237
|
+
prop: `material.${i}.${d}.value`,
|
2238
|
+
onChange: (x, R) => {
|
2239
|
+
a.updateObject(n.uuid, x, R);
|
2240
|
+
const P = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2241
|
+
P !== void 0 && ee(P, x, R);
|
2220
2242
|
}
|
2221
|
-
);
|
2243
|
+
});
|
2222
2244
|
else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
|
2223
2245
|
c.push(
|
2224
2246
|
{
|
@@ -2243,13 +2265,13 @@ function Wt(t, n, a) {
|
|
2243
2265
|
}
|
2244
2266
|
);
|
2245
2267
|
else if (b.elements !== void 0) {
|
2246
|
-
const
|
2247
|
-
for (let
|
2248
|
-
|
2268
|
+
const x = b.elements, R = [];
|
2269
|
+
for (let P = 0; P < x.length; P++)
|
2270
|
+
R.push(E(P.toString(), P.toString(), x[P]));
|
2249
2271
|
c.push(
|
2250
2272
|
{
|
2251
2273
|
title: d,
|
2252
|
-
items:
|
2274
|
+
items: R
|
2253
2275
|
}
|
2254
2276
|
);
|
2255
2277
|
} else
|
@@ -2261,15 +2283,15 @@ function Wt(t, n, a) {
|
|
2261
2283
|
value: u.value,
|
2262
2284
|
onChange: (b, E) => {
|
2263
2285
|
a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
|
2264
|
-
const
|
2265
|
-
|
2286
|
+
const x = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2287
|
+
x !== void 0 && ee(x, `material.${i}.${d}.value`, E);
|
2266
2288
|
}
|
2267
2289
|
});
|
2268
2290
|
break;
|
2269
2291
|
}
|
2270
2292
|
}
|
2271
2293
|
c.length > 0 && e.push({
|
2272
|
-
title:
|
2294
|
+
title: Ie(i),
|
2273
2295
|
items: c
|
2274
2296
|
});
|
2275
2297
|
}
|
@@ -2284,7 +2306,7 @@ function Wt(t, n, a) {
|
|
2284
2306
|
}
|
2285
2307
|
}), e;
|
2286
2308
|
}
|
2287
|
-
function
|
2309
|
+
function Ya(t, n) {
|
2288
2310
|
const a = t.material;
|
2289
2311
|
if (Array.isArray(a)) {
|
2290
2312
|
const e = [], i = a.length;
|
@@ -2294,7 +2316,7 @@ function Ua(t, n) {
|
|
2294
2316
|
We,
|
2295
2317
|
{
|
2296
2318
|
title: `Material ${o}`,
|
2297
|
-
items:
|
2319
|
+
items: Xt(a[o], t, n)
|
2298
2320
|
},
|
2299
2321
|
`Material ${o}`
|
2300
2322
|
)
|
@@ -2305,39 +2327,133 @@ function Ua(t, n) {
|
|
2305
2327
|
We,
|
2306
2328
|
{
|
2307
2329
|
title: "Material",
|
2308
|
-
items:
|
2330
|
+
items: Xt(a, t, n)
|
2309
2331
|
}
|
2310
2332
|
);
|
2311
2333
|
}
|
2312
|
-
function
|
2334
|
+
function Va(t) {
|
2335
|
+
const n = he(null), a = he(null), e = he(null), i = he(null), o = he(null), h = he(null), [c, d] = ne(t.value), [u, m] = ne({ min: t.min, max: t.max }), [b, E] = ne(!1);
|
2336
|
+
function x() {
|
2337
|
+
b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", R), window.addEventListener("mouseup", R), E(!0));
|
2338
|
+
}
|
2339
|
+
function R() {
|
2340
|
+
window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", R), E(!1);
|
2341
|
+
}
|
2342
|
+
function P(w) {
|
2343
|
+
const ae = o.current.getBoundingClientRect(), X = Je(0, 99, w.clientX - ae.left) / 99, $ = Je(0, 99, w.clientY - ae.top) / 99, W = ut(Wt(u.min, u.max, X), 3), C = ut(Wt(u.min, u.max, $), 3);
|
2344
|
+
t.onChange({ target: { value: { x: W, y: C } } }), d({ x: W, y: C });
|
2345
|
+
}
|
2346
|
+
function Y(w) {
|
2347
|
+
let ae = c.x, X = c.y;
|
2348
|
+
w.target === n.current ? ae = Number(w.target.value) : X = Number(w.target.value), d({ x: ae, y: X });
|
2349
|
+
}
|
2350
|
+
function F() {
|
2351
|
+
const w = Number(e.current.value);
|
2352
|
+
m({ min: w, max: u.max }), (c.x < w || c.y < w) && d({ x: Je(w, u.max, c.x), y: Je(w, u.max, c.y) });
|
2353
|
+
}
|
2354
|
+
function M() {
|
2355
|
+
const w = Number(i.current.value);
|
2356
|
+
m({ min: u.min, max: w }), (c.x > w || c.y > w) && d({ x: Je(u.min, w, c.x), y: Je(u.min, w, c.y) });
|
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: [
|
2363
|
+
/* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
|
2364
|
+
/* @__PURE__ */ l.jsxs("div", { children: [
|
2365
|
+
/* @__PURE__ */ l.jsx("label", { children: "X:" }),
|
2366
|
+
/* @__PURE__ */ l.jsx(
|
2367
|
+
"input",
|
2368
|
+
{
|
2369
|
+
ref: n,
|
2370
|
+
type: "number",
|
2371
|
+
value: c.x,
|
2372
|
+
min: u.min,
|
2373
|
+
max: u.max,
|
2374
|
+
step: 0.01,
|
2375
|
+
onChange: Y
|
2376
|
+
}
|
2377
|
+
)
|
2378
|
+
] }),
|
2379
|
+
/* @__PURE__ */ l.jsxs("div", { children: [
|
2380
|
+
/* @__PURE__ */ l.jsx("label", { children: "Y:" }),
|
2381
|
+
/* @__PURE__ */ l.jsx(
|
2382
|
+
"input",
|
2383
|
+
{
|
2384
|
+
ref: a,
|
2385
|
+
type: "number",
|
2386
|
+
value: c.y,
|
2387
|
+
min: u.min,
|
2388
|
+
max: u.max,
|
2389
|
+
step: 0.01,
|
2390
|
+
onChange: Y
|
2391
|
+
}
|
2392
|
+
)
|
2393
|
+
] }),
|
2394
|
+
/* @__PURE__ */ l.jsxs("div", { children: [
|
2395
|
+
/* @__PURE__ */ l.jsx("label", { children: "Min:" }),
|
2396
|
+
/* @__PURE__ */ l.jsx(
|
2397
|
+
"input",
|
2398
|
+
{
|
2399
|
+
ref: e,
|
2400
|
+
type: "number",
|
2401
|
+
value: u.min,
|
2402
|
+
step: 0.01,
|
2403
|
+
onChange: F
|
2404
|
+
}
|
2405
|
+
)
|
2406
|
+
] }),
|
2407
|
+
/* @__PURE__ */ l.jsxs("div", { children: [
|
2408
|
+
/* @__PURE__ */ l.jsx("label", { children: "Max:" }),
|
2409
|
+
/* @__PURE__ */ l.jsx(
|
2410
|
+
"input",
|
2411
|
+
{
|
2412
|
+
ref: i,
|
2413
|
+
type: "number",
|
2414
|
+
value: u.max,
|
2415
|
+
step: 0.01,
|
2416
|
+
onChange: M
|
2417
|
+
}
|
2418
|
+
)
|
2419
|
+
] })
|
2420
|
+
] }),
|
2421
|
+
/* @__PURE__ */ l.jsxs("div", { className: "input", ref: o, onMouseDown: x, onMouseUp: R, children: [
|
2422
|
+
/* @__PURE__ */ l.jsx("div", { className: "x" }),
|
2423
|
+
/* @__PURE__ */ l.jsx("div", { className: "y" }),
|
2424
|
+
/* @__PURE__ */ l.jsx("div", { className: "pt", ref: h })
|
2425
|
+
] })
|
2426
|
+
] });
|
2427
|
+
}
|
2428
|
+
function lt(t) {
|
2313
2429
|
let n = t.value;
|
2314
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
2315
|
-
const [a, e] =
|
2316
|
-
|
2317
|
-
let
|
2318
|
-
const
|
2319
|
-
|
2320
|
-
},
|
2321
|
-
if (!
|
2430
|
+
n !== void 0 && n.isColor !== void 0 && (n = ga(t.value));
|
2431
|
+
const [a, e] = ne(n), i = he(null), o = he(null), h = he(null);
|
2432
|
+
Re(() => {
|
2433
|
+
let m = !1, b = -1, E = 0, x = Number(a);
|
2434
|
+
const R = (w) => {
|
2435
|
+
m = !0, E = x, b = w.clientX;
|
2436
|
+
}, P = (w) => {
|
2437
|
+
if (!m)
|
2322
2438
|
return;
|
2323
|
-
const
|
2324
|
-
|
2325
|
-
},
|
2326
|
-
|
2327
|
-
},
|
2328
|
-
|
2439
|
+
const ae = t.step !== void 0 ? t.step : 1, X = (w.clientX - b) * ae;
|
2440
|
+
x = Number((E + X).toFixed(4)), o.current !== null && (o.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
|
2441
|
+
}, Y = () => {
|
2442
|
+
m = !1;
|
2443
|
+
}, F = () => {
|
2444
|
+
m = !1;
|
2329
2445
|
}, M = t.type === "number";
|
2330
|
-
return M && (i.current?.addEventListener("mousedown",
|
2331
|
-
M && (i.current?.removeEventListener("mousedown",
|
2446
|
+
return M && (i.current?.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", Y, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", F, !1)), () => {
|
2447
|
+
M && (i.current?.removeEventListener("mousedown", R), document.removeEventListener("mouseup", Y), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", F));
|
2332
2448
|
};
|
2333
2449
|
}, [a]);
|
2334
2450
|
const c = t.type === "string" && (a.length > 100 || a.search(`
|
2335
|
-
`) > -1), d = c || t.type === "image", u = (
|
2336
|
-
let b =
|
2337
|
-
t.type === "boolean" ? b =
|
2451
|
+
`) > -1), d = c || t.type === "image" || t.type === "vector", u = (m) => {
|
2452
|
+
let b = m.target.value;
|
2453
|
+
t.type === "boolean" ? b = m.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);
|
2338
2454
|
};
|
2339
2455
|
return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
|
2340
|
-
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children:
|
2456
|
+
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: dt(t.title) }, "fieldLabel"),
|
2341
2457
|
t.type === "string" && !c && /* @__PURE__ */ l.jsx(
|
2342
2458
|
"input",
|
2343
2459
|
{
|
@@ -2409,14 +2525,15 @@ function ct(t) {
|
|
2409
2525
|
}
|
2410
2526
|
),
|
2411
2527
|
t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
|
2412
|
-
|
2413
|
-
h.current.src =
|
2528
|
+
La().then((m) => {
|
2529
|
+
h.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
|
2414
2530
|
});
|
2415
|
-
}, src: a.length > 0 ? a :
|
2416
|
-
t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((
|
2531
|
+
}, src: a.length > 0 ? a : ja }),
|
2532
|
+
t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((m, b) => /* @__PURE__ */ l.jsx("option", { value: m.value, children: dt(m.title) }, b)) }) }),
|
2533
|
+
t.type === "vector" && /* @__PURE__ */ l.jsx(Va, { value: a, min: -1, max: 1, onChange: u })
|
2417
2534
|
] });
|
2418
2535
|
}
|
2419
|
-
function
|
2536
|
+
function Zt(t) {
|
2420
2537
|
switch (t) {
|
2421
2538
|
case "fov":
|
2422
2539
|
return "FOV";
|
@@ -2445,12 +2562,12 @@ function qt(t) {
|
|
2445
2562
|
}
|
2446
2563
|
return t;
|
2447
2564
|
}
|
2448
|
-
function
|
2565
|
+
function Ga(t, n) {
|
2449
2566
|
const a = [];
|
2450
2567
|
if (t.perspectiveCameraInfo !== void 0)
|
2451
2568
|
for (const e in t.perspectiveCameraInfo)
|
2452
2569
|
a.push({
|
2453
|
-
title:
|
2570
|
+
title: Zt(e),
|
2454
2571
|
prop: e,
|
2455
2572
|
type: "number",
|
2456
2573
|
step: 0.01,
|
@@ -2464,7 +2581,7 @@ function $a(t, n) {
|
|
2464
2581
|
else if (t.orthographicCameraInfo !== void 0)
|
2465
2582
|
for (const e in t.orthographicCameraInfo)
|
2466
2583
|
a.push({
|
2467
|
-
title:
|
2584
|
+
title: Zt(e),
|
2468
2585
|
prop: e,
|
2469
2586
|
type: "number",
|
2470
2587
|
step: 0.01,
|
@@ -2483,27 +2600,27 @@ function $a(t, n) {
|
|
2483
2600
|
}
|
2484
2601
|
);
|
2485
2602
|
}
|
2486
|
-
const
|
2487
|
-
function
|
2603
|
+
const Ha = Math.PI / 180, Wa = 180 / Math.PI;
|
2604
|
+
function et(t, n, a, e, i) {
|
2488
2605
|
return e + (t - n) * (i - e) / (a - n);
|
2489
2606
|
}
|
2490
|
-
function
|
2491
|
-
return t *
|
2607
|
+
function qa(t) {
|
2608
|
+
return t * Ha;
|
2492
2609
|
}
|
2493
|
-
function
|
2494
|
-
return t *
|
2610
|
+
function kt(t) {
|
2611
|
+
return t * Wa;
|
2495
2612
|
}
|
2496
|
-
function
|
2497
|
-
const a = new
|
2613
|
+
function Ka(t, n) {
|
2614
|
+
const a = new Xn();
|
2498
2615
|
a.elements = t.matrix;
|
2499
|
-
const e = new
|
2616
|
+
const e = new K(), i = new Zn(), o = new K();
|
2500
2617
|
t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
|
2501
2618
|
const h = (d, u) => {
|
2502
2619
|
n.updateObject(t.uuid, d, u);
|
2503
|
-
const
|
2504
|
-
|
2620
|
+
const m = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2621
|
+
m !== void 0 && ee(m, d, u);
|
2505
2622
|
}, c = (d, u) => {
|
2506
|
-
h(d,
|
2623
|
+
h(d, qa(u));
|
2507
2624
|
};
|
2508
2625
|
return /* @__PURE__ */ l.jsx(
|
2509
2626
|
We,
|
@@ -2535,7 +2652,7 @@ function Va(t, n) {
|
|
2535
2652
|
title: "Rotation X",
|
2536
2653
|
prop: "rotation.x",
|
2537
2654
|
type: "number",
|
2538
|
-
value:
|
2655
|
+
value: ut(kt(i.x)),
|
2539
2656
|
min: -360,
|
2540
2657
|
max: 360,
|
2541
2658
|
step: 0.1,
|
@@ -2545,7 +2662,7 @@ function Va(t, n) {
|
|
2545
2662
|
title: "Rotation Y",
|
2546
2663
|
prop: "rotation.y",
|
2547
2664
|
type: "number",
|
2548
|
-
value:
|
2665
|
+
value: ut(kt(i.y)),
|
2549
2666
|
min: -360,
|
2550
2667
|
max: 360,
|
2551
2668
|
step: 0.1,
|
@@ -2555,7 +2672,7 @@ function Va(t, n) {
|
|
2555
2672
|
title: "Rotation Z",
|
2556
2673
|
prop: "rotation.z",
|
2557
2674
|
type: "number",
|
2558
|
-
value:
|
2675
|
+
value: ut(kt(i.z)),
|
2559
2676
|
min: -360,
|
2560
2677
|
max: 360,
|
2561
2678
|
step: 0.1,
|
@@ -2589,7 +2706,7 @@ function Va(t, n) {
|
|
2589
2706
|
}
|
2590
2707
|
);
|
2591
2708
|
}
|
2592
|
-
function
|
2709
|
+
function Jt(t) {
|
2593
2710
|
switch (t) {
|
2594
2711
|
case "color":
|
2595
2712
|
return "Color";
|
@@ -2608,13 +2725,13 @@ function Kt(t) {
|
|
2608
2725
|
}
|
2609
2726
|
return t;
|
2610
2727
|
}
|
2611
|
-
function
|
2728
|
+
function Xa(t, n) {
|
2612
2729
|
const a = [];
|
2613
2730
|
if (t.lightInfo !== void 0)
|
2614
2731
|
for (const e in t.lightInfo) {
|
2615
2732
|
const i = t.lightInfo[e];
|
2616
2733
|
i !== void 0 && (i.isColor !== void 0 ? a.push({
|
2617
|
-
title:
|
2734
|
+
title: Jt(e),
|
2618
2735
|
prop: e,
|
2619
2736
|
type: "color",
|
2620
2737
|
value: i,
|
@@ -2625,7 +2742,7 @@ function Ha(t, n) {
|
|
2625
2742
|
d !== void 0 && ee(d, o, c);
|
2626
2743
|
}
|
2627
2744
|
}) : a.push({
|
2628
|
-
title:
|
2745
|
+
title: Jt(e),
|
2629
2746
|
prop: e,
|
2630
2747
|
type: typeof i,
|
2631
2748
|
value: i,
|
@@ -2645,7 +2762,7 @@ function Ha(t, n) {
|
|
2645
2762
|
}
|
2646
2763
|
);
|
2647
2764
|
}
|
2648
|
-
function
|
2765
|
+
function Za(t, n) {
|
2649
2766
|
const a = [], e = [];
|
2650
2767
|
let i = 0;
|
2651
2768
|
t.animations.forEach((c) => {
|
@@ -2692,8 +2809,8 @@ function Wa(t, n) {
|
|
2692
2809
|
step: 0.01,
|
2693
2810
|
min: -1,
|
2694
2811
|
max: 2,
|
2695
|
-
onChange: (u,
|
2696
|
-
c.timeScale =
|
2812
|
+
onChange: (u, m) => {
|
2813
|
+
c.timeScale = m, n.updateObject(t.uuid, "mixer.timeScale", m);
|
2697
2814
|
}
|
2698
2815
|
}
|
2699
2816
|
];
|
@@ -2711,7 +2828,7 @@ function Wa(t, n) {
|
|
2711
2828
|
}
|
2712
2829
|
return /* @__PURE__ */ l.jsx(We, { title: "Animation", items: a });
|
2713
2830
|
}
|
2714
|
-
const
|
2831
|
+
const Pn = {
|
2715
2832
|
name: "",
|
2716
2833
|
uuid: "",
|
2717
2834
|
type: "",
|
@@ -2723,94 +2840,94 @@ const Tn = {
|
|
2723
2840
|
orthographicCameraInfo: void 0,
|
2724
2841
|
lightInfo: void 0
|
2725
2842
|
};
|
2726
|
-
let
|
2727
|
-
function
|
2728
|
-
const [n, a] =
|
2729
|
-
|
2843
|
+
let ce = { ...Pn };
|
2844
|
+
function Ja(t) {
|
2845
|
+
const [n, a] = ne(-1);
|
2846
|
+
Re(() => {
|
2730
2847
|
function h(d) {
|
2731
|
-
|
2848
|
+
ce = { ...d.value }, a(Date.now());
|
2732
2849
|
}
|
2733
2850
|
function c() {
|
2734
|
-
|
2851
|
+
ce = { ...Pn }, a(Date.now());
|
2735
2852
|
}
|
2736
|
-
return
|
2737
|
-
|
2853
|
+
return D.addEventListener(I.SET_SCENE, c), D.addEventListener(I.SET_OBJECT, h), () => {
|
2854
|
+
D.removeEventListener(I.SET_SCENE, c), D.removeEventListener(I.SET_OBJECT, h);
|
2738
2855
|
};
|
2739
2856
|
}, []);
|
2740
|
-
const e =
|
2741
|
-
return /* @__PURE__ */ l.jsx(
|
2857
|
+
const e = ce.type.toLowerCase(), i = ce.animations.length > 0 || ce.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
|
2858
|
+
return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: ce.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2742
2859
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2743
2860
|
/* @__PURE__ */ l.jsx(
|
2744
|
-
|
2861
|
+
lt,
|
2745
2862
|
{
|
2746
2863
|
type: "string",
|
2747
2864
|
title: "Name",
|
2748
2865
|
prop: "name",
|
2749
|
-
value:
|
2866
|
+
value: ce.name,
|
2750
2867
|
disabled: !0
|
2751
2868
|
}
|
2752
2869
|
),
|
2753
2870
|
/* @__PURE__ */ l.jsx(
|
2754
|
-
|
2871
|
+
lt,
|
2755
2872
|
{
|
2756
2873
|
type: "string",
|
2757
2874
|
title: "Type",
|
2758
2875
|
prop: "type",
|
2759
|
-
value:
|
2876
|
+
value: ce.type,
|
2760
2877
|
disabled: !0
|
2761
2878
|
}
|
2762
2879
|
),
|
2763
2880
|
/* @__PURE__ */ l.jsx(
|
2764
|
-
|
2881
|
+
lt,
|
2765
2882
|
{
|
2766
2883
|
type: "string",
|
2767
2884
|
title: "UUID",
|
2768
2885
|
prop: "uuid",
|
2769
|
-
value:
|
2886
|
+
value: ce.uuid,
|
2770
2887
|
disabled: !0
|
2771
2888
|
}
|
2772
2889
|
),
|
2773
2890
|
/* @__PURE__ */ l.jsx(
|
2774
|
-
|
2891
|
+
lt,
|
2775
2892
|
{
|
2776
2893
|
type: "boolean",
|
2777
2894
|
title: "Visible",
|
2778
2895
|
prop: "visible",
|
2779
|
-
value:
|
2896
|
+
value: ce.visible,
|
2780
2897
|
onChange: (h, c) => {
|
2781
|
-
t.three.updateObject(
|
2782
|
-
const d = t.three.scene?.getObjectByProperty("uuid",
|
2898
|
+
t.three.updateObject(ce.uuid, h, c);
|
2899
|
+
const d = t.three.scene?.getObjectByProperty("uuid", ce.uuid);
|
2783
2900
|
d !== void 0 && ee(d, h, c);
|
2784
2901
|
}
|
2785
2902
|
}
|
2786
2903
|
)
|
2787
2904
|
] }),
|
2788
2905
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2789
|
-
|
2790
|
-
i ?
|
2791
|
-
e.search("camera") > -1 ?
|
2792
|
-
e.search("light") > -1 ?
|
2793
|
-
o ?
|
2906
|
+
Ka(ce, t.three),
|
2907
|
+
i ? Za(ce, t.three) : null,
|
2908
|
+
e.search("camera") > -1 ? Ga(ce, t.three) : null,
|
2909
|
+
e.search("light") > -1 ? Xa(ce, t.three) : null,
|
2910
|
+
o ? Ya(ce, t.three) : null
|
2794
2911
|
] })
|
2795
2912
|
] }) }, n) }, "Inspector");
|
2796
2913
|
}
|
2797
|
-
function
|
2798
|
-
const [n, a] =
|
2799
|
-
|
2914
|
+
function yi(t) {
|
2915
|
+
const [n, a] = ne(t.scene);
|
2916
|
+
Re(() => {
|
2800
2917
|
const o = (h) => {
|
2801
2918
|
a(h.value);
|
2802
2919
|
};
|
2803
|
-
return
|
2804
|
-
|
2920
|
+
return D.addEventListener(I.SET_SCENE, o), () => {
|
2921
|
+
D.removeEventListener(I.SET_SCENE, o);
|
2805
2922
|
};
|
2806
2923
|
}, []);
|
2807
2924
|
const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
|
2808
2925
|
return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
|
2809
|
-
/* @__PURE__ */ l.jsx(
|
2810
|
-
/* @__PURE__ */ l.jsx(
|
2926
|
+
/* @__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(Ja, { three: t.three })
|
2811
2928
|
] }, "SidePanel");
|
2812
2929
|
}
|
2813
|
-
function
|
2930
|
+
function Ei(t) {
|
2814
2931
|
function n() {
|
2815
2932
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2816
2933
|
}
|
@@ -2822,81 +2939,81 @@ function gi(t) {
|
|
2822
2939
|
}, e = (c, d, u) => {
|
2823
2940
|
if (!n())
|
2824
2941
|
return;
|
2825
|
-
const
|
2826
|
-
|
2942
|
+
const m = t.three.scene?.getObjectByProperty("uuid", c);
|
2943
|
+
m !== void 0 && ee(m, d, u);
|
2827
2944
|
}, i = (c) => {
|
2828
2945
|
if (!n())
|
2829
2946
|
return;
|
2830
|
-
const d = c.value, { key: u, value:
|
2831
|
-
e(b, u,
|
2947
|
+
const d = c.value, { key: u, value: m, uuid: b } = d;
|
2948
|
+
e(b, u, m);
|
2832
2949
|
}, o = (c) => {
|
2833
2950
|
if (!n())
|
2834
2951
|
return;
|
2835
2952
|
const d = c.value;
|
2836
|
-
|
2953
|
+
It(d.value).then((u) => {
|
2837
2954
|
e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
|
2838
2955
|
});
|
2839
2956
|
}, h = (c) => {
|
2840
2957
|
if (!n())
|
2841
2958
|
return;
|
2842
|
-
const { key: d, uuid: u, value:
|
2959
|
+
const { key: d, uuid: u, value: m, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
|
2843
2960
|
if (E !== void 0)
|
2844
2961
|
try {
|
2845
|
-
b !== void 0 ?
|
2846
|
-
} catch (
|
2847
|
-
console.log("Error requesting method:"), console.log(
|
2962
|
+
b !== void 0 ? Sa(E, b)[d](m) : E[d](m);
|
2963
|
+
} catch (x) {
|
2964
|
+
console.log("Error requesting method:"), console.log(x), console.log(d), console.log(m);
|
2848
2965
|
}
|
2849
2966
|
};
|
2850
|
-
return
|
2851
|
-
|
2967
|
+
return Re(() => (D.addEventListener(I.GET_OBJECT, a), D.addEventListener(I.UPDATE_OBJECT, i), D.addEventListener(I.CREATE_TEXTURE, o), D.addEventListener(I.REQUEST_METHOD, h), () => {
|
2968
|
+
D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE, o), D.removeEventListener(I.REQUEST_METHOD, h);
|
2852
2969
|
}), []), null;
|
2853
2970
|
}
|
2854
|
-
const
|
2855
|
-
class
|
2971
|
+
const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" }, yt = new Jn(), tn = new Qn(), Qa = Math.cos(70 * ea.DEG2RAD);
|
2972
|
+
class ei extends an {
|
2856
2973
|
constructor(n, a) {
|
2857
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
2974
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new K(), this.cursor = new K(), 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: Xe.ROTATE, MIDDLE: Xe.DOLLY, RIGHT: Xe.PAN }, this.touches = { ONE: Ze.ROTATE, TWO: Ze.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2858
2975
|
return c.phi;
|
2859
2976
|
}, this.getAzimuthalAngle = function() {
|
2860
2977
|
return c.theta;
|
2861
2978
|
}, this.getDistance = function() {
|
2862
2979
|
return this.object.position.distanceTo(this.target);
|
2863
2980
|
}, this.listenToKeyEvents = function(s) {
|
2864
|
-
s.addEventListener("keydown",
|
2981
|
+
s.addEventListener("keydown", at), this._domElementKeyEvents = s;
|
2865
2982
|
}, this.stopListenToKeyEvents = function() {
|
2866
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
2983
|
+
this._domElementKeyEvents.removeEventListener("keydown", at), this._domElementKeyEvents = null;
|
2867
2984
|
}, this.saveState = function() {
|
2868
2985
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2869
2986
|
}, this.reset = function() {
|
2870
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(
|
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(), o = i.NONE;
|
2871
2988
|
}, this.update = function() {
|
2872
|
-
const s = new
|
2873
|
-
return function(
|
2874
|
-
const
|
2875
|
-
s.copy(
|
2876
|
-
let
|
2877
|
-
isFinite(
|
2878
|
-
let
|
2879
|
-
if (e.zoomToCursor &&
|
2880
|
-
let
|
2989
|
+
const s = new K(), y = new zt().setFromUnitVectors(n.up, new K(0, 1, 0)), T = y.clone().invert(), L = new K(), q = new zt(), Ee = new K(), ue = 2 * Math.PI;
|
2990
|
+
return function(_t = null) {
|
2991
|
+
const rt = e.object.position;
|
2992
|
+
s.copy(rt).sub(e.target), s.applyQuaternion(y), c.setFromVector3(s), e.autoRotate && o === i.NONE && ge(Be(_t)), e.enableDamping ? (c.theta += d.theta * e.dampingFactor, c.phi += d.phi * e.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
|
2993
|
+
let Oe = e.minAzimuthAngle, xe = e.maxAzimuthAngle;
|
2994
|
+
isFinite(Oe) && isFinite(xe) && (Oe < -Math.PI ? Oe += ue : Oe > Math.PI && (Oe -= ue), xe < -Math.PI ? xe += ue : xe > Math.PI && (xe -= ue), Oe <= xe ? c.theta = Math.max(Oe, Math.min(xe, c.theta)) : c.theta = c.theta > (Oe + xe) / 2 ? Math.max(Oe, c.theta) : Math.min(xe, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && $ || e.object.isOrthographicCamera ? c.radius = ke(c.radius) : c.radius = ke(c.radius * u), s.setFromSpherical(c), s.applyQuaternion(T), rt.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), m.set(0, 0, 0));
|
2995
|
+
let ze = !1;
|
2996
|
+
if (e.zoomToCursor && $) {
|
2997
|
+
let Ye = null;
|
2881
2998
|
if (e.object.isPerspectiveCamera) {
|
2882
|
-
const
|
2883
|
-
|
2884
|
-
const Ge =
|
2885
|
-
e.object.position.addScaledVector(
|
2999
|
+
const Ve = s.length();
|
3000
|
+
Ye = ke(Ve * u);
|
3001
|
+
const Ge = Ve - Ye;
|
3002
|
+
e.object.position.addScaledVector(ae, Ge), e.object.updateMatrixWorld();
|
2886
3003
|
} else if (e.object.isOrthographicCamera) {
|
2887
|
-
const
|
2888
|
-
|
2889
|
-
const Ge = new
|
2890
|
-
Ge.unproject(e.object), e.object.position.sub(Ge).add(
|
3004
|
+
const Ve = new K(X.x, X.y, 0);
|
3005
|
+
Ve.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), ze = !0;
|
3006
|
+
const Ge = new K(X.x, X.y, 0);
|
3007
|
+
Ge.unproject(e.object), e.object.position.sub(Ge).add(Ve), e.object.updateMatrixWorld(), Ye = s.length();
|
2891
3008
|
} else
|
2892
3009
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2893
|
-
|
3010
|
+
Ye !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Ye).add(e.object.position) : (yt.origin.copy(e.object.position), yt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(yt.direction)) < Qa ? n.lookAt(e.target) : (tn.setFromNormalAndCoplanarPoint(e.object.up, e.target), yt.intersectPlane(tn, e.target))));
|
2894
3011
|
} else
|
2895
|
-
e.object.isOrthographicCamera && (
|
2896
|
-
return u = 1,
|
3012
|
+
e.object.isOrthographicCamera && (ze = u !== 1, ze && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
|
3013
|
+
return u = 1, $ = !1, ze || L.distanceToSquared(e.object.position) > h || 8 * (1 - q.dot(e.object.quaternion)) > h || Ee.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Qt), L.copy(e.object.position), q.copy(e.object.quaternion), Ee.copy(e.target), !0) : !1;
|
2897
3014
|
};
|
2898
3015
|
}(), this.dispose = function() {
|
2899
|
-
e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown",
|
3016
|
+
e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown", Ue), e.domElement.removeEventListener("pointercancel", $e), e.domElement.removeEventListener("wheel", pt), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", $e), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
|
2900
3017
|
};
|
2901
3018
|
const e = this, i = {
|
2902
3019
|
NONE: -1,
|
@@ -2909,181 +3026,181 @@ class Xa extends en {
|
|
2909
3026
|
TOUCH_DOLLY_ROTATE: 6
|
2910
3027
|
};
|
2911
3028
|
let o = i.NONE;
|
2912
|
-
const h = 1e-6, c = new
|
3029
|
+
const h = 1e-6, c = new Yt(), d = new Yt();
|
2913
3030
|
let u = 1;
|
2914
|
-
const
|
2915
|
-
let
|
2916
|
-
const
|
2917
|
-
let
|
2918
|
-
function
|
3031
|
+
const m = new K(), b = new me(), E = new me(), x = new me(), R = new me(), P = new me(), Y = new me(), F = new me(), M = new me(), w = new me(), ae = new K(), X = new me();
|
3032
|
+
let $ = !1;
|
3033
|
+
const W = [], C = {};
|
3034
|
+
let Pe = !1;
|
3035
|
+
function Be(s) {
|
2919
3036
|
return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2920
3037
|
}
|
2921
|
-
function
|
3038
|
+
function Me(s) {
|
2922
3039
|
const y = Math.abs(s * 0.01);
|
2923
3040
|
return Math.pow(0.95, e.zoomSpeed * y);
|
2924
3041
|
}
|
2925
|
-
function
|
3042
|
+
function ge(s) {
|
2926
3043
|
d.theta -= s;
|
2927
3044
|
}
|
2928
|
-
function
|
3045
|
+
function ie(s) {
|
2929
3046
|
d.phi -= s;
|
2930
3047
|
}
|
2931
|
-
const
|
2932
|
-
const s = new
|
2933
|
-
return function(
|
2934
|
-
s.setFromMatrixColumn(
|
3048
|
+
const fe = function() {
|
3049
|
+
const s = new K();
|
3050
|
+
return function(T, L) {
|
3051
|
+
s.setFromMatrixColumn(L, 0), s.multiplyScalar(-T), m.add(s);
|
2935
3052
|
};
|
2936
|
-
}(),
|
2937
|
-
const s = new
|
2938
|
-
return function(
|
2939
|
-
e.screenSpacePanning === !0 ? s.setFromMatrixColumn(
|
3053
|
+
}(), be = function() {
|
3054
|
+
const s = new K();
|
3055
|
+
return function(T, L) {
|
3056
|
+
e.screenSpacePanning === !0 ? s.setFromMatrixColumn(L, 1) : (s.setFromMatrixColumn(L, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), m.add(s);
|
2940
3057
|
};
|
2941
|
-
}(),
|
2942
|
-
const s = new
|
2943
|
-
return function(
|
2944
|
-
const
|
3058
|
+
}(), ye = function() {
|
3059
|
+
const s = new K();
|
3060
|
+
return function(T, L) {
|
3061
|
+
const q = e.domElement;
|
2945
3062
|
if (e.object.isPerspectiveCamera) {
|
2946
|
-
const
|
2947
|
-
s.copy(
|
2948
|
-
let
|
2949
|
-
|
3063
|
+
const Ee = e.object.position;
|
3064
|
+
s.copy(Ee).sub(e.target);
|
3065
|
+
let ue = s.length();
|
3066
|
+
ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), fe(2 * T * ue / q.clientHeight, e.object.matrix), be(2 * L * ue / q.clientHeight, e.object.matrix);
|
2950
3067
|
} else
|
2951
|
-
e.object.isOrthographicCamera ? (
|
3068
|
+
e.object.isOrthographicCamera ? (fe(T * (e.object.right - e.object.left) / e.object.zoom / q.clientWidth, e.object.matrix), be(L * (e.object.top - e.object.bottom) / e.object.zoom / q.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
|
2952
3069
|
};
|
2953
3070
|
}();
|
2954
|
-
function
|
3071
|
+
function Z(s) {
|
2955
3072
|
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2956
3073
|
}
|
2957
|
-
function
|
3074
|
+
function ve(s) {
|
2958
3075
|
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2959
3076
|
}
|
2960
|
-
function
|
3077
|
+
function Ae(s, y) {
|
2961
3078
|
if (!e.zoomToCursor)
|
2962
3079
|
return;
|
2963
|
-
|
2964
|
-
const
|
2965
|
-
|
3080
|
+
$ = !0;
|
3081
|
+
const T = e.domElement.getBoundingClientRect(), L = s - T.left, q = y - T.top, Ee = T.width, ue = T.height;
|
3082
|
+
X.x = L / Ee * 2 - 1, X.y = -(q / ue) * 2 + 1, ae.set(X.x, X.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
2966
3083
|
}
|
2967
3084
|
function ke(s) {
|
2968
3085
|
return Math.max(e.minDistance, Math.min(e.maxDistance, s));
|
2969
3086
|
}
|
2970
|
-
function
|
3087
|
+
function pe(s) {
|
2971
3088
|
b.set(s.clientX, s.clientY);
|
2972
3089
|
}
|
2973
3090
|
function p(s) {
|
2974
|
-
|
3091
|
+
Ae(s.clientX, s.clientX), F.set(s.clientX, s.clientY);
|
2975
3092
|
}
|
2976
|
-
function
|
2977
|
-
|
3093
|
+
function v(s) {
|
3094
|
+
R.set(s.clientX, s.clientY);
|
2978
3095
|
}
|
2979
|
-
function
|
2980
|
-
E.set(s.clientX, s.clientY),
|
3096
|
+
function O(s) {
|
3097
|
+
E.set(s.clientX, s.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
2981
3098
|
const y = e.domElement;
|
2982
|
-
|
3099
|
+
ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
|
2983
3100
|
}
|
2984
|
-
function
|
2985
|
-
M.set(s.clientX, s.clientY),
|
3101
|
+
function A(s) {
|
3102
|
+
M.set(s.clientX, s.clientY), w.subVectors(M, F), w.y > 0 ? Z(Me(w.y)) : w.y < 0 && ve(Me(w.y)), F.copy(M), e.update();
|
2986
3103
|
}
|
2987
3104
|
function G(s) {
|
2988
|
-
|
3105
|
+
P.set(s.clientX, s.clientY), Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P), e.update();
|
2989
3106
|
}
|
2990
|
-
function
|
2991
|
-
|
3107
|
+
function H(s) {
|
3108
|
+
Ae(s.clientX, s.clientY), s.deltaY < 0 ? ve(Me(s.deltaY)) : s.deltaY > 0 && Z(Me(s.deltaY)), e.update();
|
2992
3109
|
}
|
2993
|
-
function
|
3110
|
+
function se(s) {
|
2994
3111
|
let y = !1;
|
2995
3112
|
switch (s.code) {
|
2996
3113
|
case e.keys.UP:
|
2997
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3114
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? ie(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, e.keyPanSpeed), y = !0;
|
2998
3115
|
break;
|
2999
3116
|
case e.keys.BOTTOM:
|
3000
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3117
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? ie(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, -e.keyPanSpeed), y = !0;
|
3001
3118
|
break;
|
3002
3119
|
case e.keys.LEFT:
|
3003
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3120
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? ge(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(e.keyPanSpeed, 0), y = !0;
|
3004
3121
|
break;
|
3005
3122
|
case e.keys.RIGHT:
|
3006
|
-
s.ctrlKey || s.metaKey || s.shiftKey ?
|
3123
|
+
s.ctrlKey || s.metaKey || s.shiftKey ? ge(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(-e.keyPanSpeed, 0), y = !0;
|
3007
3124
|
break;
|
3008
3125
|
}
|
3009
3126
|
y && (s.preventDefault(), e.update());
|
3010
3127
|
}
|
3011
|
-
function
|
3012
|
-
if (
|
3128
|
+
function z(s) {
|
3129
|
+
if (W.length === 1)
|
3013
3130
|
b.set(s.pageX, s.pageY);
|
3014
3131
|
else {
|
3015
|
-
const y = De(s),
|
3016
|
-
b.set(
|
3132
|
+
const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
|
3133
|
+
b.set(T, L);
|
3017
3134
|
}
|
3018
3135
|
}
|
3019
|
-
function
|
3020
|
-
if (
|
3021
|
-
|
3136
|
+
function J(s) {
|
3137
|
+
if (W.length === 1)
|
3138
|
+
R.set(s.pageX, s.pageY);
|
3022
3139
|
else {
|
3023
|
-
const y = De(s),
|
3024
|
-
|
3140
|
+
const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
|
3141
|
+
R.set(T, L);
|
3025
3142
|
}
|
3026
3143
|
}
|
3027
|
-
function
|
3028
|
-
const y = De(s),
|
3029
|
-
|
3144
|
+
function oe(s) {
|
3145
|
+
const y = De(s), T = s.pageX - y.x, L = s.pageY - y.y, q = Math.sqrt(T * T + L * L);
|
3146
|
+
F.set(0, q);
|
3030
3147
|
}
|
3031
|
-
function
|
3032
|
-
e.enableZoom &&
|
3148
|
+
function k(s) {
|
3149
|
+
e.enableZoom && oe(s), e.enablePan && J(s);
|
3033
3150
|
}
|
3034
|
-
function
|
3035
|
-
e.enableZoom &&
|
3151
|
+
function U(s) {
|
3152
|
+
e.enableZoom && oe(s), e.enableRotate && z(s);
|
3036
3153
|
}
|
3037
|
-
function
|
3038
|
-
if (
|
3154
|
+
function re(s) {
|
3155
|
+
if (W.length == 1)
|
3039
3156
|
E.set(s.pageX, s.pageY);
|
3040
3157
|
else {
|
3041
|
-
const
|
3042
|
-
E.set(
|
3158
|
+
const T = De(s), L = 0.5 * (s.pageX + T.x), q = 0.5 * (s.pageY + T.y);
|
3159
|
+
E.set(L, q);
|
3043
3160
|
}
|
3044
|
-
|
3161
|
+
x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
3045
3162
|
const y = e.domElement;
|
3046
|
-
|
3163
|
+
ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
|
3047
3164
|
}
|
3048
|
-
function
|
3049
|
-
if (
|
3050
|
-
|
3165
|
+
function we(s) {
|
3166
|
+
if (W.length === 1)
|
3167
|
+
P.set(s.pageX, s.pageY);
|
3051
3168
|
else {
|
3052
|
-
const y = De(s),
|
3053
|
-
|
3169
|
+
const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
|
3170
|
+
P.set(T, L);
|
3054
3171
|
}
|
3055
|
-
|
3172
|
+
Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P);
|
3056
3173
|
}
|
3057
|
-
function
|
3058
|
-
const y = De(s),
|
3059
|
-
M.set(0,
|
3060
|
-
const
|
3061
|
-
|
3174
|
+
function Te(s) {
|
3175
|
+
const y = De(s), T = s.pageX - y.x, L = s.pageY - y.y, q = Math.sqrt(T * T + L * L);
|
3176
|
+
M.set(0, q), w.set(0, Math.pow(M.y / F.y, e.zoomSpeed)), Z(w.y), F.copy(M);
|
3177
|
+
const Ee = (s.pageX + y.x) * 0.5, ue = (s.pageY + y.y) * 0.5;
|
3178
|
+
Ae(Ee, ue);
|
3062
3179
|
}
|
3063
|
-
function
|
3064
|
-
e.enableZoom &&
|
3180
|
+
function ht(s) {
|
3181
|
+
e.enableZoom && Te(s), e.enablePan && we(s);
|
3065
3182
|
}
|
3066
|
-
function
|
3067
|
-
e.enableZoom &&
|
3183
|
+
function ft(s) {
|
3184
|
+
e.enableZoom && Te(s), e.enableRotate && re(s);
|
3068
3185
|
}
|
3069
|
-
function
|
3070
|
-
e.enabled !== !1 && (
|
3186
|
+
function Ue(s) {
|
3187
|
+
e.enabled !== !1 && (W.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", tt), e.domElement.addEventListener("pointerup", $e)), Mt(s), s.pointerType === "touch" ? it(s) : nt(s));
|
3071
3188
|
}
|
3072
|
-
function
|
3073
|
-
e.enabled !== !1 && (s.pointerType === "touch" ?
|
3189
|
+
function tt(s) {
|
3190
|
+
e.enabled !== !1 && (s.pointerType === "touch" ? gt(s) : Ot(s));
|
3074
3191
|
}
|
3075
|
-
function
|
3076
|
-
switch (
|
3192
|
+
function $e(s) {
|
3193
|
+
switch (Tt(s), W.length) {
|
3077
3194
|
case 0:
|
3078
|
-
e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove",
|
3195
|
+
e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", $e), e.dispatchEvent(en), o = i.NONE;
|
3079
3196
|
break;
|
3080
3197
|
case 1:
|
3081
|
-
const y =
|
3082
|
-
|
3198
|
+
const y = W[0], T = C[y];
|
3199
|
+
it({ pointerId: y, pageX: T.x, pageY: T.y });
|
3083
3200
|
break;
|
3084
3201
|
}
|
3085
3202
|
}
|
3086
|
-
function
|
3203
|
+
function nt(s) {
|
3087
3204
|
let y;
|
3088
3205
|
switch (s.button) {
|
3089
3206
|
case 0:
|
@@ -3108,40 +3225,40 @@ class Xa extends en {
|
|
3108
3225
|
if (s.ctrlKey || s.metaKey || s.shiftKey) {
|
3109
3226
|
if (e.enablePan === !1)
|
3110
3227
|
return;
|
3111
|
-
|
3228
|
+
v(s), o = i.PAN;
|
3112
3229
|
} else {
|
3113
3230
|
if (e.enableRotate === !1)
|
3114
3231
|
return;
|
3115
|
-
|
3232
|
+
pe(s), o = i.ROTATE;
|
3116
3233
|
}
|
3117
3234
|
break;
|
3118
3235
|
case Xe.PAN:
|
3119
3236
|
if (s.ctrlKey || s.metaKey || s.shiftKey) {
|
3120
3237
|
if (e.enableRotate === !1)
|
3121
3238
|
return;
|
3122
|
-
|
3239
|
+
pe(s), o = i.ROTATE;
|
3123
3240
|
} else {
|
3124
3241
|
if (e.enablePan === !1)
|
3125
3242
|
return;
|
3126
|
-
|
3243
|
+
v(s), o = i.PAN;
|
3127
3244
|
}
|
3128
3245
|
break;
|
3129
3246
|
default:
|
3130
3247
|
o = i.NONE;
|
3131
3248
|
}
|
3132
|
-
o !== i.NONE && e.dispatchEvent(
|
3249
|
+
o !== i.NONE && e.dispatchEvent(jt);
|
3133
3250
|
}
|
3134
|
-
function
|
3251
|
+
function Ot(s) {
|
3135
3252
|
switch (o) {
|
3136
3253
|
case i.ROTATE:
|
3137
3254
|
if (e.enableRotate === !1)
|
3138
3255
|
return;
|
3139
|
-
|
3256
|
+
O(s);
|
3140
3257
|
break;
|
3141
3258
|
case i.DOLLY:
|
3142
3259
|
if (e.enableZoom === !1)
|
3143
3260
|
return;
|
3144
|
-
|
3261
|
+
A(s);
|
3145
3262
|
break;
|
3146
3263
|
case i.PAN:
|
3147
3264
|
if (e.enablePan === !1)
|
@@ -3150,47 +3267,47 @@ class Xa extends en {
|
|
3150
3267
|
break;
|
3151
3268
|
}
|
3152
3269
|
}
|
3153
|
-
function
|
3154
|
-
e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(
|
3270
|
+
function pt(s) {
|
3271
|
+
e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(jt), H(mt(s)), e.dispatchEvent(en));
|
3155
3272
|
}
|
3156
|
-
function
|
3157
|
-
const y = s.deltaMode,
|
3273
|
+
function mt(s) {
|
3274
|
+
const y = s.deltaMode, T = {
|
3158
3275
|
clientX: s.clientX,
|
3159
3276
|
clientY: s.clientY,
|
3160
3277
|
deltaY: s.deltaY
|
3161
3278
|
};
|
3162
3279
|
switch (y) {
|
3163
3280
|
case 1:
|
3164
|
-
|
3281
|
+
T.deltaY *= 16;
|
3165
3282
|
break;
|
3166
3283
|
case 2:
|
3167
|
-
|
3284
|
+
T.deltaY *= 100;
|
3168
3285
|
break;
|
3169
3286
|
}
|
3170
|
-
return s.ctrlKey && !
|
3287
|
+
return s.ctrlKey && !Pe && (T.deltaY *= 10), T;
|
3171
3288
|
}
|
3172
|
-
function
|
3173
|
-
s.key === "Control" && (
|
3289
|
+
function vt(s) {
|
3290
|
+
s.key === "Control" && (Pe = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
|
3174
3291
|
}
|
3175
3292
|
function je(s) {
|
3176
|
-
s.key === "Control" && (
|
3177
|
-
}
|
3178
|
-
function nt(s) {
|
3179
|
-
e.enabled === !1 || e.enablePan === !1 || ae(s);
|
3293
|
+
s.key === "Control" && (Pe = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
|
3180
3294
|
}
|
3181
3295
|
function at(s) {
|
3182
|
-
|
3296
|
+
e.enabled === !1 || e.enablePan === !1 || se(s);
|
3297
|
+
}
|
3298
|
+
function it(s) {
|
3299
|
+
switch (bt(s), W.length) {
|
3183
3300
|
case 1:
|
3184
3301
|
switch (e.touches.ONE) {
|
3185
3302
|
case Ze.ROTATE:
|
3186
3303
|
if (e.enableRotate === !1)
|
3187
3304
|
return;
|
3188
|
-
|
3305
|
+
z(s), o = i.TOUCH_ROTATE;
|
3189
3306
|
break;
|
3190
3307
|
case Ze.PAN:
|
3191
3308
|
if (e.enablePan === !1)
|
3192
3309
|
return;
|
3193
|
-
|
3310
|
+
J(s), o = i.TOUCH_PAN;
|
3194
3311
|
break;
|
3195
3312
|
default:
|
3196
3313
|
o = i.NONE;
|
@@ -3201,12 +3318,12 @@ class Xa extends en {
|
|
3201
3318
|
case Ze.DOLLY_PAN:
|
3202
3319
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3203
3320
|
return;
|
3204
|
-
|
3321
|
+
k(s), o = i.TOUCH_DOLLY_PAN;
|
3205
3322
|
break;
|
3206
3323
|
case Ze.DOLLY_ROTATE:
|
3207
3324
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3208
3325
|
return;
|
3209
|
-
|
3326
|
+
U(s), o = i.TOUCH_DOLLY_ROTATE;
|
3210
3327
|
break;
|
3211
3328
|
default:
|
3212
3329
|
o = i.NONE;
|
@@ -3215,29 +3332,29 @@ class Xa extends en {
|
|
3215
3332
|
default:
|
3216
3333
|
o = i.NONE;
|
3217
3334
|
}
|
3218
|
-
o !== i.NONE && e.dispatchEvent(
|
3335
|
+
o !== i.NONE && e.dispatchEvent(jt);
|
3219
3336
|
}
|
3220
|
-
function
|
3221
|
-
switch (
|
3337
|
+
function gt(s) {
|
3338
|
+
switch (bt(s), o) {
|
3222
3339
|
case i.TOUCH_ROTATE:
|
3223
3340
|
if (e.enableRotate === !1)
|
3224
3341
|
return;
|
3225
|
-
|
3342
|
+
re(s), e.update();
|
3226
3343
|
break;
|
3227
3344
|
case i.TOUCH_PAN:
|
3228
3345
|
if (e.enablePan === !1)
|
3229
3346
|
return;
|
3230
|
-
|
3347
|
+
we(s), e.update();
|
3231
3348
|
break;
|
3232
3349
|
case i.TOUCH_DOLLY_PAN:
|
3233
3350
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3234
3351
|
return;
|
3235
|
-
|
3352
|
+
ht(s), e.update();
|
3236
3353
|
break;
|
3237
3354
|
case i.TOUCH_DOLLY_ROTATE:
|
3238
3355
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3239
3356
|
return;
|
3240
|
-
|
3357
|
+
ft(s), e.update();
|
3241
3358
|
break;
|
3242
3359
|
default:
|
3243
3360
|
o = i.NONE;
|
@@ -3246,30 +3363,30 @@ class Xa extends en {
|
|
3246
3363
|
function qe(s) {
|
3247
3364
|
e.enabled !== !1 && s.preventDefault();
|
3248
3365
|
}
|
3249
|
-
function
|
3250
|
-
|
3366
|
+
function Mt(s) {
|
3367
|
+
W.push(s.pointerId);
|
3251
3368
|
}
|
3252
|
-
function
|
3253
|
-
delete
|
3254
|
-
for (let y = 0; y <
|
3255
|
-
if (
|
3256
|
-
|
3369
|
+
function Tt(s) {
|
3370
|
+
delete C[s.pointerId];
|
3371
|
+
for (let y = 0; y < W.length; y++)
|
3372
|
+
if (W[y] == s.pointerId) {
|
3373
|
+
W.splice(y, 1);
|
3257
3374
|
return;
|
3258
3375
|
}
|
3259
3376
|
}
|
3260
|
-
function
|
3261
|
-
let y =
|
3262
|
-
y === void 0 && (y = new
|
3377
|
+
function bt(s) {
|
3378
|
+
let y = C[s.pointerId];
|
3379
|
+
y === void 0 && (y = new me(), C[s.pointerId] = y), y.set(s.pageX, s.pageY);
|
3263
3380
|
}
|
3264
3381
|
function De(s) {
|
3265
|
-
const y = s.pointerId ===
|
3266
|
-
return
|
3382
|
+
const y = s.pointerId === W[0] ? W[1] : W[0];
|
3383
|
+
return C[y];
|
3267
3384
|
}
|
3268
|
-
e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown",
|
3385
|
+
e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown", Ue), e.domElement.addEventListener("pointercancel", $e), e.domElement.addEventListener("wheel", pt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", vt, { passive: !0, capture: !0 }), this.update();
|
3269
3386
|
}
|
3270
3387
|
}
|
3271
|
-
const
|
3272
|
-
const [n, a] =
|
3388
|
+
const Ct = (t) => {
|
3389
|
+
const [n, a] = ne(t.options[t.index]), e = () => {
|
3273
3390
|
t.onToggle(!t.open);
|
3274
3391
|
}, i = (o) => {
|
3275
3392
|
o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
|
@@ -3278,14 +3395,14 @@ const Et = (t) => {
|
|
3278
3395
|
/* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
3279
3396
|
t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
|
3280
3397
|
] });
|
3281
|
-
}, He =
|
3282
|
-
const [e, i] =
|
3398
|
+
}, He = pa(function(n, a) {
|
3399
|
+
const [e, i] = ne(!1), o = n.options.indexOf(n.camera.name);
|
3283
3400
|
return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
|
3284
3401
|
/* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
3285
3402
|
e && i(!1);
|
3286
3403
|
} }),
|
3287
3404
|
/* @__PURE__ */ l.jsx(
|
3288
|
-
|
3405
|
+
Ct,
|
3289
3406
|
{
|
3290
3407
|
index: o,
|
3291
3408
|
open: e,
|
@@ -3299,14 +3416,14 @@ const Et = (t) => {
|
|
3299
3416
|
)
|
3300
3417
|
] });
|
3301
3418
|
});
|
3302
|
-
class
|
3419
|
+
class ti extends xn {
|
3303
3420
|
constructor(n) {
|
3304
3421
|
super({
|
3305
3422
|
extensions: {
|
3306
3423
|
derivatives: !0
|
3307
3424
|
},
|
3308
|
-
glslVersion:
|
3309
|
-
side:
|
3425
|
+
glslVersion: ta,
|
3426
|
+
side: sn,
|
3310
3427
|
transparent: !0,
|
3311
3428
|
uniforms: {
|
3312
3429
|
uScale: {
|
@@ -3411,17 +3528,17 @@ class Za extends bn {
|
|
3411
3528
|
});
|
3412
3529
|
}
|
3413
3530
|
}
|
3414
|
-
class
|
3531
|
+
class ni extends na {
|
3415
3532
|
gridMaterial;
|
3416
3533
|
constructor() {
|
3417
|
-
const n = new
|
3418
|
-
super(new
|
3534
|
+
const n = new ti();
|
3535
|
+
super(new aa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
3419
3536
|
}
|
3420
3537
|
update() {
|
3421
3538
|
this.gridMaterial.needsUpdate = !0;
|
3422
3539
|
}
|
3423
3540
|
}
|
3424
|
-
const
|
3541
|
+
const ai = `#include <common>
|
3425
3542
|
#include <batching_pars_vertex>
|
3426
3543
|
#include <uv_pars_vertex>
|
3427
3544
|
#include <color_pars_vertex>
|
@@ -3451,7 +3568,7 @@ void main() {
|
|
3451
3568
|
#include <logdepthbuf_vertex>
|
3452
3569
|
#include <clipping_planes_vertex>
|
3453
3570
|
#include <worldpos_vertex>
|
3454
|
-
}`,
|
3571
|
+
}`, ii = `
|
3455
3572
|
#include <common>
|
3456
3573
|
#include <uv_pars_fragment>
|
3457
3574
|
#include <clipping_planes_pars_fragment>
|
@@ -3460,51 +3577,51 @@ void main() {
|
|
3460
3577
|
#include <clipping_planes_fragment>
|
3461
3578
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
3462
3579
|
}`;
|
3463
|
-
class
|
3580
|
+
class ri extends xn {
|
3464
3581
|
constructor() {
|
3465
3582
|
super({
|
3466
3583
|
defines: {
|
3467
3584
|
USE_UV: ""
|
3468
3585
|
},
|
3469
|
-
vertexShader:
|
3470
|
-
fragmentShader:
|
3586
|
+
vertexShader: ai,
|
3587
|
+
fragmentShader: ii
|
3471
3588
|
});
|
3472
3589
|
}
|
3473
3590
|
}
|
3474
|
-
let
|
3475
|
-
function
|
3476
|
-
const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new
|
3591
|
+
let Et = "Renderer", Ne, xt = !1, nn = !1, V, le, Le, Fe;
|
3592
|
+
function xi(t) {
|
3593
|
+
const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new ia(), []), o = Se(() => new ra(), []), h = Se(() => new ni(), []), c = Se(() => new Vt(500), []), d = Se(() => new Vt(100), []), u = Se(() => new sa(), []), m = Se(() => new oa(), []), b = Se(() => new ri(), []), E = Se(() => new ca({
|
3477
3594
|
opacity: 0.33,
|
3478
3595
|
transparent: !0,
|
3479
3596
|
wireframe: !0
|
3480
3597
|
}), []);
|
3481
|
-
function
|
3482
|
-
const
|
3483
|
-
return
|
3598
|
+
function x(p, v) {
|
3599
|
+
const O = new Gt(-100, 100, 100, -100, 50, 3e3);
|
3600
|
+
return O.name = p, O.position.copy(v), O.lookAt(0, 0, 0), n.set(p, O), O;
|
3484
3601
|
}
|
3485
|
-
const
|
3602
|
+
const R = [
|
3486
3603
|
"Renderer",
|
3487
3604
|
"Depth",
|
3488
3605
|
"Normals",
|
3489
3606
|
"UVs",
|
3490
3607
|
"Wireframe"
|
3491
|
-
],
|
3608
|
+
], P = [
|
3492
3609
|
"Single",
|
3493
3610
|
"Side by Side",
|
3494
3611
|
"Stacked",
|
3495
3612
|
"Quad"
|
3496
3613
|
];
|
3497
|
-
|
3498
|
-
i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1,
|
3499
|
-
const p = new
|
3500
|
-
p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p),
|
3614
|
+
Re(() => {
|
3615
|
+
i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1, x("Top", new K(0, 1e3, 0)), x("Bottom", new K(0, -1e3, 0)), x("Left", new K(-1e3, 0, 0)), x("Right", new K(1e3, 0, 0)), x("Front", new K(0, 0, 1e3)), x("Back", new K(0, 0, -1e3)), x("Orthographic", new K(1e3, 1e3, 1e3));
|
3616
|
+
const p = new Pt(60, 1, 50, 3e3);
|
3617
|
+
p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p), V = n.get("Debug"), le = n.get("Orthographic"), Le = n.get("Front"), Fe = n.get("Top");
|
3501
3618
|
}, []);
|
3502
|
-
const
|
3503
|
-
const
|
3504
|
-
|
3505
|
-
const
|
3506
|
-
|
3507
|
-
const G = new
|
3619
|
+
const Y = he(null), F = he(null), M = he(null), w = he(null), ae = he(null), X = he(null), [$, W] = ne(t.mode !== void 0 ? t.mode : "Single"), [C, Pe] = ne(null), [Be, Me] = ne(!1), [ge, ie] = ne(!1), [fe, be] = ne(!1), [, ye] = ne(Date.now()), Z = (p, v) => {
|
3620
|
+
const O = a.get(p.name);
|
3621
|
+
O !== void 0 && O.dispose(), a.delete(p.name);
|
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);
|
3508
3625
|
switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
|
3509
3626
|
case "Top":
|
3510
3627
|
case "Bottom":
|
@@ -3515,244 +3632,244 @@ function bi(t) {
|
|
3515
3632
|
G.enableRotate = !1;
|
3516
3633
|
break;
|
3517
3634
|
}
|
3518
|
-
if (a.set(p.name, G), p instanceof
|
3519
|
-
const
|
3520
|
-
e.set(p.name,
|
3521
|
-
}
|
3522
|
-
},
|
3523
|
-
const
|
3524
|
-
|
3525
|
-
const
|
3526
|
-
|
3527
|
-
},
|
3528
|
-
a.forEach((p,
|
3635
|
+
if (a.set(p.name, G), p instanceof Pt) {
|
3636
|
+
const H = new da(p);
|
3637
|
+
e.set(p.name, H), i.add(H);
|
3638
|
+
}
|
3639
|
+
}, ve = (p) => {
|
3640
|
+
const v = e.get(p.name);
|
3641
|
+
v !== void 0 && (i.remove(v), v.dispose(), e.delete(p.name));
|
3642
|
+
const O = a.get(p.name);
|
3643
|
+
O !== void 0 && (O.dispose(), a.delete(p.name));
|
3644
|
+
}, Ae = () => {
|
3645
|
+
a.forEach((p, v) => {
|
3529
3646
|
p.dispose();
|
3530
|
-
const
|
3531
|
-
|
3647
|
+
const O = e.get(v);
|
3648
|
+
O !== void 0 && (i.remove(O), O.dispose()), e.delete(v), a.delete(v);
|
3532
3649
|
}), a.clear(), e.clear();
|
3533
3650
|
}, ke = () => {
|
3534
|
-
switch (
|
3651
|
+
switch ($) {
|
3535
3652
|
case "Single":
|
3536
|
-
|
3653
|
+
Z(V, M.current);
|
3537
3654
|
break;
|
3538
3655
|
case "Side by Side":
|
3539
3656
|
case "Stacked":
|
3540
|
-
|
3657
|
+
Z(V, M.current), Z(le, w.current);
|
3541
3658
|
break;
|
3542
3659
|
case "Quad":
|
3543
|
-
|
3660
|
+
Z(V, M.current), Z(le, w.current), Z(Le, ae.current), Z(Fe, X.current);
|
3544
3661
|
break;
|
3545
3662
|
}
|
3546
3663
|
};
|
3547
|
-
|
3548
|
-
const p = new
|
3549
|
-
canvas:
|
3664
|
+
Re(() => {
|
3665
|
+
const p = new la({
|
3666
|
+
canvas: Y.current,
|
3550
3667
|
stencil: !1
|
3551
3668
|
});
|
3552
|
-
p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0),
|
3553
|
-
}, []),
|
3554
|
-
const p = (
|
3555
|
-
|
3556
|
-
const G = t.scenes.get(
|
3669
|
+
p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Pe(p);
|
3670
|
+
}, []), Re(() => {
|
3671
|
+
const p = (A) => {
|
3672
|
+
Mn(Ne), i.remove(Ne);
|
3673
|
+
const G = t.scenes.get(A.value.name);
|
3557
3674
|
if (G !== void 0) {
|
3558
|
-
const
|
3559
|
-
t.onSceneSet !== void 0 && t.onSceneSet(
|
3560
|
-
}
|
3561
|
-
},
|
3562
|
-
const G =
|
3563
|
-
|
3564
|
-
},
|
3565
|
-
n.delete(
|
3675
|
+
const H = new G();
|
3676
|
+
t.onSceneSet !== void 0 && t.onSceneSet(H), Ne = H, t.three.scene = Ne, i.add(Ne), nn = !0;
|
3677
|
+
}
|
3678
|
+
}, v = (A) => {
|
3679
|
+
const G = A.value, H = t.three.scene?.getObjectByProperty("uuid", G.uuid);
|
3680
|
+
H !== void 0 && n.set(G.name, H), ye(Date.now());
|
3681
|
+
}, O = (A) => {
|
3682
|
+
n.delete(A.value.name), ye(Date.now());
|
3566
3683
|
};
|
3567
|
-
return
|
3568
|
-
|
3684
|
+
return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA, O), () => {
|
3685
|
+
D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA, O);
|
3569
3686
|
};
|
3570
|
-
}, []),
|
3571
|
-
if (
|
3687
|
+
}, []), Re(() => {
|
3688
|
+
if (C === null)
|
3572
3689
|
return;
|
3573
|
-
let p = window.innerWidth,
|
3574
|
-
const
|
3575
|
-
p = window.innerWidth - 300,
|
3576
|
-
let
|
3577
|
-
switch (
|
3690
|
+
let p = window.innerWidth, v = window.innerHeight, O = Math.floor(p / 2), A = Math.floor(v / 2), G = -1;
|
3691
|
+
const H = () => {
|
3692
|
+
p = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(p / 2), A = Math.floor(v / 2), C.setSize(p, v);
|
3693
|
+
let k = p, U = v;
|
3694
|
+
switch ($) {
|
3578
3695
|
case "Side by Side":
|
3579
|
-
|
3696
|
+
k = O, U = v;
|
3580
3697
|
break;
|
3581
3698
|
case "Stacked":
|
3582
|
-
|
3699
|
+
k = p, U = A;
|
3583
3700
|
break;
|
3584
3701
|
case "Quad":
|
3585
|
-
|
3702
|
+
k = O, U = A;
|
3586
3703
|
break;
|
3587
3704
|
}
|
3588
|
-
n.forEach((
|
3589
|
-
|
3705
|
+
n.forEach((re) => {
|
3706
|
+
re instanceof Gt ? (re.left = k / -2, re.right = k / 2, re.top = U / 2, re.bottom = U / -2, re.updateProjectionMatrix()) : re instanceof Pt && (re.aspect = k / U, re.updateProjectionMatrix(), e.get(re.name)?.update());
|
3590
3707
|
});
|
3591
|
-
},
|
3592
|
-
|
3593
|
-
},
|
3594
|
-
if (
|
3595
|
-
|
3708
|
+
}, se = () => {
|
3709
|
+
C.setViewport(0, 0, p, v), C.setScissor(0, 0, p, v), C.render(i, V);
|
3710
|
+
}, z = () => {
|
3711
|
+
if ($ === "Side by Side")
|
3712
|
+
C.setViewport(0, 0, O, v), C.setScissor(0, 0, O, v), C.render(i, V), C.setViewport(O, 0, O, v), C.setScissor(O, 0, O, v), C.render(i, le);
|
3596
3713
|
else {
|
3597
|
-
const
|
3598
|
-
|
3599
|
-
}
|
3600
|
-
},
|
3601
|
-
let
|
3602
|
-
|
3603
|
-
},
|
3604
|
-
switch (a.forEach((
|
3605
|
-
|
3606
|
-
}), t.onSceneUpdate !== void 0 &&
|
3714
|
+
const k = v - A;
|
3715
|
+
C.setViewport(0, k, p, A), C.setScissor(0, k, p, A), C.render(i, V), C.setViewport(0, 0, p, A), C.setScissor(0, 0, p, A), C.render(i, le);
|
3716
|
+
}
|
3717
|
+
}, J = () => {
|
3718
|
+
let k = 0, U = 0;
|
3719
|
+
U = v - A, k = 0, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, V), k = O, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, le), U = 0, k = 0, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, Le), k = O, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, Fe);
|
3720
|
+
}, oe = () => {
|
3721
|
+
switch (a.forEach((k) => {
|
3722
|
+
k.update();
|
3723
|
+
}), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(Ne), C.clear(), $) {
|
3607
3724
|
case "Single":
|
3608
|
-
|
3725
|
+
se();
|
3609
3726
|
break;
|
3610
3727
|
case "Side by Side":
|
3611
3728
|
case "Stacked":
|
3612
|
-
|
3729
|
+
z();
|
3613
3730
|
break;
|
3614
3731
|
case "Quad":
|
3615
|
-
|
3732
|
+
J();
|
3616
3733
|
break;
|
3617
3734
|
}
|
3618
|
-
G = requestAnimationFrame(
|
3735
|
+
G = requestAnimationFrame(oe);
|
3619
3736
|
};
|
3620
|
-
return ke(), window.addEventListener("resize",
|
3621
|
-
window.removeEventListener("resize",
|
3737
|
+
return ke(), window.addEventListener("resize", H), H(), oe(), () => {
|
3738
|
+
window.removeEventListener("resize", H), cancelAnimationFrame(G), G = -1;
|
3622
3739
|
};
|
3623
|
-
}, [
|
3624
|
-
if (
|
3625
|
-
const p = new
|
3626
|
-
switch (
|
3740
|
+
}, [$, C]), Re(() => {
|
3741
|
+
if (C !== null) {
|
3742
|
+
const p = new ua(), v = new me(), O = (se, z, J, oe) => {
|
3743
|
+
switch ($) {
|
3627
3744
|
case "Quad":
|
3628
|
-
|
3745
|
+
se < J ? z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, Le) : z < oe ? p.setFromCamera(v, le) : p.setFromCamera(v, Fe);
|
3629
3746
|
break;
|
3630
3747
|
case "Side by Side":
|
3631
|
-
|
3748
|
+
se < J ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
|
3632
3749
|
break;
|
3633
3750
|
case "Single":
|
3634
|
-
p.setFromCamera(
|
3751
|
+
p.setFromCamera(v, V);
|
3635
3752
|
break;
|
3636
3753
|
case "Stacked":
|
3637
|
-
|
3754
|
+
z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
|
3638
3755
|
break;
|
3639
3756
|
}
|
3640
|
-
},
|
3641
|
-
if (!
|
3757
|
+
}, A = (se) => {
|
3758
|
+
if (!xt)
|
3642
3759
|
return;
|
3643
|
-
const
|
3644
|
-
|
3645
|
-
const
|
3646
|
-
|
3647
|
-
const
|
3648
|
-
|
3649
|
-
},
|
3650
|
-
|
3760
|
+
const z = new me();
|
3761
|
+
C.getSize(z);
|
3762
|
+
const J = Math.min(se.clientX, z.x), oe = Math.min(se.clientY, z.y);
|
3763
|
+
v.x = et(J, 0, z.x, -1, 1), v.y = et(oe, 0, z.y, 1, -1);
|
3764
|
+
const k = z.x / 2, U = z.y / 2, re = () => {
|
3765
|
+
J < k ? v.x = et(J, 0, k, -1, 1) : v.x = et(J, k, z.x, -1, 1);
|
3766
|
+
}, we = () => {
|
3767
|
+
oe < U ? v.y = et(oe, 0, U, 1, -1) : v.y = et(oe, U, z.y, 1, -1);
|
3651
3768
|
};
|
3652
|
-
switch (
|
3769
|
+
switch ($) {
|
3653
3770
|
case "Quad":
|
3654
|
-
|
3771
|
+
re(), we();
|
3655
3772
|
break;
|
3656
3773
|
case "Side by Side":
|
3657
|
-
|
3774
|
+
re();
|
3658
3775
|
break;
|
3659
3776
|
case "Stacked":
|
3660
|
-
|
3777
|
+
we(), we();
|
3661
3778
|
break;
|
3662
3779
|
}
|
3663
|
-
|
3664
|
-
const
|
3665
|
-
|
3666
|
-
}, G = (
|
3667
|
-
if (!
|
3780
|
+
O(J, oe, k, U);
|
3781
|
+
const Te = p.intersectObjects(Ne.children);
|
3782
|
+
Te.length > 0 && d.position.copy(Te[0].point);
|
3783
|
+
}, G = (se) => {
|
3784
|
+
if (!xt)
|
3668
3785
|
return;
|
3669
|
-
const
|
3670
|
-
if (
|
3786
|
+
const z = new me();
|
3787
|
+
if (C.getSize(z), se.clientX >= z.x)
|
3671
3788
|
return;
|
3672
|
-
|
3673
|
-
const
|
3674
|
-
|
3675
|
-
},
|
3676
|
-
return
|
3677
|
-
|
3789
|
+
A(se);
|
3790
|
+
const J = p.intersectObjects(Ne.children);
|
3791
|
+
J.length > 0 && t.three.getObject(J[0].object.uuid);
|
3792
|
+
}, H = F.current;
|
3793
|
+
return H.addEventListener("mousemove", A, !1), H.addEventListener("click", G, !1), () => {
|
3794
|
+
H.removeEventListener("mousemove", A), H.removeEventListener("click", G);
|
3678
3795
|
};
|
3679
3796
|
}
|
3680
|
-
}, [
|
3681
|
-
const
|
3682
|
-
return n.forEach((p,
|
3683
|
-
|
3797
|
+
}, [$, C]);
|
3798
|
+
const pe = [];
|
3799
|
+
return n.forEach((p, v) => {
|
3800
|
+
pe.push(v);
|
3684
3801
|
}), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
|
3685
|
-
/* @__PURE__ */ l.jsx("canvas", { ref:
|
3686
|
-
|
3687
|
-
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${
|
3688
|
-
|
3689
|
-
a.get(
|
3690
|
-
const
|
3691
|
-
|
3802
|
+
/* @__PURE__ */ l.jsx("canvas", { ref: Y }),
|
3803
|
+
C !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3804
|
+
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref: F, children: [
|
3805
|
+
$ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
|
3806
|
+
a.get(V.name)?.dispose();
|
3807
|
+
const v = n.get(p);
|
3808
|
+
v !== void 0 && (ve(V), V = v, Z(v, M.current));
|
3692
3809
|
} }) }),
|
3693
|
-
(
|
3694
|
-
/* @__PURE__ */ l.jsx(He, { camera:
|
3695
|
-
a.get(
|
3696
|
-
const
|
3697
|
-
|
3810
|
+
($ === "Side by Side" || $ === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3811
|
+
/* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
|
3812
|
+
a.get(V.name)?.dispose();
|
3813
|
+
const v = n.get(p);
|
3814
|
+
v !== void 0 && (ve(V), V = v, Z(v, M.current));
|
3698
3815
|
} }),
|
3699
|
-
/* @__PURE__ */ l.jsx(He, { camera:
|
3700
|
-
a.get(
|
3701
|
-
const
|
3702
|
-
|
3816
|
+
/* @__PURE__ */ l.jsx(He, { camera: le, options: pe, ref: w, onSelect: (p) => {
|
3817
|
+
a.get(le.name)?.dispose();
|
3818
|
+
const v = n.get(p);
|
3819
|
+
v !== void 0 && (ve(le), le = v, Z(v, w.current));
|
3703
3820
|
} })
|
3704
3821
|
] }),
|
3705
|
-
|
3706
|
-
/* @__PURE__ */ l.jsx(He, { camera:
|
3707
|
-
a.get(
|
3708
|
-
const
|
3709
|
-
|
3710
|
-
} }),
|
3711
|
-
/* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
|
3712
|
-
a.get(se.name)?.dispose();
|
3713
|
-
const m = n.get(p);
|
3714
|
-
m !== void 0 && (pe(se), se = m, K(m, z.current));
|
3822
|
+
$ === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3823
|
+
/* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
|
3824
|
+
a.get(V.name)?.dispose();
|
3825
|
+
const v = n.get(p);
|
3826
|
+
v !== void 0 && (ve(V), V = v, Z(v, M.current));
|
3715
3827
|
} }),
|
3716
|
-
/* @__PURE__ */ l.jsx(He, { camera:
|
3717
|
-
a.get(
|
3718
|
-
const
|
3719
|
-
|
3828
|
+
/* @__PURE__ */ l.jsx(He, { camera: le, options: pe, ref: w, onSelect: (p) => {
|
3829
|
+
a.get(le.name)?.dispose();
|
3830
|
+
const v = n.get(p);
|
3831
|
+
v !== void 0 && (ve(le), le = v, Z(v, w.current));
|
3720
3832
|
} }),
|
3721
|
-
/* @__PURE__ */ l.jsx(He, { camera: Le, options:
|
3833
|
+
/* @__PURE__ */ l.jsx(He, { camera: Le, options: pe, ref: ae, onSelect: (p) => {
|
3722
3834
|
a.get(Le.name)?.dispose();
|
3723
|
-
const
|
3724
|
-
|
3835
|
+
const v = n.get(p);
|
3836
|
+
v !== void 0 && (ve(Le), Le = v, Z(v, ae.current));
|
3837
|
+
} }),
|
3838
|
+
/* @__PURE__ */ l.jsx(He, { camera: Fe, options: pe, ref: X, onSelect: (p) => {
|
3839
|
+
a.get(Fe.name)?.dispose();
|
3840
|
+
const v = n.get(p);
|
3841
|
+
v !== void 0 && (ve(Fe), Fe = v, Z(v, X.current));
|
3725
3842
|
} })
|
3726
3843
|
] })
|
3727
3844
|
] }),
|
3728
3845
|
/* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
|
3729
3846
|
/* @__PURE__ */ l.jsx(
|
3730
|
-
|
3847
|
+
Ct,
|
3731
3848
|
{
|
3732
|
-
index:
|
3733
|
-
options:
|
3849
|
+
index: P.indexOf($),
|
3850
|
+
options: P,
|
3734
3851
|
onSelect: (p) => {
|
3735
|
-
p !==
|
3852
|
+
p !== $ && (Ae(), W(p));
|
3736
3853
|
},
|
3737
|
-
open:
|
3854
|
+
open: Be,
|
3738
3855
|
onToggle: (p) => {
|
3739
|
-
|
3856
|
+
Me(p), ge && ie(!1), fe && be(!1);
|
3740
3857
|
}
|
3741
3858
|
}
|
3742
3859
|
),
|
3743
3860
|
/* @__PURE__ */ l.jsx(
|
3744
|
-
|
3861
|
+
Ct,
|
3745
3862
|
{
|
3746
|
-
index:
|
3747
|
-
options:
|
3863
|
+
index: R.indexOf(Et),
|
3864
|
+
options: R,
|
3748
3865
|
onSelect: (p) => {
|
3749
|
-
if (p !==
|
3750
|
-
switch (
|
3866
|
+
if (p !== Et)
|
3867
|
+
switch (Et = p, Et) {
|
3751
3868
|
case "Depth":
|
3752
3869
|
i.overrideMaterial = u;
|
3753
3870
|
break;
|
3754
3871
|
case "Normals":
|
3755
|
-
i.overrideMaterial =
|
3872
|
+
i.overrideMaterial = m;
|
3756
3873
|
break;
|
3757
3874
|
default:
|
3758
3875
|
case "Renderer":
|
@@ -3766,14 +3883,14 @@ function bi(t) {
|
|
3766
3883
|
break;
|
3767
3884
|
}
|
3768
3885
|
},
|
3769
|
-
open:
|
3886
|
+
open: ge,
|
3770
3887
|
onToggle: (p) => {
|
3771
|
-
|
3888
|
+
Be && Me(!1), ie(p), fe && be(!1);
|
3772
3889
|
}
|
3773
3890
|
}
|
3774
3891
|
),
|
3775
3892
|
/* @__PURE__ */ l.jsx(
|
3776
|
-
|
3893
|
+
Ct,
|
3777
3894
|
{
|
3778
3895
|
index: 0,
|
3779
3896
|
options: [
|
@@ -3781,11 +3898,11 @@ function bi(t) {
|
|
3781
3898
|
"Selection Mode"
|
3782
3899
|
],
|
3783
3900
|
onSelect: (p) => {
|
3784
|
-
|
3901
|
+
xt = p === "Selection Mode", d.visible = xt;
|
3785
3902
|
},
|
3786
|
-
open:
|
3903
|
+
open: fe,
|
3787
3904
|
onToggle: (p) => {
|
3788
|
-
|
3905
|
+
Be && Me(!1), ge && ie(!1), be(p);
|
3789
3906
|
}
|
3790
3907
|
}
|
3791
3908
|
)
|
@@ -3793,7 +3910,7 @@ function bi(t) {
|
|
3793
3910
|
] })
|
3794
3911
|
] });
|
3795
3912
|
}
|
3796
|
-
function
|
3913
|
+
function Ci(t) {
|
3797
3914
|
return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3798
3915
|
/* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
|
3799
3916
|
t.children,
|
@@ -3801,42 +3918,44 @@ function yi(t) {
|
|
3801
3918
|
] });
|
3802
3919
|
}
|
3803
3920
|
export {
|
3804
|
-
|
3805
|
-
|
3806
|
-
|
3807
|
-
|
3808
|
-
|
3809
|
-
|
3810
|
-
|
3811
|
-
|
3812
|
-
|
3813
|
-
|
3814
|
-
|
3815
|
-
|
3816
|
-
|
3817
|
-
|
3818
|
-
|
3819
|
-
|
3820
|
-
|
3821
|
-
|
3822
|
-
|
3823
|
-
|
3824
|
-
|
3825
|
-
|
3826
|
-
|
3827
|
-
|
3828
|
-
|
3829
|
-
|
3830
|
-
|
3831
|
-
|
3832
|
-
|
3833
|
-
|
3834
|
-
|
3835
|
-
|
3836
|
-
|
3837
|
-
|
3838
|
-
|
3839
|
-
|
3840
|
-
|
3841
|
-
|
3921
|
+
Ft as Accordion,
|
3922
|
+
fi as Application,
|
3923
|
+
wt as BaseRemote,
|
3924
|
+
_n as ChildObject,
|
3925
|
+
ka as ContainerObject,
|
3926
|
+
_a as Draggable,
|
3927
|
+
Ra as DraggableItem,
|
3928
|
+
Pa as Dropdown,
|
3929
|
+
Aa as DropdownItem,
|
3930
|
+
Ci as Editor,
|
3931
|
+
Ja as Inspector,
|
3932
|
+
xi as MultiView,
|
3933
|
+
Rn as NavButton,
|
3934
|
+
pi as RemoteComponents,
|
3935
|
+
bi as RemoteController,
|
3936
|
+
Lt as RemoteTheatre,
|
3937
|
+
vi as RemoteThree,
|
3938
|
+
gi as RemoteTweakpane,
|
3939
|
+
Ei as SceneInspector,
|
3940
|
+
yi as SidePanel,
|
3941
|
+
I as ToolEvents,
|
3942
|
+
dt as capitalize,
|
3943
|
+
Je as clamp,
|
3944
|
+
ga as colorToHex,
|
3945
|
+
D as debugDispatcher,
|
3946
|
+
ui as defaultTheatreCallback,
|
3947
|
+
Mn as dispose,
|
3948
|
+
ya as disposeMaterial,
|
3949
|
+
hi as disposeTexture,
|
3950
|
+
di as distance,
|
3951
|
+
On as hierarchyUUID,
|
3952
|
+
va as isColor,
|
3953
|
+
Wt as mix,
|
3954
|
+
wn as noop,
|
3955
|
+
Ht as normalize,
|
3956
|
+
ma as randomID,
|
3957
|
+
ba as resetThreeObjects,
|
3958
|
+
ut as round,
|
3959
|
+
mi as theatreEditorApp,
|
3960
|
+
Dt as totalThreeObjects
|
3842
3961
|
};
|