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