@tomorrowevening/hermes 0.0.19 → 0.0.21
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 +561 -558
- package/dist/hermes.umd.cjs +15 -15
- package/package.json +1 -1
- package/src/core/remote/RemoteTheatre.ts +15 -4
- package/src/editor/Editor.tsx +1 -1
- package/src/editor/components/Draggable.tsx +1 -1
- package/src/editor/components/DraggableItem.tsx +1 -1
- package/src/editor/components/NavButton.tsx +1 -1
- package/src/editor/components/icons/CloseIcon.tsx +4 -4
- package/src/editor/components/icons/DragIcon.tsx +3 -3
- package/src/editor/multiView/CameraWindow.tsx +2 -2
- package/src/editor/multiView/UVMaterial.ts +1 -1
- package/src/editor/sidePanel/Accordion.tsx +3 -3
- package/src/editor/sidePanel/ChildObject.tsx +5 -5
- package/src/editor/sidePanel/SidePanel.tsx +1 -1
- package/src/editor/sidePanel/ToggleBtn.tsx +1 -1
- package/src/editor/sidePanel/inspector/Inspector.tsx +23 -23
- package/src/editor/sidePanel/inspector/InspectorField.tsx +12 -12
- package/src/editor/sidePanel/inspector/SceneInspector.tsx +5 -5
- package/src/editor/sidePanel/inspector/inspector.scss +5 -5
- package/src/editor/sidePanel/inspector/utils/InspectAnimation.tsx +4 -4
- package/src/editor/sidePanel/inspector/utils/InspectCamera.tsx +1 -1
- package/src/editor/sidePanel/inspector/utils/InspectLight.tsx +1 -1
- package/src/editor/sidePanel/inspector/utils/InspectMaterial.tsx +2 -2
- package/src/editor/sidePanel/inspector/utils/InspectTransform.tsx +2 -2
- package/src/editor/utils.ts +1 -1
- package/types/core/remote/RemoteTheatre.d.ts +4 -2
- package/types/editor/multiView/UVMaterial.d.ts +1 -1
- package/types/editor/sidePanel/inspector/Inspector.d.ts +1 -1
- package/types/editor/sidePanel/inspector/SceneInspector.d.ts +1 -1
- package/types/editor/sidePanel/inspector/utils/InspectAnimation.d.ts +1 -1
- package/types/editor/sidePanel/inspector/utils/InspectMaterial.d.ts +1 -1
- package/types/editor/sidePanel/inspector/utils/InspectTransform.d.ts +1 -1
- package/types/editor/utils.d.ts +1 -1
package/dist/hermes.js
CHANGED
@@ -1,70 +1,70 @@
|
|
1
1
|
var _n = Object.defineProperty;
|
2
|
-
var
|
3
|
-
var
|
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
|
2
|
+
var kn = (t, n, a) => n in t ? _n(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
|
3
|
+
var H = (t, n, a) => (kn(t, typeof n != "symbol" ? n + "" : n, a), a);
|
4
|
+
import { PositionalAudio as Dn, EventDispatcher as cn, Texture as ln, CubeTexture as An, RepeatWrapping as Wt, ShaderMaterial as un, GLSL3 as In, DoubleSide as Nn, Color as Bt, Mesh as Ln, PlaneGeometry as Fn, Matrix4 as Un, Vector3 as Y, Euler as Bn, Ray as $n, Plane as Gn, MathUtils as Vn, MOUSE as We, TOUCH as He, Quaternion as Ht, Spherical as Kt, Vector2 as de, PerspectiveCamera as Nt, MeshDepthMaterial as zn, MeshNormalMaterial as Yn, MeshBasicMaterial as Wn, OrthographicCamera as dn, Scene as fn, Group as Hn, AxesHelper as hn, WebGLRenderer as Kn, Raycaster as Xn, CameraHelper as qn } from "three";
|
5
|
+
import { getProject as Zn, createRafDriver as Jn } from "@theatre/core";
|
6
|
+
import st from "@theatre/studio";
|
7
|
+
import { Pane as Qn } from "tweakpane";
|
8
|
+
import * as ea from "@tweakpane/plugin-essentials";
|
9
|
+
import pn, { useState as oe, useRef as Ce, useEffect as Fe, Component as ta, forwardRef as na } from "react";
|
10
|
+
import { Reorder as mn } from "framer-motion";
|
11
|
+
function li(t, n, a) {
|
12
12
|
return Math.min(n, Math.max(t, a));
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function ui(t, n) {
|
15
15
|
const a = t - n;
|
16
16
|
return Math.sqrt(a * a);
|
17
17
|
}
|
18
|
-
function
|
18
|
+
function aa() {
|
19
19
|
return Math.round(Math.random() * 1e6).toString();
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function ia(t) {
|
22
22
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
23
23
|
}
|
24
|
-
function
|
24
|
+
function ra(t) {
|
25
25
|
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), r = (d) => {
|
26
26
|
const p = d.toString(16);
|
27
27
|
return p.length === 1 ? "0" + p : p;
|
28
28
|
}, s = r(n), u = r(a), l = r(e);
|
29
29
|
return "#" + s + u + l;
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function kt(t, n = 1) {
|
32
32
|
return Number(t.toFixed(n));
|
33
33
|
}
|
34
|
-
let
|
35
|
-
const
|
36
|
-
|
37
|
-
},
|
34
|
+
let Lt = 0;
|
35
|
+
const oa = () => {
|
36
|
+
Lt = 0;
|
37
|
+
}, gn = (t) => {
|
38
38
|
if (!t)
|
39
39
|
return;
|
40
40
|
let n = t.name.replace(" ", "");
|
41
|
-
n.length === 0 && (n = `obj_${
|
42
|
-
|
41
|
+
n.length === 0 && (n = `obj_${Lt}`, Lt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
42
|
+
gn(a);
|
43
43
|
});
|
44
|
-
},
|
44
|
+
}, di = (t) => {
|
45
45
|
t == null || t.dispose();
|
46
|
-
},
|
46
|
+
}, sa = (t) => {
|
47
47
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
48
|
-
},
|
48
|
+
}, vn = (t) => {
|
49
49
|
var n;
|
50
50
|
if (t) {
|
51
51
|
for (; t.children.length > 0; ) {
|
52
52
|
const a = t.children[0];
|
53
|
-
a instanceof
|
53
|
+
a instanceof Dn ? (a.pause(), a.parent && a.parent.remove(a)) : vn(a);
|
54
54
|
}
|
55
55
|
if (t.parent && t.parent.remove(t), t.isMesh) {
|
56
56
|
const a = t;
|
57
|
-
(n = a.geometry) == null || n.dispose(),
|
57
|
+
(n = a.geometry) == null || n.dispose(), sa(a.material);
|
58
58
|
}
|
59
59
|
t.dispose !== void 0 && t.dispose();
|
60
60
|
}
|
61
61
|
};
|
62
|
-
class
|
62
|
+
class fi {
|
63
63
|
constructor(n, a, e = "editor") {
|
64
|
-
|
65
|
-
|
64
|
+
H(this, "channel");
|
65
|
+
H(this, "components", /* @__PURE__ */ new Map());
|
66
66
|
// Protected
|
67
|
-
|
67
|
+
H(this, "_mode", "app");
|
68
68
|
this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
|
69
69
|
}
|
70
70
|
addComponent(n, a) {
|
@@ -98,7 +98,7 @@ class ui {
|
|
98
98
|
n && (this._mode = "editor", document.title += " - Editor");
|
99
99
|
}
|
100
100
|
}
|
101
|
-
const
|
101
|
+
const j = new cn(), _ = {
|
102
102
|
CUSTOM: "ToolEvents::custom",
|
103
103
|
// Components
|
104
104
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -114,15 +114,15 @@ const _ = new sn(), j = {
|
|
114
114
|
ADD_CAMERA: "ToolEvents::addCamera",
|
115
115
|
REMOVE_CAMERA: "ToolEvents::removeCamera"
|
116
116
|
};
|
117
|
-
class
|
117
|
+
class Ot {
|
118
118
|
constructor(n) {
|
119
|
-
|
119
|
+
H(this, "app");
|
120
120
|
this.app = n;
|
121
121
|
}
|
122
122
|
dispose() {
|
123
123
|
}
|
124
124
|
}
|
125
|
-
class
|
125
|
+
class ca extends Ot {
|
126
126
|
selectDropdown(n, a) {
|
127
127
|
this.app.send({
|
128
128
|
event: "selectComponent",
|
@@ -144,29 +144,28 @@ class oa extends Ct {
|
|
144
144
|
});
|
145
145
|
}
|
146
146
|
}
|
147
|
-
function
|
147
|
+
function la(t, n) {
|
148
148
|
switch (n.event) {
|
149
149
|
case "selectComponent":
|
150
|
-
|
150
|
+
j.dispatchEvent({ type: _.SELECT_DROPDOWN, value: n.data });
|
151
151
|
break;
|
152
152
|
case "draggableListUpdate":
|
153
|
-
|
153
|
+
j.dispatchEvent({ type: _.DRAG_UPDATE, value: n.data });
|
154
154
|
break;
|
155
155
|
}
|
156
156
|
}
|
157
|
-
const
|
158
|
-
}
|
159
|
-
class Ut extends Ct {
|
157
|
+
const bn = () => {
|
158
|
+
}, Xe = class Xe extends Ot {
|
160
159
|
constructor() {
|
161
160
|
super(...arguments);
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
161
|
+
H(this, "project");
|
162
|
+
H(this, "sheets", /* @__PURE__ */ new Map());
|
163
|
+
H(this, "sheetObjects", /* @__PURE__ */ new Map());
|
164
|
+
H(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
|
165
|
+
H(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
|
167
166
|
}
|
168
167
|
init(a, e) {
|
169
|
-
this.project =
|
168
|
+
return this.project = Zn(a, e), this.project.ready;
|
170
169
|
}
|
171
170
|
dispose() {
|
172
171
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
@@ -195,12 +194,12 @@ class Ut extends Ct {
|
|
195
194
|
return;
|
196
195
|
const l = `${a}_${e}`;
|
197
196
|
let d = this.sheetObjects.get(l);
|
198
|
-
d !== void 0 ? d = u.object(e, { ...r, ...d.value }, { reconfigure: !0 }) : d = u.object(e, r), this.sheetObjects.set(l, d), this.sheetObjectCBs.set(l, s !== void 0 ? s :
|
197
|
+
d !== void 0 ? d = u.object(e, { ...r, ...d.value }, { reconfigure: !0 }) : d = u.object(e, r), this.sheetObjects.set(l, d), this.sheetObjectCBs.set(l, s !== void 0 ? s : bn);
|
199
198
|
const p = d.onValuesChange((v) => {
|
200
199
|
if (this.app.editor) {
|
201
200
|
for (const x in v) {
|
202
201
|
const C = v[x];
|
203
|
-
typeof C == "object" &&
|
202
|
+
typeof C == "object" && ia(C) && (v[x] = {
|
204
203
|
r: C.r,
|
205
204
|
g: C.g,
|
206
205
|
b: C.b,
|
@@ -231,19 +230,23 @@ class Ut extends Ct {
|
|
231
230
|
const u = `${e}_${r}`, l = this.sheetObjectUnsubscribe.get(u);
|
232
231
|
l !== void 0 && (this.sheetObjects.delete(u), this.sheetObjectCBs.delete(u), this.sheetObjectUnsubscribe.delete(u), l());
|
233
232
|
}
|
234
|
-
|
235
|
-
|
236
|
-
|
233
|
+
static getRafDriver() {
|
234
|
+
return Xe.rafDriver || (Xe.rafDriver = Jn()), Xe.rafDriver;
|
235
|
+
}
|
236
|
+
};
|
237
|
+
H(Xe, "rafDriver", null);
|
238
|
+
let qe = Xe, Me;
|
239
|
+
function ua(t, n) {
|
237
240
|
t.components.forEach((a) => {
|
238
|
-
if (a instanceof
|
241
|
+
if (a instanceof qe) {
|
239
242
|
let e;
|
240
243
|
const r = a;
|
241
244
|
switch (n.event) {
|
242
245
|
case "setSheet":
|
243
|
-
e = r.sheets.get(n.data.sheet), e !== void 0 && (Me = e,
|
246
|
+
e = r.sheets.get(n.data.sheet), e !== void 0 && (Me = e, st.setSelection([e]));
|
244
247
|
break;
|
245
248
|
case "setSheetObject":
|
246
|
-
e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 &&
|
249
|
+
e = r.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), e !== void 0 && st.setSelection([e]);
|
247
250
|
break;
|
248
251
|
case "updateSheetObject":
|
249
252
|
e = r.sheetObjectCBs.get(n.data.sheetObject), e !== void 0 && e(n.data.values);
|
@@ -255,12 +258,12 @@ function ca(t, n) {
|
|
255
258
|
}
|
256
259
|
});
|
257
260
|
}
|
258
|
-
function
|
261
|
+
function da(t) {
|
259
262
|
if (t.editor) {
|
260
263
|
let n;
|
261
264
|
t.components.forEach((s) => {
|
262
|
-
s instanceof
|
263
|
-
}),
|
265
|
+
s instanceof qe && (n = s);
|
266
|
+
}), st.ui.restore(), st.onSelectionChange((s) => {
|
264
267
|
s.length < 1 || s.forEach((u) => {
|
265
268
|
let l = u.address.sheetId, d = "setSheet", p = {};
|
266
269
|
switch (u.type) {
|
@@ -282,7 +285,7 @@ function la(t) {
|
|
282
285
|
});
|
283
286
|
let a = 0;
|
284
287
|
const e = () => {
|
285
|
-
if (Me !== void 0 && a !== Me.sequence.position) {
|
288
|
+
if (qe.getRafDriver().tick(performance.now()), Me !== void 0 && a !== Me.sequence.position) {
|
286
289
|
a = Me.sequence.position;
|
287
290
|
const s = Me;
|
288
291
|
t.send({
|
@@ -299,9 +302,9 @@ function la(t) {
|
|
299
302
|
};
|
300
303
|
e(), r();
|
301
304
|
} else
|
302
|
-
|
305
|
+
st.ui.hide();
|
303
306
|
}
|
304
|
-
function
|
307
|
+
function fa(t) {
|
305
308
|
if (t.name === "cameras")
|
306
309
|
return "camera";
|
307
310
|
if (t.name === "interactive")
|
@@ -315,7 +318,7 @@ function ua(t) {
|
|
315
318
|
const n = t.type;
|
316
319
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
317
320
|
}
|
318
|
-
function
|
321
|
+
function yn(t) {
|
319
322
|
const n = {
|
320
323
|
name: t.name,
|
321
324
|
type: t.type,
|
@@ -323,10 +326,10 @@ function bn(t) {
|
|
323
326
|
children: []
|
324
327
|
};
|
325
328
|
return t.children.forEach((a) => {
|
326
|
-
n.children.push(
|
329
|
+
n.children.push(yn(a));
|
327
330
|
}), n;
|
328
331
|
}
|
329
|
-
function
|
332
|
+
function ha(t) {
|
330
333
|
const n = {};
|
331
334
|
for (const a in t) {
|
332
335
|
const e = t[a].value;
|
@@ -334,7 +337,7 @@ function da(t) {
|
|
334
337
|
}
|
335
338
|
return n;
|
336
339
|
}
|
337
|
-
function
|
340
|
+
function pa(t) {
|
338
341
|
switch (t) {
|
339
342
|
case "blendSrcAlpha":
|
340
343
|
case "blendDstAlpha":
|
@@ -346,10 +349,10 @@ function fa(t) {
|
|
346
349
|
}
|
347
350
|
return !1;
|
348
351
|
}
|
349
|
-
function
|
352
|
+
function Xt(t) {
|
350
353
|
const n = {};
|
351
354
|
for (const a in t) {
|
352
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
355
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || pa(a))
|
353
356
|
continue;
|
354
357
|
const e = typeof t[a], r = t[a];
|
355
358
|
switch (e) {
|
@@ -361,13 +364,13 @@ function Kt(t) {
|
|
361
364
|
case "object":
|
362
365
|
if (r !== null)
|
363
366
|
if (n[a] = r, r.isTexture)
|
364
|
-
if (r instanceof
|
367
|
+
if (r instanceof ln) {
|
365
368
|
const s = r.source.toJSON();
|
366
369
|
n[a] = { src: s.url };
|
367
370
|
} else
|
368
371
|
r instanceof An && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
|
369
372
|
else
|
370
|
-
a === "uniforms" && (n[a] =
|
373
|
+
a === "uniforms" && (n[a] = ha(n[a]));
|
371
374
|
else
|
372
375
|
n[a] = { src: "" };
|
373
376
|
break;
|
@@ -375,7 +378,7 @@ function Kt(t) {
|
|
375
378
|
}
|
376
379
|
return n;
|
377
380
|
}
|
378
|
-
function
|
381
|
+
function Dt(t) {
|
379
382
|
t.updateMatrix();
|
380
383
|
const n = {
|
381
384
|
name: t.name,
|
@@ -402,10 +405,10 @@ function jt(t) {
|
|
402
405
|
if (Array.isArray(e.material)) {
|
403
406
|
const r = [];
|
404
407
|
e.material.forEach((s) => {
|
405
|
-
r.push(
|
408
|
+
r.push(Xt(s));
|
406
409
|
}), n.material = r;
|
407
410
|
} else
|
408
|
-
n.material =
|
411
|
+
n.material = Xt(e.material);
|
409
412
|
} else
|
410
413
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
411
414
|
fov: t.fov,
|
@@ -455,19 +458,19 @@ function Q(t, n, a) {
|
|
455
458
|
break;
|
456
459
|
}
|
457
460
|
}
|
458
|
-
function
|
461
|
+
function Ft(t) {
|
459
462
|
return new Promise((n, a) => {
|
460
463
|
const e = new Image();
|
461
464
|
e.onload = () => {
|
462
|
-
const r = new
|
463
|
-
r.wrapS =
|
465
|
+
const r = new ln(e);
|
466
|
+
r.wrapS = Wt, r.wrapT = Wt, r.needsUpdate = !0, n(r);
|
464
467
|
}, e.onerror = a, e.src = t;
|
465
468
|
});
|
466
469
|
}
|
467
|
-
class
|
470
|
+
class ma extends Ot {
|
468
471
|
constructor() {
|
469
472
|
super(...arguments);
|
470
|
-
|
473
|
+
H(this, "scene");
|
471
474
|
}
|
472
475
|
getObject(a) {
|
473
476
|
this.app.send({
|
@@ -477,7 +480,7 @@ class ha extends Ct {
|
|
477
480
|
});
|
478
481
|
}
|
479
482
|
setObject(a) {
|
480
|
-
const e =
|
483
|
+
const e = Dt(a);
|
481
484
|
this.app.send({
|
482
485
|
event: "setObject",
|
483
486
|
target: "editor",
|
@@ -520,8 +523,8 @@ class ha extends Ct {
|
|
520
523
|
setScene(a) {
|
521
524
|
if (a === void 0)
|
522
525
|
return;
|
523
|
-
this.scene = a,
|
524
|
-
const e =
|
526
|
+
this.scene = a, oa(), gn(this.scene);
|
527
|
+
const e = yn(this.scene);
|
525
528
|
this.app.send({
|
526
529
|
event: "setScene",
|
527
530
|
target: "editor",
|
@@ -529,7 +532,7 @@ class ha extends Ct {
|
|
529
532
|
});
|
530
533
|
}
|
531
534
|
addCamera(a) {
|
532
|
-
const e =
|
535
|
+
const e = Dt(a);
|
533
536
|
this.app.send({
|
534
537
|
event: "addCamera",
|
535
538
|
target: "editor",
|
@@ -537,7 +540,7 @@ class ha extends Ct {
|
|
537
540
|
});
|
538
541
|
}
|
539
542
|
removeCamera(a) {
|
540
|
-
const e =
|
543
|
+
const e = Dt(a);
|
541
544
|
this.app.send({
|
542
545
|
event: "removeCamera",
|
543
546
|
target: "editor",
|
@@ -545,51 +548,51 @@ class ha extends Ct {
|
|
545
548
|
});
|
546
549
|
}
|
547
550
|
}
|
548
|
-
function
|
551
|
+
function ga(t, n) {
|
549
552
|
switch (n.event) {
|
550
553
|
case "getObject":
|
551
|
-
|
554
|
+
j.dispatchEvent({ type: _.GET_OBJECT, value: n.data });
|
552
555
|
break;
|
553
556
|
case "updateObject":
|
554
|
-
|
557
|
+
j.dispatchEvent({ type: _.UPDATE_OBJECT, value: n.data });
|
555
558
|
break;
|
556
559
|
case "createTexture":
|
557
|
-
|
560
|
+
j.dispatchEvent({ type: _.CREATE_TEXTURE, value: n.data });
|
558
561
|
break;
|
559
562
|
case "requestMethod":
|
560
|
-
|
563
|
+
j.dispatchEvent({ type: _.REQUEST_METHOD, value: n.data });
|
561
564
|
break;
|
562
565
|
}
|
563
566
|
}
|
564
|
-
function
|
567
|
+
function va(t, n) {
|
565
568
|
switch (n.event) {
|
566
569
|
case "setObject":
|
567
|
-
|
570
|
+
j.dispatchEvent({ type: _.SET_OBJECT, value: n.data });
|
568
571
|
break;
|
569
572
|
case "setScene":
|
570
|
-
|
573
|
+
j.dispatchEvent({ type: _.SET_SCENE, value: n.data });
|
571
574
|
break;
|
572
575
|
case "addCamera":
|
573
|
-
|
576
|
+
j.dispatchEvent({ type: _.ADD_CAMERA, value: n.data });
|
574
577
|
break;
|
575
578
|
case "removeCamera":
|
576
|
-
|
579
|
+
j.dispatchEvent({ type: _.REMOVE_CAMERA, value: n.data });
|
577
580
|
break;
|
578
581
|
}
|
579
582
|
}
|
580
|
-
class
|
583
|
+
class En extends Ot {
|
581
584
|
constructor(a) {
|
582
585
|
super(a);
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
586
|
+
H(this, "bindCBs");
|
587
|
+
H(this, "buttonCBs");
|
588
|
+
H(this, "pane");
|
589
|
+
H(this, "appCallbacks", 0);
|
590
|
+
H(this, "editorCallbacks", 0);
|
591
|
+
H(this, "inspectorFolder");
|
589
592
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
|
590
593
|
}
|
591
594
|
createGUI() {
|
592
|
-
this.pane = new
|
595
|
+
this.pane = new Qn({ title: "GUI" }), this.pane.registerPlugin(ea);
|
593
596
|
}
|
594
597
|
dispose() {
|
595
598
|
var a;
|
@@ -616,7 +619,7 @@ class yn extends Ct {
|
|
616
619
|
}
|
617
620
|
// Binding
|
618
621
|
bind(a, e, r, s = void 0) {
|
619
|
-
const u = this.bindID, l = r.onChange !== void 0 ? r.onChange :
|
622
|
+
const u = this.bindID, l = r.onChange !== void 0 ? r.onChange : bn;
|
620
623
|
this.bindCBs.set(u, l), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (p) => {
|
621
624
|
this.app.send({
|
622
625
|
event: "updateBind",
|
@@ -677,9 +680,9 @@ class yn extends Ct {
|
|
677
680
|
this.inspectorFolder.remove(this.inspectorFolder.children[e]);
|
678
681
|
}
|
679
682
|
}
|
680
|
-
function
|
683
|
+
function ba(t, n) {
|
681
684
|
t.components.forEach((a) => {
|
682
|
-
if (a instanceof
|
685
|
+
if (a instanceof En) {
|
683
686
|
const e = a;
|
684
687
|
switch (n.event) {
|
685
688
|
case "addFolder":
|
@@ -702,7 +705,7 @@ function ga(t, n) {
|
|
702
705
|
}
|
703
706
|
});
|
704
707
|
}
|
705
|
-
var
|
708
|
+
var Ut = { exports: {} }, it = {};
|
706
709
|
/**
|
707
710
|
* @license React
|
708
711
|
* react-jsx-runtime.production.min.js
|
@@ -712,12 +715,12 @@ var Lt = { exports: {} }, nt = {};
|
|
712
715
|
* This source code is licensed under the MIT license found in the
|
713
716
|
* LICENSE file in the root directory of this source tree.
|
714
717
|
*/
|
715
|
-
var
|
716
|
-
function
|
717
|
-
if (
|
718
|
-
return
|
719
|
-
|
720
|
-
var t =
|
718
|
+
var qt;
|
719
|
+
function ya() {
|
720
|
+
if (qt)
|
721
|
+
return it;
|
722
|
+
qt = 1;
|
723
|
+
var t = pn, 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 };
|
721
724
|
function u(l, d, p) {
|
722
725
|
var v, E = {}, x = null, C = null;
|
723
726
|
p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (C = d.ref);
|
@@ -728,9 +731,9 @@ function va() {
|
|
728
731
|
E[v] === void 0 && (E[v] = d[v]);
|
729
732
|
return { $$typeof: n, type: l, key: x, ref: C, props: E, _owner: r.current };
|
730
733
|
}
|
731
|
-
return
|
734
|
+
return it.Fragment = a, it.jsx = u, it.jsxs = u, it;
|
732
735
|
}
|
733
|
-
var
|
736
|
+
var rt = {};
|
734
737
|
/**
|
735
738
|
* @license React
|
736
739
|
* react-jsx-runtime.development.js
|
@@ -740,27 +743,27 @@ var at = {};
|
|
740
743
|
* This source code is licensed under the MIT license found in the
|
741
744
|
* LICENSE file in the root directory of this source tree.
|
742
745
|
*/
|
743
|
-
var
|
744
|
-
function
|
745
|
-
return
|
746
|
-
var t =
|
746
|
+
var Zt;
|
747
|
+
function Ea() {
|
748
|
+
return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
|
749
|
+
var t = pn, 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"), u = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), M = Symbol.iterator, G = "@@iterator";
|
747
750
|
function se(i) {
|
748
751
|
if (i === null || typeof i != "object")
|
749
752
|
return null;
|
750
753
|
var h = M && i[M] || i[G];
|
751
754
|
return typeof h == "function" ? h : null;
|
752
755
|
}
|
753
|
-
var
|
756
|
+
var K = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
754
757
|
function S(i) {
|
755
758
|
{
|
756
759
|
for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
757
760
|
g[w - 1] = arguments[w];
|
758
|
-
|
761
|
+
X("error", i, g);
|
759
762
|
}
|
760
763
|
}
|
761
|
-
function
|
764
|
+
function X(i, h, g) {
|
762
765
|
{
|
763
|
-
var w =
|
766
|
+
var w = K.ReactDebugCurrentFrame, k = w.getStackAddendum();
|
764
767
|
k !== "" && (h += "%s", g = g.concat([k]));
|
765
768
|
var L = g.map(function(P) {
|
766
769
|
return String(P);
|
@@ -832,18 +835,18 @@ function ba() {
|
|
832
835
|
}
|
833
836
|
return null;
|
834
837
|
}
|
835
|
-
var
|
836
|
-
function
|
838
|
+
var A = Object.assign, U = 0, J, R, I, q, me, Re, Ze;
|
839
|
+
function ut() {
|
837
840
|
}
|
838
|
-
|
839
|
-
function
|
841
|
+
ut.__reactDisabledLog = !0;
|
842
|
+
function Mt() {
|
840
843
|
{
|
841
844
|
if (U === 0) {
|
842
|
-
J = console.log, R = console.info, I = console.warn,
|
845
|
+
J = console.log, R = console.info, I = console.warn, q = console.error, me = console.group, Re = console.groupCollapsed, Ze = console.groupEnd;
|
843
846
|
var i = {
|
844
847
|
configurable: !0,
|
845
848
|
enumerable: !0,
|
846
|
-
value:
|
849
|
+
value: ut,
|
847
850
|
writable: !0
|
848
851
|
};
|
849
852
|
Object.defineProperties(console, {
|
@@ -859,7 +862,7 @@ function ba() {
|
|
859
862
|
U++;
|
860
863
|
}
|
861
864
|
}
|
862
|
-
function
|
865
|
+
function Rt() {
|
863
866
|
{
|
864
867
|
if (U--, U === 0) {
|
865
868
|
var i = {
|
@@ -868,56 +871,56 @@ function ba() {
|
|
868
871
|
writable: !0
|
869
872
|
};
|
870
873
|
Object.defineProperties(console, {
|
871
|
-
log:
|
874
|
+
log: A({}, i, {
|
872
875
|
value: J
|
873
876
|
}),
|
874
|
-
info:
|
877
|
+
info: A({}, i, {
|
875
878
|
value: R
|
876
879
|
}),
|
877
|
-
warn:
|
880
|
+
warn: A({}, i, {
|
878
881
|
value: I
|
879
882
|
}),
|
880
|
-
error:
|
881
|
-
value:
|
883
|
+
error: A({}, i, {
|
884
|
+
value: q
|
882
885
|
}),
|
883
|
-
group:
|
886
|
+
group: A({}, i, {
|
884
887
|
value: me
|
885
888
|
}),
|
886
|
-
groupCollapsed:
|
889
|
+
groupCollapsed: A({}, i, {
|
887
890
|
value: Re
|
888
891
|
}),
|
889
|
-
groupEnd:
|
890
|
-
value:
|
892
|
+
groupEnd: A({}, i, {
|
893
|
+
value: Ze
|
891
894
|
})
|
892
895
|
});
|
893
896
|
}
|
894
897
|
U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
895
898
|
}
|
896
899
|
}
|
897
|
-
var
|
900
|
+
var Je = K.ReactCurrentDispatcher, Qe;
|
898
901
|
function Pe(i, h, g) {
|
899
902
|
{
|
900
|
-
if (
|
903
|
+
if (Qe === void 0)
|
901
904
|
try {
|
902
905
|
throw Error();
|
903
906
|
} catch (k) {
|
904
907
|
var w = k.stack.trim().match(/\n( *(at )?)/);
|
905
|
-
|
908
|
+
Qe = w && w[1] || "";
|
906
909
|
}
|
907
910
|
return `
|
908
|
-
` +
|
911
|
+
` + Qe + i;
|
909
912
|
}
|
910
913
|
}
|
911
|
-
var $e = !1,
|
914
|
+
var $e = !1, je;
|
912
915
|
{
|
913
|
-
var
|
914
|
-
|
916
|
+
var Pt = typeof WeakMap == "function" ? WeakMap : Map;
|
917
|
+
je = new Pt();
|
915
918
|
}
|
916
|
-
function
|
919
|
+
function dt(i, h) {
|
917
920
|
if (!i || $e)
|
918
921
|
return "";
|
919
922
|
{
|
920
|
-
var g =
|
923
|
+
var g = je.get(i);
|
921
924
|
if (g !== void 0)
|
922
925
|
return g;
|
923
926
|
}
|
@@ -926,7 +929,7 @@ function ba() {
|
|
926
929
|
var k = Error.prepareStackTrace;
|
927
930
|
Error.prepareStackTrace = void 0;
|
928
931
|
var L;
|
929
|
-
L =
|
932
|
+
L = Je.current, Je.current = null, Mt();
|
930
933
|
try {
|
931
934
|
if (h) {
|
932
935
|
var P = function() {
|
@@ -963,39 +966,39 @@ function ba() {
|
|
963
966
|
if (Ee && w && typeof Ee.stack == "string") {
|
964
967
|
for (var T = Ee.stack.split(`
|
965
968
|
`), ce = w.stack.split(`
|
966
|
-
`), W = T.length - 1,
|
967
|
-
|
968
|
-
for (; W >= 1 &&
|
969
|
-
if (T[W] !== ce[
|
970
|
-
if (W !== 1 ||
|
969
|
+
`), W = T.length - 1, Z = ce.length - 1; W >= 1 && Z >= 0 && T[W] !== ce[Z]; )
|
970
|
+
Z--;
|
971
|
+
for (; W >= 1 && Z >= 0; W--, Z--)
|
972
|
+
if (T[W] !== ce[Z]) {
|
973
|
+
if (W !== 1 || Z !== 1)
|
971
974
|
do
|
972
|
-
if (W--,
|
975
|
+
if (W--, Z--, Z < 0 || T[W] !== ce[Z]) {
|
973
976
|
var ge = `
|
974
977
|
` + T[W].replace(" at new ", " at ");
|
975
|
-
return i.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", i.displayName)), typeof i == "function" &&
|
978
|
+
return i.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", i.displayName)), typeof i == "function" && je.set(i, ge), ge;
|
976
979
|
}
|
977
|
-
while (W >= 1 &&
|
980
|
+
while (W >= 1 && Z >= 0);
|
978
981
|
break;
|
979
982
|
}
|
980
983
|
}
|
981
984
|
} finally {
|
982
|
-
$e = !1,
|
985
|
+
$e = !1, Je.current = L, Rt(), Error.prepareStackTrace = k;
|
983
986
|
}
|
984
|
-
var Ye = i ? i.displayName || i.name : "",
|
985
|
-
return typeof i == "function" &&
|
987
|
+
var Ye = i ? i.displayName || i.name : "", Yt = Ye ? Pe(Ye) : "";
|
988
|
+
return typeof i == "function" && je.set(i, Yt), Yt;
|
986
989
|
}
|
987
|
-
function
|
988
|
-
return
|
990
|
+
function ft(i, h, g) {
|
991
|
+
return dt(i, !1);
|
989
992
|
}
|
990
|
-
function
|
993
|
+
function ht(i) {
|
991
994
|
var h = i.prototype;
|
992
995
|
return !!(h && h.isReactComponent);
|
993
996
|
}
|
994
|
-
function
|
997
|
+
function _e(i, h, g) {
|
995
998
|
if (i == null)
|
996
999
|
return "";
|
997
1000
|
if (typeof i == "function")
|
998
|
-
return
|
1001
|
+
return dt(i, ht(i));
|
999
1002
|
if (typeof i == "string")
|
1000
1003
|
return Pe(i);
|
1001
1004
|
switch (i) {
|
@@ -1007,26 +1010,26 @@ function ba() {
|
|
1007
1010
|
if (typeof i == "object")
|
1008
1011
|
switch (i.$$typeof) {
|
1009
1012
|
case d:
|
1010
|
-
return
|
1013
|
+
return ft(i.render);
|
1011
1014
|
case E:
|
1012
|
-
return
|
1015
|
+
return _e(i.type, h, g);
|
1013
1016
|
case x: {
|
1014
1017
|
var w = i, k = w._payload, L = w._init;
|
1015
1018
|
try {
|
1016
|
-
return
|
1019
|
+
return _e(L(k), h, g);
|
1017
1020
|
} catch {
|
1018
1021
|
}
|
1019
1022
|
}
|
1020
1023
|
}
|
1021
1024
|
return "";
|
1022
1025
|
}
|
1023
|
-
var Ge = Object.prototype.hasOwnProperty,
|
1026
|
+
var Ge = Object.prototype.hasOwnProperty, pt = {}, et = K.ReactDebugCurrentFrame;
|
1024
1027
|
function Se(i) {
|
1025
1028
|
if (i) {
|
1026
|
-
var h = i._owner, g =
|
1027
|
-
|
1029
|
+
var h = i._owner, g = _e(i.type, i._source, h ? h.type : null);
|
1030
|
+
et.setExtraStackFrame(g);
|
1028
1031
|
} else
|
1029
|
-
|
1032
|
+
et.setExtraStackFrame(null);
|
1030
1033
|
}
|
1031
1034
|
function ke(i, h, g, w, k) {
|
1032
1035
|
{
|
@@ -1043,40 +1046,40 @@ function ba() {
|
|
1043
1046
|
} catch (W) {
|
1044
1047
|
T = W;
|
1045
1048
|
}
|
1046
|
-
T && !(T instanceof Error) && (Se(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in
|
1049
|
+
T && !(T instanceof Error) && (Se(k), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in pt) && (pt[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
|
1047
1050
|
}
|
1048
1051
|
}
|
1049
1052
|
}
|
1050
|
-
var
|
1051
|
-
function
|
1052
|
-
return
|
1053
|
+
var jt = Array.isArray;
|
1054
|
+
function tt(i) {
|
1055
|
+
return jt(i);
|
1053
1056
|
}
|
1054
|
-
function
|
1057
|
+
function mt(i) {
|
1055
1058
|
{
|
1056
1059
|
var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
1057
1060
|
return g;
|
1058
1061
|
}
|
1059
1062
|
}
|
1060
|
-
function
|
1063
|
+
function nt(i) {
|
1061
1064
|
try {
|
1062
|
-
return
|
1065
|
+
return gt(i), !1;
|
1063
1066
|
} catch {
|
1064
1067
|
return !0;
|
1065
1068
|
}
|
1066
1069
|
}
|
1067
|
-
function
|
1070
|
+
function gt(i) {
|
1068
1071
|
return "" + i;
|
1069
1072
|
}
|
1070
|
-
function
|
1071
|
-
if (
|
1072
|
-
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
1073
|
+
function vt(i) {
|
1074
|
+
if (nt(i))
|
1075
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", mt(i)), gt(i);
|
1073
1076
|
}
|
1074
|
-
var Oe =
|
1077
|
+
var Oe = K.ReactCurrentOwner, _t = {
|
1075
1078
|
key: !0,
|
1076
1079
|
ref: !0,
|
1077
1080
|
__self: !0,
|
1078
1081
|
__source: !0
|
1079
|
-
},
|
1082
|
+
}, bt, at, ve;
|
1080
1083
|
ve = {};
|
1081
1084
|
function o(i) {
|
1082
1085
|
if (Ge.call(i, "ref")) {
|
@@ -1094,7 +1097,7 @@ function ba() {
|
|
1094
1097
|
}
|
1095
1098
|
return i.key !== void 0;
|
1096
1099
|
}
|
1097
|
-
function
|
1100
|
+
function D(i, h) {
|
1098
1101
|
if (typeof i.ref == "string" && Oe.current && h && Oe.current.stateNode !== h) {
|
1099
1102
|
var g = F(Oe.current.type);
|
1100
1103
|
ve[g] || (S('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', F(Oe.current.type), i.ref), ve[g] = !0);
|
@@ -1103,7 +1106,7 @@ function ba() {
|
|
1103
1106
|
function N(i, h) {
|
1104
1107
|
{
|
1105
1108
|
var g = function() {
|
1106
|
-
|
1109
|
+
bt || (bt = !0, S("%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)", h));
|
1107
1110
|
};
|
1108
1111
|
g.isReactWarning = !0, Object.defineProperty(i, "key", {
|
1109
1112
|
get: g,
|
@@ -1114,7 +1117,7 @@ function ba() {
|
|
1114
1117
|
function te(i, h) {
|
1115
1118
|
{
|
1116
1119
|
var g = function() {
|
1117
|
-
|
1120
|
+
at || (at = !0, S("%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)", h));
|
1118
1121
|
};
|
1119
1122
|
g.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
1120
1123
|
get: g,
|
@@ -1154,28 +1157,28 @@ function ba() {
|
|
1154
1157
|
function ue(i, h, g, w, k) {
|
1155
1158
|
{
|
1156
1159
|
var L, P = {}, T = null, ce = null;
|
1157
|
-
g !== void 0 && (
|
1160
|
+
g !== void 0 && (vt(g), T = "" + g), y(h) && (vt(h.key), T = "" + h.key), o(h) && (ce = h.ref, D(h, k));
|
1158
1161
|
for (L in h)
|
1159
|
-
Ge.call(h, L) && !
|
1162
|
+
Ge.call(h, L) && !_t.hasOwnProperty(L) && (P[L] = h[L]);
|
1160
1163
|
if (i && i.defaultProps) {
|
1161
1164
|
var W = i.defaultProps;
|
1162
1165
|
for (L in W)
|
1163
1166
|
P[L] === void 0 && (P[L] = W[L]);
|
1164
1167
|
}
|
1165
1168
|
if (T || ce) {
|
1166
|
-
var
|
1167
|
-
T && N(P,
|
1169
|
+
var Z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
1170
|
+
T && N(P, Z), ce && te(P, Z);
|
1168
1171
|
}
|
1169
1172
|
return be(i, T, ce, k, w, Oe.current, P);
|
1170
1173
|
}
|
1171
1174
|
}
|
1172
|
-
var
|
1175
|
+
var yt = K.ReactCurrentOwner, Et = K.ReactDebugCurrentFrame;
|
1173
1176
|
function ye(i) {
|
1174
1177
|
if (i) {
|
1175
|
-
var h = i._owner, g =
|
1176
|
-
|
1178
|
+
var h = i._owner, g = _e(i.type, i._source, h ? h.type : null);
|
1179
|
+
Et.setExtraStackFrame(g);
|
1177
1180
|
} else
|
1178
|
-
|
1181
|
+
Et.setExtraStackFrame(null);
|
1179
1182
|
}
|
1180
1183
|
var he;
|
1181
1184
|
he = !1;
|
@@ -1184,8 +1187,8 @@ function ba() {
|
|
1184
1187
|
}
|
1185
1188
|
function Ve() {
|
1186
1189
|
{
|
1187
|
-
if (
|
1188
|
-
var i = F(
|
1190
|
+
if (yt.current) {
|
1191
|
+
var i = F(yt.current.type);
|
1189
1192
|
if (i)
|
1190
1193
|
return `
|
1191
1194
|
|
@@ -1194,7 +1197,7 @@ Check the render method of \`` + i + "`.";
|
|
1194
1197
|
return "";
|
1195
1198
|
}
|
1196
1199
|
}
|
1197
|
-
function
|
1200
|
+
function De(i) {
|
1198
1201
|
{
|
1199
1202
|
if (i !== void 0) {
|
1200
1203
|
var h = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
|
@@ -1218,7 +1221,7 @@ Check the top-level render call using <` + g + ">.");
|
|
1218
1221
|
return h;
|
1219
1222
|
}
|
1220
1223
|
}
|
1221
|
-
function
|
1224
|
+
function Gt(i, h) {
|
1222
1225
|
{
|
1223
1226
|
if (!i._store || i._store.validated || i.key != null)
|
1224
1227
|
return;
|
@@ -1228,17 +1231,17 @@ Check the top-level render call using <` + g + ">.");
|
|
1228
1231
|
return;
|
1229
1232
|
Te[g] = !0;
|
1230
1233
|
var w = "";
|
1231
|
-
i && i._owner && i._owner !==
|
1234
|
+
i && i._owner && i._owner !== yt.current && (w = " It was passed a child from " + F(i._owner.type) + "."), ye(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), ye(null);
|
1232
1235
|
}
|
1233
1236
|
}
|
1234
|
-
function
|
1237
|
+
function Vt(i, h) {
|
1235
1238
|
{
|
1236
1239
|
if (typeof i != "object")
|
1237
1240
|
return;
|
1238
|
-
if (
|
1241
|
+
if (tt(i))
|
1239
1242
|
for (var g = 0; g < i.length; g++) {
|
1240
1243
|
var w = i[g];
|
1241
|
-
pe(w) &&
|
1244
|
+
pe(w) && Gt(w, h);
|
1242
1245
|
}
|
1243
1246
|
else if (pe(i))
|
1244
1247
|
i._store && (i._store.validated = !0);
|
@@ -1246,11 +1249,11 @@ Check the top-level render call using <` + g + ">.");
|
|
1246
1249
|
var k = se(i);
|
1247
1250
|
if (typeof k == "function" && k !== i.entries)
|
1248
1251
|
for (var L = k.call(i), P; !(P = L.next()).done; )
|
1249
|
-
pe(P.value) &&
|
1252
|
+
pe(P.value) && Gt(P.value, h);
|
1250
1253
|
}
|
1251
1254
|
}
|
1252
1255
|
}
|
1253
|
-
function
|
1256
|
+
function On(i) {
|
1254
1257
|
{
|
1255
1258
|
var h = i.type;
|
1256
1259
|
if (h == null || typeof h == "string")
|
@@ -1275,7 +1278,7 @@ Check the top-level render call using <` + g + ">.");
|
|
1275
1278
|
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1276
1279
|
}
|
1277
1280
|
}
|
1278
|
-
function
|
1281
|
+
function Tn(i) {
|
1279
1282
|
{
|
1280
1283
|
for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
|
1281
1284
|
var w = h[g];
|
@@ -1287,56 +1290,56 @@ Check the top-level render call using <` + g + ">.");
|
|
1287
1290
|
i.ref !== null && (ye(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
1288
1291
|
}
|
1289
1292
|
}
|
1290
|
-
function
|
1293
|
+
function zt(i, h, g, w, k, L) {
|
1291
1294
|
{
|
1292
1295
|
var P = O(i);
|
1293
1296
|
if (!P) {
|
1294
1297
|
var T = "";
|
1295
1298
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1296
|
-
var ce =
|
1299
|
+
var ce = De(k);
|
1297
1300
|
ce ? T += ce : T += Ve();
|
1298
1301
|
var W;
|
1299
|
-
i === null ? W = "null" :
|
1302
|
+
i === null ? W = "null" : tt(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (F(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, T);
|
1300
1303
|
}
|
1301
|
-
var
|
1302
|
-
if (
|
1303
|
-
return
|
1304
|
+
var Z = ue(i, h, g, k, L);
|
1305
|
+
if (Z == null)
|
1306
|
+
return Z;
|
1304
1307
|
if (P) {
|
1305
1308
|
var ge = h.children;
|
1306
1309
|
if (ge !== void 0)
|
1307
1310
|
if (w)
|
1308
|
-
if (
|
1311
|
+
if (tt(ge)) {
|
1309
1312
|
for (var Ye = 0; Ye < ge.length; Ye++)
|
1310
|
-
|
1313
|
+
Vt(ge[Ye], i);
|
1311
1314
|
Object.freeze && Object.freeze(ge);
|
1312
1315
|
} else
|
1313
1316
|
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1314
1317
|
else
|
1315
|
-
|
1318
|
+
Vt(ge, i);
|
1316
1319
|
}
|
1317
|
-
return i === e ?
|
1320
|
+
return i === e ? Tn(Z) : On(Z), Z;
|
1318
1321
|
}
|
1319
1322
|
}
|
1320
|
-
function Tn(i, h, g) {
|
1321
|
-
return Vt(i, h, g, !0);
|
1322
|
-
}
|
1323
1323
|
function Mn(i, h, g) {
|
1324
|
-
return
|
1324
|
+
return zt(i, h, g, !0);
|
1325
|
+
}
|
1326
|
+
function Rn(i, h, g) {
|
1327
|
+
return zt(i, h, g, !1);
|
1325
1328
|
}
|
1326
|
-
var
|
1327
|
-
|
1328
|
-
}()),
|
1329
|
+
var Pn = Rn, jn = Mn;
|
1330
|
+
rt.Fragment = e, rt.jsx = Pn, rt.jsxs = jn;
|
1331
|
+
}()), rt;
|
1329
1332
|
}
|
1330
|
-
process.env.NODE_ENV === "production" ?
|
1331
|
-
var c =
|
1332
|
-
function
|
1333
|
+
process.env.NODE_ENV === "production" ? Ut.exports = ya() : Ut.exports = Ea();
|
1334
|
+
var c = Ut.exports;
|
1335
|
+
function wn(t) {
|
1333
1336
|
return t.title.search("<") > -1 ? /* @__PURE__ */ c.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ c.jsx("button", { children: t.title });
|
1334
1337
|
}
|
1335
|
-
const
|
1338
|
+
const wa = /* @__PURE__ */ c.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1336
1339
|
/* @__PURE__ */ c.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1337
1340
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1338
1341
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1339
|
-
] }),
|
1342
|
+
] }), xa = /* @__PURE__ */ c.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ c.jsx(
|
1340
1343
|
"path",
|
1341
1344
|
{
|
1342
1345
|
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
|
@@ -1344,16 +1347,16 @@ 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
|
|
1344
1347
|
C11,8.22,10.74,8,10.43,8z`
|
1345
1348
|
}
|
1346
1349
|
) });
|
1347
|
-
function
|
1348
|
-
return /* @__PURE__ */ c.jsx(
|
1349
|
-
|
1350
|
+
function Ca(t) {
|
1351
|
+
return /* @__PURE__ */ c.jsx(mn.Item, { value: t.title, children: /* @__PURE__ */ c.jsxs("div", { children: [
|
1352
|
+
xa,
|
1350
1353
|
/* @__PURE__ */ c.jsx("span", { children: t.title }),
|
1351
1354
|
/* @__PURE__ */ c.jsx("button", { className: "closeIcon", onClick: () => {
|
1352
1355
|
t.onDelete(t.index);
|
1353
|
-
}, children:
|
1356
|
+
}, children: wa })
|
1354
1357
|
] }) }, t.title);
|
1355
1358
|
}
|
1356
|
-
function
|
1359
|
+
function Sa(t) {
|
1357
1360
|
const [n, a] = oe(!1), [e, r] = oe(t.options), s = (p) => {
|
1358
1361
|
t.onDragComplete(p), r(p);
|
1359
1362
|
}, u = (p) => {
|
@@ -1361,18 +1364,18 @@ function xa(t) {
|
|
1361
1364
|
v.splice(p, 1), s(v);
|
1362
1365
|
}, l = [];
|
1363
1366
|
e.forEach((p, v) => {
|
1364
|
-
l.push(/* @__PURE__ */ c.jsx(
|
1367
|
+
l.push(/* @__PURE__ */ c.jsx(Ca, { index: v, title: p, onDelete: u }, p));
|
1365
1368
|
});
|
1366
1369
|
let d = "dropdown draggable";
|
1367
1370
|
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ c.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1368
|
-
/* @__PURE__ */ c.jsx(
|
1369
|
-
/* @__PURE__ */ c.jsx(
|
1371
|
+
/* @__PURE__ */ c.jsx(wn, { title: t.title }),
|
1372
|
+
/* @__PURE__ */ c.jsx(mn.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: l })
|
1370
1373
|
] });
|
1371
1374
|
}
|
1372
|
-
function
|
1375
|
+
function Oa(t) {
|
1373
1376
|
const [n, a] = oe(!1), e = [];
|
1374
1377
|
t.options.map((s, u) => {
|
1375
|
-
t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ c.jsx(
|
1378
|
+
t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ c.jsx(Ta, { option: s }, u));
|
1376
1379
|
});
|
1377
1380
|
let r = "dropdown";
|
1378
1381
|
return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ c.jsxs(
|
@@ -1382,7 +1385,7 @@ function Ca(t) {
|
|
1382
1385
|
onMouseEnter: () => a(!0),
|
1383
1386
|
onMouseLeave: () => a(!1),
|
1384
1387
|
children: [
|
1385
|
-
/* @__PURE__ */ c.jsx(
|
1388
|
+
/* @__PURE__ */ c.jsx(wn, { title: t.title }),
|
1386
1389
|
/* @__PURE__ */ c.jsx(
|
1387
1390
|
"ul",
|
1388
1391
|
{
|
@@ -1394,13 +1397,13 @@ function Ca(t) {
|
|
1394
1397
|
}
|
1395
1398
|
);
|
1396
1399
|
}
|
1397
|
-
function
|
1400
|
+
function Ta(t) {
|
1398
1401
|
const { option: n } = t, [a, e] = oe("");
|
1399
1402
|
let r;
|
1400
1403
|
switch (n.type) {
|
1401
1404
|
case "draggable":
|
1402
1405
|
r = /* @__PURE__ */ c.jsx(
|
1403
|
-
|
1406
|
+
Sa,
|
1404
1407
|
{
|
1405
1408
|
title: n.title,
|
1406
1409
|
options: n.value,
|
@@ -1413,7 +1416,7 @@ function Sa(t) {
|
|
1413
1416
|
break;
|
1414
1417
|
case "dropdown":
|
1415
1418
|
r = /* @__PURE__ */ c.jsx(
|
1416
|
-
|
1419
|
+
Oa,
|
1417
1420
|
{
|
1418
1421
|
title: n.title,
|
1419
1422
|
options: n.value,
|
@@ -1434,24 +1437,24 @@ function Sa(t) {
|
|
1434
1437
|
);
|
1435
1438
|
break;
|
1436
1439
|
}
|
1437
|
-
return /* @__PURE__ */ c.jsx("li", { className: a === n.title ? "selected" : "", children: r },
|
1440
|
+
return /* @__PURE__ */ c.jsx("li", { className: a === n.title ? "selected" : "", children: r }, aa());
|
1438
1441
|
}
|
1439
|
-
function
|
1442
|
+
function hi(t) {
|
1440
1443
|
const n = [], a = [];
|
1441
1444
|
t.components.forEach((s) => {
|
1442
|
-
s instanceof
|
1445
|
+
s instanceof ca ? n.push(la) : s instanceof qe ? (n.push(ua), da(t)) : s instanceof ma ? (n.push(ga), a.push(va)) : s instanceof En && n.push(ba);
|
1443
1446
|
});
|
1444
1447
|
function e(s) {
|
1445
1448
|
switch (n.forEach((u) => u(t, s)), s.event) {
|
1446
1449
|
case "custom":
|
1447
|
-
|
1450
|
+
j.dispatchEvent({ type: _.CUSTOM, value: s.data });
|
1448
1451
|
break;
|
1449
1452
|
}
|
1450
1453
|
}
|
1451
1454
|
function r(s) {
|
1452
1455
|
switch (a.forEach((u) => u(t, s)), s.event) {
|
1453
1456
|
case "custom":
|
1454
|
-
|
1457
|
+
j.dispatchEvent({ type: _.CUSTOM, value: s.data });
|
1455
1458
|
break;
|
1456
1459
|
}
|
1457
1460
|
}
|
@@ -1459,7 +1462,7 @@ function di(t) {
|
|
1459
1462
|
t.editor ? r(s) : e(s);
|
1460
1463
|
});
|
1461
1464
|
}
|
1462
|
-
const
|
1465
|
+
const Ma = `out vec3 worldPosition;
|
1463
1466
|
uniform float uDistance;
|
1464
1467
|
|
1465
1468
|
void main() {
|
@@ -1468,7 +1471,7 @@ void main() {
|
|
1468
1471
|
worldPosition.xz += cameraPosition.xz;
|
1469
1472
|
|
1470
1473
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1471
|
-
}`,
|
1474
|
+
}`, Ra = `out vec4 fragColor;
|
1472
1475
|
in vec3 worldPosition;
|
1473
1476
|
|
1474
1477
|
uniform float uDivisions;
|
@@ -1536,14 +1539,14 @@ void main() {
|
|
1536
1539
|
|
1537
1540
|
if (fragColor.a <= 0.0) discard;
|
1538
1541
|
}`;
|
1539
|
-
class
|
1542
|
+
class Pa extends un {
|
1540
1543
|
constructor(n) {
|
1541
1544
|
super({
|
1542
1545
|
extensions: {
|
1543
1546
|
derivatives: !0
|
1544
1547
|
},
|
1545
|
-
glslVersion:
|
1546
|
-
side:
|
1548
|
+
glslVersion: In,
|
1549
|
+
side: Nn,
|
1547
1550
|
transparent: !0,
|
1548
1551
|
uniforms: {
|
1549
1552
|
uScale: {
|
@@ -1553,7 +1556,7 @@ class Ma extends ln {
|
|
1553
1556
|
value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
|
1554
1557
|
},
|
1555
1558
|
uColor: {
|
1556
|
-
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new
|
1559
|
+
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Bt(16777215)
|
1557
1560
|
},
|
1558
1561
|
uDistance: {
|
1559
1562
|
value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
|
@@ -1565,25 +1568,25 @@ class Ma extends ln {
|
|
1565
1568
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
1566
1569
|
}
|
1567
1570
|
},
|
1568
|
-
vertexShader:
|
1569
|
-
fragmentShader:
|
1571
|
+
vertexShader: Ma,
|
1572
|
+
fragmentShader: Ra,
|
1570
1573
|
name: "InfiniteGrid",
|
1571
1574
|
depthWrite: !1
|
1572
1575
|
});
|
1573
1576
|
}
|
1574
1577
|
}
|
1575
|
-
class
|
1578
|
+
class ja extends Ln {
|
1576
1579
|
constructor() {
|
1577
|
-
const a = new
|
1578
|
-
super(new
|
1579
|
-
|
1580
|
+
const a = new Pa();
|
1581
|
+
super(new Fn(2, 2), a);
|
1582
|
+
H(this, "gridMaterial");
|
1580
1583
|
this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1581
1584
|
}
|
1582
1585
|
update() {
|
1583
1586
|
this.gridMaterial.needsUpdate = !0;
|
1584
1587
|
}
|
1585
1588
|
}
|
1586
|
-
const
|
1589
|
+
const _a = `#include <common>
|
1587
1590
|
#include <batching_pars_vertex>
|
1588
1591
|
#include <uv_pars_vertex>
|
1589
1592
|
#include <color_pars_vertex>
|
@@ -1613,7 +1616,7 @@ void main() {
|
|
1613
1616
|
#include <logdepthbuf_vertex>
|
1614
1617
|
#include <clipping_planes_vertex>
|
1615
1618
|
#include <worldpos_vertex>
|
1616
|
-
}`,
|
1619
|
+
}`, ka = `
|
1617
1620
|
#include <common>
|
1618
1621
|
#include <uv_pars_fragment>
|
1619
1622
|
#include <clipping_planes_pars_fragment>
|
@@ -1622,18 +1625,18 @@ void main() {
|
|
1622
1625
|
#include <clipping_planes_fragment>
|
1623
1626
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1624
1627
|
}`;
|
1625
|
-
class
|
1628
|
+
class Da extends un {
|
1626
1629
|
constructor() {
|
1627
1630
|
super({
|
1628
1631
|
defines: {
|
1629
1632
|
USE_UV: ""
|
1630
1633
|
},
|
1631
|
-
vertexShader:
|
1632
|
-
fragmentShader:
|
1634
|
+
vertexShader: _a,
|
1635
|
+
fragmentShader: ka
|
1633
1636
|
});
|
1634
1637
|
}
|
1635
1638
|
}
|
1636
|
-
function
|
1639
|
+
function $t(t) {
|
1637
1640
|
const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1638
1641
|
return /* @__PURE__ */ c.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1639
1642
|
/* @__PURE__ */ c.jsxs(
|
@@ -1660,10 +1663,10 @@ function Bt(t) {
|
|
1660
1663
|
/* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { children: t.children }) })
|
1661
1664
|
] });
|
1662
1665
|
}
|
1663
|
-
function
|
1666
|
+
function xn(t) {
|
1664
1667
|
const [n, a] = oe(!1), e = t.child.children.length > 0, r = [];
|
1665
1668
|
return t.child.children.length > 0 && t.child.children.map((s) => {
|
1666
|
-
r.push(/* @__PURE__ */ c.jsx(
|
1669
|
+
r.push(/* @__PURE__ */ c.jsx(xn, { child: s, three: t.three }, Math.random()));
|
1667
1670
|
}), /* @__PURE__ */ c.jsxs("div", { className: "childObject", children: [
|
1668
1671
|
/* @__PURE__ */ c.jsxs("div", { className: "child", children: [
|
1669
1672
|
e ? /* @__PURE__ */ c.jsx(
|
@@ -1691,29 +1694,29 @@ function wn(t) {
|
|
1691
1694
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1692
1695
|
}
|
1693
1696
|
),
|
1694
|
-
/* @__PURE__ */ c.jsx("div", { className: `icon ${
|
1697
|
+
/* @__PURE__ */ c.jsx("div", { className: `icon ${fa(t.child)}` })
|
1695
1698
|
] }),
|
1696
1699
|
/* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { className: "container", children: r }) })
|
1697
1700
|
] }, Math.random());
|
1698
1701
|
}
|
1699
|
-
function
|
1702
|
+
function Aa(t) {
|
1700
1703
|
const n = [];
|
1701
1704
|
return t.child.children.map((a) => {
|
1702
|
-
n.push(/* @__PURE__ */ c.jsx(
|
1705
|
+
n.push(/* @__PURE__ */ c.jsx(xn, { child: a, three: t.three }, Math.random()));
|
1703
1706
|
}), /* @__PURE__ */ c.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1704
1707
|
}
|
1705
|
-
const
|
1706
|
-
function
|
1708
|
+
const Ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1709
|
+
function Na(t) {
|
1707
1710
|
return "items" in t;
|
1708
1711
|
}
|
1709
1712
|
function Ue(t) {
|
1710
1713
|
const n = [];
|
1711
1714
|
return t.items.forEach((a) => {
|
1712
|
-
|
1715
|
+
Na(a) ? n.push(
|
1713
1716
|
/* @__PURE__ */ c.jsx(Ue, { title: a.title, items: a.items }, Math.random())
|
1714
1717
|
) : n.push(
|
1715
1718
|
/* @__PURE__ */ c.jsx(
|
1716
|
-
|
1719
|
+
ot,
|
1717
1720
|
{
|
1718
1721
|
title: a.title,
|
1719
1722
|
prop: a.prop,
|
@@ -1730,12 +1733,12 @@ function Ue(t) {
|
|
1730
1733
|
Math.random()
|
1731
1734
|
)
|
1732
1735
|
);
|
1733
|
-
}), /* @__PURE__ */ c.jsx(
|
1736
|
+
}), /* @__PURE__ */ c.jsx($t, { label: t.title, open: t.expanded === !0, children: n });
|
1734
1737
|
}
|
1735
|
-
function
|
1738
|
+
function La(t) {
|
1736
1739
|
return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
|
1737
1740
|
}
|
1738
|
-
function
|
1741
|
+
function Ae(t) {
|
1739
1742
|
switch (t) {
|
1740
1743
|
case "alphaMap":
|
1741
1744
|
return "Alpha Map";
|
@@ -1884,10 +1887,10 @@ function De(t) {
|
|
1884
1887
|
}
|
1885
1888
|
return t;
|
1886
1889
|
}
|
1887
|
-
function
|
1890
|
+
function Fa(t) {
|
1888
1891
|
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";
|
1889
1892
|
}
|
1890
|
-
function
|
1893
|
+
function Ua() {
|
1891
1894
|
const t = document.createElement("input");
|
1892
1895
|
return t.type = "file", new Promise((n, a) => {
|
1893
1896
|
t.addEventListener("change", function() {
|
@@ -1902,15 +1905,15 @@ function La() {
|
|
1902
1905
|
}), t.click();
|
1903
1906
|
});
|
1904
1907
|
}
|
1905
|
-
function
|
1908
|
+
function Jt(t, n, a) {
|
1906
1909
|
const e = [];
|
1907
1910
|
for (const r in t) {
|
1908
|
-
if (!
|
1911
|
+
if (!La(r))
|
1909
1912
|
continue;
|
1910
1913
|
const s = typeof t[r], u = t[r];
|
1911
1914
|
if (s === "boolean" || s === "number" || s === "string") {
|
1912
1915
|
const l = {
|
1913
|
-
title:
|
1916
|
+
title: Ae(r),
|
1914
1917
|
prop: r,
|
1915
1918
|
type: s,
|
1916
1919
|
value: u,
|
@@ -1923,17 +1926,17 @@ function Zt(t, n, a) {
|
|
1923
1926
|
v !== void 0 && Q(v, `material.${d}`, p);
|
1924
1927
|
}
|
1925
1928
|
};
|
1926
|
-
|
1929
|
+
Fa(r) && (l.value = Number(u), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
|
1927
1930
|
} else if (s === "object")
|
1928
1931
|
if (u.isColor)
|
1929
1932
|
e.push({
|
1930
|
-
title:
|
1933
|
+
title: Ae(r),
|
1931
1934
|
prop: r,
|
1932
1935
|
type: "color",
|
1933
1936
|
value: u,
|
1934
1937
|
onChange: (l, d) => {
|
1935
1938
|
var E;
|
1936
|
-
const p = new
|
1939
|
+
const p = new Bt(d);
|
1937
1940
|
a.updateObject(n.uuid, `material.${l}`, p);
|
1938
1941
|
const v = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
|
1939
1942
|
v !== void 0 && Q(v, `material.${l}`, p);
|
@@ -1954,7 +1957,7 @@ function Zt(t, n, a) {
|
|
1954
1957
|
}
|
1955
1958
|
});
|
1956
1959
|
e.push({
|
1957
|
-
title:
|
1960
|
+
title: Ae(r),
|
1958
1961
|
items: l
|
1959
1962
|
});
|
1960
1963
|
} else {
|
@@ -1966,19 +1969,19 @@ function Zt(t, n, a) {
|
|
1966
1969
|
case "number":
|
1967
1970
|
case "string":
|
1968
1971
|
d === "src" ? e.push({
|
1969
|
-
title:
|
1972
|
+
title: Ae(r),
|
1970
1973
|
type: "image",
|
1971
1974
|
value: p,
|
1972
1975
|
onChange: (E, x) => {
|
1973
1976
|
var M;
|
1974
1977
|
a.createTexture(n.uuid, `material.${r}`, x);
|
1975
1978
|
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1976
|
-
C !== void 0 &&
|
1979
|
+
C !== void 0 && Ft(x).then((G) => {
|
1977
1980
|
Q(C, `material.${r}`, G), Q(C, "material.needsUpdate", !0);
|
1978
1981
|
});
|
1979
1982
|
}
|
1980
1983
|
}) : l.push({
|
1981
|
-
title: `${
|
1984
|
+
title: `${Ae(d)}`,
|
1982
1985
|
prop: `material.${r}.${d}`,
|
1983
1986
|
type: `${typeof t[r][d]}`,
|
1984
1987
|
value: u[d],
|
@@ -1992,14 +1995,14 @@ function Zt(t, n, a) {
|
|
1992
1995
|
break;
|
1993
1996
|
case "object":
|
1994
1997
|
p.value !== void 0 && p.value.src !== void 0 ? l.push({
|
1995
|
-
title:
|
1998
|
+
title: Ae(d),
|
1996
1999
|
type: "image",
|
1997
2000
|
value: p.value.src,
|
1998
2001
|
onChange: (E, x) => {
|
1999
2002
|
var M;
|
2000
2003
|
a.createTexture(n.uuid, `material.${r}.${d}.value`, x);
|
2001
2004
|
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
2002
|
-
C !== void 0 &&
|
2005
|
+
C !== void 0 && Ft(x).then((G) => {
|
2003
2006
|
Q(C, `material.${r}.${d}.value`, G);
|
2004
2007
|
});
|
2005
2008
|
}
|
@@ -2018,7 +2021,7 @@ function Zt(t, n, a) {
|
|
2018
2021
|
}
|
2019
2022
|
}
|
2020
2023
|
l.length > 0 && e.push({
|
2021
|
-
title:
|
2024
|
+
title: Ae(r),
|
2022
2025
|
items: l
|
2023
2026
|
});
|
2024
2027
|
}
|
@@ -2033,7 +2036,7 @@ function Zt(t, n, a) {
|
|
2033
2036
|
}
|
2034
2037
|
}), e;
|
2035
2038
|
}
|
2036
|
-
function
|
2039
|
+
function Ba(t, n) {
|
2037
2040
|
const a = t.material;
|
2038
2041
|
if (Array.isArray(a)) {
|
2039
2042
|
const e = [], r = a.length;
|
@@ -2043,7 +2046,7 @@ function Fa(t, n) {
|
|
2043
2046
|
Ue,
|
2044
2047
|
{
|
2045
2048
|
title: `Material ${s}`,
|
2046
|
-
items:
|
2049
|
+
items: Jt(a[s], t, n)
|
2047
2050
|
},
|
2048
2051
|
`Material ${s}`
|
2049
2052
|
)
|
@@ -2054,16 +2057,16 @@ function Fa(t, n) {
|
|
2054
2057
|
Ue,
|
2055
2058
|
{
|
2056
2059
|
title: "Material",
|
2057
|
-
items:
|
2060
|
+
items: Jt(a, t, n)
|
2058
2061
|
}
|
2059
2062
|
);
|
2060
2063
|
}
|
2061
|
-
function
|
2064
|
+
function ot(t) {
|
2062
2065
|
let n = t.value;
|
2063
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
2066
|
+
n !== void 0 && n.isColor !== void 0 && (n = ra(t.value));
|
2064
2067
|
const [a, e] = oe(n), r = Ce(null), s = Ce(null), u = Ce(null);
|
2065
2068
|
Fe(() => {
|
2066
|
-
var
|
2069
|
+
var X;
|
2067
2070
|
let v = !1, E = -1, x = 0, C = Number(a);
|
2068
2071
|
const M = (fe) => {
|
2069
2072
|
v = !0, x = C, E = fe.clientX;
|
@@ -2074,12 +2077,12 @@ function it(t) {
|
|
2074
2077
|
C = Number((x + ee).toFixed(4)), s.current !== null && (s.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
|
2075
2078
|
}, se = () => {
|
2076
2079
|
v = !1;
|
2077
|
-
},
|
2080
|
+
}, K = () => {
|
2078
2081
|
v = !1;
|
2079
2082
|
}, S = t.type === "number";
|
2080
|
-
return S && ((
|
2083
|
+
return S && ((X = r.current) == null || X.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", se, !1), document.addEventListener("mousemove", G, !1), document.addEventListener("contextmenu", K, !1)), () => {
|
2081
2084
|
var fe;
|
2082
|
-
S && ((fe = r.current) == null || fe.removeEventListener("mousedown", M), document.removeEventListener("mouseup", se), document.removeEventListener("mousemove", G), document.removeEventListener("contextmenu",
|
2085
|
+
S && ((fe = r.current) == null || fe.removeEventListener("mousedown", M), document.removeEventListener("mouseup", se), document.removeEventListener("mousemove", G), document.removeEventListener("contextmenu", K));
|
2083
2086
|
};
|
2084
2087
|
}, [a]);
|
2085
2088
|
const l = t.type === "string" && (a.length > 100 || a.search(`
|
@@ -2158,13 +2161,13 @@ function it(t) {
|
|
2158
2161
|
}
|
2159
2162
|
),
|
2160
2163
|
t.type === "image" && /* @__PURE__ */ c.jsx("img", { ref: u, onClick: () => {
|
2161
|
-
|
2164
|
+
Ua().then((v) => {
|
2162
2165
|
u.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
|
2163
2166
|
});
|
2164
|
-
}, src: a.length > 0 ? a :
|
2167
|
+
}, src: a.length > 0 ? a : Ia })
|
2165
2168
|
] });
|
2166
2169
|
}
|
2167
|
-
function
|
2170
|
+
function Qt(t) {
|
2168
2171
|
switch (t) {
|
2169
2172
|
case "fov":
|
2170
2173
|
return "FOV";
|
@@ -2193,12 +2196,12 @@ function Jt(t) {
|
|
2193
2196
|
}
|
2194
2197
|
return t;
|
2195
2198
|
}
|
2196
|
-
function
|
2199
|
+
function $a(t, n) {
|
2197
2200
|
const a = [];
|
2198
2201
|
if (t.perspectiveCameraInfo !== void 0)
|
2199
2202
|
for (const e in t.perspectiveCameraInfo)
|
2200
2203
|
a.push({
|
2201
|
-
title:
|
2204
|
+
title: Qt(e),
|
2202
2205
|
prop: e,
|
2203
2206
|
type: "number",
|
2204
2207
|
step: 0.01,
|
@@ -2213,7 +2216,7 @@ function Ua(t, n) {
|
|
2213
2216
|
else if (t.orthographicCameraInfo !== void 0)
|
2214
2217
|
for (const e in t.orthographicCameraInfo)
|
2215
2218
|
a.push({
|
2216
|
-
title:
|
2219
|
+
title: Qt(e),
|
2217
2220
|
prop: e,
|
2218
2221
|
type: "number",
|
2219
2222
|
step: 0.01,
|
@@ -2233,20 +2236,20 @@ function Ua(t, n) {
|
|
2233
2236
|
}
|
2234
2237
|
);
|
2235
2238
|
}
|
2236
|
-
const
|
2239
|
+
const Ga = Math.PI / 180, Va = 180 / Math.PI;
|
2237
2240
|
function Ke(t, n, a, e, r) {
|
2238
2241
|
return e + (t - n) * (r - e) / (a - n);
|
2239
2242
|
}
|
2240
|
-
function
|
2241
|
-
return t *
|
2243
|
+
function za(t) {
|
2244
|
+
return t * Ga;
|
2242
2245
|
}
|
2243
|
-
function
|
2244
|
-
return t *
|
2246
|
+
function At(t) {
|
2247
|
+
return t * Va;
|
2245
2248
|
}
|
2246
|
-
function
|
2247
|
-
const a = new
|
2249
|
+
function Ya(t, n) {
|
2250
|
+
const a = new Un();
|
2248
2251
|
a.elements = t.matrix;
|
2249
|
-
const e = new Y(), r = new
|
2252
|
+
const e = new Y(), r = new Bn(), s = new Y();
|
2250
2253
|
t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
|
2251
2254
|
const u = (d, p) => {
|
2252
2255
|
var E;
|
@@ -2254,7 +2257,7 @@ function Va(t, n) {
|
|
2254
2257
|
const v = (E = n.scene) == null ? void 0 : E.getObjectByProperty("uuid", t.uuid);
|
2255
2258
|
v !== void 0 && Q(v, d, p);
|
2256
2259
|
}, l = (d, p) => {
|
2257
|
-
u(d,
|
2260
|
+
u(d, za(p));
|
2258
2261
|
};
|
2259
2262
|
return /* @__PURE__ */ c.jsx(
|
2260
2263
|
Ue,
|
@@ -2286,7 +2289,7 @@ function Va(t, n) {
|
|
2286
2289
|
title: "Rotation X",
|
2287
2290
|
prop: "rotation.x",
|
2288
2291
|
type: "number",
|
2289
|
-
value:
|
2292
|
+
value: kt(At(r.x)),
|
2290
2293
|
min: -360,
|
2291
2294
|
max: 360,
|
2292
2295
|
step: 0.1,
|
@@ -2296,7 +2299,7 @@ function Va(t, n) {
|
|
2296
2299
|
title: "Rotation Y",
|
2297
2300
|
prop: "rotation.y",
|
2298
2301
|
type: "number",
|
2299
|
-
value:
|
2302
|
+
value: kt(At(r.y)),
|
2300
2303
|
min: -360,
|
2301
2304
|
max: 360,
|
2302
2305
|
step: 0.1,
|
@@ -2306,7 +2309,7 @@ function Va(t, n) {
|
|
2306
2309
|
title: "Rotation Z",
|
2307
2310
|
prop: "rotation.z",
|
2308
2311
|
type: "number",
|
2309
|
-
value:
|
2312
|
+
value: kt(At(r.z)),
|
2310
2313
|
min: -360,
|
2311
2314
|
max: 360,
|
2312
2315
|
step: 0.1,
|
@@ -2340,7 +2343,7 @@ function Va(t, n) {
|
|
2340
2343
|
}
|
2341
2344
|
);
|
2342
2345
|
}
|
2343
|
-
function
|
2346
|
+
function en(t) {
|
2344
2347
|
switch (t) {
|
2345
2348
|
case "color":
|
2346
2349
|
return "Color";
|
@@ -2359,25 +2362,25 @@ function Qt(t) {
|
|
2359
2362
|
}
|
2360
2363
|
return t;
|
2361
2364
|
}
|
2362
|
-
function
|
2365
|
+
function Wa(t, n) {
|
2363
2366
|
const a = [];
|
2364
2367
|
if (t.lightInfo !== void 0)
|
2365
2368
|
for (const e in t.lightInfo) {
|
2366
2369
|
const r = t.lightInfo[e];
|
2367
2370
|
r !== void 0 && (r.isColor !== void 0 ? a.push({
|
2368
|
-
title:
|
2371
|
+
title: en(e),
|
2369
2372
|
prop: e,
|
2370
2373
|
type: "color",
|
2371
2374
|
value: r,
|
2372
2375
|
onChange: (s, u) => {
|
2373
2376
|
var p;
|
2374
|
-
const l = new
|
2377
|
+
const l = new Bt(u);
|
2375
2378
|
n.updateObject(t.uuid, s, l);
|
2376
2379
|
const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
|
2377
2380
|
d !== void 0 && Q(d, s, l);
|
2378
2381
|
}
|
2379
2382
|
}) : a.push({
|
2380
|
-
title:
|
2383
|
+
title: en(e),
|
2381
2384
|
prop: e,
|
2382
2385
|
type: typeof r,
|
2383
2386
|
value: r,
|
@@ -2398,7 +2401,7 @@ function za(t, n) {
|
|
2398
2401
|
}
|
2399
2402
|
);
|
2400
2403
|
}
|
2401
|
-
function
|
2404
|
+
function Ha(t, n) {
|
2402
2405
|
const a = [];
|
2403
2406
|
return t.animations.forEach((e) => {
|
2404
2407
|
a.push({
|
@@ -2440,7 +2443,7 @@ function Ya(t, n) {
|
|
2440
2443
|
});
|
2441
2444
|
}), /* @__PURE__ */ c.jsx(Ue, { title: "Animations", items: a });
|
2442
2445
|
}
|
2443
|
-
const
|
2446
|
+
const Cn = {
|
2444
2447
|
name: "",
|
2445
2448
|
uuid: "",
|
2446
2449
|
type: "",
|
@@ -2452,25 +2455,25 @@ const xn = {
|
|
2452
2455
|
orthographicCameraInfo: void 0,
|
2453
2456
|
lightInfo: void 0
|
2454
2457
|
};
|
2455
|
-
let ae = { ...
|
2456
|
-
function
|
2458
|
+
let ae = { ...Cn };
|
2459
|
+
function Ka(t) {
|
2457
2460
|
const [n, a] = oe(-1);
|
2458
2461
|
Fe(() => {
|
2459
2462
|
function r(u) {
|
2460
2463
|
ae = { ...u.value }, a(Date.now());
|
2461
2464
|
}
|
2462
2465
|
function s() {
|
2463
|
-
ae = { ...
|
2466
|
+
ae = { ...Cn }, a(Date.now());
|
2464
2467
|
}
|
2465
|
-
return
|
2466
|
-
|
2468
|
+
return j.addEventListener(_.SET_SCENE, s), j.addEventListener(_.SET_OBJECT, r), () => {
|
2469
|
+
j.removeEventListener(_.SET_SCENE, s), j.removeEventListener(_.SET_OBJECT, r);
|
2467
2470
|
};
|
2468
2471
|
}, []);
|
2469
2472
|
const e = ae.type.toLowerCase();
|
2470
|
-
return /* @__PURE__ */ c.jsx(
|
2473
|
+
return /* @__PURE__ */ c.jsx($t, { label: "Inspector", children: /* @__PURE__ */ c.jsx("div", { id: "Inspector", className: t.class, children: ae.uuid.length > 0 && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2471
2474
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2472
2475
|
/* @__PURE__ */ c.jsx(
|
2473
|
-
|
2476
|
+
ot,
|
2474
2477
|
{
|
2475
2478
|
type: "string",
|
2476
2479
|
title: "Name",
|
@@ -2480,7 +2483,7 @@ function Wa(t) {
|
|
2480
2483
|
}
|
2481
2484
|
),
|
2482
2485
|
/* @__PURE__ */ c.jsx(
|
2483
|
-
|
2486
|
+
ot,
|
2484
2487
|
{
|
2485
2488
|
type: "string",
|
2486
2489
|
title: "Type",
|
@@ -2490,7 +2493,7 @@ function Wa(t) {
|
|
2490
2493
|
}
|
2491
2494
|
),
|
2492
2495
|
/* @__PURE__ */ c.jsx(
|
2493
|
-
|
2496
|
+
ot,
|
2494
2497
|
{
|
2495
2498
|
type: "string",
|
2496
2499
|
title: "UUID",
|
@@ -2500,7 +2503,7 @@ function Wa(t) {
|
|
2500
2503
|
}
|
2501
2504
|
),
|
2502
2505
|
/* @__PURE__ */ c.jsx(
|
2503
|
-
|
2506
|
+
ot,
|
2504
2507
|
{
|
2505
2508
|
type: "boolean",
|
2506
2509
|
title: "Visible",
|
@@ -2516,37 +2519,37 @@ function Wa(t) {
|
|
2516
2519
|
)
|
2517
2520
|
] }),
|
2518
2521
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2519
|
-
|
2520
|
-
ae.animations.length > 0 ?
|
2521
|
-
e.search("camera") > -1 ?
|
2522
|
-
e.search("light") > -1 ?
|
2523
|
-
e.search("mesh") > -1 ?
|
2522
|
+
Ya(ae, t.three),
|
2523
|
+
ae.animations.length > 0 ? Ha(ae, t.three) : null,
|
2524
|
+
e.search("camera") > -1 ? $a(ae, t.three) : null,
|
2525
|
+
e.search("light") > -1 ? Wa(ae, t.three) : null,
|
2526
|
+
e.search("mesh") > -1 ? Ba(ae, t.three) : null
|
2524
2527
|
] })
|
2525
2528
|
] }) }, n) }, "Inspector");
|
2526
2529
|
}
|
2527
|
-
class
|
2530
|
+
class pi extends ta {
|
2528
2531
|
constructor(a) {
|
2529
2532
|
super(a);
|
2530
|
-
|
2533
|
+
H(this, "three");
|
2531
2534
|
// Private
|
2532
|
-
|
2535
|
+
H(this, "setScene", (a) => {
|
2533
2536
|
this.setState(() => ({
|
2534
2537
|
scene: a.value
|
2535
2538
|
}));
|
2536
2539
|
});
|
2537
2540
|
this.state = {
|
2538
2541
|
scene: a.scene !== void 0 ? a.scene : null
|
2539
|
-
}, this.three = a.three,
|
2542
|
+
}, this.three = a.three, j.addEventListener(_.SET_SCENE, this.setScene);
|
2540
2543
|
}
|
2541
2544
|
componentWillUnmount() {
|
2542
|
-
|
2545
|
+
j.removeEventListener(_.SET_SCENE, this.setScene);
|
2543
2546
|
}
|
2544
2547
|
render() {
|
2545
2548
|
var r;
|
2546
2549
|
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
|
2547
2550
|
return /* @__PURE__ */ c.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2548
|
-
/* @__PURE__ */ c.jsx(
|
2549
|
-
/* @__PURE__ */ c.jsx(
|
2551
|
+
/* @__PURE__ */ c.jsx($t, { label: e, open: !0, children: /* @__PURE__ */ c.jsx(c.Fragment, { children: a && /* @__PURE__ */ c.jsx(Aa, { child: this.componentState.scene, three: this.three }) }) }),
|
2552
|
+
/* @__PURE__ */ c.jsx(Ka, { three: this.three })
|
2550
2553
|
] }) }, "SidePanel");
|
2551
2554
|
}
|
2552
2555
|
// Getters / Setters
|
@@ -2554,7 +2557,7 @@ class fi extends Qn {
|
|
2554
2557
|
return this.state;
|
2555
2558
|
}
|
2556
2559
|
}
|
2557
|
-
function
|
2560
|
+
function mi(t) {
|
2558
2561
|
function n() {
|
2559
2562
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2560
2563
|
}
|
@@ -2579,7 +2582,7 @@ function hi(t) {
|
|
2579
2582
|
if (!n())
|
2580
2583
|
return;
|
2581
2584
|
const d = l.value;
|
2582
|
-
|
2585
|
+
Ft(d.value).then((p) => {
|
2583
2586
|
e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
|
2584
2587
|
});
|
2585
2588
|
}, u = (l) => {
|
@@ -2594,12 +2597,12 @@ function hi(t) {
|
|
2594
2597
|
console.log("Error requesting method:"), console.log(C), console.log(d), console.log(v);
|
2595
2598
|
}
|
2596
2599
|
};
|
2597
|
-
return Fe(() => (
|
2598
|
-
|
2600
|
+
return Fe(() => (j.addEventListener(_.GET_OBJECT, a), j.addEventListener(_.UPDATE_OBJECT, r), j.addEventListener(_.CREATE_TEXTURE, s), j.addEventListener(_.REQUEST_METHOD, u), () => {
|
2601
|
+
j.removeEventListener(_.GET_OBJECT, a), j.removeEventListener(_.UPDATE_OBJECT, r), j.removeEventListener(_.CREATE_TEXTURE, s), j.removeEventListener(_.REQUEST_METHOD, u);
|
2599
2602
|
}), []), null;
|
2600
2603
|
}
|
2601
|
-
const
|
2602
|
-
class
|
2604
|
+
const tn = { type: "change" }, It = { type: "start" }, nn = { type: "end" }, wt = new $n(), an = new Gn(), Xa = Math.cos(70 * Vn.DEG2RAD);
|
2605
|
+
class qa extends cn {
|
2603
2606
|
constructor(n, a) {
|
2604
2607
|
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), 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: He.ROTATE, TWO: He.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2605
2608
|
return l.phi;
|
@@ -2608,42 +2611,42 @@ class Ka extends sn {
|
|
2608
2611
|
}, this.getDistance = function() {
|
2609
2612
|
return this.object.position.distanceTo(this.target);
|
2610
2613
|
}, this.listenToKeyEvents = function(o) {
|
2611
|
-
o.addEventListener("keydown",
|
2614
|
+
o.addEventListener("keydown", nt), this._domElementKeyEvents = o;
|
2612
2615
|
}, this.stopListenToKeyEvents = function() {
|
2613
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
2616
|
+
this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
|
2614
2617
|
}, this.saveState = function() {
|
2615
2618
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2616
2619
|
}, this.reset = function() {
|
2617
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(
|
2620
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), s = r.NONE;
|
2618
2621
|
}, this.update = function() {
|
2619
|
-
const o = new Y(), y = new
|
2620
|
-
return function(
|
2622
|
+
const o = new Y(), y = new Ht().setFromUnitVectors(n.up, new Y(0, 1, 0)), D = y.clone().invert(), N = new Y(), te = new Ht(), be = new Y(), ue = 2 * Math.PI;
|
2623
|
+
return function(Et = null) {
|
2621
2624
|
const ye = e.object.position;
|
2622
|
-
o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && B(b(
|
2625
|
+
o.copy(ye).sub(e.target), o.applyQuaternion(y), l.setFromVector3(o), e.autoRotate && s === r.NONE && B(b(Et)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
|
2623
2626
|
let he = e.minAzimuthAngle, pe = e.maxAzimuthAngle;
|
2624
|
-
isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius =
|
2627
|
+
isFinite(he) && isFinite(pe) && (he < -Math.PI ? he += ue : he > Math.PI && (he -= ue), pe < -Math.PI ? pe += ue : pe > Math.PI && (pe -= ue), he <= pe ? l.theta = Math.max(he, Math.min(pe, l.theta)) : l.theta = l.theta > (he + pe) / 2 ? Math.max(he, l.theta) : Math.min(pe, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && ee || e.object.isOrthographicCamera ? l.radius = q(l.radius) : l.radius = q(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(D), ye.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
|
2625
2628
|
let Ve = !1;
|
2626
2629
|
if (e.zoomToCursor && ee) {
|
2627
|
-
let
|
2630
|
+
let De = null;
|
2628
2631
|
if (e.object.isPerspectiveCamera) {
|
2629
2632
|
const Te = o.length();
|
2630
|
-
|
2631
|
-
const ze = Te -
|
2633
|
+
De = q(Te * p);
|
2634
|
+
const ze = Te - De;
|
2632
2635
|
e.object.position.addScaledVector(fe, ze), e.object.updateMatrixWorld();
|
2633
2636
|
} else if (e.object.isOrthographicCamera) {
|
2634
2637
|
const Te = new Y(le.x, le.y, 0);
|
2635
2638
|
Te.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), Ve = !0;
|
2636
2639
|
const ze = new Y(le.x, le.y, 0);
|
2637
|
-
ze.unproject(e.object), e.object.position.sub(ze).add(Te), e.object.updateMatrixWorld(),
|
2640
|
+
ze.unproject(e.object), e.object.position.sub(ze).add(Te), e.object.updateMatrixWorld(), De = o.length();
|
2638
2641
|
} else
|
2639
2642
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2640
|
-
|
2643
|
+
De !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(De).add(e.object.position) : (wt.origin.copy(e.object.position), wt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(wt.direction)) < Xa ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), wt.intersectPlane(an, e.target))));
|
2641
2644
|
} else
|
2642
2645
|
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), Ve = !0);
|
2643
|
-
return p = 1, ee = !1, Ve || N.distanceToSquared(e.object.position) > u || 8 * (1 - te.dot(e.object.quaternion)) > u || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(
|
2646
|
+
return p = 1, ee = !1, Ve || N.distanceToSquared(e.object.position) > u || 8 * (1 - te.dot(e.object.quaternion)) > u || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), N.copy(e.object.position), te.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
|
2644
2647
|
};
|
2645
2648
|
}(), this.dispose = function() {
|
2646
|
-
e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown",
|
2649
|
+
e.domElement.removeEventListener("contextmenu", Oe), e.domElement.removeEventListener("pointerdown", et), e.domElement.removeEventListener("pointercancel", ke), e.domElement.removeEventListener("wheel", mt), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
|
2647
2650
|
};
|
2648
2651
|
const e = this, r = {
|
2649
2652
|
NONE: -1,
|
@@ -2656,9 +2659,9 @@ class Ka extends sn {
|
|
2656
2659
|
TOUCH_DOLLY_ROTATE: 6
|
2657
2660
|
};
|
2658
2661
|
let s = r.NONE;
|
2659
|
-
const u = 1e-6, l = new
|
2662
|
+
const u = 1e-6, l = new Kt(), d = new Kt();
|
2660
2663
|
let p = 1;
|
2661
|
-
const v = new Y(), E = new de(), x = new de(), C = new de(), M = new de(), G = new de(), se = new de(),
|
2664
|
+
const v = new Y(), E = new de(), x = new de(), C = new de(), M = new de(), G = new de(), se = new de(), K = new de(), S = new de(), X = new de(), fe = new Y(), le = new de();
|
2662
2665
|
let ee = !1;
|
2663
2666
|
const f = [], m = {};
|
2664
2667
|
function b(o) {
|
@@ -2676,25 +2679,25 @@ class Ka extends sn {
|
|
2676
2679
|
}
|
2677
2680
|
const F = function() {
|
2678
2681
|
const o = new Y();
|
2679
|
-
return function(
|
2680
|
-
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-
|
2682
|
+
return function(D, N) {
|
2683
|
+
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-D), v.add(o);
|
2681
2684
|
};
|
2682
|
-
}(),
|
2685
|
+
}(), A = function() {
|
2683
2686
|
const o = new Y();
|
2684
|
-
return function(
|
2685
|
-
e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(
|
2687
|
+
return function(D, N) {
|
2688
|
+
e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(D), v.add(o);
|
2686
2689
|
};
|
2687
2690
|
}(), U = function() {
|
2688
2691
|
const o = new Y();
|
2689
|
-
return function(
|
2692
|
+
return function(D, N) {
|
2690
2693
|
const te = e.domElement;
|
2691
2694
|
if (e.object.isPerspectiveCamera) {
|
2692
2695
|
const be = e.object.position;
|
2693
2696
|
o.copy(be).sub(e.target);
|
2694
2697
|
let ue = o.length();
|
2695
|
-
ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), F(2 *
|
2698
|
+
ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), F(2 * D * ue / te.clientHeight, e.object.matrix), A(2 * N * ue / te.clientHeight, e.object.matrix);
|
2696
2699
|
} else
|
2697
|
-
e.object.isOrthographicCamera ? (F(
|
2700
|
+
e.object.isOrthographicCamera ? (F(D * (e.object.right - e.object.left) / e.object.zoom / te.clientWidth, e.object.matrix), A(N * (e.object.top - e.object.bottom) / e.object.zoom / te.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
|
2698
2701
|
};
|
2699
2702
|
}();
|
2700
2703
|
function J(o) {
|
@@ -2707,36 +2710,36 @@ class Ka extends sn {
|
|
2707
2710
|
if (!e.zoomToCursor)
|
2708
2711
|
return;
|
2709
2712
|
ee = !0;
|
2710
|
-
const
|
2713
|
+
const D = e.domElement.getBoundingClientRect(), N = o - D.left, te = y - D.top, be = D.width, ue = D.height;
|
2711
2714
|
le.x = N / be * 2 - 1, le.y = -(te / ue) * 2 + 1, fe.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
2712
2715
|
}
|
2713
|
-
function
|
2716
|
+
function q(o) {
|
2714
2717
|
return Math.max(e.minDistance, Math.min(e.maxDistance, o));
|
2715
2718
|
}
|
2716
2719
|
function me(o) {
|
2717
2720
|
E.set(o.clientX, o.clientY);
|
2718
2721
|
}
|
2719
2722
|
function Re(o) {
|
2720
|
-
I(o.clientX, o.clientX),
|
2723
|
+
I(o.clientX, o.clientX), K.set(o.clientX, o.clientY);
|
2721
2724
|
}
|
2722
|
-
function
|
2725
|
+
function Ze(o) {
|
2723
2726
|
M.set(o.clientX, o.clientY);
|
2724
2727
|
}
|
2725
|
-
function
|
2728
|
+
function ut(o) {
|
2726
2729
|
x.set(o.clientX, o.clientY), C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2727
2730
|
const y = e.domElement;
|
2728
2731
|
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x), e.update();
|
2729
2732
|
}
|
2730
|
-
function
|
2731
|
-
S.set(o.clientX, o.clientY),
|
2733
|
+
function Mt(o) {
|
2734
|
+
S.set(o.clientX, o.clientY), X.subVectors(S, K), X.y > 0 ? J(O(X.y)) : X.y < 0 && R(O(X.y)), K.copy(S), e.update();
|
2732
2735
|
}
|
2733
|
-
function
|
2736
|
+
function Rt(o) {
|
2734
2737
|
G.set(o.clientX, o.clientY), se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G), e.update();
|
2735
2738
|
}
|
2736
|
-
function
|
2739
|
+
function Je(o) {
|
2737
2740
|
I(o.clientX, o.clientY), o.deltaY < 0 ? R(O(o.deltaY)) : o.deltaY > 0 && J(O(o.deltaY)), e.update();
|
2738
2741
|
}
|
2739
|
-
function
|
2742
|
+
function Qe(o) {
|
2740
2743
|
let y = !1;
|
2741
2744
|
switch (o.code) {
|
2742
2745
|
case e.keys.UP:
|
@@ -2758,70 +2761,70 @@ class Ka extends sn {
|
|
2758
2761
|
if (f.length === 1)
|
2759
2762
|
E.set(o.pageX, o.pageY);
|
2760
2763
|
else {
|
2761
|
-
const y = ve(o),
|
2762
|
-
E.set(
|
2764
|
+
const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
|
2765
|
+
E.set(D, N);
|
2763
2766
|
}
|
2764
2767
|
}
|
2765
2768
|
function $e(o) {
|
2766
2769
|
if (f.length === 1)
|
2767
2770
|
M.set(o.pageX, o.pageY);
|
2768
2771
|
else {
|
2769
|
-
const y = ve(o),
|
2770
|
-
M.set(
|
2772
|
+
const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
|
2773
|
+
M.set(D, N);
|
2771
2774
|
}
|
2772
2775
|
}
|
2773
|
-
function
|
2774
|
-
const y = ve(o),
|
2775
|
-
|
2776
|
+
function je(o) {
|
2777
|
+
const y = ve(o), D = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(D * D + N * N);
|
2778
|
+
K.set(0, te);
|
2776
2779
|
}
|
2777
|
-
function
|
2778
|
-
e.enableZoom &&
|
2780
|
+
function Pt(o) {
|
2781
|
+
e.enableZoom && je(o), e.enablePan && $e(o);
|
2779
2782
|
}
|
2780
|
-
function
|
2781
|
-
e.enableZoom &&
|
2783
|
+
function dt(o) {
|
2784
|
+
e.enableZoom && je(o), e.enableRotate && Pe(o);
|
2782
2785
|
}
|
2783
|
-
function
|
2786
|
+
function ft(o) {
|
2784
2787
|
if (f.length == 1)
|
2785
2788
|
x.set(o.pageX, o.pageY);
|
2786
2789
|
else {
|
2787
|
-
const
|
2790
|
+
const D = ve(o), N = 0.5 * (o.pageX + D.x), te = 0.5 * (o.pageY + D.y);
|
2788
2791
|
x.set(N, te);
|
2789
2792
|
}
|
2790
2793
|
C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2791
2794
|
const y = e.domElement;
|
2792
2795
|
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x);
|
2793
2796
|
}
|
2794
|
-
function
|
2797
|
+
function ht(o) {
|
2795
2798
|
if (f.length === 1)
|
2796
2799
|
G.set(o.pageX, o.pageY);
|
2797
2800
|
else {
|
2798
|
-
const y = ve(o),
|
2799
|
-
G.set(
|
2801
|
+
const y = ve(o), D = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
|
2802
|
+
G.set(D, N);
|
2800
2803
|
}
|
2801
2804
|
se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G);
|
2802
2805
|
}
|
2803
|
-
function
|
2804
|
-
const y = ve(o),
|
2805
|
-
S.set(0, te),
|
2806
|
+
function _e(o) {
|
2807
|
+
const y = ve(o), D = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(D * D + N * N);
|
2808
|
+
S.set(0, te), X.set(0, Math.pow(S.y / K.y, e.zoomSpeed)), J(X.y), K.copy(S);
|
2806
2809
|
const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
|
2807
2810
|
I(be, ue);
|
2808
2811
|
}
|
2809
2812
|
function Ge(o) {
|
2810
|
-
e.enableZoom &&
|
2813
|
+
e.enableZoom && _e(o), e.enablePan && ht(o);
|
2811
2814
|
}
|
2812
|
-
function
|
2813
|
-
e.enableZoom &&
|
2815
|
+
function pt(o) {
|
2816
|
+
e.enableZoom && _e(o), e.enableRotate && ft(o);
|
2814
2817
|
}
|
2815
|
-
function
|
2816
|
-
e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)),
|
2818
|
+
function et(o) {
|
2819
|
+
e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", Se), e.domElement.addEventListener("pointerup", ke)), _t(o), o.pointerType === "touch" ? gt(o) : jt(o));
|
2817
2820
|
}
|
2818
2821
|
function Se(o) {
|
2819
|
-
e.enabled !== !1 && (o.pointerType === "touch" ?
|
2822
|
+
e.enabled !== !1 && (o.pointerType === "touch" ? vt(o) : tt(o));
|
2820
2823
|
}
|
2821
2824
|
function ke(o) {
|
2822
|
-
|
2825
|
+
bt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", Se), e.domElement.removeEventListener("pointerup", ke)), e.dispatchEvent(nn), s = r.NONE;
|
2823
2826
|
}
|
2824
|
-
function
|
2827
|
+
function jt(o) {
|
2825
2828
|
let y;
|
2826
2829
|
switch (o.button) {
|
2827
2830
|
case 0:
|
@@ -2846,7 +2849,7 @@ class Ka extends sn {
|
|
2846
2849
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2847
2850
|
if (e.enablePan === !1)
|
2848
2851
|
return;
|
2849
|
-
|
2852
|
+
Ze(o), s = r.PAN;
|
2850
2853
|
} else {
|
2851
2854
|
if (e.enableRotate === !1)
|
2852
2855
|
return;
|
@@ -2861,41 +2864,41 @@ class Ka extends sn {
|
|
2861
2864
|
} else {
|
2862
2865
|
if (e.enablePan === !1)
|
2863
2866
|
return;
|
2864
|
-
|
2867
|
+
Ze(o), s = r.PAN;
|
2865
2868
|
}
|
2866
2869
|
break;
|
2867
2870
|
default:
|
2868
2871
|
s = r.NONE;
|
2869
2872
|
}
|
2870
|
-
s !== r.NONE && e.dispatchEvent(
|
2873
|
+
s !== r.NONE && e.dispatchEvent(It);
|
2871
2874
|
}
|
2872
|
-
function
|
2875
|
+
function tt(o) {
|
2873
2876
|
switch (s) {
|
2874
2877
|
case r.ROTATE:
|
2875
2878
|
if (e.enableRotate === !1)
|
2876
2879
|
return;
|
2877
|
-
|
2880
|
+
ut(o);
|
2878
2881
|
break;
|
2879
2882
|
case r.DOLLY:
|
2880
2883
|
if (e.enableZoom === !1)
|
2881
2884
|
return;
|
2882
|
-
|
2885
|
+
Mt(o);
|
2883
2886
|
break;
|
2884
2887
|
case r.PAN:
|
2885
2888
|
if (e.enablePan === !1)
|
2886
2889
|
return;
|
2887
|
-
|
2890
|
+
Rt(o);
|
2888
2891
|
break;
|
2889
2892
|
}
|
2890
2893
|
}
|
2891
|
-
function
|
2892
|
-
e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(
|
2894
|
+
function mt(o) {
|
2895
|
+
e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(It), Je(o), e.dispatchEvent(nn));
|
2893
2896
|
}
|
2894
|
-
function
|
2895
|
-
e.enabled === !1 || e.enablePan === !1 ||
|
2897
|
+
function nt(o) {
|
2898
|
+
e.enabled === !1 || e.enablePan === !1 || Qe(o);
|
2896
2899
|
}
|
2897
|
-
function
|
2898
|
-
switch (
|
2900
|
+
function gt(o) {
|
2901
|
+
switch (at(o), f.length) {
|
2899
2902
|
case 1:
|
2900
2903
|
switch (e.touches.ONE) {
|
2901
2904
|
case He.ROTATE:
|
@@ -2917,12 +2920,12 @@ class Ka extends sn {
|
|
2917
2920
|
case He.DOLLY_PAN:
|
2918
2921
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2919
2922
|
return;
|
2920
|
-
|
2923
|
+
Pt(o), s = r.TOUCH_DOLLY_PAN;
|
2921
2924
|
break;
|
2922
2925
|
case He.DOLLY_ROTATE:
|
2923
2926
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2924
2927
|
return;
|
2925
|
-
|
2928
|
+
dt(o), s = r.TOUCH_DOLLY_ROTATE;
|
2926
2929
|
break;
|
2927
2930
|
default:
|
2928
2931
|
s = r.NONE;
|
@@ -2931,19 +2934,19 @@ class Ka extends sn {
|
|
2931
2934
|
default:
|
2932
2935
|
s = r.NONE;
|
2933
2936
|
}
|
2934
|
-
s !== r.NONE && e.dispatchEvent(
|
2937
|
+
s !== r.NONE && e.dispatchEvent(It);
|
2935
2938
|
}
|
2936
|
-
function
|
2937
|
-
switch (
|
2939
|
+
function vt(o) {
|
2940
|
+
switch (at(o), s) {
|
2938
2941
|
case r.TOUCH_ROTATE:
|
2939
2942
|
if (e.enableRotate === !1)
|
2940
2943
|
return;
|
2941
|
-
|
2944
|
+
ft(o), e.update();
|
2942
2945
|
break;
|
2943
2946
|
case r.TOUCH_PAN:
|
2944
2947
|
if (e.enablePan === !1)
|
2945
2948
|
return;
|
2946
|
-
|
2949
|
+
ht(o), e.update();
|
2947
2950
|
break;
|
2948
2951
|
case r.TOUCH_DOLLY_PAN:
|
2949
2952
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
@@ -2953,7 +2956,7 @@ class Ka extends sn {
|
|
2953
2956
|
case r.TOUCH_DOLLY_ROTATE:
|
2954
2957
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2955
2958
|
return;
|
2956
|
-
|
2959
|
+
pt(o), e.update();
|
2957
2960
|
break;
|
2958
2961
|
default:
|
2959
2962
|
s = r.NONE;
|
@@ -2962,10 +2965,10 @@ class Ka extends sn {
|
|
2962
2965
|
function Oe(o) {
|
2963
2966
|
e.enabled !== !1 && o.preventDefault();
|
2964
2967
|
}
|
2965
|
-
function
|
2968
|
+
function _t(o) {
|
2966
2969
|
f.push(o.pointerId);
|
2967
2970
|
}
|
2968
|
-
function
|
2971
|
+
function bt(o) {
|
2969
2972
|
delete m[o.pointerId];
|
2970
2973
|
for (let y = 0; y < f.length; y++)
|
2971
2974
|
if (f[y] == o.pointerId) {
|
@@ -2973,7 +2976,7 @@ class Ka extends sn {
|
|
2973
2976
|
return;
|
2974
2977
|
}
|
2975
2978
|
}
|
2976
|
-
function
|
2979
|
+
function at(o) {
|
2977
2980
|
let y = m[o.pointerId];
|
2978
2981
|
y === void 0 && (y = new de(), m[o.pointerId] = y), y.set(o.pageX, o.pageY);
|
2979
2982
|
}
|
@@ -2981,10 +2984,10 @@ class Ka extends sn {
|
|
2981
2984
|
const y = o.pointerId === f[0] ? f[1] : f[0];
|
2982
2985
|
return m[y];
|
2983
2986
|
}
|
2984
|
-
e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown",
|
2987
|
+
e.domElement.addEventListener("contextmenu", Oe), e.domElement.addEventListener("pointerdown", et), e.domElement.addEventListener("pointercancel", ke), e.domElement.addEventListener("wheel", mt, { passive: !1 }), this.update();
|
2985
2988
|
}
|
2986
2989
|
}
|
2987
|
-
const
|
2990
|
+
const St = (t) => {
|
2988
2991
|
const [n, a] = oe(t.options[t.index]), e = () => {
|
2989
2992
|
t.onToggle(!t.open);
|
2990
2993
|
}, r = (s) => {
|
@@ -2994,14 +2997,14 @@ const xt = (t) => {
|
|
2994
2997
|
/* @__PURE__ */ c.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
2995
2998
|
t.open && /* @__PURE__ */ c.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ c.jsx("li", { onClick: () => r(s), children: s }, s)) })
|
2996
2999
|
] });
|
2997
|
-
}, Ie =
|
3000
|
+
}, Ie = na(function(n, a) {
|
2998
3001
|
const [e, r] = oe(!1), s = n.options.indexOf(n.camera.name);
|
2999
3002
|
return /* @__PURE__ */ c.jsxs("div", { className: "CameraWindow", children: [
|
3000
3003
|
/* @__PURE__ */ c.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
3001
3004
|
e && r(!1);
|
3002
3005
|
} }),
|
3003
3006
|
/* @__PURE__ */ c.jsx(
|
3004
|
-
|
3007
|
+
St,
|
3005
3008
|
{
|
3006
3009
|
index: s,
|
3007
3010
|
open: e,
|
@@ -3014,14 +3017,14 @@ const xt = (t) => {
|
|
3014
3017
|
}
|
3015
3018
|
)
|
3016
3019
|
] });
|
3017
|
-
}),
|
3020
|
+
}), rn = [
|
3018
3021
|
"Single",
|
3019
3022
|
"Side by Side",
|
3020
3023
|
"Stacked",
|
3021
3024
|
"Quad"
|
3022
3025
|
], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
|
3023
3026
|
function Be(t, n) {
|
3024
|
-
const a = new
|
3027
|
+
const a = new dn(-100, 100, 100, -100, 50, 3e3);
|
3025
3028
|
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
|
3026
3029
|
}
|
3027
3030
|
Be("Top", new Y(0, 1e3, 0));
|
@@ -3031,47 +3034,47 @@ Be("Right", new Y(1e3, 0, 0));
|
|
3031
3034
|
Be("Front", new Y(0, 0, 1e3));
|
3032
3035
|
Be("Back", new Y(0, 0, -1e3));
|
3033
3036
|
Be("Orthographic", new Y(1e3, 1e3, 1e3));
|
3034
|
-
const
|
3035
|
-
|
3036
|
-
|
3037
|
-
|
3038
|
-
ne.set("Debug",
|
3039
|
-
const
|
3037
|
+
const Tt = new Nt(60, 1, 50, 3e3);
|
3038
|
+
Tt.name = "Debug";
|
3039
|
+
Tt.position.set(500, 500, 500);
|
3040
|
+
Tt.lookAt(0, 0, 0);
|
3041
|
+
ne.set("Debug", Tt);
|
3042
|
+
const on = [
|
3040
3043
|
"Renderer",
|
3041
3044
|
"Depth",
|
3042
3045
|
"Normals",
|
3043
3046
|
"UVs",
|
3044
3047
|
"Wireframe"
|
3045
|
-
],
|
3048
|
+
], Za = new zn(), Ja = new Yn(), Qa = new Da(), ei = new Wn({
|
3046
3049
|
opacity: 0.33,
|
3047
3050
|
transparent: !0,
|
3048
3051
|
wireframe: !0
|
3049
3052
|
});
|
3050
|
-
let
|
3051
|
-
const z = new
|
3053
|
+
let xt = "Renderer";
|
3054
|
+
const z = new fn();
|
3052
3055
|
z.name = "Debug Scene";
|
3053
|
-
let xe = new
|
3056
|
+
let xe = new fn();
|
3054
3057
|
z.add(xe);
|
3055
|
-
const
|
3056
|
-
|
3057
|
-
z.add(
|
3058
|
-
const
|
3059
|
-
|
3060
|
-
const
|
3061
|
-
|
3062
|
-
|
3063
|
-
const
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
let
|
3068
|
-
function
|
3069
|
-
const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, u] = oe(!1), [l, d] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), G = Ce(null), se = Ce(null),
|
3058
|
+
const lt = new Hn();
|
3059
|
+
lt.name = "helpers";
|
3060
|
+
z.add(lt);
|
3061
|
+
const ti = new ja();
|
3062
|
+
lt.add(ti);
|
3063
|
+
const Sn = new hn(500);
|
3064
|
+
Sn.name = "axisHelper";
|
3065
|
+
lt.add(Sn);
|
3066
|
+
const ct = new hn(100);
|
3067
|
+
ct.name = "interactionHelper";
|
3068
|
+
lt.add(ct);
|
3069
|
+
ct.visible = !1;
|
3070
|
+
let Ct = !1, V = ne.get("Debug"), re = ne.get("Orthographic"), Ne = ne.get("Front"), Le = ne.get("Top"), sn = !1;
|
3071
|
+
function gi(t) {
|
3072
|
+
const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, u] = oe(!1), [l, d] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), G = Ce(null), se = Ce(null), K = Ce(null), S = (f, m) => {
|
3070
3073
|
const b = ie.get(f.name);
|
3071
3074
|
b !== void 0 && b.dispose(), ie.delete(f.name);
|
3072
3075
|
const O = we.get(f.name);
|
3073
3076
|
O !== void 0 && (z.remove(O), O.dispose()), we.delete(f.name);
|
3074
|
-
const B = new
|
3077
|
+
const B = new qa(f, m);
|
3075
3078
|
switch (B.enableDamping = !0, B.dampingFactor = 0.05, f.name) {
|
3076
3079
|
case "Top":
|
3077
3080
|
case "Bottom":
|
@@ -3082,11 +3085,11 @@ function pi(t) {
|
|
3082
3085
|
B.enableRotate = !1;
|
3083
3086
|
break;
|
3084
3087
|
}
|
3085
|
-
if (ie.set(f.name, B), f instanceof
|
3086
|
-
const $ = new
|
3088
|
+
if (ie.set(f.name, B), f instanceof Nt) {
|
3089
|
+
const $ = new qn(f);
|
3087
3090
|
we.set(f.name, $), z.add($);
|
3088
3091
|
}
|
3089
|
-
},
|
3092
|
+
}, X = (f) => {
|
3090
3093
|
const m = we.get(f.name);
|
3091
3094
|
m !== void 0 && (z.remove(m), m.dispose(), we.delete(f.name));
|
3092
3095
|
const b = ie.get(f.name);
|
@@ -3107,23 +3110,23 @@ function pi(t) {
|
|
3107
3110
|
S(V, M.current), S(re, G.current);
|
3108
3111
|
break;
|
3109
3112
|
case "Quad":
|
3110
|
-
S(V, M.current), S(re, G.current), S(Ne, se.current), S(Le,
|
3113
|
+
S(V, M.current), S(re, G.current), S(Ne, se.current), S(Le, K.current);
|
3111
3114
|
break;
|
3112
3115
|
}
|
3113
3116
|
};
|
3114
3117
|
Fe(() => {
|
3115
|
-
const f = new
|
3118
|
+
const f = new Kn({
|
3116
3119
|
canvas: x.current,
|
3117
3120
|
stencil: !1
|
3118
3121
|
});
|
3119
3122
|
f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
|
3120
3123
|
}, []), Fe(() => {
|
3121
3124
|
const f = (O) => {
|
3122
|
-
|
3125
|
+
vn(xe), z.remove(xe);
|
3123
3126
|
const B = t.scenes.get(O.value.name);
|
3124
3127
|
if (B !== void 0) {
|
3125
3128
|
const $ = new B();
|
3126
|
-
t.onSceneSet !== void 0 && t.onSceneSet($), xe = $, t.three.scene = xe, z.add(xe),
|
3129
|
+
t.onSceneSet !== void 0 && t.onSceneSet($), xe = $, t.three.scene = xe, z.add(xe), sn = !0;
|
3127
3130
|
}
|
3128
3131
|
}, m = (O) => {
|
3129
3132
|
var F;
|
@@ -3132,8 +3135,8 @@ function pi(t) {
|
|
3132
3135
|
}, b = (O) => {
|
3133
3136
|
ne.delete(O.value.name), E(Date.now());
|
3134
3137
|
};
|
3135
|
-
return
|
3136
|
-
|
3138
|
+
return j.addEventListener(_.SET_SCENE, f), j.addEventListener(_.ADD_CAMERA, m), j.addEventListener(_.REMOVE_CAMERA, b), () => {
|
3139
|
+
j.removeEventListener(_.SET_SCENE, f), j.removeEventListener(_.ADD_CAMERA, m), j.removeEventListener(_.REMOVE_CAMERA, b);
|
3137
3140
|
};
|
3138
3141
|
}, []), Fe(() => {
|
3139
3142
|
if (e === null)
|
@@ -3153,13 +3156,13 @@ function pi(t) {
|
|
3153
3156
|
R = b, I = O;
|
3154
3157
|
break;
|
3155
3158
|
}
|
3156
|
-
ne.forEach((
|
3159
|
+
ne.forEach((q) => {
|
3157
3160
|
var me;
|
3158
|
-
|
3161
|
+
q instanceof dn ? (q.left = R / -2, q.right = R / 2, q.top = I / 2, q.bottom = I / -2, q.updateProjectionMatrix()) : q instanceof Nt && (q.aspect = R / I, q.updateProjectionMatrix(), (me = we.get(q.name)) == null || me.update());
|
3159
3162
|
});
|
3160
3163
|
}, F = () => {
|
3161
3164
|
e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(z, V);
|
3162
|
-
},
|
3165
|
+
}, A = () => {
|
3163
3166
|
if (n === "Side by Side")
|
3164
3167
|
e.setViewport(0, 0, b, m), e.setScissor(0, 0, b, m), e.render(z, V), e.setViewport(b, 0, b, m), e.setScissor(b, 0, b, m), e.render(z, re);
|
3165
3168
|
else {
|
@@ -3172,13 +3175,13 @@ function pi(t) {
|
|
3172
3175
|
}, J = () => {
|
3173
3176
|
switch (ie.forEach((R) => {
|
3174
3177
|
R.update();
|
3175
|
-
}), t.onSceneUpdate !== void 0 &&
|
3178
|
+
}), t.onSceneUpdate !== void 0 && sn && t.onSceneUpdate(xe), e.clear(), n) {
|
3176
3179
|
case "Single":
|
3177
3180
|
F();
|
3178
3181
|
break;
|
3179
3182
|
case "Side by Side":
|
3180
3183
|
case "Stacked":
|
3181
|
-
|
3184
|
+
A();
|
3182
3185
|
break;
|
3183
3186
|
case "Quad":
|
3184
3187
|
U();
|
@@ -3191,10 +3194,10 @@ function pi(t) {
|
|
3191
3194
|
};
|
3192
3195
|
}, [n, e]), Fe(() => {
|
3193
3196
|
if (e !== null) {
|
3194
|
-
const f = new
|
3197
|
+
const f = new Xn(), m = new de(), b = (F, A, U, J) => {
|
3195
3198
|
switch (n) {
|
3196
3199
|
case "Quad":
|
3197
|
-
F < U ?
|
3200
|
+
F < U ? A < J ? f.setFromCamera(m, V) : f.setFromCamera(m, Ne) : A < J ? f.setFromCamera(m, re) : f.setFromCamera(m, Le);
|
3198
3201
|
break;
|
3199
3202
|
case "Side by Side":
|
3200
3203
|
F < U ? f.setFromCamera(m, V) : f.setFromCamera(m, re);
|
@@ -3203,27 +3206,27 @@ function pi(t) {
|
|
3203
3206
|
f.setFromCamera(m, V);
|
3204
3207
|
break;
|
3205
3208
|
case "Stacked":
|
3206
|
-
|
3209
|
+
A < J ? f.setFromCamera(m, V) : f.setFromCamera(m, re);
|
3207
3210
|
break;
|
3208
3211
|
}
|
3209
3212
|
}, O = (F) => {
|
3210
|
-
if (!
|
3213
|
+
if (!Ct)
|
3211
3214
|
return;
|
3212
|
-
const
|
3213
|
-
e.getSize(
|
3214
|
-
const U = Math.min(F.clientX,
|
3215
|
-
m.x = Ke(U, 0,
|
3216
|
-
const R =
|
3217
|
-
U < R ? m.x = Ke(U, 0, R, -1, 1) : m.x = Ke(U, R,
|
3215
|
+
const A = new de();
|
3216
|
+
e.getSize(A);
|
3217
|
+
const U = Math.min(F.clientX, A.x), J = Math.min(F.clientY, A.y);
|
3218
|
+
m.x = Ke(U, 0, A.x, -1, 1), m.y = Ke(J, 0, A.y, 1, -1);
|
3219
|
+
const R = A.x / 2, I = A.y / 2, q = () => {
|
3220
|
+
U < R ? m.x = Ke(U, 0, R, -1, 1) : m.x = Ke(U, R, A.x, -1, 1);
|
3218
3221
|
}, me = () => {
|
3219
|
-
J < I ? m.y = Ke(J, 0, I, 1, -1) : m.y = Ke(J, I,
|
3222
|
+
J < I ? m.y = Ke(J, 0, I, 1, -1) : m.y = Ke(J, I, A.y, 1, -1);
|
3220
3223
|
};
|
3221
3224
|
switch (n) {
|
3222
3225
|
case "Quad":
|
3223
|
-
|
3226
|
+
q(), me();
|
3224
3227
|
break;
|
3225
3228
|
case "Side by Side":
|
3226
|
-
|
3229
|
+
q();
|
3227
3230
|
break;
|
3228
3231
|
case "Stacked":
|
3229
3232
|
me(), me();
|
@@ -3231,12 +3234,12 @@ function pi(t) {
|
|
3231
3234
|
}
|
3232
3235
|
b(U, J, R, I);
|
3233
3236
|
const Re = f.intersectObjects(xe.children);
|
3234
|
-
Re.length > 0 &&
|
3237
|
+
Re.length > 0 && ct.position.copy(Re[0].point);
|
3235
3238
|
}, B = (F) => {
|
3236
|
-
if (!
|
3239
|
+
if (!Ct)
|
3237
3240
|
return;
|
3238
|
-
const
|
3239
|
-
if (e.getSize(
|
3241
|
+
const A = new de();
|
3242
|
+
if (e.getSize(A), F.clientX >= A.x)
|
3240
3243
|
return;
|
3241
3244
|
O(F);
|
3242
3245
|
const U = f.intersectObjects(xe.children);
|
@@ -3257,20 +3260,20 @@ function pi(t) {
|
|
3257
3260
|
var b;
|
3258
3261
|
(b = ie.get(V.name)) == null || b.dispose();
|
3259
3262
|
const m = ne.get(f);
|
3260
|
-
m !== void 0 && (
|
3263
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3261
3264
|
} }) }),
|
3262
3265
|
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
3263
3266
|
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref: M, onSelect: (f) => {
|
3264
3267
|
var b;
|
3265
3268
|
(b = ie.get(V.name)) == null || b.dispose();
|
3266
3269
|
const m = ne.get(f);
|
3267
|
-
m !== void 0 && (
|
3270
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3268
3271
|
} }),
|
3269
3272
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (f) => {
|
3270
3273
|
var b;
|
3271
3274
|
(b = ie.get(re.name)) == null || b.dispose();
|
3272
3275
|
const m = ne.get(f);
|
3273
|
-
m !== void 0 && (
|
3276
|
+
m !== void 0 && (X(re), re = m, S(m, G.current));
|
3274
3277
|
} })
|
3275
3278
|
] }),
|
3276
3279
|
n === "Quad" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
@@ -3278,34 +3281,34 @@ function pi(t) {
|
|
3278
3281
|
var b;
|
3279
3282
|
(b = ie.get(V.name)) == null || b.dispose();
|
3280
3283
|
const m = ne.get(f);
|
3281
|
-
m !== void 0 && (
|
3284
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3282
3285
|
} }),
|
3283
3286
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (f) => {
|
3284
3287
|
var b;
|
3285
3288
|
(b = ie.get(re.name)) == null || b.dispose();
|
3286
3289
|
const m = ne.get(f);
|
3287
|
-
m !== void 0 && (
|
3290
|
+
m !== void 0 && (X(re), re = m, S(m, G.current));
|
3288
3291
|
} }),
|
3289
3292
|
/* @__PURE__ */ c.jsx(Ie, { camera: Ne, options: ee, ref: se, onSelect: (f) => {
|
3290
3293
|
var b;
|
3291
3294
|
(b = ie.get(Ne.name)) == null || b.dispose();
|
3292
3295
|
const m = ne.get(f);
|
3293
|
-
m !== void 0 && (
|
3296
|
+
m !== void 0 && (X(Ne), Ne = m, S(m, se.current));
|
3294
3297
|
} }),
|
3295
|
-
/* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref:
|
3298
|
+
/* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref: K, onSelect: (f) => {
|
3296
3299
|
var b;
|
3297
3300
|
(b = ie.get(Le.name)) == null || b.dispose();
|
3298
3301
|
const m = ne.get(f);
|
3299
|
-
m !== void 0 && (
|
3302
|
+
m !== void 0 && (X(Le), Le = m, S(m, K.current));
|
3300
3303
|
} })
|
3301
3304
|
] })
|
3302
3305
|
] }),
|
3303
3306
|
/* @__PURE__ */ c.jsxs("div", { className: "settings", children: [
|
3304
3307
|
/* @__PURE__ */ c.jsx(
|
3305
|
-
|
3308
|
+
St,
|
3306
3309
|
{
|
3307
|
-
index:
|
3308
|
-
options:
|
3310
|
+
index: rn.indexOf(n),
|
3311
|
+
options: rn,
|
3309
3312
|
onSelect: (f) => {
|
3310
3313
|
f !== n && (fe(), a(f));
|
3311
3314
|
},
|
@@ -3316,28 +3319,28 @@ function pi(t) {
|
|
3316
3319
|
}
|
3317
3320
|
),
|
3318
3321
|
/* @__PURE__ */ c.jsx(
|
3319
|
-
|
3322
|
+
St,
|
3320
3323
|
{
|
3321
|
-
index:
|
3322
|
-
options:
|
3324
|
+
index: on.indexOf(xt),
|
3325
|
+
options: on,
|
3323
3326
|
onSelect: (f) => {
|
3324
|
-
if (f !==
|
3325
|
-
switch (
|
3327
|
+
if (f !== xt)
|
3328
|
+
switch (xt = f, xt) {
|
3326
3329
|
case "Depth":
|
3327
|
-
z.overrideMaterial =
|
3330
|
+
z.overrideMaterial = Za;
|
3328
3331
|
break;
|
3329
3332
|
case "Normals":
|
3330
|
-
z.overrideMaterial =
|
3333
|
+
z.overrideMaterial = Ja;
|
3331
3334
|
break;
|
3332
3335
|
default:
|
3333
3336
|
case "Renderer":
|
3334
3337
|
z.overrideMaterial = null;
|
3335
3338
|
break;
|
3336
3339
|
case "Wireframe":
|
3337
|
-
z.overrideMaterial =
|
3340
|
+
z.overrideMaterial = ei;
|
3338
3341
|
break;
|
3339
3342
|
case "UVs":
|
3340
|
-
z.overrideMaterial =
|
3343
|
+
z.overrideMaterial = Qa;
|
3341
3344
|
break;
|
3342
3345
|
}
|
3343
3346
|
},
|
@@ -3348,7 +3351,7 @@ function pi(t) {
|
|
3348
3351
|
}
|
3349
3352
|
),
|
3350
3353
|
/* @__PURE__ */ c.jsx(
|
3351
|
-
|
3354
|
+
St,
|
3352
3355
|
{
|
3353
3356
|
index: 0,
|
3354
3357
|
options: [
|
@@ -3356,7 +3359,7 @@ function pi(t) {
|
|
3356
3359
|
"Selection Mode"
|
3357
3360
|
],
|
3358
3361
|
onSelect: (f) => {
|
3359
|
-
|
3362
|
+
Ct = f === "Selection Mode", ct.visible = Ct;
|
3360
3363
|
},
|
3361
3364
|
open: p,
|
3362
3365
|
onToggle: (f) => {
|
@@ -3367,7 +3370,7 @@ function pi(t) {
|
|
3367
3370
|
] })
|
3368
3371
|
] });
|
3369
3372
|
}
|
3370
|
-
function
|
3373
|
+
function vi(t) {
|
3371
3374
|
return /* @__PURE__ */ c.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3372
3375
|
/* @__PURE__ */ c.jsx("header", { children: t.header }),
|
3373
3376
|
t.children,
|
@@ -3375,40 +3378,40 @@ function mi(t) {
|
|
3375
3378
|
] });
|
3376
3379
|
}
|
3377
3380
|
export {
|
3378
|
-
|
3379
|
-
|
3380
|
-
|
3381
|
-
|
3382
|
-
|
3383
|
-
|
3384
|
-
|
3385
|
-
|
3386
|
-
|
3387
|
-
|
3388
|
-
|
3389
|
-
|
3390
|
-
|
3391
|
-
|
3392
|
-
|
3393
|
-
|
3394
|
-
|
3395
|
-
|
3396
|
-
|
3397
|
-
|
3398
|
-
|
3399
|
-
|
3400
|
-
|
3401
|
-
|
3402
|
-
|
3403
|
-
|
3404
|
-
|
3405
|
-
|
3406
|
-
|
3407
|
-
|
3408
|
-
|
3409
|
-
|
3410
|
-
|
3411
|
-
|
3412
|
-
|
3413
|
-
|
3381
|
+
$t as Accordion,
|
3382
|
+
fi as Application,
|
3383
|
+
Ot as BaseRemote,
|
3384
|
+
xn as ChildObject,
|
3385
|
+
Aa as ContainerObject,
|
3386
|
+
Sa as Draggable,
|
3387
|
+
Ca as DraggableItem,
|
3388
|
+
Oa as Dropdown,
|
3389
|
+
Ta as DropdownItem,
|
3390
|
+
vi as Editor,
|
3391
|
+
ja as InfiniteGridHelper,
|
3392
|
+
Ka as Inspector,
|
3393
|
+
gi as MultiView,
|
3394
|
+
wn as NavButton,
|
3395
|
+
ca as RemoteComponents,
|
3396
|
+
hi as RemoteController,
|
3397
|
+
qe as RemoteTheatre,
|
3398
|
+
ma as RemoteThree,
|
3399
|
+
En as RemoteTweakpane,
|
3400
|
+
mi as SceneInspector,
|
3401
|
+
pi as SidePanel,
|
3402
|
+
_ as ToolEvents,
|
3403
|
+
Da as UVMaterial,
|
3404
|
+
li as clamp,
|
3405
|
+
ra as colorToHex,
|
3406
|
+
j as debugDispatcher,
|
3407
|
+
vn as dispose,
|
3408
|
+
sa as disposeMaterial,
|
3409
|
+
di as disposeTexture,
|
3410
|
+
ui as distance,
|
3411
|
+
gn as hierarchyUUID,
|
3412
|
+
ia as isColor,
|
3413
|
+
aa as randomID,
|
3414
|
+
oa as resetThreeObjects,
|
3415
|
+
kt as round,
|
3416
|
+
Lt as totalThreeObjects
|
3414
3417
|
};
|