@tomorrowevening/hermes 0.0.4 → 0.0.6
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 +760 -739
- package/dist/hermes.umd.cjs +14 -14
- package/package.json +9 -8
- package/src/core/RemoteController.ts +3 -4
- package/src/core/remote/RemoteThree.ts +2 -0
- package/src/index.ts +1 -0
- package/types/index.d.ts +1 -0
- package/dist/images/android-chrome-192x192.png +0 -0
- package/dist/images/android-chrome-512x512.png +0 -0
- package/dist/images/apple-touch-icon.png +0 -0
- package/dist/images/favicon-16x16.png +0 -0
- package/dist/images/favicon-32x32.png +0 -0
- package/dist/images/favicon.ico +0 -0
- package/dist/images/milkyWay/dark-s_nx.jpg +0 -0
- package/dist/images/milkyWay/dark-s_ny.jpg +0 -0
- package/dist/images/milkyWay/dark-s_nz.jpg +0 -0
- package/dist/images/milkyWay/dark-s_px.jpg +0 -0
- package/dist/images/milkyWay/dark-s_py.jpg +0 -0
- package/dist/images/milkyWay/dark-s_pz.jpg +0 -0
- package/dist/images/site.webmanifest +0 -1
- package/dist/images/uv_grid_opengl.jpg +0 -0
- package/dist/index-0a798fe4.js +0 -6862
- package/dist/index-7bad599d.css +0 -1
- package/dist/index.html +0 -18
- package/dist/models/Flair.fbx +0 -0
- package/dist/models/Thriller2.fbx +0 -0
- package/dist/models/Thriller4.fbx +0 -0
- package/src/example/CustomEditor.tsx +0 -40
- package/src/example/components/App.css +0 -6
- package/src/example/components/App.tsx +0 -164
- package/src/example/constants.ts +0 -44
- package/src/example/index.scss +0 -37
- package/src/example/main.tsx +0 -35
- package/src/example/three/CustomMaterial.ts +0 -58
- package/src/example/three/ExampleScene.ts +0 -176
- package/src/example/three/FBXAnimation.ts +0 -39
- package/src/vite-env.d.ts +0 -1
- package/types/example/CustomEditor.d.ts +0 -1
- package/types/example/components/App.d.ts +0 -3
- package/types/example/constants.d.ts +0 -15
- package/types/example/main.d.ts +0 -1
- package/types/example/three/CustomMaterial.d.ts +0 -5
- package/types/example/three/ExampleScene.d.ts +0 -18
- package/types/example/three/FBXAnimation.d.ts +0 -6
package/dist/hermes.js
CHANGED
@@ -1,14 +1,43 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var $ = (t, n, r) => (
|
4
|
-
import { EventDispatcher as
|
5
|
-
import { getProject as
|
6
|
-
import { Pane as
|
7
|
-
import * as
|
8
|
-
import
|
9
|
-
import { Reorder as
|
1
|
+
var sn = Object.defineProperty;
|
2
|
+
var cn = (t, n, r) => n in t ? sn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
|
3
|
+
var $ = (t, n, r) => (cn(t, typeof n != "symbol" ? n + "" : n, r), r);
|
4
|
+
import { EventDispatcher as Yt, Mesh as Vt, Camera as ln, PerspectiveCamera as lt, OrthographicCamera as Ct, Light as un, Texture as zt, CubeTexture as dn, RepeatWrapping as jt, Color as St, Matrix4 as fn, Vector3 as G, Euler as hn, Ray as mn, Plane as pn, MathUtils as gn, MOUSE as De, TOUCH as _e, Quaternion as Mt, Spherical as kt, Vector2 as ae, ShaderMaterial as vn, GLSL3 as bn, DoubleSide as yn, PlaneGeometry as En, MeshNormalMaterial as wn, MeshBasicMaterial as xn, Scene as Cn, AxesHelper as Sn, CameraHelper as On } from "three";
|
5
|
+
import { getProject as Tn } from "@theatre/core";
|
6
|
+
import { Pane as Pn } from "tweakpane";
|
7
|
+
import * as Rn from "@tweakpane/plugin-essentials";
|
8
|
+
import Wt, { useState as re, useRef as Se, useEffect as qe, Component as jn, forwardRef as Mn } from "react";
|
9
|
+
import { Reorder as Ht } from "framer-motion";
|
10
10
|
import We from "@theatre/studio";
|
11
|
-
|
11
|
+
function ya(t, n, r) {
|
12
|
+
return Math.min(n, Math.max(t, r));
|
13
|
+
}
|
14
|
+
function Ea(t, n) {
|
15
|
+
const r = t - n;
|
16
|
+
return Math.sqrt(r * r);
|
17
|
+
}
|
18
|
+
function kn() {
|
19
|
+
return Math.round(Math.random() * 1e6).toString();
|
20
|
+
}
|
21
|
+
function Dn(t) {
|
22
|
+
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
23
|
+
}
|
24
|
+
function _n(t) {
|
25
|
+
const n = Math.round(t.r * 255), r = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (u) => {
|
26
|
+
const h = u.toString(16);
|
27
|
+
return h.length === 1 ? "0" + h : h;
|
28
|
+
}, l = i(n), c = i(r), s = i(e);
|
29
|
+
return "#" + l + c + s;
|
30
|
+
}
|
31
|
+
let Dt = 0;
|
32
|
+
const Kt = (t) => {
|
33
|
+
if (!t)
|
34
|
+
return;
|
35
|
+
let n = t.name.replace(" ", "");
|
36
|
+
n.length === 0 && (n = `obj_${Dt}`), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, Dt++, t.children.forEach((r) => {
|
37
|
+
Kt(r);
|
38
|
+
});
|
39
|
+
};
|
40
|
+
class wa {
|
12
41
|
constructor(n, r, e) {
|
13
42
|
$(this, "channel");
|
14
43
|
$(this, "components", /* @__PURE__ */ new Map());
|
@@ -44,7 +73,7 @@ class va {
|
|
44
73
|
n && (this._mode = "editor", document.title += " - Editor");
|
45
74
|
}
|
46
75
|
}
|
47
|
-
const I = new
|
76
|
+
const I = new Yt(), N = {
|
48
77
|
CUSTOM: "ToolEvents::custom",
|
49
78
|
// Components
|
50
79
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -66,7 +95,7 @@ class ut {
|
|
66
95
|
dispose() {
|
67
96
|
}
|
68
97
|
}
|
69
|
-
class
|
98
|
+
class xa extends ut {
|
70
99
|
selectDropdown(n, r) {
|
71
100
|
this.app.send({
|
72
101
|
event: "selectComponent",
|
@@ -88,22 +117,9 @@ class ba extends ut {
|
|
88
117
|
});
|
89
118
|
}
|
90
119
|
}
|
91
|
-
|
92
|
-
return Math.round(Math.random() * 1e6).toString();
|
93
|
-
}
|
94
|
-
function Mn(t) {
|
95
|
-
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
96
|
-
}
|
97
|
-
function kn(t) {
|
98
|
-
const n = Math.round(t.r * 255), r = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (c) => {
|
99
|
-
const f = c.toString(16);
|
100
|
-
return f.length === 1 ? "0" + f : f;
|
101
|
-
}, l = i(n), h = i(r), s = i(e);
|
102
|
-
return "#" + l + h + s;
|
103
|
-
}
|
104
|
-
const Ht = () => {
|
120
|
+
const Xt = () => {
|
105
121
|
};
|
106
|
-
class
|
122
|
+
class Ca extends ut {
|
107
123
|
constructor(r, e, i) {
|
108
124
|
super(r);
|
109
125
|
$(this, "project");
|
@@ -111,7 +127,7 @@ class ya extends ut {
|
|
111
127
|
$(this, "sheetObjects");
|
112
128
|
$(this, "sheetObjectCBs");
|
113
129
|
$(this, "sheetObjectUnsubscribe");
|
114
|
-
this.project =
|
130
|
+
this.project = Tn(e, i), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
115
131
|
}
|
116
132
|
dispose() {
|
117
133
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
@@ -130,19 +146,19 @@ class ya extends ut {
|
|
130
146
|
console.error("Theatre Project hasn't been created yet.");
|
131
147
|
return;
|
132
148
|
}
|
133
|
-
const
|
134
|
-
if (
|
149
|
+
const c = this.sheets.get(r);
|
150
|
+
if (c === void 0)
|
135
151
|
return;
|
136
152
|
const s = `${r}_${e}`;
|
137
|
-
let
|
138
|
-
if (
|
139
|
-
return
|
140
|
-
|
141
|
-
const
|
153
|
+
let u = this.sheetObjects.get(s);
|
154
|
+
if (u !== void 0)
|
155
|
+
return u = c.object(e, { ...i, ...u.value }, { reconfigure: !0 }), u;
|
156
|
+
u = c.object(e, i), this.sheetObjects.set(s, u), this.sheetObjectCBs.set(s, l !== void 0 ? l : Xt);
|
157
|
+
const h = u.onValuesChange((m) => {
|
142
158
|
if (this.app.editor) {
|
143
|
-
for (const
|
144
|
-
const E = m[
|
145
|
-
typeof E == "object" &&
|
159
|
+
for (const g in m) {
|
160
|
+
const E = m[g];
|
161
|
+
typeof E == "object" && Dn(E) && (m[g] = {
|
146
162
|
r: E.r,
|
147
163
|
g: E.g,
|
148
164
|
b: E.b,
|
@@ -158,11 +174,11 @@ class ya extends ut {
|
|
158
174
|
}
|
159
175
|
});
|
160
176
|
} else {
|
161
|
-
const
|
162
|
-
|
177
|
+
const g = this.sheetObjectCBs.get(s);
|
178
|
+
g !== void 0 && g(m);
|
163
179
|
}
|
164
180
|
});
|
165
|
-
return this.sheetObjectUnsubscribe.set(s,
|
181
|
+
return this.sheetObjectUnsubscribe.set(s, h), u;
|
166
182
|
}
|
167
183
|
unsubscribe(r) {
|
168
184
|
if (this.project === void 0) {
|
@@ -173,7 +189,7 @@ class ya extends ut {
|
|
173
189
|
i !== void 0 && i();
|
174
190
|
}
|
175
191
|
}
|
176
|
-
function
|
192
|
+
function An(t) {
|
177
193
|
if (t.name === "cameras")
|
178
194
|
return "camera";
|
179
195
|
if (t.name === "interactive")
|
@@ -187,7 +203,7 @@ function Dn(t) {
|
|
187
203
|
const n = t.type;
|
188
204
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
189
205
|
}
|
190
|
-
function
|
206
|
+
function qt(t) {
|
191
207
|
const n = {
|
192
208
|
name: t.name,
|
193
209
|
type: t.type,
|
@@ -195,10 +211,10 @@ function Kt(t) {
|
|
195
211
|
children: []
|
196
212
|
};
|
197
213
|
return t.children.forEach((r) => {
|
198
|
-
n.children.push(
|
214
|
+
n.children.push(qt(r));
|
199
215
|
}), n;
|
200
216
|
}
|
201
|
-
function
|
217
|
+
function In(t) {
|
202
218
|
const n = {};
|
203
219
|
for (const r in t) {
|
204
220
|
const e = t[r].value;
|
@@ -206,7 +222,7 @@ function _n(t) {
|
|
206
222
|
}
|
207
223
|
return n;
|
208
224
|
}
|
209
|
-
function
|
225
|
+
function Nn(t) {
|
210
226
|
switch (t) {
|
211
227
|
case "blendSrcAlpha":
|
212
228
|
case "blendDstAlpha":
|
@@ -218,10 +234,10 @@ function An(t) {
|
|
218
234
|
}
|
219
235
|
return !1;
|
220
236
|
}
|
221
|
-
function
|
237
|
+
function _t(t) {
|
222
238
|
const n = {};
|
223
239
|
for (const r in t) {
|
224
|
-
if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" ||
|
240
|
+
if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" || Nn(r))
|
225
241
|
continue;
|
226
242
|
const e = typeof t[r], i = t[r];
|
227
243
|
switch (e) {
|
@@ -233,13 +249,13 @@ function Dt(t) {
|
|
233
249
|
case "object":
|
234
250
|
if (i !== null)
|
235
251
|
if (n[r] = i, i.isTexture)
|
236
|
-
if (i instanceof
|
252
|
+
if (i instanceof zt) {
|
237
253
|
const l = i.source.toJSON();
|
238
254
|
n[r] = { src: l.url };
|
239
255
|
} else
|
240
|
-
i instanceof
|
256
|
+
i instanceof dn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[r] = { src: "" });
|
241
257
|
else
|
242
|
-
r === "uniforms" && (n[r] =
|
258
|
+
r === "uniforms" && (n[r] = In(n[r]));
|
243
259
|
else
|
244
260
|
n[r] = { src: "" };
|
245
261
|
break;
|
@@ -247,7 +263,7 @@ function Dt(t) {
|
|
247
263
|
}
|
248
264
|
return n;
|
249
265
|
}
|
250
|
-
function
|
266
|
+
function Ln(t) {
|
251
267
|
t.updateMatrix();
|
252
268
|
const n = {
|
253
269
|
name: t.name,
|
@@ -256,17 +272,17 @@ function In(t) {
|
|
256
272
|
visible: t.visible,
|
257
273
|
matrix: t.matrix.elements
|
258
274
|
};
|
259
|
-
if (t instanceof
|
275
|
+
if (t instanceof Vt) {
|
260
276
|
const r = t;
|
261
277
|
if (Array.isArray(r.material)) {
|
262
278
|
const e = [];
|
263
279
|
r.material.forEach((i) => {
|
264
|
-
e.push(
|
280
|
+
e.push(_t(i));
|
265
281
|
}), n.material = e;
|
266
282
|
} else
|
267
|
-
n.material =
|
283
|
+
n.material = _t(r.material);
|
268
284
|
} else
|
269
|
-
t instanceof
|
285
|
+
t instanceof ln ? t instanceof lt ? n.perspectiveCameraInfo = {
|
270
286
|
fov: t.fov,
|
271
287
|
zoom: t.zoom,
|
272
288
|
near: t.near,
|
@@ -283,7 +299,7 @@ function In(t) {
|
|
283
299
|
right: t.right,
|
284
300
|
top: t.top,
|
285
301
|
bottom: t.bottom
|
286
|
-
}) : t instanceof
|
302
|
+
}) : t instanceof un && (n.lightInfo = {
|
287
303
|
color: t.color,
|
288
304
|
intensity: t.intensity,
|
289
305
|
decay: t.decay,
|
@@ -318,12 +334,12 @@ function yt(t) {
|
|
318
334
|
return new Promise((n, r) => {
|
319
335
|
const e = new Image();
|
320
336
|
e.onload = () => {
|
321
|
-
const i = new
|
337
|
+
const i = new zt(e);
|
322
338
|
i.wrapS = jt, i.wrapT = jt, i.needsUpdate = !0, n(i);
|
323
339
|
}, e.onerror = r, e.src = t;
|
324
340
|
});
|
325
341
|
}
|
326
|
-
class
|
342
|
+
class Sa extends ut {
|
327
343
|
constructor() {
|
328
344
|
super(...arguments);
|
329
345
|
$(this, "scene");
|
@@ -336,7 +352,7 @@ class Ea extends ut {
|
|
336
352
|
});
|
337
353
|
}
|
338
354
|
setObject(r) {
|
339
|
-
const e =
|
355
|
+
const e = Ln(r);
|
340
356
|
this.app.send({
|
341
357
|
event: "setObject",
|
342
358
|
target: "editor",
|
@@ -383,8 +399,8 @@ class Ea extends ut {
|
|
383
399
|
});
|
384
400
|
}
|
385
401
|
setScene(r) {
|
386
|
-
this.scene = r;
|
387
|
-
const e =
|
402
|
+
this.scene = r, Kt(r);
|
403
|
+
const e = qt(r);
|
388
404
|
this.app.send({
|
389
405
|
event: "setScene",
|
390
406
|
target: "editor",
|
@@ -392,7 +408,7 @@ class Ea extends ut {
|
|
392
408
|
});
|
393
409
|
}
|
394
410
|
}
|
395
|
-
class
|
411
|
+
class Oa extends ut {
|
396
412
|
constructor(r) {
|
397
413
|
super(r);
|
398
414
|
$(this, "bindCBs");
|
@@ -404,7 +420,7 @@ class wa extends ut {
|
|
404
420
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), r.editor && this.createGUI();
|
405
421
|
}
|
406
422
|
createGUI() {
|
407
|
-
this.pane = new
|
423
|
+
this.pane = new Pn({ title: "GUI" }), this.pane.registerPlugin(Rn);
|
408
424
|
}
|
409
425
|
dispose() {
|
410
426
|
var r;
|
@@ -431,21 +447,21 @@ class wa extends ut {
|
|
431
447
|
}
|
432
448
|
// Binding
|
433
449
|
bind(r, e, i, l = void 0) {
|
434
|
-
const
|
435
|
-
this.bindCBs.set(
|
450
|
+
const c = this.bindID, s = i.onChange !== void 0 ? i.onChange : Xt;
|
451
|
+
this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (l !== void 0 ? l : this.pane).addBinding(r, e, i).on("change", (h) => {
|
436
452
|
this.app.send({
|
437
453
|
event: "updateBind",
|
438
454
|
target: "app",
|
439
455
|
data: {
|
440
|
-
id:
|
441
|
-
value:
|
456
|
+
id: c,
|
457
|
+
value: h.value
|
442
458
|
}
|
443
459
|
});
|
444
460
|
}), this.editorCallbacks++) : (this.app.send({
|
445
461
|
event: "bindObject",
|
446
462
|
target: "app",
|
447
463
|
data: {
|
448
|
-
id:
|
464
|
+
id: c,
|
449
465
|
name: e,
|
450
466
|
params: i,
|
451
467
|
parent: l
|
@@ -502,23 +518,23 @@ var Et = { exports: {} }, He = {};
|
|
502
518
|
* This source code is licensed under the MIT license found in the
|
503
519
|
* LICENSE file in the root directory of this source tree.
|
504
520
|
*/
|
505
|
-
var
|
506
|
-
function
|
507
|
-
if (
|
521
|
+
var At;
|
522
|
+
function Fn() {
|
523
|
+
if (At)
|
508
524
|
return He;
|
509
|
-
|
510
|
-
var t =
|
511
|
-
function
|
512
|
-
var m,
|
513
|
-
|
514
|
-
for (m in
|
515
|
-
e.call(
|
525
|
+
At = 1;
|
526
|
+
var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
527
|
+
function c(s, u, h) {
|
528
|
+
var m, g = {}, E = null, C = null;
|
529
|
+
h !== void 0 && (E = "" + h), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (C = u.ref);
|
530
|
+
for (m in u)
|
531
|
+
e.call(u, m) && !l.hasOwnProperty(m) && (g[m] = u[m]);
|
516
532
|
if (s && s.defaultProps)
|
517
|
-
for (m in
|
518
|
-
|
519
|
-
return { $$typeof: n, type: s, key: E, ref: C, props:
|
533
|
+
for (m in u = s.defaultProps, u)
|
534
|
+
g[m] === void 0 && (g[m] = u[m]);
|
535
|
+
return { $$typeof: n, type: s, key: E, ref: C, props: g, _owner: i.current };
|
520
536
|
}
|
521
|
-
return He.Fragment = r, He.jsx =
|
537
|
+
return He.Fragment = r, He.jsx = c, He.jsxs = c, He;
|
522
538
|
}
|
523
539
|
var Ke = {};
|
524
540
|
/**
|
@@ -530,49 +546,49 @@ var Ke = {};
|
|
530
546
|
* This source code is licensed under the MIT license found in the
|
531
547
|
* LICENSE file in the root directory of this source tree.
|
532
548
|
*/
|
533
|
-
var
|
534
|
-
function
|
535
|
-
return
|
536
|
-
var t =
|
549
|
+
var It;
|
550
|
+
function Un() {
|
551
|
+
return It || (It = 1, process.env.NODE_ENV !== "production" && function() {
|
552
|
+
var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, D = "@@iterator";
|
537
553
|
function y(a) {
|
538
554
|
if (a === null || typeof a != "object")
|
539
555
|
return null;
|
540
|
-
var
|
541
|
-
return typeof
|
556
|
+
var f = R && a[R] || a[D];
|
557
|
+
return typeof f == "function" ? f : null;
|
542
558
|
}
|
543
|
-
var
|
544
|
-
function
|
559
|
+
var b = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
560
|
+
function v(a) {
|
545
561
|
{
|
546
|
-
for (var
|
547
|
-
|
548
|
-
|
562
|
+
for (var f = arguments.length, p = new Array(f > 1 ? f - 1 : 0), x = 1; x < f; x++)
|
563
|
+
p[x - 1] = arguments[x];
|
564
|
+
O("error", a, p);
|
549
565
|
}
|
550
566
|
}
|
551
|
-
function
|
567
|
+
function O(a, f, p) {
|
552
568
|
{
|
553
|
-
var x =
|
554
|
-
|
555
|
-
var _ =
|
556
|
-
return String(
|
569
|
+
var x = b.ReactDebugCurrentFrame, k = x.getStackAddendum();
|
570
|
+
k !== "" && (f += "%s", p = p.concat([k]));
|
571
|
+
var _ = p.map(function(P) {
|
572
|
+
return String(P);
|
557
573
|
});
|
558
|
-
_.unshift("Warning: " +
|
574
|
+
_.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, _);
|
559
575
|
}
|
560
576
|
}
|
561
|
-
var j = !1, z = !1, ee = !1,
|
577
|
+
var j = !1, z = !1, ee = !1, T = !1, le = !1, Te;
|
562
578
|
Te = Symbol.for("react.module.reference");
|
563
579
|
function oe(a) {
|
564
|
-
return !!(typeof a == "string" || typeof a == "function" || a === e || a === l || le || a === i || a ===
|
580
|
+
return !!(typeof a == "string" || typeof a == "function" || a === e || a === l || le || a === i || a === h || a === m || T || a === C || j || z || ee || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === g || a.$$typeof === c || a.$$typeof === s || a.$$typeof === u || // This needs to include all possible module reference object
|
565
581
|
// types supported by any Flight configuration anywhere since
|
566
582
|
// we don't know which Flight build this will end up being used
|
567
583
|
// with.
|
568
584
|
a.$$typeof === Te || a.getModuleId !== void 0));
|
569
585
|
}
|
570
|
-
function M(a,
|
586
|
+
function M(a, f, p) {
|
571
587
|
var x = a.displayName;
|
572
588
|
if (x)
|
573
589
|
return x;
|
574
|
-
var
|
575
|
-
return
|
590
|
+
var k = f.displayName || f.name || "";
|
591
|
+
return k !== "" ? p + "(" + k + ")" : p;
|
576
592
|
}
|
577
593
|
function A(a) {
|
578
594
|
return a.displayName || "Context";
|
@@ -580,7 +596,7 @@ function Ln() {
|
|
580
596
|
function L(a) {
|
581
597
|
if (a == null)
|
582
598
|
return null;
|
583
|
-
if (typeof a.tag == "number" &&
|
599
|
+
if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
|
584
600
|
return a.displayName || a.name || null;
|
585
601
|
if (typeof a == "string")
|
586
602
|
return a;
|
@@ -593,7 +609,7 @@ function Ln() {
|
|
593
609
|
return "Profiler";
|
594
610
|
case i:
|
595
611
|
return "StrictMode";
|
596
|
-
case
|
612
|
+
case h:
|
597
613
|
return "Suspense";
|
598
614
|
case m:
|
599
615
|
return "SuspenseList";
|
@@ -601,20 +617,20 @@ function Ln() {
|
|
601
617
|
if (typeof a == "object")
|
602
618
|
switch (a.$$typeof) {
|
603
619
|
case s:
|
604
|
-
var
|
605
|
-
return A(
|
606
|
-
case h:
|
607
|
-
var g = a;
|
608
|
-
return A(g._context) + ".Provider";
|
620
|
+
var f = a;
|
621
|
+
return A(f) + ".Consumer";
|
609
622
|
case c:
|
623
|
+
var p = a;
|
624
|
+
return A(p._context) + ".Provider";
|
625
|
+
case u:
|
610
626
|
return M(a, a.render, "ForwardRef");
|
611
|
-
case
|
627
|
+
case g:
|
612
628
|
var x = a.displayName || null;
|
613
629
|
return x !== null ? x : L(a.type) || "Memo";
|
614
630
|
case E: {
|
615
|
-
var
|
631
|
+
var k = a, _ = k._payload, P = k._init;
|
616
632
|
try {
|
617
|
-
return L(
|
633
|
+
return L(P(_));
|
618
634
|
} catch {
|
619
635
|
return null;
|
620
636
|
}
|
@@ -681,17 +697,17 @@ function Ln() {
|
|
681
697
|
})
|
682
698
|
});
|
683
699
|
}
|
684
|
-
te < 0 &&
|
700
|
+
te < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
685
701
|
}
|
686
702
|
}
|
687
|
-
var Ue =
|
688
|
-
function pe(a,
|
703
|
+
var Ue = b.ReactCurrentDispatcher, Be;
|
704
|
+
function pe(a, f, p) {
|
689
705
|
{
|
690
706
|
if (Be === void 0)
|
691
707
|
try {
|
692
708
|
throw Error();
|
693
|
-
} catch (
|
694
|
-
var x =
|
709
|
+
} catch (k) {
|
710
|
+
var x = k.stack.trim().match(/\n( *(at )?)/);
|
695
711
|
Be = x && x[1] || "";
|
696
712
|
}
|
697
713
|
return `
|
@@ -703,43 +719,43 @@ function Ln() {
|
|
703
719
|
var mt = typeof WeakMap == "function" ? WeakMap : Map;
|
704
720
|
ge = new mt();
|
705
721
|
}
|
706
|
-
function Qe(a,
|
722
|
+
function Qe(a, f) {
|
707
723
|
if (!a || je)
|
708
724
|
return "";
|
709
725
|
{
|
710
|
-
var
|
711
|
-
if (
|
712
|
-
return
|
726
|
+
var p = ge.get(a);
|
727
|
+
if (p !== void 0)
|
728
|
+
return p;
|
713
729
|
}
|
714
730
|
var x;
|
715
731
|
je = !0;
|
716
|
-
var
|
732
|
+
var k = Error.prepareStackTrace;
|
717
733
|
Error.prepareStackTrace = void 0;
|
718
734
|
var _;
|
719
735
|
_ = Ue.current, Ue.current = null, ft();
|
720
736
|
try {
|
721
|
-
if (
|
722
|
-
var
|
737
|
+
if (f) {
|
738
|
+
var P = function() {
|
723
739
|
throw Error();
|
724
740
|
};
|
725
|
-
if (Object.defineProperty(
|
741
|
+
if (Object.defineProperty(P.prototype, "props", {
|
726
742
|
set: function() {
|
727
743
|
throw Error();
|
728
744
|
}
|
729
745
|
}), typeof Reflect == "object" && Reflect.construct) {
|
730
746
|
try {
|
731
|
-
Reflect.construct(
|
747
|
+
Reflect.construct(P, []);
|
732
748
|
} catch (se) {
|
733
749
|
x = se;
|
734
750
|
}
|
735
|
-
Reflect.construct(a, [],
|
751
|
+
Reflect.construct(a, [], P);
|
736
752
|
} else {
|
737
753
|
try {
|
738
|
-
|
754
|
+
P.call();
|
739
755
|
} catch (se) {
|
740
756
|
x = se;
|
741
757
|
}
|
742
|
-
a.call(
|
758
|
+
a.call(P.prototype);
|
743
759
|
}
|
744
760
|
} else {
|
745
761
|
try {
|
@@ -769,19 +785,19 @@ function Ln() {
|
|
769
785
|
}
|
770
786
|
}
|
771
787
|
} finally {
|
772
|
-
je = !1, Ue.current = _, ht(), Error.prepareStackTrace =
|
788
|
+
je = !1, Ue.current = _, ht(), Error.prepareStackTrace = k;
|
773
789
|
}
|
774
790
|
var ke = a ? a.displayName || a.name : "", Rt = ke ? pe(ke) : "";
|
775
791
|
return typeof a == "function" && ge.set(a, Rt), Rt;
|
776
792
|
}
|
777
|
-
function et(a,
|
793
|
+
function et(a, f, p) {
|
778
794
|
return Qe(a, !1);
|
779
795
|
}
|
780
796
|
function tt(a) {
|
781
|
-
var
|
782
|
-
return !!(
|
797
|
+
var f = a.prototype;
|
798
|
+
return !!(f && f.isReactComponent);
|
783
799
|
}
|
784
|
-
function ve(a,
|
800
|
+
function ve(a, f, p) {
|
785
801
|
if (a == null)
|
786
802
|
return "";
|
787
803
|
if (typeof a == "function")
|
@@ -789,51 +805,51 @@ function Ln() {
|
|
789
805
|
if (typeof a == "string")
|
790
806
|
return pe(a);
|
791
807
|
switch (a) {
|
792
|
-
case
|
808
|
+
case h:
|
793
809
|
return pe("Suspense");
|
794
810
|
case m:
|
795
811
|
return pe("SuspenseList");
|
796
812
|
}
|
797
813
|
if (typeof a == "object")
|
798
814
|
switch (a.$$typeof) {
|
799
|
-
case
|
815
|
+
case u:
|
800
816
|
return et(a.render);
|
801
|
-
case
|
802
|
-
return ve(a.type,
|
817
|
+
case g:
|
818
|
+
return ve(a.type, f, p);
|
803
819
|
case E: {
|
804
|
-
var x = a,
|
820
|
+
var x = a, k = x._payload, _ = x._init;
|
805
821
|
try {
|
806
|
-
return ve(_(
|
822
|
+
return ve(_(k), f, p);
|
807
823
|
} catch {
|
808
824
|
}
|
809
825
|
}
|
810
826
|
}
|
811
827
|
return "";
|
812
828
|
}
|
813
|
-
var Me = Object.prototype.hasOwnProperty, nt = {}, $e =
|
829
|
+
var Me = Object.prototype.hasOwnProperty, nt = {}, $e = b.ReactDebugCurrentFrame;
|
814
830
|
function ue(a) {
|
815
831
|
if (a) {
|
816
|
-
var
|
817
|
-
$e.setExtraStackFrame(
|
832
|
+
var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
|
833
|
+
$e.setExtraStackFrame(p);
|
818
834
|
} else
|
819
835
|
$e.setExtraStackFrame(null);
|
820
836
|
}
|
821
|
-
function be(a,
|
837
|
+
function be(a, f, p, x, k) {
|
822
838
|
{
|
823
839
|
var _ = Function.call.bind(Me);
|
824
|
-
for (var
|
825
|
-
if (_(a,
|
840
|
+
for (var P in a)
|
841
|
+
if (_(a, P)) {
|
826
842
|
var S = void 0;
|
827
843
|
try {
|
828
|
-
if (typeof a[
|
829
|
-
var X = Error((x || "React class") + ": " +
|
844
|
+
if (typeof a[P] != "function") {
|
845
|
+
var X = Error((x || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
830
846
|
throw X.name = "Invariant Violation", X;
|
831
847
|
}
|
832
|
-
S = a[
|
848
|
+
S = a[P](f, P, x, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
833
849
|
} catch (B) {
|
834
850
|
S = B;
|
835
851
|
}
|
836
|
-
S && !(S instanceof Error) && (ue(
|
852
|
+
S && !(S instanceof Error) && (ue(k), v("%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).", x || "React class", p, P, typeof S), ue(null)), S instanceof Error && !(S.message in nt) && (nt[S.message] = !0, ue(k), v("Failed %s type: %s", p, S.message), ue(null));
|
837
853
|
}
|
838
854
|
}
|
839
855
|
}
|
@@ -843,8 +859,8 @@ function Ln() {
|
|
843
859
|
}
|
844
860
|
function at(a) {
|
845
861
|
{
|
846
|
-
var
|
847
|
-
return
|
862
|
+
var f = typeof Symbol == "function" && Symbol.toStringTag, p = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
|
863
|
+
return p;
|
848
864
|
}
|
849
865
|
}
|
850
866
|
function Ye(a) {
|
@@ -859,9 +875,9 @@ function Ln() {
|
|
859
875
|
}
|
860
876
|
function it(a) {
|
861
877
|
if (Ye(a))
|
862
|
-
return
|
878
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(a)), rt(a);
|
863
879
|
}
|
864
|
-
var de =
|
880
|
+
var de = b.ReactCurrentOwner, gt = {
|
865
881
|
key: !0,
|
866
882
|
ref: !0,
|
867
883
|
__self: !0,
|
@@ -870,57 +886,57 @@ function Ln() {
|
|
870
886
|
ye = {};
|
871
887
|
function o(a) {
|
872
888
|
if (Me.call(a, "ref")) {
|
873
|
-
var
|
874
|
-
if (
|
889
|
+
var f = Object.getOwnPropertyDescriptor(a, "ref").get;
|
890
|
+
if (f && f.isReactWarning)
|
875
891
|
return !1;
|
876
892
|
}
|
877
893
|
return a.ref !== void 0;
|
878
894
|
}
|
879
895
|
function w(a) {
|
880
896
|
if (Me.call(a, "key")) {
|
881
|
-
var
|
882
|
-
if (
|
897
|
+
var f = Object.getOwnPropertyDescriptor(a, "key").get;
|
898
|
+
if (f && f.isReactWarning)
|
883
899
|
return !1;
|
884
900
|
}
|
885
901
|
return a.key !== void 0;
|
886
902
|
}
|
887
|
-
function F(a,
|
888
|
-
if (typeof a.ref == "string" && de.current &&
|
889
|
-
var
|
890
|
-
ye[
|
903
|
+
function F(a, f) {
|
904
|
+
if (typeof a.ref == "string" && de.current && f && de.current.stateNode !== f) {
|
905
|
+
var p = L(de.current.type);
|
906
|
+
ye[p] || (v('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', L(de.current.type), a.ref), ye[p] = !0);
|
891
907
|
}
|
892
908
|
}
|
893
|
-
function U(a,
|
909
|
+
function U(a, f) {
|
894
910
|
{
|
895
|
-
var
|
896
|
-
ot || (ot = !0,
|
911
|
+
var p = function() {
|
912
|
+
ot || (ot = !0, v("%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));
|
897
913
|
};
|
898
|
-
|
899
|
-
get:
|
914
|
+
p.isReactWarning = !0, Object.defineProperty(a, "key", {
|
915
|
+
get: p,
|
900
916
|
configurable: !0
|
901
917
|
});
|
902
918
|
}
|
903
919
|
}
|
904
|
-
function K(a,
|
920
|
+
function K(a, f) {
|
905
921
|
{
|
906
|
-
var
|
907
|
-
Ve || (Ve = !0,
|
922
|
+
var p = function() {
|
923
|
+
Ve || (Ve = !0, v("%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));
|
908
924
|
};
|
909
|
-
|
910
|
-
get:
|
925
|
+
p.isReactWarning = !0, Object.defineProperty(a, "ref", {
|
926
|
+
get: p,
|
911
927
|
configurable: !0
|
912
928
|
});
|
913
929
|
}
|
914
930
|
}
|
915
|
-
var fe = function(a,
|
931
|
+
var fe = function(a, f, p, x, k, _, P) {
|
916
932
|
var S = {
|
917
933
|
// This tag allows us to uniquely identify this as a React Element
|
918
934
|
$$typeof: n,
|
919
935
|
// Built-in properties that belong on the element
|
920
936
|
type: a,
|
921
|
-
key:
|
922
|
-
ref:
|
923
|
-
props:
|
937
|
+
key: f,
|
938
|
+
ref: p,
|
939
|
+
props: P,
|
924
940
|
// Record the component responsible for creating this element.
|
925
941
|
_owner: _
|
926
942
|
};
|
@@ -938,32 +954,32 @@ function Ln() {
|
|
938
954
|
configurable: !1,
|
939
955
|
enumerable: !1,
|
940
956
|
writable: !1,
|
941
|
-
value:
|
957
|
+
value: k
|
942
958
|
}), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
|
943
959
|
};
|
944
|
-
function ie(a,
|
960
|
+
function ie(a, f, p, x, k) {
|
945
961
|
{
|
946
|
-
var _,
|
947
|
-
|
948
|
-
for (_ in
|
949
|
-
Me.call(
|
962
|
+
var _, P = {}, S = null, X = null;
|
963
|
+
p !== void 0 && (it(p), S = "" + p), w(f) && (it(f.key), S = "" + f.key), o(f) && (X = f.ref, F(f, k));
|
964
|
+
for (_ in f)
|
965
|
+
Me.call(f, _) && !gt.hasOwnProperty(_) && (P[_] = f[_]);
|
950
966
|
if (a && a.defaultProps) {
|
951
967
|
var B = a.defaultProps;
|
952
968
|
for (_ in B)
|
953
|
-
|
969
|
+
P[_] === void 0 && (P[_] = B[_]);
|
954
970
|
}
|
955
971
|
if (S || X) {
|
956
972
|
var Y = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
|
957
|
-
S && U(
|
973
|
+
S && U(P, Y), X && K(P, Y);
|
958
974
|
}
|
959
|
-
return fe(a, S, X,
|
975
|
+
return fe(a, S, X, k, x, de.current, P);
|
960
976
|
}
|
961
977
|
}
|
962
|
-
var st =
|
978
|
+
var st = b.ReactCurrentOwner, ze = b.ReactDebugCurrentFrame;
|
963
979
|
function W(a) {
|
964
980
|
if (a) {
|
965
|
-
var
|
966
|
-
ze.setExtraStackFrame(
|
981
|
+
var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
|
982
|
+
ze.setExtraStackFrame(p);
|
967
983
|
} else
|
968
984
|
ze.setExtraStackFrame(null);
|
969
985
|
}
|
@@ -987,112 +1003,112 @@ Check the render method of \`` + a + "`.";
|
|
987
1003
|
function Ee(a) {
|
988
1004
|
{
|
989
1005
|
if (a !== void 0) {
|
990
|
-
var
|
1006
|
+
var f = a.fileName.replace(/^.*[\\\/]/, ""), p = a.lineNumber;
|
991
1007
|
return `
|
992
1008
|
|
993
|
-
Check your code at ` +
|
1009
|
+
Check your code at ` + f + ":" + p + ".";
|
994
1010
|
}
|
995
1011
|
return "";
|
996
1012
|
}
|
997
1013
|
}
|
998
1014
|
var we = {};
|
999
|
-
function
|
1015
|
+
function Qt(a) {
|
1000
1016
|
{
|
1001
|
-
var
|
1002
|
-
if (!
|
1003
|
-
var
|
1004
|
-
|
1017
|
+
var f = me();
|
1018
|
+
if (!f) {
|
1019
|
+
var p = typeof a == "string" ? a : a.displayName || a.name;
|
1020
|
+
p && (f = `
|
1005
1021
|
|
1006
|
-
Check the top-level render call using <` +
|
1022
|
+
Check the top-level render call using <` + p + ">.");
|
1007
1023
|
}
|
1008
|
-
return
|
1024
|
+
return f;
|
1009
1025
|
}
|
1010
1026
|
}
|
1011
|
-
function Ot(a,
|
1027
|
+
function Ot(a, f) {
|
1012
1028
|
{
|
1013
1029
|
if (!a._store || a._store.validated || a.key != null)
|
1014
1030
|
return;
|
1015
1031
|
a._store.validated = !0;
|
1016
|
-
var
|
1017
|
-
if (we[
|
1032
|
+
var p = Qt(f);
|
1033
|
+
if (we[p])
|
1018
1034
|
return;
|
1019
|
-
we[
|
1035
|
+
we[p] = !0;
|
1020
1036
|
var x = "";
|
1021
|
-
a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a),
|
1037
|
+
a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, x), W(null);
|
1022
1038
|
}
|
1023
1039
|
}
|
1024
|
-
function Tt(a,
|
1040
|
+
function Tt(a, f) {
|
1025
1041
|
{
|
1026
1042
|
if (typeof a != "object")
|
1027
1043
|
return;
|
1028
1044
|
if (Ge(a))
|
1029
|
-
for (var
|
1030
|
-
var x = a[
|
1031
|
-
he(x) && Ot(x,
|
1045
|
+
for (var p = 0; p < a.length; p++) {
|
1046
|
+
var x = a[p];
|
1047
|
+
he(x) && Ot(x, f);
|
1032
1048
|
}
|
1033
1049
|
else if (he(a))
|
1034
1050
|
a._store && (a._store.validated = !0);
|
1035
1051
|
else if (a) {
|
1036
|
-
var
|
1037
|
-
if (typeof
|
1038
|
-
for (var _ =
|
1039
|
-
he(
|
1052
|
+
var k = y(a);
|
1053
|
+
if (typeof k == "function" && k !== a.entries)
|
1054
|
+
for (var _ = k.call(a), P; !(P = _.next()).done; )
|
1055
|
+
he(P.value) && Ot(P.value, f);
|
1040
1056
|
}
|
1041
1057
|
}
|
1042
1058
|
}
|
1043
|
-
function
|
1059
|
+
function en(a) {
|
1044
1060
|
{
|
1045
|
-
var
|
1046
|
-
if (
|
1061
|
+
var f = a.type;
|
1062
|
+
if (f == null || typeof f == "string")
|
1047
1063
|
return;
|
1048
|
-
var
|
1049
|
-
if (typeof
|
1050
|
-
|
1051
|
-
else if (typeof
|
1064
|
+
var p;
|
1065
|
+
if (typeof f == "function")
|
1066
|
+
p = f.propTypes;
|
1067
|
+
else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
|
1052
1068
|
// Inner props are checked in the reconciler.
|
1053
|
-
|
1054
|
-
|
1069
|
+
f.$$typeof === g))
|
1070
|
+
p = f.propTypes;
|
1055
1071
|
else
|
1056
1072
|
return;
|
1057
|
-
if (
|
1058
|
-
var x = L(
|
1059
|
-
be(
|
1060
|
-
} else if (
|
1073
|
+
if (p) {
|
1074
|
+
var x = L(f);
|
1075
|
+
be(p, a.props, "prop", x, a);
|
1076
|
+
} else if (f.PropTypes !== void 0 && !Q) {
|
1061
1077
|
Q = !0;
|
1062
|
-
var
|
1063
|
-
|
1078
|
+
var k = L(f);
|
1079
|
+
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
|
1064
1080
|
}
|
1065
|
-
typeof
|
1081
|
+
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1066
1082
|
}
|
1067
1083
|
}
|
1068
|
-
function
|
1084
|
+
function tn(a) {
|
1069
1085
|
{
|
1070
|
-
for (var
|
1071
|
-
var x =
|
1086
|
+
for (var f = Object.keys(a.props), p = 0; p < f.length; p++) {
|
1087
|
+
var x = f[p];
|
1072
1088
|
if (x !== "children" && x !== "key") {
|
1073
|
-
W(a),
|
1089
|
+
W(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), W(null);
|
1074
1090
|
break;
|
1075
1091
|
}
|
1076
1092
|
}
|
1077
|
-
a.ref !== null && (W(a),
|
1093
|
+
a.ref !== null && (W(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
1078
1094
|
}
|
1079
1095
|
}
|
1080
|
-
function Pt(a,
|
1096
|
+
function Pt(a, f, p, x, k, _) {
|
1081
1097
|
{
|
1082
|
-
var
|
1083
|
-
if (!
|
1098
|
+
var P = oe(a);
|
1099
|
+
if (!P) {
|
1084
1100
|
var S = "";
|
1085
1101
|
(a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1086
|
-
var X = Ee(
|
1102
|
+
var X = Ee(k);
|
1087
1103
|
X ? S += X : S += me();
|
1088
1104
|
var B;
|
1089
|
-
a === null ? B = "null" : Ge(a) ? B = "array" : a !== void 0 && a.$$typeof === n ? (B = "<" + (L(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a,
|
1105
|
+
a === null ? B = "null" : Ge(a) ? B = "array" : a !== void 0 && a.$$typeof === n ? (B = "<" + (L(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, S);
|
1090
1106
|
}
|
1091
|
-
var Y = ie(a,
|
1107
|
+
var Y = ie(a, f, p, k, _);
|
1092
1108
|
if (Y == null)
|
1093
1109
|
return Y;
|
1094
|
-
if (
|
1095
|
-
var ne =
|
1110
|
+
if (P) {
|
1111
|
+
var ne = f.children;
|
1096
1112
|
if (ne !== void 0)
|
1097
1113
|
if (x)
|
1098
1114
|
if (Ge(ne)) {
|
@@ -1100,33 +1116,33 @@ Check the top-level render call using <` + g + ">.");
|
|
1100
1116
|
Tt(ne[ke], a);
|
1101
1117
|
Object.freeze && Object.freeze(ne);
|
1102
1118
|
} else
|
1103
|
-
|
1119
|
+
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1104
1120
|
else
|
1105
1121
|
Tt(ne, a);
|
1106
1122
|
}
|
1107
|
-
return a === e ?
|
1123
|
+
return a === e ? tn(Y) : en(Y), Y;
|
1108
1124
|
}
|
1109
1125
|
}
|
1110
|
-
function
|
1111
|
-
return Pt(a,
|
1126
|
+
function nn(a, f, p) {
|
1127
|
+
return Pt(a, f, p, !0);
|
1112
1128
|
}
|
1113
|
-
function
|
1114
|
-
return Pt(a,
|
1129
|
+
function an(a, f, p) {
|
1130
|
+
return Pt(a, f, p, !1);
|
1115
1131
|
}
|
1116
|
-
var
|
1117
|
-
Ke.Fragment = e, Ke.jsx =
|
1132
|
+
var rn = an, on = nn;
|
1133
|
+
Ke.Fragment = e, Ke.jsx = rn, Ke.jsxs = on;
|
1118
1134
|
}()), Ke;
|
1119
1135
|
}
|
1120
|
-
process.env.NODE_ENV === "production" ? Et.exports =
|
1121
|
-
var
|
1122
|
-
function
|
1123
|
-
return t.title.search("<") > -1 ? /* @__PURE__ */
|
1136
|
+
process.env.NODE_ENV === "production" ? Et.exports = Fn() : Et.exports = Un();
|
1137
|
+
var d = Et.exports;
|
1138
|
+
function Zt(t) {
|
1139
|
+
return t.title.search("<") > -1 ? /* @__PURE__ */ d.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ d.jsx("button", { children: t.title });
|
1124
1140
|
}
|
1125
|
-
const
|
1126
|
-
/* @__PURE__ */
|
1127
|
-
/* @__PURE__ */
|
1128
|
-
/* @__PURE__ */
|
1129
|
-
] }),
|
1141
|
+
const Bn = /* @__PURE__ */ d.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1142
|
+
/* @__PURE__ */ d.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1143
|
+
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1144
|
+
/* @__PURE__ */ d.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1145
|
+
] }), $n = /* @__PURE__ */ d.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ d.jsx(
|
1130
1146
|
"path",
|
1131
1147
|
{
|
1132
1148
|
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
|
@@ -1134,46 +1150,46 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
|
|
1134
1150
|
C11,8.22,10.74,8,10.43,8z`
|
1135
1151
|
}
|
1136
1152
|
) });
|
1137
|
-
function
|
1138
|
-
return /* @__PURE__ */
|
1139
|
-
|
1140
|
-
/* @__PURE__ */
|
1141
|
-
/* @__PURE__ */
|
1153
|
+
function Gn(t) {
|
1154
|
+
return /* @__PURE__ */ d.jsx(Ht.Item, { value: t.title, children: /* @__PURE__ */ d.jsxs("div", { children: [
|
1155
|
+
$n,
|
1156
|
+
/* @__PURE__ */ d.jsx("span", { children: t.title }),
|
1157
|
+
/* @__PURE__ */ d.jsx("button", { className: "closeIcon", onClick: () => {
|
1142
1158
|
t.onDelete(t.index);
|
1143
|
-
}, children:
|
1159
|
+
}, children: Bn })
|
1144
1160
|
] }) }, t.title);
|
1145
1161
|
}
|
1146
|
-
function
|
1147
|
-
const [n, r] = re(!1), [e, i] = re(t.options), l = (
|
1148
|
-
t.onDragComplete(
|
1149
|
-
},
|
1162
|
+
function Yn(t) {
|
1163
|
+
const [n, r] = re(!1), [e, i] = re(t.options), l = (h) => {
|
1164
|
+
t.onDragComplete(h), i(h);
|
1165
|
+
}, c = (h) => {
|
1150
1166
|
const m = [...e];
|
1151
|
-
m.splice(
|
1167
|
+
m.splice(h, 1), l(m);
|
1152
1168
|
}, s = [];
|
1153
|
-
e.forEach((
|
1154
|
-
s.push(/* @__PURE__ */
|
1169
|
+
e.forEach((h, m) => {
|
1170
|
+
s.push(/* @__PURE__ */ d.jsx(Gn, { index: m, title: h, onDelete: c }, h));
|
1155
1171
|
});
|
1156
|
-
let
|
1157
|
-
return t.subdropdown && (
|
1158
|
-
/* @__PURE__ */
|
1159
|
-
/* @__PURE__ */
|
1172
|
+
let u = "dropdown draggable";
|
1173
|
+
return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: u, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), children: [
|
1174
|
+
/* @__PURE__ */ d.jsx(Zt, { title: t.title }),
|
1175
|
+
/* @__PURE__ */ d.jsx(Ht.Group, { axis: "y", values: e, onReorder: l, style: { visibility: n ? "visible" : "hidden" }, children: s })
|
1160
1176
|
] });
|
1161
1177
|
}
|
1162
|
-
function
|
1178
|
+
function Vn(t) {
|
1163
1179
|
const [n, r] = re(!1), e = [];
|
1164
|
-
t.options.map((l,
|
1165
|
-
t.onSelect !== void 0 && (l.onSelect = t.onSelect), e.push(/* @__PURE__ */
|
1180
|
+
t.options.map((l, c) => {
|
1181
|
+
t.onSelect !== void 0 && (l.onSelect = t.onSelect), e.push(/* @__PURE__ */ d.jsx(zn, { option: l }, c));
|
1166
1182
|
});
|
1167
1183
|
let i = "dropdown";
|
1168
|
-
return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */
|
1184
|
+
return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ d.jsxs(
|
1169
1185
|
"div",
|
1170
1186
|
{
|
1171
1187
|
className: i,
|
1172
1188
|
onMouseEnter: () => r(!0),
|
1173
1189
|
onMouseLeave: () => r(!1),
|
1174
1190
|
children: [
|
1175
|
-
/* @__PURE__ */
|
1176
|
-
/* @__PURE__ */
|
1191
|
+
/* @__PURE__ */ d.jsx(Zt, { title: t.title }),
|
1192
|
+
/* @__PURE__ */ d.jsx(
|
1177
1193
|
"ul",
|
1178
1194
|
{
|
1179
1195
|
style: { visibility: n ? "visible" : "hidden" },
|
@@ -1184,13 +1200,13 @@ function Gn(t) {
|
|
1184
1200
|
}
|
1185
1201
|
);
|
1186
1202
|
}
|
1187
|
-
function
|
1203
|
+
function zn(t) {
|
1188
1204
|
const { option: n } = t, [r, e] = re("");
|
1189
1205
|
let i;
|
1190
1206
|
switch (n.type) {
|
1191
1207
|
case "draggable":
|
1192
|
-
i = /* @__PURE__ */
|
1193
|
-
|
1208
|
+
i = /* @__PURE__ */ d.jsx(
|
1209
|
+
Yn,
|
1194
1210
|
{
|
1195
1211
|
title: n.title,
|
1196
1212
|
options: n.value,
|
@@ -1202,8 +1218,8 @@ function Yn(t) {
|
|
1202
1218
|
);
|
1203
1219
|
break;
|
1204
1220
|
case "dropdown":
|
1205
|
-
i = /* @__PURE__ */
|
1206
|
-
|
1221
|
+
i = /* @__PURE__ */ d.jsx(
|
1222
|
+
Vn,
|
1207
1223
|
{
|
1208
1224
|
title: n.title,
|
1209
1225
|
options: n.value,
|
@@ -1213,7 +1229,7 @@ function Yn(t) {
|
|
1213
1229
|
);
|
1214
1230
|
break;
|
1215
1231
|
case "option":
|
1216
|
-
i = /* @__PURE__ */
|
1232
|
+
i = /* @__PURE__ */ d.jsx(
|
1217
1233
|
"button",
|
1218
1234
|
{
|
1219
1235
|
onClick: () => {
|
@@ -1224,133 +1240,132 @@ function Yn(t) {
|
|
1224
1240
|
);
|
1225
1241
|
break;
|
1226
1242
|
}
|
1227
|
-
return /* @__PURE__ */
|
1243
|
+
return /* @__PURE__ */ d.jsx("li", { className: r === n.title ? "selected" : "", children: i }, kn());
|
1228
1244
|
}
|
1229
|
-
function
|
1245
|
+
function Ta(t) {
|
1230
1246
|
let n;
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
switch (s.event) {
|
1247
|
+
function r(c) {
|
1248
|
+
var u, h, m, g, E, C, R, D, y;
|
1249
|
+
let s;
|
1250
|
+
switch (c.event) {
|
1236
1251
|
case "custom":
|
1237
|
-
I.dispatchEvent({ type: N.CUSTOM, value:
|
1252
|
+
I.dispatchEvent({ type: N.CUSTOM, value: c.data });
|
1238
1253
|
break;
|
1239
1254
|
case "selectComponent":
|
1240
|
-
I.dispatchEvent({ type: N.SELECT_DROPDOWN, value:
|
1255
|
+
I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
|
1241
1256
|
break;
|
1242
1257
|
case "draggableListUpdate":
|
1243
|
-
I.dispatchEvent({ type: N.DRAG_UPDATE, value:
|
1258
|
+
I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
|
1244
1259
|
break;
|
1245
1260
|
case "addFolder":
|
1246
|
-
(
|
1261
|
+
(u = t.components.get("debug")) == null || u.addFolder(c.data.name, c.data.params, c.data.parent);
|
1247
1262
|
break;
|
1248
1263
|
case "bindObject":
|
1249
|
-
(
|
1264
|
+
(h = t.components.get("debug")) == null || h.bind(c.data.name, c.data.params, c.data.parent);
|
1250
1265
|
break;
|
1251
1266
|
case "updateBind":
|
1252
|
-
(
|
1267
|
+
(m = t.components.get("debug")) == null || m.triggerBind(c.data.id, c.data.value);
|
1253
1268
|
break;
|
1254
1269
|
case "addButton":
|
1255
|
-
(
|
1270
|
+
(g = t.components.get("debug")) == null || g.button(c.data.name, c.data.callback, c.data.parent);
|
1256
1271
|
break;
|
1257
1272
|
case "clickButton":
|
1258
|
-
(
|
1273
|
+
(E = t.components.get("debug")) == null || E.triggerButton(c.data.id);
|
1259
1274
|
break;
|
1260
1275
|
case "setSheet":
|
1261
|
-
|
1276
|
+
s = (C = t.components.get("theatre")) == null ? void 0 : C.sheets.get(c.data.sheet), s !== void 0 && (n = s, We.setSelection([s]));
|
1262
1277
|
break;
|
1263
1278
|
case "setSheetObject":
|
1264
|
-
|
1279
|
+
s = (R = t.components.get("theatre")) == null ? void 0 : R.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && We.setSelection([s]);
|
1265
1280
|
break;
|
1266
1281
|
case "updateSheetObject":
|
1267
|
-
|
1282
|
+
s = (D = t.components.get("theatre")) == null ? void 0 : D.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
|
1268
1283
|
break;
|
1269
1284
|
case "updateTimeline":
|
1270
|
-
n = (
|
1285
|
+
n = (y = t.components.get("theatre")) == null ? void 0 : y.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
|
1271
1286
|
break;
|
1272
1287
|
case "getScene":
|
1273
1288
|
I.dispatchEvent({ type: N.GET_SCENE });
|
1274
1289
|
break;
|
1275
1290
|
case "getObject":
|
1276
|
-
I.dispatchEvent({ type: N.GET_OBJECT, value:
|
1291
|
+
I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
|
1277
1292
|
break;
|
1278
1293
|
case "updateObject":
|
1279
|
-
I.dispatchEvent({ type: N.UPDATE_OBJECT, value:
|
1294
|
+
I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
|
1280
1295
|
break;
|
1281
1296
|
case "createTexture":
|
1282
|
-
I.dispatchEvent({ type: N.CREATE_TEXTURE, value:
|
1297
|
+
I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
|
1283
1298
|
break;
|
1284
1299
|
case "requestMethod":
|
1285
|
-
I.dispatchEvent({ type: N.REQUEST_METHOD, value:
|
1300
|
+
I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
|
1286
1301
|
break;
|
1287
1302
|
}
|
1288
1303
|
}
|
1289
|
-
function
|
1290
|
-
switch (
|
1304
|
+
function e(c) {
|
1305
|
+
switch (c.event) {
|
1291
1306
|
case "custom":
|
1292
|
-
I.dispatchEvent({ type: N.CUSTOM, value:
|
1307
|
+
I.dispatchEvent({ type: N.CUSTOM, value: c.data });
|
1293
1308
|
break;
|
1294
1309
|
case "setObject":
|
1295
|
-
I.dispatchEvent({ type: N.SET_OBJECT, value:
|
1310
|
+
I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
|
1296
1311
|
break;
|
1297
1312
|
case "setScene":
|
1298
|
-
I.dispatchEvent({ type: N.SET_SCENE, value:
|
1313
|
+
I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
|
1299
1314
|
break;
|
1300
1315
|
}
|
1301
1316
|
}
|
1302
|
-
function
|
1317
|
+
function i() {
|
1303
1318
|
We.ui.hide();
|
1304
1319
|
}
|
1305
|
-
function
|
1306
|
-
We.ui.restore(), We.onSelectionChange((
|
1307
|
-
|
1308
|
-
var
|
1309
|
-
let
|
1310
|
-
switch (
|
1320
|
+
function l() {
|
1321
|
+
We.ui.restore(), We.onSelectionChange((h) => {
|
1322
|
+
h.length < 1 || h.forEach((m) => {
|
1323
|
+
var R;
|
1324
|
+
let g = m.address.sheetId, E = "setSheet", C = {};
|
1325
|
+
switch (m.type) {
|
1311
1326
|
case "Theatre_Sheet_PublicAPI":
|
1312
|
-
|
1313
|
-
sheet:
|
1314
|
-
}, n = (
|
1327
|
+
E = "setSheet", C = {
|
1328
|
+
sheet: m.address.sheetId
|
1329
|
+
}, n = (R = t.components.get("theatre")) == null ? void 0 : R.sheets.get(m.address.sheetId);
|
1315
1330
|
break;
|
1316
1331
|
case "Theatre_SheetObject_PublicAPI":
|
1317
|
-
|
1318
|
-
id:
|
1319
|
-
sheet:
|
1320
|
-
key:
|
1332
|
+
E = "setSheetObject", g += `_${m.address.objectKey}`, C = {
|
1333
|
+
id: g,
|
1334
|
+
sheet: m.address.sheetId,
|
1335
|
+
key: m.address.objectKey
|
1321
1336
|
};
|
1322
1337
|
break;
|
1323
1338
|
}
|
1324
|
-
t.send({ event:
|
1339
|
+
t.send({ event: E, target: "app", data: C });
|
1325
1340
|
});
|
1326
1341
|
});
|
1327
|
-
let
|
1328
|
-
const
|
1329
|
-
if (n !== void 0 &&
|
1330
|
-
|
1331
|
-
const
|
1342
|
+
let c = 0;
|
1343
|
+
const s = () => {
|
1344
|
+
if (n !== void 0 && c !== n.sequence.position) {
|
1345
|
+
c = n.sequence.position;
|
1346
|
+
const h = n;
|
1332
1347
|
t.send({
|
1333
1348
|
event: "updateTimeline",
|
1334
1349
|
target: "app",
|
1335
1350
|
data: {
|
1336
|
-
position:
|
1337
|
-
sheet:
|
1351
|
+
position: c,
|
1352
|
+
sheet: h.address.sheetId
|
1338
1353
|
}
|
1339
1354
|
});
|
1340
1355
|
}
|
1341
|
-
},
|
1342
|
-
|
1356
|
+
}, u = () => {
|
1357
|
+
s(), requestAnimationFrame(u);
|
1343
1358
|
};
|
1344
|
-
|
1359
|
+
s(), u();
|
1345
1360
|
}
|
1346
|
-
t.listen((
|
1347
|
-
|
1348
|
-
}), t.editor ?
|
1361
|
+
t.listen((c) => {
|
1362
|
+
t.editor ? e(c) : r(c);
|
1363
|
+
}), t.editor ? l() : i();
|
1349
1364
|
}
|
1350
1365
|
function wt(t) {
|
1351
1366
|
const [n, r] = re(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1352
|
-
return /* @__PURE__ */
|
1353
|
-
/* @__PURE__ */
|
1367
|
+
return /* @__PURE__ */ d.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1368
|
+
/* @__PURE__ */ d.jsxs(
|
1354
1369
|
"button",
|
1355
1370
|
{
|
1356
1371
|
className: "toggle",
|
@@ -1359,28 +1374,28 @@ function wt(t) {
|
|
1359
1374
|
t.onToggle !== void 0 && t.onToggle(i), r(i);
|
1360
1375
|
},
|
1361
1376
|
children: [
|
1362
|
-
/* @__PURE__ */
|
1377
|
+
/* @__PURE__ */ d.jsx(
|
1363
1378
|
"p",
|
1364
1379
|
{
|
1365
1380
|
className: `status ${n ? "open" : ""}`,
|
1366
1381
|
children: "Toggle"
|
1367
1382
|
}
|
1368
1383
|
),
|
1369
|
-
/* @__PURE__ */
|
1384
|
+
/* @__PURE__ */ d.jsx("p", { className: "label", children: t.label })
|
1370
1385
|
]
|
1371
1386
|
}
|
1372
1387
|
),
|
1373
1388
|
t.button,
|
1374
|
-
/* @__PURE__ */
|
1389
|
+
/* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { children: t.children }) })
|
1375
1390
|
] });
|
1376
1391
|
}
|
1377
|
-
function
|
1392
|
+
function Jt(t) {
|
1378
1393
|
const [n, r] = re(t.child.children.length > 0), e = t.child.children.length > 0, i = [];
|
1379
1394
|
return t.child.children.length > 0 && t.child.children.map((l) => {
|
1380
|
-
i.push(/* @__PURE__ */
|
1381
|
-
}), /* @__PURE__ */
|
1382
|
-
/* @__PURE__ */
|
1383
|
-
e ? /* @__PURE__ */
|
1395
|
+
i.push(/* @__PURE__ */ d.jsx(Jt, { child: l, three: t.three }, Math.random()));
|
1396
|
+
}), /* @__PURE__ */ d.jsxs("div", { className: "childObject", children: [
|
1397
|
+
/* @__PURE__ */ d.jsxs("div", { className: "child", children: [
|
1398
|
+
e ? /* @__PURE__ */ d.jsx(
|
1384
1399
|
"button",
|
1385
1400
|
{
|
1386
1401
|
className: "status",
|
@@ -1392,7 +1407,7 @@ function qt(t) {
|
|
1392
1407
|
}
|
1393
1408
|
}
|
1394
1409
|
) : null,
|
1395
|
-
/* @__PURE__ */
|
1410
|
+
/* @__PURE__ */ d.jsx(
|
1396
1411
|
"button",
|
1397
1412
|
{
|
1398
1413
|
className: "name",
|
@@ -1405,19 +1420,19 @@ function qt(t) {
|
|
1405
1420
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1406
1421
|
}
|
1407
1422
|
),
|
1408
|
-
/* @__PURE__ */
|
1423
|
+
/* @__PURE__ */ d.jsx("div", { className: `icon ${An(t.child)}` })
|
1409
1424
|
] }),
|
1410
|
-
/* @__PURE__ */
|
1425
|
+
/* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: i }) })
|
1411
1426
|
] }, Math.random());
|
1412
1427
|
}
|
1413
|
-
function
|
1428
|
+
function Wn(t) {
|
1414
1429
|
const n = [];
|
1415
1430
|
return t.child.children.map((r) => {
|
1416
|
-
n.push(/* @__PURE__ */
|
1417
|
-
}), /* @__PURE__ */
|
1431
|
+
n.push(/* @__PURE__ */ d.jsx(Jt, { child: r, three: t.three }, Math.random()));
|
1432
|
+
}), /* @__PURE__ */ d.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1418
1433
|
}
|
1419
|
-
const
|
1420
|
-
function
|
1434
|
+
const Hn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1435
|
+
function Kn(t) {
|
1421
1436
|
return "items" in t;
|
1422
1437
|
}
|
1423
1438
|
function Ae(t) {
|
@@ -1426,10 +1441,10 @@ function Ae(t) {
|
|
1426
1441
|
}
|
1427
1442
|
const r = [];
|
1428
1443
|
return t.items.forEach((e) => {
|
1429
|
-
|
1430
|
-
/* @__PURE__ */
|
1444
|
+
Kn(e) ? r.push(
|
1445
|
+
/* @__PURE__ */ d.jsx(Ae, { title: e.title, items: e.items }, Math.random())
|
1431
1446
|
) : r.push(
|
1432
|
-
/* @__PURE__ */
|
1447
|
+
/* @__PURE__ */ d.jsx(
|
1433
1448
|
Xe,
|
1434
1449
|
{
|
1435
1450
|
title: e.title,
|
@@ -1447,9 +1462,9 @@ function Ae(t) {
|
|
1447
1462
|
Math.random()
|
1448
1463
|
)
|
1449
1464
|
);
|
1450
|
-
}), /* @__PURE__ */
|
1465
|
+
}), /* @__PURE__ */ d.jsx(wt, { label: t.title, open: !1, children: r });
|
1451
1466
|
}
|
1452
|
-
function
|
1467
|
+
function Xn(t) {
|
1453
1468
|
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");
|
1454
1469
|
}
|
1455
1470
|
function xe(t) {
|
@@ -1569,10 +1584,10 @@ function xe(t) {
|
|
1569
1584
|
}
|
1570
1585
|
return t;
|
1571
1586
|
}
|
1572
|
-
function
|
1587
|
+
function qn(t) {
|
1573
1588
|
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";
|
1574
1589
|
}
|
1575
|
-
function
|
1590
|
+
function Zn() {
|
1576
1591
|
const t = document.createElement("input");
|
1577
1592
|
return t.type = "file", new Promise((n, r) => {
|
1578
1593
|
t.addEventListener("change", function() {
|
@@ -1587,55 +1602,55 @@ function Xn() {
|
|
1587
1602
|
}), t.click();
|
1588
1603
|
});
|
1589
1604
|
}
|
1590
|
-
function
|
1605
|
+
function Nt(t, n, r) {
|
1591
1606
|
const e = [];
|
1592
1607
|
for (const i in t) {
|
1593
|
-
if (!
|
1608
|
+
if (!Xn(i))
|
1594
1609
|
continue;
|
1595
|
-
const l = typeof t[i],
|
1610
|
+
const l = typeof t[i], c = t[i];
|
1596
1611
|
if (l === "boolean" || l === "number" || l === "string") {
|
1597
1612
|
const s = {
|
1598
1613
|
title: xe(i),
|
1599
1614
|
prop: i,
|
1600
1615
|
type: l,
|
1601
|
-
value:
|
1616
|
+
value: c,
|
1602
1617
|
min: void 0,
|
1603
1618
|
max: void 0,
|
1604
|
-
onChange: (
|
1605
|
-
var
|
1606
|
-
r.updateObject(n.uuid, `material.${
|
1607
|
-
const m = (
|
1608
|
-
m !== void 0 && Z(m, `material.${
|
1619
|
+
onChange: (u, h) => {
|
1620
|
+
var g;
|
1621
|
+
r.updateObject(n.uuid, `material.${u}`, h), l === "boolean" && r.updateObject(n.uuid, "material.needsUpdate", !0);
|
1622
|
+
const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
|
1623
|
+
m !== void 0 && Z(m, `material.${u}`, h);
|
1609
1624
|
}
|
1610
1625
|
};
|
1611
|
-
|
1626
|
+
qn(i) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
|
1612
1627
|
} else if (l === "object")
|
1613
|
-
if (
|
1628
|
+
if (c.isColor)
|
1614
1629
|
e.push({
|
1615
1630
|
title: xe(i),
|
1616
1631
|
prop: i,
|
1617
1632
|
type: "color",
|
1618
|
-
value:
|
1619
|
-
onChange: (s,
|
1620
|
-
var
|
1621
|
-
const
|
1622
|
-
r.updateObject(n.uuid, `material.${s}`,
|
1623
|
-
const m = (
|
1624
|
-
m !== void 0 && Z(m, `material.${s}`,
|
1633
|
+
value: c,
|
1634
|
+
onChange: (s, u) => {
|
1635
|
+
var g;
|
1636
|
+
const h = new St(u);
|
1637
|
+
r.updateObject(n.uuid, `material.${s}`, h);
|
1638
|
+
const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
|
1639
|
+
m !== void 0 && Z(m, `material.${s}`, h);
|
1625
1640
|
}
|
1626
1641
|
});
|
1627
|
-
else if (Array.isArray(
|
1642
|
+
else if (Array.isArray(c)) {
|
1628
1643
|
const s = [];
|
1629
|
-
for (const
|
1644
|
+
for (const u in c)
|
1630
1645
|
s.push({
|
1631
|
-
title: `${
|
1632
|
-
type: `${typeof
|
1633
|
-
value:
|
1634
|
-
onChange: (
|
1646
|
+
title: `${u}`,
|
1647
|
+
type: `${typeof c[u]}`,
|
1648
|
+
value: c[u],
|
1649
|
+
onChange: (h, m) => {
|
1635
1650
|
var E;
|
1636
1651
|
r.updateObject(n.uuid, `material.${i}`, m);
|
1637
|
-
const
|
1638
|
-
|
1652
|
+
const g = (E = r.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
|
1653
|
+
g !== void 0 && Z(g, `material.${i}`, m);
|
1639
1654
|
}
|
1640
1655
|
});
|
1641
1656
|
e.push({
|
@@ -1644,59 +1659,59 @@ function It(t, n, r) {
|
|
1644
1659
|
});
|
1645
1660
|
} else {
|
1646
1661
|
const s = [];
|
1647
|
-
for (const
|
1648
|
-
const
|
1649
|
-
switch (typeof
|
1662
|
+
for (const u in c) {
|
1663
|
+
const h = c[u];
|
1664
|
+
switch (typeof h) {
|
1650
1665
|
case "boolean":
|
1651
1666
|
case "number":
|
1652
1667
|
case "string":
|
1653
|
-
|
1668
|
+
u === "src" ? e.push({
|
1654
1669
|
title: xe(i),
|
1655
1670
|
type: "image",
|
1656
|
-
value:
|
1657
|
-
onChange: (
|
1658
|
-
var
|
1671
|
+
value: h,
|
1672
|
+
onChange: (g, E) => {
|
1673
|
+
var R;
|
1659
1674
|
r.createTexture(n.uuid, `material.${i}`, E);
|
1660
|
-
const C = (
|
1661
|
-
C !== void 0 && yt(E).then((
|
1662
|
-
Z(C, `material.${i}`,
|
1675
|
+
const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
|
1676
|
+
C !== void 0 && yt(E).then((D) => {
|
1677
|
+
Z(C, `material.${i}`, D), Z(C, "material.needsUpdate", !0);
|
1663
1678
|
});
|
1664
1679
|
}
|
1665
1680
|
}) : s.push({
|
1666
|
-
title: `${xe(
|
1667
|
-
prop: `material.${i}.${
|
1668
|
-
type: `${typeof t[i][
|
1669
|
-
value:
|
1670
|
-
onChange: (
|
1671
|
-
var
|
1672
|
-
r.updateObject(n.uuid, `material.${i}.${
|
1673
|
-
const C = (
|
1674
|
-
C !== void 0 && Z(C, `material.${i}.${
|
1681
|
+
title: `${xe(u)}`,
|
1682
|
+
prop: `material.${i}.${u}`,
|
1683
|
+
type: `${typeof t[i][u]}`,
|
1684
|
+
value: c[u],
|
1685
|
+
onChange: (g, E) => {
|
1686
|
+
var R;
|
1687
|
+
r.updateObject(n.uuid, `material.${i}.${u}`, E);
|
1688
|
+
const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
|
1689
|
+
C !== void 0 && Z(C, `material.${i}.${u}`, E);
|
1675
1690
|
}
|
1676
1691
|
});
|
1677
1692
|
break;
|
1678
1693
|
case "object":
|
1679
|
-
|
1680
|
-
title: xe(
|
1694
|
+
h.value !== void 0 && h.value.src !== void 0 ? s.push({
|
1695
|
+
title: xe(u),
|
1681
1696
|
type: "image",
|
1682
|
-
value:
|
1683
|
-
onChange: (
|
1684
|
-
var
|
1685
|
-
r.createTexture(n.uuid, `material.${i}.${
|
1686
|
-
const C = (
|
1687
|
-
C !== void 0 && yt(E).then((
|
1688
|
-
Z(C, `material.${i}.${
|
1697
|
+
value: h.value.src,
|
1698
|
+
onChange: (g, E) => {
|
1699
|
+
var R;
|
1700
|
+
r.createTexture(n.uuid, `material.${i}.${u}.value`, E);
|
1701
|
+
const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
|
1702
|
+
C !== void 0 && yt(E).then((D) => {
|
1703
|
+
Z(C, `material.${i}.${u}.value`, D);
|
1689
1704
|
});
|
1690
1705
|
}
|
1691
1706
|
}) : s.push({
|
1692
|
-
title:
|
1693
|
-
type: `${typeof
|
1694
|
-
value:
|
1695
|
-
onChange: (
|
1696
|
-
var
|
1697
|
-
r.updateObject(n.uuid, `material.${i}.${
|
1698
|
-
const C = (
|
1699
|
-
C !== void 0 && Z(C, `material.${i}.${
|
1707
|
+
title: u,
|
1708
|
+
type: `${typeof h.value}`,
|
1709
|
+
value: h.value,
|
1710
|
+
onChange: (g, E) => {
|
1711
|
+
var R;
|
1712
|
+
r.updateObject(n.uuid, `material.${i}.${u}.value`, E);
|
1713
|
+
const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
|
1714
|
+
C !== void 0 && Z(C, `material.${i}.${u}.value`, E);
|
1700
1715
|
}
|
1701
1716
|
});
|
1702
1717
|
break;
|
@@ -1708,7 +1723,7 @@ function It(t, n, r) {
|
|
1708
1723
|
});
|
1709
1724
|
}
|
1710
1725
|
else
|
1711
|
-
|
1726
|
+
c !== void 0 && console.log("other:", i, l, c);
|
1712
1727
|
}
|
1713
1728
|
return e.sort((i, l) => i.title < l.title ? -1 : i.title > l.title ? 1 : 0), e.push({
|
1714
1729
|
title: "Update Material",
|
@@ -1718,90 +1733,90 @@ function It(t, n, r) {
|
|
1718
1733
|
}
|
1719
1734
|
}), e;
|
1720
1735
|
}
|
1721
|
-
function
|
1736
|
+
function Jn(t, n) {
|
1722
1737
|
const r = t.material;
|
1723
1738
|
if (Array.isArray(r)) {
|
1724
1739
|
const e = [], i = r.length;
|
1725
1740
|
for (let l = 0; l < i; l++)
|
1726
1741
|
e.push(
|
1727
|
-
/* @__PURE__ */
|
1742
|
+
/* @__PURE__ */ d.jsx(
|
1728
1743
|
Ae,
|
1729
1744
|
{
|
1730
1745
|
title: `Material ${l}`,
|
1731
|
-
items:
|
1746
|
+
items: Nt(r[l], t, n)
|
1732
1747
|
}
|
1733
1748
|
)
|
1734
1749
|
);
|
1735
|
-
return /* @__PURE__ */
|
1750
|
+
return /* @__PURE__ */ d.jsx(d.Fragment, { children: e });
|
1736
1751
|
} else
|
1737
|
-
return /* @__PURE__ */
|
1752
|
+
return /* @__PURE__ */ d.jsx(
|
1738
1753
|
Ae,
|
1739
1754
|
{
|
1740
1755
|
title: "Material",
|
1741
|
-
items:
|
1756
|
+
items: Nt(r, t, n)
|
1742
1757
|
}
|
1743
1758
|
);
|
1744
1759
|
}
|
1745
1760
|
function Xe(t) {
|
1746
1761
|
let n = t.value;
|
1747
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
1748
|
-
const [r, e] = re(n), i = Se(null), l = Se(null),
|
1762
|
+
n !== void 0 && n.isColor !== void 0 && (n = _n(t.value));
|
1763
|
+
const [r, e] = re(n), i = Se(null), l = Se(null), c = Se(null);
|
1749
1764
|
qe(() => {
|
1750
|
-
var
|
1751
|
-
let m = !1,
|
1752
|
-
const
|
1753
|
-
m = !0, E = C,
|
1754
|
-
},
|
1765
|
+
var O;
|
1766
|
+
let m = !1, g = -1, E = 0, C = Number(r);
|
1767
|
+
const R = (j) => {
|
1768
|
+
m = !0, E = C, g = j.clientX;
|
1769
|
+
}, D = (j) => {
|
1755
1770
|
if (!m)
|
1756
1771
|
return;
|
1757
|
-
const z = t.step !== void 0 ? t.step : 1, ee = (j.clientX -
|
1772
|
+
const z = t.step !== void 0 ? t.step : 1, ee = (j.clientX - g) * z;
|
1758
1773
|
C = Number((E + ee).toFixed(4)), l.current !== null && (l.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
|
1759
1774
|
}, y = () => {
|
1760
1775
|
m = !1;
|
1761
|
-
},
|
1776
|
+
}, b = () => {
|
1762
1777
|
m = !1;
|
1763
|
-
},
|
1764
|
-
return
|
1778
|
+
}, v = t.type === "number";
|
1779
|
+
return v && ((O = i.current) == null || O.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", D, !1), document.addEventListener("contextmenu", b, !1)), () => {
|
1765
1780
|
var j;
|
1766
|
-
|
1781
|
+
v && ((j = i.current) == null || j.removeEventListener("mousedown", R), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", D), document.removeEventListener("contextmenu", b));
|
1767
1782
|
};
|
1768
1783
|
}, [r]);
|
1769
1784
|
const s = t.type === "string" && (r.length > 100 || r.search(`
|
1770
|
-
`) > -1),
|
1771
|
-
let
|
1772
|
-
t.type === "boolean" && (
|
1785
|
+
`) > -1), u = s || t.type === "image", h = (m) => {
|
1786
|
+
let g = m.target.value;
|
1787
|
+
t.type === "boolean" && (g = m.target.checked), e(g), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
|
1773
1788
|
};
|
1774
|
-
return /* @__PURE__ */
|
1775
|
-
t.type !== "button" && /* @__PURE__ */
|
1776
|
-
t.type === "string" && !s && /* @__PURE__ */
|
1789
|
+
return /* @__PURE__ */ d.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
|
1790
|
+
t.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: i, children: t.title }, "fieldLabel"),
|
1791
|
+
t.type === "string" && !s && /* @__PURE__ */ d.jsx(
|
1777
1792
|
"input",
|
1778
1793
|
{
|
1779
1794
|
type: "text",
|
1780
1795
|
disabled: t.disabled,
|
1781
|
-
onChange:
|
1796
|
+
onChange: h,
|
1782
1797
|
value: r
|
1783
1798
|
}
|
1784
1799
|
),
|
1785
|
-
t.type === "string" && s && /* @__PURE__ */
|
1800
|
+
t.type === "string" && s && /* @__PURE__ */ d.jsx(
|
1786
1801
|
"textarea",
|
1787
1802
|
{
|
1788
1803
|
cols: 50,
|
1789
1804
|
rows: 10,
|
1790
1805
|
disabled: !0,
|
1791
|
-
onChange:
|
1806
|
+
onChange: h,
|
1792
1807
|
value: r
|
1793
1808
|
}
|
1794
1809
|
),
|
1795
|
-
t.type === "boolean" && /* @__PURE__ */
|
1810
|
+
t.type === "boolean" && /* @__PURE__ */ d.jsx(
|
1796
1811
|
"input",
|
1797
1812
|
{
|
1798
1813
|
type: "checkbox",
|
1799
1814
|
disabled: t.disabled,
|
1800
|
-
onChange:
|
1815
|
+
onChange: h,
|
1801
1816
|
checked: r
|
1802
1817
|
}
|
1803
1818
|
),
|
1804
|
-
t.type === "number" && /* @__PURE__ */
|
1819
|
+
t.type === "number" && /* @__PURE__ */ d.jsx(
|
1805
1820
|
"input",
|
1806
1821
|
{
|
1807
1822
|
ref: l,
|
@@ -1810,12 +1825,12 @@ function Xe(t) {
|
|
1810
1825
|
min: t.min,
|
1811
1826
|
max: t.max,
|
1812
1827
|
step: t.step,
|
1813
|
-
onChange:
|
1828
|
+
onChange: h
|
1814
1829
|
}
|
1815
1830
|
),
|
1816
|
-
t.type === "range" && /* @__PURE__ */
|
1817
|
-
/* @__PURE__ */
|
1818
|
-
/* @__PURE__ */
|
1831
|
+
t.type === "range" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
1832
|
+
/* @__PURE__ */ d.jsx("input", { type: "text", value: r.toString(), onChange: h, className: "min" }),
|
1833
|
+
/* @__PURE__ */ d.jsx(
|
1819
1834
|
"input",
|
1820
1835
|
{
|
1821
1836
|
disabled: t.disabled,
|
@@ -1824,15 +1839,15 @@ function Xe(t) {
|
|
1824
1839
|
min: t.min,
|
1825
1840
|
max: t.max,
|
1826
1841
|
step: t.step,
|
1827
|
-
onChange:
|
1842
|
+
onChange: h
|
1828
1843
|
}
|
1829
1844
|
)
|
1830
1845
|
] }),
|
1831
|
-
t.type === "color" && /* @__PURE__ */
|
1832
|
-
/* @__PURE__ */
|
1833
|
-
/* @__PURE__ */
|
1846
|
+
t.type === "color" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
1847
|
+
/* @__PURE__ */ d.jsx("input", { type: "text", value: r.toString(), onChange: h, className: "color" }),
|
1848
|
+
/* @__PURE__ */ d.jsx("input", { type: "color", value: r, onChange: h })
|
1834
1849
|
] }),
|
1835
|
-
t.type === "button" && /* @__PURE__ */
|
1850
|
+
t.type === "button" && /* @__PURE__ */ d.jsx(
|
1836
1851
|
"button",
|
1837
1852
|
{
|
1838
1853
|
onClick: () => {
|
@@ -1841,14 +1856,14 @@ function Xe(t) {
|
|
1841
1856
|
children: t.title
|
1842
1857
|
}
|
1843
1858
|
),
|
1844
|
-
t.type === "image" && /* @__PURE__ */
|
1845
|
-
|
1846
|
-
|
1859
|
+
t.type === "image" && /* @__PURE__ */ d.jsx("img", { ref: c, onClick: () => {
|
1860
|
+
Zn().then((m) => {
|
1861
|
+
c.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
|
1847
1862
|
});
|
1848
|
-
}, src: r.length > 0 ? r :
|
1863
|
+
}, src: r.length > 0 ? r : Hn })
|
1849
1864
|
] });
|
1850
1865
|
}
|
1851
|
-
function
|
1866
|
+
function Lt(t) {
|
1852
1867
|
switch (t) {
|
1853
1868
|
case "fov":
|
1854
1869
|
return "FOV";
|
@@ -1877,12 +1892,12 @@ function Nt(t) {
|
|
1877
1892
|
}
|
1878
1893
|
return t;
|
1879
1894
|
}
|
1880
|
-
function
|
1895
|
+
function Qn(t, n) {
|
1881
1896
|
const r = [];
|
1882
1897
|
if (t.perspectiveCameraInfo !== void 0)
|
1883
1898
|
for (const e in t.perspectiveCameraInfo)
|
1884
1899
|
r.push({
|
1885
|
-
title:
|
1900
|
+
title: Lt(e),
|
1886
1901
|
prop: e,
|
1887
1902
|
type: "number",
|
1888
1903
|
step: 0.01,
|
@@ -1890,14 +1905,14 @@ function Zn(t, n) {
|
|
1890
1905
|
onChange: (i, l) => {
|
1891
1906
|
var s;
|
1892
1907
|
n.updateObject(t.uuid, i, l), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
1893
|
-
const
|
1894
|
-
|
1908
|
+
const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
|
1909
|
+
c !== void 0 && (Z(c, i, l), c.updateProjectionMatrix());
|
1895
1910
|
}
|
1896
1911
|
});
|
1897
1912
|
else if (t.orthographicCameraInfo !== void 0)
|
1898
1913
|
for (const e in t.orthographicCameraInfo)
|
1899
1914
|
r.push({
|
1900
|
-
title:
|
1915
|
+
title: Lt(e),
|
1901
1916
|
prop: e,
|
1902
1917
|
type: "number",
|
1903
1918
|
step: 0.01,
|
@@ -1905,11 +1920,11 @@ function Zn(t, n) {
|
|
1905
1920
|
onChange: (i, l) => {
|
1906
1921
|
var s;
|
1907
1922
|
n.updateObject(t.uuid, i, l), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
1908
|
-
const
|
1909
|
-
|
1923
|
+
const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
|
1924
|
+
c !== void 0 && (Z(c, i, l), c.updateProjectionMatrix());
|
1910
1925
|
}
|
1911
1926
|
});
|
1912
|
-
return /* @__PURE__ */
|
1927
|
+
return /* @__PURE__ */ d.jsx(
|
1913
1928
|
Ae,
|
1914
1929
|
{
|
1915
1930
|
title: "Camera",
|
@@ -1917,16 +1932,16 @@ function Zn(t, n) {
|
|
1917
1932
|
}
|
1918
1933
|
);
|
1919
1934
|
}
|
1920
|
-
function
|
1921
|
-
const r = new
|
1935
|
+
function ea(t, n) {
|
1936
|
+
const r = new fn();
|
1922
1937
|
r.elements = t.matrix;
|
1923
|
-
const e = new G(), i = new
|
1938
|
+
const e = new G(), i = new hn(), l = new G();
|
1924
1939
|
t.uuid.length > 0 && (e.setFromMatrixPosition(r), i.setFromRotationMatrix(r), l.setFromMatrixScale(r));
|
1925
|
-
const
|
1926
|
-
var
|
1927
|
-
n.updateObject(t.uuid,
|
1928
|
-
const m = (
|
1929
|
-
m !== void 0 && Z(m,
|
1940
|
+
const c = (u, h) => {
|
1941
|
+
var g;
|
1942
|
+
n.updateObject(t.uuid, u, h);
|
1943
|
+
const m = (g = n.scene) == null ? void 0 : g.getObjectByProperty("uuid", t.uuid);
|
1944
|
+
m !== void 0 && Z(m, u, h);
|
1930
1945
|
}, s = [
|
1931
1946
|
{
|
1932
1947
|
title: "Position",
|
@@ -1936,21 +1951,21 @@ function Jn(t, n) {
|
|
1936
1951
|
prop: "position.x",
|
1937
1952
|
type: "number",
|
1938
1953
|
value: e.x,
|
1939
|
-
onChange:
|
1954
|
+
onChange: c
|
1940
1955
|
},
|
1941
1956
|
{
|
1942
1957
|
title: "Y",
|
1943
1958
|
prop: "position.y",
|
1944
1959
|
type: "number",
|
1945
1960
|
value: e.y,
|
1946
|
-
onChange:
|
1961
|
+
onChange: c
|
1947
1962
|
},
|
1948
1963
|
{
|
1949
1964
|
title: "Z",
|
1950
1965
|
prop: "position.z",
|
1951
1966
|
type: "number",
|
1952
1967
|
value: e.z,
|
1953
|
-
onChange:
|
1968
|
+
onChange: c
|
1954
1969
|
}
|
1955
1970
|
]
|
1956
1971
|
},
|
@@ -1965,7 +1980,7 @@ function Jn(t, n) {
|
|
1965
1980
|
min: -Math.PI,
|
1966
1981
|
max: Math.PI,
|
1967
1982
|
step: 0.01,
|
1968
|
-
onChange:
|
1983
|
+
onChange: c
|
1969
1984
|
},
|
1970
1985
|
{
|
1971
1986
|
title: "Y",
|
@@ -1975,7 +1990,7 @@ function Jn(t, n) {
|
|
1975
1990
|
min: -Math.PI,
|
1976
1991
|
max: Math.PI,
|
1977
1992
|
step: 0.01,
|
1978
|
-
onChange:
|
1993
|
+
onChange: c
|
1979
1994
|
},
|
1980
1995
|
{
|
1981
1996
|
title: "Z",
|
@@ -1985,7 +2000,7 @@ function Jn(t, n) {
|
|
1985
2000
|
min: -Math.PI,
|
1986
2001
|
max: Math.PI,
|
1987
2002
|
step: 0.01,
|
1988
|
-
onChange:
|
2003
|
+
onChange: c
|
1989
2004
|
}
|
1990
2005
|
]
|
1991
2006
|
},
|
@@ -1998,7 +2013,7 @@ function Jn(t, n) {
|
|
1998
2013
|
type: "number",
|
1999
2014
|
value: l.x,
|
2000
2015
|
step: 0.01,
|
2001
|
-
onChange:
|
2016
|
+
onChange: c
|
2002
2017
|
},
|
2003
2018
|
{
|
2004
2019
|
title: "Y",
|
@@ -2006,7 +2021,7 @@ function Jn(t, n) {
|
|
2006
2021
|
type: "number",
|
2007
2022
|
value: l.y,
|
2008
2023
|
step: 0.01,
|
2009
|
-
onChange:
|
2024
|
+
onChange: c
|
2010
2025
|
},
|
2011
2026
|
{
|
2012
2027
|
title: "Z",
|
@@ -2014,12 +2029,12 @@ function Jn(t, n) {
|
|
2014
2029
|
type: "number",
|
2015
2030
|
value: l.z,
|
2016
2031
|
step: 0.01,
|
2017
|
-
onChange:
|
2032
|
+
onChange: c
|
2018
2033
|
}
|
2019
2034
|
]
|
2020
2035
|
}
|
2021
2036
|
];
|
2022
|
-
return /* @__PURE__ */
|
2037
|
+
return /* @__PURE__ */ d.jsx(
|
2023
2038
|
Ae,
|
2024
2039
|
{
|
2025
2040
|
title: "Transform",
|
@@ -2027,7 +2042,7 @@ function Jn(t, n) {
|
|
2027
2042
|
}
|
2028
2043
|
);
|
2029
2044
|
}
|
2030
|
-
function
|
2045
|
+
function Ft(t) {
|
2031
2046
|
switch (t) {
|
2032
2047
|
case "color":
|
2033
2048
|
return "Color";
|
@@ -2046,38 +2061,38 @@ function Lt(t) {
|
|
2046
2061
|
}
|
2047
2062
|
return t;
|
2048
2063
|
}
|
2049
|
-
function
|
2064
|
+
function ta(t, n) {
|
2050
2065
|
const r = [];
|
2051
2066
|
if (t.lightInfo !== void 0)
|
2052
2067
|
for (const e in t.lightInfo) {
|
2053
2068
|
const i = t.lightInfo[e];
|
2054
2069
|
i !== void 0 && (i.isColor !== void 0 ? r.push({
|
2055
|
-
title:
|
2070
|
+
title: Ft(e),
|
2056
2071
|
prop: e,
|
2057
2072
|
type: "color",
|
2058
2073
|
value: i,
|
2059
|
-
onChange: (l,
|
2060
|
-
var
|
2061
|
-
const s = new St(
|
2074
|
+
onChange: (l, c) => {
|
2075
|
+
var h;
|
2076
|
+
const s = new St(c);
|
2062
2077
|
n.updateObject(t.uuid, l, s);
|
2063
|
-
const
|
2064
|
-
|
2078
|
+
const u = (h = n.scene) == null ? void 0 : h.getObjectByProperty("uuid", t.uuid);
|
2079
|
+
u !== void 0 && Z(u, l, s);
|
2065
2080
|
}
|
2066
2081
|
}) : r.push({
|
2067
|
-
title:
|
2082
|
+
title: Ft(e),
|
2068
2083
|
prop: e,
|
2069
2084
|
type: typeof i,
|
2070
2085
|
value: i,
|
2071
2086
|
step: typeof i == "number" ? 0.01 : void 0,
|
2072
|
-
onChange: (l,
|
2073
|
-
var
|
2074
|
-
n.updateObject(t.uuid, l,
|
2075
|
-
const s = (
|
2076
|
-
s !== void 0 && Z(s, l,
|
2087
|
+
onChange: (l, c) => {
|
2088
|
+
var u;
|
2089
|
+
n.updateObject(t.uuid, l, c);
|
2090
|
+
const s = (u = n.scene) == null ? void 0 : u.getObjectByProperty("uuid", t.uuid);
|
2091
|
+
s !== void 0 && Z(s, l, c);
|
2077
2092
|
}
|
2078
2093
|
}));
|
2079
2094
|
}
|
2080
|
-
return /* @__PURE__ */
|
2095
|
+
return /* @__PURE__ */ d.jsx(
|
2081
2096
|
Ae,
|
2082
2097
|
{
|
2083
2098
|
title: "Light",
|
@@ -2085,7 +2100,7 @@ function Qn(t, n) {
|
|
2085
2100
|
}
|
2086
2101
|
);
|
2087
2102
|
}
|
2088
|
-
function
|
2103
|
+
function na(t) {
|
2089
2104
|
const [n, r] = re(-1), [e, i] = re({
|
2090
2105
|
name: "",
|
2091
2106
|
uuid: "",
|
@@ -2094,15 +2109,15 @@ function ea(t) {
|
|
2094
2109
|
matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
|
2095
2110
|
});
|
2096
2111
|
return qe(() => {
|
2097
|
-
function l(
|
2098
|
-
const s =
|
2112
|
+
function l(c) {
|
2113
|
+
const s = c.value;
|
2099
2114
|
i(s), r(Date.now());
|
2100
2115
|
}
|
2101
2116
|
return I.addEventListener(N.SET_OBJECT, l), () => {
|
2102
2117
|
I.removeEventListener(N.SET_OBJECT, l);
|
2103
2118
|
};
|
2104
|
-
}, []), /* @__PURE__ */
|
2105
|
-
/* @__PURE__ */
|
2119
|
+
}, []), /* @__PURE__ */ d.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
2120
|
+
/* @__PURE__ */ d.jsx(
|
2106
2121
|
Xe,
|
2107
2122
|
{
|
2108
2123
|
type: "string",
|
@@ -2112,7 +2127,7 @@ function ea(t) {
|
|
2112
2127
|
disabled: !0
|
2113
2128
|
}
|
2114
2129
|
),
|
2115
|
-
/* @__PURE__ */
|
2130
|
+
/* @__PURE__ */ d.jsx(
|
2116
2131
|
Xe,
|
2117
2132
|
{
|
2118
2133
|
type: "string",
|
@@ -2122,7 +2137,7 @@ function ea(t) {
|
|
2122
2137
|
disabled: !0
|
2123
2138
|
}
|
2124
2139
|
),
|
2125
|
-
/* @__PURE__ */
|
2140
|
+
/* @__PURE__ */ d.jsx(
|
2126
2141
|
Xe,
|
2127
2142
|
{
|
2128
2143
|
type: "string",
|
@@ -2132,25 +2147,25 @@ function ea(t) {
|
|
2132
2147
|
disabled: !0
|
2133
2148
|
}
|
2134
2149
|
),
|
2135
|
-
/* @__PURE__ */
|
2150
|
+
/* @__PURE__ */ d.jsx(
|
2136
2151
|
Xe,
|
2137
2152
|
{
|
2138
2153
|
type: "boolean",
|
2139
2154
|
title: "Visible",
|
2140
2155
|
prop: "visible",
|
2141
2156
|
value: e.visible,
|
2142
|
-
onChange: (l,
|
2143
|
-
t.three.updateObject(e.uuid, l,
|
2157
|
+
onChange: (l, c) => {
|
2158
|
+
t.three.updateObject(e.uuid, l, c);
|
2144
2159
|
}
|
2145
2160
|
}
|
2146
2161
|
),
|
2147
|
-
|
2148
|
-
e.type.search("Camera") > -1 ?
|
2149
|
-
e.type.search("Light") > -1 ?
|
2150
|
-
e.material !== void 0 ?
|
2162
|
+
ea(e, t.three),
|
2163
|
+
e.type.search("Camera") > -1 ? Qn(e, t.three) : null,
|
2164
|
+
e.type.search("Light") > -1 ? ta(e, t.three) : null,
|
2165
|
+
e.material !== void 0 ? Jn(e, t.three) : null
|
2151
2166
|
] }) }, n);
|
2152
2167
|
}
|
2153
|
-
class
|
2168
|
+
class Pa extends jn {
|
2154
2169
|
constructor(r) {
|
2155
2170
|
super(r);
|
2156
2171
|
$(this, "three");
|
@@ -2176,17 +2191,17 @@ class Ca extends Pn {
|
|
2176
2191
|
render() {
|
2177
2192
|
var i;
|
2178
2193
|
const r = this.componentState.scene !== null, e = "Hierarchy" + (r ? `: ${(i = this.componentState.scene) == null ? void 0 : i.name}` : "");
|
2179
|
-
return /* @__PURE__ */
|
2180
|
-
r && /* @__PURE__ */
|
2194
|
+
return /* @__PURE__ */ d.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
2195
|
+
r && /* @__PURE__ */ d.jsx(
|
2181
2196
|
wt,
|
2182
2197
|
{
|
2183
2198
|
label: e,
|
2184
|
-
button: /* @__PURE__ */
|
2199
|
+
button: /* @__PURE__ */ d.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
|
2185
2200
|
open: !0,
|
2186
|
-
children: /* @__PURE__ */
|
2201
|
+
children: /* @__PURE__ */ d.jsx(Wn, { child: this.componentState.scene, three: this.three })
|
2187
2202
|
}
|
2188
2203
|
),
|
2189
|
-
/* @__PURE__ */
|
2204
|
+
/* @__PURE__ */ d.jsx(wt, { label: "Inspector", children: /* @__PURE__ */ d.jsx(na, { three: this.three }, "Inspector") })
|
2190
2205
|
] }) }, "SceneHierarchy");
|
2191
2206
|
}
|
2192
2207
|
// Getters / Setters
|
@@ -2194,38 +2209,38 @@ class Ca extends Pn {
|
|
2194
2209
|
return this.state;
|
2195
2210
|
}
|
2196
2211
|
}
|
2197
|
-
function
|
2212
|
+
function Ra(t) {
|
2198
2213
|
const n = (s) => {
|
2199
|
-
const
|
2200
|
-
|
2201
|
-
}, r = (s,
|
2214
|
+
const u = t.scene.getObjectByProperty("uuid", s.value);
|
2215
|
+
u !== void 0 && t.three.setObject(u);
|
2216
|
+
}, r = (s, u, h) => {
|
2202
2217
|
const m = t.scene.getObjectByProperty("uuid", s);
|
2203
|
-
m !== void 0 && Z(m,
|
2218
|
+
m !== void 0 && Z(m, u, h);
|
2204
2219
|
}, e = (s) => {
|
2205
|
-
const
|
2206
|
-
r(
|
2220
|
+
const u = s.value, { key: h, value: m, uuid: g } = u;
|
2221
|
+
r(g, h, m);
|
2207
2222
|
}, i = (s) => {
|
2208
|
-
const
|
2209
|
-
yt(
|
2210
|
-
r(
|
2223
|
+
const u = s.value;
|
2224
|
+
yt(u.value).then((h) => {
|
2225
|
+
r(u.uuid, u.key, h), r(u.uuid, "material.needsUpdate", !0);
|
2211
2226
|
});
|
2212
2227
|
}, l = () => {
|
2213
2228
|
t.three.setScene(t.scene);
|
2214
|
-
},
|
2215
|
-
const { key:
|
2216
|
-
if (
|
2229
|
+
}, c = (s) => {
|
2230
|
+
const { key: u, uuid: h, value: m } = s.value, g = t.scene.getObjectByProperty("uuid", h);
|
2231
|
+
if (g !== void 0)
|
2217
2232
|
try {
|
2218
|
-
|
2233
|
+
g[u](m);
|
2219
2234
|
} catch (E) {
|
2220
|
-
console.log("Error requesting method:"), console.log(E), console.log(
|
2235
|
+
console.log("Error requesting method:"), console.log(E), console.log(u), console.log(m);
|
2221
2236
|
}
|
2222
2237
|
};
|
2223
|
-
return qe(() => (I.addEventListener(N.GET_OBJECT, n), I.addEventListener(N.GET_SCENE, l), I.addEventListener(N.UPDATE_OBJECT, e), I.addEventListener(N.CREATE_TEXTURE, i), I.addEventListener(N.REQUEST_METHOD,
|
2224
|
-
I.removeEventListener(N.GET_OBJECT, n), I.removeEventListener(N.GET_SCENE, l), I.removeEventListener(N.UPDATE_OBJECT, e), I.removeEventListener(N.CREATE_TEXTURE, i), I.removeEventListener(N.REQUEST_METHOD,
|
2238
|
+
return qe(() => (I.addEventListener(N.GET_OBJECT, n), I.addEventListener(N.GET_SCENE, l), I.addEventListener(N.UPDATE_OBJECT, e), I.addEventListener(N.CREATE_TEXTURE, i), I.addEventListener(N.REQUEST_METHOD, c), () => {
|
2239
|
+
I.removeEventListener(N.GET_OBJECT, n), I.removeEventListener(N.GET_SCENE, l), I.removeEventListener(N.UPDATE_OBJECT, e), I.removeEventListener(N.CREATE_TEXTURE, i), I.removeEventListener(N.REQUEST_METHOD, c);
|
2225
2240
|
}), []), null;
|
2226
2241
|
}
|
2227
|
-
const
|
2228
|
-
class
|
2242
|
+
const Ut = { type: "change" }, vt = { type: "start" }, Bt = { type: "end" }, ct = new mn(), $t = new pn(), aa = Math.cos(70 * gn.DEG2RAD);
|
2243
|
+
class ra extends Yt {
|
2229
2244
|
constructor(n, r) {
|
2230
2245
|
super(), this.object = n, this.domElement = r, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new G(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 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: De.ROTATE, MIDDLE: De.DOLLY, RIGHT: De.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2231
2246
|
return s.phi;
|
@@ -2240,33 +2255,33 @@ class na extends Gt {
|
|
2240
2255
|
}, this.saveState = function() {
|
2241
2256
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2242
2257
|
}, this.reset = function() {
|
2243
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(
|
2258
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ut), e.update(), l = i.NONE;
|
2244
2259
|
}, this.update = function() {
|
2245
2260
|
const o = new G(), w = new Mt().setFromUnitVectors(n.up, new G(0, 1, 0)), F = w.clone().invert(), U = new G(), K = new Mt(), fe = new G(), ie = 2 * Math.PI;
|
2246
2261
|
return function() {
|
2247
2262
|
const ze = e.object.position;
|
2248
|
-
o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && l === i.NONE && M(Te()), e.enableDamping ? (s.theta +=
|
2263
|
+
o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && l === i.NONE && M(Te()), e.enableDamping ? (s.theta += u.theta * e.dampingFactor, s.phi += u.phi * e.dampingFactor) : (s.theta += u.theta, s.phi += u.phi);
|
2249
2264
|
let W = e.minAzimuthAngle, Q = e.maxAzimuthAngle;
|
2250
|
-
isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Re(s.radius) : s.radius = Re(s.radius *
|
2265
|
+
isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Re(s.radius) : s.radius = Re(s.radius * h), o.setFromSpherical(s), o.applyQuaternion(F), ze.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), m.set(0, 0, 0));
|
2251
2266
|
let he = !1;
|
2252
2267
|
if (e.zoomToCursor && ee) {
|
2253
2268
|
let me = null;
|
2254
2269
|
if (e.object.isPerspectiveCamera) {
|
2255
2270
|
const Ee = o.length();
|
2256
|
-
me = Re(Ee *
|
2271
|
+
me = Re(Ee * h);
|
2257
2272
|
const we = Ee - me;
|
2258
2273
|
e.object.position.addScaledVector(j, we), e.object.updateMatrixWorld();
|
2259
2274
|
} else if (e.object.isOrthographicCamera) {
|
2260
2275
|
const Ee = new G(z.x, z.y, 0);
|
2261
|
-
Ee.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom /
|
2276
|
+
Ee.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0;
|
2262
2277
|
const we = new G(z.x, z.y, 0);
|
2263
2278
|
we.unproject(e.object), e.object.position.sub(we).add(Ee), e.object.updateMatrixWorld(), me = o.length();
|
2264
2279
|
} else
|
2265
2280
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2266
|
-
me !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(me).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) <
|
2281
|
+
me !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(me).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) < aa ? n.lookAt(e.target) : ($t.setFromNormalAndCoplanarPoint(e.object.up, e.target), ct.intersectPlane($t, e.target))));
|
2267
2282
|
} else
|
2268
|
-
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom /
|
2269
|
-
return
|
2283
|
+
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0);
|
2284
|
+
return h = 1, ee = !1, he || U.distanceToSquared(e.object.position) > c || 8 * (1 - K.dot(e.object.quaternion)) > c || fe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Ut), U.copy(e.object.position), K.copy(e.object.quaternion), fe.copy(e.target), he = !1, !0) : !1;
|
2270
2285
|
};
|
2271
2286
|
}(), this.dispose = function() {
|
2272
2287
|
e.domElement.removeEventListener("contextmenu", de), e.domElement.removeEventListener("pointerdown", $e), e.domElement.removeEventListener("pointercancel", be), e.domElement.removeEventListener("wheel", at), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Ye), e._domElementKeyEvents = null);
|
@@ -2282,11 +2297,11 @@ class na extends Gt {
|
|
2282
2297
|
TOUCH_DOLLY_ROTATE: 6
|
2283
2298
|
};
|
2284
2299
|
let l = i.NONE;
|
2285
|
-
const
|
2286
|
-
let
|
2287
|
-
const m = new G(),
|
2300
|
+
const c = 1e-6, s = new kt(), u = new kt();
|
2301
|
+
let h = 1;
|
2302
|
+
const m = new G(), g = new ae(), E = new ae(), C = new ae(), R = new ae(), D = new ae(), y = new ae(), b = new ae(), v = new ae(), O = new ae(), j = new G(), z = new ae();
|
2288
2303
|
let ee = !1;
|
2289
|
-
const
|
2304
|
+
const T = [], le = {};
|
2290
2305
|
function Te() {
|
2291
2306
|
return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2292
2307
|
}
|
@@ -2294,10 +2309,10 @@ class na extends Gt {
|
|
2294
2309
|
return Math.pow(0.95, e.zoomSpeed);
|
2295
2310
|
}
|
2296
2311
|
function M(o) {
|
2297
|
-
|
2312
|
+
u.theta -= o;
|
2298
2313
|
}
|
2299
2314
|
function A(o) {
|
2300
|
-
|
2315
|
+
u.phi -= o;
|
2301
2316
|
}
|
2302
2317
|
const L = function() {
|
2303
2318
|
const o = new G();
|
@@ -2323,10 +2338,10 @@ class na extends Gt {
|
|
2323
2338
|
};
|
2324
2339
|
}();
|
2325
2340
|
function Pe(o) {
|
2326
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
2341
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2327
2342
|
}
|
2328
2343
|
function Ie(o) {
|
2329
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
2344
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2330
2345
|
}
|
2331
2346
|
function Ne(o) {
|
2332
2347
|
if (!e.zoomToCursor)
|
@@ -2339,24 +2354,24 @@ class na extends Gt {
|
|
2339
2354
|
return Math.max(e.minDistance, Math.min(e.maxDistance, o));
|
2340
2355
|
}
|
2341
2356
|
function Le(o) {
|
2342
|
-
|
2357
|
+
g.set(o.clientX, o.clientY);
|
2343
2358
|
}
|
2344
2359
|
function Ze(o) {
|
2345
|
-
Ne(o),
|
2360
|
+
Ne(o), b.set(o.clientX, o.clientY);
|
2346
2361
|
}
|
2347
2362
|
function Fe(o) {
|
2348
|
-
|
2363
|
+
R.set(o.clientX, o.clientY);
|
2349
2364
|
}
|
2350
2365
|
function Je(o) {
|
2351
|
-
E.set(o.clientX, o.clientY), C.subVectors(E,
|
2366
|
+
E.set(o.clientX, o.clientY), C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
|
2352
2367
|
const w = e.domElement;
|
2353
|
-
M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight),
|
2368
|
+
M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E), e.update();
|
2354
2369
|
}
|
2355
2370
|
function ft(o) {
|
2356
|
-
|
2371
|
+
v.set(o.clientX, o.clientY), O.subVectors(v, b), O.y > 0 ? Pe(oe()) : O.y < 0 && Ie(oe()), b.copy(v), e.update();
|
2357
2372
|
}
|
2358
2373
|
function ht(o) {
|
2359
|
-
|
2374
|
+
D.set(o.clientX, o.clientY), y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D), e.update();
|
2360
2375
|
}
|
2361
2376
|
function Ue(o) {
|
2362
2377
|
Ne(o), o.deltaY < 0 ? Ie(oe()) : o.deltaY > 0 && Pe(oe()), e.update();
|
@@ -2380,24 +2395,24 @@ class na extends Gt {
|
|
2380
2395
|
w && (o.preventDefault(), e.update());
|
2381
2396
|
}
|
2382
2397
|
function pe() {
|
2383
|
-
if (
|
2384
|
-
|
2398
|
+
if (T.length === 1)
|
2399
|
+
g.set(T[0].pageX, T[0].pageY);
|
2385
2400
|
else {
|
2386
|
-
const o = 0.5 * (
|
2387
|
-
|
2401
|
+
const o = 0.5 * (T[0].pageX + T[1].pageX), w = 0.5 * (T[0].pageY + T[1].pageY);
|
2402
|
+
g.set(o, w);
|
2388
2403
|
}
|
2389
2404
|
}
|
2390
2405
|
function je() {
|
2391
|
-
if (
|
2392
|
-
|
2406
|
+
if (T.length === 1)
|
2407
|
+
R.set(T[0].pageX, T[0].pageY);
|
2393
2408
|
else {
|
2394
|
-
const o = 0.5 * (
|
2395
|
-
|
2409
|
+
const o = 0.5 * (T[0].pageX + T[1].pageX), w = 0.5 * (T[0].pageY + T[1].pageY);
|
2410
|
+
R.set(o, w);
|
2396
2411
|
}
|
2397
2412
|
}
|
2398
2413
|
function ge() {
|
2399
|
-
const o =
|
2400
|
-
|
2414
|
+
const o = T[0].pageX - T[1].pageX, w = T[0].pageY - T[1].pageY, F = Math.sqrt(o * o + w * w);
|
2415
|
+
b.set(0, F);
|
2401
2416
|
}
|
2402
2417
|
function mt() {
|
2403
2418
|
e.enableZoom && ge(), e.enablePan && je();
|
@@ -2406,28 +2421,28 @@ class na extends Gt {
|
|
2406
2421
|
e.enableZoom && ge(), e.enableRotate && pe();
|
2407
2422
|
}
|
2408
2423
|
function et(o) {
|
2409
|
-
if (
|
2424
|
+
if (T.length == 1)
|
2410
2425
|
E.set(o.pageX, o.pageY);
|
2411
2426
|
else {
|
2412
2427
|
const F = ye(o), U = 0.5 * (o.pageX + F.x), K = 0.5 * (o.pageY + F.y);
|
2413
2428
|
E.set(U, K);
|
2414
2429
|
}
|
2415
|
-
C.subVectors(E,
|
2430
|
+
C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
|
2416
2431
|
const w = e.domElement;
|
2417
|
-
M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight),
|
2432
|
+
M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E);
|
2418
2433
|
}
|
2419
2434
|
function tt(o) {
|
2420
|
-
if (
|
2421
|
-
|
2435
|
+
if (T.length === 1)
|
2436
|
+
D.set(o.pageX, o.pageY);
|
2422
2437
|
else {
|
2423
2438
|
const w = ye(o), F = 0.5 * (o.pageX + w.x), U = 0.5 * (o.pageY + w.y);
|
2424
|
-
|
2439
|
+
D.set(F, U);
|
2425
2440
|
}
|
2426
|
-
y.subVectors(
|
2441
|
+
y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D);
|
2427
2442
|
}
|
2428
2443
|
function ve(o) {
|
2429
2444
|
const w = ye(o), F = o.pageX - w.x, U = o.pageY - w.y, K = Math.sqrt(F * F + U * U);
|
2430
|
-
|
2445
|
+
v.set(0, K), O.set(0, Math.pow(v.y / b.y, e.zoomSpeed)), Pe(O.y), b.copy(v);
|
2431
2446
|
}
|
2432
2447
|
function Me(o) {
|
2433
2448
|
e.enableZoom && ve(o), e.enablePan && tt(o);
|
@@ -2436,13 +2451,13 @@ class na extends Gt {
|
|
2436
2451
|
e.enableZoom && ve(o), e.enableRotate && et(o);
|
2437
2452
|
}
|
2438
2453
|
function $e(o) {
|
2439
|
-
e.enabled !== !1 && (
|
2454
|
+
e.enabled !== !1 && (T.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", ue), e.domElement.addEventListener("pointerup", be)), gt(o), o.pointerType === "touch" ? rt(o) : pt(o));
|
2440
2455
|
}
|
2441
2456
|
function ue(o) {
|
2442
2457
|
e.enabled !== !1 && (o.pointerType === "touch" ? it(o) : Ge(o));
|
2443
2458
|
}
|
2444
2459
|
function be(o) {
|
2445
|
-
ot(o),
|
2460
|
+
ot(o), T.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be)), e.dispatchEvent(Bt), l = i.NONE;
|
2446
2461
|
}
|
2447
2462
|
function pt(o) {
|
2448
2463
|
let w;
|
@@ -2512,13 +2527,13 @@ class na extends Gt {
|
|
2512
2527
|
}
|
2513
2528
|
}
|
2514
2529
|
function at(o) {
|
2515
|
-
e.enabled === !1 || e.enableZoom === !1 || l !== i.NONE || (o.preventDefault(), e.dispatchEvent(vt), Ue(o), e.dispatchEvent(
|
2530
|
+
e.enabled === !1 || e.enableZoom === !1 || l !== i.NONE || (o.preventDefault(), e.dispatchEvent(vt), Ue(o), e.dispatchEvent(Bt));
|
2516
2531
|
}
|
2517
2532
|
function Ye(o) {
|
2518
2533
|
e.enabled === !1 || e.enablePan === !1 || Be(o);
|
2519
2534
|
}
|
2520
2535
|
function rt(o) {
|
2521
|
-
switch (Ve(o),
|
2536
|
+
switch (Ve(o), T.length) {
|
2522
2537
|
case 1:
|
2523
2538
|
switch (e.touches.ONE) {
|
2524
2539
|
case _e.ROTATE:
|
@@ -2586,13 +2601,13 @@ class na extends Gt {
|
|
2586
2601
|
e.enabled !== !1 && o.preventDefault();
|
2587
2602
|
}
|
2588
2603
|
function gt(o) {
|
2589
|
-
|
2604
|
+
T.push(o);
|
2590
2605
|
}
|
2591
2606
|
function ot(o) {
|
2592
2607
|
delete le[o.pointerId];
|
2593
|
-
for (let w = 0; w <
|
2594
|
-
if (
|
2595
|
-
|
2608
|
+
for (let w = 0; w < T.length; w++)
|
2609
|
+
if (T[w].pointerId == o.pointerId) {
|
2610
|
+
T.splice(w, 1);
|
2596
2611
|
return;
|
2597
2612
|
}
|
2598
2613
|
}
|
@@ -2601,7 +2616,7 @@ class na extends Gt {
|
|
2601
2616
|
w === void 0 && (w = new ae(), le[o.pointerId] = w), w.set(o.pageX, o.pageY);
|
2602
2617
|
}
|
2603
2618
|
function ye(o) {
|
2604
|
-
const w = o.pointerId ===
|
2619
|
+
const w = o.pointerId === T[0].pointerId ? T[1] : T[0];
|
2605
2620
|
return le[w.pointerId];
|
2606
2621
|
}
|
2607
2622
|
e.domElement.addEventListener("contextmenu", de), e.domElement.addEventListener("pointerdown", $e), e.domElement.addEventListener("pointercancel", be), e.domElement.addEventListener("wheel", at, { passive: !1 }), this.update();
|
@@ -2610,20 +2625,20 @@ class na extends Gt {
|
|
2610
2625
|
const xt = (t) => {
|
2611
2626
|
const [n, r] = re(!1), [e, i] = re(t.options[t.index]), l = () => {
|
2612
2627
|
r(!n);
|
2613
|
-
},
|
2628
|
+
}, c = (s) => {
|
2614
2629
|
s !== e && (t.onSelect(s), i(s)), r(!1);
|
2615
2630
|
};
|
2616
|
-
return /* @__PURE__ */
|
2617
|
-
/* @__PURE__ */
|
2618
|
-
n && /* @__PURE__ */
|
2631
|
+
return /* @__PURE__ */ d.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
|
2632
|
+
/* @__PURE__ */ d.jsx("div", { className: "dropdown-toggle", onClick: l, children: e }),
|
2633
|
+
n && /* @__PURE__ */ d.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ d.jsx("li", { onClick: () => c(s), children: s }, s)) })
|
2619
2634
|
] });
|
2620
|
-
}, Ce =
|
2635
|
+
}, Ce = Mn(function(n, r) {
|
2621
2636
|
const e = n.options.indexOf(n.camera.name);
|
2622
|
-
return /* @__PURE__ */
|
2623
|
-
/* @__PURE__ */
|
2624
|
-
/* @__PURE__ */
|
2637
|
+
return /* @__PURE__ */ d.jsxs("div", { className: "CameraWindow", children: [
|
2638
|
+
/* @__PURE__ */ d.jsx("div", { ref: r, className: "clickable" }),
|
2639
|
+
/* @__PURE__ */ d.jsx(xt, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
|
2625
2640
|
] });
|
2626
|
-
}),
|
2641
|
+
}), ia = `out vec3 worldPosition;
|
2627
2642
|
uniform float uDistance;
|
2628
2643
|
|
2629
2644
|
void main() {
|
@@ -2632,7 +2647,7 @@ void main() {
|
|
2632
2647
|
worldPosition.xz += cameraPosition.xz;
|
2633
2648
|
|
2634
2649
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
2635
|
-
}`,
|
2650
|
+
}`, oa = `out vec4 fragColor;
|
2636
2651
|
in vec3 worldPosition;
|
2637
2652
|
|
2638
2653
|
uniform float uDivisions;
|
@@ -2700,14 +2715,14 @@ void main() {
|
|
2700
2715
|
|
2701
2716
|
if (fragColor.a <= 0.0) discard;
|
2702
2717
|
}`;
|
2703
|
-
class
|
2718
|
+
class sa extends vn {
|
2704
2719
|
constructor(n) {
|
2705
2720
|
super({
|
2706
2721
|
extensions: {
|
2707
2722
|
derivatives: !0
|
2708
2723
|
},
|
2709
|
-
glslVersion:
|
2710
|
-
side:
|
2724
|
+
glslVersion: bn,
|
2725
|
+
side: yn,
|
2711
2726
|
transparent: !0,
|
2712
2727
|
uniforms: {
|
2713
2728
|
uScale: {
|
@@ -2729,17 +2744,17 @@ class ia extends pn {
|
|
2729
2744
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
2730
2745
|
}
|
2731
2746
|
},
|
2732
|
-
vertexShader:
|
2733
|
-
fragmentShader:
|
2747
|
+
vertexShader: ia,
|
2748
|
+
fragmentShader: oa,
|
2734
2749
|
name: "InfiniteGrid",
|
2735
2750
|
depthWrite: !1
|
2736
2751
|
});
|
2737
2752
|
}
|
2738
2753
|
}
|
2739
|
-
class
|
2754
|
+
class ca extends Vt {
|
2740
2755
|
constructor() {
|
2741
|
-
const r = new
|
2742
|
-
super(new
|
2756
|
+
const r = new sa();
|
2757
|
+
super(new En(2, 2), r);
|
2743
2758
|
$(this, "gridMaterial");
|
2744
2759
|
this.gridMaterial = r, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
2745
2760
|
}
|
@@ -2747,7 +2762,7 @@ class oa extends Yt {
|
|
2747
2762
|
this.gridMaterial.needsUpdate = !0;
|
2748
2763
|
}
|
2749
2764
|
}
|
2750
|
-
const
|
2765
|
+
const Gt = [
|
2751
2766
|
"Single",
|
2752
2767
|
"Side by Side",
|
2753
2768
|
"Stacked",
|
@@ -2770,24 +2785,24 @@ dt.position.set(500, 500, 500);
|
|
2770
2785
|
dt.lookAt(0, 0, 0);
|
2771
2786
|
q.set("Debug", dt);
|
2772
2787
|
let bt = "Default";
|
2773
|
-
const
|
2788
|
+
const la = [
|
2774
2789
|
"Default",
|
2775
2790
|
"Normals",
|
2776
2791
|
"Wireframe"
|
2777
|
-
],
|
2792
|
+
], ua = new wn(), da = new xn({
|
2778
2793
|
opacity: 0.33,
|
2779
2794
|
transparent: !0,
|
2780
2795
|
wireframe: !0
|
2781
|
-
}), V = new
|
2782
|
-
function
|
2783
|
-
const [n, r] = re(t.mode !== void 0 ? t.mode : "Quad"), e = Se(null), i = Se(null), l = Se(null),
|
2784
|
-
let s = q.get("Debug"),
|
2785
|
-
const
|
2786
|
-
const
|
2787
|
-
|
2788
|
-
const
|
2789
|
-
|
2790
|
-
const j = new
|
2796
|
+
}), V = new Cn();
|
2797
|
+
function ja(t) {
|
2798
|
+
const [n, r] = re(t.mode !== void 0 ? t.mode : "Quad"), e = Se(null), i = Se(null), l = Se(null), c = Se(null);
|
2799
|
+
let s = q.get("Debug"), u = q.get("Orthographic"), h = q.get("Front"), m = q.get("Top");
|
2800
|
+
const g = (y, b) => {
|
2801
|
+
const v = H.get(y.name);
|
2802
|
+
v !== void 0 && v.dispose(), H.delete(y.name);
|
2803
|
+
const O = ce.get(y.name);
|
2804
|
+
O !== void 0 && (V.remove(O), O.dispose()), ce.delete(y.name);
|
2805
|
+
const j = new ra(y, b);
|
2791
2806
|
switch (y.name) {
|
2792
2807
|
case "Top":
|
2793
2808
|
case "Bottom":
|
@@ -2799,79 +2814,79 @@ function Oa(t) {
|
|
2799
2814
|
break;
|
2800
2815
|
}
|
2801
2816
|
if (H.set(y.name, j), y instanceof lt) {
|
2802
|
-
const z = new
|
2817
|
+
const z = new On(y);
|
2803
2818
|
ce.set(y.name, z), V.add(z);
|
2804
2819
|
}
|
2805
2820
|
}, E = (y) => {
|
2806
|
-
const
|
2807
|
-
|
2808
|
-
const
|
2809
|
-
|
2821
|
+
const b = ce.get(y.name);
|
2822
|
+
b !== void 0 && (V.remove(b), b.dispose(), ce.delete(y.name));
|
2823
|
+
const v = H.get(y.name);
|
2824
|
+
v !== void 0 && (v.dispose(), H.delete(y.name));
|
2810
2825
|
}, C = () => {
|
2811
|
-
H.forEach((y,
|
2826
|
+
H.forEach((y, b) => {
|
2812
2827
|
y.dispose();
|
2813
|
-
const
|
2814
|
-
|
2828
|
+
const v = ce.get(b);
|
2829
|
+
v !== void 0 && (V.remove(v), v.dispose()), ce.delete(b), H.delete(b);
|
2815
2830
|
}), H.clear(), ce.clear();
|
2816
|
-
},
|
2831
|
+
}, R = () => {
|
2817
2832
|
switch (n) {
|
2818
2833
|
case "Single":
|
2819
|
-
|
2834
|
+
g(s, e.current);
|
2820
2835
|
break;
|
2821
2836
|
case "Side by Side":
|
2822
2837
|
case "Stacked":
|
2823
|
-
|
2838
|
+
g(s, e.current), g(u, i.current);
|
2824
2839
|
break;
|
2825
2840
|
case "Quad":
|
2826
|
-
|
2841
|
+
g(s, e.current), g(u, i.current), g(h, l.current), g(m, c.current);
|
2827
2842
|
break;
|
2828
2843
|
}
|
2829
2844
|
};
|
2830
2845
|
qe(() => {
|
2831
2846
|
V.name = "Debug Scene", V.add(t.scene);
|
2832
|
-
const y = new
|
2847
|
+
const y = new ca();
|
2833
2848
|
V.add(y);
|
2834
|
-
const
|
2835
|
-
|
2849
|
+
const b = new Sn(500);
|
2850
|
+
b.name = "axisHelper", V.add(b);
|
2836
2851
|
}, []), qe(() => {
|
2837
2852
|
const y = t.renderer.getSize(new ae());
|
2838
|
-
let
|
2853
|
+
let b = y.x, v = y.y, O = Math.floor(b / 2), j = Math.floor(v / 2), z = -1;
|
2839
2854
|
const ee = () => {
|
2840
|
-
|
2841
|
-
let M =
|
2855
|
+
b = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(b / 2), j = Math.floor(v / 2);
|
2856
|
+
let M = b, A = v;
|
2842
2857
|
switch (n) {
|
2843
2858
|
case "Side by Side":
|
2844
|
-
M =
|
2859
|
+
M = O, A = v;
|
2845
2860
|
break;
|
2846
2861
|
case "Stacked":
|
2847
|
-
M =
|
2862
|
+
M = b, A = j;
|
2848
2863
|
break;
|
2849
2864
|
case "Quad":
|
2850
|
-
M =
|
2865
|
+
M = O, A = j;
|
2851
2866
|
break;
|
2852
2867
|
}
|
2853
2868
|
q.forEach((L) => {
|
2854
2869
|
var J;
|
2855
2870
|
L instanceof Ct ? (L.left = M / -2, L.right = M / 2, L.top = A / 2, L.bottom = A / -2, L.updateProjectionMatrix()) : L instanceof lt && (L.aspect = M / A, L.updateProjectionMatrix(), (J = ce.get(L.name)) == null || J.update());
|
2856
2871
|
});
|
2857
|
-
},
|
2858
|
-
t.renderer.setViewport(0, 0,
|
2872
|
+
}, T = () => {
|
2873
|
+
t.renderer.setViewport(0, 0, b, v), t.renderer.setScissor(0, 0, b, v), t.renderer.render(V, s);
|
2859
2874
|
}, le = () => {
|
2860
2875
|
if (n === "Side by Side")
|
2861
|
-
t.renderer.setViewport(0, 0,
|
2876
|
+
t.renderer.setViewport(0, 0, O, v), t.renderer.setScissor(0, 0, O, v), t.renderer.render(V, s), t.renderer.setViewport(O, 0, O, v), t.renderer.setScissor(O, 0, O, v), t.renderer.render(V, u);
|
2862
2877
|
else {
|
2863
|
-
const M =
|
2864
|
-
t.renderer.setViewport(0, M,
|
2878
|
+
const M = v - j;
|
2879
|
+
t.renderer.setViewport(0, M, b, j), t.renderer.setScissor(0, M, b, j), t.renderer.render(V, s), t.renderer.setViewport(0, 0, b, j), t.renderer.setScissor(0, 0, b, j), t.renderer.render(V, u);
|
2865
2880
|
}
|
2866
2881
|
}, Te = () => {
|
2867
2882
|
let M = 0, A = 0;
|
2868
|
-
A =
|
2883
|
+
A = v - j, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, s), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, u), A = 0, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, h), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, m);
|
2869
2884
|
}, oe = () => {
|
2870
2885
|
switch (H.forEach((M) => {
|
2871
2886
|
M.update();
|
2872
2887
|
}), t.scene.update(), t.renderer.clear(), n) {
|
2873
2888
|
case "Single":
|
2874
|
-
|
2889
|
+
T();
|
2875
2890
|
break;
|
2876
2891
|
case "Side by Side":
|
2877
2892
|
case "Stacked":
|
@@ -2883,11 +2898,11 @@ function Oa(t) {
|
|
2883
2898
|
}
|
2884
2899
|
z = requestAnimationFrame(oe);
|
2885
2900
|
};
|
2886
|
-
return
|
2901
|
+
return R(), window.addEventListener("resize", ee), ee(), oe(), () => {
|
2887
2902
|
window.removeEventListener("resize", ee), cancelAnimationFrame(z), z = -1;
|
2888
2903
|
};
|
2889
2904
|
}, [n]);
|
2890
|
-
const
|
2905
|
+
const D = [
|
2891
2906
|
"Top",
|
2892
2907
|
"Bottom",
|
2893
2908
|
"Left",
|
@@ -2898,72 +2913,72 @@ function Oa(t) {
|
|
2898
2913
|
"Debug"
|
2899
2914
|
];
|
2900
2915
|
return t.cameras.forEach((y) => {
|
2901
|
-
q.set(y.name, y),
|
2902
|
-
}), /* @__PURE__ */
|
2903
|
-
/* @__PURE__ */
|
2904
|
-
n === "Single" && /* @__PURE__ */
|
2905
|
-
var
|
2906
|
-
(
|
2907
|
-
const
|
2908
|
-
|
2916
|
+
q.set(y.name, y), D.push(y.name);
|
2917
|
+
}), /* @__PURE__ */ d.jsxs("div", { className: "multiview", children: [
|
2918
|
+
/* @__PURE__ */ d.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
|
2919
|
+
n === "Single" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
|
2920
|
+
var v;
|
2921
|
+
(v = H.get(s.name)) == null || v.dispose();
|
2922
|
+
const b = q.get(y);
|
2923
|
+
b !== void 0 && (E(s), s = b, g(b, e.current));
|
2909
2924
|
} }) }),
|
2910
|
-
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */
|
2911
|
-
/* @__PURE__ */
|
2912
|
-
var
|
2913
|
-
(
|
2914
|
-
const
|
2915
|
-
|
2925
|
+
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
2926
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
|
2927
|
+
var v;
|
2928
|
+
(v = H.get(s.name)) == null || v.dispose();
|
2929
|
+
const b = q.get(y);
|
2930
|
+
b !== void 0 && (E(s), s = b, g(b, e.current));
|
2916
2931
|
} }),
|
2917
|
-
/* @__PURE__ */
|
2918
|
-
var
|
2919
|
-
(
|
2920
|
-
const
|
2921
|
-
|
2932
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: u, options: D, ref: i, onSelect: (y) => {
|
2933
|
+
var v;
|
2934
|
+
(v = H.get(u.name)) == null || v.dispose();
|
2935
|
+
const b = q.get(y);
|
2936
|
+
b !== void 0 && (E(u), u = b, g(b, i.current));
|
2922
2937
|
} })
|
2923
2938
|
] }),
|
2924
|
-
n === "Quad" && /* @__PURE__ */
|
2925
|
-
/* @__PURE__ */
|
2926
|
-
var
|
2927
|
-
(
|
2928
|
-
const
|
2929
|
-
|
2939
|
+
n === "Quad" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
2940
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
|
2941
|
+
var v;
|
2942
|
+
(v = H.get(s.name)) == null || v.dispose();
|
2943
|
+
const b = q.get(y);
|
2944
|
+
b !== void 0 && (E(s), s = b, g(b, e.current));
|
2930
2945
|
} }),
|
2931
|
-
/* @__PURE__ */
|
2932
|
-
var
|
2933
|
-
(
|
2934
|
-
const
|
2935
|
-
|
2946
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: u, options: D, ref: i, onSelect: (y) => {
|
2947
|
+
var v;
|
2948
|
+
(v = H.get(u.name)) == null || v.dispose();
|
2949
|
+
const b = q.get(y);
|
2950
|
+
b !== void 0 && (E(u), u = b, g(b, i.current));
|
2936
2951
|
} }),
|
2937
|
-
/* @__PURE__ */
|
2938
|
-
var
|
2939
|
-
(
|
2940
|
-
const
|
2941
|
-
|
2952
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: h, options: D, ref: l, onSelect: (y) => {
|
2953
|
+
var v;
|
2954
|
+
(v = H.get(h.name)) == null || v.dispose();
|
2955
|
+
const b = q.get(y);
|
2956
|
+
b !== void 0 && (E(h), h = b, g(b, l.current));
|
2942
2957
|
} }),
|
2943
|
-
/* @__PURE__ */
|
2944
|
-
var
|
2945
|
-
(
|
2946
|
-
const
|
2947
|
-
|
2958
|
+
/* @__PURE__ */ d.jsx(Ce, { camera: m, options: D, ref: c, onSelect: (y) => {
|
2959
|
+
var v;
|
2960
|
+
(v = H.get(m.name)) == null || v.dispose();
|
2961
|
+
const b = q.get(y);
|
2962
|
+
b !== void 0 && (E(m), m = b, g(b, c.current));
|
2948
2963
|
} })
|
2949
2964
|
] })
|
2950
2965
|
] }),
|
2951
|
-
/* @__PURE__ */
|
2952
|
-
/* @__PURE__ */
|
2966
|
+
/* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
|
2967
|
+
/* @__PURE__ */ d.jsx(
|
2953
2968
|
xt,
|
2954
2969
|
{
|
2955
|
-
index:
|
2956
|
-
options:
|
2970
|
+
index: Gt.indexOf(n),
|
2971
|
+
options: Gt,
|
2957
2972
|
onSelect: (y) => {
|
2958
2973
|
y !== n && (C(), r(y));
|
2959
2974
|
}
|
2960
2975
|
}
|
2961
2976
|
),
|
2962
|
-
/* @__PURE__ */
|
2977
|
+
/* @__PURE__ */ d.jsx(
|
2963
2978
|
xt,
|
2964
2979
|
{
|
2965
2980
|
index: 0,
|
2966
|
-
options:
|
2981
|
+
options: la,
|
2967
2982
|
onSelect: (y) => {
|
2968
2983
|
if (y !== bt)
|
2969
2984
|
switch (bt = y, bt) {
|
@@ -2971,10 +2986,10 @@ function Oa(t) {
|
|
2971
2986
|
V.overrideMaterial = null;
|
2972
2987
|
break;
|
2973
2988
|
case "Normals":
|
2974
|
-
V.overrideMaterial =
|
2989
|
+
V.overrideMaterial = ua;
|
2975
2990
|
break;
|
2976
2991
|
case "Wireframe":
|
2977
|
-
V.overrideMaterial =
|
2992
|
+
V.overrideMaterial = da;
|
2978
2993
|
break;
|
2979
2994
|
}
|
2980
2995
|
}
|
@@ -2983,35 +2998,41 @@ function Oa(t) {
|
|
2983
2998
|
] })
|
2984
2999
|
] });
|
2985
3000
|
}
|
2986
|
-
function
|
2987
|
-
return /* @__PURE__ */
|
2988
|
-
/* @__PURE__ */
|
3001
|
+
function Ma(t) {
|
3002
|
+
return /* @__PURE__ */ d.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3003
|
+
/* @__PURE__ */ d.jsx("header", { children: t.header }),
|
2989
3004
|
t.children,
|
2990
|
-
/* @__PURE__ */
|
3005
|
+
/* @__PURE__ */ d.jsx("footer", { children: t.footer })
|
2991
3006
|
] });
|
2992
3007
|
}
|
2993
3008
|
export {
|
2994
3009
|
wt as Accordion,
|
2995
|
-
|
3010
|
+
wa as Application,
|
2996
3011
|
ut as BaseRemote,
|
2997
|
-
|
2998
|
-
|
2999
|
-
|
3000
|
-
|
3001
|
-
|
3002
|
-
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3010
|
-
|
3011
|
-
|
3012
|
-
|
3013
|
-
|
3014
|
-
|
3012
|
+
Jt as ChildObject,
|
3013
|
+
Wn as ContainerObject,
|
3014
|
+
Yn as Draggable,
|
3015
|
+
Gn as DraggableItem,
|
3016
|
+
Vn as Dropdown,
|
3017
|
+
zn as DropdownItem,
|
3018
|
+
Ma as Editor,
|
3019
|
+
ca as InfiniteGridHelper,
|
3020
|
+
na as Inspector,
|
3021
|
+
ja as MultiView,
|
3022
|
+
Zt as NavButton,
|
3023
|
+
xa as RemoteComponents,
|
3024
|
+
Ta as RemoteController,
|
3025
|
+
Ca as RemoteTheatre,
|
3026
|
+
Sa as RemoteThree,
|
3027
|
+
Oa as RemoteTweakpane,
|
3028
|
+
Pa as SceneHierarchy,
|
3029
|
+
Ra as SceneInspector,
|
3015
3030
|
N as ToolEvents,
|
3016
|
-
|
3031
|
+
ya as clamp,
|
3032
|
+
_n as colorToHex,
|
3033
|
+
I as debugDispatcher,
|
3034
|
+
Ea as distance,
|
3035
|
+
Kt as hierarchyUUID,
|
3036
|
+
Dn as isColor,
|
3037
|
+
kn as randomID
|
3017
3038
|
};
|