@tomorrowevening/hermes 0.0.97 → 0.0.98
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +8 -8
- package/dist/hermes.es.js +269 -270
- package/package.json +1 -1
package/dist/hermes.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { OrthographicCamera as
|
2
|
-
import
|
3
|
-
import { Reorder as
|
4
|
-
const
|
1
|
+
import { OrthographicCamera as xi, Scene as pn, MeshBasicMaterial as ni, BufferGeometry as si, Float32BufferAttribute as Vt, Mesh as li, LinearSRGBColorSpace as Ni, EventDispatcher as _n, Texture as Zn, RepeatWrapping as ji, WebGLRenderTarget as Wn, Color as di, FrontSide as Kn, BackSide as gn, DoubleSide as vn, NoBlending as Xn, NormalBlending as qn, AdditiveBlending as Jn, SubtractiveBlending as Qn, MultiplyBlending as es, CustomBlending as ts, AddEquation as is, SubtractEquation as ns, ReverseSubtractEquation as ss, MinEquation as rs, MaxEquation as as, ZeroFactor as yn, OneFactor as En, SrcColorFactor as On, OneMinusSrcColorFactor as bn, SrcAlphaFactor as Cn, OneMinusSrcAlphaFactor as Tn, DstAlphaFactor as xn, OneMinusDstAlphaFactor as Sn, DstColorFactor as wn, OneMinusDstColorFactor as Mn, SrcAlphaSaturateFactor as os, ConstantColorFactor as Rn, OneMinusConstantColorFactor as Dn, ConstantAlphaFactor as An, OneMinusConstantAlphaFactor as Pn, Matrix4 as Ln, Vector3 as he, Euler as cs, Line as ls, LineBasicMaterial as ds, Ray as hs, Plane as us, MathUtils as ms, MOUSE as Tt, TOUCH as xt, Quaternion as Si, Spherical as wi, Vector2 as De, ShaderMaterial as In, GLSL3 as fs, PlaneGeometry as ps, Group as Fi, AxesHelper as zi, MeshDepthMaterial as _s, MeshNormalMaterial as gs, WebGLRenderer as vs, PerspectiveCamera as fi, Raycaster as Bi, CameraHelper as ys, Vector4 as Es, Box3 as Os, Sphere as bs, SpotLightHelper as Cs, PointLightHelper as Ts, HemisphereLightHelper as xs, DirectionalLightHelper as Ss, SkinnedMesh as ws, Clock as Ms } from "three";
|
2
|
+
import kn, { useState as W, useRef as de, useEffect as $e, useMemo as Ce, forwardRef as Rs } from "react";
|
3
|
+
import { Reorder as Un } from "framer-motion";
|
4
|
+
const Nn = () => {
|
5
5
|
}, Ur = () => {
|
6
6
|
};
|
7
7
|
function ri(i) {
|
@@ -10,10 +10,10 @@ function ri(i) {
|
|
10
10
|
function yt(i, e, n) {
|
11
11
|
return Math.min(e, Math.max(i, n));
|
12
12
|
}
|
13
|
-
function
|
13
|
+
function Hi(i, e, n) {
|
14
14
|
return (n - i) / (e - i);
|
15
15
|
}
|
16
|
-
function
|
16
|
+
function Mi(i, e, n) {
|
17
17
|
return i * (1 - n) + e * n;
|
18
18
|
}
|
19
19
|
function Nr(i, e) {
|
@@ -26,24 +26,24 @@ function Ds() {
|
|
26
26
|
function As(i) {
|
27
27
|
return i.r !== void 0 && i.g !== void 0 && i.b !== void 0;
|
28
28
|
}
|
29
|
-
function
|
29
|
+
function Yi(i) {
|
30
30
|
const e = Math.round(i.r * 255), n = Math.round(i.g * 255), t = Math.round(i.b * 255), s = (h) => {
|
31
31
|
const c = h.toString(16);
|
32
32
|
return c.length === 1 ? "0" + c : c;
|
33
33
|
}, r = s(e), o = s(n), a = s(t);
|
34
34
|
return "#" + r + o + a;
|
35
35
|
}
|
36
|
-
function
|
36
|
+
function Vi(i, e = 1) {
|
37
37
|
return Number(i.toFixed(e));
|
38
38
|
}
|
39
|
-
let
|
40
|
-
const
|
41
|
-
|
42
|
-
},
|
39
|
+
let Ri = 0;
|
40
|
+
const Gi = () => {
|
41
|
+
Ri = 0;
|
42
|
+
}, Di = (i) => {
|
43
43
|
if (!i)
|
44
44
|
return;
|
45
45
|
let e = i.name.replaceAll(" ", "").replaceAll("/", ".");
|
46
|
-
if (e.length === 0 && (e = `obj_${
|
46
|
+
if (e.length === 0 && (e = `obj_${Ri}`, Ri++), i.parent !== null && i.parent.uuid.length > 0 && (e = `${i.parent.uuid}.${e}`), i.uuid = e, i.isMesh !== void 0) {
|
47
47
|
const n = i;
|
48
48
|
if (Array.isArray(n.material))
|
49
49
|
n.material.forEach((t, s) => {
|
@@ -54,7 +54,7 @@ const $i = () => {
|
|
54
54
|
t.uuid = `${e}.material`;
|
55
55
|
}
|
56
56
|
}
|
57
|
-
i.children.forEach((n) =>
|
57
|
+
i.children.forEach((n) => Di(n));
|
58
58
|
}, jr = (i) => {
|
59
59
|
i?.dispose();
|
60
60
|
}, Ps = (i) => {
|
@@ -101,17 +101,17 @@ class ti {
|
|
101
101
|
}
|
102
102
|
static renderToCanvas(e) {
|
103
103
|
if (this.material === null) {
|
104
|
-
this.camera = new
|
104
|
+
this.camera = new xi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new pn(), this.material = new ni();
|
105
105
|
const n = new si();
|
106
106
|
n.setAttribute("position", new Vt([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), n.setAttribute("normal", new Vt([0, 0, 1, 0, 0, 1], 3)), n.setAttribute("uv", new Vt([0, 0, 2, 0, 0, 2], 2));
|
107
|
-
const t = new
|
107
|
+
const t = new li(n, this.material);
|
108
108
|
this.scene.add(t);
|
109
109
|
}
|
110
110
|
if (e.isRenderTargetTexture)
|
111
111
|
this.material.map = e, this.renderer.render(this.scene, this.camera);
|
112
112
|
else {
|
113
113
|
const n = this.renderer.outputColorSpace, t = e.colorSpace;
|
114
|
-
this.renderer.outputColorSpace =
|
114
|
+
this.renderer.outputColorSpace = Ni, e.colorSpace = Ni, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = n, e.colorSpace = t;
|
115
115
|
}
|
116
116
|
return this.renderer.domElement;
|
117
117
|
}
|
@@ -174,7 +174,7 @@ class Fr {
|
|
174
174
|
e && (this._mode = "editor");
|
175
175
|
}
|
176
176
|
}
|
177
|
-
const j = new
|
177
|
+
const j = new _n(), F = {
|
178
178
|
CUSTOM: "ToolEvents::custom",
|
179
179
|
// Components
|
180
180
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -196,7 +196,7 @@ const j = new gn(), F = {
|
|
196
196
|
ADD_GROUP: "ToolEvents::addGroup",
|
197
197
|
REMOVE_GROUP: "ToolEvents::removeGroup"
|
198
198
|
};
|
199
|
-
class
|
199
|
+
class Li {
|
200
200
|
app;
|
201
201
|
constructor(e) {
|
202
202
|
this.app = e;
|
@@ -208,7 +208,7 @@ class Ii {
|
|
208
208
|
handleEditor(e, n, t) {
|
209
209
|
}
|
210
210
|
}
|
211
|
-
class zr extends
|
211
|
+
class zr extends Li {
|
212
212
|
selectDropdown(e, n) {
|
213
213
|
this.app.send({
|
214
214
|
event: "selectComponent",
|
@@ -240,7 +240,58 @@ class zr extends Ii {
|
|
240
240
|
}
|
241
241
|
}
|
242
242
|
}
|
243
|
-
|
243
|
+
function Br(i, e, n) {
|
244
|
+
if (i.editor) {
|
245
|
+
n.ui.restore(), n.onSelectionChange((o) => {
|
246
|
+
o.length < 1 || o.forEach((a) => {
|
247
|
+
let h = a.address.sheetId, c = "setSheet", u = {};
|
248
|
+
switch (a.type) {
|
249
|
+
case "Theatre_Sheet_PublicAPI":
|
250
|
+
c = "setSheet", u = {
|
251
|
+
sheet: a.address.sheetId
|
252
|
+
}, e.activeSheet = e.sheets.get(a.address.sheetId);
|
253
|
+
break;
|
254
|
+
case "Theatre_SheetObject_PublicAPI":
|
255
|
+
c = "setSheetObject", h += `_${a.address.objectKey}`, u = {
|
256
|
+
id: h,
|
257
|
+
sheet: a.address.sheetId,
|
258
|
+
key: a.address.objectKey
|
259
|
+
}, e.activeSheet = e.sheets.get(a.address.sheetId);
|
260
|
+
break;
|
261
|
+
}
|
262
|
+
i.send({ event: c, target: "app", data: u });
|
263
|
+
});
|
264
|
+
});
|
265
|
+
let t = -1;
|
266
|
+
const s = () => {
|
267
|
+
if (e.activeSheet !== void 0 && t !== e.activeSheet.sequence.position) {
|
268
|
+
t = e.activeSheet.sequence.position;
|
269
|
+
const o = e.activeSheet;
|
270
|
+
i.send({
|
271
|
+
event: "updateTimeline",
|
272
|
+
target: "app",
|
273
|
+
data: {
|
274
|
+
position: t,
|
275
|
+
sheet: o.address.sheetId
|
276
|
+
}
|
277
|
+
});
|
278
|
+
}
|
279
|
+
}, r = () => {
|
280
|
+
s(), requestAnimationFrame(r);
|
281
|
+
};
|
282
|
+
s(), r();
|
283
|
+
} else
|
284
|
+
n.ui.hide();
|
285
|
+
}
|
286
|
+
function Hr() {
|
287
|
+
const i = document.getElementById("theatrejs-studio-root")?.shadowRoot?.getElementById("pointer-root")?.children[0], e = i?.children[1];
|
288
|
+
e.style.justifyContent = "left";
|
289
|
+
const n = e.children[1];
|
290
|
+
n.style.transform = "translateX(10px)", n.removeChild(n.children[0]), n.removeChild(n.children[0]);
|
291
|
+
const t = i?.children[3];
|
292
|
+
t.style.top = "0", t.style.right = "300px";
|
293
|
+
}
|
294
|
+
class jn extends Li {
|
244
295
|
project;
|
245
296
|
sheets = /* @__PURE__ */ new Map();
|
246
297
|
sheetObjects = /* @__PURE__ */ new Map();
|
@@ -265,22 +316,21 @@ class oi extends Ii {
|
|
265
316
|
return s !== void 0 || (s = this.project?.sheet(e, n), this.sheets.set(t, s)), s;
|
266
317
|
}
|
267
318
|
playSheet(e, n, t) {
|
268
|
-
return
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
}
|
278
|
-
|
279
|
-
r.rafDriver = oi.rafDriver, this.sheet(e, t)?.sequence.play(r).then((o) => s(o));
|
319
|
+
return this.app.send({
|
320
|
+
event: "playSheet",
|
321
|
+
target: "editor",
|
322
|
+
data: {
|
323
|
+
sheet: e,
|
324
|
+
instance: t,
|
325
|
+
value: n
|
326
|
+
}
|
327
|
+
}), new Promise((s) => {
|
328
|
+
const r = n !== void 0 ? { ...n } : {};
|
329
|
+
r.rafDriver = jn.rafDriver, this.sheet(e, t)?.sequence.play(r).then((o) => s(o));
|
280
330
|
});
|
281
331
|
}
|
282
332
|
pauseSheet(e, n) {
|
283
|
-
this.sheet(e)?.sequence.pause(), this.app.send({
|
333
|
+
this.sheet(e, n)?.sequence.pause(), this.app.send({
|
284
334
|
event: "pauseSheet",
|
285
335
|
target: "editor",
|
286
336
|
data: {
|
@@ -304,7 +354,7 @@ class oi extends Ii {
|
|
304
354
|
return;
|
305
355
|
const h = `${this.getSheetInstance(e, r)}_${n}`;
|
306
356
|
let c = this.sheetObjects.get(h);
|
307
|
-
c !== void 0 ? c = o.object(n, { ...t, ...c.value }, { reconfigure: !0 }) : c = o.object(n, t), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, s !== void 0 ? s :
|
357
|
+
c !== void 0 ? c = o.object(n, { ...t, ...c.value }, { reconfigure: !0 }) : c = o.object(n, t), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, s !== void 0 ? s : Nn);
|
308
358
|
const u = c.onValuesChange((f) => {
|
309
359
|
if (this.app.editor) {
|
310
360
|
for (const v in f) {
|
@@ -396,7 +446,7 @@ class oi extends Ii {
|
|
396
446
|
});
|
397
447
|
let t = -1;
|
398
448
|
const s = () => {
|
399
|
-
if (
|
449
|
+
if (n.activeSheet !== void 0 && t !== n.activeSheet.sequence.position) {
|
400
450
|
t = n.activeSheet.sequence.position;
|
401
451
|
const o = n.activeSheet;
|
402
452
|
e.send({
|
@@ -416,57 +466,6 @@ class oi extends Ii {
|
|
416
466
|
this.studio?.ui.hide();
|
417
467
|
}
|
418
468
|
}
|
419
|
-
function Br(i, e, n) {
|
420
|
-
if (i.editor) {
|
421
|
-
n.ui.restore(), n.onSelectionChange((o) => {
|
422
|
-
o.length < 1 || o.forEach((a) => {
|
423
|
-
let h = a.address.sheetId, c = "setSheet", u = {};
|
424
|
-
switch (a.type) {
|
425
|
-
case "Theatre_Sheet_PublicAPI":
|
426
|
-
c = "setSheet", u = {
|
427
|
-
sheet: a.address.sheetId
|
428
|
-
}, e.activeSheet = e.sheets.get(a.address.sheetId);
|
429
|
-
break;
|
430
|
-
case "Theatre_SheetObject_PublicAPI":
|
431
|
-
c = "setSheetObject", h += `_${a.address.objectKey}`, u = {
|
432
|
-
id: h,
|
433
|
-
sheet: a.address.sheetId,
|
434
|
-
key: a.address.objectKey
|
435
|
-
}, e.activeSheet = e.sheets.get(a.address.sheetId);
|
436
|
-
break;
|
437
|
-
}
|
438
|
-
i.send({ event: c, target: "app", data: u });
|
439
|
-
});
|
440
|
-
});
|
441
|
-
let t = -1;
|
442
|
-
const s = () => {
|
443
|
-
if (oi.rafDriver?.tick(performance.now()), e.activeSheet !== void 0 && t !== e.activeSheet.sequence.position) {
|
444
|
-
t = e.activeSheet.sequence.position;
|
445
|
-
const o = e.activeSheet;
|
446
|
-
i.send({
|
447
|
-
event: "updateTimeline",
|
448
|
-
target: "app",
|
449
|
-
data: {
|
450
|
-
position: t,
|
451
|
-
sheet: o.address.sheetId
|
452
|
-
}
|
453
|
-
});
|
454
|
-
}
|
455
|
-
}, r = () => {
|
456
|
-
s(), requestAnimationFrame(r);
|
457
|
-
};
|
458
|
-
s(), r();
|
459
|
-
} else
|
460
|
-
n.ui.hide();
|
461
|
-
}
|
462
|
-
function Hr() {
|
463
|
-
const i = document.getElementById("theatrejs-studio-root")?.shadowRoot?.getElementById("pointer-root")?.children[0], e = i?.children[1];
|
464
|
-
e.style.justifyContent = "left";
|
465
|
-
const n = e.children[1];
|
466
|
-
n.style.transform = "translateX(10px)", n.removeChild(n.children[0]), n.removeChild(n.children[0]);
|
467
|
-
const t = i?.children[3];
|
468
|
-
t.style.top = "0", t.style.right = "300px";
|
469
|
-
}
|
470
469
|
function Ls(i) {
|
471
470
|
if (i.name === "cameras")
|
472
471
|
return "camera";
|
@@ -547,7 +546,7 @@ function St(i) {
|
|
547
546
|
}
|
548
547
|
return i.anisotropy !== void 0 && (e.anisotropy = i.anisotropy), i.clearcoat !== void 0 && (e.clearcoat = i.clearcoat), i.iridescence !== void 0 && (e.iridescence = i.iridescence), i.dispersion !== void 0 && (e.dispersion = i.dispersion), i.sheen !== void 0 && (e.sheen = i.sheen), i.transmission !== void 0 && (e.transmission = i.transmission), i.transmission !== void 0 && (e.transmission = i.transmission), e;
|
549
548
|
}
|
550
|
-
function
|
549
|
+
function pi(i) {
|
551
550
|
i.updateMatrix();
|
552
551
|
const e = {
|
553
552
|
name: i.name,
|
@@ -698,11 +697,11 @@ function Fn(i) {
|
|
698
697
|
const t = new Image();
|
699
698
|
t.onload = () => {
|
700
699
|
const s = new Zn(t);
|
701
|
-
s.wrapS =
|
700
|
+
s.wrapS = ji, s.wrapT = ji, s.needsUpdate = !0, e(s);
|
702
701
|
}, t.onerror = n, t.src = i;
|
703
702
|
});
|
704
703
|
}
|
705
|
-
class Yr extends
|
704
|
+
class Yr extends Li {
|
706
705
|
scene = void 0;
|
707
706
|
scenes = /* @__PURE__ */ new Map();
|
708
707
|
renderer = void 0;
|
@@ -724,7 +723,7 @@ class Yr extends Ii {
|
|
724
723
|
}
|
725
724
|
setObject(e) {
|
726
725
|
this.renderer !== void 0 && (ti.renderer = this.renderer);
|
727
|
-
const n =
|
726
|
+
const n = pi(e);
|
728
727
|
this.app.send({
|
729
728
|
event: "setObject",
|
730
729
|
target: "editor",
|
@@ -804,7 +803,7 @@ class Yr extends Ii {
|
|
804
803
|
addScene(e) {
|
805
804
|
if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
|
806
805
|
return;
|
807
|
-
|
806
|
+
Gi(), Di(e);
|
808
807
|
const n = Lt(e);
|
809
808
|
this.app.send({
|
810
809
|
event: "addScene",
|
@@ -847,7 +846,7 @@ class Yr extends Ii {
|
|
847
846
|
setScene(e) {
|
848
847
|
if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
|
849
848
|
return;
|
850
|
-
this.renderer !== void 0 && (ti.renderer = this.renderer),
|
849
|
+
this.renderer !== void 0 && (ti.renderer = this.renderer), Gi(), Di(e);
|
851
850
|
const n = Lt(e);
|
852
851
|
this.app.send({
|
853
852
|
event: "setScene",
|
@@ -859,7 +858,7 @@ class Yr extends Ii {
|
|
859
858
|
addCamera(e) {
|
860
859
|
if (!this.app.debugEnabled)
|
861
860
|
return;
|
862
|
-
const n =
|
861
|
+
const n = pi(e);
|
863
862
|
this.app.send({
|
864
863
|
event: "addCamera",
|
865
864
|
target: "editor",
|
@@ -869,7 +868,7 @@ class Yr extends Ii {
|
|
869
868
|
removeCamera(e) {
|
870
869
|
if (!this.app.debugEnabled)
|
871
870
|
return;
|
872
|
-
const n =
|
871
|
+
const n = pi(e);
|
873
872
|
this.app.send({
|
874
873
|
event: "removeCamera",
|
875
874
|
target: "editor",
|
@@ -964,7 +963,7 @@ class Yr extends Ii {
|
|
964
963
|
return this.renderer !== void 0 ? this.renderer?.domElement : null;
|
965
964
|
}
|
966
965
|
}
|
967
|
-
var
|
966
|
+
var Ai = { exports: {} }, kt = {};
|
968
967
|
/**
|
969
968
|
* @license React
|
970
969
|
* react-jsx-runtime.production.min.js
|
@@ -974,12 +973,12 @@ var Pi = { exports: {} }, kt = {};
|
|
974
973
|
* This source code is licensed under the MIT license found in the
|
975
974
|
* LICENSE file in the root directory of this source tree.
|
976
975
|
*/
|
977
|
-
var
|
976
|
+
var $i;
|
978
977
|
function js() {
|
979
|
-
if (
|
978
|
+
if ($i)
|
980
979
|
return kt;
|
981
|
-
|
982
|
-
var i =
|
980
|
+
$i = 1;
|
981
|
+
var i = kn, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, s = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
|
983
982
|
function o(a, h, c) {
|
984
983
|
var u, f = {}, _ = null, v = null;
|
985
984
|
c !== void 0 && (_ = "" + c), h.key !== void 0 && (_ = "" + h.key), h.ref !== void 0 && (v = h.ref);
|
@@ -1002,10 +1001,10 @@ var Ut = {};
|
|
1002
1001
|
* This source code is licensed under the MIT license found in the
|
1003
1002
|
* LICENSE file in the root directory of this source tree.
|
1004
1003
|
*/
|
1005
|
-
var
|
1004
|
+
var Zi;
|
1006
1005
|
function Fs() {
|
1007
|
-
return
|
1008
|
-
var i =
|
1006
|
+
return Zi || (Zi = 1, process.env.NODE_ENV !== "production" && function() {
|
1007
|
+
var i = kn, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), r = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), a = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), R = Symbol.iterator, P = "@@iterator";
|
1009
1008
|
function k(l) {
|
1010
1009
|
if (l === null || typeof l != "object")
|
1011
1010
|
return null;
|
@@ -1243,8 +1242,8 @@ function Fs() {
|
|
1243
1242
|
} finally {
|
1244
1243
|
T = !1, ft.current = oe, It(), Error.prepareStackTrace = ie;
|
1245
1244
|
}
|
1246
|
-
var Ct = l ? l.displayName || l.name : "",
|
1247
|
-
return typeof l == "function" && D.set(l,
|
1245
|
+
var Ct = l ? l.displayName || l.name : "", Ui = Ct ? E(Ct) : "";
|
1246
|
+
return typeof l == "function" && D.set(l, Ui), Ui;
|
1248
1247
|
}
|
1249
1248
|
function K(l, O, S) {
|
1250
1249
|
return me(l, !1);
|
@@ -1348,7 +1347,7 @@ function Fs() {
|
|
1348
1347
|
}
|
1349
1348
|
return l.ref !== void 0;
|
1350
1349
|
}
|
1351
|
-
function
|
1350
|
+
function ui(l) {
|
1352
1351
|
if (fe.call(l, "key")) {
|
1353
1352
|
var O = Object.getOwnPropertyDescriptor(l, "key").get;
|
1354
1353
|
if (O && O.isReactWarning)
|
@@ -1356,7 +1355,7 @@ function Fs() {
|
|
1356
1355
|
}
|
1357
1356
|
return l.key !== void 0;
|
1358
1357
|
}
|
1359
|
-
function
|
1358
|
+
function mi(l, O) {
|
1360
1359
|
if (typeof l.ref == "string" && J.current && O && J.current.stateNode !== O) {
|
1361
1360
|
var S = Ee(J.current.type);
|
1362
1361
|
Je[S] || (y('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', Ee(J.current.type), l.ref), Je[S] = !0);
|
@@ -1384,7 +1383,7 @@ function Fs() {
|
|
1384
1383
|
});
|
1385
1384
|
}
|
1386
1385
|
}
|
1387
|
-
var
|
1386
|
+
var Ii = function(l, O, S, H, ie, oe, q) {
|
1388
1387
|
var $ = {
|
1389
1388
|
// This tag allows us to uniquely identify this as a React Element
|
1390
1389
|
$$typeof: e,
|
@@ -1416,7 +1415,7 @@ function Fs() {
|
|
1416
1415
|
function d(l, O, S, H, ie) {
|
1417
1416
|
{
|
1418
1417
|
var oe, q = {}, $ = null, Re = null;
|
1419
|
-
S !== void 0 && (X(S), $ = "" + S),
|
1418
|
+
S !== void 0 && (X(S), $ = "" + S), ui(O) && (X(O.key), $ = "" + O.key), Ot(O) && (Re = O.ref, mi(O, ie));
|
1420
1419
|
for (oe in O)
|
1421
1420
|
fe.call(O, oe) && !ke.hasOwnProperty(oe) && (q[oe] = O[oe]);
|
1422
1421
|
if (l && l.defaultProps) {
|
@@ -1428,7 +1427,7 @@ function Fs() {
|
|
1428
1427
|
var ye = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
|
1429
1428
|
$ && Gt(q, ye), Re && lt(q, ye);
|
1430
1429
|
}
|
1431
|
-
return
|
1430
|
+
return Ii(l, $, Re, ie, H, J.current, q);
|
1432
1431
|
}
|
1433
1432
|
}
|
1434
1433
|
var w = g.ReactCurrentOwner, G = g.ReactDebugCurrentFrame;
|
@@ -1456,7 +1455,7 @@ Check the render method of \`` + l + "`.";
|
|
1456
1455
|
return "";
|
1457
1456
|
}
|
1458
1457
|
}
|
1459
|
-
function
|
1458
|
+
function ki(l) {
|
1460
1459
|
{
|
1461
1460
|
if (l !== void 0) {
|
1462
1461
|
var O = l.fileName.replace(/^.*[\\\/]/, ""), S = l.lineNumber;
|
@@ -1555,7 +1554,7 @@ Check the top-level render call using <` + S + ">.");
|
|
1555
1554
|
if (!q) {
|
1556
1555
|
var $ = "";
|
1557
1556
|
(l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && ($ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1558
|
-
var Re =
|
1557
|
+
var Re = ki(ie);
|
1559
1558
|
Re ? $ += Re : $ += Me();
|
1560
1559
|
var pe;
|
1561
1560
|
l === null ? pe = "null" : ne(l) ? pe = "array" : l !== void 0 && l.$$typeof === e ? (pe = "<" + (Ee(l.type) || "Unknown") + " />", $ = " Did you accidentally export a JSX literal instead of a component?") : pe = typeof l, y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", pe, $);
|
@@ -1589,8 +1588,8 @@ Check the top-level render call using <` + S + ">.");
|
|
1589
1588
|
Ut.Fragment = t, Ut.jsx = Gn, Ut.jsxs = $n;
|
1590
1589
|
}()), Ut;
|
1591
1590
|
}
|
1592
|
-
process.env.NODE_ENV === "production" ?
|
1593
|
-
var m =
|
1591
|
+
process.env.NODE_ENV === "production" ? Ai.exports = js() : Ai.exports = Fs();
|
1592
|
+
var m = Ai.exports;
|
1594
1593
|
function zn(i) {
|
1595
1594
|
return i.title.search("<") > -1 ? /* @__PURE__ */ m.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: i.title } }) : /* @__PURE__ */ m.jsx("button", { children: i.title });
|
1596
1595
|
}
|
@@ -1607,7 +1606,7 @@ C11,8.22,10.74,8,10.43,8z`
|
|
1607
1606
|
}
|
1608
1607
|
) });
|
1609
1608
|
function Hs(i) {
|
1610
|
-
return /* @__PURE__ */ m.jsx(
|
1609
|
+
return /* @__PURE__ */ m.jsx(Un.Item, { value: i.title, children: /* @__PURE__ */ m.jsxs("div", { children: [
|
1611
1610
|
Bs,
|
1612
1611
|
/* @__PURE__ */ m.jsx("span", { children: i.title }),
|
1613
1612
|
/* @__PURE__ */ m.jsx("button", { className: "closeIcon", onClick: () => {
|
@@ -1628,7 +1627,7 @@ function Ys(i) {
|
|
1628
1627
|
let h = "dropdown draggable";
|
1629
1628
|
return i.subdropdown && (h += " subdropdown"), /* @__PURE__ */ m.jsxs("div", { className: h, onMouseEnter: () => n(!0), onMouseLeave: () => n(!1), children: [
|
1630
1629
|
/* @__PURE__ */ m.jsx(zn, { title: i.title }),
|
1631
|
-
/* @__PURE__ */ m.jsx(
|
1630
|
+
/* @__PURE__ */ m.jsx(Un.Group, { axis: "y", values: t, onReorder: r, style: { visibility: e ? "visible" : "hidden" }, children: a })
|
1632
1631
|
] });
|
1633
1632
|
}
|
1634
1633
|
function Vs(i) {
|
@@ -1721,7 +1720,7 @@ function Vr(i, e, n) {
|
|
1721
1720
|
r.target === "editor" ? s(r) : t(r);
|
1722
1721
|
};
|
1723
1722
|
}
|
1724
|
-
function
|
1723
|
+
function oi(i) {
|
1725
1724
|
const [e, n] = W(i.open !== void 0 ? i.open : !0), t = !e || i.children === void 0, s = () => {
|
1726
1725
|
j.dispatchEvent({ type: F.REMOVE_SCENE, value: i.scene });
|
1727
1726
|
};
|
@@ -1817,7 +1816,7 @@ function Bn(i) {
|
|
1817
1816
|
/* @__PURE__ */ m.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ m.jsx("div", { className: "container", children: r }) })
|
1818
1817
|
] }, Math.random()) });
|
1819
1818
|
}
|
1820
|
-
function
|
1819
|
+
function Wi(i) {
|
1821
1820
|
const e = [];
|
1822
1821
|
return i.child?.children.map((n, t) => {
|
1823
1822
|
e.push(/* @__PURE__ */ m.jsx(Bn, { child: n, scene: i.scene, three: i.three }, t));
|
@@ -1905,7 +1904,7 @@ function Et(i) {
|
|
1905
1904
|
max: i.max,
|
1906
1905
|
step: i.step,
|
1907
1906
|
ref: n,
|
1908
|
-
onChange:
|
1907
|
+
onChange: Nn
|
1909
1908
|
}
|
1910
1909
|
)
|
1911
1910
|
] })
|
@@ -1923,7 +1922,7 @@ function Zs(i) {
|
|
1923
1922
|
window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", R), _(!1);
|
1924
1923
|
}
|
1925
1924
|
function P(b) {
|
1926
|
-
const L = r.current.getBoundingClientRect(), A = yt(0, 99, b.clientX - L.left) / 99, C = yt(0, 99, b.clientY - L.top) / 99, ae =
|
1925
|
+
const L = r.current.getBoundingClientRect(), A = yt(0, 99, b.clientX - L.left) / 99, C = yt(0, 99, b.clientY - L.top) / 99, ae = Vi(Mi(c.min, c.max, A), 3), ee = Vi(Mi(c.min, c.max, C), 3);
|
1927
1926
|
i.onChange({ target: { value: { x: ae, y: ee } } }), h({ x: ae, y: ee });
|
1928
1927
|
}
|
1929
1928
|
function k(b) {
|
@@ -1939,7 +1938,7 @@ function Zs(i) {
|
|
1939
1938
|
u({ min: c.min, max: b }), (a.x > b || a.y > b) && h({ x: yt(c.min, b, a.x), y: yt(c.min, b, a.y) });
|
1940
1939
|
}
|
1941
1940
|
$e(() => {
|
1942
|
-
const b =
|
1941
|
+
const b = Hi(c.min, c.max, a.x), L = Hi(c.min, c.max, a.y);
|
1943
1942
|
o.current.style.left = `${b * 100}%`, o.current.style.top = `${L * 100}%`;
|
1944
1943
|
}, [c, a]);
|
1945
1944
|
const x = i.step !== void 0 ? i.step : 0.01;
|
@@ -2009,7 +2008,7 @@ function Zs(i) {
|
|
2009
2008
|
] })
|
2010
2009
|
] });
|
2011
2010
|
}
|
2012
|
-
function
|
2011
|
+
function Ki(i) {
|
2013
2012
|
const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, n = i.value.isEuler !== void 0, t = i.value.elements !== void 0, s = i.step !== void 0 ? i.step : 0.01, r = [];
|
2014
2013
|
if (e) {
|
2015
2014
|
const o = Ce(() => i.value, []), a = (c, u) => {
|
@@ -2188,7 +2187,7 @@ function Xs(i) {
|
|
2188
2187
|
}
|
2189
2188
|
return i;
|
2190
2189
|
}
|
2191
|
-
function
|
2190
|
+
function hi(i) {
|
2192
2191
|
switch (i) {
|
2193
2192
|
case "alphaHash":
|
2194
2193
|
return "Alpha Hash";
|
@@ -2417,11 +2416,11 @@ const Js = [
|
|
2417
2416
|
},
|
2418
2417
|
{
|
2419
2418
|
title: "Back",
|
2420
|
-
value:
|
2419
|
+
value: gn
|
2421
2420
|
},
|
2422
2421
|
{
|
2423
2422
|
title: "Double",
|
2424
|
-
value:
|
2423
|
+
value: vn
|
2425
2424
|
}
|
2426
2425
|
], Qs = [
|
2427
2426
|
{
|
@@ -2472,43 +2471,43 @@ const Js = [
|
|
2472
2471
|
], tr = [
|
2473
2472
|
{
|
2474
2473
|
title: "Zero",
|
2475
|
-
value:
|
2474
|
+
value: yn
|
2476
2475
|
},
|
2477
2476
|
{
|
2478
2477
|
title: "One",
|
2479
|
-
value:
|
2478
|
+
value: En
|
2480
2479
|
},
|
2481
2480
|
{
|
2482
2481
|
title: "Src Color",
|
2483
|
-
value:
|
2482
|
+
value: On
|
2484
2483
|
},
|
2485
2484
|
{
|
2486
2485
|
title: "One Minus Src Color",
|
2487
|
-
value:
|
2486
|
+
value: bn
|
2488
2487
|
},
|
2489
2488
|
{
|
2490
2489
|
title: "Src Alpha",
|
2491
|
-
value:
|
2490
|
+
value: Cn
|
2492
2491
|
},
|
2493
2492
|
{
|
2494
2493
|
title: "One Minus Src Alpha",
|
2495
|
-
value:
|
2494
|
+
value: Tn
|
2496
2495
|
},
|
2497
2496
|
{
|
2498
2497
|
title: "Dst Alpha",
|
2499
|
-
value:
|
2498
|
+
value: xn
|
2500
2499
|
},
|
2501
2500
|
{
|
2502
2501
|
title: "One Minus Dst Alpha",
|
2503
|
-
value:
|
2502
|
+
value: Sn
|
2504
2503
|
},
|
2505
2504
|
{
|
2506
2505
|
title: "Dst Color",
|
2507
|
-
value:
|
2506
|
+
value: wn
|
2508
2507
|
},
|
2509
2508
|
{
|
2510
2509
|
title: "One Minus Dst Color",
|
2511
|
-
value:
|
2510
|
+
value: Mn
|
2512
2511
|
},
|
2513
2512
|
{
|
2514
2513
|
title: "Src Alpha Saturate",
|
@@ -2516,76 +2515,76 @@ const Js = [
|
|
2516
2515
|
},
|
2517
2516
|
{
|
2518
2517
|
title: "Constant Color",
|
2519
|
-
value:
|
2518
|
+
value: Rn
|
2520
2519
|
},
|
2521
2520
|
{
|
2522
2521
|
title: "One Minus Constant Color",
|
2523
|
-
value:
|
2522
|
+
value: Dn
|
2524
2523
|
},
|
2525
2524
|
{
|
2526
2525
|
title: "Constant Alpha",
|
2527
|
-
value:
|
2526
|
+
value: An
|
2528
2527
|
},
|
2529
2528
|
{
|
2530
2529
|
title: "One Minus Constant Alpha",
|
2531
|
-
value:
|
2530
|
+
value: Pn
|
2532
2531
|
}
|
2533
2532
|
], ir = [
|
2534
2533
|
{
|
2535
2534
|
title: "Zero",
|
2536
|
-
value:
|
2535
|
+
value: yn
|
2537
2536
|
},
|
2538
2537
|
{
|
2539
2538
|
title: "One",
|
2540
|
-
value:
|
2539
|
+
value: En
|
2541
2540
|
},
|
2542
2541
|
{
|
2543
2542
|
title: "Src Color",
|
2544
|
-
value:
|
2543
|
+
value: On
|
2545
2544
|
},
|
2546
2545
|
{
|
2547
2546
|
title: "One Minus Src Color",
|
2548
|
-
value:
|
2547
|
+
value: bn
|
2549
2548
|
},
|
2550
2549
|
{
|
2551
2550
|
title: "Src Alpha",
|
2552
|
-
value:
|
2551
|
+
value: Cn
|
2553
2552
|
},
|
2554
2553
|
{
|
2555
2554
|
title: "One Minus Src Alpha",
|
2556
|
-
value:
|
2555
|
+
value: Tn
|
2557
2556
|
},
|
2558
2557
|
{
|
2559
2558
|
title: "Dst Alpha",
|
2560
|
-
value:
|
2559
|
+
value: xn
|
2561
2560
|
},
|
2562
2561
|
{
|
2563
2562
|
title: "One Minus Dst Alpha",
|
2564
|
-
value:
|
2563
|
+
value: Sn
|
2565
2564
|
},
|
2566
2565
|
{
|
2567
2566
|
title: "Dst Color",
|
2568
|
-
value:
|
2567
|
+
value: wn
|
2569
2568
|
},
|
2570
2569
|
{
|
2571
2570
|
title: "One Minus Dst Color",
|
2572
|
-
value:
|
2571
|
+
value: Mn
|
2573
2572
|
},
|
2574
2573
|
{
|
2575
2574
|
title: "Constant Color",
|
2576
|
-
value:
|
2575
|
+
value: Rn
|
2577
2576
|
},
|
2578
2577
|
{
|
2579
2578
|
title: "One Minus Constant Color",
|
2580
|
-
value:
|
2579
|
+
value: Dn
|
2581
2580
|
},
|
2582
2581
|
{
|
2583
2582
|
title: "Constant Alpha",
|
2584
|
-
value:
|
2583
|
+
value: An
|
2585
2584
|
},
|
2586
2585
|
{
|
2587
2586
|
title: "One Minus Constant Alpha",
|
2588
|
-
value:
|
2587
|
+
value: Pn
|
2589
2588
|
}
|
2590
2589
|
];
|
2591
2590
|
function Nt(i, e) {
|
@@ -2594,7 +2593,7 @@ function Nt(i, e) {
|
|
2594
2593
|
function nr(i, e, n, t) {
|
2595
2594
|
return {
|
2596
2595
|
type: "boolean",
|
2597
|
-
title:
|
2596
|
+
title: hi(i),
|
2598
2597
|
prop: i,
|
2599
2598
|
value: e,
|
2600
2599
|
needsUpdate: !0,
|
@@ -2611,7 +2610,7 @@ function nr(i, e, n, t) {
|
|
2611
2610
|
function sr(i, e, n, t) {
|
2612
2611
|
const s = {
|
2613
2612
|
type: "number",
|
2614
|
-
title:
|
2613
|
+
title: hi(i),
|
2615
2614
|
prop: i,
|
2616
2615
|
value: e,
|
2617
2616
|
min: void 0,
|
@@ -2649,7 +2648,7 @@ function sr(i, e, n, t) {
|
|
2649
2648
|
function rr(i, e, n, t) {
|
2650
2649
|
const s = {
|
2651
2650
|
type: "string",
|
2652
|
-
title:
|
2651
|
+
title: hi(i),
|
2653
2652
|
prop: i,
|
2654
2653
|
value: e,
|
2655
2654
|
needsUpdate: !0,
|
@@ -2691,11 +2690,11 @@ function or(i) {
|
|
2691
2690
|
function cr(i) {
|
2692
2691
|
return i.x !== void 0 && i.y !== void 0 && i.z !== void 0 && i.w !== void 0;
|
2693
2692
|
}
|
2694
|
-
function
|
2693
|
+
function Pi(i) {
|
2695
2694
|
i.sort((e, n) => e.title < n.title ? -1 : e.title > n.title ? 1 : 0);
|
2696
2695
|
}
|
2697
2696
|
function Yt(i, e, n, t, s = "", r = !1) {
|
2698
|
-
const o =
|
2697
|
+
const o = hi(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), a = s.length > 0 ? `${s}.${i}` : i, h = typeof e;
|
2699
2698
|
if (h === "boolean" || h === "string")
|
2700
2699
|
return {
|
2701
2700
|
title: o,
|
@@ -2739,7 +2738,7 @@ function Yt(i, e, n, t, s = "", r = !1) {
|
|
2739
2738
|
value: e,
|
2740
2739
|
disabled: r,
|
2741
2740
|
onChange: (c, u) => {
|
2742
|
-
const f = new
|
2741
|
+
const f = new di(u);
|
2743
2742
|
t.updateObject(n.uuid, `material.${a}`, f);
|
2744
2743
|
const _ = t.getScene(n.uuid);
|
2745
2744
|
if (_ !== null) {
|
@@ -2761,7 +2760,7 @@ function Yt(i, e, n, t, s = "", r = !1) {
|
|
2761
2760
|
}
|
2762
2761
|
}
|
2763
2762
|
if (c.length > 0)
|
2764
|
-
return
|
2763
|
+
return Pi(c), {
|
2765
2764
|
title: o,
|
2766
2765
|
items: c
|
2767
2766
|
};
|
@@ -2905,7 +2904,7 @@ function Yt(i, e, n, t, s = "", r = !1) {
|
|
2905
2904
|
console.log("Issue cycling through material object:", i, e);
|
2906
2905
|
}
|
2907
2906
|
if (c.length > 0)
|
2908
|
-
return
|
2907
|
+
return Pi(c), {
|
2909
2908
|
title: o,
|
2910
2909
|
items: c
|
2911
2910
|
};
|
@@ -2913,7 +2912,7 @@ function Yt(i, e, n, t, s = "", r = !1) {
|
|
2913
2912
|
}
|
2914
2913
|
}
|
2915
2914
|
}
|
2916
|
-
function
|
2915
|
+
function Xi(i, e, n) {
|
2917
2916
|
const t = [];
|
2918
2917
|
for (const s in i) {
|
2919
2918
|
if (!Ks(s))
|
@@ -2931,7 +2930,7 @@ function qi(i, e, n) {
|
|
2931
2930
|
} else
|
2932
2931
|
o !== void 0 && console.log("other:", s, r, o);
|
2933
2932
|
}
|
2934
|
-
return
|
2933
|
+
return Pi(t), t.push({
|
2935
2934
|
title: "Update Material",
|
2936
2935
|
type: "button",
|
2937
2936
|
onChange: () => {
|
@@ -2954,7 +2953,7 @@ function lr(i, e) {
|
|
2954
2953
|
ut,
|
2955
2954
|
{
|
2956
2955
|
title: `Material ${r}`,
|
2957
|
-
items:
|
2956
|
+
items: Xi(n[r], i, e)
|
2958
2957
|
},
|
2959
2958
|
`Material ${r}`
|
2960
2959
|
)
|
@@ -2965,11 +2964,11 @@ function lr(i, e) {
|
|
2965
2964
|
ut,
|
2966
2965
|
{
|
2967
2966
|
title: "Material",
|
2968
|
-
items:
|
2967
|
+
items: Xi(n, i, e)
|
2969
2968
|
}
|
2970
2969
|
);
|
2971
2970
|
}
|
2972
|
-
const
|
2971
|
+
const qi = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
|
2973
2972
|
function dr(i) {
|
2974
2973
|
const e = i.step !== void 0 ? i.step : 0.01, n = de(null), t = de(null), s = de(null), r = de(null), o = de(null), [a] = W(i.value), [h, c] = W(i.value.offset[0]), [u, f] = W(i.value.offset[1]), [_, v] = W(i.value.repeat[0]), [R, P] = W(i.value.repeat[1]);
|
2975
2974
|
function k(y, x, b, L, A) {
|
@@ -3004,7 +3003,7 @@ function dr(i) {
|
|
3004
3003
|
qs().then((y) => {
|
3005
3004
|
n.current.src = y, k(y, h, u, _, R);
|
3006
3005
|
});
|
3007
|
-
}, src: a.src.length > 0 ? a.src :
|
3006
|
+
}, src: a.src.length > 0 ? a.src : qi }),
|
3008
3007
|
/* @__PURE__ */ m.jsxs("div", { className: "fields", children: [
|
3009
3008
|
/* @__PURE__ */ m.jsxs("div", { children: [
|
3010
3009
|
/* @__PURE__ */ m.jsx("label", { children: "Offset:" }),
|
@@ -3053,14 +3052,14 @@ function dr(i) {
|
|
3053
3052
|
)
|
3054
3053
|
] }),
|
3055
3054
|
/* @__PURE__ */ m.jsx("button", { onClick: () => {
|
3056
|
-
k("", h, u, _, R), n.current.src =
|
3055
|
+
k("", h, u, _, R), n.current.src = qi;
|
3057
3056
|
}, children: "Clear" })
|
3058
3057
|
] })
|
3059
3058
|
] });
|
3060
3059
|
}
|
3061
3060
|
function ii(i) {
|
3062
3061
|
let e = i.value;
|
3063
|
-
e !== void 0 && (e.isColor !== void 0 ? e =
|
3062
|
+
e !== void 0 && (e.isColor !== void 0 ? e = Yi(i.value) : i.type === "color" && (e = Yi(new di(i.value))));
|
3064
3063
|
const [n, t] = W(e), s = de(null), r = (c) => {
|
3065
3064
|
let u = c.target.value;
|
3066
3065
|
if (i.type === "boolean")
|
@@ -3153,9 +3152,9 @@ function ii(i) {
|
|
3153
3152
|
i.type === "image" && /* @__PURE__ */ m.jsx(dr, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
|
3154
3153
|
i.type === "option" && /* @__PURE__ */ m.jsx(m.Fragment, { children: /* @__PURE__ */ m.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((c, u) => /* @__PURE__ */ m.jsx("option", { value: c.value, children: ri(c.title) }, u)) }) }),
|
3155
3154
|
i.type === "vector2" && /* @__PURE__ */ m.jsx(Zs, { step: i.step, value: n, min: 0, max: 1, onChange: r }),
|
3156
|
-
i.type === "grid3" && /* @__PURE__ */ m.jsx(
|
3155
|
+
i.type === "grid3" && /* @__PURE__ */ m.jsx(Ki, { step: i.step, value: n, onChange: r }),
|
3157
3156
|
i.type === "grid4" && /* @__PURE__ */ m.jsx(Ws, { step: i.step, value: n, onChange: r }),
|
3158
|
-
i.type === "euler" && /* @__PURE__ */ m.jsx(
|
3157
|
+
i.type === "euler" && /* @__PURE__ */ m.jsx(Ki, { step: i.step, value: n, onChange: r })
|
3159
3158
|
] });
|
3160
3159
|
}
|
3161
3160
|
function hr(i) {
|
@@ -3189,7 +3188,7 @@ function ut(i) {
|
|
3189
3188
|
Math.random()
|
3190
3189
|
)
|
3191
3190
|
);
|
3192
|
-
}), /* @__PURE__ */ m.jsx(
|
3191
|
+
}), /* @__PURE__ */ m.jsx(oi, { label: i.title, open: i.expanded === !0, children: e });
|
3193
3192
|
}
|
3194
3193
|
function ur(i) {
|
3195
3194
|
const [e] = W([]), [n] = W([]), [t, s] = W(0);
|
@@ -3234,7 +3233,7 @@ function ur(i) {
|
|
3234
3233
|
};
|
3235
3234
|
}, []), /* @__PURE__ */ m.jsx("div", { className: "customGroups", children: e }, t);
|
3236
3235
|
}
|
3237
|
-
function
|
3236
|
+
function Ji(i) {
|
3238
3237
|
switch (i) {
|
3239
3238
|
case "fov":
|
3240
3239
|
return "FOV";
|
@@ -3268,7 +3267,7 @@ function mr(i, e) {
|
|
3268
3267
|
if (i.perspectiveCameraInfo !== void 0)
|
3269
3268
|
for (const t in i.perspectiveCameraInfo)
|
3270
3269
|
n.push({
|
3271
|
-
title:
|
3270
|
+
title: Ji(t),
|
3272
3271
|
prop: t,
|
3273
3272
|
type: "number",
|
3274
3273
|
step: 0.01,
|
@@ -3285,7 +3284,7 @@ function mr(i, e) {
|
|
3285
3284
|
else if (i.orthographicCameraInfo !== void 0)
|
3286
3285
|
for (const t in i.orthographicCameraInfo)
|
3287
3286
|
n.push({
|
3288
|
-
title:
|
3287
|
+
title: Ji(t),
|
3289
3288
|
prop: t,
|
3290
3289
|
type: "number",
|
3291
3290
|
step: 0.01,
|
@@ -3308,7 +3307,7 @@ function mr(i, e) {
|
|
3308
3307
|
);
|
3309
3308
|
}
|
3310
3309
|
function fr(i, e) {
|
3311
|
-
const n = new
|
3310
|
+
const n = new Ln();
|
3312
3311
|
n.elements = i.matrix;
|
3313
3312
|
const t = new he(), s = new cs(), r = new he();
|
3314
3313
|
i.uuid.length > 0 && (t.setFromMatrixPosition(n), s.setFromRotationMatrix(n), r.setFromMatrixScale(n));
|
@@ -3359,7 +3358,7 @@ function fr(i, e) {
|
|
3359
3358
|
}
|
3360
3359
|
);
|
3361
3360
|
}
|
3362
|
-
function
|
3361
|
+
function Qi(i) {
|
3363
3362
|
switch (i) {
|
3364
3363
|
case "color":
|
3365
3364
|
return "Color";
|
@@ -3388,12 +3387,12 @@ function pr(i, e) {
|
|
3388
3387
|
for (const t in i.lightInfo) {
|
3389
3388
|
const s = i.lightInfo[t];
|
3390
3389
|
s !== void 0 && (s.isColor !== void 0 ? n.push({
|
3391
|
-
title:
|
3390
|
+
title: Qi(t),
|
3392
3391
|
prop: t,
|
3393
3392
|
type: "color",
|
3394
3393
|
value: s,
|
3395
3394
|
onChange: (r, o) => {
|
3396
|
-
const a = new
|
3395
|
+
const a = new di(o);
|
3397
3396
|
e.updateObject(i.uuid, r, a);
|
3398
3397
|
const h = e.getScene(i.uuid);
|
3399
3398
|
if (h !== null) {
|
@@ -3402,7 +3401,7 @@ function pr(i, e) {
|
|
3402
3401
|
}
|
3403
3402
|
}
|
3404
3403
|
}) : n.push({
|
3405
|
-
title:
|
3404
|
+
title: Qi(t),
|
3406
3405
|
prop: t,
|
3407
3406
|
type: typeof s,
|
3408
3407
|
value: s,
|
@@ -3522,7 +3521,7 @@ function gr(i) {
|
|
3522
3521
|
};
|
3523
3522
|
}, []);
|
3524
3523
|
const t = Pe.type.toLowerCase(), s = Pe.animations.length > 0 || Pe.mixer !== void 0, r = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
|
3525
|
-
return /* @__PURE__ */ m.jsx(
|
3524
|
+
return /* @__PURE__ */ m.jsx(oi, { label: "Inspector", children: /* @__PURE__ */ m.jsx("div", { id: "Inspector", className: i.class, children: Pe.uuid.length > 0 && /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
3526
3525
|
/* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
3527
3526
|
/* @__PURE__ */ m.jsx(
|
3528
3527
|
ii,
|
@@ -3569,7 +3568,7 @@ function vr(i) {
|
|
3569
3568
|
const c = h.value;
|
3570
3569
|
e.push(c), n.push(
|
3571
3570
|
/* @__PURE__ */ m.jsx(
|
3572
|
-
|
3571
|
+
oi,
|
3573
3572
|
{
|
3574
3573
|
label: `Scene: ${c.name}`,
|
3575
3574
|
scene: c,
|
@@ -3577,7 +3576,7 @@ function vr(i) {
|
|
3577
3576
|
onRefresh: () => {
|
3578
3577
|
i.three.refreshScene(c.name);
|
3579
3578
|
},
|
3580
|
-
children: /* @__PURE__ */ m.jsx(
|
3579
|
+
children: /* @__PURE__ */ m.jsx(Wi, { child: c, scene: c, three: i.three })
|
3581
3580
|
},
|
3582
3581
|
Math.random()
|
3583
3582
|
)
|
@@ -3587,7 +3586,7 @@ function vr(i) {
|
|
3587
3586
|
for (let u = 0; u < e.length; u++)
|
3588
3587
|
if (c.uuid === e[u].uuid) {
|
3589
3588
|
e[u] = c, n[u] = /* @__PURE__ */ m.jsx(
|
3590
|
-
|
3589
|
+
oi,
|
3591
3590
|
{
|
3592
3591
|
label: `Scene: ${c.name}`,
|
3593
3592
|
scene: c,
|
@@ -3595,7 +3594,7 @@ function vr(i) {
|
|
3595
3594
|
onRefresh: () => {
|
3596
3595
|
i.three.refreshScene(c.name);
|
3597
3596
|
},
|
3598
|
-
children: /* @__PURE__ */ m.jsx(
|
3597
|
+
children: /* @__PURE__ */ m.jsx(Wi, { child: c, scene: c, three: i.three })
|
3599
3598
|
},
|
3600
3599
|
Math.random()
|
3601
3600
|
), s(Date.now());
|
@@ -3683,7 +3682,7 @@ class yr extends ls {
|
|
3683
3682
|
const r = new ds({ fog: !1 });
|
3684
3683
|
super(s, r), this.light = e, this.color = n, this.type = "RectAreaLightHelper";
|
3685
3684
|
const o = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], a = new si();
|
3686
|
-
a.setAttribute("position", new Vt(o, 3)), a.computeBoundingSphere(), this.add(new
|
3685
|
+
a.setAttribute("position", new Vt(o, 3)), a.computeBoundingSphere(), this.add(new li(a, new ni({ side: gn, fog: !1 })));
|
3687
3686
|
}
|
3688
3687
|
updateMatrixWorld() {
|
3689
3688
|
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
@@ -3699,8 +3698,8 @@ class yr extends ls {
|
|
3699
3698
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3700
3699
|
}
|
3701
3700
|
}
|
3702
|
-
const
|
3703
|
-
class Or extends
|
3701
|
+
const en = { type: "change" }, _i = { type: "start" }, tn = { type: "end" }, Kt = new hs(), nn = new us(), Er = Math.cos(70 * ms.DEG2RAD);
|
3702
|
+
class Or extends _n {
|
3704
3703
|
constructor(e, n) {
|
3705
3704
|
super(), this.object = e, this.domElement = n, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new he(), this.cursor = new he(), 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: Tt.ROTATE, MIDDLE: Tt.DOLLY, RIGHT: Tt.PAN }, this.touches = { ONE: xt.ROTATE, TWO: xt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
3706
3705
|
return a.phi;
|
@@ -3715,9 +3714,9 @@ class Or extends gn {
|
|
3715
3714
|
}, this.saveState = function() {
|
3716
3715
|
t.target0.copy(t.target), t.position0.copy(t.object.position), t.zoom0 = t.object.zoom;
|
3717
3716
|
}, this.reset = function() {
|
3718
|
-
t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(
|
3717
|
+
t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(en), t.update(), r = s.NONE;
|
3719
3718
|
}, this.update = function() {
|
3720
|
-
const d = new he(), w = new
|
3719
|
+
const d = new he(), w = new Si().setFromUnitVectors(e.up, new he(0, 1, 0)), G = w.clone().invert(), Q = new he(), be = new Si(), Be = new he(), Me = 2 * Math.PI;
|
3721
3720
|
return function($t = null) {
|
3722
3721
|
const Zt = t.object.position;
|
3723
3722
|
d.copy(Zt).sub(t.target), d.applyQuaternion(w), a.setFromVector3(d), t.autoRotate && r === s.NONE && je(qe($t)), t.enableDamping ? (a.theta += h.theta * t.dampingFactor, a.phi += h.phi * t.dampingFactor) : (a.theta += h.theta, a.phi += h.phi);
|
@@ -3746,12 +3745,12 @@ class Or extends gn {
|
|
3746
3745
|
Wt.unproject(t.object), t.object.position.sub(Wt).add(dt), t.object.updateMatrixWorld(), Ke = d.length();
|
3747
3746
|
} else
|
3748
3747
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
|
3749
|
-
Ke !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Ke).add(t.object.position) : (Kt.origin.copy(t.object.position), Kt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Kt.direction)) < Er ? e.lookAt(t.target) : (
|
3748
|
+
Ke !== null && (this.screenSpacePanning ? t.target.set(0, 0, -1).transformDirection(t.object.matrix).multiplyScalar(Ke).add(t.object.position) : (Kt.origin.copy(t.object.position), Kt.direction.set(0, 0, -1).transformDirection(t.object.matrix), Math.abs(t.object.up.dot(Kt.direction)) < Er ? e.lookAt(t.target) : (nn.setFromNormalAndCoplanarPoint(t.object.up, t.target), Kt.intersectPlane(nn, t.target))));
|
3750
3749
|
} else if (t.object.isOrthographicCamera) {
|
3751
3750
|
const Ke = t.object.zoom;
|
3752
3751
|
t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / c)), Ke !== t.object.zoom && (t.object.updateProjectionMatrix(), pt = !0);
|
3753
3752
|
}
|
3754
|
-
return c = 1, A = !1, pt || Q.distanceToSquared(t.object.position) > o || 8 * (1 - be.dot(t.object.quaternion)) > o || Be.distanceToSquared(t.target) > o ? (t.dispatchEvent(
|
3753
|
+
return c = 1, A = !1, pt || Q.distanceToSquared(t.object.position) > o || 8 * (1 - be.dot(t.object.quaternion)) > o || Be.distanceToSquared(t.target) > o ? (t.dispatchEvent(en), Q.copy(t.object.position), be.copy(t.object.quaternion), Be.copy(t.target), !0) : !1;
|
3755
3754
|
};
|
3756
3755
|
}(), this.dispose = function() {
|
3757
3756
|
t.domElement.removeEventListener("contextmenu", Je), t.domElement.removeEventListener("pointerdown", Te), t.domElement.removeEventListener("pointercancel", Ie), t.domElement.removeEventListener("wheel", Y), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", Ie), t.domElement.getRootNode().removeEventListener("keydown", X, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ke), t._domElementKeyEvents = null);
|
@@ -3767,7 +3766,7 @@ class Or extends gn {
|
|
3767
3766
|
TOUCH_DOLLY_ROTATE: 6
|
3768
3767
|
};
|
3769
3768
|
let r = s.NONE;
|
3770
|
-
const o = 1e-6, a = new
|
3769
|
+
const o = 1e-6, a = new wi(), h = new wi();
|
3771
3770
|
let c = 1;
|
3772
3771
|
const u = new he(), f = new De(), _ = new De(), v = new De(), R = new De(), P = new De(), k = new De(), g = new De(), y = new De(), x = new De(), b = new he(), L = new De();
|
3773
3772
|
let A = !1;
|
@@ -3925,15 +3924,15 @@ class Or extends gn {
|
|
3925
3924
|
t.enableZoom && fe(d), t.enableRotate && M(d);
|
3926
3925
|
}
|
3927
3926
|
function Te(d) {
|
3928
|
-
t.enabled !== !1 && (C.length === 0 && (t.domElement.setPointerCapture(d.pointerId), t.domElement.addEventListener("pointermove", we), t.domElement.addEventListener("pointerup", Ie)), !
|
3927
|
+
t.enabled !== !1 && (C.length === 0 && (t.domElement.setPointerCapture(d.pointerId), t.domElement.addEventListener("pointermove", we), t.domElement.addEventListener("pointerup", Ie)), !mi(d) && (Ot(d), d.pointerType === "touch" ? ze(d) : ne(d)));
|
3929
3928
|
}
|
3930
3929
|
function we(d) {
|
3931
3930
|
t.enabled !== !1 && (d.pointerType === "touch" ? ct(d) : ve(d));
|
3932
3931
|
}
|
3933
3932
|
function Ie(d) {
|
3934
|
-
switch (
|
3933
|
+
switch (ui(d), C.length) {
|
3935
3934
|
case 0:
|
3936
|
-
t.domElement.releasePointerCapture(d.pointerId), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", Ie), t.dispatchEvent(
|
3935
|
+
t.domElement.releasePointerCapture(d.pointerId), t.domElement.removeEventListener("pointermove", we), t.domElement.removeEventListener("pointerup", Ie), t.dispatchEvent(tn), r = s.NONE;
|
3937
3936
|
break;
|
3938
3937
|
case 1:
|
3939
3938
|
const w = C[0], G = ae[w];
|
@@ -3987,7 +3986,7 @@ class Or extends gn {
|
|
3987
3986
|
default:
|
3988
3987
|
r = s.NONE;
|
3989
3988
|
}
|
3990
|
-
r !== s.NONE && t.dispatchEvent(
|
3989
|
+
r !== s.NONE && t.dispatchEvent(_i);
|
3991
3990
|
}
|
3992
3991
|
function ve(d) {
|
3993
3992
|
switch (r) {
|
@@ -4009,7 +4008,7 @@ class Or extends gn {
|
|
4009
4008
|
}
|
4010
4009
|
}
|
4011
4010
|
function Y(d) {
|
4012
|
-
t.enabled === !1 || t.enableZoom === !1 || r !== s.NONE || (d.preventDefault(), t.dispatchEvent(
|
4011
|
+
t.enabled === !1 || t.enableZoom === !1 || r !== s.NONE || (d.preventDefault(), t.dispatchEvent(_i), Ae(z(d)), t.dispatchEvent(tn));
|
4013
4012
|
}
|
4014
4013
|
function z(d) {
|
4015
4014
|
const w = d.deltaMode, G = {
|
@@ -4073,7 +4072,7 @@ class Or extends gn {
|
|
4073
4072
|
default:
|
4074
4073
|
r = s.NONE;
|
4075
4074
|
}
|
4076
|
-
r !== s.NONE && t.dispatchEvent(
|
4075
|
+
r !== s.NONE && t.dispatchEvent(_i);
|
4077
4076
|
}
|
4078
4077
|
function ct(d) {
|
4079
4078
|
switch (Gt(d), r) {
|
@@ -4107,7 +4106,7 @@ class Or extends gn {
|
|
4107
4106
|
function Ot(d) {
|
4108
4107
|
C.push(d.pointerId);
|
4109
4108
|
}
|
4110
|
-
function
|
4109
|
+
function ui(d) {
|
4111
4110
|
delete ae[d.pointerId];
|
4112
4111
|
for (let w = 0; w < C.length; w++)
|
4113
4112
|
if (C[w] == d.pointerId) {
|
@@ -4115,7 +4114,7 @@ class Or extends gn {
|
|
4115
4114
|
return;
|
4116
4115
|
}
|
4117
4116
|
}
|
4118
|
-
function
|
4117
|
+
function mi(d) {
|
4119
4118
|
for (let w = 0; w < C.length; w++)
|
4120
4119
|
if (C[w] == d.pointerId)
|
4121
4120
|
return !0;
|
@@ -4136,7 +4135,7 @@ const br = Math.PI / 180;
|
|
4136
4135
|
function wt(i, e, n, t, s) {
|
4137
4136
|
return t + (i - e) * (s - t) / (n - e);
|
4138
4137
|
}
|
4139
|
-
function
|
4138
|
+
function sn(i) {
|
4140
4139
|
return i * br;
|
4141
4140
|
}
|
4142
4141
|
/*!
|
@@ -4178,7 +4177,7 @@ function _t(i) {
|
|
4178
4177
|
function ht(i) {
|
4179
4178
|
return i.isOrthographicCamera;
|
4180
4179
|
}
|
4181
|
-
const Rt = Math.PI * 2,
|
4180
|
+
const Rt = Math.PI * 2, rn = Math.PI / 2, Vn = 1e-5, jt = Math.PI / 180;
|
4182
4181
|
function Xe(i, e, n) {
|
4183
4182
|
return Math.max(e, Math.min(n, i));
|
4184
4183
|
}
|
@@ -4188,7 +4187,7 @@ function le(i, e = Vn) {
|
|
4188
4187
|
function se(i, e, n = Vn) {
|
4189
4188
|
return le(i - e, n);
|
4190
4189
|
}
|
4191
|
-
function
|
4190
|
+
function an(i, e) {
|
4192
4191
|
return Math.round(i / e) * e;
|
4193
4192
|
}
|
4194
4193
|
function Ft(i) {
|
@@ -4208,7 +4207,7 @@ function Xt(i, e, n, t, s = 1 / 0, r) {
|
|
4208
4207
|
let v = e + (c + _) * h;
|
4209
4208
|
return u - i > 0 == v > u && (v = u, n.value = (v - u) / r), v;
|
4210
4209
|
}
|
4211
|
-
function
|
4210
|
+
function on(i, e, n, t, s = 1 / 0, r, o) {
|
4212
4211
|
t = Math.max(1e-4, t);
|
4213
4212
|
const a = 2 / t, h = a * r, c = 1 / (1 + h + 0.48 * h * h + 0.235 * h * h * h);
|
4214
4213
|
let u = e.x, f = e.y, _ = e.z, v = i.x - u, R = i.y - f, P = i.z - _;
|
@@ -4223,12 +4222,12 @@ function cn(i, e, n, t, s = 1 / 0, r, o) {
|
|
4223
4222
|
const ee = k - i.x, qe = g - i.y, U = y - i.z, je = o.x - k, Ee = o.y - g, xe = o.z - y;
|
4224
4223
|
return ee * je + qe * Ee + U * xe > 0 && (o.x = k, o.y = g, o.z = y, n.x = (o.x - k) / r, n.y = (o.y - g) / r, n.z = (o.z - y) / r), o;
|
4225
4224
|
}
|
4226
|
-
function
|
4225
|
+
function gi(i, e) {
|
4227
4226
|
e.set(0, 0), i.forEach((n) => {
|
4228
4227
|
e.x += n.clientX, e.y += n.clientY;
|
4229
4228
|
}), e.x /= i.length, e.y /= i.length;
|
4230
4229
|
}
|
4231
|
-
function
|
4230
|
+
function vi(i, e) {
|
4232
4231
|
return ht(i) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
|
4233
4232
|
}
|
4234
4233
|
class Cr {
|
@@ -4295,9 +4294,9 @@ class Cr {
|
|
4295
4294
|
}
|
4296
4295
|
}
|
4297
4296
|
}
|
4298
|
-
var
|
4299
|
-
const Tr = "2.9.0", qt = 1 / 8, xr = /Mac/.test((
|
4300
|
-
let B,
|
4297
|
+
var yi;
|
4298
|
+
const Tr = "2.9.0", qt = 1 / 8, xr = /Mac/.test((yi = globalThis?.navigator) === null || yi === void 0 ? void 0 : yi.platform);
|
4299
|
+
let B, cn, Jt, Ei, Le, V, te, Dt, Bt, Qe, et, gt, ln, dn, Ge, Ht, At, hn, Oi, un, bi, Ci, Qt;
|
4301
4300
|
class tt extends Cr {
|
4302
4301
|
/**
|
4303
4302
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
@@ -4340,7 +4339,7 @@ class tt extends Cr {
|
|
4340
4339
|
* @category Statics
|
4341
4340
|
*/
|
4342
4341
|
static install(e) {
|
4343
|
-
B = e.THREE,
|
4342
|
+
B = e.THREE, cn = Object.freeze(new B.Vector3(0, 0, 0)), Jt = Object.freeze(new B.Vector3(0, 1, 0)), Ei = Object.freeze(new B.Vector3(0, 0, 1)), Le = new B.Vector2(), V = new B.Vector3(), te = new B.Vector3(), Dt = new B.Vector3(), Bt = new B.Vector3(), Qe = new B.Vector3(), et = new B.Vector3(), gt = new B.Vector3(), ln = new B.Vector3(), dn = new B.Vector3(), Ge = new B.Spherical(), Ht = new B.Spherical(), At = new B.Box3(), hn = new B.Box3(), Oi = new B.Sphere(), un = new B.Quaternion(), bi = new B.Quaternion(), Ci = new B.Matrix4(), Qt = new B.Raycaster();
|
4344
4343
|
}
|
4345
4344
|
/**
|
4346
4345
|
* list all ACTIONs
|
@@ -4519,7 +4518,7 @@ class tt extends Cr {
|
|
4519
4518
|
}, _ = (g) => {
|
4520
4519
|
if (!this._enabled)
|
4521
4520
|
return;
|
4522
|
-
if (
|
4521
|
+
if (gi(this._activePointers, Le), this._getClientRect(this._elementRect), t.copy(Le), s.copy(Le), this._activePointers.length >= 2) {
|
4523
4522
|
const x = Le.x - this._activePointers[1].clientX, b = Le.y - this._activePointers[1].clientY, L = Math.sqrt(x * x + b * b);
|
4524
4523
|
r.set(0, L);
|
4525
4524
|
const A = (this._activePointers[0].clientX + this._activePointers[1].clientX) * 0.5, C = (this._activePointers[0].clientY + this._activePointers[1].clientY) * 0.5;
|
@@ -4545,7 +4544,7 @@ class tt extends Cr {
|
|
4545
4544
|
}, v = () => {
|
4546
4545
|
if (!this._enabled || !this._dragNeedsUpdate)
|
4547
4546
|
return;
|
4548
|
-
this._dragNeedsUpdate = !1,
|
4547
|
+
this._dragNeedsUpdate = !1, gi(this._activePointers, Le);
|
4549
4548
|
const y = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, x = y ? -y.deltaX : s.x - Le.x, b = y ? -y.deltaY : s.y - Le.y;
|
4550
4549
|
if (s.copy(Le), ((this._state & p.ROTATE) === p.ROTATE || (this._state & p.TOUCH_ROTATE) === p.TOUCH_ROTATE || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(x, b), this._isUserControllingRotate = !0), (this._state & p.DOLLY) === p.DOLLY || (this._state & p.ZOOM) === p.ZOOM) {
|
4551
4550
|
const L = this.dollyToCursor ? (t.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, A = this.dollyToCursor ? (t.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, C = this.dollyDragInverted ? -1 : 1;
|
@@ -4559,7 +4558,7 @@ class tt extends Cr {
|
|
4559
4558
|
}
|
4560
4559
|
((this._state & p.TRUCK) === p.TRUCK || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK) && (this._truckInternal(x, b, !1), this._isUserControllingTruck = !0), ((this._state & p.OFFSET) === p.OFFSET || (this._state & p.TOUCH_OFFSET) === p.TOUCH_OFFSET || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET) && (this._truckInternal(x, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
4561
4560
|
}, R = () => {
|
4562
|
-
|
4561
|
+
gi(this._activePointers, Le), s.copy(Le), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", a, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this.dispatchEvent({ type: "controlend" }));
|
4563
4562
|
};
|
4564
4563
|
this.lockPointer = () => {
|
4565
4564
|
!this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
|
@@ -4949,12 +4948,12 @@ class tt extends Cr {
|
|
4949
4948
|
fitToBox(e, n, { cover: t = !1, paddingLeft: s = 0, paddingRight: r = 0, paddingBottom: o = 0, paddingTop: a = 0 } = {}) {
|
4950
4949
|
const h = [], c = e.isBox3 ? At.copy(e) : At.setFromObject(e);
|
4951
4950
|
c.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
4952
|
-
const u =
|
4951
|
+
const u = an(this._sphericalEnd.theta, rn), f = an(this._sphericalEnd.phi, rn);
|
4953
4952
|
h.push(this.rotateTo(u, f, n));
|
4954
|
-
const _ = V.setFromSpherical(this._sphericalEnd).normalize(), v =
|
4955
|
-
R && v.multiply(
|
4956
|
-
const P =
|
4957
|
-
te.copy(c.min).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setX(c.max.x).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setY(c.max.y).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setZ(c.min.z).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setZ(c.max.z).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setY(c.min.y).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setX(c.min.x).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).applyQuaternion(v), P.expandByPoint(te), P.min.x -= s, P.min.y -= o, P.max.x += r, P.max.y += a, v.setFromUnitVectors(
|
4953
|
+
const _ = V.setFromSpherical(this._sphericalEnd).normalize(), v = un.setFromUnitVectors(_, Ei), R = se(Math.abs(_.y), 1);
|
4954
|
+
R && v.multiply(bi.setFromAxisAngle(Jt, u)), v.multiply(this._yAxisUpSpaceInverse);
|
4955
|
+
const P = hn.makeEmpty();
|
4956
|
+
te.copy(c.min).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setX(c.max.x).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setY(c.max.y).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setZ(c.min.z).applyQuaternion(v), P.expandByPoint(te), te.copy(c.min).setZ(c.max.z).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setY(c.min.y).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).setX(c.min.x).applyQuaternion(v), P.expandByPoint(te), te.copy(c.max).applyQuaternion(v), P.expandByPoint(te), P.min.x -= s, P.min.y -= o, P.max.x += r, P.max.y += a, v.setFromUnitVectors(Ei, _), R && v.premultiply(bi.invert()), v.premultiply(this._yAxisUpSpace);
|
4958
4957
|
const k = P.getSize(V), g = P.getCenter(te).applyQuaternion(v);
|
4959
4958
|
if (_t(this._camera)) {
|
4960
4959
|
const y = this.getDistanceToFitBox(k.x, k.y, k.z, t);
|
@@ -4972,7 +4971,7 @@ class tt extends Cr {
|
|
4972
4971
|
* @category Methods
|
4973
4972
|
*/
|
4974
4973
|
fitToSphere(e, n) {
|
4975
|
-
const t = [], r = "isObject3D" in e ? tt.createBoundingSphere(e,
|
4974
|
+
const t = [], r = "isObject3D" in e ? tt.createBoundingSphere(e, Oi) : Oi.copy(e);
|
4976
4975
|
if (t.push(this.moveTo(r.center.x, r.center.y, r.center.z, n)), _t(this._camera)) {
|
4977
4976
|
const o = this.getDistanceToFitSphere(r.radius);
|
4978
4977
|
t.push(this.dollyTo(o, n));
|
@@ -5117,7 +5116,7 @@ class tt extends Cr {
|
|
5117
5116
|
* @category Methods
|
5118
5117
|
*/
|
5119
5118
|
getDistanceToFitBox(e, n, t, s = !1) {
|
5120
|
-
if (
|
5119
|
+
if (vi(this._camera, "getDistanceToFitBox"))
|
5121
5120
|
return this._spherical.radius;
|
5122
5121
|
const r = e / n, o = this._camera.getEffectiveFOV() * jt, a = this._camera.aspect;
|
5123
5122
|
return ((s ? r > a : r < a) ? n : e / a) * 0.5 / Math.tan(o * 0.5) + t * 0.5;
|
@@ -5129,7 +5128,7 @@ class tt extends Cr {
|
|
5129
5128
|
* @category Methods
|
5130
5129
|
*/
|
5131
5130
|
getDistanceToFitSphere(e) {
|
5132
|
-
if (
|
5131
|
+
if (vi(this._camera, "getDistanceToFitSphere"))
|
5133
5132
|
return this._spherical.radius;
|
5134
5133
|
const n = this._camera.getEffectiveFOV() * jt, t = Math.atan(Math.tan(n * 0.5) * this._camera.aspect) * 2, s = 1 < this._camera.aspect ? n : t;
|
5135
5134
|
return e / Math.sin(s * 0.5);
|
@@ -5235,7 +5234,7 @@ class tt extends Cr {
|
|
5235
5234
|
* @category Methods
|
5236
5235
|
*/
|
5237
5236
|
update(e) {
|
5238
|
-
const n = this._sphericalEnd.theta - this._spherical.theta, t = this._sphericalEnd.phi - this._spherical.phi, s = this._sphericalEnd.radius - this._spherical.radius, r =
|
5237
|
+
const n = this._sphericalEnd.theta - this._spherical.theta, t = this._sphericalEnd.phi - this._spherical.phi, s = this._sphericalEnd.radius - this._spherical.radius, r = ln.subVectors(this._targetEnd, this._target), o = dn.subVectors(this._focalOffsetEnd, this._focalOffset), a = this._zoomEnd - this._zoom;
|
5239
5238
|
if (le(n))
|
5240
5239
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
5241
5240
|
else {
|
@@ -5258,13 +5257,13 @@ class tt extends Cr {
|
|
5258
5257
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
5259
5258
|
else {
|
5260
5259
|
const f = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
|
5261
|
-
|
5260
|
+
on(this._target, this._targetEnd, this._targetVelocity, f, this.maxSpeed, e, this._target), this._needsUpdate = !0;
|
5262
5261
|
}
|
5263
5262
|
if (le(o.x) && le(o.y) && le(o.z))
|
5264
5263
|
this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
|
5265
5264
|
else {
|
5266
5265
|
const f = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
|
5267
|
-
|
5266
|
+
on(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, f, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
|
5268
5267
|
}
|
5269
5268
|
if (le(a))
|
5270
5269
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
@@ -5408,13 +5407,13 @@ class tt extends Cr {
|
|
5408
5407
|
// lateUpdate
|
5409
5408
|
_collisionTest() {
|
5410
5409
|
let e = 1 / 0;
|
5411
|
-
if (!(this.colliderMeshes.length >= 1) ||
|
5410
|
+
if (!(this.colliderMeshes.length >= 1) || vi(this._camera, "_collisionTest"))
|
5412
5411
|
return e;
|
5413
5412
|
const t = this._getTargetDirection(Bt);
|
5414
|
-
|
5413
|
+
Ci.lookAt(cn, t, this._camera.up);
|
5415
5414
|
for (let s = 0; s < 4; s++) {
|
5416
5415
|
const r = te.copy(this._nearPlaneCorners[s]);
|
5417
|
-
r.applyMatrix4(
|
5416
|
+
r.applyMatrix4(Ci);
|
5418
5417
|
const o = Dt.addVectors(this._target, r);
|
5419
5418
|
Qt.set(o, t), Qt.far = this._spherical.radius + 1;
|
5420
5419
|
const a = Qt.intersectObjects(this.colliderMeshes);
|
@@ -5493,7 +5492,7 @@ class tt extends Cr {
|
|
5493
5492
|
}), t.radius = Math.sqrt(r), t;
|
5494
5493
|
}
|
5495
5494
|
}
|
5496
|
-
const
|
5495
|
+
const ci = (i) => {
|
5497
5496
|
const [e, n] = W(i.options[i.index]), t = () => {
|
5498
5497
|
i.onToggle(!i.open);
|
5499
5498
|
}, s = (r) => {
|
@@ -5517,7 +5516,7 @@ const li = (i) => {
|
|
5517
5516
|
} }),
|
5518
5517
|
/* @__PURE__ */ m.jsxs("div", { className: "options", children: [
|
5519
5518
|
/* @__PURE__ */ m.jsx(
|
5520
|
-
|
5519
|
+
ci,
|
5521
5520
|
{
|
5522
5521
|
title: "Camera",
|
5523
5522
|
index: e.options.indexOf(e.camera.name),
|
@@ -5531,7 +5530,7 @@ const li = (i) => {
|
|
5531
5530
|
}
|
5532
5531
|
),
|
5533
5532
|
/* @__PURE__ */ m.jsx(
|
5534
|
-
|
5533
|
+
ci,
|
5535
5534
|
{
|
5536
5535
|
title: "Mode",
|
5537
5536
|
index: t.indexOf(s),
|
@@ -5552,7 +5551,7 @@ const li = (i) => {
|
|
5552
5551
|
] })
|
5553
5552
|
] });
|
5554
5553
|
});
|
5555
|
-
class Sr extends
|
5554
|
+
class Sr extends In {
|
5556
5555
|
constructor(e) {
|
5557
5556
|
super({
|
5558
5557
|
extensions: {
|
@@ -5560,7 +5559,7 @@ class Sr extends kn {
|
|
5560
5559
|
derivatives: !0
|
5561
5560
|
},
|
5562
5561
|
glslVersion: fs,
|
5563
|
-
side:
|
5562
|
+
side: vn,
|
5564
5563
|
transparent: !0,
|
5565
5564
|
uniforms: {
|
5566
5565
|
uScale: {
|
@@ -5570,7 +5569,7 @@ class Sr extends kn {
|
|
5570
5569
|
value: e?.divisions !== void 0 ? e?.divisions : 10
|
5571
5570
|
},
|
5572
5571
|
uColor: {
|
5573
|
-
value: e?.color !== void 0 ? e?.color : new
|
5572
|
+
value: e?.color !== void 0 ? e?.color : new di(16777215)
|
5574
5573
|
},
|
5575
5574
|
uDistance: {
|
5576
5575
|
value: e?.distance !== void 0 ? e?.distance : 1e4
|
@@ -5665,7 +5664,7 @@ class Sr extends kn {
|
|
5665
5664
|
});
|
5666
5665
|
}
|
5667
5666
|
}
|
5668
|
-
class wr extends
|
5667
|
+
class wr extends li {
|
5669
5668
|
gridMaterial;
|
5670
5669
|
constructor() {
|
5671
5670
|
const e = new Sr();
|
@@ -5714,7 +5713,7 @@ void main() {
|
|
5714
5713
|
#include <clipping_planes_fragment>
|
5715
5714
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
5716
5715
|
}`;
|
5717
|
-
class Dr extends
|
5716
|
+
class Dr extends In {
|
5718
5717
|
constructor() {
|
5719
5718
|
super({
|
5720
5719
|
defines: {
|
@@ -5725,15 +5724,15 @@ class Dr extends kn {
|
|
5725
5724
|
});
|
5726
5725
|
}
|
5727
5726
|
}
|
5728
|
-
let re,
|
5727
|
+
let re, Ti = !1, Z = null, ce = null, Ue = null, Ne = null, Pt = "Renderer", ei = "Renderer", mn = "Renderer", fn = "Renderer";
|
5729
5728
|
function Ar(i) {
|
5730
|
-
const e = i.three.app.appID, n = Ce(() => /* @__PURE__ */ new Map(), []), t = Ce(() => /* @__PURE__ */ new Map(), []), s = Ce(() => /* @__PURE__ */ new Map(), []), r = Ce(() => /* @__PURE__ */ new Map(), []), o = Ce(() => new
|
5729
|
+
const e = i.three.app.appID, n = Ce(() => /* @__PURE__ */ new Map(), []), t = Ce(() => /* @__PURE__ */ new Map(), []), s = Ce(() => /* @__PURE__ */ new Map(), []), r = Ce(() => /* @__PURE__ */ new Map(), []), o = Ce(() => new pn(), []), a = Ce(() => new Fi(), []), h = Ce(() => new wr(), []), c = Ce(() => new zi(500), []), u = Ce(() => new zi(100), []), f = Ce(() => new _s(), []), _ = Ce(() => new gs(), []), v = Ce(() => new Dr(), []), R = Ce(() => new ni({
|
5731
5730
|
opacity: 0.33,
|
5732
5731
|
transparent: !0,
|
5733
5732
|
wireframe: !0
|
5734
5733
|
}), []);
|
5735
5734
|
function P(E, T) {
|
5736
|
-
const D = new
|
5735
|
+
const D = new xi(-100, 100, 100, -100, 50, 5e3);
|
5737
5736
|
return D.name = E, D.position.copy(T), D.lookAt(0, 0, 0), n.set(E, D), D;
|
5738
5737
|
}
|
5739
5738
|
const k = [
|
@@ -5792,7 +5791,7 @@ function Ar(i) {
|
|
5792
5791
|
E.autoClear = !1, E.shadowMap.enabled = !0, E.setPixelRatio(devicePixelRatio), E.setClearColor(0), i.three.renderer = E, je(E);
|
5793
5792
|
}, []), $e(() => {
|
5794
5793
|
o.name = "Debug Scene", o.uuid = "", a.name = "helpers", o.add(a), a.add(h), c.name = "axisHelper", a.add(c), u.name = "interactionHelper", a.add(u), u.visible = !1, P("Top", new he(0, 1e3, 0)), P("Bottom", new he(0, -1e3, 0)), P("Left", new he(-1e3, 0, 0)), P("Right", new he(1e3, 0, 0)), P("Front", new he(0, 0, 1e3)), P("Back", new he(0, 0, -1e3)), P("Orthographic", new he(1e3, 1e3, 1e3)), P("UI", new he());
|
5795
|
-
const E = new
|
5794
|
+
const E = new fi(60, 1, 50, 5e3);
|
5796
5795
|
E.name = "Debug", E.position.set(500, 500, 500), E.lookAt(0, 0, 0), n.set("Debug", E), Z = n.get(C.getItem(`${e}_tlCam`)), ce = n.get(C.getItem(`${e}_trCam`)), Ue = n.get(C.getItem(`${e}_blCam`)), Ne = n.get(C.getItem(`${e}_brCam`)), Z === void 0 && (Z = n.get("Debug")), ce === void 0 && (ce = n.get("Orthographic")), Ue === void 0 && (Ue = n.get("Front")), Ne === void 0 && (Ne = n.get("Top"));
|
5797
5796
|
}, []), $e(() => {
|
5798
5797
|
const E = () => {
|
@@ -5827,11 +5826,11 @@ function Ar(i) {
|
|
5827
5826
|
const I = i.scenes.get(M.value.name);
|
5828
5827
|
if (I !== void 0) {
|
5829
5828
|
const fe = new I();
|
5830
|
-
i.onSceneSet !== void 0 && i.onSceneSet(fe), re = fe, i.three.scene = re, o.add(re),
|
5829
|
+
i.onSceneSet !== void 0 && i.onSceneSet(fe), re = fe, i.three.scene = re, o.add(re), Ti = !0, T();
|
5831
5830
|
}
|
5832
5831
|
}, N = (M) => {
|
5833
5832
|
const I = M.value, fe = i.three.scene?.getObjectByProperty("uuid", I.uuid);
|
5834
|
-
if (fe !== void 0 && n.set(I.name, fe), fe instanceof
|
5833
|
+
if (fe !== void 0 && n.set(I.name, fe), fe instanceof fi) {
|
5835
5834
|
const Oe = new ys(fe);
|
5836
5835
|
s.set(fe.name, Oe), o.add(Oe);
|
5837
5836
|
}
|
@@ -5850,8 +5849,8 @@ function Ar(i) {
|
|
5850
5849
|
if (U === null)
|
5851
5850
|
return;
|
5852
5851
|
let E = window.innerWidth, T = window.innerHeight, D = Math.floor(E / 2), N = Math.floor(T / 2), me = -1;
|
5853
|
-
const K = new si(), M = new ni(), I = new
|
5854
|
-
E = window.innerWidth - 300, T = window.innerHeight, D = Math.floor(E / 2), N = Math.floor(T / 2), i.three.resize(E, T), i.onSceneResize !== void 0 &&
|
5852
|
+
const K = new si(), M = new ni(), I = new Fi(), fe = () => {
|
5853
|
+
E = window.innerWidth - 300, T = window.innerHeight, D = Math.floor(E / 2), N = Math.floor(T / 2), i.three.resize(E, T), i.onSceneResize !== void 0 && Ti && i.onSceneResize(re, E, T);
|
5855
5854
|
let ne = E, ve = T;
|
5856
5855
|
switch (ee) {
|
5857
5856
|
case "Side by Side":
|
@@ -5866,7 +5865,7 @@ function Ar(i) {
|
|
5866
5865
|
}
|
5867
5866
|
const Y = ne / ve;
|
5868
5867
|
n.forEach((z) => {
|
5869
|
-
z instanceof
|
5868
|
+
z instanceof xi ? (z.left = ne / -2, z.right = ne / 2, z.top = ve / 2, z.bottom = ve / -2, z.name === "UI" && (z.position.x = E / 2, z.position.y = T / -2, z.position.z = 100), z.updateProjectionMatrix()) : z instanceof fi && (z.aspect = Y, z.updateProjectionMatrix(), s.get(z.name)?.update());
|
5870
5869
|
});
|
5871
5870
|
};
|
5872
5871
|
function Oe(ne) {
|
@@ -5896,7 +5895,7 @@ function Ar(i) {
|
|
5896
5895
|
U.setViewport(0, Y, E, N), U.setScissor(0, Y, E, N), re?.onBeforeRender(U, re, Z, K, M, I), U.render(o, Z), o.overrideMaterial = ve, U.setViewport(0, 0, E, N), U.setScissor(0, 0, E, N), re?.onBeforeRender(U, re, ce, K, M, I), U.render(o, ce);
|
5897
5896
|
}
|
5898
5897
|
}, we = () => {
|
5899
|
-
const ne = Oe(Pt), ve = Oe(ei), Y = Oe(
|
5898
|
+
const ne = Oe(Pt), ve = Oe(ei), Y = Oe(mn), z = Oe(fn);
|
5900
5899
|
let X = 0, J = 0;
|
5901
5900
|
J = T - N, X = 0, o.overrideMaterial = ne, U.setViewport(X, J, D, N), U.setScissor(X, J, D, N), re?.onBeforeRender(U, re, Z, K, M, I), U.render(o, Z), X = D, o.overrideMaterial = ve, U.setViewport(X, J, D, N), U.setScissor(X, J, D, N), re?.onBeforeRender(U, re, ce, K, M, I), U.render(o, ce), J = 0, X = 0, o.overrideMaterial = Y, U.setViewport(X, J, D, N), U.setScissor(X, J, D, N), re?.onBeforeRender(U, re, Ue, K, M, I), U.render(o, Ue), X = D, o.overrideMaterial = z, U.setViewport(X, J, D, N), U.setScissor(X, J, D, N), re?.onBeforeRender(U, re, Ne, K, M, I), U.render(o, Ne);
|
5902
5901
|
}, Ie = () => {
|
@@ -5906,7 +5905,7 @@ function Ar(i) {
|
|
5906
5905
|
ne.update();
|
5907
5906
|
}), r.forEach((ne) => {
|
5908
5907
|
ne.update !== void 0 && ne.update();
|
5909
|
-
}), i.onSceneUpdate !== void 0 &&
|
5908
|
+
}), i.onSceneUpdate !== void 0 && Ti && i.onSceneUpdate(re), U.clear(), ee) {
|
5910
5909
|
case "Single":
|
5911
5910
|
st();
|
5912
5911
|
break;
|
@@ -5929,15 +5928,15 @@ function Ar(i) {
|
|
5929
5928
|
Vector2: De,
|
5930
5929
|
Vector3: he,
|
5931
5930
|
Vector4: Es,
|
5932
|
-
Quaternion:
|
5933
|
-
Matrix4:
|
5934
|
-
Spherical:
|
5931
|
+
Quaternion: Si,
|
5932
|
+
Matrix4: Ln,
|
5933
|
+
Spherical: wi,
|
5935
5934
|
Box3: Os,
|
5936
5935
|
Sphere: bs,
|
5937
|
-
Raycaster:
|
5936
|
+
Raycaster: Bi
|
5938
5937
|
};
|
5939
5938
|
tt.install({ THREE: E });
|
5940
|
-
const T = new
|
5939
|
+
const T = new Bi(), D = new De();
|
5941
5940
|
let N = Z, me = x, K, M, I = -1;
|
5942
5941
|
const fe = (Y, z, X, J) => {
|
5943
5942
|
switch (ee) {
|
@@ -5997,7 +5996,7 @@ function Ar(i) {
|
|
5997
5996
|
J.start(), K.getWorldPosition(Y.target0);
|
5998
5997
|
const ke = () => {
|
5999
5998
|
const ze = J.getDelta();
|
6000
|
-
M && M.update(ze), z && (Y.target.lerp(Y.target0, X), Y.object.position.lerp(Y.position0, X), Y.object.zoom =
|
5999
|
+
M && M.update(ze), z && (Y.target.lerp(Y.target0, X), Y.object.position.lerp(Y.position0, X), Y.object.zoom = Mi(Y.object.zoom, Y.zoom0, X), Y.object.updateProjectionMatrix(), Y.dispatchEvent({ type: "change" })), J.getElapsedTime() >= 0.5 ? (cancelAnimationFrame(I), I = -1, we()) : I = requestAnimationFrame(ke);
|
6001
6000
|
};
|
6002
6001
|
ke();
|
6003
6002
|
}, we = () => {
|
@@ -6007,7 +6006,7 @@ function Ar(i) {
|
|
6007
6006
|
if (N.name === "UI")
|
6008
6007
|
return;
|
6009
6008
|
const z = t.get(N.name);
|
6010
|
-
Y.key === "0" ? (we(), M = new tt(N, me.current), K instanceof
|
6009
|
+
Y.key === "0" ? (we(), M = new tt(N, me.current), K instanceof li || K instanceof ws ? (K.geometry.computeBoundingBox(), M.fitToBox(K.geometry.boundingBox, !0)) : M.fitToSphere(K, !0), Te(z, !0)) : Y.key === "1" ? (we(), M = new tt(N, me.current), M.rotateTo(0, Math.PI * 0.5, !0), M.moveTo(K.position.x, K.position.y, 0, !0), Te(z)) : Y.key === "2" ? (we(), M = new tt(N, me.current), M.rotateTo(0, 0, !0), M.moveTo(K.position.x, 0, K.position.z, !0), Te(z)) : Y.key === "3" ? (we(), M = new tt(N, me.current), M.rotateTo(Math.PI / 2, Math.PI / 2, !0), M.moveTo(0, K.position.y, K.position.z, !0), Te(z)) : Y.key === "4" ? (we(), M = new tt(N, me.current), M.rotateTo(Math.PI, Math.PI / 2, !0), M.moveTo(K.position.x, K.position.y, 0, !0), Te(z)) : Y.key === "5" && (we(), M = new tt(N, me.current), M.rotateTo(sn(45), sn(45), !0), Te(z));
|
6011
6010
|
}
|
6012
6011
|
}, ne = (Y) => {
|
6013
6012
|
K = re.getObjectByProperty("uuid", Y.value.uuid);
|
@@ -6119,7 +6118,7 @@ function Ar(i) {
|
|
6119
6118
|
T !== void 0 && (We(Ue), Ue = T, C.setItem(`${e}_blCam`, T.name), ge(T, L.current));
|
6120
6119
|
},
|
6121
6120
|
onSelectRenderMode: (E) => {
|
6122
|
-
|
6121
|
+
mn = E, C.setItem(`${e}_blRender`, E);
|
6123
6122
|
}
|
6124
6123
|
}
|
6125
6124
|
),
|
@@ -6135,7 +6134,7 @@ function Ar(i) {
|
|
6135
6134
|
T !== void 0 && (We(Ne), Ne = T, C.setItem(`${e}_brCam`, T.name), ge(T, A.current));
|
6136
6135
|
},
|
6137
6136
|
onSelectRenderMode: (E) => {
|
6138
|
-
|
6137
|
+
fn = E, C.setItem(`${e}_brRender`, E);
|
6139
6138
|
}
|
6140
6139
|
}
|
6141
6140
|
)
|
@@ -6143,7 +6142,7 @@ function Ar(i) {
|
|
6143
6142
|
] }),
|
6144
6143
|
/* @__PURE__ */ m.jsxs("div", { className: "settings", children: [
|
6145
6144
|
/* @__PURE__ */ m.jsx(
|
6146
|
-
|
6145
|
+
ci,
|
6147
6146
|
{
|
6148
6147
|
title: "View",
|
6149
6148
|
index: k.indexOf(ee),
|
@@ -6158,7 +6157,7 @@ function Ar(i) {
|
|
6158
6157
|
}
|
6159
6158
|
),
|
6160
6159
|
/* @__PURE__ */ m.jsx(
|
6161
|
-
|
6160
|
+
ci,
|
6162
6161
|
{
|
6163
6162
|
title: "Interact",
|
6164
6163
|
index: Ze === "Orbit" ? 0 : 1,
|
@@ -6202,11 +6201,11 @@ function $r(i) {
|
|
6202
6201
|
] }) });
|
6203
6202
|
}
|
6204
6203
|
export {
|
6205
|
-
|
6204
|
+
oi as Accordion,
|
6206
6205
|
Fr as Application,
|
6207
|
-
|
6206
|
+
Li as BaseRemote,
|
6208
6207
|
Bn as ChildObject,
|
6209
|
-
|
6208
|
+
Wi as ContainerObject,
|
6210
6209
|
Ys as Draggable,
|
6211
6210
|
Hs as DraggableItem,
|
6212
6211
|
Vs as Dropdown,
|
@@ -6218,7 +6217,7 @@ export {
|
|
6218
6217
|
zn as NavButton,
|
6219
6218
|
zr as RemoteComponents,
|
6220
6219
|
Vr as RemoteController,
|
6221
|
-
|
6220
|
+
jn as RemoteTheatre,
|
6222
6221
|
Yr as RemoteThree,
|
6223
6222
|
Gr as SceneInspector,
|
6224
6223
|
vr as SidePanel,
|
@@ -6226,7 +6225,7 @@ export {
|
|
6226
6225
|
F as ToolEvents,
|
6227
6226
|
ri as capitalize,
|
6228
6227
|
yt as clamp,
|
6229
|
-
|
6228
|
+
Yi as colorToHex,
|
6230
6229
|
Hr as customizeTheatreElements,
|
6231
6230
|
j as debugDispatcher,
|
6232
6231
|
Ur as defaultTheatreCallback,
|
@@ -6234,14 +6233,14 @@ export {
|
|
6234
6233
|
Ps as disposeMaterial,
|
6235
6234
|
jr as disposeTexture,
|
6236
6235
|
Nr as distance,
|
6237
|
-
|
6236
|
+
Di as hierarchyUUID,
|
6238
6237
|
As as isColor,
|
6239
|
-
|
6240
|
-
|
6241
|
-
|
6238
|
+
Mi as mix,
|
6239
|
+
Nn as noop,
|
6240
|
+
Hi as normalize,
|
6242
6241
|
Ds as randomID,
|
6243
|
-
|
6244
|
-
|
6242
|
+
Gi as resetThreeObjects,
|
6243
|
+
Vi as round,
|
6245
6244
|
Br as theatreEditorApp,
|
6246
|
-
|
6245
|
+
Ri as totalThreeObjects
|
6247
6246
|
};
|