@tomorrowevening/hermes 0.0.18 → 0.0.20
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 +566 -558
- package/dist/hermes.umd.cjs +15 -15
- package/package.json +1 -1
- package/src/core/remote/RemoteTheatre.ts +20 -3
- 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 -1
- 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
|
+
this.project = Zn(a, e);
|
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();
|
@@ -180,6 +179,11 @@ class Ut extends Ct {
|
|
180
179
|
let e = this.sheets.get(a);
|
181
180
|
return e !== void 0 || (e = (r = this.project) == null ? void 0 : r.sheet(a), this.sheets.set(a, e)), e;
|
182
181
|
}
|
182
|
+
clearSheetObjects(a) {
|
183
|
+
this.sheetObjects.forEach((e, r) => {
|
184
|
+
r.search(`${a}_`) > -1 && this.unsubscribe(e);
|
185
|
+
});
|
186
|
+
}
|
183
187
|
sheetObject(a, e, r, s) {
|
184
188
|
if (this.project === void 0) {
|
185
189
|
console.error("Theatre Project hasn't been created yet.");
|
@@ -190,12 +194,12 @@ class Ut extends Ct {
|
|
190
194
|
return;
|
191
195
|
const l = `${a}_${e}`;
|
192
196
|
let d = this.sheetObjects.get(l);
|
193
|
-
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);
|
194
198
|
const p = d.onValuesChange((v) => {
|
195
199
|
if (this.app.editor) {
|
196
200
|
for (const x in v) {
|
197
201
|
const C = v[x];
|
198
|
-
typeof C == "object" &&
|
202
|
+
typeof C == "object" && ia(C) && (v[x] = {
|
199
203
|
r: C.r,
|
200
204
|
g: C.g,
|
201
205
|
b: C.b,
|
@@ -226,19 +230,23 @@ class Ut extends Ct {
|
|
226
230
|
const u = `${e}_${r}`, l = this.sheetObjectUnsubscribe.get(u);
|
227
231
|
l !== void 0 && (this.sheetObjects.delete(u), this.sheetObjectCBs.delete(u), this.sheetObjectUnsubscribe.delete(u), l());
|
228
232
|
}
|
229
|
-
|
230
|
-
|
231
|
-
|
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) {
|
232
240
|
t.components.forEach((a) => {
|
233
|
-
if (a instanceof
|
241
|
+
if (a instanceof qe) {
|
234
242
|
let e;
|
235
243
|
const r = a;
|
236
244
|
switch (n.event) {
|
237
245
|
case "setSheet":
|
238
|
-
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]));
|
239
247
|
break;
|
240
248
|
case "setSheetObject":
|
241
|
-
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]);
|
242
250
|
break;
|
243
251
|
case "updateSheetObject":
|
244
252
|
e = r.sheetObjectCBs.get(n.data.sheetObject), e !== void 0 && e(n.data.values);
|
@@ -250,12 +258,12 @@ function ca(t, n) {
|
|
250
258
|
}
|
251
259
|
});
|
252
260
|
}
|
253
|
-
function
|
261
|
+
function da(t) {
|
254
262
|
if (t.editor) {
|
255
263
|
let n;
|
256
264
|
t.components.forEach((s) => {
|
257
|
-
s instanceof
|
258
|
-
}),
|
265
|
+
s instanceof qe && (n = s);
|
266
|
+
}), st.ui.restore(), st.onSelectionChange((s) => {
|
259
267
|
s.length < 1 || s.forEach((u) => {
|
260
268
|
let l = u.address.sheetId, d = "setSheet", p = {};
|
261
269
|
switch (u.type) {
|
@@ -277,7 +285,7 @@ function la(t) {
|
|
277
285
|
});
|
278
286
|
let a = 0;
|
279
287
|
const e = () => {
|
280
|
-
if (Me !== void 0 && a !== Me.sequence.position) {
|
288
|
+
if (qe.getRafDriver().tick(performance.now()), Me !== void 0 && a !== Me.sequence.position) {
|
281
289
|
a = Me.sequence.position;
|
282
290
|
const s = Me;
|
283
291
|
t.send({
|
@@ -294,9 +302,9 @@ function la(t) {
|
|
294
302
|
};
|
295
303
|
e(), r();
|
296
304
|
} else
|
297
|
-
|
305
|
+
st.ui.hide();
|
298
306
|
}
|
299
|
-
function
|
307
|
+
function fa(t) {
|
300
308
|
if (t.name === "cameras")
|
301
309
|
return "camera";
|
302
310
|
if (t.name === "interactive")
|
@@ -310,7 +318,7 @@ function ua(t) {
|
|
310
318
|
const n = t.type;
|
311
319
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
312
320
|
}
|
313
|
-
function
|
321
|
+
function yn(t) {
|
314
322
|
const n = {
|
315
323
|
name: t.name,
|
316
324
|
type: t.type,
|
@@ -318,10 +326,10 @@ function bn(t) {
|
|
318
326
|
children: []
|
319
327
|
};
|
320
328
|
return t.children.forEach((a) => {
|
321
|
-
n.children.push(
|
329
|
+
n.children.push(yn(a));
|
322
330
|
}), n;
|
323
331
|
}
|
324
|
-
function
|
332
|
+
function ha(t) {
|
325
333
|
const n = {};
|
326
334
|
for (const a in t) {
|
327
335
|
const e = t[a].value;
|
@@ -329,7 +337,7 @@ function da(t) {
|
|
329
337
|
}
|
330
338
|
return n;
|
331
339
|
}
|
332
|
-
function
|
340
|
+
function pa(t) {
|
333
341
|
switch (t) {
|
334
342
|
case "blendSrcAlpha":
|
335
343
|
case "blendDstAlpha":
|
@@ -341,10 +349,10 @@ function fa(t) {
|
|
341
349
|
}
|
342
350
|
return !1;
|
343
351
|
}
|
344
|
-
function
|
352
|
+
function Xt(t) {
|
345
353
|
const n = {};
|
346
354
|
for (const a in t) {
|
347
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
355
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || pa(a))
|
348
356
|
continue;
|
349
357
|
const e = typeof t[a], r = t[a];
|
350
358
|
switch (e) {
|
@@ -356,13 +364,13 @@ function Kt(t) {
|
|
356
364
|
case "object":
|
357
365
|
if (r !== null)
|
358
366
|
if (n[a] = r, r.isTexture)
|
359
|
-
if (r instanceof
|
367
|
+
if (r instanceof ln) {
|
360
368
|
const s = r.source.toJSON();
|
361
369
|
n[a] = { src: s.url };
|
362
370
|
} else
|
363
371
|
r instanceof An && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
|
364
372
|
else
|
365
|
-
a === "uniforms" && (n[a] =
|
373
|
+
a === "uniforms" && (n[a] = ha(n[a]));
|
366
374
|
else
|
367
375
|
n[a] = { src: "" };
|
368
376
|
break;
|
@@ -370,7 +378,7 @@ function Kt(t) {
|
|
370
378
|
}
|
371
379
|
return n;
|
372
380
|
}
|
373
|
-
function
|
381
|
+
function Dt(t) {
|
374
382
|
t.updateMatrix();
|
375
383
|
const n = {
|
376
384
|
name: t.name,
|
@@ -397,10 +405,10 @@ function jt(t) {
|
|
397
405
|
if (Array.isArray(e.material)) {
|
398
406
|
const r = [];
|
399
407
|
e.material.forEach((s) => {
|
400
|
-
r.push(
|
408
|
+
r.push(Xt(s));
|
401
409
|
}), n.material = r;
|
402
410
|
} else
|
403
|
-
n.material =
|
411
|
+
n.material = Xt(e.material);
|
404
412
|
} else
|
405
413
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
406
414
|
fov: t.fov,
|
@@ -450,19 +458,19 @@ function Q(t, n, a) {
|
|
450
458
|
break;
|
451
459
|
}
|
452
460
|
}
|
453
|
-
function
|
461
|
+
function Ft(t) {
|
454
462
|
return new Promise((n, a) => {
|
455
463
|
const e = new Image();
|
456
464
|
e.onload = () => {
|
457
|
-
const r = new
|
458
|
-
r.wrapS =
|
465
|
+
const r = new ln(e);
|
466
|
+
r.wrapS = Wt, r.wrapT = Wt, r.needsUpdate = !0, n(r);
|
459
467
|
}, e.onerror = a, e.src = t;
|
460
468
|
});
|
461
469
|
}
|
462
|
-
class
|
470
|
+
class ma extends Ot {
|
463
471
|
constructor() {
|
464
472
|
super(...arguments);
|
465
|
-
|
473
|
+
H(this, "scene");
|
466
474
|
}
|
467
475
|
getObject(a) {
|
468
476
|
this.app.send({
|
@@ -472,7 +480,7 @@ class ha extends Ct {
|
|
472
480
|
});
|
473
481
|
}
|
474
482
|
setObject(a) {
|
475
|
-
const e =
|
483
|
+
const e = Dt(a);
|
476
484
|
this.app.send({
|
477
485
|
event: "setObject",
|
478
486
|
target: "editor",
|
@@ -515,8 +523,8 @@ class ha extends Ct {
|
|
515
523
|
setScene(a) {
|
516
524
|
if (a === void 0)
|
517
525
|
return;
|
518
|
-
this.scene = a,
|
519
|
-
const e =
|
526
|
+
this.scene = a, oa(), gn(this.scene);
|
527
|
+
const e = yn(this.scene);
|
520
528
|
this.app.send({
|
521
529
|
event: "setScene",
|
522
530
|
target: "editor",
|
@@ -524,7 +532,7 @@ class ha extends Ct {
|
|
524
532
|
});
|
525
533
|
}
|
526
534
|
addCamera(a) {
|
527
|
-
const e =
|
535
|
+
const e = Dt(a);
|
528
536
|
this.app.send({
|
529
537
|
event: "addCamera",
|
530
538
|
target: "editor",
|
@@ -532,7 +540,7 @@ class ha extends Ct {
|
|
532
540
|
});
|
533
541
|
}
|
534
542
|
removeCamera(a) {
|
535
|
-
const e =
|
543
|
+
const e = Dt(a);
|
536
544
|
this.app.send({
|
537
545
|
event: "removeCamera",
|
538
546
|
target: "editor",
|
@@ -540,51 +548,51 @@ class ha extends Ct {
|
|
540
548
|
});
|
541
549
|
}
|
542
550
|
}
|
543
|
-
function
|
551
|
+
function ga(t, n) {
|
544
552
|
switch (n.event) {
|
545
553
|
case "getObject":
|
546
|
-
|
554
|
+
j.dispatchEvent({ type: _.GET_OBJECT, value: n.data });
|
547
555
|
break;
|
548
556
|
case "updateObject":
|
549
|
-
|
557
|
+
j.dispatchEvent({ type: _.UPDATE_OBJECT, value: n.data });
|
550
558
|
break;
|
551
559
|
case "createTexture":
|
552
|
-
|
560
|
+
j.dispatchEvent({ type: _.CREATE_TEXTURE, value: n.data });
|
553
561
|
break;
|
554
562
|
case "requestMethod":
|
555
|
-
|
563
|
+
j.dispatchEvent({ type: _.REQUEST_METHOD, value: n.data });
|
556
564
|
break;
|
557
565
|
}
|
558
566
|
}
|
559
|
-
function
|
567
|
+
function va(t, n) {
|
560
568
|
switch (n.event) {
|
561
569
|
case "setObject":
|
562
|
-
|
570
|
+
j.dispatchEvent({ type: _.SET_OBJECT, value: n.data });
|
563
571
|
break;
|
564
572
|
case "setScene":
|
565
|
-
|
573
|
+
j.dispatchEvent({ type: _.SET_SCENE, value: n.data });
|
566
574
|
break;
|
567
575
|
case "addCamera":
|
568
|
-
|
576
|
+
j.dispatchEvent({ type: _.ADD_CAMERA, value: n.data });
|
569
577
|
break;
|
570
578
|
case "removeCamera":
|
571
|
-
|
579
|
+
j.dispatchEvent({ type: _.REMOVE_CAMERA, value: n.data });
|
572
580
|
break;
|
573
581
|
}
|
574
582
|
}
|
575
|
-
class
|
583
|
+
class En extends Ot {
|
576
584
|
constructor(a) {
|
577
585
|
super(a);
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
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");
|
584
592
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
|
585
593
|
}
|
586
594
|
createGUI() {
|
587
|
-
this.pane = new
|
595
|
+
this.pane = new Qn({ title: "GUI" }), this.pane.registerPlugin(ea);
|
588
596
|
}
|
589
597
|
dispose() {
|
590
598
|
var a;
|
@@ -611,7 +619,7 @@ class yn extends Ct {
|
|
611
619
|
}
|
612
620
|
// Binding
|
613
621
|
bind(a, e, r, s = void 0) {
|
614
|
-
const u = this.bindID, l = r.onChange !== void 0 ? r.onChange :
|
622
|
+
const u = this.bindID, l = r.onChange !== void 0 ? r.onChange : bn;
|
615
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) => {
|
616
624
|
this.app.send({
|
617
625
|
event: "updateBind",
|
@@ -672,9 +680,9 @@ class yn extends Ct {
|
|
672
680
|
this.inspectorFolder.remove(this.inspectorFolder.children[e]);
|
673
681
|
}
|
674
682
|
}
|
675
|
-
function
|
683
|
+
function ba(t, n) {
|
676
684
|
t.components.forEach((a) => {
|
677
|
-
if (a instanceof
|
685
|
+
if (a instanceof En) {
|
678
686
|
const e = a;
|
679
687
|
switch (n.event) {
|
680
688
|
case "addFolder":
|
@@ -697,7 +705,7 @@ function ga(t, n) {
|
|
697
705
|
}
|
698
706
|
});
|
699
707
|
}
|
700
|
-
var
|
708
|
+
var Ut = { exports: {} }, it = {};
|
701
709
|
/**
|
702
710
|
* @license React
|
703
711
|
* react-jsx-runtime.production.min.js
|
@@ -707,12 +715,12 @@ var Lt = { exports: {} }, nt = {};
|
|
707
715
|
* This source code is licensed under the MIT license found in the
|
708
716
|
* LICENSE file in the root directory of this source tree.
|
709
717
|
*/
|
710
|
-
var
|
711
|
-
function
|
712
|
-
if (
|
713
|
-
return
|
714
|
-
|
715
|
-
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 };
|
716
724
|
function u(l, d, p) {
|
717
725
|
var v, E = {}, x = null, C = null;
|
718
726
|
p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (C = d.ref);
|
@@ -723,9 +731,9 @@ function va() {
|
|
723
731
|
E[v] === void 0 && (E[v] = d[v]);
|
724
732
|
return { $$typeof: n, type: l, key: x, ref: C, props: E, _owner: r.current };
|
725
733
|
}
|
726
|
-
return
|
734
|
+
return it.Fragment = a, it.jsx = u, it.jsxs = u, it;
|
727
735
|
}
|
728
|
-
var
|
736
|
+
var rt = {};
|
729
737
|
/**
|
730
738
|
* @license React
|
731
739
|
* react-jsx-runtime.development.js
|
@@ -735,27 +743,27 @@ var at = {};
|
|
735
743
|
* This source code is licensed under the MIT license found in the
|
736
744
|
* LICENSE file in the root directory of this source tree.
|
737
745
|
*/
|
738
|
-
var
|
739
|
-
function
|
740
|
-
return
|
741
|
-
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";
|
742
750
|
function se(i) {
|
743
751
|
if (i === null || typeof i != "object")
|
744
752
|
return null;
|
745
753
|
var h = M && i[M] || i[G];
|
746
754
|
return typeof h == "function" ? h : null;
|
747
755
|
}
|
748
|
-
var
|
756
|
+
var K = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
749
757
|
function S(i) {
|
750
758
|
{
|
751
759
|
for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
752
760
|
g[w - 1] = arguments[w];
|
753
|
-
|
761
|
+
X("error", i, g);
|
754
762
|
}
|
755
763
|
}
|
756
|
-
function
|
764
|
+
function X(i, h, g) {
|
757
765
|
{
|
758
|
-
var w =
|
766
|
+
var w = K.ReactDebugCurrentFrame, k = w.getStackAddendum();
|
759
767
|
k !== "" && (h += "%s", g = g.concat([k]));
|
760
768
|
var L = g.map(function(P) {
|
761
769
|
return String(P);
|
@@ -827,18 +835,18 @@ function ba() {
|
|
827
835
|
}
|
828
836
|
return null;
|
829
837
|
}
|
830
|
-
var
|
831
|
-
function
|
838
|
+
var A = Object.assign, U = 0, J, R, I, q, me, Re, Ze;
|
839
|
+
function ut() {
|
832
840
|
}
|
833
|
-
|
834
|
-
function
|
841
|
+
ut.__reactDisabledLog = !0;
|
842
|
+
function Mt() {
|
835
843
|
{
|
836
844
|
if (U === 0) {
|
837
|
-
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;
|
838
846
|
var i = {
|
839
847
|
configurable: !0,
|
840
848
|
enumerable: !0,
|
841
|
-
value:
|
849
|
+
value: ut,
|
842
850
|
writable: !0
|
843
851
|
};
|
844
852
|
Object.defineProperties(console, {
|
@@ -854,7 +862,7 @@ function ba() {
|
|
854
862
|
U++;
|
855
863
|
}
|
856
864
|
}
|
857
|
-
function
|
865
|
+
function Rt() {
|
858
866
|
{
|
859
867
|
if (U--, U === 0) {
|
860
868
|
var i = {
|
@@ -863,56 +871,56 @@ function ba() {
|
|
863
871
|
writable: !0
|
864
872
|
};
|
865
873
|
Object.defineProperties(console, {
|
866
|
-
log:
|
874
|
+
log: A({}, i, {
|
867
875
|
value: J
|
868
876
|
}),
|
869
|
-
info:
|
877
|
+
info: A({}, i, {
|
870
878
|
value: R
|
871
879
|
}),
|
872
|
-
warn:
|
880
|
+
warn: A({}, i, {
|
873
881
|
value: I
|
874
882
|
}),
|
875
|
-
error:
|
876
|
-
value:
|
883
|
+
error: A({}, i, {
|
884
|
+
value: q
|
877
885
|
}),
|
878
|
-
group:
|
886
|
+
group: A({}, i, {
|
879
887
|
value: me
|
880
888
|
}),
|
881
|
-
groupCollapsed:
|
889
|
+
groupCollapsed: A({}, i, {
|
882
890
|
value: Re
|
883
891
|
}),
|
884
|
-
groupEnd:
|
885
|
-
value:
|
892
|
+
groupEnd: A({}, i, {
|
893
|
+
value: Ze
|
886
894
|
})
|
887
895
|
});
|
888
896
|
}
|
889
897
|
U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
890
898
|
}
|
891
899
|
}
|
892
|
-
var
|
900
|
+
var Je = K.ReactCurrentDispatcher, Qe;
|
893
901
|
function Pe(i, h, g) {
|
894
902
|
{
|
895
|
-
if (
|
903
|
+
if (Qe === void 0)
|
896
904
|
try {
|
897
905
|
throw Error();
|
898
906
|
} catch (k) {
|
899
907
|
var w = k.stack.trim().match(/\n( *(at )?)/);
|
900
|
-
|
908
|
+
Qe = w && w[1] || "";
|
901
909
|
}
|
902
910
|
return `
|
903
|
-
` +
|
911
|
+
` + Qe + i;
|
904
912
|
}
|
905
913
|
}
|
906
|
-
var $e = !1,
|
914
|
+
var $e = !1, je;
|
907
915
|
{
|
908
|
-
var
|
909
|
-
|
916
|
+
var Pt = typeof WeakMap == "function" ? WeakMap : Map;
|
917
|
+
je = new Pt();
|
910
918
|
}
|
911
|
-
function
|
919
|
+
function dt(i, h) {
|
912
920
|
if (!i || $e)
|
913
921
|
return "";
|
914
922
|
{
|
915
|
-
var g =
|
923
|
+
var g = je.get(i);
|
916
924
|
if (g !== void 0)
|
917
925
|
return g;
|
918
926
|
}
|
@@ -921,7 +929,7 @@ function ba() {
|
|
921
929
|
var k = Error.prepareStackTrace;
|
922
930
|
Error.prepareStackTrace = void 0;
|
923
931
|
var L;
|
924
|
-
L =
|
932
|
+
L = Je.current, Je.current = null, Mt();
|
925
933
|
try {
|
926
934
|
if (h) {
|
927
935
|
var P = function() {
|
@@ -958,39 +966,39 @@ function ba() {
|
|
958
966
|
if (Ee && w && typeof Ee.stack == "string") {
|
959
967
|
for (var T = Ee.stack.split(`
|
960
968
|
`), ce = w.stack.split(`
|
961
|
-
`), W = T.length - 1,
|
962
|
-
|
963
|
-
for (; W >= 1 &&
|
964
|
-
if (T[W] !== ce[
|
965
|
-
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)
|
966
974
|
do
|
967
|
-
if (W--,
|
975
|
+
if (W--, Z--, Z < 0 || T[W] !== ce[Z]) {
|
968
976
|
var ge = `
|
969
977
|
` + T[W].replace(" at new ", " at ");
|
970
|
-
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;
|
971
979
|
}
|
972
|
-
while (W >= 1 &&
|
980
|
+
while (W >= 1 && Z >= 0);
|
973
981
|
break;
|
974
982
|
}
|
975
983
|
}
|
976
984
|
} finally {
|
977
|
-
$e = !1,
|
985
|
+
$e = !1, Je.current = L, Rt(), Error.prepareStackTrace = k;
|
978
986
|
}
|
979
|
-
var Ye = i ? i.displayName || i.name : "",
|
980
|
-
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;
|
981
989
|
}
|
982
|
-
function
|
983
|
-
return
|
990
|
+
function ft(i, h, g) {
|
991
|
+
return dt(i, !1);
|
984
992
|
}
|
985
|
-
function
|
993
|
+
function ht(i) {
|
986
994
|
var h = i.prototype;
|
987
995
|
return !!(h && h.isReactComponent);
|
988
996
|
}
|
989
|
-
function
|
997
|
+
function _e(i, h, g) {
|
990
998
|
if (i == null)
|
991
999
|
return "";
|
992
1000
|
if (typeof i == "function")
|
993
|
-
return
|
1001
|
+
return dt(i, ht(i));
|
994
1002
|
if (typeof i == "string")
|
995
1003
|
return Pe(i);
|
996
1004
|
switch (i) {
|
@@ -1002,26 +1010,26 @@ function ba() {
|
|
1002
1010
|
if (typeof i == "object")
|
1003
1011
|
switch (i.$$typeof) {
|
1004
1012
|
case d:
|
1005
|
-
return
|
1013
|
+
return ft(i.render);
|
1006
1014
|
case E:
|
1007
|
-
return
|
1015
|
+
return _e(i.type, h, g);
|
1008
1016
|
case x: {
|
1009
1017
|
var w = i, k = w._payload, L = w._init;
|
1010
1018
|
try {
|
1011
|
-
return
|
1019
|
+
return _e(L(k), h, g);
|
1012
1020
|
} catch {
|
1013
1021
|
}
|
1014
1022
|
}
|
1015
1023
|
}
|
1016
1024
|
return "";
|
1017
1025
|
}
|
1018
|
-
var Ge = Object.prototype.hasOwnProperty,
|
1026
|
+
var Ge = Object.prototype.hasOwnProperty, pt = {}, et = K.ReactDebugCurrentFrame;
|
1019
1027
|
function Se(i) {
|
1020
1028
|
if (i) {
|
1021
|
-
var h = i._owner, g =
|
1022
|
-
|
1029
|
+
var h = i._owner, g = _e(i.type, i._source, h ? h.type : null);
|
1030
|
+
et.setExtraStackFrame(g);
|
1023
1031
|
} else
|
1024
|
-
|
1032
|
+
et.setExtraStackFrame(null);
|
1025
1033
|
}
|
1026
1034
|
function ke(i, h, g, w, k) {
|
1027
1035
|
{
|
@@ -1038,40 +1046,40 @@ function ba() {
|
|
1038
1046
|
} catch (W) {
|
1039
1047
|
T = W;
|
1040
1048
|
}
|
1041
|
-
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));
|
1042
1050
|
}
|
1043
1051
|
}
|
1044
1052
|
}
|
1045
|
-
var
|
1046
|
-
function
|
1047
|
-
return
|
1053
|
+
var jt = Array.isArray;
|
1054
|
+
function tt(i) {
|
1055
|
+
return jt(i);
|
1048
1056
|
}
|
1049
|
-
function
|
1057
|
+
function mt(i) {
|
1050
1058
|
{
|
1051
1059
|
var h = typeof Symbol == "function" && Symbol.toStringTag, g = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
1052
1060
|
return g;
|
1053
1061
|
}
|
1054
1062
|
}
|
1055
|
-
function
|
1063
|
+
function nt(i) {
|
1056
1064
|
try {
|
1057
|
-
return
|
1065
|
+
return gt(i), !1;
|
1058
1066
|
} catch {
|
1059
1067
|
return !0;
|
1060
1068
|
}
|
1061
1069
|
}
|
1062
|
-
function
|
1070
|
+
function gt(i) {
|
1063
1071
|
return "" + i;
|
1064
1072
|
}
|
1065
|
-
function
|
1066
|
-
if (
|
1067
|
-
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);
|
1068
1076
|
}
|
1069
|
-
var Oe =
|
1077
|
+
var Oe = K.ReactCurrentOwner, _t = {
|
1070
1078
|
key: !0,
|
1071
1079
|
ref: !0,
|
1072
1080
|
__self: !0,
|
1073
1081
|
__source: !0
|
1074
|
-
},
|
1082
|
+
}, bt, at, ve;
|
1075
1083
|
ve = {};
|
1076
1084
|
function o(i) {
|
1077
1085
|
if (Ge.call(i, "ref")) {
|
@@ -1089,7 +1097,7 @@ function ba() {
|
|
1089
1097
|
}
|
1090
1098
|
return i.key !== void 0;
|
1091
1099
|
}
|
1092
|
-
function
|
1100
|
+
function D(i, h) {
|
1093
1101
|
if (typeof i.ref == "string" && Oe.current && h && Oe.current.stateNode !== h) {
|
1094
1102
|
var g = F(Oe.current.type);
|
1095
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);
|
@@ -1098,7 +1106,7 @@ function ba() {
|
|
1098
1106
|
function N(i, h) {
|
1099
1107
|
{
|
1100
1108
|
var g = function() {
|
1101
|
-
|
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));
|
1102
1110
|
};
|
1103
1111
|
g.isReactWarning = !0, Object.defineProperty(i, "key", {
|
1104
1112
|
get: g,
|
@@ -1109,7 +1117,7 @@ function ba() {
|
|
1109
1117
|
function te(i, h) {
|
1110
1118
|
{
|
1111
1119
|
var g = function() {
|
1112
|
-
|
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));
|
1113
1121
|
};
|
1114
1122
|
g.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
1115
1123
|
get: g,
|
@@ -1149,28 +1157,28 @@ function ba() {
|
|
1149
1157
|
function ue(i, h, g, w, k) {
|
1150
1158
|
{
|
1151
1159
|
var L, P = {}, T = null, ce = null;
|
1152
|
-
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));
|
1153
1161
|
for (L in h)
|
1154
|
-
Ge.call(h, L) && !
|
1162
|
+
Ge.call(h, L) && !_t.hasOwnProperty(L) && (P[L] = h[L]);
|
1155
1163
|
if (i && i.defaultProps) {
|
1156
1164
|
var W = i.defaultProps;
|
1157
1165
|
for (L in W)
|
1158
1166
|
P[L] === void 0 && (P[L] = W[L]);
|
1159
1167
|
}
|
1160
1168
|
if (T || ce) {
|
1161
|
-
var
|
1162
|
-
T && N(P,
|
1169
|
+
var Z = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
1170
|
+
T && N(P, Z), ce && te(P, Z);
|
1163
1171
|
}
|
1164
1172
|
return be(i, T, ce, k, w, Oe.current, P);
|
1165
1173
|
}
|
1166
1174
|
}
|
1167
|
-
var
|
1175
|
+
var yt = K.ReactCurrentOwner, Et = K.ReactDebugCurrentFrame;
|
1168
1176
|
function ye(i) {
|
1169
1177
|
if (i) {
|
1170
|
-
var h = i._owner, g =
|
1171
|
-
|
1178
|
+
var h = i._owner, g = _e(i.type, i._source, h ? h.type : null);
|
1179
|
+
Et.setExtraStackFrame(g);
|
1172
1180
|
} else
|
1173
|
-
|
1181
|
+
Et.setExtraStackFrame(null);
|
1174
1182
|
}
|
1175
1183
|
var he;
|
1176
1184
|
he = !1;
|
@@ -1179,8 +1187,8 @@ function ba() {
|
|
1179
1187
|
}
|
1180
1188
|
function Ve() {
|
1181
1189
|
{
|
1182
|
-
if (
|
1183
|
-
var i = F(
|
1190
|
+
if (yt.current) {
|
1191
|
+
var i = F(yt.current.type);
|
1184
1192
|
if (i)
|
1185
1193
|
return `
|
1186
1194
|
|
@@ -1189,7 +1197,7 @@ Check the render method of \`` + i + "`.";
|
|
1189
1197
|
return "";
|
1190
1198
|
}
|
1191
1199
|
}
|
1192
|
-
function
|
1200
|
+
function De(i) {
|
1193
1201
|
{
|
1194
1202
|
if (i !== void 0) {
|
1195
1203
|
var h = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
|
@@ -1213,7 +1221,7 @@ Check the top-level render call using <` + g + ">.");
|
|
1213
1221
|
return h;
|
1214
1222
|
}
|
1215
1223
|
}
|
1216
|
-
function
|
1224
|
+
function Gt(i, h) {
|
1217
1225
|
{
|
1218
1226
|
if (!i._store || i._store.validated || i.key != null)
|
1219
1227
|
return;
|
@@ -1223,17 +1231,17 @@ Check the top-level render call using <` + g + ">.");
|
|
1223
1231
|
return;
|
1224
1232
|
Te[g] = !0;
|
1225
1233
|
var w = "";
|
1226
|
-
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);
|
1227
1235
|
}
|
1228
1236
|
}
|
1229
|
-
function
|
1237
|
+
function Vt(i, h) {
|
1230
1238
|
{
|
1231
1239
|
if (typeof i != "object")
|
1232
1240
|
return;
|
1233
|
-
if (
|
1241
|
+
if (tt(i))
|
1234
1242
|
for (var g = 0; g < i.length; g++) {
|
1235
1243
|
var w = i[g];
|
1236
|
-
pe(w) &&
|
1244
|
+
pe(w) && Gt(w, h);
|
1237
1245
|
}
|
1238
1246
|
else if (pe(i))
|
1239
1247
|
i._store && (i._store.validated = !0);
|
@@ -1241,11 +1249,11 @@ Check the top-level render call using <` + g + ">.");
|
|
1241
1249
|
var k = se(i);
|
1242
1250
|
if (typeof k == "function" && k !== i.entries)
|
1243
1251
|
for (var L = k.call(i), P; !(P = L.next()).done; )
|
1244
|
-
pe(P.value) &&
|
1252
|
+
pe(P.value) && Gt(P.value, h);
|
1245
1253
|
}
|
1246
1254
|
}
|
1247
1255
|
}
|
1248
|
-
function
|
1256
|
+
function On(i) {
|
1249
1257
|
{
|
1250
1258
|
var h = i.type;
|
1251
1259
|
if (h == null || typeof h == "string")
|
@@ -1270,7 +1278,7 @@ Check the top-level render call using <` + g + ">.");
|
|
1270
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.");
|
1271
1279
|
}
|
1272
1280
|
}
|
1273
|
-
function
|
1281
|
+
function Tn(i) {
|
1274
1282
|
{
|
1275
1283
|
for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
|
1276
1284
|
var w = h[g];
|
@@ -1282,56 +1290,56 @@ Check the top-level render call using <` + g + ">.");
|
|
1282
1290
|
i.ref !== null && (ye(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
1283
1291
|
}
|
1284
1292
|
}
|
1285
|
-
function
|
1293
|
+
function zt(i, h, g, w, k, L) {
|
1286
1294
|
{
|
1287
1295
|
var P = O(i);
|
1288
1296
|
if (!P) {
|
1289
1297
|
var T = "";
|
1290
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.");
|
1291
|
-
var ce =
|
1299
|
+
var ce = De(k);
|
1292
1300
|
ce ? T += ce : T += Ve();
|
1293
1301
|
var W;
|
1294
|
-
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);
|
1295
1303
|
}
|
1296
|
-
var
|
1297
|
-
if (
|
1298
|
-
return
|
1304
|
+
var Z = ue(i, h, g, k, L);
|
1305
|
+
if (Z == null)
|
1306
|
+
return Z;
|
1299
1307
|
if (P) {
|
1300
1308
|
var ge = h.children;
|
1301
1309
|
if (ge !== void 0)
|
1302
1310
|
if (w)
|
1303
|
-
if (
|
1311
|
+
if (tt(ge)) {
|
1304
1312
|
for (var Ye = 0; Ye < ge.length; Ye++)
|
1305
|
-
|
1313
|
+
Vt(ge[Ye], i);
|
1306
1314
|
Object.freeze && Object.freeze(ge);
|
1307
1315
|
} else
|
1308
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.");
|
1309
1317
|
else
|
1310
|
-
|
1318
|
+
Vt(ge, i);
|
1311
1319
|
}
|
1312
|
-
return i === e ?
|
1320
|
+
return i === e ? Tn(Z) : On(Z), Z;
|
1313
1321
|
}
|
1314
1322
|
}
|
1315
|
-
function Tn(i, h, g) {
|
1316
|
-
return Vt(i, h, g, !0);
|
1317
|
-
}
|
1318
1323
|
function Mn(i, h, g) {
|
1319
|
-
return
|
1324
|
+
return zt(i, h, g, !0);
|
1320
1325
|
}
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1326
|
+
function Rn(i, h, g) {
|
1327
|
+
return zt(i, h, g, !1);
|
1328
|
+
}
|
1329
|
+
var Pn = Rn, jn = Mn;
|
1330
|
+
rt.Fragment = e, rt.jsx = Pn, rt.jsxs = jn;
|
1331
|
+
}()), rt;
|
1324
1332
|
}
|
1325
|
-
process.env.NODE_ENV === "production" ?
|
1326
|
-
var c =
|
1327
|
-
function
|
1333
|
+
process.env.NODE_ENV === "production" ? Ut.exports = ya() : Ut.exports = Ea();
|
1334
|
+
var c = Ut.exports;
|
1335
|
+
function wn(t) {
|
1328
1336
|
return t.title.search("<") > -1 ? /* @__PURE__ */ c.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ c.jsx("button", { children: t.title });
|
1329
1337
|
}
|
1330
|
-
const
|
1338
|
+
const wa = /* @__PURE__ */ c.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1331
1339
|
/* @__PURE__ */ c.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1332
1340
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1333
1341
|
/* @__PURE__ */ c.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1334
|
-
] }),
|
1342
|
+
] }), xa = /* @__PURE__ */ c.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ c.jsx(
|
1335
1343
|
"path",
|
1336
1344
|
{
|
1337
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
|
@@ -1339,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
|
|
1339
1347
|
C11,8.22,10.74,8,10.43,8z`
|
1340
1348
|
}
|
1341
1349
|
) });
|
1342
|
-
function
|
1343
|
-
return /* @__PURE__ */ c.jsx(
|
1344
|
-
|
1350
|
+
function Ca(t) {
|
1351
|
+
return /* @__PURE__ */ c.jsx(mn.Item, { value: t.title, children: /* @__PURE__ */ c.jsxs("div", { children: [
|
1352
|
+
xa,
|
1345
1353
|
/* @__PURE__ */ c.jsx("span", { children: t.title }),
|
1346
1354
|
/* @__PURE__ */ c.jsx("button", { className: "closeIcon", onClick: () => {
|
1347
1355
|
t.onDelete(t.index);
|
1348
|
-
}, children:
|
1356
|
+
}, children: wa })
|
1349
1357
|
] }) }, t.title);
|
1350
1358
|
}
|
1351
|
-
function
|
1359
|
+
function Sa(t) {
|
1352
1360
|
const [n, a] = oe(!1), [e, r] = oe(t.options), s = (p) => {
|
1353
1361
|
t.onDragComplete(p), r(p);
|
1354
1362
|
}, u = (p) => {
|
@@ -1356,18 +1364,18 @@ function xa(t) {
|
|
1356
1364
|
v.splice(p, 1), s(v);
|
1357
1365
|
}, l = [];
|
1358
1366
|
e.forEach((p, v) => {
|
1359
|
-
l.push(/* @__PURE__ */ c.jsx(
|
1367
|
+
l.push(/* @__PURE__ */ c.jsx(Ca, { index: v, title: p, onDelete: u }, p));
|
1360
1368
|
});
|
1361
1369
|
let d = "dropdown draggable";
|
1362
1370
|
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ c.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1363
|
-
/* @__PURE__ */ c.jsx(
|
1364
|
-
/* @__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 })
|
1365
1373
|
] });
|
1366
1374
|
}
|
1367
|
-
function
|
1375
|
+
function Oa(t) {
|
1368
1376
|
const [n, a] = oe(!1), e = [];
|
1369
1377
|
t.options.map((s, u) => {
|
1370
|
-
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));
|
1371
1379
|
});
|
1372
1380
|
let r = "dropdown";
|
1373
1381
|
return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ c.jsxs(
|
@@ -1377,7 +1385,7 @@ function Ca(t) {
|
|
1377
1385
|
onMouseEnter: () => a(!0),
|
1378
1386
|
onMouseLeave: () => a(!1),
|
1379
1387
|
children: [
|
1380
|
-
/* @__PURE__ */ c.jsx(
|
1388
|
+
/* @__PURE__ */ c.jsx(wn, { title: t.title }),
|
1381
1389
|
/* @__PURE__ */ c.jsx(
|
1382
1390
|
"ul",
|
1383
1391
|
{
|
@@ -1389,13 +1397,13 @@ function Ca(t) {
|
|
1389
1397
|
}
|
1390
1398
|
);
|
1391
1399
|
}
|
1392
|
-
function
|
1400
|
+
function Ta(t) {
|
1393
1401
|
const { option: n } = t, [a, e] = oe("");
|
1394
1402
|
let r;
|
1395
1403
|
switch (n.type) {
|
1396
1404
|
case "draggable":
|
1397
1405
|
r = /* @__PURE__ */ c.jsx(
|
1398
|
-
|
1406
|
+
Sa,
|
1399
1407
|
{
|
1400
1408
|
title: n.title,
|
1401
1409
|
options: n.value,
|
@@ -1408,7 +1416,7 @@ function Sa(t) {
|
|
1408
1416
|
break;
|
1409
1417
|
case "dropdown":
|
1410
1418
|
r = /* @__PURE__ */ c.jsx(
|
1411
|
-
|
1419
|
+
Oa,
|
1412
1420
|
{
|
1413
1421
|
title: n.title,
|
1414
1422
|
options: n.value,
|
@@ -1429,24 +1437,24 @@ function Sa(t) {
|
|
1429
1437
|
);
|
1430
1438
|
break;
|
1431
1439
|
}
|
1432
|
-
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());
|
1433
1441
|
}
|
1434
|
-
function
|
1442
|
+
function hi(t) {
|
1435
1443
|
const n = [], a = [];
|
1436
1444
|
t.components.forEach((s) => {
|
1437
|
-
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);
|
1438
1446
|
});
|
1439
1447
|
function e(s) {
|
1440
1448
|
switch (n.forEach((u) => u(t, s)), s.event) {
|
1441
1449
|
case "custom":
|
1442
|
-
|
1450
|
+
j.dispatchEvent({ type: _.CUSTOM, value: s.data });
|
1443
1451
|
break;
|
1444
1452
|
}
|
1445
1453
|
}
|
1446
1454
|
function r(s) {
|
1447
1455
|
switch (a.forEach((u) => u(t, s)), s.event) {
|
1448
1456
|
case "custom":
|
1449
|
-
|
1457
|
+
j.dispatchEvent({ type: _.CUSTOM, value: s.data });
|
1450
1458
|
break;
|
1451
1459
|
}
|
1452
1460
|
}
|
@@ -1454,7 +1462,7 @@ function di(t) {
|
|
1454
1462
|
t.editor ? r(s) : e(s);
|
1455
1463
|
});
|
1456
1464
|
}
|
1457
|
-
const
|
1465
|
+
const Ma = `out vec3 worldPosition;
|
1458
1466
|
uniform float uDistance;
|
1459
1467
|
|
1460
1468
|
void main() {
|
@@ -1463,7 +1471,7 @@ void main() {
|
|
1463
1471
|
worldPosition.xz += cameraPosition.xz;
|
1464
1472
|
|
1465
1473
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1466
|
-
}`,
|
1474
|
+
}`, Ra = `out vec4 fragColor;
|
1467
1475
|
in vec3 worldPosition;
|
1468
1476
|
|
1469
1477
|
uniform float uDivisions;
|
@@ -1531,14 +1539,14 @@ void main() {
|
|
1531
1539
|
|
1532
1540
|
if (fragColor.a <= 0.0) discard;
|
1533
1541
|
}`;
|
1534
|
-
class
|
1542
|
+
class Pa extends un {
|
1535
1543
|
constructor(n) {
|
1536
1544
|
super({
|
1537
1545
|
extensions: {
|
1538
1546
|
derivatives: !0
|
1539
1547
|
},
|
1540
|
-
glslVersion:
|
1541
|
-
side:
|
1548
|
+
glslVersion: In,
|
1549
|
+
side: Nn,
|
1542
1550
|
transparent: !0,
|
1543
1551
|
uniforms: {
|
1544
1552
|
uScale: {
|
@@ -1548,7 +1556,7 @@ class Ma extends ln {
|
|
1548
1556
|
value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
|
1549
1557
|
},
|
1550
1558
|
uColor: {
|
1551
|
-
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)
|
1552
1560
|
},
|
1553
1561
|
uDistance: {
|
1554
1562
|
value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
|
@@ -1560,25 +1568,25 @@ class Ma extends ln {
|
|
1560
1568
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
1561
1569
|
}
|
1562
1570
|
},
|
1563
|
-
vertexShader:
|
1564
|
-
fragmentShader:
|
1571
|
+
vertexShader: Ma,
|
1572
|
+
fragmentShader: Ra,
|
1565
1573
|
name: "InfiniteGrid",
|
1566
1574
|
depthWrite: !1
|
1567
1575
|
});
|
1568
1576
|
}
|
1569
1577
|
}
|
1570
|
-
class
|
1578
|
+
class ja extends Ln {
|
1571
1579
|
constructor() {
|
1572
|
-
const a = new
|
1573
|
-
super(new
|
1574
|
-
|
1580
|
+
const a = new Pa();
|
1581
|
+
super(new Fn(2, 2), a);
|
1582
|
+
H(this, "gridMaterial");
|
1575
1583
|
this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1576
1584
|
}
|
1577
1585
|
update() {
|
1578
1586
|
this.gridMaterial.needsUpdate = !0;
|
1579
1587
|
}
|
1580
1588
|
}
|
1581
|
-
const
|
1589
|
+
const _a = `#include <common>
|
1582
1590
|
#include <batching_pars_vertex>
|
1583
1591
|
#include <uv_pars_vertex>
|
1584
1592
|
#include <color_pars_vertex>
|
@@ -1608,7 +1616,7 @@ void main() {
|
|
1608
1616
|
#include <logdepthbuf_vertex>
|
1609
1617
|
#include <clipping_planes_vertex>
|
1610
1618
|
#include <worldpos_vertex>
|
1611
|
-
}`,
|
1619
|
+
}`, ka = `
|
1612
1620
|
#include <common>
|
1613
1621
|
#include <uv_pars_fragment>
|
1614
1622
|
#include <clipping_planes_pars_fragment>
|
@@ -1617,18 +1625,18 @@ void main() {
|
|
1617
1625
|
#include <clipping_planes_fragment>
|
1618
1626
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1619
1627
|
}`;
|
1620
|
-
class
|
1628
|
+
class Da extends un {
|
1621
1629
|
constructor() {
|
1622
1630
|
super({
|
1623
1631
|
defines: {
|
1624
1632
|
USE_UV: ""
|
1625
1633
|
},
|
1626
|
-
vertexShader:
|
1627
|
-
fragmentShader:
|
1634
|
+
vertexShader: _a,
|
1635
|
+
fragmentShader: ka
|
1628
1636
|
});
|
1629
1637
|
}
|
1630
1638
|
}
|
1631
|
-
function
|
1639
|
+
function $t(t) {
|
1632
1640
|
const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1633
1641
|
return /* @__PURE__ */ c.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1634
1642
|
/* @__PURE__ */ c.jsxs(
|
@@ -1655,10 +1663,10 @@ function Bt(t) {
|
|
1655
1663
|
/* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { children: t.children }) })
|
1656
1664
|
] });
|
1657
1665
|
}
|
1658
|
-
function
|
1666
|
+
function xn(t) {
|
1659
1667
|
const [n, a] = oe(!1), e = t.child.children.length > 0, r = [];
|
1660
1668
|
return t.child.children.length > 0 && t.child.children.map((s) => {
|
1661
|
-
r.push(/* @__PURE__ */ c.jsx(
|
1669
|
+
r.push(/* @__PURE__ */ c.jsx(xn, { child: s, three: t.three }, Math.random()));
|
1662
1670
|
}), /* @__PURE__ */ c.jsxs("div", { className: "childObject", children: [
|
1663
1671
|
/* @__PURE__ */ c.jsxs("div", { className: "child", children: [
|
1664
1672
|
e ? /* @__PURE__ */ c.jsx(
|
@@ -1686,29 +1694,29 @@ function wn(t) {
|
|
1686
1694
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1687
1695
|
}
|
1688
1696
|
),
|
1689
|
-
/* @__PURE__ */ c.jsx("div", { className: `icon ${
|
1697
|
+
/* @__PURE__ */ c.jsx("div", { className: `icon ${fa(t.child)}` })
|
1690
1698
|
] }),
|
1691
1699
|
/* @__PURE__ */ c.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ c.jsx("div", { className: "container", children: r }) })
|
1692
1700
|
] }, Math.random());
|
1693
1701
|
}
|
1694
|
-
function
|
1702
|
+
function Aa(t) {
|
1695
1703
|
const n = [];
|
1696
1704
|
return t.child.children.map((a) => {
|
1697
|
-
n.push(/* @__PURE__ */ c.jsx(
|
1705
|
+
n.push(/* @__PURE__ */ c.jsx(xn, { child: a, three: t.three }, Math.random()));
|
1698
1706
|
}), /* @__PURE__ */ c.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1699
1707
|
}
|
1700
|
-
const
|
1701
|
-
function
|
1708
|
+
const Ia = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1709
|
+
function Na(t) {
|
1702
1710
|
return "items" in t;
|
1703
1711
|
}
|
1704
1712
|
function Ue(t) {
|
1705
1713
|
const n = [];
|
1706
1714
|
return t.items.forEach((a) => {
|
1707
|
-
|
1715
|
+
Na(a) ? n.push(
|
1708
1716
|
/* @__PURE__ */ c.jsx(Ue, { title: a.title, items: a.items }, Math.random())
|
1709
1717
|
) : n.push(
|
1710
1718
|
/* @__PURE__ */ c.jsx(
|
1711
|
-
|
1719
|
+
ot,
|
1712
1720
|
{
|
1713
1721
|
title: a.title,
|
1714
1722
|
prop: a.prop,
|
@@ -1725,12 +1733,12 @@ function Ue(t) {
|
|
1725
1733
|
Math.random()
|
1726
1734
|
)
|
1727
1735
|
);
|
1728
|
-
}), /* @__PURE__ */ c.jsx(
|
1736
|
+
}), /* @__PURE__ */ c.jsx($t, { label: t.title, open: t.expanded === !0, children: n });
|
1729
1737
|
}
|
1730
|
-
function
|
1738
|
+
function La(t) {
|
1731
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");
|
1732
1740
|
}
|
1733
|
-
function
|
1741
|
+
function Ae(t) {
|
1734
1742
|
switch (t) {
|
1735
1743
|
case "alphaMap":
|
1736
1744
|
return "Alpha Map";
|
@@ -1879,10 +1887,10 @@ function De(t) {
|
|
1879
1887
|
}
|
1880
1888
|
return t;
|
1881
1889
|
}
|
1882
|
-
function
|
1890
|
+
function Fa(t) {
|
1883
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";
|
1884
1892
|
}
|
1885
|
-
function
|
1893
|
+
function Ua() {
|
1886
1894
|
const t = document.createElement("input");
|
1887
1895
|
return t.type = "file", new Promise((n, a) => {
|
1888
1896
|
t.addEventListener("change", function() {
|
@@ -1897,15 +1905,15 @@ function La() {
|
|
1897
1905
|
}), t.click();
|
1898
1906
|
});
|
1899
1907
|
}
|
1900
|
-
function
|
1908
|
+
function Jt(t, n, a) {
|
1901
1909
|
const e = [];
|
1902
1910
|
for (const r in t) {
|
1903
|
-
if (!
|
1911
|
+
if (!La(r))
|
1904
1912
|
continue;
|
1905
1913
|
const s = typeof t[r], u = t[r];
|
1906
1914
|
if (s === "boolean" || s === "number" || s === "string") {
|
1907
1915
|
const l = {
|
1908
|
-
title:
|
1916
|
+
title: Ae(r),
|
1909
1917
|
prop: r,
|
1910
1918
|
type: s,
|
1911
1919
|
value: u,
|
@@ -1918,17 +1926,17 @@ function Zt(t, n, a) {
|
|
1918
1926
|
v !== void 0 && Q(v, `material.${d}`, p);
|
1919
1927
|
}
|
1920
1928
|
};
|
1921
|
-
|
1929
|
+
Fa(r) && (l.value = Number(u), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
|
1922
1930
|
} else if (s === "object")
|
1923
1931
|
if (u.isColor)
|
1924
1932
|
e.push({
|
1925
|
-
title:
|
1933
|
+
title: Ae(r),
|
1926
1934
|
prop: r,
|
1927
1935
|
type: "color",
|
1928
1936
|
value: u,
|
1929
1937
|
onChange: (l, d) => {
|
1930
1938
|
var E;
|
1931
|
-
const p = new
|
1939
|
+
const p = new Bt(d);
|
1932
1940
|
a.updateObject(n.uuid, `material.${l}`, p);
|
1933
1941
|
const v = (E = a.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
|
1934
1942
|
v !== void 0 && Q(v, `material.${l}`, p);
|
@@ -1949,7 +1957,7 @@ function Zt(t, n, a) {
|
|
1949
1957
|
}
|
1950
1958
|
});
|
1951
1959
|
e.push({
|
1952
|
-
title:
|
1960
|
+
title: Ae(r),
|
1953
1961
|
items: l
|
1954
1962
|
});
|
1955
1963
|
} else {
|
@@ -1961,19 +1969,19 @@ function Zt(t, n, a) {
|
|
1961
1969
|
case "number":
|
1962
1970
|
case "string":
|
1963
1971
|
d === "src" ? e.push({
|
1964
|
-
title:
|
1972
|
+
title: Ae(r),
|
1965
1973
|
type: "image",
|
1966
1974
|
value: p,
|
1967
1975
|
onChange: (E, x) => {
|
1968
1976
|
var M;
|
1969
1977
|
a.createTexture(n.uuid, `material.${r}`, x);
|
1970
1978
|
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1971
|
-
C !== void 0 &&
|
1979
|
+
C !== void 0 && Ft(x).then((G) => {
|
1972
1980
|
Q(C, `material.${r}`, G), Q(C, "material.needsUpdate", !0);
|
1973
1981
|
});
|
1974
1982
|
}
|
1975
1983
|
}) : l.push({
|
1976
|
-
title: `${
|
1984
|
+
title: `${Ae(d)}`,
|
1977
1985
|
prop: `material.${r}.${d}`,
|
1978
1986
|
type: `${typeof t[r][d]}`,
|
1979
1987
|
value: u[d],
|
@@ -1987,14 +1995,14 @@ function Zt(t, n, a) {
|
|
1987
1995
|
break;
|
1988
1996
|
case "object":
|
1989
1997
|
p.value !== void 0 && p.value.src !== void 0 ? l.push({
|
1990
|
-
title:
|
1998
|
+
title: Ae(d),
|
1991
1999
|
type: "image",
|
1992
2000
|
value: p.value.src,
|
1993
2001
|
onChange: (E, x) => {
|
1994
2002
|
var M;
|
1995
2003
|
a.createTexture(n.uuid, `material.${r}.${d}.value`, x);
|
1996
2004
|
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1997
|
-
C !== void 0 &&
|
2005
|
+
C !== void 0 && Ft(x).then((G) => {
|
1998
2006
|
Q(C, `material.${r}.${d}.value`, G);
|
1999
2007
|
});
|
2000
2008
|
}
|
@@ -2013,7 +2021,7 @@ function Zt(t, n, a) {
|
|
2013
2021
|
}
|
2014
2022
|
}
|
2015
2023
|
l.length > 0 && e.push({
|
2016
|
-
title:
|
2024
|
+
title: Ae(r),
|
2017
2025
|
items: l
|
2018
2026
|
});
|
2019
2027
|
}
|
@@ -2028,7 +2036,7 @@ function Zt(t, n, a) {
|
|
2028
2036
|
}
|
2029
2037
|
}), e;
|
2030
2038
|
}
|
2031
|
-
function
|
2039
|
+
function Ba(t, n) {
|
2032
2040
|
const a = t.material;
|
2033
2041
|
if (Array.isArray(a)) {
|
2034
2042
|
const e = [], r = a.length;
|
@@ -2038,7 +2046,7 @@ function Fa(t, n) {
|
|
2038
2046
|
Ue,
|
2039
2047
|
{
|
2040
2048
|
title: `Material ${s}`,
|
2041
|
-
items:
|
2049
|
+
items: Jt(a[s], t, n)
|
2042
2050
|
},
|
2043
2051
|
`Material ${s}`
|
2044
2052
|
)
|
@@ -2049,16 +2057,16 @@ function Fa(t, n) {
|
|
2049
2057
|
Ue,
|
2050
2058
|
{
|
2051
2059
|
title: "Material",
|
2052
|
-
items:
|
2060
|
+
items: Jt(a, t, n)
|
2053
2061
|
}
|
2054
2062
|
);
|
2055
2063
|
}
|
2056
|
-
function
|
2064
|
+
function ot(t) {
|
2057
2065
|
let n = t.value;
|
2058
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
2066
|
+
n !== void 0 && n.isColor !== void 0 && (n = ra(t.value));
|
2059
2067
|
const [a, e] = oe(n), r = Ce(null), s = Ce(null), u = Ce(null);
|
2060
2068
|
Fe(() => {
|
2061
|
-
var
|
2069
|
+
var X;
|
2062
2070
|
let v = !1, E = -1, x = 0, C = Number(a);
|
2063
2071
|
const M = (fe) => {
|
2064
2072
|
v = !0, x = C, E = fe.clientX;
|
@@ -2069,12 +2077,12 @@ function it(t) {
|
|
2069
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);
|
2070
2078
|
}, se = () => {
|
2071
2079
|
v = !1;
|
2072
|
-
},
|
2080
|
+
}, K = () => {
|
2073
2081
|
v = !1;
|
2074
2082
|
}, S = t.type === "number";
|
2075
|
-
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)), () => {
|
2076
2084
|
var fe;
|
2077
|
-
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));
|
2078
2086
|
};
|
2079
2087
|
}, [a]);
|
2080
2088
|
const l = t.type === "string" && (a.length > 100 || a.search(`
|
@@ -2153,13 +2161,13 @@ function it(t) {
|
|
2153
2161
|
}
|
2154
2162
|
),
|
2155
2163
|
t.type === "image" && /* @__PURE__ */ c.jsx("img", { ref: u, onClick: () => {
|
2156
|
-
|
2164
|
+
Ua().then((v) => {
|
2157
2165
|
u.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
|
2158
2166
|
});
|
2159
|
-
}, src: a.length > 0 ? a :
|
2167
|
+
}, src: a.length > 0 ? a : Ia })
|
2160
2168
|
] });
|
2161
2169
|
}
|
2162
|
-
function
|
2170
|
+
function Qt(t) {
|
2163
2171
|
switch (t) {
|
2164
2172
|
case "fov":
|
2165
2173
|
return "FOV";
|
@@ -2188,12 +2196,12 @@ function Jt(t) {
|
|
2188
2196
|
}
|
2189
2197
|
return t;
|
2190
2198
|
}
|
2191
|
-
function
|
2199
|
+
function $a(t, n) {
|
2192
2200
|
const a = [];
|
2193
2201
|
if (t.perspectiveCameraInfo !== void 0)
|
2194
2202
|
for (const e in t.perspectiveCameraInfo)
|
2195
2203
|
a.push({
|
2196
|
-
title:
|
2204
|
+
title: Qt(e),
|
2197
2205
|
prop: e,
|
2198
2206
|
type: "number",
|
2199
2207
|
step: 0.01,
|
@@ -2208,7 +2216,7 @@ function Ua(t, n) {
|
|
2208
2216
|
else if (t.orthographicCameraInfo !== void 0)
|
2209
2217
|
for (const e in t.orthographicCameraInfo)
|
2210
2218
|
a.push({
|
2211
|
-
title:
|
2219
|
+
title: Qt(e),
|
2212
2220
|
prop: e,
|
2213
2221
|
type: "number",
|
2214
2222
|
step: 0.01,
|
@@ -2228,20 +2236,20 @@ function Ua(t, n) {
|
|
2228
2236
|
}
|
2229
2237
|
);
|
2230
2238
|
}
|
2231
|
-
const
|
2239
|
+
const Ga = Math.PI / 180, Va = 180 / Math.PI;
|
2232
2240
|
function Ke(t, n, a, e, r) {
|
2233
2241
|
return e + (t - n) * (r - e) / (a - n);
|
2234
2242
|
}
|
2235
|
-
function
|
2236
|
-
return t *
|
2243
|
+
function za(t) {
|
2244
|
+
return t * Ga;
|
2237
2245
|
}
|
2238
|
-
function
|
2239
|
-
return t *
|
2246
|
+
function At(t) {
|
2247
|
+
return t * Va;
|
2240
2248
|
}
|
2241
|
-
function
|
2242
|
-
const a = new
|
2249
|
+
function Ya(t, n) {
|
2250
|
+
const a = new Un();
|
2243
2251
|
a.elements = t.matrix;
|
2244
|
-
const e = new Y(), r = new
|
2252
|
+
const e = new Y(), r = new Bn(), s = new Y();
|
2245
2253
|
t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
|
2246
2254
|
const u = (d, p) => {
|
2247
2255
|
var E;
|
@@ -2249,7 +2257,7 @@ function Va(t, n) {
|
|
2249
2257
|
const v = (E = n.scene) == null ? void 0 : E.getObjectByProperty("uuid", t.uuid);
|
2250
2258
|
v !== void 0 && Q(v, d, p);
|
2251
2259
|
}, l = (d, p) => {
|
2252
|
-
u(d,
|
2260
|
+
u(d, za(p));
|
2253
2261
|
};
|
2254
2262
|
return /* @__PURE__ */ c.jsx(
|
2255
2263
|
Ue,
|
@@ -2281,7 +2289,7 @@ function Va(t, n) {
|
|
2281
2289
|
title: "Rotation X",
|
2282
2290
|
prop: "rotation.x",
|
2283
2291
|
type: "number",
|
2284
|
-
value:
|
2292
|
+
value: kt(At(r.x)),
|
2285
2293
|
min: -360,
|
2286
2294
|
max: 360,
|
2287
2295
|
step: 0.1,
|
@@ -2291,7 +2299,7 @@ function Va(t, n) {
|
|
2291
2299
|
title: "Rotation Y",
|
2292
2300
|
prop: "rotation.y",
|
2293
2301
|
type: "number",
|
2294
|
-
value:
|
2302
|
+
value: kt(At(r.y)),
|
2295
2303
|
min: -360,
|
2296
2304
|
max: 360,
|
2297
2305
|
step: 0.1,
|
@@ -2301,7 +2309,7 @@ function Va(t, n) {
|
|
2301
2309
|
title: "Rotation Z",
|
2302
2310
|
prop: "rotation.z",
|
2303
2311
|
type: "number",
|
2304
|
-
value:
|
2312
|
+
value: kt(At(r.z)),
|
2305
2313
|
min: -360,
|
2306
2314
|
max: 360,
|
2307
2315
|
step: 0.1,
|
@@ -2335,7 +2343,7 @@ function Va(t, n) {
|
|
2335
2343
|
}
|
2336
2344
|
);
|
2337
2345
|
}
|
2338
|
-
function
|
2346
|
+
function en(t) {
|
2339
2347
|
switch (t) {
|
2340
2348
|
case "color":
|
2341
2349
|
return "Color";
|
@@ -2354,25 +2362,25 @@ function Qt(t) {
|
|
2354
2362
|
}
|
2355
2363
|
return t;
|
2356
2364
|
}
|
2357
|
-
function
|
2365
|
+
function Wa(t, n) {
|
2358
2366
|
const a = [];
|
2359
2367
|
if (t.lightInfo !== void 0)
|
2360
2368
|
for (const e in t.lightInfo) {
|
2361
2369
|
const r = t.lightInfo[e];
|
2362
2370
|
r !== void 0 && (r.isColor !== void 0 ? a.push({
|
2363
|
-
title:
|
2371
|
+
title: en(e),
|
2364
2372
|
prop: e,
|
2365
2373
|
type: "color",
|
2366
2374
|
value: r,
|
2367
2375
|
onChange: (s, u) => {
|
2368
2376
|
var p;
|
2369
|
-
const l = new
|
2377
|
+
const l = new Bt(u);
|
2370
2378
|
n.updateObject(t.uuid, s, l);
|
2371
2379
|
const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
|
2372
2380
|
d !== void 0 && Q(d, s, l);
|
2373
2381
|
}
|
2374
2382
|
}) : a.push({
|
2375
|
-
title:
|
2383
|
+
title: en(e),
|
2376
2384
|
prop: e,
|
2377
2385
|
type: typeof r,
|
2378
2386
|
value: r,
|
@@ -2393,7 +2401,7 @@ function za(t, n) {
|
|
2393
2401
|
}
|
2394
2402
|
);
|
2395
2403
|
}
|
2396
|
-
function
|
2404
|
+
function Ha(t, n) {
|
2397
2405
|
const a = [];
|
2398
2406
|
return t.animations.forEach((e) => {
|
2399
2407
|
a.push({
|
@@ -2435,7 +2443,7 @@ function Ya(t, n) {
|
|
2435
2443
|
});
|
2436
2444
|
}), /* @__PURE__ */ c.jsx(Ue, { title: "Animations", items: a });
|
2437
2445
|
}
|
2438
|
-
const
|
2446
|
+
const Cn = {
|
2439
2447
|
name: "",
|
2440
2448
|
uuid: "",
|
2441
2449
|
type: "",
|
@@ -2447,25 +2455,25 @@ const xn = {
|
|
2447
2455
|
orthographicCameraInfo: void 0,
|
2448
2456
|
lightInfo: void 0
|
2449
2457
|
};
|
2450
|
-
let ae = { ...
|
2451
|
-
function
|
2458
|
+
let ae = { ...Cn };
|
2459
|
+
function Ka(t) {
|
2452
2460
|
const [n, a] = oe(-1);
|
2453
2461
|
Fe(() => {
|
2454
2462
|
function r(u) {
|
2455
2463
|
ae = { ...u.value }, a(Date.now());
|
2456
2464
|
}
|
2457
2465
|
function s() {
|
2458
|
-
ae = { ...
|
2466
|
+
ae = { ...Cn }, a(Date.now());
|
2459
2467
|
}
|
2460
|
-
return
|
2461
|
-
|
2468
|
+
return j.addEventListener(_.SET_SCENE, s), j.addEventListener(_.SET_OBJECT, r), () => {
|
2469
|
+
j.removeEventListener(_.SET_SCENE, s), j.removeEventListener(_.SET_OBJECT, r);
|
2462
2470
|
};
|
2463
2471
|
}, []);
|
2464
2472
|
const e = ae.type.toLowerCase();
|
2465
|
-
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: [
|
2466
2474
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2467
2475
|
/* @__PURE__ */ c.jsx(
|
2468
|
-
|
2476
|
+
ot,
|
2469
2477
|
{
|
2470
2478
|
type: "string",
|
2471
2479
|
title: "Name",
|
@@ -2475,7 +2483,7 @@ function Wa(t) {
|
|
2475
2483
|
}
|
2476
2484
|
),
|
2477
2485
|
/* @__PURE__ */ c.jsx(
|
2478
|
-
|
2486
|
+
ot,
|
2479
2487
|
{
|
2480
2488
|
type: "string",
|
2481
2489
|
title: "Type",
|
@@ -2485,7 +2493,7 @@ function Wa(t) {
|
|
2485
2493
|
}
|
2486
2494
|
),
|
2487
2495
|
/* @__PURE__ */ c.jsx(
|
2488
|
-
|
2496
|
+
ot,
|
2489
2497
|
{
|
2490
2498
|
type: "string",
|
2491
2499
|
title: "UUID",
|
@@ -2495,7 +2503,7 @@ function Wa(t) {
|
|
2495
2503
|
}
|
2496
2504
|
),
|
2497
2505
|
/* @__PURE__ */ c.jsx(
|
2498
|
-
|
2506
|
+
ot,
|
2499
2507
|
{
|
2500
2508
|
type: "boolean",
|
2501
2509
|
title: "Visible",
|
@@ -2511,37 +2519,37 @@ function Wa(t) {
|
|
2511
2519
|
)
|
2512
2520
|
] }),
|
2513
2521
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2514
|
-
|
2515
|
-
ae.animations.length > 0 ?
|
2516
|
-
e.search("camera") > -1 ?
|
2517
|
-
e.search("light") > -1 ?
|
2518
|
-
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
|
2519
2527
|
] })
|
2520
2528
|
] }) }, n) }, "Inspector");
|
2521
2529
|
}
|
2522
|
-
class
|
2530
|
+
class pi extends ta {
|
2523
2531
|
constructor(a) {
|
2524
2532
|
super(a);
|
2525
|
-
|
2533
|
+
H(this, "three");
|
2526
2534
|
// Private
|
2527
|
-
|
2535
|
+
H(this, "setScene", (a) => {
|
2528
2536
|
this.setState(() => ({
|
2529
2537
|
scene: a.value
|
2530
2538
|
}));
|
2531
2539
|
});
|
2532
2540
|
this.state = {
|
2533
2541
|
scene: a.scene !== void 0 ? a.scene : null
|
2534
|
-
}, this.three = a.three,
|
2542
|
+
}, this.three = a.three, j.addEventListener(_.SET_SCENE, this.setScene);
|
2535
2543
|
}
|
2536
2544
|
componentWillUnmount() {
|
2537
|
-
|
2545
|
+
j.removeEventListener(_.SET_SCENE, this.setScene);
|
2538
2546
|
}
|
2539
2547
|
render() {
|
2540
2548
|
var r;
|
2541
2549
|
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
|
2542
2550
|
return /* @__PURE__ */ c.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
2543
|
-
/* @__PURE__ */ c.jsx(
|
2544
|
-
/* @__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 })
|
2545
2553
|
] }) }, "SidePanel");
|
2546
2554
|
}
|
2547
2555
|
// Getters / Setters
|
@@ -2549,7 +2557,7 @@ class fi extends Qn {
|
|
2549
2557
|
return this.state;
|
2550
2558
|
}
|
2551
2559
|
}
|
2552
|
-
function
|
2560
|
+
function mi(t) {
|
2553
2561
|
function n() {
|
2554
2562
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2555
2563
|
}
|
@@ -2574,7 +2582,7 @@ function hi(t) {
|
|
2574
2582
|
if (!n())
|
2575
2583
|
return;
|
2576
2584
|
const d = l.value;
|
2577
|
-
|
2585
|
+
Ft(d.value).then((p) => {
|
2578
2586
|
e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
|
2579
2587
|
});
|
2580
2588
|
}, u = (l) => {
|
@@ -2589,12 +2597,12 @@ function hi(t) {
|
|
2589
2597
|
console.log("Error requesting method:"), console.log(C), console.log(d), console.log(v);
|
2590
2598
|
}
|
2591
2599
|
};
|
2592
|
-
return Fe(() => (
|
2593
|
-
|
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);
|
2594
2602
|
}), []), null;
|
2595
2603
|
}
|
2596
|
-
const
|
2597
|
-
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 {
|
2598
2606
|
constructor(n, a) {
|
2599
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() {
|
2600
2608
|
return l.phi;
|
@@ -2603,42 +2611,42 @@ class Ka extends sn {
|
|
2603
2611
|
}, this.getDistance = function() {
|
2604
2612
|
return this.object.position.distanceTo(this.target);
|
2605
2613
|
}, this.listenToKeyEvents = function(o) {
|
2606
|
-
o.addEventListener("keydown",
|
2614
|
+
o.addEventListener("keydown", nt), this._domElementKeyEvents = o;
|
2607
2615
|
}, this.stopListenToKeyEvents = function() {
|
2608
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
2616
|
+
this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
|
2609
2617
|
}, this.saveState = function() {
|
2610
2618
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2611
2619
|
}, this.reset = function() {
|
2612
|
-
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;
|
2613
2621
|
}, this.update = function() {
|
2614
|
-
const o = new Y(), y = new
|
2615
|
-
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) {
|
2616
2624
|
const ye = e.object.position;
|
2617
|
-
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);
|
2618
2626
|
let he = e.minAzimuthAngle, pe = e.maxAzimuthAngle;
|
2619
|
-
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));
|
2620
2628
|
let Ve = !1;
|
2621
2629
|
if (e.zoomToCursor && ee) {
|
2622
|
-
let
|
2630
|
+
let De = null;
|
2623
2631
|
if (e.object.isPerspectiveCamera) {
|
2624
2632
|
const Te = o.length();
|
2625
|
-
|
2626
|
-
const ze = Te -
|
2633
|
+
De = q(Te * p);
|
2634
|
+
const ze = Te - De;
|
2627
2635
|
e.object.position.addScaledVector(fe, ze), e.object.updateMatrixWorld();
|
2628
2636
|
} else if (e.object.isOrthographicCamera) {
|
2629
2637
|
const Te = new Y(le.x, le.y, 0);
|
2630
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;
|
2631
2639
|
const ze = new Y(le.x, le.y, 0);
|
2632
|
-
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();
|
2633
2641
|
} else
|
2634
2642
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2635
|
-
|
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))));
|
2636
2644
|
} else
|
2637
2645
|
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), Ve = !0);
|
2638
|
-
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;
|
2639
2647
|
};
|
2640
2648
|
}(), this.dispose = function() {
|
2641
|
-
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);
|
2642
2650
|
};
|
2643
2651
|
const e = this, r = {
|
2644
2652
|
NONE: -1,
|
@@ -2651,9 +2659,9 @@ class Ka extends sn {
|
|
2651
2659
|
TOUCH_DOLLY_ROTATE: 6
|
2652
2660
|
};
|
2653
2661
|
let s = r.NONE;
|
2654
|
-
const u = 1e-6, l = new
|
2662
|
+
const u = 1e-6, l = new Kt(), d = new Kt();
|
2655
2663
|
let p = 1;
|
2656
|
-
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();
|
2657
2665
|
let ee = !1;
|
2658
2666
|
const f = [], m = {};
|
2659
2667
|
function b(o) {
|
@@ -2671,25 +2679,25 @@ class Ka extends sn {
|
|
2671
2679
|
}
|
2672
2680
|
const F = function() {
|
2673
2681
|
const o = new Y();
|
2674
|
-
return function(
|
2675
|
-
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-
|
2682
|
+
return function(D, N) {
|
2683
|
+
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-D), v.add(o);
|
2676
2684
|
};
|
2677
|
-
}(),
|
2685
|
+
}(), A = function() {
|
2678
2686
|
const o = new Y();
|
2679
|
-
return function(
|
2680
|
-
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);
|
2681
2689
|
};
|
2682
2690
|
}(), U = function() {
|
2683
2691
|
const o = new Y();
|
2684
|
-
return function(
|
2692
|
+
return function(D, N) {
|
2685
2693
|
const te = e.domElement;
|
2686
2694
|
if (e.object.isPerspectiveCamera) {
|
2687
2695
|
const be = e.object.position;
|
2688
2696
|
o.copy(be).sub(e.target);
|
2689
2697
|
let ue = o.length();
|
2690
|
-
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);
|
2691
2699
|
} else
|
2692
|
-
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);
|
2693
2701
|
};
|
2694
2702
|
}();
|
2695
2703
|
function J(o) {
|
@@ -2702,36 +2710,36 @@ class Ka extends sn {
|
|
2702
2710
|
if (!e.zoomToCursor)
|
2703
2711
|
return;
|
2704
2712
|
ee = !0;
|
2705
|
-
const
|
2713
|
+
const D = e.domElement.getBoundingClientRect(), N = o - D.left, te = y - D.top, be = D.width, ue = D.height;
|
2706
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();
|
2707
2715
|
}
|
2708
|
-
function
|
2716
|
+
function q(o) {
|
2709
2717
|
return Math.max(e.minDistance, Math.min(e.maxDistance, o));
|
2710
2718
|
}
|
2711
2719
|
function me(o) {
|
2712
2720
|
E.set(o.clientX, o.clientY);
|
2713
2721
|
}
|
2714
2722
|
function Re(o) {
|
2715
|
-
I(o.clientX, o.clientX),
|
2723
|
+
I(o.clientX, o.clientX), K.set(o.clientX, o.clientY);
|
2716
2724
|
}
|
2717
|
-
function
|
2725
|
+
function Ze(o) {
|
2718
2726
|
M.set(o.clientX, o.clientY);
|
2719
2727
|
}
|
2720
|
-
function
|
2728
|
+
function ut(o) {
|
2721
2729
|
x.set(o.clientX, o.clientY), C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2722
2730
|
const y = e.domElement;
|
2723
2731
|
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x), e.update();
|
2724
2732
|
}
|
2725
|
-
function
|
2726
|
-
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();
|
2727
2735
|
}
|
2728
|
-
function
|
2736
|
+
function Rt(o) {
|
2729
2737
|
G.set(o.clientX, o.clientY), se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G), e.update();
|
2730
2738
|
}
|
2731
|
-
function
|
2739
|
+
function Je(o) {
|
2732
2740
|
I(o.clientX, o.clientY), o.deltaY < 0 ? R(O(o.deltaY)) : o.deltaY > 0 && J(O(o.deltaY)), e.update();
|
2733
2741
|
}
|
2734
|
-
function
|
2742
|
+
function Qe(o) {
|
2735
2743
|
let y = !1;
|
2736
2744
|
switch (o.code) {
|
2737
2745
|
case e.keys.UP:
|
@@ -2753,70 +2761,70 @@ class Ka extends sn {
|
|
2753
2761
|
if (f.length === 1)
|
2754
2762
|
E.set(o.pageX, o.pageY);
|
2755
2763
|
else {
|
2756
|
-
const y = ve(o),
|
2757
|
-
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);
|
2758
2766
|
}
|
2759
2767
|
}
|
2760
2768
|
function $e(o) {
|
2761
2769
|
if (f.length === 1)
|
2762
2770
|
M.set(o.pageX, o.pageY);
|
2763
2771
|
else {
|
2764
|
-
const y = ve(o),
|
2765
|
-
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);
|
2766
2774
|
}
|
2767
2775
|
}
|
2768
|
-
function
|
2769
|
-
const y = ve(o),
|
2770
|
-
|
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);
|
2771
2779
|
}
|
2772
|
-
function
|
2773
|
-
e.enableZoom &&
|
2780
|
+
function Pt(o) {
|
2781
|
+
e.enableZoom && je(o), e.enablePan && $e(o);
|
2774
2782
|
}
|
2775
|
-
function
|
2776
|
-
e.enableZoom &&
|
2783
|
+
function dt(o) {
|
2784
|
+
e.enableZoom && je(o), e.enableRotate && Pe(o);
|
2777
2785
|
}
|
2778
|
-
function
|
2786
|
+
function ft(o) {
|
2779
2787
|
if (f.length == 1)
|
2780
2788
|
x.set(o.pageX, o.pageY);
|
2781
2789
|
else {
|
2782
|
-
const
|
2790
|
+
const D = ve(o), N = 0.5 * (o.pageX + D.x), te = 0.5 * (o.pageY + D.y);
|
2783
2791
|
x.set(N, te);
|
2784
2792
|
}
|
2785
2793
|
C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2786
2794
|
const y = e.domElement;
|
2787
2795
|
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x);
|
2788
2796
|
}
|
2789
|
-
function
|
2797
|
+
function ht(o) {
|
2790
2798
|
if (f.length === 1)
|
2791
2799
|
G.set(o.pageX, o.pageY);
|
2792
2800
|
else {
|
2793
|
-
const y = ve(o),
|
2794
|
-
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);
|
2795
2803
|
}
|
2796
2804
|
se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G);
|
2797
2805
|
}
|
2798
|
-
function
|
2799
|
-
const y = ve(o),
|
2800
|
-
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);
|
2801
2809
|
const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
|
2802
2810
|
I(be, ue);
|
2803
2811
|
}
|
2804
2812
|
function Ge(o) {
|
2805
|
-
e.enableZoom &&
|
2813
|
+
e.enableZoom && _e(o), e.enablePan && ht(o);
|
2806
2814
|
}
|
2807
|
-
function
|
2808
|
-
e.enableZoom &&
|
2815
|
+
function pt(o) {
|
2816
|
+
e.enableZoom && _e(o), e.enableRotate && ft(o);
|
2809
2817
|
}
|
2810
|
-
function
|
2811
|
-
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));
|
2812
2820
|
}
|
2813
2821
|
function Se(o) {
|
2814
|
-
e.enabled !== !1 && (o.pointerType === "touch" ?
|
2822
|
+
e.enabled !== !1 && (o.pointerType === "touch" ? vt(o) : tt(o));
|
2815
2823
|
}
|
2816
2824
|
function ke(o) {
|
2817
|
-
|
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;
|
2818
2826
|
}
|
2819
|
-
function
|
2827
|
+
function jt(o) {
|
2820
2828
|
let y;
|
2821
2829
|
switch (o.button) {
|
2822
2830
|
case 0:
|
@@ -2841,7 +2849,7 @@ class Ka extends sn {
|
|
2841
2849
|
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2842
2850
|
if (e.enablePan === !1)
|
2843
2851
|
return;
|
2844
|
-
|
2852
|
+
Ze(o), s = r.PAN;
|
2845
2853
|
} else {
|
2846
2854
|
if (e.enableRotate === !1)
|
2847
2855
|
return;
|
@@ -2856,41 +2864,41 @@ class Ka extends sn {
|
|
2856
2864
|
} else {
|
2857
2865
|
if (e.enablePan === !1)
|
2858
2866
|
return;
|
2859
|
-
|
2867
|
+
Ze(o), s = r.PAN;
|
2860
2868
|
}
|
2861
2869
|
break;
|
2862
2870
|
default:
|
2863
2871
|
s = r.NONE;
|
2864
2872
|
}
|
2865
|
-
s !== r.NONE && e.dispatchEvent(
|
2873
|
+
s !== r.NONE && e.dispatchEvent(It);
|
2866
2874
|
}
|
2867
|
-
function
|
2875
|
+
function tt(o) {
|
2868
2876
|
switch (s) {
|
2869
2877
|
case r.ROTATE:
|
2870
2878
|
if (e.enableRotate === !1)
|
2871
2879
|
return;
|
2872
|
-
|
2880
|
+
ut(o);
|
2873
2881
|
break;
|
2874
2882
|
case r.DOLLY:
|
2875
2883
|
if (e.enableZoom === !1)
|
2876
2884
|
return;
|
2877
|
-
|
2885
|
+
Mt(o);
|
2878
2886
|
break;
|
2879
2887
|
case r.PAN:
|
2880
2888
|
if (e.enablePan === !1)
|
2881
2889
|
return;
|
2882
|
-
|
2890
|
+
Rt(o);
|
2883
2891
|
break;
|
2884
2892
|
}
|
2885
2893
|
}
|
2886
|
-
function
|
2887
|
-
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));
|
2888
2896
|
}
|
2889
|
-
function
|
2890
|
-
e.enabled === !1 || e.enablePan === !1 ||
|
2897
|
+
function nt(o) {
|
2898
|
+
e.enabled === !1 || e.enablePan === !1 || Qe(o);
|
2891
2899
|
}
|
2892
|
-
function
|
2893
|
-
switch (
|
2900
|
+
function gt(o) {
|
2901
|
+
switch (at(o), f.length) {
|
2894
2902
|
case 1:
|
2895
2903
|
switch (e.touches.ONE) {
|
2896
2904
|
case He.ROTATE:
|
@@ -2912,12 +2920,12 @@ class Ka extends sn {
|
|
2912
2920
|
case He.DOLLY_PAN:
|
2913
2921
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2914
2922
|
return;
|
2915
|
-
|
2923
|
+
Pt(o), s = r.TOUCH_DOLLY_PAN;
|
2916
2924
|
break;
|
2917
2925
|
case He.DOLLY_ROTATE:
|
2918
2926
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2919
2927
|
return;
|
2920
|
-
|
2928
|
+
dt(o), s = r.TOUCH_DOLLY_ROTATE;
|
2921
2929
|
break;
|
2922
2930
|
default:
|
2923
2931
|
s = r.NONE;
|
@@ -2926,19 +2934,19 @@ class Ka extends sn {
|
|
2926
2934
|
default:
|
2927
2935
|
s = r.NONE;
|
2928
2936
|
}
|
2929
|
-
s !== r.NONE && e.dispatchEvent(
|
2937
|
+
s !== r.NONE && e.dispatchEvent(It);
|
2930
2938
|
}
|
2931
|
-
function
|
2932
|
-
switch (
|
2939
|
+
function vt(o) {
|
2940
|
+
switch (at(o), s) {
|
2933
2941
|
case r.TOUCH_ROTATE:
|
2934
2942
|
if (e.enableRotate === !1)
|
2935
2943
|
return;
|
2936
|
-
|
2944
|
+
ft(o), e.update();
|
2937
2945
|
break;
|
2938
2946
|
case r.TOUCH_PAN:
|
2939
2947
|
if (e.enablePan === !1)
|
2940
2948
|
return;
|
2941
|
-
|
2949
|
+
ht(o), e.update();
|
2942
2950
|
break;
|
2943
2951
|
case r.TOUCH_DOLLY_PAN:
|
2944
2952
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
@@ -2948,7 +2956,7 @@ class Ka extends sn {
|
|
2948
2956
|
case r.TOUCH_DOLLY_ROTATE:
|
2949
2957
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2950
2958
|
return;
|
2951
|
-
|
2959
|
+
pt(o), e.update();
|
2952
2960
|
break;
|
2953
2961
|
default:
|
2954
2962
|
s = r.NONE;
|
@@ -2957,10 +2965,10 @@ class Ka extends sn {
|
|
2957
2965
|
function Oe(o) {
|
2958
2966
|
e.enabled !== !1 && o.preventDefault();
|
2959
2967
|
}
|
2960
|
-
function
|
2968
|
+
function _t(o) {
|
2961
2969
|
f.push(o.pointerId);
|
2962
2970
|
}
|
2963
|
-
function
|
2971
|
+
function bt(o) {
|
2964
2972
|
delete m[o.pointerId];
|
2965
2973
|
for (let y = 0; y < f.length; y++)
|
2966
2974
|
if (f[y] == o.pointerId) {
|
@@ -2968,7 +2976,7 @@ class Ka extends sn {
|
|
2968
2976
|
return;
|
2969
2977
|
}
|
2970
2978
|
}
|
2971
|
-
function
|
2979
|
+
function at(o) {
|
2972
2980
|
let y = m[o.pointerId];
|
2973
2981
|
y === void 0 && (y = new de(), m[o.pointerId] = y), y.set(o.pageX, o.pageY);
|
2974
2982
|
}
|
@@ -2976,10 +2984,10 @@ class Ka extends sn {
|
|
2976
2984
|
const y = o.pointerId === f[0] ? f[1] : f[0];
|
2977
2985
|
return m[y];
|
2978
2986
|
}
|
2979
|
-
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();
|
2980
2988
|
}
|
2981
2989
|
}
|
2982
|
-
const
|
2990
|
+
const St = (t) => {
|
2983
2991
|
const [n, a] = oe(t.options[t.index]), e = () => {
|
2984
2992
|
t.onToggle(!t.open);
|
2985
2993
|
}, r = (s) => {
|
@@ -2989,14 +2997,14 @@ const xt = (t) => {
|
|
2989
2997
|
/* @__PURE__ */ c.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
2990
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)) })
|
2991
2999
|
] });
|
2992
|
-
}, Ie =
|
3000
|
+
}, Ie = na(function(n, a) {
|
2993
3001
|
const [e, r] = oe(!1), s = n.options.indexOf(n.camera.name);
|
2994
3002
|
return /* @__PURE__ */ c.jsxs("div", { className: "CameraWindow", children: [
|
2995
3003
|
/* @__PURE__ */ c.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
2996
3004
|
e && r(!1);
|
2997
3005
|
} }),
|
2998
3006
|
/* @__PURE__ */ c.jsx(
|
2999
|
-
|
3007
|
+
St,
|
3000
3008
|
{
|
3001
3009
|
index: s,
|
3002
3010
|
open: e,
|
@@ -3009,14 +3017,14 @@ const xt = (t) => {
|
|
3009
3017
|
}
|
3010
3018
|
)
|
3011
3019
|
] });
|
3012
|
-
}),
|
3020
|
+
}), rn = [
|
3013
3021
|
"Single",
|
3014
3022
|
"Side by Side",
|
3015
3023
|
"Stacked",
|
3016
3024
|
"Quad"
|
3017
3025
|
], ne = /* @__PURE__ */ new Map(), ie = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
|
3018
3026
|
function Be(t, n) {
|
3019
|
-
const a = new
|
3027
|
+
const a = new dn(-100, 100, 100, -100, 50, 3e3);
|
3020
3028
|
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
|
3021
3029
|
}
|
3022
3030
|
Be("Top", new Y(0, 1e3, 0));
|
@@ -3026,47 +3034,47 @@ Be("Right", new Y(1e3, 0, 0));
|
|
3026
3034
|
Be("Front", new Y(0, 0, 1e3));
|
3027
3035
|
Be("Back", new Y(0, 0, -1e3));
|
3028
3036
|
Be("Orthographic", new Y(1e3, 1e3, 1e3));
|
3029
|
-
const
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3033
|
-
ne.set("Debug",
|
3034
|
-
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 = [
|
3035
3043
|
"Renderer",
|
3036
3044
|
"Depth",
|
3037
3045
|
"Normals",
|
3038
3046
|
"UVs",
|
3039
3047
|
"Wireframe"
|
3040
|
-
],
|
3048
|
+
], Za = new zn(), Ja = new Yn(), Qa = new Da(), ei = new Wn({
|
3041
3049
|
opacity: 0.33,
|
3042
3050
|
transparent: !0,
|
3043
3051
|
wireframe: !0
|
3044
3052
|
});
|
3045
|
-
let
|
3046
|
-
const z = new
|
3053
|
+
let xt = "Renderer";
|
3054
|
+
const z = new fn();
|
3047
3055
|
z.name = "Debug Scene";
|
3048
|
-
let xe = new
|
3056
|
+
let xe = new fn();
|
3049
3057
|
z.add(xe);
|
3050
|
-
const
|
3051
|
-
|
3052
|
-
z.add(
|
3053
|
-
const
|
3054
|
-
|
3055
|
-
const
|
3056
|
-
|
3057
|
-
|
3058
|
-
const
|
3059
|
-
|
3060
|
-
|
3061
|
-
|
3062
|
-
let
|
3063
|
-
function
|
3064
|
-
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) => {
|
3065
3073
|
const b = ie.get(f.name);
|
3066
3074
|
b !== void 0 && b.dispose(), ie.delete(f.name);
|
3067
3075
|
const O = we.get(f.name);
|
3068
3076
|
O !== void 0 && (z.remove(O), O.dispose()), we.delete(f.name);
|
3069
|
-
const B = new
|
3077
|
+
const B = new qa(f, m);
|
3070
3078
|
switch (B.enableDamping = !0, B.dampingFactor = 0.05, f.name) {
|
3071
3079
|
case "Top":
|
3072
3080
|
case "Bottom":
|
@@ -3077,11 +3085,11 @@ function pi(t) {
|
|
3077
3085
|
B.enableRotate = !1;
|
3078
3086
|
break;
|
3079
3087
|
}
|
3080
|
-
if (ie.set(f.name, B), f instanceof
|
3081
|
-
const $ = new
|
3088
|
+
if (ie.set(f.name, B), f instanceof Nt) {
|
3089
|
+
const $ = new qn(f);
|
3082
3090
|
we.set(f.name, $), z.add($);
|
3083
3091
|
}
|
3084
|
-
},
|
3092
|
+
}, X = (f) => {
|
3085
3093
|
const m = we.get(f.name);
|
3086
3094
|
m !== void 0 && (z.remove(m), m.dispose(), we.delete(f.name));
|
3087
3095
|
const b = ie.get(f.name);
|
@@ -3102,23 +3110,23 @@ function pi(t) {
|
|
3102
3110
|
S(V, M.current), S(re, G.current);
|
3103
3111
|
break;
|
3104
3112
|
case "Quad":
|
3105
|
-
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);
|
3106
3114
|
break;
|
3107
3115
|
}
|
3108
3116
|
};
|
3109
3117
|
Fe(() => {
|
3110
|
-
const f = new
|
3118
|
+
const f = new Kn({
|
3111
3119
|
canvas: x.current,
|
3112
3120
|
stencil: !1
|
3113
3121
|
});
|
3114
3122
|
f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
|
3115
3123
|
}, []), Fe(() => {
|
3116
3124
|
const f = (O) => {
|
3117
|
-
|
3125
|
+
vn(xe), z.remove(xe);
|
3118
3126
|
const B = t.scenes.get(O.value.name);
|
3119
3127
|
if (B !== void 0) {
|
3120
3128
|
const $ = new B();
|
3121
|
-
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;
|
3122
3130
|
}
|
3123
3131
|
}, m = (O) => {
|
3124
3132
|
var F;
|
@@ -3127,8 +3135,8 @@ function pi(t) {
|
|
3127
3135
|
}, b = (O) => {
|
3128
3136
|
ne.delete(O.value.name), E(Date.now());
|
3129
3137
|
};
|
3130
|
-
return
|
3131
|
-
|
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);
|
3132
3140
|
};
|
3133
3141
|
}, []), Fe(() => {
|
3134
3142
|
if (e === null)
|
@@ -3148,13 +3156,13 @@ function pi(t) {
|
|
3148
3156
|
R = b, I = O;
|
3149
3157
|
break;
|
3150
3158
|
}
|
3151
|
-
ne.forEach((
|
3159
|
+
ne.forEach((q) => {
|
3152
3160
|
var me;
|
3153
|
-
|
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());
|
3154
3162
|
});
|
3155
3163
|
}, F = () => {
|
3156
3164
|
e.setViewport(0, 0, f, m), e.setScissor(0, 0, f, m), e.render(z, V);
|
3157
|
-
},
|
3165
|
+
}, A = () => {
|
3158
3166
|
if (n === "Side by Side")
|
3159
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);
|
3160
3168
|
else {
|
@@ -3167,13 +3175,13 @@ function pi(t) {
|
|
3167
3175
|
}, J = () => {
|
3168
3176
|
switch (ie.forEach((R) => {
|
3169
3177
|
R.update();
|
3170
|
-
}), t.onSceneUpdate !== void 0 &&
|
3178
|
+
}), t.onSceneUpdate !== void 0 && sn && t.onSceneUpdate(xe), e.clear(), n) {
|
3171
3179
|
case "Single":
|
3172
3180
|
F();
|
3173
3181
|
break;
|
3174
3182
|
case "Side by Side":
|
3175
3183
|
case "Stacked":
|
3176
|
-
|
3184
|
+
A();
|
3177
3185
|
break;
|
3178
3186
|
case "Quad":
|
3179
3187
|
U();
|
@@ -3186,10 +3194,10 @@ function pi(t) {
|
|
3186
3194
|
};
|
3187
3195
|
}, [n, e]), Fe(() => {
|
3188
3196
|
if (e !== null) {
|
3189
|
-
const f = new
|
3197
|
+
const f = new Xn(), m = new de(), b = (F, A, U, J) => {
|
3190
3198
|
switch (n) {
|
3191
3199
|
case "Quad":
|
3192
|
-
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);
|
3193
3201
|
break;
|
3194
3202
|
case "Side by Side":
|
3195
3203
|
F < U ? f.setFromCamera(m, V) : f.setFromCamera(m, re);
|
@@ -3198,27 +3206,27 @@ function pi(t) {
|
|
3198
3206
|
f.setFromCamera(m, V);
|
3199
3207
|
break;
|
3200
3208
|
case "Stacked":
|
3201
|
-
|
3209
|
+
A < J ? f.setFromCamera(m, V) : f.setFromCamera(m, re);
|
3202
3210
|
break;
|
3203
3211
|
}
|
3204
3212
|
}, O = (F) => {
|
3205
|
-
if (!
|
3213
|
+
if (!Ct)
|
3206
3214
|
return;
|
3207
|
-
const
|
3208
|
-
e.getSize(
|
3209
|
-
const U = Math.min(F.clientX,
|
3210
|
-
m.x = Ke(U, 0,
|
3211
|
-
const R =
|
3212
|
-
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);
|
3213
3221
|
}, me = () => {
|
3214
|
-
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);
|
3215
3223
|
};
|
3216
3224
|
switch (n) {
|
3217
3225
|
case "Quad":
|
3218
|
-
|
3226
|
+
q(), me();
|
3219
3227
|
break;
|
3220
3228
|
case "Side by Side":
|
3221
|
-
|
3229
|
+
q();
|
3222
3230
|
break;
|
3223
3231
|
case "Stacked":
|
3224
3232
|
me(), me();
|
@@ -3226,12 +3234,12 @@ function pi(t) {
|
|
3226
3234
|
}
|
3227
3235
|
b(U, J, R, I);
|
3228
3236
|
const Re = f.intersectObjects(xe.children);
|
3229
|
-
Re.length > 0 &&
|
3237
|
+
Re.length > 0 && ct.position.copy(Re[0].point);
|
3230
3238
|
}, B = (F) => {
|
3231
|
-
if (!
|
3239
|
+
if (!Ct)
|
3232
3240
|
return;
|
3233
|
-
const
|
3234
|
-
if (e.getSize(
|
3241
|
+
const A = new de();
|
3242
|
+
if (e.getSize(A), F.clientX >= A.x)
|
3235
3243
|
return;
|
3236
3244
|
O(F);
|
3237
3245
|
const U = f.intersectObjects(xe.children);
|
@@ -3252,20 +3260,20 @@ function pi(t) {
|
|
3252
3260
|
var b;
|
3253
3261
|
(b = ie.get(V.name)) == null || b.dispose();
|
3254
3262
|
const m = ne.get(f);
|
3255
|
-
m !== void 0 && (
|
3263
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3256
3264
|
} }) }),
|
3257
3265
|
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
3258
3266
|
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref: M, onSelect: (f) => {
|
3259
3267
|
var b;
|
3260
3268
|
(b = ie.get(V.name)) == null || b.dispose();
|
3261
3269
|
const m = ne.get(f);
|
3262
|
-
m !== void 0 && (
|
3270
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3263
3271
|
} }),
|
3264
3272
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (f) => {
|
3265
3273
|
var b;
|
3266
3274
|
(b = ie.get(re.name)) == null || b.dispose();
|
3267
3275
|
const m = ne.get(f);
|
3268
|
-
m !== void 0 && (
|
3276
|
+
m !== void 0 && (X(re), re = m, S(m, G.current));
|
3269
3277
|
} })
|
3270
3278
|
] }),
|
3271
3279
|
n === "Quad" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
@@ -3273,34 +3281,34 @@ function pi(t) {
|
|
3273
3281
|
var b;
|
3274
3282
|
(b = ie.get(V.name)) == null || b.dispose();
|
3275
3283
|
const m = ne.get(f);
|
3276
|
-
m !== void 0 && (
|
3284
|
+
m !== void 0 && (X(V), V = m, S(m, M.current));
|
3277
3285
|
} }),
|
3278
3286
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (f) => {
|
3279
3287
|
var b;
|
3280
3288
|
(b = ie.get(re.name)) == null || b.dispose();
|
3281
3289
|
const m = ne.get(f);
|
3282
|
-
m !== void 0 && (
|
3290
|
+
m !== void 0 && (X(re), re = m, S(m, G.current));
|
3283
3291
|
} }),
|
3284
3292
|
/* @__PURE__ */ c.jsx(Ie, { camera: Ne, options: ee, ref: se, onSelect: (f) => {
|
3285
3293
|
var b;
|
3286
3294
|
(b = ie.get(Ne.name)) == null || b.dispose();
|
3287
3295
|
const m = ne.get(f);
|
3288
|
-
m !== void 0 && (
|
3296
|
+
m !== void 0 && (X(Ne), Ne = m, S(m, se.current));
|
3289
3297
|
} }),
|
3290
|
-
/* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref:
|
3298
|
+
/* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref: K, onSelect: (f) => {
|
3291
3299
|
var b;
|
3292
3300
|
(b = ie.get(Le.name)) == null || b.dispose();
|
3293
3301
|
const m = ne.get(f);
|
3294
|
-
m !== void 0 && (
|
3302
|
+
m !== void 0 && (X(Le), Le = m, S(m, K.current));
|
3295
3303
|
} })
|
3296
3304
|
] })
|
3297
3305
|
] }),
|
3298
3306
|
/* @__PURE__ */ c.jsxs("div", { className: "settings", children: [
|
3299
3307
|
/* @__PURE__ */ c.jsx(
|
3300
|
-
|
3308
|
+
St,
|
3301
3309
|
{
|
3302
|
-
index:
|
3303
|
-
options:
|
3310
|
+
index: rn.indexOf(n),
|
3311
|
+
options: rn,
|
3304
3312
|
onSelect: (f) => {
|
3305
3313
|
f !== n && (fe(), a(f));
|
3306
3314
|
},
|
@@ -3311,28 +3319,28 @@ function pi(t) {
|
|
3311
3319
|
}
|
3312
3320
|
),
|
3313
3321
|
/* @__PURE__ */ c.jsx(
|
3314
|
-
|
3322
|
+
St,
|
3315
3323
|
{
|
3316
|
-
index:
|
3317
|
-
options:
|
3324
|
+
index: on.indexOf(xt),
|
3325
|
+
options: on,
|
3318
3326
|
onSelect: (f) => {
|
3319
|
-
if (f !==
|
3320
|
-
switch (
|
3327
|
+
if (f !== xt)
|
3328
|
+
switch (xt = f, xt) {
|
3321
3329
|
case "Depth":
|
3322
|
-
z.overrideMaterial =
|
3330
|
+
z.overrideMaterial = Za;
|
3323
3331
|
break;
|
3324
3332
|
case "Normals":
|
3325
|
-
z.overrideMaterial =
|
3333
|
+
z.overrideMaterial = Ja;
|
3326
3334
|
break;
|
3327
3335
|
default:
|
3328
3336
|
case "Renderer":
|
3329
3337
|
z.overrideMaterial = null;
|
3330
3338
|
break;
|
3331
3339
|
case "Wireframe":
|
3332
|
-
z.overrideMaterial =
|
3340
|
+
z.overrideMaterial = ei;
|
3333
3341
|
break;
|
3334
3342
|
case "UVs":
|
3335
|
-
z.overrideMaterial =
|
3343
|
+
z.overrideMaterial = Qa;
|
3336
3344
|
break;
|
3337
3345
|
}
|
3338
3346
|
},
|
@@ -3343,7 +3351,7 @@ function pi(t) {
|
|
3343
3351
|
}
|
3344
3352
|
),
|
3345
3353
|
/* @__PURE__ */ c.jsx(
|
3346
|
-
|
3354
|
+
St,
|
3347
3355
|
{
|
3348
3356
|
index: 0,
|
3349
3357
|
options: [
|
@@ -3351,7 +3359,7 @@ function pi(t) {
|
|
3351
3359
|
"Selection Mode"
|
3352
3360
|
],
|
3353
3361
|
onSelect: (f) => {
|
3354
|
-
|
3362
|
+
Ct = f === "Selection Mode", ct.visible = Ct;
|
3355
3363
|
},
|
3356
3364
|
open: p,
|
3357
3365
|
onToggle: (f) => {
|
@@ -3362,7 +3370,7 @@ function pi(t) {
|
|
3362
3370
|
] })
|
3363
3371
|
] });
|
3364
3372
|
}
|
3365
|
-
function
|
3373
|
+
function vi(t) {
|
3366
3374
|
return /* @__PURE__ */ c.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3367
3375
|
/* @__PURE__ */ c.jsx("header", { children: t.header }),
|
3368
3376
|
t.children,
|
@@ -3370,40 +3378,40 @@ function mi(t) {
|
|
3370
3378
|
] });
|
3371
3379
|
}
|
3372
3380
|
export {
|
3373
|
-
|
3374
|
-
|
3375
|
-
|
3376
|
-
|
3377
|
-
|
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
|
-
|
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
|
3409
3417
|
};
|