@tomorrowevening/hermes 0.0.9 → 0.0.11
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 +1068 -1038
- package/dist/hermes.umd.cjs +16 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/core/RemoteController.ts +0 -3
- package/src/core/remote/RemoteThree.ts +5 -10
- package/src/core/types.ts +0 -1
- package/src/editor/global.ts +0 -1
- package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.scss +6 -0
- package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.tsx +103 -55
- package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiViewData.ts +7 -15
- package/src/editor/sceneHierarchy/SceneHierarchy.tsx +7 -21
- package/src/editor/sceneHierarchy/inspector/SceneInspector.tsx +16 -11
- package/src/editor/sceneHierarchy/inspector/utils/InspectMaterial.tsx +1 -0
- package/src/editor/sceneHierarchy/inspector/utils/InspectTransform.tsx +35 -46
- package/src/editor/utils.ts +60 -4
- package/src/index.ts +3 -3
- package/types/core/remote/RemoteThree.d.ts +0 -1
- package/types/core/types.d.ts +1 -1
- package/types/editor/global.d.ts +0 -1
- package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiView.d.ts +2 -4
- package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/MultiViewData.d.ts +4 -4
- package/types/editor/sceneHierarchy/SceneHierarchy.d.ts +0 -2
- package/types/editor/sceneHierarchy/inspector/SceneInspector.d.ts +0 -2
- package/types/editor/utils.d.ts +7 -1
- package/types/index.d.ts +3 -3
- /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/CameraWindow.tsx +0 -0
- /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridHelper.ts +0 -0
- /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridMaterial.ts +0 -0
- /package/src/editor/{sceneHierarchy/inspector/MultiView → multiView}/UVMaterial.ts +0 -0
- /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/CameraWindow.d.ts +0 -0
- /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridHelper.d.ts +0 -0
- /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/InfiniteGridMaterial.d.ts +0 -0
- /package/types/editor/{sceneHierarchy/inspector/MultiView → multiView}/UVMaterial.d.ts +0 -0
package/dist/hermes.js
CHANGED
@@ -1,48 +1,70 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { EventDispatcher as
|
5
|
-
import { getProject as
|
6
|
-
import { Pane as
|
7
|
-
import * as
|
8
|
-
import
|
9
|
-
import { Reorder as
|
1
|
+
var bn = Object.defineProperty;
|
2
|
+
var yn = (t, n, a) => n in t ? bn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
|
3
|
+
var $ = (t, n, a) => (yn(t, typeof n != "symbol" ? n + "" : n, a), a);
|
4
|
+
import { PositionalAudio as En, EventDispatcher as Zt, Texture as Jt, CubeTexture as xn, RepeatWrapping as Lt, ShaderMaterial as Qt, GLSL3 as wn, DoubleSide as Cn, Color as kt, Mesh as Sn, PlaneGeometry as On, Matrix4 as Tn, Vector3 as L, Euler as Rn, Ray as Mn, Plane as Pn, MathUtils as jn, MOUSE as Ne, TOUCH as Le, Quaternion as Ft, Spherical as Ut, Vector2 as oe, PerspectiveCamera as Tt, MeshDepthMaterial as _n, MeshNormalMaterial as kn, MeshBasicMaterial as Dn, OrthographicCamera as en, Scene as tn, AxesHelper as An, WebGLRenderer as In, CameraHelper as Nn } from "three";
|
5
|
+
import { getProject as Ln } from "@theatre/core";
|
6
|
+
import { Pane as Fn } from "tweakpane";
|
7
|
+
import * as Un from "@tweakpane/plugin-essentials";
|
8
|
+
import nn, { useState as ne, useRef as ye, useEffect as Be, Component as Bn, forwardRef as $n } from "react";
|
9
|
+
import { Reorder as an } from "framer-motion";
|
10
10
|
import Ze from "@theatre/studio";
|
11
|
-
function
|
11
|
+
function Ba(t, n, a) {
|
12
12
|
return Math.min(n, Math.max(t, a));
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function $a(t, n) {
|
15
15
|
const a = t - n;
|
16
16
|
return Math.sqrt(a * a);
|
17
17
|
}
|
18
|
-
function
|
18
|
+
function Gn() {
|
19
19
|
return Math.round(Math.random() * 1e6).toString();
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function Vn(t) {
|
22
22
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
23
23
|
}
|
24
|
-
function
|
24
|
+
function Yn(t) {
|
25
25
|
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (d) => {
|
26
|
-
const
|
27
|
-
return
|
26
|
+
const p = d.toString(16);
|
27
|
+
return p.length === 1 ? "0" + p : p;
|
28
28
|
}, u = o(n), c = o(a), s = o(e);
|
29
29
|
return "#" + u + c + s;
|
30
30
|
}
|
31
|
-
|
32
|
-
|
31
|
+
function Ct(t, n = 1) {
|
32
|
+
return Number(t.toFixed(n));
|
33
|
+
}
|
34
|
+
let Rt = 0;
|
35
|
+
const zn = () => {
|
36
|
+
Rt = 0;
|
37
|
+
}, rn = (t) => {
|
33
38
|
if (!t)
|
34
39
|
return;
|
35
40
|
let n = t.name.replace(" ", "");
|
36
|
-
n.length === 0 && (n = `obj_${
|
37
|
-
|
41
|
+
n.length === 0 && (n = `obj_${Rt}`, Rt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
42
|
+
rn(a);
|
38
43
|
});
|
44
|
+
}, Ga = (t) => {
|
45
|
+
t == null || t.dispose();
|
46
|
+
}, Wn = (t) => {
|
47
|
+
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
48
|
+
}, on = (t) => {
|
49
|
+
var n;
|
50
|
+
if (t) {
|
51
|
+
for (; t.children.length > 0; ) {
|
52
|
+
const a = t.children[0];
|
53
|
+
a instanceof En ? (a.pause(), a.parent && a.parent.remove(a)) : on(a);
|
54
|
+
}
|
55
|
+
if (t.parent && t.parent.remove(t), t.isMesh) {
|
56
|
+
const a = t;
|
57
|
+
(n = a.geometry) == null || n.dispose(), Wn(a.material);
|
58
|
+
}
|
59
|
+
t.dispose !== void 0 && t.dispose();
|
60
|
+
}
|
39
61
|
};
|
40
|
-
class
|
62
|
+
class Va {
|
41
63
|
constructor(n, a, e) {
|
42
|
-
|
43
|
-
|
64
|
+
$(this, "channel");
|
65
|
+
$(this, "components", /* @__PURE__ */ new Map());
|
44
66
|
// Protected
|
45
|
-
|
67
|
+
$(this, "_mode", "app");
|
46
68
|
this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
|
47
69
|
}
|
48
70
|
addComponent(n, a) {
|
@@ -73,13 +95,12 @@ class Rr {
|
|
73
95
|
n && (this._mode = "editor", document.title += " - Editor");
|
74
96
|
}
|
75
97
|
}
|
76
|
-
const
|
98
|
+
const I = new Zt(), N = {
|
77
99
|
CUSTOM: "ToolEvents::custom",
|
78
100
|
// Components
|
79
101
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
80
102
|
DRAG_UPDATE: "ToolEvents::dragUpdate",
|
81
103
|
// SceneHierarchy
|
82
|
-
GET_SCENE: "ToolEvents::getScene",
|
83
104
|
SET_SCENE: "ToolEvents::setScene",
|
84
105
|
GET_OBJECT: "ToolEvents::getObject",
|
85
106
|
SET_OBJECT: "ToolEvents::setObject",
|
@@ -87,15 +108,15 @@ const k = new Kt(), D = {
|
|
87
108
|
CREATE_TEXTURE: "ToolEvents::createTexture",
|
88
109
|
REQUEST_METHOD: "ToolEvents::requestMethod"
|
89
110
|
};
|
90
|
-
class
|
111
|
+
class gt {
|
91
112
|
constructor(n) {
|
92
|
-
|
113
|
+
$(this, "app");
|
93
114
|
this.app = n;
|
94
115
|
}
|
95
116
|
dispose() {
|
96
117
|
}
|
97
118
|
}
|
98
|
-
class
|
119
|
+
class Ya extends gt {
|
99
120
|
selectDropdown(n, a) {
|
100
121
|
this.app.send({
|
101
122
|
event: "selectComponent",
|
@@ -117,17 +138,17 @@ class Pr extends mt {
|
|
117
138
|
});
|
118
139
|
}
|
119
140
|
}
|
120
|
-
const
|
141
|
+
const sn = () => {
|
121
142
|
};
|
122
|
-
class
|
143
|
+
class za extends gt {
|
123
144
|
constructor(a, e, o) {
|
124
145
|
super(a);
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
this.project =
|
146
|
+
$(this, "project");
|
147
|
+
$(this, "sheets");
|
148
|
+
$(this, "sheetObjects");
|
149
|
+
$(this, "sheetObjectCBs");
|
150
|
+
$(this, "sheetObjectUnsubscribe");
|
151
|
+
this.project = Ln(e, o), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
131
152
|
}
|
132
153
|
dispose() {
|
133
154
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
@@ -153,16 +174,16 @@ class jr extends mt {
|
|
153
174
|
let d = this.sheetObjects.get(s);
|
154
175
|
if (d !== void 0)
|
155
176
|
return d = c.object(e, { ...o, ...d.value }, { reconfigure: !0 }), d;
|
156
|
-
d = c.object(e, o), this.sheetObjects.set(s, d), this.sheetObjectCBs.set(s, u !== void 0 ? u :
|
157
|
-
const
|
177
|
+
d = c.object(e, o), this.sheetObjects.set(s, d), this.sheetObjectCBs.set(s, u !== void 0 ? u : sn);
|
178
|
+
const p = d.onValuesChange((h) => {
|
158
179
|
if (this.app.editor) {
|
159
|
-
for (const
|
160
|
-
const
|
161
|
-
typeof
|
162
|
-
r:
|
163
|
-
g:
|
164
|
-
b:
|
165
|
-
a:
|
180
|
+
for (const b in h) {
|
181
|
+
const x = h[b];
|
182
|
+
typeof x == "object" && Vn(x) && (h[b] = {
|
183
|
+
r: x.r,
|
184
|
+
g: x.g,
|
185
|
+
b: x.b,
|
186
|
+
a: x.a
|
166
187
|
});
|
167
188
|
}
|
168
189
|
this.app.send({
|
@@ -170,15 +191,15 @@ class jr extends mt {
|
|
170
191
|
target: "app",
|
171
192
|
data: {
|
172
193
|
sheetObject: s,
|
173
|
-
values:
|
194
|
+
values: h
|
174
195
|
}
|
175
196
|
});
|
176
197
|
} else {
|
177
|
-
const
|
178
|
-
|
198
|
+
const b = this.sheetObjectCBs.get(s);
|
199
|
+
b !== void 0 && b(h);
|
179
200
|
}
|
180
201
|
});
|
181
|
-
return this.sheetObjectUnsubscribe.set(s,
|
202
|
+
return this.sheetObjectUnsubscribe.set(s, p), d;
|
182
203
|
}
|
183
204
|
unsubscribe(a) {
|
184
205
|
if (this.project === void 0) {
|
@@ -189,7 +210,7 @@ class jr extends mt {
|
|
189
210
|
o !== void 0 && o();
|
190
211
|
}
|
191
212
|
}
|
192
|
-
function
|
213
|
+
function Hn(t) {
|
193
214
|
if (t.name === "cameras")
|
194
215
|
return "camera";
|
195
216
|
if (t.name === "interactive")
|
@@ -203,7 +224,7 @@ function Ln(t) {
|
|
203
224
|
const n = t.type;
|
204
225
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
205
226
|
}
|
206
|
-
function
|
227
|
+
function cn(t) {
|
207
228
|
const n = {
|
208
229
|
name: t.name,
|
209
230
|
type: t.type,
|
@@ -211,10 +232,10 @@ function nn(t) {
|
|
211
232
|
children: []
|
212
233
|
};
|
213
234
|
return t.children.forEach((a) => {
|
214
|
-
n.children.push(
|
235
|
+
n.children.push(cn(a));
|
215
236
|
}), n;
|
216
237
|
}
|
217
|
-
function
|
238
|
+
function Kn(t) {
|
218
239
|
const n = {};
|
219
240
|
for (const a in t) {
|
220
241
|
const e = t[a].value;
|
@@ -222,7 +243,7 @@ function Fn(t) {
|
|
222
243
|
}
|
223
244
|
return n;
|
224
245
|
}
|
225
|
-
function
|
246
|
+
function Xn(t) {
|
226
247
|
switch (t) {
|
227
248
|
case "blendSrcAlpha":
|
228
249
|
case "blendDstAlpha":
|
@@ -234,10 +255,10 @@ function Un(t) {
|
|
234
255
|
}
|
235
256
|
return !1;
|
236
257
|
}
|
237
|
-
function
|
258
|
+
function Bt(t) {
|
238
259
|
const n = {};
|
239
260
|
for (const a in t) {
|
240
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
261
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Xn(a))
|
241
262
|
continue;
|
242
263
|
const e = typeof t[a], o = t[a];
|
243
264
|
switch (e) {
|
@@ -249,13 +270,13 @@ function Ft(t) {
|
|
249
270
|
case "object":
|
250
271
|
if (o !== null)
|
251
272
|
if (n[a] = o, o.isTexture)
|
252
|
-
if (o instanceof
|
273
|
+
if (o instanceof Jt) {
|
253
274
|
const u = o.source.toJSON();
|
254
275
|
n[a] = { src: u.url };
|
255
276
|
} else
|
256
|
-
o instanceof
|
277
|
+
o instanceof xn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
|
257
278
|
else
|
258
|
-
a === "uniforms" && (n[a] =
|
279
|
+
a === "uniforms" && (n[a] = Kn(n[a]));
|
259
280
|
else
|
260
281
|
n[a] = { src: "" };
|
261
282
|
break;
|
@@ -263,7 +284,7 @@ function Ft(t) {
|
|
263
284
|
}
|
264
285
|
return n;
|
265
286
|
}
|
266
|
-
function
|
287
|
+
function qn(t) {
|
267
288
|
t.updateMatrix();
|
268
289
|
const n = {
|
269
290
|
name: t.name,
|
@@ -281,10 +302,10 @@ function Bn(t) {
|
|
281
302
|
if (Array.isArray(e.material)) {
|
282
303
|
const o = [];
|
283
304
|
e.material.forEach((u) => {
|
284
|
-
o.push(
|
305
|
+
o.push(Bt(u));
|
285
306
|
}), n.material = o;
|
286
307
|
} else
|
287
|
-
n.material =
|
308
|
+
n.material = Bt(e.material);
|
288
309
|
} else
|
289
310
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
290
311
|
fov: t.fov,
|
@@ -314,7 +335,7 @@ function Bn(t) {
|
|
314
335
|
});
|
315
336
|
return n;
|
316
337
|
}
|
317
|
-
function
|
338
|
+
function q(t, n, a) {
|
318
339
|
const e = n.split(".");
|
319
340
|
switch (e.length) {
|
320
341
|
case 1:
|
@@ -334,19 +355,19 @@ function K(t, n, a) {
|
|
334
355
|
break;
|
335
356
|
}
|
336
357
|
}
|
337
|
-
function
|
358
|
+
function Mt(t) {
|
338
359
|
return new Promise((n, a) => {
|
339
360
|
const e = new Image();
|
340
361
|
e.onload = () => {
|
341
|
-
const o = new
|
342
|
-
o.wrapS =
|
362
|
+
const o = new Jt(e);
|
363
|
+
o.wrapS = Lt, o.wrapT = Lt, o.needsUpdate = !0, n(o);
|
343
364
|
}, e.onerror = a, e.src = t;
|
344
365
|
});
|
345
366
|
}
|
346
|
-
class
|
367
|
+
class Wa extends gt {
|
347
368
|
constructor() {
|
348
369
|
super(...arguments);
|
349
|
-
|
370
|
+
$(this, "scene");
|
350
371
|
}
|
351
372
|
getObject(a) {
|
352
373
|
this.app.send({
|
@@ -356,7 +377,7 @@ class _r extends mt {
|
|
356
377
|
});
|
357
378
|
}
|
358
379
|
setObject(a) {
|
359
|
-
const e =
|
380
|
+
const e = qn(a);
|
360
381
|
this.app.send({
|
361
382
|
event: "setObject",
|
362
383
|
target: "editor",
|
@@ -396,15 +417,11 @@ class _r extends mt {
|
|
396
417
|
}
|
397
418
|
});
|
398
419
|
}
|
399
|
-
getScene() {
|
400
|
-
this.app.send({
|
401
|
-
event: "getScene",
|
402
|
-
target: "app"
|
403
|
-
});
|
404
|
-
}
|
405
420
|
setScene(a) {
|
406
|
-
|
407
|
-
|
421
|
+
if (a === void 0)
|
422
|
+
return;
|
423
|
+
this.scene = a, zn(), rn(this.scene);
|
424
|
+
const e = cn(this.scene);
|
408
425
|
this.app.send({
|
409
426
|
event: "setScene",
|
410
427
|
target: "editor",
|
@@ -412,19 +429,19 @@ class _r extends mt {
|
|
412
429
|
});
|
413
430
|
}
|
414
431
|
}
|
415
|
-
class
|
432
|
+
class Ha extends gt {
|
416
433
|
constructor(a) {
|
417
434
|
super(a);
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
435
|
+
$(this, "bindCBs");
|
436
|
+
$(this, "buttonCBs");
|
437
|
+
$(this, "pane");
|
438
|
+
$(this, "appCallbacks", 0);
|
439
|
+
$(this, "editorCallbacks", 0);
|
440
|
+
$(this, "inspectorFolder");
|
424
441
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
|
425
442
|
}
|
426
443
|
createGUI() {
|
427
|
-
this.pane = new
|
444
|
+
this.pane = new Fn({ title: "GUI" }), this.pane.registerPlugin(Un);
|
428
445
|
}
|
429
446
|
dispose() {
|
430
447
|
var a;
|
@@ -451,14 +468,14 @@ class kr extends mt {
|
|
451
468
|
}
|
452
469
|
// Binding
|
453
470
|
bind(a, e, o, u = void 0) {
|
454
|
-
const c = this.bindID, s = o.onChange !== void 0 ? o.onChange :
|
455
|
-
this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (u !== void 0 ? u : this.pane).addBinding(a, e, o).on("change", (
|
471
|
+
const c = this.bindID, s = o.onChange !== void 0 ? o.onChange : sn;
|
472
|
+
this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (u !== void 0 ? u : this.pane).addBinding(a, e, o).on("change", (p) => {
|
456
473
|
this.app.send({
|
457
474
|
event: "updateBind",
|
458
475
|
target: "app",
|
459
476
|
data: {
|
460
477
|
id: c,
|
461
|
-
value:
|
478
|
+
value: p.value
|
462
479
|
}
|
463
480
|
});
|
464
481
|
}), this.editorCallbacks++) : (this.app.send({
|
@@ -512,7 +529,7 @@ class kr extends mt {
|
|
512
529
|
this.inspectorFolder.remove(this.inspectorFolder.children[e]);
|
513
530
|
}
|
514
531
|
}
|
515
|
-
var
|
532
|
+
var Pt = { exports: {} }, Je = {};
|
516
533
|
/**
|
517
534
|
* @license React
|
518
535
|
* react-jsx-runtime.production.min.js
|
@@ -522,21 +539,21 @@ var Ot = { exports: {} }, Je = {};
|
|
522
539
|
* This source code is licensed under the MIT license found in the
|
523
540
|
* LICENSE file in the root directory of this source tree.
|
524
541
|
*/
|
525
|
-
var
|
526
|
-
function
|
527
|
-
if (
|
542
|
+
var $t;
|
543
|
+
function Zn() {
|
544
|
+
if ($t)
|
528
545
|
return Je;
|
529
|
-
|
530
|
-
var t =
|
531
|
-
function c(s, d,
|
532
|
-
var
|
533
|
-
|
534
|
-
for (
|
535
|
-
e.call(d,
|
546
|
+
$t = 1;
|
547
|
+
var t = nn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
|
548
|
+
function c(s, d, p) {
|
549
|
+
var h, b = {}, x = null, S = null;
|
550
|
+
p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (S = d.ref);
|
551
|
+
for (h in d)
|
552
|
+
e.call(d, h) && !u.hasOwnProperty(h) && (b[h] = d[h]);
|
536
553
|
if (s && s.defaultProps)
|
537
|
-
for (
|
538
|
-
|
539
|
-
return { $$typeof: n, type: s, key:
|
554
|
+
for (h in d = s.defaultProps, d)
|
555
|
+
b[h] === void 0 && (b[h] = d[h]);
|
556
|
+
return { $$typeof: n, type: s, key: x, ref: S, props: b, _owner: o.current };
|
540
557
|
}
|
541
558
|
return Je.Fragment = a, Je.jsx = c, Je.jsxs = c, Je;
|
542
559
|
}
|
@@ -550,57 +567,57 @@ var Qe = {};
|
|
550
567
|
* This source code is licensed under the MIT license found in the
|
551
568
|
* LICENSE file in the root directory of this source tree.
|
552
569
|
*/
|
553
|
-
var
|
554
|
-
function
|
555
|
-
return
|
556
|
-
var t =
|
557
|
-
function
|
570
|
+
var Gt;
|
571
|
+
function Jn() {
|
572
|
+
return Gt || (Gt = 1, process.env.NODE_ENV !== "production" && function() {
|
573
|
+
var t = nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), O = Symbol.iterator, m = "@@iterator";
|
574
|
+
function v(r) {
|
558
575
|
if (r === null || typeof r != "object")
|
559
576
|
return null;
|
560
|
-
var
|
561
|
-
return typeof
|
577
|
+
var f = O && r[O] || r[m];
|
578
|
+
return typeof f == "function" ? f : null;
|
562
579
|
}
|
563
|
-
var
|
564
|
-
function
|
580
|
+
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
581
|
+
function w(r) {
|
565
582
|
{
|
566
|
-
for (var
|
567
|
-
|
568
|
-
|
583
|
+
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
|
584
|
+
g[C - 1] = arguments[C];
|
585
|
+
F("error", r, g);
|
569
586
|
}
|
570
587
|
}
|
571
|
-
function
|
588
|
+
function F(r, f, g) {
|
572
589
|
{
|
573
|
-
var
|
574
|
-
M !== "" && (
|
575
|
-
var
|
576
|
-
return String(
|
590
|
+
var C = y.ReactDebugCurrentFrame, M = C.getStackAddendum();
|
591
|
+
M !== "" && (f += "%s", g = g.concat([M]));
|
592
|
+
var k = g.map(function(R) {
|
593
|
+
return String(R);
|
577
594
|
});
|
578
|
-
|
595
|
+
k.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, k);
|
579
596
|
}
|
580
597
|
}
|
581
|
-
var
|
582
|
-
|
583
|
-
function
|
584
|
-
return !!(typeof r == "string" || typeof r == "function" || r === e || r === u ||
|
598
|
+
var V = !1, Z = !1, se = !1, Y = !1, fe = !1, j;
|
599
|
+
j = Symbol.for("react.module.reference");
|
600
|
+
function D(r) {
|
601
|
+
return !!(typeof r == "string" || typeof r == "function" || r === e || r === u || fe || r === o || r === p || r === h || Y || r === S || V || Z || se || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === b || r.$$typeof === c || r.$$typeof === s || r.$$typeof === d || // This needs to include all possible module reference object
|
585
602
|
// types supported by any Flight configuration anywhere since
|
586
603
|
// we don't know which Flight build this will end up being used
|
587
604
|
// with.
|
588
|
-
r.$$typeof ===
|
605
|
+
r.$$typeof === j || r.getModuleId !== void 0));
|
589
606
|
}
|
590
|
-
function
|
591
|
-
var
|
592
|
-
if (
|
593
|
-
return
|
594
|
-
var M =
|
595
|
-
return M !== "" ?
|
607
|
+
function z(r, f, g) {
|
608
|
+
var C = r.displayName;
|
609
|
+
if (C)
|
610
|
+
return C;
|
611
|
+
var M = f.displayName || f.name || "";
|
612
|
+
return M !== "" ? g + "(" + M + ")" : g;
|
596
613
|
}
|
597
|
-
function
|
614
|
+
function ce(r) {
|
598
615
|
return r.displayName || "Context";
|
599
616
|
}
|
600
|
-
function
|
617
|
+
function ae(r) {
|
601
618
|
if (r == null)
|
602
619
|
return null;
|
603
|
-
if (typeof r.tag == "number" &&
|
620
|
+
if (typeof r.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
604
621
|
return r.displayName || r.name || null;
|
605
622
|
if (typeof r == "string")
|
606
623
|
return r;
|
@@ -613,28 +630,28 @@ function Gn() {
|
|
613
630
|
return "Profiler";
|
614
631
|
case o:
|
615
632
|
return "StrictMode";
|
616
|
-
case
|
633
|
+
case p:
|
617
634
|
return "Suspense";
|
618
|
-
case
|
635
|
+
case h:
|
619
636
|
return "SuspenseList";
|
620
637
|
}
|
621
638
|
if (typeof r == "object")
|
622
639
|
switch (r.$$typeof) {
|
623
640
|
case s:
|
624
|
-
var
|
625
|
-
return
|
641
|
+
var f = r;
|
642
|
+
return ce(f) + ".Consumer";
|
626
643
|
case c:
|
627
|
-
var
|
628
|
-
return
|
644
|
+
var g = r;
|
645
|
+
return ce(g._context) + ".Provider";
|
629
646
|
case d:
|
630
|
-
return
|
631
|
-
case
|
632
|
-
var
|
633
|
-
return
|
634
|
-
case
|
635
|
-
var M = r,
|
647
|
+
return z(r, r.render, "ForwardRef");
|
648
|
+
case b:
|
649
|
+
var C = r.displayName || null;
|
650
|
+
return C !== null ? C : ae(r.type) || "Memo";
|
651
|
+
case x: {
|
652
|
+
var M = r, k = M._payload, R = M._init;
|
636
653
|
try {
|
637
|
-
return
|
654
|
+
return ae(R(k));
|
638
655
|
} catch {
|
639
656
|
return null;
|
640
657
|
}
|
@@ -642,18 +659,18 @@ function Gn() {
|
|
642
659
|
}
|
643
660
|
return null;
|
644
661
|
}
|
645
|
-
var
|
646
|
-
function
|
662
|
+
var le = Object.assign, re = 0, Me, Ge, Pe, je, Ve, nt, Ye;
|
663
|
+
function at() {
|
647
664
|
}
|
648
|
-
|
649
|
-
function
|
665
|
+
at.__reactDisabledLog = !0;
|
666
|
+
function bt() {
|
650
667
|
{
|
651
|
-
if (
|
652
|
-
|
668
|
+
if (re === 0) {
|
669
|
+
Me = console.log, Ge = console.info, Pe = console.warn, je = console.error, Ve = console.group, nt = console.groupCollapsed, Ye = console.groupEnd;
|
653
670
|
var r = {
|
654
671
|
configurable: !0,
|
655
672
|
enumerable: !0,
|
656
|
-
value:
|
673
|
+
value: at,
|
657
674
|
writable: !0
|
658
675
|
};
|
659
676
|
Object.defineProperties(console, {
|
@@ -666,205 +683,205 @@ function Gn() {
|
|
666
683
|
groupEnd: r
|
667
684
|
});
|
668
685
|
}
|
669
|
-
|
686
|
+
re++;
|
670
687
|
}
|
671
688
|
}
|
672
|
-
function
|
689
|
+
function yt() {
|
673
690
|
{
|
674
|
-
if (
|
691
|
+
if (re--, re === 0) {
|
675
692
|
var r = {
|
676
693
|
configurable: !0,
|
677
694
|
enumerable: !0,
|
678
695
|
writable: !0
|
679
696
|
};
|
680
697
|
Object.defineProperties(console, {
|
681
|
-
log:
|
682
|
-
value:
|
698
|
+
log: le({}, r, {
|
699
|
+
value: Me
|
683
700
|
}),
|
684
|
-
info:
|
701
|
+
info: le({}, r, {
|
685
702
|
value: Ge
|
686
703
|
}),
|
687
|
-
warn:
|
688
|
-
value:
|
704
|
+
warn: le({}, r, {
|
705
|
+
value: Pe
|
689
706
|
}),
|
690
|
-
error:
|
691
|
-
value:
|
707
|
+
error: le({}, r, {
|
708
|
+
value: je
|
692
709
|
}),
|
693
|
-
group:
|
710
|
+
group: le({}, r, {
|
694
711
|
value: Ve
|
695
712
|
}),
|
696
|
-
groupCollapsed:
|
713
|
+
groupCollapsed: le({}, r, {
|
697
714
|
value: nt
|
698
715
|
}),
|
699
|
-
groupEnd:
|
716
|
+
groupEnd: le({}, r, {
|
700
717
|
value: Ye
|
701
718
|
})
|
702
719
|
});
|
703
720
|
}
|
704
|
-
|
721
|
+
re < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
705
722
|
}
|
706
723
|
}
|
707
|
-
var ze =
|
708
|
-
function
|
724
|
+
var ze = y.ReactCurrentDispatcher, We;
|
725
|
+
function Ee(r, f, g) {
|
709
726
|
{
|
710
727
|
if (We === void 0)
|
711
728
|
try {
|
712
729
|
throw Error();
|
713
730
|
} catch (M) {
|
714
|
-
var
|
715
|
-
We =
|
731
|
+
var C = M.stack.trim().match(/\n( *(at )?)/);
|
732
|
+
We = C && C[1] || "";
|
716
733
|
}
|
717
734
|
return `
|
718
735
|
` + We + r;
|
719
736
|
}
|
720
737
|
}
|
721
|
-
var
|
738
|
+
var _e = !1, xe;
|
722
739
|
{
|
723
|
-
var
|
724
|
-
|
740
|
+
var Et = typeof WeakMap == "function" ? WeakMap : Map;
|
741
|
+
xe = new Et();
|
725
742
|
}
|
726
|
-
function
|
727
|
-
if (!r ||
|
743
|
+
function rt(r, f) {
|
744
|
+
if (!r || _e)
|
728
745
|
return "";
|
729
746
|
{
|
730
|
-
var
|
731
|
-
if (
|
732
|
-
return
|
747
|
+
var g = xe.get(r);
|
748
|
+
if (g !== void 0)
|
749
|
+
return g;
|
733
750
|
}
|
734
|
-
var
|
735
|
-
|
751
|
+
var C;
|
752
|
+
_e = !0;
|
736
753
|
var M = Error.prepareStackTrace;
|
737
754
|
Error.prepareStackTrace = void 0;
|
738
|
-
var
|
739
|
-
|
755
|
+
var k;
|
756
|
+
k = ze.current, ze.current = null, bt();
|
740
757
|
try {
|
741
|
-
if (
|
742
|
-
var
|
758
|
+
if (f) {
|
759
|
+
var R = function() {
|
743
760
|
throw Error();
|
744
761
|
};
|
745
|
-
if (Object.defineProperty(
|
762
|
+
if (Object.defineProperty(R.prototype, "props", {
|
746
763
|
set: function() {
|
747
764
|
throw Error();
|
748
765
|
}
|
749
766
|
}), typeof Reflect == "object" && Reflect.construct) {
|
750
767
|
try {
|
751
|
-
Reflect.construct(
|
752
|
-
} catch (
|
753
|
-
|
768
|
+
Reflect.construct(R, []);
|
769
|
+
} catch (pe) {
|
770
|
+
C = pe;
|
754
771
|
}
|
755
|
-
Reflect.construct(r, [],
|
772
|
+
Reflect.construct(r, [], R);
|
756
773
|
} else {
|
757
774
|
try {
|
758
|
-
|
759
|
-
} catch (
|
760
|
-
|
775
|
+
R.call();
|
776
|
+
} catch (pe) {
|
777
|
+
C = pe;
|
761
778
|
}
|
762
|
-
r.call(
|
779
|
+
r.call(R.prototype);
|
763
780
|
}
|
764
781
|
} else {
|
765
782
|
try {
|
766
783
|
throw Error();
|
767
|
-
} catch (
|
768
|
-
|
784
|
+
} catch (pe) {
|
785
|
+
C = pe;
|
769
786
|
}
|
770
787
|
r();
|
771
788
|
}
|
772
|
-
} catch (
|
773
|
-
if (
|
774
|
-
for (var
|
775
|
-
`),
|
776
|
-
`),
|
789
|
+
} catch (pe) {
|
790
|
+
if (pe && C && typeof pe.stack == "string") {
|
791
|
+
for (var T = pe.stack.split(`
|
792
|
+
`), K = C.stack.split(`
|
793
|
+
`), U = T.length - 1, B = K.length - 1; U >= 1 && B >= 0 && T[U] !== K[B]; )
|
777
794
|
B--;
|
778
|
-
for (;
|
779
|
-
if (
|
780
|
-
if (
|
795
|
+
for (; U >= 1 && B >= 0; U--, B--)
|
796
|
+
if (T[U] !== K[B]) {
|
797
|
+
if (U !== 1 || B !== 1)
|
781
798
|
do
|
782
|
-
if (
|
783
|
-
var
|
784
|
-
` +
|
785
|
-
return r.displayName &&
|
799
|
+
if (U--, B--, B < 0 || T[U] !== K[B]) {
|
800
|
+
var ie = `
|
801
|
+
` + T[U].replace(" at new ", " at ");
|
802
|
+
return r.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", r.displayName)), typeof r == "function" && xe.set(r, ie), ie;
|
786
803
|
}
|
787
|
-
while (
|
804
|
+
while (U >= 1 && B >= 0);
|
788
805
|
break;
|
789
806
|
}
|
790
807
|
}
|
791
808
|
} finally {
|
792
|
-
|
809
|
+
_e = !1, ze.current = k, yt(), Error.prepareStackTrace = M;
|
793
810
|
}
|
794
|
-
var
|
795
|
-
return typeof r == "function" &&
|
811
|
+
var Ie = r ? r.displayName || r.name : "", Nt = Ie ? Ee(Ie) : "";
|
812
|
+
return typeof r == "function" && xe.set(r, Nt), Nt;
|
796
813
|
}
|
797
|
-
function it(r,
|
798
|
-
return
|
814
|
+
function it(r, f, g) {
|
815
|
+
return rt(r, !1);
|
799
816
|
}
|
800
817
|
function ot(r) {
|
801
|
-
var
|
802
|
-
return !!(
|
818
|
+
var f = r.prototype;
|
819
|
+
return !!(f && f.isReactComponent);
|
803
820
|
}
|
804
|
-
function
|
821
|
+
function we(r, f, g) {
|
805
822
|
if (r == null)
|
806
823
|
return "";
|
807
824
|
if (typeof r == "function")
|
808
|
-
return
|
825
|
+
return rt(r, ot(r));
|
809
826
|
if (typeof r == "string")
|
810
|
-
return
|
827
|
+
return Ee(r);
|
811
828
|
switch (r) {
|
812
|
-
case
|
813
|
-
return
|
814
|
-
case
|
815
|
-
return
|
829
|
+
case p:
|
830
|
+
return Ee("Suspense");
|
831
|
+
case h:
|
832
|
+
return Ee("SuspenseList");
|
816
833
|
}
|
817
834
|
if (typeof r == "object")
|
818
835
|
switch (r.$$typeof) {
|
819
836
|
case d:
|
820
837
|
return it(r.render);
|
821
|
-
case
|
822
|
-
return
|
823
|
-
case
|
824
|
-
var
|
838
|
+
case b:
|
839
|
+
return we(r.type, f, g);
|
840
|
+
case x: {
|
841
|
+
var C = r, M = C._payload, k = C._init;
|
825
842
|
try {
|
826
|
-
return
|
843
|
+
return we(k(M), f, g);
|
827
844
|
} catch {
|
828
845
|
}
|
829
846
|
}
|
830
847
|
}
|
831
848
|
return "";
|
832
849
|
}
|
833
|
-
var
|
834
|
-
function
|
850
|
+
var ke = Object.prototype.hasOwnProperty, st = {}, He = y.ReactDebugCurrentFrame;
|
851
|
+
function ge(r) {
|
835
852
|
if (r) {
|
836
|
-
var
|
837
|
-
He.setExtraStackFrame(
|
853
|
+
var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
|
854
|
+
He.setExtraStackFrame(g);
|
838
855
|
} else
|
839
856
|
He.setExtraStackFrame(null);
|
840
857
|
}
|
841
|
-
function
|
858
|
+
function Ce(r, f, g, C, M) {
|
842
859
|
{
|
843
|
-
var
|
844
|
-
for (var
|
845
|
-
if (
|
846
|
-
var
|
860
|
+
var k = Function.call.bind(ke);
|
861
|
+
for (var R in r)
|
862
|
+
if (k(r, R)) {
|
863
|
+
var T = void 0;
|
847
864
|
try {
|
848
|
-
if (typeof r[
|
849
|
-
var
|
850
|
-
throw
|
865
|
+
if (typeof r[R] != "function") {
|
866
|
+
var K = Error((C || "React class") + ": " + g + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
867
|
+
throw K.name = "Invariant Violation", K;
|
851
868
|
}
|
852
|
-
|
853
|
-
} catch (
|
854
|
-
|
869
|
+
T = r[R](f, R, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
870
|
+
} catch (U) {
|
871
|
+
T = U;
|
855
872
|
}
|
856
|
-
|
873
|
+
T && !(T instanceof Error) && (ge(M), w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", g, R, typeof T), ge(null)), T instanceof Error && !(T.message in st) && (st[T.message] = !0, ge(M), w("Failed %s type: %s", g, T.message), ge(null));
|
857
874
|
}
|
858
875
|
}
|
859
876
|
}
|
860
|
-
var
|
877
|
+
var xt = Array.isArray;
|
861
878
|
function Ke(r) {
|
862
|
-
return
|
879
|
+
return xt(r);
|
863
880
|
}
|
864
881
|
function ct(r) {
|
865
882
|
{
|
866
|
-
var
|
867
|
-
return
|
883
|
+
var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
|
884
|
+
return g;
|
868
885
|
}
|
869
886
|
}
|
870
887
|
function Xe(r) {
|
@@ -879,123 +896,123 @@ function Gn() {
|
|
879
896
|
}
|
880
897
|
function ut(r) {
|
881
898
|
if (Xe(r))
|
882
|
-
return
|
899
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(r)), lt(r);
|
883
900
|
}
|
884
|
-
var
|
901
|
+
var ve = y.ReactCurrentOwner, wt = {
|
885
902
|
key: !0,
|
886
903
|
ref: !0,
|
887
904
|
__self: !0,
|
888
905
|
__source: !0
|
889
|
-
}, dt, qe,
|
890
|
-
|
906
|
+
}, dt, qe, ue;
|
907
|
+
ue = {};
|
891
908
|
function i(r) {
|
892
|
-
if (
|
893
|
-
var
|
894
|
-
if (
|
909
|
+
if (ke.call(r, "ref")) {
|
910
|
+
var f = Object.getOwnPropertyDescriptor(r, "ref").get;
|
911
|
+
if (f && f.isReactWarning)
|
895
912
|
return !1;
|
896
913
|
}
|
897
914
|
return r.ref !== void 0;
|
898
915
|
}
|
899
|
-
function
|
900
|
-
if (
|
901
|
-
var
|
902
|
-
if (
|
916
|
+
function E(r) {
|
917
|
+
if (ke.call(r, "key")) {
|
918
|
+
var f = Object.getOwnPropertyDescriptor(r, "key").get;
|
919
|
+
if (f && f.isReactWarning)
|
903
920
|
return !1;
|
904
921
|
}
|
905
922
|
return r.key !== void 0;
|
906
923
|
}
|
907
|
-
function
|
908
|
-
if (typeof r.ref == "string" &&
|
909
|
-
var
|
910
|
-
|
924
|
+
function P(r, f) {
|
925
|
+
if (typeof r.ref == "string" && ve.current && f && ve.current.stateNode !== f) {
|
926
|
+
var g = ae(ve.current.type);
|
927
|
+
ue[g] || (w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', ae(ve.current.type), r.ref), ue[g] = !0);
|
911
928
|
}
|
912
929
|
}
|
913
|
-
function
|
930
|
+
function _(r, f) {
|
914
931
|
{
|
915
|
-
var
|
916
|
-
dt || (dt = !0,
|
932
|
+
var g = function() {
|
933
|
+
dt || (dt = !0, w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
917
934
|
};
|
918
|
-
|
919
|
-
get:
|
935
|
+
g.isReactWarning = !0, Object.defineProperty(r, "key", {
|
936
|
+
get: g,
|
920
937
|
configurable: !0
|
921
938
|
});
|
922
939
|
}
|
923
940
|
}
|
924
|
-
function
|
941
|
+
function W(r, f) {
|
925
942
|
{
|
926
|
-
var
|
927
|
-
qe || (qe = !0,
|
943
|
+
var g = function() {
|
944
|
+
qe || (qe = !0, w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
928
945
|
};
|
929
|
-
|
930
|
-
get:
|
946
|
+
g.isReactWarning = !0, Object.defineProperty(r, "ref", {
|
947
|
+
get: g,
|
931
948
|
configurable: !0
|
932
949
|
});
|
933
950
|
}
|
934
951
|
}
|
935
|
-
var
|
936
|
-
var
|
952
|
+
var de = function(r, f, g, C, M, k, R) {
|
953
|
+
var T = {
|
937
954
|
// This tag allows us to uniquely identify this as a React Element
|
938
955
|
$$typeof: n,
|
939
956
|
// Built-in properties that belong on the element
|
940
957
|
type: r,
|
941
|
-
key:
|
942
|
-
ref:
|
943
|
-
props:
|
958
|
+
key: f,
|
959
|
+
ref: g,
|
960
|
+
props: R,
|
944
961
|
// Record the component responsible for creating this element.
|
945
|
-
_owner:
|
962
|
+
_owner: k
|
946
963
|
};
|
947
|
-
return
|
964
|
+
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
948
965
|
configurable: !1,
|
949
966
|
enumerable: !1,
|
950
967
|
writable: !0,
|
951
968
|
value: !1
|
952
|
-
}), Object.defineProperty(
|
969
|
+
}), Object.defineProperty(T, "_self", {
|
953
970
|
configurable: !1,
|
954
971
|
enumerable: !1,
|
955
972
|
writable: !1,
|
956
|
-
value:
|
957
|
-
}), Object.defineProperty(
|
973
|
+
value: C
|
974
|
+
}), Object.defineProperty(T, "_source", {
|
958
975
|
configurable: !1,
|
959
976
|
enumerable: !1,
|
960
977
|
writable: !1,
|
961
978
|
value: M
|
962
|
-
}), Object.freeze && (Object.freeze(
|
979
|
+
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
963
980
|
};
|
964
|
-
function
|
981
|
+
function J(r, f, g, C, M) {
|
965
982
|
{
|
966
|
-
var
|
967
|
-
|
968
|
-
for (
|
969
|
-
|
983
|
+
var k, R = {}, T = null, K = null;
|
984
|
+
g !== void 0 && (ut(g), T = "" + g), E(f) && (ut(f.key), T = "" + f.key), i(f) && (K = f.ref, P(f, M));
|
985
|
+
for (k in f)
|
986
|
+
ke.call(f, k) && !wt.hasOwnProperty(k) && (R[k] = f[k]);
|
970
987
|
if (r && r.defaultProps) {
|
971
|
-
var
|
972
|
-
for (
|
973
|
-
|
988
|
+
var U = r.defaultProps;
|
989
|
+
for (k in U)
|
990
|
+
R[k] === void 0 && (R[k] = U[k]);
|
974
991
|
}
|
975
|
-
if (
|
992
|
+
if (T || K) {
|
976
993
|
var B = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
|
977
|
-
|
994
|
+
T && _(R, B), K && W(R, B);
|
978
995
|
}
|
979
|
-
return
|
996
|
+
return de(r, T, K, M, C, ve.current, R);
|
980
997
|
}
|
981
998
|
}
|
982
|
-
var ft =
|
983
|
-
function
|
999
|
+
var ft = y.ReactCurrentOwner, ht = y.ReactDebugCurrentFrame;
|
1000
|
+
function he(r) {
|
984
1001
|
if (r) {
|
985
|
-
var
|
986
|
-
ht.setExtraStackFrame(
|
1002
|
+
var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
|
1003
|
+
ht.setExtraStackFrame(g);
|
987
1004
|
} else
|
988
1005
|
ht.setExtraStackFrame(null);
|
989
1006
|
}
|
990
|
-
var
|
991
|
-
|
992
|
-
function
|
1007
|
+
var Q;
|
1008
|
+
Q = !1;
|
1009
|
+
function ee(r) {
|
993
1010
|
return typeof r == "object" && r !== null && r.$$typeof === n;
|
994
1011
|
}
|
995
|
-
function
|
1012
|
+
function De() {
|
996
1013
|
{
|
997
1014
|
if (ft.current) {
|
998
|
-
var r =
|
1015
|
+
var r = ae(ft.current.type);
|
999
1016
|
if (r)
|
1000
1017
|
return `
|
1001
1018
|
|
@@ -1004,149 +1021,149 @@ Check the render method of \`` + r + "`.";
|
|
1004
1021
|
return "";
|
1005
1022
|
}
|
1006
1023
|
}
|
1007
|
-
function
|
1024
|
+
function Se(r) {
|
1008
1025
|
{
|
1009
1026
|
if (r !== void 0) {
|
1010
|
-
var
|
1027
|
+
var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
|
1011
1028
|
return `
|
1012
1029
|
|
1013
|
-
Check your code at ` +
|
1030
|
+
Check your code at ` + f + ":" + g + ".";
|
1014
1031
|
}
|
1015
1032
|
return "";
|
1016
1033
|
}
|
1017
1034
|
}
|
1018
|
-
var
|
1035
|
+
var be = {};
|
1019
1036
|
function Ae(r) {
|
1020
1037
|
{
|
1021
|
-
var
|
1022
|
-
if (!
|
1023
|
-
var
|
1024
|
-
|
1038
|
+
var f = De();
|
1039
|
+
if (!f) {
|
1040
|
+
var g = typeof r == "string" ? r : r.displayName || r.name;
|
1041
|
+
g && (f = `
|
1025
1042
|
|
1026
|
-
Check the top-level render call using <` +
|
1043
|
+
Check the top-level render call using <` + g + ">.");
|
1027
1044
|
}
|
1028
|
-
return
|
1045
|
+
return f;
|
1029
1046
|
}
|
1030
1047
|
}
|
1031
|
-
function
|
1048
|
+
function Dt(r, f) {
|
1032
1049
|
{
|
1033
1050
|
if (!r._store || r._store.validated || r.key != null)
|
1034
1051
|
return;
|
1035
1052
|
r._store.validated = !0;
|
1036
|
-
var
|
1037
|
-
if (
|
1053
|
+
var g = Ae(f);
|
1054
|
+
if (be[g])
|
1038
1055
|
return;
|
1039
|
-
|
1040
|
-
var
|
1041
|
-
r && r._owner && r._owner !== ft.current && (
|
1056
|
+
be[g] = !0;
|
1057
|
+
var C = "";
|
1058
|
+
r && r._owner && r._owner !== ft.current && (C = " It was passed a child from " + ae(r._owner.type) + "."), he(r), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), he(null);
|
1042
1059
|
}
|
1043
1060
|
}
|
1044
|
-
function
|
1061
|
+
function At(r, f) {
|
1045
1062
|
{
|
1046
1063
|
if (typeof r != "object")
|
1047
1064
|
return;
|
1048
1065
|
if (Ke(r))
|
1049
|
-
for (var
|
1050
|
-
var
|
1051
|
-
|
1066
|
+
for (var g = 0; g < r.length; g++) {
|
1067
|
+
var C = r[g];
|
1068
|
+
ee(C) && Dt(C, f);
|
1052
1069
|
}
|
1053
|
-
else if (
|
1070
|
+
else if (ee(r))
|
1054
1071
|
r._store && (r._store.validated = !0);
|
1055
1072
|
else if (r) {
|
1056
|
-
var M =
|
1073
|
+
var M = v(r);
|
1057
1074
|
if (typeof M == "function" && M !== r.entries)
|
1058
|
-
for (var
|
1059
|
-
|
1075
|
+
for (var k = M.call(r), R; !(R = k.next()).done; )
|
1076
|
+
ee(R.value) && Dt(R.value, f);
|
1060
1077
|
}
|
1061
1078
|
}
|
1062
1079
|
}
|
1063
|
-
function
|
1080
|
+
function fn(r) {
|
1064
1081
|
{
|
1065
|
-
var
|
1066
|
-
if (
|
1082
|
+
var f = r.type;
|
1083
|
+
if (f == null || typeof f == "string")
|
1067
1084
|
return;
|
1068
|
-
var
|
1069
|
-
if (typeof
|
1070
|
-
|
1071
|
-
else if (typeof
|
1085
|
+
var g;
|
1086
|
+
if (typeof f == "function")
|
1087
|
+
g = f.propTypes;
|
1088
|
+
else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
|
1072
1089
|
// Inner props are checked in the reconciler.
|
1073
|
-
|
1074
|
-
|
1090
|
+
f.$$typeof === b))
|
1091
|
+
g = f.propTypes;
|
1075
1092
|
else
|
1076
1093
|
return;
|
1077
|
-
if (
|
1078
|
-
var
|
1079
|
-
|
1080
|
-
} else if (
|
1081
|
-
|
1082
|
-
var M =
|
1083
|
-
|
1094
|
+
if (g) {
|
1095
|
+
var C = ae(f);
|
1096
|
+
Ce(g, r.props, "prop", C, r);
|
1097
|
+
} else if (f.PropTypes !== void 0 && !Q) {
|
1098
|
+
Q = !0;
|
1099
|
+
var M = ae(f);
|
1100
|
+
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
|
1084
1101
|
}
|
1085
|
-
typeof
|
1102
|
+
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1086
1103
|
}
|
1087
1104
|
}
|
1088
|
-
function
|
1105
|
+
function hn(r) {
|
1089
1106
|
{
|
1090
|
-
for (var
|
1091
|
-
var
|
1092
|
-
if (
|
1093
|
-
|
1107
|
+
for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
|
1108
|
+
var C = f[g];
|
1109
|
+
if (C !== "children" && C !== "key") {
|
1110
|
+
he(r), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), he(null);
|
1094
1111
|
break;
|
1095
1112
|
}
|
1096
1113
|
}
|
1097
|
-
r.ref !== null && (
|
1114
|
+
r.ref !== null && (he(r), w("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
|
1098
1115
|
}
|
1099
1116
|
}
|
1100
|
-
function
|
1117
|
+
function It(r, f, g, C, M, k) {
|
1101
1118
|
{
|
1102
|
-
var
|
1103
|
-
if (!
|
1104
|
-
var
|
1105
|
-
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (
|
1106
|
-
var
|
1107
|
-
|
1108
|
-
var
|
1109
|
-
r === null ?
|
1119
|
+
var R = D(r);
|
1120
|
+
if (!R) {
|
1121
|
+
var T = "";
|
1122
|
+
(r === void 0 || typeof r == "object" && r !== null && Object.keys(r).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.");
|
1123
|
+
var K = Se(M);
|
1124
|
+
K ? T += K : T += De();
|
1125
|
+
var U;
|
1126
|
+
r === null ? U = "null" : Ke(r) ? U = "array" : r !== void 0 && r.$$typeof === n ? (U = "<" + (ae(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof r, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
|
1110
1127
|
}
|
1111
|
-
var B =
|
1128
|
+
var B = J(r, f, g, M, k);
|
1112
1129
|
if (B == null)
|
1113
1130
|
return B;
|
1114
|
-
if (
|
1115
|
-
var
|
1116
|
-
if (
|
1117
|
-
if (
|
1118
|
-
if (Ke(
|
1119
|
-
for (var
|
1120
|
-
|
1121
|
-
Object.freeze && Object.freeze(
|
1131
|
+
if (R) {
|
1132
|
+
var ie = f.children;
|
1133
|
+
if (ie !== void 0)
|
1134
|
+
if (C)
|
1135
|
+
if (Ke(ie)) {
|
1136
|
+
for (var Ie = 0; Ie < ie.length; Ie++)
|
1137
|
+
At(ie[Ie], r);
|
1138
|
+
Object.freeze && Object.freeze(ie);
|
1122
1139
|
} else
|
1123
|
-
|
1140
|
+
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1124
1141
|
else
|
1125
|
-
|
1142
|
+
At(ie, r);
|
1126
1143
|
}
|
1127
|
-
return r === e ?
|
1144
|
+
return r === e ? hn(B) : fn(B), B;
|
1128
1145
|
}
|
1129
1146
|
}
|
1130
|
-
function
|
1131
|
-
return
|
1147
|
+
function pn(r, f, g) {
|
1148
|
+
return It(r, f, g, !0);
|
1132
1149
|
}
|
1133
|
-
function
|
1134
|
-
return
|
1150
|
+
function mn(r, f, g) {
|
1151
|
+
return It(r, f, g, !1);
|
1135
1152
|
}
|
1136
|
-
var
|
1137
|
-
Qe.Fragment = e, Qe.jsx =
|
1153
|
+
var gn = mn, vn = pn;
|
1154
|
+
Qe.Fragment = e, Qe.jsx = gn, Qe.jsxs = vn;
|
1138
1155
|
}()), Qe;
|
1139
1156
|
}
|
1140
|
-
process.env.NODE_ENV === "production" ?
|
1141
|
-
var l =
|
1142
|
-
function
|
1157
|
+
process.env.NODE_ENV === "production" ? Pt.exports = Zn() : Pt.exports = Jn();
|
1158
|
+
var l = Pt.exports;
|
1159
|
+
function ln(t) {
|
1143
1160
|
return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
|
1144
1161
|
}
|
1145
|
-
const
|
1162
|
+
const Qn = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1146
1163
|
/* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1147
1164
|
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1148
1165
|
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1149
|
-
] }),
|
1166
|
+
] }), ea = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
|
1150
1167
|
"path",
|
1151
1168
|
{
|
1152
1169
|
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
|
@@ -1154,35 +1171,35 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
|
|
1154
1171
|
C11,8.22,10.74,8,10.43,8z`
|
1155
1172
|
}
|
1156
1173
|
) });
|
1157
|
-
function
|
1158
|
-
return /* @__PURE__ */ l.jsx(
|
1159
|
-
|
1174
|
+
function ta(t) {
|
1175
|
+
return /* @__PURE__ */ l.jsx(an.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
|
1176
|
+
ea,
|
1160
1177
|
/* @__PURE__ */ l.jsx("span", { children: t.title }),
|
1161
1178
|
/* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
|
1162
1179
|
t.onDelete(t.index);
|
1163
|
-
}, children:
|
1180
|
+
}, children: Qn })
|
1164
1181
|
] }) }, t.title);
|
1165
1182
|
}
|
1166
|
-
function
|
1167
|
-
const [n, a] =
|
1168
|
-
t.onDragComplete(
|
1169
|
-
}, c = (
|
1170
|
-
const
|
1171
|
-
|
1183
|
+
function na(t) {
|
1184
|
+
const [n, a] = ne(!1), [e, o] = ne(t.options), u = (p) => {
|
1185
|
+
t.onDragComplete(p), o(p);
|
1186
|
+
}, c = (p) => {
|
1187
|
+
const h = [...e];
|
1188
|
+
h.splice(p, 1), u(h);
|
1172
1189
|
}, s = [];
|
1173
|
-
e.forEach((
|
1174
|
-
s.push(/* @__PURE__ */ l.jsx(
|
1190
|
+
e.forEach((p, h) => {
|
1191
|
+
s.push(/* @__PURE__ */ l.jsx(ta, { index: h, title: p, onDelete: c }, p));
|
1175
1192
|
});
|
1176
1193
|
let d = "dropdown draggable";
|
1177
1194
|
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1178
|
-
/* @__PURE__ */ l.jsx(
|
1179
|
-
/* @__PURE__ */ l.jsx(
|
1195
|
+
/* @__PURE__ */ l.jsx(ln, { title: t.title }),
|
1196
|
+
/* @__PURE__ */ l.jsx(an.Group, { axis: "y", values: e, onReorder: u, style: { visibility: n ? "visible" : "hidden" }, children: s })
|
1180
1197
|
] });
|
1181
1198
|
}
|
1182
|
-
function
|
1183
|
-
const [n, a] =
|
1199
|
+
function aa(t) {
|
1200
|
+
const [n, a] = ne(!1), e = [];
|
1184
1201
|
t.options.map((u, c) => {
|
1185
|
-
t.onSelect !== void 0 && (u.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(
|
1202
|
+
t.onSelect !== void 0 && (u.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(ra, { option: u }, c));
|
1186
1203
|
});
|
1187
1204
|
let o = "dropdown";
|
1188
1205
|
return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
|
@@ -1192,7 +1209,7 @@ function Hn(t) {
|
|
1192
1209
|
onMouseEnter: () => a(!0),
|
1193
1210
|
onMouseLeave: () => a(!1),
|
1194
1211
|
children: [
|
1195
|
-
/* @__PURE__ */ l.jsx(
|
1212
|
+
/* @__PURE__ */ l.jsx(ln, { title: t.title }),
|
1196
1213
|
/* @__PURE__ */ l.jsx(
|
1197
1214
|
"ul",
|
1198
1215
|
{
|
@@ -1204,13 +1221,13 @@ function Hn(t) {
|
|
1204
1221
|
}
|
1205
1222
|
);
|
1206
1223
|
}
|
1207
|
-
function
|
1208
|
-
const { option: n } = t, [a, e] =
|
1224
|
+
function ra(t) {
|
1225
|
+
const { option: n } = t, [a, e] = ne("");
|
1209
1226
|
let o;
|
1210
1227
|
switch (n.type) {
|
1211
1228
|
case "draggable":
|
1212
1229
|
o = /* @__PURE__ */ l.jsx(
|
1213
|
-
|
1230
|
+
na,
|
1214
1231
|
{
|
1215
1232
|
title: n.title,
|
1216
1233
|
options: n.value,
|
@@ -1223,7 +1240,7 @@ function Kn(t) {
|
|
1223
1240
|
break;
|
1224
1241
|
case "dropdown":
|
1225
1242
|
o = /* @__PURE__ */ l.jsx(
|
1226
|
-
|
1243
|
+
aa,
|
1227
1244
|
{
|
1228
1245
|
title: n.title,
|
1229
1246
|
options: n.value,
|
@@ -1244,77 +1261,74 @@ function Kn(t) {
|
|
1244
1261
|
);
|
1245
1262
|
break;
|
1246
1263
|
}
|
1247
|
-
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o },
|
1264
|
+
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Gn());
|
1248
1265
|
}
|
1249
|
-
function
|
1266
|
+
function Ka(t) {
|
1250
1267
|
let n;
|
1251
1268
|
function a(c) {
|
1252
|
-
var d,
|
1269
|
+
var d, p, h, b, x, S, O, m, v;
|
1253
1270
|
let s;
|
1254
1271
|
switch (c.event) {
|
1255
1272
|
case "custom":
|
1256
|
-
|
1273
|
+
I.dispatchEvent({ type: N.CUSTOM, value: c.data });
|
1257
1274
|
break;
|
1258
1275
|
case "selectComponent":
|
1259
|
-
|
1276
|
+
I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
|
1260
1277
|
break;
|
1261
1278
|
case "draggableListUpdate":
|
1262
|
-
|
1279
|
+
I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
|
1263
1280
|
break;
|
1264
1281
|
case "addFolder":
|
1265
1282
|
(d = t.components.get("debug")) == null || d.addFolder(c.data.name, c.data.params, c.data.parent);
|
1266
1283
|
break;
|
1267
1284
|
case "bindObject":
|
1268
|
-
(
|
1285
|
+
(p = t.components.get("debug")) == null || p.bind(c.data.name, c.data.params, c.data.parent);
|
1269
1286
|
break;
|
1270
1287
|
case "updateBind":
|
1271
|
-
(
|
1288
|
+
(h = t.components.get("debug")) == null || h.triggerBind(c.data.id, c.data.value);
|
1272
1289
|
break;
|
1273
1290
|
case "addButton":
|
1274
|
-
(
|
1291
|
+
(b = t.components.get("debug")) == null || b.button(c.data.name, c.data.callback, c.data.parent);
|
1275
1292
|
break;
|
1276
1293
|
case "clickButton":
|
1277
|
-
(
|
1294
|
+
(x = t.components.get("debug")) == null || x.triggerButton(c.data.id);
|
1278
1295
|
break;
|
1279
1296
|
case "setSheet":
|
1280
|
-
s = (
|
1297
|
+
s = (S = t.components.get("theatre")) == null ? void 0 : S.sheets.get(c.data.sheet), s !== void 0 && (n = s, Ze.setSelection([s]));
|
1281
1298
|
break;
|
1282
1299
|
case "setSheetObject":
|
1283
|
-
s = (
|
1300
|
+
s = (O = t.components.get("theatre")) == null ? void 0 : O.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && Ze.setSelection([s]);
|
1284
1301
|
break;
|
1285
1302
|
case "updateSheetObject":
|
1286
|
-
s = (
|
1303
|
+
s = (m = t.components.get("theatre")) == null ? void 0 : m.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
|
1287
1304
|
break;
|
1288
1305
|
case "updateTimeline":
|
1289
|
-
n = (
|
1290
|
-
break;
|
1291
|
-
case "getScene":
|
1292
|
-
k.dispatchEvent({ type: D.GET_SCENE });
|
1306
|
+
n = (v = t.components.get("theatre")) == null ? void 0 : v.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
|
1293
1307
|
break;
|
1294
1308
|
case "getObject":
|
1295
|
-
|
1309
|
+
I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
|
1296
1310
|
break;
|
1297
1311
|
case "updateObject":
|
1298
|
-
|
1312
|
+
I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
|
1299
1313
|
break;
|
1300
1314
|
case "createTexture":
|
1301
|
-
|
1315
|
+
I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
|
1302
1316
|
break;
|
1303
1317
|
case "requestMethod":
|
1304
|
-
|
1318
|
+
I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
|
1305
1319
|
break;
|
1306
1320
|
}
|
1307
1321
|
}
|
1308
1322
|
function e(c) {
|
1309
1323
|
switch (c.event) {
|
1310
1324
|
case "custom":
|
1311
|
-
|
1325
|
+
I.dispatchEvent({ type: N.CUSTOM, value: c.data });
|
1312
1326
|
break;
|
1313
1327
|
case "setObject":
|
1314
|
-
|
1328
|
+
I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
|
1315
1329
|
break;
|
1316
1330
|
case "setScene":
|
1317
|
-
|
1331
|
+
I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
|
1318
1332
|
break;
|
1319
1333
|
}
|
1320
1334
|
}
|
@@ -1322,38 +1336,38 @@ function Dr(t) {
|
|
1322
1336
|
Ze.ui.hide();
|
1323
1337
|
}
|
1324
1338
|
function u() {
|
1325
|
-
Ze.ui.restore(), Ze.onSelectionChange((
|
1326
|
-
|
1327
|
-
var
|
1328
|
-
let
|
1329
|
-
switch (
|
1339
|
+
Ze.ui.restore(), Ze.onSelectionChange((p) => {
|
1340
|
+
p.length < 1 || p.forEach((h) => {
|
1341
|
+
var O;
|
1342
|
+
let b = h.address.sheetId, x = "setSheet", S = {};
|
1343
|
+
switch (h.type) {
|
1330
1344
|
case "Theatre_Sheet_PublicAPI":
|
1331
|
-
|
1332
|
-
sheet:
|
1333
|
-
}, n = (
|
1345
|
+
x = "setSheet", S = {
|
1346
|
+
sheet: h.address.sheetId
|
1347
|
+
}, n = (O = t.components.get("theatre")) == null ? void 0 : O.sheets.get(h.address.sheetId);
|
1334
1348
|
break;
|
1335
1349
|
case "Theatre_SheetObject_PublicAPI":
|
1336
|
-
|
1337
|
-
id:
|
1338
|
-
sheet:
|
1339
|
-
key:
|
1350
|
+
x = "setSheetObject", b += `_${h.address.objectKey}`, S = {
|
1351
|
+
id: b,
|
1352
|
+
sheet: h.address.sheetId,
|
1353
|
+
key: h.address.objectKey
|
1340
1354
|
};
|
1341
1355
|
break;
|
1342
1356
|
}
|
1343
|
-
t.send({ event:
|
1357
|
+
t.send({ event: x, target: "app", data: S });
|
1344
1358
|
});
|
1345
1359
|
});
|
1346
1360
|
let c = 0;
|
1347
1361
|
const s = () => {
|
1348
1362
|
if (n !== void 0 && c !== n.sequence.position) {
|
1349
1363
|
c = n.sequence.position;
|
1350
|
-
const
|
1364
|
+
const p = n;
|
1351
1365
|
t.send({
|
1352
1366
|
event: "updateTimeline",
|
1353
1367
|
target: "app",
|
1354
1368
|
data: {
|
1355
1369
|
position: c,
|
1356
|
-
sheet:
|
1370
|
+
sheet: p.address.sheetId
|
1357
1371
|
}
|
1358
1372
|
});
|
1359
1373
|
}
|
@@ -1366,7 +1380,7 @@ function Dr(t) {
|
|
1366
1380
|
t.editor ? e(c) : a(c);
|
1367
1381
|
}), t.editor ? u() : o();
|
1368
1382
|
}
|
1369
|
-
const
|
1383
|
+
const ia = `out vec3 worldPosition;
|
1370
1384
|
uniform float uDistance;
|
1371
1385
|
|
1372
1386
|
void main() {
|
@@ -1375,7 +1389,7 @@ void main() {
|
|
1375
1389
|
worldPosition.xz += cameraPosition.xz;
|
1376
1390
|
|
1377
1391
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1378
|
-
}`,
|
1392
|
+
}`, oa = `out vec4 fragColor;
|
1379
1393
|
in vec3 worldPosition;
|
1380
1394
|
|
1381
1395
|
uniform float uDivisions;
|
@@ -1443,14 +1457,14 @@ void main() {
|
|
1443
1457
|
|
1444
1458
|
if (fragColor.a <= 0.0) discard;
|
1445
1459
|
}`;
|
1446
|
-
class
|
1460
|
+
class sa extends Qt {
|
1447
1461
|
constructor(n) {
|
1448
1462
|
super({
|
1449
1463
|
extensions: {
|
1450
1464
|
derivatives: !0
|
1451
1465
|
},
|
1452
|
-
glslVersion:
|
1453
|
-
side:
|
1466
|
+
glslVersion: wn,
|
1467
|
+
side: Cn,
|
1454
1468
|
transparent: !0,
|
1455
1469
|
uniforms: {
|
1456
1470
|
uScale: {
|
@@ -1460,7 +1474,7 @@ class Zn extends qt {
|
|
1460
1474
|
value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
|
1461
1475
|
},
|
1462
1476
|
uColor: {
|
1463
|
-
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new
|
1477
|
+
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new kt(16777215)
|
1464
1478
|
},
|
1465
1479
|
uDistance: {
|
1466
1480
|
value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
|
@@ -1472,25 +1486,25 @@ class Zn extends qt {
|
|
1472
1486
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
1473
1487
|
}
|
1474
1488
|
},
|
1475
|
-
vertexShader:
|
1476
|
-
fragmentShader:
|
1489
|
+
vertexShader: ia,
|
1490
|
+
fragmentShader: oa,
|
1477
1491
|
name: "InfiniteGrid",
|
1478
1492
|
depthWrite: !1
|
1479
1493
|
});
|
1480
1494
|
}
|
1481
1495
|
}
|
1482
|
-
class
|
1496
|
+
class ca extends Sn {
|
1483
1497
|
constructor() {
|
1484
|
-
const a = new
|
1485
|
-
super(new
|
1486
|
-
|
1498
|
+
const a = new sa();
|
1499
|
+
super(new On(2, 2), a);
|
1500
|
+
$(this, "gridMaterial");
|
1487
1501
|
this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1488
1502
|
}
|
1489
1503
|
update() {
|
1490
1504
|
this.gridMaterial.needsUpdate = !0;
|
1491
1505
|
}
|
1492
1506
|
}
|
1493
|
-
const
|
1507
|
+
const la = `#include <common>
|
1494
1508
|
#include <batching_pars_vertex>
|
1495
1509
|
#include <uv_pars_vertex>
|
1496
1510
|
#include <color_pars_vertex>
|
@@ -1520,7 +1534,7 @@ void main() {
|
|
1520
1534
|
#include <logdepthbuf_vertex>
|
1521
1535
|
#include <clipping_planes_vertex>
|
1522
1536
|
#include <worldpos_vertex>
|
1523
|
-
}`,
|
1537
|
+
}`, ua = `
|
1524
1538
|
#include <common>
|
1525
1539
|
#include <uv_pars_fragment>
|
1526
1540
|
#include <clipping_planes_pars_fragment>
|
@@ -1529,19 +1543,19 @@ void main() {
|
|
1529
1543
|
#include <clipping_planes_fragment>
|
1530
1544
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1531
1545
|
}`;
|
1532
|
-
class
|
1546
|
+
class da extends Qt {
|
1533
1547
|
constructor() {
|
1534
1548
|
super({
|
1535
1549
|
defines: {
|
1536
1550
|
USE_UV: ""
|
1537
1551
|
},
|
1538
|
-
vertexShader:
|
1539
|
-
fragmentShader:
|
1552
|
+
vertexShader: la,
|
1553
|
+
fragmentShader: ua
|
1540
1554
|
});
|
1541
1555
|
}
|
1542
1556
|
}
|
1543
|
-
function
|
1544
|
-
const [n, a] =
|
1557
|
+
function jt(t) {
|
1558
|
+
const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1545
1559
|
return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1546
1560
|
/* @__PURE__ */ l.jsxs(
|
1547
1561
|
"button",
|
@@ -1567,10 +1581,10 @@ function Mt(t) {
|
|
1567
1581
|
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
|
1568
1582
|
] });
|
1569
1583
|
}
|
1570
|
-
function
|
1571
|
-
const [n, a] =
|
1584
|
+
function un(t) {
|
1585
|
+
const [n, a] = ne(!1), e = t.child.children.length > 0, o = [];
|
1572
1586
|
return t.child.children.length > 0 && t.child.children.map((u) => {
|
1573
|
-
o.push(/* @__PURE__ */ l.jsx(
|
1587
|
+
o.push(/* @__PURE__ */ l.jsx(un, { child: u, three: t.three }, Math.random()));
|
1574
1588
|
}), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
|
1575
1589
|
/* @__PURE__ */ l.jsxs("div", { className: "child", children: [
|
1576
1590
|
e ? /* @__PURE__ */ l.jsx(
|
@@ -1598,19 +1612,19 @@ function an(t) {
|
|
1598
1612
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1599
1613
|
}
|
1600
1614
|
),
|
1601
|
-
/* @__PURE__ */ l.jsx("div", { className: `icon ${
|
1615
|
+
/* @__PURE__ */ l.jsx("div", { className: `icon ${Hn(t.child)}` })
|
1602
1616
|
] }),
|
1603
1617
|
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
|
1604
1618
|
] }, Math.random());
|
1605
1619
|
}
|
1606
|
-
function
|
1620
|
+
function fa(t) {
|
1607
1621
|
const n = [];
|
1608
1622
|
return t.child.children.map((a) => {
|
1609
|
-
n.push(/* @__PURE__ */ l.jsx(
|
1623
|
+
n.push(/* @__PURE__ */ l.jsx(un, { child: a, three: t.three }, Math.random()));
|
1610
1624
|
}), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1611
1625
|
}
|
1612
|
-
const
|
1613
|
-
function
|
1626
|
+
const ha = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1627
|
+
function pa(t) {
|
1614
1628
|
return "items" in t;
|
1615
1629
|
}
|
1616
1630
|
function $e(t) {
|
@@ -1619,7 +1633,7 @@ function $e(t) {
|
|
1619
1633
|
}
|
1620
1634
|
const a = [];
|
1621
1635
|
return t.items.forEach((e) => {
|
1622
|
-
|
1636
|
+
pa(e) ? a.push(
|
1623
1637
|
/* @__PURE__ */ l.jsx($e, { title: e.title, items: e.items }, Math.random())
|
1624
1638
|
) : a.push(
|
1625
1639
|
/* @__PURE__ */ l.jsx(
|
@@ -1640,12 +1654,12 @@ function $e(t) {
|
|
1640
1654
|
Math.random()
|
1641
1655
|
)
|
1642
1656
|
);
|
1643
|
-
}), /* @__PURE__ */ l.jsx(
|
1657
|
+
}), /* @__PURE__ */ l.jsx(jt, { label: t.title, open: !1, children: a });
|
1644
1658
|
}
|
1645
|
-
function
|
1659
|
+
function ma(t) {
|
1646
1660
|
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");
|
1647
1661
|
}
|
1648
|
-
function
|
1662
|
+
function Oe(t) {
|
1649
1663
|
switch (t) {
|
1650
1664
|
case "alphaMap":
|
1651
1665
|
return "Alpha Map";
|
@@ -1794,10 +1808,10 @@ function Se(t) {
|
|
1794
1808
|
}
|
1795
1809
|
return t;
|
1796
1810
|
}
|
1797
|
-
function
|
1811
|
+
function ga(t) {
|
1798
1812
|
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";
|
1799
1813
|
}
|
1800
|
-
function
|
1814
|
+
function va() {
|
1801
1815
|
const t = document.createElement("input");
|
1802
1816
|
return t.type = "file", new Promise((n, a) => {
|
1803
1817
|
t.addEventListener("change", function() {
|
@@ -1812,41 +1826,41 @@ function sr() {
|
|
1812
1826
|
}), t.click();
|
1813
1827
|
});
|
1814
1828
|
}
|
1815
|
-
function
|
1829
|
+
function Vt(t, n, a) {
|
1816
1830
|
const e = [];
|
1817
1831
|
for (const o in t) {
|
1818
|
-
if (!
|
1832
|
+
if (!ma(o))
|
1819
1833
|
continue;
|
1820
1834
|
const u = typeof t[o], c = t[o];
|
1821
1835
|
if (u === "boolean" || u === "number" || u === "string") {
|
1822
1836
|
const s = {
|
1823
|
-
title:
|
1837
|
+
title: Oe(o),
|
1824
1838
|
prop: o,
|
1825
1839
|
type: u,
|
1826
1840
|
value: c,
|
1827
1841
|
min: void 0,
|
1828
1842
|
max: void 0,
|
1829
|
-
onChange: (d,
|
1830
|
-
var
|
1831
|
-
a.updateObject(n.uuid, `material.${d}`,
|
1832
|
-
const
|
1833
|
-
|
1843
|
+
onChange: (d, p) => {
|
1844
|
+
var b;
|
1845
|
+
a.updateObject(n.uuid, `material.${d}`, p), u === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
|
1846
|
+
const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
|
1847
|
+
h !== void 0 && q(h, `material.${d}`, p);
|
1834
1848
|
}
|
1835
1849
|
};
|
1836
|
-
|
1850
|
+
ga(o) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
|
1837
1851
|
} else if (u === "object")
|
1838
1852
|
if (c.isColor)
|
1839
1853
|
e.push({
|
1840
|
-
title:
|
1854
|
+
title: Oe(o),
|
1841
1855
|
prop: o,
|
1842
1856
|
type: "color",
|
1843
1857
|
value: c,
|
1844
1858
|
onChange: (s, d) => {
|
1845
|
-
var
|
1846
|
-
const
|
1847
|
-
a.updateObject(n.uuid, `material.${s}`,
|
1848
|
-
const
|
1849
|
-
|
1859
|
+
var b;
|
1860
|
+
const p = new kt(d);
|
1861
|
+
a.updateObject(n.uuid, `material.${s}`, p);
|
1862
|
+
const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
|
1863
|
+
h !== void 0 && q(h, `material.${s}`, p);
|
1850
1864
|
}
|
1851
1865
|
});
|
1852
1866
|
else if (Array.isArray(c)) {
|
@@ -1856,79 +1870,79 @@ function $t(t, n, a) {
|
|
1856
1870
|
title: `${d}`,
|
1857
1871
|
type: `${typeof c[d]}`,
|
1858
1872
|
value: c[d],
|
1859
|
-
onChange: (
|
1860
|
-
var
|
1861
|
-
a.updateObject(n.uuid, `material.${o}`,
|
1862
|
-
const
|
1863
|
-
|
1873
|
+
onChange: (p, h) => {
|
1874
|
+
var x;
|
1875
|
+
a.updateObject(n.uuid, `material.${o}`, h);
|
1876
|
+
const b = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
|
1877
|
+
b !== void 0 && q(b, `material.${o}`, h);
|
1864
1878
|
}
|
1865
1879
|
});
|
1866
1880
|
e.push({
|
1867
|
-
title:
|
1881
|
+
title: Oe(o),
|
1868
1882
|
items: s
|
1869
1883
|
});
|
1870
1884
|
} else {
|
1871
1885
|
const s = [];
|
1872
1886
|
for (const d in c) {
|
1873
|
-
const
|
1874
|
-
switch (typeof
|
1887
|
+
const p = c[d];
|
1888
|
+
switch (typeof p) {
|
1875
1889
|
case "boolean":
|
1876
1890
|
case "number":
|
1877
1891
|
case "string":
|
1878
1892
|
d === "src" ? e.push({
|
1879
|
-
title:
|
1893
|
+
title: Oe(o),
|
1880
1894
|
type: "image",
|
1881
|
-
value:
|
1882
|
-
onChange: (
|
1883
|
-
var
|
1884
|
-
a.createTexture(n.uuid, `material.${o}`,
|
1885
|
-
const
|
1886
|
-
|
1887
|
-
|
1895
|
+
value: p,
|
1896
|
+
onChange: (b, x) => {
|
1897
|
+
var O;
|
1898
|
+
a.createTexture(n.uuid, `material.${o}`, x);
|
1899
|
+
const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
|
1900
|
+
S !== void 0 && Mt(x).then((m) => {
|
1901
|
+
q(S, `material.${o}`, m), q(S, "material.needsUpdate", !0);
|
1888
1902
|
});
|
1889
1903
|
}
|
1890
1904
|
}) : s.push({
|
1891
|
-
title: `${
|
1905
|
+
title: `${Oe(d)}`,
|
1892
1906
|
prop: `material.${o}.${d}`,
|
1893
1907
|
type: `${typeof t[o][d]}`,
|
1894
1908
|
value: c[d],
|
1895
|
-
onChange: (
|
1896
|
-
var
|
1897
|
-
a.updateObject(n.uuid, `material.${o}.${d}`,
|
1898
|
-
const
|
1899
|
-
|
1909
|
+
onChange: (b, x) => {
|
1910
|
+
var O;
|
1911
|
+
a.updateObject(n.uuid, `material.${o}.${d}`, x);
|
1912
|
+
const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
|
1913
|
+
S !== void 0 && q(S, `material.${o}.${d}`, x);
|
1900
1914
|
}
|
1901
1915
|
});
|
1902
1916
|
break;
|
1903
1917
|
case "object":
|
1904
|
-
|
1905
|
-
title:
|
1918
|
+
p.value !== void 0 && p.value.src !== void 0 ? s.push({
|
1919
|
+
title: Oe(d),
|
1906
1920
|
type: "image",
|
1907
|
-
value:
|
1908
|
-
onChange: (
|
1909
|
-
var
|
1910
|
-
a.createTexture(n.uuid, `material.${o}.${d}.value`,
|
1911
|
-
const
|
1912
|
-
|
1913
|
-
|
1921
|
+
value: p.value.src,
|
1922
|
+
onChange: (b, x) => {
|
1923
|
+
var O;
|
1924
|
+
a.createTexture(n.uuid, `material.${o}.${d}.value`, x);
|
1925
|
+
const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
|
1926
|
+
S !== void 0 && Mt(x).then((m) => {
|
1927
|
+
q(S, `material.${o}.${d}.value`, m);
|
1914
1928
|
});
|
1915
1929
|
}
|
1916
1930
|
}) : s.push({
|
1917
1931
|
title: d,
|
1918
|
-
type: `${typeof
|
1919
|
-
value:
|
1920
|
-
onChange: (
|
1921
|
-
var
|
1922
|
-
a.updateObject(n.uuid, `material.${o}.${d}.value`,
|
1923
|
-
const
|
1924
|
-
|
1932
|
+
type: `${typeof p.value}`,
|
1933
|
+
value: p.value,
|
1934
|
+
onChange: (b, x) => {
|
1935
|
+
var O;
|
1936
|
+
a.updateObject(n.uuid, `material.${o}.${d}.value`, x);
|
1937
|
+
const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
|
1938
|
+
S !== void 0 && q(S, `material.${o}.${d}.value`, x);
|
1925
1939
|
}
|
1926
1940
|
});
|
1927
1941
|
break;
|
1928
1942
|
}
|
1929
1943
|
}
|
1930
1944
|
s.length > 0 && e.push({
|
1931
|
-
title:
|
1945
|
+
title: Oe(o),
|
1932
1946
|
items: s
|
1933
1947
|
});
|
1934
1948
|
}
|
@@ -1943,7 +1957,7 @@ function $t(t, n, a) {
|
|
1943
1957
|
}
|
1944
1958
|
}), e;
|
1945
1959
|
}
|
1946
|
-
function
|
1960
|
+
function ba(t, n) {
|
1947
1961
|
const a = t.material;
|
1948
1962
|
if (Array.isArray(a)) {
|
1949
1963
|
const e = [], o = a.length;
|
@@ -1953,8 +1967,9 @@ function cr(t, n) {
|
|
1953
1967
|
$e,
|
1954
1968
|
{
|
1955
1969
|
title: `Material ${u}`,
|
1956
|
-
items:
|
1957
|
-
}
|
1970
|
+
items: Vt(a[u], t, n)
|
1971
|
+
},
|
1972
|
+
`Material ${u}`
|
1958
1973
|
)
|
1959
1974
|
);
|
1960
1975
|
return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
|
@@ -1963,38 +1978,38 @@ function cr(t, n) {
|
|
1963
1978
|
$e,
|
1964
1979
|
{
|
1965
1980
|
title: "Material",
|
1966
|
-
items:
|
1981
|
+
items: Vt(a, t, n)
|
1967
1982
|
}
|
1968
1983
|
);
|
1969
1984
|
}
|
1970
1985
|
function et(t) {
|
1971
1986
|
let n = t.value;
|
1972
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
1973
|
-
const [a, e] =
|
1974
|
-
|
1975
|
-
var
|
1976
|
-
let
|
1977
|
-
const
|
1978
|
-
|
1979
|
-
},
|
1980
|
-
if (!
|
1987
|
+
n !== void 0 && n.isColor !== void 0 && (n = Yn(t.value));
|
1988
|
+
const [a, e] = ne(n), o = ye(null), u = ye(null), c = ye(null);
|
1989
|
+
Be(() => {
|
1990
|
+
var F;
|
1991
|
+
let h = !1, b = -1, x = 0, S = Number(a);
|
1992
|
+
const O = (V) => {
|
1993
|
+
h = !0, x = S, b = V.clientX;
|
1994
|
+
}, m = (V) => {
|
1995
|
+
if (!h)
|
1981
1996
|
return;
|
1982
|
-
const
|
1983
|
-
|
1984
|
-
},
|
1985
|
-
|
1986
|
-
},
|
1987
|
-
|
1988
|
-
},
|
1989
|
-
return
|
1990
|
-
var
|
1991
|
-
|
1997
|
+
const Z = t.step !== void 0 ? t.step : 1, se = (V.clientX - b) * Z;
|
1998
|
+
S = Number((x + se).toFixed(4)), u.current !== null && (u.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
|
1999
|
+
}, v = () => {
|
2000
|
+
h = !1;
|
2001
|
+
}, y = () => {
|
2002
|
+
h = !1;
|
2003
|
+
}, w = t.type === "number";
|
2004
|
+
return w && ((F = o.current) == null || F.addEventListener("mousedown", O, !1), document.addEventListener("mouseup", v, !1), document.addEventListener("mousemove", m, !1), document.addEventListener("contextmenu", y, !1)), () => {
|
2005
|
+
var V;
|
2006
|
+
w && ((V = o.current) == null || V.removeEventListener("mousedown", O), document.removeEventListener("mouseup", v), document.removeEventListener("mousemove", m), document.removeEventListener("contextmenu", y));
|
1992
2007
|
};
|
1993
2008
|
}, [a]);
|
1994
2009
|
const s = t.type === "string" && (a.length > 100 || a.search(`
|
1995
|
-
`) > -1), d = s || t.type === "image",
|
1996
|
-
let
|
1997
|
-
t.type === "boolean" && (
|
2010
|
+
`) > -1), d = s || t.type === "image", p = (h) => {
|
2011
|
+
let b = h.target.value;
|
2012
|
+
t.type === "boolean" && (b = h.target.checked), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
|
1998
2013
|
};
|
1999
2014
|
return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
|
2000
2015
|
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: t.title }, "fieldLabel"),
|
@@ -2003,7 +2018,7 @@ function et(t) {
|
|
2003
2018
|
{
|
2004
2019
|
type: "text",
|
2005
2020
|
disabled: t.disabled,
|
2006
|
-
onChange:
|
2021
|
+
onChange: p,
|
2007
2022
|
value: a
|
2008
2023
|
}
|
2009
2024
|
),
|
@@ -2013,7 +2028,7 @@ function et(t) {
|
|
2013
2028
|
cols: 50,
|
2014
2029
|
rows: 10,
|
2015
2030
|
disabled: !0,
|
2016
|
-
onChange:
|
2031
|
+
onChange: p,
|
2017
2032
|
value: a
|
2018
2033
|
}
|
2019
2034
|
),
|
@@ -2022,7 +2037,7 @@ function et(t) {
|
|
2022
2037
|
{
|
2023
2038
|
type: "checkbox",
|
2024
2039
|
disabled: t.disabled,
|
2025
|
-
onChange:
|
2040
|
+
onChange: p,
|
2026
2041
|
checked: a
|
2027
2042
|
}
|
2028
2043
|
),
|
@@ -2035,11 +2050,11 @@ function et(t) {
|
|
2035
2050
|
min: t.min,
|
2036
2051
|
max: t.max,
|
2037
2052
|
step: t.step,
|
2038
|
-
onChange:
|
2053
|
+
onChange: p
|
2039
2054
|
}
|
2040
2055
|
),
|
2041
2056
|
t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2042
|
-
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange:
|
2057
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
|
2043
2058
|
/* @__PURE__ */ l.jsx(
|
2044
2059
|
"input",
|
2045
2060
|
{
|
@@ -2049,13 +2064,13 @@ function et(t) {
|
|
2049
2064
|
min: t.min,
|
2050
2065
|
max: t.max,
|
2051
2066
|
step: t.step,
|
2052
|
-
onChange:
|
2067
|
+
onChange: p
|
2053
2068
|
}
|
2054
2069
|
)
|
2055
2070
|
] }),
|
2056
2071
|
t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2057
|
-
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange:
|
2058
|
-
/* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange:
|
2072
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
|
2073
|
+
/* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: p })
|
2059
2074
|
] }),
|
2060
2075
|
t.type === "button" && /* @__PURE__ */ l.jsx(
|
2061
2076
|
"button",
|
@@ -2067,13 +2082,13 @@ function et(t) {
|
|
2067
2082
|
}
|
2068
2083
|
),
|
2069
2084
|
t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: c, onClick: () => {
|
2070
|
-
|
2071
|
-
c.current.src =
|
2085
|
+
va().then((h) => {
|
2086
|
+
c.current.src = h, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, h);
|
2072
2087
|
});
|
2073
|
-
}, src: a.length > 0 ? a :
|
2088
|
+
}, src: a.length > 0 ? a : ha })
|
2074
2089
|
] });
|
2075
2090
|
}
|
2076
|
-
function
|
2091
|
+
function Yt(t) {
|
2077
2092
|
switch (t) {
|
2078
2093
|
case "fov":
|
2079
2094
|
return "FOV";
|
@@ -2102,12 +2117,12 @@ function Gt(t) {
|
|
2102
2117
|
}
|
2103
2118
|
return t;
|
2104
2119
|
}
|
2105
|
-
function
|
2120
|
+
function ya(t, n) {
|
2106
2121
|
const a = [];
|
2107
2122
|
if (t.perspectiveCameraInfo !== void 0)
|
2108
2123
|
for (const e in t.perspectiveCameraInfo)
|
2109
2124
|
a.push({
|
2110
|
-
title:
|
2125
|
+
title: Yt(e),
|
2111
2126
|
prop: e,
|
2112
2127
|
type: "number",
|
2113
2128
|
step: 0.01,
|
@@ -2116,13 +2131,13 @@ function lr(t, n) {
|
|
2116
2131
|
var s;
|
2117
2132
|
n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2118
2133
|
const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
|
2119
|
-
c !== void 0 && (
|
2134
|
+
c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
|
2120
2135
|
}
|
2121
2136
|
});
|
2122
2137
|
else if (t.orthographicCameraInfo !== void 0)
|
2123
2138
|
for (const e in t.orthographicCameraInfo)
|
2124
2139
|
a.push({
|
2125
|
-
title:
|
2140
|
+
title: Yt(e),
|
2126
2141
|
prop: e,
|
2127
2142
|
type: "number",
|
2128
2143
|
step: 0.01,
|
@@ -2131,7 +2146,7 @@ function lr(t, n) {
|
|
2131
2146
|
var s;
|
2132
2147
|
n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2133
2148
|
const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
|
2134
|
-
c !== void 0 && (
|
2149
|
+
c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
|
2135
2150
|
}
|
2136
2151
|
});
|
2137
2152
|
return /* @__PURE__ */ l.jsx(
|
@@ -2142,83 +2157,84 @@ function lr(t, n) {
|
|
2142
2157
|
}
|
2143
2158
|
);
|
2144
2159
|
}
|
2145
|
-
|
2146
|
-
|
2160
|
+
const Ea = Math.PI / 180, xa = 180 / Math.PI;
|
2161
|
+
function wa(t) {
|
2162
|
+
return t * Ea;
|
2163
|
+
}
|
2164
|
+
function St(t) {
|
2165
|
+
return t * xa;
|
2166
|
+
}
|
2167
|
+
function Ca(t, n) {
|
2168
|
+
const a = new Tn();
|
2147
2169
|
a.elements = t.matrix;
|
2148
|
-
const e = new
|
2170
|
+
const e = new L(), o = new Rn(), u = new L();
|
2149
2171
|
t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), u.setFromMatrixScale(a));
|
2150
|
-
const c = (d,
|
2151
|
-
var
|
2152
|
-
n.updateObject(t.uuid, d,
|
2153
|
-
const
|
2154
|
-
|
2155
|
-
}, s =
|
2172
|
+
const c = (d, p) => {
|
2173
|
+
var b;
|
2174
|
+
n.updateObject(t.uuid, d, p);
|
2175
|
+
const h = (b = n.scene) == null ? void 0 : b.getObjectByProperty("uuid", t.uuid);
|
2176
|
+
h !== void 0 && q(h, d, p);
|
2177
|
+
}, s = (d, p) => {
|
2178
|
+
c(d, wa(p));
|
2179
|
+
};
|
2180
|
+
return /* @__PURE__ */ l.jsx(
|
2181
|
+
$e,
|
2156
2182
|
{
|
2157
|
-
title: "
|
2183
|
+
title: "Transform",
|
2158
2184
|
items: [
|
2159
2185
|
{
|
2160
|
-
title: "X",
|
2186
|
+
title: "Position X",
|
2161
2187
|
prop: "position.x",
|
2162
2188
|
type: "number",
|
2163
2189
|
value: e.x,
|
2164
2190
|
onChange: c
|
2165
2191
|
},
|
2166
2192
|
{
|
2167
|
-
title: "Y",
|
2193
|
+
title: "Position Y",
|
2168
2194
|
prop: "position.y",
|
2169
2195
|
type: "number",
|
2170
2196
|
value: e.y,
|
2171
2197
|
onChange: c
|
2172
2198
|
},
|
2173
2199
|
{
|
2174
|
-
title: "Z",
|
2200
|
+
title: "Position Z",
|
2175
2201
|
prop: "position.z",
|
2176
2202
|
type: "number",
|
2177
2203
|
value: e.z,
|
2178
2204
|
onChange: c
|
2179
|
-
}
|
2180
|
-
]
|
2181
|
-
},
|
2182
|
-
{
|
2183
|
-
title: "Rotation",
|
2184
|
-
items: [
|
2205
|
+
},
|
2185
2206
|
{
|
2186
|
-
title: "X",
|
2207
|
+
title: "Rotation X",
|
2187
2208
|
prop: "rotation.x",
|
2188
2209
|
type: "number",
|
2189
|
-
value: o.x,
|
2190
|
-
min: -
|
2191
|
-
max:
|
2192
|
-
step: 0.
|
2193
|
-
onChange:
|
2210
|
+
value: Ct(St(o.x)),
|
2211
|
+
min: -360,
|
2212
|
+
max: 360,
|
2213
|
+
step: 0.1,
|
2214
|
+
onChange: s
|
2194
2215
|
},
|
2195
2216
|
{
|
2196
|
-
title: "Y",
|
2217
|
+
title: "Rotation Y",
|
2197
2218
|
prop: "rotation.y",
|
2198
2219
|
type: "number",
|
2199
|
-
value: o.y,
|
2200
|
-
min: -
|
2201
|
-
max:
|
2202
|
-
step: 0.
|
2203
|
-
onChange:
|
2220
|
+
value: Ct(St(o.y)),
|
2221
|
+
min: -360,
|
2222
|
+
max: 360,
|
2223
|
+
step: 0.1,
|
2224
|
+
onChange: s
|
2204
2225
|
},
|
2205
2226
|
{
|
2206
|
-
title: "Z",
|
2227
|
+
title: "Rotation Z",
|
2207
2228
|
prop: "rotation.z",
|
2208
2229
|
type: "number",
|
2209
|
-
value: o.z,
|
2210
|
-
min: -
|
2211
|
-
max:
|
2212
|
-
step: 0.
|
2213
|
-
onChange:
|
2214
|
-
}
|
2215
|
-
]
|
2216
|
-
},
|
2217
|
-
{
|
2218
|
-
title: "Scale",
|
2219
|
-
items: [
|
2230
|
+
value: Ct(St(o.z)),
|
2231
|
+
min: -360,
|
2232
|
+
max: 360,
|
2233
|
+
step: 0.1,
|
2234
|
+
onChange: s
|
2235
|
+
},
|
2220
2236
|
{
|
2221
|
-
title: "X",
|
2237
|
+
title: "Scale X",
|
2222
2238
|
prop: "scale.x",
|
2223
2239
|
type: "number",
|
2224
2240
|
value: u.x,
|
@@ -2226,7 +2242,7 @@ function ur(t, n) {
|
|
2226
2242
|
onChange: c
|
2227
2243
|
},
|
2228
2244
|
{
|
2229
|
-
title: "Y",
|
2245
|
+
title: "Scale Y",
|
2230
2246
|
prop: "scale.y",
|
2231
2247
|
type: "number",
|
2232
2248
|
value: u.y,
|
@@ -2234,7 +2250,7 @@ function ur(t, n) {
|
|
2234
2250
|
onChange: c
|
2235
2251
|
},
|
2236
2252
|
{
|
2237
|
-
title: "Z",
|
2253
|
+
title: "Scale Z",
|
2238
2254
|
prop: "scale.z",
|
2239
2255
|
type: "number",
|
2240
2256
|
value: u.z,
|
@@ -2243,16 +2259,9 @@ function ur(t, n) {
|
|
2243
2259
|
}
|
2244
2260
|
]
|
2245
2261
|
}
|
2246
|
-
];
|
2247
|
-
return /* @__PURE__ */ l.jsx(
|
2248
|
-
$e,
|
2249
|
-
{
|
2250
|
-
title: "Transform",
|
2251
|
-
items: s
|
2252
|
-
}
|
2253
2262
|
);
|
2254
2263
|
}
|
2255
|
-
function
|
2264
|
+
function zt(t) {
|
2256
2265
|
switch (t) {
|
2257
2266
|
case "color":
|
2258
2267
|
return "Color";
|
@@ -2271,25 +2280,25 @@ function Vt(t) {
|
|
2271
2280
|
}
|
2272
2281
|
return t;
|
2273
2282
|
}
|
2274
|
-
function
|
2283
|
+
function Sa(t, n) {
|
2275
2284
|
const a = [];
|
2276
2285
|
if (t.lightInfo !== void 0)
|
2277
2286
|
for (const e in t.lightInfo) {
|
2278
2287
|
const o = t.lightInfo[e];
|
2279
2288
|
o !== void 0 && (o.isColor !== void 0 ? a.push({
|
2280
|
-
title:
|
2289
|
+
title: zt(e),
|
2281
2290
|
prop: e,
|
2282
2291
|
type: "color",
|
2283
2292
|
value: o,
|
2284
2293
|
onChange: (u, c) => {
|
2285
|
-
var
|
2286
|
-
const s = new
|
2294
|
+
var p;
|
2295
|
+
const s = new kt(c);
|
2287
2296
|
n.updateObject(t.uuid, u, s);
|
2288
|
-
const d = (
|
2289
|
-
d !== void 0 &&
|
2297
|
+
const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
|
2298
|
+
d !== void 0 && q(d, u, s);
|
2290
2299
|
}
|
2291
2300
|
}) : a.push({
|
2292
|
-
title:
|
2301
|
+
title: zt(e),
|
2293
2302
|
prop: e,
|
2294
2303
|
type: typeof o,
|
2295
2304
|
value: o,
|
@@ -2298,7 +2307,7 @@ function dr(t, n) {
|
|
2298
2307
|
var d;
|
2299
2308
|
n.updateObject(t.uuid, u, c);
|
2300
2309
|
const s = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
|
2301
|
-
s !== void 0 &&
|
2310
|
+
s !== void 0 && q(s, u, c);
|
2302
2311
|
}
|
2303
2312
|
}));
|
2304
2313
|
}
|
@@ -2310,8 +2319,8 @@ function dr(t, n) {
|
|
2310
2319
|
}
|
2311
2320
|
);
|
2312
2321
|
}
|
2313
|
-
function
|
2314
|
-
const [n, a] =
|
2322
|
+
function Oa(t) {
|
2323
|
+
const [n, a] = ne(-1), [e, o] = ne({
|
2315
2324
|
name: "",
|
2316
2325
|
uuid: "",
|
2317
2326
|
type: "",
|
@@ -2322,13 +2331,13 @@ function fr(t) {
|
|
2322
2331
|
orthographicCameraInfo: void 0,
|
2323
2332
|
lightInfo: void 0
|
2324
2333
|
});
|
2325
|
-
|
2334
|
+
Be(() => {
|
2326
2335
|
function c(s) {
|
2327
2336
|
const d = s.value;
|
2328
2337
|
o(d), a(Date.now());
|
2329
2338
|
}
|
2330
|
-
return
|
2331
|
-
|
2339
|
+
return I.addEventListener(N.SET_OBJECT, c), () => {
|
2340
|
+
I.removeEventListener(N.SET_OBJECT, c);
|
2332
2341
|
};
|
2333
2342
|
}, []);
|
2334
2343
|
const u = e.type.toLowerCase();
|
@@ -2372,59 +2381,45 @@ function fr(t) {
|
|
2372
2381
|
prop: "visible",
|
2373
2382
|
value: e.visible,
|
2374
2383
|
onChange: (c, s) => {
|
2375
|
-
var
|
2384
|
+
var p;
|
2376
2385
|
t.three.updateObject(e.uuid, c, s);
|
2377
|
-
const d = (
|
2378
|
-
d !== void 0 &&
|
2386
|
+
const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", e.uuid);
|
2387
|
+
d !== void 0 && q(d, c, s);
|
2379
2388
|
}
|
2380
2389
|
}
|
2381
2390
|
)
|
2382
2391
|
] }),
|
2383
2392
|
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2384
|
-
|
2385
|
-
u.search("camera") > -1 ?
|
2386
|
-
u.search("light") > -1 ?
|
2387
|
-
u.search("mesh") > -1 ?
|
2393
|
+
Ca(e, t.three),
|
2394
|
+
u.search("camera") > -1 ? ya(e, t.three) : null,
|
2395
|
+
u.search("light") > -1 ? Sa(e, t.three) : null,
|
2396
|
+
u.search("mesh") > -1 ? ba(e, t.three) : null
|
2388
2397
|
] })
|
2389
2398
|
] }) }, n);
|
2390
2399
|
}
|
2391
|
-
class
|
2400
|
+
class Xa extends Bn {
|
2392
2401
|
constructor(a) {
|
2393
2402
|
super(a);
|
2394
|
-
|
2403
|
+
$(this, "three");
|
2395
2404
|
// Private
|
2396
|
-
|
2397
|
-
this.three.getScene();
|
2398
|
-
});
|
2399
|
-
L(this, "setScene", (a) => {
|
2405
|
+
$(this, "setScene", (a) => {
|
2400
2406
|
this.setState(() => ({
|
2401
2407
|
scene: a.value
|
2402
2408
|
}));
|
2403
2409
|
});
|
2404
2410
|
this.state = {
|
2405
2411
|
scene: a.scene !== void 0 ? a.scene : null
|
2406
|
-
}, this.three = a.three,
|
2407
|
-
}
|
2408
|
-
componentDidMount() {
|
2409
|
-
this.onRefresh();
|
2412
|
+
}, this.three = a.three, I.addEventListener(N.SET_SCENE, this.setScene);
|
2410
2413
|
}
|
2411
2414
|
componentWillUnmount() {
|
2412
|
-
|
2415
|
+
I.removeEventListener(N.SET_SCENE, this.setScene);
|
2413
2416
|
}
|
2414
2417
|
render() {
|
2415
2418
|
var o;
|
2416
|
-
const a = this.componentState.scene !== null, e = "Hierarchy" + (a ?
|
2419
|
+
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(o = this.componentState.scene) == null ? void 0 : o.name}` : "No Scene");
|
2417
2420
|
return /* @__PURE__ */ l.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2418
|
-
a && /* @__PURE__ */ l.jsx(
|
2419
|
-
|
2420
|
-
{
|
2421
|
-
label: e,
|
2422
|
-
button: /* @__PURE__ */ l.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
|
2423
|
-
open: !0,
|
2424
|
-
children: /* @__PURE__ */ l.jsx(nr, { child: this.componentState.scene, three: this.three })
|
2425
|
-
}
|
2426
|
-
),
|
2427
|
-
/* @__PURE__ */ l.jsx(Mt, { label: "Inspector", children: /* @__PURE__ */ l.jsx(fr, { three: this.three }, "Inspector") })
|
2421
|
+
/* @__PURE__ */ l.jsx(jt, { label: e, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: a && /* @__PURE__ */ l.jsx(fa, { child: this.componentState.scene, three: this.three }) }) }),
|
2422
|
+
/* @__PURE__ */ l.jsx(jt, { label: "Inspector", children: /* @__PURE__ */ l.jsx(Oa, { three: this.three }, "Inspector") })
|
2428
2423
|
] }) }, "SceneHierarchy");
|
2429
2424
|
}
|
2430
2425
|
// Getters / Setters
|
@@ -2432,40 +2427,54 @@ class Ir extends kn {
|
|
2432
2427
|
return this.state;
|
2433
2428
|
}
|
2434
2429
|
}
|
2435
|
-
function
|
2436
|
-
|
2437
|
-
|
2430
|
+
function qa(t) {
|
2431
|
+
function n() {
|
2432
|
+
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2433
|
+
}
|
2434
|
+
const a = (s) => {
|
2435
|
+
var p;
|
2436
|
+
if (!n())
|
2437
|
+
return;
|
2438
|
+
const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", s.value);
|
2438
2439
|
d !== void 0 && t.three.setObject(d);
|
2439
|
-
},
|
2440
|
-
|
2441
|
-
|
2442
|
-
|
2443
|
-
const
|
2444
|
-
|
2440
|
+
}, e = (s, d, p) => {
|
2441
|
+
var b;
|
2442
|
+
if (!n())
|
2443
|
+
return;
|
2444
|
+
const h = (b = t.three.scene) == null ? void 0 : b.getObjectByProperty("uuid", s);
|
2445
|
+
h !== void 0 && q(h, d, p);
|
2445
2446
|
}, o = (s) => {
|
2447
|
+
if (!n())
|
2448
|
+
return;
|
2449
|
+
const d = s.value, { key: p, value: h, uuid: b } = d;
|
2450
|
+
e(b, p, h);
|
2451
|
+
}, u = (s) => {
|
2452
|
+
if (!n())
|
2453
|
+
return;
|
2446
2454
|
const d = s.value;
|
2447
|
-
|
2448
|
-
|
2455
|
+
Mt(d.value).then((p) => {
|
2456
|
+
e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
|
2449
2457
|
});
|
2450
|
-
}, u = () => {
|
2451
|
-
t.three.setScene(t.scene);
|
2452
2458
|
}, c = (s) => {
|
2453
|
-
|
2454
|
-
if (
|
2459
|
+
var x;
|
2460
|
+
if (!n())
|
2461
|
+
return;
|
2462
|
+
const { key: d, uuid: p, value: h } = s.value, b = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
|
2463
|
+
if (b !== void 0)
|
2455
2464
|
try {
|
2456
|
-
|
2457
|
-
} catch (
|
2458
|
-
console.log("Error requesting method:"), console.log(
|
2465
|
+
b[d](h);
|
2466
|
+
} catch (S) {
|
2467
|
+
console.log("Error requesting method:"), console.log(S), console.log(d), console.log(h);
|
2459
2468
|
}
|
2460
2469
|
};
|
2461
|
-
return
|
2462
|
-
|
2470
|
+
return Be(() => (I.addEventListener(N.GET_OBJECT, a), I.addEventListener(N.UPDATE_OBJECT, o), I.addEventListener(N.CREATE_TEXTURE, u), I.addEventListener(N.REQUEST_METHOD, c), () => {
|
2471
|
+
I.removeEventListener(N.GET_OBJECT, a), I.removeEventListener(N.UPDATE_OBJECT, o), I.removeEventListener(N.CREATE_TEXTURE, u), I.removeEventListener(N.REQUEST_METHOD, c);
|
2463
2472
|
}), []), null;
|
2464
2473
|
}
|
2465
|
-
const
|
2466
|
-
class
|
2474
|
+
const Wt = { type: "change" }, Ot = { type: "start" }, Ht = { type: "end" }, pt = new Mn(), Kt = new Pn(), Ta = Math.cos(70 * jn.DEG2RAD);
|
2475
|
+
class Ra extends Zt {
|
2467
2476
|
constructor(n, a) {
|
2468
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
2477
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new L(), this.cursor = new L(), 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: Ne.ROTATE, MIDDLE: Ne.DOLLY, RIGHT: Ne.PAN }, this.touches = { ONE: Le.ROTATE, TWO: Le.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2469
2478
|
return s.phi;
|
2470
2479
|
}, this.getAzimuthalAngle = function() {
|
2471
2480
|
return s.theta;
|
@@ -2478,36 +2487,36 @@ class pr extends Kt {
|
|
2478
2487
|
}, this.saveState = function() {
|
2479
2488
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2480
2489
|
}, this.reset = function() {
|
2481
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(
|
2490
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Wt), e.update(), u = o.NONE;
|
2482
2491
|
}, this.update = function() {
|
2483
|
-
const i = new
|
2492
|
+
const i = new L(), E = new Ft().setFromUnitVectors(n.up, new L(0, 1, 0)), P = E.clone().invert(), _ = new L(), W = new Ft(), de = new L(), J = 2 * Math.PI;
|
2484
2493
|
return function(ht = null) {
|
2485
|
-
const
|
2486
|
-
i.copy(
|
2487
|
-
let
|
2488
|
-
isFinite(
|
2489
|
-
let
|
2490
|
-
if (e.zoomToCursor &&
|
2491
|
-
let
|
2494
|
+
const he = e.object.position;
|
2495
|
+
i.copy(he).sub(e.target), i.applyQuaternion(E), s.setFromVector3(i), e.autoRotate && u === o.NONE && z(j(ht)), e.enableDamping ? (s.theta += d.theta * e.dampingFactor, s.phi += d.phi * e.dampingFactor) : (s.theta += d.theta, s.phi += d.phi);
|
2496
|
+
let Q = e.minAzimuthAngle, ee = e.maxAzimuthAngle;
|
2497
|
+
isFinite(Q) && isFinite(ee) && (Q < -Math.PI ? Q += J : Q > Math.PI && (Q -= J), ee < -Math.PI ? ee += J : ee > Math.PI && (ee -= J), Q <= ee ? s.theta = Math.max(Q, Math.min(ee, s.theta)) : s.theta = s.theta > (Q + ee) / 2 ? Math.max(Q, s.theta) : Math.min(ee, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(h, e.dampingFactor) : e.target.add(h), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && se || e.object.isOrthographicCamera ? s.radius = je(s.radius) : s.radius = je(s.radius * p), i.setFromSpherical(s), i.applyQuaternion(P), he.copy(e.target).add(i), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, h.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), h.set(0, 0, 0));
|
2498
|
+
let De = !1;
|
2499
|
+
if (e.zoomToCursor && se) {
|
2500
|
+
let Se = null;
|
2492
2501
|
if (e.object.isPerspectiveCamera) {
|
2493
|
-
const
|
2494
|
-
|
2495
|
-
const Ae =
|
2496
|
-
e.object.position.addScaledVector(
|
2502
|
+
const be = i.length();
|
2503
|
+
Se = je(be * p);
|
2504
|
+
const Ae = be - Se;
|
2505
|
+
e.object.position.addScaledVector(V, Ae), e.object.updateMatrixWorld();
|
2497
2506
|
} else if (e.object.isOrthographicCamera) {
|
2498
|
-
const
|
2499
|
-
|
2500
|
-
const Ae = new
|
2501
|
-
Ae.unproject(e.object), e.object.position.sub(Ae).add(
|
2507
|
+
const be = new L(Z.x, Z.y, 0);
|
2508
|
+
be.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0;
|
2509
|
+
const Ae = new L(Z.x, Z.y, 0);
|
2510
|
+
Ae.unproject(e.object), e.object.position.sub(Ae).add(be), e.object.updateMatrixWorld(), Se = i.length();
|
2502
2511
|
} else
|
2503
2512
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2504
|
-
|
2513
|
+
Se !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Se).add(e.object.position) : (pt.origin.copy(e.object.position), pt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(pt.direction)) < Ta ? n.lookAt(e.target) : (Kt.setFromNormalAndCoplanarPoint(e.object.up, e.target), pt.intersectPlane(Kt, e.target))));
|
2505
2514
|
} else
|
2506
|
-
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom /
|
2507
|
-
return
|
2515
|
+
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0);
|
2516
|
+
return p = 1, se = !1, De || _.distanceToSquared(e.object.position) > c || 8 * (1 - W.dot(e.object.quaternion)) > c || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Wt), _.copy(e.object.position), W.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
|
2508
2517
|
};
|
2509
2518
|
}(), this.dispose = function() {
|
2510
|
-
e.domElement.removeEventListener("contextmenu",
|
2519
|
+
e.domElement.removeEventListener("contextmenu", ve), e.domElement.removeEventListener("pointerdown", He), e.domElement.removeEventListener("pointercancel", Ce), e.domElement.removeEventListener("wheel", ct), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Xe), e._domElementKeyEvents = null);
|
2511
2520
|
};
|
2512
2521
|
const e = this, o = {
|
2513
2522
|
NONE: -1,
|
@@ -2520,193 +2529,193 @@ class pr extends Kt {
|
|
2520
2529
|
TOUCH_DOLLY_ROTATE: 6
|
2521
2530
|
};
|
2522
2531
|
let u = o.NONE;
|
2523
|
-
const c = 1e-6, s = new
|
2524
|
-
let
|
2525
|
-
const
|
2526
|
-
let
|
2527
|
-
const
|
2528
|
-
function
|
2532
|
+
const c = 1e-6, s = new Ut(), d = new Ut();
|
2533
|
+
let p = 1;
|
2534
|
+
const h = new L(), b = new oe(), x = new oe(), S = new oe(), O = new oe(), m = new oe(), v = new oe(), y = new oe(), w = new oe(), F = new oe(), V = new L(), Z = new oe();
|
2535
|
+
let se = !1;
|
2536
|
+
const Y = [], fe = {};
|
2537
|
+
function j(i) {
|
2529
2538
|
return i !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * i : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2530
2539
|
}
|
2531
|
-
function
|
2532
|
-
const
|
2533
|
-
return Math.pow(0.95, e.zoomSpeed *
|
2540
|
+
function D(i) {
|
2541
|
+
const E = Math.abs(i) / (100 * (window.devicePixelRatio | 0));
|
2542
|
+
return Math.pow(0.95, e.zoomSpeed * E);
|
2534
2543
|
}
|
2535
|
-
function
|
2544
|
+
function z(i) {
|
2536
2545
|
d.theta -= i;
|
2537
2546
|
}
|
2538
|
-
function
|
2547
|
+
function ce(i) {
|
2539
2548
|
d.phi -= i;
|
2540
2549
|
}
|
2541
|
-
const
|
2542
|
-
const i = new
|
2543
|
-
return function(
|
2544
|
-
i.setFromMatrixColumn(
|
2550
|
+
const ae = function() {
|
2551
|
+
const i = new L();
|
2552
|
+
return function(P, _) {
|
2553
|
+
i.setFromMatrixColumn(_, 0), i.multiplyScalar(-P), h.add(i);
|
2545
2554
|
};
|
2546
|
-
}(),
|
2547
|
-
const i = new
|
2548
|
-
return function(
|
2549
|
-
e.screenSpacePanning === !0 ? i.setFromMatrixColumn(
|
2555
|
+
}(), le = function() {
|
2556
|
+
const i = new L();
|
2557
|
+
return function(P, _) {
|
2558
|
+
e.screenSpacePanning === !0 ? i.setFromMatrixColumn(_, 1) : (i.setFromMatrixColumn(_, 0), i.crossVectors(e.object.up, i)), i.multiplyScalar(P), h.add(i);
|
2550
2559
|
};
|
2551
|
-
}(),
|
2552
|
-
const i = new
|
2553
|
-
return function(
|
2554
|
-
const
|
2560
|
+
}(), re = function() {
|
2561
|
+
const i = new L();
|
2562
|
+
return function(P, _) {
|
2563
|
+
const W = e.domElement;
|
2555
2564
|
if (e.object.isPerspectiveCamera) {
|
2556
|
-
const
|
2557
|
-
i.copy(
|
2558
|
-
let
|
2559
|
-
|
2565
|
+
const de = e.object.position;
|
2566
|
+
i.copy(de).sub(e.target);
|
2567
|
+
let J = i.length();
|
2568
|
+
J *= Math.tan(e.object.fov / 2 * Math.PI / 180), ae(2 * P * J / W.clientHeight, e.object.matrix), le(2 * _ * J / W.clientHeight, e.object.matrix);
|
2560
2569
|
} else
|
2561
|
-
e.object.isOrthographicCamera ? (
|
2570
|
+
e.object.isOrthographicCamera ? (ae(P * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), le(_ * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
|
2562
2571
|
};
|
2563
2572
|
}();
|
2564
|
-
function
|
2565
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
2573
|
+
function Me(i) {
|
2574
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2566
2575
|
}
|
2567
2576
|
function Ge(i) {
|
2568
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
2577
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2569
2578
|
}
|
2570
|
-
function
|
2579
|
+
function Pe(i, E) {
|
2571
2580
|
if (!e.zoomToCursor)
|
2572
2581
|
return;
|
2573
|
-
|
2574
|
-
const
|
2575
|
-
|
2582
|
+
se = !0;
|
2583
|
+
const P = e.domElement.getBoundingClientRect(), _ = i - P.left, W = E - P.top, de = P.width, J = P.height;
|
2584
|
+
Z.x = _ / de * 2 - 1, Z.y = -(W / J) * 2 + 1, V.set(Z.x, Z.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
2576
2585
|
}
|
2577
|
-
function
|
2586
|
+
function je(i) {
|
2578
2587
|
return Math.max(e.minDistance, Math.min(e.maxDistance, i));
|
2579
2588
|
}
|
2580
2589
|
function Ve(i) {
|
2581
|
-
|
2590
|
+
b.set(i.clientX, i.clientY);
|
2582
2591
|
}
|
2583
2592
|
function nt(i) {
|
2584
|
-
|
2593
|
+
Pe(i.clientX, i.clientX), y.set(i.clientX, i.clientY);
|
2585
2594
|
}
|
2586
2595
|
function Ye(i) {
|
2587
|
-
|
2588
|
-
}
|
2589
|
-
function rt(i) {
|
2590
|
-
h.set(i.clientX, i.clientY), g.subVectors(h, f).multiplyScalar(e.rotateSpeed);
|
2591
|
-
const y = e.domElement;
|
2592
|
-
ve(2 * Math.PI * g.x / y.clientHeight), be(2 * Math.PI * g.y / y.clientHeight), f.copy(h), e.update();
|
2596
|
+
O.set(i.clientX, i.clientY);
|
2593
2597
|
}
|
2594
|
-
function
|
2595
|
-
|
2598
|
+
function at(i) {
|
2599
|
+
x.set(i.clientX, i.clientY), S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
|
2600
|
+
const E = e.domElement;
|
2601
|
+
z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x), e.update();
|
2596
2602
|
}
|
2597
2603
|
function bt(i) {
|
2598
|
-
w.set(i.clientX, i.clientY),
|
2604
|
+
w.set(i.clientX, i.clientY), F.subVectors(w, y), F.y > 0 ? Me(D(F.y)) : F.y < 0 && Ge(D(F.y)), y.copy(w), e.update();
|
2605
|
+
}
|
2606
|
+
function yt(i) {
|
2607
|
+
m.set(i.clientX, i.clientY), v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m), e.update();
|
2599
2608
|
}
|
2600
2609
|
function ze(i) {
|
2601
|
-
|
2610
|
+
Pe(i.clientX, i.clientY), i.deltaY < 0 ? Ge(D(i.deltaY)) : i.deltaY > 0 && Me(D(i.deltaY)), e.update();
|
2602
2611
|
}
|
2603
2612
|
function We(i) {
|
2604
|
-
let
|
2613
|
+
let E = !1;
|
2605
2614
|
switch (i.code) {
|
2606
2615
|
case e.keys.UP:
|
2607
|
-
i.ctrlKey || i.metaKey || i.shiftKey ?
|
2616
|
+
i.ctrlKey || i.metaKey || i.shiftKey ? ce(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, e.keyPanSpeed), E = !0;
|
2608
2617
|
break;
|
2609
2618
|
case e.keys.BOTTOM:
|
2610
|
-
i.ctrlKey || i.metaKey || i.shiftKey ?
|
2619
|
+
i.ctrlKey || i.metaKey || i.shiftKey ? ce(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, -e.keyPanSpeed), E = !0;
|
2611
2620
|
break;
|
2612
2621
|
case e.keys.LEFT:
|
2613
|
-
i.ctrlKey || i.metaKey || i.shiftKey ?
|
2622
|
+
i.ctrlKey || i.metaKey || i.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(e.keyPanSpeed, 0), E = !0;
|
2614
2623
|
break;
|
2615
2624
|
case e.keys.RIGHT:
|
2616
|
-
i.ctrlKey || i.metaKey || i.shiftKey ?
|
2625
|
+
i.ctrlKey || i.metaKey || i.shiftKey ? z(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(-e.keyPanSpeed, 0), E = !0;
|
2617
2626
|
break;
|
2618
2627
|
}
|
2619
|
-
|
2628
|
+
E && (i.preventDefault(), e.update());
|
2620
2629
|
}
|
2621
|
-
function
|
2622
|
-
if (
|
2623
|
-
|
2630
|
+
function Ee(i) {
|
2631
|
+
if (Y.length === 1)
|
2632
|
+
b.set(i.pageX, i.pageY);
|
2624
2633
|
else {
|
2625
|
-
const
|
2626
|
-
|
2634
|
+
const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
|
2635
|
+
b.set(P, _);
|
2627
2636
|
}
|
2628
2637
|
}
|
2629
|
-
function
|
2630
|
-
if (
|
2631
|
-
|
2638
|
+
function _e(i) {
|
2639
|
+
if (Y.length === 1)
|
2640
|
+
O.set(i.pageX, i.pageY);
|
2632
2641
|
else {
|
2633
|
-
const
|
2634
|
-
|
2642
|
+
const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
|
2643
|
+
O.set(P, _);
|
2635
2644
|
}
|
2636
2645
|
}
|
2637
|
-
function
|
2638
|
-
const
|
2639
|
-
|
2646
|
+
function xe(i) {
|
2647
|
+
const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
|
2648
|
+
y.set(0, W);
|
2640
2649
|
}
|
2641
|
-
function
|
2642
|
-
e.enableZoom &&
|
2650
|
+
function Et(i) {
|
2651
|
+
e.enableZoom && xe(i), e.enablePan && _e(i);
|
2643
2652
|
}
|
2644
|
-
function
|
2645
|
-
e.enableZoom &&
|
2653
|
+
function rt(i) {
|
2654
|
+
e.enableZoom && xe(i), e.enableRotate && Ee(i);
|
2646
2655
|
}
|
2647
2656
|
function it(i) {
|
2648
|
-
if (
|
2649
|
-
|
2657
|
+
if (Y.length == 1)
|
2658
|
+
x.set(i.pageX, i.pageY);
|
2650
2659
|
else {
|
2651
|
-
const
|
2652
|
-
|
2660
|
+
const P = ue(i), _ = 0.5 * (i.pageX + P.x), W = 0.5 * (i.pageY + P.y);
|
2661
|
+
x.set(_, W);
|
2653
2662
|
}
|
2654
|
-
|
2655
|
-
const
|
2656
|
-
|
2663
|
+
S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
|
2664
|
+
const E = e.domElement;
|
2665
|
+
z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x);
|
2657
2666
|
}
|
2658
2667
|
function ot(i) {
|
2659
|
-
if (
|
2660
|
-
|
2668
|
+
if (Y.length === 1)
|
2669
|
+
m.set(i.pageX, i.pageY);
|
2661
2670
|
else {
|
2662
|
-
const
|
2663
|
-
|
2671
|
+
const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
|
2672
|
+
m.set(P, _);
|
2664
2673
|
}
|
2665
|
-
|
2674
|
+
v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m);
|
2666
2675
|
}
|
2667
|
-
function
|
2668
|
-
const
|
2669
|
-
|
2670
|
-
const
|
2671
|
-
|
2676
|
+
function we(i) {
|
2677
|
+
const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
|
2678
|
+
w.set(0, W), F.set(0, Math.pow(w.y / y.y, e.zoomSpeed)), Me(F.y), y.copy(w);
|
2679
|
+
const de = (i.pageX + E.x) * 0.5, J = (i.pageY + E.y) * 0.5;
|
2680
|
+
Pe(de, J);
|
2672
2681
|
}
|
2673
|
-
function
|
2674
|
-
e.enableZoom &&
|
2682
|
+
function ke(i) {
|
2683
|
+
e.enableZoom && we(i), e.enablePan && ot(i);
|
2675
2684
|
}
|
2676
2685
|
function st(i) {
|
2677
|
-
e.enableZoom &&
|
2686
|
+
e.enableZoom && we(i), e.enableRotate && it(i);
|
2678
2687
|
}
|
2679
2688
|
function He(i) {
|
2680
|
-
e.enabled !== !1 && (
|
2689
|
+
e.enabled !== !1 && (Y.length === 0 && (e.domElement.setPointerCapture(i.pointerId), e.domElement.addEventListener("pointermove", ge), e.domElement.addEventListener("pointerup", Ce)), wt(i), i.pointerType === "touch" ? lt(i) : xt(i));
|
2681
2690
|
}
|
2682
|
-
function
|
2691
|
+
function ge(i) {
|
2683
2692
|
e.enabled !== !1 && (i.pointerType === "touch" ? ut(i) : Ke(i));
|
2684
2693
|
}
|
2685
|
-
function
|
2686
|
-
dt(i),
|
2694
|
+
function Ce(i) {
|
2695
|
+
dt(i), Y.length === 0 && (e.domElement.releasePointerCapture(i.pointerId), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce)), e.dispatchEvent(Ht), u = o.NONE;
|
2687
2696
|
}
|
2688
|
-
function
|
2689
|
-
let
|
2697
|
+
function xt(i) {
|
2698
|
+
let E;
|
2690
2699
|
switch (i.button) {
|
2691
2700
|
case 0:
|
2692
|
-
|
2701
|
+
E = e.mouseButtons.LEFT;
|
2693
2702
|
break;
|
2694
2703
|
case 1:
|
2695
|
-
|
2704
|
+
E = e.mouseButtons.MIDDLE;
|
2696
2705
|
break;
|
2697
2706
|
case 2:
|
2698
|
-
|
2707
|
+
E = e.mouseButtons.RIGHT;
|
2699
2708
|
break;
|
2700
2709
|
default:
|
2701
|
-
|
2710
|
+
E = -1;
|
2702
2711
|
}
|
2703
|
-
switch (
|
2704
|
-
case
|
2712
|
+
switch (E) {
|
2713
|
+
case Ne.DOLLY:
|
2705
2714
|
if (e.enableZoom === !1)
|
2706
2715
|
return;
|
2707
2716
|
nt(i), u = o.DOLLY;
|
2708
2717
|
break;
|
2709
|
-
case
|
2718
|
+
case Ne.ROTATE:
|
2710
2719
|
if (i.ctrlKey || i.metaKey || i.shiftKey) {
|
2711
2720
|
if (e.enablePan === !1)
|
2712
2721
|
return;
|
@@ -2717,7 +2726,7 @@ class pr extends Kt {
|
|
2717
2726
|
Ve(i), u = o.ROTATE;
|
2718
2727
|
}
|
2719
2728
|
break;
|
2720
|
-
case
|
2729
|
+
case Ne.PAN:
|
2721
2730
|
if (i.ctrlKey || i.metaKey || i.shiftKey) {
|
2722
2731
|
if (e.enableRotate === !1)
|
2723
2732
|
return;
|
@@ -2731,46 +2740,46 @@ class pr extends Kt {
|
|
2731
2740
|
default:
|
2732
2741
|
u = o.NONE;
|
2733
2742
|
}
|
2734
|
-
u !== o.NONE && e.dispatchEvent(
|
2743
|
+
u !== o.NONE && e.dispatchEvent(Ot);
|
2735
2744
|
}
|
2736
2745
|
function Ke(i) {
|
2737
2746
|
switch (u) {
|
2738
2747
|
case o.ROTATE:
|
2739
2748
|
if (e.enableRotate === !1)
|
2740
2749
|
return;
|
2741
|
-
|
2750
|
+
at(i);
|
2742
2751
|
break;
|
2743
2752
|
case o.DOLLY:
|
2744
2753
|
if (e.enableZoom === !1)
|
2745
2754
|
return;
|
2746
|
-
|
2755
|
+
bt(i);
|
2747
2756
|
break;
|
2748
2757
|
case o.PAN:
|
2749
2758
|
if (e.enablePan === !1)
|
2750
2759
|
return;
|
2751
|
-
|
2760
|
+
yt(i);
|
2752
2761
|
break;
|
2753
2762
|
}
|
2754
2763
|
}
|
2755
2764
|
function ct(i) {
|
2756
|
-
e.enabled === !1 || e.enableZoom === !1 || u !== o.NONE || (i.preventDefault(), e.dispatchEvent(
|
2765
|
+
e.enabled === !1 || e.enableZoom === !1 || u !== o.NONE || (i.preventDefault(), e.dispatchEvent(Ot), ze(i), e.dispatchEvent(Ht));
|
2757
2766
|
}
|
2758
2767
|
function Xe(i) {
|
2759
2768
|
e.enabled === !1 || e.enablePan === !1 || We(i);
|
2760
2769
|
}
|
2761
2770
|
function lt(i) {
|
2762
|
-
switch (qe(i),
|
2771
|
+
switch (qe(i), Y.length) {
|
2763
2772
|
case 1:
|
2764
2773
|
switch (e.touches.ONE) {
|
2765
|
-
case
|
2774
|
+
case Le.ROTATE:
|
2766
2775
|
if (e.enableRotate === !1)
|
2767
2776
|
return;
|
2768
|
-
|
2777
|
+
Ee(i), u = o.TOUCH_ROTATE;
|
2769
2778
|
break;
|
2770
|
-
case
|
2779
|
+
case Le.PAN:
|
2771
2780
|
if (e.enablePan === !1)
|
2772
2781
|
return;
|
2773
|
-
|
2782
|
+
_e(i), u = o.TOUCH_PAN;
|
2774
2783
|
break;
|
2775
2784
|
default:
|
2776
2785
|
u = o.NONE;
|
@@ -2778,15 +2787,15 @@ class pr extends Kt {
|
|
2778
2787
|
break;
|
2779
2788
|
case 2:
|
2780
2789
|
switch (e.touches.TWO) {
|
2781
|
-
case
|
2790
|
+
case Le.DOLLY_PAN:
|
2782
2791
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2783
2792
|
return;
|
2784
|
-
|
2793
|
+
Et(i), u = o.TOUCH_DOLLY_PAN;
|
2785
2794
|
break;
|
2786
|
-
case
|
2795
|
+
case Le.DOLLY_ROTATE:
|
2787
2796
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2788
2797
|
return;
|
2789
|
-
|
2798
|
+
rt(i), u = o.TOUCH_DOLLY_ROTATE;
|
2790
2799
|
break;
|
2791
2800
|
default:
|
2792
2801
|
u = o.NONE;
|
@@ -2795,7 +2804,7 @@ class pr extends Kt {
|
|
2795
2804
|
default:
|
2796
2805
|
u = o.NONE;
|
2797
2806
|
}
|
2798
|
-
u !== o.NONE && e.dispatchEvent(
|
2807
|
+
u !== o.NONE && e.dispatchEvent(Ot);
|
2799
2808
|
}
|
2800
2809
|
function ut(i) {
|
2801
2810
|
switch (qe(i), u) {
|
@@ -2812,7 +2821,7 @@ class pr extends Kt {
|
|
2812
2821
|
case o.TOUCH_DOLLY_PAN:
|
2813
2822
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2814
2823
|
return;
|
2815
|
-
|
2824
|
+
ke(i), e.update();
|
2816
2825
|
break;
|
2817
2826
|
case o.TOUCH_DOLLY_ROTATE:
|
2818
2827
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
@@ -2823,33 +2832,33 @@ class pr extends Kt {
|
|
2823
2832
|
u = o.NONE;
|
2824
2833
|
}
|
2825
2834
|
}
|
2826
|
-
function
|
2835
|
+
function ve(i) {
|
2827
2836
|
e.enabled !== !1 && i.preventDefault();
|
2828
2837
|
}
|
2829
|
-
function
|
2830
|
-
|
2838
|
+
function wt(i) {
|
2839
|
+
Y.push(i.pointerId);
|
2831
2840
|
}
|
2832
2841
|
function dt(i) {
|
2833
|
-
delete
|
2834
|
-
for (let
|
2835
|
-
if (
|
2836
|
-
|
2842
|
+
delete fe[i.pointerId];
|
2843
|
+
for (let E = 0; E < Y.length; E++)
|
2844
|
+
if (Y[E] == i.pointerId) {
|
2845
|
+
Y.splice(E, 1);
|
2837
2846
|
return;
|
2838
2847
|
}
|
2839
2848
|
}
|
2840
2849
|
function qe(i) {
|
2841
|
-
let
|
2842
|
-
|
2850
|
+
let E = fe[i.pointerId];
|
2851
|
+
E === void 0 && (E = new oe(), fe[i.pointerId] = E), E.set(i.pageX, i.pageY);
|
2843
2852
|
}
|
2844
|
-
function
|
2845
|
-
const
|
2846
|
-
return
|
2853
|
+
function ue(i) {
|
2854
|
+
const E = i.pointerId === Y[0] ? Y[1] : Y[0];
|
2855
|
+
return fe[E];
|
2847
2856
|
}
|
2848
|
-
e.domElement.addEventListener("contextmenu",
|
2857
|
+
e.domElement.addEventListener("contextmenu", ve), e.domElement.addEventListener("pointerdown", He), e.domElement.addEventListener("pointercancel", Ce), e.domElement.addEventListener("wheel", ct, { passive: !1 }), this.update();
|
2849
2858
|
}
|
2850
2859
|
}
|
2851
|
-
const
|
2852
|
-
const [n, a] =
|
2860
|
+
const _t = (t) => {
|
2861
|
+
const [n, a] = ne(!1), [e, o] = ne(t.options[t.index]), u = () => {
|
2853
2862
|
a(!n);
|
2854
2863
|
}, c = (s) => {
|
2855
2864
|
s !== e && (t.onSelect(s), o(s)), a(!1);
|
@@ -2858,242 +2867,257 @@ const Rt = (t) => {
|
|
2858
2867
|
/* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: u, children: e }),
|
2859
2868
|
n && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => c(s), children: s }, s)) })
|
2860
2869
|
] });
|
2861
|
-
}, Te =
|
2870
|
+
}, Te = $n(function(n, a) {
|
2862
2871
|
const e = n.options.indexOf(n.camera.name);
|
2863
2872
|
return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
|
2864
2873
|
/* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable" }),
|
2865
|
-
/* @__PURE__ */ l.jsx(
|
2874
|
+
/* @__PURE__ */ l.jsx(_t, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
|
2866
2875
|
] });
|
2867
|
-
}),
|
2876
|
+
}), Xt = [
|
2868
2877
|
"Single",
|
2869
2878
|
"Side by Side",
|
2870
2879
|
"Stacked",
|
2871
2880
|
"Quad"
|
2872
|
-
],
|
2873
|
-
|
2874
|
-
|
2875
|
-
|
2876
|
-
"Right",
|
2877
|
-
"Front",
|
2878
|
-
"Back",
|
2879
|
-
"Orthographic",
|
2880
|
-
"Debug"
|
2881
|
-
];
|
2882
|
-
function Me(t, n) {
|
2883
|
-
const a = new Zt(-100, 100, 100, -100, 50, 3e3);
|
2884
|
-
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), H.set(t, a), a;
|
2881
|
+
], X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map();
|
2882
|
+
function Re(t, n) {
|
2883
|
+
const a = new en(-100, 100, 100, -100, 50, 3e3);
|
2884
|
+
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), X.set(t, a), a;
|
2885
2885
|
}
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
2892
|
-
|
2893
|
-
const
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
|
2898
|
-
const
|
2899
|
-
"
|
2886
|
+
Re("Top", new L(0, 1e3, 0));
|
2887
|
+
Re("Bottom", new L(0, -1e3, 0));
|
2888
|
+
Re("Left", new L(-1e3, 0, 0));
|
2889
|
+
Re("Right", new L(1e3, 0, 0));
|
2890
|
+
Re("Front", new L(0, 0, 1e3));
|
2891
|
+
Re("Back", new L(0, 0, -1e3));
|
2892
|
+
Re("Orthographic", new L(1e3, 1e3, 1e3));
|
2893
|
+
const vt = new Tt(60, 1, 50, 3e3);
|
2894
|
+
vt.name = "Debug";
|
2895
|
+
vt.position.set(500, 500, 500);
|
2896
|
+
vt.lookAt(0, 0, 0);
|
2897
|
+
X.set("Debug", vt);
|
2898
|
+
const qt = [
|
2899
|
+
"Renderer",
|
2900
|
+
"Depth",
|
2900
2901
|
"Normals",
|
2901
|
-
"
|
2902
|
-
"
|
2903
|
-
],
|
2902
|
+
"UVs",
|
2903
|
+
"Wireframe"
|
2904
|
+
], Ma = new _n(), Pa = new kn(), ja = new da(), _a = new Dn({
|
2904
2905
|
opacity: 0.33,
|
2905
2906
|
transparent: !0,
|
2906
2907
|
wireframe: !0
|
2907
|
-
})
|
2908
|
-
let
|
2909
|
-
const
|
2910
|
-
|
2911
|
-
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
2916
|
-
|
2917
|
-
|
2918
|
-
|
2908
|
+
});
|
2909
|
+
let mt = "Renderer";
|
2910
|
+
const A = new tn();
|
2911
|
+
A.name = "Debug Scene";
|
2912
|
+
let tt = new tn();
|
2913
|
+
A.add(tt);
|
2914
|
+
const ka = new ca();
|
2915
|
+
A.add(ka);
|
2916
|
+
const dn = new An(500);
|
2917
|
+
dn.name = "axisHelper";
|
2918
|
+
A.add(dn);
|
2919
|
+
let G = X.get("Debug"), te = X.get("Orthographic"), Fe = X.get("Front"), Ue = X.get("Top");
|
2920
|
+
function Za(t) {
|
2921
|
+
const [n, a] = ne(t.mode !== void 0 ? t.mode : "Quad"), [e, o] = ne(null), u = ye(null), c = ye(null), s = ye(null), d = ye(null), p = ye(null), h = (m, v) => {
|
2922
|
+
const y = H.get(m.name);
|
2923
|
+
y !== void 0 && y.dispose(), H.delete(m.name);
|
2924
|
+
const w = me.get(m.name);
|
2925
|
+
w !== void 0 && (A.remove(w), w.dispose()), me.delete(m.name);
|
2926
|
+
const F = new Ra(m, v);
|
2927
|
+
switch (F.enableDamping = !0, F.dampingFactor = 0.05, m.name) {
|
2919
2928
|
case "Top":
|
2920
2929
|
case "Bottom":
|
2921
2930
|
case "Left":
|
2922
2931
|
case "Right":
|
2923
2932
|
case "Front":
|
2924
2933
|
case "Back":
|
2925
|
-
|
2934
|
+
F.enableRotate = !1;
|
2926
2935
|
break;
|
2927
2936
|
}
|
2928
|
-
if (
|
2929
|
-
const
|
2930
|
-
|
2931
|
-
}
|
2932
|
-
},
|
2933
|
-
const
|
2934
|
-
|
2935
|
-
const
|
2936
|
-
|
2937
|
-
},
|
2938
|
-
|
2939
|
-
|
2940
|
-
const
|
2941
|
-
|
2942
|
-
}),
|
2943
|
-
},
|
2937
|
+
if (H.set(m.name, F), m instanceof Tt) {
|
2938
|
+
const V = new Nn(m);
|
2939
|
+
me.set(m.name, V), A.add(V);
|
2940
|
+
}
|
2941
|
+
}, b = (m) => {
|
2942
|
+
const v = me.get(m.name);
|
2943
|
+
v !== void 0 && (A.remove(v), v.dispose(), me.delete(m.name));
|
2944
|
+
const y = H.get(m.name);
|
2945
|
+
y !== void 0 && (y.dispose(), H.delete(m.name));
|
2946
|
+
}, x = () => {
|
2947
|
+
H.forEach((m, v) => {
|
2948
|
+
m.dispose();
|
2949
|
+
const y = me.get(v);
|
2950
|
+
y !== void 0 && (A.remove(y), y.dispose()), me.delete(v), H.delete(v);
|
2951
|
+
}), H.clear(), me.clear();
|
2952
|
+
}, S = () => {
|
2944
2953
|
switch (n) {
|
2945
2954
|
case "Single":
|
2946
|
-
|
2955
|
+
h(G, c.current);
|
2947
2956
|
break;
|
2948
2957
|
case "Side by Side":
|
2949
2958
|
case "Stacked":
|
2950
|
-
|
2959
|
+
h(G, c.current), h(te, s.current);
|
2951
2960
|
break;
|
2952
2961
|
case "Quad":
|
2953
|
-
|
2962
|
+
h(G, c.current), h(te, s.current), h(Fe, d.current), h(Ue, p.current);
|
2954
2963
|
break;
|
2955
2964
|
}
|
2956
2965
|
};
|
2957
|
-
|
2958
|
-
|
2959
|
-
|
2960
|
-
|
2961
|
-
|
2962
|
-
|
2963
|
-
}, []),
|
2964
|
-
const
|
2965
|
-
|
2966
|
-
|
2967
|
-
|
2968
|
-
|
2966
|
+
Be(() => {
|
2967
|
+
const m = new In({
|
2968
|
+
canvas: u.current,
|
2969
|
+
stencil: !1
|
2970
|
+
});
|
2971
|
+
m.autoClear = !1, m.shadowMap.enabled = !0, m.setPixelRatio(devicePixelRatio), m.setClearColor(0), o(m);
|
2972
|
+
}, []), Be(() => {
|
2973
|
+
const m = () => {
|
2974
|
+
on(tt), A.remove(tt), t.three.scene !== void 0 && (tt = t.three.scene, A.add(tt));
|
2975
|
+
};
|
2976
|
+
return I.addEventListener(N.SET_SCENE, m), () => {
|
2977
|
+
I.removeEventListener(N.SET_SCENE, m);
|
2978
|
+
};
|
2979
|
+
}, []), Be(() => {
|
2980
|
+
if (e === null)
|
2981
|
+
return;
|
2982
|
+
let m = window.innerWidth, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), F = -1;
|
2983
|
+
const V = () => {
|
2984
|
+
m = window.innerWidth - 300, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), e.setSize(m, v);
|
2985
|
+
let j = m, D = v;
|
2969
2986
|
switch (n) {
|
2970
2987
|
case "Side by Side":
|
2971
|
-
|
2988
|
+
j = y, D = v;
|
2972
2989
|
break;
|
2973
2990
|
case "Stacked":
|
2974
|
-
|
2991
|
+
j = m, D = w;
|
2975
2992
|
break;
|
2976
2993
|
case "Quad":
|
2977
|
-
|
2994
|
+
j = y, D = w;
|
2978
2995
|
break;
|
2979
2996
|
}
|
2980
|
-
|
2981
|
-
var
|
2982
|
-
|
2997
|
+
X.forEach((z) => {
|
2998
|
+
var ce;
|
2999
|
+
z instanceof en ? (z.left = j / -2, z.right = j / 2, z.top = D / 2, z.bottom = D / -2, z.updateProjectionMatrix()) : z instanceof Tt && (z.aspect = j / D, z.updateProjectionMatrix(), (ce = me.get(z.name)) == null || ce.update());
|
2983
3000
|
});
|
2984
|
-
},
|
2985
|
-
|
2986
|
-
},
|
3001
|
+
}, Z = () => {
|
3002
|
+
e.setViewport(0, 0, m, v), e.setScissor(0, 0, m, v), e.render(A, G);
|
3003
|
+
}, se = () => {
|
2987
3004
|
if (n === "Side by Side")
|
2988
|
-
|
3005
|
+
e.setViewport(0, 0, y, v), e.setScissor(0, 0, y, v), e.render(A, G), e.setViewport(y, 0, y, v), e.setScissor(y, 0, y, v), e.render(A, te);
|
2989
3006
|
else {
|
2990
|
-
const
|
2991
|
-
|
3007
|
+
const j = v - w;
|
3008
|
+
e.setViewport(0, j, m, w), e.setScissor(0, j, m, w), e.render(A, G), e.setViewport(0, 0, m, w), e.setScissor(0, 0, m, w), e.render(A, te);
|
2992
3009
|
}
|
2993
|
-
},
|
2994
|
-
let
|
2995
|
-
|
2996
|
-
},
|
2997
|
-
switch (
|
2998
|
-
|
2999
|
-
}),
|
3010
|
+
}, Y = () => {
|
3011
|
+
let j = 0, D = 0;
|
3012
|
+
D = v - w, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, G), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, te), D = 0, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Fe), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Ue);
|
3013
|
+
}, fe = () => {
|
3014
|
+
switch (H.forEach((j) => {
|
3015
|
+
j.update();
|
3016
|
+
}), e.clear(), n) {
|
3000
3017
|
case "Single":
|
3001
|
-
|
3018
|
+
Z();
|
3002
3019
|
break;
|
3003
3020
|
case "Side by Side":
|
3004
3021
|
case "Stacked":
|
3005
|
-
|
3022
|
+
se();
|
3006
3023
|
break;
|
3007
3024
|
case "Quad":
|
3008
|
-
|
3025
|
+
Y();
|
3009
3026
|
break;
|
3010
3027
|
}
|
3011
|
-
|
3028
|
+
F = requestAnimationFrame(fe);
|
3012
3029
|
};
|
3013
|
-
return
|
3014
|
-
window.removeEventListener("resize",
|
3030
|
+
return S(), window.addEventListener("resize", V), V(), fe(), () => {
|
3031
|
+
window.removeEventListener("resize", V), cancelAnimationFrame(F), F = -1;
|
3015
3032
|
};
|
3016
|
-
}, [n
|
3017
|
-
|
3033
|
+
}, [n, e]);
|
3034
|
+
const O = [];
|
3035
|
+
return X.forEach((m, v) => {
|
3036
|
+
O.push(v);
|
3018
3037
|
}), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
|
3038
|
+
/* @__PURE__ */ l.jsx("canvas", { ref: u }),
|
3019
3039
|
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
|
3020
|
-
n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Te, { camera:
|
3021
|
-
var
|
3022
|
-
(
|
3023
|
-
const
|
3024
|
-
|
3040
|
+
n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
|
3041
|
+
var y;
|
3042
|
+
(y = H.get(G.name)) == null || y.dispose();
|
3043
|
+
const v = X.get(m);
|
3044
|
+
v !== void 0 && (b(G), G = v, h(v, c.current));
|
3025
3045
|
} }) }),
|
3026
3046
|
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3027
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3028
|
-
var
|
3029
|
-
(
|
3030
|
-
const
|
3031
|
-
|
3047
|
+
/* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
|
3048
|
+
var y;
|
3049
|
+
(y = H.get(G.name)) == null || y.dispose();
|
3050
|
+
const v = X.get(m);
|
3051
|
+
v !== void 0 && (b(G), G = v, h(v, c.current));
|
3032
3052
|
} }),
|
3033
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3034
|
-
var
|
3035
|
-
(
|
3036
|
-
const
|
3037
|
-
|
3053
|
+
/* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
|
3054
|
+
var y;
|
3055
|
+
(y = H.get(te.name)) == null || y.dispose();
|
3056
|
+
const v = X.get(m);
|
3057
|
+
v !== void 0 && (b(te), te = v, h(v, s.current));
|
3038
3058
|
} })
|
3039
3059
|
] }),
|
3040
3060
|
n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3041
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3042
|
-
var
|
3043
|
-
(
|
3044
|
-
const
|
3045
|
-
|
3061
|
+
/* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
|
3062
|
+
var y;
|
3063
|
+
(y = H.get(G.name)) == null || y.dispose();
|
3064
|
+
const v = X.get(m);
|
3065
|
+
v !== void 0 && (b(G), G = v, h(v, c.current));
|
3046
3066
|
} }),
|
3047
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3048
|
-
var
|
3049
|
-
(
|
3050
|
-
const
|
3051
|
-
|
3067
|
+
/* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
|
3068
|
+
var y;
|
3069
|
+
(y = H.get(te.name)) == null || y.dispose();
|
3070
|
+
const v = X.get(m);
|
3071
|
+
v !== void 0 && (b(te), te = v, h(v, s.current));
|
3052
3072
|
} }),
|
3053
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3054
|
-
var
|
3055
|
-
(
|
3056
|
-
const
|
3057
|
-
|
3073
|
+
/* @__PURE__ */ l.jsx(Te, { camera: Fe, options: O, ref: d, onSelect: (m) => {
|
3074
|
+
var y;
|
3075
|
+
(y = H.get(Fe.name)) == null || y.dispose();
|
3076
|
+
const v = X.get(m);
|
3077
|
+
v !== void 0 && (b(Fe), Fe = v, h(v, d.current));
|
3058
3078
|
} }),
|
3059
|
-
/* @__PURE__ */ l.jsx(Te, { camera:
|
3060
|
-
var
|
3061
|
-
(
|
3062
|
-
const
|
3063
|
-
|
3079
|
+
/* @__PURE__ */ l.jsx(Te, { camera: Ue, options: O, ref: p, onSelect: (m) => {
|
3080
|
+
var y;
|
3081
|
+
(y = H.get(Ue.name)) == null || y.dispose();
|
3082
|
+
const v = X.get(m);
|
3083
|
+
v !== void 0 && (b(Ue), Ue = v, h(v, p.current));
|
3064
3084
|
} })
|
3065
3085
|
] })
|
3066
3086
|
] }),
|
3067
3087
|
/* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
|
3068
3088
|
/* @__PURE__ */ l.jsx(
|
3069
|
-
|
3089
|
+
_t,
|
3070
3090
|
{
|
3071
|
-
index:
|
3072
|
-
options:
|
3073
|
-
onSelect: (
|
3074
|
-
|
3091
|
+
index: Xt.indexOf(n),
|
3092
|
+
options: Xt,
|
3093
|
+
onSelect: (m) => {
|
3094
|
+
m !== n && (x(), a(m));
|
3075
3095
|
}
|
3076
3096
|
}
|
3077
3097
|
),
|
3078
3098
|
/* @__PURE__ */ l.jsx(
|
3079
|
-
|
3099
|
+
_t,
|
3080
3100
|
{
|
3081
|
-
index:
|
3082
|
-
options:
|
3083
|
-
onSelect: (
|
3084
|
-
if (
|
3085
|
-
switch (
|
3086
|
-
case "
|
3087
|
-
|
3101
|
+
index: qt.indexOf(mt),
|
3102
|
+
options: qt,
|
3103
|
+
onSelect: (m) => {
|
3104
|
+
if (m !== mt)
|
3105
|
+
switch (mt = m, mt) {
|
3106
|
+
case "Depth":
|
3107
|
+
A.overrideMaterial = Ma;
|
3088
3108
|
break;
|
3089
3109
|
case "Normals":
|
3090
|
-
|
3110
|
+
A.overrideMaterial = Pa;
|
3111
|
+
break;
|
3112
|
+
default:
|
3113
|
+
case "Renderer":
|
3114
|
+
A.overrideMaterial = null;
|
3091
3115
|
break;
|
3092
3116
|
case "Wireframe":
|
3093
|
-
|
3117
|
+
A.overrideMaterial = _a;
|
3094
3118
|
break;
|
3095
3119
|
case "UVs":
|
3096
|
-
|
3120
|
+
A.overrideMaterial = ja;
|
3097
3121
|
break;
|
3098
3122
|
}
|
3099
3123
|
}
|
@@ -3102,7 +3126,7 @@ function Nr(t) {
|
|
3102
3126
|
] })
|
3103
3127
|
] });
|
3104
3128
|
}
|
3105
|
-
function
|
3129
|
+
function Ja(t) {
|
3106
3130
|
return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3107
3131
|
/* @__PURE__ */ l.jsx("header", { children: t.header }),
|
3108
3132
|
t.children,
|
@@ -3110,34 +3134,40 @@ function Lr(t) {
|
|
3110
3134
|
] });
|
3111
3135
|
}
|
3112
3136
|
export {
|
3113
|
-
|
3114
|
-
|
3115
|
-
|
3116
|
-
|
3117
|
-
|
3118
|
-
|
3119
|
-
|
3120
|
-
|
3121
|
-
|
3122
|
-
|
3123
|
-
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
|
3132
|
-
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3142
|
-
|
3137
|
+
jt as Accordion,
|
3138
|
+
Va as Application,
|
3139
|
+
gt as BaseRemote,
|
3140
|
+
un as ChildObject,
|
3141
|
+
fa as ContainerObject,
|
3142
|
+
na as Draggable,
|
3143
|
+
ta as DraggableItem,
|
3144
|
+
aa as Dropdown,
|
3145
|
+
ra as DropdownItem,
|
3146
|
+
Ja as Editor,
|
3147
|
+
ca as InfiniteGridHelper,
|
3148
|
+
Oa as Inspector,
|
3149
|
+
Za as MultiView,
|
3150
|
+
ln as NavButton,
|
3151
|
+
Ya as RemoteComponents,
|
3152
|
+
Ka as RemoteController,
|
3153
|
+
za as RemoteTheatre,
|
3154
|
+
Wa as RemoteThree,
|
3155
|
+
Ha as RemoteTweakpane,
|
3156
|
+
Xa as SceneHierarchy,
|
3157
|
+
qa as SceneInspector,
|
3158
|
+
N as ToolEvents,
|
3159
|
+
da as UVMaterial,
|
3160
|
+
Ba as clamp,
|
3161
|
+
Yn as colorToHex,
|
3162
|
+
I as debugDispatcher,
|
3163
|
+
on as dispose,
|
3164
|
+
Wn as disposeMaterial,
|
3165
|
+
Ga as disposeTexture,
|
3166
|
+
$a as distance,
|
3167
|
+
rn as hierarchyUUID,
|
3168
|
+
Vn as isColor,
|
3169
|
+
Gn as randomID,
|
3170
|
+
zn as resetThreeObjects,
|
3171
|
+
Ct as round,
|
3172
|
+
Rt as totalThreeObjects
|
3143
3173
|
};
|