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