@tomorrowevening/hermes 0.0.41 → 0.0.42
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.cjs.js +15 -15
- package/dist/hermes.es.js +1019 -897
- package/package.json +1 -1
- package/types/core/remote/RemoteTheatre.d.ts +1 -2
- package/types/editor/theatreUtils.d.ts +3 -0
- package/types/index.d.ts +2 -1
package/dist/hermes.es.js
CHANGED
@@ -1,66 +1,66 @@
|
|
1
|
-
import { PositionalAudio as
|
2
|
-
import "@theatre/studio";
|
3
|
-
import { Pane as
|
4
|
-
import * as
|
5
|
-
import _n, { useState as ae, useRef as ye, useEffect as
|
1
|
+
import { PositionalAudio as Yn, EventDispatcher as cn, Texture as ln, CubeTexture as Gn, RepeatWrapping as Ht, ShaderMaterial as un, GLSL3 as Vn, DoubleSide as dn, Color as wt, Mesh as Hn, PlaneGeometry as Wn, FrontSide as qn, BackSide as Kn, NoBlending as Xn, NormalBlending as Zn, AdditiveBlending as Jn, SubtractiveBlending as Qn, MultiplyBlending as ea, CustomBlending as ta, AddEquation as na, SubtractEquation as aa, ReverseSubtractEquation as ia, MinEquation as ra, MaxEquation as oa, ZeroFactor as hn, OneFactor as fn, SrcColorFactor as pn, OneMinusSrcColorFactor as mn, SrcAlphaFactor as vn, OneMinusSrcAlphaFactor as gn, DstAlphaFactor as bn, OneMinusDstAlphaFactor as yn, DstColorFactor as En, OneMinusDstColorFactor as Cn, SrcAlphaSaturateFactor as sa, ConstantColorFactor as Sn, OneMinusConstantColorFactor as xn, ConstantAlphaFactor as wn, OneMinusConstantAlphaFactor as On, Matrix4 as ca, Vector3 as X, Euler as la, Ray as ua, Plane as da, MathUtils as ha, MOUSE as Ge, TOUCH as Ve, Quaternion as Wt, Spherical as qt, Vector2 as ue, PerspectiveCamera as Bt, MeshDepthMaterial as fa, MeshNormalMaterial as pa, MeshBasicMaterial as ma, OrthographicCamera as Mn, Scene as Tn, Group as va, AxesHelper as Rn, WebGLRenderer as ga, Raycaster as ba, CameraHelper as ya } from "three";
|
2
|
+
import Kt from "@theatre/studio";
|
3
|
+
import { Pane as Ea } from "tweakpane";
|
4
|
+
import * as Ca from "@tweakpane/plugin-essentials";
|
5
|
+
import _n, { useState as ae, useRef as ye, useEffect as we, forwardRef as Sa } from "react";
|
6
6
|
import { Reorder as An } from "framer-motion";
|
7
|
-
const
|
8
|
-
},
|
7
|
+
const Pn = () => {
|
8
|
+
}, Mi = () => {
|
9
9
|
};
|
10
|
-
function
|
10
|
+
function ot(t) {
|
11
11
|
return t.substring(0, 1).toUpperCase() + t.substring(1);
|
12
12
|
}
|
13
|
-
function
|
13
|
+
function Ti(t, n, a) {
|
14
14
|
return Math.min(n, Math.max(t, a));
|
15
15
|
}
|
16
|
-
function
|
16
|
+
function Ri(t, n) {
|
17
17
|
const a = t - n;
|
18
18
|
return Math.sqrt(a * a);
|
19
19
|
}
|
20
|
-
function
|
20
|
+
function xa() {
|
21
21
|
return Math.round(Math.random() * 1e6).toString();
|
22
22
|
}
|
23
|
-
function
|
23
|
+
function wa(t) {
|
24
24
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
25
25
|
}
|
26
|
-
function
|
26
|
+
function Oa(t) {
|
27
27
|
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (u) => {
|
28
|
-
const
|
29
|
-
return
|
30
|
-
},
|
31
|
-
return "#" +
|
28
|
+
const d = u.toString(16);
|
29
|
+
return d.length === 1 ? "0" + d : d;
|
30
|
+
}, c = o(n), p = o(a), s = o(e);
|
31
|
+
return "#" + c + p + s;
|
32
32
|
}
|
33
33
|
function It(t, n = 1) {
|
34
34
|
return Number(t.toFixed(n));
|
35
35
|
}
|
36
36
|
let Ut = 0;
|
37
|
-
const
|
37
|
+
const Ma = () => {
|
38
38
|
Ut = 0;
|
39
|
-
},
|
39
|
+
}, kn = (t) => {
|
40
40
|
if (!t)
|
41
41
|
return;
|
42
42
|
let n = t.name.replace(" ", "");
|
43
43
|
n.length === 0 && (n = `obj_${Ut}`, Ut++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
44
|
-
|
44
|
+
kn(a);
|
45
45
|
});
|
46
|
-
},
|
46
|
+
}, _i = (t) => {
|
47
47
|
t?.dispose();
|
48
|
-
},
|
48
|
+
}, Ta = (t) => {
|
49
49
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
50
|
-
},
|
50
|
+
}, jn = (t) => {
|
51
51
|
if (t) {
|
52
52
|
for (; t.children.length > 0; ) {
|
53
53
|
const n = t.children[0];
|
54
|
-
n instanceof
|
54
|
+
n instanceof Yn ? (n.pause(), n.parent && n.parent.remove(n)) : jn(n);
|
55
55
|
}
|
56
56
|
if (t.parent && t.parent.remove(t), t.isMesh) {
|
57
57
|
const n = t;
|
58
|
-
n.geometry?.dispose(),
|
58
|
+
n.geometry?.dispose(), Ta(n.material);
|
59
59
|
}
|
60
60
|
t.dispose !== void 0 && t.dispose();
|
61
61
|
}
|
62
62
|
};
|
63
|
-
class
|
63
|
+
class Ai {
|
64
64
|
components = /* @__PURE__ */ new Map();
|
65
65
|
listen;
|
66
66
|
// Protected
|
@@ -120,7 +120,7 @@ class _i {
|
|
120
120
|
n && (this._mode = "editor");
|
121
121
|
}
|
122
122
|
}
|
123
|
-
const k = new
|
123
|
+
const k = new cn(), j = {
|
124
124
|
CUSTOM: "ToolEvents::custom",
|
125
125
|
// Components
|
126
126
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -136,7 +136,7 @@ const k = new ln(), D = {
|
|
136
136
|
ADD_CAMERA: "ToolEvents::addCamera",
|
137
137
|
REMOVE_CAMERA: "ToolEvents::removeCamera"
|
138
138
|
};
|
139
|
-
class
|
139
|
+
class Ot {
|
140
140
|
app;
|
141
141
|
constructor(n) {
|
142
142
|
this.app = n;
|
@@ -151,7 +151,7 @@ class Yt {
|
|
151
151
|
handleEditor(n) {
|
152
152
|
}
|
153
153
|
}
|
154
|
-
class
|
154
|
+
class Pi extends Ot {
|
155
155
|
selectDropdown(n, a) {
|
156
156
|
this.app.send({
|
157
157
|
event: "selectComponent",
|
@@ -177,59 +177,180 @@ class Ai extends Yt {
|
|
177
177
|
handleApp(n) {
|
178
178
|
switch (n.event) {
|
179
179
|
case "selectComponent":
|
180
|
-
k.dispatchEvent({ type:
|
180
|
+
k.dispatchEvent({ type: j.SELECT_DROPDOWN, value: n.data });
|
181
181
|
break;
|
182
182
|
case "draggableListUpdate":
|
183
|
-
k.dispatchEvent({ type:
|
183
|
+
k.dispatchEvent({ type: j.DRAG_UPDATE, value: n.data });
|
184
184
|
break;
|
185
185
|
}
|
186
186
|
}
|
187
187
|
}
|
188
|
-
|
189
|
-
|
188
|
+
class Ra extends Ot {
|
189
|
+
project;
|
190
|
+
sheets = /* @__PURE__ */ new Map();
|
191
|
+
sheetObjects = /* @__PURE__ */ new Map();
|
192
|
+
sheetObjectCBs = /* @__PURE__ */ new Map();
|
193
|
+
sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
194
|
+
activeSheet;
|
195
|
+
static rafDriver = void 0;
|
196
|
+
dispose() {
|
197
|
+
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
198
|
+
}
|
199
|
+
sheet(n) {
|
200
|
+
if (this.project === void 0) {
|
201
|
+
console.error("Theatre Project hasn't been created yet.");
|
202
|
+
return;
|
203
|
+
}
|
204
|
+
let a = this.sheets.get(n);
|
205
|
+
return a !== void 0 || (a = this.project?.sheet(n), this.sheets.set(n, a)), a;
|
206
|
+
}
|
207
|
+
playSheet(n, a) {
|
208
|
+
this.sheet(n)?.sequence.play(a), this.app.send({
|
209
|
+
event: "playSheet",
|
210
|
+
target: "editor",
|
211
|
+
data: {
|
212
|
+
sheet: n,
|
213
|
+
value: a
|
214
|
+
}
|
215
|
+
});
|
216
|
+
}
|
217
|
+
pauseSheet(n) {
|
218
|
+
this.sheet(n)?.sequence.pause(), this.app.send({
|
219
|
+
event: "pauseSheet",
|
220
|
+
target: "editor",
|
221
|
+
data: {
|
222
|
+
sheet: n
|
223
|
+
}
|
224
|
+
});
|
225
|
+
}
|
226
|
+
clearSheetObjects(n) {
|
227
|
+
this.sheetObjects.forEach((a, e) => {
|
228
|
+
e.search(`${n}_`) > -1 && this.unsubscribe(a);
|
229
|
+
});
|
230
|
+
}
|
231
|
+
sheetObject(n, a, e, o) {
|
232
|
+
if (this.project === void 0) {
|
233
|
+
console.error("Theatre Project hasn't been created yet.");
|
234
|
+
return;
|
235
|
+
}
|
236
|
+
const c = this.sheet(n);
|
237
|
+
if (c === void 0)
|
238
|
+
return;
|
239
|
+
const p = `${n}_${a}`;
|
240
|
+
let s = this.sheetObjects.get(p);
|
241
|
+
s !== void 0 ? s = c.object(a, { ...e, ...s.value }, { reconfigure: !0 }) : s = c.object(a, e), this.sheetObjects.set(p, s), this.sheetObjectCBs.set(p, o !== void 0 ? o : Pn);
|
242
|
+
const u = s.onValuesChange((d) => {
|
243
|
+
if (this.app.editor) {
|
244
|
+
for (const b in d) {
|
245
|
+
const E = d[b];
|
246
|
+
typeof E == "object" && wa(E) && (d[b] = {
|
247
|
+
r: E.r,
|
248
|
+
g: E.g,
|
249
|
+
b: E.b,
|
250
|
+
a: E.a
|
251
|
+
});
|
252
|
+
}
|
253
|
+
this.app.send({
|
254
|
+
event: "updateSheetObject",
|
255
|
+
target: "app",
|
256
|
+
data: {
|
257
|
+
sheet: n,
|
258
|
+
sheetObject: p,
|
259
|
+
values: d
|
260
|
+
}
|
261
|
+
});
|
262
|
+
}
|
263
|
+
const v = this.sheetObjectCBs.get(p);
|
264
|
+
v !== void 0 && v(d);
|
265
|
+
});
|
266
|
+
return this.sheetObjectUnsubscribe.set(p, u), s;
|
267
|
+
}
|
268
|
+
unsubscribe(n) {
|
269
|
+
if (this.project === void 0) {
|
270
|
+
console.error("Theatre Project hasn't been created yet.");
|
271
|
+
return;
|
272
|
+
}
|
273
|
+
const a = n.address.sheetId, e = n.address.objectKey;
|
274
|
+
this.sheets.get(a)?.detachObject(e);
|
275
|
+
const c = `${a}_${e}`, p = this.sheetObjectUnsubscribe.get(c);
|
276
|
+
p !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), p());
|
277
|
+
}
|
278
|
+
// Remote Controller
|
279
|
+
// Receives App events
|
280
|
+
handleApp(n) {
|
281
|
+
let a;
|
282
|
+
switch (n.event) {
|
283
|
+
case "setSheet":
|
284
|
+
a = this.sheets.get(n.data.sheet), a !== void 0 && (this.activeSheet = a, Kt.setSelection([a]));
|
285
|
+
break;
|
286
|
+
case "setSheetObject":
|
287
|
+
a = this.sheetObjects.get(`${n.data.sheet}_${n.data.key}`), a !== void 0 && Kt.setSelection([a]);
|
288
|
+
break;
|
289
|
+
case "updateSheetObject":
|
290
|
+
a = this.sheets.get(n.data.sheet), a !== void 0 && a.sequence.pause(), a = this.sheetObjectCBs.get(n.data.sheetObject), a !== void 0 && a(n.data.values);
|
291
|
+
break;
|
292
|
+
case "updateTimeline":
|
293
|
+
a = this.sheets.get(n.data.sheet), this.activeSheet !== void 0 && (this.activeSheet.sequence.position = n.data.position);
|
294
|
+
break;
|
295
|
+
}
|
296
|
+
}
|
297
|
+
// Receives Editor events
|
298
|
+
handleEditor(n) {
|
299
|
+
if (this.app.editor)
|
300
|
+
switch (n.event) {
|
301
|
+
case "playSheet":
|
302
|
+
this.sheet(n.data.sheet)?.sequence.play(n.data.value);
|
303
|
+
break;
|
304
|
+
case "pauseSheet":
|
305
|
+
this.sheet(n.data.sheet)?.sequence.pause();
|
306
|
+
break;
|
307
|
+
}
|
308
|
+
}
|
309
|
+
}
|
310
|
+
function ki(t, n, a) {
|
190
311
|
if (t.editor) {
|
191
|
-
a.ui.restore(), a.onSelectionChange((
|
192
|
-
|
193
|
-
let u = s.address.sheetId,
|
312
|
+
a.ui.restore(), a.onSelectionChange((p) => {
|
313
|
+
p.length < 1 || p.forEach((s) => {
|
314
|
+
let u = s.address.sheetId, d = "setSheet", v = {};
|
194
315
|
switch (s.type) {
|
195
316
|
case "Theatre_Sheet_PublicAPI":
|
196
|
-
|
317
|
+
d = "setSheet", v = {
|
197
318
|
sheet: s.address.sheetId
|
198
|
-
},
|
319
|
+
}, n.activeSheet = n.sheets.get(s.address.sheetId);
|
199
320
|
break;
|
200
321
|
case "Theatre_SheetObject_PublicAPI":
|
201
|
-
|
322
|
+
d = "setSheetObject", u += `_${s.address.objectKey}`, v = {
|
202
323
|
id: u,
|
203
324
|
sheet: s.address.sheetId,
|
204
325
|
key: s.address.objectKey
|
205
|
-
},
|
326
|
+
}, n.activeSheet = n.sheets.get(s.address.sheetId);
|
206
327
|
break;
|
207
328
|
}
|
208
|
-
t.send({ event:
|
329
|
+
t.send({ event: d, target: "app", data: v });
|
209
330
|
});
|
210
331
|
});
|
211
332
|
let e = -1;
|
212
333
|
const o = () => {
|
213
|
-
if (
|
214
|
-
e =
|
215
|
-
const
|
334
|
+
if (Ra.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
|
335
|
+
e = n.activeSheet.sequence.position;
|
336
|
+
const p = n.activeSheet;
|
216
337
|
t.send({
|
217
338
|
event: "updateTimeline",
|
218
339
|
target: "app",
|
219
340
|
data: {
|
220
341
|
position: e,
|
221
|
-
sheet:
|
342
|
+
sheet: p.address.sheetId
|
222
343
|
}
|
223
344
|
});
|
224
345
|
}
|
225
|
-
},
|
226
|
-
o(), requestAnimationFrame(
|
346
|
+
}, c = () => {
|
347
|
+
o(), requestAnimationFrame(c);
|
227
348
|
};
|
228
|
-
o(),
|
349
|
+
o(), c();
|
229
350
|
} else
|
230
351
|
a.ui.hide();
|
231
352
|
}
|
232
|
-
function
|
353
|
+
function _a(t) {
|
233
354
|
if (t.name === "cameras")
|
234
355
|
return "camera";
|
235
356
|
if (t.name === "interactive")
|
@@ -254,7 +375,7 @@ function Dn(t) {
|
|
254
375
|
n.children.push(Dn(a));
|
255
376
|
}), n;
|
256
377
|
}
|
257
|
-
function
|
378
|
+
function Aa(t) {
|
258
379
|
const n = {};
|
259
380
|
for (const a in t) {
|
260
381
|
const e = t[a].value;
|
@@ -262,7 +383,7 @@ function Ra(t) {
|
|
262
383
|
}
|
263
384
|
return n;
|
264
385
|
}
|
265
|
-
function
|
386
|
+
function Pa(t) {
|
266
387
|
switch (t) {
|
267
388
|
case "blendSrcAlpha":
|
268
389
|
case "blendDstAlpha":
|
@@ -274,10 +395,10 @@ function _a(t) {
|
|
274
395
|
}
|
275
396
|
return !1;
|
276
397
|
}
|
277
|
-
function
|
398
|
+
function He(t) {
|
278
399
|
const n = {};
|
279
400
|
for (const a in t) {
|
280
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
401
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Pa(a))
|
281
402
|
continue;
|
282
403
|
const e = typeof t[a], o = t[a];
|
283
404
|
switch (e) {
|
@@ -289,13 +410,13 @@ function We(t) {
|
|
289
410
|
case "object":
|
290
411
|
if (o !== null)
|
291
412
|
if (n[a] = o, o.isTexture)
|
292
|
-
if (o instanceof
|
293
|
-
const
|
294
|
-
n[a] = { src:
|
413
|
+
if (o instanceof ln) {
|
414
|
+
const c = o.source.toJSON();
|
415
|
+
n[a] = { src: c.url };
|
295
416
|
} else
|
296
|
-
o instanceof
|
417
|
+
o instanceof Gn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
|
297
418
|
else
|
298
|
-
a === "uniforms" && (n[a] =
|
419
|
+
a === "uniforms" && (n[a] = Aa(n[a]));
|
299
420
|
else
|
300
421
|
n[a] = { src: "" };
|
301
422
|
break;
|
@@ -329,29 +450,29 @@ function Lt(t) {
|
|
329
450
|
const e = t;
|
330
451
|
if (Array.isArray(e.material)) {
|
331
452
|
const o = [];
|
332
|
-
e.material.forEach((
|
333
|
-
o.push(
|
453
|
+
e.material.forEach((c) => {
|
454
|
+
o.push(He(c));
|
334
455
|
}), n.material = o;
|
335
456
|
} else
|
336
|
-
n.material =
|
457
|
+
n.material = He(e.material);
|
337
458
|
} else if (a.search("points") > -1) {
|
338
459
|
const e = t;
|
339
460
|
if (Array.isArray(e.material)) {
|
340
461
|
const o = [];
|
341
|
-
e.material.forEach((
|
342
|
-
o.push(
|
462
|
+
e.material.forEach((c) => {
|
463
|
+
o.push(He(c));
|
343
464
|
}), n.material = o;
|
344
465
|
} else
|
345
|
-
n.material =
|
466
|
+
n.material = He(e.material);
|
346
467
|
} else if (a.search("line") > -1) {
|
347
468
|
const e = t;
|
348
469
|
if (Array.isArray(e.material)) {
|
349
470
|
const o = [];
|
350
|
-
e.material.forEach((
|
351
|
-
o.push(
|
471
|
+
e.material.forEach((c) => {
|
472
|
+
o.push(He(c));
|
352
473
|
}), n.material = o;
|
353
474
|
} else
|
354
|
-
n.material =
|
475
|
+
n.material = He(e.material);
|
355
476
|
} else
|
356
477
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
357
478
|
fov: t.fov,
|
@@ -381,7 +502,7 @@ function Lt(t) {
|
|
381
502
|
});
|
382
503
|
return n;
|
383
504
|
}
|
384
|
-
function
|
505
|
+
function ka(t, n) {
|
385
506
|
const a = n.split(".");
|
386
507
|
switch (a.length) {
|
387
508
|
case 1:
|
@@ -422,12 +543,12 @@ function $t(t) {
|
|
422
543
|
return new Promise((n, a) => {
|
423
544
|
const e = new Image();
|
424
545
|
e.onload = () => {
|
425
|
-
const o = new
|
426
|
-
o.wrapS =
|
546
|
+
const o = new ln(e);
|
547
|
+
o.wrapS = Ht, o.wrapT = Ht, o.needsUpdate = !0, n(o);
|
427
548
|
}, e.onerror = a, e.src = t;
|
428
549
|
});
|
429
550
|
}
|
430
|
-
class
|
551
|
+
class ji extends Ot {
|
431
552
|
scene = void 0;
|
432
553
|
getObject(n) {
|
433
554
|
this.app.debugEnabled && this.app.send({
|
@@ -481,7 +602,7 @@ class ki extends Yt {
|
|
481
602
|
setScene(n) {
|
482
603
|
if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
|
483
604
|
return;
|
484
|
-
|
605
|
+
Ma(), kn(this.scene);
|
485
606
|
const a = Dn(this.scene);
|
486
607
|
this.app.send({
|
487
608
|
event: "setScene",
|
@@ -514,16 +635,16 @@ class ki extends Yt {
|
|
514
635
|
handleApp(n) {
|
515
636
|
switch (n.event) {
|
516
637
|
case "getObject":
|
517
|
-
k.dispatchEvent({ type:
|
638
|
+
k.dispatchEvent({ type: j.GET_OBJECT, value: n.data });
|
518
639
|
break;
|
519
640
|
case "updateObject":
|
520
|
-
k.dispatchEvent({ type:
|
641
|
+
k.dispatchEvent({ type: j.UPDATE_OBJECT, value: n.data });
|
521
642
|
break;
|
522
643
|
case "createTexture":
|
523
|
-
k.dispatchEvent({ type:
|
644
|
+
k.dispatchEvent({ type: j.CREATE_TEXTURE, value: n.data });
|
524
645
|
break;
|
525
646
|
case "requestMethod":
|
526
|
-
k.dispatchEvent({ type:
|
647
|
+
k.dispatchEvent({ type: j.REQUEST_METHOD, value: n.data });
|
527
648
|
break;
|
528
649
|
}
|
529
650
|
}
|
@@ -531,21 +652,21 @@ class ki extends Yt {
|
|
531
652
|
handleEditor(n) {
|
532
653
|
switch (n.event) {
|
533
654
|
case "setObject":
|
534
|
-
k.dispatchEvent({ type:
|
655
|
+
k.dispatchEvent({ type: j.SET_OBJECT, value: n.data });
|
535
656
|
break;
|
536
657
|
case "setScene":
|
537
|
-
k.dispatchEvent({ type:
|
658
|
+
k.dispatchEvent({ type: j.SET_SCENE, value: n.data });
|
538
659
|
break;
|
539
660
|
case "addCamera":
|
540
|
-
k.dispatchEvent({ type:
|
661
|
+
k.dispatchEvent({ type: j.ADD_CAMERA, value: n.data });
|
541
662
|
break;
|
542
663
|
case "removeCamera":
|
543
|
-
k.dispatchEvent({ type:
|
664
|
+
k.dispatchEvent({ type: j.REMOVE_CAMERA, value: n.data });
|
544
665
|
break;
|
545
666
|
}
|
546
667
|
}
|
547
668
|
}
|
548
|
-
class Di extends
|
669
|
+
class Di extends Ot {
|
549
670
|
bindCBs;
|
550
671
|
buttonCBs;
|
551
672
|
pane = void 0;
|
@@ -556,7 +677,7 @@ class Di extends Yt {
|
|
556
677
|
super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
|
557
678
|
}
|
558
679
|
createGUI() {
|
559
|
-
this.pane = new
|
680
|
+
this.pane = new Ea({ title: "GUI" }), this.pane.registerPlugin(Ca);
|
560
681
|
}
|
561
682
|
dispose() {
|
562
683
|
this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
|
@@ -582,13 +703,13 @@ class Di extends Yt {
|
|
582
703
|
}
|
583
704
|
// Binding
|
584
705
|
bind(n, a, e, o = void 0) {
|
585
|
-
const
|
586
|
-
this.bindCBs.set(
|
706
|
+
const c = this.bindID, p = e.onChange !== void 0 ? e.onChange : Pn;
|
707
|
+
this.bindCBs.set(c, p), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addBinding(n, a, e).on("change", (u) => {
|
587
708
|
this.app.send({
|
588
709
|
event: "updateBind",
|
589
710
|
target: "app",
|
590
711
|
data: {
|
591
|
-
id:
|
712
|
+
id: c,
|
592
713
|
value: u.value
|
593
714
|
}
|
594
715
|
});
|
@@ -596,7 +717,7 @@ class Di extends Yt {
|
|
596
717
|
event: "bindObject",
|
597
718
|
target: "app",
|
598
719
|
data: {
|
599
|
-
id:
|
720
|
+
id: c,
|
600
721
|
name: a,
|
601
722
|
params: e,
|
602
723
|
parent: o
|
@@ -664,7 +785,7 @@ class Di extends Yt {
|
|
664
785
|
}
|
665
786
|
}
|
666
787
|
}
|
667
|
-
var zt = { exports: {} },
|
788
|
+
var zt = { exports: {} }, nt = {};
|
668
789
|
/**
|
669
790
|
* @license React
|
670
791
|
* react-jsx-runtime.production.min.js
|
@@ -674,25 +795,25 @@ var zt = { exports: {} }, at = {};
|
|
674
795
|
* This source code is licensed under the MIT license found in the
|
675
796
|
* LICENSE file in the root directory of this source tree.
|
676
797
|
*/
|
677
|
-
var
|
678
|
-
function
|
679
|
-
if (
|
680
|
-
return
|
681
|
-
|
682
|
-
var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,
|
683
|
-
function
|
684
|
-
var v, b = {}, E = null,
|
685
|
-
|
798
|
+
var Xt;
|
799
|
+
function ja() {
|
800
|
+
if (Xt)
|
801
|
+
return nt;
|
802
|
+
Xt = 1;
|
803
|
+
var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
804
|
+
function p(s, u, d) {
|
805
|
+
var v, b = {}, E = null, S = null;
|
806
|
+
d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (S = u.ref);
|
686
807
|
for (v in u)
|
687
|
-
e.call(u, v) && !
|
808
|
+
e.call(u, v) && !c.hasOwnProperty(v) && (b[v] = u[v]);
|
688
809
|
if (s && s.defaultProps)
|
689
810
|
for (v in u = s.defaultProps, u)
|
690
811
|
b[v] === void 0 && (b[v] = u[v]);
|
691
|
-
return { $$typeof: n, type: s, key: E, ref:
|
812
|
+
return { $$typeof: n, type: s, key: E, ref: S, props: b, _owner: o.current };
|
692
813
|
}
|
693
|
-
return
|
814
|
+
return nt.Fragment = a, nt.jsx = p, nt.jsxs = p, nt;
|
694
815
|
}
|
695
|
-
var
|
816
|
+
var at = {};
|
696
817
|
/**
|
697
818
|
* @license React
|
698
819
|
* react-jsx-runtime.development.js
|
@@ -703,9 +824,9 @@ var it = {};
|
|
703
824
|
* LICENSE file in the root directory of this source tree.
|
704
825
|
*/
|
705
826
|
var Zt;
|
706
|
-
function
|
827
|
+
function Da() {
|
707
828
|
return Zt || (Zt = 1, process.env.NODE_ENV !== "production" && function() {
|
708
|
-
var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"),
|
829
|
+
var t = _n, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
|
709
830
|
function H(i) {
|
710
831
|
if (i === null || typeof i != "object")
|
711
832
|
return null;
|
@@ -713,7 +834,7 @@ function ka() {
|
|
713
834
|
return typeof f == "function" ? f : null;
|
714
835
|
}
|
715
836
|
var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
716
|
-
function
|
837
|
+
function x(i) {
|
717
838
|
{
|
718
839
|
for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
|
719
840
|
g[C - 1] = arguments[C];
|
@@ -722,29 +843,29 @@ function ka() {
|
|
722
843
|
}
|
723
844
|
function z(i, f, g) {
|
724
845
|
{
|
725
|
-
var C = B.ReactDebugCurrentFrame,
|
726
|
-
|
846
|
+
var C = B.ReactDebugCurrentFrame, D = C.getStackAddendum();
|
847
|
+
D !== "" && (f += "%s", g = g.concat([D]));
|
727
848
|
var F = g.map(function(A) {
|
728
849
|
return String(A);
|
729
850
|
});
|
730
851
|
F.unshift("Warning: " + f), Function.prototype.apply.call(console[i], console, F);
|
731
852
|
}
|
732
853
|
}
|
733
|
-
var Ee = !1,
|
734
|
-
|
854
|
+
var Ee = !1, le = !1, se = !1, h = !1, m = !1, w;
|
855
|
+
w = Symbol.for("react.module.reference");
|
735
856
|
function _(i) {
|
736
|
-
return !!(typeof i == "string" || typeof i == "function" || i === e || i ===
|
857
|
+
return !!(typeof i == "string" || typeof i == "function" || i === e || i === c || m || i === o || i === d || i === v || h || i === S || Ee || le || se || typeof i == "object" && i !== null && (i.$$typeof === E || i.$$typeof === b || i.$$typeof === p || i.$$typeof === s || i.$$typeof === u || // This needs to include all possible module reference object
|
737
858
|
// types supported by any Flight configuration anywhere since
|
738
859
|
// we don't know which Flight build this will end up being used
|
739
860
|
// with.
|
740
|
-
i.$$typeof ===
|
861
|
+
i.$$typeof === w || i.getModuleId !== void 0));
|
741
862
|
}
|
742
863
|
function Y(i, f, g) {
|
743
864
|
var C = i.displayName;
|
744
865
|
if (C)
|
745
866
|
return C;
|
746
|
-
var
|
747
|
-
return
|
867
|
+
var D = f.displayName || f.name || "";
|
868
|
+
return D !== "" ? g + "(" + D + ")" : g;
|
748
869
|
}
|
749
870
|
function U(i) {
|
750
871
|
return i.displayName || "Context";
|
@@ -752,7 +873,7 @@ function ka() {
|
|
752
873
|
function $(i) {
|
753
874
|
if (i == null)
|
754
875
|
return null;
|
755
|
-
if (typeof i.tag == "number" &&
|
876
|
+
if (typeof i.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
756
877
|
return i.displayName || i.name || null;
|
757
878
|
if (typeof i == "string")
|
758
879
|
return i;
|
@@ -761,11 +882,11 @@ function ka() {
|
|
761
882
|
return "Fragment";
|
762
883
|
case a:
|
763
884
|
return "Portal";
|
764
|
-
case
|
885
|
+
case c:
|
765
886
|
return "Profiler";
|
766
887
|
case o:
|
767
888
|
return "StrictMode";
|
768
|
-
case
|
889
|
+
case d:
|
769
890
|
return "Suspense";
|
770
891
|
case v:
|
771
892
|
return "SuspenseList";
|
@@ -775,7 +896,7 @@ function ka() {
|
|
775
896
|
case s:
|
776
897
|
var f = i;
|
777
898
|
return U(f) + ".Consumer";
|
778
|
-
case
|
899
|
+
case p:
|
779
900
|
var g = i;
|
780
901
|
return U(g._context) + ".Provider";
|
781
902
|
case u:
|
@@ -784,7 +905,7 @@ function ka() {
|
|
784
905
|
var C = i.displayName || null;
|
785
906
|
return C !== null ? C : $(i.type) || "Memo";
|
786
907
|
case E: {
|
787
|
-
var
|
908
|
+
var D = i, F = D._payload, A = D._init;
|
788
909
|
try {
|
789
910
|
return $(A(F));
|
790
911
|
} catch {
|
@@ -794,18 +915,18 @@ function ka() {
|
|
794
915
|
}
|
795
916
|
return null;
|
796
917
|
}
|
797
|
-
var I = Object.assign, W = 0,
|
798
|
-
function
|
918
|
+
var I = Object.assign, W = 0, q, T, N, J, me, Ce, lt;
|
919
|
+
function qe() {
|
799
920
|
}
|
800
|
-
|
921
|
+
qe.__reactDisabledLog = !0;
|
801
922
|
function Tt() {
|
802
923
|
{
|
803
924
|
if (W === 0) {
|
804
|
-
|
925
|
+
q = console.log, T = console.info, N = console.warn, J = console.error, me = console.group, Ce = console.groupCollapsed, lt = console.groupEnd;
|
805
926
|
var i = {
|
806
927
|
configurable: !0,
|
807
928
|
enumerable: !0,
|
808
|
-
value:
|
929
|
+
value: qe,
|
809
930
|
writable: !0
|
810
931
|
};
|
811
932
|
Object.defineProperties(console, {
|
@@ -831,7 +952,7 @@ function ka() {
|
|
831
952
|
};
|
832
953
|
Object.defineProperties(console, {
|
833
954
|
log: I({}, i, {
|
834
|
-
value:
|
955
|
+
value: q
|
835
956
|
}),
|
836
957
|
info: I({}, i, {
|
837
958
|
value: T
|
@@ -849,33 +970,33 @@ function ka() {
|
|
849
970
|
value: Ce
|
850
971
|
}),
|
851
972
|
groupEnd: I({}, i, {
|
852
|
-
value:
|
973
|
+
value: lt
|
853
974
|
})
|
854
975
|
});
|
855
976
|
}
|
856
|
-
W < 0 &&
|
977
|
+
W < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
857
978
|
}
|
858
979
|
}
|
859
|
-
var
|
980
|
+
var Ke = B.ReactCurrentDispatcher, Xe;
|
860
981
|
function Ue(i, f, g) {
|
861
982
|
{
|
862
|
-
if (
|
983
|
+
if (Xe === void 0)
|
863
984
|
try {
|
864
985
|
throw Error();
|
865
|
-
} catch (
|
866
|
-
var C =
|
867
|
-
|
986
|
+
} catch (D) {
|
987
|
+
var C = D.stack.trim().match(/\n( *(at )?)/);
|
988
|
+
Xe = C && C[1] || "";
|
868
989
|
}
|
869
990
|
return `
|
870
|
-
` +
|
991
|
+
` + Xe + i;
|
871
992
|
}
|
872
993
|
}
|
873
994
|
var $e = !1, Oe;
|
874
995
|
{
|
875
|
-
var
|
876
|
-
Oe = new
|
996
|
+
var ut = typeof WeakMap == "function" ? WeakMap : Map;
|
997
|
+
Oe = new ut();
|
877
998
|
}
|
878
|
-
function
|
999
|
+
function dt(i, f) {
|
879
1000
|
if (!i || $e)
|
880
1001
|
return "";
|
881
1002
|
{
|
@@ -885,10 +1006,10 @@ function ka() {
|
|
885
1006
|
}
|
886
1007
|
var C;
|
887
1008
|
$e = !0;
|
888
|
-
var
|
1009
|
+
var D = Error.prepareStackTrace;
|
889
1010
|
Error.prepareStackTrace = void 0;
|
890
1011
|
var F;
|
891
|
-
F =
|
1012
|
+
F = Ke.current, Ke.current = null, Tt();
|
892
1013
|
try {
|
893
1014
|
if (f) {
|
894
1015
|
var A = function() {
|
@@ -924,32 +1045,32 @@ function ka() {
|
|
924
1045
|
} catch (ve) {
|
925
1046
|
if (ve && C && typeof ve.stack == "string") {
|
926
1047
|
for (var R = ve.stack.split(`
|
927
|
-
`),
|
928
|
-
`), Z = R.length - 1, Q =
|
1048
|
+
`), ce = C.stack.split(`
|
1049
|
+
`), Z = R.length - 1, Q = ce.length - 1; Z >= 1 && Q >= 0 && R[Z] !== ce[Q]; )
|
929
1050
|
Q--;
|
930
1051
|
for (; Z >= 1 && Q >= 0; Z--, Q--)
|
931
|
-
if (R[Z] !==
|
1052
|
+
if (R[Z] !== ce[Q]) {
|
932
1053
|
if (Z !== 1 || Q !== 1)
|
933
1054
|
do
|
934
|
-
if (Z--, Q--, Q < 0 || R[Z] !==
|
935
|
-
var
|
1055
|
+
if (Z--, Q--, Q < 0 || R[Z] !== ce[Q]) {
|
1056
|
+
var fe = `
|
936
1057
|
` + R[Z].replace(" at new ", " at ");
|
937
|
-
return i.displayName &&
|
1058
|
+
return i.displayName && fe.includes("<anonymous>") && (fe = fe.replace("<anonymous>", i.displayName)), typeof i == "function" && Oe.set(i, fe), fe;
|
938
1059
|
}
|
939
1060
|
while (Z >= 1 && Q >= 0);
|
940
1061
|
break;
|
941
1062
|
}
|
942
1063
|
}
|
943
1064
|
} finally {
|
944
|
-
$e = !1,
|
1065
|
+
$e = !1, Ke.current = F, Rt(), Error.prepareStackTrace = D;
|
945
1066
|
}
|
946
|
-
var Ye = i ? i.displayName || i.name : "",
|
947
|
-
return typeof i == "function" && Oe.set(i,
|
1067
|
+
var Ye = i ? i.displayName || i.name : "", Vt = Ye ? Ue(Ye) : "";
|
1068
|
+
return typeof i == "function" && Oe.set(i, Vt), Vt;
|
948
1069
|
}
|
949
1070
|
function _t(i, f, g) {
|
950
|
-
return
|
1071
|
+
return dt(i, !1);
|
951
1072
|
}
|
952
|
-
function
|
1073
|
+
function ht(i) {
|
953
1074
|
var f = i.prototype;
|
954
1075
|
return !!(f && f.isReactComponent);
|
955
1076
|
}
|
@@ -957,11 +1078,11 @@ function ka() {
|
|
957
1078
|
if (i == null)
|
958
1079
|
return "";
|
959
1080
|
if (typeof i == "function")
|
960
|
-
return
|
1081
|
+
return dt(i, ht(i));
|
961
1082
|
if (typeof i == "string")
|
962
1083
|
return Ue(i);
|
963
1084
|
switch (i) {
|
964
|
-
case
|
1085
|
+
case d:
|
965
1086
|
return Ue("Suspense");
|
966
1087
|
case v:
|
967
1088
|
return Ue("SuspenseList");
|
@@ -973,24 +1094,24 @@ function ka() {
|
|
973
1094
|
case b:
|
974
1095
|
return Me(i.type, f, g);
|
975
1096
|
case E: {
|
976
|
-
var C = i,
|
1097
|
+
var C = i, D = C._payload, F = C._init;
|
977
1098
|
try {
|
978
|
-
return Me(F(
|
1099
|
+
return Me(F(D), f, g);
|
979
1100
|
} catch {
|
980
1101
|
}
|
981
1102
|
}
|
982
1103
|
}
|
983
1104
|
return "";
|
984
1105
|
}
|
985
|
-
var Te = Object.prototype.hasOwnProperty,
|
1106
|
+
var Te = Object.prototype.hasOwnProperty, ft = {}, pt = B.ReactDebugCurrentFrame;
|
986
1107
|
function Re(i) {
|
987
1108
|
if (i) {
|
988
1109
|
var f = i._owner, g = Me(i.type, i._source, f ? f.type : null);
|
989
|
-
|
1110
|
+
pt.setExtraStackFrame(g);
|
990
1111
|
} else
|
991
|
-
|
1112
|
+
pt.setExtraStackFrame(null);
|
992
1113
|
}
|
993
|
-
function
|
1114
|
+
function Ze(i, f, g, C, D) {
|
994
1115
|
{
|
995
1116
|
var F = Function.call.bind(Te);
|
996
1117
|
for (var A in i)
|
@@ -998,19 +1119,19 @@ function ka() {
|
|
998
1119
|
var R = void 0;
|
999
1120
|
try {
|
1000
1121
|
if (typeof i[A] != "function") {
|
1001
|
-
var
|
1002
|
-
throw
|
1122
|
+
var ce = Error((C || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
1123
|
+
throw ce.name = "Invariant Violation", ce;
|
1003
1124
|
}
|
1004
1125
|
R = i[A](f, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1005
1126
|
} catch (Z) {
|
1006
1127
|
R = Z;
|
1007
1128
|
}
|
1008
|
-
R && !(R instanceof Error) && (Re(
|
1129
|
+
R && !(R instanceof Error) && (Re(D), x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", C || "React class", g, A, typeof R), Re(null)), R instanceof Error && !(R.message in ft) && (ft[R.message] = !0, Re(D), x("Failed %s type: %s", g, R.message), Re(null));
|
1009
1130
|
}
|
1010
1131
|
}
|
1011
1132
|
}
|
1012
1133
|
var _e = Array.isArray;
|
1013
|
-
function
|
1134
|
+
function Je(i) {
|
1014
1135
|
return _e(i);
|
1015
1136
|
}
|
1016
1137
|
function At(i) {
|
@@ -1019,26 +1140,26 @@ function ka() {
|
|
1019
1140
|
return g;
|
1020
1141
|
}
|
1021
1142
|
}
|
1022
|
-
function
|
1143
|
+
function mt(i) {
|
1023
1144
|
try {
|
1024
|
-
return
|
1145
|
+
return vt(i), !1;
|
1025
1146
|
} catch {
|
1026
1147
|
return !0;
|
1027
1148
|
}
|
1028
1149
|
}
|
1029
|
-
function
|
1150
|
+
function vt(i) {
|
1030
1151
|
return "" + i;
|
1031
1152
|
}
|
1032
|
-
function
|
1033
|
-
if (
|
1034
|
-
return
|
1153
|
+
function gt(i) {
|
1154
|
+
if (mt(i))
|
1155
|
+
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", At(i)), vt(i);
|
1035
1156
|
}
|
1036
|
-
var
|
1157
|
+
var Se = B.ReactCurrentOwner, Qe = {
|
1037
1158
|
key: !0,
|
1038
1159
|
ref: !0,
|
1039
1160
|
__self: !0,
|
1040
1161
|
__source: !0
|
1041
|
-
},
|
1162
|
+
}, et, bt, ze;
|
1042
1163
|
ze = {};
|
1043
1164
|
function Pt(i) {
|
1044
1165
|
if (Te.call(i, "ref")) {
|
@@ -1056,16 +1177,16 @@ function ka() {
|
|
1056
1177
|
}
|
1057
1178
|
return i.key !== void 0;
|
1058
1179
|
}
|
1059
|
-
function
|
1060
|
-
if (typeof i.ref == "string" &&
|
1061
|
-
var g = $(
|
1062
|
-
ze[g] || (
|
1180
|
+
function yt(i, f) {
|
1181
|
+
if (typeof i.ref == "string" && Se.current && f && Se.current.stateNode !== f) {
|
1182
|
+
var g = $(Se.current.type);
|
1183
|
+
ze[g] || (x('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', $(Se.current.type), i.ref), ze[g] = !0);
|
1063
1184
|
}
|
1064
1185
|
}
|
1065
|
-
function
|
1186
|
+
function xe(i, f) {
|
1066
1187
|
{
|
1067
1188
|
var g = function() {
|
1068
|
-
|
1189
|
+
et || (et = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
1069
1190
|
};
|
1070
1191
|
g.isReactWarning = !0, Object.defineProperty(i, "key", {
|
1071
1192
|
get: g,
|
@@ -1073,10 +1194,10 @@ function ka() {
|
|
1073
1194
|
});
|
1074
1195
|
}
|
1075
1196
|
}
|
1076
|
-
function
|
1197
|
+
function Gt(i, f) {
|
1077
1198
|
{
|
1078
1199
|
var g = function() {
|
1079
|
-
|
1200
|
+
bt || (bt = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
|
1080
1201
|
};
|
1081
1202
|
g.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
1082
1203
|
get: g,
|
@@ -1084,7 +1205,7 @@ function ka() {
|
|
1084
1205
|
});
|
1085
1206
|
}
|
1086
1207
|
}
|
1087
|
-
var r = function(i, f, g, C,
|
1208
|
+
var r = function(i, f, g, C, D, F, A) {
|
1088
1209
|
var R = {
|
1089
1210
|
// This tag allows us to uniquely identify this as a React Element
|
1090
1211
|
$$typeof: n,
|
@@ -1110,25 +1231,25 @@ function ka() {
|
|
1110
1231
|
configurable: !1,
|
1111
1232
|
enumerable: !1,
|
1112
1233
|
writable: !1,
|
1113
|
-
value:
|
1234
|
+
value: D
|
1114
1235
|
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
1115
1236
|
};
|
1116
|
-
function y(i, f, g, C,
|
1237
|
+
function y(i, f, g, C, D) {
|
1117
1238
|
{
|
1118
|
-
var F, A = {}, R = null,
|
1119
|
-
g !== void 0 && (
|
1239
|
+
var F, A = {}, R = null, ce = null;
|
1240
|
+
g !== void 0 && (gt(g), R = "" + g), kt(f) && (gt(f.key), R = "" + f.key), Pt(f) && (ce = f.ref, yt(f, D));
|
1120
1241
|
for (F in f)
|
1121
|
-
Te.call(f, F) && !
|
1242
|
+
Te.call(f, F) && !Qe.hasOwnProperty(F) && (A[F] = f[F]);
|
1122
1243
|
if (i && i.defaultProps) {
|
1123
1244
|
var Z = i.defaultProps;
|
1124
1245
|
for (F in Z)
|
1125
1246
|
A[F] === void 0 && (A[F] = Z[F]);
|
1126
1247
|
}
|
1127
|
-
if (R ||
|
1248
|
+
if (R || ce) {
|
1128
1249
|
var Q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
1129
|
-
R &&
|
1250
|
+
R && xe(A, Q), ce && Gt(A, Q);
|
1130
1251
|
}
|
1131
|
-
return r(i, R,
|
1252
|
+
return r(i, R, ce, D, C, Se.current, A);
|
1132
1253
|
}
|
1133
1254
|
}
|
1134
1255
|
var O = B.ReactCurrentOwner, L = B.ReactDebugCurrentFrame;
|
@@ -1144,7 +1265,7 @@ function ka() {
|
|
1144
1265
|
function ie(i) {
|
1145
1266
|
return typeof i == "object" && i !== null && i.$$typeof === n;
|
1146
1267
|
}
|
1147
|
-
function
|
1268
|
+
function jt() {
|
1148
1269
|
{
|
1149
1270
|
if (O.current) {
|
1150
1271
|
var i = $(O.current.type);
|
@@ -1156,7 +1277,7 @@ Check the render method of \`` + i + "`.";
|
|
1156
1277
|
return "";
|
1157
1278
|
}
|
1158
1279
|
}
|
1159
|
-
function
|
1280
|
+
function Dt(i) {
|
1160
1281
|
{
|
1161
1282
|
if (i !== void 0) {
|
1162
1283
|
var f = i.fileName.replace(/^.*[\\\/]/, ""), g = i.lineNumber;
|
@@ -1167,10 +1288,10 @@ Check your code at ` + f + ":" + g + ".";
|
|
1167
1288
|
return "";
|
1168
1289
|
}
|
1169
1290
|
}
|
1170
|
-
var
|
1171
|
-
function
|
1291
|
+
var tt = {};
|
1292
|
+
function pe(i) {
|
1172
1293
|
{
|
1173
|
-
var f =
|
1294
|
+
var f = jt();
|
1174
1295
|
if (!f) {
|
1175
1296
|
var g = typeof i == "string" ? i : i.displayName || i.name;
|
1176
1297
|
g && (f = `
|
@@ -1180,35 +1301,35 @@ Check the top-level render call using <` + g + ">.");
|
|
1180
1301
|
return f;
|
1181
1302
|
}
|
1182
1303
|
}
|
1183
|
-
function
|
1304
|
+
function he(i, f) {
|
1184
1305
|
{
|
1185
1306
|
if (!i._store || i._store.validated || i.key != null)
|
1186
1307
|
return;
|
1187
1308
|
i._store.validated = !0;
|
1188
|
-
var g =
|
1189
|
-
if (
|
1309
|
+
var g = pe(f);
|
1310
|
+
if (tt[g])
|
1190
1311
|
return;
|
1191
|
-
|
1312
|
+
tt[g] = !0;
|
1192
1313
|
var C = "";
|
1193
|
-
i && i._owner && i._owner !== O.current && (C = " It was passed a child from " + $(i._owner.type) + "."), K(i),
|
1314
|
+
i && i._owner && i._owner !== O.current && (C = " It was passed a child from " + $(i._owner.type) + "."), K(i), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), K(null);
|
1194
1315
|
}
|
1195
1316
|
}
|
1196
1317
|
function Ae(i, f) {
|
1197
1318
|
{
|
1198
1319
|
if (typeof i != "object")
|
1199
1320
|
return;
|
1200
|
-
if (
|
1321
|
+
if (Je(i))
|
1201
1322
|
for (var g = 0; g < i.length; g++) {
|
1202
1323
|
var C = i[g];
|
1203
|
-
ie(C) &&
|
1324
|
+
ie(C) && he(C, f);
|
1204
1325
|
}
|
1205
1326
|
else if (ie(i))
|
1206
1327
|
i._store && (i._store.validated = !0);
|
1207
1328
|
else if (i) {
|
1208
|
-
var
|
1209
|
-
if (typeof
|
1210
|
-
for (var F =
|
1211
|
-
ie(A.value) &&
|
1329
|
+
var D = H(i);
|
1330
|
+
if (typeof D == "function" && D !== i.entries)
|
1331
|
+
for (var F = D.call(i), A; !(A = F.next()).done; )
|
1332
|
+
ie(A.value) && he(A.value, f);
|
1212
1333
|
}
|
1213
1334
|
}
|
1214
1335
|
}
|
@@ -1228,13 +1349,13 @@ Check the top-level render call using <` + g + ">.");
|
|
1228
1349
|
return;
|
1229
1350
|
if (g) {
|
1230
1351
|
var C = $(f);
|
1231
|
-
|
1352
|
+
Ze(g, i.props, "prop", C, i);
|
1232
1353
|
} else if (f.PropTypes !== void 0 && !de) {
|
1233
1354
|
de = !0;
|
1234
|
-
var
|
1235
|
-
|
1355
|
+
var D = $(f);
|
1356
|
+
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
|
1236
1357
|
}
|
1237
|
-
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved &&
|
1358
|
+
typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1238
1359
|
}
|
1239
1360
|
}
|
1240
1361
|
function ke(i) {
|
@@ -1242,63 +1363,63 @@ Check the top-level render call using <` + g + ">.");
|
|
1242
1363
|
for (var f = Object.keys(i.props), g = 0; g < f.length; g++) {
|
1243
1364
|
var C = f[g];
|
1244
1365
|
if (C !== "children" && C !== "key") {
|
1245
|
-
K(i),
|
1366
|
+
K(i), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), K(null);
|
1246
1367
|
break;
|
1247
1368
|
}
|
1248
1369
|
}
|
1249
|
-
i.ref !== null && (K(i),
|
1370
|
+
i.ref !== null && (K(i), x("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
1250
1371
|
}
|
1251
1372
|
}
|
1252
|
-
function
|
1373
|
+
function je(i, f, g, C, D, F) {
|
1253
1374
|
{
|
1254
1375
|
var A = _(i);
|
1255
1376
|
if (!A) {
|
1256
1377
|
var R = "";
|
1257
1378
|
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1258
|
-
var
|
1259
|
-
|
1379
|
+
var ce = Dt(D);
|
1380
|
+
ce ? R += ce : R += jt();
|
1260
1381
|
var Z;
|
1261
|
-
i === null ? Z = "null" :
|
1382
|
+
i === null ? Z = "null" : Je(i) ? Z = "array" : i !== void 0 && i.$$typeof === n ? (Z = "<" + ($(i.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof i, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, R);
|
1262
1383
|
}
|
1263
|
-
var Q = y(i, f, g,
|
1384
|
+
var Q = y(i, f, g, D, F);
|
1264
1385
|
if (Q == null)
|
1265
1386
|
return Q;
|
1266
1387
|
if (A) {
|
1267
|
-
var
|
1268
|
-
if (
|
1388
|
+
var fe = f.children;
|
1389
|
+
if (fe !== void 0)
|
1269
1390
|
if (C)
|
1270
|
-
if (
|
1271
|
-
for (var Ye = 0; Ye <
|
1272
|
-
Ae(
|
1273
|
-
Object.freeze && Object.freeze(
|
1391
|
+
if (Je(fe)) {
|
1392
|
+
for (var Ye = 0; Ye < fe.length; Ye++)
|
1393
|
+
Ae(fe[Ye], i);
|
1394
|
+
Object.freeze && Object.freeze(fe);
|
1274
1395
|
} else
|
1275
|
-
|
1396
|
+
x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1276
1397
|
else
|
1277
|
-
Ae(
|
1398
|
+
Ae(fe, i);
|
1278
1399
|
}
|
1279
1400
|
return i === e ? ke(Q) : Pe(Q), Q;
|
1280
1401
|
}
|
1281
1402
|
}
|
1282
|
-
function Fn(i, f, g) {
|
1283
|
-
return De(i, f, g, !0);
|
1284
|
-
}
|
1285
1403
|
function Bn(i, f, g) {
|
1286
|
-
return
|
1287
|
-
}
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
/* @__PURE__ */
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1404
|
+
return je(i, f, g, !0);
|
1405
|
+
}
|
1406
|
+
function Un(i, f, g) {
|
1407
|
+
return je(i, f, g, !1);
|
1408
|
+
}
|
1409
|
+
var $n = Un, zn = Bn;
|
1410
|
+
at.Fragment = e, at.jsx = $n, at.jsxs = zn;
|
1411
|
+
}()), at;
|
1412
|
+
}
|
1413
|
+
process.env.NODE_ENV === "production" ? zt.exports = ja() : zt.exports = Da();
|
1414
|
+
var l = zt.exports;
|
1415
|
+
function In(t) {
|
1416
|
+
return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
|
1417
|
+
}
|
1418
|
+
const Ia = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1419
|
+
/* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1420
|
+
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1421
|
+
/* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1422
|
+
] }), La = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
|
1302
1423
|
"path",
|
1303
1424
|
{
|
1304
1425
|
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
|
@@ -1306,46 +1427,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
|
|
1306
1427
|
C11,8.22,10.74,8,10.43,8z`
|
1307
1428
|
}
|
1308
1429
|
) });
|
1309
|
-
function
|
1310
|
-
return /* @__PURE__ */
|
1311
|
-
|
1312
|
-
/* @__PURE__ */
|
1313
|
-
/* @__PURE__ */
|
1430
|
+
function Na(t) {
|
1431
|
+
return /* @__PURE__ */ l.jsx(An.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
|
1432
|
+
La,
|
1433
|
+
/* @__PURE__ */ l.jsx("span", { children: t.title }),
|
1434
|
+
/* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
|
1314
1435
|
t.onDelete(t.index);
|
1315
|
-
}, children:
|
1436
|
+
}, children: Ia })
|
1316
1437
|
] }) }, t.title);
|
1317
1438
|
}
|
1318
|
-
function
|
1319
|
-
const [n, a] = ae(!1), [e, o] = ae(t.options),
|
1320
|
-
t.onDragComplete(
|
1321
|
-
},
|
1439
|
+
function Fa(t) {
|
1440
|
+
const [n, a] = ae(!1), [e, o] = ae(t.options), c = (d) => {
|
1441
|
+
t.onDragComplete(d), o(d);
|
1442
|
+
}, p = (d) => {
|
1322
1443
|
const v = [...e];
|
1323
|
-
v.splice(
|
1444
|
+
v.splice(d, 1), c(v);
|
1324
1445
|
}, s = [];
|
1325
|
-
e.forEach((
|
1326
|
-
s.push(/* @__PURE__ */
|
1446
|
+
e.forEach((d, v) => {
|
1447
|
+
s.push(/* @__PURE__ */ l.jsx(Na, { index: v, title: d, onDelete: p }, d));
|
1327
1448
|
});
|
1328
1449
|
let u = "dropdown draggable";
|
1329
|
-
return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */
|
1330
|
-
/* @__PURE__ */
|
1331
|
-
/* @__PURE__ */
|
1450
|
+
return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1451
|
+
/* @__PURE__ */ l.jsx(In, { title: t.title }),
|
1452
|
+
/* @__PURE__ */ l.jsx(An.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: s })
|
1332
1453
|
] });
|
1333
1454
|
}
|
1334
|
-
function
|
1455
|
+
function Ba(t) {
|
1335
1456
|
const [n, a] = ae(!1), e = [];
|
1336
|
-
t.options.map((
|
1337
|
-
t.onSelect !== void 0 && (
|
1457
|
+
t.options.map((c, p) => {
|
1458
|
+
t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ua, { option: c }, p));
|
1338
1459
|
});
|
1339
1460
|
let o = "dropdown";
|
1340
|
-
return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */
|
1461
|
+
return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
|
1341
1462
|
"div",
|
1342
1463
|
{
|
1343
1464
|
className: o,
|
1344
1465
|
onMouseEnter: () => a(!0),
|
1345
1466
|
onMouseLeave: () => a(!1),
|
1346
1467
|
children: [
|
1347
|
-
/* @__PURE__ */
|
1348
|
-
/* @__PURE__ */
|
1468
|
+
/* @__PURE__ */ l.jsx(In, { title: t.title }),
|
1469
|
+
/* @__PURE__ */ l.jsx(
|
1349
1470
|
"ul",
|
1350
1471
|
{
|
1351
1472
|
style: { visibility: n ? "visible" : "hidden" },
|
@@ -1356,26 +1477,26 @@ function Na(t) {
|
|
1356
1477
|
}
|
1357
1478
|
);
|
1358
1479
|
}
|
1359
|
-
function
|
1480
|
+
function Ua(t) {
|
1360
1481
|
const { option: n } = t, [a, e] = ae("");
|
1361
1482
|
let o;
|
1362
1483
|
switch (n.type) {
|
1363
1484
|
case "draggable":
|
1364
|
-
o = /* @__PURE__ */
|
1365
|
-
|
1485
|
+
o = /* @__PURE__ */ l.jsx(
|
1486
|
+
Fa,
|
1366
1487
|
{
|
1367
1488
|
title: n.title,
|
1368
1489
|
options: n.value,
|
1369
|
-
onDragComplete: (
|
1370
|
-
n.onDragComplete !== void 0 && n.onDragComplete(
|
1490
|
+
onDragComplete: (c) => {
|
1491
|
+
n.onDragComplete !== void 0 && n.onDragComplete(c);
|
1371
1492
|
},
|
1372
1493
|
subdropdown: !0
|
1373
1494
|
}
|
1374
1495
|
);
|
1375
1496
|
break;
|
1376
1497
|
case "dropdown":
|
1377
|
-
o = /* @__PURE__ */
|
1378
|
-
|
1498
|
+
o = /* @__PURE__ */ l.jsx(
|
1499
|
+
Ba,
|
1379
1500
|
{
|
1380
1501
|
title: n.title,
|
1381
1502
|
options: n.value,
|
@@ -1385,7 +1506,7 @@ function Fa(t) {
|
|
1385
1506
|
);
|
1386
1507
|
break;
|
1387
1508
|
case "option":
|
1388
|
-
o = /* @__PURE__ */
|
1509
|
+
o = /* @__PURE__ */ l.jsx(
|
1389
1510
|
"button",
|
1390
1511
|
{
|
1391
1512
|
onClick: () => {
|
@@ -1396,15 +1517,15 @@ function Fa(t) {
|
|
1396
1517
|
);
|
1397
1518
|
break;
|
1398
1519
|
}
|
1399
|
-
return /* @__PURE__ */
|
1520
|
+
return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, xa());
|
1400
1521
|
}
|
1401
|
-
function
|
1522
|
+
function Ii(t) {
|
1402
1523
|
function n(e) {
|
1403
1524
|
switch (t.components.forEach((o) => {
|
1404
1525
|
o.handleApp(e);
|
1405
1526
|
}), e.event) {
|
1406
1527
|
case "custom":
|
1407
|
-
k.dispatchEvent({ type:
|
1528
|
+
k.dispatchEvent({ type: j.CUSTOM, value: e.data });
|
1408
1529
|
break;
|
1409
1530
|
}
|
1410
1531
|
}
|
@@ -1413,7 +1534,7 @@ function ji(t) {
|
|
1413
1534
|
o.handleEditor(e);
|
1414
1535
|
}), e.event) {
|
1415
1536
|
case "custom":
|
1416
|
-
k.dispatchEvent({ type:
|
1537
|
+
k.dispatchEvent({ type: j.CUSTOM, value: e.data });
|
1417
1538
|
break;
|
1418
1539
|
}
|
1419
1540
|
}
|
@@ -1421,7 +1542,7 @@ function ji(t) {
|
|
1421
1542
|
e.target === "editor" ? a(e) : n(e);
|
1422
1543
|
};
|
1423
1544
|
}
|
1424
|
-
const
|
1545
|
+
const $a = `out vec3 worldPosition;
|
1425
1546
|
uniform float uDistance;
|
1426
1547
|
|
1427
1548
|
void main() {
|
@@ -1430,7 +1551,7 @@ void main() {
|
|
1430
1551
|
worldPosition.xz += cameraPosition.xz;
|
1431
1552
|
|
1432
1553
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1433
|
-
}`,
|
1554
|
+
}`, za = `out vec4 fragColor;
|
1434
1555
|
in vec3 worldPosition;
|
1435
1556
|
|
1436
1557
|
uniform float uDivisions;
|
@@ -1498,13 +1619,13 @@ void main() {
|
|
1498
1619
|
|
1499
1620
|
if (fragColor.a <= 0.0) discard;
|
1500
1621
|
}`;
|
1501
|
-
class
|
1622
|
+
class Ya extends un {
|
1502
1623
|
constructor(n) {
|
1503
1624
|
super({
|
1504
1625
|
extensions: {
|
1505
1626
|
derivatives: !0
|
1506
1627
|
},
|
1507
|
-
glslVersion:
|
1628
|
+
glslVersion: Vn,
|
1508
1629
|
side: dn,
|
1509
1630
|
transparent: !0,
|
1510
1631
|
uniforms: {
|
@@ -1515,7 +1636,7 @@ class $a extends un {
|
|
1515
1636
|
value: n?.divisions !== void 0 ? n?.divisions : 10
|
1516
1637
|
},
|
1517
1638
|
uColor: {
|
1518
|
-
value: n?.color !== void 0 ? n?.color : new
|
1639
|
+
value: n?.color !== void 0 ? n?.color : new wt(16777215)
|
1519
1640
|
},
|
1520
1641
|
uDistance: {
|
1521
1642
|
value: n?.distance !== void 0 ? n?.distance : 1e4
|
@@ -1527,24 +1648,24 @@ class $a extends un {
|
|
1527
1648
|
value: n?.gridOpacity !== void 0 ? n?.gridOpacity : 0.25
|
1528
1649
|
}
|
1529
1650
|
},
|
1530
|
-
vertexShader:
|
1531
|
-
fragmentShader:
|
1651
|
+
vertexShader: $a,
|
1652
|
+
fragmentShader: za,
|
1532
1653
|
name: "InfiniteGrid",
|
1533
1654
|
depthWrite: !1
|
1534
1655
|
});
|
1535
1656
|
}
|
1536
1657
|
}
|
1537
|
-
class
|
1658
|
+
class Ga extends Hn {
|
1538
1659
|
gridMaterial;
|
1539
1660
|
constructor() {
|
1540
|
-
const n = new
|
1541
|
-
super(new
|
1661
|
+
const n = new Ya();
|
1662
|
+
super(new Wn(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1542
1663
|
}
|
1543
1664
|
update() {
|
1544
1665
|
this.gridMaterial.needsUpdate = !0;
|
1545
1666
|
}
|
1546
1667
|
}
|
1547
|
-
const
|
1668
|
+
const Va = `#include <common>
|
1548
1669
|
#include <batching_pars_vertex>
|
1549
1670
|
#include <uv_pars_vertex>
|
1550
1671
|
#include <color_pars_vertex>
|
@@ -1574,7 +1695,7 @@ void main() {
|
|
1574
1695
|
#include <logdepthbuf_vertex>
|
1575
1696
|
#include <clipping_planes_vertex>
|
1576
1697
|
#include <worldpos_vertex>
|
1577
|
-
}`,
|
1698
|
+
}`, Ha = `
|
1578
1699
|
#include <common>
|
1579
1700
|
#include <uv_pars_fragment>
|
1580
1701
|
#include <clipping_planes_pars_fragment>
|
@@ -1583,21 +1704,21 @@ void main() {
|
|
1583
1704
|
#include <clipping_planes_fragment>
|
1584
1705
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1585
1706
|
}`;
|
1586
|
-
class
|
1707
|
+
class Wa extends un {
|
1587
1708
|
constructor() {
|
1588
1709
|
super({
|
1589
1710
|
defines: {
|
1590
1711
|
USE_UV: ""
|
1591
1712
|
},
|
1592
|
-
vertexShader:
|
1593
|
-
fragmentShader:
|
1713
|
+
vertexShader: Va,
|
1714
|
+
fragmentShader: Ha
|
1594
1715
|
});
|
1595
1716
|
}
|
1596
1717
|
}
|
1597
|
-
function
|
1718
|
+
function Yt(t) {
|
1598
1719
|
const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1599
|
-
return /* @__PURE__ */
|
1600
|
-
/* @__PURE__ */
|
1720
|
+
return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1721
|
+
/* @__PURE__ */ l.jsxs(
|
1601
1722
|
"button",
|
1602
1723
|
{
|
1603
1724
|
className: "toggle",
|
@@ -1606,28 +1727,28 @@ function Gt(t) {
|
|
1606
1727
|
t.onToggle !== void 0 && t.onToggle(o), a(o);
|
1607
1728
|
},
|
1608
1729
|
children: [
|
1609
|
-
/* @__PURE__ */
|
1730
|
+
/* @__PURE__ */ l.jsx(
|
1610
1731
|
"p",
|
1611
1732
|
{
|
1612
1733
|
className: `status ${n ? "open" : ""}`,
|
1613
1734
|
children: "Toggle"
|
1614
1735
|
}
|
1615
1736
|
),
|
1616
|
-
/* @__PURE__ */
|
1737
|
+
/* @__PURE__ */ l.jsx("p", { className: "label", children: ot(t.label) })
|
1617
1738
|
]
|
1618
1739
|
}
|
1619
1740
|
),
|
1620
1741
|
t.button,
|
1621
|
-
/* @__PURE__ */
|
1742
|
+
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
|
1622
1743
|
] });
|
1623
1744
|
}
|
1624
|
-
function
|
1745
|
+
function Ln(t) {
|
1625
1746
|
const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, o = [];
|
1626
|
-
return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((
|
1627
|
-
o.push(/* @__PURE__ */
|
1628
|
-
}), /* @__PURE__ */
|
1629
|
-
/* @__PURE__ */
|
1630
|
-
e ? /* @__PURE__ */
|
1747
|
+
return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((c) => {
|
1748
|
+
o.push(/* @__PURE__ */ l.jsx(Ln, { child: c, three: t.three }, Math.random()));
|
1749
|
+
}), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
|
1750
|
+
/* @__PURE__ */ l.jsxs("div", { className: "child", children: [
|
1751
|
+
e ? /* @__PURE__ */ l.jsx(
|
1631
1752
|
"button",
|
1632
1753
|
{
|
1633
1754
|
className: "status",
|
@@ -1639,7 +1760,7 @@ function In(t) {
|
|
1639
1760
|
}
|
1640
1761
|
}
|
1641
1762
|
) : null,
|
1642
|
-
/* @__PURE__ */
|
1763
|
+
/* @__PURE__ */ l.jsx(
|
1643
1764
|
"button",
|
1644
1765
|
{
|
1645
1766
|
className: "name",
|
@@ -1652,18 +1773,18 @@ function In(t) {
|
|
1652
1773
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1653
1774
|
}
|
1654
1775
|
),
|
1655
|
-
/* @__PURE__ */
|
1776
|
+
/* @__PURE__ */ l.jsx("div", { className: `icon ${_a(t.child)}` })
|
1656
1777
|
] }),
|
1657
|
-
/* @__PURE__ */
|
1778
|
+
/* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
|
1658
1779
|
] }, Math.random()) });
|
1659
1780
|
}
|
1660
|
-
function
|
1781
|
+
function qa(t) {
|
1661
1782
|
const n = [];
|
1662
1783
|
return t.child?.children.map((a) => {
|
1663
|
-
n.push(/* @__PURE__ */
|
1664
|
-
}), /* @__PURE__ */
|
1784
|
+
n.push(/* @__PURE__ */ l.jsx(Ln, { child: a, three: t.three }, Math.random()));
|
1785
|
+
}), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1665
1786
|
}
|
1666
|
-
const
|
1787
|
+
const Ka = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1667
1788
|
function Xa(t) {
|
1668
1789
|
return "items" in t;
|
1669
1790
|
}
|
@@ -1671,10 +1792,10 @@ function Fe(t) {
|
|
1671
1792
|
const n = [];
|
1672
1793
|
return t.items.forEach((a) => {
|
1673
1794
|
Xa(a) ? n.push(
|
1674
|
-
/* @__PURE__ */
|
1795
|
+
/* @__PURE__ */ l.jsx(Fe, { title: ot(a.title), items: a.items }, Math.random())
|
1675
1796
|
) : n.push(
|
1676
|
-
/* @__PURE__ */
|
1677
|
-
|
1797
|
+
/* @__PURE__ */ l.jsx(
|
1798
|
+
rt,
|
1678
1799
|
{
|
1679
1800
|
title: a.title,
|
1680
1801
|
prop: a.prop,
|
@@ -1692,12 +1813,12 @@ function Fe(t) {
|
|
1692
1813
|
Math.random()
|
1693
1814
|
)
|
1694
1815
|
);
|
1695
|
-
}), /* @__PURE__ */
|
1816
|
+
}), /* @__PURE__ */ l.jsx(Yt, { label: t.title, open: t.expanded === !0, children: n });
|
1696
1817
|
}
|
1697
|
-
function
|
1818
|
+
function Za(t) {
|
1698
1819
|
return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
|
1699
1820
|
}
|
1700
|
-
function
|
1821
|
+
function De(t) {
|
1701
1822
|
switch (t) {
|
1702
1823
|
case "alphaMap":
|
1703
1824
|
return "Alpha Map";
|
@@ -1870,10 +1991,10 @@ function je(t) {
|
|
1870
1991
|
}
|
1871
1992
|
return t;
|
1872
1993
|
}
|
1873
|
-
function
|
1994
|
+
function Ja(t) {
|
1874
1995
|
return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
|
1875
1996
|
}
|
1876
|
-
function
|
1997
|
+
function Qa() {
|
1877
1998
|
const t = document.createElement("input");
|
1878
1999
|
return t.type = "file", new Promise((n, a) => {
|
1879
2000
|
t.addEventListener("change", function() {
|
@@ -1881,84 +2002,84 @@ function Za() {
|
|
1881
2002
|
a();
|
1882
2003
|
else {
|
1883
2004
|
const e = t.files[0], o = new FileReader();
|
1884
|
-
o.onload = function(
|
1885
|
-
n(
|
2005
|
+
o.onload = function(c) {
|
2006
|
+
n(c.target.result);
|
1886
2007
|
}, o.readAsDataURL(e);
|
1887
2008
|
}
|
1888
2009
|
}), t.click();
|
1889
2010
|
});
|
1890
2011
|
}
|
1891
|
-
const
|
2012
|
+
const ei = [
|
1892
2013
|
{
|
1893
2014
|
title: "Front",
|
1894
|
-
value:
|
2015
|
+
value: qn
|
1895
2016
|
},
|
1896
2017
|
{
|
1897
2018
|
title: "Back",
|
1898
|
-
value:
|
2019
|
+
value: Kn
|
1899
2020
|
},
|
1900
2021
|
{
|
1901
2022
|
title: "Double",
|
1902
2023
|
value: dn
|
1903
2024
|
}
|
1904
|
-
],
|
2025
|
+
], ti = [
|
1905
2026
|
{
|
1906
2027
|
title: "No Blending",
|
1907
|
-
value:
|
2028
|
+
value: Xn
|
1908
2029
|
},
|
1909
2030
|
{
|
1910
2031
|
title: "Normal",
|
1911
|
-
value:
|
2032
|
+
value: Zn
|
1912
2033
|
},
|
1913
2034
|
{
|
1914
2035
|
title: "Additive",
|
1915
|
-
value:
|
2036
|
+
value: Jn
|
1916
2037
|
},
|
1917
2038
|
{
|
1918
2039
|
title: "Subtractive",
|
1919
|
-
value:
|
2040
|
+
value: Qn
|
1920
2041
|
},
|
1921
2042
|
{
|
1922
2043
|
title: "Multiply",
|
1923
|
-
value:
|
2044
|
+
value: ea
|
1924
2045
|
},
|
1925
2046
|
{
|
1926
2047
|
title: "Custom",
|
1927
|
-
value:
|
2048
|
+
value: ta
|
1928
2049
|
}
|
1929
|
-
],
|
2050
|
+
], ni = [
|
1930
2051
|
{
|
1931
2052
|
title: "Add",
|
1932
|
-
value:
|
2053
|
+
value: na
|
1933
2054
|
},
|
1934
2055
|
{
|
1935
2056
|
title: "Subtract",
|
1936
|
-
value:
|
2057
|
+
value: aa
|
1937
2058
|
},
|
1938
2059
|
{
|
1939
2060
|
title: "Reverse Subtract",
|
1940
|
-
value:
|
2061
|
+
value: ia
|
1941
2062
|
},
|
1942
2063
|
{
|
1943
2064
|
title: "Min",
|
1944
|
-
value:
|
2065
|
+
value: ra
|
1945
2066
|
},
|
1946
2067
|
{
|
1947
2068
|
title: "Max",
|
1948
|
-
value:
|
2069
|
+
value: oa
|
1949
2070
|
}
|
1950
|
-
],
|
2071
|
+
], ai = [
|
1951
2072
|
{
|
1952
2073
|
title: "Zero",
|
1953
|
-
valye:
|
2074
|
+
valye: hn
|
1954
2075
|
},
|
1955
2076
|
{
|
1956
2077
|
title: "One",
|
1957
|
-
valye:
|
2078
|
+
valye: fn
|
1958
2079
|
},
|
1959
2080
|
{
|
1960
2081
|
title: "Src Color",
|
1961
|
-
valye:
|
2082
|
+
valye: pn
|
1962
2083
|
},
|
1963
2084
|
{
|
1964
2085
|
title: "One Minus Src Color",
|
@@ -1990,36 +2111,36 @@ const Ja = [
|
|
1990
2111
|
},
|
1991
2112
|
{
|
1992
2113
|
title: "Src Alpha Saturate",
|
1993
|
-
valye:
|
2114
|
+
valye: sa
|
1994
2115
|
},
|
1995
2116
|
{
|
1996
2117
|
title: "Constant Color",
|
1997
|
-
valye:
|
2118
|
+
valye: Sn
|
1998
2119
|
},
|
1999
2120
|
{
|
2000
2121
|
title: "One Minus Constant Color",
|
2001
|
-
valye:
|
2122
|
+
valye: xn
|
2002
2123
|
},
|
2003
2124
|
{
|
2004
2125
|
title: "Constant Alpha",
|
2005
|
-
valye:
|
2126
|
+
valye: wn
|
2006
2127
|
},
|
2007
2128
|
{
|
2008
2129
|
title: "One Minus Constant Alpha",
|
2009
2130
|
valye: On
|
2010
2131
|
}
|
2011
|
-
],
|
2132
|
+
], ii = [
|
2012
2133
|
{
|
2013
2134
|
title: "Zero",
|
2014
|
-
valye:
|
2135
|
+
valye: hn
|
2015
2136
|
},
|
2016
2137
|
{
|
2017
2138
|
title: "One",
|
2018
|
-
valye:
|
2139
|
+
valye: fn
|
2019
2140
|
},
|
2020
2141
|
{
|
2021
2142
|
title: "Src Color",
|
2022
|
-
valye:
|
2143
|
+
valye: pn
|
2023
2144
|
},
|
2024
2145
|
{
|
2025
2146
|
title: "One Minus Src Color",
|
@@ -2051,171 +2172,171 @@ const Ja = [
|
|
2051
2172
|
},
|
2052
2173
|
{
|
2053
2174
|
title: "Constant Color",
|
2054
|
-
valye:
|
2175
|
+
valye: Sn
|
2055
2176
|
},
|
2056
2177
|
{
|
2057
2178
|
title: "One Minus Constant Color",
|
2058
|
-
valye:
|
2179
|
+
valye: xn
|
2059
2180
|
},
|
2060
2181
|
{
|
2061
2182
|
title: "Constant Alpha",
|
2062
|
-
valye:
|
2183
|
+
valye: wn
|
2063
2184
|
},
|
2064
2185
|
{
|
2065
2186
|
title: "One Minus Constant Alpha",
|
2066
2187
|
valye: On
|
2067
2188
|
}
|
2068
2189
|
];
|
2069
|
-
function
|
2190
|
+
function it(t, n) {
|
2070
2191
|
t.needsUpdate = !0, t.type = "option", t.options = n;
|
2071
2192
|
}
|
2072
2193
|
function Jt(t, n, a) {
|
2073
2194
|
const e = [];
|
2074
2195
|
for (const o in t) {
|
2075
|
-
if (!
|
2196
|
+
if (!Za(o))
|
2076
2197
|
continue;
|
2077
|
-
const
|
2078
|
-
if (
|
2198
|
+
const c = typeof t[o], p = t[o];
|
2199
|
+
if (c === "boolean" || c === "number" || c === "string") {
|
2079
2200
|
const s = {
|
2080
|
-
title:
|
2201
|
+
title: De(o),
|
2081
2202
|
prop: o,
|
2082
|
-
type:
|
2083
|
-
value:
|
2203
|
+
type: c,
|
2204
|
+
value: p,
|
2084
2205
|
min: void 0,
|
2085
2206
|
max: void 0,
|
2086
|
-
needsUpdate:
|
2087
|
-
onChange: (
|
2088
|
-
a.updateObject(n.uuid, `material.${
|
2207
|
+
needsUpdate: c === "boolean",
|
2208
|
+
onChange: (d, v) => {
|
2209
|
+
a.updateObject(n.uuid, `material.${d}`, v), s.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
|
2089
2210
|
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2090
|
-
b !== void 0 && ee(b, `material.${
|
2211
|
+
b !== void 0 && ee(b, `material.${d}`, v);
|
2091
2212
|
}
|
2092
2213
|
};
|
2093
2214
|
switch (o) {
|
2094
2215
|
case "blending":
|
2095
|
-
|
2216
|
+
it(s, ti);
|
2096
2217
|
break;
|
2097
2218
|
case "blendDst":
|
2098
|
-
|
2219
|
+
it(s, ii);
|
2099
2220
|
break;
|
2100
2221
|
case "blendEquation":
|
2101
|
-
|
2222
|
+
it(s, ni);
|
2102
2223
|
break;
|
2103
2224
|
case "blendSrc":
|
2104
|
-
|
2225
|
+
it(s, ai);
|
2105
2226
|
break;
|
2106
2227
|
case "side":
|
2107
|
-
|
2228
|
+
it(s, ei);
|
2108
2229
|
break;
|
2109
2230
|
}
|
2110
|
-
|
2111
|
-
const u =
|
2112
|
-
u && (s.disabled = !1, s.latest = s.value, s.onChange = (
|
2231
|
+
Ja(o) && (s.value = Number(p), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01);
|
2232
|
+
const u = c === "string" && (o === "vertexShader" || o === "fragmentShader");
|
2233
|
+
u && (s.disabled = !1, s.latest = s.value, s.onChange = (d, v) => {
|
2113
2234
|
s.latest = v;
|
2114
2235
|
}), e.push(s), u && e.push({
|
2115
|
-
title: `${
|
2236
|
+
title: `${ot(o)} - Update`,
|
2116
2237
|
type: "button",
|
2117
2238
|
onChange: () => {
|
2118
2239
|
a.updateObject(n.uuid, `material.${o}`, s.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
|
2119
|
-
const
|
2120
|
-
|
2240
|
+
const d = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2241
|
+
d !== void 0 && (ee(d, `material.${o}`, s.latest), d.material.needsUpdate = !0);
|
2121
2242
|
}
|
2122
2243
|
});
|
2123
|
-
} else if (
|
2124
|
-
if (
|
2244
|
+
} else if (c === "object")
|
2245
|
+
if (p.isColor)
|
2125
2246
|
e.push({
|
2126
|
-
title:
|
2247
|
+
title: De(o),
|
2127
2248
|
prop: o,
|
2128
2249
|
type: "color",
|
2129
|
-
value:
|
2250
|
+
value: p,
|
2130
2251
|
onChange: (s, u) => {
|
2131
|
-
const
|
2132
|
-
a.updateObject(n.uuid, `material.${s}`,
|
2252
|
+
const d = new wt(u);
|
2253
|
+
a.updateObject(n.uuid, `material.${s}`, d);
|
2133
2254
|
const v = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2134
|
-
v !== void 0 && ee(v, `material.${s}`,
|
2255
|
+
v !== void 0 && ee(v, `material.${s}`, d);
|
2135
2256
|
}
|
2136
2257
|
});
|
2137
|
-
else if (Array.isArray(
|
2258
|
+
else if (Array.isArray(p)) {
|
2138
2259
|
const s = [];
|
2139
|
-
for (const u in
|
2260
|
+
for (const u in p)
|
2140
2261
|
s.push({
|
2141
2262
|
title: `${u}`,
|
2142
|
-
type: `${typeof
|
2143
|
-
value:
|
2144
|
-
onChange: (
|
2263
|
+
type: `${typeof p[u]}`,
|
2264
|
+
value: p[u],
|
2265
|
+
onChange: (d, v) => {
|
2145
2266
|
a.updateObject(n.uuid, `material.${o}`, v);
|
2146
2267
|
const b = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2147
2268
|
b !== void 0 && ee(b, `material.${o}`, v);
|
2148
2269
|
}
|
2149
2270
|
});
|
2150
2271
|
e.push({
|
2151
|
-
title:
|
2272
|
+
title: De(o),
|
2152
2273
|
items: s
|
2153
2274
|
});
|
2154
2275
|
} else {
|
2155
2276
|
const s = [];
|
2156
|
-
for (const u in
|
2157
|
-
const
|
2158
|
-
switch (typeof
|
2277
|
+
for (const u in p) {
|
2278
|
+
const d = p[u];
|
2279
|
+
switch (typeof d) {
|
2159
2280
|
case "boolean":
|
2160
2281
|
case "number":
|
2161
2282
|
case "string":
|
2162
2283
|
u === "src" ? e.push({
|
2163
|
-
title:
|
2284
|
+
title: De(o),
|
2164
2285
|
type: "image",
|
2165
|
-
value:
|
2286
|
+
value: d,
|
2166
2287
|
onChange: (b, E) => {
|
2167
2288
|
a.createTexture(n.uuid, `material.${o}`, E);
|
2168
|
-
const
|
2169
|
-
|
2170
|
-
ee(
|
2289
|
+
const S = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2290
|
+
S !== void 0 && $t(E).then((M) => {
|
2291
|
+
ee(S, `material.${o}`, M), ee(S, "material.needsUpdate", !0);
|
2171
2292
|
});
|
2172
2293
|
}
|
2173
2294
|
}) : s.push({
|
2174
|
-
title: `${
|
2295
|
+
title: `${De(u)}`,
|
2175
2296
|
prop: `material.${o}.${u}`,
|
2176
2297
|
type: `${typeof t[o][u]}`,
|
2177
|
-
value:
|
2298
|
+
value: p[u],
|
2178
2299
|
onChange: (b, E) => {
|
2179
2300
|
a.updateObject(n.uuid, `material.${o}.${u}`, E);
|
2180
|
-
const
|
2181
|
-
|
2301
|
+
const S = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2302
|
+
S !== void 0 && ee(S, `material.${o}.${u}`, E);
|
2182
2303
|
}
|
2183
2304
|
});
|
2184
2305
|
break;
|
2185
2306
|
case "object":
|
2186
|
-
if (
|
2307
|
+
if (d.value !== void 0 && d.value.src !== void 0)
|
2187
2308
|
s.push({
|
2188
|
-
title:
|
2309
|
+
title: De(u),
|
2189
2310
|
type: "image",
|
2190
|
-
value:
|
2311
|
+
value: d.value.src,
|
2191
2312
|
onChange: (b, E) => {
|
2192
|
-
a.createTexture(n.uuid, `material.${o}.${u}.value`,
|
2193
|
-
const
|
2194
|
-
|
2195
|
-
ee(
|
2313
|
+
a.createTexture(n.uuid, `material.${o}.${u}.value`, p);
|
2314
|
+
const S = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2315
|
+
S !== void 0 && $t(E).then((M) => {
|
2316
|
+
ee(S, `material.${o}.${u}.value`, M);
|
2196
2317
|
});
|
2197
2318
|
}
|
2198
2319
|
});
|
2199
2320
|
else if (o === "uniforms") {
|
2200
|
-
const b =
|
2201
|
-
title:
|
2321
|
+
const b = d.value, E = (S, M, P) => ({
|
2322
|
+
title: S,
|
2202
2323
|
type: "number",
|
2203
2324
|
value: P,
|
2204
2325
|
step: 0.01,
|
2205
2326
|
onChange: (H, B) => {
|
2206
|
-
const
|
2207
|
-
a.updateObject(n.uuid,
|
2327
|
+
const x = `material.uniforms.${u}.value.${M}`;
|
2328
|
+
a.updateObject(n.uuid, x, B);
|
2208
2329
|
const z = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2209
|
-
z !== void 0 && ee(z,
|
2330
|
+
z !== void 0 && ee(z, x, B);
|
2210
2331
|
}
|
2211
2332
|
});
|
2212
|
-
if (typeof
|
2333
|
+
if (typeof d.value == "number")
|
2213
2334
|
s.push({
|
2214
2335
|
title: u,
|
2215
2336
|
type: "number",
|
2216
|
-
value:
|
2217
|
-
onChange: (
|
2218
|
-
const P = `material.${o}.${
|
2337
|
+
value: d.value,
|
2338
|
+
onChange: (S, M) => {
|
2339
|
+
const P = `material.${o}.${S}.value`;
|
2219
2340
|
a.updateObject(n.uuid, P, M);
|
2220
2341
|
const H = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2221
2342
|
H !== void 0 && ee(H, P, M);
|
@@ -2225,9 +2346,9 @@ function Jt(t, n, a) {
|
|
2225
2346
|
s.push({
|
2226
2347
|
title: u,
|
2227
2348
|
type: "color",
|
2228
|
-
value:
|
2229
|
-
onChange: (
|
2230
|
-
const P = new
|
2349
|
+
value: d.value,
|
2350
|
+
onChange: (S, M) => {
|
2351
|
+
const P = new wt(M), H = `material.${o}.${S}.value`;
|
2231
2352
|
a.updateObject(n.uuid, H, P);
|
2232
2353
|
const B = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2233
2354
|
B !== void 0 && ee(B, H, P);
|
@@ -2238,8 +2359,8 @@ function Jt(t, n, a) {
|
|
2238
2359
|
{
|
2239
2360
|
title: u,
|
2240
2361
|
items: [
|
2241
|
-
E("X", "x",
|
2242
|
-
E("Y", "y",
|
2362
|
+
E("X", "x", d.value.x),
|
2363
|
+
E("Y", "y", d.value.y)
|
2243
2364
|
]
|
2244
2365
|
}
|
2245
2366
|
);
|
@@ -2248,9 +2369,9 @@ function Jt(t, n, a) {
|
|
2248
2369
|
{
|
2249
2370
|
title: u,
|
2250
2371
|
items: [
|
2251
|
-
E("X", "x",
|
2252
|
-
E("Y", "y",
|
2253
|
-
E("Z", "z",
|
2372
|
+
E("X", "x", d.value.x),
|
2373
|
+
E("Y", "y", d.value.y),
|
2374
|
+
E("Z", "z", d.value.z)
|
2254
2375
|
]
|
2255
2376
|
}
|
2256
2377
|
);
|
@@ -2259,17 +2380,17 @@ function Jt(t, n, a) {
|
|
2259
2380
|
{
|
2260
2381
|
title: u,
|
2261
2382
|
items: [
|
2262
|
-
E("X", "x",
|
2263
|
-
E("Y", "y",
|
2264
|
-
E("Z", "z",
|
2265
|
-
E("W", "w",
|
2383
|
+
E("X", "x", d.value.x),
|
2384
|
+
E("Y", "y", d.value.y),
|
2385
|
+
E("Z", "z", d.value.z),
|
2386
|
+
E("W", "w", d.value.w)
|
2266
2387
|
]
|
2267
2388
|
}
|
2268
2389
|
);
|
2269
2390
|
else if (b.elements !== void 0) {
|
2270
|
-
const
|
2271
|
-
for (let P = 0; P <
|
2272
|
-
M.push(E(P.toString(), P.toString(),
|
2391
|
+
const S = b.elements, M = [];
|
2392
|
+
for (let P = 0; P < S.length; P++)
|
2393
|
+
M.push(E(P.toString(), P.toString(), S[P]));
|
2273
2394
|
s.push(
|
2274
2395
|
{
|
2275
2396
|
title: u,
|
@@ -2281,26 +2402,26 @@ function Jt(t, n, a) {
|
|
2281
2402
|
} else
|
2282
2403
|
s.push({
|
2283
2404
|
title: u,
|
2284
|
-
type: `${typeof
|
2285
|
-
value:
|
2405
|
+
type: `${typeof d.value}`,
|
2406
|
+
value: d.value,
|
2286
2407
|
onChange: (b, E) => {
|
2287
2408
|
a.updateObject(n.uuid, `material.${o}.${u}.value`, E);
|
2288
|
-
const
|
2289
|
-
|
2409
|
+
const S = a.scene?.getObjectByProperty("uuid", n.uuid);
|
2410
|
+
S !== void 0 && ee(S, `material.${o}.${u}.value`, E);
|
2290
2411
|
}
|
2291
2412
|
});
|
2292
2413
|
break;
|
2293
2414
|
}
|
2294
2415
|
}
|
2295
2416
|
s.length > 0 && e.push({
|
2296
|
-
title:
|
2417
|
+
title: De(o),
|
2297
2418
|
items: s
|
2298
2419
|
});
|
2299
2420
|
}
|
2300
2421
|
else
|
2301
|
-
|
2422
|
+
p !== void 0 && console.log("other:", o, c, p);
|
2302
2423
|
}
|
2303
|
-
return e.sort((o,
|
2424
|
+
return e.sort((o, c) => o.title < c.title ? -1 : o.title > c.title ? 1 : 0), e.push({
|
2304
2425
|
title: "Update Material",
|
2305
2426
|
type: "button",
|
2306
2427
|
onChange: () => {
|
@@ -2308,24 +2429,24 @@ function Jt(t, n, a) {
|
|
2308
2429
|
}
|
2309
2430
|
}), e;
|
2310
2431
|
}
|
2311
|
-
function
|
2432
|
+
function ri(t, n) {
|
2312
2433
|
const a = t.material;
|
2313
2434
|
if (Array.isArray(a)) {
|
2314
2435
|
const e = [], o = a.length;
|
2315
|
-
for (let
|
2436
|
+
for (let c = 0; c < o; c++)
|
2316
2437
|
e.push(
|
2317
|
-
/* @__PURE__ */
|
2438
|
+
/* @__PURE__ */ l.jsx(
|
2318
2439
|
Fe,
|
2319
2440
|
{
|
2320
|
-
title: `Material ${
|
2321
|
-
items: Jt(a[
|
2441
|
+
title: `Material ${c}`,
|
2442
|
+
items: Jt(a[c], t, n)
|
2322
2443
|
},
|
2323
|
-
`Material ${
|
2444
|
+
`Material ${c}`
|
2324
2445
|
)
|
2325
2446
|
);
|
2326
|
-
return /* @__PURE__ */
|
2447
|
+
return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
|
2327
2448
|
} else
|
2328
|
-
return /* @__PURE__ */
|
2449
|
+
return /* @__PURE__ */ l.jsx(
|
2329
2450
|
Fe,
|
2330
2451
|
{
|
2331
2452
|
title: "Material",
|
@@ -2333,79 +2454,79 @@ function ai(t, n) {
|
|
2333
2454
|
}
|
2334
2455
|
);
|
2335
2456
|
}
|
2336
|
-
function
|
2457
|
+
function rt(t) {
|
2337
2458
|
let n = t.value;
|
2338
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
2339
|
-
const [a, e] = ae(n), o = ye(null),
|
2340
|
-
|
2341
|
-
let v = !1, b = -1, E = 0,
|
2459
|
+
n !== void 0 && n.isColor !== void 0 && (n = Oa(t.value));
|
2460
|
+
const [a, e] = ae(n), o = ye(null), c = ye(null), p = ye(null);
|
2461
|
+
we(() => {
|
2462
|
+
let v = !1, b = -1, E = 0, S = Number(a);
|
2342
2463
|
const M = (z) => {
|
2343
|
-
v = !0, E =
|
2464
|
+
v = !0, E = S, b = z.clientX;
|
2344
2465
|
}, P = (z) => {
|
2345
2466
|
if (!v)
|
2346
2467
|
return;
|
2347
|
-
const Ee = t.step !== void 0 ? t.step : 1,
|
2348
|
-
|
2468
|
+
const Ee = t.step !== void 0 ? t.step : 1, le = (z.clientX - b) * Ee;
|
2469
|
+
S = Number((E + le).toFixed(4)), c.current !== null && (c.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
|
2349
2470
|
}, H = () => {
|
2350
2471
|
v = !1;
|
2351
2472
|
}, B = () => {
|
2352
2473
|
v = !1;
|
2353
|
-
},
|
2354
|
-
return
|
2355
|
-
|
2474
|
+
}, x = t.type === "number";
|
2475
|
+
return x && (o.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", H, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", B, !1)), () => {
|
2476
|
+
x && (o.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", H), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", B));
|
2356
2477
|
};
|
2357
2478
|
}, [a]);
|
2358
2479
|
const s = t.type === "string" && (a.length > 100 || a.search(`
|
2359
|
-
`) > -1), u = s || t.type === "image",
|
2480
|
+
`) > -1), u = s || t.type === "image", d = (v) => {
|
2360
2481
|
let b = v.target.value;
|
2361
2482
|
t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
|
2362
2483
|
};
|
2363
|
-
return /* @__PURE__ */
|
2364
|
-
t.type !== "button" && /* @__PURE__ */
|
2365
|
-
t.type === "string" && !s && /* @__PURE__ */
|
2484
|
+
return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
|
2485
|
+
t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: ot(t.title) }, "fieldLabel"),
|
2486
|
+
t.type === "string" && !s && /* @__PURE__ */ l.jsx(
|
2366
2487
|
"input",
|
2367
2488
|
{
|
2368
2489
|
type: "text",
|
2369
2490
|
disabled: t.disabled,
|
2370
|
-
onChange:
|
2491
|
+
onChange: d,
|
2371
2492
|
value: a
|
2372
2493
|
}
|
2373
2494
|
),
|
2374
|
-
t.type === "string" && s && /* @__PURE__ */
|
2495
|
+
t.type === "string" && s && /* @__PURE__ */ l.jsx(
|
2375
2496
|
"textarea",
|
2376
2497
|
{
|
2377
2498
|
cols: 50,
|
2378
2499
|
rows: 10,
|
2379
2500
|
disabled: t.disabled !== void 0 ? t.disabled : !0,
|
2380
|
-
onChange:
|
2501
|
+
onChange: d,
|
2381
2502
|
value: a
|
2382
2503
|
}
|
2383
2504
|
),
|
2384
|
-
t.type === "boolean" && /* @__PURE__ */
|
2505
|
+
t.type === "boolean" && /* @__PURE__ */ l.jsx(
|
2385
2506
|
"input",
|
2386
2507
|
{
|
2387
2508
|
type: "checkbox",
|
2388
2509
|
disabled: t.disabled,
|
2389
|
-
onChange:
|
2510
|
+
onChange: d,
|
2390
2511
|
checked: a
|
2391
2512
|
}
|
2392
2513
|
),
|
2393
|
-
t.type === "number" && /* @__PURE__ */
|
2514
|
+
t.type === "number" && /* @__PURE__ */ l.jsx(
|
2394
2515
|
"input",
|
2395
2516
|
{
|
2396
|
-
ref:
|
2517
|
+
ref: c,
|
2397
2518
|
type: "number",
|
2398
2519
|
value: a,
|
2399
2520
|
min: t.min,
|
2400
2521
|
max: t.max,
|
2401
2522
|
step: t.step,
|
2402
2523
|
disabled: t.disabled,
|
2403
|
-
onChange:
|
2524
|
+
onChange: d
|
2404
2525
|
}
|
2405
2526
|
),
|
2406
|
-
t.type === "range" && /* @__PURE__ */
|
2407
|
-
/* @__PURE__ */
|
2408
|
-
/* @__PURE__ */
|
2527
|
+
t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2528
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
|
2529
|
+
/* @__PURE__ */ l.jsx(
|
2409
2530
|
"input",
|
2410
2531
|
{
|
2411
2532
|
disabled: t.disabled,
|
@@ -2414,15 +2535,15 @@ function ot(t) {
|
|
2414
2535
|
min: t.min,
|
2415
2536
|
max: t.max,
|
2416
2537
|
step: t.step,
|
2417
|
-
onChange:
|
2538
|
+
onChange: d
|
2418
2539
|
}
|
2419
2540
|
)
|
2420
2541
|
] }),
|
2421
|
-
t.type === "color" && /* @__PURE__ */
|
2422
|
-
/* @__PURE__ */
|
2423
|
-
/* @__PURE__ */
|
2542
|
+
t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2543
|
+
/* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
|
2544
|
+
/* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
|
2424
2545
|
] }),
|
2425
|
-
t.type === "button" && /* @__PURE__ */
|
2546
|
+
t.type === "button" && /* @__PURE__ */ l.jsx(
|
2426
2547
|
"button",
|
2427
2548
|
{
|
2428
2549
|
disabled: t.disabled,
|
@@ -2432,12 +2553,12 @@ function ot(t) {
|
|
2432
2553
|
children: t.title
|
2433
2554
|
}
|
2434
2555
|
),
|
2435
|
-
t.type === "image" && /* @__PURE__ */
|
2436
|
-
|
2437
|
-
|
2556
|
+
t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: p, onClick: () => {
|
2557
|
+
Qa().then((v) => {
|
2558
|
+
p.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
|
2438
2559
|
});
|
2439
|
-
}, src: a.length > 0 ? a :
|
2440
|
-
t.type === "option" && /* @__PURE__ */
|
2560
|
+
}, src: a.length > 0 ? a : Ka }),
|
2561
|
+
t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: ot(v.title) }, b)) }) })
|
2441
2562
|
] });
|
2442
2563
|
}
|
2443
2564
|
function Qt(t) {
|
@@ -2469,7 +2590,7 @@ function Qt(t) {
|
|
2469
2590
|
}
|
2470
2591
|
return t;
|
2471
2592
|
}
|
2472
|
-
function
|
2593
|
+
function oi(t, n) {
|
2473
2594
|
const a = [];
|
2474
2595
|
if (t.perspectiveCameraInfo !== void 0)
|
2475
2596
|
for (const e in t.perspectiveCameraInfo)
|
@@ -2479,10 +2600,10 @@ function ii(t, n) {
|
|
2479
2600
|
type: "number",
|
2480
2601
|
step: 0.01,
|
2481
2602
|
value: t.perspectiveCameraInfo[e],
|
2482
|
-
onChange: (o,
|
2483
|
-
n.updateObject(t.uuid, o,
|
2484
|
-
const
|
2485
|
-
|
2603
|
+
onChange: (o, c) => {
|
2604
|
+
n.updateObject(t.uuid, o, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2605
|
+
const p = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2606
|
+
p !== void 0 && (ee(p, o, c), p.updateProjectionMatrix());
|
2486
2607
|
}
|
2487
2608
|
});
|
2488
2609
|
else if (t.orthographicCameraInfo !== void 0)
|
@@ -2493,13 +2614,13 @@ function ii(t, n) {
|
|
2493
2614
|
type: "number",
|
2494
2615
|
step: 0.01,
|
2495
2616
|
value: t.perspectiveCameraInfo[e],
|
2496
|
-
onChange: (o,
|
2497
|
-
n.updateObject(t.uuid, o,
|
2498
|
-
const
|
2499
|
-
|
2617
|
+
onChange: (o, c) => {
|
2618
|
+
n.updateObject(t.uuid, o, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2619
|
+
const p = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2620
|
+
p !== void 0 && (ee(p, o, c), p.updateProjectionMatrix());
|
2500
2621
|
}
|
2501
2622
|
});
|
2502
|
-
return /* @__PURE__ */
|
2623
|
+
return /* @__PURE__ */ l.jsx(
|
2503
2624
|
Fe,
|
2504
2625
|
{
|
2505
2626
|
title: "Camera",
|
@@ -2507,29 +2628,29 @@ function ii(t, n) {
|
|
2507
2628
|
}
|
2508
2629
|
);
|
2509
2630
|
}
|
2510
|
-
const
|
2511
|
-
function
|
2631
|
+
const si = Math.PI / 180, ci = 180 / Math.PI;
|
2632
|
+
function We(t, n, a, e, o) {
|
2512
2633
|
return e + (t - n) * (o - e) / (a - n);
|
2513
2634
|
}
|
2514
|
-
function
|
2515
|
-
return t *
|
2635
|
+
function li(t) {
|
2636
|
+
return t * si;
|
2516
2637
|
}
|
2517
2638
|
function Nt(t) {
|
2518
|
-
return t *
|
2639
|
+
return t * ci;
|
2519
2640
|
}
|
2520
|
-
function
|
2521
|
-
const a = new
|
2641
|
+
function ui(t, n) {
|
2642
|
+
const a = new ca();
|
2522
2643
|
a.elements = t.matrix;
|
2523
|
-
const e = new
|
2524
|
-
t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a),
|
2525
|
-
const
|
2526
|
-
n.updateObject(t.uuid, u,
|
2644
|
+
const e = new X(), o = new la(), c = new X();
|
2645
|
+
t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), c.setFromMatrixScale(a));
|
2646
|
+
const p = (u, d) => {
|
2647
|
+
n.updateObject(t.uuid, u, d);
|
2527
2648
|
const v = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2528
|
-
v !== void 0 && ee(v, u,
|
2529
|
-
}, s = (u,
|
2530
|
-
|
2649
|
+
v !== void 0 && ee(v, u, d);
|
2650
|
+
}, s = (u, d) => {
|
2651
|
+
p(u, li(d));
|
2531
2652
|
};
|
2532
|
-
return /* @__PURE__ */
|
2653
|
+
return /* @__PURE__ */ l.jsx(
|
2533
2654
|
Fe,
|
2534
2655
|
{
|
2535
2656
|
title: "Transform",
|
@@ -2539,21 +2660,21 @@ function li(t, n) {
|
|
2539
2660
|
prop: "position.x",
|
2540
2661
|
type: "number",
|
2541
2662
|
value: e.x,
|
2542
|
-
onChange:
|
2663
|
+
onChange: p
|
2543
2664
|
},
|
2544
2665
|
{
|
2545
2666
|
title: "Position Y",
|
2546
2667
|
prop: "position.y",
|
2547
2668
|
type: "number",
|
2548
2669
|
value: e.y,
|
2549
|
-
onChange:
|
2670
|
+
onChange: p
|
2550
2671
|
},
|
2551
2672
|
{
|
2552
2673
|
title: "Position Z",
|
2553
2674
|
prop: "position.z",
|
2554
2675
|
type: "number",
|
2555
2676
|
value: e.z,
|
2556
|
-
onChange:
|
2677
|
+
onChange: p
|
2557
2678
|
},
|
2558
2679
|
{
|
2559
2680
|
title: "Rotation X",
|
@@ -2589,25 +2710,25 @@ function li(t, n) {
|
|
2589
2710
|
title: "Scale X",
|
2590
2711
|
prop: "scale.x",
|
2591
2712
|
type: "number",
|
2592
|
-
value:
|
2713
|
+
value: c.x,
|
2593
2714
|
step: 0.01,
|
2594
|
-
onChange:
|
2715
|
+
onChange: p
|
2595
2716
|
},
|
2596
2717
|
{
|
2597
2718
|
title: "Scale Y",
|
2598
2719
|
prop: "scale.y",
|
2599
2720
|
type: "number",
|
2600
|
-
value:
|
2721
|
+
value: c.y,
|
2601
2722
|
step: 0.01,
|
2602
|
-
onChange:
|
2723
|
+
onChange: p
|
2603
2724
|
},
|
2604
2725
|
{
|
2605
2726
|
title: "Scale Z",
|
2606
2727
|
prop: "scale.z",
|
2607
2728
|
type: "number",
|
2608
|
-
value:
|
2729
|
+
value: c.z,
|
2609
2730
|
step: 0.01,
|
2610
|
-
onChange:
|
2731
|
+
onChange: p
|
2611
2732
|
}
|
2612
2733
|
]
|
2613
2734
|
}
|
@@ -2632,7 +2753,7 @@ function en(t) {
|
|
2632
2753
|
}
|
2633
2754
|
return t;
|
2634
2755
|
}
|
2635
|
-
function
|
2756
|
+
function di(t, n) {
|
2636
2757
|
const a = [];
|
2637
2758
|
if (t.lightInfo !== void 0)
|
2638
2759
|
for (const e in t.lightInfo) {
|
@@ -2642,11 +2763,11 @@ function ci(t, n) {
|
|
2642
2763
|
prop: e,
|
2643
2764
|
type: "color",
|
2644
2765
|
value: o,
|
2645
|
-
onChange: (
|
2646
|
-
const s = new
|
2647
|
-
n.updateObject(t.uuid,
|
2766
|
+
onChange: (c, p) => {
|
2767
|
+
const s = new wt(p);
|
2768
|
+
n.updateObject(t.uuid, c, s);
|
2648
2769
|
const u = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2649
|
-
u !== void 0 && ee(u,
|
2770
|
+
u !== void 0 && ee(u, c, s);
|
2650
2771
|
}
|
2651
2772
|
}) : a.push({
|
2652
2773
|
title: en(e),
|
@@ -2654,14 +2775,14 @@ function ci(t, n) {
|
|
2654
2775
|
type: typeof o,
|
2655
2776
|
value: o,
|
2656
2777
|
step: typeof o == "number" ? 0.01 : void 0,
|
2657
|
-
onChange: (
|
2658
|
-
n.updateObject(t.uuid,
|
2778
|
+
onChange: (c, p) => {
|
2779
|
+
n.updateObject(t.uuid, c, p);
|
2659
2780
|
const s = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2660
|
-
s !== void 0 && ee(s,
|
2781
|
+
s !== void 0 && ee(s, c, p);
|
2661
2782
|
}
|
2662
2783
|
}));
|
2663
2784
|
}
|
2664
|
-
return /* @__PURE__ */
|
2785
|
+
return /* @__PURE__ */ l.jsx(
|
2665
2786
|
Fe,
|
2666
2787
|
{
|
2667
2788
|
title: "Light",
|
@@ -2669,7 +2790,7 @@ function ci(t, n) {
|
|
2669
2790
|
}
|
2670
2791
|
);
|
2671
2792
|
}
|
2672
|
-
function
|
2793
|
+
function hi(t, n) {
|
2673
2794
|
const a = [], e = [];
|
2674
2795
|
let o = 0;
|
2675
2796
|
t.animations.forEach((s) => {
|
@@ -2703,11 +2824,11 @@ function ui(t, n) {
|
|
2703
2824
|
title: "Animations",
|
2704
2825
|
items: e
|
2705
2826
|
});
|
2706
|
-
const
|
2707
|
-
let
|
2708
|
-
if (
|
2709
|
-
const s =
|
2710
|
-
if (
|
2827
|
+
const c = n.scene?.getObjectByProperty("uuid", t.uuid);
|
2828
|
+
let p = !1;
|
2829
|
+
if (c !== void 0) {
|
2830
|
+
const s = c.mixer;
|
2831
|
+
if (p = s !== void 0, p) {
|
2711
2832
|
const u = [
|
2712
2833
|
{
|
2713
2834
|
title: "Time Scale",
|
@@ -2716,7 +2837,7 @@ function ui(t, n) {
|
|
2716
2837
|
step: 0.01,
|
2717
2838
|
min: -1,
|
2718
2839
|
max: 2,
|
2719
|
-
onChange: (
|
2840
|
+
onChange: (d, v) => {
|
2720
2841
|
s.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
|
2721
2842
|
}
|
2722
2843
|
}
|
@@ -2733,9 +2854,9 @@ function ui(t, n) {
|
|
2733
2854
|
});
|
2734
2855
|
}
|
2735
2856
|
}
|
2736
|
-
return /* @__PURE__ */
|
2857
|
+
return /* @__PURE__ */ l.jsx(Fe, { title: "Animation", items: a });
|
2737
2858
|
}
|
2738
|
-
const
|
2859
|
+
const Nn = {
|
2739
2860
|
name: "",
|
2740
2861
|
uuid: "",
|
2741
2862
|
type: "",
|
@@ -2747,25 +2868,25 @@ const Ln = {
|
|
2747
2868
|
orthographicCameraInfo: void 0,
|
2748
2869
|
lightInfo: void 0
|
2749
2870
|
};
|
2750
|
-
let te = { ...
|
2751
|
-
function
|
2871
|
+
let te = { ...Nn };
|
2872
|
+
function fi(t) {
|
2752
2873
|
const [n, a] = ae(-1);
|
2753
|
-
|
2754
|
-
function
|
2874
|
+
we(() => {
|
2875
|
+
function p(u) {
|
2755
2876
|
te = { ...u.value }, a(Date.now());
|
2756
2877
|
}
|
2757
2878
|
function s() {
|
2758
|
-
te = { ...
|
2879
|
+
te = { ...Nn }, a(Date.now());
|
2759
2880
|
}
|
2760
|
-
return k.addEventListener(
|
2761
|
-
k.removeEventListener(
|
2881
|
+
return k.addEventListener(j.SET_SCENE, s), k.addEventListener(j.SET_OBJECT, p), () => {
|
2882
|
+
k.removeEventListener(j.SET_SCENE, s), k.removeEventListener(j.SET_OBJECT, p);
|
2762
2883
|
};
|
2763
2884
|
}, []);
|
2764
|
-
const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0,
|
2765
|
-
return /* @__PURE__ */
|
2766
|
-
/* @__PURE__ */
|
2767
|
-
/* @__PURE__ */
|
2768
|
-
|
2885
|
+
const e = te.type.toLowerCase(), o = te.animations.length > 0 || te.mixer !== void 0, c = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
|
2886
|
+
return /* @__PURE__ */ l.jsx(Yt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: te.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2887
|
+
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2888
|
+
/* @__PURE__ */ l.jsx(
|
2889
|
+
rt,
|
2769
2890
|
{
|
2770
2891
|
type: "string",
|
2771
2892
|
title: "Name",
|
@@ -2774,8 +2895,8 @@ function di(t) {
|
|
2774
2895
|
disabled: !0
|
2775
2896
|
}
|
2776
2897
|
),
|
2777
|
-
/* @__PURE__ */
|
2778
|
-
|
2898
|
+
/* @__PURE__ */ l.jsx(
|
2899
|
+
rt,
|
2779
2900
|
{
|
2780
2901
|
type: "string",
|
2781
2902
|
title: "Type",
|
@@ -2784,8 +2905,8 @@ function di(t) {
|
|
2784
2905
|
disabled: !0
|
2785
2906
|
}
|
2786
2907
|
),
|
2787
|
-
/* @__PURE__ */
|
2788
|
-
|
2908
|
+
/* @__PURE__ */ l.jsx(
|
2909
|
+
rt,
|
2789
2910
|
{
|
2790
2911
|
type: "string",
|
2791
2912
|
title: "UUID",
|
@@ -2794,47 +2915,47 @@ function di(t) {
|
|
2794
2915
|
disabled: !0
|
2795
2916
|
}
|
2796
2917
|
),
|
2797
|
-
/* @__PURE__ */
|
2798
|
-
|
2918
|
+
/* @__PURE__ */ l.jsx(
|
2919
|
+
rt,
|
2799
2920
|
{
|
2800
2921
|
type: "boolean",
|
2801
2922
|
title: "Visible",
|
2802
2923
|
prop: "visible",
|
2803
2924
|
value: te.visible,
|
2804
|
-
onChange: (
|
2805
|
-
t.three.updateObject(te.uuid,
|
2925
|
+
onChange: (p, s) => {
|
2926
|
+
t.three.updateObject(te.uuid, p, s);
|
2806
2927
|
const u = t.three.scene?.getObjectByProperty("uuid", te.uuid);
|
2807
|
-
u !== void 0 && ee(u,
|
2928
|
+
u !== void 0 && ee(u, p, s);
|
2808
2929
|
}
|
2809
2930
|
}
|
2810
2931
|
)
|
2811
2932
|
] }),
|
2812
|
-
/* @__PURE__ */
|
2813
|
-
|
2814
|
-
o ?
|
2815
|
-
e.search("camera") > -1 ?
|
2816
|
-
e.search("light") > -1 ?
|
2817
|
-
|
2933
|
+
/* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
2934
|
+
ui(te, t.three),
|
2935
|
+
o ? hi(te, t.three) : null,
|
2936
|
+
e.search("camera") > -1 ? oi(te, t.three) : null,
|
2937
|
+
e.search("light") > -1 ? di(te, t.three) : null,
|
2938
|
+
c ? ri(te, t.three) : null
|
2818
2939
|
] })
|
2819
2940
|
] }) }, n) }, "Inspector");
|
2820
2941
|
}
|
2821
|
-
function
|
2942
|
+
function Li(t) {
|
2822
2943
|
const [n, a] = ae(t.scene);
|
2823
|
-
|
2824
|
-
const
|
2825
|
-
a(
|
2944
|
+
we(() => {
|
2945
|
+
const c = (p) => {
|
2946
|
+
a(p.value);
|
2826
2947
|
};
|
2827
|
-
return k.addEventListener(
|
2828
|
-
k.removeEventListener(
|
2948
|
+
return k.addEventListener(j.SET_SCENE, c), () => {
|
2949
|
+
k.removeEventListener(j.SET_SCENE, c);
|
2829
2950
|
};
|
2830
2951
|
}, []);
|
2831
2952
|
const e = n !== null, o = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
|
2832
|
-
return /* @__PURE__ */
|
2833
|
-
/* @__PURE__ */
|
2834
|
-
/* @__PURE__ */
|
2953
|
+
return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
|
2954
|
+
/* @__PURE__ */ l.jsx(Yt, { label: o, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(qa, { child: n, three: t.three }) }) }),
|
2955
|
+
/* @__PURE__ */ l.jsx(fi, { three: t.three })
|
2835
2956
|
] }, "SidePanel");
|
2836
2957
|
}
|
2837
|
-
function
|
2958
|
+
function Ni(t) {
|
2838
2959
|
function n() {
|
2839
2960
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2840
2961
|
}
|
@@ -2843,84 +2964,84 @@ function Li(t) {
|
|
2843
2964
|
return;
|
2844
2965
|
const u = t.three.scene?.getObjectByProperty("uuid", s.value);
|
2845
2966
|
u !== void 0 && t.three.setObject(u);
|
2846
|
-
}, e = (s, u,
|
2967
|
+
}, e = (s, u, d) => {
|
2847
2968
|
if (!n())
|
2848
2969
|
return;
|
2849
2970
|
const v = t.three.scene?.getObjectByProperty("uuid", s);
|
2850
|
-
v !== void 0 && ee(v, u,
|
2971
|
+
v !== void 0 && ee(v, u, d);
|
2851
2972
|
}, o = (s) => {
|
2852
2973
|
if (!n())
|
2853
2974
|
return;
|
2854
|
-
const u = s.value, { key:
|
2855
|
-
e(b,
|
2856
|
-
},
|
2975
|
+
const u = s.value, { key: d, value: v, uuid: b } = u;
|
2976
|
+
e(b, d, v);
|
2977
|
+
}, c = (s) => {
|
2857
2978
|
if (!n())
|
2858
2979
|
return;
|
2859
2980
|
const u = s.value;
|
2860
|
-
$t(u.value).then((
|
2861
|
-
e(u.uuid, u.key,
|
2981
|
+
$t(u.value).then((d) => {
|
2982
|
+
e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
|
2862
2983
|
});
|
2863
|
-
},
|
2984
|
+
}, p = (s) => {
|
2864
2985
|
if (!n())
|
2865
2986
|
return;
|
2866
|
-
const { key: u, uuid:
|
2987
|
+
const { key: u, uuid: d, value: v, subitem: b } = s.value, E = t.three.scene?.getObjectByProperty("uuid", d);
|
2867
2988
|
if (E !== void 0)
|
2868
2989
|
try {
|
2869
|
-
b !== void 0 ?
|
2870
|
-
} catch (
|
2871
|
-
console.log("Error requesting method:"), console.log(
|
2990
|
+
b !== void 0 ? ka(E, b)[u](v) : E[u](v);
|
2991
|
+
} catch (S) {
|
2992
|
+
console.log("Error requesting method:"), console.log(S), console.log(u), console.log(v);
|
2872
2993
|
}
|
2873
2994
|
};
|
2874
|
-
return
|
2875
|
-
k.removeEventListener(
|
2995
|
+
return we(() => (k.addEventListener(j.GET_OBJECT, a), k.addEventListener(j.UPDATE_OBJECT, o), k.addEventListener(j.CREATE_TEXTURE, c), k.addEventListener(j.REQUEST_METHOD, p), () => {
|
2996
|
+
k.removeEventListener(j.GET_OBJECT, a), k.removeEventListener(j.UPDATE_OBJECT, o), k.removeEventListener(j.CREATE_TEXTURE, c), k.removeEventListener(j.REQUEST_METHOD, p);
|
2876
2997
|
}), []), null;
|
2877
2998
|
}
|
2878
|
-
const tn = { type: "change" }, Ft = { type: "start" }, nn = { type: "end" },
|
2879
|
-
class
|
2999
|
+
const tn = { type: "change" }, Ft = { type: "start" }, nn = { type: "end" }, Et = new ua(), an = new da(), pi = Math.cos(70 * ha.DEG2RAD);
|
3000
|
+
class mi extends cn {
|
2880
3001
|
constructor(n, a) {
|
2881
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
3002
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new X(), this.cursor = new X(), 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: Ge.ROTATE, MIDDLE: Ge.DOLLY, RIGHT: Ge.PAN }, this.touches = { ONE: Ve.ROTATE, TWO: Ve.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2882
3003
|
return s.phi;
|
2883
3004
|
}, this.getAzimuthalAngle = function() {
|
2884
3005
|
return s.theta;
|
2885
3006
|
}, this.getDistance = function() {
|
2886
3007
|
return this.object.position.distanceTo(this.target);
|
2887
3008
|
}, this.listenToKeyEvents = function(r) {
|
2888
|
-
r.addEventListener("keydown",
|
3009
|
+
r.addEventListener("keydown", Qe), this._domElementKeyEvents = r;
|
2889
3010
|
}, this.stopListenToKeyEvents = function() {
|
2890
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
3011
|
+
this._domElementKeyEvents.removeEventListener("keydown", Qe), this._domElementKeyEvents = null;
|
2891
3012
|
}, this.saveState = function() {
|
2892
3013
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2893
3014
|
}, this.reset = function() {
|
2894
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(),
|
3015
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(tn), e.update(), c = o.NONE;
|
2895
3016
|
}, this.update = function() {
|
2896
|
-
const r = new
|
2897
|
-
return function(
|
2898
|
-
const
|
2899
|
-
r.copy(
|
2900
|
-
let
|
2901
|
-
isFinite(
|
3017
|
+
const r = new X(), y = new Wt().setFromUnitVectors(n.up, new X(0, 1, 0)), O = y.clone().invert(), L = new X(), K = new Wt(), de = new X(), ie = 2 * Math.PI;
|
3018
|
+
return function(Dt = null) {
|
3019
|
+
const tt = e.object.position;
|
3020
|
+
r.copy(tt).sub(e.target), r.applyQuaternion(y), s.setFromVector3(r), e.autoRotate && c === o.NONE && U(_(Dt)), e.enableDamping ? (s.theta += u.theta * e.dampingFactor, s.phi += u.phi * e.dampingFactor) : (s.theta += u.theta, s.phi += u.phi);
|
3021
|
+
let pe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
|
3022
|
+
isFinite(pe) && isFinite(he) && (pe < -Math.PI ? pe += ie : pe > Math.PI && (pe -= ie), he < -Math.PI ? he += ie : he > Math.PI && (he -= ie), pe <= he ? s.theta = Math.max(pe, Math.min(he, s.theta)) : s.theta = s.theta > (pe + he) / 2 ? Math.max(pe, s.theta) : Math.min(he, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.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 && se || e.object.isOrthographicCamera ? s.radius = me(s.radius) : s.radius = me(s.radius * d), r.setFromSpherical(s), r.applyQuaternion(O), tt.copy(e.target).add(r), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), v.set(0, 0, 0));
|
2902
3023
|
let Ae = !1;
|
2903
3024
|
if (e.zoomToCursor && se) {
|
2904
3025
|
let Pe = null;
|
2905
3026
|
if (e.object.isPerspectiveCamera) {
|
2906
3027
|
const ke = r.length();
|
2907
|
-
Pe = me(ke *
|
2908
|
-
const
|
2909
|
-
e.object.position.addScaledVector(Ee,
|
3028
|
+
Pe = me(ke * d);
|
3029
|
+
const je = ke - Pe;
|
3030
|
+
e.object.position.addScaledVector(Ee, je), e.object.updateMatrixWorld();
|
2910
3031
|
} else if (e.object.isOrthographicCamera) {
|
2911
|
-
const ke = new
|
2912
|
-
ke.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom /
|
2913
|
-
const
|
2914
|
-
|
3032
|
+
const ke = new X(le.x, le.y, 0);
|
3033
|
+
ke.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), Ae = !0;
|
3034
|
+
const je = new X(le.x, le.y, 0);
|
3035
|
+
je.unproject(e.object), e.object.position.sub(je).add(ke), e.object.updateMatrixWorld(), Pe = r.length();
|
2915
3036
|
} else
|
2916
3037
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2917
|
-
Pe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Pe).add(e.object.position) : (
|
3038
|
+
Pe !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Pe).add(e.object.position) : (Et.origin.copy(e.object.position), Et.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(Et.direction)) < pi ? n.lookAt(e.target) : (an.setFromNormalAndCoplanarPoint(e.object.up, e.target), Et.intersectPlane(an, e.target))));
|
2918
3039
|
} else
|
2919
|
-
e.object.isOrthographicCamera && (Ae =
|
2920
|
-
return
|
3040
|
+
e.object.isOrthographicCamera && (Ae = d !== 1, Ae && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
|
3041
|
+
return d = 1, se = !1, Ae || L.distanceToSquared(e.object.position) > p || 8 * (1 - K.dot(e.object.quaternion)) > p || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(tn), L.copy(e.object.position), K.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
|
2921
3042
|
};
|
2922
3043
|
}(), this.dispose = function() {
|
2923
|
-
e.domElement.removeEventListener("contextmenu", ze), e.domElement.removeEventListener("pointerdown", Re), e.domElement.removeEventListener("pointercancel", _e), e.domElement.removeEventListener("wheel",
|
3044
|
+
e.domElement.removeEventListener("contextmenu", ze), e.domElement.removeEventListener("pointerdown", Re), e.domElement.removeEventListener("pointercancel", _e), e.domElement.removeEventListener("wheel", mt), e.domElement.removeEventListener("pointermove", Ze), e.domElement.removeEventListener("pointerup", _e), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Qe), e._domElementKeyEvents = null);
|
2924
3045
|
};
|
2925
3046
|
const e = this, o = {
|
2926
3047
|
NONE: -1,
|
@@ -2932,13 +3053,13 @@ class pi extends ln {
|
|
2932
3053
|
TOUCH_DOLLY_PAN: 5,
|
2933
3054
|
TOUCH_DOLLY_ROTATE: 6
|
2934
3055
|
};
|
2935
|
-
let
|
2936
|
-
const
|
2937
|
-
let
|
2938
|
-
const v = new
|
3056
|
+
let c = o.NONE;
|
3057
|
+
const p = 1e-6, s = new qt(), u = new qt();
|
3058
|
+
let d = 1;
|
3059
|
+
const v = new X(), b = new ue(), E = new ue(), S = new ue(), M = new ue(), P = new ue(), H = new ue(), B = new ue(), x = new ue(), z = new ue(), Ee = new X(), le = new ue();
|
2939
3060
|
let se = !1;
|
2940
|
-
const
|
2941
|
-
let
|
3061
|
+
const h = [], m = {};
|
3062
|
+
let w = !1;
|
2942
3063
|
function _(r) {
|
2943
3064
|
return r !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * r : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2944
3065
|
}
|
@@ -2953,17 +3074,17 @@ class pi extends ln {
|
|
2953
3074
|
u.phi -= r;
|
2954
3075
|
}
|
2955
3076
|
const I = function() {
|
2956
|
-
const r = new
|
3077
|
+
const r = new X();
|
2957
3078
|
return function(O, L) {
|
2958
3079
|
r.setFromMatrixColumn(L, 0), r.multiplyScalar(-O), v.add(r);
|
2959
3080
|
};
|
2960
3081
|
}(), W = function() {
|
2961
|
-
const r = new
|
3082
|
+
const r = new X();
|
2962
3083
|
return function(O, L) {
|
2963
3084
|
e.screenSpacePanning === !0 ? r.setFromMatrixColumn(L, 1) : (r.setFromMatrixColumn(L, 0), r.crossVectors(e.object.up, r)), r.multiplyScalar(O), v.add(r);
|
2964
3085
|
};
|
2965
|
-
}(),
|
2966
|
-
const r = new
|
3086
|
+
}(), q = function() {
|
3087
|
+
const r = new X();
|
2967
3088
|
return function(O, L) {
|
2968
3089
|
const K = e.domElement;
|
2969
3090
|
if (e.object.isPerspectiveCamera) {
|
@@ -2976,17 +3097,17 @@ class pi extends ln {
|
|
2976
3097
|
};
|
2977
3098
|
}();
|
2978
3099
|
function T(r) {
|
2979
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
3100
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2980
3101
|
}
|
2981
3102
|
function N(r) {
|
2982
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ?
|
3103
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= r : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2983
3104
|
}
|
2984
3105
|
function J(r, y) {
|
2985
3106
|
if (!e.zoomToCursor)
|
2986
3107
|
return;
|
2987
3108
|
se = !0;
|
2988
3109
|
const O = e.domElement.getBoundingClientRect(), L = r - O.left, K = y - O.top, de = O.width, ie = O.height;
|
2989
|
-
|
3110
|
+
le.x = L / de * 2 - 1, le.y = -(K / ie) * 2 + 1, Ee.set(le.x, le.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
2990
3111
|
}
|
2991
3112
|
function me(r) {
|
2992
3113
|
return Math.max(e.minDistance, Math.min(e.maxDistance, r));
|
@@ -2994,120 +3115,120 @@ class pi extends ln {
|
|
2994
3115
|
function Ce(r) {
|
2995
3116
|
b.set(r.clientX, r.clientY);
|
2996
3117
|
}
|
2997
|
-
function
|
3118
|
+
function lt(r) {
|
2998
3119
|
J(r.clientX, r.clientX), B.set(r.clientX, r.clientY);
|
2999
3120
|
}
|
3000
|
-
function
|
3121
|
+
function qe(r) {
|
3001
3122
|
M.set(r.clientX, r.clientY);
|
3002
3123
|
}
|
3003
3124
|
function Tt(r) {
|
3004
|
-
E.set(r.clientX, r.clientY),
|
3125
|
+
E.set(r.clientX, r.clientY), S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
3005
3126
|
const y = e.domElement;
|
3006
|
-
U(2 * Math.PI *
|
3127
|
+
U(2 * Math.PI * S.x / y.clientHeight), $(2 * Math.PI * S.y / y.clientHeight), b.copy(E), e.update();
|
3007
3128
|
}
|
3008
3129
|
function Rt(r) {
|
3009
|
-
|
3130
|
+
x.set(r.clientX, r.clientY), z.subVectors(x, B), z.y > 0 ? T(Y(z.y)) : z.y < 0 && N(Y(z.y)), B.copy(x), e.update();
|
3010
3131
|
}
|
3011
|
-
function
|
3012
|
-
P.set(r.clientX, r.clientY), H.subVectors(P, M).multiplyScalar(e.panSpeed),
|
3132
|
+
function Ke(r) {
|
3133
|
+
P.set(r.clientX, r.clientY), H.subVectors(P, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(P), e.update();
|
3013
3134
|
}
|
3014
|
-
function
|
3135
|
+
function Xe(r) {
|
3015
3136
|
J(r.clientX, r.clientY), r.deltaY < 0 ? N(Y(r.deltaY)) : r.deltaY > 0 && T(Y(r.deltaY)), e.update();
|
3016
3137
|
}
|
3017
3138
|
function Ue(r) {
|
3018
3139
|
let y = !1;
|
3019
3140
|
switch (r.code) {
|
3020
3141
|
case e.keys.UP:
|
3021
|
-
r.ctrlKey || r.metaKey || r.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) :
|
3142
|
+
r.ctrlKey || r.metaKey || r.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : q(0, e.keyPanSpeed), y = !0;
|
3022
3143
|
break;
|
3023
3144
|
case e.keys.BOTTOM:
|
3024
|
-
r.ctrlKey || r.metaKey || r.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) :
|
3145
|
+
r.ctrlKey || r.metaKey || r.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : q(0, -e.keyPanSpeed), y = !0;
|
3025
3146
|
break;
|
3026
3147
|
case e.keys.LEFT:
|
3027
|
-
r.ctrlKey || r.metaKey || r.shiftKey ? U(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) :
|
3148
|
+
r.ctrlKey || r.metaKey || r.shiftKey ? U(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : q(e.keyPanSpeed, 0), y = !0;
|
3028
3149
|
break;
|
3029
3150
|
case e.keys.RIGHT:
|
3030
|
-
r.ctrlKey || r.metaKey || r.shiftKey ? U(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) :
|
3151
|
+
r.ctrlKey || r.metaKey || r.shiftKey ? U(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : q(-e.keyPanSpeed, 0), y = !0;
|
3031
3152
|
break;
|
3032
3153
|
}
|
3033
3154
|
y && (r.preventDefault(), e.update());
|
3034
3155
|
}
|
3035
3156
|
function $e(r) {
|
3036
|
-
if (
|
3157
|
+
if (h.length === 1)
|
3037
3158
|
b.set(r.pageX, r.pageY);
|
3038
3159
|
else {
|
3039
|
-
const y =
|
3160
|
+
const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
|
3040
3161
|
b.set(O, L);
|
3041
3162
|
}
|
3042
3163
|
}
|
3043
3164
|
function Oe(r) {
|
3044
|
-
if (
|
3165
|
+
if (h.length === 1)
|
3045
3166
|
M.set(r.pageX, r.pageY);
|
3046
3167
|
else {
|
3047
|
-
const y =
|
3168
|
+
const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
|
3048
3169
|
M.set(O, L);
|
3049
3170
|
}
|
3050
3171
|
}
|
3051
|
-
function
|
3052
|
-
const y =
|
3172
|
+
function ut(r) {
|
3173
|
+
const y = xe(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
|
3053
3174
|
B.set(0, K);
|
3054
3175
|
}
|
3055
|
-
function
|
3056
|
-
e.enableZoom &&
|
3176
|
+
function dt(r) {
|
3177
|
+
e.enableZoom && ut(r), e.enablePan && Oe(r);
|
3057
3178
|
}
|
3058
3179
|
function _t(r) {
|
3059
|
-
e.enableZoom &&
|
3180
|
+
e.enableZoom && ut(r), e.enableRotate && $e(r);
|
3060
3181
|
}
|
3061
|
-
function
|
3062
|
-
if (
|
3182
|
+
function ht(r) {
|
3183
|
+
if (h.length == 1)
|
3063
3184
|
E.set(r.pageX, r.pageY);
|
3064
3185
|
else {
|
3065
|
-
const O =
|
3186
|
+
const O = xe(r), L = 0.5 * (r.pageX + O.x), K = 0.5 * (r.pageY + O.y);
|
3066
3187
|
E.set(L, K);
|
3067
3188
|
}
|
3068
|
-
|
3189
|
+
S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
|
3069
3190
|
const y = e.domElement;
|
3070
|
-
U(2 * Math.PI *
|
3191
|
+
U(2 * Math.PI * S.x / y.clientHeight), $(2 * Math.PI * S.y / y.clientHeight), b.copy(E);
|
3071
3192
|
}
|
3072
3193
|
function Me(r) {
|
3073
|
-
if (
|
3194
|
+
if (h.length === 1)
|
3074
3195
|
P.set(r.pageX, r.pageY);
|
3075
3196
|
else {
|
3076
|
-
const y =
|
3197
|
+
const y = xe(r), O = 0.5 * (r.pageX + y.x), L = 0.5 * (r.pageY + y.y);
|
3077
3198
|
P.set(O, L);
|
3078
3199
|
}
|
3079
|
-
H.subVectors(P, M).multiplyScalar(e.panSpeed),
|
3200
|
+
H.subVectors(P, M).multiplyScalar(e.panSpeed), q(H.x, H.y), M.copy(P);
|
3080
3201
|
}
|
3081
3202
|
function Te(r) {
|
3082
|
-
const y =
|
3083
|
-
|
3203
|
+
const y = xe(r), O = r.pageX - y.x, L = r.pageY - y.y, K = Math.sqrt(O * O + L * L);
|
3204
|
+
x.set(0, K), z.set(0, Math.pow(x.y / B.y, e.zoomSpeed)), T(z.y), B.copy(x);
|
3084
3205
|
const de = (r.pageX + y.x) * 0.5, ie = (r.pageY + y.y) * 0.5;
|
3085
3206
|
J(de, ie);
|
3086
3207
|
}
|
3087
|
-
function
|
3208
|
+
function ft(r) {
|
3088
3209
|
e.enableZoom && Te(r), e.enablePan && Me(r);
|
3089
3210
|
}
|
3090
|
-
function
|
3091
|
-
e.enableZoom && Te(r), e.enableRotate &&
|
3211
|
+
function pt(r) {
|
3212
|
+
e.enableZoom && Te(r), e.enableRotate && ht(r);
|
3092
3213
|
}
|
3093
3214
|
function Re(r) {
|
3094
|
-
e.enabled !== !1 && (
|
3215
|
+
e.enabled !== !1 && (h.length === 0 && (e.domElement.setPointerCapture(r.pointerId), e.domElement.addEventListener("pointermove", Ze), e.domElement.addEventListener("pointerup", _e)), Pt(r), r.pointerType === "touch" ? et(r) : Je(r));
|
3095
3216
|
}
|
3096
|
-
function
|
3097
|
-
e.enabled !== !1 && (r.pointerType === "touch" ?
|
3217
|
+
function Ze(r) {
|
3218
|
+
e.enabled !== !1 && (r.pointerType === "touch" ? bt(r) : At(r));
|
3098
3219
|
}
|
3099
3220
|
function _e(r) {
|
3100
|
-
switch (kt(r),
|
3221
|
+
switch (kt(r), h.length) {
|
3101
3222
|
case 0:
|
3102
|
-
e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove",
|
3223
|
+
e.domElement.releasePointerCapture(r.pointerId), e.domElement.removeEventListener("pointermove", Ze), e.domElement.removeEventListener("pointerup", _e), e.dispatchEvent(nn), c = o.NONE;
|
3103
3224
|
break;
|
3104
3225
|
case 1:
|
3105
|
-
const y =
|
3106
|
-
|
3226
|
+
const y = h[0], O = m[y];
|
3227
|
+
et({ pointerId: y, pageX: O.x, pageY: O.y });
|
3107
3228
|
break;
|
3108
3229
|
}
|
3109
3230
|
}
|
3110
|
-
function
|
3231
|
+
function Je(r) {
|
3111
3232
|
let y;
|
3112
3233
|
switch (r.button) {
|
3113
3234
|
case 0:
|
@@ -3126,37 +3247,37 @@ class pi extends ln {
|
|
3126
3247
|
case Ge.DOLLY:
|
3127
3248
|
if (e.enableZoom === !1)
|
3128
3249
|
return;
|
3129
|
-
|
3250
|
+
lt(r), c = o.DOLLY;
|
3130
3251
|
break;
|
3131
3252
|
case Ge.ROTATE:
|
3132
3253
|
if (r.ctrlKey || r.metaKey || r.shiftKey) {
|
3133
3254
|
if (e.enablePan === !1)
|
3134
3255
|
return;
|
3135
|
-
|
3256
|
+
qe(r), c = o.PAN;
|
3136
3257
|
} else {
|
3137
3258
|
if (e.enableRotate === !1)
|
3138
3259
|
return;
|
3139
|
-
Ce(r),
|
3260
|
+
Ce(r), c = o.ROTATE;
|
3140
3261
|
}
|
3141
3262
|
break;
|
3142
3263
|
case Ge.PAN:
|
3143
3264
|
if (r.ctrlKey || r.metaKey || r.shiftKey) {
|
3144
3265
|
if (e.enableRotate === !1)
|
3145
3266
|
return;
|
3146
|
-
Ce(r),
|
3267
|
+
Ce(r), c = o.ROTATE;
|
3147
3268
|
} else {
|
3148
3269
|
if (e.enablePan === !1)
|
3149
3270
|
return;
|
3150
|
-
|
3271
|
+
qe(r), c = o.PAN;
|
3151
3272
|
}
|
3152
3273
|
break;
|
3153
3274
|
default:
|
3154
|
-
|
3275
|
+
c = o.NONE;
|
3155
3276
|
}
|
3156
|
-
|
3277
|
+
c !== o.NONE && e.dispatchEvent(Ft);
|
3157
3278
|
}
|
3158
3279
|
function At(r) {
|
3159
|
-
switch (
|
3280
|
+
switch (c) {
|
3160
3281
|
case o.ROTATE:
|
3161
3282
|
if (e.enableRotate === !1)
|
3162
3283
|
return;
|
@@ -3170,14 +3291,14 @@ class pi extends ln {
|
|
3170
3291
|
case o.PAN:
|
3171
3292
|
if (e.enablePan === !1)
|
3172
3293
|
return;
|
3173
|
-
|
3294
|
+
Ke(r);
|
3174
3295
|
break;
|
3175
3296
|
}
|
3176
3297
|
}
|
3177
|
-
function
|
3178
|
-
e.enabled === !1 || e.enableZoom === !1 ||
|
3298
|
+
function mt(r) {
|
3299
|
+
e.enabled === !1 || e.enableZoom === !1 || c !== o.NONE || (r.preventDefault(), e.dispatchEvent(Ft), Xe(vt(r)), e.dispatchEvent(nn));
|
3179
3300
|
}
|
3180
|
-
function
|
3301
|
+
function vt(r) {
|
3181
3302
|
const y = r.deltaMode, O = {
|
3182
3303
|
clientX: r.clientX,
|
3183
3304
|
clientY: r.clientY,
|
@@ -3191,33 +3312,33 @@ class pi extends ln {
|
|
3191
3312
|
O.deltaY *= 100;
|
3192
3313
|
break;
|
3193
3314
|
}
|
3194
|
-
return r.ctrlKey && !
|
3315
|
+
return r.ctrlKey && !w && (O.deltaY *= 10), O;
|
3195
3316
|
}
|
3196
|
-
function
|
3197
|
-
r.key === "Control" && (
|
3317
|
+
function gt(r) {
|
3318
|
+
r.key === "Control" && (w = !0, e.domElement.getRootNode().addEventListener("keyup", Se, { passive: !0, capture: !0 }));
|
3198
3319
|
}
|
3199
|
-
function
|
3200
|
-
r.key === "Control" && (
|
3320
|
+
function Se(r) {
|
3321
|
+
r.key === "Control" && (w = !1, e.domElement.getRootNode().removeEventListener("keyup", Se, { passive: !0, capture: !0 }));
|
3201
3322
|
}
|
3202
|
-
function
|
3323
|
+
function Qe(r) {
|
3203
3324
|
e.enabled === !1 || e.enablePan === !1 || Ue(r);
|
3204
3325
|
}
|
3205
|
-
function
|
3206
|
-
switch (
|
3326
|
+
function et(r) {
|
3327
|
+
switch (yt(r), h.length) {
|
3207
3328
|
case 1:
|
3208
3329
|
switch (e.touches.ONE) {
|
3209
3330
|
case Ve.ROTATE:
|
3210
3331
|
if (e.enableRotate === !1)
|
3211
3332
|
return;
|
3212
|
-
$e(r),
|
3333
|
+
$e(r), c = o.TOUCH_ROTATE;
|
3213
3334
|
break;
|
3214
3335
|
case Ve.PAN:
|
3215
3336
|
if (e.enablePan === !1)
|
3216
3337
|
return;
|
3217
|
-
Oe(r),
|
3338
|
+
Oe(r), c = o.TOUCH_PAN;
|
3218
3339
|
break;
|
3219
3340
|
default:
|
3220
|
-
|
3341
|
+
c = o.NONE;
|
3221
3342
|
}
|
3222
3343
|
break;
|
3223
3344
|
case 2:
|
@@ -3225,28 +3346,28 @@ class pi extends ln {
|
|
3225
3346
|
case Ve.DOLLY_PAN:
|
3226
3347
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3227
3348
|
return;
|
3228
|
-
|
3349
|
+
dt(r), c = o.TOUCH_DOLLY_PAN;
|
3229
3350
|
break;
|
3230
3351
|
case Ve.DOLLY_ROTATE:
|
3231
3352
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3232
3353
|
return;
|
3233
|
-
_t(r),
|
3354
|
+
_t(r), c = o.TOUCH_DOLLY_ROTATE;
|
3234
3355
|
break;
|
3235
3356
|
default:
|
3236
|
-
|
3357
|
+
c = o.NONE;
|
3237
3358
|
}
|
3238
3359
|
break;
|
3239
3360
|
default:
|
3240
|
-
|
3361
|
+
c = o.NONE;
|
3241
3362
|
}
|
3242
|
-
|
3363
|
+
c !== o.NONE && e.dispatchEvent(Ft);
|
3243
3364
|
}
|
3244
|
-
function
|
3245
|
-
switch (
|
3365
|
+
function bt(r) {
|
3366
|
+
switch (yt(r), c) {
|
3246
3367
|
case o.TOUCH_ROTATE:
|
3247
3368
|
if (e.enableRotate === !1)
|
3248
3369
|
return;
|
3249
|
-
|
3370
|
+
ht(r), e.update();
|
3250
3371
|
break;
|
3251
3372
|
case o.TOUCH_PAN:
|
3252
3373
|
if (e.enablePan === !1)
|
@@ -3256,67 +3377,67 @@ class pi extends ln {
|
|
3256
3377
|
case o.TOUCH_DOLLY_PAN:
|
3257
3378
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
3258
3379
|
return;
|
3259
|
-
|
3380
|
+
ft(r), e.update();
|
3260
3381
|
break;
|
3261
3382
|
case o.TOUCH_DOLLY_ROTATE:
|
3262
3383
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
3263
3384
|
return;
|
3264
|
-
|
3385
|
+
pt(r), e.update();
|
3265
3386
|
break;
|
3266
3387
|
default:
|
3267
|
-
|
3388
|
+
c = o.NONE;
|
3268
3389
|
}
|
3269
3390
|
}
|
3270
3391
|
function ze(r) {
|
3271
3392
|
e.enabled !== !1 && r.preventDefault();
|
3272
3393
|
}
|
3273
3394
|
function Pt(r) {
|
3274
|
-
|
3395
|
+
h.push(r.pointerId);
|
3275
3396
|
}
|
3276
3397
|
function kt(r) {
|
3277
|
-
delete
|
3278
|
-
for (let y = 0; y <
|
3279
|
-
if (
|
3280
|
-
|
3398
|
+
delete m[r.pointerId];
|
3399
|
+
for (let y = 0; y < h.length; y++)
|
3400
|
+
if (h[y] == r.pointerId) {
|
3401
|
+
h.splice(y, 1);
|
3281
3402
|
return;
|
3282
3403
|
}
|
3283
3404
|
}
|
3284
|
-
function
|
3285
|
-
let y =
|
3286
|
-
y === void 0 && (y = new ue(),
|
3405
|
+
function yt(r) {
|
3406
|
+
let y = m[r.pointerId];
|
3407
|
+
y === void 0 && (y = new ue(), m[r.pointerId] = y), y.set(r.pageX, r.pageY);
|
3287
3408
|
}
|
3288
|
-
function
|
3289
|
-
const y = r.pointerId ===
|
3290
|
-
return
|
3409
|
+
function xe(r) {
|
3410
|
+
const y = r.pointerId === h[0] ? h[1] : h[0];
|
3411
|
+
return m[y];
|
3291
3412
|
}
|
3292
|
-
e.domElement.addEventListener("contextmenu", ze), e.domElement.addEventListener("pointerdown", Re), e.domElement.addEventListener("pointercancel", _e), e.domElement.addEventListener("wheel",
|
3413
|
+
e.domElement.addEventListener("contextmenu", ze), e.domElement.addEventListener("pointerdown", Re), e.domElement.addEventListener("pointercancel", _e), e.domElement.addEventListener("wheel", mt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", gt, { passive: !0, capture: !0 }), this.update();
|
3293
3414
|
}
|
3294
3415
|
}
|
3295
|
-
const
|
3416
|
+
const xt = (t) => {
|
3296
3417
|
const [n, a] = ae(t.options[t.index]), e = () => {
|
3297
3418
|
t.onToggle(!t.open);
|
3298
|
-
}, o = (
|
3299
|
-
|
3419
|
+
}, o = (c) => {
|
3420
|
+
c !== n && (t.onSelect(c), a(c)), t.onToggle(!1);
|
3300
3421
|
};
|
3301
|
-
return /* @__PURE__ */
|
3302
|
-
/* @__PURE__ */
|
3303
|
-
t.open && /* @__PURE__ */
|
3422
|
+
return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
|
3423
|
+
/* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
3424
|
+
t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => o(c), children: c }, c)) })
|
3304
3425
|
] });
|
3305
|
-
}, Ie =
|
3306
|
-
const [e, o] = ae(!1),
|
3307
|
-
return /* @__PURE__ */
|
3308
|
-
/* @__PURE__ */
|
3426
|
+
}, Ie = Sa(function(n, a) {
|
3427
|
+
const [e, o] = ae(!1), c = n.options.indexOf(n.camera.name);
|
3428
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
|
3429
|
+
/* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
3309
3430
|
e && o(!1);
|
3310
3431
|
} }),
|
3311
|
-
/* @__PURE__ */
|
3312
|
-
|
3432
|
+
/* @__PURE__ */ l.jsx(
|
3433
|
+
xt,
|
3313
3434
|
{
|
3314
|
-
index:
|
3435
|
+
index: c,
|
3315
3436
|
open: e,
|
3316
3437
|
options: n.options,
|
3317
3438
|
onSelect: n.onSelect,
|
3318
|
-
onToggle: (
|
3319
|
-
o(
|
3439
|
+
onToggle: (p) => {
|
3440
|
+
o(p);
|
3320
3441
|
},
|
3321
3442
|
up: !0
|
3322
3443
|
}
|
@@ -3332,13 +3453,13 @@ function Be(t, n) {
|
|
3332
3453
|
const a = new Mn(-100, 100, 100, -100, 50, 3e3);
|
3333
3454
|
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ne.set(t, a), a;
|
3334
3455
|
}
|
3335
|
-
Be("Top", new
|
3336
|
-
Be("Bottom", new
|
3337
|
-
Be("Left", new
|
3338
|
-
Be("Right", new
|
3339
|
-
Be("Front", new
|
3340
|
-
Be("Back", new
|
3341
|
-
Be("Orthographic", new
|
3456
|
+
Be("Top", new X(0, 1e3, 0));
|
3457
|
+
Be("Bottom", new X(0, -1e3, 0));
|
3458
|
+
Be("Left", new X(-1e3, 0, 0));
|
3459
|
+
Be("Right", new X(1e3, 0, 0));
|
3460
|
+
Be("Front", new X(0, 0, 1e3));
|
3461
|
+
Be("Back", new X(0, 0, -1e3));
|
3462
|
+
Be("Orthographic", new X(1e3, 1e3, 1e3));
|
3342
3463
|
const Mt = new Bt(60, 1, 50, 3e3);
|
3343
3464
|
Mt.name = "Debug";
|
3344
3465
|
Mt.position.set(500, 500, 500);
|
@@ -3350,37 +3471,37 @@ const on = [
|
|
3350
3471
|
"Normals",
|
3351
3472
|
"UVs",
|
3352
3473
|
"Wireframe"
|
3353
|
-
],
|
3474
|
+
], vi = new fa(), gi = new pa(), bi = new Wa(), yi = new ma({
|
3354
3475
|
opacity: 0.33,
|
3355
3476
|
transparent: !0,
|
3356
3477
|
wireframe: !0
|
3357
3478
|
});
|
3358
|
-
let
|
3479
|
+
let Ct = "Renderer";
|
3359
3480
|
const V = new Tn();
|
3360
3481
|
V.name = "Debug Scene";
|
3361
3482
|
let be = new Tn();
|
3362
3483
|
V.add(be);
|
3363
|
-
const ct = new
|
3484
|
+
const ct = new va();
|
3364
3485
|
ct.name = "helpers";
|
3365
3486
|
V.add(ct);
|
3366
|
-
const
|
3367
|
-
ct.add(
|
3368
|
-
const
|
3369
|
-
|
3370
|
-
ct.add(
|
3371
|
-
const
|
3372
|
-
|
3373
|
-
ct.add(
|
3374
|
-
|
3375
|
-
let
|
3376
|
-
function
|
3377
|
-
const [n, a] = ae(t.mode !== void 0 ? t.mode : "Single"), [e, o] = ae(null), [
|
3378
|
-
const
|
3379
|
-
|
3380
|
-
const _ = ge.get(
|
3381
|
-
_ !== void 0 && (V.remove(_), _.dispose()), ge.delete(
|
3382
|
-
const Y = new
|
3383
|
-
switch (Y.enableDamping = !0, Y.dampingFactor = 0.05,
|
3487
|
+
const Ei = new Ga();
|
3488
|
+
ct.add(Ei);
|
3489
|
+
const Fn = new Rn(500);
|
3490
|
+
Fn.name = "axisHelper";
|
3491
|
+
ct.add(Fn);
|
3492
|
+
const st = new Rn(100);
|
3493
|
+
st.name = "interactionHelper";
|
3494
|
+
ct.add(st);
|
3495
|
+
st.visible = !1;
|
3496
|
+
let St = !1, G = ne.get("Debug"), oe = ne.get("Orthographic"), Le = ne.get("Front"), Ne = ne.get("Top"), sn = !1;
|
3497
|
+
function Fi(t) {
|
3498
|
+
const [n, a] = ae(t.mode !== void 0 ? t.mode : "Single"), [e, o] = ae(null), [c, p] = ae(!1), [s, u] = ae(!1), [d, v] = ae(!1), [, b] = ae(Date.now()), E = ye(null), S = ye(null), M = ye(null), P = ye(null), H = ye(null), B = ye(null), x = (h, m) => {
|
3499
|
+
const w = re.get(h.name);
|
3500
|
+
w !== void 0 && w.dispose(), re.delete(h.name);
|
3501
|
+
const _ = ge.get(h.name);
|
3502
|
+
_ !== void 0 && (V.remove(_), _.dispose()), ge.delete(h.name);
|
3503
|
+
const Y = new mi(h, m);
|
3504
|
+
switch (Y.enableDamping = !0, Y.dampingFactor = 0.05, h.name) {
|
3384
3505
|
case "Top":
|
3385
3506
|
case "Bottom":
|
3386
3507
|
case "Left":
|
@@ -3390,92 +3511,92 @@ function Ni(t) {
|
|
3390
3511
|
Y.enableRotate = !1;
|
3391
3512
|
break;
|
3392
3513
|
}
|
3393
|
-
if (re.set(
|
3394
|
-
const U = new
|
3395
|
-
ge.set(
|
3514
|
+
if (re.set(h.name, Y), h instanceof Bt) {
|
3515
|
+
const U = new ya(h);
|
3516
|
+
ge.set(h.name, U), V.add(U);
|
3396
3517
|
}
|
3397
|
-
}, z = (
|
3398
|
-
const
|
3399
|
-
|
3400
|
-
const
|
3401
|
-
|
3518
|
+
}, z = (h) => {
|
3519
|
+
const m = ge.get(h.name);
|
3520
|
+
m !== void 0 && (V.remove(m), m.dispose(), ge.delete(h.name));
|
3521
|
+
const w = re.get(h.name);
|
3522
|
+
w !== void 0 && (w.dispose(), re.delete(h.name));
|
3402
3523
|
}, Ee = () => {
|
3403
|
-
re.forEach((
|
3404
|
-
|
3405
|
-
const
|
3406
|
-
|
3524
|
+
re.forEach((h, m) => {
|
3525
|
+
h.dispose();
|
3526
|
+
const w = ge.get(m);
|
3527
|
+
w !== void 0 && (V.remove(w), w.dispose()), ge.delete(m), re.delete(m);
|
3407
3528
|
}), re.clear(), ge.clear();
|
3408
|
-
},
|
3529
|
+
}, le = () => {
|
3409
3530
|
switch (n) {
|
3410
3531
|
case "Single":
|
3411
|
-
|
3532
|
+
x(G, M.current);
|
3412
3533
|
break;
|
3413
3534
|
case "Side by Side":
|
3414
3535
|
case "Stacked":
|
3415
|
-
|
3536
|
+
x(G, M.current), x(oe, P.current);
|
3416
3537
|
break;
|
3417
3538
|
case "Quad":
|
3418
|
-
|
3539
|
+
x(G, M.current), x(oe, P.current), x(Le, H.current), x(Ne, B.current);
|
3419
3540
|
break;
|
3420
3541
|
}
|
3421
3542
|
};
|
3422
|
-
|
3423
|
-
const
|
3543
|
+
we(() => {
|
3544
|
+
const h = new ga({
|
3424
3545
|
canvas: E.current,
|
3425
3546
|
stencil: !1
|
3426
3547
|
});
|
3427
|
-
|
3428
|
-
}, []),
|
3429
|
-
const
|
3430
|
-
|
3548
|
+
h.autoClear = !1, h.shadowMap.enabled = !0, h.setPixelRatio(devicePixelRatio), h.setClearColor(0), o(h);
|
3549
|
+
}, []), we(() => {
|
3550
|
+
const h = (_) => {
|
3551
|
+
jn(be), V.remove(be);
|
3431
3552
|
const Y = t.scenes.get(_.value.name);
|
3432
3553
|
if (Y !== void 0) {
|
3433
3554
|
const U = new Y();
|
3434
3555
|
t.onSceneSet !== void 0 && t.onSceneSet(U), be = U, t.three.scene = be, V.add(be), sn = !0;
|
3435
3556
|
}
|
3436
|
-
},
|
3557
|
+
}, m = (_) => {
|
3437
3558
|
const Y = _.value, U = t.three.scene?.getObjectByProperty("uuid", Y.uuid);
|
3438
3559
|
U !== void 0 && ne.set(Y.name, U), b(Date.now());
|
3439
|
-
},
|
3560
|
+
}, w = (_) => {
|
3440
3561
|
ne.delete(_.value.name), b(Date.now());
|
3441
3562
|
};
|
3442
|
-
return k.addEventListener(
|
3443
|
-
k.removeEventListener(
|
3563
|
+
return k.addEventListener(j.SET_SCENE, h), k.addEventListener(j.ADD_CAMERA, m), k.addEventListener(j.REMOVE_CAMERA, w), () => {
|
3564
|
+
k.removeEventListener(j.SET_SCENE, h), k.removeEventListener(j.ADD_CAMERA, m), k.removeEventListener(j.REMOVE_CAMERA, w);
|
3444
3565
|
};
|
3445
|
-
}, []),
|
3566
|
+
}, []), we(() => {
|
3446
3567
|
if (e === null)
|
3447
3568
|
return;
|
3448
|
-
let
|
3569
|
+
let h = window.innerWidth, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), Y = -1;
|
3449
3570
|
const U = () => {
|
3450
|
-
|
3451
|
-
let T =
|
3571
|
+
h = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(h / 2), _ = Math.floor(m / 2), e.setSize(h, m);
|
3572
|
+
let T = h, N = m;
|
3452
3573
|
switch (n) {
|
3453
3574
|
case "Side by Side":
|
3454
|
-
T =
|
3575
|
+
T = w, N = m;
|
3455
3576
|
break;
|
3456
3577
|
case "Stacked":
|
3457
|
-
T =
|
3578
|
+
T = h, N = _;
|
3458
3579
|
break;
|
3459
3580
|
case "Quad":
|
3460
|
-
T =
|
3581
|
+
T = w, N = _;
|
3461
3582
|
break;
|
3462
3583
|
}
|
3463
3584
|
ne.forEach((J) => {
|
3464
3585
|
J instanceof Mn ? (J.left = T / -2, J.right = T / 2, J.top = N / 2, J.bottom = N / -2, J.updateProjectionMatrix()) : J instanceof Bt && (J.aspect = T / N, J.updateProjectionMatrix(), ge.get(J.name)?.update());
|
3465
3586
|
});
|
3466
3587
|
}, $ = () => {
|
3467
|
-
e.setViewport(0, 0,
|
3588
|
+
e.setViewport(0, 0, h, m), e.setScissor(0, 0, h, m), e.render(V, G);
|
3468
3589
|
}, I = () => {
|
3469
3590
|
if (n === "Side by Side")
|
3470
|
-
e.setViewport(0, 0,
|
3591
|
+
e.setViewport(0, 0, w, m), e.setScissor(0, 0, w, m), e.render(V, G), e.setViewport(w, 0, w, m), e.setScissor(w, 0, w, m), e.render(V, oe);
|
3471
3592
|
else {
|
3472
|
-
const T =
|
3473
|
-
e.setViewport(0, T,
|
3593
|
+
const T = m - _;
|
3594
|
+
e.setViewport(0, T, h, _), e.setScissor(0, T, h, _), e.render(V, G), e.setViewport(0, 0, h, _), e.setScissor(0, 0, h, _), e.render(V, oe);
|
3474
3595
|
}
|
3475
3596
|
}, W = () => {
|
3476
3597
|
let T = 0, N = 0;
|
3477
|
-
N =
|
3478
|
-
},
|
3598
|
+
N = m - _, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, G), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, oe), N = 0, T = 0, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Le), T = w, e.setViewport(T, N, w, _), e.setScissor(T, N, w, _), e.render(V, Ne);
|
3599
|
+
}, q = () => {
|
3479
3600
|
switch (re.forEach((T) => {
|
3480
3601
|
T.update();
|
3481
3602
|
}), t.onSceneUpdate !== void 0 && sn && t.onSceneUpdate(be), e.clear(), n) {
|
@@ -3490,39 +3611,39 @@ function Ni(t) {
|
|
3490
3611
|
W();
|
3491
3612
|
break;
|
3492
3613
|
}
|
3493
|
-
Y = requestAnimationFrame(
|
3614
|
+
Y = requestAnimationFrame(q);
|
3494
3615
|
};
|
3495
|
-
return
|
3616
|
+
return le(), window.addEventListener("resize", U), U(), q(), () => {
|
3496
3617
|
window.removeEventListener("resize", U), cancelAnimationFrame(Y), Y = -1;
|
3497
3618
|
};
|
3498
|
-
}, [n, e]),
|
3619
|
+
}, [n, e]), we(() => {
|
3499
3620
|
if (e !== null) {
|
3500
|
-
const
|
3621
|
+
const h = new ba(), m = new ue(), w = ($, I, W, q) => {
|
3501
3622
|
switch (n) {
|
3502
3623
|
case "Quad":
|
3503
|
-
$ < W ? I <
|
3624
|
+
$ < W ? I < q ? h.setFromCamera(m, G) : h.setFromCamera(m, Le) : I < q ? h.setFromCamera(m, oe) : h.setFromCamera(m, Ne);
|
3504
3625
|
break;
|
3505
3626
|
case "Side by Side":
|
3506
|
-
$ < W ?
|
3627
|
+
$ < W ? h.setFromCamera(m, G) : h.setFromCamera(m, oe);
|
3507
3628
|
break;
|
3508
3629
|
case "Single":
|
3509
|
-
|
3630
|
+
h.setFromCamera(m, G);
|
3510
3631
|
break;
|
3511
3632
|
case "Stacked":
|
3512
|
-
I <
|
3633
|
+
I < q ? h.setFromCamera(m, G) : h.setFromCamera(m, oe);
|
3513
3634
|
break;
|
3514
3635
|
}
|
3515
3636
|
}, _ = ($) => {
|
3516
|
-
if (!
|
3637
|
+
if (!St)
|
3517
3638
|
return;
|
3518
3639
|
const I = new ue();
|
3519
3640
|
e.getSize(I);
|
3520
|
-
const W = Math.min($.clientX, I.x),
|
3521
|
-
|
3641
|
+
const W = Math.min($.clientX, I.x), q = Math.min($.clientY, I.y);
|
3642
|
+
m.x = We(W, 0, I.x, -1, 1), m.y = We(q, 0, I.y, 1, -1);
|
3522
3643
|
const T = I.x / 2, N = I.y / 2, J = () => {
|
3523
|
-
W < T ?
|
3644
|
+
W < T ? m.x = We(W, 0, T, -1, 1) : m.x = We(W, T, I.x, -1, 1);
|
3524
3645
|
}, me = () => {
|
3525
|
-
|
3646
|
+
q < N ? m.y = We(q, 0, N, 1, -1) : m.y = We(q, N, I.y, 1, -1);
|
3526
3647
|
};
|
3527
3648
|
switch (n) {
|
3528
3649
|
case "Quad":
|
@@ -3535,182 +3656,183 @@ function Ni(t) {
|
|
3535
3656
|
me(), me();
|
3536
3657
|
break;
|
3537
3658
|
}
|
3538
|
-
|
3539
|
-
const Ce =
|
3540
|
-
Ce.length > 0 &&
|
3659
|
+
w(W, q, T, N);
|
3660
|
+
const Ce = h.intersectObjects(be.children);
|
3661
|
+
Ce.length > 0 && st.position.copy(Ce[0].point);
|
3541
3662
|
}, Y = ($) => {
|
3542
|
-
if (!
|
3663
|
+
if (!St)
|
3543
3664
|
return;
|
3544
3665
|
const I = new ue();
|
3545
3666
|
if (e.getSize(I), $.clientX >= I.x)
|
3546
3667
|
return;
|
3547
3668
|
_($);
|
3548
|
-
const W =
|
3669
|
+
const W = h.intersectObjects(be.children);
|
3549
3670
|
W.length > 0 && t.three.getObject(W[0].object.uuid);
|
3550
|
-
}, U =
|
3671
|
+
}, U = S.current;
|
3551
3672
|
return U.addEventListener("mousemove", _, !1), U.addEventListener("click", Y, !1), () => {
|
3552
3673
|
U.removeEventListener("mousemove", _), U.removeEventListener("click", Y);
|
3553
3674
|
};
|
3554
3675
|
}
|
3555
3676
|
}, [n, e]);
|
3556
3677
|
const se = [];
|
3557
|
-
return ne.forEach((
|
3558
|
-
se.push(
|
3559
|
-
}), /* @__PURE__ */
|
3560
|
-
/* @__PURE__ */
|
3561
|
-
/* @__PURE__ */
|
3562
|
-
n === "Single" && /* @__PURE__ */
|
3678
|
+
return ne.forEach((h, m) => {
|
3679
|
+
se.push(m);
|
3680
|
+
}), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
|
3681
|
+
/* @__PURE__ */ l.jsx("canvas", { ref: E }),
|
3682
|
+
/* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: S, children: [
|
3683
|
+
n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
|
3563
3684
|
re.get(G.name)?.dispose();
|
3564
|
-
const
|
3565
|
-
|
3685
|
+
const m = ne.get(h);
|
3686
|
+
m !== void 0 && (z(G), G = m, x(m, M.current));
|
3566
3687
|
} }) }),
|
3567
|
-
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */
|
3568
|
-
/* @__PURE__ */
|
3688
|
+
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3689
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
|
3569
3690
|
re.get(G.name)?.dispose();
|
3570
|
-
const
|
3571
|
-
|
3691
|
+
const m = ne.get(h);
|
3692
|
+
m !== void 0 && (z(G), G = m, x(m, M.current));
|
3572
3693
|
} }),
|
3573
|
-
/* @__PURE__ */
|
3694
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: oe, options: se, ref: P, onSelect: (h) => {
|
3574
3695
|
re.get(oe.name)?.dispose();
|
3575
|
-
const
|
3576
|
-
|
3696
|
+
const m = ne.get(h);
|
3697
|
+
m !== void 0 && (z(oe), oe = m, x(m, P.current));
|
3577
3698
|
} })
|
3578
3699
|
] }),
|
3579
|
-
n === "Quad" && /* @__PURE__ */
|
3580
|
-
/* @__PURE__ */
|
3700
|
+
n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
|
3701
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: G, options: se, ref: M, onSelect: (h) => {
|
3581
3702
|
re.get(G.name)?.dispose();
|
3582
|
-
const
|
3583
|
-
|
3703
|
+
const m = ne.get(h);
|
3704
|
+
m !== void 0 && (z(G), G = m, x(m, M.current));
|
3584
3705
|
} }),
|
3585
|
-
/* @__PURE__ */
|
3706
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: oe, options: se, ref: P, onSelect: (h) => {
|
3586
3707
|
re.get(oe.name)?.dispose();
|
3587
|
-
const
|
3588
|
-
|
3708
|
+
const m = ne.get(h);
|
3709
|
+
m !== void 0 && (z(oe), oe = m, x(m, P.current));
|
3589
3710
|
} }),
|
3590
|
-
/* @__PURE__ */
|
3711
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: Le, options: se, ref: H, onSelect: (h) => {
|
3591
3712
|
re.get(Le.name)?.dispose();
|
3592
|
-
const
|
3593
|
-
|
3713
|
+
const m = ne.get(h);
|
3714
|
+
m !== void 0 && (z(Le), Le = m, x(m, H.current));
|
3594
3715
|
} }),
|
3595
|
-
/* @__PURE__ */
|
3716
|
+
/* @__PURE__ */ l.jsx(Ie, { camera: Ne, options: se, ref: B, onSelect: (h) => {
|
3596
3717
|
re.get(Ne.name)?.dispose();
|
3597
|
-
const
|
3598
|
-
|
3718
|
+
const m = ne.get(h);
|
3719
|
+
m !== void 0 && (z(Ne), Ne = m, x(m, B.current));
|
3599
3720
|
} })
|
3600
3721
|
] })
|
3601
3722
|
] }),
|
3602
|
-
/* @__PURE__ */
|
3603
|
-
/* @__PURE__ */
|
3604
|
-
|
3723
|
+
/* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
|
3724
|
+
/* @__PURE__ */ l.jsx(
|
3725
|
+
xt,
|
3605
3726
|
{
|
3606
3727
|
index: rn.indexOf(n),
|
3607
3728
|
options: rn,
|
3608
|
-
onSelect: (
|
3609
|
-
|
3729
|
+
onSelect: (h) => {
|
3730
|
+
h !== n && (Ee(), a(h));
|
3610
3731
|
},
|
3611
|
-
open:
|
3612
|
-
onToggle: (
|
3613
|
-
|
3732
|
+
open: c,
|
3733
|
+
onToggle: (h) => {
|
3734
|
+
p(h), s && u(!1), d && v(!1);
|
3614
3735
|
}
|
3615
3736
|
}
|
3616
3737
|
),
|
3617
|
-
/* @__PURE__ */
|
3618
|
-
|
3738
|
+
/* @__PURE__ */ l.jsx(
|
3739
|
+
xt,
|
3619
3740
|
{
|
3620
|
-
index: on.indexOf(
|
3741
|
+
index: on.indexOf(Ct),
|
3621
3742
|
options: on,
|
3622
|
-
onSelect: (
|
3623
|
-
if (
|
3624
|
-
switch (
|
3743
|
+
onSelect: (h) => {
|
3744
|
+
if (h !== Ct)
|
3745
|
+
switch (Ct = h, Ct) {
|
3625
3746
|
case "Depth":
|
3626
|
-
V.overrideMaterial =
|
3747
|
+
V.overrideMaterial = vi;
|
3627
3748
|
break;
|
3628
3749
|
case "Normals":
|
3629
|
-
V.overrideMaterial =
|
3750
|
+
V.overrideMaterial = gi;
|
3630
3751
|
break;
|
3631
3752
|
default:
|
3632
3753
|
case "Renderer":
|
3633
3754
|
V.overrideMaterial = null;
|
3634
3755
|
break;
|
3635
3756
|
case "Wireframe":
|
3636
|
-
V.overrideMaterial =
|
3757
|
+
V.overrideMaterial = yi;
|
3637
3758
|
break;
|
3638
3759
|
case "UVs":
|
3639
|
-
V.overrideMaterial =
|
3760
|
+
V.overrideMaterial = bi;
|
3640
3761
|
break;
|
3641
3762
|
}
|
3642
3763
|
},
|
3643
3764
|
open: s,
|
3644
|
-
onToggle: (
|
3645
|
-
|
3765
|
+
onToggle: (h) => {
|
3766
|
+
c && p(!1), u(h), d && v(!1);
|
3646
3767
|
}
|
3647
3768
|
}
|
3648
3769
|
),
|
3649
|
-
/* @__PURE__ */
|
3650
|
-
|
3770
|
+
/* @__PURE__ */ l.jsx(
|
3771
|
+
xt,
|
3651
3772
|
{
|
3652
3773
|
index: 0,
|
3653
3774
|
options: [
|
3654
3775
|
"Orbit Mode",
|
3655
3776
|
"Selection Mode"
|
3656
3777
|
],
|
3657
|
-
onSelect: (
|
3658
|
-
|
3778
|
+
onSelect: (h) => {
|
3779
|
+
St = h === "Selection Mode", st.visible = St;
|
3659
3780
|
},
|
3660
|
-
open:
|
3661
|
-
onToggle: (
|
3662
|
-
|
3781
|
+
open: d,
|
3782
|
+
onToggle: (h) => {
|
3783
|
+
c && p(!1), s && u(!1), v(h);
|
3663
3784
|
}
|
3664
3785
|
}
|
3665
3786
|
)
|
3666
3787
|
] })
|
3667
3788
|
] });
|
3668
3789
|
}
|
3669
|
-
function
|
3670
|
-
return /* @__PURE__ */
|
3671
|
-
/* @__PURE__ */
|
3790
|
+
function Bi(t) {
|
3791
|
+
return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3792
|
+
/* @__PURE__ */ l.jsx("header", { children: t.header }),
|
3672
3793
|
t.children,
|
3673
|
-
/* @__PURE__ */
|
3794
|
+
/* @__PURE__ */ l.jsx("footer", { children: t.footer })
|
3674
3795
|
] });
|
3675
3796
|
}
|
3676
3797
|
export {
|
3677
|
-
|
3678
|
-
|
3679
|
-
|
3680
|
-
|
3681
|
-
|
3682
|
-
|
3683
|
-
|
3684
|
-
|
3685
|
-
|
3686
|
-
|
3687
|
-
|
3688
|
-
|
3689
|
-
|
3690
|
-
|
3691
|
-
|
3692
|
-
|
3693
|
-
|
3798
|
+
Yt as Accordion,
|
3799
|
+
Ai as Application,
|
3800
|
+
Ot as BaseRemote,
|
3801
|
+
Ln as ChildObject,
|
3802
|
+
qa as ContainerObject,
|
3803
|
+
Fa as Draggable,
|
3804
|
+
Na as DraggableItem,
|
3805
|
+
Ba as Dropdown,
|
3806
|
+
Ua as DropdownItem,
|
3807
|
+
Bi as Editor,
|
3808
|
+
Ga as InfiniteGridHelper,
|
3809
|
+
fi as Inspector,
|
3810
|
+
Fi as MultiView,
|
3811
|
+
In as NavButton,
|
3812
|
+
Pi as RemoteComponents,
|
3813
|
+
Ii as RemoteController,
|
3814
|
+
Ra as RemoteTheatre,
|
3815
|
+
ji as RemoteThree,
|
3694
3816
|
Di as RemoteTweakpane,
|
3695
|
-
|
3696
|
-
|
3697
|
-
|
3698
|
-
|
3699
|
-
|
3700
|
-
|
3701
|
-
|
3817
|
+
Ni as SceneInspector,
|
3818
|
+
Li as SidePanel,
|
3819
|
+
j as ToolEvents,
|
3820
|
+
Wa as UVMaterial,
|
3821
|
+
ot as capitalize,
|
3822
|
+
Ti as clamp,
|
3823
|
+
Oa as colorToHex,
|
3702
3824
|
k as debugDispatcher,
|
3703
|
-
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3707
|
-
|
3708
|
-
|
3709
|
-
|
3710
|
-
|
3711
|
-
|
3712
|
-
|
3825
|
+
Mi as defaultTheatreCallback,
|
3826
|
+
jn as dispose,
|
3827
|
+
Ta as disposeMaterial,
|
3828
|
+
_i as disposeTexture,
|
3829
|
+
Ri as distance,
|
3830
|
+
kn as hierarchyUUID,
|
3831
|
+
wa as isColor,
|
3832
|
+
Pn as noop,
|
3833
|
+
xa as randomID,
|
3834
|
+
Ma as resetThreeObjects,
|
3713
3835
|
It as round,
|
3714
|
-
|
3836
|
+
ki as theatreEditorApp,
|
3715
3837
|
Ut as totalThreeObjects
|
3716
3838
|
};
|