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