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